diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..bbb11c4 --- /dev/null +++ b/README.adoc @@ -0,0 +1,494 @@ +:experimental: +:imagesdir: http://ssalewski.de/tmp +:source-highlighter: pygments + +(c) Stefan Salewski + +2017 + += High level GTK3 bindings for the Nim programming language + +NOTE: This work is partly based on earlier works of J. Mansour and has been supported by A. Rumpf and other Nim and GTK/Gnome developers. +The combinatorics module was kindly provided by R. Behrends. + +This repository contains bindings from the Nim programming language to the GTK3 GUI library and related libraries. (With minimal fixes +it should also work for upcoming GTK4.) + +https://nim-lang.org/[Nim] is a modern universal programming language. + +https://www.gtk.org/[GTK], also known as the Gimp Tool Kit and now sometimes also called Gnome Tool Kit, is a Graphical User Interface library. + +NOTE: Later we will insert at this location a nice picture of a fancy Nim GTK3 GUI. Such a picture is fine to attract users and indeed is a good motivation. +But such pictures are no real evidence for the quality of a GUI toolkit -- the concrete example may look nice, while the toolkit +looks much worse in other environments and offers by far not all that what is needed in real life. + +While GTK was initially designed and advertised as cross platform GUI toolkit, it is currently mostly used on Linux and other Unix like operation systems. +Most Linux distributions include it, and some use it for their default desktop environment, often with the Gnome environment or other window managers. +While GTK2 applications like GIMP are still used on Windows, there seems to exist currently only very few GTK3 applications for Windows or MacOS. +When you develop primary free open source software for Linux or other Unix like Operating Systems, then GTK3 is a good choice for you. With some +effort you should be even able to port your application to the proprietary Windows or MacOS operating systems. But when your primary target platforms +are Windows and MacOS and you desire a real native look and feel there, then you may find better suited ones in the Nim software repository. +Also, when you only need a minimal restricted GUI which is very easy to install on Windows and MacOSX, then you may find better suited packages +in the Nim package repository. Android OS is currently not supported by GTK at all. + +While low level Nim bindings for GTK3 are already available since a few years, this one is an attempt to +provide real high level bindings with full type safety, full Garbage Collector (GC) support and an idiomatic +application interface. + +The low level bindings available at https://github.com/ngtk3 where generated with the Nim tool c2nim directly from the C header files, are already tested +with some applications (https://github.com/ngtk3/NEd[NEd Nim Editor], https://github.com/StefanSalewski/nim-chess3[Chess Game]) +and generally work fine. Indeed missing Garbage Collector support is generally not really a problem, as widgets are generally +put into containers and were automatically deleted together with its parents due to GTK's reference counting. + +Still there can be some demand for really high level bindings -- so this repository tries to provide them. + +High level GTK3 bindings, as available for many other programming languages like Python, Ruby or D already, +would have these advantages: + +* full Garbage Collector support -- you should never have to free resources manually +* Widgets are Nim objects, so inheritance and sub-classing can be used +* full type safety -- no needs for casts or other unsafe and dangerous operations + +These high level bindings are based on GObject-Inrospection, an XML based database like interface description. Compared to the C header +files this description gives us more and deeper information about data types and function calls, for example ownership transfer of objects and +in or out direction of procedure variables, which makes writing the glue code much easier. +And it should work with no or minimal +modifications also for the upcoming GTK4. + +Unfortunately there are also some drawbacks: + +* The Application Programmer Interface (API) will be different from what is known from C API, so using C examples or C tutorials is not really straight forward +* The high level source code will differ from available C examples, so there would be a big demand for tutorials +* We need a lot of glue code, which has much room for bugs. So much testing is necessary. +* There is some overhead due to indirect calls, leading to some code size increase and minimal +performance loss. + +NOTE: The new package name is "gintro", short for GObject-Introspection. The previous name was nim-gi, but the hyphen is deprecated for package names, as is the +nim prefix. + +== Current state of these bindings + +We are still in an early stage, but it is already more than a proof of concept. GTK and related libraries have many thousand of +callable functions and nearly as many data types. Testing all that is nearly impossible for a small team with limited resources. +The initial approach was to generate low level +bindings, which looked similar to the ones generated by the c2nim tool from the C headers. After that was done, we have associated all +the C structs and GObject data types with Nim proxy objects. A well defined relation between these proxy object and the low level C data types +should ensure fully automatic garbage collection. This is supported by smart type conversion, for example C strings returned by glib library +are assigned to newly created Nim strings, while the memory of the C strings is automatically freed. For most cases this seems to work. But there +exists a few more complicated cases, for example functions may return whole arrays of C strings or other non elementary data types, +or function arguments or results may be so called glists, +list structures of glib library. These cases can not be processed automatically but needs carefully manual investigations. And there may be still functions and data +types missing: GObject Introspection query gives us many thousand lines of Nim interface code, and it is not really obvious if and what is missing. +Some functions and data types are missing for sure -- at least some low level ones, which are considered unneeded for high level bindings by GObject-Introspection. +But maybe more is missing, we have to investigate that. Until now these bindings have been tested only for 64 bit Linux systems with GTK 3.22. + +These basic libraries are already partly tested: + +* GLib +* GObject +* GModule +* xlib +* Gio +* Atk +* Pango +* cairo +* GdkPixbuf +* Rsvg +* Gdk +* Gtk + +In best case it should be possible to add more GObject based libraries to this list without larger modifications of the generator source code. +Unfortunately the cairo bindings provided by GObject-Introspectin are only a minimal stub -- later we will have to extend it manually. + +== How to try it out + +Of course you will need a working Nim installation with a recent compiler version and you have to ensure that GTK and related libraries are installed on your system. For some Linux +distributions which provide mainly pre-compiled software you may have to also install some GTK related developer files. + +This package now supports the nimble package manager, so ideally a plain "nimble install gintro" should do. But as this package does not +only provide some plain text files, but uses GObject-Introspection database query on your local computer to generate +binding files exactly matching your system, that does not work currently. We have to download the files, compile and execute +the gen.nim generator program and finally to install the generates binding modules on your computer as a nimble package. + +These instructions should be enough for that: + +---- +cd /tmp +git clone https://github.com/stefansalewski/gintro +cd gintro +nimble prepare +nimble install +---- + +NOTE: Nimble prepare should run for about 20 seconds, it compiles and executes the generator program gen.nim. +Unfortunately we can not guarantee that the generator command will be able to really build all the +desired modules. The built process highly depends on your OS and installed GTK version. For 64 bit Linux systems +with GTK 3.22 and all required dependencies installed it should work. For never GTK versions it may fail, when that GTK +release introduces for example new unknown data types like array containers. In that case manual fixes may be necessary. +The GObject Introspection based built process generates bindings customized to the OS where the generator is executed, +so for older GTK releases or a 32 bit system different files are created. Later we may also provide pre-generated +files for various OS and GTK versions, but building locally is preferred when possible. + +Now you can built app0 and launch it: + +---- +cd /tmp/gintro/examples/ +nim c app0.nim +./app0 +---- + +== A few basic examples + +GTK3 programs can use still the old GTK2 design, where you first initialize the GTK library, create your widgets and finally enter the GTK main loop. +This style is still used in many tutorials as in http://zetcode.com/gui/gtk2/[Zetcode tutorial] or in the GTK book of Andrew Krause. +Or you can use the new GTK3 App style, this is generally recommended by newer original GTK documentation. +Unfortunately the GTK3 original documentation is mostly restricted to the GTK3 API documentation, which is generally very good, but makes +it not very easy for beginners to start with GTK. API docs and some basic introduction is available here: + +* https://www.gnome.org/ +* https://www.gtk.org/ +* https://developer.gnome.org/ +* https://developer.gnome.org/gtk3/stable/ +* https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5 +* https://developer.gnome.org/gnome-devel-demos/stable/c.html.en + +TIP: If you should decide to continue developing software with GTK, then you should consider installing the so called +devhelp tool. It gives you easy and fast access to the API docs. For example, if you want to use a Button Widget in your +GUI and wants to learn more about related functions and signals, you just enter "Button" in that tool and are guided to +all the relevant information. + +We start with a minimal traditional old style example, which should be familiar to most of us: + +[source,nim] +---- +# nim c t0.nim +import gtk + +proc bye(w: Window) = + mainQuit() + echo "Bye..." + +proc main = + gtk.init() + let window = newWindow() + window.title = "First Test" + window.connect("destroy", bye) + window.showAll + gtk.main() + +main() +---- + +This is the traditional layout of GTK2 programs. When using this style then it is important to initialize the GTK library by calling gtk.init() +at the very beginning. Then we create the desired widgets, connect signals, show all widgets and finally enter the GTK main loop +by calling gtk.main. About connecting signals we will learn more soon, for now it is only important that we have to connect to +the destroy signal here to enable the user to terminate program execution by clicking the window close button. + +Now a really minimal but complete App style example, which displays an empty window. + +NOTE: The source text of all these examples is contained in the examples directory. Unfortunately github +seems to not allow to include that sources directly into this document, so there may be minimal +differences between the source code displayed here and the sources in examples directory. + +[source,nim] +---- +# app0.nim -- minimal application style example +# nim c app0.nim +import gtk +import gio except Application, newApplication # we want to use GTK application +#from gio import ApplicationFlags, scActivate, run + +proc activate(app: Application) = + let window = newApplicationWindow(app) + window.title = "GTK3 & Nim" + window.defaultSize = (200, 200) + showAll(window) + +proc main = + let app = newApplication("org.gtk.example") + connect(app, "activate", activate) + discard run(app) + +main() +---- + +In the main proc we create a new application and connect the activate signal to our activate proc, which then creates and displays +the still empty window. For this program we need the gtk module and also some procs and types from gio module. As both modules +have a data type called Application (gtk extends indeed the gio.Application) we can either qualify the Application data type and its new proc +with gtk prefix, or as we did here, exclude that from gio imports. Another solution would be to import from gio only what is really needed. +The source code of this minimal example is stored in the examples directory, you may cd into it and type "nim c app0.nim" to create +the executable. (Well not yet, as we provide no real nimble install. Copy app0.nim to nim_gi directory where the bindings live, or +create symlinks for now.) + +Various ways to set widget parameters are supported -- the number 1 to 6 refer to the comment below: + +//. Setting widget parameters +[source,nim] +---- +setDefaultSize(window, 200, 200) # <1> +gtk.setDefaultSize(window, 200, 200) # <2> +window.setDefaultSize(200, 200) # <3> +window.setDefaultSize(width = 200, height = 200) # <4> +window.defaultSize = (200, 200) # <5> +window.defaultSize = (width: 200, height: 200) # <6> +---- + +<1> proc call syntax +<2> optional qualified with module name prefix +<3> method call syntax +<4> named parameters +<5> tupel assignment +<6> tupel assignment with named members + +Well, that empty window is really not very interesting. The GTK and Gnome team provides some GTK examples at https://developer.gnome.org/gnome-devel-demos/. +The https://developer.gnome.org/gnome-devel-demos/3.22/c.html.en[C demos] seems to be most actual and complete, and are easy to port to Nim. So we start with these, +but if you are familiar with the other listed languages, then you can try to port them to Nim as well. Let us start with https://developer.gnome.org/gnome-devel-demos/3.22/button.c.html.en +-- it is still short and easy to understand, but shows already some interesting topics. + +image::NimGTK3Button.png[] + +The C code looks like this: + +[source,c] +---- +#include + +/*This is the callback function. It is a handler function which +reacts to the signal. In this case, it will cause the button label's +string to reverse.*/ +static void +button_clicked (GtkButton *button, + gpointer user_data) +{ + const char *old_label; + char *new_label; + + old_label = gtk_button_get_label (button); + new_label = g_utf8_strreverse (old_label, -1); + + gtk_button_set_label (button, new_label); + g_free (new_label); +} + +static void +activate (GtkApplication *app, + gpointer user_data) +{ + GtkWidget *window; + GtkWidget *button; + + /*Create a window with a title and a default size*/ + window = gtk_application_window_new (app); + gtk_window_set_title (GTK_WINDOW (window), "GNOME Button"); + gtk_window_set_default_size (GTK_WINDOW (window), 250, 50); + + /*Create a button with a label, and add it to the window*/ + button = gtk_button_new_with_label ("Click Me"); + gtk_container_add (GTK_CONTAINER (window), button); + + /*Connecting the clicked signal to the callback function*/ + g_signal_connect (GTK_BUTTON (button), + "clicked", + G_CALLBACK (button_clicked), + G_OBJECT (window)); + + gtk_widget_show_all (window); +} + +int +main (int argc, char **argv) +{ + GtkApplication *app; + int status; + + app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE); + g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); + status = g_application_run (G_APPLICATION (app), argc, argv); + g_object_unref (app); + + return status; +} + +---- + +Converting it to Nim is straight forward with some basic C and Nim knowledge, and Nim does not force us +to convert its shape into all the classes known from pure object orientated languages. We can either use the +Nim tool c2nim to help us with the conversion, or do it manually. Indeed c2nim can be very helpful by +converting C sources to Nim. Most of the time it works well. Personally I generally pre-process C files, for example +by removing too strange macros and defines, or by replacing strange constructs, like C for loops, to simpler +ones like while loops. Then I apply c2nim to the C file and finally manually compare the result line by line and +fine tune the Nim code. But for this short source text we may do all that manually and finally get something like +this: + +[source,nim] +---- +# nim c button.nim +import gtk, glib +import gio except Application, newApplication + +proc buttonClicked (button: Button) = + button.label = utf8Strreverse(button.label, -1) + +proc activate (app: Application) = + let window = newApplicationWindow(app) + window.title = "GNOME Button" + window.defaultSize = (250, 50) + let button = newButton("Click Me") + window.add(button) + button.connect("clicked", buttonClicked) + window.showAll + +proc main = + let app = newApplication("org.gtk.example") + connect(app, "activate", activate) + discard app.run + +main() +---- + +Again we have the basic shape already known from app0.nim example: Main proc creates the application, connect +to the activate signal and finally runs the application. When GTK launches the application and emits the activate signal, then +our activate proc is called, which creates a main window containing a button widget. That button is again connected with a +signal, in this case named clicked. That signal is emitted by GTK whenever that button is clicked with the mouse and results +in a call of our provided buttonClicked() proc. The procs connected to signals are called callbacks and generally got the widget +on which the signal was emitted as first parameter. They can also get a second optional parameter of arbitrary type -- we will +see that in a later example. This callback here gets only the button itself as parameter, and it's task is to reverse the +text displayed by the button. Not very interesting basically, but we are indeed using the glib function utf8Strreverse() +for this task. While that function internally works with cstrings, and in C we have to free the memory of the returned cstring, +in our Nim example that is done automatically by Nim's Garbage Collector. When you compare our example carefully with the C code, +then you may notice a difference. The C code passes the window containing the button as an additional parameter to the +callback function, but that parameter is not really used. We simple ignore it here, as it is not used at all. +//and I assume that passing a widget in this way in our nim code +//may not work already currently. Fortunately widgets as optional parameter are not often needed, and we will try to make that +//working soon... +In one of the following examples you will learn how passing (nearly) arbitrary parameters in a type safe way is done. +Another difference is, that the C code returns an integer status value returned by g_application_run() to the OS. We +could do the same by using the quit() proc of Nim's OS module, but as that would give us no additional benefit, we simply ignore it. + +TIP: The command nim c sourcetext.nim generates an executable which contains code for runtime checks and debugging, +which increases executable size and decreases performance. +After you have tested your software carefully, you may give the additional parameter -d:release to avoid this. For the gcc backend +you may additional enable link time optimization (LTO), which reduces executable size further. To enable LTO. you may put +a nim.cfg file in your sources directory with content like + +---- +path:"$projectdir" +nimcache:"/tmp/$projectdir" +gcc.options.speed = "-march=native -O3 -flto -fstrict-aliasing" +---- + +With that optimization, your executable sizes should be in the range of about 50 kilobyte only! + +=== Optional, type safe parameters for callbacks + +The next example shows, how we can pass (nearly) arbitrary parameters to our connect procs. +We pass a string, an object from the stack, a reference to an object allocated on the heap +and finally a widget (in this case the application window itself, you may also try passing +another button). As the main window itself is a so called GTK bin and can contain only one +child widget, we create a container widget, a vertical box in this case, fill that box with +some buttons, and add that button to the window. + +Compile and start this example from the command line and watch what +happens when you click on the buttons. + +[source,nim] +---- +# nim c connect_args.nim +import gtk, glib +import gio except Application, newApplication + +type + O = object + i: int + +proc b1Callback(button: Button; str: string) = + echo str + +proc b2Callback(button: Button; o: O) = + echo "Value of field i in object o = ", o.i + +proc b3Callback(button: Button; r: ref O) = + echo "Value of field i in ref to object O = ", r.i + +proc b4Callback(button: Button; w: ApplicationWindow) = + if w.title == "Nim with GTK3": + w.title = "GTK3 with Nim" + else: + w.title = "Nim with GTK3" + +proc activate (app: Application) = + var o: O + var r: ref O + new r + o.i = 1234567 + r.i = 7654321 + let window = newApplicationWindow(app) + let box = newBox(Orientation.vertical, 0) + window.title = "Parameters for callbacks" + let b1 = newButton("Nim with GTK3") + let b2 = newButton("Passing an object from stack") + let b3 = newButton("Passing an object from heap") + let b4 = newButton("Passing a Widget") + b1.connect("clicked", b1Callback, "is much fun.") + b2.connect("clicked", b2Callback, o) + b3.connect("clicked", b3Callback, r) + b4.connect("clicked", b4Callback, window) + box.add(b1) + box.add(b2) + box.add(b3) + box.add(b4) + window.add(box) + window.showAll + +proc main = + let app = newApplication("org.gtk.example") + connect(app, "activate", activate) + discard app.run + +main() +---- + +To prove type safety, we may modify one of the callback procs and watch the compiler output: + +[source,c] +---- +proc b1Callback(button: Button; str: int) = + discard # echo str +---- + +---- +connect_args.nim(37, 5) template/generic instantiation from here +gtk.nim(-15021, 10) Error: type mismatch: got (ref Button:ObjectType, string) +but expected one of: +proc b1Callback(button: Button; str: int) +---- + +It may be not always really obvious what the compiler wants to tell us, but at least we +are told that it got a string and expected an int. + +Currently the connect function is realized by a Nim type safe macro. Connect accepts two or three +arguments -- the widget, the signal name and the optional argument. When the optional argument +is a ref (reference to objects on the heap) then it is passed as a reference, otherwise a deep copy +of the argument is passed. For the above code this means, that r and the window are passed +as references, while the string and the stack object are deep copied. Currently it is not possible +to release the memory of passed arguments again. This should be no real problem, as in most +cases no arguments are passed at all, and when arguments are passed, then they are general +small in size like plain numbers or strings, or maybe references to widgets which could not be freed +at all, as they are part of the GUI. Later we may add more variants of that connect macro. + +NOTE: Navigation can be hard for beginners. You may have basic knowledge of GTK and want +to build a GUI for your application. But how to find what you need. Well, we offer no separate +automatically generated API documentation currently, as that is not really helpful. In most cases +it is easy to just guess Nim symbol names, proc parameters and all that. Using a smart editor +with good nimsuggest support further supports navigation -- for example NEd shows us +all the needed proc parameters when we move the cursor on a proc name, or we press CTRL-W and jump +to the definition of that symbol. For unknown stuff the original C function name is often a good starting point. +Assume you don't know much about GTK's buttons, but you know that you want to have a Button in +your GUI application. GTK generally offers generator functions containing the string "new" in their name. +So it is easy to guess that there exists a C function named "gtk_button_new". That name is also +contained in the bindings files, in this case in gtk.nim. So we open that file in a text editor and search for +that term. So it is really easy to find first starting points for related procs and data types. Most data types +are located near by their related functions, so you should be able to find all relevant information fast. +Remember the GTK devhelp tool, and use also grep or the nim-grep variant. + +NOTE: Related work: https://github.com/jdmansour/nim-smartgi + diff --git a/README.md b/README.md deleted file mode 100644 index 63ab9a1..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# gintro -High level GObject-Introspection based GTK3 bindings for Nim language diff --git a/examples/app0.nim b/examples/app0.nim new file mode 100644 index 0000000..1c5d124 --- /dev/null +++ b/examples/app0.nim @@ -0,0 +1,18 @@ +# app0.nim -- minimal application style example +# nim c app0.nim +import gintro/gtk +import gintro/gio except Application, newApplication # we want to use GTK application +#from gintro/gio import ApplicationFlags, scActivate, run + +proc activate(app: Application) = + let window = newApplicationWindow(app) + window.title = "GTK3 & Nim" + window.defaultSize = (200, 200) + showAll(window) + +proc main = + let app = newApplication("org.gtk.example") + connect(app, "activate", activate) + discard run(app) + +main() diff --git a/examples/button.nim b/examples/button.nim new file mode 100644 index 0000000..d49509f --- /dev/null +++ b/examples/button.nim @@ -0,0 +1,23 @@ +# nim c button.nim +import gintro/[gtk, glib] +import gintro/gio except Application, newApplication + +proc buttonClicked (button: Button) = + button.label = utf8Strreverse(button.label, -1) + +proc activate (app: Application) = + let window = newApplicationWindow(app) + window.title = "GNOME Button" + window.defaultSize = (250, 50) + let button = newButton("Click Me") + window.add(button) + button.connect("clicked", buttonClicked) + window.showAll + +proc main = + let app = newApplication("org.gtk.example") + connect(app, "activate", activate) + discard app.run + +main() + diff --git a/examples/connect_args.nim b/examples/connect_args.nim new file mode 100644 index 0000000..8e077dc --- /dev/null +++ b/examples/connect_args.nim @@ -0,0 +1,54 @@ +# nim c connect_args.nim +import gintro/[gtk, glib] +import gintro/gio except Application, newApplication + +type + O = object + i: int + +proc b1Callback(button: Button; str: string) = + echo str + +proc b2Callback(button: Button; o: O) = + echo "Value of field i in object o = ", o.i + +proc b3Callback(button: Button; r: ref O) = + echo "Value of field i in ref to object O = ", r.i + +proc b4Callback(button: Button; w: ApplicationWindow) = + if w.title == "Nim with GTK3": + w.title = "GTK3 with Nim" + else: + w.title = "Nim with GTK3" + +proc activate (app: Application) = + var o: O + var r: ref O + new r + o.i = 1234567 + r.i = 7654321 + let window = newApplicationWindow(app) + let box = newBox(Orientation.vertical, 0) + window.title = "Parameters for callbacks" + let b1 = newButton("Nim with GTK3") + let b2 = newButton("Passing an object from stack") + let b3 = newButton("Passing an object from heap") + let b4 = newButton("Passing a Widget") + b1.connect("clicked", b1Callback, "is much fun.") + b2.connect("clicked", b2Callback, o) + b3.connect("clicked", b3Callback, r) + b4.connect("clicked", b4Callback, window) + box.add(b1) + box.add(b2) + box.add(b3) + box.add(b4) + window.add(box) + window.showAll + +proc main = + let app = newApplication("org.gtk.example") + connect(app, "activate", activate) + discard app.run + +main() + diff --git a/examples/t0.nim b/examples/t0.nim new file mode 100644 index 0000000..f1236bd --- /dev/null +++ b/examples/t0.nim @@ -0,0 +1,16 @@ +# nim c t0.nim +import gintro/gtk + +proc bye(w: Window) = + mainQuit() + echo "Bye..." + +proc main = + gtk.init() + let window = newWindow() + window.title = "First Test" + window.connect("destroy", bye) + window.showAll + gtk.main() + +main() diff --git a/gintro.nimble b/gintro.nimble new file mode 100644 index 0000000..779fd73 --- /dev/null +++ b/gintro.nimble @@ -0,0 +1,65 @@ +# Package + +version = "0.1.0" +author = "Stefan Salewski" +description = "High level GObject-Introspection based GTK3 bindings" +license = "MIT" +skipDirs = @["tests"] + +# Dependencies + +requires "nim >= 0.17.0" + +when defined(nimdistros): + import distros + if detectOs(Ubuntu) or detectOs(Debian): + foreignDep "libgtk-3-dev" + elif detectOs(Gentoo): + foreignDep "gtk+" # can we specify gtk3? + #else: we don't know the names for all the other distributions + # foreignDep "openssl" + +import ospaths + +proc prep = + let this = thisDir() + let td = getTempDir() + cd(td) + let wd = "gintrosalewski" + if dirExists(wd): + quit("gintro: tmp directory already exists!") + mkDir(wd) + cd(wd) + mkDir("ngtk3") + cd("ngtk3") + + exec("git clone https://github.com/ngtk3/nim-glib") + exec("git clone https://github.com/ngtk3/nim-gobject") + exec("git clone https://github.com/ngtk3/nim-gir") + + cpFile(this / "tests" / "gen.nim", td / wd / "gen.nim") + cpFile(this / "tests" / "combinatorics.nim", td / wd / "combinatorics.nim") + + cpFile("nim-glib/src/glib.nim", td / wd / "glib.nim") + cpFile("nim-gobject/src/gobject.nim", td / wd / "gobject.nim") + cpFile("nim-gir/src/gir.nim", td / wd / "gir.nim") + + cd(td) + cd(wd) + exec("nim c gen.nim") + mkDir("nim_gi") + exec(td / wd / "gen") + let mods = listFiles("nim_gi") + for i in mods: + let j = i[7 .. ^1] + cpFile(i, this / "gintro" / j) + cd(td) + rmDir(wd) # cleanup + +task prepare, "preparing gintro": +#before install: + + echo "preparing gintro" + prep() + + diff --git a/gintro/atk.nim b/gintro/atk.nim new file mode 100644 index 0000000..4905f5a --- /dev/null +++ b/gintro/atk.nim @@ -0,0 +1,3706 @@ +# dependencies: +# GLib-2.0 +# GObject-2.0 +# immediate dependencies: +# GObject-2.0 +# libraries: +# libatk-1.0.so.0 +{.deadCodeElim: on.} +import glib, gobject +const Lib* = "libatk-1.0.so.0" +{.pragma: libprag, cdecl, dynlib: Lib.} +type + StateTypeArray* = pointer +type + TextRange00Array* = pointer +type + PtrArray* = pointer +let Quark = g_quark_from_static_string("NimGIQuark") + +type + Action00* {.pure.} = object + Action* = ref object + impl*: ptr Action00 + +proc atk_action_do_action*(self: ptr Action00; i: int32): gboolean {. + importc: "atk_action_do_action", libprag.} + +proc doAction*(self: Action; i: int): bool = + toBool(atk_action_do_action(cast[ptr Action00](self.impl), int32(i))) + +proc atk_action_get_description*(self: ptr Action00; i: int32): cstring {. + importc: "atk_action_get_description", libprag.} + +proc getDescription*(self: Action; i: int): string = + let resul0 = atk_action_get_description(cast[ptr Action00](self.impl), int32(i)) + result = $resul0 + +proc description*(self: Action; i: int): string = + let resul0 = atk_action_get_description(cast[ptr Action00](self.impl), int32(i)) + result = $resul0 + +proc atk_action_get_keybinding*(self: ptr Action00; i: int32): cstring {. + importc: "atk_action_get_keybinding", libprag.} + +proc getKeybinding*(self: Action; i: int): string = + let resul0 = atk_action_get_keybinding(cast[ptr Action00](self.impl), int32(i)) + result = $resul0 + +proc keybinding*(self: Action; i: int): string = + let resul0 = atk_action_get_keybinding(cast[ptr Action00](self.impl), int32(i)) + result = $resul0 + +proc atk_action_get_localized_name*(self: ptr Action00; i: int32): cstring {. + importc: "atk_action_get_localized_name", libprag.} + +proc getLocalizedName*(self: Action; i: int): string = + let resul0 = atk_action_get_localized_name(cast[ptr Action00](self.impl), int32(i)) + result = $resul0 + +proc localizedName*(self: Action; i: int): string = + let resul0 = atk_action_get_localized_name(cast[ptr Action00](self.impl), int32(i)) + result = $resul0 + +proc atk_action_get_n_actions*(self: ptr Action00): int32 {. + importc: "atk_action_get_n_actions", libprag.} + +proc getNActions*(self: Action): int = + int(atk_action_get_n_actions(cast[ptr Action00](self.impl))) + +proc nActions*(self: Action): int = + int(atk_action_get_n_actions(cast[ptr Action00](self.impl))) + +proc atk_action_get_name*(self: ptr Action00; i: int32): cstring {. + importc: "atk_action_get_name", libprag.} + +proc getName*(self: Action; i: int): string = + let resul0 = atk_action_get_name(cast[ptr Action00](self.impl), int32(i)) + result = $resul0 + +proc name*(self: Action; i: int): string = + let resul0 = atk_action_get_name(cast[ptr Action00](self.impl), int32(i)) + result = $resul0 + +proc atk_action_set_description*(self: ptr Action00; i: int32; desc: cstring): gboolean {. + importc: "atk_action_set_description", libprag.} + +proc setDescription*(self: Action; i: int; desc: string): bool = + toBool(atk_action_set_description(cast[ptr Action00](self.impl), int32(i), cstring(desc))) + +type + ActionIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + doAction*: proc(action: ptr Action00; i: int32): gboolean {.cdecl.} + getNActions*: proc(action: ptr Action00): int32 {.cdecl.} + getDescription*: proc(action: ptr Action00; i: int32): cstring {.cdecl.} + getName*: proc(action: ptr Action00; i: int32): cstring {.cdecl.} + getKeybinding*: proc(action: ptr Action00; i: int32): cstring {.cdecl.} + setDescription*: proc(action: ptr Action00; i: int32; desc: cstring): gboolean {.cdecl.} + getLocalizedName*: proc(action: ptr Action00; i: int32): cstring {.cdecl.} + ActionIface* = ref object + impl*: ptr ActionIface00 + +type + Attribute00* {.pure.} = object + name*: cstring + value*: cstring + Attribute* = ref object + impl*: ptr Attribute00 + +proc atk_attribute_set_free*(attribSet: ptr pointer) {. + importc: "atk_attribute_set_free", libprag.} + +proc setFree*(attribSet: ptr pointer) {. + importc: "atk_attribute_set_free", libprag.} + +proc `free=`*(attribSet: ptr pointer) {. + importc: "atk_attribute_set_free", libprag.} + +const BINARY_AGE* = 22210'i32 + +type + Component00* {.pure.} = object + Component* = ref object + impl*: ptr Component00 + +proc atk_component_get_alpha*(self: ptr Component00): cdouble {. + importc: "atk_component_get_alpha", libprag.} + +proc getAlpha*(self: Component): cdouble = + atk_component_get_alpha(cast[ptr Component00](self.impl)) + +proc alpha*(self: Component): cdouble = + atk_component_get_alpha(cast[ptr Component00](self.impl)) + +proc atk_component_get_mdi_zorder*(self: ptr Component00): int32 {. + importc: "atk_component_get_mdi_zorder", libprag.} + +proc getMdiZorder*(self: Component): int = + int(atk_component_get_mdi_zorder(cast[ptr Component00](self.impl))) + +proc mdiZorder*(self: Component): int = + int(atk_component_get_mdi_zorder(cast[ptr Component00](self.impl))) + +proc atk_component_get_size*(self: ptr Component00; width: var int32; height: var int32) {. + importc: "atk_component_get_size", libprag.} + +proc getSize*(self: Component; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + atk_component_get_size(cast[ptr Component00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc size*(self: Component; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + atk_component_get_size(cast[ptr Component00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc atk_component_grab_focus*(self: ptr Component00): gboolean {. + importc: "atk_component_grab_focus", libprag.} + +proc grabFocus*(self: Component): bool = + toBool(atk_component_grab_focus(cast[ptr Component00](self.impl))) + +proc atk_component_remove_focus_handler*(self: ptr Component00; handlerId: uint32) {. + importc: "atk_component_remove_focus_handler", libprag.} + +proc removeFocusHandler*(self: Component; handlerId: int) = + atk_component_remove_focus_handler(cast[ptr Component00](self.impl), uint32(handlerId)) + +proc atk_component_set_size*(self: ptr Component00; width: int32; height: int32): gboolean {. + importc: "atk_component_set_size", libprag.} + +proc setSize*(self: Component; width: int; height: int): bool = + toBool(atk_component_set_size(cast[ptr Component00](self.impl), int32(width), int32(height))) + +type + Layer* {.size: sizeof(cint), pure.} = enum + invalid = 0 + background = 1 + canvas = 2 + widget = 3 + mdi = 4 + popup = 5 + overlay = 6 + window = 7 + +proc atk_component_get_layer*(self: ptr Component00): Layer {. + importc: "atk_component_get_layer", libprag.} + +proc getLayer*(self: Component): Layer = + atk_component_get_layer(cast[ptr Component00](self.impl)) + +proc layer*(self: Component): Layer = + atk_component_get_layer(cast[ptr Component00](self.impl)) + +type + CoordType* {.size: sizeof(cint), pure.} = enum + screen = 0 + window = 1 + +proc atk_component_contains*(self: ptr Component00; x: int32; y: int32; coordType: CoordType): gboolean {. + importc: "atk_component_contains", libprag.} + +proc contains*(self: Component; x: int; y: int; coordType: CoordType): bool = + toBool(atk_component_contains(cast[ptr Component00](self.impl), int32(x), int32(y), coordType)) + +proc atk_component_get_extents*(self: ptr Component00; x: var int32; y: var int32; + width: var int32; height: var int32; coordType: CoordType) {. + importc: "atk_component_get_extents", libprag.} + +proc getExtents*(self: Component; x: var int; y: var int; width: var int; + height: var int; coordType: CoordType) = + var height_00 = int32(height) + var y_00 = int32(y) + var width_00 = int32(width) + var x_00 = int32(x) + atk_component_get_extents(cast[ptr Component00](self.impl), x_00, y_00, width_00, height_00, coordType) + height = int(height_00) + y = int(y_00) + width = int(width_00) + x = int(x_00) + +proc extents*(self: Component; x: var int; y: var int; width: var int; + height: var int; coordType: CoordType) = + var height_00 = int32(height) + var y_00 = int32(y) + var width_00 = int32(width) + var x_00 = int32(x) + atk_component_get_extents(cast[ptr Component00](self.impl), x_00, y_00, width_00, height_00, coordType) + height = int(height_00) + y = int(y_00) + width = int(width_00) + x = int(x_00) + +proc atk_component_get_position*(self: ptr Component00; x: var int32; y: var int32; + coordType: CoordType) {. + importc: "atk_component_get_position", libprag.} + +proc getPosition*(self: Component; x: var int; y: var int; coordType: CoordType) = + var y_00 = int32(y) + var x_00 = int32(x) + atk_component_get_position(cast[ptr Component00](self.impl), x_00, y_00, coordType) + y = int(y_00) + x = int(x_00) + +proc position*(self: Component; x: var int; y: var int; coordType: CoordType) = + var y_00 = int32(y) + var x_00 = int32(x) + atk_component_get_position(cast[ptr Component00](self.impl), x_00, y_00, coordType) + y = int(y_00) + x = int(x_00) + +proc atk_component_set_extents*(self: ptr Component00; x: int32; y: int32; width: int32; + height: int32; coordType: CoordType): gboolean {. + importc: "atk_component_set_extents", libprag.} + +proc setExtents*(self: Component; x: int; y: int; width: int; height: int; + coordType: CoordType): bool = + toBool(atk_component_set_extents(cast[ptr Component00](self.impl), int32(x), int32(y), int32(width), int32(height), coordType)) + +proc atk_component_set_position*(self: ptr Component00; x: int32; y: int32; coordType: CoordType): gboolean {. + importc: "atk_component_set_position", libprag.} + +proc setPosition*(self: Component; x: int; y: int; coordType: CoordType): bool = + toBool(atk_component_set_position(cast[ptr Component00](self.impl), int32(x), int32(y), coordType)) + +type + Role* {.size: sizeof(cint), pure.} = enum + invalid = 0 + acceleratorLabel = 1 + alert = 2 + animation = 3 + arrow = 4 + calendar = 5 + canvas = 6 + checkBox = 7 + checkMenuItem = 8 + colorChooser = 9 + columnHeader = 10 + comboBox = 11 + dateEditor = 12 + desktopIcon = 13 + desktopFrame = 14 + dial = 15 + dialog = 16 + directoryPane = 17 + drawingArea = 18 + fileChooser = 19 + filler = 20 + fontChooser = 21 + frame = 22 + glassPane = 23 + htmlContainer = 24 + icon = 25 + image = 26 + internalFrame = 27 + label = 28 + layeredPane = 29 + list = 30 + listItem = 31 + menu = 32 + menuBar = 33 + menuItem = 34 + optionPane = 35 + pageTab = 36 + pageTabList = 37 + panel = 38 + passwordText = 39 + popupMenu = 40 + progressBar = 41 + pushButton = 42 + radioButton = 43 + radioMenuItem = 44 + rootPane = 45 + rowHeader = 46 + scrollBar = 47 + scrollPane = 48 + separator = 49 + slider = 50 + splitPane = 51 + spinButton = 52 + statusbar = 53 + table = 54 + tableCell = 55 + tableColumnHeader = 56 + tableRowHeader = 57 + tearOffMenuItem = 58 + terminal = 59 + text = 60 + toggleButton = 61 + toolBar = 62 + toolTip = 63 + tree = 64 + treeTable = 65 + unknown = 66 + viewport = 67 + window = 68 + header = 69 + footer = 70 + paragraph = 71 + ruler = 72 + application = 73 + autocomplete = 74 + editBar = 75 + embedded = 76 + entry = 77 + chart = 78 + caption = 79 + documentFrame = 80 + heading = 81 + page = 82 + section = 83 + redundantObject = 84 + form = 85 + link = 86 + inputMethodWindow = 87 + tableRow = 88 + treeItem = 89 + documentSpreadsheet = 90 + documentPresentation = 91 + documentText = 92 + documentWeb = 93 + documentEmail = 94 + comment = 95 + listBox = 96 + grouping = 97 + imageMap = 98 + notification = 99 + infoBar = 100 + levelBar = 101 + titleBar = 102 + blockQuote = 103 + audio = 104 + video = 105 + definition = 106 + article = 107 + landmark = 108 + log = 109 + marquee = 110 + math = 111 + rating = 112 + timer = 113 + descriptionList = 114 + descriptionTerm = 115 + descriptionValue = 116 + `static` = 117 + mathFraction = 118 + mathRoot = 119 + subscript = 120 + superscript = 121 + lastDefined = 122 + +proc atk_role_for_name*(name: cstring): Role {. + importc: "atk_role_for_name", libprag.} + +proc forName*(name: cstring): Role {. + importc: "atk_role_for_name", libprag.} + +proc atk_role_get_localized_name*(role: Role): cstring {. + importc: "atk_role_get_localized_name", libprag.} + +proc getLocalizedName*(role: Role): string = + let resul0 = atk_role_get_localized_name(role) + result = $resul0 + +proc localizedName*(role: Role): string = + let resul0 = atk_role_get_localized_name(role) + result = $resul0 + +proc atk_role_get_name*(role: Role): cstring {. + importc: "atk_role_get_name", libprag.} + +proc getName*(role: Role): string = + let resul0 = atk_role_get_name(role) + result = $resul0 + +proc name*(role: Role): string = + let resul0 = atk_role_get_name(role) + result = $resul0 + +proc atk_role_register*(name: cstring): Role {. + importc: "atk_role_register", libprag.} + +proc register*(name: cstring): Role {. + importc: "atk_role_register", libprag.} + +type + RelationSet* = ref object of gobject.Object + RelationSet00* = object of gobject.Object00 + relations*: ptr PtrArray + +proc atk_relation_set_new*(): ptr RelationSet00 {. + importc: "atk_relation_set_new", libprag.} + +proc newRelationSet*(): RelationSet = + new(result, finalizeGObject) + result.impl = atk_relation_set_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRelationSet*[T](result: var T) = + assert(result is RelationSet) + new(result, finalizeGObject) + result.impl = atk_relation_set_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_relation_set_get_n_relations*(self: ptr RelationSet00): int32 {. + importc: "atk_relation_set_get_n_relations", libprag.} + +proc getNRelations*(self: RelationSet): int = + int(atk_relation_set_get_n_relations(cast[ptr RelationSet00](self.impl))) + +proc nRelations*(self: RelationSet): int = + int(atk_relation_set_get_n_relations(cast[ptr RelationSet00](self.impl))) + +type + Object* = ref object of gobject.Object + Object00* = object of gobject.Object00 + description*: cstring + name*: cstring + accessibleParent*: ptr Object00 + role*: Role + relationSet*: ptr RelationSet00 + layer*: Layer + +proc scActiveDescendantChanged*(self: Object; p: proc (self: ptr gobject.Object00; arg1: pointer; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "active-descendant-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scChildrenChanged*(self: Object; p: proc (self: ptr gobject.Object00; arg1: uint32; arg2: pointer; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "children-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scFocusEvent*(self: Object; p: proc (self: ptr gobject.Object00; arg1: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "focus-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPropertyChange*(self: Object; p: proc (self: ptr gobject.Object00; arg1: pointer; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "property-change", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStateChange*(self: Object; p: proc (self: ptr gobject.Object00; arg1: cstring; arg2: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "state-change", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scVisibleDataChanged*(self: Object; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "visible-data-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc atk_object_get_attributes*(self: ptr Object00): ptr pointer {. + importc: "atk_object_get_attributes", libprag.} + +proc getAttributes*(self: Object): ptr pointer = + atk_object_get_attributes(cast[ptr Object00](self.impl)) + +proc attributes*(self: Object): ptr pointer = + atk_object_get_attributes(cast[ptr Object00](self.impl)) + +proc atk_object_get_description*(self: ptr Object00): cstring {. + importc: "atk_object_get_description", libprag.} + +proc getDescription*(self: Object): string = + let resul0 = atk_object_get_description(cast[ptr Object00](self.impl)) + result = $resul0 + +proc description*(self: Object): string = + let resul0 = atk_object_get_description(cast[ptr Object00](self.impl)) + result = $resul0 + +proc atk_object_get_index_in_parent*(self: ptr Object00): int32 {. + importc: "atk_object_get_index_in_parent", libprag.} + +proc getIndexInParent*(self: Object): int = + int(atk_object_get_index_in_parent(cast[ptr Object00](self.impl))) + +proc indexInParent*(self: Object): int = + int(atk_object_get_index_in_parent(cast[ptr Object00](self.impl))) + +proc atk_object_get_layer*(self: ptr Object00): Layer {. + importc: "atk_object_get_layer", libprag.} + +proc getLayer*(self: Object): Layer = + atk_object_get_layer(cast[ptr Object00](self.impl)) + +proc layer*(self: Object): Layer = + atk_object_get_layer(cast[ptr Object00](self.impl)) + +proc atk_object_get_mdi_zorder*(self: ptr Object00): int32 {. + importc: "atk_object_get_mdi_zorder", libprag.} + +proc getMdiZorder*(self: Object): int = + int(atk_object_get_mdi_zorder(cast[ptr Object00](self.impl))) + +proc mdiZorder*(self: Object): int = + int(atk_object_get_mdi_zorder(cast[ptr Object00](self.impl))) + +proc atk_object_get_n_accessible_children*(self: ptr Object00): int32 {. + importc: "atk_object_get_n_accessible_children", libprag.} + +proc getNAccessibleChildren*(self: Object): int = + int(atk_object_get_n_accessible_children(cast[ptr Object00](self.impl))) + +proc nAccessibleChildren*(self: Object): int = + int(atk_object_get_n_accessible_children(cast[ptr Object00](self.impl))) + +proc atk_object_get_name*(self: ptr Object00): cstring {. + importc: "atk_object_get_name", libprag.} + +proc getName*(self: Object): string = + let resul0 = atk_object_get_name(cast[ptr Object00](self.impl)) + result = $resul0 + +proc name*(self: Object): string = + let resul0 = atk_object_get_name(cast[ptr Object00](self.impl)) + result = $resul0 + +proc atk_object_get_object_locale*(self: ptr Object00): cstring {. + importc: "atk_object_get_object_locale", libprag.} + +proc getObjectLocale*(self: Object): string = + let resul0 = atk_object_get_object_locale(cast[ptr Object00](self.impl)) + result = $resul0 + +proc objectLocale*(self: Object): string = + let resul0 = atk_object_get_object_locale(cast[ptr Object00](self.impl)) + result = $resul0 + +proc atk_object_get_parent*(self: ptr Object00): ptr Object00 {. + importc: "atk_object_get_parent", libprag.} + +proc getParent*(self: Object): Object = + let gobj = atk_object_get_parent(cast[ptr Object00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc parent*(self: Object): Object = + let gobj = atk_object_get_parent(cast[ptr Object00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_object_get_role*(self: ptr Object00): Role {. + importc: "atk_object_get_role", libprag.} + +proc getRole*(self: Object): Role = + atk_object_get_role(cast[ptr Object00](self.impl)) + +proc role*(self: Object): Role = + atk_object_get_role(cast[ptr Object00](self.impl)) + +proc atk_object_initialize*(self: ptr Object00; data: pointer) {. + importc: "atk_object_initialize", libprag.} + +proc initialize*(self: Object; data: pointer) = + atk_object_initialize(cast[ptr Object00](self.impl), data) + +proc atk_object_notify_state_change*(self: ptr Object00; state: uint64; value: gboolean) {. + importc: "atk_object_notify_state_change", libprag.} + +proc notifyStateChange*(self: Object; state: uint64; value: bool) = + atk_object_notify_state_change(cast[ptr Object00](self.impl), state, gboolean(value)) + +proc atk_object_peek_parent*(self: ptr Object00): ptr Object00 {. + importc: "atk_object_peek_parent", libprag.} + +proc peekParent*(self: Object): Object = + let gobj = atk_object_peek_parent(cast[ptr Object00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_object_ref_accessible_child*(self: ptr Object00; i: int32): ptr Object00 {. + importc: "atk_object_ref_accessible_child", libprag.} + +proc refAccessibleChild*(self: Object; i: int): Object = + let gobj = atk_object_ref_accessible_child(cast[ptr Object00](self.impl), int32(i)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_object_ref_relation_set*(self: ptr Object00): ptr RelationSet00 {. + importc: "atk_object_ref_relation_set", libprag.} + +proc refRelationSet*(self: Object): RelationSet = + let gobj = atk_object_ref_relation_set(cast[ptr Object00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[RelationSet](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_object_remove_property_change_handler*(self: ptr Object00; handlerId: uint32) {. + importc: "atk_object_remove_property_change_handler", libprag.} + +proc removePropertyChangeHandler*(self: Object; handlerId: int) = + atk_object_remove_property_change_handler(cast[ptr Object00](self.impl), uint32(handlerId)) + +proc atk_object_set_description*(self: ptr Object00; description: cstring) {. + importc: "atk_object_set_description", libprag.} + +proc setDescription*(self: Object; description: string) = + atk_object_set_description(cast[ptr Object00](self.impl), cstring(description)) + +proc `description=`*(self: Object; description: string) = + atk_object_set_description(cast[ptr Object00](self.impl), cstring(description)) + +proc atk_object_set_name*(self: ptr Object00; name: cstring) {. + importc: "atk_object_set_name", libprag.} + +proc setName*(self: Object; name: string) = + atk_object_set_name(cast[ptr Object00](self.impl), cstring(name)) + +proc `name=`*(self: Object; name: string) = + atk_object_set_name(cast[ptr Object00](self.impl), cstring(name)) + +proc atk_object_set_parent*(self: ptr Object00; parent: ptr Object00) {. + importc: "atk_object_set_parent", libprag.} + +proc setParent*(self: Object; parent: Object) = + atk_object_set_parent(cast[ptr Object00](self.impl), cast[ptr Object00](parent.impl)) + +proc `parent=`*(self: Object; parent: Object) = + atk_object_set_parent(cast[ptr Object00](self.impl), cast[ptr Object00](parent.impl)) + +proc atk_object_set_role*(self: ptr Object00; role: Role) {. + importc: "atk_object_set_role", libprag.} + +proc setRole*(self: Object; role: Role) = + atk_object_set_role(cast[ptr Object00](self.impl), role) + +proc `role=`*(self: Object; role: Role) = + atk_object_set_role(cast[ptr Object00](self.impl), role) + +proc atk_component_ref_accessible_at_point*(self: ptr Component00; x: int32; y: int32; coordType: CoordType): ptr Object00 {. + importc: "atk_component_ref_accessible_at_point", libprag.} + +proc refAccessibleAtPoint*(self: Component; x: int; y: int; coordType: CoordType): Object = + let gobj = atk_component_ref_accessible_at_point(cast[ptr Component00](self.impl), int32(x), int32(y), coordType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + StateSet* = ref object of gobject.Object + StateSet00* = object of gobject.Object00 + +proc atk_state_set_new*(): ptr StateSet00 {. + importc: "atk_state_set_new", libprag.} + +proc newStateSet*(): StateSet = + new(result, finalizeGObject) + result.impl = atk_state_set_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStateSet*[T](result: var T) = + assert(result is StateSet) + new(result, finalizeGObject) + result.impl = atk_state_set_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_state_set_and_sets*(self: ptr StateSet00; compareSet: ptr StateSet00): ptr StateSet00 {. + importc: "atk_state_set_and_sets", libprag.} + +proc andSets*(self: StateSet; compareSet: StateSet): StateSet = + let gobj = atk_state_set_and_sets(cast[ptr StateSet00](self.impl), cast[ptr StateSet00](compareSet.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StateSet](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_state_set_clear_states*(self: ptr StateSet00) {. + importc: "atk_state_set_clear_states", libprag.} + +proc clearStates*(self: StateSet) = + atk_state_set_clear_states(cast[ptr StateSet00](self.impl)) + +proc atk_state_set_is_empty*(self: ptr StateSet00): gboolean {. + importc: "atk_state_set_is_empty", libprag.} + +proc isEmpty*(self: StateSet): bool = + toBool(atk_state_set_is_empty(cast[ptr StateSet00](self.impl))) + +proc atk_state_set_or_sets*(self: ptr StateSet00; compareSet: ptr StateSet00): ptr StateSet00 {. + importc: "atk_state_set_or_sets", libprag.} + +proc orSets*(self: StateSet; compareSet: StateSet): StateSet = + let gobj = atk_state_set_or_sets(cast[ptr StateSet00](self.impl), cast[ptr StateSet00](compareSet.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StateSet](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_state_set_xor_sets*(self: ptr StateSet00; compareSet: ptr StateSet00): ptr StateSet00 {. + importc: "atk_state_set_xor_sets", libprag.} + +proc xorSets*(self: StateSet; compareSet: StateSet): StateSet = + let gobj = atk_state_set_xor_sets(cast[ptr StateSet00](self.impl), cast[ptr StateSet00](compareSet.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StateSet](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_object_ref_state_set*(self: ptr Object00): ptr StateSet00 {. + importc: "atk_object_ref_state_set", libprag.} + +proc refStateSet*(self: Object): StateSet = + let gobj = atk_object_ref_state_set(cast[ptr Object00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StateSet](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + StateType* {.size: sizeof(cint), pure.} = enum + invalid = 0 + active = 1 + armed = 2 + busy = 3 + checked = 4 + defunct = 5 + editable = 6 + enabled = 7 + expandable = 8 + expanded = 9 + focusable = 10 + focused = 11 + horizontal = 12 + iconified = 13 + modal = 14 + multiLine = 15 + multiselectable = 16 + opaque = 17 + pressed = 18 + resizable = 19 + selectable = 20 + selected = 21 + sensitive = 22 + showing = 23 + singleLine = 24 + stale = 25 + transient = 26 + vertical = 27 + visible = 28 + managesDescendants = 29 + indeterminate = 30 + truncated = 31 + required = 32 + invalidEntry = 33 + supportsAutocompletion = 34 + selectableText = 35 + default = 36 + animated = 37 + visited = 38 + checkable = 39 + hasPopup = 40 + hasTooltip = 41 + readOnly = 42 + lastDefined = 43 + +proc atk_state_type_for_name*(name: cstring): StateType {. + importc: "atk_state_type_for_name", libprag.} + +proc forName*(name: cstring): StateType {. + importc: "atk_state_type_for_name", libprag.} + +proc atk_state_type_get_name*(`type`: StateType): cstring {. + importc: "atk_state_type_get_name", libprag.} + +proc getName*(`type`: StateType): string = + let resul0 = atk_state_type_get_name(`type`) + result = $resul0 + +proc name*(`type`: StateType): string = + let resul0 = atk_state_type_get_name(`type`) + result = $resul0 + +proc atk_state_type_register*(name: cstring): StateType {. + importc: "atk_state_type_register", libprag.} + +proc register*(name: cstring): StateType {. + importc: "atk_state_type_register", libprag.} + +proc atk_state_set_add_state*(self: ptr StateSet00; `type`: StateType): gboolean {. + importc: "atk_state_set_add_state", libprag.} + +proc addState*(self: StateSet; `type`: StateType): bool = + toBool(atk_state_set_add_state(cast[ptr StateSet00](self.impl), `type`)) + +proc atk_state_set_add_states*(self: ptr StateSet00; types: StateTypeArray; nTypes: int32) {. + importc: "atk_state_set_add_states", libprag.} + +proc addStates*(self: StateSet; types: StateTypeArray; nTypes: int) = + atk_state_set_add_states(cast[ptr StateSet00](self.impl), types, int32(nTypes)) + +proc atk_state_set_contains_state*(self: ptr StateSet00; `type`: StateType): gboolean {. + importc: "atk_state_set_contains_state", libprag.} + +proc containsState*(self: StateSet; `type`: StateType): bool = + toBool(atk_state_set_contains_state(cast[ptr StateSet00](self.impl), `type`)) + +proc atk_state_set_contains_states*(self: ptr StateSet00; types: StateTypeArray; nTypes: int32): gboolean {. + importc: "atk_state_set_contains_states", libprag.} + +proc containsStates*(self: StateSet; types: StateTypeArray; nTypes: int): bool = + toBool(atk_state_set_contains_states(cast[ptr StateSet00](self.impl), types, int32(nTypes))) + +proc atk_state_set_remove_state*(self: ptr StateSet00; `type`: StateType): gboolean {. + importc: "atk_state_set_remove_state", libprag.} + +proc removeState*(self: StateSet; `type`: StateType): bool = + toBool(atk_state_set_remove_state(cast[ptr StateSet00](self.impl), `type`)) + +type + RelationType* {.size: sizeof(cint), pure.} = enum + null = 0 + controlledBy = 1 + controllerFor = 2 + labelFor = 3 + labelledBy = 4 + memberOf = 5 + nodeChildOf = 6 + flowsTo = 7 + flowsFrom = 8 + subwindowOf = 9 + embeds = 10 + embeddedBy = 11 + popupFor = 12 + parentWindowOf = 13 + describedBy = 14 + descriptionFor = 15 + nodeParentOf = 16 + lastDefined = 17 + +proc atk_relation_type_for_name*(name: cstring): RelationType {. + importc: "atk_relation_type_for_name", libprag.} + +proc forName*(name: cstring): RelationType {. + importc: "atk_relation_type_for_name", libprag.} + +proc atk_relation_type_get_name*(`type`: RelationType): cstring {. + importc: "atk_relation_type_get_name", libprag.} + +proc getName*(`type`: RelationType): string = + let resul0 = atk_relation_type_get_name(`type`) + result = $resul0 + +proc name*(`type`: RelationType): string = + let resul0 = atk_relation_type_get_name(`type`) + result = $resul0 + +proc atk_relation_type_register*(name: cstring): RelationType {. + importc: "atk_relation_type_register", libprag.} + +proc register*(name: cstring): RelationType {. + importc: "atk_relation_type_register", libprag.} + +type + Relation* = ref object of gobject.Object + Relation00* = object of gobject.Object00 + target*: ptr PtrArray + relationship*: RelationType + +proc atk_relation_new*(targets: ptr Object00Array; nTargets: int32; relationship: RelationType): ptr Relation00 {. + importc: "atk_relation_new", libprag.} + +proc newRelation*(targets: ptr Object00Array; nTargets: int; relationship: RelationType): Relation = + new(result, finalizeGObject) + result.impl = atk_relation_new(targets, int32(nTargets), relationship) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRelation*[T](result: var T; targets: ptr Object00Array; nTargets: int; relationship: RelationType) = + assert(result is Relation) + new(result, finalizeGObject) + result.impl = atk_relation_new(targets, int32(nTargets), relationship) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_relation_add_target*(self: ptr Relation00; target: ptr Object00) {. + importc: "atk_relation_add_target", libprag.} + +proc addTarget*(self: Relation; target: Object) = + atk_relation_add_target(cast[ptr Relation00](self.impl), cast[ptr Object00](target.impl)) + +proc atk_relation_get_relation_type*(self: ptr Relation00): RelationType {. + importc: "atk_relation_get_relation_type", libprag.} + +proc getRelationType*(self: Relation): RelationType = + atk_relation_get_relation_type(cast[ptr Relation00](self.impl)) + +proc relationType*(self: Relation): RelationType = + atk_relation_get_relation_type(cast[ptr Relation00](self.impl)) + +proc atk_relation_get_target*(self: ptr Relation00): ptr PtrArray {. + importc: "atk_relation_get_target", libprag.} + +proc getTarget*(self: Relation): ptr PtrArray = + atk_relation_get_target(cast[ptr Relation00](self.impl)) + +proc target*(self: Relation): ptr PtrArray = + atk_relation_get_target(cast[ptr Relation00](self.impl)) + +proc atk_relation_remove_target*(self: ptr Relation00; target: ptr Object00): gboolean {. + importc: "atk_relation_remove_target", libprag.} + +proc removeTarget*(self: Relation; target: Object): bool = + toBool(atk_relation_remove_target(cast[ptr Relation00](self.impl), cast[ptr Object00](target.impl))) + +proc atk_relation_set_add*(self: ptr RelationSet00; relation: ptr Relation00) {. + importc: "atk_relation_set_add", libprag.} + +proc add*(self: RelationSet; relation: Relation) = + atk_relation_set_add(cast[ptr RelationSet00](self.impl), cast[ptr Relation00](relation.impl)) + +proc atk_relation_set_add_relation_by_type*(self: ptr RelationSet00; relationship: RelationType; + target: ptr Object00) {. + importc: "atk_relation_set_add_relation_by_type", libprag.} + +proc addRelationByType*(self: RelationSet; relationship: RelationType; target: Object) = + atk_relation_set_add_relation_by_type(cast[ptr RelationSet00](self.impl), relationship, cast[ptr Object00](target.impl)) + +proc atk_relation_set_contains*(self: ptr RelationSet00; relationship: RelationType): gboolean {. + importc: "atk_relation_set_contains", libprag.} + +proc contains*(self: RelationSet; relationship: RelationType): bool = + toBool(atk_relation_set_contains(cast[ptr RelationSet00](self.impl), relationship)) + +proc atk_relation_set_contains_target*(self: ptr RelationSet00; relationship: RelationType; + target: ptr Object00): gboolean {. + importc: "atk_relation_set_contains_target", libprag.} + +proc containsTarget*(self: RelationSet; relationship: RelationType; target: Object): bool = + toBool(atk_relation_set_contains_target(cast[ptr RelationSet00](self.impl), relationship, cast[ptr Object00](target.impl))) + +proc atk_relation_set_get_relation*(self: ptr RelationSet00; i: int32): ptr Relation00 {. + importc: "atk_relation_set_get_relation", libprag.} + +proc getRelation*(self: RelationSet; i: int): Relation = + let gobj = atk_relation_set_get_relation(cast[ptr RelationSet00](self.impl), int32(i)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Relation](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc relation*(self: RelationSet; i: int): Relation = + let gobj = atk_relation_set_get_relation(cast[ptr RelationSet00](self.impl), int32(i)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Relation](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_relation_set_get_relation_by_type*(self: ptr RelationSet00; relationship: RelationType): ptr Relation00 {. + importc: "atk_relation_set_get_relation_by_type", libprag.} + +proc getRelationByType*(self: RelationSet; relationship: RelationType): Relation = + let gobj = atk_relation_set_get_relation_by_type(cast[ptr RelationSet00](self.impl), relationship) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Relation](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc relationByType*(self: RelationSet; relationship: RelationType): Relation = + let gobj = atk_relation_set_get_relation_by_type(cast[ptr RelationSet00](self.impl), relationship) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Relation](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_relation_set_remove*(self: ptr RelationSet00; relation: ptr Relation00) {. + importc: "atk_relation_set_remove", libprag.} + +proc remove*(self: RelationSet; relation: Relation) = + atk_relation_set_remove(cast[ptr RelationSet00](self.impl), cast[ptr Relation00](relation.impl)) + +proc atk_object_add_relationship*(self: ptr Object00; relationship: RelationType; target: ptr Object00): gboolean {. + importc: "atk_object_add_relationship", libprag.} + +proc addRelationship*(self: Object; relationship: RelationType; target: Object): bool = + toBool(atk_object_add_relationship(cast[ptr Object00](self.impl), relationship, cast[ptr Object00](target.impl))) + +proc atk_object_remove_relationship*(self: ptr Object00; relationship: RelationType; target: ptr Object00): gboolean {. + importc: "atk_object_remove_relationship", libprag.} + +proc removeRelationship*(self: Object; relationship: RelationType; target: Object): bool = + toBool(atk_object_remove_relationship(cast[ptr Object00](self.impl), relationship, cast[ptr Object00](target.impl))) + +type + Rectangle00* {.pure.} = object + x*: int32 + y*: int32 + width*: int32 + height*: int32 + Rectangle* = ref object + impl*: ptr Rectangle00 + +type + ComponentIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + addFocusHandler*: pointer + contains*: proc(component: ptr Component00; x: int32; y: int32; coordType: CoordType): gboolean {.cdecl.} + refAccessibleAtPoint*: proc(component: ptr Component00; x: int32; y: int32; coordType: CoordType): ptr Object00 {.cdecl.} + getExtents*: proc(component: ptr Component00; x: var int32; y: var int32; + width: var int32; height: var int32; coordType: CoordType) {.cdecl.} + getPosition*: proc(component: ptr Component00; x: var int32; y: var int32; + coordType: CoordType) {.cdecl.} + getSize*: proc(component: ptr Component00; width: var int32; height: var int32) {.cdecl.} + grabFocus*: proc(component: ptr Component00): gboolean {.cdecl.} + removeFocusHandler*: proc(component: ptr Component00; handlerId: uint32) {.cdecl.} + setExtents*: proc(component: ptr Component00; x: int32; y: int32; width: int32; + height: int32; coordType: CoordType): gboolean {.cdecl.} + setPosition*: proc(component: ptr Component00; x: int32; y: int32; coordType: CoordType): gboolean {.cdecl.} + setSize*: proc(component: ptr Component00; width: int32; height: int32): gboolean {.cdecl.} + getLayer*: proc(component: ptr Component00): Layer {.cdecl.} + getMdiZorder*: proc(component: ptr Component00): int32 {.cdecl.} + boundsChanged*: proc(component: ptr Component00; bounds: ptr Rectangle00) {.cdecl.} + getAlpha*: proc(component: ptr Component00): cdouble {.cdecl.} + ComponentIface* = ref object + impl*: ptr ComponentIface00 + +type + Document00* {.pure.} = object + Document* = ref object + impl*: ptr Document00 + +proc atk_document_get_attribute_value*(self: ptr Document00; attributeName: cstring): cstring {. + importc: "atk_document_get_attribute_value", libprag.} + +proc getAttributeValue*(self: Document; attributeName: string): string = + let resul0 = atk_document_get_attribute_value(cast[ptr Document00](self.impl), cstring(attributeName)) + result = $resul0 + +proc attributeValue*(self: Document; attributeName: string): string = + let resul0 = atk_document_get_attribute_value(cast[ptr Document00](self.impl), cstring(attributeName)) + result = $resul0 + +proc atk_document_get_attributes*(self: ptr Document00): ptr pointer {. + importc: "atk_document_get_attributes", libprag.} + +proc getAttributes*(self: Document): ptr pointer = + atk_document_get_attributes(cast[ptr Document00](self.impl)) + +proc attributes*(self: Document): ptr pointer = + atk_document_get_attributes(cast[ptr Document00](self.impl)) + +proc atk_document_get_current_page_number*(self: ptr Document00): int32 {. + importc: "atk_document_get_current_page_number", libprag.} + +proc getCurrentPageNumber*(self: Document): int = + int(atk_document_get_current_page_number(cast[ptr Document00](self.impl))) + +proc currentPageNumber*(self: Document): int = + int(atk_document_get_current_page_number(cast[ptr Document00](self.impl))) + +proc atk_document_get_document*(self: ptr Document00): pointer {. + importc: "atk_document_get_document", libprag.} + +proc getDocument*(self: Document): pointer = + atk_document_get_document(cast[ptr Document00](self.impl)) + +proc document*(self: Document): pointer = + atk_document_get_document(cast[ptr Document00](self.impl)) + +proc atk_document_get_document_type*(self: ptr Document00): cstring {. + importc: "atk_document_get_document_type", libprag.} + +proc getDocumentType*(self: Document): string = + let resul0 = atk_document_get_document_type(cast[ptr Document00](self.impl)) + result = $resul0 + +proc documentType*(self: Document): string = + let resul0 = atk_document_get_document_type(cast[ptr Document00](self.impl)) + result = $resul0 + +proc atk_document_get_locale*(self: ptr Document00): cstring {. + importc: "atk_document_get_locale", libprag.} + +proc getLocale*(self: Document): string = + let resul0 = atk_document_get_locale(cast[ptr Document00](self.impl)) + result = $resul0 + +proc locale*(self: Document): string = + let resul0 = atk_document_get_locale(cast[ptr Document00](self.impl)) + result = $resul0 + +proc atk_document_get_page_count*(self: ptr Document00): int32 {. + importc: "atk_document_get_page_count", libprag.} + +proc getPageCount*(self: Document): int = + int(atk_document_get_page_count(cast[ptr Document00](self.impl))) + +proc pageCount*(self: Document): int = + int(atk_document_get_page_count(cast[ptr Document00](self.impl))) + +proc atk_document_set_attribute_value*(self: ptr Document00; attributeName: cstring; attributeValue: cstring): gboolean {. + importc: "atk_document_set_attribute_value", libprag.} + +proc setAttributeValue*(self: Document; attributeName: string; attributeValue: string): bool = + toBool(atk_document_set_attribute_value(cast[ptr Document00](self.impl), cstring(attributeName), cstring(attributeValue))) + +type + DocumentIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + getDocumentType*: proc(document: ptr Document00): cstring {.cdecl.} + getDocument*: proc(document: ptr Document00): pointer {.cdecl.} + getDocumentLocale*: proc(document: ptr Document00): cstring {.cdecl.} + getDocumentAttributes*: pointer + getDocumentAttributeValue*: proc(document: ptr Document00; attributeName: cstring): cstring {.cdecl.} + setDocumentAttribute*: proc(document: ptr Document00; attributeName: cstring; + attributeValue: cstring): gboolean {.cdecl.} + getCurrentPageNumber*: proc(document: ptr Document00): int32 {.cdecl.} + getPageCount*: proc(document: ptr Document00): int32 {.cdecl.} + DocumentIface* = ref object + impl*: ptr DocumentIface00 + +type + EditableText00* {.pure.} = object + EditableText* = ref object + impl*: ptr EditableText00 + +proc atk_editable_text_copy_text*(self: ptr EditableText00; startPos: int32; endPos: int32) {. + importc: "atk_editable_text_copy_text", libprag.} + +proc copyText*(self: EditableText; startPos: int; endPos: int) = + atk_editable_text_copy_text(cast[ptr EditableText00](self.impl), int32(startPos), int32(endPos)) + +proc atk_editable_text_cut_text*(self: ptr EditableText00; startPos: int32; endPos: int32) {. + importc: "atk_editable_text_cut_text", libprag.} + +proc cutText*(self: EditableText; startPos: int; endPos: int) = + atk_editable_text_cut_text(cast[ptr EditableText00](self.impl), int32(startPos), int32(endPos)) + +proc atk_editable_text_delete_text*(self: ptr EditableText00; startPos: int32; endPos: int32) {. + importc: "atk_editable_text_delete_text", libprag.} + +proc deleteText*(self: EditableText; startPos: int; endPos: int) = + atk_editable_text_delete_text(cast[ptr EditableText00](self.impl), int32(startPos), int32(endPos)) + +proc atk_editable_text_insert_text*(self: ptr EditableText00; string: cstring; length: int32; + position: ptr int32) {. + importc: "atk_editable_text_insert_text", libprag.} + +proc insertText*(self: EditableText; string: string; length: int; position: ptr int32) = + atk_editable_text_insert_text(cast[ptr EditableText00](self.impl), cstring(string), int32(length), position) + +proc atk_editable_text_paste_text*(self: ptr EditableText00; position: int32) {. + importc: "atk_editable_text_paste_text", libprag.} + +proc pasteText*(self: EditableText; position: int) = + atk_editable_text_paste_text(cast[ptr EditableText00](self.impl), int32(position)) + +proc atk_editable_text_set_run_attributes*(self: ptr EditableText00; attribSet: ptr pointer; + startOffset: int32; endOffset: int32): gboolean {. + importc: "atk_editable_text_set_run_attributes", libprag.} + +proc setRunAttributes*(self: EditableText; attribSet: ptr pointer; startOffset: int; + endOffset: int): bool = + toBool(atk_editable_text_set_run_attributes(cast[ptr EditableText00](self.impl), attribSet, int32(startOffset), int32(endOffset))) + +proc atk_editable_text_set_text_contents*(self: ptr EditableText00; string: cstring) {. + importc: "atk_editable_text_set_text_contents", libprag.} + +proc setTextContents*(self: EditableText; string: string) = + atk_editable_text_set_text_contents(cast[ptr EditableText00](self.impl), cstring(string)) + +proc `textContents=`*(self: EditableText; string: string) = + atk_editable_text_set_text_contents(cast[ptr EditableText00](self.impl), cstring(string)) + +type + EditableTextIface00* {.pure.} = object + parentInterface*: gobject.TypeInterface00 + setRunAttributes*: proc(text: ptr EditableText00; attribSet: ptr pointer; + startOffset: int32; endOffset: int32): gboolean {.cdecl.} + setTextContents*: proc(text: ptr EditableText00; string: cstring) {.cdecl.} + insertText*: proc(text: ptr EditableText00; string: cstring; length: int32; + position: ptr int32) {.cdecl.} + copyText*: proc(text: ptr EditableText00; startPos: int32; endPos: int32) {.cdecl.} + cutText*: proc(text: ptr EditableText00; startPos: int32; endPos: int32) {.cdecl.} + deleteText*: proc(text: ptr EditableText00; startPos: int32; endPos: int32) {.cdecl.} + pasteText*: proc(text: ptr EditableText00; position: int32) {.cdecl.} + EditableTextIface* = ref object + impl*: ptr EditableTextIface00 + +type + EventListener* = proc (obj: ptr Object00) {.cdecl.} + +type + EventListenerInit* = proc () {.cdecl.} + +type + FocusHandler* = proc (`object`: ptr Object00; focusIn: gboolean) {.cdecl.} + +type + Function* = proc (userData: pointer): gboolean {.cdecl.} + +type + GObjectAccessible* = ref object of Object + GObjectAccessible00* = object of Object00 + +proc atk_gobject_accessible_for_object*(obj: ptr gobject.Object00): ptr Object00 {. + importc: "atk_gobject_accessible_for_object", libprag.} + +proc forObject*(obj: gobject.Object): Object = + let gobj = atk_gobject_accessible_for_object(cast[ptr gobject.Object00](obj.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_gobject_accessible_get_object*(self: ptr GObjectAccessible00): ptr gobject.Object00 {. + importc: "atk_gobject_accessible_get_object", libprag.} + +proc getObject*(self: GObjectAccessible): gobject.Object = + let gobj = atk_gobject_accessible_get_object(cast[ptr GObjectAccessible00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PropertyValues00* {.pure.} = object + propertyName*: cstring + oldValue*: gobject.Value00 + newValue*: gobject.Value00 + PropertyValues* = ref object + impl*: ptr PropertyValues00 + +type + ObjectClass00* {.pure.} = object + parent*: gobject.ObjectClass00 + getName*: proc(accessible: ptr Object00): cstring {.cdecl.} + getDescription*: proc(accessible: ptr Object00): cstring {.cdecl.} + getParent*: proc(accessible: ptr Object00): ptr Object00 {.cdecl.} + getNChildren*: proc(accessible: ptr Object00): int32 {.cdecl.} + refChild*: pointer + getIndexInParent*: proc(accessible: ptr Object00): int32 {.cdecl.} + refRelationSet*: proc(accessible: ptr Object00): ptr RelationSet00 {.cdecl.} + getRole*: proc(accessible: ptr Object00): Role {.cdecl.} + getLayer*: proc(accessible: ptr Object00): Layer {.cdecl.} + getMdiZorder*: proc(accessible: ptr Object00): int32 {.cdecl.} + refStateSet*: proc(accessible: ptr Object00): ptr StateSet00 {.cdecl.} + setName*: proc(accessible: ptr Object00; name: cstring) {.cdecl.} + setDescription*: proc(accessible: ptr Object00; description: cstring) {.cdecl.} + setParent*: proc(accessible: ptr Object00; parent: ptr Object00) {.cdecl.} + setRole*: proc(accessible: ptr Object00; role: Role) {.cdecl.} + connectPropertyChangeHandler*: pointer + removePropertyChangeHandler*: proc(accessible: ptr Object00; handlerId: uint32) {.cdecl.} + initialize*: proc(accessible: ptr Object00; data: pointer) {.cdecl.} + childrenChanged*: proc(accessible: ptr Object00; changeIndex: uint32; changedChild: pointer) {.cdecl.} + focusEvent*: proc(accessible: ptr Object00; focusIn: gboolean) {.cdecl.} + propertyChange*: proc(accessible: ptr Object00; values: ptr PropertyValues00) {.cdecl.} + stateChange*: proc(accessible: ptr Object00; name: cstring; stateSet: gboolean) {.cdecl.} + visibleDataChanged*: proc(accessible: ptr Object00) {.cdecl.} + activeDescendantChanged*: proc(accessible: ptr Object00; child: pointer) {.cdecl.} + getAttributes*: proc(accessible: ptr Object00): ptr pointer {.cdecl.} + getObjectLocale*: proc(accessible: ptr Object00): cstring {.cdecl.} + pad1*: Function + ObjectClass* = ref object + impl*: ptr ObjectClass00 + +type + GObjectAccessibleClass00* {.pure.} = object + parentClass*: ObjectClass00 + pad1*: Function + pad2*: Function + GObjectAccessibleClass* = ref object + impl*: ptr GObjectAccessibleClass00 + +type + Hyperlink* = ref object of gobject.Object + Hyperlink00* = object of gobject.Object00 + +proc scLinkActivated*(self: Hyperlink; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "link-activated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc atk_hyperlink_get_end_index*(self: ptr Hyperlink00): int32 {. + importc: "atk_hyperlink_get_end_index", libprag.} + +proc getEndIndex*(self: Hyperlink): int = + int(atk_hyperlink_get_end_index(cast[ptr Hyperlink00](self.impl))) + +proc endIndex*(self: Hyperlink): int = + int(atk_hyperlink_get_end_index(cast[ptr Hyperlink00](self.impl))) + +proc atk_hyperlink_get_n_anchors*(self: ptr Hyperlink00): int32 {. + importc: "atk_hyperlink_get_n_anchors", libprag.} + +proc getNAnchors*(self: Hyperlink): int = + int(atk_hyperlink_get_n_anchors(cast[ptr Hyperlink00](self.impl))) + +proc nAnchors*(self: Hyperlink): int = + int(atk_hyperlink_get_n_anchors(cast[ptr Hyperlink00](self.impl))) + +proc atk_hyperlink_get_object*(self: ptr Hyperlink00; i: int32): ptr Object00 {. + importc: "atk_hyperlink_get_object", libprag.} + +proc getObject*(self: Hyperlink; i: int): Object = + let gobj = atk_hyperlink_get_object(cast[ptr Hyperlink00](self.impl), int32(i)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_hyperlink_get_start_index*(self: ptr Hyperlink00): int32 {. + importc: "atk_hyperlink_get_start_index", libprag.} + +proc getStartIndex*(self: Hyperlink): int = + int(atk_hyperlink_get_start_index(cast[ptr Hyperlink00](self.impl))) + +proc startIndex*(self: Hyperlink): int = + int(atk_hyperlink_get_start_index(cast[ptr Hyperlink00](self.impl))) + +proc atk_hyperlink_get_uri*(self: ptr Hyperlink00; i: int32): cstring {. + importc: "atk_hyperlink_get_uri", libprag.} + +proc getUri*(self: Hyperlink; i: int): string = + let resul0 = atk_hyperlink_get_uri(cast[ptr Hyperlink00](self.impl), int32(i)) + result = $resul0 + cogfree(resul0) + +proc uri*(self: Hyperlink; i: int): string = + let resul0 = atk_hyperlink_get_uri(cast[ptr Hyperlink00](self.impl), int32(i)) + result = $resul0 + cogfree(resul0) + +proc atk_hyperlink_is_inline*(self: ptr Hyperlink00): gboolean {. + importc: "atk_hyperlink_is_inline", libprag.} + +proc isInline*(self: Hyperlink): bool = + toBool(atk_hyperlink_is_inline(cast[ptr Hyperlink00](self.impl))) + +proc atk_hyperlink_is_selected_link*(self: ptr Hyperlink00): gboolean {. + importc: "atk_hyperlink_is_selected_link", libprag.} + +proc isSelectedLink*(self: Hyperlink): bool = + toBool(atk_hyperlink_is_selected_link(cast[ptr Hyperlink00](self.impl))) + +proc atk_hyperlink_is_valid*(self: ptr Hyperlink00): gboolean {. + importc: "atk_hyperlink_is_valid", libprag.} + +proc isValid*(self: Hyperlink): bool = + toBool(atk_hyperlink_is_valid(cast[ptr Hyperlink00](self.impl))) + +type + HyperlinkClass00* {.pure.} = object + parent*: gobject.ObjectClass00 + getUri*: proc(link: ptr Hyperlink00; i: int32): cstring {.cdecl.} + getObject*: proc(link: ptr Hyperlink00; i: int32): ptr Object00 {.cdecl.} + getEndIndex*: proc(link: ptr Hyperlink00): int32 {.cdecl.} + getStartIndex*: proc(link: ptr Hyperlink00): int32 {.cdecl.} + isValid*: proc(link: ptr Hyperlink00): gboolean {.cdecl.} + getNAnchors*: proc(link: ptr Hyperlink00): int32 {.cdecl.} + linkState*: proc(link: ptr Hyperlink00): uint32 {.cdecl.} + isSelectedLink*: proc(link: ptr Hyperlink00): gboolean {.cdecl.} + linkActivated*: proc(link: ptr Hyperlink00) {.cdecl.} + pad1*: Function + HyperlinkClass* = ref object + impl*: ptr HyperlinkClass00 + +type + HyperlinkImpl00* {.pure.} = object + HyperlinkImpl* = ref object + impl*: ptr HyperlinkImpl00 + +proc atk_hyperlink_impl_get_hyperlink*(self: ptr HyperlinkImpl00): ptr Hyperlink00 {. + importc: "atk_hyperlink_impl_get_hyperlink", libprag.} + +proc getHyperlink*(self: HyperlinkImpl): Hyperlink = + let gobj = atk_hyperlink_impl_get_hyperlink(cast[ptr HyperlinkImpl00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Hyperlink](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc hyperlink*(self: HyperlinkImpl): Hyperlink = + let gobj = atk_hyperlink_impl_get_hyperlink(cast[ptr HyperlinkImpl00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Hyperlink](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + HyperlinkImplIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + getHyperlink*: proc(impl: ptr HyperlinkImpl00): ptr Hyperlink00 {.cdecl.} + HyperlinkImplIface* = ref object + impl*: ptr HyperlinkImplIface00 + +type + HyperlinkStateFlags* {.size: sizeof(cint), pure.} = enum + inline = 1 + +type + Hypertext00* {.pure.} = object + Hypertext* = ref object + impl*: ptr Hypertext00 + +proc atk_hypertext_get_link*(self: ptr Hypertext00; linkIndex: int32): ptr Hyperlink00 {. + importc: "atk_hypertext_get_link", libprag.} + +proc getLink*(self: Hypertext; linkIndex: int): Hyperlink = + let gobj = atk_hypertext_get_link(cast[ptr Hypertext00](self.impl), int32(linkIndex)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Hyperlink](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc link*(self: Hypertext; linkIndex: int): Hyperlink = + let gobj = atk_hypertext_get_link(cast[ptr Hypertext00](self.impl), int32(linkIndex)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Hyperlink](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_hypertext_get_link_index*(self: ptr Hypertext00; charIndex: int32): int32 {. + importc: "atk_hypertext_get_link_index", libprag.} + +proc getLinkIndex*(self: Hypertext; charIndex: int): int = + int(atk_hypertext_get_link_index(cast[ptr Hypertext00](self.impl), int32(charIndex))) + +proc linkIndex*(self: Hypertext; charIndex: int): int = + int(atk_hypertext_get_link_index(cast[ptr Hypertext00](self.impl), int32(charIndex))) + +proc atk_hypertext_get_n_links*(self: ptr Hypertext00): int32 {. + importc: "atk_hypertext_get_n_links", libprag.} + +proc getNLinks*(self: Hypertext): int = + int(atk_hypertext_get_n_links(cast[ptr Hypertext00](self.impl))) + +proc nLinks*(self: Hypertext): int = + int(atk_hypertext_get_n_links(cast[ptr Hypertext00](self.impl))) + +type + HypertextIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + getLink*: proc(hypertext: ptr Hypertext00; linkIndex: int32): ptr Hyperlink00 {.cdecl.} + getNLinks*: proc(hypertext: ptr Hypertext00): int32 {.cdecl.} + getLinkIndex*: proc(hypertext: ptr Hypertext00; charIndex: int32): int32 {.cdecl.} + linkSelected*: proc(hypertext: ptr Hypertext00; linkIndex: int32) {.cdecl.} + HypertextIface* = ref object + impl*: ptr HypertextIface00 + +const INTERFACE_AGE* = 1'i32 + +type + Image00* {.pure.} = object + Image* = ref object + impl*: ptr Image00 + +proc atk_image_get_image_description*(self: ptr Image00): cstring {. + importc: "atk_image_get_image_description", libprag.} + +proc getImageDescription*(self: Image): string = + let resul0 = atk_image_get_image_description(cast[ptr Image00](self.impl)) + result = $resul0 + +proc imageDescription*(self: Image): string = + let resul0 = atk_image_get_image_description(cast[ptr Image00](self.impl)) + result = $resul0 + +proc atk_image_get_image_locale*(self: ptr Image00): cstring {. + importc: "atk_image_get_image_locale", libprag.} + +proc getImageLocale*(self: Image): string = + let resul0 = atk_image_get_image_locale(cast[ptr Image00](self.impl)) + result = $resul0 + +proc imageLocale*(self: Image): string = + let resul0 = atk_image_get_image_locale(cast[ptr Image00](self.impl)) + result = $resul0 + +proc atk_image_get_image_position*(self: ptr Image00; x: var int32; y: var int32; coordType: CoordType) {. + importc: "atk_image_get_image_position", libprag.} + +proc getImagePosition*(self: Image; x: var int; y: var int; coordType: CoordType) = + var y_00 = int32(y) + var x_00 = int32(x) + atk_image_get_image_position(cast[ptr Image00](self.impl), x_00, y_00, coordType) + y = int(y_00) + x = int(x_00) + +proc imagePosition*(self: Image; x: var int; y: var int; coordType: CoordType) = + var y_00 = int32(y) + var x_00 = int32(x) + atk_image_get_image_position(cast[ptr Image00](self.impl), x_00, y_00, coordType) + y = int(y_00) + x = int(x_00) + +proc atk_image_get_image_size*(self: ptr Image00; width: var int32; height: var int32) {. + importc: "atk_image_get_image_size", libprag.} + +proc getImageSize*(self: Image; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + atk_image_get_image_size(cast[ptr Image00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc imageSize*(self: Image; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + atk_image_get_image_size(cast[ptr Image00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc atk_image_set_image_description*(self: ptr Image00; description: cstring): gboolean {. + importc: "atk_image_set_image_description", libprag.} + +proc setImageDescription*(self: Image; description: string): bool = + toBool(atk_image_set_image_description(cast[ptr Image00](self.impl), cstring(description))) + +proc `imageDescription=`*(self: Image; description: string): bool = + toBool(atk_image_set_image_description(cast[ptr Image00](self.impl), cstring(description))) + +type + ImageIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + getImagePosition*: proc(image: ptr Image00; x: var int32; y: var int32; coordType: CoordType) {.cdecl.} + getImageDescription*: proc(image: ptr Image00): cstring {.cdecl.} + getImageSize*: proc(image: ptr Image00; width: var int32; height: var int32) {.cdecl.} + setImageDescription*: proc(image: ptr Image00; description: cstring): gboolean {.cdecl.} + getImageLocale*: proc(image: ptr Image00): cstring {.cdecl.} + ImageIface* = ref object + impl*: ptr ImageIface00 + +type + Implementor00* {.pure.} = object + Implementor* = ref object + impl*: ptr Implementor00 + +proc atk_implementor_ref_accessible*(self: ptr Implementor00): ptr Object00 {. + importc: "atk_implementor_ref_accessible", libprag.} + +proc refAccessible*(self: Implementor): Object = + let gobj = atk_implementor_ref_accessible(cast[ptr Implementor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + + +type + KeyEventStruct00* {.pure.} = object + `type`*: int32 + state*: uint32 + keyval*: uint32 + length*: int32 + string*: cstring + keycode*: uint16 + timestamp*: uint32 + KeyEventStruct* = ref object + impl*: ptr KeyEventStruct00 + +type + KeyEventType* {.size: sizeof(cint), pure.} = enum + press = 0 + release = 1 + lastDefined = 2 + +type + KeySnoopFunc* = proc (event: ptr KeyEventStruct00; userData: pointer): int32 {.cdecl.} + +const MAJOR_VERSION* = 2'i32 + +const MICRO_VERSION* = 0'i32 + +const MINOR_VERSION* = 22'i32 + +type + Misc* = ref object of gobject.Object + Misc00* = object of gobject.Object00 + +proc atk_misc_get_instance*(): ptr Misc00 {. + importc: "atk_misc_get_instance", libprag.} + +proc getInstance*(): Misc = + let gobj = atk_misc_get_instance() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Misc](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc instance*(): Misc = + let gobj = atk_misc_get_instance() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Misc](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_misc_threads_enter*(self: ptr Misc00) {. + importc: "atk_misc_threads_enter", libprag.} + +proc threadsEnter*(self: Misc) = + atk_misc_threads_enter(cast[ptr Misc00](self.impl)) + +proc atk_misc_threads_leave*(self: ptr Misc00) {. + importc: "atk_misc_threads_leave", libprag.} + +proc threadsLeave*(self: Misc) = + atk_misc_threads_leave(cast[ptr Misc00](self.impl)) + +type + MiscClass00* {.pure.} = object + parent*: gobject.ObjectClass00 + threadsEnter*: proc(misc: ptr Misc00) {.cdecl.} + threadsLeave*: proc(misc: ptr Misc00) {.cdecl.} + vfuncs*: array[32, pointer] + MiscClass* = ref object + impl*: ptr MiscClass00 + +type + NoOpObject* = ref object of Object + NoOpObject00* = object of Object00 + +proc atk_no_op_object_new*(obj: ptr gobject.Object00): ptr NoOpObject00 {. + importc: "atk_no_op_object_new", libprag.} + +proc newNoOpObject*(obj: gobject.Object): NoOpObject = + new(result, finalizeGObject) + result.impl = atk_no_op_object_new(cast[ptr gobject.Object00](obj.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initNoOpObject*[T](result: var T; obj: gobject.Object) = + assert(result is NoOpObject) + new(result, finalizeGObject) + result.impl = atk_no_op_object_new(cast[ptr gobject.Object00](obj.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + NoOpObjectClass00* {.pure.} = object + parentClass*: ObjectClass00 + NoOpObjectClass* = ref object + impl*: ptr NoOpObjectClass00 + +type + ObjectFactory* = ref object of gobject.Object + ObjectFactory00* = object of gobject.Object00 + +proc atk_object_factory_create_accessible*(self: ptr ObjectFactory00; obj: ptr gobject.Object00): ptr Object00 {. + importc: "atk_object_factory_create_accessible", libprag.} + +proc createAccessible*(self: ObjectFactory; obj: gobject.Object): Object = + let gobj = atk_object_factory_create_accessible(cast[ptr ObjectFactory00](self.impl), cast[ptr gobject.Object00](obj.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_object_factory_get_accessible_type*(self: ptr ObjectFactory00): GType {. + importc: "atk_object_factory_get_accessible_type", libprag.} + +proc getAccessibleType*(self: ObjectFactory): GType = + atk_object_factory_get_accessible_type(cast[ptr ObjectFactory00](self.impl)) + +proc accessibleType*(self: ObjectFactory): GType = + atk_object_factory_get_accessible_type(cast[ptr ObjectFactory00](self.impl)) + +proc atk_object_factory_invalidate*(self: ptr ObjectFactory00) {. + importc: "atk_object_factory_invalidate", libprag.} + +proc invalidate*(self: ObjectFactory) = + atk_object_factory_invalidate(cast[ptr ObjectFactory00](self.impl)) + +type + NoOpObjectFactory* = ref object of ObjectFactory + NoOpObjectFactory00* = object of ObjectFactory00 + +proc atk_no_op_object_factory_new*(): ptr NoOpObjectFactory00 {. + importc: "atk_no_op_object_factory_new", libprag.} + +proc newNoOpObjectFactory*(): NoOpObjectFactory = + new(result, finalizeGObject) + result.impl = atk_no_op_object_factory_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initNoOpObjectFactory*[T](result: var T) = + assert(result is NoOpObjectFactory) + new(result, finalizeGObject) + result.impl = atk_no_op_object_factory_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ObjectFactoryClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + createAccessible*: pointer + invalidate*: proc(factory: ptr ObjectFactory00) {.cdecl.} + getAccessibleType*: proc(): GType {.cdecl.} + pad1*: Function + pad2*: Function + ObjectFactoryClass* = ref object + impl*: ptr ObjectFactoryClass00 + +type + NoOpObjectFactoryClass00* {.pure.} = object + parentClass*: ObjectFactoryClass00 + NoOpObjectFactoryClass* = ref object + impl*: ptr NoOpObjectFactoryClass00 + +type + Plug* = ref object of Object + Plug00* = object of Object00 + +proc atk_plug_new*(): ptr Plug00 {. + importc: "atk_plug_new", libprag.} + +proc newPlug*(): Plug = + new(result, finalizeGObject) + result.impl = atk_plug_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPlug*[T](result: var T) = + assert(result is Plug) + new(result, finalizeGObject) + result.impl = atk_plug_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_plug_get_id*(self: ptr Plug00): cstring {. + importc: "atk_plug_get_id", libprag.} + +proc getId*(self: Plug): string = + let resul0 = atk_plug_get_id(cast[ptr Plug00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc id*(self: Plug): string = + let resul0 = atk_plug_get_id(cast[ptr Plug00](self.impl)) + result = $resul0 + cogfree(resul0) + +type + PlugClass00* {.pure.} = object + parentClass*: ObjectClass00 + getObjectId*: proc(obj: ptr Plug00): cstring {.cdecl.} + PlugClass* = ref object + impl*: ptr PlugClass00 + +type + PropertyChangeHandler* = proc (obj: ptr Object00; vals: ptr PropertyValues00) {.cdecl.} + +type + Range00* {.pure.} = object + Range* = ref object + impl*: ptr Range00 + +proc atk_range_new*(lowerLimit: cdouble; upperLimit: cdouble; description: cstring): ptr Range00 {. + importc: "atk_range_new", libprag.} + +proc newRange*(lowerLimit: cdouble; upperLimit: cdouble; description: string): Range = + new(result) + result.impl = atk_range_new(lowerLimit, upperLimit, cstring(description)) + +proc initRange*[T](result: var T; lowerLimit: cdouble; upperLimit: cdouble; description: string) = + assert(result is Range) + new(result) + result.impl = atk_range_new(lowerLimit, upperLimit, cstring(description)) + +proc atk_range_copy*(self: ptr Range00): ptr Range00 {. + importc: "atk_range_copy", libprag.} + +proc copy*(self: Range): Range = + new(result) + result.impl = atk_range_copy(cast[ptr Range00](self.impl)) + +proc atk_range_free*(self: ptr Range00) {. + importc: "atk_range_free", libprag.} + +proc free*(self: Range) = + atk_range_free(cast[ptr Range00](self.impl)) + +proc atk_range_get_description*(self: ptr Range00): cstring {. + importc: "atk_range_get_description", libprag.} + +proc getDescription*(self: Range): string = + let resul0 = atk_range_get_description(cast[ptr Range00](self.impl)) + result = $resul0 + +proc description*(self: Range): string = + let resul0 = atk_range_get_description(cast[ptr Range00](self.impl)) + result = $resul0 + +proc atk_range_get_lower_limit*(self: ptr Range00): cdouble {. + importc: "atk_range_get_lower_limit", libprag.} + +proc getLowerLimit*(self: Range): cdouble = + atk_range_get_lower_limit(cast[ptr Range00](self.impl)) + +proc lowerLimit*(self: Range): cdouble = + atk_range_get_lower_limit(cast[ptr Range00](self.impl)) + +proc atk_range_get_upper_limit*(self: ptr Range00): cdouble {. + importc: "atk_range_get_upper_limit", libprag.} + +proc getUpperLimit*(self: Range): cdouble = + atk_range_get_upper_limit(cast[ptr Range00](self.impl)) + +proc upperLimit*(self: Range): cdouble = + atk_range_get_upper_limit(cast[ptr Range00](self.impl)) + +type + Registry* = ref object of gobject.Object + Registry00* = object of gobject.Object00 + factoryTypeRegistry*: ptr HashTable00 + factorySingletonCache*: ptr HashTable00 + +proc atk_registry_get_factory*(self: ptr Registry00; `type`: GType): ptr ObjectFactory00 {. + importc: "atk_registry_get_factory", libprag.} + +proc getFactory*(self: Registry; `type`: GType): ObjectFactory = + let gobj = atk_registry_get_factory(cast[ptr Registry00](self.impl), `type`) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ObjectFactory](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc factory*(self: Registry; `type`: GType): ObjectFactory = + let gobj = atk_registry_get_factory(cast[ptr Registry00](self.impl), `type`) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ObjectFactory](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_registry_get_factory_type*(self: ptr Registry00; `type`: GType): GType {. + importc: "atk_registry_get_factory_type", libprag.} + +proc getFactoryType*(self: Registry; `type`: GType): GType = + atk_registry_get_factory_type(cast[ptr Registry00](self.impl), `type`) + +proc factoryType*(self: Registry; `type`: GType): GType = + atk_registry_get_factory_type(cast[ptr Registry00](self.impl), `type`) + +proc atk_registry_set_factory_type*(self: ptr Registry00; `type`: GType; factoryType: GType) {. + importc: "atk_registry_set_factory_type", libprag.} + +proc setFactoryType*(self: Registry; `type`: GType; factoryType: GType) = + atk_registry_set_factory_type(cast[ptr Registry00](self.impl), `type`, factoryType) + +type + RegistryClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + RegistryClass* = ref object + impl*: ptr RegistryClass00 + +type + RelationClass00* {.pure.} = object + parent*: gobject.ObjectClass00 + RelationClass* = ref object + impl*: ptr RelationClass00 + +type + RelationSetClass00* {.pure.} = object + parent*: gobject.ObjectClass00 + pad1*: Function + pad2*: Function + RelationSetClass* = ref object + impl*: ptr RelationSetClass00 + +type + Selection00* {.pure.} = object + Selection* = ref object + impl*: ptr Selection00 + +proc atk_selection_add_selection*(self: ptr Selection00; i: int32): gboolean {. + importc: "atk_selection_add_selection", libprag.} + +proc addSelection*(self: Selection; i: int): bool = + toBool(atk_selection_add_selection(cast[ptr Selection00](self.impl), int32(i))) + +proc atk_selection_clear_selection*(self: ptr Selection00): gboolean {. + importc: "atk_selection_clear_selection", libprag.} + +proc clearSelection*(self: Selection): bool = + toBool(atk_selection_clear_selection(cast[ptr Selection00](self.impl))) + +proc atk_selection_get_selection_count*(self: ptr Selection00): int32 {. + importc: "atk_selection_get_selection_count", libprag.} + +proc getSelectionCount*(self: Selection): int = + int(atk_selection_get_selection_count(cast[ptr Selection00](self.impl))) + +proc selectionCount*(self: Selection): int = + int(atk_selection_get_selection_count(cast[ptr Selection00](self.impl))) + +proc atk_selection_is_child_selected*(self: ptr Selection00; i: int32): gboolean {. + importc: "atk_selection_is_child_selected", libprag.} + +proc isChildSelected*(self: Selection; i: int): bool = + toBool(atk_selection_is_child_selected(cast[ptr Selection00](self.impl), int32(i))) + +proc atk_selection_ref_selection*(self: ptr Selection00; i: int32): ptr Object00 {. + importc: "atk_selection_ref_selection", libprag.} + +proc refSelection*(self: Selection; i: int): Object = + let gobj = atk_selection_ref_selection(cast[ptr Selection00](self.impl), int32(i)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_selection_remove_selection*(self: ptr Selection00; i: int32): gboolean {. + importc: "atk_selection_remove_selection", libprag.} + +proc removeSelection*(self: Selection; i: int): bool = + toBool(atk_selection_remove_selection(cast[ptr Selection00](self.impl), int32(i))) + +proc atk_selection_select_all_selection*(self: ptr Selection00): gboolean {. + importc: "atk_selection_select_all_selection", libprag.} + +proc selectAllSelection*(self: Selection): bool = + toBool(atk_selection_select_all_selection(cast[ptr Selection00](self.impl))) + +type + SelectionIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + addSelection*: proc(selection: ptr Selection00; i: int32): gboolean {.cdecl.} + clearSelection*: proc(selection: ptr Selection00): gboolean {.cdecl.} + refSelection*: proc(selection: ptr Selection00; i: int32): ptr Object00 {.cdecl.} + getSelectionCount*: proc(selection: ptr Selection00): int32 {.cdecl.} + isChildSelected*: proc(selection: ptr Selection00; i: int32): gboolean {.cdecl.} + removeSelection*: proc(selection: ptr Selection00; i: int32): gboolean {.cdecl.} + selectAllSelection*: proc(selection: ptr Selection00): gboolean {.cdecl.} + selectionChanged*: proc(selection: ptr Selection00) {.cdecl.} + SelectionIface* = ref object + impl*: ptr SelectionIface00 + +type + Socket* = ref object of Object + Socket00* = object of Object00 + embeddedPlugId*: cstring + +proc atk_socket_new*(): ptr Socket00 {. + importc: "atk_socket_new", libprag.} + +proc newSocket*(): Socket = + new(result, finalizeGObject) + result.impl = atk_socket_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSocket*[T](result: var T) = + assert(result is Socket) + new(result, finalizeGObject) + result.impl = atk_socket_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_socket_embed*(self: ptr Socket00; plugId: cstring) {. + importc: "atk_socket_embed", libprag.} + +proc embed*(self: Socket; plugId: string) = + atk_socket_embed(cast[ptr Socket00](self.impl), cstring(plugId)) + +proc atk_socket_is_occupied*(self: ptr Socket00): gboolean {. + importc: "atk_socket_is_occupied", libprag.} + +proc isOccupied*(self: Socket): bool = + toBool(atk_socket_is_occupied(cast[ptr Socket00](self.impl))) + +type + SocketClass00* {.pure.} = object + parentClass*: ObjectClass00 + embed*: proc(obj: ptr Socket00; plugId: cstring) {.cdecl.} + SocketClass* = ref object + impl*: ptr SocketClass00 + +type + StateSetClass00* {.pure.} = object + parent*: gobject.ObjectClass00 + StateSetClass* = ref object + impl*: ptr StateSetClass00 + +type + StreamableContent00* {.pure.} = object + StreamableContent* = ref object + impl*: ptr StreamableContent00 + +proc atk_streamable_content_get_mime_type*(self: ptr StreamableContent00; i: int32): cstring {. + importc: "atk_streamable_content_get_mime_type", libprag.} + +proc getMimeType*(self: StreamableContent; i: int): string = + let resul0 = atk_streamable_content_get_mime_type(cast[ptr StreamableContent00](self.impl), int32(i)) + result = $resul0 + +proc mimeType*(self: StreamableContent; i: int): string = + let resul0 = atk_streamable_content_get_mime_type(cast[ptr StreamableContent00](self.impl), int32(i)) + result = $resul0 + +proc atk_streamable_content_get_n_mime_types*(self: ptr StreamableContent00): int32 {. + importc: "atk_streamable_content_get_n_mime_types", libprag.} + +proc getNMimeTypes*(self: StreamableContent): int = + int(atk_streamable_content_get_n_mime_types(cast[ptr StreamableContent00](self.impl))) + +proc nMimeTypes*(self: StreamableContent): int = + int(atk_streamable_content_get_n_mime_types(cast[ptr StreamableContent00](self.impl))) + +proc atk_streamable_content_get_stream*(self: ptr StreamableContent00; mimeType: cstring): ptr glib.IOChannel00 {. + importc: "atk_streamable_content_get_stream", libprag.} + +proc getStream*(self: StreamableContent; mimeType: string): glib.IOChannel = + new(result) + result.impl = atk_streamable_content_get_stream(cast[ptr StreamableContent00](self.impl), cstring(mimeType)) + +proc stream*(self: StreamableContent; mimeType: string): glib.IOChannel = + new(result) + result.impl = atk_streamable_content_get_stream(cast[ptr StreamableContent00](self.impl), cstring(mimeType)) + +proc atk_streamable_content_get_uri*(self: ptr StreamableContent00; mimeType: cstring): cstring {. + importc: "atk_streamable_content_get_uri", libprag.} + +proc getUri*(self: StreamableContent; mimeType: string): string = + let resul0 = atk_streamable_content_get_uri(cast[ptr StreamableContent00](self.impl), cstring(mimeType)) + result = $resul0 + +proc uri*(self: StreamableContent; mimeType: string): string = + let resul0 = atk_streamable_content_get_uri(cast[ptr StreamableContent00](self.impl), cstring(mimeType)) + result = $resul0 + +type + StreamableContentIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + getNMimeTypes*: proc(streamable: ptr StreamableContent00): int32 {.cdecl.} + getMimeType*: proc(streamable: ptr StreamableContent00; i: int32): cstring {.cdecl.} + getStream*: proc(streamable: ptr StreamableContent00; mimeType: cstring): ptr glib.IOChannel00 {.cdecl.} + getUri*: proc(streamable: ptr StreamableContent00; mimeType: cstring): cstring {.cdecl.} + pad1*: Function + pad2*: Function + pad3*: Function + StreamableContentIface* = ref object + impl*: ptr StreamableContentIface00 + +type + Table00* {.pure.} = object + Table* = ref object + impl*: ptr Table00 + +proc atk_table_add_column_selection*(self: ptr Table00; column: int32): gboolean {. + importc: "atk_table_add_column_selection", libprag.} + +proc addColumnSelection*(self: Table; column: int): bool = + toBool(atk_table_add_column_selection(cast[ptr Table00](self.impl), int32(column))) + +proc atk_table_add_row_selection*(self: ptr Table00; row: int32): gboolean {. + importc: "atk_table_add_row_selection", libprag.} + +proc addRowSelection*(self: Table; row: int): bool = + toBool(atk_table_add_row_selection(cast[ptr Table00](self.impl), int32(row))) + +proc atk_table_get_caption*(self: ptr Table00): ptr Object00 {. + importc: "atk_table_get_caption", libprag.} + +proc getCaption*(self: Table): Object = + let gobj = atk_table_get_caption(cast[ptr Table00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc caption*(self: Table): Object = + let gobj = atk_table_get_caption(cast[ptr Table00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_table_get_column_at_index*(self: ptr Table00; index: int32): int32 {. + importc: "atk_table_get_column_at_index", libprag.} + +proc getColumnAtIndex*(self: Table; index: int): int = + int(atk_table_get_column_at_index(cast[ptr Table00](self.impl), int32(index))) + +proc columnAtIndex*(self: Table; index: int): int = + int(atk_table_get_column_at_index(cast[ptr Table00](self.impl), int32(index))) + +proc atk_table_get_column_description*(self: ptr Table00; column: int32): cstring {. + importc: "atk_table_get_column_description", libprag.} + +proc getColumnDescription*(self: Table; column: int): string = + let resul0 = atk_table_get_column_description(cast[ptr Table00](self.impl), int32(column)) + result = $resul0 + +proc columnDescription*(self: Table; column: int): string = + let resul0 = atk_table_get_column_description(cast[ptr Table00](self.impl), int32(column)) + result = $resul0 + +proc atk_table_get_column_extent_at*(self: ptr Table00; row: int32; column: int32): int32 {. + importc: "atk_table_get_column_extent_at", libprag.} + +proc getColumnExtentAt*(self: Table; row: int; column: int): int = + int(atk_table_get_column_extent_at(cast[ptr Table00](self.impl), int32(row), int32(column))) + +proc columnExtentAt*(self: Table; row: int; column: int): int = + int(atk_table_get_column_extent_at(cast[ptr Table00](self.impl), int32(row), int32(column))) + +proc atk_table_get_column_header*(self: ptr Table00; column: int32): ptr Object00 {. + importc: "atk_table_get_column_header", libprag.} + +proc getColumnHeader*(self: Table; column: int): Object = + let gobj = atk_table_get_column_header(cast[ptr Table00](self.impl), int32(column)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc columnHeader*(self: Table; column: int): Object = + let gobj = atk_table_get_column_header(cast[ptr Table00](self.impl), int32(column)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_table_get_index_at*(self: ptr Table00; row: int32; column: int32): int32 {. + importc: "atk_table_get_index_at", libprag.} + +proc getIndexAt*(self: Table; row: int; column: int): int = + int(atk_table_get_index_at(cast[ptr Table00](self.impl), int32(row), int32(column))) + +proc indexAt*(self: Table; row: int; column: int): int = + int(atk_table_get_index_at(cast[ptr Table00](self.impl), int32(row), int32(column))) + +proc atk_table_get_n_columns*(self: ptr Table00): int32 {. + importc: "atk_table_get_n_columns", libprag.} + +proc getNColumns*(self: Table): int = + int(atk_table_get_n_columns(cast[ptr Table00](self.impl))) + +proc nColumns*(self: Table): int = + int(atk_table_get_n_columns(cast[ptr Table00](self.impl))) + +proc atk_table_get_n_rows*(self: ptr Table00): int32 {. + importc: "atk_table_get_n_rows", libprag.} + +proc getNRows*(self: Table): int = + int(atk_table_get_n_rows(cast[ptr Table00](self.impl))) + +proc nRows*(self: Table): int = + int(atk_table_get_n_rows(cast[ptr Table00](self.impl))) + +proc atk_table_get_row_at_index*(self: ptr Table00; index: int32): int32 {. + importc: "atk_table_get_row_at_index", libprag.} + +proc getRowAtIndex*(self: Table; index: int): int = + int(atk_table_get_row_at_index(cast[ptr Table00](self.impl), int32(index))) + +proc rowAtIndex*(self: Table; index: int): int = + int(atk_table_get_row_at_index(cast[ptr Table00](self.impl), int32(index))) + +proc atk_table_get_row_description*(self: ptr Table00; row: int32): cstring {. + importc: "atk_table_get_row_description", libprag.} + +proc getRowDescription*(self: Table; row: int): string = + let resul0 = atk_table_get_row_description(cast[ptr Table00](self.impl), int32(row)) + result = $resul0 + +proc rowDescription*(self: Table; row: int): string = + let resul0 = atk_table_get_row_description(cast[ptr Table00](self.impl), int32(row)) + result = $resul0 + +proc atk_table_get_row_extent_at*(self: ptr Table00; row: int32; column: int32): int32 {. + importc: "atk_table_get_row_extent_at", libprag.} + +proc getRowExtentAt*(self: Table; row: int; column: int): int = + int(atk_table_get_row_extent_at(cast[ptr Table00](self.impl), int32(row), int32(column))) + +proc rowExtentAt*(self: Table; row: int; column: int): int = + int(atk_table_get_row_extent_at(cast[ptr Table00](self.impl), int32(row), int32(column))) + +proc atk_table_get_row_header*(self: ptr Table00; row: int32): ptr Object00 {. + importc: "atk_table_get_row_header", libprag.} + +proc getRowHeader*(self: Table; row: int): Object = + let gobj = atk_table_get_row_header(cast[ptr Table00](self.impl), int32(row)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rowHeader*(self: Table; row: int): Object = + let gobj = atk_table_get_row_header(cast[ptr Table00](self.impl), int32(row)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_table_get_selected_columns*(self: ptr Table00; selected: ptr int32): int32 {. + importc: "atk_table_get_selected_columns", libprag.} + +proc getSelectedColumns*(self: Table; selected: ptr int32): int = + int(atk_table_get_selected_columns(cast[ptr Table00](self.impl), selected)) + +proc selectedColumns*(self: Table; selected: ptr int32): int = + int(atk_table_get_selected_columns(cast[ptr Table00](self.impl), selected)) + +proc atk_table_get_selected_rows*(self: ptr Table00; selected: ptr int32): int32 {. + importc: "atk_table_get_selected_rows", libprag.} + +proc getSelectedRows*(self: Table; selected: ptr int32): int = + int(atk_table_get_selected_rows(cast[ptr Table00](self.impl), selected)) + +proc selectedRows*(self: Table; selected: ptr int32): int = + int(atk_table_get_selected_rows(cast[ptr Table00](self.impl), selected)) + +proc atk_table_get_summary*(self: ptr Table00): ptr Object00 {. + importc: "atk_table_get_summary", libprag.} + +proc getSummary*(self: Table): Object = + let gobj = atk_table_get_summary(cast[ptr Table00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc summary*(self: Table): Object = + let gobj = atk_table_get_summary(cast[ptr Table00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_table_is_column_selected*(self: ptr Table00; column: int32): gboolean {. + importc: "atk_table_is_column_selected", libprag.} + +proc isColumnSelected*(self: Table; column: int): bool = + toBool(atk_table_is_column_selected(cast[ptr Table00](self.impl), int32(column))) + +proc atk_table_is_row_selected*(self: ptr Table00; row: int32): gboolean {. + importc: "atk_table_is_row_selected", libprag.} + +proc isRowSelected*(self: Table; row: int): bool = + toBool(atk_table_is_row_selected(cast[ptr Table00](self.impl), int32(row))) + +proc atk_table_is_selected*(self: ptr Table00; row: int32; column: int32): gboolean {. + importc: "atk_table_is_selected", libprag.} + +proc isSelected*(self: Table; row: int; column: int): bool = + toBool(atk_table_is_selected(cast[ptr Table00](self.impl), int32(row), int32(column))) + +proc atk_table_ref_at*(self: ptr Table00; row: int32; column: int32): ptr Object00 {. + importc: "atk_table_ref_at", libprag.} + +proc refAt*(self: Table; row: int; column: int): Object = + let gobj = atk_table_ref_at(cast[ptr Table00](self.impl), int32(row), int32(column)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_table_remove_column_selection*(self: ptr Table00; column: int32): gboolean {. + importc: "atk_table_remove_column_selection", libprag.} + +proc removeColumnSelection*(self: Table; column: int): bool = + toBool(atk_table_remove_column_selection(cast[ptr Table00](self.impl), int32(column))) + +proc atk_table_remove_row_selection*(self: ptr Table00; row: int32): gboolean {. + importc: "atk_table_remove_row_selection", libprag.} + +proc removeRowSelection*(self: Table; row: int): bool = + toBool(atk_table_remove_row_selection(cast[ptr Table00](self.impl), int32(row))) + +proc atk_table_set_caption*(self: ptr Table00; caption: ptr Object00) {. + importc: "atk_table_set_caption", libprag.} + +proc setCaption*(self: Table; caption: Object) = + atk_table_set_caption(cast[ptr Table00](self.impl), cast[ptr Object00](caption.impl)) + +proc `caption=`*(self: Table; caption: Object) = + atk_table_set_caption(cast[ptr Table00](self.impl), cast[ptr Object00](caption.impl)) + +proc atk_table_set_column_description*(self: ptr Table00; column: int32; description: cstring) {. + importc: "atk_table_set_column_description", libprag.} + +proc setColumnDescription*(self: Table; column: int; description: string) = + atk_table_set_column_description(cast[ptr Table00](self.impl), int32(column), cstring(description)) + +proc atk_table_set_column_header*(self: ptr Table00; column: int32; header: ptr Object00) {. + importc: "atk_table_set_column_header", libprag.} + +proc setColumnHeader*(self: Table; column: int; header: Object) = + atk_table_set_column_header(cast[ptr Table00](self.impl), int32(column), cast[ptr Object00](header.impl)) + +proc atk_table_set_row_description*(self: ptr Table00; row: int32; description: cstring) {. + importc: "atk_table_set_row_description", libprag.} + +proc setRowDescription*(self: Table; row: int; description: string) = + atk_table_set_row_description(cast[ptr Table00](self.impl), int32(row), cstring(description)) + +proc atk_table_set_row_header*(self: ptr Table00; row: int32; header: ptr Object00) {. + importc: "atk_table_set_row_header", libprag.} + +proc setRowHeader*(self: Table; row: int; header: Object) = + atk_table_set_row_header(cast[ptr Table00](self.impl), int32(row), cast[ptr Object00](header.impl)) + +proc atk_table_set_summary*(self: ptr Table00; accessible: ptr Object00) {. + importc: "atk_table_set_summary", libprag.} + +proc setSummary*(self: Table; accessible: Object) = + atk_table_set_summary(cast[ptr Table00](self.impl), cast[ptr Object00](accessible.impl)) + +proc `summary=`*(self: Table; accessible: Object) = + atk_table_set_summary(cast[ptr Table00](self.impl), cast[ptr Object00](accessible.impl)) + +type + TableCell00* {.pure.} = object + TableCell* = ref object + impl*: ptr TableCell00 + +proc atk_table_cell_get_column_header_cells*(self: ptr TableCell00): ptr PtrArray {. + importc: "atk_table_cell_get_column_header_cells", libprag.} + +proc getColumnHeaderCells*(self: TableCell): ptr PtrArray = + atk_table_cell_get_column_header_cells(cast[ptr TableCell00](self.impl)) + +proc columnHeaderCells*(self: TableCell): ptr PtrArray = + atk_table_cell_get_column_header_cells(cast[ptr TableCell00](self.impl)) + +proc atk_table_cell_get_column_span*(self: ptr TableCell00): int32 {. + importc: "atk_table_cell_get_column_span", libprag.} + +proc getColumnSpan*(self: TableCell): int = + int(atk_table_cell_get_column_span(cast[ptr TableCell00](self.impl))) + +proc columnSpan*(self: TableCell): int = + int(atk_table_cell_get_column_span(cast[ptr TableCell00](self.impl))) + +proc atk_table_cell_get_position*(self: ptr TableCell00; row: var int32; column: var int32): gboolean {. + importc: "atk_table_cell_get_position", libprag.} + +proc getPosition*(self: TableCell; row: var int; column: var int): bool = + var column_00 = int32(column) + var row_00 = int32(row) + result = toBool(atk_table_cell_get_position(cast[ptr TableCell00](self.impl), row_00, column_00)) + column = int(column_00) + row = int(row_00) + +proc position*(self: TableCell; row: var int; column: var int): bool = + var column_00 = int32(column) + var row_00 = int32(row) + result = toBool(atk_table_cell_get_position(cast[ptr TableCell00](self.impl), row_00, column_00)) + column = int(column_00) + row = int(row_00) + +proc atk_table_cell_get_row_column_span*(self: ptr TableCell00; row: var int32; column: var int32; + rowSpan: var int32; columnSpan: var int32): gboolean {. + importc: "atk_table_cell_get_row_column_span", libprag.} + +proc getRowColumnSpan*(self: TableCell; row: var int; column: var int; rowSpan: var int; + columnSpan: var int): bool = + var column_00 = int32(column) + var row_00 = int32(row) + var columnSpan_00 = int32(columnSpan) + var rowSpan_00 = int32(rowSpan) + result = toBool(atk_table_cell_get_row_column_span(cast[ptr TableCell00](self.impl), row_00, column_00, rowSpan_00, columnSpan_00)) + column = int(column_00) + row = int(row_00) + columnSpan = int(columnSpan_00) + rowSpan = int(rowSpan_00) + +proc rowColumnSpan*(self: TableCell; row: var int; column: var int; rowSpan: var int; + columnSpan: var int): bool = + var column_00 = int32(column) + var row_00 = int32(row) + var columnSpan_00 = int32(columnSpan) + var rowSpan_00 = int32(rowSpan) + result = toBool(atk_table_cell_get_row_column_span(cast[ptr TableCell00](self.impl), row_00, column_00, rowSpan_00, columnSpan_00)) + column = int(column_00) + row = int(row_00) + columnSpan = int(columnSpan_00) + rowSpan = int(rowSpan_00) + +proc atk_table_cell_get_row_header_cells*(self: ptr TableCell00): ptr PtrArray {. + importc: "atk_table_cell_get_row_header_cells", libprag.} + +proc getRowHeaderCells*(self: TableCell): ptr PtrArray = + atk_table_cell_get_row_header_cells(cast[ptr TableCell00](self.impl)) + +proc rowHeaderCells*(self: TableCell): ptr PtrArray = + atk_table_cell_get_row_header_cells(cast[ptr TableCell00](self.impl)) + +proc atk_table_cell_get_row_span*(self: ptr TableCell00): int32 {. + importc: "atk_table_cell_get_row_span", libprag.} + +proc getRowSpan*(self: TableCell): int = + int(atk_table_cell_get_row_span(cast[ptr TableCell00](self.impl))) + +proc rowSpan*(self: TableCell): int = + int(atk_table_cell_get_row_span(cast[ptr TableCell00](self.impl))) + +proc atk_table_cell_get_table*(self: ptr TableCell00): ptr Object00 {. + importc: "atk_table_cell_get_table", libprag.} + +proc getTable*(self: TableCell): Object = + let gobj = atk_table_cell_get_table(cast[ptr TableCell00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc table*(self: TableCell): Object = + let gobj = atk_table_cell_get_table(cast[ptr TableCell00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + TableCellIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + getColumnSpan*: proc(cell: ptr TableCell00): int32 {.cdecl.} + getColumnHeaderCells*: proc(cell: ptr TableCell00): ptr PtrArray {.cdecl.} + getPosition*: proc(cell: ptr TableCell00; row: var int32; column: var int32): gboolean {.cdecl.} + getRowSpan*: proc(cell: ptr TableCell00): int32 {.cdecl.} + getRowHeaderCells*: proc(cell: ptr TableCell00): ptr PtrArray {.cdecl.} + getRowColumnSpan*: proc(cell: ptr TableCell00; row: var int32; column: var int32; + rowSpan: var int32; columnSpan: var int32): gboolean {.cdecl.} + getTable*: proc(cell: ptr TableCell00): ptr Object00 {.cdecl.} + TableCellIface* = ref object + impl*: ptr TableCellIface00 + +type + TableIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + refAt*: proc(table: ptr Table00; row: int32; column: int32): ptr Object00 {.cdecl.} + getIndexAt*: proc(table: ptr Table00; row: int32; column: int32): int32 {.cdecl.} + getColumnAtIndex*: proc(table: ptr Table00; index: int32): int32 {.cdecl.} + getRowAtIndex*: proc(table: ptr Table00; index: int32): int32 {.cdecl.} + getNColumns*: proc(table: ptr Table00): int32 {.cdecl.} + getNRows*: proc(table: ptr Table00): int32 {.cdecl.} + getColumnExtentAt*: proc(table: ptr Table00; row: int32; column: int32): int32 {.cdecl.} + getRowExtentAt*: proc(table: ptr Table00; row: int32; column: int32): int32 {.cdecl.} + getCaption*: proc(table: ptr Table00): ptr Object00 {.cdecl.} + getColumnDescription*: proc(table: ptr Table00; column: int32): cstring {.cdecl.} + getColumnHeader*: proc(table: ptr Table00; column: int32): ptr Object00 {.cdecl.} + getRowDescription*: proc(table: ptr Table00; row: int32): cstring {.cdecl.} + getRowHeader*: proc(table: ptr Table00; row: int32): ptr Object00 {.cdecl.} + getSummary*: proc(table: ptr Table00): ptr Object00 {.cdecl.} + setCaption*: proc(table: ptr Table00; caption: ptr Object00) {.cdecl.} + setColumnDescription*: proc(table: ptr Table00; column: int32; description: cstring) {.cdecl.} + setColumnHeader*: proc(table: ptr Table00; column: int32; header: ptr Object00) {.cdecl.} + setRowDescription*: proc(table: ptr Table00; row: int32; description: cstring) {.cdecl.} + setRowHeader*: proc(table: ptr Table00; row: int32; header: ptr Object00) {.cdecl.} + setSummary*: proc(table: ptr Table00; accessible: ptr Object00) {.cdecl.} + getSelectedColumns*: proc(table: ptr Table00; selected: ptr int32): int32 {.cdecl.} + getSelectedRows*: proc(table: ptr Table00; selected: ptr int32): int32 {.cdecl.} + isColumnSelected*: proc(table: ptr Table00; column: int32): gboolean {.cdecl.} + isRowSelected*: proc(table: ptr Table00; row: int32): gboolean {.cdecl.} + isSelected*: proc(table: ptr Table00; row: int32; column: int32): gboolean {.cdecl.} + addRowSelection*: proc(table: ptr Table00; row: int32): gboolean {.cdecl.} + removeRowSelection*: proc(table: ptr Table00; row: int32): gboolean {.cdecl.} + addColumnSelection*: proc(table: ptr Table00; column: int32): gboolean {.cdecl.} + removeColumnSelection*: proc(table: ptr Table00; column: int32): gboolean {.cdecl.} + rowInserted*: proc(table: ptr Table00; row: int32; numInserted: int32) {.cdecl.} + columnInserted*: proc(table: ptr Table00; column: int32; numInserted: int32) {.cdecl.} + rowDeleted*: proc(table: ptr Table00; row: int32; numDeleted: int32) {.cdecl.} + columnDeleted*: proc(table: ptr Table00; column: int32; numDeleted: int32) {.cdecl.} + rowReordered*: proc(table: ptr Table00) {.cdecl.} + columnReordered*: proc(table: ptr Table00) {.cdecl.} + modelChanged*: proc(table: ptr Table00) {.cdecl.} + TableIface* = ref object + impl*: ptr TableIface00 + +type + Text00* {.pure.} = object + Text* = ref object + impl*: ptr Text00 + +proc atk_text_add_selection*(self: ptr Text00; startOffset: int32; endOffset: int32): gboolean {. + importc: "atk_text_add_selection", libprag.} + +proc addSelection*(self: Text; startOffset: int; endOffset: int): bool = + toBool(atk_text_add_selection(cast[ptr Text00](self.impl), int32(startOffset), int32(endOffset))) + +proc atk_text_get_caret_offset*(self: ptr Text00): int32 {. + importc: "atk_text_get_caret_offset", libprag.} + +proc getCaretOffset*(self: Text): int = + int(atk_text_get_caret_offset(cast[ptr Text00](self.impl))) + +proc caretOffset*(self: Text): int = + int(atk_text_get_caret_offset(cast[ptr Text00](self.impl))) + +proc atk_text_get_character_at_offset*(self: ptr Text00; offset: int32): gunichar {. + importc: "atk_text_get_character_at_offset", libprag.} + +proc getCharacterAtOffset*(self: Text; offset: int): gunichar = + atk_text_get_character_at_offset(cast[ptr Text00](self.impl), int32(offset)) + +proc characterAtOffset*(self: Text; offset: int): gunichar = + atk_text_get_character_at_offset(cast[ptr Text00](self.impl), int32(offset)) + +proc atk_text_get_character_count*(self: ptr Text00): int32 {. + importc: "atk_text_get_character_count", libprag.} + +proc getCharacterCount*(self: Text): int = + int(atk_text_get_character_count(cast[ptr Text00](self.impl))) + +proc characterCount*(self: Text): int = + int(atk_text_get_character_count(cast[ptr Text00](self.impl))) + +proc atk_text_get_character_extents*(self: ptr Text00; offset: int32; x: var int32; y: var int32; + width: var int32; height: var int32; coords: CoordType) {. + importc: "atk_text_get_character_extents", libprag.} + +proc getCharacterExtents*(self: Text; offset: int; x: var int; y: var int; width: var int; + height: var int; coords: CoordType) = + var height_00 = int32(height) + var y_00 = int32(y) + var width_00 = int32(width) + var x_00 = int32(x) + atk_text_get_character_extents(cast[ptr Text00](self.impl), int32(offset), x_00, y_00, width_00, height_00, coords) + height = int(height_00) + y = int(y_00) + width = int(width_00) + x = int(x_00) + +proc characterExtents*(self: Text; offset: int; x: var int; y: var int; width: var int; + height: var int; coords: CoordType) = + var height_00 = int32(height) + var y_00 = int32(y) + var width_00 = int32(width) + var x_00 = int32(x) + atk_text_get_character_extents(cast[ptr Text00](self.impl), int32(offset), x_00, y_00, width_00, height_00, coords) + height = int(height_00) + y = int(y_00) + width = int(width_00) + x = int(x_00) + +proc atk_text_get_default_attributes*(self: ptr Text00): ptr pointer {. + importc: "atk_text_get_default_attributes", libprag.} + +proc getDefaultAttributes*(self: Text): ptr pointer = + atk_text_get_default_attributes(cast[ptr Text00](self.impl)) + +proc defaultAttributes*(self: Text): ptr pointer = + atk_text_get_default_attributes(cast[ptr Text00](self.impl)) + +proc atk_text_get_n_selections*(self: ptr Text00): int32 {. + importc: "atk_text_get_n_selections", libprag.} + +proc getNSelections*(self: Text): int = + int(atk_text_get_n_selections(cast[ptr Text00](self.impl))) + +proc nSelections*(self: Text): int = + int(atk_text_get_n_selections(cast[ptr Text00](self.impl))) + +proc atk_text_get_offset_at_point*(self: ptr Text00; x: int32; y: int32; coords: CoordType): int32 {. + importc: "atk_text_get_offset_at_point", libprag.} + +proc getOffsetAtPoint*(self: Text; x: int; y: int; coords: CoordType): int = + int(atk_text_get_offset_at_point(cast[ptr Text00](self.impl), int32(x), int32(y), coords)) + +proc offsetAtPoint*(self: Text; x: int; y: int; coords: CoordType): int = + int(atk_text_get_offset_at_point(cast[ptr Text00](self.impl), int32(x), int32(y), coords)) + +proc atk_text_get_run_attributes*(self: ptr Text00; offset: int32; startOffset: var int32; + endOffset: var int32): ptr pointer {. + importc: "atk_text_get_run_attributes", libprag.} + +proc getRunAttributes*(self: Text; offset: int; startOffset: var int; endOffset: var int): ptr pointer = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + result = atk_text_get_run_attributes(cast[ptr Text00](self.impl), int32(offset), startOffset_00, endOffset_00) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc runAttributes*(self: Text; offset: int; startOffset: var int; endOffset: var int): ptr pointer = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + result = atk_text_get_run_attributes(cast[ptr Text00](self.impl), int32(offset), startOffset_00, endOffset_00) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc atk_text_get_selection*(self: ptr Text00; selectionNum: int32; startOffset: var int32; + endOffset: var int32): cstring {. + importc: "atk_text_get_selection", libprag.} + +proc getSelection*(self: Text; selectionNum: int; startOffset: var int; + endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_selection(cast[ptr Text00](self.impl), int32(selectionNum), startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc selection*(self: Text; selectionNum: int; startOffset: var int; + endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_selection(cast[ptr Text00](self.impl), int32(selectionNum), startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc atk_text_get_text*(self: ptr Text00; startOffset: int32; endOffset: int32): cstring {. + importc: "atk_text_get_text", libprag.} + +proc getText*(self: Text; startOffset: int; endOffset: int): string = + let resul0 = atk_text_get_text(cast[ptr Text00](self.impl), int32(startOffset), int32(endOffset)) + result = $resul0 + cogfree(resul0) + +proc text*(self: Text; startOffset: int; endOffset: int): string = + let resul0 = atk_text_get_text(cast[ptr Text00](self.impl), int32(startOffset), int32(endOffset)) + result = $resul0 + cogfree(resul0) + +proc atk_text_remove_selection*(self: ptr Text00; selectionNum: int32): gboolean {. + importc: "atk_text_remove_selection", libprag.} + +proc removeSelection*(self: Text; selectionNum: int): bool = + toBool(atk_text_remove_selection(cast[ptr Text00](self.impl), int32(selectionNum))) + +proc atk_text_set_caret_offset*(self: ptr Text00; offset: int32): gboolean {. + importc: "atk_text_set_caret_offset", libprag.} + +proc setCaretOffset*(self: Text; offset: int): bool = + toBool(atk_text_set_caret_offset(cast[ptr Text00](self.impl), int32(offset))) + +proc `caretOffset=`*(self: Text; offset: int): bool = + toBool(atk_text_set_caret_offset(cast[ptr Text00](self.impl), int32(offset))) + +proc atk_text_set_selection*(self: ptr Text00; selectionNum: int32; startOffset: int32; + endOffset: int32): gboolean {. + importc: "atk_text_set_selection", libprag.} + +proc setSelection*(self: Text; selectionNum: int; startOffset: int; endOffset: int): bool = + toBool(atk_text_set_selection(cast[ptr Text00](self.impl), int32(selectionNum), int32(startOffset), int32(endOffset))) + +type + TextRectangle00* {.pure.} = object + x*: int32 + y*: int32 + width*: int32 + height*: int32 + TextRectangle* = ref object + impl*: ptr TextRectangle00 + +type + TextRange00* {.pure.} = object + bounds*: TextRectangle00 + startOffset*: int32 + endOffset*: int32 + content*: cstring + TextRange* = ref object + impl*: ptr TextRange00 + +proc atk_text_free_ranges*(ranges: ptr TextRange00Array) {. + importc: "atk_text_free_ranges", libprag.} + +proc freeRanges*(ranges: ptr TextRange00Array) {. + importc: "atk_text_free_ranges", libprag.} + +proc atk_text_get_range_extents*(self: ptr Text00; startOffset: int32; endOffset: int32; + coordType: CoordType; rect: var TextRectangle00) {. + importc: "atk_text_get_range_extents", libprag.} + +proc getRangeExtents*(self: ptr Text00; startOffset: int32; endOffset: int32; + coordType: CoordType; rect: var TextRectangle00) {. + importc: "atk_text_get_range_extents", libprag.} + +proc rangeExtents*(self: ptr Text00; startOffset: int32; endOffset: int32; + coordType: CoordType; rect: var TextRectangle00) {. + importc: "atk_text_get_range_extents", libprag.} + +type + TextClipType* {.size: sizeof(cint), pure.} = enum + none = 0 + min = 1 + max = 2 + both = 3 + +proc atk_text_get_bounded_ranges*(self: ptr Text00; rect: ptr TextRectangle00; coordType: CoordType; + xClipType: TextClipType; yClipType: TextClipType): ptr TextRange00Array {. + importc: "atk_text_get_bounded_ranges", libprag.} + +proc getBoundedRanges*(self: Text; rect: TextRectangle; coordType: CoordType; + xClipType: TextClipType; yClipType: TextClipType): ptr TextRange00Array = + atk_text_get_bounded_ranges(cast[ptr Text00](self.impl), cast[ptr TextRectangle00](rect.impl), coordType, xClipType, yClipType) + +proc boundedRanges*(self: Text; rect: TextRectangle; coordType: CoordType; + xClipType: TextClipType; yClipType: TextClipType): ptr TextRange00Array = + atk_text_get_bounded_ranges(cast[ptr Text00](self.impl), cast[ptr TextRectangle00](rect.impl), coordType, xClipType, yClipType) + +type + TextGranularity* {.size: sizeof(cint), pure.} = enum + char = 0 + word = 1 + sentence = 2 + line = 3 + paragraph = 4 + +proc atk_text_get_string_at_offset*(self: ptr Text00; offset: int32; granularity: TextGranularity; + startOffset: var int32; endOffset: var int32): cstring {. + importc: "atk_text_get_string_at_offset", libprag.} + +proc getStringAtOffset*(self: Text; offset: int; granularity: TextGranularity; + startOffset: var int; endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_string_at_offset(cast[ptr Text00](self.impl), int32(offset), granularity, startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc stringAtOffset*(self: Text; offset: int; granularity: TextGranularity; + startOffset: var int; endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_string_at_offset(cast[ptr Text00](self.impl), int32(offset), granularity, startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +type + TextBoundary* {.size: sizeof(cint), pure.} = enum + char = 0 + wordStart = 1 + wordEnd = 2 + sentenceStart = 3 + sentenceEnd = 4 + lineStart = 5 + lineEnd = 6 + +proc atk_text_get_text_after_offset*(self: ptr Text00; offset: int32; boundaryType: TextBoundary; + startOffset: var int32; endOffset: var int32): cstring {. + importc: "atk_text_get_text_after_offset", libprag.} + +proc getTextAfterOffset*(self: Text; offset: int; boundaryType: TextBoundary; + startOffset: var int; endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_text_after_offset(cast[ptr Text00](self.impl), int32(offset), boundaryType, startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc textAfterOffset*(self: Text; offset: int; boundaryType: TextBoundary; + startOffset: var int; endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_text_after_offset(cast[ptr Text00](self.impl), int32(offset), boundaryType, startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc atk_text_get_text_at_offset*(self: ptr Text00; offset: int32; boundaryType: TextBoundary; + startOffset: var int32; endOffset: var int32): cstring {. + importc: "atk_text_get_text_at_offset", libprag.} + +proc getTextAtOffset*(self: Text; offset: int; boundaryType: TextBoundary; + startOffset: var int; endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_text_at_offset(cast[ptr Text00](self.impl), int32(offset), boundaryType, startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc textAtOffset*(self: Text; offset: int; boundaryType: TextBoundary; + startOffset: var int; endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_text_at_offset(cast[ptr Text00](self.impl), int32(offset), boundaryType, startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc atk_text_get_text_before_offset*(self: ptr Text00; offset: int32; boundaryType: TextBoundary; + startOffset: var int32; endOffset: var int32): cstring {. + importc: "atk_text_get_text_before_offset", libprag.} + +proc getTextBeforeOffset*(self: Text; offset: int; boundaryType: TextBoundary; + startOffset: var int; endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_text_before_offset(cast[ptr Text00](self.impl), int32(offset), boundaryType, startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +proc textBeforeOffset*(self: Text; offset: int; boundaryType: TextBoundary; + startOffset: var int; endOffset: var int): string = + var startOffset_00 = int32(startOffset) + var endOffset_00 = int32(endOffset) + let resul0 = atk_text_get_text_before_offset(cast[ptr Text00](self.impl), int32(offset), boundaryType, startOffset_00, endOffset_00) + result = $resul0 + cogfree(resul0) + startOffset = int(startOffset_00) + endOffset = int(endOffset_00) + +type + TextAttribute* {.size: sizeof(cint), pure.} = enum + invalid = 0 + leftMargin = 1 + rightMargin = 2 + indent = 3 + invisible = 4 + editable = 5 + pixelsAboveLines = 6 + pixelsBelowLines = 7 + pixelsInsideWrap = 8 + bgFullHeight = 9 + rise = 10 + underline = 11 + strikethrough = 12 + size = 13 + scale = 14 + weight = 15 + language = 16 + familyName = 17 + bgColor = 18 + fgColor = 19 + bgStipple = 20 + fgStipple = 21 + wrapMode = 22 + direction = 23 + justification = 24 + stretch = 25 + variant = 26 + style = 27 + lastDefined = 28 + +proc atk_text_attribute_for_name*(name: cstring): TextAttribute {. + importc: "atk_text_attribute_for_name", libprag.} + +proc forName*(name: cstring): TextAttribute {. + importc: "atk_text_attribute_for_name", libprag.} + +proc atk_text_attribute_get_name*(attr: TextAttribute): cstring {. + importc: "atk_text_attribute_get_name", libprag.} + +proc getName*(attr: TextAttribute): string = + let resul0 = atk_text_attribute_get_name(attr) + result = $resul0 + +proc name*(attr: TextAttribute): string = + let resul0 = atk_text_attribute_get_name(attr) + result = $resul0 + +proc atk_text_attribute_get_value*(attr: TextAttribute; index: int32): cstring {. + importc: "atk_text_attribute_get_value", libprag.} + +proc getValue*(attr: TextAttribute; index: int): string = + let resul0 = atk_text_attribute_get_value(attr, int32(index)) + result = $resul0 + +proc value*(attr: TextAttribute; index: int): string = + let resul0 = atk_text_attribute_get_value(attr, int32(index)) + result = $resul0 + +proc atk_text_attribute_register*(name: cstring): TextAttribute {. + importc: "atk_text_attribute_register", libprag.} + +proc register*(name: cstring): TextAttribute {. + importc: "atk_text_attribute_register", libprag.} + +type + TextIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + getText*: proc(text: ptr Text00; startOffset: int32; endOffset: int32): cstring {.cdecl.} + getTextAfterOffset*: proc(text: ptr Text00; offset: int32; boundaryType: TextBoundary; + startOffset: var int32; endOffset: var int32): cstring {.cdecl.} + getTextAtOffset*: proc(text: ptr Text00; offset: int32; boundaryType: TextBoundary; + startOffset: var int32; endOffset: var int32): cstring {.cdecl.} + getCharacterAtOffset*: proc(text: ptr Text00; offset: int32): gunichar {.cdecl.} + getTextBeforeOffset*: proc(text: ptr Text00; offset: int32; boundaryType: TextBoundary; + startOffset: var int32; endOffset: var int32): cstring {.cdecl.} + getCaretOffset*: proc(text: ptr Text00): int32 {.cdecl.} + getRunAttributes*: proc(text: ptr Text00; offset: int32; startOffset: var int32; + endOffset: var int32): ptr pointer {.cdecl.} + getDefaultAttributes*: proc(text: ptr Text00): ptr pointer {.cdecl.} + getCharacterExtents*: proc(text: ptr Text00; offset: int32; x: var int32; y: var int32; + width: var int32; height: var int32; coords: CoordType) {.cdecl.} + getCharacterCount*: proc(text: ptr Text00): int32 {.cdecl.} + getOffsetAtPoint*: proc(text: ptr Text00; x: int32; y: int32; coords: CoordType): int32 {.cdecl.} + getNSelections*: proc(text: ptr Text00): int32 {.cdecl.} + getSelection*: proc(text: ptr Text00; selectionNum: int32; startOffset: var int32; + endOffset: var int32): cstring {.cdecl.} + addSelection*: proc(text: ptr Text00; startOffset: int32; endOffset: int32): gboolean {.cdecl.} + removeSelection*: proc(text: ptr Text00; selectionNum: int32): gboolean {.cdecl.} + setSelection*: proc(text: ptr Text00; selectionNum: int32; startOffset: int32; + endOffset: int32): gboolean {.cdecl.} + setCaretOffset*: proc(text: ptr Text00; offset: int32): gboolean {.cdecl.} + textChanged*: proc(text: ptr Text00; position: int32; length: int32) {.cdecl.} + textCaretMoved*: proc(text: ptr Text00; location: int32) {.cdecl.} + textSelectionChanged*: proc(text: ptr Text00) {.cdecl.} + textAttributesChanged*: proc(text: ptr Text00) {.cdecl.} + getRangeExtents*: proc(text: ptr Text00; startOffset: int32; endOffset: int32; + coordType: CoordType; rect: var TextRectangle00) {.cdecl.} + getBoundedRanges*: proc(text: ptr Text00; rect: ptr TextRectangle00; coordType: CoordType; + xClipType: TextClipType; yClipType: TextClipType): ptr TextRange00 {.cdecl.} + getStringAtOffset*: proc(text: ptr Text00; offset: int32; granularity: TextGranularity; + startOffset: var int32; endOffset: var int32): cstring {.cdecl.} + TextIface* = ref object + impl*: ptr TextIface00 + +type + Util* = ref object of gobject.Object + Util00* = object of gobject.Object00 + +type + UtilClass00* {.pure.} = object + parent*: gobject.ObjectClass00 + addGlobalEventListener*: pointer + removeGlobalEventListener*: proc(listenerId: uint32) {.cdecl.} + addKeyEventListener*: pointer + removeKeyEventListener*: proc(listenerId: uint32) {.cdecl.} + getRoot*: pointer + getToolkitName*: proc(): cstring {.cdecl.} + getToolkitVersion*: proc(): cstring {.cdecl.} + UtilClass* = ref object + impl*: ptr UtilClass00 + +const VERSION_MIN_REQUIRED* = 2'i32 + +type + Value00* {.pure.} = object + Value* = ref object + impl*: ptr Value00 + +proc atk_value_get_current_value*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_current_value", libprag.} + +proc getCurrentValue*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_current_value", libprag.} + +proc currentValue*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_current_value", libprag.} + +proc atk_value_get_increment*(self: ptr Value00): cdouble {. + importc: "atk_value_get_increment", libprag.} + +proc getIncrement*(self: Value): cdouble = + atk_value_get_increment(cast[ptr Value00](self.impl)) + +proc increment*(self: Value): cdouble = + atk_value_get_increment(cast[ptr Value00](self.impl)) + +proc atk_value_get_maximum_value*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_maximum_value", libprag.} + +proc getMaximumValue*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_maximum_value", libprag.} + +proc maximumValue*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_maximum_value", libprag.} + +proc atk_value_get_minimum_increment*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_minimum_increment", libprag.} + +proc getMinimumIncrement*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_minimum_increment", libprag.} + +proc minimumIncrement*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_minimum_increment", libprag.} + +proc atk_value_get_minimum_value*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_minimum_value", libprag.} + +proc getMinimumValue*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_minimum_value", libprag.} + +proc minimumValue*(self: ptr Value00; value: var gobject.Value00) {. + importc: "atk_value_get_minimum_value", libprag.} + +proc atk_value_get_range*(self: ptr Value00): ptr Range00 {. + importc: "atk_value_get_range", libprag.} + +proc getRange*(self: Value): Range = + new(result) + result.impl = atk_value_get_range(cast[ptr Value00](self.impl)) + +proc range*(self: Value): Range = + new(result) + result.impl = atk_value_get_range(cast[ptr Value00](self.impl)) + +proc atk_value_get_sub_ranges*(self: ptr Value00): ptr pointer {. + importc: "atk_value_get_sub_ranges", libprag.} + +proc getSubRanges*(self: Value): ptr pointer = + atk_value_get_sub_ranges(cast[ptr Value00](self.impl)) + +proc subRanges*(self: Value): ptr pointer = + atk_value_get_sub_ranges(cast[ptr Value00](self.impl)) + +proc atk_value_get_value_and_text*(self: ptr Value00; value: var cdouble; text: var cstring) {. + importc: "atk_value_get_value_and_text", libprag.} + +proc getValueAndText*(self: Value; value: var cdouble; text: var string) = + var text_00 = cstring(text) + atk_value_get_value_and_text(cast[ptr Value00](self.impl), value, text_00) + text = $(text_00) + +proc valueAndText*(self: Value; value: var cdouble; text: var string) = + var text_00 = cstring(text) + atk_value_get_value_and_text(cast[ptr Value00](self.impl), value, text_00) + text = $(text_00) + +proc atk_value_set_current_value*(self: ptr Value00; value: ptr gobject.Value00): gboolean {. + importc: "atk_value_set_current_value", libprag.} + +proc setCurrentValue*(self: Value; value: gobject.Value): bool = + toBool(atk_value_set_current_value(cast[ptr Value00](self.impl), cast[ptr gobject.Value00](value.impl))) + +proc `currentValue=`*(self: Value; value: gobject.Value): bool = + toBool(atk_value_set_current_value(cast[ptr Value00](self.impl), cast[ptr gobject.Value00](value.impl))) + +proc atk_value_set_value*(self: ptr Value00; newValue: cdouble) {. + importc: "atk_value_set_value", libprag.} + +proc setValue*(self: Value; newValue: cdouble) = + atk_value_set_value(cast[ptr Value00](self.impl), newValue) + +proc `value=`*(self: Value; newValue: cdouble) = + atk_value_set_value(cast[ptr Value00](self.impl), newValue) + +type + ValueIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + getCurrentValue*: proc(obj: ptr Value00; value: var gobject.Value00) {.cdecl.} + getMaximumValue*: proc(obj: ptr Value00; value: var gobject.Value00) {.cdecl.} + getMinimumValue*: proc(obj: ptr Value00; value: var gobject.Value00) {.cdecl.} + setCurrentValue*: proc(obj: ptr Value00; value: ptr gobject.Value00): gboolean {.cdecl.} + getMinimumIncrement*: proc(obj: ptr Value00; value: var gobject.Value00) {.cdecl.} + getValueAndText*: proc(obj: ptr Value00; value: var cdouble; text: var cstring) {.cdecl.} + getRange*: proc(obj: ptr Value00): ptr Range00 {.cdecl.} + getIncrement*: proc(obj: ptr Value00): cdouble {.cdecl.} + getSubRanges*: proc(obj: ptr Value00): ptr pointer {.cdecl.} + setValue*: proc(obj: ptr Value00; newValue: cdouble) {.cdecl.} + ValueIface* = ref object + impl*: ptr ValueIface00 + +type + ValueType* {.size: sizeof(cint), pure.} = enum + veryWeak = 0 + weak = 1 + acceptable = 2 + strong = 3 + veryStrong = 4 + veryLow = 5 + low = 6 + medium = 7 + high = 8 + veryHigh = 9 + veryBad = 10 + bad = 11 + good = 12 + veryGood = 13 + best = 14 + lastDefined = 15 + +proc atk_value_type_get_localized_name*(valueType: ValueType): cstring {. + importc: "atk_value_type_get_localized_name", libprag.} + +proc getLocalizedName*(valueType: ValueType): string = + let resul0 = atk_value_type_get_localized_name(valueType) + result = $resul0 + +proc localizedName*(valueType: ValueType): string = + let resul0 = atk_value_type_get_localized_name(valueType) + result = $resul0 + +proc atk_value_type_get_name*(valueType: ValueType): cstring {. + importc: "atk_value_type_get_name", libprag.} + +proc getName*(valueType: ValueType): string = + let resul0 = atk_value_type_get_name(valueType) + result = $resul0 + +proc name*(valueType: ValueType): string = + let resul0 = atk_value_type_get_name(valueType) + result = $resul0 + +type + Window00* {.pure.} = object + Window* = ref object + impl*: ptr Window00 + +type + WindowIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + WindowIface* = ref object + impl*: ptr WindowIface00 + +proc atk_focus_tracker_notify*(`object`: ptr Object00) {. + importc: "atk_focus_tracker_notify", libprag.} + +proc focusTrackerNotify*(`object`: Object) = + atk_focus_tracker_notify(cast[ptr Object00](`object`.impl)) + +proc atk_get_binary_age*(): uint32 {. + importc: "atk_get_binary_age", libprag.} + +proc getBinaryAge*(): uint32 {. + importc: "atk_get_binary_age", libprag.} + +proc binaryAge*(): uint32 {. + importc: "atk_get_binary_age", libprag.} + +proc atk_get_default_registry*(): ptr Registry00 {. + importc: "atk_get_default_registry", libprag.} + +proc getDefaultRegistry*(): Registry = + let gobj = atk_get_default_registry() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Registry](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultRegistry*(): Registry = + let gobj = atk_get_default_registry() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Registry](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_get_focus_object*(): ptr Object00 {. + importc: "atk_get_focus_object", libprag.} + +proc getFocusObject*(): Object = + let gobj = atk_get_focus_object() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc focusObject*(): Object = + let gobj = atk_get_focus_object() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_get_interface_age*(): uint32 {. + importc: "atk_get_interface_age", libprag.} + +proc getInterfaceAge*(): uint32 {. + importc: "atk_get_interface_age", libprag.} + +proc interfaceAge*(): uint32 {. + importc: "atk_get_interface_age", libprag.} + +proc atk_get_major_version*(): uint32 {. + importc: "atk_get_major_version", libprag.} + +proc getMajorVersion*(): uint32 {. + importc: "atk_get_major_version", libprag.} + +proc majorVersion*(): uint32 {. + importc: "atk_get_major_version", libprag.} + +proc atk_get_micro_version*(): uint32 {. + importc: "atk_get_micro_version", libprag.} + +proc getMicroVersion*(): uint32 {. + importc: "atk_get_micro_version", libprag.} + +proc microVersion*(): uint32 {. + importc: "atk_get_micro_version", libprag.} + +proc atk_get_minor_version*(): uint32 {. + importc: "atk_get_minor_version", libprag.} + +proc getMinorVersion*(): uint32 {. + importc: "atk_get_minor_version", libprag.} + +proc minorVersion*(): uint32 {. + importc: "atk_get_minor_version", libprag.} + +proc atk_get_root*(): ptr Object00 {. + importc: "atk_get_root", libprag.} + +proc getRoot*(): Object = + let gobj = atk_get_root() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc root*(): Object = + let gobj = atk_get_root() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc atk_get_toolkit_name*(): cstring {. + importc: "atk_get_toolkit_name", libprag.} + +proc getToolkitName*(): string = + let resul0 = atk_get_toolkit_name() + result = $resul0 + +proc toolkitName*(): string = + let resul0 = atk_get_toolkit_name() + result = $resul0 + +proc atk_get_toolkit_version*(): cstring {. + importc: "atk_get_toolkit_version", libprag.} + +proc getToolkitVersion*(): string = + let resul0 = atk_get_toolkit_version() + result = $resul0 + +proc toolkitVersion*(): string = + let resul0 = atk_get_toolkit_version() + result = $resul0 + +proc atk_get_version*(): cstring {. + importc: "atk_get_version", libprag.} + +proc getVersion*(): string = + let resul0 = atk_get_version() + result = $resul0 + +proc version*(): string = + let resul0 = atk_get_version() + result = $resul0 + +proc atk_remove_focus_tracker*(trackerId: uint32) {. + importc: "atk_remove_focus_tracker", libprag.} + +proc removeFocusTracker*(trackerId: uint32) {. + importc: "atk_remove_focus_tracker", libprag.} + +proc atk_remove_global_event_listener*(listenerId: uint32) {. + importc: "atk_remove_global_event_listener", libprag.} + +proc removeGlobalEventListener*(listenerId: uint32) {. + importc: "atk_remove_global_event_listener", libprag.} + +proc atk_remove_key_event_listener*(listenerId: uint32) {. + importc: "atk_remove_key_event_listener", libprag.} + +proc removeKeyEventListener*(listenerId: uint32) {. + importc: "atk_remove_key_event_listener", libprag.} +# === remaining symbols: diff --git a/gintro/cairo.nim b/gintro/cairo.nim new file mode 100644 index 0000000..375db82 --- /dev/null +++ b/gintro/cairo.nim @@ -0,0 +1,80 @@ +# dependencies: +# immediate dependencies: +# libraries: +# libcairo-gobject.so.2 +{.deadCodeElim: on.} + +const Lib* = "libcairo-gobject.so.2" +{.pragma: libprag, cdecl, dynlib: Lib.} + +type + Context00* {.pure.} = object + Context* = ref object + impl*: ptr Context00 + +type + Surface00* {.pure.} = object + Surface* = ref object + impl*: ptr Surface00 + +type + Matrix00* {.pure.} = object + Matrix* = ref object + impl*: ptr Matrix00 + +type + Pattern00* {.pure.} = object + Pattern* = ref object + impl*: ptr Pattern00 + +type + Region00* {.pure.} = object + Region* = ref object + impl*: ptr Region00 + +type + Content* {.size: sizeof(cint), pure.} = enum + COLOR = 4096 + ALPHA = 8192 + COLOR_ALPHA = 12288 + +type + FontOptions00* {.pure.} = object + FontOptions* = ref object + impl*: ptr FontOptions00 + +type + FontType00* {.pure.} = object + FontType* = ref object + impl*: ptr FontType00 + +type + FontFace00* {.pure.} = object + FontFace* = ref object + impl*: ptr FontFace00 + +type + ScaledFont00* {.pure.} = object + ScaledFont* = ref object + impl*: ptr ScaledFont00 + +type + Path00* {.pure.} = object + Path* = ref object + impl*: ptr Path00 + +type + RectangleInt00* {.pure.} = object + x*: int32 + y*: int32 + width*: int32 + height*: int32 + RectangleInt* = ref object + impl*: ptr RectangleInt00 + +proc cairo_image_surface_create*() {. + importc: "cairo_image_surface_create", libprag.} + +proc imageSurfaceCreate*() {. + importc: "cairo_image_surface_create", libprag.} +# === remaining symbols: diff --git a/gintro/gdk.nim b/gintro/gdk.nim new file mode 100644 index 0000000..14185d2 --- /dev/null +++ b/gintro/gdk.nim @@ -0,0 +1,12452 @@ +# dependencies: +# cairo-1.0 +# Pango-1.0 +# GObject-2.0 +# Gio-2.0 +# GLib-2.0 +# GdkPixbuf-2.0 +# GModule-2.0 +# immediate dependencies: +# cairo-1.0 +# Pango-1.0 +# Gio-2.0 +# GdkPixbuf-2.0 +# libraries: +# libgdk-3.so.0 +{.deadCodeElim: on.} +import cairo, pango, gobject, gio, glib, gdkpixbuf, gmodule +const Lib* = "libgdk-3.so.0" +{.pragma: libprag, cdecl, dynlib: Lib.} +type + Atom00Array* = pointer +type + KeymapKey00Array* = pointer +type + VisualTypeArray* = pointer +type + RGBA00Array* = pointer +type + Color00Array* = pointer +type + Point00Array* = pointer +let Quark = g_quark_from_static_string("NimGIQuark") + +type + AnchorHints* {.size: sizeof(cint), pure.} = enum + flipX = 1 + flipY = 2 + flip = 3 + slideX = 4 + slideY = 8 + slide = 12 + resizeX = 16 + resizeY = 32 + resize = 48 + +type + AppLaunchContext* = ref object of gio.AppLaunchContext + AppLaunchContext00* = object of gio.AppLaunchContext00 + +proc gdk_app_launch_context_new*(): ptr AppLaunchContext00 {. + importc: "gdk_app_launch_context_new", libprag.} + +proc newAppLaunchContext*(): AppLaunchContext = + new(result, finalizeGObject) + result.impl = gdk_app_launch_context_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAppLaunchContext*[T](result: var T) = + assert(result is AppLaunchContext) + new(result, finalizeGObject) + result.impl = gdk_app_launch_context_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_app_launch_context_set_desktop*(self: ptr AppLaunchContext00; desktop: int32) {. + importc: "gdk_app_launch_context_set_desktop", libprag.} + +proc setDesktop*(self: AppLaunchContext; desktop: int) = + gdk_app_launch_context_set_desktop(cast[ptr AppLaunchContext00](self.impl), int32(desktop)) + +proc `desktop=`*(self: AppLaunchContext; desktop: int) = + gdk_app_launch_context_set_desktop(cast[ptr AppLaunchContext00](self.impl), int32(desktop)) + +proc gdk_app_launch_context_set_icon*(self: ptr AppLaunchContext00; icon: ptr gio.Icon00) {. + importc: "gdk_app_launch_context_set_icon", libprag.} + +proc setIcon*(self: AppLaunchContext; icon: gio.Icon) = + gdk_app_launch_context_set_icon(cast[ptr AppLaunchContext00](self.impl), cast[ptr gio.Icon00](icon.impl)) + +proc `icon=`*(self: AppLaunchContext; icon: gio.Icon) = + gdk_app_launch_context_set_icon(cast[ptr AppLaunchContext00](self.impl), cast[ptr gio.Icon00](icon.impl)) + +proc gdk_app_launch_context_set_icon_name*(self: ptr AppLaunchContext00; iconName: cstring) {. + importc: "gdk_app_launch_context_set_icon_name", libprag.} + +proc setIconName*(self: AppLaunchContext; iconName: string) = + gdk_app_launch_context_set_icon_name(cast[ptr AppLaunchContext00](self.impl), cstring(iconName)) + +proc `iconName=`*(self: AppLaunchContext; iconName: string) = + gdk_app_launch_context_set_icon_name(cast[ptr AppLaunchContext00](self.impl), cstring(iconName)) + +proc gdk_app_launch_context_set_timestamp*(self: ptr AppLaunchContext00; timestamp: uint32) {. + importc: "gdk_app_launch_context_set_timestamp", libprag.} + +proc setTimestamp*(self: AppLaunchContext; timestamp: int) = + gdk_app_launch_context_set_timestamp(cast[ptr AppLaunchContext00](self.impl), uint32(timestamp)) + +proc `timestamp=`*(self: AppLaunchContext; timestamp: int) = + gdk_app_launch_context_set_timestamp(cast[ptr AppLaunchContext00](self.impl), uint32(timestamp)) + +type + Monitor* = ref object of gobject.Object + Monitor00* = object of gobject.Object00 + +proc scInvalidate*(self: Monitor; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "invalidate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_monitor_get_height_mm*(self: ptr Monitor00): int32 {. + importc: "gdk_monitor_get_height_mm", libprag.} + +proc getHeightMm*(self: Monitor): int = + int(gdk_monitor_get_height_mm(cast[ptr Monitor00](self.impl))) + +proc heightMm*(self: Monitor): int = + int(gdk_monitor_get_height_mm(cast[ptr Monitor00](self.impl))) + +proc gdk_monitor_get_manufacturer*(self: ptr Monitor00): cstring {. + importc: "gdk_monitor_get_manufacturer", libprag.} + +proc getManufacturer*(self: Monitor): string = + let resul0 = gdk_monitor_get_manufacturer(cast[ptr Monitor00](self.impl)) + result = $resul0 + +proc manufacturer*(self: Monitor): string = + let resul0 = gdk_monitor_get_manufacturer(cast[ptr Monitor00](self.impl)) + result = $resul0 + +proc gdk_monitor_get_model*(self: ptr Monitor00): cstring {. + importc: "gdk_monitor_get_model", libprag.} + +proc getModel*(self: Monitor): string = + let resul0 = gdk_monitor_get_model(cast[ptr Monitor00](self.impl)) + result = $resul0 + +proc model*(self: Monitor): string = + let resul0 = gdk_monitor_get_model(cast[ptr Monitor00](self.impl)) + result = $resul0 + +proc gdk_monitor_get_refresh_rate*(self: ptr Monitor00): int32 {. + importc: "gdk_monitor_get_refresh_rate", libprag.} + +proc getRefreshRate*(self: Monitor): int = + int(gdk_monitor_get_refresh_rate(cast[ptr Monitor00](self.impl))) + +proc refreshRate*(self: Monitor): int = + int(gdk_monitor_get_refresh_rate(cast[ptr Monitor00](self.impl))) + +proc gdk_monitor_get_scale_factor*(self: ptr Monitor00): int32 {. + importc: "gdk_monitor_get_scale_factor", libprag.} + +proc getScaleFactor*(self: Monitor): int = + int(gdk_monitor_get_scale_factor(cast[ptr Monitor00](self.impl))) + +proc scaleFactor*(self: Monitor): int = + int(gdk_monitor_get_scale_factor(cast[ptr Monitor00](self.impl))) + +proc gdk_monitor_get_width_mm*(self: ptr Monitor00): int32 {. + importc: "gdk_monitor_get_width_mm", libprag.} + +proc getWidthMm*(self: Monitor): int = + int(gdk_monitor_get_width_mm(cast[ptr Monitor00](self.impl))) + +proc widthMm*(self: Monitor): int = + int(gdk_monitor_get_width_mm(cast[ptr Monitor00](self.impl))) + +proc gdk_monitor_is_primary*(self: ptr Monitor00): gboolean {. + importc: "gdk_monitor_is_primary", libprag.} + +proc isPrimary*(self: Monitor): bool = + toBool(gdk_monitor_is_primary(cast[ptr Monitor00](self.impl))) + +type + DeviceTool* = ref object of gobject.Object + DeviceTool00* = object of gobject.Object00 + +proc gdk_device_tool_get_hardware_id*(self: ptr DeviceTool00): uint64 {. + importc: "gdk_device_tool_get_hardware_id", libprag.} + +proc getHardwareId*(self: DeviceTool): uint64 = + gdk_device_tool_get_hardware_id(cast[ptr DeviceTool00](self.impl)) + +proc hardwareId*(self: DeviceTool): uint64 = + gdk_device_tool_get_hardware_id(cast[ptr DeviceTool00](self.impl)) + +proc gdk_device_tool_get_serial*(self: ptr DeviceTool00): uint64 {. + importc: "gdk_device_tool_get_serial", libprag.} + +proc getSerial*(self: DeviceTool): uint64 = + gdk_device_tool_get_serial(cast[ptr DeviceTool00](self.impl)) + +proc serial*(self: DeviceTool): uint64 = + gdk_device_tool_get_serial(cast[ptr DeviceTool00](self.impl)) + +type + Device* = ref object of gobject.Object + Device00* = object of gobject.Object00 + +proc scChanged*(self: Device; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToolChanged*(self: Device; p: proc (self: ptr gobject.Object00; tool: DeviceTool00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "tool-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_device_get_associated_device*(self: ptr Device00): ptr Device00 {. + importc: "gdk_device_get_associated_device", libprag.} + +proc getAssociatedDevice*(self: Device): Device = + let gobj = gdk_device_get_associated_device(cast[ptr Device00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc associatedDevice*(self: Device): Device = + let gobj = gdk_device_get_associated_device(cast[ptr Device00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_device_get_has_cursor*(self: ptr Device00): gboolean {. + importc: "gdk_device_get_has_cursor", libprag.} + +proc getHasCursor*(self: Device): bool = + toBool(gdk_device_get_has_cursor(cast[ptr Device00](self.impl))) + +proc hasCursor*(self: Device): bool = + toBool(gdk_device_get_has_cursor(cast[ptr Device00](self.impl))) + +proc gdk_device_get_n_axes*(self: ptr Device00): int32 {. + importc: "gdk_device_get_n_axes", libprag.} + +proc getNAxes*(self: Device): int = + int(gdk_device_get_n_axes(cast[ptr Device00](self.impl))) + +proc nAxes*(self: Device): int = + int(gdk_device_get_n_axes(cast[ptr Device00](self.impl))) + +proc gdk_device_get_n_keys*(self: ptr Device00): int32 {. + importc: "gdk_device_get_n_keys", libprag.} + +proc getNKeys*(self: Device): int = + int(gdk_device_get_n_keys(cast[ptr Device00](self.impl))) + +proc nKeys*(self: Device): int = + int(gdk_device_get_n_keys(cast[ptr Device00](self.impl))) + +proc gdk_device_get_name*(self: ptr Device00): cstring {. + importc: "gdk_device_get_name", libprag.} + +proc getName*(self: Device): string = + let resul0 = gdk_device_get_name(cast[ptr Device00](self.impl)) + result = $resul0 + +proc name*(self: Device): string = + let resul0 = gdk_device_get_name(cast[ptr Device00](self.impl)) + result = $resul0 + +proc gdk_device_get_product_id*(self: ptr Device00): cstring {. + importc: "gdk_device_get_product_id", libprag.} + +proc getProductId*(self: Device): string = + let resul0 = gdk_device_get_product_id(cast[ptr Device00](self.impl)) + result = $resul0 + +proc productId*(self: Device): string = + let resul0 = gdk_device_get_product_id(cast[ptr Device00](self.impl)) + result = $resul0 + +proc gdk_device_get_vendor_id*(self: ptr Device00): cstring {. + importc: "gdk_device_get_vendor_id", libprag.} + +proc getVendorId*(self: Device): string = + let resul0 = gdk_device_get_vendor_id(cast[ptr Device00](self.impl)) + result = $resul0 + +proc vendorId*(self: Device): string = + let resul0 = gdk_device_get_vendor_id(cast[ptr Device00](self.impl)) + result = $resul0 + +proc gdk_device_list_axes*(self: ptr Device00): ptr pointer {. + importc: "gdk_device_list_axes", libprag.} + +proc listAxes*(self: Device): ptr pointer = + gdk_device_list_axes(cast[ptr Device00](self.impl)) + +proc gdk_device_list_slave_devices*(self: ptr Device00): ptr pointer {. + importc: "gdk_device_list_slave_devices", libprag.} + +proc listSlaveDevices*(self: Device): ptr pointer = + gdk_device_list_slave_devices(cast[ptr Device00](self.impl)) + +proc gdk_device_ungrab*(self: ptr Device00; time: uint32) {. + importc: "gdk_device_ungrab", libprag.} + +proc ungrab*(self: Device; time: int) = + gdk_device_ungrab(cast[ptr Device00](self.impl), uint32(time)) + +type + Seat* = ref object of gobject.Object + Seat00* = object of gobject.Object00 + +proc scDeviceAdded*(self: Seat; p: proc (self: ptr gobject.Object00; device: Device00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "device-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeviceRemoved*(self: Seat; p: proc (self: ptr gobject.Object00; device: Device00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "device-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToolAdded*(self: Seat; p: proc (self: ptr gobject.Object00; tool: DeviceTool00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "tool-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToolRemoved*(self: Seat; p: proc (self: ptr gobject.Object00; tool: DeviceTool00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "tool-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_seat_get_keyboard*(self: ptr Seat00): ptr Device00 {. + importc: "gdk_seat_get_keyboard", libprag.} + +proc getKeyboard*(self: Seat): Device = + let gobj = gdk_seat_get_keyboard(cast[ptr Seat00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc keyboard*(self: Seat): Device = + let gobj = gdk_seat_get_keyboard(cast[ptr Seat00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_seat_get_pointer*(self: ptr Seat00): ptr Device00 {. + importc: "gdk_seat_get_pointer", libprag.} + +proc getPointer*(self: Seat): Device = + let gobj = gdk_seat_get_pointer(cast[ptr Seat00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_seat_ungrab*(self: ptr Seat00) {. + importc: "gdk_seat_ungrab", libprag.} + +proc ungrab*(self: Seat) = + gdk_seat_ungrab(cast[ptr Seat00](self.impl)) + +type + Display* = ref object of gobject.Object + Display00* = object of gobject.Object00 + +proc scClosed*(self: Display; p: proc (self: ptr gobject.Object00; isError: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "closed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMonitorAdded*(self: Display; p: proc (self: ptr gobject.Object00; monitor: Monitor00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "monitor-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMonitorRemoved*(self: Display; p: proc (self: ptr gobject.Object00; monitor: Monitor00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "monitor-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scOpened*(self: Display; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "opened", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSeatAdded*(self: Display; p: proc (self: ptr gobject.Object00; seat: Seat00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "seat-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSeatRemoved*(self: Display; p: proc (self: ptr gobject.Object00; seat: Seat00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "seat-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_display_get_default*(): ptr Display00 {. + importc: "gdk_display_get_default", libprag.} + +proc getDefault*(): Display = + let gobj = gdk_display_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): Display = + let gobj = gdk_display_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_open*(displayName: cstring): ptr Display00 {. + importc: "gdk_display_open", libprag.} + +proc open*(displayName: string): Display = + let gobj = gdk_display_open(cstring(displayName)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_open_default_libgtk_only*(): ptr Display00 {. + importc: "gdk_display_open_default_libgtk_only", libprag.} + +proc openDefaultLibgtkOnly*(): Display = + let gobj = gdk_display_open_default_libgtk_only() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_beep*(self: ptr Display00) {. + importc: "gdk_display_beep", libprag.} + +proc beep*(self: Display) = + gdk_display_beep(cast[ptr Display00](self.impl)) + +proc gdk_display_close*(self: ptr Display00) {. + importc: "gdk_display_close", libprag.} + +proc close*(self: Display) = + gdk_display_close(cast[ptr Display00](self.impl)) + +proc gdk_display_device_is_grabbed*(self: ptr Display00; device: ptr Device00): gboolean {. + importc: "gdk_display_device_is_grabbed", libprag.} + +proc deviceIsGrabbed*(self: Display; device: Device): bool = + toBool(gdk_display_device_is_grabbed(cast[ptr Display00](self.impl), cast[ptr Device00](device.impl))) + +proc gdk_display_flush*(self: ptr Display00) {. + importc: "gdk_display_flush", libprag.} + +proc flush*(self: Display) = + gdk_display_flush(cast[ptr Display00](self.impl)) + +proc gdk_display_get_app_launch_context*(self: ptr Display00): ptr AppLaunchContext00 {. + importc: "gdk_display_get_app_launch_context", libprag.} + +proc getAppLaunchContext*(self: Display): AppLaunchContext = + let gobj = gdk_display_get_app_launch_context(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AppLaunchContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc appLaunchContext*(self: Display): AppLaunchContext = + let gobj = gdk_display_get_app_launch_context(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AppLaunchContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_get_default_cursor_size*(self: ptr Display00): uint32 {. + importc: "gdk_display_get_default_cursor_size", libprag.} + +proc getDefaultCursorSize*(self: Display): int = + int(gdk_display_get_default_cursor_size(cast[ptr Display00](self.impl))) + +proc defaultCursorSize*(self: Display): int = + int(gdk_display_get_default_cursor_size(cast[ptr Display00](self.impl))) + +proc gdk_display_get_default_seat*(self: ptr Display00): ptr Seat00 {. + importc: "gdk_display_get_default_seat", libprag.} + +proc getDefaultSeat*(self: Display): Seat = + let gobj = gdk_display_get_default_seat(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Seat](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultSeat*(self: Display): Seat = + let gobj = gdk_display_get_default_seat(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Seat](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_get_maximal_cursor_size*(self: ptr Display00; width: var uint32; height: var uint32) {. + importc: "gdk_display_get_maximal_cursor_size", libprag.} + +proc getMaximalCursorSize*(self: Display; width: var int; height: var int) = + var height_00 = uint32(height) + var width_00 = uint32(width) + gdk_display_get_maximal_cursor_size(cast[ptr Display00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc maximalCursorSize*(self: Display; width: var int; height: var int) = + var height_00 = uint32(height) + var width_00 = uint32(width) + gdk_display_get_maximal_cursor_size(cast[ptr Display00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc gdk_display_get_monitor*(self: ptr Display00; monitorNum: int32): ptr Monitor00 {. + importc: "gdk_display_get_monitor", libprag.} + +proc getMonitor*(self: Display; monitorNum: int): Monitor = + let gobj = gdk_display_get_monitor(cast[ptr Display00](self.impl), int32(monitorNum)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Monitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc monitor*(self: Display; monitorNum: int): Monitor = + let gobj = gdk_display_get_monitor(cast[ptr Display00](self.impl), int32(monitorNum)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Monitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_get_monitor_at_point*(self: ptr Display00; x: int32; y: int32): ptr Monitor00 {. + importc: "gdk_display_get_monitor_at_point", libprag.} + +proc getMonitorAtPoint*(self: Display; x: int; y: int): Monitor = + let gobj = gdk_display_get_monitor_at_point(cast[ptr Display00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Monitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc monitorAtPoint*(self: Display; x: int; y: int): Monitor = + let gobj = gdk_display_get_monitor_at_point(cast[ptr Display00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Monitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_get_n_monitors*(self: ptr Display00): int32 {. + importc: "gdk_display_get_n_monitors", libprag.} + +proc getNMonitors*(self: Display): int = + int(gdk_display_get_n_monitors(cast[ptr Display00](self.impl))) + +proc nMonitors*(self: Display): int = + int(gdk_display_get_n_monitors(cast[ptr Display00](self.impl))) + +proc gdk_display_get_n_screens*(self: ptr Display00): int32 {. + importc: "gdk_display_get_n_screens", libprag.} + +proc getNScreens*(self: Display): int = + int(gdk_display_get_n_screens(cast[ptr Display00](self.impl))) + +proc nScreens*(self: Display): int = + int(gdk_display_get_n_screens(cast[ptr Display00](self.impl))) + +proc gdk_display_get_name*(self: ptr Display00): cstring {. + importc: "gdk_display_get_name", libprag.} + +proc getName*(self: Display): string = + let resul0 = gdk_display_get_name(cast[ptr Display00](self.impl)) + result = $resul0 + +proc name*(self: Display): string = + let resul0 = gdk_display_get_name(cast[ptr Display00](self.impl)) + result = $resul0 + +proc gdk_display_get_primary_monitor*(self: ptr Display00): ptr Monitor00 {. + importc: "gdk_display_get_primary_monitor", libprag.} + +proc getPrimaryMonitor*(self: Display): Monitor = + let gobj = gdk_display_get_primary_monitor(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Monitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc primaryMonitor*(self: Display): Monitor = + let gobj = gdk_display_get_primary_monitor(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Monitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_has_pending*(self: ptr Display00): gboolean {. + importc: "gdk_display_has_pending", libprag.} + +proc hasPending*(self: Display): bool = + toBool(gdk_display_has_pending(cast[ptr Display00](self.impl))) + +proc gdk_display_is_closed*(self: ptr Display00): gboolean {. + importc: "gdk_display_is_closed", libprag.} + +proc isClosed*(self: Display): bool = + toBool(gdk_display_is_closed(cast[ptr Display00](self.impl))) + +proc gdk_display_keyboard_ungrab*(self: ptr Display00; time: uint32) {. + importc: "gdk_display_keyboard_ungrab", libprag.} + +proc keyboardUngrab*(self: Display; time: int) = + gdk_display_keyboard_ungrab(cast[ptr Display00](self.impl), uint32(time)) + +proc gdk_display_list_devices*(self: ptr Display00): ptr pointer {. + importc: "gdk_display_list_devices", libprag.} + +proc listDevices*(self: Display): ptr pointer = + gdk_display_list_devices(cast[ptr Display00](self.impl)) + +proc gdk_display_list_seats*(self: ptr Display00): ptr pointer {. + importc: "gdk_display_list_seats", libprag.} + +proc listSeats*(self: Display): ptr pointer = + gdk_display_list_seats(cast[ptr Display00](self.impl)) + +proc gdk_display_notify_startup_complete*(self: ptr Display00; startupId: cstring) {. + importc: "gdk_display_notify_startup_complete", libprag.} + +proc notifyStartupComplete*(self: Display; startupId: string) = + gdk_display_notify_startup_complete(cast[ptr Display00](self.impl), cstring(startupId)) + +proc gdk_display_pointer_is_grabbed*(self: ptr Display00): gboolean {. + importc: "gdk_display_pointer_is_grabbed", libprag.} + +proc pointerIsGrabbed*(self: Display): bool = + toBool(gdk_display_pointer_is_grabbed(cast[ptr Display00](self.impl))) + +proc gdk_display_pointer_ungrab*(self: ptr Display00; time: uint32) {. + importc: "gdk_display_pointer_ungrab", libprag.} + +proc pointerUngrab*(self: Display; time: int) = + gdk_display_pointer_ungrab(cast[ptr Display00](self.impl), uint32(time)) + +proc gdk_display_set_double_click_distance*(self: ptr Display00; distance: uint32) {. + importc: "gdk_display_set_double_click_distance", libprag.} + +proc setDoubleClickDistance*(self: Display; distance: int) = + gdk_display_set_double_click_distance(cast[ptr Display00](self.impl), uint32(distance)) + +proc `doubleClickDistance=`*(self: Display; distance: int) = + gdk_display_set_double_click_distance(cast[ptr Display00](self.impl), uint32(distance)) + +proc gdk_display_set_double_click_time*(self: ptr Display00; msec: uint32) {. + importc: "gdk_display_set_double_click_time", libprag.} + +proc setDoubleClickTime*(self: Display; msec: int) = + gdk_display_set_double_click_time(cast[ptr Display00](self.impl), uint32(msec)) + +proc `doubleClickTime=`*(self: Display; msec: int) = + gdk_display_set_double_click_time(cast[ptr Display00](self.impl), uint32(msec)) + +proc gdk_display_supports_clipboard_persistence*(self: ptr Display00): gboolean {. + importc: "gdk_display_supports_clipboard_persistence", libprag.} + +proc supportsClipboardPersistence*(self: Display): bool = + toBool(gdk_display_supports_clipboard_persistence(cast[ptr Display00](self.impl))) + +proc gdk_display_supports_composite*(self: ptr Display00): gboolean {. + importc: "gdk_display_supports_composite", libprag.} + +proc supportsComposite*(self: Display): bool = + toBool(gdk_display_supports_composite(cast[ptr Display00](self.impl))) + +proc gdk_display_supports_cursor_alpha*(self: ptr Display00): gboolean {. + importc: "gdk_display_supports_cursor_alpha", libprag.} + +proc supportsCursorAlpha*(self: Display): bool = + toBool(gdk_display_supports_cursor_alpha(cast[ptr Display00](self.impl))) + +proc gdk_display_supports_cursor_color*(self: ptr Display00): gboolean {. + importc: "gdk_display_supports_cursor_color", libprag.} + +proc supportsCursorColor*(self: Display): bool = + toBool(gdk_display_supports_cursor_color(cast[ptr Display00](self.impl))) + +proc gdk_display_supports_input_shapes*(self: ptr Display00): gboolean {. + importc: "gdk_display_supports_input_shapes", libprag.} + +proc supportsInputShapes*(self: Display): bool = + toBool(gdk_display_supports_input_shapes(cast[ptr Display00](self.impl))) + +proc gdk_display_supports_selection_notification*(self: ptr Display00): gboolean {. + importc: "gdk_display_supports_selection_notification", libprag.} + +proc supportsSelectionNotification*(self: Display): bool = + toBool(gdk_display_supports_selection_notification(cast[ptr Display00](self.impl))) + +proc gdk_display_supports_shapes*(self: ptr Display00): gboolean {. + importc: "gdk_display_supports_shapes", libprag.} + +proc supportsShapes*(self: Display): bool = + toBool(gdk_display_supports_shapes(cast[ptr Display00](self.impl))) + +proc gdk_display_sync*(self: ptr Display00) {. + importc: "gdk_display_sync", libprag.} + +proc sync*(self: Display) = + gdk_display_sync(cast[ptr Display00](self.impl)) + +proc gdk_app_launch_context_set_display*(self: ptr AppLaunchContext00; display: ptr Display00) {. + importc: "gdk_app_launch_context_set_display", libprag.} + +proc setDisplay*(self: AppLaunchContext; display: Display) = + gdk_app_launch_context_set_display(cast[ptr AppLaunchContext00](self.impl), cast[ptr Display00](display.impl)) + +proc `display=`*(self: AppLaunchContext; display: Display) = + gdk_app_launch_context_set_display(cast[ptr AppLaunchContext00](self.impl), cast[ptr Display00](display.impl)) + +proc gdk_monitor_get_display*(self: ptr Monitor00): ptr Display00 {. + importc: "gdk_monitor_get_display", libprag.} + +proc getDisplay*(self: Monitor): Display = + let gobj = gdk_monitor_get_display(cast[ptr Monitor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: Monitor): Display = + let gobj = gdk_monitor_get_display(cast[ptr Monitor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_device_get_display*(self: ptr Device00): ptr Display00 {. + importc: "gdk_device_get_display", libprag.} + +proc getDisplay*(self: Device): Display = + let gobj = gdk_device_get_display(cast[ptr Device00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: Device): Display = + let gobj = gdk_device_get_display(cast[ptr Device00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_device_get_seat*(self: ptr Device00): ptr Seat00 {. + importc: "gdk_device_get_seat", libprag.} + +proc getSeat*(self: Device): Seat = + let gobj = gdk_device_get_seat(cast[ptr Device00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Seat](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc seat*(self: Device): Seat = + let gobj = gdk_device_get_seat(cast[ptr Device00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Seat](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_seat_get_display*(self: ptr Seat00): ptr Display00 {. + importc: "gdk_seat_get_display", libprag.} + +proc getDisplay*(self: Seat): Display = + let gobj = gdk_seat_get_display(cast[ptr Seat00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: Seat): Display = + let gobj = gdk_seat_get_display(cast[ptr Seat00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DeviceToolType* {.size: sizeof(cint), pure.} = enum + unknown = 0 + pen = 1 + eraser = 2 + brush = 3 + pencil = 4 + airbrush = 5 + mouse = 6 + lens = 7 + +proc gdk_device_tool_get_tool_type*(self: ptr DeviceTool00): DeviceToolType {. + importc: "gdk_device_tool_get_tool_type", libprag.} + +proc getToolType*(self: DeviceTool): DeviceToolType = + gdk_device_tool_get_tool_type(cast[ptr DeviceTool00](self.impl)) + +proc toolType*(self: DeviceTool): DeviceToolType = + gdk_device_tool_get_tool_type(cast[ptr DeviceTool00](self.impl)) + +type + AxisFlag* {.size: sizeof(cint), pure.} = enum + x = 2 + y = 3 + pressure = 4 + xtilt = 5 + ytilt = 6 + wheel = 7 + distance = 8 + rotation = 9 + slider = 10 + + AxisFlags* {.size: sizeof(cint).} = set[AxisFlag] + +proc gdk_device_get_axes*(self: ptr Device00): AxisFlags {. + importc: "gdk_device_get_axes", libprag.} + +proc getAxes*(self: Device): AxisFlags = + gdk_device_get_axes(cast[ptr Device00](self.impl)) + +proc axes*(self: Device): AxisFlags = + gdk_device_get_axes(cast[ptr Device00](self.impl)) + +type + DeviceType* {.size: sizeof(cint), pure.} = enum + master = 0 + slave = 1 + floating = 2 + +proc gdk_device_get_device_type*(self: ptr Device00): DeviceType {. + importc: "gdk_device_get_device_type", libprag.} + +proc getDeviceType*(self: Device): DeviceType = + gdk_device_get_device_type(cast[ptr Device00](self.impl)) + +proc deviceType*(self: Device): DeviceType = + gdk_device_get_device_type(cast[ptr Device00](self.impl)) + +type + InputSource* {.size: sizeof(cint), pure.} = enum + mouse = 0 + pen = 1 + eraser = 2 + cursor = 3 + keyboard = 4 + touchscreen = 5 + touchpad = 6 + trackpoint = 7 + tabletPad = 8 + +proc gdk_device_get_source*(self: ptr Device00): InputSource {. + importc: "gdk_device_get_source", libprag.} + +proc getSource*(self: Device): InputSource = + gdk_device_get_source(cast[ptr Device00](self.impl)) + +proc source*(self: Device): InputSource = + gdk_device_get_source(cast[ptr Device00](self.impl)) + +type + AxisUse* {.size: sizeof(cint), pure.} = enum + ignore = 0 + x = 1 + y = 2 + pressure = 3 + xtilt = 4 + ytilt = 5 + wheel = 6 + distance = 7 + rotation = 8 + slider = 9 + last = 10 + +proc gdk_device_get_axis_use*(self: ptr Device00; index: uint32): AxisUse {. + importc: "gdk_device_get_axis_use", libprag.} + +proc getAxisUse*(self: Device; index: int): AxisUse = + gdk_device_get_axis_use(cast[ptr Device00](self.impl), uint32(index)) + +proc axisUse*(self: Device; index: int): AxisUse = + gdk_device_get_axis_use(cast[ptr Device00](self.impl), uint32(index)) + +proc gdk_device_set_axis_use*(self: ptr Device00; index: uint32; use: AxisUse) {. + importc: "gdk_device_set_axis_use", libprag.} + +proc setAxisUse*(self: Device; index: int; use: AxisUse) = + gdk_device_set_axis_use(cast[ptr Device00](self.impl), uint32(index), use) + +type + ModifierType* {.size: sizeof(cint), pure.} = enum + shiftMask = 1 + lockMask = 2 + controlMask = 4 + mod1Mask = 8 + mod2Mask = 16 + mod3Mask = 32 + mod4Mask = 64 + mod5Mask = 128 + button1Mask = 256 + button2Mask = 512 + button3Mask = 1024 + button4Mask = 2048 + button5Mask = 4096 + modifierReserved_13Mask = 8192 + modifierReserved_14Mask = 16384 + modifierReserved_15Mask = 32768 + modifierReserved_16Mask = 65536 + modifierReserved_17Mask = 131072 + modifierReserved_18Mask = 262144 + modifierReserved_19Mask = 524288 + modifierReserved_20Mask = 1048576 + modifierReserved_21Mask = 2097152 + modifierReserved_22Mask = 4194304 + modifierReserved_23Mask = 8388608 + modifierReserved_24Mask = 16777216 + modifierReserved_25Mask = 33554432 + superMask = 67108864 + hyperMask = 134217728 + metaMask = 268435456 + modifierReserved_29Mask = 536870912 + releaseMask = 1073741824 + modifierMask = 1543512063 + +proc gdk_device_get_key*(self: ptr Device00; index: uint32; keyval: var uint32; + modifiers: var ModifierType): gboolean {. + importc: "gdk_device_get_key", libprag.} + +proc getKey*(self: Device; index: int; keyval: var int; modifiers: var ModifierType): bool = + var keyval_00 = uint32(keyval) + result = toBool(gdk_device_get_key(cast[ptr Device00](self.impl), uint32(index), keyval_00, modifiers)) + keyval = int(keyval_00) + +proc key*(self: Device; index: int; keyval: var int; modifiers: var ModifierType): bool = + var keyval_00 = uint32(keyval) + result = toBool(gdk_device_get_key(cast[ptr Device00](self.impl), uint32(index), keyval_00, modifiers)) + keyval = int(keyval_00) + +proc gdk_device_set_key*(self: ptr Device00; index: uint32; keyval: uint32; + modifiers: ModifierType) {. + importc: "gdk_device_set_key", libprag.} + +proc setKey*(self: Device; index: int; keyval: int; modifiers: ModifierType) = + gdk_device_set_key(cast[ptr Device00](self.impl), uint32(index), uint32(keyval), modifiers) + +type + InputMode* {.size: sizeof(cint), pure.} = enum + disabled = 0 + screen = 1 + window = 2 + +proc gdk_device_get_mode*(self: ptr Device00): InputMode {. + importc: "gdk_device_get_mode", libprag.} + +proc getMode*(self: Device): InputMode = + gdk_device_get_mode(cast[ptr Device00](self.impl)) + +proc mode*(self: Device): InputMode = + gdk_device_get_mode(cast[ptr Device00](self.impl)) + +proc gdk_device_set_mode*(self: ptr Device00; mode: InputMode): gboolean {. + importc: "gdk_device_set_mode", libprag.} + +proc setMode*(self: Device; mode: InputMode): bool = + toBool(gdk_device_set_mode(cast[ptr Device00](self.impl), mode)) + +proc `mode=`*(self: Device; mode: InputMode): bool = + toBool(gdk_device_set_mode(cast[ptr Device00](self.impl), mode)) + +type + SeatCapabilities* {.size: sizeof(cint), pure.} = enum + none = 0 + pointer = 1 + touch = 2 + tabletStylus = 4 + allPointing = 7 + keyboard = 8 + all = 15 + +proc gdk_seat_get_capabilities*(self: ptr Seat00): SeatCapabilities {. + importc: "gdk_seat_get_capabilities", libprag.} + +proc getCapabilities*(self: Seat): SeatCapabilities = + gdk_seat_get_capabilities(cast[ptr Seat00](self.impl)) + +proc capabilities*(self: Seat): SeatCapabilities = + gdk_seat_get_capabilities(cast[ptr Seat00](self.impl)) + +proc gdk_seat_get_slaves*(self: ptr Seat00; capabilities: SeatCapabilities): ptr pointer {. + importc: "gdk_seat_get_slaves", libprag.} + +proc getSlaves*(self: Seat; capabilities: SeatCapabilities): ptr pointer = + gdk_seat_get_slaves(cast[ptr Seat00](self.impl), capabilities) + +proc slaves*(self: Seat; capabilities: SeatCapabilities): ptr pointer = + gdk_seat_get_slaves(cast[ptr Seat00](self.impl), capabilities) + +type + DeviceManager* = ref object of gobject.Object + DeviceManager00* = object of gobject.Object00 + +proc scDeviceAdded*(self: DeviceManager; p: proc (self: ptr gobject.Object00; device: Device00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "device-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeviceChanged*(self: DeviceManager; p: proc (self: ptr gobject.Object00; device: Device00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "device-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeviceRemoved*(self: DeviceManager; p: proc (self: ptr gobject.Object00; device: Device00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "device-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_device_manager_get_client_pointer*(self: ptr DeviceManager00): ptr Device00 {. + importc: "gdk_device_manager_get_client_pointer", libprag.} + +proc getClientPointer*(self: DeviceManager): Device = + let gobj = gdk_device_manager_get_client_pointer(cast[ptr DeviceManager00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc clientPointer*(self: DeviceManager): Device = + let gobj = gdk_device_manager_get_client_pointer(cast[ptr DeviceManager00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_device_manager_get_display*(self: ptr DeviceManager00): ptr Display00 {. + importc: "gdk_device_manager_get_display", libprag.} + +proc getDisplay*(self: DeviceManager): Display = + let gobj = gdk_device_manager_get_display(cast[ptr DeviceManager00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: DeviceManager): Display = + let gobj = gdk_device_manager_get_display(cast[ptr DeviceManager00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_device_manager_list_devices*(self: ptr DeviceManager00; `type`: DeviceType): ptr pointer {. + importc: "gdk_device_manager_list_devices", libprag.} + +proc listDevices*(self: DeviceManager; `type`: DeviceType): ptr pointer = + gdk_device_manager_list_devices(cast[ptr DeviceManager00](self.impl), `type`) + +proc gdk_display_get_device_manager*(self: ptr Display00): ptr DeviceManager00 {. + importc: "gdk_display_get_device_manager", libprag.} + +proc getDeviceManager*(self: Display): DeviceManager = + let gobj = gdk_display_get_device_manager(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DeviceManager](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc deviceManager*(self: Display): DeviceManager = + let gobj = gdk_display_get_device_manager(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DeviceManager](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + Atom00* {.pure.} = object + Atom* = ref object + impl*: ptr Atom00 + +proc gdk_atom_name*(self: ptr Atom00): cstring {. + importc: "gdk_atom_name", libprag.} + +proc name*(self: Atom): string = + let resul0 = gdk_atom_name(cast[ptr Atom00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gdk_atom_intern*(atomName: cstring; onlyIfExists: gboolean): ptr Atom00 {. + importc: "gdk_atom_intern", libprag.} + +proc intern*(atomName: string; onlyIfExists: bool): Atom = + new(result) + result.impl = gdk_atom_intern(cstring(atomName), gboolean(onlyIfExists)) + +proc gdk_atom_intern_static_string*(atomName: cstring): ptr Atom00 {. + importc: "gdk_atom_intern_static_string", libprag.} + +proc internStaticString*(atomName: string): Atom = + new(result) + result.impl = gdk_atom_intern_static_string(cstring(atomName)) + +proc gdk_display_request_selection_notification*(self: ptr Display00; selection: ptr Atom00): gboolean {. + importc: "gdk_display_request_selection_notification", libprag.} + +proc requestSelectionNotification*(self: Display; selection: Atom): bool = + toBool(gdk_display_request_selection_notification(cast[ptr Display00](self.impl), cast[ptr Atom00](selection.impl))) + +type + Window* = ref object of gobject.Object + Window00* = object of gobject.Object00 + +proc scCreateSurface*(self: Window; p: proc (self: ptr gobject.Object00; width: int32; height: int32; xdata: pointer): cairo.Surface00 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "create-surface", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scFromEmbedder*(self: Window; p: proc (self: ptr gobject.Object00; embedderX: cdouble; embedderY: cdouble; offscreenX: var cdouble; + offscreenY: var cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "from-embedder", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMovedToRect*(self: Window; p: proc (self: ptr gobject.Object00; flippedRect: pointer; finalRect: pointer; flippedX: gboolean; + flippedY: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "moved-to-rect", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPickEmbeddedChild*(self: Window; p: proc (self: ptr gobject.Object00; x: cdouble; y: cdouble; xdata: pointer): Window00 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "pick-embedded-child", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToEmbedder*(self: Window; p: proc (self: ptr gobject.Object00; offscreenX: cdouble; offscreenY: cdouble; embedderX: var cdouble; + embedderY: var cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "to-embedder", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_window_at_pointer*(winX: var int32; winY: var int32): ptr Window00 {. + importc: "gdk_window_at_pointer", libprag.} + +proc atPointer*(winX: var int; winY: var int): Window = + var winX_00 = int32(winX) + var winY_00 = int32(winY) + let gobj = gdk_window_at_pointer(winX_00, winY_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + winX = int(winX_00) + winY = int(winY_00) + +proc gdk_window_process_all_updates*() {. + importc: "gdk_window_process_all_updates", libprag.} + +proc processAllUpdates*() {. + importc: "gdk_window_process_all_updates", libprag.} + +proc gdk_window_set_debug_updates*(setting: gboolean) {. + importc: "gdk_window_set_debug_updates", libprag.} + +proc setDebugUpdates*(setting: gboolean) {. + importc: "gdk_window_set_debug_updates", libprag.} + +proc `debugUpdates=`*(setting: gboolean) {. + importc: "gdk_window_set_debug_updates", libprag.} + +proc gdk_window_beep*(self: ptr Window00) {. + importc: "gdk_window_beep", libprag.} + +proc beep*(self: Window) = + gdk_window_beep(cast[ptr Window00](self.impl)) + +proc gdk_window_begin_move_drag*(self: ptr Window00; button: int32; rootX: int32; rootY: int32; + timestamp: uint32) {. + importc: "gdk_window_begin_move_drag", libprag.} + +proc beginMoveDrag*(self: Window; button: int; rootX: int; rootY: int; + timestamp: int) = + gdk_window_begin_move_drag(cast[ptr Window00](self.impl), int32(button), int32(rootX), int32(rootY), uint32(timestamp)) + +proc gdk_window_begin_move_drag_for_device*(self: ptr Window00; device: ptr Device00; button: int32; + rootX: int32; rootY: int32; timestamp: uint32) {. + importc: "gdk_window_begin_move_drag_for_device", libprag.} + +proc beginMoveDragForDevice*(self: Window; device: Device; button: int; rootX: int; + rootY: int; timestamp: int) = + gdk_window_begin_move_drag_for_device(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl), int32(button), int32(rootX), int32(rootY), uint32(timestamp)) + +proc gdk_window_begin_paint_region*(self: ptr Window00; region: ptr cairo.Region00) {. + importc: "gdk_window_begin_paint_region", libprag.} + +proc beginPaintRegion*(self: Window; region: cairo.Region) = + gdk_window_begin_paint_region(cast[ptr Window00](self.impl), cast[ptr cairo.Region00](region.impl)) + +proc gdk_window_configure_finished*(self: ptr Window00) {. + importc: "gdk_window_configure_finished", libprag.} + +proc configureFinished*(self: Window) = + gdk_window_configure_finished(cast[ptr Window00](self.impl)) + +proc gdk_window_coords_from_parent*(self: ptr Window00; parentX: cdouble; parentY: cdouble; + x: var cdouble; y: var cdouble) {. + importc: "gdk_window_coords_from_parent", libprag.} + +proc coordsFromParent*(self: Window; parentX: cdouble; parentY: cdouble; + x: var cdouble; y: var cdouble) = + gdk_window_coords_from_parent(cast[ptr Window00](self.impl), parentX, parentY, x, y) + +proc gdk_window_coords_to_parent*(self: ptr Window00; x: cdouble; y: cdouble; parentX: var cdouble; + parentY: var cdouble) {. + importc: "gdk_window_coords_to_parent", libprag.} + +proc coordsToParent*(self: Window; x: cdouble; y: cdouble; parentX: var cdouble; + parentY: var cdouble) = + gdk_window_coords_to_parent(cast[ptr Window00](self.impl), x, y, parentX, parentY) + +proc gdk_window_create_similar_image_surface*(self: ptr Window00; format: int32; width: int32; height: int32; + scale: int32): ptr cairo.Surface00 {. + importc: "gdk_window_create_similar_image_surface", libprag.} + +proc createSimilarImageSurface*(self: Window; format: int; width: int; height: int; + scale: int): cairo.Surface = + new(result) + result.impl = gdk_window_create_similar_image_surface(cast[ptr Window00](self.impl), int32(format), int32(width), int32(height), int32(scale)) + +proc gdk_window_create_similar_surface*(self: ptr Window00; content: cairo.Content; width: int32; + height: int32): ptr cairo.Surface00 {. + importc: "gdk_window_create_similar_surface", libprag.} + +proc createSimilarSurface*(self: Window; content: cairo.Content; width: int; + height: int): cairo.Surface = + new(result) + result.impl = gdk_window_create_similar_surface(cast[ptr Window00](self.impl), content, int32(width), int32(height)) + +proc gdk_window_deiconify*(self: ptr Window00) {. + importc: "gdk_window_deiconify", libprag.} + +proc deiconify*(self: Window) = + gdk_window_deiconify(cast[ptr Window00](self.impl)) + +proc gdk_window_destroy*(self: ptr Window00) {. + importc: "gdk_window_destroy", libprag.} + +proc destroy*(self: Window) = + gdk_window_destroy(cast[ptr Window00](self.impl)) + +proc gdk_window_destroy_notify*(self: ptr Window00) {. + importc: "gdk_window_destroy_notify", libprag.} + +proc destroyNotify*(self: Window) = + gdk_window_destroy_notify(cast[ptr Window00](self.impl)) + +proc gdk_window_enable_synchronized_configure*(self: ptr Window00) {. + importc: "gdk_window_enable_synchronized_configure", libprag.} + +proc enableSynchronizedConfigure*(self: Window) = + gdk_window_enable_synchronized_configure(cast[ptr Window00](self.impl)) + +proc gdk_window_end_paint*(self: ptr Window00) {. + importc: "gdk_window_end_paint", libprag.} + +proc endPaint*(self: Window) = + gdk_window_end_paint(cast[ptr Window00](self.impl)) + +proc gdk_window_ensure_native*(self: ptr Window00): gboolean {. + importc: "gdk_window_ensure_native", libprag.} + +proc ensureNative*(self: Window): bool = + toBool(gdk_window_ensure_native(cast[ptr Window00](self.impl))) + +proc gdk_window_flush*(self: ptr Window00) {. + importc: "gdk_window_flush", libprag.} + +proc flush*(self: Window) = + gdk_window_flush(cast[ptr Window00](self.impl)) + +proc gdk_window_focus*(self: ptr Window00; timestamp: uint32) {. + importc: "gdk_window_focus", libprag.} + +proc focus*(self: Window; timestamp: int) = + gdk_window_focus(cast[ptr Window00](self.impl), uint32(timestamp)) + +proc gdk_window_freeze_toplevel_updates_libgtk_only*(self: ptr Window00) {. + importc: "gdk_window_freeze_toplevel_updates_libgtk_only", libprag.} + +proc freezeToplevelUpdatesLibgtkOnly*(self: Window) = + gdk_window_freeze_toplevel_updates_libgtk_only(cast[ptr Window00](self.impl)) + +proc gdk_window_freeze_updates*(self: ptr Window00) {. + importc: "gdk_window_freeze_updates", libprag.} + +proc freezeUpdates*(self: Window) = + gdk_window_freeze_updates(cast[ptr Window00](self.impl)) + +proc gdk_window_fullscreen*(self: ptr Window00) {. + importc: "gdk_window_fullscreen", libprag.} + +proc fullscreen*(self: Window) = + gdk_window_fullscreen(cast[ptr Window00](self.impl)) + +proc gdk_window_fullscreen_on_monitor*(self: ptr Window00; monitor: int32) {. + importc: "gdk_window_fullscreen_on_monitor", libprag.} + +proc fullscreenOnMonitor*(self: Window; monitor: int) = + gdk_window_fullscreen_on_monitor(cast[ptr Window00](self.impl), int32(monitor)) + +proc gdk_window_geometry_changed*(self: ptr Window00) {. + importc: "gdk_window_geometry_changed", libprag.} + +proc geometryChanged*(self: Window) = + gdk_window_geometry_changed(cast[ptr Window00](self.impl)) + +proc gdk_window_get_accept_focus*(self: ptr Window00): gboolean {. + importc: "gdk_window_get_accept_focus", libprag.} + +proc getAcceptFocus*(self: Window): bool = + toBool(gdk_window_get_accept_focus(cast[ptr Window00](self.impl))) + +proc acceptFocus*(self: Window): bool = + toBool(gdk_window_get_accept_focus(cast[ptr Window00](self.impl))) + +proc gdk_window_get_background_pattern*(self: ptr Window00): ptr cairo.Pattern00 {. + importc: "gdk_window_get_background_pattern", libprag.} + +proc getBackgroundPattern*(self: Window): cairo.Pattern = + new(result) + result.impl = gdk_window_get_background_pattern(cast[ptr Window00](self.impl)) + +proc backgroundPattern*(self: Window): cairo.Pattern = + new(result) + result.impl = gdk_window_get_background_pattern(cast[ptr Window00](self.impl)) + +proc gdk_window_get_children*(self: ptr Window00): ptr pointer {. + importc: "gdk_window_get_children", libprag.} + +proc getChildren*(self: Window): ptr pointer = + gdk_window_get_children(cast[ptr Window00](self.impl)) + +proc children*(self: Window): ptr pointer = + gdk_window_get_children(cast[ptr Window00](self.impl)) + +proc gdk_window_get_children_with_user_data*(self: ptr Window00; userData: pointer): ptr pointer {. + importc: "gdk_window_get_children_with_user_data", libprag.} + +proc getChildrenWithUserData*(self: Window; userData: pointer): ptr pointer = + gdk_window_get_children_with_user_data(cast[ptr Window00](self.impl), userData) + +proc childrenWithUserData*(self: Window; userData: pointer): ptr pointer = + gdk_window_get_children_with_user_data(cast[ptr Window00](self.impl), userData) + +proc gdk_window_get_clip_region*(self: ptr Window00): ptr cairo.Region00 {. + importc: "gdk_window_get_clip_region", libprag.} + +proc getClipRegion*(self: Window): cairo.Region = + new(result) + result.impl = gdk_window_get_clip_region(cast[ptr Window00](self.impl)) + +proc clipRegion*(self: Window): cairo.Region = + new(result) + result.impl = gdk_window_get_clip_region(cast[ptr Window00](self.impl)) + +proc gdk_window_get_composited*(self: ptr Window00): gboolean {. + importc: "gdk_window_get_composited", libprag.} + +proc getComposited*(self: Window): bool = + toBool(gdk_window_get_composited(cast[ptr Window00](self.impl))) + +proc composited*(self: Window): bool = + toBool(gdk_window_get_composited(cast[ptr Window00](self.impl))) + +proc gdk_window_get_device_position*(self: ptr Window00; device: ptr Device00; x: var int32; + y: var int32; mask: var ModifierType): ptr Window00 {. + importc: "gdk_window_get_device_position", libprag.} + +proc getDevicePosition*(self: Window; device: Device; x: var int; y: var int; + mask: var ModifierType): Window = + var y_00 = int32(y) + var x_00 = int32(x) + let gobj = gdk_window_get_device_position(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl), x_00, y_00, mask) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + y = int(y_00) + x = int(x_00) + +proc devicePosition*(self: Window; device: Device; x: var int; y: var int; + mask: var ModifierType): Window = + var y_00 = int32(y) + var x_00 = int32(x) + let gobj = gdk_window_get_device_position(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl), x_00, y_00, mask) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + y = int(y_00) + x = int(x_00) + +proc gdk_window_get_device_position_double*(self: ptr Window00; device: ptr Device00; x: var cdouble; + y: var cdouble; mask: var ModifierType): ptr Window00 {. + importc: "gdk_window_get_device_position_double", libprag.} + +proc getDevicePositionDouble*(self: Window; device: Device; x: var cdouble; y: var cdouble; + mask: var ModifierType): Window = + let gobj = gdk_window_get_device_position_double(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl), x, y, mask) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc devicePositionDouble*(self: Window; device: Device; x: var cdouble; y: var cdouble; + mask: var ModifierType): Window = + let gobj = gdk_window_get_device_position_double(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl), x, y, mask) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_get_display*(self: ptr Window00): ptr Display00 {. + importc: "gdk_window_get_display", libprag.} + +proc getDisplay*(self: Window): Display = + let gobj = gdk_window_get_display(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: Window): Display = + let gobj = gdk_window_get_display(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_get_effective_parent*(self: ptr Window00): ptr Window00 {. + importc: "gdk_window_get_effective_parent", libprag.} + +proc getEffectiveParent*(self: Window): Window = + let gobj = gdk_window_get_effective_parent(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc effectiveParent*(self: Window): Window = + let gobj = gdk_window_get_effective_parent(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_get_effective_toplevel*(self: ptr Window00): ptr Window00 {. + importc: "gdk_window_get_effective_toplevel", libprag.} + +proc getEffectiveToplevel*(self: Window): Window = + let gobj = gdk_window_get_effective_toplevel(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc effectiveToplevel*(self: Window): Window = + let gobj = gdk_window_get_effective_toplevel(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_get_event_compression*(self: ptr Window00): gboolean {. + importc: "gdk_window_get_event_compression", libprag.} + +proc getEventCompression*(self: Window): bool = + toBool(gdk_window_get_event_compression(cast[ptr Window00](self.impl))) + +proc eventCompression*(self: Window): bool = + toBool(gdk_window_get_event_compression(cast[ptr Window00](self.impl))) + +proc gdk_window_get_focus_on_map*(self: ptr Window00): gboolean {. + importc: "gdk_window_get_focus_on_map", libprag.} + +proc getFocusOnMap*(self: Window): bool = + toBool(gdk_window_get_focus_on_map(cast[ptr Window00](self.impl))) + +proc focusOnMap*(self: Window): bool = + toBool(gdk_window_get_focus_on_map(cast[ptr Window00](self.impl))) + +proc gdk_window_get_geometry*(self: ptr Window00; x: var int32; y: var int32; width: var int32; + height: var int32) {. + importc: "gdk_window_get_geometry", libprag.} + +proc getGeometry*(self: Window; x: var int; y: var int; width: var int; + height: var int) = + var height_00 = int32(height) + var y_00 = int32(y) + var width_00 = int32(width) + var x_00 = int32(x) + gdk_window_get_geometry(cast[ptr Window00](self.impl), x_00, y_00, width_00, height_00) + height = int(height_00) + y = int(y_00) + width = int(width_00) + x = int(x_00) + +proc geometry*(self: Window; x: var int; y: var int; width: var int; + height: var int) = + var height_00 = int32(height) + var y_00 = int32(y) + var width_00 = int32(width) + var x_00 = int32(x) + gdk_window_get_geometry(cast[ptr Window00](self.impl), x_00, y_00, width_00, height_00) + height = int(height_00) + y = int(y_00) + width = int(width_00) + x = int(x_00) + +proc gdk_window_get_group*(self: ptr Window00): ptr Window00 {. + importc: "gdk_window_get_group", libprag.} + +proc getGroup*(self: Window): Window = + let gobj = gdk_window_get_group(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc group*(self: Window): Window = + let gobj = gdk_window_get_group(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_get_height*(self: ptr Window00): int32 {. + importc: "gdk_window_get_height", libprag.} + +proc getHeight*(self: Window): int = + int(gdk_window_get_height(cast[ptr Window00](self.impl))) + +proc height*(self: Window): int = + int(gdk_window_get_height(cast[ptr Window00](self.impl))) + +proc gdk_window_get_modal_hint*(self: ptr Window00): gboolean {. + importc: "gdk_window_get_modal_hint", libprag.} + +proc getModalHint*(self: Window): bool = + toBool(gdk_window_get_modal_hint(cast[ptr Window00](self.impl))) + +proc modalHint*(self: Window): bool = + toBool(gdk_window_get_modal_hint(cast[ptr Window00](self.impl))) + +proc gdk_window_get_origin*(self: ptr Window00; x: var int32; y: var int32): int32 {. + importc: "gdk_window_get_origin", libprag.} + +proc getOrigin*(self: Window; x: var int; y: var int): int = + var y_00 = int32(y) + var x_00 = int32(x) + result = int(gdk_window_get_origin(cast[ptr Window00](self.impl), x_00, y_00)) + y = int(y_00) + x = int(x_00) + +proc origin*(self: Window; x: var int; y: var int): int = + var y_00 = int32(y) + var x_00 = int32(x) + result = int(gdk_window_get_origin(cast[ptr Window00](self.impl), x_00, y_00)) + y = int(y_00) + x = int(x_00) + +proc gdk_window_get_parent*(self: ptr Window00): ptr Window00 {. + importc: "gdk_window_get_parent", libprag.} + +proc getParent*(self: Window): Window = + let gobj = gdk_window_get_parent(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc parent*(self: Window): Window = + let gobj = gdk_window_get_parent(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_get_pass_through*(self: ptr Window00): gboolean {. + importc: "gdk_window_get_pass_through", libprag.} + +proc getPassThrough*(self: Window): bool = + toBool(gdk_window_get_pass_through(cast[ptr Window00](self.impl))) + +proc passThrough*(self: Window): bool = + toBool(gdk_window_get_pass_through(cast[ptr Window00](self.impl))) + +proc gdk_window_get_pointer*(self: ptr Window00; x: var int32; y: var int32; mask: var ModifierType): ptr Window00 {. + importc: "gdk_window_get_pointer", libprag.} + +proc getPointer*(self: Window; x: var int; y: var int; mask: var ModifierType): Window = + var y_00 = int32(y) + var x_00 = int32(x) + let gobj = gdk_window_get_pointer(cast[ptr Window00](self.impl), x_00, y_00, mask) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + y = int(y_00) + x = int(x_00) + +proc gdk_window_get_position*(self: ptr Window00; x: var int32; y: var int32) {. + importc: "gdk_window_get_position", libprag.} + +proc getPosition*(self: Window; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gdk_window_get_position(cast[ptr Window00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc position*(self: Window; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gdk_window_get_position(cast[ptr Window00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc gdk_window_get_root_coords*(self: ptr Window00; x: int32; y: int32; rootX: var int32; + rootY: var int32) {. + importc: "gdk_window_get_root_coords", libprag.} + +proc getRootCoords*(self: Window; x: int; y: int; rootX: var int; rootY: var int) = + var rootY_00 = int32(rootY) + var rootX_00 = int32(rootX) + gdk_window_get_root_coords(cast[ptr Window00](self.impl), int32(x), int32(y), rootX_00, rootY_00) + rootY = int(rootY_00) + rootX = int(rootX_00) + +proc rootCoords*(self: Window; x: int; y: int; rootX: var int; rootY: var int) = + var rootY_00 = int32(rootY) + var rootX_00 = int32(rootX) + gdk_window_get_root_coords(cast[ptr Window00](self.impl), int32(x), int32(y), rootX_00, rootY_00) + rootY = int(rootY_00) + rootX = int(rootX_00) + +proc gdk_window_get_root_origin*(self: ptr Window00; x: var int32; y: var int32) {. + importc: "gdk_window_get_root_origin", libprag.} + +proc getRootOrigin*(self: Window; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gdk_window_get_root_origin(cast[ptr Window00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc rootOrigin*(self: Window; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gdk_window_get_root_origin(cast[ptr Window00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc gdk_window_get_scale_factor*(self: ptr Window00): int32 {. + importc: "gdk_window_get_scale_factor", libprag.} + +proc getScaleFactor*(self: Window): int = + int(gdk_window_get_scale_factor(cast[ptr Window00](self.impl))) + +proc scaleFactor*(self: Window): int = + int(gdk_window_get_scale_factor(cast[ptr Window00](self.impl))) + +proc gdk_window_get_support_multidevice*(self: ptr Window00): gboolean {. + importc: "gdk_window_get_support_multidevice", libprag.} + +proc getSupportMultidevice*(self: Window): bool = + toBool(gdk_window_get_support_multidevice(cast[ptr Window00](self.impl))) + +proc supportMultidevice*(self: Window): bool = + toBool(gdk_window_get_support_multidevice(cast[ptr Window00](self.impl))) + +proc gdk_window_get_toplevel*(self: ptr Window00): ptr Window00 {. + importc: "gdk_window_get_toplevel", libprag.} + +proc getToplevel*(self: Window): Window = + let gobj = gdk_window_get_toplevel(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc toplevel*(self: Window): Window = + let gobj = gdk_window_get_toplevel(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_get_update_area*(self: ptr Window00): ptr cairo.Region00 {. + importc: "gdk_window_get_update_area", libprag.} + +proc getUpdateArea*(self: Window): cairo.Region = + new(result) + result.impl = gdk_window_get_update_area(cast[ptr Window00](self.impl)) + +proc updateArea*(self: Window): cairo.Region = + new(result) + result.impl = gdk_window_get_update_area(cast[ptr Window00](self.impl)) + +proc gdk_window_get_user_data*(self: ptr Window00; data: var pointer) {. + importc: "gdk_window_get_user_data", libprag.} + +proc getUserData*(self: Window; data: var pointer) = + gdk_window_get_user_data(cast[ptr Window00](self.impl), data) + +proc userData*(self: Window; data: var pointer) = + gdk_window_get_user_data(cast[ptr Window00](self.impl), data) + +proc gdk_window_get_visible_region*(self: ptr Window00): ptr cairo.Region00 {. + importc: "gdk_window_get_visible_region", libprag.} + +proc getVisibleRegion*(self: Window): cairo.Region = + new(result) + result.impl = gdk_window_get_visible_region(cast[ptr Window00](self.impl)) + +proc visibleRegion*(self: Window): cairo.Region = + new(result) + result.impl = gdk_window_get_visible_region(cast[ptr Window00](self.impl)) + +proc gdk_window_get_width*(self: ptr Window00): int32 {. + importc: "gdk_window_get_width", libprag.} + +proc getWidth*(self: Window): int = + int(gdk_window_get_width(cast[ptr Window00](self.impl))) + +proc width*(self: Window): int = + int(gdk_window_get_width(cast[ptr Window00](self.impl))) + +proc gdk_window_has_native*(self: ptr Window00): gboolean {. + importc: "gdk_window_has_native", libprag.} + +proc hasNative*(self: Window): bool = + toBool(gdk_window_has_native(cast[ptr Window00](self.impl))) + +proc gdk_window_hide*(self: ptr Window00) {. + importc: "gdk_window_hide", libprag.} + +proc hide*(self: Window) = + gdk_window_hide(cast[ptr Window00](self.impl)) + +proc gdk_window_iconify*(self: ptr Window00) {. + importc: "gdk_window_iconify", libprag.} + +proc iconify*(self: Window) = + gdk_window_iconify(cast[ptr Window00](self.impl)) + +proc gdk_window_input_shape_combine_region*(self: ptr Window00; shapeRegion: ptr cairo.Region00; + offsetX: int32; offsetY: int32) {. + importc: "gdk_window_input_shape_combine_region", libprag.} + +proc inputShapeCombineRegion*(self: Window; shapeRegion: cairo.Region; offsetX: int; + offsetY: int) = + gdk_window_input_shape_combine_region(cast[ptr Window00](self.impl), cast[ptr cairo.Region00](shapeRegion.impl), int32(offsetX), int32(offsetY)) + +proc gdk_window_invalidate_region*(self: ptr Window00; region: ptr cairo.Region00; invalidateChildren: gboolean) {. + importc: "gdk_window_invalidate_region", libprag.} + +proc invalidateRegion*(self: Window; region: cairo.Region; invalidateChildren: bool) = + gdk_window_invalidate_region(cast[ptr Window00](self.impl), cast[ptr cairo.Region00](region.impl), gboolean(invalidateChildren)) + +proc gdk_window_is_destroyed*(self: ptr Window00): gboolean {. + importc: "gdk_window_is_destroyed", libprag.} + +proc isDestroyed*(self: Window): bool = + toBool(gdk_window_is_destroyed(cast[ptr Window00](self.impl))) + +proc gdk_window_is_input_only*(self: ptr Window00): gboolean {. + importc: "gdk_window_is_input_only", libprag.} + +proc isInputOnly*(self: Window): bool = + toBool(gdk_window_is_input_only(cast[ptr Window00](self.impl))) + +proc gdk_window_is_shaped*(self: ptr Window00): gboolean {. + importc: "gdk_window_is_shaped", libprag.} + +proc isShaped*(self: Window): bool = + toBool(gdk_window_is_shaped(cast[ptr Window00](self.impl))) + +proc gdk_window_is_viewable*(self: ptr Window00): gboolean {. + importc: "gdk_window_is_viewable", libprag.} + +proc isViewable*(self: Window): bool = + toBool(gdk_window_is_viewable(cast[ptr Window00](self.impl))) + +proc gdk_window_is_visible*(self: ptr Window00): gboolean {. + importc: "gdk_window_is_visible", libprag.} + +proc isVisible*(self: Window): bool = + toBool(gdk_window_is_visible(cast[ptr Window00](self.impl))) + +proc gdk_window_lower*(self: ptr Window00) {. + importc: "gdk_window_lower", libprag.} + +proc lower*(self: Window) = + gdk_window_lower(cast[ptr Window00](self.impl)) + +proc gdk_window_mark_paint_from_clip*(self: ptr Window00; cr: ptr cairo.Context00) {. + importc: "gdk_window_mark_paint_from_clip", libprag.} + +proc markPaintFromClip*(self: Window; cr: cairo.Context) = + gdk_window_mark_paint_from_clip(cast[ptr Window00](self.impl), cast[ptr cairo.Context00](cr.impl)) + +proc gdk_window_maximize*(self: ptr Window00) {. + importc: "gdk_window_maximize", libprag.} + +proc maximize*(self: Window) = + gdk_window_maximize(cast[ptr Window00](self.impl)) + +proc gdk_window_merge_child_input_shapes*(self: ptr Window00) {. + importc: "gdk_window_merge_child_input_shapes", libprag.} + +proc mergeChildInputShapes*(self: Window) = + gdk_window_merge_child_input_shapes(cast[ptr Window00](self.impl)) + +proc gdk_window_merge_child_shapes*(self: ptr Window00) {. + importc: "gdk_window_merge_child_shapes", libprag.} + +proc mergeChildShapes*(self: Window) = + gdk_window_merge_child_shapes(cast[ptr Window00](self.impl)) + +proc gdk_window_move*(self: ptr Window00; x: int32; y: int32) {. + importc: "gdk_window_move", libprag.} + +proc move*(self: Window; x: int; y: int) = + gdk_window_move(cast[ptr Window00](self.impl), int32(x), int32(y)) + +proc gdk_window_move_region*(self: ptr Window00; region: ptr cairo.Region00; dx: int32; + dy: int32) {. + importc: "gdk_window_move_region", libprag.} + +proc moveRegion*(self: Window; region: cairo.Region; dx: int; dy: int) = + gdk_window_move_region(cast[ptr Window00](self.impl), cast[ptr cairo.Region00](region.impl), int32(dx), int32(dy)) + +proc gdk_window_move_resize*(self: ptr Window00; x: int32; y: int32; width: int32; + height: int32) {. + importc: "gdk_window_move_resize", libprag.} + +proc moveResize*(self: Window; x: int; y: int; width: int; height: int) = + gdk_window_move_resize(cast[ptr Window00](self.impl), int32(x), int32(y), int32(width), int32(height)) + +proc gdk_window_peek_children*(self: ptr Window00): ptr pointer {. + importc: "gdk_window_peek_children", libprag.} + +proc peekChildren*(self: Window): ptr pointer = + gdk_window_peek_children(cast[ptr Window00](self.impl)) + +proc gdk_window_process_updates*(self: ptr Window00; updateChildren: gboolean) {. + importc: "gdk_window_process_updates", libprag.} + +proc processUpdates*(self: Window; updateChildren: bool) = + gdk_window_process_updates(cast[ptr Window00](self.impl), gboolean(updateChildren)) + +proc gdk_window_raise*(self: ptr Window00) {. + importc: "gdk_window_raise", libprag.} + +proc `raise`*(self: Window) = + gdk_window_raise(cast[ptr Window00](self.impl)) + +proc gdk_window_register_dnd*(self: ptr Window00) {. + importc: "gdk_window_register_dnd", libprag.} + +proc registerDnd*(self: Window) = + gdk_window_register_dnd(cast[ptr Window00](self.impl)) + +proc gdk_window_reparent*(self: ptr Window00; newParent: ptr Window00; x: int32; + y: int32) {. + importc: "gdk_window_reparent", libprag.} + +proc reparent*(self: Window; newParent: Window; x: int; y: int) = + gdk_window_reparent(cast[ptr Window00](self.impl), cast[ptr Window00](newParent.impl), int32(x), int32(y)) + +proc gdk_window_resize*(self: ptr Window00; width: int32; height: int32) {. + importc: "gdk_window_resize", libprag.} + +proc resize*(self: Window; width: int; height: int) = + gdk_window_resize(cast[ptr Window00](self.impl), int32(width), int32(height)) + +proc gdk_window_restack*(self: ptr Window00; sibling: ptr Window00; above: gboolean) {. + importc: "gdk_window_restack", libprag.} + +proc restack*(self: Window; sibling: Window; above: bool) = + gdk_window_restack(cast[ptr Window00](self.impl), cast[ptr Window00](sibling.impl), gboolean(above)) + +proc gdk_window_scroll*(self: ptr Window00; dx: int32; dy: int32) {. + importc: "gdk_window_scroll", libprag.} + +proc scroll*(self: Window; dx: int; dy: int) = + gdk_window_scroll(cast[ptr Window00](self.impl), int32(dx), int32(dy)) + +proc gdk_window_set_accept_focus*(self: ptr Window00; acceptFocus: gboolean) {. + importc: "gdk_window_set_accept_focus", libprag.} + +proc setAcceptFocus*(self: Window; acceptFocus: bool) = + gdk_window_set_accept_focus(cast[ptr Window00](self.impl), gboolean(acceptFocus)) + +proc `acceptFocus=`*(self: Window; acceptFocus: bool) = + gdk_window_set_accept_focus(cast[ptr Window00](self.impl), gboolean(acceptFocus)) + +proc gdk_window_set_background_pattern*(self: ptr Window00; pattern: ptr cairo.Pattern00) {. + importc: "gdk_window_set_background_pattern", libprag.} + +proc setBackgroundPattern*(self: Window; pattern: cairo.Pattern) = + gdk_window_set_background_pattern(cast[ptr Window00](self.impl), cast[ptr cairo.Pattern00](pattern.impl)) + +proc `backgroundPattern=`*(self: Window; pattern: cairo.Pattern) = + gdk_window_set_background_pattern(cast[ptr Window00](self.impl), cast[ptr cairo.Pattern00](pattern.impl)) + +proc gdk_window_set_child_input_shapes*(self: ptr Window00) {. + importc: "gdk_window_set_child_input_shapes", libprag.} + +proc setChildInputShapes*(self: Window) = + gdk_window_set_child_input_shapes(cast[ptr Window00](self.impl)) + +proc `childInputShapes=`*(self: Window) = + gdk_window_set_child_input_shapes(cast[ptr Window00](self.impl)) + +proc gdk_window_set_child_shapes*(self: ptr Window00) {. + importc: "gdk_window_set_child_shapes", libprag.} + +proc setChildShapes*(self: Window) = + gdk_window_set_child_shapes(cast[ptr Window00](self.impl)) + +proc `childShapes=`*(self: Window) = + gdk_window_set_child_shapes(cast[ptr Window00](self.impl)) + +proc gdk_window_set_composited*(self: ptr Window00; composited: gboolean) {. + importc: "gdk_window_set_composited", libprag.} + +proc setComposited*(self: Window; composited: bool) = + gdk_window_set_composited(cast[ptr Window00](self.impl), gboolean(composited)) + +proc `composited=`*(self: Window; composited: bool) = + gdk_window_set_composited(cast[ptr Window00](self.impl), gboolean(composited)) + +proc gdk_window_set_event_compression*(self: ptr Window00; eventCompression: gboolean) {. + importc: "gdk_window_set_event_compression", libprag.} + +proc setEventCompression*(self: Window; eventCompression: bool) = + gdk_window_set_event_compression(cast[ptr Window00](self.impl), gboolean(eventCompression)) + +proc `eventCompression=`*(self: Window; eventCompression: bool) = + gdk_window_set_event_compression(cast[ptr Window00](self.impl), gboolean(eventCompression)) + +proc gdk_window_set_focus_on_map*(self: ptr Window00; focusOnMap: gboolean) {. + importc: "gdk_window_set_focus_on_map", libprag.} + +proc setFocusOnMap*(self: Window; focusOnMap: bool) = + gdk_window_set_focus_on_map(cast[ptr Window00](self.impl), gboolean(focusOnMap)) + +proc `focusOnMap=`*(self: Window; focusOnMap: bool) = + gdk_window_set_focus_on_map(cast[ptr Window00](self.impl), gboolean(focusOnMap)) + +proc gdk_window_set_group*(self: ptr Window00; leader: ptr Window00) {. + importc: "gdk_window_set_group", libprag.} + +proc setGroup*(self: Window; leader: Window) = + gdk_window_set_group(cast[ptr Window00](self.impl), cast[ptr Window00](leader.impl)) + +proc `group=`*(self: Window; leader: Window) = + gdk_window_set_group(cast[ptr Window00](self.impl), cast[ptr Window00](leader.impl)) + +proc gdk_window_set_icon_list*(self: ptr Window00; pixbufs: ptr pointer) {. + importc: "gdk_window_set_icon_list", libprag.} + +proc setIconList*(self: Window; pixbufs: ptr pointer) = + gdk_window_set_icon_list(cast[ptr Window00](self.impl), pixbufs) + +proc `iconList=`*(self: Window; pixbufs: ptr pointer) = + gdk_window_set_icon_list(cast[ptr Window00](self.impl), pixbufs) + +proc gdk_window_set_icon_name*(self: ptr Window00; name: cstring) {. + importc: "gdk_window_set_icon_name", libprag.} + +proc setIconName*(self: Window; name: string) = + gdk_window_set_icon_name(cast[ptr Window00](self.impl), cstring(name)) + +proc `iconName=`*(self: Window; name: string) = + gdk_window_set_icon_name(cast[ptr Window00](self.impl), cstring(name)) + +proc gdk_window_set_keep_above*(self: ptr Window00; setting: gboolean) {. + importc: "gdk_window_set_keep_above", libprag.} + +proc setKeepAbove*(self: Window; setting: bool) = + gdk_window_set_keep_above(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `keepAbove=`*(self: Window; setting: bool) = + gdk_window_set_keep_above(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gdk_window_set_keep_below*(self: ptr Window00; setting: gboolean) {. + importc: "gdk_window_set_keep_below", libprag.} + +proc setKeepBelow*(self: Window; setting: bool) = + gdk_window_set_keep_below(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `keepBelow=`*(self: Window; setting: bool) = + gdk_window_set_keep_below(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gdk_window_set_modal_hint*(self: ptr Window00; modal: gboolean) {. + importc: "gdk_window_set_modal_hint", libprag.} + +proc setModalHint*(self: Window; modal: bool) = + gdk_window_set_modal_hint(cast[ptr Window00](self.impl), gboolean(modal)) + +proc `modalHint=`*(self: Window; modal: bool) = + gdk_window_set_modal_hint(cast[ptr Window00](self.impl), gboolean(modal)) + +proc gdk_window_set_opacity*(self: ptr Window00; opacity: cdouble) {. + importc: "gdk_window_set_opacity", libprag.} + +proc setOpacity*(self: Window; opacity: cdouble) = + gdk_window_set_opacity(cast[ptr Window00](self.impl), opacity) + +proc `opacity=`*(self: Window; opacity: cdouble) = + gdk_window_set_opacity(cast[ptr Window00](self.impl), opacity) + +proc gdk_window_set_opaque_region*(self: ptr Window00; region: ptr cairo.Region00) {. + importc: "gdk_window_set_opaque_region", libprag.} + +proc setOpaqueRegion*(self: Window; region: cairo.Region) = + gdk_window_set_opaque_region(cast[ptr Window00](self.impl), cast[ptr cairo.Region00](region.impl)) + +proc `opaqueRegion=`*(self: Window; region: cairo.Region) = + gdk_window_set_opaque_region(cast[ptr Window00](self.impl), cast[ptr cairo.Region00](region.impl)) + +proc gdk_window_set_override_redirect*(self: ptr Window00; overrideRedirect: gboolean) {. + importc: "gdk_window_set_override_redirect", libprag.} + +proc setOverrideRedirect*(self: Window; overrideRedirect: bool) = + gdk_window_set_override_redirect(cast[ptr Window00](self.impl), gboolean(overrideRedirect)) + +proc `overrideRedirect=`*(self: Window; overrideRedirect: bool) = + gdk_window_set_override_redirect(cast[ptr Window00](self.impl), gboolean(overrideRedirect)) + +proc gdk_window_set_pass_through*(self: ptr Window00; passThrough: gboolean) {. + importc: "gdk_window_set_pass_through", libprag.} + +proc setPassThrough*(self: Window; passThrough: bool) = + gdk_window_set_pass_through(cast[ptr Window00](self.impl), gboolean(passThrough)) + +proc `passThrough=`*(self: Window; passThrough: bool) = + gdk_window_set_pass_through(cast[ptr Window00](self.impl), gboolean(passThrough)) + +proc gdk_window_set_role*(self: ptr Window00; role: cstring) {. + importc: "gdk_window_set_role", libprag.} + +proc setRole*(self: Window; role: string) = + gdk_window_set_role(cast[ptr Window00](self.impl), cstring(role)) + +proc `role=`*(self: Window; role: string) = + gdk_window_set_role(cast[ptr Window00](self.impl), cstring(role)) + +proc gdk_window_set_shadow_width*(self: ptr Window00; left: int32; right: int32; top: int32; + bottom: int32) {. + importc: "gdk_window_set_shadow_width", libprag.} + +proc setShadowWidth*(self: Window; left: int; right: int; top: int; bottom: int) = + gdk_window_set_shadow_width(cast[ptr Window00](self.impl), int32(left), int32(right), int32(top), int32(bottom)) + +proc gdk_window_set_skip_pager_hint*(self: ptr Window00; skipsPager: gboolean) {. + importc: "gdk_window_set_skip_pager_hint", libprag.} + +proc setSkipPagerHint*(self: Window; skipsPager: bool) = + gdk_window_set_skip_pager_hint(cast[ptr Window00](self.impl), gboolean(skipsPager)) + +proc `skipPagerHint=`*(self: Window; skipsPager: bool) = + gdk_window_set_skip_pager_hint(cast[ptr Window00](self.impl), gboolean(skipsPager)) + +proc gdk_window_set_skip_taskbar_hint*(self: ptr Window00; skipsTaskbar: gboolean) {. + importc: "gdk_window_set_skip_taskbar_hint", libprag.} + +proc setSkipTaskbarHint*(self: Window; skipsTaskbar: bool) = + gdk_window_set_skip_taskbar_hint(cast[ptr Window00](self.impl), gboolean(skipsTaskbar)) + +proc `skipTaskbarHint=`*(self: Window; skipsTaskbar: bool) = + gdk_window_set_skip_taskbar_hint(cast[ptr Window00](self.impl), gboolean(skipsTaskbar)) + +proc gdk_window_set_startup_id*(self: ptr Window00; startupId: cstring) {. + importc: "gdk_window_set_startup_id", libprag.} + +proc setStartupId*(self: Window; startupId: string) = + gdk_window_set_startup_id(cast[ptr Window00](self.impl), cstring(startupId)) + +proc `startupId=`*(self: Window; startupId: string) = + gdk_window_set_startup_id(cast[ptr Window00](self.impl), cstring(startupId)) + +proc gdk_window_set_static_gravities*(self: ptr Window00; useStatic: gboolean): gboolean {. + importc: "gdk_window_set_static_gravities", libprag.} + +proc setStaticGravities*(self: Window; useStatic: bool): bool = + toBool(gdk_window_set_static_gravities(cast[ptr Window00](self.impl), gboolean(useStatic))) + +proc `staticGravities=`*(self: Window; useStatic: bool): bool = + toBool(gdk_window_set_static_gravities(cast[ptr Window00](self.impl), gboolean(useStatic))) + +proc gdk_window_set_support_multidevice*(self: ptr Window00; supportMultidevice: gboolean) {. + importc: "gdk_window_set_support_multidevice", libprag.} + +proc setSupportMultidevice*(self: Window; supportMultidevice: bool) = + gdk_window_set_support_multidevice(cast[ptr Window00](self.impl), gboolean(supportMultidevice)) + +proc `supportMultidevice=`*(self: Window; supportMultidevice: bool) = + gdk_window_set_support_multidevice(cast[ptr Window00](self.impl), gboolean(supportMultidevice)) + +proc gdk_window_set_title*(self: ptr Window00; title: cstring) {. + importc: "gdk_window_set_title", libprag.} + +proc setTitle*(self: Window; title: string) = + gdk_window_set_title(cast[ptr Window00](self.impl), cstring(title)) + +proc `title=`*(self: Window; title: string) = + gdk_window_set_title(cast[ptr Window00](self.impl), cstring(title)) + +proc gdk_window_set_transient_for*(self: ptr Window00; parent: ptr Window00) {. + importc: "gdk_window_set_transient_for", libprag.} + +proc setTransientFor*(self: Window; parent: Window) = + gdk_window_set_transient_for(cast[ptr Window00](self.impl), cast[ptr Window00](parent.impl)) + +proc `transientFor=`*(self: Window; parent: Window) = + gdk_window_set_transient_for(cast[ptr Window00](self.impl), cast[ptr Window00](parent.impl)) + +proc gdk_window_set_urgency_hint*(self: ptr Window00; urgent: gboolean) {. + importc: "gdk_window_set_urgency_hint", libprag.} + +proc setUrgencyHint*(self: Window; urgent: bool) = + gdk_window_set_urgency_hint(cast[ptr Window00](self.impl), gboolean(urgent)) + +proc `urgencyHint=`*(self: Window; urgent: bool) = + gdk_window_set_urgency_hint(cast[ptr Window00](self.impl), gboolean(urgent)) + +proc gdk_window_set_user_data*(self: ptr Window00; userData: ptr gobject.Object00) {. + importc: "gdk_window_set_user_data", libprag.} + +proc setUserData*(self: Window; userData: gobject.Object) = + gdk_window_set_user_data(cast[ptr Window00](self.impl), cast[ptr gobject.Object00](userData.impl)) + +proc `userData=`*(self: Window; userData: gobject.Object) = + gdk_window_set_user_data(cast[ptr Window00](self.impl), cast[ptr gobject.Object00](userData.impl)) + +proc gdk_window_shape_combine_region*(self: ptr Window00; shapeRegion: ptr cairo.Region00; + offsetX: int32; offsetY: int32) {. + importc: "gdk_window_shape_combine_region", libprag.} + +proc shapeCombineRegion*(self: Window; shapeRegion: cairo.Region; offsetX: int; + offsetY: int) = + gdk_window_shape_combine_region(cast[ptr Window00](self.impl), cast[ptr cairo.Region00](shapeRegion.impl), int32(offsetX), int32(offsetY)) + +proc gdk_window_show*(self: ptr Window00) {. + importc: "gdk_window_show", libprag.} + +proc show*(self: Window) = + gdk_window_show(cast[ptr Window00](self.impl)) + +proc gdk_window_show_unraised*(self: ptr Window00) {. + importc: "gdk_window_show_unraised", libprag.} + +proc showUnraised*(self: Window) = + gdk_window_show_unraised(cast[ptr Window00](self.impl)) + +proc gdk_window_stick*(self: ptr Window00) {. + importc: "gdk_window_stick", libprag.} + +proc stick*(self: Window) = + gdk_window_stick(cast[ptr Window00](self.impl)) + +proc gdk_window_thaw_toplevel_updates_libgtk_only*(self: ptr Window00) {. + importc: "gdk_window_thaw_toplevel_updates_libgtk_only", libprag.} + +proc thawToplevelUpdatesLibgtkOnly*(self: Window) = + gdk_window_thaw_toplevel_updates_libgtk_only(cast[ptr Window00](self.impl)) + +proc gdk_window_thaw_updates*(self: ptr Window00) {. + importc: "gdk_window_thaw_updates", libprag.} + +proc thawUpdates*(self: Window) = + gdk_window_thaw_updates(cast[ptr Window00](self.impl)) + +proc gdk_window_unfullscreen*(self: ptr Window00) {. + importc: "gdk_window_unfullscreen", libprag.} + +proc unfullscreen*(self: Window) = + gdk_window_unfullscreen(cast[ptr Window00](self.impl)) + +proc gdk_window_unmaximize*(self: ptr Window00) {. + importc: "gdk_window_unmaximize", libprag.} + +proc unmaximize*(self: Window) = + gdk_window_unmaximize(cast[ptr Window00](self.impl)) + +proc gdk_window_unstick*(self: ptr Window00) {. + importc: "gdk_window_unstick", libprag.} + +proc unstick*(self: Window) = + gdk_window_unstick(cast[ptr Window00](self.impl)) + +proc gdk_window_withdraw*(self: ptr Window00) {. + importc: "gdk_window_withdraw", libprag.} + +proc withdraw*(self: Window) = + gdk_window_withdraw(cast[ptr Window00](self.impl)) + +proc gdk_device_grab_info_libgtk_only*(display: ptr Display00; device: ptr Device00; grabWindow: var ptr Window00; + ownerEvents: var gboolean): gboolean {. + importc: "gdk_device_grab_info_libgtk_only", libprag.} + +proc grabInfoLibgtkOnly*(display: ptr Display00; device: ptr Device00; grabWindow: var ptr Window00; + ownerEvents: var gboolean): gboolean {. + importc: "gdk_device_grab_info_libgtk_only", libprag.} + +proc gdk_device_get_last_event_window*(self: ptr Device00): ptr Window00 {. + importc: "gdk_device_get_last_event_window", libprag.} + +proc getLastEventWindow*(self: Device): Window = + let gobj = gdk_device_get_last_event_window(cast[ptr Device00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc lastEventWindow*(self: Device): Window = + let gobj = gdk_device_get_last_event_window(cast[ptr Device00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_device_get_window_at_position*(self: ptr Device00; winX: var int32; winY: var int32): ptr Window00 {. + importc: "gdk_device_get_window_at_position", libprag.} + +proc getWindowAtPosition*(self: Device; winX: var int; winY: var int): Window = + var winX_00 = int32(winX) + var winY_00 = int32(winY) + let gobj = gdk_device_get_window_at_position(cast[ptr Device00](self.impl), winX_00, winY_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + winX = int(winX_00) + winY = int(winY_00) + +proc windowAtPosition*(self: Device; winX: var int; winY: var int): Window = + var winX_00 = int32(winX) + var winY_00 = int32(winY) + let gobj = gdk_device_get_window_at_position(cast[ptr Device00](self.impl), winX_00, winY_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + winX = int(winX_00) + winY = int(winY_00) + +proc gdk_device_get_window_at_position_double*(self: ptr Device00; winX: var cdouble; winY: var cdouble): ptr Window00 {. + importc: "gdk_device_get_window_at_position_double", libprag.} + +proc getWindowAtPositionDouble*(self: Device; winX: var cdouble; winY: var cdouble): Window = + let gobj = gdk_device_get_window_at_position_double(cast[ptr Device00](self.impl), winX, winY) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc windowAtPositionDouble*(self: Device; winX: var cdouble; winY: var cdouble): Window = + let gobj = gdk_device_get_window_at_position_double(cast[ptr Device00](self.impl), winX, winY) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_get_default_group*(self: ptr Display00): ptr Window00 {. + importc: "gdk_display_get_default_group", libprag.} + +proc getDefaultGroup*(self: Display): Window = + let gobj = gdk_display_get_default_group(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultGroup*(self: Display): Window = + let gobj = gdk_display_get_default_group(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_get_monitor_at_window*(self: ptr Display00; window: ptr Window00): ptr Monitor00 {. + importc: "gdk_display_get_monitor_at_window", libprag.} + +proc getMonitorAtWindow*(self: Display; window: Window): Monitor = + let gobj = gdk_display_get_monitor_at_window(cast[ptr Display00](self.impl), cast[ptr Window00](window.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Monitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc monitorAtWindow*(self: Display; window: Window): Monitor = + let gobj = gdk_display_get_monitor_at_window(cast[ptr Display00](self.impl), cast[ptr Window00](window.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Monitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_get_window_at_pointer*(self: ptr Display00; winX: var int32; winY: var int32): ptr Window00 {. + importc: "gdk_display_get_window_at_pointer", libprag.} + +proc getWindowAtPointer*(self: Display; winX: var int; winY: var int): Window = + var winX_00 = int32(winX) + var winY_00 = int32(winY) + let gobj = gdk_display_get_window_at_pointer(cast[ptr Display00](self.impl), winX_00, winY_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + winX = int(winX_00) + winY = int(winY_00) + +proc windowAtPointer*(self: Display; winX: var int; winY: var int): Window = + var winX_00 = int32(winX) + var winY_00 = int32(winY) + let gobj = gdk_display_get_window_at_pointer(cast[ptr Display00](self.impl), winX_00, winY_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + winX = int(winX_00) + winY = int(winY_00) + +proc gdk_display_store_clipboard*(self: ptr Display00; clipboardWindow: ptr Window00; + time: uint32; targets: ptr Atom00Array; nTargets: int32) {. + importc: "gdk_display_store_clipboard", libprag.} + +proc storeClipboard*(self: Display; clipboardWindow: Window; time: int; + targets: ptr Atom00Array; nTargets: int) = + gdk_display_store_clipboard(cast[ptr Display00](self.impl), cast[ptr Window00](clipboardWindow.impl), uint32(time), targets, int32(nTargets)) + +type + GrabOwnership* {.size: sizeof(cint), pure.} = enum + none = 0 + window = 1 + application = 2 + +type + WindowWindowClass* {.size: sizeof(cint), pure.} = enum + inputOutput = 0 + inputOnly = 1 + +type + WindowEdge* {.size: sizeof(cint), pure.} = enum + northWest = 0 + north = 1 + northEast = 2 + west = 3 + east = 4 + southWest = 5 + south = 6 + southEast = 7 + +proc gdk_window_begin_resize_drag*(self: ptr Window00; edge: WindowEdge; button: int32; + rootX: int32; rootY: int32; timestamp: uint32) {. + importc: "gdk_window_begin_resize_drag", libprag.} + +proc beginResizeDrag*(self: Window; edge: WindowEdge; button: int; rootX: int; + rootY: int; timestamp: int) = + gdk_window_begin_resize_drag(cast[ptr Window00](self.impl), edge, int32(button), int32(rootX), int32(rootY), uint32(timestamp)) + +proc gdk_window_begin_resize_drag_for_device*(self: ptr Window00; edge: WindowEdge; device: ptr Device00; + button: int32; rootX: int32; rootY: int32; timestamp: uint32) {. + importc: "gdk_window_begin_resize_drag_for_device", libprag.} + +proc beginResizeDragForDevice*(self: Window; edge: WindowEdge; device: Device; button: int; + rootX: int; rootY: int; timestamp: int) = + gdk_window_begin_resize_drag_for_device(cast[ptr Window00](self.impl), edge, cast[ptr Device00](device.impl), int32(button), int32(rootX), int32(rootY), uint32(timestamp)) + +type + GLContext* = ref object of gobject.Object + GLContext00* = object of gobject.Object00 + +proc gdk_gl_context_clear_current*() {. + importc: "gdk_gl_context_clear_current", libprag.} + +proc clearCurrent*() {. + importc: "gdk_gl_context_clear_current", libprag.} + +proc gdk_gl_context_get_current*(): ptr GLContext00 {. + importc: "gdk_gl_context_get_current", libprag.} + +proc getCurrent*(): GLContext = + let gobj = gdk_gl_context_get_current() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[GLContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc current*(): GLContext = + let gobj = gdk_gl_context_get_current() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[GLContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_gl_context_get_debug_enabled*(self: ptr GLContext00): gboolean {. + importc: "gdk_gl_context_get_debug_enabled", libprag.} + +proc getDebugEnabled*(self: GLContext): bool = + toBool(gdk_gl_context_get_debug_enabled(cast[ptr GLContext00](self.impl))) + +proc debugEnabled*(self: GLContext): bool = + toBool(gdk_gl_context_get_debug_enabled(cast[ptr GLContext00](self.impl))) + +proc gdk_gl_context_get_display*(self: ptr GLContext00): ptr Display00 {. + importc: "gdk_gl_context_get_display", libprag.} + +proc getDisplay*(self: GLContext): Display = + let gobj = gdk_gl_context_get_display(cast[ptr GLContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: GLContext): Display = + let gobj = gdk_gl_context_get_display(cast[ptr GLContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_gl_context_get_forward_compatible*(self: ptr GLContext00): gboolean {. + importc: "gdk_gl_context_get_forward_compatible", libprag.} + +proc getForwardCompatible*(self: GLContext): bool = + toBool(gdk_gl_context_get_forward_compatible(cast[ptr GLContext00](self.impl))) + +proc forwardCompatible*(self: GLContext): bool = + toBool(gdk_gl_context_get_forward_compatible(cast[ptr GLContext00](self.impl))) + +proc gdk_gl_context_get_required_version*(self: ptr GLContext00; major: var int32; minor: var int32) {. + importc: "gdk_gl_context_get_required_version", libprag.} + +proc getRequiredVersion*(self: GLContext; major: var int; minor: var int) = + var minor_00 = int32(minor) + var major_00 = int32(major) + gdk_gl_context_get_required_version(cast[ptr GLContext00](self.impl), major_00, minor_00) + minor = int(minor_00) + major = int(major_00) + +proc requiredVersion*(self: GLContext; major: var int; minor: var int) = + var minor_00 = int32(minor) + var major_00 = int32(major) + gdk_gl_context_get_required_version(cast[ptr GLContext00](self.impl), major_00, minor_00) + minor = int(minor_00) + major = int(major_00) + +proc gdk_gl_context_get_shared_context*(self: ptr GLContext00): ptr GLContext00 {. + importc: "gdk_gl_context_get_shared_context", libprag.} + +proc getSharedContext*(self: GLContext): GLContext = + let gobj = gdk_gl_context_get_shared_context(cast[ptr GLContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[GLContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc sharedContext*(self: GLContext): GLContext = + let gobj = gdk_gl_context_get_shared_context(cast[ptr GLContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[GLContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_gl_context_get_use_es*(self: ptr GLContext00): gboolean {. + importc: "gdk_gl_context_get_use_es", libprag.} + +proc getUseEs*(self: GLContext): bool = + toBool(gdk_gl_context_get_use_es(cast[ptr GLContext00](self.impl))) + +proc useEs*(self: GLContext): bool = + toBool(gdk_gl_context_get_use_es(cast[ptr GLContext00](self.impl))) + +proc gdk_gl_context_get_version*(self: ptr GLContext00; major: var int32; minor: var int32) {. + importc: "gdk_gl_context_get_version", libprag.} + +proc getVersion*(self: GLContext; major: var int; minor: var int) = + var minor_00 = int32(minor) + var major_00 = int32(major) + gdk_gl_context_get_version(cast[ptr GLContext00](self.impl), major_00, minor_00) + minor = int(minor_00) + major = int(major_00) + +proc version*(self: GLContext; major: var int; minor: var int) = + var minor_00 = int32(minor) + var major_00 = int32(major) + gdk_gl_context_get_version(cast[ptr GLContext00](self.impl), major_00, minor_00) + minor = int(minor_00) + major = int(major_00) + +proc gdk_gl_context_get_window*(self: ptr GLContext00): ptr Window00 {. + importc: "gdk_gl_context_get_window", libprag.} + +proc getWindow*(self: GLContext): Window = + let gobj = gdk_gl_context_get_window(cast[ptr GLContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc window*(self: GLContext): Window = + let gobj = gdk_gl_context_get_window(cast[ptr GLContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_gl_context_is_legacy*(self: ptr GLContext00): gboolean {. + importc: "gdk_gl_context_is_legacy", libprag.} + +proc isLegacy*(self: GLContext): bool = + toBool(gdk_gl_context_is_legacy(cast[ptr GLContext00](self.impl))) + +proc gdk_gl_context_make_current*(self: ptr GLContext00) {. + importc: "gdk_gl_context_make_current", libprag.} + +proc makeCurrent*(self: GLContext) = + gdk_gl_context_make_current(cast[ptr GLContext00](self.impl)) + +proc gdk_gl_context_realize*(self: ptr GLContext00): gboolean {. + importc: "gdk_gl_context_realize", libprag.} + +proc realize*(self: GLContext): bool = + toBool(gdk_gl_context_realize(cast[ptr GLContext00](self.impl))) + +proc gdk_gl_context_set_debug_enabled*(self: ptr GLContext00; enabled: gboolean) {. + importc: "gdk_gl_context_set_debug_enabled", libprag.} + +proc setDebugEnabled*(self: GLContext; enabled: bool) = + gdk_gl_context_set_debug_enabled(cast[ptr GLContext00](self.impl), gboolean(enabled)) + +proc `debugEnabled=`*(self: GLContext; enabled: bool) = + gdk_gl_context_set_debug_enabled(cast[ptr GLContext00](self.impl), gboolean(enabled)) + +proc gdk_gl_context_set_forward_compatible*(self: ptr GLContext00; compatible: gboolean) {. + importc: "gdk_gl_context_set_forward_compatible", libprag.} + +proc setForwardCompatible*(self: GLContext; compatible: bool) = + gdk_gl_context_set_forward_compatible(cast[ptr GLContext00](self.impl), gboolean(compatible)) + +proc `forwardCompatible=`*(self: GLContext; compatible: bool) = + gdk_gl_context_set_forward_compatible(cast[ptr GLContext00](self.impl), gboolean(compatible)) + +proc gdk_gl_context_set_required_version*(self: ptr GLContext00; major: int32; minor: int32) {. + importc: "gdk_gl_context_set_required_version", libprag.} + +proc setRequiredVersion*(self: GLContext; major: int; minor: int) = + gdk_gl_context_set_required_version(cast[ptr GLContext00](self.impl), int32(major), int32(minor)) + +proc gdk_gl_context_set_use_es*(self: ptr GLContext00; useEs: int32) {. + importc: "gdk_gl_context_set_use_es", libprag.} + +proc setUseEs*(self: GLContext; useEs: int) = + gdk_gl_context_set_use_es(cast[ptr GLContext00](self.impl), int32(useEs)) + +proc `useEs=`*(self: GLContext; useEs: int) = + gdk_gl_context_set_use_es(cast[ptr GLContext00](self.impl), int32(useEs)) + +proc gdk_window_create_gl_context*(self: ptr Window00): ptr GLContext00 {. + importc: "gdk_window_create_gl_context", libprag.} + +proc createGlContext*(self: Window): GLContext = + let gobj = gdk_window_create_gl_context(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[GLContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DrawingContext* = ref object of gobject.Object + DrawingContext00* = object of gobject.Object00 + +proc gdk_drawing_context_get_cairo_context*(self: ptr DrawingContext00): ptr cairo.Context00 {. + importc: "gdk_drawing_context_get_cairo_context", libprag.} + +proc getCairoContext*(self: DrawingContext): cairo.Context = + new(result) + result.impl = gdk_drawing_context_get_cairo_context(cast[ptr DrawingContext00](self.impl)) + +proc cairoContext*(self: DrawingContext): cairo.Context = + new(result) + result.impl = gdk_drawing_context_get_cairo_context(cast[ptr DrawingContext00](self.impl)) + +proc gdk_drawing_context_get_clip*(self: ptr DrawingContext00): ptr cairo.Region00 {. + importc: "gdk_drawing_context_get_clip", libprag.} + +proc getClip*(self: DrawingContext): cairo.Region = + new(result) + result.impl = gdk_drawing_context_get_clip(cast[ptr DrawingContext00](self.impl)) + +proc clip*(self: DrawingContext): cairo.Region = + new(result) + result.impl = gdk_drawing_context_get_clip(cast[ptr DrawingContext00](self.impl)) + +proc gdk_drawing_context_get_window*(self: ptr DrawingContext00): ptr Window00 {. + importc: "gdk_drawing_context_get_window", libprag.} + +proc getWindow*(self: DrawingContext): Window = + let gobj = gdk_drawing_context_get_window(cast[ptr DrawingContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc window*(self: DrawingContext): Window = + let gobj = gdk_drawing_context_get_window(cast[ptr DrawingContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_drawing_context_is_valid*(self: ptr DrawingContext00): gboolean {. + importc: "gdk_drawing_context_is_valid", libprag.} + +proc isValid*(self: DrawingContext): bool = + toBool(gdk_drawing_context_is_valid(cast[ptr DrawingContext00](self.impl))) + +proc gdk_window_begin_draw_frame*(self: ptr Window00; region: ptr cairo.Region00): ptr DrawingContext00 {. + importc: "gdk_window_begin_draw_frame", libprag.} + +proc beginDrawFrame*(self: Window; region: cairo.Region): DrawingContext = + let gobj = gdk_window_begin_draw_frame(cast[ptr Window00](self.impl), cast[ptr cairo.Region00](region.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DrawingContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_end_draw_frame*(self: ptr Window00; context: ptr DrawingContext00) {. + importc: "gdk_window_end_draw_frame", libprag.} + +proc endDrawFrame*(self: Window; context: DrawingContext) = + gdk_window_end_draw_frame(cast[ptr Window00](self.impl), cast[ptr DrawingContext00](context.impl)) + +type + DragProtocol* {.size: sizeof(cint), pure.} = enum + none = 0 + motif = 1 + xdnd = 2 + rootwin = 3 + win32Dropfiles = 4 + ole2 = 5 + local = 6 + wayland = 7 + +proc gdk_window_get_drag_protocol*(self: ptr Window00; target: var ptr Window00): DragProtocol {. + importc: "gdk_window_get_drag_protocol", libprag.} + +proc getDragProtocol*(self: ptr Window00; target: var ptr Window00): DragProtocol {. + importc: "gdk_window_get_drag_protocol", libprag.} + +proc dragProtocol*(self: ptr Window00; target: var ptr Window00): DragProtocol {. + importc: "gdk_window_get_drag_protocol", libprag.} + +type + FrameClock* = ref object of gobject.Object + FrameClock00* = object of gobject.Object00 + +proc scAfterPaint*(self: FrameClock; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "after-paint", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scBeforePaint*(self: FrameClock; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "before-paint", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scFlushEvents*(self: FrameClock; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "flush-events", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scLayout*(self: FrameClock; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "layout", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPaint*(self: FrameClock; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "paint", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scResumeEvents*(self: FrameClock; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "resume-events", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUpdate*(self: FrameClock; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "update", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_frame_clock_begin_updating*(self: ptr FrameClock00) {. + importc: "gdk_frame_clock_begin_updating", libprag.} + +proc beginUpdating*(self: FrameClock) = + gdk_frame_clock_begin_updating(cast[ptr FrameClock00](self.impl)) + +proc gdk_frame_clock_end_updating*(self: ptr FrameClock00) {. + importc: "gdk_frame_clock_end_updating", libprag.} + +proc endUpdating*(self: FrameClock) = + gdk_frame_clock_end_updating(cast[ptr FrameClock00](self.impl)) + +proc gdk_frame_clock_get_frame_counter*(self: ptr FrameClock00): int64 {. + importc: "gdk_frame_clock_get_frame_counter", libprag.} + +proc getFrameCounter*(self: FrameClock): int64 = + gdk_frame_clock_get_frame_counter(cast[ptr FrameClock00](self.impl)) + +proc frameCounter*(self: FrameClock): int64 = + gdk_frame_clock_get_frame_counter(cast[ptr FrameClock00](self.impl)) + +proc gdk_frame_clock_get_frame_time*(self: ptr FrameClock00): int64 {. + importc: "gdk_frame_clock_get_frame_time", libprag.} + +proc getFrameTime*(self: FrameClock): int64 = + gdk_frame_clock_get_frame_time(cast[ptr FrameClock00](self.impl)) + +proc frameTime*(self: FrameClock): int64 = + gdk_frame_clock_get_frame_time(cast[ptr FrameClock00](self.impl)) + +proc gdk_frame_clock_get_history_start*(self: ptr FrameClock00): int64 {. + importc: "gdk_frame_clock_get_history_start", libprag.} + +proc getHistoryStart*(self: FrameClock): int64 = + gdk_frame_clock_get_history_start(cast[ptr FrameClock00](self.impl)) + +proc historyStart*(self: FrameClock): int64 = + gdk_frame_clock_get_history_start(cast[ptr FrameClock00](self.impl)) + +proc gdk_frame_clock_get_refresh_info*(self: ptr FrameClock00; baseTime: int64; refreshIntervalReturn: ptr int64; + presentationTimeReturn: ptr int64) {. + importc: "gdk_frame_clock_get_refresh_info", libprag.} + +proc getRefreshInfo*(self: FrameClock; baseTime: int64; refreshIntervalReturn: ptr int64; + presentationTimeReturn: ptr int64) = + gdk_frame_clock_get_refresh_info(cast[ptr FrameClock00](self.impl), baseTime, refreshIntervalReturn, presentationTimeReturn) + +proc refreshInfo*(self: FrameClock; baseTime: int64; refreshIntervalReturn: ptr int64; + presentationTimeReturn: ptr int64) = + gdk_frame_clock_get_refresh_info(cast[ptr FrameClock00](self.impl), baseTime, refreshIntervalReturn, presentationTimeReturn) + +proc gdk_window_get_frame_clock*(self: ptr Window00): ptr FrameClock00 {. + importc: "gdk_window_get_frame_clock", libprag.} + +proc getFrameClock*(self: Window): FrameClock = + let gobj = gdk_window_get_frame_clock(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FrameClock](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc frameClock*(self: Window): FrameClock = + let gobj = gdk_window_get_frame_clock(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FrameClock](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + FrameTimings00* {.pure.} = object + FrameTimings* = ref object + impl*: ptr FrameTimings00 + +proc gdk_frame_timings_get_complete*(self: ptr FrameTimings00): gboolean {. + importc: "gdk_frame_timings_get_complete", libprag.} + +proc getComplete*(self: FrameTimings): bool = + toBool(gdk_frame_timings_get_complete(cast[ptr FrameTimings00](self.impl))) + +proc complete*(self: FrameTimings): bool = + toBool(gdk_frame_timings_get_complete(cast[ptr FrameTimings00](self.impl))) + +proc gdk_frame_timings_get_frame_counter*(self: ptr FrameTimings00): int64 {. + importc: "gdk_frame_timings_get_frame_counter", libprag.} + +proc getFrameCounter*(self: FrameTimings): int64 = + gdk_frame_timings_get_frame_counter(cast[ptr FrameTimings00](self.impl)) + +proc frameCounter*(self: FrameTimings): int64 = + gdk_frame_timings_get_frame_counter(cast[ptr FrameTimings00](self.impl)) + +proc gdk_frame_timings_get_frame_time*(self: ptr FrameTimings00): int64 {. + importc: "gdk_frame_timings_get_frame_time", libprag.} + +proc getFrameTime*(self: FrameTimings): int64 = + gdk_frame_timings_get_frame_time(cast[ptr FrameTimings00](self.impl)) + +proc frameTime*(self: FrameTimings): int64 = + gdk_frame_timings_get_frame_time(cast[ptr FrameTimings00](self.impl)) + +proc gdk_frame_timings_get_predicted_presentation_time*(self: ptr FrameTimings00): int64 {. + importc: "gdk_frame_timings_get_predicted_presentation_time", libprag.} + +proc getPredictedPresentationTime*(self: FrameTimings): int64 = + gdk_frame_timings_get_predicted_presentation_time(cast[ptr FrameTimings00](self.impl)) + +proc predictedPresentationTime*(self: FrameTimings): int64 = + gdk_frame_timings_get_predicted_presentation_time(cast[ptr FrameTimings00](self.impl)) + +proc gdk_frame_timings_get_presentation_time*(self: ptr FrameTimings00): int64 {. + importc: "gdk_frame_timings_get_presentation_time", libprag.} + +proc getPresentationTime*(self: FrameTimings): int64 = + gdk_frame_timings_get_presentation_time(cast[ptr FrameTimings00](self.impl)) + +proc presentationTime*(self: FrameTimings): int64 = + gdk_frame_timings_get_presentation_time(cast[ptr FrameTimings00](self.impl)) + +proc gdk_frame_timings_get_refresh_interval*(self: ptr FrameTimings00): int64 {. + importc: "gdk_frame_timings_get_refresh_interval", libprag.} + +proc getRefreshInterval*(self: FrameTimings): int64 = + gdk_frame_timings_get_refresh_interval(cast[ptr FrameTimings00](self.impl)) + +proc refreshInterval*(self: FrameTimings): int64 = + gdk_frame_timings_get_refresh_interval(cast[ptr FrameTimings00](self.impl)) + +proc gdk_frame_timings_ref*(self: ptr FrameTimings00): ptr FrameTimings00 {. + importc: "gdk_frame_timings_ref", libprag.} + +proc `ref`*(self: FrameTimings): FrameTimings = + new(result) + result.impl = gdk_frame_timings_ref(cast[ptr FrameTimings00](self.impl)) + +proc gdk_frame_timings_unref*(self: ptr FrameTimings00) {. + importc: "gdk_frame_timings_unref", libprag.} + +proc unref*(self: FrameTimings) = + gdk_frame_timings_unref(cast[ptr FrameTimings00](self.impl)) + +proc gdk_frame_clock_get_current_timings*(self: ptr FrameClock00): ptr FrameTimings00 {. + importc: "gdk_frame_clock_get_current_timings", libprag.} + +proc getCurrentTimings*(self: FrameClock): FrameTimings = + new(result) + result.impl = gdk_frame_clock_get_current_timings(cast[ptr FrameClock00](self.impl)) + +proc currentTimings*(self: FrameClock): FrameTimings = + new(result) + result.impl = gdk_frame_clock_get_current_timings(cast[ptr FrameClock00](self.impl)) + +proc gdk_frame_clock_get_timings*(self: ptr FrameClock00; frameCounter: int64): ptr FrameTimings00 {. + importc: "gdk_frame_clock_get_timings", libprag.} + +proc getTimings*(self: FrameClock; frameCounter: int64): FrameTimings = + new(result) + result.impl = gdk_frame_clock_get_timings(cast[ptr FrameClock00](self.impl), frameCounter) + +proc timings*(self: FrameClock; frameCounter: int64): FrameTimings = + new(result) + result.impl = gdk_frame_clock_get_timings(cast[ptr FrameClock00](self.impl), frameCounter) + +type + FrameClockPhase* {.size: sizeof(cint), pure.} = enum + none = 0 + flushEvents = 1 + beforePaint = 2 + update = 4 + layout = 8 + paint = 16 + resumeEvents = 32 + afterPaint = 64 + +proc gdk_frame_clock_request_phase*(self: ptr FrameClock00; phase: FrameClockPhase) {. + importc: "gdk_frame_clock_request_phase", libprag.} + +proc requestPhase*(self: FrameClock; phase: FrameClockPhase) = + gdk_frame_clock_request_phase(cast[ptr FrameClock00](self.impl), phase) + +type + WindowState* {.size: sizeof(cint), pure.} = enum + withdrawn = 1 + iconified = 2 + maximized = 4 + sticky = 8 + fullscreen = 16 + above = 32 + below = 64 + focused = 128 + tiled = 256 + +proc gdk_window_get_state*(self: ptr Window00): WindowState {. + importc: "gdk_window_get_state", libprag.} + +proc getState*(self: Window): WindowState = + gdk_window_get_state(cast[ptr Window00](self.impl)) + +proc state*(self: Window): WindowState = + gdk_window_get_state(cast[ptr Window00](self.impl)) + +type + Visual* = ref object of gobject.Object + Visual00* = object of gobject.Object00 + +proc gdk_visual_get_best*(): ptr Visual00 {. + importc: "gdk_visual_get_best", libprag.} + +proc getBest*(): Visual = + let gobj = gdk_visual_get_best() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc best*(): Visual = + let gobj = gdk_visual_get_best() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_visual_get_best_depth*(): int32 {. + importc: "gdk_visual_get_best_depth", libprag.} + +proc getBestDepth*(): int32 {. + importc: "gdk_visual_get_best_depth", libprag.} + +proc bestDepth*(): int32 {. + importc: "gdk_visual_get_best_depth", libprag.} + +proc gdk_visual_get_best_with_depth*(depth: int32): ptr Visual00 {. + importc: "gdk_visual_get_best_with_depth", libprag.} + +proc getBestWithDepth*(depth: int): Visual = + let gobj = gdk_visual_get_best_with_depth(int32(depth)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc bestWithDepth*(depth: int): Visual = + let gobj = gdk_visual_get_best_with_depth(int32(depth)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_visual_get_system*(): ptr Visual00 {. + importc: "gdk_visual_get_system", libprag.} + +proc getSystem*(): Visual = + let gobj = gdk_visual_get_system() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc system*(): Visual = + let gobj = gdk_visual_get_system() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_visual_get_bits_per_rgb*(self: ptr Visual00): int32 {. + importc: "gdk_visual_get_bits_per_rgb", libprag.} + +proc getBitsPerRgb*(self: Visual): int = + int(gdk_visual_get_bits_per_rgb(cast[ptr Visual00](self.impl))) + +proc bitsPerRgb*(self: Visual): int = + int(gdk_visual_get_bits_per_rgb(cast[ptr Visual00](self.impl))) + +proc gdk_visual_get_blue_pixel_details*(self: ptr Visual00; mask: var uint32; shift: var int32; + precision: var int32) {. + importc: "gdk_visual_get_blue_pixel_details", libprag.} + +proc getBluePixelDetails*(self: Visual; mask: var int; shift: var int; precision: var int) = + var precision_00 = int32(precision) + var mask_00 = uint32(mask) + var shift_00 = int32(shift) + gdk_visual_get_blue_pixel_details(cast[ptr Visual00](self.impl), mask_00, shift_00, precision_00) + precision = int(precision_00) + mask = int(mask_00) + shift = int(shift_00) + +proc bluePixelDetails*(self: Visual; mask: var int; shift: var int; precision: var int) = + var precision_00 = int32(precision) + var mask_00 = uint32(mask) + var shift_00 = int32(shift) + gdk_visual_get_blue_pixel_details(cast[ptr Visual00](self.impl), mask_00, shift_00, precision_00) + precision = int(precision_00) + mask = int(mask_00) + shift = int(shift_00) + +proc gdk_visual_get_colormap_size*(self: ptr Visual00): int32 {. + importc: "gdk_visual_get_colormap_size", libprag.} + +proc getColormapSize*(self: Visual): int = + int(gdk_visual_get_colormap_size(cast[ptr Visual00](self.impl))) + +proc colormapSize*(self: Visual): int = + int(gdk_visual_get_colormap_size(cast[ptr Visual00](self.impl))) + +proc gdk_visual_get_depth*(self: ptr Visual00): int32 {. + importc: "gdk_visual_get_depth", libprag.} + +proc getDepth*(self: Visual): int = + int(gdk_visual_get_depth(cast[ptr Visual00](self.impl))) + +proc depth*(self: Visual): int = + int(gdk_visual_get_depth(cast[ptr Visual00](self.impl))) + +proc gdk_visual_get_green_pixel_details*(self: ptr Visual00; mask: var uint32; shift: var int32; + precision: var int32) {. + importc: "gdk_visual_get_green_pixel_details", libprag.} + +proc getGreenPixelDetails*(self: Visual; mask: var int; shift: var int; precision: var int) = + var precision_00 = int32(precision) + var mask_00 = uint32(mask) + var shift_00 = int32(shift) + gdk_visual_get_green_pixel_details(cast[ptr Visual00](self.impl), mask_00, shift_00, precision_00) + precision = int(precision_00) + mask = int(mask_00) + shift = int(shift_00) + +proc greenPixelDetails*(self: Visual; mask: var int; shift: var int; precision: var int) = + var precision_00 = int32(precision) + var mask_00 = uint32(mask) + var shift_00 = int32(shift) + gdk_visual_get_green_pixel_details(cast[ptr Visual00](self.impl), mask_00, shift_00, precision_00) + precision = int(precision_00) + mask = int(mask_00) + shift = int(shift_00) + +proc gdk_visual_get_red_pixel_details*(self: ptr Visual00; mask: var uint32; shift: var int32; + precision: var int32) {. + importc: "gdk_visual_get_red_pixel_details", libprag.} + +proc getRedPixelDetails*(self: Visual; mask: var int; shift: var int; precision: var int) = + var precision_00 = int32(precision) + var mask_00 = uint32(mask) + var shift_00 = int32(shift) + gdk_visual_get_red_pixel_details(cast[ptr Visual00](self.impl), mask_00, shift_00, precision_00) + precision = int(precision_00) + mask = int(mask_00) + shift = int(shift_00) + +proc redPixelDetails*(self: Visual; mask: var int; shift: var int; precision: var int) = + var precision_00 = int32(precision) + var mask_00 = uint32(mask) + var shift_00 = int32(shift) + gdk_visual_get_red_pixel_details(cast[ptr Visual00](self.impl), mask_00, shift_00, precision_00) + precision = int(precision_00) + mask = int(mask_00) + shift = int(shift_00) + +proc gdk_window_get_visual*(self: ptr Window00): ptr Visual00 {. + importc: "gdk_window_get_visual", libprag.} + +proc getVisual*(self: Window): Visual = + let gobj = gdk_window_get_visual(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc visual*(self: Window): Visual = + let gobj = gdk_window_get_visual(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ByteOrder* {.size: sizeof(cint), pure.} = enum + lsbFirst = 0 + msbFirst = 1 + +proc gdk_visual_get_byte_order*(self: ptr Visual00): ByteOrder {. + importc: "gdk_visual_get_byte_order", libprag.} + +proc getByteOrder*(self: Visual): ByteOrder = + gdk_visual_get_byte_order(cast[ptr Visual00](self.impl)) + +proc byteOrder*(self: Visual): ByteOrder = + gdk_visual_get_byte_order(cast[ptr Visual00](self.impl)) + +type + VisualType* {.size: sizeof(cint), pure.} = enum + staticGray = 0 + grayscale = 1 + staticColor = 2 + pseudoColor = 3 + trueColor = 4 + directColor = 5 + +proc gdk_visual_get_best_type*(): VisualType {. + importc: "gdk_visual_get_best_type", libprag.} + +proc getBestType*(): VisualType {. + importc: "gdk_visual_get_best_type", libprag.} + +proc bestType*(): VisualType {. + importc: "gdk_visual_get_best_type", libprag.} + +proc gdk_visual_get_best_with_both*(depth: int32; visualType: VisualType): ptr Visual00 {. + importc: "gdk_visual_get_best_with_both", libprag.} + +proc getBestWithBoth*(depth: int; visualType: VisualType): Visual = + let gobj = gdk_visual_get_best_with_both(int32(depth), visualType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc bestWithBoth*(depth: int; visualType: VisualType): Visual = + let gobj = gdk_visual_get_best_with_both(int32(depth), visualType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_visual_get_best_with_type*(visualType: VisualType): ptr Visual00 {. + importc: "gdk_visual_get_best_with_type", libprag.} + +proc getBestWithType*(visualType: VisualType): Visual = + let gobj = gdk_visual_get_best_with_type(visualType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc bestWithType*(visualType: VisualType): Visual = + let gobj = gdk_visual_get_best_with_type(visualType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_visual_get_visual_type*(self: ptr Visual00): VisualType {. + importc: "gdk_visual_get_visual_type", libprag.} + +proc getVisualType*(self: Visual): VisualType = + gdk_visual_get_visual_type(cast[ptr Visual00](self.impl)) + +proc visualType*(self: Visual): VisualType = + gdk_visual_get_visual_type(cast[ptr Visual00](self.impl)) + +type + WindowType* {.size: sizeof(cint), pure.} = enum + root = 0 + toplevel = 1 + child = 2 + temp = 3 + foreign = 4 + offscreen = 5 + subsurface = 6 + +proc gdk_window_get_window_type*(self: ptr Window00): WindowType {. + importc: "gdk_window_get_window_type", libprag.} + +proc getWindowType*(self: Window): WindowType = + gdk_window_get_window_type(cast[ptr Window00](self.impl)) + +proc windowType*(self: Window): WindowType = + gdk_window_get_window_type(cast[ptr Window00](self.impl)) + +type + Color00* {.pure.} = object + pixel*: uint32 + red*: uint16 + green*: uint16 + blue*: uint16 + Color* = ref object + impl*: ptr Color00 + +proc gdk_color_copy*(self: ptr Color00): ptr Color00 {. + importc: "gdk_color_copy", libprag.} + +proc copy*(self: Color): Color = + new(result) + result.impl = gdk_color_copy(cast[ptr Color00](self.impl)) + +proc gdk_color_equal*(self: ptr Color00; colorb: ptr Color00): gboolean {. + importc: "gdk_color_equal", libprag.} + +proc equal*(self: Color; colorb: Color): bool = + toBool(gdk_color_equal(cast[ptr Color00](self.impl), cast[ptr Color00](colorb.impl))) + +proc gdk_color_free*(self: ptr Color00) {. + importc: "gdk_color_free", libprag.} + +proc free*(self: Color) = + gdk_color_free(cast[ptr Color00](self.impl)) + +proc gdk_color_hash*(self: ptr Color00): uint32 {. + importc: "gdk_color_hash", libprag.} + +proc hash*(self: Color): int = + int(gdk_color_hash(cast[ptr Color00](self.impl))) + +proc gdk_color_to_string*(self: ptr Color00): cstring {. + importc: "gdk_color_to_string", libprag.} + +proc toString*(self: Color): string = + let resul0 = gdk_color_to_string(cast[ptr Color00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gdk_color_parse*(spec: cstring; color: var Color00): gboolean {. + importc: "gdk_color_parse", libprag.} + +proc parse*(spec: cstring; color: var Color00): gboolean {. + importc: "gdk_color_parse", libprag.} + +proc gdk_window_set_background*(self: ptr Window00; color: ptr Color00) {. + importc: "gdk_window_set_background", libprag.} + +proc setBackground*(self: Window; color: Color) = + gdk_window_set_background(cast[ptr Window00](self.impl), cast[ptr Color00](color.impl)) + +proc `background=`*(self: Window; color: Color) = + gdk_window_set_background(cast[ptr Window00](self.impl), cast[ptr Color00](color.impl)) + +type + RGBA00* {.pure.} = object + red*: cdouble + green*: cdouble + blue*: cdouble + alpha*: cdouble + RGBA* = ref object + impl*: ptr RGBA00 + +proc gdk_rgba_copy*(self: ptr RGBA00): ptr RGBA00 {. + importc: "gdk_rgba_copy", libprag.} + +proc copy*(self: RGBA): RGBA = + new(result) + result.impl = gdk_rgba_copy(cast[ptr RGBA00](self.impl)) + +proc gdk_rgba_equal*(self: ptr RGBA00; p2: ptr RGBA00): gboolean {. + importc: "gdk_rgba_equal", libprag.} + +proc equal*(self: RGBA; p2: RGBA): bool = + toBool(gdk_rgba_equal(cast[ptr RGBA00](self.impl), cast[ptr RGBA00](p2.impl))) + +proc gdk_rgba_free*(self: ptr RGBA00) {. + importc: "gdk_rgba_free", libprag.} + +proc free*(self: RGBA) = + gdk_rgba_free(cast[ptr RGBA00](self.impl)) + +proc gdk_rgba_hash*(self: ptr RGBA00): uint32 {. + importc: "gdk_rgba_hash", libprag.} + +proc hash*(self: RGBA): int = + int(gdk_rgba_hash(cast[ptr RGBA00](self.impl))) + +proc gdk_rgba_parse*(self: ptr RGBA00; spec: cstring): gboolean {. + importc: "gdk_rgba_parse", libprag.} + +proc parse*(self: RGBA; spec: string): bool = + toBool(gdk_rgba_parse(cast[ptr RGBA00](self.impl), cstring(spec))) + +proc gdk_rgba_to_string*(self: ptr RGBA00): cstring {. + importc: "gdk_rgba_to_string", libprag.} + +proc toString*(self: RGBA): string = + let resul0 = gdk_rgba_to_string(cast[ptr RGBA00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gdk_window_set_background_rgba*(self: ptr Window00; rgba: ptr RGBA00) {. + importc: "gdk_window_set_background_rgba", libprag.} + +proc setBackgroundRgba*(self: Window; rgba: RGBA) = + gdk_window_set_background_rgba(cast[ptr Window00](self.impl), cast[ptr RGBA00](rgba.impl)) + +proc `backgroundRgba=`*(self: Window; rgba: RGBA) = + gdk_window_set_background_rgba(cast[ptr Window00](self.impl), cast[ptr RGBA00](rgba.impl)) + +type + WMDecoration* {.size: sizeof(cint), pure.} = enum + all = 1 + border = 2 + resizeh = 4 + title = 8 + menu = 16 + minimize = 32 + maximize = 64 + +proc gdk_window_get_decorations*(self: ptr Window00; decorations: var WMDecoration): gboolean {. + importc: "gdk_window_get_decorations", libprag.} + +proc getDecorations*(self: Window; decorations: var WMDecoration): bool = + toBool(gdk_window_get_decorations(cast[ptr Window00](self.impl), decorations)) + +proc decorations*(self: Window; decorations: var WMDecoration): bool = + toBool(gdk_window_get_decorations(cast[ptr Window00](self.impl), decorations)) + +proc gdk_window_set_decorations*(self: ptr Window00; decorations: WMDecoration) {. + importc: "gdk_window_set_decorations", libprag.} + +proc setDecorations*(self: Window; decorations: WMDecoration) = + gdk_window_set_decorations(cast[ptr Window00](self.impl), decorations) + +proc `decorations=`*(self: Window; decorations: WMDecoration) = + gdk_window_set_decorations(cast[ptr Window00](self.impl), decorations) + +type + Cursor* = ref object of gobject.Object + Cursor00* = object of gobject.Object00 + +proc gdk_cursor_new_from_name*(display: ptr Display00; name: cstring): ptr Cursor00 {. + importc: "gdk_cursor_new_from_name", libprag.} + +proc newCursorFromName*(display: Display; name: string): Cursor = + new(result, finalizeGObject) + result.impl = gdk_cursor_new_from_name(cast[ptr Display00](display.impl), cstring(name)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCursorFromName*[T](result: var T; display: Display; name: string) = + assert(result is Cursor) + new(result, finalizeGObject) + result.impl = gdk_cursor_new_from_name(cast[ptr Display00](display.impl), cstring(name)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_cursor_new_from_pixbuf*(display: ptr Display00; pixbuf: ptr gdkpixbuf.Pixbuf00; + x: int32; y: int32): ptr Cursor00 {. + importc: "gdk_cursor_new_from_pixbuf", libprag.} + +proc newCursorFromPixbuf*(display: Display; pixbuf: gdkpixbuf.Pixbuf; x: int; + y: int): Cursor = + new(result, finalizeGObject) + result.impl = gdk_cursor_new_from_pixbuf(cast[ptr Display00](display.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl), int32(x), int32(y)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCursorFromPixbuf*[T](result: var T; display: Display; pixbuf: gdkpixbuf.Pixbuf; x: int; + y: int) = + assert(result is Cursor) + new(result, finalizeGObject) + result.impl = gdk_cursor_new_from_pixbuf(cast[ptr Display00](display.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl), int32(x), int32(y)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_cursor_new_from_surface*(display: ptr Display00; surface: ptr cairo.Surface00; + x: cdouble; y: cdouble): ptr Cursor00 {. + importc: "gdk_cursor_new_from_surface", libprag.} + +proc newCursorFromSurface*(display: Display; surface: cairo.Surface; x: cdouble; + y: cdouble): Cursor = + new(result, finalizeGObject) + result.impl = gdk_cursor_new_from_surface(cast[ptr Display00](display.impl), cast[ptr cairo.Surface00](surface.impl), x, y) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCursorFromSurface*[T](result: var T; display: Display; surface: cairo.Surface; x: cdouble; + y: cdouble) = + assert(result is Cursor) + new(result, finalizeGObject) + result.impl = gdk_cursor_new_from_surface(cast[ptr Display00](display.impl), cast[ptr cairo.Surface00](surface.impl), x, y) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_cursor_get_display*(self: ptr Cursor00): ptr Display00 {. + importc: "gdk_cursor_get_display", libprag.} + +proc getDisplay*(self: Cursor): Display = + let gobj = gdk_cursor_get_display(cast[ptr Cursor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: Cursor): Display = + let gobj = gdk_cursor_get_display(cast[ptr Cursor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_cursor_get_image*(self: ptr Cursor00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gdk_cursor_get_image", libprag.} + +proc getImage*(self: Cursor): gdkpixbuf.Pixbuf = + let gobj = gdk_cursor_get_image(cast[ptr Cursor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc image*(self: Cursor): gdkpixbuf.Pixbuf = + let gobj = gdk_cursor_get_image(cast[ptr Cursor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_cursor_get_surface*(self: ptr Cursor00; xHot: var cdouble; yHot: var cdouble): ptr cairo.Surface00 {. + importc: "gdk_cursor_get_surface", libprag.} + +proc getSurface*(self: Cursor; xHot: var cdouble; yHot: var cdouble): cairo.Surface = + new(result) + result.impl = gdk_cursor_get_surface(cast[ptr Cursor00](self.impl), xHot, yHot) + +proc surface*(self: Cursor; xHot: var cdouble; yHot: var cdouble): cairo.Surface = + new(result) + result.impl = gdk_cursor_get_surface(cast[ptr Cursor00](self.impl), xHot, yHot) + +proc gdk_cursor_ref*(self: ptr Cursor00): ptr Cursor00 {. + importc: "gdk_cursor_ref", libprag.} + +proc `ref`*(self: Cursor): Cursor = + let gobj = gdk_cursor_ref(cast[ptr Cursor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Cursor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_cursor_unref*(self: ptr Cursor00) {. + importc: "gdk_cursor_unref", libprag.} + +proc unref*(self: Cursor) = + gdk_cursor_unref(cast[ptr Cursor00](self.impl)) + +proc gdk_window_get_cursor*(self: ptr Window00): ptr Cursor00 {. + importc: "gdk_window_get_cursor", libprag.} + +proc getCursor*(self: Window): Cursor = + let gobj = gdk_window_get_cursor(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Cursor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc cursor*(self: Window): Cursor = + let gobj = gdk_window_get_cursor(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Cursor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_get_device_cursor*(self: ptr Window00; device: ptr Device00): ptr Cursor00 {. + importc: "gdk_window_get_device_cursor", libprag.} + +proc getDeviceCursor*(self: Window; device: Device): Cursor = + let gobj = gdk_window_get_device_cursor(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Cursor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc deviceCursor*(self: Window; device: Device): Cursor = + let gobj = gdk_window_get_device_cursor(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Cursor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_window_set_cursor*(self: ptr Window00; cursor: ptr Cursor00) {. + importc: "gdk_window_set_cursor", libprag.} + +proc setCursor*(self: Window; cursor: Cursor) = + gdk_window_set_cursor(cast[ptr Window00](self.impl), cast[ptr Cursor00](cursor.impl)) + +proc `cursor=`*(self: Window; cursor: Cursor) = + gdk_window_set_cursor(cast[ptr Window00](self.impl), cast[ptr Cursor00](cursor.impl)) + +proc gdk_window_set_device_cursor*(self: ptr Window00; device: ptr Device00; cursor: ptr Cursor00) {. + importc: "gdk_window_set_device_cursor", libprag.} + +proc setDeviceCursor*(self: Window; device: Device; cursor: Cursor) = + gdk_window_set_device_cursor(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl), cast[ptr Cursor00](cursor.impl)) + +type + CursorType* {.size: sizeof(cint), pure.} = enum + blankCursor = -2 + cursorIsPixmap = -1 + xCursor = 0 + arrow = 2 + basedArrowDown = 4 + basedArrowUp = 6 + boat = 8 + bogosity = 10 + bottomLeftCorner = 12 + bottomRightCorner = 14 + bottomSide = 16 + bottomTee = 18 + boxSpiral = 20 + centerPtr = 22 + circle = 24 + clock = 26 + coffeeMug = 28 + cross = 30 + crossReverse = 32 + crosshair = 34 + diamondCross = 36 + dot = 38 + dotbox = 40 + doubleArrow = 42 + draftLarge = 44 + draftSmall = 46 + drapedBox = 48 + exchange = 50 + fleur = 52 + gobbler = 54 + gumby = 56 + hand1 = 58 + hand2 = 60 + heart = 62 + icon = 64 + ironCross = 66 + leftPtr = 68 + leftSide = 70 + leftTee = 72 + leftbutton = 74 + llAngle = 76 + lrAngle = 78 + man = 80 + middlebutton = 82 + mouse = 84 + pencil = 86 + pirate = 88 + plus = 90 + questionArrow = 92 + rightPtr = 94 + rightSide = 96 + rightTee = 98 + rightbutton = 100 + rtlLogo = 102 + sailboat = 104 + sbDownArrow = 106 + sbHDoubleArrow = 108 + sbLeftArrow = 110 + sbRightArrow = 112 + sbUpArrow = 114 + sbVDoubleArrow = 116 + shuttle = 118 + sizing = 120 + spider = 122 + spraycan = 124 + star = 126 + target = 128 + tcross = 130 + topLeftArrow = 132 + topLeftCorner = 134 + topRightCorner = 136 + topSide = 138 + topTee = 140 + trek = 142 + ulAngle = 144 + umbrella = 146 + urAngle = 148 + watch = 150 + xterm = 152 + lastCursor = 153 + +proc gdk_cursor_new*(cursorType: CursorType): ptr Cursor00 {. + importc: "gdk_cursor_new", libprag.} + +proc newCursor*(cursorType: CursorType): Cursor = + new(result, finalizeGObject) + result.impl = gdk_cursor_new(cursorType) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCursor*[T](result: var T; cursorType: CursorType) = + assert(result is Cursor) + new(result, finalizeGObject) + result.impl = gdk_cursor_new(cursorType) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_cursor_new_for_display*(display: ptr Display00; cursorType: CursorType): ptr Cursor00 {. + importc: "gdk_cursor_new_for_display", libprag.} + +proc newCursorForDisplay*(display: Display; cursorType: CursorType): Cursor = + new(result, finalizeGObject) + result.impl = gdk_cursor_new_for_display(cast[ptr Display00](display.impl), cursorType) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCursorForDisplay*[T](result: var T; display: Display; cursorType: CursorType) = + assert(result is Cursor) + new(result, finalizeGObject) + result.impl = gdk_cursor_new_for_display(cast[ptr Display00](display.impl), cursorType) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_cursor_get_cursor_type*(self: ptr Cursor00): CursorType {. + importc: "gdk_cursor_get_cursor_type", libprag.} + +proc getCursorType*(self: Cursor): CursorType = + gdk_cursor_get_cursor_type(cast[ptr Cursor00](self.impl)) + +proc cursorType*(self: Cursor): CursorType = + gdk_cursor_get_cursor_type(cast[ptr Cursor00](self.impl)) + +type + FullscreenMode* {.size: sizeof(cint), pure.} = enum + currentMonitor = 0 + allMonitors = 1 + +proc gdk_window_get_fullscreen_mode*(self: ptr Window00): FullscreenMode {. + importc: "gdk_window_get_fullscreen_mode", libprag.} + +proc getFullscreenMode*(self: Window): FullscreenMode = + gdk_window_get_fullscreen_mode(cast[ptr Window00](self.impl)) + +proc fullscreenMode*(self: Window): FullscreenMode = + gdk_window_get_fullscreen_mode(cast[ptr Window00](self.impl)) + +proc gdk_window_set_fullscreen_mode*(self: ptr Window00; mode: FullscreenMode) {. + importc: "gdk_window_set_fullscreen_mode", libprag.} + +proc setFullscreenMode*(self: Window; mode: FullscreenMode) = + gdk_window_set_fullscreen_mode(cast[ptr Window00](self.impl), mode) + +proc `fullscreenMode=`*(self: Window; mode: FullscreenMode) = + gdk_window_set_fullscreen_mode(cast[ptr Window00](self.impl), mode) + +type + WMFunction* {.size: sizeof(cint), pure.} = enum + all = 1 + resize = 2 + move = 4 + minimize = 8 + maximize = 16 + close = 32 + +proc gdk_window_set_functions*(self: ptr Window00; functions: WMFunction) {. + importc: "gdk_window_set_functions", libprag.} + +proc setFunctions*(self: Window; functions: WMFunction) = + gdk_window_set_functions(cast[ptr Window00](self.impl), functions) + +proc `functions=`*(self: Window; functions: WMFunction) = + gdk_window_set_functions(cast[ptr Window00](self.impl), functions) + +type + Gravity* {.size: sizeof(cint), pure.} = enum + northWest = 1 + north = 2 + northEast = 3 + west = 4 + center = 5 + east = 6 + southWest = 7 + south = 8 + southEast = 9 + `static` = 10 + +type + Geometry00* {.pure.} = object + minWidth*: int32 + minHeight*: int32 + maxWidth*: int32 + maxHeight*: int32 + baseWidth*: int32 + baseHeight*: int32 + widthInc*: int32 + heightInc*: int32 + minAspect*: cdouble + maxAspect*: cdouble + winGravity*: Gravity + Geometry* = ref object + impl*: ptr Geometry00 + +type + WindowHints* {.size: sizeof(cint), pure.} = enum + pos = 1 + minSize = 2 + maxSize = 4 + baseSize = 8 + aspect = 16 + resizeInc = 32 + winGravity = 64 + userPos = 128 + userSize = 256 + +proc gdk_window_constrain_size*(geometry: ptr Geometry00; flags: WindowHints; width: int32; + height: int32; newWidth: var int32; newHeight: var int32) {. + importc: "gdk_window_constrain_size", libprag.} + +proc constrainSize*(geometry: Geometry; flags: WindowHints; width: int; + height: int; newWidth: var int; newHeight: var int) = + var newHeight_00 = int32(newHeight) + var newWidth_00 = int32(newWidth) + gdk_window_constrain_size(cast[ptr Geometry00](geometry.impl), flags, int32(width), int32(height), newWidth_00, newHeight_00) + newHeight = int(newHeight_00) + newWidth = int(newWidth_00) + +proc gdk_window_set_geometry_hints*(self: ptr Window00; geometry: ptr Geometry00; geomMask: WindowHints) {. + importc: "gdk_window_set_geometry_hints", libprag.} + +proc setGeometryHints*(self: Window; geometry: Geometry; geomMask: WindowHints) = + gdk_window_set_geometry_hints(cast[ptr Window00](self.impl), cast[ptr Geometry00](geometry.impl), geomMask) + +type + EventMask* {.size: sizeof(cint), pure.} = enum + exposureMask = 2 + pointerMotionMask = 4 + pointerMotionHintMask = 8 + buttonMotionMask = 16 + button1MotionMask = 32 + button2MotionMask = 64 + button3MotionMask = 128 + buttonPressMask = 256 + buttonReleaseMask = 512 + keyPressMask = 1024 + keyReleaseMask = 2048 + enterNotifyMask = 4096 + leaveNotifyMask = 8192 + focusChangeMask = 16384 + structureMask = 32768 + propertyChangeMask = 65536 + visibilityNotifyMask = 131072 + proximityInMask = 262144 + proximityOutMask = 524288 + substructureMask = 1048576 + scrollMask = 2097152 + touchMask = 4194304 + smoothScrollMask = 8388608 + allEventsMask = 16777214 + touchpadGestureMask = 16777216 + tabletPadMask = 33554432 + +proc gdk_window_get_device_events*(self: ptr Window00; device: ptr Device00): EventMask {. + importc: "gdk_window_get_device_events", libprag.} + +proc getDeviceEvents*(self: Window; device: Device): EventMask = + gdk_window_get_device_events(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl)) + +proc deviceEvents*(self: Window; device: Device): EventMask = + gdk_window_get_device_events(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl)) + +proc gdk_window_get_events*(self: ptr Window00): EventMask {. + importc: "gdk_window_get_events", libprag.} + +proc getEvents*(self: Window): EventMask = + gdk_window_get_events(cast[ptr Window00](self.impl)) + +proc events*(self: Window): EventMask = + gdk_window_get_events(cast[ptr Window00](self.impl)) + +proc gdk_window_get_source_events*(self: ptr Window00; source: InputSource): EventMask {. + importc: "gdk_window_get_source_events", libprag.} + +proc getSourceEvents*(self: Window; source: InputSource): EventMask = + gdk_window_get_source_events(cast[ptr Window00](self.impl), source) + +proc sourceEvents*(self: Window; source: InputSource): EventMask = + gdk_window_get_source_events(cast[ptr Window00](self.impl), source) + +proc gdk_window_set_device_events*(self: ptr Window00; device: ptr Device00; eventMask: EventMask) {. + importc: "gdk_window_set_device_events", libprag.} + +proc setDeviceEvents*(self: Window; device: Device; eventMask: EventMask) = + gdk_window_set_device_events(cast[ptr Window00](self.impl), cast[ptr Device00](device.impl), eventMask) + +proc gdk_window_set_events*(self: ptr Window00; eventMask: EventMask) {. + importc: "gdk_window_set_events", libprag.} + +proc setEvents*(self: Window; eventMask: EventMask) = + gdk_window_set_events(cast[ptr Window00](self.impl), eventMask) + +proc `events=`*(self: Window; eventMask: EventMask) = + gdk_window_set_events(cast[ptr Window00](self.impl), eventMask) + +proc gdk_window_set_source_events*(self: ptr Window00; source: InputSource; eventMask: EventMask) {. + importc: "gdk_window_set_source_events", libprag.} + +proc setSourceEvents*(self: Window; source: InputSource; eventMask: EventMask) = + gdk_window_set_source_events(cast[ptr Window00](self.impl), source, eventMask) + +type + GrabStatus* {.size: sizeof(cint), pure.} = enum + success = 0 + alreadyGrabbed = 1 + invalidTime = 2 + notViewable = 3 + frozen = 4 + failed = 5 + +proc gdk_device_grab*(self: ptr Device00; window: ptr Window00; grabOwnership: GrabOwnership; + ownerEvents: gboolean; eventMask: EventMask; cursor: ptr Cursor00; time: uint32): GrabStatus {. + importc: "gdk_device_grab", libprag.} + +proc grab*(self: Device; window: Window; grabOwnership: GrabOwnership; + ownerEvents: bool; eventMask: EventMask; cursor: Cursor; time: int): GrabStatus = + gdk_device_grab(cast[ptr Device00](self.impl), cast[ptr Window00](window.impl), grabOwnership, gboolean(ownerEvents), eventMask, cast[ptr Cursor00](cursor.impl), uint32(time)) + +type + WindowTypeHint* {.size: sizeof(cint), pure.} = enum + normal = 0 + dialog = 1 + menu = 2 + toolbar = 3 + splashscreen = 4 + utility = 5 + dock = 6 + desktop = 7 + dropdownMenu = 8 + popupMenu = 9 + tooltip = 10 + notification = 11 + combo = 12 + dnd = 13 + +type + WindowAttr00* {.pure.} = object + title*: cstring + eventMask*: int32 + x*: int32 + y*: int32 + width*: int32 + height*: int32 + wclass*: WindowWindowClass + visual*: ptr Visual00 + windowType*: WindowType + cursor*: ptr Cursor00 + wmclassName*: cstring + wmclassClass*: cstring + overrideRedirect*: gboolean + typeHint*: WindowTypeHint + WindowAttr* = ref object + impl*: ptr WindowAttr00 + +proc gdk_window_get_type_hint*(self: ptr Window00): WindowTypeHint {. + importc: "gdk_window_get_type_hint", libprag.} + +proc getTypeHint*(self: Window): WindowTypeHint = + gdk_window_get_type_hint(cast[ptr Window00](self.impl)) + +proc typeHint*(self: Window): WindowTypeHint = + gdk_window_get_type_hint(cast[ptr Window00](self.impl)) + +proc gdk_window_set_type_hint*(self: ptr Window00; hint: WindowTypeHint) {. + importc: "gdk_window_set_type_hint", libprag.} + +proc setTypeHint*(self: Window; hint: WindowTypeHint) = + gdk_window_set_type_hint(cast[ptr Window00](self.impl), hint) + +proc `typeHint=`*(self: Window; hint: WindowTypeHint) = + gdk_window_set_type_hint(cast[ptr Window00](self.impl), hint) + +type + WindowAttributesType* {.size: sizeof(cint), pure.} = enum + title = 2 + x = 4 + y = 8 + cursor = 16 + visual = 32 + wmclass = 64 + noredir = 128 + typeHint = 256 + +proc gdk_window_new*(parent: ptr Window00; attributes: ptr WindowAttr00; + attributesMask: WindowAttributesType): ptr Window00 {. + importc: "gdk_window_new", libprag.} + +proc newWindow*(parent: Window; attributes: WindowAttr; attributesMask: WindowAttributesType): Window = + new(result, finalizeGObject) + result.impl = gdk_window_new(cast[ptr Window00](parent.impl), cast[ptr WindowAttr00](attributes.impl), attributesMask) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initWindow*[T](result: var T; parent: Window; attributes: WindowAttr; attributesMask: WindowAttributesType) = + assert(result is Window) + new(result, finalizeGObject) + result.impl = gdk_window_new(cast[ptr Window00](parent.impl), cast[ptr WindowAttr00](attributes.impl), attributesMask) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SubpixelLayout* {.size: sizeof(cint), pure.} = enum + unknown = 0 + none = 1 + horizontalRgb = 2 + horizontalBgr = 3 + verticalRgb = 4 + verticalBgr = 5 + +proc gdk_monitor_get_subpixel_layout*(self: ptr Monitor00): SubpixelLayout {. + importc: "gdk_monitor_get_subpixel_layout", libprag.} + +proc getSubpixelLayout*(self: Monitor): SubpixelLayout = + gdk_monitor_get_subpixel_layout(cast[ptr Monitor00](self.impl)) + +proc subpixelLayout*(self: Monitor): SubpixelLayout = + gdk_monitor_get_subpixel_layout(cast[ptr Monitor00](self.impl)) + +type + Rectangle00* {.pure.} = object + x*: int32 + y*: int32 + width*: int32 + height*: int32 + Rectangle* = ref object + impl*: ptr Rectangle00 + +proc gdk_rectangle_equal*(self: ptr Rectangle00; rect2: ptr Rectangle00): gboolean {. + importc: "gdk_rectangle_equal", libprag.} + +proc equal*(self: Rectangle; rect2: Rectangle): bool = + toBool(gdk_rectangle_equal(cast[ptr Rectangle00](self.impl), cast[ptr Rectangle00](rect2.impl))) + +proc gdk_rectangle_intersect*(self: ptr Rectangle00; src2: ptr Rectangle00; dest: var Rectangle00): gboolean {. + importc: "gdk_rectangle_intersect", libprag.} + +proc intersect*(self: ptr Rectangle00; src2: ptr Rectangle00; dest: var Rectangle00): gboolean {. + importc: "gdk_rectangle_intersect", libprag.} + +proc gdk_rectangle_union*(self: ptr Rectangle00; src2: ptr Rectangle00; dest: var Rectangle00) {. + importc: "gdk_rectangle_union", libprag.} + +proc union*(self: ptr Rectangle00; src2: ptr Rectangle00; dest: var Rectangle00) {. + importc: "gdk_rectangle_union", libprag.} + +proc gdk_monitor_get_geometry*(self: ptr Monitor00; geometry: var Rectangle00) {. + importc: "gdk_monitor_get_geometry", libprag.} + +proc getGeometry*(self: ptr Monitor00; geometry: var Rectangle00) {. + importc: "gdk_monitor_get_geometry", libprag.} + +proc geometry*(self: ptr Monitor00; geometry: var Rectangle00) {. + importc: "gdk_monitor_get_geometry", libprag.} + +proc gdk_monitor_get_workarea*(self: ptr Monitor00; workarea: var Rectangle00) {. + importc: "gdk_monitor_get_workarea", libprag.} + +proc getWorkarea*(self: ptr Monitor00; workarea: var Rectangle00) {. + importc: "gdk_monitor_get_workarea", libprag.} + +proc workarea*(self: ptr Monitor00; workarea: var Rectangle00) {. + importc: "gdk_monitor_get_workarea", libprag.} + +proc gdk_window_begin_paint_rect*(self: ptr Window00; rectangle: ptr Rectangle00) {. + importc: "gdk_window_begin_paint_rect", libprag.} + +proc beginPaintRect*(self: Window; rectangle: Rectangle) = + gdk_window_begin_paint_rect(cast[ptr Window00](self.impl), cast[ptr Rectangle00](rectangle.impl)) + +proc gdk_window_get_frame_extents*(self: ptr Window00; rect: var Rectangle00) {. + importc: "gdk_window_get_frame_extents", libprag.} + +proc getFrameExtents*(self: ptr Window00; rect: var Rectangle00) {. + importc: "gdk_window_get_frame_extents", libprag.} + +proc frameExtents*(self: ptr Window00; rect: var Rectangle00) {. + importc: "gdk_window_get_frame_extents", libprag.} + +proc gdk_window_invalidate_rect*(self: ptr Window00; rect: ptr Rectangle00; invalidateChildren: gboolean) {. + importc: "gdk_window_invalidate_rect", libprag.} + +proc invalidateRect*(self: Window; rect: Rectangle; invalidateChildren: bool) = + gdk_window_invalidate_rect(cast[ptr Window00](self.impl), cast[ptr Rectangle00](rect.impl), gboolean(invalidateChildren)) + +type + Screen* = ref object of gobject.Object + Screen00* = object of gobject.Object00 + +proc scCompositedChanged*(self: Screen; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "composited-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMonitorsChanged*(self: Screen; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "monitors-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSizeChanged*(self: Screen; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "size-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_screen_get_default*(): ptr Screen00 {. + importc: "gdk_screen_get_default", libprag.} + +proc getDefault*(): Screen = + let gobj = gdk_screen_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): Screen = + let gobj = gdk_screen_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_screen_height*(): int32 {. + importc: "gdk_screen_height", libprag.} + +proc height*(): int32 {. + importc: "gdk_screen_height", libprag.} + +proc gdk_screen_height_mm*(): int32 {. + importc: "gdk_screen_height_mm", libprag.} + +proc heightMm*(): int32 {. + importc: "gdk_screen_height_mm", libprag.} + +proc gdk_screen_width*(): int32 {. + importc: "gdk_screen_width", libprag.} + +proc width*(): int32 {. + importc: "gdk_screen_width", libprag.} + +proc gdk_screen_width_mm*(): int32 {. + importc: "gdk_screen_width_mm", libprag.} + +proc widthMm*(): int32 {. + importc: "gdk_screen_width_mm", libprag.} + +proc gdk_screen_get_active_window*(self: ptr Screen00): ptr Window00 {. + importc: "gdk_screen_get_active_window", libprag.} + +proc getActiveWindow*(self: Screen): Window = + let gobj = gdk_screen_get_active_window(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc activeWindow*(self: Screen): Window = + let gobj = gdk_screen_get_active_window(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_screen_get_display*(self: ptr Screen00): ptr Display00 {. + importc: "gdk_screen_get_display", libprag.} + +proc getDisplay*(self: Screen): Display = + let gobj = gdk_screen_get_display(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: Screen): Display = + let gobj = gdk_screen_get_display(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_screen_get_font_options*(self: ptr Screen00): ptr cairo.FontOptions00 {. + importc: "gdk_screen_get_font_options", libprag.} + +proc getFontOptions*(self: Screen): cairo.FontOptions = + new(result) + result.impl = gdk_screen_get_font_options(cast[ptr Screen00](self.impl)) + +proc fontOptions*(self: Screen): cairo.FontOptions = + new(result) + result.impl = gdk_screen_get_font_options(cast[ptr Screen00](self.impl)) + +proc gdk_screen_get_height*(self: ptr Screen00): int32 {. + importc: "gdk_screen_get_height", libprag.} + +proc getHeight*(self: Screen): int = + int(gdk_screen_get_height(cast[ptr Screen00](self.impl))) + +proc height*(self: Screen): int = + int(gdk_screen_get_height(cast[ptr Screen00](self.impl))) + +proc gdk_screen_get_height_mm*(self: ptr Screen00): int32 {. + importc: "gdk_screen_get_height_mm", libprag.} + +proc getHeightMm*(self: Screen): int = + int(gdk_screen_get_height_mm(cast[ptr Screen00](self.impl))) + +proc heightMm*(self: Screen): int = + int(gdk_screen_get_height_mm(cast[ptr Screen00](self.impl))) + +proc gdk_screen_get_monitor_at_point*(self: ptr Screen00; x: int32; y: int32): int32 {. + importc: "gdk_screen_get_monitor_at_point", libprag.} + +proc getMonitorAtPoint*(self: Screen; x: int; y: int): int = + int(gdk_screen_get_monitor_at_point(cast[ptr Screen00](self.impl), int32(x), int32(y))) + +proc monitorAtPoint*(self: Screen; x: int; y: int): int = + int(gdk_screen_get_monitor_at_point(cast[ptr Screen00](self.impl), int32(x), int32(y))) + +proc gdk_screen_get_monitor_at_window*(self: ptr Screen00; window: ptr Window00): int32 {. + importc: "gdk_screen_get_monitor_at_window", libprag.} + +proc getMonitorAtWindow*(self: Screen; window: Window): int = + int(gdk_screen_get_monitor_at_window(cast[ptr Screen00](self.impl), cast[ptr Window00](window.impl))) + +proc monitorAtWindow*(self: Screen; window: Window): int = + int(gdk_screen_get_monitor_at_window(cast[ptr Screen00](self.impl), cast[ptr Window00](window.impl))) + +proc gdk_screen_get_monitor_geometry*(self: ptr Screen00; monitorNum: int32; dest: var Rectangle00) {. + importc: "gdk_screen_get_monitor_geometry", libprag.} + +proc getMonitorGeometry*(self: ptr Screen00; monitorNum: int32; dest: var Rectangle00) {. + importc: "gdk_screen_get_monitor_geometry", libprag.} + +proc monitorGeometry*(self: ptr Screen00; monitorNum: int32; dest: var Rectangle00) {. + importc: "gdk_screen_get_monitor_geometry", libprag.} + +proc gdk_screen_get_monitor_height_mm*(self: ptr Screen00; monitorNum: int32): int32 {. + importc: "gdk_screen_get_monitor_height_mm", libprag.} + +proc getMonitorHeightMm*(self: Screen; monitorNum: int): int = + int(gdk_screen_get_monitor_height_mm(cast[ptr Screen00](self.impl), int32(monitorNum))) + +proc monitorHeightMm*(self: Screen; monitorNum: int): int = + int(gdk_screen_get_monitor_height_mm(cast[ptr Screen00](self.impl), int32(monitorNum))) + +proc gdk_screen_get_monitor_plug_name*(self: ptr Screen00; monitorNum: int32): cstring {. + importc: "gdk_screen_get_monitor_plug_name", libprag.} + +proc getMonitorPlugName*(self: Screen; monitorNum: int): string = + let resul0 = gdk_screen_get_monitor_plug_name(cast[ptr Screen00](self.impl), int32(monitorNum)) + result = $resul0 + cogfree(resul0) + +proc monitorPlugName*(self: Screen; monitorNum: int): string = + let resul0 = gdk_screen_get_monitor_plug_name(cast[ptr Screen00](self.impl), int32(monitorNum)) + result = $resul0 + cogfree(resul0) + +proc gdk_screen_get_monitor_scale_factor*(self: ptr Screen00; monitorNum: int32): int32 {. + importc: "gdk_screen_get_monitor_scale_factor", libprag.} + +proc getMonitorScaleFactor*(self: Screen; monitorNum: int): int = + int(gdk_screen_get_monitor_scale_factor(cast[ptr Screen00](self.impl), int32(monitorNum))) + +proc monitorScaleFactor*(self: Screen; monitorNum: int): int = + int(gdk_screen_get_monitor_scale_factor(cast[ptr Screen00](self.impl), int32(monitorNum))) + +proc gdk_screen_get_monitor_width_mm*(self: ptr Screen00; monitorNum: int32): int32 {. + importc: "gdk_screen_get_monitor_width_mm", libprag.} + +proc getMonitorWidthMm*(self: Screen; monitorNum: int): int = + int(gdk_screen_get_monitor_width_mm(cast[ptr Screen00](self.impl), int32(monitorNum))) + +proc monitorWidthMm*(self: Screen; monitorNum: int): int = + int(gdk_screen_get_monitor_width_mm(cast[ptr Screen00](self.impl), int32(monitorNum))) + +proc gdk_screen_get_monitor_workarea*(self: ptr Screen00; monitorNum: int32; dest: var Rectangle00) {. + importc: "gdk_screen_get_monitor_workarea", libprag.} + +proc getMonitorWorkarea*(self: ptr Screen00; monitorNum: int32; dest: var Rectangle00) {. + importc: "gdk_screen_get_monitor_workarea", libprag.} + +proc monitorWorkarea*(self: ptr Screen00; monitorNum: int32; dest: var Rectangle00) {. + importc: "gdk_screen_get_monitor_workarea", libprag.} + +proc gdk_screen_get_n_monitors*(self: ptr Screen00): int32 {. + importc: "gdk_screen_get_n_monitors", libprag.} + +proc getNMonitors*(self: Screen): int = + int(gdk_screen_get_n_monitors(cast[ptr Screen00](self.impl))) + +proc nMonitors*(self: Screen): int = + int(gdk_screen_get_n_monitors(cast[ptr Screen00](self.impl))) + +proc gdk_screen_get_number*(self: ptr Screen00): int32 {. + importc: "gdk_screen_get_number", libprag.} + +proc getNumber*(self: Screen): int = + int(gdk_screen_get_number(cast[ptr Screen00](self.impl))) + +proc number*(self: Screen): int = + int(gdk_screen_get_number(cast[ptr Screen00](self.impl))) + +proc gdk_screen_get_primary_monitor*(self: ptr Screen00): int32 {. + importc: "gdk_screen_get_primary_monitor", libprag.} + +proc getPrimaryMonitor*(self: Screen): int = + int(gdk_screen_get_primary_monitor(cast[ptr Screen00](self.impl))) + +proc primaryMonitor*(self: Screen): int = + int(gdk_screen_get_primary_monitor(cast[ptr Screen00](self.impl))) + +proc gdk_screen_get_resolution*(self: ptr Screen00): cdouble {. + importc: "gdk_screen_get_resolution", libprag.} + +proc getResolution*(self: Screen): cdouble = + gdk_screen_get_resolution(cast[ptr Screen00](self.impl)) + +proc resolution*(self: Screen): cdouble = + gdk_screen_get_resolution(cast[ptr Screen00](self.impl)) + +proc gdk_screen_get_rgba_visual*(self: ptr Screen00): ptr Visual00 {. + importc: "gdk_screen_get_rgba_visual", libprag.} + +proc getRgbaVisual*(self: Screen): Visual = + let gobj = gdk_screen_get_rgba_visual(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rgbaVisual*(self: Screen): Visual = + let gobj = gdk_screen_get_rgba_visual(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_screen_get_root_window*(self: ptr Screen00): ptr Window00 {. + importc: "gdk_screen_get_root_window", libprag.} + +proc getRootWindow*(self: Screen): Window = + let gobj = gdk_screen_get_root_window(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rootWindow*(self: Screen): Window = + let gobj = gdk_screen_get_root_window(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_screen_get_setting*(self: ptr Screen00; name: cstring; value: ptr gobject.Value00): gboolean {. + importc: "gdk_screen_get_setting", libprag.} + +proc getSetting*(self: Screen; name: string; value: gobject.Value): bool = + toBool(gdk_screen_get_setting(cast[ptr Screen00](self.impl), cstring(name), cast[ptr gobject.Value00](value.impl))) + +proc `ting=`*(self: Screen; name: string; value: gobject.Value): bool = + toBool(gdk_screen_get_setting(cast[ptr Screen00](self.impl), cstring(name), cast[ptr gobject.Value00](value.impl))) + +proc gdk_screen_get_system_visual*(self: ptr Screen00): ptr Visual00 {. + importc: "gdk_screen_get_system_visual", libprag.} + +proc getSystemVisual*(self: Screen): Visual = + let gobj = gdk_screen_get_system_visual(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc systemVisual*(self: Screen): Visual = + let gobj = gdk_screen_get_system_visual(cast[ptr Screen00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_screen_get_toplevel_windows*(self: ptr Screen00): ptr pointer {. + importc: "gdk_screen_get_toplevel_windows", libprag.} + +proc getToplevelWindows*(self: Screen): ptr pointer = + gdk_screen_get_toplevel_windows(cast[ptr Screen00](self.impl)) + +proc toplevelWindows*(self: Screen): ptr pointer = + gdk_screen_get_toplevel_windows(cast[ptr Screen00](self.impl)) + +proc gdk_screen_get_width*(self: ptr Screen00): int32 {. + importc: "gdk_screen_get_width", libprag.} + +proc getWidth*(self: Screen): int = + int(gdk_screen_get_width(cast[ptr Screen00](self.impl))) + +proc width*(self: Screen): int = + int(gdk_screen_get_width(cast[ptr Screen00](self.impl))) + +proc gdk_screen_get_width_mm*(self: ptr Screen00): int32 {. + importc: "gdk_screen_get_width_mm", libprag.} + +proc getWidthMm*(self: Screen): int = + int(gdk_screen_get_width_mm(cast[ptr Screen00](self.impl))) + +proc widthMm*(self: Screen): int = + int(gdk_screen_get_width_mm(cast[ptr Screen00](self.impl))) + +proc gdk_screen_get_window_stack*(self: ptr Screen00): ptr pointer {. + importc: "gdk_screen_get_window_stack", libprag.} + +proc getWindowStack*(self: Screen): ptr pointer = + gdk_screen_get_window_stack(cast[ptr Screen00](self.impl)) + +proc windowStack*(self: Screen): ptr pointer = + gdk_screen_get_window_stack(cast[ptr Screen00](self.impl)) + +proc gdk_screen_is_composited*(self: ptr Screen00): gboolean {. + importc: "gdk_screen_is_composited", libprag.} + +proc isComposited*(self: Screen): bool = + toBool(gdk_screen_is_composited(cast[ptr Screen00](self.impl))) + +proc gdk_screen_list_visuals*(self: ptr Screen00): ptr pointer {. + importc: "gdk_screen_list_visuals", libprag.} + +proc listVisuals*(self: Screen): ptr pointer = + gdk_screen_list_visuals(cast[ptr Screen00](self.impl)) + +proc gdk_screen_make_display_name*(self: ptr Screen00): cstring {. + importc: "gdk_screen_make_display_name", libprag.} + +proc makeDisplayName*(self: Screen): string = + let resul0 = gdk_screen_make_display_name(cast[ptr Screen00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gdk_screen_set_font_options*(self: ptr Screen00; options: ptr cairo.FontOptions00) {. + importc: "gdk_screen_set_font_options", libprag.} + +proc setFontOptions*(self: Screen; options: cairo.FontOptions) = + gdk_screen_set_font_options(cast[ptr Screen00](self.impl), cast[ptr cairo.FontOptions00](options.impl)) + +proc `fontOptions=`*(self: Screen; options: cairo.FontOptions) = + gdk_screen_set_font_options(cast[ptr Screen00](self.impl), cast[ptr cairo.FontOptions00](options.impl)) + +proc gdk_screen_set_resolution*(self: ptr Screen00; dpi: cdouble) {. + importc: "gdk_screen_set_resolution", libprag.} + +proc setResolution*(self: Screen; dpi: cdouble) = + gdk_screen_set_resolution(cast[ptr Screen00](self.impl), dpi) + +proc `resolution=`*(self: Screen; dpi: cdouble) = + gdk_screen_set_resolution(cast[ptr Screen00](self.impl), dpi) + +proc gdk_app_launch_context_set_screen*(self: ptr AppLaunchContext00; screen: ptr Screen00) {. + importc: "gdk_app_launch_context_set_screen", libprag.} + +proc setScreen*(self: AppLaunchContext; screen: Screen) = + gdk_app_launch_context_set_screen(cast[ptr AppLaunchContext00](self.impl), cast[ptr Screen00](screen.impl)) + +proc `screen=`*(self: AppLaunchContext; screen: Screen) = + gdk_app_launch_context_set_screen(cast[ptr AppLaunchContext00](self.impl), cast[ptr Screen00](screen.impl)) + +proc gdk_device_get_position*(self: ptr Device00; screen: var ptr Screen00; x: var int32; + y: var int32) {. + importc: "gdk_device_get_position", libprag.} + +proc getPosition*(self: ptr Device00; screen: var ptr Screen00; x: var int32; + y: var int32) {. + importc: "gdk_device_get_position", libprag.} + +proc position*(self: ptr Device00; screen: var ptr Screen00; x: var int32; + y: var int32) {. + importc: "gdk_device_get_position", libprag.} + +proc gdk_device_get_position_double*(self: ptr Device00; screen: var ptr Screen00; x: var cdouble; + y: var cdouble) {. + importc: "gdk_device_get_position_double", libprag.} + +proc getPositionDouble*(self: ptr Device00; screen: var ptr Screen00; x: var cdouble; + y: var cdouble) {. + importc: "gdk_device_get_position_double", libprag.} + +proc positionDouble*(self: ptr Device00; screen: var ptr Screen00; x: var cdouble; + y: var cdouble) {. + importc: "gdk_device_get_position_double", libprag.} + +proc gdk_device_warp*(self: ptr Device00; screen: ptr Screen00; x: int32; + y: int32) {. + importc: "gdk_device_warp", libprag.} + +proc warp*(self: Device; screen: Screen; x: int; y: int) = + gdk_device_warp(cast[ptr Device00](self.impl), cast[ptr Screen00](screen.impl), int32(x), int32(y)) + +proc gdk_display_get_default_screen*(self: ptr Display00): ptr Screen00 {. + importc: "gdk_display_get_default_screen", libprag.} + +proc getDefaultScreen*(self: Display): Screen = + let gobj = gdk_display_get_default_screen(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultScreen*(self: Display): Screen = + let gobj = gdk_display_get_default_screen(cast[ptr Display00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_get_pointer*(self: ptr Display00; screen: var ptr Screen00; x: var int32; + y: var int32; mask: var ModifierType) {. + importc: "gdk_display_get_pointer", libprag.} + +proc getPointer*(self: ptr Display00; screen: var ptr Screen00; x: var int32; + y: var int32; mask: var ModifierType) {. + importc: "gdk_display_get_pointer", libprag.} + +proc gdk_display_get_screen*(self: ptr Display00; screenNum: int32): ptr Screen00 {. + importc: "gdk_display_get_screen", libprag.} + +proc getScreen*(self: Display; screenNum: int): Screen = + let gobj = gdk_display_get_screen(cast[ptr Display00](self.impl), int32(screenNum)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: Display; screenNum: int): Screen = + let gobj = gdk_display_get_screen(cast[ptr Display00](self.impl), int32(screenNum)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_warp_pointer*(self: ptr Display00; screen: ptr Screen00; x: int32; + y: int32) {. + importc: "gdk_display_warp_pointer", libprag.} + +proc warpPointer*(self: Display; screen: Screen; x: int; y: int) = + gdk_display_warp_pointer(cast[ptr Display00](self.impl), cast[ptr Screen00](screen.impl), int32(x), int32(y)) + +proc gdk_window_get_screen*(self: ptr Window00): ptr Screen00 {. + importc: "gdk_window_get_screen", libprag.} + +proc getScreen*(self: Window): Screen = + let gobj = gdk_window_get_screen(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: Window): Screen = + let gobj = gdk_window_get_screen(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_visual_get_screen*(self: ptr Visual00): ptr Screen00 {. + importc: "gdk_visual_get_screen", libprag.} + +proc getScreen*(self: Visual): Screen = + let gobj = gdk_visual_get_screen(cast[ptr Visual00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: Visual): Screen = + let gobj = gdk_visual_get_screen(cast[ptr Visual00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +const BUTTON_MIDDLE* = 2'i32 + +const BUTTON_PRIMARY* = 1'i32 + +const BUTTON_SECONDARY* = 3'i32 + +const CURRENT_TIME* = 0'i32 + +type + CrossingMode* {.size: sizeof(cint), pure.} = enum + normal = 0 + grab = 1 + ungrab = 2 + gtkGrab = 3 + gtkUngrab = 4 + stateChanged = 5 + touchBegin = 6 + touchEnd = 7 + deviceSwitch = 8 + +type + DevicePad00* {.pure.} = object + DevicePad* = ref object + impl*: ptr DevicePad00 + +proc gdk_device_pad_get_group_n_modes*(self: ptr DevicePad00; groupIdx: int32): int32 {. + importc: "gdk_device_pad_get_group_n_modes", libprag.} + +proc getGroupNModes*(self: DevicePad; groupIdx: int): int = + int(gdk_device_pad_get_group_n_modes(cast[ptr DevicePad00](self.impl), int32(groupIdx))) + +proc groupNModes*(self: DevicePad; groupIdx: int): int = + int(gdk_device_pad_get_group_n_modes(cast[ptr DevicePad00](self.impl), int32(groupIdx))) + +proc gdk_device_pad_get_n_groups*(self: ptr DevicePad00): int32 {. + importc: "gdk_device_pad_get_n_groups", libprag.} + +proc getNGroups*(self: DevicePad): int = + int(gdk_device_pad_get_n_groups(cast[ptr DevicePad00](self.impl))) + +proc nGroups*(self: DevicePad): int = + int(gdk_device_pad_get_n_groups(cast[ptr DevicePad00](self.impl))) + +type + DevicePadFeature* {.size: sizeof(cint), pure.} = enum + button = 0 + ring = 1 + strip = 2 + +proc gdk_device_pad_get_feature_group*(self: ptr DevicePad00; feature: DevicePadFeature; + featureIdx: int32): int32 {. + importc: "gdk_device_pad_get_feature_group", libprag.} + +proc getFeatureGroup*(self: DevicePad; feature: DevicePadFeature; featureIdx: int): int = + int(gdk_device_pad_get_feature_group(cast[ptr DevicePad00](self.impl), feature, int32(featureIdx))) + +proc featureGroup*(self: DevicePad; feature: DevicePadFeature; featureIdx: int): int = + int(gdk_device_pad_get_feature_group(cast[ptr DevicePad00](self.impl), feature, int32(featureIdx))) + +proc gdk_device_pad_get_n_features*(self: ptr DevicePad00; feature: DevicePadFeature): int32 {. + importc: "gdk_device_pad_get_n_features", libprag.} + +proc getNFeatures*(self: DevicePad; feature: DevicePadFeature): int = + int(gdk_device_pad_get_n_features(cast[ptr DevicePad00](self.impl), feature)) + +proc nFeatures*(self: DevicePad; feature: DevicePadFeature): int = + int(gdk_device_pad_get_n_features(cast[ptr DevicePad00](self.impl), feature)) + +type + DevicePadInterface00* {.pure.} = object + DevicePadInterface* = ref object + impl*: ptr DevicePadInterface00 + +type + DisplayManager* = ref object of gobject.Object + DisplayManager00* = object of gobject.Object00 + +proc scDisplayOpened*(self: DisplayManager; p: proc (self: ptr gobject.Object00; display: Display00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "display-opened", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_display_manager_get*(): ptr DisplayManager00 {. + importc: "gdk_display_manager_get", libprag.} + +proc get*(): DisplayManager = + let gobj = gdk_display_manager_get() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DisplayManager](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_manager_get_default_display*(self: ptr DisplayManager00): ptr Display00 {. + importc: "gdk_display_manager_get_default_display", libprag.} + +proc getDefaultDisplay*(self: DisplayManager): Display = + let gobj = gdk_display_manager_get_default_display(cast[ptr DisplayManager00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultDisplay*(self: DisplayManager): Display = + let gobj = gdk_display_manager_get_default_display(cast[ptr DisplayManager00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_manager_list_displays*(self: ptr DisplayManager00): ptr pointer {. + importc: "gdk_display_manager_list_displays", libprag.} + +proc listDisplays*(self: DisplayManager): ptr pointer = + gdk_display_manager_list_displays(cast[ptr DisplayManager00](self.impl)) + +proc gdk_display_manager_open_display*(self: ptr DisplayManager00; name: cstring): ptr Display00 {. + importc: "gdk_display_manager_open_display", libprag.} + +proc openDisplay*(self: DisplayManager; name: string): Display = + let gobj = gdk_display_manager_open_display(cast[ptr DisplayManager00](self.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_display_manager_set_default_display*(self: ptr DisplayManager00; display: ptr Display00) {. + importc: "gdk_display_manager_set_default_display", libprag.} + +proc setDefaultDisplay*(self: DisplayManager; display: Display) = + gdk_display_manager_set_default_display(cast[ptr DisplayManager00](self.impl), cast[ptr Display00](display.impl)) + +proc `defaultDisplay=`*(self: DisplayManager; display: Display) = + gdk_display_manager_set_default_display(cast[ptr DisplayManager00](self.impl), cast[ptr Display00](display.impl)) + +type + DragAction* {.size: sizeof(cint), pure.} = enum + default = 1 + copy = 2 + move = 4 + link = 8 + private = 16 + ask = 32 + +type + DragCancelReason* {.size: sizeof(cint), pure.} = enum + noTarget = 0 + userCancelled = 1 + error = 2 + +type + DragContext* = ref object of gobject.Object + DragContext00* = object of gobject.Object00 + +proc scActionChanged*(self: DragContext; p: proc (self: ptr gobject.Object00; action: DragAction; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "action-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCancel*(self: DragContext; p: proc (self: ptr gobject.Object00; reason: DragCancelReason; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cancel", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDndFinished*(self: DragContext; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "dnd-finished", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDropPerformed*(self: DragContext; p: proc (self: ptr gobject.Object00; time: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drop-performed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_drag_context_get_actions*(self: ptr DragContext00): DragAction {. + importc: "gdk_drag_context_get_actions", libprag.} + +proc getActions*(self: DragContext): DragAction = + gdk_drag_context_get_actions(cast[ptr DragContext00](self.impl)) + +proc actions*(self: DragContext): DragAction = + gdk_drag_context_get_actions(cast[ptr DragContext00](self.impl)) + +proc gdk_drag_context_get_dest_window*(self: ptr DragContext00): ptr Window00 {. + importc: "gdk_drag_context_get_dest_window", libprag.} + +proc getDestWindow*(self: DragContext): Window = + let gobj = gdk_drag_context_get_dest_window(cast[ptr DragContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc destWindow*(self: DragContext): Window = + let gobj = gdk_drag_context_get_dest_window(cast[ptr DragContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_drag_context_get_device*(self: ptr DragContext00): ptr Device00 {. + importc: "gdk_drag_context_get_device", libprag.} + +proc getDevice*(self: DragContext): Device = + let gobj = gdk_drag_context_get_device(cast[ptr DragContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc device*(self: DragContext): Device = + let gobj = gdk_drag_context_get_device(cast[ptr DragContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_drag_context_get_drag_window*(self: ptr DragContext00): ptr Window00 {. + importc: "gdk_drag_context_get_drag_window", libprag.} + +proc getDragWindow*(self: DragContext): Window = + let gobj = gdk_drag_context_get_drag_window(cast[ptr DragContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc dragWindow*(self: DragContext): Window = + let gobj = gdk_drag_context_get_drag_window(cast[ptr DragContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_drag_context_get_protocol*(self: ptr DragContext00): DragProtocol {. + importc: "gdk_drag_context_get_protocol", libprag.} + +proc getProtocol*(self: DragContext): DragProtocol = + gdk_drag_context_get_protocol(cast[ptr DragContext00](self.impl)) + +proc protocol*(self: DragContext): DragProtocol = + gdk_drag_context_get_protocol(cast[ptr DragContext00](self.impl)) + +proc gdk_drag_context_get_selected_action*(self: ptr DragContext00): DragAction {. + importc: "gdk_drag_context_get_selected_action", libprag.} + +proc getSelectedAction*(self: DragContext): DragAction = + gdk_drag_context_get_selected_action(cast[ptr DragContext00](self.impl)) + +proc selectedAction*(self: DragContext): DragAction = + gdk_drag_context_get_selected_action(cast[ptr DragContext00](self.impl)) + +proc gdk_drag_context_get_source_window*(self: ptr DragContext00): ptr Window00 {. + importc: "gdk_drag_context_get_source_window", libprag.} + +proc getSourceWindow*(self: DragContext): Window = + let gobj = gdk_drag_context_get_source_window(cast[ptr DragContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc sourceWindow*(self: DragContext): Window = + let gobj = gdk_drag_context_get_source_window(cast[ptr DragContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_drag_context_get_suggested_action*(self: ptr DragContext00): DragAction {. + importc: "gdk_drag_context_get_suggested_action", libprag.} + +proc getSuggestedAction*(self: DragContext): DragAction = + gdk_drag_context_get_suggested_action(cast[ptr DragContext00](self.impl)) + +proc suggestedAction*(self: DragContext): DragAction = + gdk_drag_context_get_suggested_action(cast[ptr DragContext00](self.impl)) + +proc gdk_drag_context_list_targets*(self: ptr DragContext00): ptr pointer {. + importc: "gdk_drag_context_list_targets", libprag.} + +proc listTargets*(self: DragContext): ptr pointer = + gdk_drag_context_list_targets(cast[ptr DragContext00](self.impl)) + +proc gdk_drag_context_manage_dnd*(self: ptr DragContext00; ipcWindow: ptr Window00; + actions: DragAction): gboolean {. + importc: "gdk_drag_context_manage_dnd", libprag.} + +proc manageDnd*(self: DragContext; ipcWindow: Window; actions: DragAction): bool = + toBool(gdk_drag_context_manage_dnd(cast[ptr DragContext00](self.impl), cast[ptr Window00](ipcWindow.impl), actions)) + +proc gdk_drag_context_set_device*(self: ptr DragContext00; device: ptr Device00) {. + importc: "gdk_drag_context_set_device", libprag.} + +proc setDevice*(self: DragContext; device: Device) = + gdk_drag_context_set_device(cast[ptr DragContext00](self.impl), cast[ptr Device00](device.impl)) + +proc `device=`*(self: DragContext; device: Device) = + gdk_drag_context_set_device(cast[ptr DragContext00](self.impl), cast[ptr Device00](device.impl)) + +proc gdk_drag_context_set_hotspot*(self: ptr DragContext00; hotX: int32; hotY: int32) {. + importc: "gdk_drag_context_set_hotspot", libprag.} + +proc setHotspot*(self: DragContext; hotX: int; hotY: int) = + gdk_drag_context_set_hotspot(cast[ptr DragContext00](self.impl), int32(hotX), int32(hotY)) + +type + DrawingContextClass00* {.pure.} = object + DrawingContextClass* = ref object + impl*: ptr DrawingContextClass00 + +const EVENT_PROPAGATE* = false + +const EVENT_STOP* = true + +type + EventType* {.size: sizeof(cint), pure.} = enum + nothing = -1 + delete = 0 + destroy = 1 + expose = 2 + motionNotify = 3 + buttonPress = 4 + doubleButtonPress = 5 + threeButtonPress = 6 + buttonRelease = 7 + keyPress = 8 + keyRelease = 9 + enterNotify = 10 + leaveNotify = 11 + focusChange = 12 + configure = 13 + map = 14 + unmap = 15 + propertyNotify = 16 + selectionClear = 17 + selectionRequest = 18 + selectionNotify = 19 + proximityIn = 20 + proximityOut = 21 + dragEnter = 22 + dragLeave = 23 + dragMotion = 24 + dragStatus = 25 + dropStart = 26 + dropFinished = 27 + clientEvent = 28 + visibilityNotify = 29 + scroll = 31 + windowState = 32 + setting = 33 + ownerChange = 34 + grabBroken = 35 + damage = 36 + touchBegin = 37 + touchUpdate = 38 + touchEnd = 39 + touchCancel = 40 + touchpadSwipe = 41 + touchpadPinch = 42 + padButtonPress = 43 + padButtonRelease = 44 + padRing = 45 + padStrip = 46 + padGroupMode = 47 + eventLast = 48 + +const + EventTypeTwoButtonPress* = EventType.doubleButtonPress + EventTypeTripleButtonPress* = EventType.threeButtonPress + +type + EventAny00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + EventAny* = ref object + impl*: ptr EventAny00 + +type + EventExpose00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + area*: Rectangle00 + region*: ptr cairo.Region00 + count*: int32 + EventExpose* = ref object + impl*: ptr EventExpose00 + +type + VisibilityState* {.size: sizeof(cint), pure.} = enum + unobscured = 0 + partial = 1 + fullyObscured = 2 + +type + EventVisibility00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + state*: VisibilityState + EventVisibility* = ref object + impl*: ptr EventVisibility00 + +type + EventMotion00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + time*: uint32 + x*: cdouble + y*: cdouble + axes*: ptr cdouble + state*: ModifierType + isHint*: int16 + device*: ptr Device00 + xRoot*: cdouble + yRoot*: cdouble + EventMotion* = ref object + impl*: ptr EventMotion00 + +type + EventButton00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + time*: uint32 + x*: cdouble + y*: cdouble + axes*: ptr cdouble + state*: ModifierType + button*: uint32 + device*: ptr Device00 + xRoot*: cdouble + yRoot*: cdouble + EventButton* = ref object + impl*: ptr EventButton00 + +type + EventSequence00* {.pure.} = object + EventSequence* = ref object + impl*: ptr EventSequence00 + +type + EventTouch00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + time*: uint32 + x*: cdouble + y*: cdouble + axes*: ptr cdouble + state*: ModifierType + sequence*: ptr EventSequence00 + emulatingPointer*: gboolean + device*: ptr Device00 + xRoot*: cdouble + yRoot*: cdouble + EventTouch* = ref object + impl*: ptr EventTouch00 + +type + ScrollDirection* {.size: sizeof(cint), pure.} = enum + up = 0 + down = 1 + left = 2 + right = 3 + smooth = 4 + +type + EventScroll00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + time*: uint32 + x*: cdouble + y*: cdouble + state*: ModifierType + direction*: ScrollDirection + device*: ptr Device00 + xRoot*: cdouble + yRoot*: cdouble + deltaX*: cdouble + deltaY*: cdouble + isStop*: uint32 + EventScroll* = ref object + impl*: ptr EventScroll00 + +type + EventKey00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + time*: uint32 + state*: ModifierType + keyval*: uint32 + length*: int32 + string*: cstring + hardwareKeycode*: uint16 + group*: uint8 + isModifier*: uint32 + EventKey* = ref object + impl*: ptr EventKey00 + +type + NotifyType* {.size: sizeof(cint), pure.} = enum + ancestor = 0 + virtual = 1 + inferior = 2 + nonlinear = 3 + nonlinearVirtual = 4 + unknown = 5 + +type + EventCrossing00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + subwindow*: ptr Window00 + time*: uint32 + x*: cdouble + y*: cdouble + xRoot*: cdouble + yRoot*: cdouble + mode*: CrossingMode + detail*: NotifyType + focus*: gboolean + state*: ModifierType + EventCrossing* = ref object + impl*: ptr EventCrossing00 + +type + EventFocus00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + `in`*: int16 + EventFocus* = ref object + impl*: ptr EventFocus00 + +type + EventConfigure00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + x*: int32 + y*: int32 + width*: int32 + height*: int32 + EventConfigure* = ref object + impl*: ptr EventConfigure00 + +type + PropertyState* {.size: sizeof(cint), pure.} = enum + newValue = 0 + delete = 1 + +type + EventProperty00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + atom*: ptr Atom00 + time*: uint32 + state*: PropertyState + EventProperty* = ref object + impl*: ptr EventProperty00 + +type + EventSelection00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + selection*: ptr Atom00 + target*: ptr Atom00 + property*: ptr Atom00 + time*: uint32 + requestor*: ptr Window00 + EventSelection* = ref object + impl*: ptr EventSelection00 + +type + OwnerChange* {.size: sizeof(cint), pure.} = enum + newOwner = 0 + destroy = 1 + close = 2 + +type + EventOwnerChange00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + owner*: ptr Window00 + reason*: OwnerChange + selection*: ptr Atom00 + time*: uint32 + selectionTime*: uint32 + EventOwnerChange* = ref object + impl*: ptr EventOwnerChange00 + +type + EventProximity00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + time*: uint32 + device*: ptr Device00 + EventProximity* = ref object + impl*: ptr EventProximity00 + +type + EventDND00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + context*: ptr DragContext00 + time*: uint32 + xRoot*: int16 + yRoot*: int16 + EventDND* = ref object + impl*: ptr EventDND00 + +type + EventWindowState00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + changedMask*: WindowState + newWindowState*: WindowState + EventWindowState* = ref object + impl*: ptr EventWindowState00 + +type + SettingAction* {.size: sizeof(cint), pure.} = enum + new = 0 + changed = 1 + deleted = 2 + +type + EventSetting00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + action*: SettingAction + name*: cstring + EventSetting* = ref object + impl*: ptr EventSetting00 + +type + EventGrabBroken00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + keyboard*: gboolean + implicit*: gboolean + grabWindow*: ptr Window00 + EventGrabBroken* = ref object + impl*: ptr EventGrabBroken00 + +type + TouchpadGesturePhase* {.size: sizeof(cint), pure.} = enum + begin = 0 + update = 1 + `end` = 2 + cancel = 3 + +type + EventTouchpadSwipe00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + phase*: TouchpadGesturePhase + nFingers*: int8 + time*: uint32 + x*: cdouble + y*: cdouble + dx*: cdouble + dy*: cdouble + xRoot*: cdouble + yRoot*: cdouble + state*: ModifierType + EventTouchpadSwipe* = ref object + impl*: ptr EventTouchpadSwipe00 + +type + EventTouchpadPinch00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + phase*: TouchpadGesturePhase + nFingers*: int8 + time*: uint32 + x*: cdouble + y*: cdouble + dx*: cdouble + dy*: cdouble + angleDelta*: cdouble + scale*: cdouble + xRoot*: cdouble + yRoot*: cdouble + state*: ModifierType + EventTouchpadPinch* = ref object + impl*: ptr EventTouchpadPinch00 + +type + EventPadButton00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + time*: uint32 + group*: uint32 + button*: uint32 + mode*: uint32 + EventPadButton* = ref object + impl*: ptr EventPadButton00 + +type + EventPadAxis00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + time*: uint32 + group*: uint32 + index*: uint32 + mode*: uint32 + value*: cdouble + EventPadAxis* = ref object + impl*: ptr EventPadAxis00 + +type + EventPadGroupMode00* {.pure.} = object + `type`*: EventType + window*: ptr Window00 + sendEvent*: int8 + time*: uint32 + group*: uint32 + mode*: uint32 + EventPadGroupMode* = ref object + impl*: ptr EventPadGroupMode00 + +type + Event00* = object {.union.} + `type`*: EventType + any*: EventAny00 + expose*: EventExpose00 + visibility*: EventVisibility00 + motion*: EventMotion00 + button*: EventButton00 + touch*: EventTouch00 + scroll*: EventScroll00 + key*: EventKey00 + crossing*: EventCrossing00 + focusChange*: EventFocus00 + configure*: EventConfigure00 + property*: EventProperty00 + selection*: EventSelection00 + ownerChange*: EventOwnerChange00 + proximity*: EventProximity00 + dnd*: EventDND00 + windowState*: EventWindowState00 + setting*: EventSetting00 + grabBroken*: EventGrabBroken00 + touchpadSwipe*: EventTouchpadSwipe00 + touchpadPinch*: EventTouchpadPinch00 + padButton*: EventPadButton00 + padAxis*: EventPadAxis00 + padGroupMode*: EventPadGroupMode00 + Event* = ref object + impl*: ptr Event00 + +proc gdk_event_new*(`type`: EventType): ptr Event00 {. + importc: "gdk_event_new", libprag.} + +proc newEvent*(`type`: EventType): Event = + new(result) + result.impl = gdk_event_new(`type`) + +proc initEvent*[T](result: var T; `type`: EventType) = + assert(result is Event) + new(result) + result.impl = gdk_event_new(`type`) + +proc gdk_events_get_angle*(self: ptr Event00; event2: ptr Event00; angle: var cdouble): gboolean {. + importc: "gdk_events_get_angle", libprag.} + +proc getAngle*(self: Event; event2: Event; angle: var cdouble): bool = + toBool(gdk_events_get_angle(cast[ptr Event00](self.impl), cast[ptr Event00](event2.impl), angle)) + +proc angle*(self: Event; event2: Event; angle: var cdouble): bool = + toBool(gdk_events_get_angle(cast[ptr Event00](self.impl), cast[ptr Event00](event2.impl), angle)) + +proc gdk_events_get_center*(self: ptr Event00; event2: ptr Event00; x: var cdouble; + y: var cdouble): gboolean {. + importc: "gdk_events_get_center", libprag.} + +proc getCenter*(self: Event; event2: Event; x: var cdouble; y: var cdouble): bool = + toBool(gdk_events_get_center(cast[ptr Event00](self.impl), cast[ptr Event00](event2.impl), x, y)) + +proc center*(self: Event; event2: Event; x: var cdouble; y: var cdouble): bool = + toBool(gdk_events_get_center(cast[ptr Event00](self.impl), cast[ptr Event00](event2.impl), x, y)) + +proc gdk_events_get_distance*(self: ptr Event00; event2: ptr Event00; distance: var cdouble): gboolean {. + importc: "gdk_events_get_distance", libprag.} + +proc getDistance*(self: Event; event2: Event; distance: var cdouble): bool = + toBool(gdk_events_get_distance(cast[ptr Event00](self.impl), cast[ptr Event00](event2.impl), distance)) + +proc distance*(self: Event; event2: Event; distance: var cdouble): bool = + toBool(gdk_events_get_distance(cast[ptr Event00](self.impl), cast[ptr Event00](event2.impl), distance)) + +proc gdk_event_copy*(self: ptr Event00): ptr Event00 {. + importc: "gdk_event_copy", libprag.} + +proc copy*(self: Event): Event = + new(result) + result.impl = gdk_event_copy(cast[ptr Event00](self.impl)) + +proc gdk_event_free*(self: ptr Event00) {. + importc: "gdk_event_free", libprag.} + +proc free*(self: Event) = + gdk_event_free(cast[ptr Event00](self.impl)) + +proc gdk_event_get_axis*(self: ptr Event00; axisUse: AxisUse; value: var cdouble): gboolean {. + importc: "gdk_event_get_axis", libprag.} + +proc getAxis*(self: Event; axisUse: AxisUse; value: var cdouble): bool = + toBool(gdk_event_get_axis(cast[ptr Event00](self.impl), axisUse, value)) + +proc axis*(self: Event; axisUse: AxisUse; value: var cdouble): bool = + toBool(gdk_event_get_axis(cast[ptr Event00](self.impl), axisUse, value)) + +proc gdk_event_get_button*(self: ptr Event00; button: var uint32): gboolean {. + importc: "gdk_event_get_button", libprag.} + +proc getButton*(self: Event; button: var int): bool = + var button_00 = uint32(button) + result = toBool(gdk_event_get_button(cast[ptr Event00](self.impl), button_00)) + button = int(button_00) + +proc button*(self: Event; button: var int): bool = + var button_00 = uint32(button) + result = toBool(gdk_event_get_button(cast[ptr Event00](self.impl), button_00)) + button = int(button_00) + +proc gdk_event_get_click_count*(self: ptr Event00; clickCount: var uint32): gboolean {. + importc: "gdk_event_get_click_count", libprag.} + +proc getClickCount*(self: Event; clickCount: var int): bool = + var clickCount_00 = uint32(clickCount) + result = toBool(gdk_event_get_click_count(cast[ptr Event00](self.impl), clickCount_00)) + clickCount = int(clickCount_00) + +proc clickCount*(self: Event; clickCount: var int): bool = + var clickCount_00 = uint32(clickCount) + result = toBool(gdk_event_get_click_count(cast[ptr Event00](self.impl), clickCount_00)) + clickCount = int(clickCount_00) + +proc gdk_event_get_coords*(self: ptr Event00; xWin: var cdouble; yWin: var cdouble): gboolean {. + importc: "gdk_event_get_coords", libprag.} + +proc getCoords*(self: Event; xWin: var cdouble; yWin: var cdouble): bool = + toBool(gdk_event_get_coords(cast[ptr Event00](self.impl), xWin, yWin)) + +proc coords*(self: Event; xWin: var cdouble; yWin: var cdouble): bool = + toBool(gdk_event_get_coords(cast[ptr Event00](self.impl), xWin, yWin)) + +proc gdk_event_get_device*(self: ptr Event00): ptr Device00 {. + importc: "gdk_event_get_device", libprag.} + +proc getDevice*(self: Event): Device = + let gobj = gdk_event_get_device(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc device*(self: Event): Device = + let gobj = gdk_event_get_device(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_event_get_device_tool*(self: ptr Event00): ptr DeviceTool00 {. + importc: "gdk_event_get_device_tool", libprag.} + +proc getDeviceTool*(self: Event): DeviceTool = + let gobj = gdk_event_get_device_tool(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DeviceTool](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc deviceTool*(self: Event): DeviceTool = + let gobj = gdk_event_get_device_tool(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DeviceTool](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_event_get_event_sequence*(self: ptr Event00): ptr EventSequence00 {. + importc: "gdk_event_get_event_sequence", libprag.} + +proc getEventSequence*(self: Event): EventSequence = + new(result) + result.impl = gdk_event_get_event_sequence(cast[ptr Event00](self.impl)) + +proc eventSequence*(self: Event): EventSequence = + new(result) + result.impl = gdk_event_get_event_sequence(cast[ptr Event00](self.impl)) + +proc gdk_event_get_event_type*(self: ptr Event00): EventType {. + importc: "gdk_event_get_event_type", libprag.} + +proc getEventType*(self: Event): EventType = + gdk_event_get_event_type(cast[ptr Event00](self.impl)) + +proc eventType*(self: Event): EventType = + gdk_event_get_event_type(cast[ptr Event00](self.impl)) + +proc gdk_event_get_keycode*(self: ptr Event00; keycode: var uint16): gboolean {. + importc: "gdk_event_get_keycode", libprag.} + +proc getKeycode*(self: Event; keycode: var uint16): bool = + toBool(gdk_event_get_keycode(cast[ptr Event00](self.impl), keycode)) + +proc keycode*(self: Event; keycode: var uint16): bool = + toBool(gdk_event_get_keycode(cast[ptr Event00](self.impl), keycode)) + +proc gdk_event_get_keyval*(self: ptr Event00; keyval: var uint32): gboolean {. + importc: "gdk_event_get_keyval", libprag.} + +proc getKeyval*(self: Event; keyval: var int): bool = + var keyval_00 = uint32(keyval) + result = toBool(gdk_event_get_keyval(cast[ptr Event00](self.impl), keyval_00)) + keyval = int(keyval_00) + +proc keyval*(self: Event; keyval: var int): bool = + var keyval_00 = uint32(keyval) + result = toBool(gdk_event_get_keyval(cast[ptr Event00](self.impl), keyval_00)) + keyval = int(keyval_00) + +proc gdk_event_get_pointer_emulated*(self: ptr Event00): gboolean {. + importc: "gdk_event_get_pointer_emulated", libprag.} + +proc getPointerEmulated*(self: Event): bool = + toBool(gdk_event_get_pointer_emulated(cast[ptr Event00](self.impl))) + +proc pointerEmulated*(self: Event): bool = + toBool(gdk_event_get_pointer_emulated(cast[ptr Event00](self.impl))) + +proc gdk_event_get_root_coords*(self: ptr Event00; xRoot: var cdouble; yRoot: var cdouble): gboolean {. + importc: "gdk_event_get_root_coords", libprag.} + +proc getRootCoords*(self: Event; xRoot: var cdouble; yRoot: var cdouble): bool = + toBool(gdk_event_get_root_coords(cast[ptr Event00](self.impl), xRoot, yRoot)) + +proc rootCoords*(self: Event; xRoot: var cdouble; yRoot: var cdouble): bool = + toBool(gdk_event_get_root_coords(cast[ptr Event00](self.impl), xRoot, yRoot)) + +proc gdk_event_get_scancode*(self: ptr Event00): int32 {. + importc: "gdk_event_get_scancode", libprag.} + +proc getScancode*(self: Event): int = + int(gdk_event_get_scancode(cast[ptr Event00](self.impl))) + +proc scancode*(self: Event): int = + int(gdk_event_get_scancode(cast[ptr Event00](self.impl))) + +proc gdk_event_get_screen*(self: ptr Event00): ptr Screen00 {. + importc: "gdk_event_get_screen", libprag.} + +proc getScreen*(self: Event): Screen = + let gobj = gdk_event_get_screen(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: Event): Screen = + let gobj = gdk_event_get_screen(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_event_get_scroll_deltas*(self: ptr Event00; deltaX: var cdouble; deltaY: var cdouble): gboolean {. + importc: "gdk_event_get_scroll_deltas", libprag.} + +proc getScrollDeltas*(self: Event; deltaX: var cdouble; deltaY: var cdouble): bool = + toBool(gdk_event_get_scroll_deltas(cast[ptr Event00](self.impl), deltaX, deltaY)) + +proc scrollDeltas*(self: Event; deltaX: var cdouble; deltaY: var cdouble): bool = + toBool(gdk_event_get_scroll_deltas(cast[ptr Event00](self.impl), deltaX, deltaY)) + +proc gdk_event_get_scroll_direction*(self: ptr Event00; direction: var ScrollDirection): gboolean {. + importc: "gdk_event_get_scroll_direction", libprag.} + +proc getScrollDirection*(self: Event; direction: var ScrollDirection): bool = + toBool(gdk_event_get_scroll_direction(cast[ptr Event00](self.impl), direction)) + +proc scrollDirection*(self: Event; direction: var ScrollDirection): bool = + toBool(gdk_event_get_scroll_direction(cast[ptr Event00](self.impl), direction)) + +proc gdk_event_get_seat*(self: ptr Event00): ptr Seat00 {. + importc: "gdk_event_get_seat", libprag.} + +proc getSeat*(self: Event): Seat = + let gobj = gdk_event_get_seat(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Seat](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc seat*(self: Event): Seat = + let gobj = gdk_event_get_seat(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Seat](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_event_get_source_device*(self: ptr Event00): ptr Device00 {. + importc: "gdk_event_get_source_device", libprag.} + +proc getSourceDevice*(self: Event): Device = + let gobj = gdk_event_get_source_device(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc sourceDevice*(self: Event): Device = + let gobj = gdk_event_get_source_device(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_event_get_state*(self: ptr Event00; state: var ModifierType): gboolean {. + importc: "gdk_event_get_state", libprag.} + +proc getState*(self: Event; state: var ModifierType): bool = + toBool(gdk_event_get_state(cast[ptr Event00](self.impl), state)) + +proc state*(self: Event; state: var ModifierType): bool = + toBool(gdk_event_get_state(cast[ptr Event00](self.impl), state)) + +proc gdk_event_get_time*(self: ptr Event00): uint32 {. + importc: "gdk_event_get_time", libprag.} + +proc getTime*(self: Event): int = + int(gdk_event_get_time(cast[ptr Event00](self.impl))) + +proc time*(self: Event): int = + int(gdk_event_get_time(cast[ptr Event00](self.impl))) + +proc gdk_event_get_window*(self: ptr Event00): ptr Window00 {. + importc: "gdk_event_get_window", libprag.} + +proc getWindow*(self: Event): Window = + let gobj = gdk_event_get_window(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc window*(self: Event): Window = + let gobj = gdk_event_get_window(cast[ptr Event00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_event_is_scroll_stop_event*(self: ptr Event00): gboolean {. + importc: "gdk_event_is_scroll_stop_event", libprag.} + +proc isScrollStopEvent*(self: Event): bool = + toBool(gdk_event_is_scroll_stop_event(cast[ptr Event00](self.impl))) + +proc gdk_event_put*(self: ptr Event00) {. + importc: "gdk_event_put", libprag.} + +proc put*(self: Event) = + gdk_event_put(cast[ptr Event00](self.impl)) + +proc gdk_event_set_device*(self: ptr Event00; device: ptr Device00) {. + importc: "gdk_event_set_device", libprag.} + +proc setDevice*(self: Event; device: Device) = + gdk_event_set_device(cast[ptr Event00](self.impl), cast[ptr Device00](device.impl)) + +proc `device=`*(self: Event; device: Device) = + gdk_event_set_device(cast[ptr Event00](self.impl), cast[ptr Device00](device.impl)) + +proc gdk_event_set_device_tool*(self: ptr Event00; tool: ptr DeviceTool00) {. + importc: "gdk_event_set_device_tool", libprag.} + +proc setDeviceTool*(self: Event; tool: DeviceTool) = + gdk_event_set_device_tool(cast[ptr Event00](self.impl), cast[ptr DeviceTool00](tool.impl)) + +proc `deviceTool=`*(self: Event; tool: DeviceTool) = + gdk_event_set_device_tool(cast[ptr Event00](self.impl), cast[ptr DeviceTool00](tool.impl)) + +proc gdk_event_set_screen*(self: ptr Event00; screen: ptr Screen00) {. + importc: "gdk_event_set_screen", libprag.} + +proc setScreen*(self: Event; screen: Screen) = + gdk_event_set_screen(cast[ptr Event00](self.impl), cast[ptr Screen00](screen.impl)) + +proc `screen=`*(self: Event; screen: Screen) = + gdk_event_set_screen(cast[ptr Event00](self.impl), cast[ptr Screen00](screen.impl)) + +proc gdk_event_set_source_device*(self: ptr Event00; device: ptr Device00) {. + importc: "gdk_event_set_source_device", libprag.} + +proc setSourceDevice*(self: Event; device: Device) = + gdk_event_set_source_device(cast[ptr Event00](self.impl), cast[ptr Device00](device.impl)) + +proc `sourceDevice=`*(self: Event; device: Device) = + gdk_event_set_source_device(cast[ptr Event00](self.impl), cast[ptr Device00](device.impl)) + +proc gdk_event_triggers_context_menu*(self: ptr Event00): gboolean {. + importc: "gdk_event_triggers_context_menu", libprag.} + +proc triggersContextMenu*(self: Event): bool = + toBool(gdk_event_triggers_context_menu(cast[ptr Event00](self.impl))) + +proc gdk_event_get*(): ptr Event00 {. + importc: "gdk_event_get", libprag.} + +proc get*(): Event = + new(result) + result.impl = gdk_event_get() + +proc gdk_event_peek*(): ptr Event00 {. + importc: "gdk_event_peek", libprag.} + +proc peek*(): Event = + new(result) + result.impl = gdk_event_peek() + +proc gdk_event_request_motions*(event: ptr EventMotion00) {. + importc: "gdk_event_request_motions", libprag.} + +proc requestMotions*(event: EventMotion) = + gdk_event_request_motions(cast[ptr EventMotion00](event.impl)) + +proc gdk_display_get_event*(self: ptr Display00): ptr Event00 {. + importc: "gdk_display_get_event", libprag.} + +proc getEvent*(self: Display): Event = + new(result) + result.impl = gdk_display_get_event(cast[ptr Display00](self.impl)) + +proc event*(self: Display): Event = + new(result) + result.impl = gdk_display_get_event(cast[ptr Display00](self.impl)) + +proc gdk_display_peek_event*(self: ptr Display00): ptr Event00 {. + importc: "gdk_display_peek_event", libprag.} + +proc peekEvent*(self: Display): Event = + new(result) + result.impl = gdk_display_peek_event(cast[ptr Display00](self.impl)) + +proc gdk_display_put_event*(self: ptr Display00; event: ptr Event00) {. + importc: "gdk_display_put_event", libprag.} + +proc putEvent*(self: Display; event: Event) = + gdk_display_put_event(cast[ptr Display00](self.impl), cast[ptr Event00](event.impl)) + +proc gdk_window_show_window_menu*(self: ptr Window00; event: ptr Event00): gboolean {. + importc: "gdk_window_show_window_menu", libprag.} + +proc showWindowMenu*(self: Window; event: Event): bool = + toBool(gdk_window_show_window_menu(cast[ptr Window00](self.impl), cast[ptr Event00](event.impl))) + +type + EventFunc* = proc (event: ptr Event00; data: pointer) {.cdecl.} + +proc gdk_event_handler_set*(`func`: EventFunc; data: pointer; notify: DestroyNotify) {. + importc: "gdk_event_handler_set", libprag.} + +proc handlerSet*(`func`: EventFunc; data: pointer; notify: DestroyNotify) {. + importc: "gdk_event_handler_set", libprag.} + +type + FilterReturn* {.size: sizeof(cint), pure.} = enum + `continue` = 0 + translate = 1 + remove = 2 + +type + FilterFunc* = proc (xevent: pointer; event: ptr Event00; data: pointer): FilterReturn {.cdecl.} + +type + FrameClockClass00* {.pure.} = object + FrameClockClass* = ref object + impl*: ptr FrameClockClass00 + +type + FrameClockPrivate00* {.pure.} = object + FrameClockPrivate* = ref object + impl*: ptr FrameClockPrivate00 + +type + GLError* {.size: sizeof(cint), pure.} = enum + notAvailable = 0 + unsupportedFormat = 1 + unsupportedProfile = 2 + +proc gdk_gl_error_quark*(): uint32 {. + importc: "gdk_gl_error_quark", libprag.} + +const KEY_0* = 48'i32 + +const KEY_1* = 49'i32 + +const KEY_2* = 50'i32 + +const KEY_3* = 51'i32 + +const KEY_3270_AltCursor* = 64784'i32 + +const KEY_3270_Attn* = 64782'i32 + +const KEY_3270_BackTab* = 64773'i32 + +const KEY_3270_ChangeScreen* = 64793'i32 + +const KEY_3270_Copy* = 64789'i32 + +const KEY_3270_CursorBlink* = 64783'i32 + +const KEY_3270_CursorSelect* = 64796'i32 + +const KEY_3270_DeleteWord* = 64794'i32 + +const KEY_3270_Duplicate* = 64769'i32 + +const KEY_3270_Enter* = 64798'i32 + +const KEY_3270_EraseEOF* = 64774'i32 + +const KEY_3270_EraseInput* = 64775'i32 + +const KEY_3270_ExSelect* = 64795'i32 + +const KEY_3270_FieldMark* = 64770'i32 + +const KEY_3270_Ident* = 64787'i32 + +const KEY_3270_Jump* = 64786'i32 + +const KEY_3270_KeyClick* = 64785'i32 + +const KEY_3270_Left2* = 64772'i32 + +const KEY_3270_PA1* = 64778'i32 + +const KEY_3270_PA2* = 64779'i32 + +const KEY_3270_PA3* = 64780'i32 + +const KEY_3270_Play* = 64790'i32 + +const KEY_3270_PrintScreen* = 64797'i32 + +const KEY_3270_Quit* = 64777'i32 + +const KEY_3270_Record* = 64792'i32 + +const KEY_3270_Reset* = 64776'i32 + +const KEY_3270_Right2* = 64771'i32 + +const KEY_3270_Rule* = 64788'i32 + +const KEY_3270_Setup* = 64791'i32 + +const KEY_3270_Test* = 64781'i32 + +const KEY_4* = 52'i32 + +const KEY_5* = 53'i32 + +const KEY_6* = 54'i32 + +const KEY_7* = 55'i32 + +const KEY_8* = 56'i32 + +const KEY_9* = 57'i32 + +const UKEY_A* = 65'i32 + +const UKEY_AE* = 198'i32 + +const UKEY_Aacute* = 193'i32 + +const UKEY_Abelowdot* = 16785056'i32 + +const UKEY_Abreve* = 451'i32 + +const UKEY_Abreveacute* = 16785070'i32 + +const UKEY_Abrevebelowdot* = 16785078'i32 + +const UKEY_Abrevegrave* = 16785072'i32 + +const UKEY_Abrevehook* = 16785074'i32 + +const UKEY_Abrevetilde* = 16785076'i32 + +const KEY_AccessX_Enable* = 65136'i32 + +const KEY_AccessX_Feedback_Enable* = 65137'i32 + +const UKEY_Acircumflex* = 194'i32 + +const UKEY_Acircumflexacute* = 16785060'i32 + +const UKEY_Acircumflexbelowdot* = 16785068'i32 + +const UKEY_Acircumflexgrave* = 16785062'i32 + +const UKEY_Acircumflexhook* = 16785064'i32 + +const UKEY_Acircumflextilde* = 16785066'i32 + +const KEY_AddFavorite* = 269025081'i32 + +const UKEY_Adiaeresis* = 196'i32 + +const UKEY_Agrave* = 192'i32 + +const UKEY_Ahook* = 16785058'i32 + +const KEY_Alt_L* = 65513'i32 + +const KEY_Alt_R* = 65514'i32 + +const UKEY_Amacron* = 960'i32 + +const UKEY_Aogonek* = 417'i32 + +const KEY_ApplicationLeft* = 269025104'i32 + +const KEY_ApplicationRight* = 269025105'i32 + +const KEY_Arabic_0* = 16778848'i32 + +const KEY_Arabic_1* = 16778849'i32 + +const KEY_Arabic_2* = 16778850'i32 + +const KEY_Arabic_3* = 16778851'i32 + +const KEY_Arabic_4* = 16778852'i32 + +const KEY_Arabic_5* = 16778853'i32 + +const KEY_Arabic_6* = 16778854'i32 + +const KEY_Arabic_7* = 16778855'i32 + +const KEY_Arabic_8* = 16778856'i32 + +const KEY_Arabic_9* = 16778857'i32 + +const KEY_Arabic_ain* = 1497'i32 + +const KEY_Arabic_alef* = 1479'i32 + +const KEY_Arabic_alefmaksura* = 1513'i32 + +const KEY_Arabic_beh* = 1480'i32 + +const KEY_Arabic_comma* = 1452'i32 + +const KEY_Arabic_dad* = 1494'i32 + +const KEY_Arabic_dal* = 1487'i32 + +const KEY_Arabic_damma* = 1519'i32 + +const KEY_Arabic_dammatan* = 1516'i32 + +const KEY_Arabic_ddal* = 16778888'i32 + +const KEY_Arabic_farsi_yeh* = 16778956'i32 + +const KEY_Arabic_fatha* = 1518'i32 + +const KEY_Arabic_fathatan* = 1515'i32 + +const KEY_Arabic_feh* = 1505'i32 + +const KEY_Arabic_fullstop* = 16778964'i32 + +const KEY_Arabic_gaf* = 16778927'i32 + +const KEY_Arabic_ghain* = 1498'i32 + +const KEY_Arabic_ha* = 1511'i32 + +const KEY_Arabic_hah* = 1485'i32 + +const KEY_Arabic_hamza* = 1473'i32 + +const KEY_Arabic_hamza_above* = 16778836'i32 + +const KEY_Arabic_hamza_below* = 16778837'i32 + +const KEY_Arabic_hamzaonalef* = 1475'i32 + +const KEY_Arabic_hamzaonwaw* = 1476'i32 + +const KEY_Arabic_hamzaonyeh* = 1478'i32 + +const KEY_Arabic_hamzaunderalef* = 1477'i32 + +const KEY_Arabic_heh* = 1511'i32 + +const KEY_Arabic_heh_doachashmee* = 16778942'i32 + +const KEY_Arabic_heh_goal* = 16778945'i32 + +const KEY_Arabic_jeem* = 1484'i32 + +const KEY_Arabic_jeh* = 16778904'i32 + +const KEY_Arabic_kaf* = 1507'i32 + +const KEY_Arabic_kasra* = 1520'i32 + +const KEY_Arabic_kasratan* = 1517'i32 + +const KEY_Arabic_keheh* = 16778921'i32 + +const KEY_Arabic_khah* = 1486'i32 + +const KEY_Arabic_lam* = 1508'i32 + +const KEY_Arabic_madda_above* = 16778835'i32 + +const KEY_Arabic_maddaonalef* = 1474'i32 + +const KEY_Arabic_meem* = 1509'i32 + +const KEY_Arabic_noon* = 1510'i32 + +const KEY_Arabic_noon_ghunna* = 16778938'i32 + +const KEY_Arabic_peh* = 16778878'i32 + +const KEY_Arabic_percent* = 16778858'i32 + +const KEY_Arabic_qaf* = 1506'i32 + +const KEY_Arabic_question_mark* = 1471'i32 + +const KEY_Arabic_ra* = 1489'i32 + +const KEY_Arabic_rreh* = 16778897'i32 + +const KEY_Arabic_sad* = 1493'i32 + +const KEY_Arabic_seen* = 1491'i32 + +const KEY_Arabic_semicolon* = 1467'i32 + +const KEY_Arabic_shadda* = 1521'i32 + +const KEY_Arabic_sheen* = 1492'i32 + +const KEY_Arabic_sukun* = 1522'i32 + +const KEY_Arabic_superscript_alef* = 16778864'i32 + +const KEY_Arabic_switch* = 65406'i32 + +const KEY_Arabic_tah* = 1495'i32 + +const KEY_Arabic_tatweel* = 1504'i32 + +const KEY_Arabic_tcheh* = 16778886'i32 + +const KEY_Arabic_teh* = 1482'i32 + +const KEY_Arabic_tehmarbuta* = 1481'i32 + +const KEY_Arabic_thal* = 1488'i32 + +const KEY_Arabic_theh* = 1483'i32 + +const KEY_Arabic_tteh* = 16778873'i32 + +const KEY_Arabic_veh* = 16778916'i32 + +const KEY_Arabic_waw* = 1512'i32 + +const KEY_Arabic_yeh* = 1514'i32 + +const KEY_Arabic_yeh_baree* = 16778962'i32 + +const KEY_Arabic_zah* = 1496'i32 + +const KEY_Arabic_zain* = 1490'i32 + +const UKEY_Aring* = 197'i32 + +const UKEY_Armenian_AT* = 16778552'i32 + +const UKEY_Armenian_AYB* = 16778545'i32 + +const UKEY_Armenian_BEN* = 16778546'i32 + +const UKEY_Armenian_CHA* = 16778569'i32 + +const UKEY_Armenian_DA* = 16778548'i32 + +const UKEY_Armenian_DZA* = 16778561'i32 + +const UKEY_Armenian_E* = 16778551'i32 + +const UKEY_Armenian_FE* = 16778582'i32 + +const UKEY_Armenian_GHAT* = 16778562'i32 + +const UKEY_Armenian_GIM* = 16778547'i32 + +const UKEY_Armenian_HI* = 16778565'i32 + +const UKEY_Armenian_HO* = 16778560'i32 + +const UKEY_Armenian_INI* = 16778555'i32 + +const UKEY_Armenian_JE* = 16778571'i32 + +const UKEY_Armenian_KE* = 16778580'i32 + +const UKEY_Armenian_KEN* = 16778559'i32 + +const UKEY_Armenian_KHE* = 16778557'i32 + +const UKEY_Armenian_LYUN* = 16778556'i32 + +const UKEY_Armenian_MEN* = 16778564'i32 + +const UKEY_Armenian_NU* = 16778566'i32 + +const UKEY_Armenian_O* = 16778581'i32 + +const UKEY_Armenian_PE* = 16778570'i32 + +const UKEY_Armenian_PYUR* = 16778579'i32 + +const UKEY_Armenian_RA* = 16778572'i32 + +const UKEY_Armenian_RE* = 16778576'i32 + +const UKEY_Armenian_SE* = 16778573'i32 + +const UKEY_Armenian_SHA* = 16778567'i32 + +const UKEY_Armenian_TCHE* = 16778563'i32 + +const UKEY_Armenian_TO* = 16778553'i32 + +const UKEY_Armenian_TSA* = 16778558'i32 + +const UKEY_Armenian_TSO* = 16778577'i32 + +const UKEY_Armenian_TYUN* = 16778575'i32 + +const UKEY_Armenian_VEV* = 16778574'i32 + +const UKEY_Armenian_VO* = 16778568'i32 + +const UKEY_Armenian_VYUN* = 16778578'i32 + +const UKEY_Armenian_YECH* = 16778549'i32 + +const UKEY_Armenian_ZA* = 16778550'i32 + +const UKEY_Armenian_ZHE* = 16778554'i32 + +const KEY_Armenian_accent* = 16778587'i32 + +const KEY_Armenian_amanak* = 16778588'i32 + +const KEY_Armenian_apostrophe* = 16778586'i32 + +const KEY_Armenian_at* = 16778600'i32 + +const KEY_Armenian_ayb* = 16778593'i32 + +const KEY_Armenian_ben* = 16778594'i32 + +const KEY_Armenian_but* = 16778589'i32 + +const KEY_Armenian_cha* = 16778617'i32 + +const KEY_Armenian_da* = 16778596'i32 + +const KEY_Armenian_dza* = 16778609'i32 + +const KEY_Armenian_e* = 16778599'i32 + +const KEY_Armenian_exclam* = 16778588'i32 + +const KEY_Armenian_fe* = 16778630'i32 + +const KEY_Armenian_full_stop* = 16778633'i32 + +const KEY_Armenian_ghat* = 16778610'i32 + +const KEY_Armenian_gim* = 16778595'i32 + +const KEY_Armenian_hi* = 16778613'i32 + +const KEY_Armenian_ho* = 16778608'i32 + +const KEY_Armenian_hyphen* = 16778634'i32 + +const KEY_Armenian_ini* = 16778603'i32 + +const KEY_Armenian_je* = 16778619'i32 + +const KEY_Armenian_ke* = 16778628'i32 + +const KEY_Armenian_ken* = 16778607'i32 + +const KEY_Armenian_khe* = 16778605'i32 + +const KEY_Armenian_ligature_ew* = 16778631'i32 + +const KEY_Armenian_lyun* = 16778604'i32 + +const KEY_Armenian_men* = 16778612'i32 + +const KEY_Armenian_nu* = 16778614'i32 + +const KEY_Armenian_o* = 16778629'i32 + +const KEY_Armenian_paruyk* = 16778590'i32 + +const KEY_Armenian_pe* = 16778618'i32 + +const KEY_Armenian_pyur* = 16778627'i32 + +const KEY_Armenian_question* = 16778590'i32 + +const KEY_Armenian_ra* = 16778620'i32 + +const KEY_Armenian_re* = 16778624'i32 + +const KEY_Armenian_se* = 16778621'i32 + +const KEY_Armenian_separation_mark* = 16778589'i32 + +const KEY_Armenian_sha* = 16778615'i32 + +const KEY_Armenian_shesht* = 16778587'i32 + +const KEY_Armenian_tche* = 16778611'i32 + +const KEY_Armenian_to* = 16778601'i32 + +const KEY_Armenian_tsa* = 16778606'i32 + +const KEY_Armenian_tso* = 16778625'i32 + +const KEY_Armenian_tyun* = 16778623'i32 + +const KEY_Armenian_verjaket* = 16778633'i32 + +const KEY_Armenian_vev* = 16778622'i32 + +const KEY_Armenian_vo* = 16778616'i32 + +const KEY_Armenian_vyun* = 16778626'i32 + +const KEY_Armenian_yech* = 16778597'i32 + +const KEY_Armenian_yentamna* = 16778634'i32 + +const KEY_Armenian_za* = 16778598'i32 + +const KEY_Armenian_zhe* = 16778602'i32 + +const UKEY_Atilde* = 195'i32 + +const KEY_AudibleBell_Enable* = 65146'i32 + +const KEY_AudioCycleTrack* = 269025179'i32 + +const KEY_AudioForward* = 269025175'i32 + +const KEY_AudioLowerVolume* = 269025041'i32 + +const KEY_AudioMedia* = 269025074'i32 + +const KEY_AudioMicMute* = 269025202'i32 + +const KEY_AudioMute* = 269025042'i32 + +const KEY_AudioNext* = 269025047'i32 + +const KEY_AudioPause* = 269025073'i32 + +const KEY_AudioPlay* = 269025044'i32 + +const KEY_AudioPrev* = 269025046'i32 + +const KEY_AudioRaiseVolume* = 269025043'i32 + +const KEY_AudioRandomPlay* = 269025177'i32 + +const KEY_AudioRecord* = 269025052'i32 + +const KEY_AudioRepeat* = 269025176'i32 + +const KEY_AudioRewind* = 269025086'i32 + +const KEY_AudioStop* = 269025045'i32 + +const KEY_Away* = 269025165'i32 + +const UKEY_B* = 66'i32 + +const UKEY_Babovedot* = 16784898'i32 + +const KEY_Back* = 269025062'i32 + +const KEY_BackForward* = 269025087'i32 + +const KEY_BackSpace* = 65288'i32 + +const KEY_Battery* = 269025171'i32 + +const KEY_Begin* = 65368'i32 + +const KEY_Blue* = 269025190'i32 + +const KEY_Bluetooth* = 269025172'i32 + +const KEY_Book* = 269025106'i32 + +const KEY_BounceKeys_Enable* = 65140'i32 + +const KEY_Break* = 65387'i32 + +const KEY_BrightnessAdjust* = 269025083'i32 + +const UKEY_Byelorussian_SHORTU* = 1726'i32 + +const KEY_Byelorussian_shortu* = 1710'i32 + +const UKEY_C* = 67'i32 + +const KEY_CD* = 269025107'i32 + +const KEY_CH6* = 65186'i32 + +const KEY_C_H9* = 65189'i32 + +const KEY_C_h8* = 65188'i32 + +const UKEY_Cabovedot* = 709'i32 + +const UKEY_Cacute* = 454'i32 + +const KEY_Calculator* = 269025053'i32 + +const KEY_Calendar* = 269025056'i32 + +const KEY_Cancel* = 65385'i32 + +const KEY_Caps_Lock* = 65509'i32 + +const UKEY_Ccaron* = 456'i32 + +const UKEY_Ccedilla* = 199'i32 + +const UKEY_Ccircumflex* = 710'i32 + +const KEY_Ch5* = 65185'i32 + +const KEY_Clear* = 65291'i32 + +const KEY_ClearGrab* = 269024801'i32 + +const KEY_Close* = 269025110'i32 + +const KEY_Codeinput* = 65335'i32 + +const KEY_ColonSign* = 16785569'i32 + +const KEY_Community* = 269025085'i32 + +const KEY_ContrastAdjust* = 269025058'i32 + +const KEY_Control_L* = 65507'i32 + +const KEY_Control_R* = 65508'i32 + +const KEY_Copy* = 269025111'i32 + +const KEY_CruzeiroSign* = 16785570'i32 + +const KEY_Cut* = 269025112'i32 + +const KEY_CycleAngle* = 269025180'i32 + +const UKEY_Cyrillic_A* = 1761'i32 + +const UKEY_Cyrillic_BE* = 1762'i32 + +const UKEY_Cyrillic_CHE* = 1790'i32 + +const UKEY_Cyrillic_CHE_descender* = 16778422'i32 + +const UKEY_Cyrillic_CHE_vertstroke* = 16778424'i32 + +const UKEY_Cyrillic_DE* = 1764'i32 + +const UKEY_Cyrillic_DZHE* = 1727'i32 + +const UKEY_Cyrillic_E* = 1788'i32 + +const UKEY_Cyrillic_EF* = 1766'i32 + +const UKEY_Cyrillic_EL* = 1772'i32 + +const UKEY_Cyrillic_EM* = 1773'i32 + +const UKEY_Cyrillic_EN* = 1774'i32 + +const UKEY_Cyrillic_EN_descender* = 16778402'i32 + +const UKEY_Cyrillic_ER* = 1778'i32 + +const UKEY_Cyrillic_ES* = 1779'i32 + +const UKEY_Cyrillic_GHE* = 1767'i32 + +const UKEY_Cyrillic_GHE_bar* = 16778386'i32 + +const UKEY_Cyrillic_HA* = 1768'i32 + +const UKEY_Cyrillic_HARDSIGN* = 1791'i32 + +const UKEY_Cyrillic_HA_descender* = 16778418'i32 + +const UKEY_Cyrillic_I* = 1769'i32 + +const UKEY_Cyrillic_IE* = 1765'i32 + +const UKEY_Cyrillic_IO* = 1715'i32 + +const UKEY_Cyrillic_I_macron* = 16778466'i32 + +const UKEY_Cyrillic_JE* = 1720'i32 + +const UKEY_Cyrillic_KA* = 1771'i32 + +const UKEY_Cyrillic_KA_descender* = 16778394'i32 + +const UKEY_Cyrillic_KA_vertstroke* = 16778396'i32 + +const UKEY_Cyrillic_LJE* = 1721'i32 + +const UKEY_Cyrillic_NJE* = 1722'i32 + +const UKEY_Cyrillic_O* = 1775'i32 + +const UKEY_Cyrillic_O_bar* = 16778472'i32 + +const UKEY_Cyrillic_PE* = 1776'i32 + +const UKEY_Cyrillic_SCHWA* = 16778456'i32 + +const UKEY_Cyrillic_SHA* = 1787'i32 + +const UKEY_Cyrillic_SHCHA* = 1789'i32 + +const UKEY_Cyrillic_SHHA* = 16778426'i32 + +const UKEY_Cyrillic_SHORTI* = 1770'i32 + +const UKEY_Cyrillic_SOFTSIGN* = 1784'i32 + +const UKEY_Cyrillic_TE* = 1780'i32 + +const UKEY_Cyrillic_TSE* = 1763'i32 + +const UKEY_Cyrillic_U* = 1781'i32 + +const UKEY_Cyrillic_U_macron* = 16778478'i32 + +const UKEY_Cyrillic_U_straight* = 16778414'i32 + +const UKEY_Cyrillic_U_straight_bar* = 16778416'i32 + +const UKEY_Cyrillic_VE* = 1783'i32 + +const UKEY_Cyrillic_YA* = 1777'i32 + +const UKEY_Cyrillic_YERU* = 1785'i32 + +const UKEY_Cyrillic_YU* = 1760'i32 + +const UKEY_Cyrillic_ZE* = 1786'i32 + +const UKEY_Cyrillic_ZHE* = 1782'i32 + +const UKEY_Cyrillic_ZHE_descender* = 16778390'i32 + +const KEY_Cyrillic_a* = 1729'i32 + +const KEY_Cyrillic_be* = 1730'i32 + +const KEY_Cyrillic_che* = 1758'i32 + +const KEY_Cyrillic_che_descender* = 16778423'i32 + +const KEY_Cyrillic_che_vertstroke* = 16778425'i32 + +const KEY_Cyrillic_de* = 1732'i32 + +const KEY_Cyrillic_dzhe* = 1711'i32 + +const KEY_Cyrillic_e* = 1756'i32 + +const KEY_Cyrillic_ef* = 1734'i32 + +const KEY_Cyrillic_el* = 1740'i32 + +const KEY_Cyrillic_em* = 1741'i32 + +const KEY_Cyrillic_en* = 1742'i32 + +const KEY_Cyrillic_en_descender* = 16778403'i32 + +const KEY_Cyrillic_er* = 1746'i32 + +const KEY_Cyrillic_es* = 1747'i32 + +const KEY_Cyrillic_ghe* = 1735'i32 + +const KEY_Cyrillic_ghe_bar* = 16778387'i32 + +const KEY_Cyrillic_ha* = 1736'i32 + +const KEY_Cyrillic_ha_descender* = 16778419'i32 + +const KEY_Cyrillic_hardsign* = 1759'i32 + +const KEY_Cyrillic_i* = 1737'i32 + +const KEY_Cyrillic_i_macron* = 16778467'i32 + +const KEY_Cyrillic_ie* = 1733'i32 + +const KEY_Cyrillic_io* = 1699'i32 + +const KEY_Cyrillic_je* = 1704'i32 + +const KEY_Cyrillic_ka* = 1739'i32 + +const KEY_Cyrillic_ka_descender* = 16778395'i32 + +const KEY_Cyrillic_ka_vertstroke* = 16778397'i32 + +const KEY_Cyrillic_lje* = 1705'i32 + +const KEY_Cyrillic_nje* = 1706'i32 + +const KEY_Cyrillic_o* = 1743'i32 + +const KEY_Cyrillic_o_bar* = 16778473'i32 + +const KEY_Cyrillic_pe* = 1744'i32 + +const KEY_Cyrillic_schwa* = 16778457'i32 + +const KEY_Cyrillic_sha* = 1755'i32 + +const KEY_Cyrillic_shcha* = 1757'i32 + +const KEY_Cyrillic_shha* = 16778427'i32 + +const KEY_Cyrillic_shorti* = 1738'i32 + +const KEY_Cyrillic_softsign* = 1752'i32 + +const KEY_Cyrillic_te* = 1748'i32 + +const KEY_Cyrillic_tse* = 1731'i32 + +const KEY_Cyrillic_u* = 1749'i32 + +const KEY_Cyrillic_u_macron* = 16778479'i32 + +const KEY_Cyrillic_u_straight* = 16778415'i32 + +const KEY_Cyrillic_u_straight_bar* = 16778417'i32 + +const KEY_Cyrillic_ve* = 1751'i32 + +const KEY_Cyrillic_ya* = 1745'i32 + +const KEY_Cyrillic_yeru* = 1753'i32 + +const KEY_Cyrillic_yu* = 1728'i32 + +const KEY_Cyrillic_ze* = 1754'i32 + +const KEY_Cyrillic_zhe* = 1750'i32 + +const KEY_Cyrillic_zhe_descender* = 16778391'i32 + +const UKEY_D* = 68'i32 + +const KEY_DOS* = 269025114'i32 + +const UKEY_Dabovedot* = 16784906'i32 + +const UKEY_Dcaron* = 463'i32 + +const KEY_Delete* = 65535'i32 + +const KEY_Display* = 269025113'i32 + +const KEY_Documents* = 269025115'i32 + +const KEY_DongSign* = 16785579'i32 + +const KEY_Down* = 65364'i32 + +const UKEY_Dstroke* = 464'i32 + +const UKEY_E* = 69'i32 + +const UKEY_ENG* = 957'i32 + +const XKEY_ETH* = 208'i32 + +const UKEY_EZH* = 16777655'i32 + +const UKEY_Eabovedot* = 972'i32 + +const UKEY_Eacute* = 201'i32 + +const UKEY_Ebelowdot* = 16785080'i32 + +const UKEY_Ecaron* = 460'i32 + +const UKEY_Ecircumflex* = 202'i32 + +const UKEY_Ecircumflexacute* = 16785086'i32 + +const UKEY_Ecircumflexbelowdot* = 16785094'i32 + +const UKEY_Ecircumflexgrave* = 16785088'i32 + +const UKEY_Ecircumflexhook* = 16785090'i32 + +const UKEY_Ecircumflextilde* = 16785092'i32 + +const KEY_EcuSign* = 16785568'i32 + +const UKEY_Ediaeresis* = 203'i32 + +const UKEY_Egrave* = 200'i32 + +const UKEY_Ehook* = 16785082'i32 + +const KEY_Eisu_Shift* = 65327'i32 + +const KEY_Eisu_toggle* = 65328'i32 + +const KEY_Eject* = 269025068'i32 + +const UKEY_Emacron* = 938'i32 + +const KEY_End* = 65367'i32 + +const UKEY_Eogonek* = 458'i32 + +const KEY_Escape* = 65307'i32 + +const UKEY_Eth* = 208'i32 + +const UKEY_Etilde* = 16785084'i32 + +const KEY_EuroSign* = 8364'i32 + +const KEY_Excel* = 269025116'i32 + +const KEY_Execute* = 65378'i32 + +const KEY_Explorer* = 269025117'i32 + +const UKEY_F* = 70'i32 + +const KEY_F1* = 65470'i32 + +const KEY_F10* = 65479'i32 + +const KEY_F11* = 65480'i32 + +const KEY_F12* = 65481'i32 + +const KEY_F13* = 65482'i32 + +const KEY_F14* = 65483'i32 + +const KEY_F15* = 65484'i32 + +const KEY_F16* = 65485'i32 + +const KEY_F17* = 65486'i32 + +const KEY_F18* = 65487'i32 + +const KEY_F19* = 65488'i32 + +const KEY_F2* = 65471'i32 + +const KEY_F20* = 65489'i32 + +const KEY_F21* = 65490'i32 + +const KEY_F22* = 65491'i32 + +const KEY_F23* = 65492'i32 + +const KEY_F24* = 65493'i32 + +const KEY_F25* = 65494'i32 + +const KEY_F26* = 65495'i32 + +const KEY_F27* = 65496'i32 + +const KEY_F28* = 65497'i32 + +const KEY_F29* = 65498'i32 + +const KEY_F3* = 65472'i32 + +const KEY_F30* = 65499'i32 + +const KEY_F31* = 65500'i32 + +const KEY_F32* = 65501'i32 + +const KEY_F33* = 65502'i32 + +const KEY_F34* = 65503'i32 + +const KEY_F35* = 65504'i32 + +const KEY_F4* = 65473'i32 + +const KEY_F5* = 65474'i32 + +const KEY_F6* = 65475'i32 + +const KEY_F7* = 65476'i32 + +const KEY_F8* = 65477'i32 + +const KEY_F9* = 65478'i32 + +const KEY_FFrancSign* = 16785571'i32 + +const UKEY_Fabovedot* = 16784926'i32 + +const KEY_Farsi_0* = 16778992'i32 + +const KEY_Farsi_1* = 16778993'i32 + +const KEY_Farsi_2* = 16778994'i32 + +const KEY_Farsi_3* = 16778995'i32 + +const KEY_Farsi_4* = 16778996'i32 + +const KEY_Farsi_5* = 16778997'i32 + +const KEY_Farsi_6* = 16778998'i32 + +const KEY_Farsi_7* = 16778999'i32 + +const KEY_Farsi_8* = 16779000'i32 + +const KEY_Farsi_9* = 16779001'i32 + +const KEY_Farsi_yeh* = 16778956'i32 + +const KEY_Favorites* = 269025072'i32 + +const KEY_Finance* = 269025084'i32 + +const KEY_Find* = 65384'i32 + +const KEY_First_Virtual_Screen* = 65232'i32 + +const KEY_Forward* = 269025063'i32 + +const KEY_FrameBack* = 269025181'i32 + +const KEY_FrameForward* = 269025182'i32 + +const UKEY_G* = 71'i32 + +const UKEY_Gabovedot* = 725'i32 + +const KEY_Game* = 269025118'i32 + +const UKEY_Gbreve* = 683'i32 + +const UKEY_Gcaron* = 16777702'i32 + +const UKEY_Gcedilla* = 939'i32 + +const UKEY_Gcircumflex* = 728'i32 + +const KEY_Georgian_an* = 16781520'i32 + +const KEY_Georgian_ban* = 16781521'i32 + +const KEY_Georgian_can* = 16781546'i32 + +const KEY_Georgian_char* = 16781549'i32 + +const KEY_Georgian_chin* = 16781545'i32 + +const KEY_Georgian_cil* = 16781548'i32 + +const KEY_Georgian_don* = 16781523'i32 + +const KEY_Georgian_en* = 16781524'i32 + +const KEY_Georgian_fi* = 16781558'i32 + +const KEY_Georgian_gan* = 16781522'i32 + +const KEY_Georgian_ghan* = 16781542'i32 + +const KEY_Georgian_hae* = 16781552'i32 + +const KEY_Georgian_har* = 16781556'i32 + +const KEY_Georgian_he* = 16781553'i32 + +const KEY_Georgian_hie* = 16781554'i32 + +const KEY_Georgian_hoe* = 16781557'i32 + +const KEY_Georgian_in* = 16781528'i32 + +const KEY_Georgian_jhan* = 16781551'i32 + +const KEY_Georgian_jil* = 16781547'i32 + +const KEY_Georgian_kan* = 16781529'i32 + +const KEY_Georgian_khar* = 16781541'i32 + +const KEY_Georgian_las* = 16781530'i32 + +const KEY_Georgian_man* = 16781531'i32 + +const KEY_Georgian_nar* = 16781532'i32 + +const KEY_Georgian_on* = 16781533'i32 + +const KEY_Georgian_par* = 16781534'i32 + +const KEY_Georgian_phar* = 16781540'i32 + +const KEY_Georgian_qar* = 16781543'i32 + +const KEY_Georgian_rae* = 16781536'i32 + +const KEY_Georgian_san* = 16781537'i32 + +const KEY_Georgian_shin* = 16781544'i32 + +const KEY_Georgian_tan* = 16781527'i32 + +const KEY_Georgian_tar* = 16781538'i32 + +const KEY_Georgian_un* = 16781539'i32 + +const KEY_Georgian_vin* = 16781525'i32 + +const KEY_Georgian_we* = 16781555'i32 + +const KEY_Georgian_xan* = 16781550'i32 + +const KEY_Georgian_zen* = 16781526'i32 + +const KEY_Georgian_zhar* = 16781535'i32 + +const KEY_Go* = 269025119'i32 + +const UKEY_Greek_ALPHA* = 1985'i32 + +const UKEY_Greek_ALPHAaccent* = 1953'i32 + +const UKEY_Greek_BETA* = 1986'i32 + +const UKEY_Greek_CHI* = 2007'i32 + +const UKEY_Greek_DELTA* = 1988'i32 + +const UKEY_Greek_EPSILON* = 1989'i32 + +const UKEY_Greek_EPSILONaccent* = 1954'i32 + +const UKEY_Greek_ETA* = 1991'i32 + +const UKEY_Greek_ETAaccent* = 1955'i32 + +const UKEY_Greek_GAMMA* = 1987'i32 + +const UKEY_Greek_IOTA* = 1993'i32 + +const UKEY_Greek_IOTAaccent* = 1956'i32 + +const KEY_Greek_IOTAdiaeresis* = 1957'i32 + +const UKEY_Greek_IOTAdieresis* = 1957'i32 + +const UKEY_Greek_KAPPA* = 1994'i32 + +const UKEY_Greek_LAMBDA* = 1995'i32 + +const UKEY_Greek_LAMDA* = 1995'i32 + +const UKEY_Greek_MU* = 1996'i32 + +const UKEY_Greek_NU* = 1997'i32 + +const UKEY_Greek_OMEGA* = 2009'i32 + +const UKEY_Greek_OMEGAaccent* = 1963'i32 + +const UKEY_Greek_OMICRON* = 1999'i32 + +const UKEY_Greek_OMICRONaccent* = 1959'i32 + +const UKEY_Greek_PHI* = 2006'i32 + +const UKEY_Greek_PI* = 2000'i32 + +const UKEY_Greek_PSI* = 2008'i32 + +const UKEY_Greek_RHO* = 2001'i32 + +const UKEY_Greek_SIGMA* = 2002'i32 + +const UKEY_Greek_TAU* = 2004'i32 + +const UKEY_Greek_THETA* = 1992'i32 + +const UKEY_Greek_UPSILON* = 2005'i32 + +const UKEY_Greek_UPSILONaccent* = 1960'i32 + +const UKEY_Greek_UPSILONdieresis* = 1961'i32 + +const UKEY_Greek_XI* = 1998'i32 + +const UKEY_Greek_ZETA* = 1990'i32 + +const KEY_Greek_accentdieresis* = 1966'i32 + +const KEY_Greek_alpha* = 2017'i32 + +const KEY_Greek_alphaaccent* = 1969'i32 + +const KEY_Greek_beta* = 2018'i32 + +const KEY_Greek_chi* = 2039'i32 + +const KEY_Greek_delta* = 2020'i32 + +const KEY_Greek_epsilon* = 2021'i32 + +const KEY_Greek_epsilonaccent* = 1970'i32 + +const KEY_Greek_eta* = 2023'i32 + +const KEY_Greek_etaaccent* = 1971'i32 + +const KEY_Greek_finalsmallsigma* = 2035'i32 + +const KEY_Greek_gamma* = 2019'i32 + +const KEY_Greek_horizbar* = 1967'i32 + +const KEY_Greek_iota* = 2025'i32 + +const KEY_Greek_iotaaccent* = 1972'i32 + +const KEY_Greek_iotaaccentdieresis* = 1974'i32 + +const KEY_Greek_iotadieresis* = 1973'i32 + +const KEY_Greek_kappa* = 2026'i32 + +const KEY_Greek_lambda* = 2027'i32 + +const KEY_Greek_lamda* = 2027'i32 + +const KEY_Greek_mu* = 2028'i32 + +const KEY_Greek_nu* = 2029'i32 + +const KEY_Greek_omega* = 2041'i32 + +const KEY_Greek_omegaaccent* = 1979'i32 + +const KEY_Greek_omicron* = 2031'i32 + +const KEY_Greek_omicronaccent* = 1975'i32 + +const KEY_Greek_phi* = 2038'i32 + +const KEY_Greek_pi* = 2032'i32 + +const KEY_Greek_psi* = 2040'i32 + +const KEY_Greek_rho* = 2033'i32 + +const KEY_Greek_sigma* = 2034'i32 + +const KEY_Greek_switch* = 65406'i32 + +const KEY_Greek_tau* = 2036'i32 + +const KEY_Greek_theta* = 2024'i32 + +const KEY_Greek_upsilon* = 2037'i32 + +const KEY_Greek_upsilonaccent* = 1976'i32 + +const KEY_Greek_upsilonaccentdieresis* = 1978'i32 + +const KEY_Greek_upsilondieresis* = 1977'i32 + +const KEY_Greek_xi* = 2030'i32 + +const KEY_Greek_zeta* = 2022'i32 + +const KEY_Green* = 269025188'i32 + +const UKEY_H* = 72'i32 + +const KEY_Hangul* = 65329'i32 + +const KEY_Hangul_A* = 3775'i32 + +const KEY_Hangul_AE* = 3776'i32 + +const KEY_Hangul_AraeA* = 3830'i32 + +const KEY_Hangul_AraeAE* = 3831'i32 + +const KEY_Hangul_Banja* = 65337'i32 + +const KEY_Hangul_Cieuc* = 3770'i32 + +const KEY_Hangul_Codeinput* = 65335'i32 + +const KEY_Hangul_Dikeud* = 3751'i32 + +const KEY_Hangul_E* = 3780'i32 + +const KEY_Hangul_EO* = 3779'i32 + +const KEY_Hangul_EU* = 3793'i32 + +const KEY_Hangul_End* = 65331'i32 + +const KEY_Hangul_Hanja* = 65332'i32 + +const KEY_Hangul_Hieuh* = 3774'i32 + +const KEY_Hangul_I* = 3795'i32 + +const KEY_Hangul_Ieung* = 3767'i32 + +const KEY_Hangul_J_Cieuc* = 3818'i32 + +const KEY_Hangul_J_Dikeud* = 3802'i32 + +const KEY_Hangul_J_Hieuh* = 3822'i32 + +const KEY_Hangul_J_Ieung* = 3816'i32 + +const KEY_Hangul_J_Jieuj* = 3817'i32 + +const KEY_Hangul_J_Khieuq* = 3819'i32 + +const KEY_Hangul_J_Kiyeog* = 3796'i32 + +const KEY_Hangul_J_KiyeogSios* = 3798'i32 + +const KEY_Hangul_J_KkogjiDalrinIeung* = 3833'i32 + +const KEY_Hangul_J_Mieum* = 3811'i32 + +const KEY_Hangul_J_Nieun* = 3799'i32 + +const KEY_Hangul_J_NieunHieuh* = 3801'i32 + +const KEY_Hangul_J_NieunJieuj* = 3800'i32 + +const KEY_Hangul_J_PanSios* = 3832'i32 + +const KEY_Hangul_J_Phieuf* = 3821'i32 + +const KEY_Hangul_J_Pieub* = 3812'i32 + +const KEY_Hangul_J_PieubSios* = 3813'i32 + +const KEY_Hangul_J_Rieul* = 3803'i32 + +const KEY_Hangul_J_RieulHieuh* = 3810'i32 + +const KEY_Hangul_J_RieulKiyeog* = 3804'i32 + +const KEY_Hangul_J_RieulMieum* = 3805'i32 + +const KEY_Hangul_J_RieulPhieuf* = 3809'i32 + +const KEY_Hangul_J_RieulPieub* = 3806'i32 + +const KEY_Hangul_J_RieulSios* = 3807'i32 + +const KEY_Hangul_J_RieulTieut* = 3808'i32 + +const KEY_Hangul_J_Sios* = 3814'i32 + +const KEY_Hangul_J_SsangKiyeog* = 3797'i32 + +const KEY_Hangul_J_SsangSios* = 3815'i32 + +const KEY_Hangul_J_Tieut* = 3820'i32 + +const KEY_Hangul_J_YeorinHieuh* = 3834'i32 + +const KEY_Hangul_Jamo* = 65333'i32 + +const KEY_Hangul_Jeonja* = 65336'i32 + +const KEY_Hangul_Jieuj* = 3768'i32 + +const KEY_Hangul_Khieuq* = 3771'i32 + +const KEY_Hangul_Kiyeog* = 3745'i32 + +const KEY_Hangul_KiyeogSios* = 3747'i32 + +const KEY_Hangul_KkogjiDalrinIeung* = 3827'i32 + +const KEY_Hangul_Mieum* = 3761'i32 + +const KEY_Hangul_MultipleCandidate* = 65341'i32 + +const KEY_Hangul_Nieun* = 3748'i32 + +const KEY_Hangul_NieunHieuh* = 3750'i32 + +const KEY_Hangul_NieunJieuj* = 3749'i32 + +const KEY_Hangul_O* = 3783'i32 + +const KEY_Hangul_OE* = 3786'i32 + +const KEY_Hangul_PanSios* = 3826'i32 + +const KEY_Hangul_Phieuf* = 3773'i32 + +const KEY_Hangul_Pieub* = 3762'i32 + +const KEY_Hangul_PieubSios* = 3764'i32 + +const KEY_Hangul_PostHanja* = 65339'i32 + +const KEY_Hangul_PreHanja* = 65338'i32 + +const KEY_Hangul_PreviousCandidate* = 65342'i32 + +const KEY_Hangul_Rieul* = 3753'i32 + +const KEY_Hangul_RieulHieuh* = 3760'i32 + +const KEY_Hangul_RieulKiyeog* = 3754'i32 + +const KEY_Hangul_RieulMieum* = 3755'i32 + +const KEY_Hangul_RieulPhieuf* = 3759'i32 + +const KEY_Hangul_RieulPieub* = 3756'i32 + +const KEY_Hangul_RieulSios* = 3757'i32 + +const KEY_Hangul_RieulTieut* = 3758'i32 + +const KEY_Hangul_RieulYeorinHieuh* = 3823'i32 + +const KEY_Hangul_Romaja* = 65334'i32 + +const KEY_Hangul_SingleCandidate* = 65340'i32 + +const KEY_Hangul_Sios* = 3765'i32 + +const KEY_Hangul_Special* = 65343'i32 + +const KEY_Hangul_SsangDikeud* = 3752'i32 + +const KEY_Hangul_SsangJieuj* = 3769'i32 + +const KEY_Hangul_SsangKiyeog* = 3746'i32 + +const KEY_Hangul_SsangPieub* = 3763'i32 + +const KEY_Hangul_SsangSios* = 3766'i32 + +const KEY_Hangul_Start* = 65330'i32 + +const KEY_Hangul_SunkyeongeumMieum* = 3824'i32 + +const KEY_Hangul_SunkyeongeumPhieuf* = 3828'i32 + +const KEY_Hangul_SunkyeongeumPieub* = 3825'i32 + +const KEY_Hangul_Tieut* = 3772'i32 + +const KEY_Hangul_U* = 3788'i32 + +const KEY_Hangul_WA* = 3784'i32 + +const KEY_Hangul_WAE* = 3785'i32 + +const KEY_Hangul_WE* = 3790'i32 + +const KEY_Hangul_WEO* = 3789'i32 + +const KEY_Hangul_WI* = 3791'i32 + +const KEY_Hangul_YA* = 3777'i32 + +const KEY_Hangul_YAE* = 3778'i32 + +const KEY_Hangul_YE* = 3782'i32 + +const KEY_Hangul_YEO* = 3781'i32 + +const KEY_Hangul_YI* = 3794'i32 + +const KEY_Hangul_YO* = 3787'i32 + +const KEY_Hangul_YU* = 3792'i32 + +const KEY_Hangul_YeorinHieuh* = 3829'i32 + +const KEY_Hangul_switch* = 65406'i32 + +const KEY_Hankaku* = 65321'i32 + +const UKEY_Hcircumflex* = 678'i32 + +const KEY_Hebrew_switch* = 65406'i32 + +const KEY_Help* = 65386'i32 + +const KEY_Henkan* = 65315'i32 + +const KEY_Henkan_Mode* = 65315'i32 + +const KEY_Hibernate* = 269025192'i32 + +const KEY_Hiragana* = 65317'i32 + +const KEY_Hiragana_Katakana* = 65319'i32 + +const KEY_History* = 269025079'i32 + +const KEY_Home* = 65360'i32 + +const KEY_HomePage* = 269025048'i32 + +const KEY_HotLinks* = 269025082'i32 + +const UKEY_Hstroke* = 673'i32 + +const KEY_Hyper_L* = 65517'i32 + +const KEY_Hyper_R* = 65518'i32 + +const UKEY_I* = 73'i32 + +const KEY_ISO_Center_Object* = 65075'i32 + +const KEY_ISO_Continuous_Underline* = 65072'i32 + +const KEY_ISO_Discontinuous_Underline* = 65073'i32 + +const KEY_ISO_Emphasize* = 65074'i32 + +const KEY_ISO_Enter* = 65076'i32 + +const KEY_ISO_Fast_Cursor_Down* = 65071'i32 + +const KEY_ISO_Fast_Cursor_Left* = 65068'i32 + +const KEY_ISO_Fast_Cursor_Right* = 65069'i32 + +const KEY_ISO_Fast_Cursor_Up* = 65070'i32 + +const KEY_ISO_First_Group* = 65036'i32 + +const KEY_ISO_First_Group_Lock* = 65037'i32 + +const KEY_ISO_Group_Latch* = 65030'i32 + +const KEY_ISO_Group_Lock* = 65031'i32 + +const KEY_ISO_Group_Shift* = 65406'i32 + +const KEY_ISO_Last_Group* = 65038'i32 + +const KEY_ISO_Last_Group_Lock* = 65039'i32 + +const KEY_ISO_Left_Tab* = 65056'i32 + +const KEY_ISO_Level2_Latch* = 65026'i32 + +const KEY_ISO_Level3_Latch* = 65028'i32 + +const KEY_ISO_Level3_Lock* = 65029'i32 + +const KEY_ISO_Level3_Shift* = 65027'i32 + +const KEY_ISO_Level5_Latch* = 65042'i32 + +const KEY_ISO_Level5_Lock* = 65043'i32 + +const KEY_ISO_Level5_Shift* = 65041'i32 + +const KEY_ISO_Lock* = 65025'i32 + +const KEY_ISO_Move_Line_Down* = 65058'i32 + +const KEY_ISO_Move_Line_Up* = 65057'i32 + +const KEY_ISO_Next_Group* = 65032'i32 + +const KEY_ISO_Next_Group_Lock* = 65033'i32 + +const KEY_ISO_Partial_Line_Down* = 65060'i32 + +const KEY_ISO_Partial_Line_Up* = 65059'i32 + +const KEY_ISO_Partial_Space_Left* = 65061'i32 + +const KEY_ISO_Partial_Space_Right* = 65062'i32 + +const KEY_ISO_Prev_Group* = 65034'i32 + +const KEY_ISO_Prev_Group_Lock* = 65035'i32 + +const KEY_ISO_Release_Both_Margins* = 65067'i32 + +const KEY_ISO_Release_Margin_Left* = 65065'i32 + +const KEY_ISO_Release_Margin_Right* = 65066'i32 + +const KEY_ISO_Set_Margin_Left* = 65063'i32 + +const KEY_ISO_Set_Margin_Right* = 65064'i32 + +const KEY_Iabovedot* = 681'i32 + +const UKEY_Iacute* = 205'i32 + +const UKEY_Ibelowdot* = 16785098'i32 + +const UKEY_Ibreve* = 16777516'i32 + +const UKEY_Icircumflex* = 206'i32 + +const UKEY_Idiaeresis* = 207'i32 + +const UKEY_Igrave* = 204'i32 + +const UKEY_Ihook* = 16785096'i32 + +const UKEY_Imacron* = 975'i32 + +const KEY_Insert* = 65379'i32 + +const UKEY_Iogonek* = 967'i32 + +const UKEY_Itilde* = 933'i32 + +const UKEY_J* = 74'i32 + +const UKEY_Jcircumflex* = 684'i32 + +const UKEY_K* = 75'i32 + +const KEY_KP_0* = 65456'i32 + +const KEY_KP_1* = 65457'i32 + +const KEY_KP_2* = 65458'i32 + +const KEY_KP_3* = 65459'i32 + +const KEY_KP_4* = 65460'i32 + +const KEY_KP_5* = 65461'i32 + +const KEY_KP_6* = 65462'i32 + +const KEY_KP_7* = 65463'i32 + +const KEY_KP_8* = 65464'i32 + +const KEY_KP_9* = 65465'i32 + +const KEY_KP_Add* = 65451'i32 + +const KEY_KP_Begin* = 65437'i32 + +const KEY_KP_Decimal* = 65454'i32 + +const KEY_KP_Delete* = 65439'i32 + +const KEY_KP_Divide* = 65455'i32 + +const KEY_KP_Down* = 65433'i32 + +const KEY_KP_End* = 65436'i32 + +const KEY_KP_Enter* = 65421'i32 + +const KEY_KP_Equal* = 65469'i32 + +const KEY_KP_F1* = 65425'i32 + +const KEY_KP_F2* = 65426'i32 + +const KEY_KP_F3* = 65427'i32 + +const KEY_KP_F4* = 65428'i32 + +const KEY_KP_Home* = 65429'i32 + +const KEY_KP_Insert* = 65438'i32 + +const KEY_KP_Left* = 65430'i32 + +const KEY_KP_Multiply* = 65450'i32 + +const KEY_KP_Next* = 65435'i32 + +const KEY_KP_Page_Down* = 65435'i32 + +const KEY_KP_Page_Up* = 65434'i32 + +const KEY_KP_Prior* = 65434'i32 + +const KEY_KP_Right* = 65432'i32 + +const KEY_KP_Separator* = 65452'i32 + +const KEY_KP_Space* = 65408'i32 + +const KEY_KP_Subtract* = 65453'i32 + +const KEY_KP_Tab* = 65417'i32 + +const KEY_KP_Up* = 65431'i32 + +const KEY_Kana_Lock* = 65325'i32 + +const KEY_Kana_Shift* = 65326'i32 + +const KEY_Kanji* = 65313'i32 + +const KEY_Kanji_Bangou* = 65335'i32 + +const KEY_Katakana* = 65318'i32 + +const KEY_KbdBrightnessDown* = 269025030'i32 + +const KEY_KbdBrightnessUp* = 269025029'i32 + +const KEY_KbdLightOnOff* = 269025028'i32 + +const UKEY_Kcedilla* = 979'i32 + +const KEY_Korean_Won* = 3839'i32 + +const UKEY_L* = 76'i32 + +const KEY_L1* = 65480'i32 + +const KEY_L10* = 65489'i32 + +const KEY_L2* = 65481'i32 + +const KEY_L3* = 65482'i32 + +const KEY_L4* = 65483'i32 + +const KEY_L5* = 65484'i32 + +const KEY_L6* = 65485'i32 + +const KEY_L7* = 65486'i32 + +const KEY_L8* = 65487'i32 + +const KEY_L9* = 65488'i32 + +const UKEY_Lacute* = 453'i32 + +const KEY_Last_Virtual_Screen* = 65236'i32 + +const KEY_Launch0* = 269025088'i32 + +const KEY_Launch1* = 269025089'i32 + +const KEY_Launch2* = 269025090'i32 + +const KEY_Launch3* = 269025091'i32 + +const KEY_Launch4* = 269025092'i32 + +const KEY_Launch5* = 269025093'i32 + +const KEY_Launch6* = 269025094'i32 + +const KEY_Launch7* = 269025095'i32 + +const KEY_Launch8* = 269025096'i32 + +const KEY_Launch9* = 269025097'i32 + +const KEY_LaunchA* = 269025098'i32 + +const KEY_LaunchB* = 269025099'i32 + +const KEY_LaunchC* = 269025100'i32 + +const KEY_LaunchD* = 269025101'i32 + +const KEY_LaunchE* = 269025102'i32 + +const KEY_LaunchF* = 269025103'i32 + +const UKEY_Lbelowdot* = 16784950'i32 + +const UKEY_Lcaron* = 421'i32 + +const UKEY_Lcedilla* = 934'i32 + +const KEY_Left* = 65361'i32 + +const KEY_LightBulb* = 269025077'i32 + +const KEY_Linefeed* = 65290'i32 + +const KEY_LiraSign* = 16785572'i32 + +const KEY_LogGrabInfo* = 269024805'i32 + +const KEY_LogOff* = 269025121'i32 + +const KEY_LogWindowTree* = 269024804'i32 + +const UKEY_Lstroke* = 419'i32 + +const UKEY_M* = 77'i32 + +const UKEY_Mabovedot* = 16784960'i32 + +const UKEY_Macedonia_DSE* = 1717'i32 + +const UKEY_Macedonia_GJE* = 1714'i32 + +const UKEY_Macedonia_KJE* = 1724'i32 + +const KEY_Macedonia_dse* = 1701'i32 + +const KEY_Macedonia_gje* = 1698'i32 + +const KEY_Macedonia_kje* = 1708'i32 + +const KEY_Mae_Koho* = 65342'i32 + +const KEY_Mail* = 269025049'i32 + +const KEY_MailForward* = 269025168'i32 + +const KEY_Market* = 269025122'i32 + +const KEY_Massyo* = 65324'i32 + +const KEY_Meeting* = 269025123'i32 + +const KEY_Memo* = 269025054'i32 + +const KEY_Menu* = 65383'i32 + +const KEY_MenuKB* = 269025125'i32 + +const KEY_MenuPB* = 269025126'i32 + +const KEY_Messenger* = 269025166'i32 + +const KEY_Meta_L* = 65511'i32 + +const KEY_Meta_R* = 65512'i32 + +const KEY_MillSign* = 16785573'i32 + +const KEY_ModeLock* = 269025025'i32 + +const KEY_Mode_switch* = 65406'i32 + +const KEY_MonBrightnessDown* = 269025027'i32 + +const KEY_MonBrightnessUp* = 269025026'i32 + +const KEY_MouseKeys_Accel_Enable* = 65143'i32 + +const KEY_MouseKeys_Enable* = 65142'i32 + +const KEY_Muhenkan* = 65314'i32 + +const KEY_Multi_key* = 65312'i32 + +const KEY_MultipleCandidate* = 65341'i32 + +const KEY_Music* = 269025170'i32 + +const KEY_MyComputer* = 269025075'i32 + +const KEY_MySites* = 269025127'i32 + +const UKEY_N* = 78'i32 + +const UKEY_Nacute* = 465'i32 + +const KEY_NairaSign* = 16785574'i32 + +const UKEY_Ncaron* = 466'i32 + +const UKEY_Ncedilla* = 977'i32 + +const KEY_New* = 269025128'i32 + +const KEY_NewSheqelSign* = 16785578'i32 + +const KEY_News* = 269025129'i32 + +const KEY_Next* = 65366'i32 + +const KEY_Next_VMode* = 269024802'i32 + +const KEY_Next_Virtual_Screen* = 65234'i32 + +const UKEY_Ntilde* = 209'i32 + +const KEY_Num_Lock* = 65407'i32 + +const UKEY_O* = 79'i32 + +const UKEY_OE* = 5052'i32 + +const UKEY_Oacute* = 211'i32 + +const UKEY_Obarred* = 16777631'i32 + +const UKEY_Obelowdot* = 16785100'i32 + +const UKEY_Ocaron* = 16777681'i32 + +const UKEY_Ocircumflex* = 212'i32 + +const UKEY_Ocircumflexacute* = 16785104'i32 + +const UKEY_Ocircumflexbelowdot* = 16785112'i32 + +const UKEY_Ocircumflexgrave* = 16785106'i32 + +const UKEY_Ocircumflexhook* = 16785108'i32 + +const UKEY_Ocircumflextilde* = 16785110'i32 + +const UKEY_Odiaeresis* = 214'i32 + +const UKEY_Odoubleacute* = 469'i32 + +const KEY_OfficeHome* = 269025130'i32 + +const UKEY_Ograve* = 210'i32 + +const UKEY_Ohook* = 16785102'i32 + +const UKEY_Ohorn* = 16777632'i32 + +const UKEY_Ohornacute* = 16785114'i32 + +const UKEY_Ohornbelowdot* = 16785122'i32 + +const UKEY_Ohorngrave* = 16785116'i32 + +const UKEY_Ohornhook* = 16785118'i32 + +const UKEY_Ohorntilde* = 16785120'i32 + +const UKEY_Omacron* = 978'i32 + +const UKEY_Ooblique* = 216'i32 + +const KEY_Open* = 269025131'i32 + +const KEY_OpenURL* = 269025080'i32 + +const KEY_Option* = 269025132'i32 + +const UKEY_Oslash* = 216'i32 + +const UKEY_Otilde* = 213'i32 + +const KEY_Overlay1_Enable* = 65144'i32 + +const KEY_Overlay2_Enable* = 65145'i32 + +const UKEY_P* = 80'i32 + +const UKEY_Pabovedot* = 16784982'i32 + +const KEY_Page_Down* = 65366'i32 + +const KEY_Page_Up* = 65365'i32 + +const KEY_Paste* = 269025133'i32 + +const KEY_Pause* = 65299'i32 + +const KEY_PesetaSign* = 16785575'i32 + +const KEY_Phone* = 269025134'i32 + +const KEY_Pictures* = 269025169'i32 + +const KEY_Pointer_Accelerate* = 65274'i32 + +const KEY_Pointer_Button1* = 65257'i32 + +const KEY_Pointer_Button2* = 65258'i32 + +const KEY_Pointer_Button3* = 65259'i32 + +const KEY_Pointer_Button4* = 65260'i32 + +const KEY_Pointer_Button5* = 65261'i32 + +const KEY_Pointer_Button_Dflt* = 65256'i32 + +const KEY_Pointer_DblClick1* = 65263'i32 + +const KEY_Pointer_DblClick2* = 65264'i32 + +const KEY_Pointer_DblClick3* = 65265'i32 + +const KEY_Pointer_DblClick4* = 65266'i32 + +const KEY_Pointer_DblClick5* = 65267'i32 + +const KEY_Pointer_DblClick_Dflt* = 65262'i32 + +const KEY_Pointer_DfltBtnNext* = 65275'i32 + +const KEY_Pointer_DfltBtnPrev* = 65276'i32 + +const KEY_Pointer_Down* = 65251'i32 + +const KEY_Pointer_DownLeft* = 65254'i32 + +const KEY_Pointer_DownRight* = 65255'i32 + +const KEY_Pointer_Drag1* = 65269'i32 + +const KEY_Pointer_Drag2* = 65270'i32 + +const KEY_Pointer_Drag3* = 65271'i32 + +const KEY_Pointer_Drag4* = 65272'i32 + +const KEY_Pointer_Drag5* = 65277'i32 + +const KEY_Pointer_Drag_Dflt* = 65268'i32 + +const KEY_Pointer_EnableKeys* = 65273'i32 + +const KEY_Pointer_Left* = 65248'i32 + +const KEY_Pointer_Right* = 65249'i32 + +const KEY_Pointer_Up* = 65250'i32 + +const KEY_Pointer_UpLeft* = 65252'i32 + +const KEY_Pointer_UpRight* = 65253'i32 + +const KEY_PowerDown* = 269025057'i32 + +const KEY_PowerOff* = 269025066'i32 + +const KEY_Prev_VMode* = 269024803'i32 + +const KEY_Prev_Virtual_Screen* = 65233'i32 + +const KEY_PreviousCandidate* = 65342'i32 + +const KEY_Print* = 65377'i32 + +const KEY_Prior* = 65365'i32 + +const UKEY_Q* = 81'i32 + +const UKEY_R* = 82'i32 + +const KEY_R1* = 65490'i32 + +const KEY_R10* = 65499'i32 + +const KEY_R11* = 65500'i32 + +const KEY_R12* = 65501'i32 + +const KEY_R13* = 65502'i32 + +const KEY_R14* = 65503'i32 + +const KEY_R15* = 65504'i32 + +const KEY_R2* = 65491'i32 + +const KEY_R3* = 65492'i32 + +const KEY_R4* = 65493'i32 + +const KEY_R5* = 65494'i32 + +const KEY_R6* = 65495'i32 + +const KEY_R7* = 65496'i32 + +const KEY_R8* = 65497'i32 + +const KEY_R9* = 65498'i32 + +const UKEY_Racute* = 448'i32 + +const UKEY_Rcaron* = 472'i32 + +const UKEY_Rcedilla* = 931'i32 + +const KEY_Red* = 269025187'i32 + +const KEY_Redo* = 65382'i32 + +const KEY_Refresh* = 269025065'i32 + +const KEY_Reload* = 269025139'i32 + +const KEY_RepeatKeys_Enable* = 65138'i32 + +const KEY_Reply* = 269025138'i32 + +const KEY_Return* = 65293'i32 + +const KEY_Right* = 65363'i32 + +const KEY_RockerDown* = 269025060'i32 + +const KEY_RockerEnter* = 269025061'i32 + +const KEY_RockerUp* = 269025059'i32 + +const KEY_Romaji* = 65316'i32 + +const KEY_RotateWindows* = 269025140'i32 + +const KEY_RotationKB* = 269025142'i32 + +const KEY_RotationPB* = 269025141'i32 + +const KEY_RupeeSign* = 16785576'i32 + +const UKEY_S* = 83'i32 + +const UKEY_SCHWA* = 16777615'i32 + +const UKEY_Sabovedot* = 16784992'i32 + +const UKEY_Sacute* = 422'i32 + +const KEY_Save* = 269025143'i32 + +const UKEY_Scaron* = 425'i32 + +const UKEY_Scedilla* = 426'i32 + +const UKEY_Scircumflex* = 734'i32 + +const KEY_ScreenSaver* = 269025069'i32 + +const KEY_ScrollClick* = 269025146'i32 + +const KEY_ScrollDown* = 269025145'i32 + +const KEY_ScrollUp* = 269025144'i32 + +const KEY_Scroll_Lock* = 65300'i32 + +const KEY_Search* = 269025051'i32 + +const KEY_Select* = 65376'i32 + +const KEY_SelectButton* = 269025184'i32 + +const KEY_Send* = 269025147'i32 + +const UKEY_Serbian_DJE* = 1713'i32 + +const UKEY_Serbian_DZE* = 1727'i32 + +const UKEY_Serbian_JE* = 1720'i32 + +const UKEY_Serbian_LJE* = 1721'i32 + +const UKEY_Serbian_NJE* = 1722'i32 + +const UKEY_Serbian_TSHE* = 1723'i32 + +const KEY_Serbian_dje* = 1697'i32 + +const KEY_Serbian_dze* = 1711'i32 + +const KEY_Serbian_je* = 1704'i32 + +const KEY_Serbian_lje* = 1705'i32 + +const KEY_Serbian_nje* = 1706'i32 + +const KEY_Serbian_tshe* = 1707'i32 + +const KEY_Shift_L* = 65505'i32 + +const KEY_Shift_Lock* = 65510'i32 + +const KEY_Shift_R* = 65506'i32 + +const KEY_Shop* = 269025078'i32 + +const KEY_SingleCandidate* = 65340'i32 + +const KEY_Sinh_a* = 16780677'i32 + +const KEY_Sinh_aa* = 16780678'i32 + +const KEY_Sinh_aa2* = 16780751'i32 + +const KEY_Sinh_ae* = 16780679'i32 + +const KEY_Sinh_ae2* = 16780752'i32 + +const KEY_Sinh_aee* = 16780680'i32 + +const KEY_Sinh_aee2* = 16780753'i32 + +const KEY_Sinh_ai* = 16780691'i32 + +const KEY_Sinh_ai2* = 16780763'i32 + +const KEY_Sinh_al* = 16780746'i32 + +const KEY_Sinh_au* = 16780694'i32 + +const KEY_Sinh_au2* = 16780766'i32 + +const KEY_Sinh_ba* = 16780726'i32 + +const KEY_Sinh_bha* = 16780727'i32 + +const KEY_Sinh_ca* = 16780704'i32 + +const KEY_Sinh_cha* = 16780705'i32 + +const KEY_Sinh_dda* = 16780713'i32 + +const KEY_Sinh_ddha* = 16780714'i32 + +const KEY_Sinh_dha* = 16780719'i32 + +const KEY_Sinh_dhha* = 16780720'i32 + +const KEY_Sinh_e* = 16780689'i32 + +const KEY_Sinh_e2* = 16780761'i32 + +const KEY_Sinh_ee* = 16780690'i32 + +const KEY_Sinh_ee2* = 16780762'i32 + +const KEY_Sinh_fa* = 16780742'i32 + +const KEY_Sinh_ga* = 16780700'i32 + +const KEY_Sinh_gha* = 16780701'i32 + +const KEY_Sinh_h2* = 16780675'i32 + +const KEY_Sinh_ha* = 16780740'i32 + +const KEY_Sinh_i* = 16780681'i32 + +const KEY_Sinh_i2* = 16780754'i32 + +const KEY_Sinh_ii* = 16780682'i32 + +const KEY_Sinh_ii2* = 16780755'i32 + +const KEY_Sinh_ja* = 16780706'i32 + +const KEY_Sinh_jha* = 16780707'i32 + +const KEY_Sinh_jnya* = 16780709'i32 + +const KEY_Sinh_ka* = 16780698'i32 + +const KEY_Sinh_kha* = 16780699'i32 + +const KEY_Sinh_kunddaliya* = 16780788'i32 + +const KEY_Sinh_la* = 16780733'i32 + +const KEY_Sinh_lla* = 16780741'i32 + +const KEY_Sinh_lu* = 16780687'i32 + +const KEY_Sinh_lu2* = 16780767'i32 + +const KEY_Sinh_luu* = 16780688'i32 + +const KEY_Sinh_luu2* = 16780787'i32 + +const KEY_Sinh_ma* = 16780728'i32 + +const KEY_Sinh_mba* = 16780729'i32 + +const KEY_Sinh_na* = 16780721'i32 + +const KEY_Sinh_ndda* = 16780716'i32 + +const KEY_Sinh_ndha* = 16780723'i32 + +const KEY_Sinh_ng* = 16780674'i32 + +const KEY_Sinh_ng2* = 16780702'i32 + +const KEY_Sinh_nga* = 16780703'i32 + +const KEY_Sinh_nja* = 16780710'i32 + +const KEY_Sinh_nna* = 16780715'i32 + +const KEY_Sinh_nya* = 16780708'i32 + +const KEY_Sinh_o* = 16780692'i32 + +const KEY_Sinh_o2* = 16780764'i32 + +const KEY_Sinh_oo* = 16780693'i32 + +const KEY_Sinh_oo2* = 16780765'i32 + +const KEY_Sinh_pa* = 16780724'i32 + +const KEY_Sinh_pha* = 16780725'i32 + +const KEY_Sinh_ra* = 16780731'i32 + +const KEY_Sinh_ri* = 16780685'i32 + +const KEY_Sinh_rii* = 16780686'i32 + +const KEY_Sinh_ru2* = 16780760'i32 + +const KEY_Sinh_ruu2* = 16780786'i32 + +const KEY_Sinh_sa* = 16780739'i32 + +const KEY_Sinh_sha* = 16780737'i32 + +const KEY_Sinh_ssha* = 16780738'i32 + +const KEY_Sinh_tha* = 16780717'i32 + +const KEY_Sinh_thha* = 16780718'i32 + +const KEY_Sinh_tta* = 16780711'i32 + +const KEY_Sinh_ttha* = 16780712'i32 + +const KEY_Sinh_u* = 16780683'i32 + +const KEY_Sinh_u2* = 16780756'i32 + +const KEY_Sinh_uu* = 16780684'i32 + +const KEY_Sinh_uu2* = 16780758'i32 + +const KEY_Sinh_va* = 16780736'i32 + +const KEY_Sinh_ya* = 16780730'i32 + +const KEY_Sleep* = 269025071'i32 + +const KEY_SlowKeys_Enable* = 65139'i32 + +const KEY_Spell* = 269025148'i32 + +const KEY_SplitScreen* = 269025149'i32 + +const KEY_Standby* = 269025040'i32 + +const KEY_Start* = 269025050'i32 + +const KEY_StickyKeys_Enable* = 65141'i32 + +const KEY_Stop* = 269025064'i32 + +const KEY_Subtitle* = 269025178'i32 + +const KEY_Super_L* = 65515'i32 + +const KEY_Super_R* = 65516'i32 + +const KEY_Support* = 269025150'i32 + +const KEY_Suspend* = 269025191'i32 + +const KEY_Switch_VT_1* = 269024769'i32 + +const KEY_Switch_VT_10* = 269024778'i32 + +const KEY_Switch_VT_11* = 269024779'i32 + +const KEY_Switch_VT_12* = 269024780'i32 + +const KEY_Switch_VT_2* = 269024770'i32 + +const KEY_Switch_VT_3* = 269024771'i32 + +const KEY_Switch_VT_4* = 269024772'i32 + +const KEY_Switch_VT_5* = 269024773'i32 + +const KEY_Switch_VT_6* = 269024774'i32 + +const KEY_Switch_VT_7* = 269024775'i32 + +const KEY_Switch_VT_8* = 269024776'i32 + +const KEY_Switch_VT_9* = 269024777'i32 + +const KEY_Sys_Req* = 65301'i32 + +const UKEY_T* = 84'i32 + +const XKEY_THORN* = 222'i32 + +const KEY_Tab* = 65289'i32 + +const UKEY_Tabovedot* = 16785002'i32 + +const KEY_TaskPane* = 269025151'i32 + +const UKEY_Tcaron* = 427'i32 + +const UKEY_Tcedilla* = 478'i32 + +const KEY_Terminal* = 269025152'i32 + +const KEY_Terminate_Server* = 65237'i32 + +const KEY_Thai_baht* = 3551'i32 + +const KEY_Thai_bobaimai* = 3514'i32 + +const KEY_Thai_chochan* = 3496'i32 + +const KEY_Thai_chochang* = 3498'i32 + +const KEY_Thai_choching* = 3497'i32 + +const KEY_Thai_chochoe* = 3500'i32 + +const KEY_Thai_dochada* = 3502'i32 + +const KEY_Thai_dodek* = 3508'i32 + +const KEY_Thai_fofa* = 3517'i32 + +const KEY_Thai_fofan* = 3519'i32 + +const KEY_Thai_hohip* = 3531'i32 + +const KEY_Thai_honokhuk* = 3534'i32 + +const KEY_Thai_khokhai* = 3490'i32 + +const KEY_Thai_khokhon* = 3493'i32 + +const KEY_Thai_khokhuat* = 3491'i32 + +const KEY_Thai_khokhwai* = 3492'i32 + +const KEY_Thai_khorakhang* = 3494'i32 + +const KEY_Thai_kokai* = 3489'i32 + +const KEY_Thai_lakkhangyao* = 3557'i32 + +const KEY_Thai_lekchet* = 3575'i32 + +const KEY_Thai_lekha* = 3573'i32 + +const KEY_Thai_lekhok* = 3574'i32 + +const KEY_Thai_lekkao* = 3577'i32 + +const KEY_Thai_leknung* = 3569'i32 + +const KEY_Thai_lekpaet* = 3576'i32 + +const KEY_Thai_leksam* = 3571'i32 + +const KEY_Thai_leksi* = 3572'i32 + +const KEY_Thai_leksong* = 3570'i32 + +const KEY_Thai_leksun* = 3568'i32 + +const KEY_Thai_lochula* = 3532'i32 + +const KEY_Thai_loling* = 3525'i32 + +const KEY_Thai_lu* = 3526'i32 + +const KEY_Thai_maichattawa* = 3563'i32 + +const KEY_Thai_maiek* = 3560'i32 + +const KEY_Thai_maihanakat* = 3537'i32 + +const KEY_Thai_maihanakat_maitho* = 3550'i32 + +const KEY_Thai_maitaikhu* = 3559'i32 + +const KEY_Thai_maitho* = 3561'i32 + +const KEY_Thai_maitri* = 3562'i32 + +const KEY_Thai_maiyamok* = 3558'i32 + +const KEY_Thai_moma* = 3521'i32 + +const KEY_Thai_ngongu* = 3495'i32 + +const KEY_Thai_nikhahit* = 3565'i32 + +const KEY_Thai_nonen* = 3507'i32 + +const KEY_Thai_nonu* = 3513'i32 + +const KEY_Thai_oang* = 3533'i32 + +const KEY_Thai_paiyannoi* = 3535'i32 + +const KEY_Thai_phinthu* = 3546'i32 + +const KEY_Thai_phophan* = 3518'i32 + +const KEY_Thai_phophung* = 3516'i32 + +const KEY_Thai_phosamphao* = 3520'i32 + +const KEY_Thai_popla* = 3515'i32 + +const KEY_Thai_rorua* = 3523'i32 + +const KEY_Thai_ru* = 3524'i32 + +const KEY_Thai_saraa* = 3536'i32 + +const KEY_Thai_saraaa* = 3538'i32 + +const KEY_Thai_saraae* = 3553'i32 + +const KEY_Thai_saraaimaimalai* = 3556'i32 + +const KEY_Thai_saraaimaimuan* = 3555'i32 + +const KEY_Thai_saraam* = 3539'i32 + +const KEY_Thai_sarae* = 3552'i32 + +const KEY_Thai_sarai* = 3540'i32 + +const KEY_Thai_saraii* = 3541'i32 + +const KEY_Thai_sarao* = 3554'i32 + +const KEY_Thai_sarau* = 3544'i32 + +const KEY_Thai_saraue* = 3542'i32 + +const KEY_Thai_sarauee* = 3543'i32 + +const KEY_Thai_sarauu* = 3545'i32 + +const KEY_Thai_sorusi* = 3529'i32 + +const KEY_Thai_sosala* = 3528'i32 + +const KEY_Thai_soso* = 3499'i32 + +const KEY_Thai_sosua* = 3530'i32 + +const KEY_Thai_thanthakhat* = 3564'i32 + +const KEY_Thai_thonangmontho* = 3505'i32 + +const KEY_Thai_thophuthao* = 3506'i32 + +const KEY_Thai_thothahan* = 3511'i32 + +const KEY_Thai_thothan* = 3504'i32 + +const KEY_Thai_thothong* = 3512'i32 + +const KEY_Thai_thothung* = 3510'i32 + +const KEY_Thai_topatak* = 3503'i32 + +const KEY_Thai_totao* = 3509'i32 + +const KEY_Thai_wowaen* = 3527'i32 + +const KEY_Thai_yoyak* = 3522'i32 + +const KEY_Thai_yoying* = 3501'i32 + +const UKEY_Thorn* = 222'i32 + +const KEY_Time* = 269025183'i32 + +const KEY_ToDoList* = 269025055'i32 + +const KEY_Tools* = 269025153'i32 + +const KEY_TopMenu* = 269025186'i32 + +const KEY_TouchpadOff* = 269025201'i32 + +const KEY_TouchpadOn* = 269025200'i32 + +const KEY_TouchpadToggle* = 269025193'i32 + +const KEY_Touroku* = 65323'i32 + +const KEY_Travel* = 269025154'i32 + +const UKEY_Tslash* = 940'i32 + +const UKEY_U* = 85'i32 + +const KEY_UWB* = 269025174'i32 + +const UKEY_Uacute* = 218'i32 + +const UKEY_Ubelowdot* = 16785124'i32 + +const UKEY_Ubreve* = 733'i32 + +const UKEY_Ucircumflex* = 219'i32 + +const UKEY_Udiaeresis* = 220'i32 + +const UKEY_Udoubleacute* = 475'i32 + +const UKEY_Ugrave* = 217'i32 + +const UKEY_Uhook* = 16785126'i32 + +const UKEY_Uhorn* = 16777647'i32 + +const UKEY_Uhornacute* = 16785128'i32 + +const UKEY_Uhornbelowdot* = 16785136'i32 + +const UKEY_Uhorngrave* = 16785130'i32 + +const UKEY_Uhornhook* = 16785132'i32 + +const UKEY_Uhorntilde* = 16785134'i32 + +const UKEY_Ukrainian_GHE_WITH_UPTURN* = 1725'i32 + +const UKEY_Ukrainian_I* = 1718'i32 + +const UKEY_Ukrainian_IE* = 1716'i32 + +const UKEY_Ukrainian_YI* = 1719'i32 + +const KEY_Ukrainian_ghe_with_upturn* = 1709'i32 + +const KEY_Ukrainian_i* = 1702'i32 + +const KEY_Ukrainian_ie* = 1700'i32 + +const KEY_Ukrainian_yi* = 1703'i32 + +const UKEY_Ukranian_I* = 1718'i32 + +const UKEY_Ukranian_JE* = 1716'i32 + +const UKEY_Ukranian_YI* = 1719'i32 + +const KEY_Ukranian_i* = 1702'i32 + +const KEY_Ukranian_je* = 1700'i32 + +const KEY_Ukranian_yi* = 1703'i32 + +const UKEY_Umacron* = 990'i32 + +const KEY_Undo* = 65381'i32 + +const KEY_Ungrab* = 269024800'i32 + +const UKEY_Uogonek* = 985'i32 + +const KEY_Up* = 65362'i32 + +const UKEY_Uring* = 473'i32 + +const KEY_User1KB* = 269025157'i32 + +const KEY_User2KB* = 269025158'i32 + +const KEY_UserPB* = 269025156'i32 + +const UKEY_Utilde* = 989'i32 + +const UKEY_V* = 86'i32 + +const KEY_VendorHome* = 269025076'i32 + +const KEY_Video* = 269025159'i32 + +const KEY_View* = 269025185'i32 + +const KEY_VoidSymbol* = 16777215'i32 + +const UKEY_W* = 87'i32 + +const KEY_WLAN* = 269025173'i32 + +const KEY_WWW* = 269025070'i32 + +const UKEY_Wacute* = 16785026'i32 + +const KEY_WakeUp* = 269025067'i32 + +const UKEY_Wcircumflex* = 16777588'i32 + +const UKEY_Wdiaeresis* = 16785028'i32 + +const KEY_WebCam* = 269025167'i32 + +const UKEY_Wgrave* = 16785024'i32 + +const KEY_WheelButton* = 269025160'i32 + +const KEY_WindowClear* = 269025109'i32 + +const KEY_WonSign* = 16785577'i32 + +const KEY_Word* = 269025161'i32 + +const UKEY_X* = 88'i32 + +const UKEY_Xabovedot* = 16785034'i32 + +const KEY_Xfer* = 269025162'i32 + +const UKEY_Y* = 89'i32 + +const UKEY_Yacute* = 221'i32 + +const UKEY_Ybelowdot* = 16785140'i32 + +const UKEY_Ycircumflex* = 16777590'i32 + +const UKEY_Ydiaeresis* = 5054'i32 + +const KEY_Yellow* = 269025189'i32 + +const UKEY_Ygrave* = 16785138'i32 + +const UKEY_Yhook* = 16785142'i32 + +const UKEY_Ytilde* = 16785144'i32 + +const UKEY_Z* = 90'i32 + +const UKEY_Zabovedot* = 431'i32 + +const UKEY_Zacute* = 428'i32 + +const UKEY_Zcaron* = 430'i32 + +const KEY_Zen_Koho* = 65341'i32 + +const KEY_Zenkaku* = 65320'i32 + +const KEY_Zenkaku_Hankaku* = 65322'i32 + +const KEY_ZoomIn* = 269025163'i32 + +const KEY_ZoomOut* = 269025164'i32 + +const UKEY_Zstroke* = 16777653'i32 + +const KEY_a* = 97'i32 + +const KEY_aacute* = 225'i32 + +const KEY_abelowdot* = 16785057'i32 + +const KEY_abovedot* = 511'i32 + +const KEY_abreve* = 483'i32 + +const KEY_abreveacute* = 16785071'i32 + +const KEY_abrevebelowdot* = 16785079'i32 + +const KEY_abrevegrave* = 16785073'i32 + +const KEY_abrevehook* = 16785075'i32 + +const KEY_abrevetilde* = 16785077'i32 + +const KEY_acircumflex* = 226'i32 + +const KEY_acircumflexacute* = 16785061'i32 + +const KEY_acircumflexbelowdot* = 16785069'i32 + +const KEY_acircumflexgrave* = 16785063'i32 + +const KEY_acircumflexhook* = 16785065'i32 + +const KEY_acircumflextilde* = 16785067'i32 + +const KEY_acute* = 180'i32 + +const KEY_adiaeresis* = 228'i32 + +const KEY_ae* = 230'i32 + +const KEY_agrave* = 224'i32 + +const KEY_ahook* = 16785059'i32 + +const KEY_amacron* = 992'i32 + +const KEY_ampersand* = 38'i32 + +const KEY_aogonek* = 433'i32 + +const KEY_apostrophe* = 39'i32 + +const KEY_approxeq* = 16785992'i32 + +const KEY_approximate* = 2248'i32 + +const KEY_aring* = 229'i32 + +const KEY_asciicircum* = 94'i32 + +const KEY_asciitilde* = 126'i32 + +const KEY_asterisk* = 42'i32 + +const KEY_at* = 64'i32 + +const KEY_atilde* = 227'i32 + +const KEY_b* = 98'i32 + +const KEY_babovedot* = 16784899'i32 + +const KEY_backslash* = 92'i32 + +const KEY_ballotcross* = 2804'i32 + +const KEY_bar* = 124'i32 + +const KEY_because* = 16785973'i32 + +const KEY_blank* = 2527'i32 + +const KEY_botintegral* = 2213'i32 + +const KEY_botleftparens* = 2220'i32 + +const KEY_botleftsqbracket* = 2216'i32 + +const KEY_botleftsummation* = 2226'i32 + +const KEY_botrightparens* = 2222'i32 + +const KEY_botrightsqbracket* = 2218'i32 + +const KEY_botrightsummation* = 2230'i32 + +const KEY_bott* = 2550'i32 + +const KEY_botvertsummationconnector* = 2228'i32 + +const KEY_braceleft* = 123'i32 + +const KEY_braceright* = 125'i32 + +const KEY_bracketleft* = 91'i32 + +const KEY_bracketright* = 93'i32 + +const KEY_braille_blank* = 16787456'i32 + +const KEY_braille_dot_1* = 65521'i32 + +const KEY_braille_dot_10* = 65530'i32 + +const KEY_braille_dot_2* = 65522'i32 + +const KEY_braille_dot_3* = 65523'i32 + +const KEY_braille_dot_4* = 65524'i32 + +const KEY_braille_dot_5* = 65525'i32 + +const KEY_braille_dot_6* = 65526'i32 + +const KEY_braille_dot_7* = 65527'i32 + +const KEY_braille_dot_8* = 65528'i32 + +const KEY_braille_dot_9* = 65529'i32 + +const KEY_braille_dots_1* = 16787457'i32 + +const KEY_braille_dots_12* = 16787459'i32 + +const KEY_braille_dots_123* = 16787463'i32 + +const KEY_braille_dots_1234* = 16787471'i32 + +const KEY_braille_dots_12345* = 16787487'i32 + +const KEY_braille_dots_123456* = 16787519'i32 + +const KEY_braille_dots_1234567* = 16787583'i32 + +const KEY_braille_dots_12345678* = 16787711'i32 + +const KEY_braille_dots_1234568* = 16787647'i32 + +const KEY_braille_dots_123457* = 16787551'i32 + +const KEY_braille_dots_1234578* = 16787679'i32 + +const KEY_braille_dots_123458* = 16787615'i32 + +const KEY_braille_dots_12346* = 16787503'i32 + +const KEY_braille_dots_123467* = 16787567'i32 + +const KEY_braille_dots_1234678* = 16787695'i32 + +const KEY_braille_dots_123468* = 16787631'i32 + +const KEY_braille_dots_12347* = 16787535'i32 + +const KEY_braille_dots_123478* = 16787663'i32 + +const KEY_braille_dots_12348* = 16787599'i32 + +const KEY_braille_dots_1235* = 16787479'i32 + +const KEY_braille_dots_12356* = 16787511'i32 + +const KEY_braille_dots_123567* = 16787575'i32 + +const KEY_braille_dots_1235678* = 16787703'i32 + +const KEY_braille_dots_123568* = 16787639'i32 + +const KEY_braille_dots_12357* = 16787543'i32 + +const KEY_braille_dots_123578* = 16787671'i32 + +const KEY_braille_dots_12358* = 16787607'i32 + +const KEY_braille_dots_1236* = 16787495'i32 + +const KEY_braille_dots_12367* = 16787559'i32 + +const KEY_braille_dots_123678* = 16787687'i32 + +const KEY_braille_dots_12368* = 16787623'i32 + +const KEY_braille_dots_1237* = 16787527'i32 + +const KEY_braille_dots_12378* = 16787655'i32 + +const KEY_braille_dots_1238* = 16787591'i32 + +const KEY_braille_dots_124* = 16787467'i32 + +const KEY_braille_dots_1245* = 16787483'i32 + +const KEY_braille_dots_12456* = 16787515'i32 + +const KEY_braille_dots_124567* = 16787579'i32 + +const KEY_braille_dots_1245678* = 16787707'i32 + +const KEY_braille_dots_124568* = 16787643'i32 + +const KEY_braille_dots_12457* = 16787547'i32 + +const KEY_braille_dots_124578* = 16787675'i32 + +const KEY_braille_dots_12458* = 16787611'i32 + +const KEY_braille_dots_1246* = 16787499'i32 + +const KEY_braille_dots_12467* = 16787563'i32 + +const KEY_braille_dots_124678* = 16787691'i32 + +const KEY_braille_dots_12468* = 16787627'i32 + +const KEY_braille_dots_1247* = 16787531'i32 + +const KEY_braille_dots_12478* = 16787659'i32 + +const KEY_braille_dots_1248* = 16787595'i32 + +const KEY_braille_dots_125* = 16787475'i32 + +const KEY_braille_dots_1256* = 16787507'i32 + +const KEY_braille_dots_12567* = 16787571'i32 + +const KEY_braille_dots_125678* = 16787699'i32 + +const KEY_braille_dots_12568* = 16787635'i32 + +const KEY_braille_dots_1257* = 16787539'i32 + +const KEY_braille_dots_12578* = 16787667'i32 + +const KEY_braille_dots_1258* = 16787603'i32 + +const KEY_braille_dots_126* = 16787491'i32 + +const KEY_braille_dots_1267* = 16787555'i32 + +const KEY_braille_dots_12678* = 16787683'i32 + +const KEY_braille_dots_1268* = 16787619'i32 + +const KEY_braille_dots_127* = 16787523'i32 + +const KEY_braille_dots_1278* = 16787651'i32 + +const KEY_braille_dots_128* = 16787587'i32 + +const KEY_braille_dots_13* = 16787461'i32 + +const KEY_braille_dots_134* = 16787469'i32 + +const KEY_braille_dots_1345* = 16787485'i32 + +const KEY_braille_dots_13456* = 16787517'i32 + +const KEY_braille_dots_134567* = 16787581'i32 + +const KEY_braille_dots_1345678* = 16787709'i32 + +const KEY_braille_dots_134568* = 16787645'i32 + +const KEY_braille_dots_13457* = 16787549'i32 + +const KEY_braille_dots_134578* = 16787677'i32 + +const KEY_braille_dots_13458* = 16787613'i32 + +const KEY_braille_dots_1346* = 16787501'i32 + +const KEY_braille_dots_13467* = 16787565'i32 + +const KEY_braille_dots_134678* = 16787693'i32 + +const KEY_braille_dots_13468* = 16787629'i32 + +const KEY_braille_dots_1347* = 16787533'i32 + +const KEY_braille_dots_13478* = 16787661'i32 + +const KEY_braille_dots_1348* = 16787597'i32 + +const KEY_braille_dots_135* = 16787477'i32 + +const KEY_braille_dots_1356* = 16787509'i32 + +const KEY_braille_dots_13567* = 16787573'i32 + +const KEY_braille_dots_135678* = 16787701'i32 + +const KEY_braille_dots_13568* = 16787637'i32 + +const KEY_braille_dots_1357* = 16787541'i32 + +const KEY_braille_dots_13578* = 16787669'i32 + +const KEY_braille_dots_1358* = 16787605'i32 + +const KEY_braille_dots_136* = 16787493'i32 + +const KEY_braille_dots_1367* = 16787557'i32 + +const KEY_braille_dots_13678* = 16787685'i32 + +const KEY_braille_dots_1368* = 16787621'i32 + +const KEY_braille_dots_137* = 16787525'i32 + +const KEY_braille_dots_1378* = 16787653'i32 + +const KEY_braille_dots_138* = 16787589'i32 + +const KEY_braille_dots_14* = 16787465'i32 + +const KEY_braille_dots_145* = 16787481'i32 + +const KEY_braille_dots_1456* = 16787513'i32 + +const KEY_braille_dots_14567* = 16787577'i32 + +const KEY_braille_dots_145678* = 16787705'i32 + +const KEY_braille_dots_14568* = 16787641'i32 + +const KEY_braille_dots_1457* = 16787545'i32 + +const KEY_braille_dots_14578* = 16787673'i32 + +const KEY_braille_dots_1458* = 16787609'i32 + +const KEY_braille_dots_146* = 16787497'i32 + +const KEY_braille_dots_1467* = 16787561'i32 + +const KEY_braille_dots_14678* = 16787689'i32 + +const KEY_braille_dots_1468* = 16787625'i32 + +const KEY_braille_dots_147* = 16787529'i32 + +const KEY_braille_dots_1478* = 16787657'i32 + +const KEY_braille_dots_148* = 16787593'i32 + +const KEY_braille_dots_15* = 16787473'i32 + +const KEY_braille_dots_156* = 16787505'i32 + +const KEY_braille_dots_1567* = 16787569'i32 + +const KEY_braille_dots_15678* = 16787697'i32 + +const KEY_braille_dots_1568* = 16787633'i32 + +const KEY_braille_dots_157* = 16787537'i32 + +const KEY_braille_dots_1578* = 16787665'i32 + +const KEY_braille_dots_158* = 16787601'i32 + +const KEY_braille_dots_16* = 16787489'i32 + +const KEY_braille_dots_167* = 16787553'i32 + +const KEY_braille_dots_1678* = 16787681'i32 + +const KEY_braille_dots_168* = 16787617'i32 + +const KEY_braille_dots_17* = 16787521'i32 + +const KEY_braille_dots_178* = 16787649'i32 + +const KEY_braille_dots_18* = 16787585'i32 + +const KEY_braille_dots_2* = 16787458'i32 + +const KEY_braille_dots_23* = 16787462'i32 + +const KEY_braille_dots_234* = 16787470'i32 + +const KEY_braille_dots_2345* = 16787486'i32 + +const KEY_braille_dots_23456* = 16787518'i32 + +const KEY_braille_dots_234567* = 16787582'i32 + +const KEY_braille_dots_2345678* = 16787710'i32 + +const KEY_braille_dots_234568* = 16787646'i32 + +const KEY_braille_dots_23457* = 16787550'i32 + +const KEY_braille_dots_234578* = 16787678'i32 + +const KEY_braille_dots_23458* = 16787614'i32 + +const KEY_braille_dots_2346* = 16787502'i32 + +const KEY_braille_dots_23467* = 16787566'i32 + +const KEY_braille_dots_234678* = 16787694'i32 + +const KEY_braille_dots_23468* = 16787630'i32 + +const KEY_braille_dots_2347* = 16787534'i32 + +const KEY_braille_dots_23478* = 16787662'i32 + +const KEY_braille_dots_2348* = 16787598'i32 + +const KEY_braille_dots_235* = 16787478'i32 + +const KEY_braille_dots_2356* = 16787510'i32 + +const KEY_braille_dots_23567* = 16787574'i32 + +const KEY_braille_dots_235678* = 16787702'i32 + +const KEY_braille_dots_23568* = 16787638'i32 + +const KEY_braille_dots_2357* = 16787542'i32 + +const KEY_braille_dots_23578* = 16787670'i32 + +const KEY_braille_dots_2358* = 16787606'i32 + +const KEY_braille_dots_236* = 16787494'i32 + +const KEY_braille_dots_2367* = 16787558'i32 + +const KEY_braille_dots_23678* = 16787686'i32 + +const KEY_braille_dots_2368* = 16787622'i32 + +const KEY_braille_dots_237* = 16787526'i32 + +const KEY_braille_dots_2378* = 16787654'i32 + +const KEY_braille_dots_238* = 16787590'i32 + +const KEY_braille_dots_24* = 16787466'i32 + +const KEY_braille_dots_245* = 16787482'i32 + +const KEY_braille_dots_2456* = 16787514'i32 + +const KEY_braille_dots_24567* = 16787578'i32 + +const KEY_braille_dots_245678* = 16787706'i32 + +const KEY_braille_dots_24568* = 16787642'i32 + +const KEY_braille_dots_2457* = 16787546'i32 + +const KEY_braille_dots_24578* = 16787674'i32 + +const KEY_braille_dots_2458* = 16787610'i32 + +const KEY_braille_dots_246* = 16787498'i32 + +const KEY_braille_dots_2467* = 16787562'i32 + +const KEY_braille_dots_24678* = 16787690'i32 + +const KEY_braille_dots_2468* = 16787626'i32 + +const KEY_braille_dots_247* = 16787530'i32 + +const KEY_braille_dots_2478* = 16787658'i32 + +const KEY_braille_dots_248* = 16787594'i32 + +const KEY_braille_dots_25* = 16787474'i32 + +const KEY_braille_dots_256* = 16787506'i32 + +const KEY_braille_dots_2567* = 16787570'i32 + +const KEY_braille_dots_25678* = 16787698'i32 + +const KEY_braille_dots_2568* = 16787634'i32 + +const KEY_braille_dots_257* = 16787538'i32 + +const KEY_braille_dots_2578* = 16787666'i32 + +const KEY_braille_dots_258* = 16787602'i32 + +const KEY_braille_dots_26* = 16787490'i32 + +const KEY_braille_dots_267* = 16787554'i32 + +const KEY_braille_dots_2678* = 16787682'i32 + +const KEY_braille_dots_268* = 16787618'i32 + +const KEY_braille_dots_27* = 16787522'i32 + +const KEY_braille_dots_278* = 16787650'i32 + +const KEY_braille_dots_28* = 16787586'i32 + +const KEY_braille_dots_3* = 16787460'i32 + +const KEY_braille_dots_34* = 16787468'i32 + +const KEY_braille_dots_345* = 16787484'i32 + +const KEY_braille_dots_3456* = 16787516'i32 + +const KEY_braille_dots_34567* = 16787580'i32 + +const KEY_braille_dots_345678* = 16787708'i32 + +const KEY_braille_dots_34568* = 16787644'i32 + +const KEY_braille_dots_3457* = 16787548'i32 + +const KEY_braille_dots_34578* = 16787676'i32 + +const KEY_braille_dots_3458* = 16787612'i32 + +const KEY_braille_dots_346* = 16787500'i32 + +const KEY_braille_dots_3467* = 16787564'i32 + +const KEY_braille_dots_34678* = 16787692'i32 + +const KEY_braille_dots_3468* = 16787628'i32 + +const KEY_braille_dots_347* = 16787532'i32 + +const KEY_braille_dots_3478* = 16787660'i32 + +const KEY_braille_dots_348* = 16787596'i32 + +const KEY_braille_dots_35* = 16787476'i32 + +const KEY_braille_dots_356* = 16787508'i32 + +const KEY_braille_dots_3567* = 16787572'i32 + +const KEY_braille_dots_35678* = 16787700'i32 + +const KEY_braille_dots_3568* = 16787636'i32 + +const KEY_braille_dots_357* = 16787540'i32 + +const KEY_braille_dots_3578* = 16787668'i32 + +const KEY_braille_dots_358* = 16787604'i32 + +const KEY_braille_dots_36* = 16787492'i32 + +const KEY_braille_dots_367* = 16787556'i32 + +const KEY_braille_dots_3678* = 16787684'i32 + +const KEY_braille_dots_368* = 16787620'i32 + +const KEY_braille_dots_37* = 16787524'i32 + +const KEY_braille_dots_378* = 16787652'i32 + +const KEY_braille_dots_38* = 16787588'i32 + +const KEY_braille_dots_4* = 16787464'i32 + +const KEY_braille_dots_45* = 16787480'i32 + +const KEY_braille_dots_456* = 16787512'i32 + +const KEY_braille_dots_4567* = 16787576'i32 + +const KEY_braille_dots_45678* = 16787704'i32 + +const KEY_braille_dots_4568* = 16787640'i32 + +const KEY_braille_dots_457* = 16787544'i32 + +const KEY_braille_dots_4578* = 16787672'i32 + +const KEY_braille_dots_458* = 16787608'i32 + +const KEY_braille_dots_46* = 16787496'i32 + +const KEY_braille_dots_467* = 16787560'i32 + +const KEY_braille_dots_4678* = 16787688'i32 + +const KEY_braille_dots_468* = 16787624'i32 + +const KEY_braille_dots_47* = 16787528'i32 + +const KEY_braille_dots_478* = 16787656'i32 + +const KEY_braille_dots_48* = 16787592'i32 + +const KEY_braille_dots_5* = 16787472'i32 + +const KEY_braille_dots_56* = 16787504'i32 + +const KEY_braille_dots_567* = 16787568'i32 + +const KEY_braille_dots_5678* = 16787696'i32 + +const KEY_braille_dots_568* = 16787632'i32 + +const KEY_braille_dots_57* = 16787536'i32 + +const KEY_braille_dots_578* = 16787664'i32 + +const KEY_braille_dots_58* = 16787600'i32 + +const KEY_braille_dots_6* = 16787488'i32 + +const KEY_braille_dots_67* = 16787552'i32 + +const KEY_braille_dots_678* = 16787680'i32 + +const KEY_braille_dots_68* = 16787616'i32 + +const KEY_braille_dots_7* = 16787520'i32 + +const KEY_braille_dots_78* = 16787648'i32 + +const KEY_braille_dots_8* = 16787584'i32 + +const KEY_breve* = 418'i32 + +const KEY_brokenbar* = 166'i32 + +const KEY_c* = 99'i32 + +const KEY_cH7* = 65187'i32 + +const KEY_cabovedot* = 741'i32 + +const KEY_cacute* = 486'i32 + +const KEY_careof* = 2744'i32 + +const KEY_caret* = 2812'i32 + +const KEY_caron* = 439'i32 + +const KEY_ccaron* = 488'i32 + +const KEY_ccedilla* = 231'i32 + +const KEY_ccircumflex* = 742'i32 + +const KEY_cedilla* = 184'i32 + +const KEY_cent* = 162'i32 + +const KEY_ch4* = 65184'i32 + +const KEY_checkerboard* = 2529'i32 + +const KEY_checkmark* = 2803'i32 + +const KEY_circle* = 3023'i32 + +const KEY_club* = 2796'i32 + +const KEY_colon* = 58'i32 + +const KEY_comma* = 44'i32 + +const KEY_containsas* = 16785931'i32 + +const KEY_copyright* = 169'i32 + +const KEY_cr* = 2532'i32 + +const KEY_crossinglines* = 2542'i32 + +const KEY_cuberoot* = 16785947'i32 + +const KEY_currency* = 164'i32 + +const KEY_cursor* = 2815'i32 + +const KEY_d* = 100'i32 + +const KEY_dabovedot* = 16784907'i32 + +const KEY_dagger* = 2801'i32 + +const KEY_dcaron* = 495'i32 + +const UKEY_dead_A* = 65153'i32 + +const UKEY_dead_E* = 65155'i32 + +const UKEY_dead_I* = 65157'i32 + +const UKEY_dead_O* = 65159'i32 + +const UKEY_dead_U* = 65161'i32 + +const KEY_dead_a* = 65152'i32 + +const KEY_dead_abovecomma* = 65124'i32 + +const KEY_dead_abovedot* = 65110'i32 + +const KEY_dead_abovereversedcomma* = 65125'i32 + +const KEY_dead_abovering* = 65112'i32 + +const KEY_dead_acute* = 65105'i32 + +const KEY_dead_belowbreve* = 65131'i32 + +const KEY_dead_belowcircumflex* = 65129'i32 + +const KEY_dead_belowcomma* = 65134'i32 + +const KEY_dead_belowdiaeresis* = 65132'i32 + +const KEY_dead_belowdot* = 65120'i32 + +const KEY_dead_belowmacron* = 65128'i32 + +const KEY_dead_belowring* = 65127'i32 + +const KEY_dead_belowtilde* = 65130'i32 + +const KEY_dead_breve* = 65109'i32 + +const KEY_dead_capital_schwa* = 65163'i32 + +const KEY_dead_caron* = 65114'i32 + +const KEY_dead_cedilla* = 65115'i32 + +const KEY_dead_circumflex* = 65106'i32 + +const KEY_dead_currency* = 65135'i32 + +const KEY_dead_dasia* = 65125'i32 + +const KEY_dead_diaeresis* = 65111'i32 + +const KEY_dead_doubleacute* = 65113'i32 + +const KEY_dead_doublegrave* = 65126'i32 + +const KEY_dead_e* = 65154'i32 + +const KEY_dead_grave* = 65104'i32 + +const KEY_dead_greek* = 65164'i32 + +const KEY_dead_hook* = 65121'i32 + +const KEY_dead_horn* = 65122'i32 + +const KEY_dead_i* = 65156'i32 + +const KEY_dead_invertedbreve* = 65133'i32 + +const KEY_dead_iota* = 65117'i32 + +const KEY_dead_macron* = 65108'i32 + +const KEY_dead_o* = 65158'i32 + +const KEY_dead_ogonek* = 65116'i32 + +const KEY_dead_perispomeni* = 65107'i32 + +const KEY_dead_psili* = 65124'i32 + +const KEY_dead_semivoiced_sound* = 65119'i32 + +const KEY_dead_small_schwa* = 65162'i32 + +const KEY_dead_stroke* = 65123'i32 + +const KEY_dead_tilde* = 65107'i32 + +const KEY_dead_u* = 65160'i32 + +const KEY_dead_voiced_sound* = 65118'i32 + +const KEY_decimalpoint* = 2749'i32 + +const KEY_degree* = 176'i32 + +const KEY_diaeresis* = 168'i32 + +const KEY_diamond* = 2797'i32 + +const KEY_digitspace* = 2725'i32 + +const KEY_dintegral* = 16785964'i32 + +const KEY_division* = 247'i32 + +const KEY_dollar* = 36'i32 + +const KEY_doubbaselinedot* = 2735'i32 + +const KEY_doubleacute* = 445'i32 + +const KEY_doubledagger* = 2802'i32 + +const KEY_doublelowquotemark* = 2814'i32 + +const KEY_downarrow* = 2302'i32 + +const KEY_downcaret* = 2984'i32 + +const KEY_downshoe* = 3030'i32 + +const KEY_downstile* = 3012'i32 + +const KEY_downtack* = 3010'i32 + +const KEY_dstroke* = 496'i32 + +const KEY_e* = 101'i32 + +const KEY_eabovedot* = 1004'i32 + +const KEY_eacute* = 233'i32 + +const KEY_ebelowdot* = 16785081'i32 + +const KEY_ecaron* = 492'i32 + +const KEY_ecircumflex* = 234'i32 + +const KEY_ecircumflexacute* = 16785087'i32 + +const KEY_ecircumflexbelowdot* = 16785095'i32 + +const KEY_ecircumflexgrave* = 16785089'i32 + +const KEY_ecircumflexhook* = 16785091'i32 + +const KEY_ecircumflextilde* = 16785093'i32 + +const KEY_ediaeresis* = 235'i32 + +const KEY_egrave* = 232'i32 + +const KEY_ehook* = 16785083'i32 + +const KEY_eightsubscript* = 16785544'i32 + +const KEY_eightsuperior* = 16785528'i32 + +const KEY_elementof* = 16785928'i32 + +const KEY_ellipsis* = 2734'i32 + +const KEY_em3space* = 2723'i32 + +const KEY_em4space* = 2724'i32 + +const KEY_emacron* = 954'i32 + +const KEY_emdash* = 2729'i32 + +const KEY_emfilledcircle* = 2782'i32 + +const KEY_emfilledrect* = 2783'i32 + +const KEY_emopencircle* = 2766'i32 + +const KEY_emopenrectangle* = 2767'i32 + +const KEY_emptyset* = 16785925'i32 + +const KEY_emspace* = 2721'i32 + +const KEY_endash* = 2730'i32 + +const KEY_enfilledcircbullet* = 2790'i32 + +const KEY_enfilledsqbullet* = 2791'i32 + +const KEY_eng* = 959'i32 + +const KEY_enopencircbullet* = 2784'i32 + +const KEY_enopensquarebullet* = 2785'i32 + +const KEY_enspace* = 2722'i32 + +const KEY_eogonek* = 490'i32 + +const KEY_equal* = 61'i32 + +const KEY_eth* = 240'i32 + +const KEY_etilde* = 16785085'i32 + +const KEY_exclam* = 33'i32 + +const KEY_exclamdown* = 161'i32 + +const KEY_ezh* = 16777874'i32 + +const KEY_f* = 102'i32 + +const KEY_fabovedot* = 16784927'i32 + +const KEY_femalesymbol* = 2808'i32 + +const KEY_ff* = 2531'i32 + +const KEY_figdash* = 2747'i32 + +const KEY_filledlefttribullet* = 2780'i32 + +const KEY_filledrectbullet* = 2779'i32 + +const KEY_filledrighttribullet* = 2781'i32 + +const KEY_filledtribulletdown* = 2793'i32 + +const KEY_filledtribulletup* = 2792'i32 + +const KEY_fiveeighths* = 2757'i32 + +const KEY_fivesixths* = 2743'i32 + +const KEY_fivesubscript* = 16785541'i32 + +const KEY_fivesuperior* = 16785525'i32 + +const KEY_fourfifths* = 2741'i32 + +const KEY_foursubscript* = 16785540'i32 + +const KEY_foursuperior* = 16785524'i32 + +const KEY_fourthroot* = 16785948'i32 + +const KEY_function* = 2294'i32 + +const KEY_g* = 103'i32 + +const KEY_gabovedot* = 757'i32 + +const KEY_gbreve* = 699'i32 + +const KEY_gcaron* = 16777703'i32 + +const KEY_gcedilla* = 955'i32 + +const KEY_gcircumflex* = 760'i32 + +const KEY_grave* = 96'i32 + +const KEY_greater* = 62'i32 + +const KEY_greaterthanequal* = 2238'i32 + +const KEY_guillemotleft* = 171'i32 + +const KEY_guillemotright* = 187'i32 + +const KEY_h* = 104'i32 + +const KEY_hairspace* = 2728'i32 + +const KEY_hcircumflex* = 694'i32 + +const KEY_heart* = 2798'i32 + +const KEY_hebrew_aleph* = 3296'i32 + +const KEY_hebrew_ayin* = 3314'i32 + +const KEY_hebrew_bet* = 3297'i32 + +const KEY_hebrew_beth* = 3297'i32 + +const KEY_hebrew_chet* = 3303'i32 + +const KEY_hebrew_dalet* = 3299'i32 + +const KEY_hebrew_daleth* = 3299'i32 + +const KEY_hebrew_doublelowline* = 3295'i32 + +const KEY_hebrew_finalkaph* = 3306'i32 + +const KEY_hebrew_finalmem* = 3309'i32 + +const KEY_hebrew_finalnun* = 3311'i32 + +const KEY_hebrew_finalpe* = 3315'i32 + +const KEY_hebrew_finalzade* = 3317'i32 + +const KEY_hebrew_finalzadi* = 3317'i32 + +const KEY_hebrew_gimel* = 3298'i32 + +const KEY_hebrew_gimmel* = 3298'i32 + +const KEY_hebrew_he* = 3300'i32 + +const KEY_hebrew_het* = 3303'i32 + +const KEY_hebrew_kaph* = 3307'i32 + +const KEY_hebrew_kuf* = 3319'i32 + +const KEY_hebrew_lamed* = 3308'i32 + +const KEY_hebrew_mem* = 3310'i32 + +const KEY_hebrew_nun* = 3312'i32 + +const KEY_hebrew_pe* = 3316'i32 + +const KEY_hebrew_qoph* = 3319'i32 + +const KEY_hebrew_resh* = 3320'i32 + +const KEY_hebrew_samech* = 3313'i32 + +const KEY_hebrew_samekh* = 3313'i32 + +const KEY_hebrew_shin* = 3321'i32 + +const KEY_hebrew_taf* = 3322'i32 + +const KEY_hebrew_taw* = 3322'i32 + +const KEY_hebrew_tet* = 3304'i32 + +const KEY_hebrew_teth* = 3304'i32 + +const KEY_hebrew_waw* = 3301'i32 + +const KEY_hebrew_yod* = 3305'i32 + +const KEY_hebrew_zade* = 3318'i32 + +const KEY_hebrew_zadi* = 3318'i32 + +const KEY_hebrew_zain* = 3302'i32 + +const KEY_hebrew_zayin* = 3302'i32 + +const KEY_hexagram* = 2778'i32 + +const KEY_horizconnector* = 2211'i32 + +const KEY_horizlinescan1* = 2543'i32 + +const KEY_horizlinescan3* = 2544'i32 + +const KEY_horizlinescan5* = 2545'i32 + +const KEY_horizlinescan7* = 2546'i32 + +const KEY_horizlinescan9* = 2547'i32 + +const KEY_hstroke* = 689'i32 + +const KEY_ht* = 2530'i32 + +const KEY_hyphen* = 173'i32 + +const KEY_i* = 105'i32 + +const KEY_iTouch* = 269025120'i32 + +const KEY_iacute* = 237'i32 + +const KEY_ibelowdot* = 16785099'i32 + +const KEY_ibreve* = 16777517'i32 + +const KEY_icircumflex* = 238'i32 + +const KEY_identical* = 2255'i32 + +const KEY_idiaeresis* = 239'i32 + +const KEY_idotless* = 697'i32 + +const KEY_ifonlyif* = 2253'i32 + +const KEY_igrave* = 236'i32 + +const KEY_ihook* = 16785097'i32 + +const KEY_imacron* = 1007'i32 + +const KEY_implies* = 2254'i32 + +const KEY_includedin* = 2266'i32 + +const KEY_includes* = 2267'i32 + +const KEY_infinity* = 2242'i32 + +const KEY_integral* = 2239'i32 + +const KEY_intersection* = 2268'i32 + +const KEY_iogonek* = 999'i32 + +const KEY_itilde* = 949'i32 + +const KEY_j* = 106'i32 + +const KEY_jcircumflex* = 700'i32 + +const KEY_jot* = 3018'i32 + +const KEY_k* = 107'i32 + +const UKEY_kana_A* = 1201'i32 + +const KEY_kana_CHI* = 1217'i32 + +const UKEY_kana_E* = 1204'i32 + +const KEY_kana_FU* = 1228'i32 + +const KEY_kana_HA* = 1226'i32 + +const KEY_kana_HE* = 1229'i32 + +const KEY_kana_HI* = 1227'i32 + +const KEY_kana_HO* = 1230'i32 + +const KEY_kana_HU* = 1228'i32 + +const UKEY_kana_I* = 1202'i32 + +const KEY_kana_KA* = 1206'i32 + +const KEY_kana_KE* = 1209'i32 + +const KEY_kana_KI* = 1207'i32 + +const KEY_kana_KO* = 1210'i32 + +const KEY_kana_KU* = 1208'i32 + +const KEY_kana_MA* = 1231'i32 + +const KEY_kana_ME* = 1234'i32 + +const KEY_kana_MI* = 1232'i32 + +const KEY_kana_MO* = 1235'i32 + +const KEY_kana_MU* = 1233'i32 + +const KEY_kana_N* = 1245'i32 + +const KEY_kana_NA* = 1221'i32 + +const KEY_kana_NE* = 1224'i32 + +const KEY_kana_NI* = 1222'i32 + +const KEY_kana_NO* = 1225'i32 + +const KEY_kana_NU* = 1223'i32 + +const UKEY_kana_O* = 1205'i32 + +const KEY_kana_RA* = 1239'i32 + +const KEY_kana_RE* = 1242'i32 + +const KEY_kana_RI* = 1240'i32 + +const KEY_kana_RO* = 1243'i32 + +const KEY_kana_RU* = 1241'i32 + +const KEY_kana_SA* = 1211'i32 + +const KEY_kana_SE* = 1214'i32 + +const KEY_kana_SHI* = 1212'i32 + +const KEY_kana_SO* = 1215'i32 + +const KEY_kana_SU* = 1213'i32 + +const KEY_kana_TA* = 1216'i32 + +const KEY_kana_TE* = 1219'i32 + +const KEY_kana_TI* = 1217'i32 + +const KEY_kana_TO* = 1220'i32 + +const UKEY_kana_TSU* = 1218'i32 + +const UKEY_kana_TU* = 1218'i32 + +const UKEY_kana_U* = 1203'i32 + +const KEY_kana_WA* = 1244'i32 + +const KEY_kana_WO* = 1190'i32 + +const UKEY_kana_YA* = 1236'i32 + +const UKEY_kana_YO* = 1238'i32 + +const UKEY_kana_YU* = 1237'i32 + +const KEY_kana_a* = 1191'i32 + +const KEY_kana_closingbracket* = 1187'i32 + +const KEY_kana_comma* = 1188'i32 + +const KEY_kana_conjunctive* = 1189'i32 + +const KEY_kana_e* = 1194'i32 + +const KEY_kana_fullstop* = 1185'i32 + +const KEY_kana_i* = 1192'i32 + +const KEY_kana_middledot* = 1189'i32 + +const KEY_kana_o* = 1195'i32 + +const KEY_kana_openingbracket* = 1186'i32 + +const KEY_kana_switch* = 65406'i32 + +const KEY_kana_tsu* = 1199'i32 + +const KEY_kana_tu* = 1199'i32 + +const KEY_kana_u* = 1193'i32 + +const KEY_kana_ya* = 1196'i32 + +const KEY_kana_yo* = 1198'i32 + +const KEY_kana_yu* = 1197'i32 + +const KEY_kappa* = 930'i32 + +const KEY_kcedilla* = 1011'i32 + +const KEY_kra* = 930'i32 + +const KEY_l* = 108'i32 + +const KEY_lacute* = 485'i32 + +const KEY_latincross* = 2777'i32 + +const KEY_lbelowdot* = 16784951'i32 + +const KEY_lcaron* = 437'i32 + +const KEY_lcedilla* = 950'i32 + +const KEY_leftanglebracket* = 2748'i32 + +const KEY_leftarrow* = 2299'i32 + +const KEY_leftcaret* = 2979'i32 + +const KEY_leftdoublequotemark* = 2770'i32 + +const KEY_leftmiddlecurlybrace* = 2223'i32 + +const KEY_leftopentriangle* = 2764'i32 + +const KEY_leftpointer* = 2794'i32 + +const KEY_leftradical* = 2209'i32 + +const KEY_leftshoe* = 3034'i32 + +const KEY_leftsinglequotemark* = 2768'i32 + +const KEY_leftt* = 2548'i32 + +const KEY_lefttack* = 3036'i32 + +const KEY_less* = 60'i32 + +const KEY_lessthanequal* = 2236'i32 + +const KEY_lf* = 2533'i32 + +const KEY_logicaland* = 2270'i32 + +const KEY_logicalor* = 2271'i32 + +const KEY_lowleftcorner* = 2541'i32 + +const KEY_lowrightcorner* = 2538'i32 + +const KEY_lstroke* = 435'i32 + +const KEY_m* = 109'i32 + +const KEY_mabovedot* = 16784961'i32 + +const KEY_macron* = 175'i32 + +const KEY_malesymbol* = 2807'i32 + +const KEY_maltesecross* = 2800'i32 + +const KEY_marker* = 2751'i32 + +const KEY_masculine* = 186'i32 + +const KEY_minus* = 45'i32 + +const KEY_minutes* = 2774'i32 + +const KEY_mu* = 181'i32 + +const KEY_multiply* = 215'i32 + +const KEY_musicalflat* = 2806'i32 + +const KEY_musicalsharp* = 2805'i32 + +const KEY_n* = 110'i32 + +const KEY_nabla* = 2245'i32 + +const KEY_nacute* = 497'i32 + +const KEY_ncaron* = 498'i32 + +const KEY_ncedilla* = 1009'i32 + +const KEY_ninesubscript* = 16785545'i32 + +const KEY_ninesuperior* = 16785529'i32 + +const KEY_nl* = 2536'i32 + +const KEY_nobreakspace* = 160'i32 + +const KEY_notapproxeq* = 16785991'i32 + +const KEY_notelementof* = 16785929'i32 + +const KEY_notequal* = 2237'i32 + +const KEY_notidentical* = 16786018'i32 + +const KEY_notsign* = 172'i32 + +const KEY_ntilde* = 241'i32 + +const KEY_numbersign* = 35'i32 + +const KEY_numerosign* = 1712'i32 + +const KEY_o* = 111'i32 + +const KEY_oacute* = 243'i32 + +const KEY_obarred* = 16777845'i32 + +const KEY_obelowdot* = 16785101'i32 + +const KEY_ocaron* = 16777682'i32 + +const KEY_ocircumflex* = 244'i32 + +const KEY_ocircumflexacute* = 16785105'i32 + +const KEY_ocircumflexbelowdot* = 16785113'i32 + +const KEY_ocircumflexgrave* = 16785107'i32 + +const KEY_ocircumflexhook* = 16785109'i32 + +const KEY_ocircumflextilde* = 16785111'i32 + +const KEY_odiaeresis* = 246'i32 + +const KEY_odoubleacute* = 501'i32 + +const KEY_oe* = 5053'i32 + +const KEY_ogonek* = 434'i32 + +const KEY_ograve* = 242'i32 + +const KEY_ohook* = 16785103'i32 + +const KEY_ohorn* = 16777633'i32 + +const KEY_ohornacute* = 16785115'i32 + +const KEY_ohornbelowdot* = 16785123'i32 + +const KEY_ohorngrave* = 16785117'i32 + +const KEY_ohornhook* = 16785119'i32 + +const KEY_ohorntilde* = 16785121'i32 + +const KEY_omacron* = 1010'i32 + +const KEY_oneeighth* = 2755'i32 + +const KEY_onefifth* = 2738'i32 + +const KEY_onehalf* = 189'i32 + +const KEY_onequarter* = 188'i32 + +const KEY_onesixth* = 2742'i32 + +const KEY_onesubscript* = 16785537'i32 + +const KEY_onesuperior* = 185'i32 + +const KEY_onethird* = 2736'i32 + +const KEY_ooblique* = 248'i32 + +const KEY_openrectbullet* = 2786'i32 + +const KEY_openstar* = 2789'i32 + +const KEY_opentribulletdown* = 2788'i32 + +const KEY_opentribulletup* = 2787'i32 + +const KEY_ordfeminine* = 170'i32 + +const KEY_oslash* = 248'i32 + +const KEY_otilde* = 245'i32 + +const KEY_overbar* = 3008'i32 + +const KEY_overline* = 1150'i32 + +const KEY_p* = 112'i32 + +const KEY_pabovedot* = 16784983'i32 + +const KEY_paragraph* = 182'i32 + +const KEY_parenleft* = 40'i32 + +const KEY_parenright* = 41'i32 + +const KEY_partdifferential* = 16785922'i32 + +const KEY_partialderivative* = 2287'i32 + +const KEY_percent* = 37'i32 + +const KEY_period* = 46'i32 + +const KEY_periodcentered* = 183'i32 + +const KEY_permille* = 2773'i32 + +const KEY_phonographcopyright* = 2811'i32 + +const KEY_plus* = 43'i32 + +const KEY_plusminus* = 177'i32 + +const KEY_prescription* = 2772'i32 + +const KEY_prolongedsound* = 1200'i32 + +const KEY_punctspace* = 2726'i32 + +const KEY_q* = 113'i32 + +const KEY_quad* = 3020'i32 + +const KEY_question* = 63'i32 + +const KEY_questiondown* = 191'i32 + +const KEY_quotedbl* = 34'i32 + +const KEY_quoteleft* = 96'i32 + +const KEY_quoteright* = 39'i32 + +const KEY_r* = 114'i32 + +const KEY_racute* = 480'i32 + +const KEY_radical* = 2262'i32 + +const KEY_rcaron* = 504'i32 + +const KEY_rcedilla* = 947'i32 + +const KEY_registered* = 174'i32 + +const KEY_rightanglebracket* = 2750'i32 + +const KEY_rightarrow* = 2301'i32 + +const KEY_rightcaret* = 2982'i32 + +const KEY_rightdoublequotemark* = 2771'i32 + +const KEY_rightmiddlecurlybrace* = 2224'i32 + +const KEY_rightmiddlesummation* = 2231'i32 + +const KEY_rightopentriangle* = 2765'i32 + +const KEY_rightpointer* = 2795'i32 + +const KEY_rightshoe* = 3032'i32 + +const KEY_rightsinglequotemark* = 2769'i32 + +const KEY_rightt* = 2549'i32 + +const KEY_righttack* = 3068'i32 + +const KEY_s* = 115'i32 + +const KEY_sabovedot* = 16784993'i32 + +const KEY_sacute* = 438'i32 + +const KEY_scaron* = 441'i32 + +const KEY_scedilla* = 442'i32 + +const KEY_schwa* = 16777817'i32 + +const KEY_scircumflex* = 766'i32 + +const KEY_script_switch* = 65406'i32 + +const KEY_seconds* = 2775'i32 + +const KEY_section* = 167'i32 + +const KEY_semicolon* = 59'i32 + +const KEY_semivoicedsound* = 1247'i32 + +const KEY_seveneighths* = 2758'i32 + +const KEY_sevensubscript* = 16785543'i32 + +const KEY_sevensuperior* = 16785527'i32 + +const KEY_signaturemark* = 2762'i32 + +const KEY_signifblank* = 2732'i32 + +const KEY_similarequal* = 2249'i32 + +const KEY_singlelowquotemark* = 2813'i32 + +const KEY_sixsubscript* = 16785542'i32 + +const KEY_sixsuperior* = 16785526'i32 + +const KEY_slash* = 47'i32 + +const KEY_soliddiamond* = 2528'i32 + +const KEY_space* = 32'i32 + +const KEY_squareroot* = 16785946'i32 + +const KEY_ssharp* = 223'i32 + +const KEY_sterling* = 163'i32 + +const KEY_stricteq* = 16786019'i32 + +const KEY_t* = 116'i32 + +const KEY_tabovedot* = 16785003'i32 + +const KEY_tcaron* = 443'i32 + +const KEY_tcedilla* = 510'i32 + +const KEY_telephone* = 2809'i32 + +const KEY_telephonerecorder* = 2810'i32 + +const KEY_therefore* = 2240'i32 + +const KEY_thinspace* = 2727'i32 + +const KEY_thorn* = 254'i32 + +const KEY_threeeighths* = 2756'i32 + +const KEY_threefifths* = 2740'i32 + +const KEY_threequarters* = 190'i32 + +const KEY_threesubscript* = 16785539'i32 + +const KEY_threesuperior* = 179'i32 + +const KEY_tintegral* = 16785965'i32 + +const KEY_topintegral* = 2212'i32 + +const KEY_topleftparens* = 2219'i32 + +const KEY_topleftradical* = 2210'i32 + +const KEY_topleftsqbracket* = 2215'i32 + +const KEY_topleftsummation* = 2225'i32 + +const KEY_toprightparens* = 2221'i32 + +const KEY_toprightsqbracket* = 2217'i32 + +const KEY_toprightsummation* = 2229'i32 + +const KEY_topt* = 2551'i32 + +const KEY_topvertsummationconnector* = 2227'i32 + +const KEY_trademark* = 2761'i32 + +const KEY_trademarkincircle* = 2763'i32 + +const KEY_tslash* = 956'i32 + +const KEY_twofifths* = 2739'i32 + +const KEY_twosubscript* = 16785538'i32 + +const KEY_twosuperior* = 178'i32 + +const KEY_twothirds* = 2737'i32 + +const KEY_u* = 117'i32 + +const KEY_uacute* = 250'i32 + +const KEY_ubelowdot* = 16785125'i32 + +const KEY_ubreve* = 765'i32 + +const KEY_ucircumflex* = 251'i32 + +const KEY_udiaeresis* = 252'i32 + +const KEY_udoubleacute* = 507'i32 + +const KEY_ugrave* = 249'i32 + +const KEY_uhook* = 16785127'i32 + +const KEY_uhorn* = 16777648'i32 + +const KEY_uhornacute* = 16785129'i32 + +const KEY_uhornbelowdot* = 16785137'i32 + +const KEY_uhorngrave* = 16785131'i32 + +const KEY_uhornhook* = 16785133'i32 + +const KEY_uhorntilde* = 16785135'i32 + +const KEY_umacron* = 1022'i32 + +const KEY_underbar* = 3014'i32 + +const KEY_underscore* = 95'i32 + +const KEY_union* = 2269'i32 + +const KEY_uogonek* = 1017'i32 + +const KEY_uparrow* = 2300'i32 + +const KEY_upcaret* = 2985'i32 + +const KEY_upleftcorner* = 2540'i32 + +const KEY_uprightcorner* = 2539'i32 + +const KEY_upshoe* = 3011'i32 + +const KEY_upstile* = 3027'i32 + +const KEY_uptack* = 3022'i32 + +const KEY_uring* = 505'i32 + +const KEY_utilde* = 1021'i32 + +const KEY_v* = 118'i32 + +const KEY_variation* = 2241'i32 + +const KEY_vertbar* = 2552'i32 + +const KEY_vertconnector* = 2214'i32 + +const KEY_voicedsound* = 1246'i32 + +const KEY_vt* = 2537'i32 + +const KEY_w* = 119'i32 + +const KEY_wacute* = 16785027'i32 + +const KEY_wcircumflex* = 16777589'i32 + +const KEY_wdiaeresis* = 16785029'i32 + +const KEY_wgrave* = 16785025'i32 + +const KEY_x* = 120'i32 + +const KEY_xabovedot* = 16785035'i32 + +const KEY_y* = 121'i32 + +const KEY_yacute* = 253'i32 + +const KEY_ybelowdot* = 16785141'i32 + +const KEY_ycircumflex* = 16777591'i32 + +const KEY_ydiaeresis* = 255'i32 + +const KEY_yen* = 165'i32 + +const KEY_ygrave* = 16785139'i32 + +const KEY_yhook* = 16785143'i32 + +const KEY_ytilde* = 16785145'i32 + +const KEY_z* = 122'i32 + +const KEY_zabovedot* = 447'i32 + +const KEY_zacute* = 444'i32 + +const KEY_zcaron* = 446'i32 + +const KEY_zerosubscript* = 16785536'i32 + +const KEY_zerosuperior* = 16785520'i32 + +const KEY_zstroke* = 16777654'i32 + +type + Keymap* = ref object of gobject.Object + Keymap00* = object of gobject.Object00 + +proc scDirectionChanged*(self: Keymap; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "direction-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scKeysChanged*(self: Keymap; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "keys-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStateChanged*(self: Keymap; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "state-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_keymap_get_default*(): ptr Keymap00 {. + importc: "gdk_keymap_get_default", libprag.} + +proc getDefault*(): Keymap = + let gobj = gdk_keymap_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Keymap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): Keymap = + let gobj = gdk_keymap_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Keymap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_keymap_get_for_display*(display: ptr Display00): ptr Keymap00 {. + importc: "gdk_keymap_get_for_display", libprag.} + +proc getForDisplay*(display: Display): Keymap = + let gobj = gdk_keymap_get_for_display(cast[ptr Display00](display.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Keymap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc forDisplay*(display: Display): Keymap = + let gobj = gdk_keymap_get_for_display(cast[ptr Display00](display.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Keymap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_keymap_add_virtual_modifiers*(self: ptr Keymap00; state: ModifierType) {. + importc: "gdk_keymap_add_virtual_modifiers", libprag.} + +proc addVirtualModifiers*(self: Keymap; state: ModifierType) = + gdk_keymap_add_virtual_modifiers(cast[ptr Keymap00](self.impl), state) + +proc gdk_keymap_get_caps_lock_state*(self: ptr Keymap00): gboolean {. + importc: "gdk_keymap_get_caps_lock_state", libprag.} + +proc getCapsLockState*(self: Keymap): bool = + toBool(gdk_keymap_get_caps_lock_state(cast[ptr Keymap00](self.impl))) + +proc capsLockState*(self: Keymap): bool = + toBool(gdk_keymap_get_caps_lock_state(cast[ptr Keymap00](self.impl))) + +proc gdk_keymap_get_direction*(self: ptr Keymap00): pango.Direction {. + importc: "gdk_keymap_get_direction", libprag.} + +proc getDirection*(self: Keymap): pango.Direction = + gdk_keymap_get_direction(cast[ptr Keymap00](self.impl)) + +proc direction*(self: Keymap): pango.Direction = + gdk_keymap_get_direction(cast[ptr Keymap00](self.impl)) + +proc gdk_keymap_get_modifier_state*(self: ptr Keymap00): uint32 {. + importc: "gdk_keymap_get_modifier_state", libprag.} + +proc getModifierState*(self: Keymap): int = + int(gdk_keymap_get_modifier_state(cast[ptr Keymap00](self.impl))) + +proc modifierState*(self: Keymap): int = + int(gdk_keymap_get_modifier_state(cast[ptr Keymap00](self.impl))) + +proc gdk_keymap_get_num_lock_state*(self: ptr Keymap00): gboolean {. + importc: "gdk_keymap_get_num_lock_state", libprag.} + +proc getNumLockState*(self: Keymap): bool = + toBool(gdk_keymap_get_num_lock_state(cast[ptr Keymap00](self.impl))) + +proc numLockState*(self: Keymap): bool = + toBool(gdk_keymap_get_num_lock_state(cast[ptr Keymap00](self.impl))) + +proc gdk_keymap_get_scroll_lock_state*(self: ptr Keymap00): gboolean {. + importc: "gdk_keymap_get_scroll_lock_state", libprag.} + +proc getScrollLockState*(self: Keymap): bool = + toBool(gdk_keymap_get_scroll_lock_state(cast[ptr Keymap00](self.impl))) + +proc scrollLockState*(self: Keymap): bool = + toBool(gdk_keymap_get_scroll_lock_state(cast[ptr Keymap00](self.impl))) + +proc gdk_keymap_have_bidi_layouts*(self: ptr Keymap00): gboolean {. + importc: "gdk_keymap_have_bidi_layouts", libprag.} + +proc haveBidiLayouts*(self: Keymap): bool = + toBool(gdk_keymap_have_bidi_layouts(cast[ptr Keymap00](self.impl))) + +proc gdk_keymap_map_virtual_modifiers*(self: ptr Keymap00; state: ModifierType): gboolean {. + importc: "gdk_keymap_map_virtual_modifiers", libprag.} + +proc mapVirtualModifiers*(self: Keymap; state: ModifierType): bool = + toBool(gdk_keymap_map_virtual_modifiers(cast[ptr Keymap00](self.impl), state)) + +proc gdk_keymap_translate_keyboard_state*(self: ptr Keymap00; hardwareKeycode: uint32; state: ModifierType; + group: int32; keyval: var uint32; effectiveGroup: var int32; level: var int32; + consumedModifiers: var ModifierType): gboolean {. + importc: "gdk_keymap_translate_keyboard_state", libprag.} + +proc translateKeyboardState*(self: Keymap; hardwareKeycode: int; state: ModifierType; + group: int; keyval: var int; effectiveGroup: var int; level: var int; consumedModifiers: var ModifierType): bool = + var level_00 = int32(level) + var keyval_00 = uint32(keyval) + var effectiveGroup_00 = int32(effectiveGroup) + result = toBool(gdk_keymap_translate_keyboard_state(cast[ptr Keymap00](self.impl), uint32(hardwareKeycode), state, int32(group), keyval_00, effectiveGroup_00, level_00, consumedModifiers)) + level = int(level_00) + keyval = int(keyval_00) + effectiveGroup = int(effectiveGroup_00) + +type + ModifierIntent* {.size: sizeof(cint), pure.} = enum + primaryAccelerator = 0 + contextMenu = 1 + extendSelection = 2 + modifySelection = 3 + noTextInput = 4 + shiftGroup = 5 + defaultModMask = 6 + +proc gdk_keymap_get_modifier_mask*(self: ptr Keymap00; intent: ModifierIntent): ModifierType {. + importc: "gdk_keymap_get_modifier_mask", libprag.} + +proc getModifierMask*(self: Keymap; intent: ModifierIntent): ModifierType = + gdk_keymap_get_modifier_mask(cast[ptr Keymap00](self.impl), intent) + +proc modifierMask*(self: Keymap; intent: ModifierIntent): ModifierType = + gdk_keymap_get_modifier_mask(cast[ptr Keymap00](self.impl), intent) + +type + KeymapKey00* {.pure.} = object + keycode*: uint32 + group*: int32 + level*: int32 + KeymapKey* = ref object + impl*: ptr KeymapKey00 + +proc gdk_keymap_get_entries_for_keycode*(self: ptr Keymap00; hardwareKeycode: uint32; keys: var KeymapKey00Array; + keyvals: var uint32Array; nEntries: var int32): gboolean {. + importc: "gdk_keymap_get_entries_for_keycode", libprag.} + +proc getEntriesForKeycode*(self: Keymap; hardwareKeycode: int; keys: var KeymapKey00Array; + keyvals: var uint32Array; nEntries: var int): bool = + var nEntries_00 = int32(nEntries) + result = toBool(gdk_keymap_get_entries_for_keycode(cast[ptr Keymap00](self.impl), uint32(hardwareKeycode), keys, keyvals, nEntries_00)) + nEntries = int(nEntries_00) + +proc entriesForKeycode*(self: Keymap; hardwareKeycode: int; keys: var KeymapKey00Array; + keyvals: var uint32Array; nEntries: var int): bool = + var nEntries_00 = int32(nEntries) + result = toBool(gdk_keymap_get_entries_for_keycode(cast[ptr Keymap00](self.impl), uint32(hardwareKeycode), keys, keyvals, nEntries_00)) + nEntries = int(nEntries_00) + +proc gdk_keymap_get_entries_for_keyval*(self: ptr Keymap00; keyval: uint32; keys: var KeymapKey00Array; + nKeys: var int32): gboolean {. + importc: "gdk_keymap_get_entries_for_keyval", libprag.} + +proc getEntriesForKeyval*(self: Keymap; keyval: int; keys: var KeymapKey00Array; + nKeys: var int): bool = + var nKeys_00 = int32(nKeys) + result = toBool(gdk_keymap_get_entries_for_keyval(cast[ptr Keymap00](self.impl), uint32(keyval), keys, nKeys_00)) + nKeys = int(nKeys_00) + +proc entriesForKeyval*(self: Keymap; keyval: int; keys: var KeymapKey00Array; + nKeys: var int): bool = + var nKeys_00 = int32(nKeys) + result = toBool(gdk_keymap_get_entries_for_keyval(cast[ptr Keymap00](self.impl), uint32(keyval), keys, nKeys_00)) + nKeys = int(nKeys_00) + +proc gdk_keymap_lookup_key*(self: ptr Keymap00; key: ptr KeymapKey00): uint32 {. + importc: "gdk_keymap_lookup_key", libprag.} + +proc lookupKey*(self: Keymap; key: KeymapKey): int = + int(gdk_keymap_lookup_key(cast[ptr Keymap00](self.impl), cast[ptr KeymapKey00](key.impl))) + +const MAX_TIMECOORD_AXES* = 128'i32 + +type + MonitorClass00* {.pure.} = object + MonitorClass* = ref object + impl*: ptr MonitorClass00 + +const PARENT_RELATIVE* = 1'i32 + +const PRIORITY_REDRAW* = 20'i32 + +type + Point00* {.pure.} = object + x*: int32 + y*: int32 + Point* = ref object + impl*: ptr Point00 + +type + PropMode* {.size: sizeof(cint), pure.} = enum + replace = 0 + prepend = 1 + append = 2 + +type + SeatGrabPrepareFunc* = proc (seat: ptr Seat00; window: ptr Window00; userData: pointer) {.cdecl.} + +proc gdk_seat_grab*(self: ptr Seat00; window: ptr Window00; capabilities: SeatCapabilities; + ownerEvents: gboolean; cursor: ptr Cursor00; event: ptr Event00; prepareFunc: SeatGrabPrepareFunc; + prepareFuncData: pointer): GrabStatus {. + importc: "gdk_seat_grab", libprag.} + +proc grab*(self: Seat; window: Window; capabilities: SeatCapabilities; + ownerEvents: bool; cursor: Cursor; event: Event; prepareFunc: SeatGrabPrepareFunc; prepareFuncData: pointer): GrabStatus = + gdk_seat_grab(cast[ptr Seat00](self.impl), cast[ptr Window00](window.impl), capabilities, gboolean(ownerEvents), cast[ptr Cursor00](cursor.impl), cast[ptr Event00](event.impl), prepareFunc, prepareFuncData) + +type + Status* {.size: sizeof(cint), pure.} = enum + errorMem = -4 + errorFile = -3 + errorParam = -2 + error = -1 + ok = 0 + +type + TimeCoord00* {.pure.} = object + time*: uint32 + axes*: array[128, cdouble] + TimeCoord* = ref object + impl*: ptr TimeCoord00 + +type + WindowChildFunc* = proc (window: ptr Window00; userData: pointer): gboolean {.cdecl.} + +proc gdk_window_invalidate_maybe_recurse*(self: ptr Window00; region: ptr cairo.Region00; childFunc: WindowChildFunc; + userData: pointer) {. + importc: "gdk_window_invalidate_maybe_recurse", libprag.} + +proc invalidateMaybeRecurse*(self: Window; region: cairo.Region; childFunc: WindowChildFunc; + userData: pointer) = + gdk_window_invalidate_maybe_recurse(cast[ptr Window00](self.impl), cast[ptr cairo.Region00](region.impl), childFunc, userData) + +type + WindowClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + pickEmbeddedChild*: pointer + toEmbedder*: proc(window: ptr Window00; offscreenX: cdouble; offscreenY: cdouble; + embedderX: ptr cdouble; embedderY: ptr cdouble) {.cdecl.} + fromEmbedder*: proc(window: ptr Window00; embedderX: cdouble; embedderY: cdouble; + offscreenX: ptr cdouble; offscreenY: ptr cdouble) {.cdecl.} + createSurface*: proc(window: ptr Window00; width: int32; height: int32): ptr cairo.Surface00 {.cdecl.} + gdkReserved1*: pointer + gdkReserved2*: pointer + gdkReserved3*: pointer + gdkReserved4*: pointer + gdkReserved5*: pointer + gdkReserved6*: pointer + gdkReserved7*: pointer + gdkReserved8*: pointer + WindowClass* = ref object + impl*: ptr WindowClass00 + +type + WindowInvalidateHandlerFunc* = proc (window: ptr Window00; region: ptr cairo.Region00) {.cdecl.} + +type + WindowRedirect00* {.pure.} = object + WindowRedirect* = ref object + impl*: ptr WindowRedirect00 + +proc gdk_add_option_entries_libgtk_only*(group: ptr glib.OptionGroup00) {. + importc: "gdk_add_option_entries_libgtk_only", libprag.} + +proc addOptionEntriesLibgtkOnly*(group: glib.OptionGroup) = + gdk_add_option_entries_libgtk_only(cast[ptr glib.OptionGroup00](group.impl)) + +proc gdk_beep*() {. + importc: "gdk_beep", libprag.} + +proc beep*() {. + importc: "gdk_beep", libprag.} + +proc gdk_cairo_create*(window: ptr Window00): ptr cairo.Context00 {. + importc: "gdk_cairo_create", libprag.} + +proc cairoCreate*(window: Window): cairo.Context = + new(result) + result.impl = gdk_cairo_create(cast[ptr Window00](window.impl)) + +proc gdk_cairo_draw_from_gl*(cr: ptr cairo.Context00; window: ptr Window00; source: int32; + sourceType: int32; bufferScale: int32; x: int32; y: int32; width: int32; height: int32) {. + importc: "gdk_cairo_draw_from_gl", libprag.} + +proc cairoDrawFromGl*(cr: cairo.Context; window: Window; source: int; sourceType: int; + bufferScale: int; x: int; y: int; width: int; height: int) = + gdk_cairo_draw_from_gl(cast[ptr cairo.Context00](cr.impl), cast[ptr Window00](window.impl), int32(source), int32(sourceType), int32(bufferScale), int32(x), int32(y), int32(width), int32(height)) + +proc gdk_cairo_get_clip_rectangle*(cr: ptr cairo.Context00; rect: var Rectangle00): gboolean {. + importc: "gdk_cairo_get_clip_rectangle", libprag.} + +proc cairoGetClipRectangle*(cr: ptr cairo.Context00; rect: var Rectangle00): gboolean {. + importc: "gdk_cairo_get_clip_rectangle", libprag.} + +proc gdk_cairo_get_drawing_context*(cr: ptr cairo.Context00): ptr DrawingContext00 {. + importc: "gdk_cairo_get_drawing_context", libprag.} + +proc cairoGetDrawingContext*(cr: cairo.Context): DrawingContext = + let gobj = gdk_cairo_get_drawing_context(cast[ptr cairo.Context00](cr.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DrawingContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_cairo_rectangle*(cr: ptr cairo.Context00; rectangle: ptr Rectangle00) {. + importc: "gdk_cairo_rectangle", libprag.} + +proc cairoRectangle*(cr: cairo.Context; rectangle: Rectangle) = + gdk_cairo_rectangle(cast[ptr cairo.Context00](cr.impl), cast[ptr Rectangle00](rectangle.impl)) + +proc gdk_cairo_region*(cr: ptr cairo.Context00; region: ptr cairo.Region00) {. + importc: "gdk_cairo_region", libprag.} + +proc cairoRegion*(cr: cairo.Context; region: cairo.Region) = + gdk_cairo_region(cast[ptr cairo.Context00](cr.impl), cast[ptr cairo.Region00](region.impl)) + +proc gdk_cairo_region_create_from_surface*(surface: ptr cairo.Surface00): ptr cairo.Region00 {. + importc: "gdk_cairo_region_create_from_surface", libprag.} + +proc cairoRegionCreateFromSurface*(surface: cairo.Surface): cairo.Region = + new(result) + result.impl = gdk_cairo_region_create_from_surface(cast[ptr cairo.Surface00](surface.impl)) + +proc gdk_cairo_set_source_color*(cr: ptr cairo.Context00; color: ptr Color00) {. + importc: "gdk_cairo_set_source_color", libprag.} + +proc cairoSetSourceColor*(cr: cairo.Context; color: Color) = + gdk_cairo_set_source_color(cast[ptr cairo.Context00](cr.impl), cast[ptr Color00](color.impl)) + +proc gdk_cairo_set_source_pixbuf*(cr: ptr cairo.Context00; pixbuf: ptr gdkpixbuf.Pixbuf00; + pixbufX: cdouble; pixbufY: cdouble) {. + importc: "gdk_cairo_set_source_pixbuf", libprag.} + +proc cairoSetSourcePixbuf*(cr: cairo.Context; pixbuf: gdkpixbuf.Pixbuf; pixbufX: cdouble; + pixbufY: cdouble) = + gdk_cairo_set_source_pixbuf(cast[ptr cairo.Context00](cr.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl), pixbufX, pixbufY) + +proc gdk_cairo_set_source_rgba*(cr: ptr cairo.Context00; rgba: ptr RGBA00) {. + importc: "gdk_cairo_set_source_rgba", libprag.} + +proc cairoSetSourceRgba*(cr: cairo.Context; rgba: RGBA) = + gdk_cairo_set_source_rgba(cast[ptr cairo.Context00](cr.impl), cast[ptr RGBA00](rgba.impl)) + +proc gdk_cairo_set_source_window*(cr: ptr cairo.Context00; window: ptr Window00; x: cdouble; + y: cdouble) {. + importc: "gdk_cairo_set_source_window", libprag.} + +proc cairoSetSourceWindow*(cr: cairo.Context; window: Window; x: cdouble; y: cdouble) = + gdk_cairo_set_source_window(cast[ptr cairo.Context00](cr.impl), cast[ptr Window00](window.impl), x, y) + +proc gdk_cairo_surface_create_from_pixbuf*(pixbuf: ptr gdkpixbuf.Pixbuf00; scale: int32; forWindow: ptr Window00): ptr cairo.Surface00 {. + importc: "gdk_cairo_surface_create_from_pixbuf", libprag.} + +proc cairoSurfaceCreateFromPixbuf*(pixbuf: gdkpixbuf.Pixbuf; scale: int; forWindow: Window): cairo.Surface = + new(result) + result.impl = gdk_cairo_surface_create_from_pixbuf(cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl), int32(scale), cast[ptr Window00](forWindow.impl)) + +proc gdk_disable_multidevice*() {. + importc: "gdk_disable_multidevice", libprag.} + +proc disableMultidevice*() {. + importc: "gdk_disable_multidevice", libprag.} + +proc gdk_drag_abort*(context: ptr DragContext00; time: uint32) {. + importc: "gdk_drag_abort", libprag.} + +proc dragAbort*(context: DragContext; time: int) = + gdk_drag_abort(cast[ptr DragContext00](context.impl), uint32(time)) + +proc gdk_drag_begin*(window: ptr Window00; targets: ptr pointer): ptr DragContext00 {. + importc: "gdk_drag_begin", libprag.} + +proc dragBegin*(window: Window; targets: ptr pointer): DragContext = + let gobj = gdk_drag_begin(cast[ptr Window00](window.impl), targets) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DragContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_drag_begin_for_device*(window: ptr Window00; device: ptr Device00; targets: ptr pointer): ptr DragContext00 {. + importc: "gdk_drag_begin_for_device", libprag.} + +proc dragBeginForDevice*(window: Window; device: Device; targets: ptr pointer): DragContext = + let gobj = gdk_drag_begin_for_device(cast[ptr Window00](window.impl), cast[ptr Device00](device.impl), targets) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DragContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_drag_begin_from_point*(window: ptr Window00; device: ptr Device00; targets: ptr pointer; + xRoot: int32; yRoot: int32): ptr DragContext00 {. + importc: "gdk_drag_begin_from_point", libprag.} + +proc dragBeginFromPoint*(window: Window; device: Device; targets: ptr pointer; + xRoot: int; yRoot: int): DragContext = + let gobj = gdk_drag_begin_from_point(cast[ptr Window00](window.impl), cast[ptr Device00](device.impl), targets, int32(xRoot), int32(yRoot)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DragContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_drag_drop*(context: ptr DragContext00; time: uint32) {. + importc: "gdk_drag_drop", libprag.} + +proc dragDrop*(context: DragContext; time: int) = + gdk_drag_drop(cast[ptr DragContext00](context.impl), uint32(time)) + +proc gdk_drag_drop_done*(context: ptr DragContext00; success: gboolean) {. + importc: "gdk_drag_drop_done", libprag.} + +proc dragDropDone*(context: DragContext; success: bool) = + gdk_drag_drop_done(cast[ptr DragContext00](context.impl), gboolean(success)) + +proc gdk_drag_drop_succeeded*(context: ptr DragContext00): gboolean {. + importc: "gdk_drag_drop_succeeded", libprag.} + +proc dragDropSucceeded*(context: DragContext): bool = + toBool(gdk_drag_drop_succeeded(cast[ptr DragContext00](context.impl))) + +proc gdk_drag_find_window_for_screen*(context: ptr DragContext00; dragWindow: ptr Window00; + screen: ptr Screen00; xRoot: int32; yRoot: int32; destWindow: var ptr Window00; protocol: var DragProtocol) {. + importc: "gdk_drag_find_window_for_screen", libprag.} + +proc dragFindWindowForScreen*(context: ptr DragContext00; dragWindow: ptr Window00; + screen: ptr Screen00; xRoot: int32; yRoot: int32; destWindow: var ptr Window00; protocol: var DragProtocol) {. + importc: "gdk_drag_find_window_for_screen", libprag.} + +proc gdk_drag_get_selection*(context: ptr DragContext00): ptr Atom00 {. + importc: "gdk_drag_get_selection", libprag.} + +proc dragGetSelection*(context: DragContext): Atom = + new(result) + result.impl = gdk_drag_get_selection(cast[ptr DragContext00](context.impl)) + +proc gdk_drag_motion*(context: ptr DragContext00; destWindow: ptr Window00; + protocol: DragProtocol; xRoot: int32; yRoot: int32; suggestedAction: DragAction; possibleActions: DragAction; + time: uint32): gboolean {. + importc: "gdk_drag_motion", libprag.} + +proc dragMotion*(context: DragContext; destWindow: Window; protocol: DragProtocol; + xRoot: int; yRoot: int; suggestedAction: DragAction; possibleActions: DragAction; + time: int): bool = + toBool(gdk_drag_motion(cast[ptr DragContext00](context.impl), cast[ptr Window00](destWindow.impl), protocol, int32(xRoot), int32(yRoot), suggestedAction, possibleActions, uint32(time))) + +proc gdk_drag_status*(context: ptr DragContext00; action: DragAction; time: uint32) {. + importc: "gdk_drag_status", libprag.} + +proc dragStatus*(context: DragContext; action: DragAction; time: int) = + gdk_drag_status(cast[ptr DragContext00](context.impl), action, uint32(time)) + +proc gdk_drop_finish*(context: ptr DragContext00; success: gboolean; time: uint32) {. + importc: "gdk_drop_finish", libprag.} + +proc dropFinish*(context: DragContext; success: bool; time: int) = + gdk_drop_finish(cast[ptr DragContext00](context.impl), gboolean(success), uint32(time)) + +proc gdk_drop_reply*(context: ptr DragContext00; accepted: gboolean; time: uint32) {. + importc: "gdk_drop_reply", libprag.} + +proc dropReply*(context: DragContext; accepted: bool; time: int) = + gdk_drop_reply(cast[ptr DragContext00](context.impl), gboolean(accepted), uint32(time)) + +proc gdk_error_trap_pop*(): int32 {. + importc: "gdk_error_trap_pop", libprag.} + +proc errorTrapPop*(): int32 {. + importc: "gdk_error_trap_pop", libprag.} + +proc gdk_error_trap_pop_ignored*() {. + importc: "gdk_error_trap_pop_ignored", libprag.} + +proc errorTrapPopIgnored*() {. + importc: "gdk_error_trap_pop_ignored", libprag.} + +proc gdk_error_trap_push*() {. + importc: "gdk_error_trap_push", libprag.} + +proc errorTrapPush*() {. + importc: "gdk_error_trap_push", libprag.} + +proc gdk_events_pending*(): gboolean {. + importc: "gdk_events_pending", libprag.} + +proc eventsPending*(): gboolean {. + importc: "gdk_events_pending", libprag.} + +proc gdk_flush*() {. + importc: "gdk_flush", libprag.} + +proc flush*() {. + importc: "gdk_flush", libprag.} + +proc gdk_get_default_root_window*(): ptr Window00 {. + importc: "gdk_get_default_root_window", libprag.} + +proc getDefaultRootWindow*(): Window = + let gobj = gdk_get_default_root_window() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultRootWindow*(): Window = + let gobj = gdk_get_default_root_window() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_get_display*(): cstring {. + importc: "gdk_get_display", libprag.} + +proc getDisplay*(): string = + let resul0 = gdk_get_display() + result = $resul0 + cogfree(resul0) + +proc display*(): string = + let resul0 = gdk_get_display() + result = $resul0 + cogfree(resul0) + +proc gdk_get_display_arg_name*(): cstring {. + importc: "gdk_get_display_arg_name", libprag.} + +proc getDisplayArgName*(): string = + let resul0 = gdk_get_display_arg_name() + result = $resul0 + +proc displayArgName*(): string = + let resul0 = gdk_get_display_arg_name() + result = $resul0 + +proc gdk_get_program_class*(): cstring {. + importc: "gdk_get_program_class", libprag.} + +proc getProgramClass*(): string = + let resul0 = gdk_get_program_class() + result = $resul0 + +proc programClass*(): string = + let resul0 = gdk_get_program_class() + result = $resul0 + +proc gdk_get_show_events*(): gboolean {. + importc: "gdk_get_show_events", libprag.} + +proc getShowEvents*(): gboolean {. + importc: "gdk_get_show_events", libprag.} + +proc showEvents*(): gboolean {. + importc: "gdk_get_show_events", libprag.} + +proc gdk_init*(argc: int32; argv: cstringArray) {. + importc: "gdk_init", libprag.} + +proc init*(argc: int32; argv: cstringArray) {. + importc: "gdk_init", libprag.} + +proc gdk_init_check*(argc: int32; argv: cstringArray): gboolean {. + importc: "gdk_init_check", libprag.} + +proc initCheck*(argc: int32; argv: cstringArray): gboolean {. + importc: "gdk_init_check", libprag.} + +proc gdk_keyboard_grab*(window: ptr Window00; ownerEvents: gboolean; time: uint32): GrabStatus {. + importc: "gdk_keyboard_grab", libprag.} + +proc keyboardGrab*(window: Window; ownerEvents: bool; time: int): GrabStatus = + gdk_keyboard_grab(cast[ptr Window00](window.impl), gboolean(ownerEvents), uint32(time)) + +proc gdk_keyboard_ungrab*(time: uint32) {. + importc: "gdk_keyboard_ungrab", libprag.} + +proc keyboardUngrab*(time: uint32) {. + importc: "gdk_keyboard_ungrab", libprag.} + +proc gdk_keyval_convert_case*(symbol: uint32; lower: var uint32; upper: var uint32) {. + importc: "gdk_keyval_convert_case", libprag.} + +proc keyvalConvertCase*(symbol: uint32; lower: var uint32; upper: var uint32) {. + importc: "gdk_keyval_convert_case", libprag.} + +proc gdk_keyval_from_name*(keyvalName: cstring): uint32 {. + importc: "gdk_keyval_from_name", libprag.} + +proc keyvalFromName*(keyvalName: cstring): uint32 {. + importc: "gdk_keyval_from_name", libprag.} + +proc gdk_keyval_is_lower*(keyval: uint32): gboolean {. + importc: "gdk_keyval_is_lower", libprag.} + +proc keyvalIsLower*(keyval: uint32): gboolean {. + importc: "gdk_keyval_is_lower", libprag.} + +proc gdk_keyval_is_upper*(keyval: uint32): gboolean {. + importc: "gdk_keyval_is_upper", libprag.} + +proc keyvalIsUpper*(keyval: uint32): gboolean {. + importc: "gdk_keyval_is_upper", libprag.} + +proc gdk_keyval_name*(keyval: uint32): cstring {. + importc: "gdk_keyval_name", libprag.} + +proc keyvalName*(keyval: int): string = + let resul0 = gdk_keyval_name(uint32(keyval)) + result = $resul0 + +proc gdk_keyval_to_lower*(keyval: uint32): uint32 {. + importc: "gdk_keyval_to_lower", libprag.} + +proc keyvalToLower*(keyval: uint32): uint32 {. + importc: "gdk_keyval_to_lower", libprag.} + +proc gdk_keyval_to_unicode*(keyval: uint32): uint32 {. + importc: "gdk_keyval_to_unicode", libprag.} + +proc keyvalToUnicode*(keyval: uint32): uint32 {. + importc: "gdk_keyval_to_unicode", libprag.} + +proc gdk_keyval_to_upper*(keyval: uint32): uint32 {. + importc: "gdk_keyval_to_upper", libprag.} + +proc keyvalToUpper*(keyval: uint32): uint32 {. + importc: "gdk_keyval_to_upper", libprag.} + +proc gdk_list_visuals*(): ptr pointer {. + importc: "gdk_list_visuals", libprag.} + +proc listVisuals*(): ptr pointer {. + importc: "gdk_list_visuals", libprag.} + +proc gdk_notify_startup_complete*() {. + importc: "gdk_notify_startup_complete", libprag.} + +proc notifyStartupComplete*() {. + importc: "gdk_notify_startup_complete", libprag.} + +proc gdk_notify_startup_complete_with_id*(startupId: cstring) {. + importc: "gdk_notify_startup_complete_with_id", libprag.} + +proc notifyStartupCompleteWithId*(startupId: cstring) {. + importc: "gdk_notify_startup_complete_with_id", libprag.} + +proc gdk_offscreen_window_get_embedder*(window: ptr Window00): ptr Window00 {. + importc: "gdk_offscreen_window_get_embedder", libprag.} + +proc offscreenWindowGetEmbedder*(window: Window): Window = + let gobj = gdk_offscreen_window_get_embedder(cast[ptr Window00](window.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_offscreen_window_get_surface*(window: ptr Window00): ptr cairo.Surface00 {. + importc: "gdk_offscreen_window_get_surface", libprag.} + +proc offscreenWindowGetSurface*(window: Window): cairo.Surface = + new(result) + result.impl = gdk_offscreen_window_get_surface(cast[ptr Window00](window.impl)) + +proc gdk_offscreen_window_set_embedder*(window: ptr Window00; embedder: ptr Window00) {. + importc: "gdk_offscreen_window_set_embedder", libprag.} + +proc offscreenWindowSetEmbedder*(window: Window; embedder: Window) = + gdk_offscreen_window_set_embedder(cast[ptr Window00](window.impl), cast[ptr Window00](embedder.impl)) + +proc gdk_pango_context_get*(): ptr pango.Context00 {. + importc: "gdk_pango_context_get", libprag.} + +proc pangoContextGet*(): pango.Context = + let gobj = gdk_pango_context_get() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pango_context_get_for_display*(display: ptr Display00): ptr pango.Context00 {. + importc: "gdk_pango_context_get_for_display", libprag.} + +proc pangoContextGetForDisplay*(display: Display): pango.Context = + let gobj = gdk_pango_context_get_for_display(cast[ptr Display00](display.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pango_context_get_for_screen*(screen: ptr Screen00): ptr pango.Context00 {. + importc: "gdk_pango_context_get_for_screen", libprag.} + +proc pangoContextGetForScreen*(screen: Screen): pango.Context = + let gobj = gdk_pango_context_get_for_screen(cast[ptr Screen00](screen.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_parse_args*(argc: int32; argv: cstringArray) {. + importc: "gdk_parse_args", libprag.} + +proc parseArgs*(argc: int32; argv: cstringArray) {. + importc: "gdk_parse_args", libprag.} + +proc gdk_pixbuf_get_from_surface*(surface: ptr cairo.Surface00; srcX: int32; srcY: int32; + width: int32; height: int32): ptr gdkpixbuf.Pixbuf00 {. + importc: "gdk_pixbuf_get_from_surface", libprag.} + +proc pixbufGetFromSurface*(surface: cairo.Surface; srcX: int; srcY: int; width: int; + height: int): gdkpixbuf.Pixbuf = + let gobj = gdk_pixbuf_get_from_surface(cast[ptr cairo.Surface00](surface.impl), int32(srcX), int32(srcY), int32(width), int32(height)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_get_from_window*(window: ptr Window00; srcX: int32; srcY: int32; width: int32; + height: int32): ptr gdkpixbuf.Pixbuf00 {. + importc: "gdk_pixbuf_get_from_window", libprag.} + +proc pixbufGetFromWindow*(window: Window; srcX: int; srcY: int; width: int; + height: int): gdkpixbuf.Pixbuf = + let gobj = gdk_pixbuf_get_from_window(cast[ptr Window00](window.impl), int32(srcX), int32(srcY), int32(width), int32(height)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pointer_grab*(window: ptr Window00; ownerEvents: gboolean; eventMask: EventMask; + confineTo: ptr Window00; cursor: ptr Cursor00; time: uint32): GrabStatus {. + importc: "gdk_pointer_grab", libprag.} + +proc pointerGrab*(window: Window; ownerEvents: bool; eventMask: EventMask; + confineTo: Window; cursor: Cursor; time: int): GrabStatus = + gdk_pointer_grab(cast[ptr Window00](window.impl), gboolean(ownerEvents), eventMask, cast[ptr Window00](confineTo.impl), cast[ptr Cursor00](cursor.impl), uint32(time)) + +proc gdk_pointer_is_grabbed*(): gboolean {. + importc: "gdk_pointer_is_grabbed", libprag.} + +proc pointerIsGrabbed*(): gboolean {. + importc: "gdk_pointer_is_grabbed", libprag.} + +proc gdk_pointer_ungrab*(time: uint32) {. + importc: "gdk_pointer_ungrab", libprag.} + +proc pointerUngrab*(time: uint32) {. + importc: "gdk_pointer_ungrab", libprag.} + +proc gdk_pre_parse_libgtk_only*() {. + importc: "gdk_pre_parse_libgtk_only", libprag.} + +proc preParseLibgtkOnly*() {. + importc: "gdk_pre_parse_libgtk_only", libprag.} + +proc gdk_property_delete*(window: ptr Window00; property: ptr Atom00) {. + importc: "gdk_property_delete", libprag.} + +proc propertyDelete*(window: Window; property: Atom) = + gdk_property_delete(cast[ptr Window00](window.impl), cast[ptr Atom00](property.impl)) + +proc gdk_property_get*(window: ptr Window00; property: ptr Atom00; `type`: ptr Atom00; + offset: uint64; length: uint64; pdelete: int32; actualPropertyType: var ptr Atom00; + actualFormat: var int32; actualLength: var int32; data: var uint8Array): gboolean {. + importc: "gdk_property_get", libprag.} + +proc propertyGet*(window: ptr Window00; property: ptr Atom00; `type`: ptr Atom00; + offset: uint64; length: uint64; pdelete: int32; actualPropertyType: var ptr Atom00; + actualFormat: var int32; actualLength: var int32; data: var uint8Array): gboolean {. + importc: "gdk_property_get", libprag.} + +proc gdk_query_depths*(depths: var int32Array; count: var int32) {. + importc: "gdk_query_depths", libprag.} + +proc queryDepths*(depths: var int32Array; count: var int32) {. + importc: "gdk_query_depths", libprag.} + +proc gdk_query_visual_types*(visualTypes: var VisualTypeArray; count: var int32) {. + importc: "gdk_query_visual_types", libprag.} + +proc queryVisualTypes*(visualTypes: var VisualTypeArray; count: var int32) {. + importc: "gdk_query_visual_types", libprag.} + +proc gdk_selection_convert*(requestor: ptr Window00; selection: ptr Atom00; target: ptr Atom00; + time: uint32) {. + importc: "gdk_selection_convert", libprag.} + +proc selectionConvert*(requestor: Window; selection: Atom; target: Atom; + time: int) = + gdk_selection_convert(cast[ptr Window00](requestor.impl), cast[ptr Atom00](selection.impl), cast[ptr Atom00](target.impl), uint32(time)) + +proc gdk_selection_owner_get*(selection: ptr Atom00): ptr Window00 {. + importc: "gdk_selection_owner_get", libprag.} + +proc selectionOwnerGet*(selection: Atom): Window = + let gobj = gdk_selection_owner_get(cast[ptr Atom00](selection.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_selection_owner_get_for_display*(display: ptr Display00; selection: ptr Atom00): ptr Window00 {. + importc: "gdk_selection_owner_get_for_display", libprag.} + +proc selectionOwnerGetForDisplay*(display: Display; selection: Atom): Window = + let gobj = gdk_selection_owner_get_for_display(cast[ptr Display00](display.impl), cast[ptr Atom00](selection.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_selection_owner_set*(owner: ptr Window00; selection: ptr Atom00; time: uint32; + sendEvent: gboolean): gboolean {. + importc: "gdk_selection_owner_set", libprag.} + +proc selectionOwnerSet*(owner: Window; selection: Atom; time: int; sendEvent: bool): bool = + toBool(gdk_selection_owner_set(cast[ptr Window00](owner.impl), cast[ptr Atom00](selection.impl), uint32(time), gboolean(sendEvent))) + +proc gdk_selection_owner_set_for_display*(display: ptr Display00; owner: ptr Window00; selection: ptr Atom00; + time: uint32; sendEvent: gboolean): gboolean {. + importc: "gdk_selection_owner_set_for_display", libprag.} + +proc selectionOwnerSetForDisplay*(display: Display; owner: Window; selection: Atom; + time: int; sendEvent: bool): bool = + toBool(gdk_selection_owner_set_for_display(cast[ptr Display00](display.impl), cast[ptr Window00](owner.impl), cast[ptr Atom00](selection.impl), uint32(time), gboolean(sendEvent))) + +proc gdk_selection_send_notify*(requestor: ptr Window00; selection: ptr Atom00; target: ptr Atom00; + property: ptr Atom00; time: uint32) {. + importc: "gdk_selection_send_notify", libprag.} + +proc selectionSendNotify*(requestor: Window; selection: Atom; target: Atom; + property: Atom; time: int) = + gdk_selection_send_notify(cast[ptr Window00](requestor.impl), cast[ptr Atom00](selection.impl), cast[ptr Atom00](target.impl), cast[ptr Atom00](property.impl), uint32(time)) + +proc gdk_selection_send_notify_for_display*(display: ptr Display00; requestor: ptr Window00; selection: ptr Atom00; + target: ptr Atom00; property: ptr Atom00; time: uint32) {. + importc: "gdk_selection_send_notify_for_display", libprag.} + +proc selectionSendNotifyForDisplay*(display: Display; requestor: Window; selection: Atom; + target: Atom; property: Atom; time: int) = + gdk_selection_send_notify_for_display(cast[ptr Display00](display.impl), cast[ptr Window00](requestor.impl), cast[ptr Atom00](selection.impl), cast[ptr Atom00](target.impl), cast[ptr Atom00](property.impl), uint32(time)) + +proc gdk_set_allowed_backends*(backends: cstring) {. + importc: "gdk_set_allowed_backends", libprag.} + +proc setAllowedBackends*(backends: cstring) {. + importc: "gdk_set_allowed_backends", libprag.} + +proc `allowedBackends=`*(backends: cstring) {. + importc: "gdk_set_allowed_backends", libprag.} + +proc gdk_set_double_click_time*(msec: uint32) {. + importc: "gdk_set_double_click_time", libprag.} + +proc setDoubleClickTime*(msec: uint32) {. + importc: "gdk_set_double_click_time", libprag.} + +proc `doubleClickTime=`*(msec: uint32) {. + importc: "gdk_set_double_click_time", libprag.} + +proc gdk_set_program_class*(programClass: cstring) {. + importc: "gdk_set_program_class", libprag.} + +proc setProgramClass*(programClass: cstring) {. + importc: "gdk_set_program_class", libprag.} + +proc `programClass=`*(programClass: cstring) {. + importc: "gdk_set_program_class", libprag.} + +proc gdk_set_show_events*(showEvents: gboolean) {. + importc: "gdk_set_show_events", libprag.} + +proc setShowEvents*(showEvents: gboolean) {. + importc: "gdk_set_show_events", libprag.} + +proc `showEvents=`*(showEvents: gboolean) {. + importc: "gdk_set_show_events", libprag.} + +proc gdk_setting_get*(name: cstring; value: ptr gobject.Value00): gboolean {. + importc: "gdk_setting_get", libprag.} + +proc settingGet*(name: string; value: gobject.Value): bool = + toBool(gdk_setting_get(cstring(name), cast[ptr gobject.Value00](value.impl))) + +proc `tingGet=`*(name: string; value: gobject.Value): bool = + toBool(gdk_setting_get(cstring(name), cast[ptr gobject.Value00](value.impl))) + +proc gdk_synthesize_window_state*(window: ptr Window00; unsetFlags: WindowState; setFlags: WindowState) {. + importc: "gdk_synthesize_window_state", libprag.} + +proc synthesizeWindowState*(window: Window; unsetFlags: WindowState; setFlags: WindowState) = + gdk_synthesize_window_state(cast[ptr Window00](window.impl), unsetFlags, setFlags) + +proc gdk_test_render_sync*(window: ptr Window00) {. + importc: "gdk_test_render_sync", libprag.} + +proc testRenderSync*(window: Window) = + gdk_test_render_sync(cast[ptr Window00](window.impl)) + +proc gdk_test_simulate_button*(window: ptr Window00; x: int32; y: int32; button: uint32; + modifiers: ModifierType; buttonPressrelease: EventType): gboolean {. + importc: "gdk_test_simulate_button", libprag.} + +proc testSimulateButton*(window: Window; x: int; y: int; button: int; modifiers: ModifierType; + buttonPressrelease: EventType): bool = + toBool(gdk_test_simulate_button(cast[ptr Window00](window.impl), int32(x), int32(y), uint32(button), modifiers, buttonPressrelease)) + +proc gdk_test_simulate_key*(window: ptr Window00; x: int32; y: int32; keyval: uint32; + modifiers: ModifierType; keyPressrelease: EventType): gboolean {. + importc: "gdk_test_simulate_key", libprag.} + +proc testSimulateKey*(window: Window; x: int; y: int; keyval: int; modifiers: ModifierType; + keyPressrelease: EventType): bool = + toBool(gdk_test_simulate_key(cast[ptr Window00](window.impl), int32(x), int32(y), uint32(keyval), modifiers, keyPressrelease)) + +proc gdk_text_property_to_utf8_list_for_display*(display: ptr Display00; encoding: ptr Atom00; format: int32; + text: uint8Array; length: int32; list: var cstringArray): int32 {. + importc: "gdk_text_property_to_utf8_list_for_display", libprag.} + +proc textPropertyToUtf8ListForDisplay*(display: Display; encoding: Atom; format: int; text: uint8Array; + length: int; list: var cstringArray): int = + int(gdk_text_property_to_utf8_list_for_display(cast[ptr Display00](display.impl), cast[ptr Atom00](encoding.impl), int32(format), text, int32(length), list)) + +proc gdk_threads_add_idle_full*(priority: int32; function: SourceFunc; data: pointer; + notify: DestroyNotify): uint32 {. + importc: "gdk_threads_add_idle_full", libprag.} + +proc threadsAddIdle*(priority: int32; function: SourceFunc; data: pointer; + notify: DestroyNotify): uint32 {. + importc: "gdk_threads_add_idle_full", libprag.} + +proc gdk_threads_add_timeout_full*(priority: int32; interval: uint32; function: SourceFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "gdk_threads_add_timeout_full", libprag.} + +proc threadsAddTimeout*(priority: int32; interval: uint32; function: SourceFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "gdk_threads_add_timeout_full", libprag.} + +proc gdk_threads_add_timeout_seconds_full*(priority: int32; interval: uint32; function: SourceFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "gdk_threads_add_timeout_seconds_full", libprag.} + +proc threadsAddTimeoutSeconds*(priority: int32; interval: uint32; function: SourceFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "gdk_threads_add_timeout_seconds_full", libprag.} + +proc gdk_threads_enter*() {. + importc: "gdk_threads_enter", libprag.} + +proc threadsEnter*() {. + importc: "gdk_threads_enter", libprag.} + +proc gdk_threads_init*() {. + importc: "gdk_threads_init", libprag.} + +proc threadsInit*() {. + importc: "gdk_threads_init", libprag.} + +proc gdk_threads_leave*() {. + importc: "gdk_threads_leave", libprag.} + +proc threadsLeave*() {. + importc: "gdk_threads_leave", libprag.} + +proc gdk_unicode_to_keyval*(wc: uint32): uint32 {. + importc: "gdk_unicode_to_keyval", libprag.} + +proc unicodeToKeyval*(wc: uint32): uint32 {. + importc: "gdk_unicode_to_keyval", libprag.} + +proc gdk_utf8_to_string_target*(str: cstring): cstring {. + importc: "gdk_utf8_to_string_target", libprag.} + +proc utf8ToStringTarget*(str: string): string = + let resul0 = gdk_utf8_to_string_target(cstring(str)) + result = $resul0 + cogfree(resul0) +# === remaining symbols: diff --git a/gintro/gdkpixbuf.nim b/gintro/gdkpixbuf.nim new file mode 100644 index 0000000..3c6ef9f --- /dev/null +++ b/gintro/gdkpixbuf.nim @@ -0,0 +1,1565 @@ +# dependencies: +# GLib-2.0 +# Gio-2.0 +# GObject-2.0 +# GModule-2.0 +# immediate dependencies: +# Gio-2.0 +# GModule-2.0 +# libraries: +# libgdk_pixbuf-2.0.so.0 +{.deadCodeElim: on.} +import glib, gio, gobject, gmodule +const Lib* = "libgdk_pixbuf-2.0.so.0" +{.pragma: libprag, cdecl, dynlib: Lib.} +let Quark = g_quark_from_static_string("NimGIQuark") + +type + Colorspace* {.size: sizeof(cint), pure.} = enum + rgb = 0 + +type + InterpType* {.size: sizeof(cint), pure.} = enum + nearest = 0 + tiles = 1 + bilinear = 2 + hyper = 3 + +const PIXBUF_FEATURES_H* = 1'i32 + +const PIXBUF_MAGIC_NUMBER* = 1197763408'i32 + +const PIXBUF_MAJOR* = 2'i32 + +const PIXBUF_MICRO* = 6'i32 + +const PIXBUF_MINOR* = 36'i32 + +const PIXBUF_VERSION* = "2.36.6" + +const PIXDATA_HEADER_LENGTH* = 24'i32 + +type + Pixbuf* = ref object of gobject.Object + Pixbuf00* = object of gobject.Object00 + +proc gdk_pixbuf_new*(colorspace: Colorspace; hasAlpha: gboolean; bitsPerSample: int32; + width: int32; height: int32): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new", libprag.} + +proc newPixbuf*(colorspace: Colorspace; hasAlpha: bool; bitsPerSample: int; + width: int; height: int): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new(colorspace, gboolean(hasAlpha), int32(bitsPerSample), int32(width), int32(height)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbuf*[T](result: var T; colorspace: Colorspace; hasAlpha: bool; bitsPerSample: int; + width: int; height: int) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new(colorspace, gboolean(hasAlpha), int32(bitsPerSample), int32(width), int32(height)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_bytes*(data: ptr glib.Bytes00; colorspace: Colorspace; hasAlpha: gboolean; + bitsPerSample: int32; width: int32; height: int32; rowstride: int32): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_bytes", libprag.} + +proc newPixbufFromBytes*(data: glib.Bytes; colorspace: Colorspace; hasAlpha: bool; + bitsPerSample: int; width: int; height: int; rowstride: int): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_bytes(cast[ptr glib.Bytes00](data.impl), colorspace, gboolean(hasAlpha), int32(bitsPerSample), int32(width), int32(height), int32(rowstride)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromBytes*[T](result: var T; data: glib.Bytes; colorspace: Colorspace; hasAlpha: bool; + bitsPerSample: int; width: int; height: int; rowstride: int) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_bytes(cast[ptr glib.Bytes00](data.impl), colorspace, gboolean(hasAlpha), int32(bitsPerSample), int32(width), int32(height), int32(rowstride)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_file*(filename: cstring): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_file", libprag.} + +proc newPixbufFromFile*(filename: string): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_file(cstring(filename)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromFile*[T](result: var T; filename: string) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_file(cstring(filename)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_file_at_scale*(filename: cstring; width: int32; height: int32; preserveAspectRatio: gboolean): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_file_at_scale", libprag.} + +proc newPixbufFromFileAtScale*(filename: string; width: int; height: int; preserveAspectRatio: bool): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_file_at_scale(cstring(filename), int32(width), int32(height), gboolean(preserveAspectRatio)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromFileAtScale*[T](result: var T; filename: string; width: int; height: int; preserveAspectRatio: bool) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_file_at_scale(cstring(filename), int32(width), int32(height), gboolean(preserveAspectRatio)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_file_at_size*(filename: cstring; width: int32; height: int32): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_file_at_size", libprag.} + +proc newPixbufFromFileAtSize*(filename: string; width: int; height: int): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_file_at_size(cstring(filename), int32(width), int32(height)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromFileAtSize*[T](result: var T; filename: string; width: int; height: int) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_file_at_size(cstring(filename), int32(width), int32(height)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_inline*(dataLength: int32; data: uint8Array; copyPixels: gboolean): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_inline", libprag.} + +proc newPixbufFromInline*(dataLength: int; data: uint8Array; copyPixels: bool): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_inline(int32(dataLength), data, gboolean(copyPixels)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromInline*[T](result: var T; dataLength: int; data: uint8Array; copyPixels: bool) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_inline(int32(dataLength), data, gboolean(copyPixels)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_resource*(resourcePath: cstring): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_resource", libprag.} + +proc newPixbufFromResource*(resourcePath: string): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_resource(cstring(resourcePath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromResource*[T](result: var T; resourcePath: string) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_resource(cstring(resourcePath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_resource_at_scale*(resourcePath: cstring; width: int32; height: int32; + preserveAspectRatio: gboolean): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_resource_at_scale", libprag.} + +proc newPixbufFromResourceAtScale*(resourcePath: string; width: int; height: int; preserveAspectRatio: bool): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_resource_at_scale(cstring(resourcePath), int32(width), int32(height), gboolean(preserveAspectRatio)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromResourceAtScale*[T](result: var T; resourcePath: string; width: int; height: int; preserveAspectRatio: bool) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_resource_at_scale(cstring(resourcePath), int32(width), int32(height), gboolean(preserveAspectRatio)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_stream*(stream: ptr gio.InputStream00; cancellable: ptr gio.Cancellable00): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_stream", libprag.} + +proc newPixbufFromStream*(stream: gio.InputStream; cancellable: gio.Cancellable): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_stream(cast[ptr gio.InputStream00](stream.impl), cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromStream*[T](result: var T; stream: gio.InputStream; cancellable: gio.Cancellable) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_stream(cast[ptr gio.InputStream00](stream.impl), cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_stream_at_scale*(stream: ptr gio.InputStream00; width: int32; height: int32; + preserveAspectRatio: gboolean; cancellable: ptr gio.Cancellable00): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_stream_at_scale", libprag.} + +proc newPixbufFromStreamAtScale*(stream: gio.InputStream; width: int; height: int; + preserveAspectRatio: bool; cancellable: gio.Cancellable): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_stream_at_scale(cast[ptr gio.InputStream00](stream.impl), int32(width), int32(height), gboolean(preserveAspectRatio), cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromStreamAtScale*[T](result: var T; stream: gio.InputStream; width: int; height: int; + preserveAspectRatio: bool; cancellable: gio.Cancellable) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_stream_at_scale(cast[ptr gio.InputStream00](stream.impl), int32(width), int32(height), gboolean(preserveAspectRatio), cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_stream_finish*(asyncResult: ptr gio.AsyncResult00): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_stream_finish", libprag.} + +proc newPixbufFromStreamFinish*(asyncResult: gio.AsyncResult): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_stream_finish(cast[ptr gio.AsyncResult00](asyncResult.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromStreamFinish*[T](result: var T; asyncResult: gio.AsyncResult) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_stream_finish(cast[ptr gio.AsyncResult00](asyncResult.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_new_from_xpm_data*(data: cstringArray): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_xpm_data", libprag.} + +proc newPixbufFromXpmData*(data: cstringArray): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_xpm_data(data) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromXpmData*[T](result: var T; data: cstringArray) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_xpm_data(data) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_get_file_info_async*(filename: cstring; cancellable: ptr gio.Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "gdk_pixbuf_get_file_info_async", libprag.} + +proc getFileInfoAsync*(filename: string; cancellable: gio.Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + gdk_pixbuf_get_file_info_async(cstring(filename), cast[ptr gio.Cancellable00](cancellable.impl), callback, userData) + +proc fileInfoAsync*(filename: string; cancellable: gio.Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + gdk_pixbuf_get_file_info_async(cstring(filename), cast[ptr gio.Cancellable00](cancellable.impl), callback, userData) + +proc gdk_pixbuf_get_formats*(): ptr pointer {. + importc: "gdk_pixbuf_get_formats", libprag.} + +proc getFormats*(): ptr pointer {. + importc: "gdk_pixbuf_get_formats", libprag.} + +proc formats*(): ptr pointer {. + importc: "gdk_pixbuf_get_formats", libprag.} + +proc gdk_pixbuf_new_from_stream_async*(stream: ptr gio.InputStream00; cancellable: ptr gio.Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "gdk_pixbuf_new_from_stream_async", libprag.} + +proc newFromStreamAsync*(stream: gio.InputStream; cancellable: gio.Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + gdk_pixbuf_new_from_stream_async(cast[ptr gio.InputStream00](stream.impl), cast[ptr gio.Cancellable00](cancellable.impl), callback, userData) + +proc gdk_pixbuf_new_from_stream_at_scale_async*(stream: ptr gio.InputStream00; width: int32; height: int32; + preserveAspectRatio: gboolean; cancellable: ptr gio.Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "gdk_pixbuf_new_from_stream_at_scale_async", libprag.} + +proc newFromStreamAtScaleAsync*(stream: gio.InputStream; width: int; height: int; + preserveAspectRatio: bool; cancellable: gio.Cancellable; callback: AsyncReadyCallback; userData: pointer) = + gdk_pixbuf_new_from_stream_at_scale_async(cast[ptr gio.InputStream00](stream.impl), int32(width), int32(height), gboolean(preserveAspectRatio), cast[ptr gio.Cancellable00](cancellable.impl), callback, userData) + +proc gdk_pixbuf_save_to_stream_finish*(asyncResult: ptr gio.AsyncResult00): gboolean {. + importc: "gdk_pixbuf_save_to_stream_finish", libprag.} + +proc saveToStreamFinish*(asyncResult: gio.AsyncResult): bool = + toBool(gdk_pixbuf_save_to_stream_finish(cast[ptr gio.AsyncResult00](asyncResult.impl))) + +proc gdk_pixbuf_add_alpha*(self: ptr Pixbuf00; substituteColor: gboolean; r: uint8; + g: uint8; b: uint8): ptr Pixbuf00 {. + importc: "gdk_pixbuf_add_alpha", libprag.} + +proc addAlpha*(self: Pixbuf; substituteColor: bool; r: uint8; g: uint8; + b: uint8): Pixbuf = + let gobj = gdk_pixbuf_add_alpha(cast[ptr Pixbuf00](self.impl), gboolean(substituteColor), r, g, b) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_apply_embedded_orientation*(self: ptr Pixbuf00): ptr Pixbuf00 {. + importc: "gdk_pixbuf_apply_embedded_orientation", libprag.} + +proc applyEmbeddedOrientation*(self: Pixbuf): Pixbuf = + let gobj = gdk_pixbuf_apply_embedded_orientation(cast[ptr Pixbuf00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_composite*(self: ptr Pixbuf00; dest: ptr Pixbuf00; destX: int32; + destY: int32; destWidth: int32; destHeight: int32; offsetX: cdouble; offsetY: cdouble; scaleX: cdouble; + scaleY: cdouble; interpType: InterpType; overallAlpha: int32) {. + importc: "gdk_pixbuf_composite", libprag.} + +proc composite*(self: Pixbuf; dest: Pixbuf; destX: int; destY: int; + destWidth: int; destHeight: int; offsetX: cdouble; offsetY: cdouble; scaleX: cdouble; scaleY: cdouble; + interpType: InterpType; overallAlpha: int) = + gdk_pixbuf_composite(cast[ptr Pixbuf00](self.impl), cast[ptr Pixbuf00](dest.impl), int32(destX), int32(destY), int32(destWidth), int32(destHeight), offsetX, offsetY, scaleX, scaleY, interpType, int32(overallAlpha)) + +proc gdk_pixbuf_composite_color*(self: ptr Pixbuf00; dest: ptr Pixbuf00; destX: int32; + destY: int32; destWidth: int32; destHeight: int32; offsetX: cdouble; offsetY: cdouble; scaleX: cdouble; + scaleY: cdouble; interpType: InterpType; overallAlpha: int32; checkX: int32; checkY: int32; checkSize: int32; color1: uint32; color2: uint32) {. + importc: "gdk_pixbuf_composite_color", libprag.} + +proc compositeColor*(self: Pixbuf; dest: Pixbuf; destX: int; destY: int; + destWidth: int; destHeight: int; offsetX: cdouble; offsetY: cdouble; scaleX: cdouble; scaleY: cdouble; + interpType: InterpType; overallAlpha: int; checkX: int; checkY: int; checkSize: int; color1: int; color2: int) = + gdk_pixbuf_composite_color(cast[ptr Pixbuf00](self.impl), cast[ptr Pixbuf00](dest.impl), int32(destX), int32(destY), int32(destWidth), int32(destHeight), offsetX, offsetY, scaleX, scaleY, interpType, int32(overallAlpha), int32(checkX), int32(checkY), int32(checkSize), uint32(color1), uint32(color2)) + +proc gdk_pixbuf_composite_color_simple*(self: ptr Pixbuf00; destWidth: int32; destHeight: int32; + interpType: InterpType; overallAlpha: int32; checkSize: int32; color1: uint32; color2: uint32): ptr Pixbuf00 {. + importc: "gdk_pixbuf_composite_color_simple", libprag.} + +proc compositeColorSimple*(self: Pixbuf; destWidth: int; destHeight: int; interpType: InterpType; + overallAlpha: int; checkSize: int; color1: int; color2: int): Pixbuf = + let gobj = gdk_pixbuf_composite_color_simple(cast[ptr Pixbuf00](self.impl), int32(destWidth), int32(destHeight), interpType, int32(overallAlpha), int32(checkSize), uint32(color1), uint32(color2)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_copy*(self: ptr Pixbuf00): ptr Pixbuf00 {. + importc: "gdk_pixbuf_copy", libprag.} + +proc copy*(self: Pixbuf): Pixbuf = + let gobj = gdk_pixbuf_copy(cast[ptr Pixbuf00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_copy_area*(self: ptr Pixbuf00; srcX: int32; srcY: int32; width: int32; + height: int32; destPixbuf: ptr Pixbuf00; destX: int32; destY: int32) {. + importc: "gdk_pixbuf_copy_area", libprag.} + +proc copyArea*(self: Pixbuf; srcX: int; srcY: int; width: int; height: int; + destPixbuf: Pixbuf; destX: int; destY: int) = + gdk_pixbuf_copy_area(cast[ptr Pixbuf00](self.impl), int32(srcX), int32(srcY), int32(width), int32(height), cast[ptr Pixbuf00](destPixbuf.impl), int32(destX), int32(destY)) + +proc gdk_pixbuf_copy_options*(self: ptr Pixbuf00; destPixbuf: ptr Pixbuf00): gboolean {. + importc: "gdk_pixbuf_copy_options", libprag.} + +proc copyOptions*(self: Pixbuf; destPixbuf: Pixbuf): bool = + toBool(gdk_pixbuf_copy_options(cast[ptr Pixbuf00](self.impl), cast[ptr Pixbuf00](destPixbuf.impl))) + +proc gdk_pixbuf_fill*(self: ptr Pixbuf00; pixel: uint32) {. + importc: "gdk_pixbuf_fill", libprag.} + +proc fill*(self: Pixbuf; pixel: int) = + gdk_pixbuf_fill(cast[ptr Pixbuf00](self.impl), uint32(pixel)) + +proc gdk_pixbuf_flip*(self: ptr Pixbuf00; horizontal: gboolean): ptr Pixbuf00 {. + importc: "gdk_pixbuf_flip", libprag.} + +proc flip*(self: Pixbuf; horizontal: bool): Pixbuf = + let gobj = gdk_pixbuf_flip(cast[ptr Pixbuf00](self.impl), gboolean(horizontal)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_get_bits_per_sample*(self: ptr Pixbuf00): int32 {. + importc: "gdk_pixbuf_get_bits_per_sample", libprag.} + +proc getBitsPerSample*(self: Pixbuf): int = + int(gdk_pixbuf_get_bits_per_sample(cast[ptr Pixbuf00](self.impl))) + +proc bitsPerSample*(self: Pixbuf): int = + int(gdk_pixbuf_get_bits_per_sample(cast[ptr Pixbuf00](self.impl))) + +proc gdk_pixbuf_get_byte_length*(self: ptr Pixbuf00): uint64 {. + importc: "gdk_pixbuf_get_byte_length", libprag.} + +proc getByteLength*(self: Pixbuf): uint64 = + gdk_pixbuf_get_byte_length(cast[ptr Pixbuf00](self.impl)) + +proc byteLength*(self: Pixbuf): uint64 = + gdk_pixbuf_get_byte_length(cast[ptr Pixbuf00](self.impl)) + +proc gdk_pixbuf_get_colorspace*(self: ptr Pixbuf00): Colorspace {. + importc: "gdk_pixbuf_get_colorspace", libprag.} + +proc getColorspace*(self: Pixbuf): Colorspace = + gdk_pixbuf_get_colorspace(cast[ptr Pixbuf00](self.impl)) + +proc colorspace*(self: Pixbuf): Colorspace = + gdk_pixbuf_get_colorspace(cast[ptr Pixbuf00](self.impl)) + +proc gdk_pixbuf_get_has_alpha*(self: ptr Pixbuf00): gboolean {. + importc: "gdk_pixbuf_get_has_alpha", libprag.} + +proc getHasAlpha*(self: Pixbuf): bool = + toBool(gdk_pixbuf_get_has_alpha(cast[ptr Pixbuf00](self.impl))) + +proc hasAlpha*(self: Pixbuf): bool = + toBool(gdk_pixbuf_get_has_alpha(cast[ptr Pixbuf00](self.impl))) + +proc gdk_pixbuf_get_height*(self: ptr Pixbuf00): int32 {. + importc: "gdk_pixbuf_get_height", libprag.} + +proc getHeight*(self: Pixbuf): int = + int(gdk_pixbuf_get_height(cast[ptr Pixbuf00](self.impl))) + +proc height*(self: Pixbuf): int = + int(gdk_pixbuf_get_height(cast[ptr Pixbuf00](self.impl))) + +proc gdk_pixbuf_get_n_channels*(self: ptr Pixbuf00): int32 {. + importc: "gdk_pixbuf_get_n_channels", libprag.} + +proc getNChannels*(self: Pixbuf): int = + int(gdk_pixbuf_get_n_channels(cast[ptr Pixbuf00](self.impl))) + +proc nChannels*(self: Pixbuf): int = + int(gdk_pixbuf_get_n_channels(cast[ptr Pixbuf00](self.impl))) + +proc gdk_pixbuf_get_option*(self: ptr Pixbuf00; key: cstring): cstring {. + importc: "gdk_pixbuf_get_option", libprag.} + +proc getOption*(self: Pixbuf; key: string): string = + let resul0 = gdk_pixbuf_get_option(cast[ptr Pixbuf00](self.impl), cstring(key)) + result = $resul0 + +proc option*(self: Pixbuf; key: string): string = + let resul0 = gdk_pixbuf_get_option(cast[ptr Pixbuf00](self.impl), cstring(key)) + result = $resul0 + +proc gdk_pixbuf_get_options*(self: ptr Pixbuf00): ptr HashTable00 {. + importc: "gdk_pixbuf_get_options", libprag.} + +proc getOptions*(self: Pixbuf): ptr HashTable00 = + gdk_pixbuf_get_options(cast[ptr Pixbuf00](self.impl)) + +proc options*(self: Pixbuf): ptr HashTable00 = + gdk_pixbuf_get_options(cast[ptr Pixbuf00](self.impl)) + +proc gdk_pixbuf_get_pixels_with_length*(self: ptr Pixbuf00; length: var uint32): uint8Array {. + importc: "gdk_pixbuf_get_pixels_with_length", libprag.} + +proc getPixels*(self: Pixbuf; length: var int): uint8Array = + var length_00 = uint32(length) + result = gdk_pixbuf_get_pixels_with_length(cast[ptr Pixbuf00](self.impl), length_00) + length = int(length_00) + +proc pixels*(self: Pixbuf; length: var int): uint8Array = + var length_00 = uint32(length) + result = gdk_pixbuf_get_pixels_with_length(cast[ptr Pixbuf00](self.impl), length_00) + length = int(length_00) + +proc gdk_pixbuf_get_rowstride*(self: ptr Pixbuf00): int32 {. + importc: "gdk_pixbuf_get_rowstride", libprag.} + +proc getRowstride*(self: Pixbuf): int = + int(gdk_pixbuf_get_rowstride(cast[ptr Pixbuf00](self.impl))) + +proc rowstride*(self: Pixbuf): int = + int(gdk_pixbuf_get_rowstride(cast[ptr Pixbuf00](self.impl))) + +proc gdk_pixbuf_get_width*(self: ptr Pixbuf00): int32 {. + importc: "gdk_pixbuf_get_width", libprag.} + +proc getWidth*(self: Pixbuf): int = + int(gdk_pixbuf_get_width(cast[ptr Pixbuf00](self.impl))) + +proc width*(self: Pixbuf): int = + int(gdk_pixbuf_get_width(cast[ptr Pixbuf00](self.impl))) + +proc gdk_pixbuf_new_subpixbuf*(self: ptr Pixbuf00; srcX: int32; srcY: int32; width: int32; + height: int32): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_subpixbuf", libprag.} + +proc newPixbufSubpixbuf*(self: Pixbuf; srcX: int; srcY: int; width: int; height: int): Pixbuf = + let gobj = gdk_pixbuf_new_subpixbuf(cast[ptr Pixbuf00](self.impl), int32(srcX), int32(srcY), int32(width), int32(height)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_read_pixel_bytes*(self: ptr Pixbuf00): ptr glib.Bytes00 {. + importc: "gdk_pixbuf_read_pixel_bytes", libprag.} + +proc readPixelBytes*(self: Pixbuf): glib.Bytes = + new(result) + result.impl = gdk_pixbuf_read_pixel_bytes(cast[ptr Pixbuf00](self.impl)) + +proc gdk_pixbuf_read_pixels*(self: ptr Pixbuf00): ptr uint8 {. + importc: "gdk_pixbuf_read_pixels", libprag.} + +proc readPixels*(self: Pixbuf): ptr uint8 = + gdk_pixbuf_read_pixels(cast[ptr Pixbuf00](self.impl)) + +proc gdk_pixbuf_remove_option*(self: ptr Pixbuf00; key: cstring): gboolean {. + importc: "gdk_pixbuf_remove_option", libprag.} + +proc removeOption*(self: Pixbuf; key: string): bool = + toBool(gdk_pixbuf_remove_option(cast[ptr Pixbuf00](self.impl), cstring(key))) + +proc gdk_pixbuf_saturate_and_pixelate*(self: ptr Pixbuf00; dest: ptr Pixbuf00; saturation: cfloat; + pixelate: gboolean) {. + importc: "gdk_pixbuf_saturate_and_pixelate", libprag.} + +proc saturateAndPixelate*(self: Pixbuf; dest: Pixbuf; saturation: cfloat; pixelate: bool) = + gdk_pixbuf_saturate_and_pixelate(cast[ptr Pixbuf00](self.impl), cast[ptr Pixbuf00](dest.impl), saturation, gboolean(pixelate)) + +proc gdk_pixbuf_save_to_bufferv*(self: ptr Pixbuf00; buffer: var uint8Array; bufferSize: var uint64; + `type`: cstring; optionKeys: cstringArray; optionValues: cstringArray): gboolean {. + importc: "gdk_pixbuf_save_to_bufferv", libprag.} + +proc saveToBufferv*(self: Pixbuf; buffer: var uint8Array; bufferSize: var uint64; + `type`: string; optionKeys: cstringArray; optionValues: cstringArray): bool = + toBool(gdk_pixbuf_save_to_bufferv(cast[ptr Pixbuf00](self.impl), buffer, bufferSize, cstring(`type`), optionKeys, optionValues)) + +proc gdk_pixbuf_save_to_streamv*(self: ptr Pixbuf00; stream: ptr gio.OutputStream00; + `type`: cstring; optionKeys: cstringArray; optionValues: cstringArray; cancellable: ptr gio.Cancellable00): gboolean {. + importc: "gdk_pixbuf_save_to_streamv", libprag.} + +proc saveToStreamv*(self: Pixbuf; stream: gio.OutputStream; `type`: string; + optionKeys: cstringArray; optionValues: cstringArray; cancellable: gio.Cancellable): bool = + toBool(gdk_pixbuf_save_to_streamv(cast[ptr Pixbuf00](self.impl), cast[ptr gio.OutputStream00](stream.impl), cstring(`type`), optionKeys, optionValues, cast[ptr gio.Cancellable00](cancellable.impl))) + +proc gdk_pixbuf_save_to_streamv_async*(self: ptr Pixbuf00; stream: ptr gio.OutputStream00; + `type`: cstring; optionKeys: cstringArray; optionValues: cstringArray; cancellable: ptr gio.Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "gdk_pixbuf_save_to_streamv_async", libprag.} + +proc saveToStreamvAsync*(self: Pixbuf; stream: gio.OutputStream; `type`: string; + optionKeys: cstringArray; optionValues: cstringArray; cancellable: gio.Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + gdk_pixbuf_save_to_streamv_async(cast[ptr Pixbuf00](self.impl), cast[ptr gio.OutputStream00](stream.impl), cstring(`type`), optionKeys, optionValues, cast[ptr gio.Cancellable00](cancellable.impl), callback, userData) + +proc gdk_pixbuf_savev*(self: ptr Pixbuf00; filename: cstring; `type`: cstring; + optionKeys: cstringArray; optionValues: cstringArray): gboolean {. + importc: "gdk_pixbuf_savev", libprag.} + +proc savev*(self: Pixbuf; filename: string; `type`: string; optionKeys: cstringArray; + optionValues: cstringArray): bool = + toBool(gdk_pixbuf_savev(cast[ptr Pixbuf00](self.impl), cstring(filename), cstring(`type`), optionKeys, optionValues)) + +proc gdk_pixbuf_scale*(self: ptr Pixbuf00; dest: ptr Pixbuf00; destX: int32; + destY: int32; destWidth: int32; destHeight: int32; offsetX: cdouble; offsetY: cdouble; scaleX: cdouble; + scaleY: cdouble; interpType: InterpType) {. + importc: "gdk_pixbuf_scale", libprag.} + +proc scale*(self: Pixbuf; dest: Pixbuf; destX: int; destY: int; + destWidth: int; destHeight: int; offsetX: cdouble; offsetY: cdouble; scaleX: cdouble; scaleY: cdouble; + interpType: InterpType) = + gdk_pixbuf_scale(cast[ptr Pixbuf00](self.impl), cast[ptr Pixbuf00](dest.impl), int32(destX), int32(destY), int32(destWidth), int32(destHeight), offsetX, offsetY, scaleX, scaleY, interpType) + +proc gdk_pixbuf_scale_simple*(self: ptr Pixbuf00; destWidth: int32; destHeight: int32; + interpType: InterpType): ptr Pixbuf00 {. + importc: "gdk_pixbuf_scale_simple", libprag.} + +proc scaleSimple*(self: Pixbuf; destWidth: int; destHeight: int; interpType: InterpType): Pixbuf = + let gobj = gdk_pixbuf_scale_simple(cast[ptr Pixbuf00](self.impl), int32(destWidth), int32(destHeight), interpType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_set_option*(self: ptr Pixbuf00; key: cstring; value: cstring): gboolean {. + importc: "gdk_pixbuf_set_option", libprag.} + +proc setOption*(self: Pixbuf; key: string; value: string): bool = + toBool(gdk_pixbuf_set_option(cast[ptr Pixbuf00](self.impl), cstring(key), cstring(value))) + +type + Pixdata00* {.pure.} = object + magic*: uint32 + length*: int32 + pixdataType*: uint32 + rowstride*: uint32 + width*: uint32 + height*: uint32 + pixelData*: uint8Array + Pixdata* = ref object + impl*: ptr Pixdata00 + +proc gdk_pixdata_deserialize*(self: ptr Pixdata00; streamLength: uint32; stream: uint8Array): gboolean {. + importc: "gdk_pixdata_deserialize", libprag.} + +proc deserialize*(self: Pixdata; streamLength: int; stream: uint8Array): bool = + toBool(gdk_pixdata_deserialize(cast[ptr Pixdata00](self.impl), uint32(streamLength), stream)) + +proc gdk_pixdata_serialize*(self: ptr Pixdata00; streamLengthP: var uint32): uint8Array {. + importc: "gdk_pixdata_serialize", libprag.} + +proc serialize*(self: Pixdata; streamLengthP: var int): uint8Array = + var streamLengthP_00 = uint32(streamLengthP) + result = gdk_pixdata_serialize(cast[ptr Pixdata00](self.impl), streamLengthP_00) + streamLengthP = int(streamLengthP_00) + +proc gdk_pixbuf_from_pixdata*(pixdata: ptr Pixdata00; copyPixels: gboolean): ptr Pixbuf00 {. + importc: "gdk_pixbuf_from_pixdata", libprag.} + +proc fromPixdata*(pixdata: Pixdata; copyPixels: bool): Pixbuf = + let gobj = gdk_pixbuf_from_pixdata(cast[ptr Pixdata00](pixdata.impl), gboolean(copyPixels)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PixdataDumpType* {.size: sizeof(cint), pure.} = enum + gtypes = 0 + pixdataStruct = 1 + macros = 2 + ctypes = 256 + `static` = 512 + `const` = 1024 + rleDecoder = 65536 + +const + PixdataDumpTypePixdataStream* = PixdataDumpType.gtypes + +proc gdk_pixdata_to_csource*(self: ptr Pixdata00; name: cstring; dumpType: PixdataDumpType): ptr glib.String00 {. + importc: "gdk_pixdata_to_csource", libprag.} + +proc toCsource*(self: Pixdata; name: string; dumpType: PixdataDumpType): glib.String = + new(result) + result.impl = gdk_pixdata_to_csource(cast[ptr Pixdata00](self.impl), cstring(name), dumpType) + +type + PixbufFormat00* {.pure.} = object + PixbufFormat* = ref object + impl*: ptr PixbufFormat00 + +proc gdk_pixbuf_format_copy*(self: ptr PixbufFormat00): ptr PixbufFormat00 {. + importc: "gdk_pixbuf_format_copy", libprag.} + +proc copy*(self: PixbufFormat): PixbufFormat = + new(result) + result.impl = gdk_pixbuf_format_copy(cast[ptr PixbufFormat00](self.impl)) + +proc gdk_pixbuf_format_free*(self: ptr PixbufFormat00) {. + importc: "gdk_pixbuf_format_free", libprag.} + +proc free*(self: PixbufFormat) = + gdk_pixbuf_format_free(cast[ptr PixbufFormat00](self.impl)) + +proc gdk_pixbuf_format_get_description*(self: ptr PixbufFormat00): cstring {. + importc: "gdk_pixbuf_format_get_description", libprag.} + +proc getDescription*(self: PixbufFormat): string = + let resul0 = gdk_pixbuf_format_get_description(cast[ptr PixbufFormat00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc description*(self: PixbufFormat): string = + let resul0 = gdk_pixbuf_format_get_description(cast[ptr PixbufFormat00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gdk_pixbuf_format_get_extensions*(self: ptr PixbufFormat00): cstringArray {. + importc: "gdk_pixbuf_format_get_extensions", libprag.} + +proc getExtensions*(self: PixbufFormat): cstringArray = + gdk_pixbuf_format_get_extensions(cast[ptr PixbufFormat00](self.impl)) + +proc extensions*(self: PixbufFormat): cstringArray = + gdk_pixbuf_format_get_extensions(cast[ptr PixbufFormat00](self.impl)) + +proc gdk_pixbuf_format_get_license*(self: ptr PixbufFormat00): cstring {. + importc: "gdk_pixbuf_format_get_license", libprag.} + +proc getLicense*(self: PixbufFormat): string = + let resul0 = gdk_pixbuf_format_get_license(cast[ptr PixbufFormat00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc license*(self: PixbufFormat): string = + let resul0 = gdk_pixbuf_format_get_license(cast[ptr PixbufFormat00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gdk_pixbuf_format_get_mime_types*(self: ptr PixbufFormat00): cstringArray {. + importc: "gdk_pixbuf_format_get_mime_types", libprag.} + +proc getMimeTypes*(self: PixbufFormat): cstringArray = + gdk_pixbuf_format_get_mime_types(cast[ptr PixbufFormat00](self.impl)) + +proc mimeTypes*(self: PixbufFormat): cstringArray = + gdk_pixbuf_format_get_mime_types(cast[ptr PixbufFormat00](self.impl)) + +proc gdk_pixbuf_format_get_name*(self: ptr PixbufFormat00): cstring {. + importc: "gdk_pixbuf_format_get_name", libprag.} + +proc getName*(self: PixbufFormat): string = + let resul0 = gdk_pixbuf_format_get_name(cast[ptr PixbufFormat00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc name*(self: PixbufFormat): string = + let resul0 = gdk_pixbuf_format_get_name(cast[ptr PixbufFormat00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gdk_pixbuf_format_is_disabled*(self: ptr PixbufFormat00): gboolean {. + importc: "gdk_pixbuf_format_is_disabled", libprag.} + +proc isDisabled*(self: PixbufFormat): bool = + toBool(gdk_pixbuf_format_is_disabled(cast[ptr PixbufFormat00](self.impl))) + +proc gdk_pixbuf_format_is_save_option_supported*(self: ptr PixbufFormat00; optionKey: cstring): gboolean {. + importc: "gdk_pixbuf_format_is_save_option_supported", libprag.} + +proc isSaveOptionSupported*(self: PixbufFormat; optionKey: string): bool = + toBool(gdk_pixbuf_format_is_save_option_supported(cast[ptr PixbufFormat00](self.impl), cstring(optionKey))) + +proc gdk_pixbuf_format_is_scalable*(self: ptr PixbufFormat00): gboolean {. + importc: "gdk_pixbuf_format_is_scalable", libprag.} + +proc isScalable*(self: PixbufFormat): bool = + toBool(gdk_pixbuf_format_is_scalable(cast[ptr PixbufFormat00](self.impl))) + +proc gdk_pixbuf_format_is_writable*(self: ptr PixbufFormat00): gboolean {. + importc: "gdk_pixbuf_format_is_writable", libprag.} + +proc isWritable*(self: PixbufFormat): bool = + toBool(gdk_pixbuf_format_is_writable(cast[ptr PixbufFormat00](self.impl))) + +proc gdk_pixbuf_format_set_disabled*(self: ptr PixbufFormat00; disabled: gboolean) {. + importc: "gdk_pixbuf_format_set_disabled", libprag.} + +proc setDisabled*(self: PixbufFormat; disabled: bool) = + gdk_pixbuf_format_set_disabled(cast[ptr PixbufFormat00](self.impl), gboolean(disabled)) + +proc `disabled=`*(self: PixbufFormat; disabled: bool) = + gdk_pixbuf_format_set_disabled(cast[ptr PixbufFormat00](self.impl), gboolean(disabled)) + +proc gdk_pixbuf_get_file_info*(filename: cstring; width: var int32; height: var int32): ptr PixbufFormat00 {. + importc: "gdk_pixbuf_get_file_info", libprag.} + +proc getFileInfo*(filename: string; width: var int; height: var int): PixbufFormat = + var height_00 = int32(height) + var width_00 = int32(width) + new(result) + result.impl = gdk_pixbuf_get_file_info(cstring(filename), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc fileInfo*(filename: string; width: var int; height: var int): PixbufFormat = + var height_00 = int32(height) + var width_00 = int32(width) + new(result) + result.impl = gdk_pixbuf_get_file_info(cstring(filename), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc gdk_pixbuf_get_file_info_finish*(asyncResult: ptr gio.AsyncResult00; width: var int32; + height: var int32): ptr PixbufFormat00 {. + importc: "gdk_pixbuf_get_file_info_finish", libprag.} + +proc getFileInfoFinish*(asyncResult: gio.AsyncResult; width: var int; height: var int): PixbufFormat = + var height_00 = int32(height) + var width_00 = int32(width) + new(result) + result.impl = gdk_pixbuf_get_file_info_finish(cast[ptr gio.AsyncResult00](asyncResult.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc fileInfoFinish*(asyncResult: gio.AsyncResult; width: var int; height: var int): PixbufFormat = + var height_00 = int32(height) + var width_00 = int32(width) + new(result) + result.impl = gdk_pixbuf_get_file_info_finish(cast[ptr gio.AsyncResult00](asyncResult.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +type + PixbufRotation* {.size: sizeof(cint), pure.} = enum + none = 0 + counterclockwise = 90 + upsidedown = 180 + clockwise = 270 + +proc gdk_pixbuf_rotate_simple*(self: ptr Pixbuf00; angle: PixbufRotation): ptr Pixbuf00 {. + importc: "gdk_pixbuf_rotate_simple", libprag.} + +proc rotateSimple*(self: Pixbuf; angle: PixbufRotation): Pixbuf = + let gobj = gdk_pixbuf_rotate_simple(cast[ptr Pixbuf00](self.impl), angle) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PixbufAlphaMode* {.size: sizeof(cint), pure.} = enum + bilevel = 0 + full = 1 + +type + PixbufAnimation* = ref object of gobject.Object + PixbufAnimation00* = object of gobject.Object00 + +proc gdk_pixbuf_animation_new_from_file*(filename: cstring): ptr PixbufAnimation00 {. + importc: "gdk_pixbuf_animation_new_from_file", libprag.} + +proc newPixbufAnimationFromFile*(filename: string): PixbufAnimation = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_animation_new_from_file(cstring(filename)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufAnimationFromFile*[T](result: var T; filename: string) = + assert(result is PixbufAnimation) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_animation_new_from_file(cstring(filename)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_animation_new_from_resource*(resourcePath: cstring): ptr PixbufAnimation00 {. + importc: "gdk_pixbuf_animation_new_from_resource", libprag.} + +proc newPixbufAnimationFromResource*(resourcePath: string): PixbufAnimation = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_animation_new_from_resource(cstring(resourcePath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufAnimationFromResource*[T](result: var T; resourcePath: string) = + assert(result is PixbufAnimation) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_animation_new_from_resource(cstring(resourcePath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_animation_new_from_stream*(stream: ptr gio.InputStream00; cancellable: ptr gio.Cancellable00): ptr PixbufAnimation00 {. + importc: "gdk_pixbuf_animation_new_from_stream", libprag.} + +proc newPixbufAnimationFromStream*(stream: gio.InputStream; cancellable: gio.Cancellable): PixbufAnimation = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_animation_new_from_stream(cast[ptr gio.InputStream00](stream.impl), cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufAnimationFromStream*[T](result: var T; stream: gio.InputStream; cancellable: gio.Cancellable) = + assert(result is PixbufAnimation) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_animation_new_from_stream(cast[ptr gio.InputStream00](stream.impl), cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_animation_new_from_stream_finish*(asyncResult: ptr gio.AsyncResult00): ptr PixbufAnimation00 {. + importc: "gdk_pixbuf_animation_new_from_stream_finish", libprag.} + +proc newPixbufAnimationFromStreamFinish*(asyncResult: gio.AsyncResult): PixbufAnimation = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_animation_new_from_stream_finish(cast[ptr gio.AsyncResult00](asyncResult.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufAnimationFromStreamFinish*[T](result: var T; asyncResult: gio.AsyncResult) = + assert(result is PixbufAnimation) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_animation_new_from_stream_finish(cast[ptr gio.AsyncResult00](asyncResult.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_animation_new_from_stream_async*(stream: ptr gio.InputStream00; cancellable: ptr gio.Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "gdk_pixbuf_animation_new_from_stream_async", libprag.} + +proc newAnimationFromStreamAsync*(stream: gio.InputStream; cancellable: gio.Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + gdk_pixbuf_animation_new_from_stream_async(cast[ptr gio.InputStream00](stream.impl), cast[ptr gio.Cancellable00](cancellable.impl), callback, userData) + +proc gdk_pixbuf_animation_get_height*(self: ptr PixbufAnimation00): int32 {. + importc: "gdk_pixbuf_animation_get_height", libprag.} + +proc getHeight*(self: PixbufAnimation): int = + int(gdk_pixbuf_animation_get_height(cast[ptr PixbufAnimation00](self.impl))) + +proc height*(self: PixbufAnimation): int = + int(gdk_pixbuf_animation_get_height(cast[ptr PixbufAnimation00](self.impl))) + +proc gdk_pixbuf_animation_get_static_image*(self: ptr PixbufAnimation00): ptr Pixbuf00 {. + importc: "gdk_pixbuf_animation_get_static_image", libprag.} + +proc getStaticImage*(self: PixbufAnimation): Pixbuf = + let gobj = gdk_pixbuf_animation_get_static_image(cast[ptr PixbufAnimation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc staticImage*(self: PixbufAnimation): Pixbuf = + let gobj = gdk_pixbuf_animation_get_static_image(cast[ptr PixbufAnimation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_animation_get_width*(self: ptr PixbufAnimation00): int32 {. + importc: "gdk_pixbuf_animation_get_width", libprag.} + +proc getWidth*(self: PixbufAnimation): int = + int(gdk_pixbuf_animation_get_width(cast[ptr PixbufAnimation00](self.impl))) + +proc width*(self: PixbufAnimation): int = + int(gdk_pixbuf_animation_get_width(cast[ptr PixbufAnimation00](self.impl))) + +proc gdk_pixbuf_animation_is_static_image*(self: ptr PixbufAnimation00): gboolean {. + importc: "gdk_pixbuf_animation_is_static_image", libprag.} + +proc isStaticImage*(self: PixbufAnimation): bool = + toBool(gdk_pixbuf_animation_is_static_image(cast[ptr PixbufAnimation00](self.impl))) + +type + PixbufAnimationIter* = ref object of gobject.Object + PixbufAnimationIter00* = object of gobject.Object00 + +proc gdk_pixbuf_animation_iter_advance*(self: ptr PixbufAnimationIter00; currentTime: ptr glib.TimeVal00): gboolean {. + importc: "gdk_pixbuf_animation_iter_advance", libprag.} + +proc advance*(self: PixbufAnimationIter; currentTime: glib.TimeVal): bool = + toBool(gdk_pixbuf_animation_iter_advance(cast[ptr PixbufAnimationIter00](self.impl), cast[ptr glib.TimeVal00](currentTime.impl))) + +proc gdk_pixbuf_animation_iter_get_delay_time*(self: ptr PixbufAnimationIter00): int32 {. + importc: "gdk_pixbuf_animation_iter_get_delay_time", libprag.} + +proc getDelayTime*(self: PixbufAnimationIter): int = + int(gdk_pixbuf_animation_iter_get_delay_time(cast[ptr PixbufAnimationIter00](self.impl))) + +proc delayTime*(self: PixbufAnimationIter): int = + int(gdk_pixbuf_animation_iter_get_delay_time(cast[ptr PixbufAnimationIter00](self.impl))) + +proc gdk_pixbuf_animation_iter_get_pixbuf*(self: ptr PixbufAnimationIter00): ptr Pixbuf00 {. + importc: "gdk_pixbuf_animation_iter_get_pixbuf", libprag.} + +proc getPixbuf*(self: PixbufAnimationIter): Pixbuf = + let gobj = gdk_pixbuf_animation_iter_get_pixbuf(cast[ptr PixbufAnimationIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbuf*(self: PixbufAnimationIter): Pixbuf = + let gobj = gdk_pixbuf_animation_iter_get_pixbuf(cast[ptr PixbufAnimationIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_animation_iter_on_currently_loading_frame*(self: ptr PixbufAnimationIter00): gboolean {. + importc: "gdk_pixbuf_animation_iter_on_currently_loading_frame", libprag.} + +proc onCurrentlyLoadingFrame*(self: PixbufAnimationIter): bool = + toBool(gdk_pixbuf_animation_iter_on_currently_loading_frame(cast[ptr PixbufAnimationIter00](self.impl))) + +proc gdk_pixbuf_animation_get_iter*(self: ptr PixbufAnimation00; startTime: ptr glib.TimeVal00): ptr PixbufAnimationIter00 {. + importc: "gdk_pixbuf_animation_get_iter", libprag.} + +proc getIter*(self: PixbufAnimation; startTime: glib.TimeVal): PixbufAnimationIter = + let gobj = gdk_pixbuf_animation_get_iter(cast[ptr PixbufAnimation00](self.impl), cast[ptr glib.TimeVal00](startTime.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PixbufAnimationIter](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc iter*(self: PixbufAnimation; startTime: glib.TimeVal): PixbufAnimationIter = + let gobj = gdk_pixbuf_animation_get_iter(cast[ptr PixbufAnimation00](self.impl), cast[ptr glib.TimeVal00](startTime.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PixbufAnimationIter](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PixbufDestroyNotify* = proc (pixels: uint8Array; data: pointer) {.cdecl.} + +proc gdk_pixbuf_new_from_data*(data: uint8Array; colorspace: Colorspace; hasAlpha: gboolean; + bitsPerSample: int32; width: int32; height: int32; rowstride: int32; destroyFn: PixbufDestroyNotify; + destroyFnData: pointer): ptr Pixbuf00 {. + importc: "gdk_pixbuf_new_from_data", libprag.} + +proc newPixbufFromData*(data: uint8Array; colorspace: Colorspace; hasAlpha: bool; + bitsPerSample: int; width: int; height: int; rowstride: int; destroyFn: PixbufDestroyNotify; + destroyFnData: pointer): Pixbuf = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_data(data, colorspace, gboolean(hasAlpha), int32(bitsPerSample), int32(width), int32(height), int32(rowstride), destroyFn, destroyFnData) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufFromData*[T](result: var T; data: uint8Array; colorspace: Colorspace; hasAlpha: bool; + bitsPerSample: int; width: int; height: int; rowstride: int; destroyFn: PixbufDestroyNotify; + destroyFnData: pointer) = + assert(result is Pixbuf) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_new_from_data(data, colorspace, gboolean(hasAlpha), int32(bitsPerSample), int32(width), int32(height), int32(rowstride), destroyFn, destroyFnData) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PixbufError* {.size: sizeof(cint), pure.} = enum + corruptImage = 0 + insufficientMemory = 1 + badOption = 2 + unknownType = 3 + unsupportedOperation = 4 + failed = 5 + incompleteAnimation = 6 + +proc gdk_pixbuf_error_quark*(): uint32 {. + importc: "gdk_pixbuf_error_quark", libprag.} + +type + PixbufLoader* = ref object of gobject.Object + PixbufLoader00* = object of gobject.Object00 + priv1: pointer + +proc scAreaPrepared*(self: PixbufLoader; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "area-prepared", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scAreaUpdated*(self: PixbufLoader; p: proc (self: ptr gobject.Object00; x: int32; y: int32; width: int32; height: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "area-updated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scClosed*(self: PixbufLoader; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "closed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSizePrepared*(self: PixbufLoader; p: proc (self: ptr gobject.Object00; width: int32; height: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "size-prepared", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gdk_pixbuf_loader_new*(): ptr PixbufLoader00 {. + importc: "gdk_pixbuf_loader_new", libprag.} + +proc newPixbufLoader*(): PixbufLoader = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_loader_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufLoader*[T](result: var T) = + assert(result is PixbufLoader) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_loader_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_loader_new_with_mime_type*(mimeType: cstring): ptr PixbufLoader00 {. + importc: "gdk_pixbuf_loader_new_with_mime_type", libprag.} + +proc newPixbufLoaderWithMimeType*(mimeType: string): PixbufLoader = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_loader_new_with_mime_type(cstring(mimeType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufLoaderWithMimeType*[T](result: var T; mimeType: string) = + assert(result is PixbufLoader) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_loader_new_with_mime_type(cstring(mimeType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_loader_new_with_type*(imageType: cstring): ptr PixbufLoader00 {. + importc: "gdk_pixbuf_loader_new_with_type", libprag.} + +proc newPixbufLoaderWithType*(imageType: string): PixbufLoader = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_loader_new_with_type(cstring(imageType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufLoaderWithType*[T](result: var T; imageType: string) = + assert(result is PixbufLoader) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_loader_new_with_type(cstring(imageType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_loader_close*(self: ptr PixbufLoader00): gboolean {. + importc: "gdk_pixbuf_loader_close", libprag.} + +proc close*(self: PixbufLoader): bool = + toBool(gdk_pixbuf_loader_close(cast[ptr PixbufLoader00](self.impl))) + +proc gdk_pixbuf_loader_get_animation*(self: ptr PixbufLoader00): ptr PixbufAnimation00 {. + importc: "gdk_pixbuf_loader_get_animation", libprag.} + +proc getAnimation*(self: PixbufLoader): PixbufAnimation = + let gobj = gdk_pixbuf_loader_get_animation(cast[ptr PixbufLoader00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PixbufAnimation](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc animation*(self: PixbufLoader): PixbufAnimation = + let gobj = gdk_pixbuf_loader_get_animation(cast[ptr PixbufLoader00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PixbufAnimation](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_loader_get_format*(self: ptr PixbufLoader00): ptr PixbufFormat00 {. + importc: "gdk_pixbuf_loader_get_format", libprag.} + +proc getFormat*(self: PixbufLoader): PixbufFormat = + new(result) + result.impl = gdk_pixbuf_loader_get_format(cast[ptr PixbufLoader00](self.impl)) + +proc format*(self: PixbufLoader): PixbufFormat = + new(result) + result.impl = gdk_pixbuf_loader_get_format(cast[ptr PixbufLoader00](self.impl)) + +proc gdk_pixbuf_loader_get_pixbuf*(self: ptr PixbufLoader00): ptr Pixbuf00 {. + importc: "gdk_pixbuf_loader_get_pixbuf", libprag.} + +proc getPixbuf*(self: PixbufLoader): Pixbuf = + let gobj = gdk_pixbuf_loader_get_pixbuf(cast[ptr PixbufLoader00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbuf*(self: PixbufLoader): Pixbuf = + let gobj = gdk_pixbuf_loader_get_pixbuf(cast[ptr PixbufLoader00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_loader_set_size*(self: ptr PixbufLoader00; width: int32; height: int32) {. + importc: "gdk_pixbuf_loader_set_size", libprag.} + +proc setSize*(self: PixbufLoader; width: int; height: int) = + gdk_pixbuf_loader_set_size(cast[ptr PixbufLoader00](self.impl), int32(width), int32(height)) + +proc gdk_pixbuf_loader_write*(self: ptr PixbufLoader00; buf: uint8Array; count: uint64): gboolean {. + importc: "gdk_pixbuf_loader_write", libprag.} + +proc write*(self: PixbufLoader; buf: uint8Array; count: uint64): bool = + toBool(gdk_pixbuf_loader_write(cast[ptr PixbufLoader00](self.impl), buf, count)) + +proc gdk_pixbuf_loader_write_bytes*(self: ptr PixbufLoader00; buffer: ptr glib.Bytes00): gboolean {. + importc: "gdk_pixbuf_loader_write_bytes", libprag.} + +proc writeBytes*(self: PixbufLoader; buffer: glib.Bytes): bool = + toBool(gdk_pixbuf_loader_write_bytes(cast[ptr PixbufLoader00](self.impl), cast[ptr glib.Bytes00](buffer.impl))) + +type + PixbufLoaderClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + sizePrepared*: proc(loader: ptr PixbufLoader00; width: int32; height: int32) {.cdecl.} + areaPrepared*: proc(loader: ptr PixbufLoader00) {.cdecl.} + areaUpdated*: proc(loader: ptr PixbufLoader00; x: int32; y: int32; width: int32; + height: int32) {.cdecl.} + closed*: proc(loader: ptr PixbufLoader00) {.cdecl.} + PixbufLoaderClass* = ref object + impl*: ptr PixbufLoaderClass00 + +type + PixbufSaveFunc* = proc (buf: uint8Array; count: uint64; error: var ptr Error00; + data: pointer): gboolean {.cdecl.} + +proc gdk_pixbuf_save_to_callbackv*(self: ptr Pixbuf00; saveFunc: PixbufSaveFunc; userData: pointer; + `type`: cstring; optionKeys: cstringArray; optionValues: cstringArray): gboolean {. + importc: "gdk_pixbuf_save_to_callbackv", libprag.} + +proc saveToCallbackv*(self: Pixbuf; saveFunc: PixbufSaveFunc; userData: pointer; + `type`: string; optionKeys: cstringArray; optionValues: cstringArray): bool = + toBool(gdk_pixbuf_save_to_callbackv(cast[ptr Pixbuf00](self.impl), saveFunc, userData, cstring(`type`), optionKeys, optionValues)) + +type + PixbufSimpleAnim* = ref object of PixbufAnimation + PixbufSimpleAnim00* = object of PixbufAnimation00 + +proc gdk_pixbuf_simple_anim_new*(width: int32; height: int32; rate: cfloat): ptr PixbufSimpleAnim00 {. + importc: "gdk_pixbuf_simple_anim_new", libprag.} + +proc newPixbufSimpleAnim*(width: int; height: int; rate: cfloat): PixbufSimpleAnim = + new(result, finalizeGObject) + result.impl = gdk_pixbuf_simple_anim_new(int32(width), int32(height), rate) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPixbufSimpleAnim*[T](result: var T; width: int; height: int; rate: cfloat) = + assert(result is PixbufSimpleAnim) + new(result, finalizeGObject) + result.impl = gdk_pixbuf_simple_anim_new(int32(width), int32(height), rate) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gdk_pixbuf_simple_anim_add_frame*(self: ptr PixbufSimpleAnim00; pixbuf: ptr Pixbuf00) {. + importc: "gdk_pixbuf_simple_anim_add_frame", libprag.} + +proc addFrame*(self: PixbufSimpleAnim; pixbuf: Pixbuf) = + gdk_pixbuf_simple_anim_add_frame(cast[ptr PixbufSimpleAnim00](self.impl), cast[ptr Pixbuf00](pixbuf.impl)) + +proc gdk_pixbuf_simple_anim_get_loop*(self: ptr PixbufSimpleAnim00): gboolean {. + importc: "gdk_pixbuf_simple_anim_get_loop", libprag.} + +proc getLoop*(self: PixbufSimpleAnim): bool = + toBool(gdk_pixbuf_simple_anim_get_loop(cast[ptr PixbufSimpleAnim00](self.impl))) + +proc loop*(self: PixbufSimpleAnim): bool = + toBool(gdk_pixbuf_simple_anim_get_loop(cast[ptr PixbufSimpleAnim00](self.impl))) + +proc gdk_pixbuf_simple_anim_set_loop*(self: ptr PixbufSimpleAnim00; loop: gboolean) {. + importc: "gdk_pixbuf_simple_anim_set_loop", libprag.} + +proc setLoop*(self: PixbufSimpleAnim; loop: bool) = + gdk_pixbuf_simple_anim_set_loop(cast[ptr PixbufSimpleAnim00](self.impl), gboolean(loop)) + +proc `loop=`*(self: PixbufSimpleAnim; loop: bool) = + gdk_pixbuf_simple_anim_set_loop(cast[ptr PixbufSimpleAnim00](self.impl), gboolean(loop)) + +type + PixbufSimpleAnimClass00* {.pure.} = object + PixbufSimpleAnimClass* = ref object + impl*: ptr PixbufSimpleAnimClass00 + +type + PixbufSimpleAnimIter* = ref object of PixbufAnimationIter + PixbufSimpleAnimIter00* = object of PixbufAnimationIter00 + +type + PixdataType* {.size: sizeof(cint), pure.} = enum + colorTypeRgb = 1 + colorTypeRgba = 2 + colorTypeMask = 255 + sampleWidth_8 = 65536 + sampleWidthMask = 983040 + encodingRaw = 16777216 + encodingRle = 33554432 + encodingMask = 251658240 +# === remaining symbols: diff --git a/gintro/gio.nim b/gintro/gio.nim new file mode 100644 index 0000000..4fc0f54 --- /dev/null +++ b/gintro/gio.nim @@ -0,0 +1,21398 @@ +# dependencies: +# GLib-2.0 +# GObject-2.0 +# immediate dependencies: +# GObject-2.0 +# libraries: +# libgio-2.0.so.0 +{.deadCodeElim: on.} +import glib, gobject +const Lib* = "libgio-2.0.so.0" +{.pragma: libprag, cdecl, dynlib: Lib.} +type + ActionEntry00Array* = pointer +type + DBusAnnotationInfo00Array* = pointer +type + DBusArgInfo00Array* = pointer +type + DBusMethodInfo00Array* = pointer +type + DBusSignalInfo00Array* = pointer +type + DBusPropertyInfo00Array* = pointer +type + DBusInterfaceInfo00Array* = pointer +type + DBusNodeInfo00Array* = pointer +type + InputVector00Array* = pointer +type + SocketControlMessage00Array* = pointer +type + InputMessage00Array* = pointer +type + OutputMessage00Array* = pointer +type + utf8ArrayArray* = pointer +type + cstringArrayArray* = pointer +type + File00Array* = pointer +type + Array* = pointer +type + OutputVector00Array* = pointer +let Quark = g_quark_from_static_string("NimGIQuark") + +type + Action00* {.pure.} = object + Action* = ref object + impl*: ptr Action00 + +proc g_action_name_is_valid*(actionName: cstring): gboolean {. + importc: "g_action_name_is_valid", libprag.} + +proc nameIsValid*(actionName: cstring): gboolean {. + importc: "g_action_name_is_valid", libprag.} + +proc g_action_parse_detailed_name*(detailedName: cstring; actionName: var cstring; targetValue: var ptr glib.Variant00): gboolean {. + importc: "g_action_parse_detailed_name", libprag.} + +proc parseDetailedName*(detailedName: cstring; actionName: var cstring; targetValue: var ptr glib.Variant00): gboolean {. + importc: "g_action_parse_detailed_name", libprag.} + +proc g_action_print_detailed_name*(actionName: cstring; targetValue: ptr glib.Variant00): cstring {. + importc: "g_action_print_detailed_name", libprag.} + +proc printDetailedName*(actionName: string; targetValue: glib.Variant): string = + let resul0 = g_action_print_detailed_name(cstring(actionName), cast[ptr glib.Variant00](targetValue.impl)) + result = $resul0 + cogfree(resul0) + +proc g_action_activate*(self: ptr Action00; parameter: ptr glib.Variant00) {. + importc: "g_action_activate", libprag.} + +proc activate*(self: Action; parameter: glib.Variant) = + g_action_activate(cast[ptr Action00](self.impl), cast[ptr glib.Variant00](parameter.impl)) + +proc g_action_change_state*(self: ptr Action00; value: ptr glib.Variant00) {. + importc: "g_action_change_state", libprag.} + +proc changeState*(self: Action; value: glib.Variant) = + g_action_change_state(cast[ptr Action00](self.impl), cast[ptr glib.Variant00](value.impl)) + +proc g_action_get_enabled*(self: ptr Action00): gboolean {. + importc: "g_action_get_enabled", libprag.} + +proc getEnabled*(self: Action): bool = + toBool(g_action_get_enabled(cast[ptr Action00](self.impl))) + +proc enabled*(self: Action): bool = + toBool(g_action_get_enabled(cast[ptr Action00](self.impl))) + +proc g_action_get_name*(self: ptr Action00): cstring {. + importc: "g_action_get_name", libprag.} + +proc getName*(self: Action): string = + let resul0 = g_action_get_name(cast[ptr Action00](self.impl)) + result = $resul0 + +proc name*(self: Action): string = + let resul0 = g_action_get_name(cast[ptr Action00](self.impl)) + result = $resul0 + +proc g_action_get_parameter_type*(self: ptr Action00): ptr glib.VariantType00 {. + importc: "g_action_get_parameter_type", libprag.} + +proc getParameterType*(self: Action): glib.VariantType = + new(result) + result.impl = g_action_get_parameter_type(cast[ptr Action00](self.impl)) + +proc parameterType*(self: Action): glib.VariantType = + new(result) + result.impl = g_action_get_parameter_type(cast[ptr Action00](self.impl)) + +proc g_action_get_state*(self: ptr Action00): ptr glib.Variant00 {. + importc: "g_action_get_state", libprag.} + +proc getState*(self: Action): glib.Variant = + new(result) + result.impl = g_action_get_state(cast[ptr Action00](self.impl)) + +proc state*(self: Action): glib.Variant = + new(result) + result.impl = g_action_get_state(cast[ptr Action00](self.impl)) + +proc g_action_get_state_hint*(self: ptr Action00): ptr glib.Variant00 {. + importc: "g_action_get_state_hint", libprag.} + +proc getStateHint*(self: Action): glib.Variant = + new(result) + result.impl = g_action_get_state_hint(cast[ptr Action00](self.impl)) + +proc stateHint*(self: Action): glib.Variant = + new(result) + result.impl = g_action_get_state_hint(cast[ptr Action00](self.impl)) + +proc g_action_get_state_type*(self: ptr Action00): ptr glib.VariantType00 {. + importc: "g_action_get_state_type", libprag.} + +proc getStateType*(self: Action): glib.VariantType = + new(result) + result.impl = g_action_get_state_type(cast[ptr Action00](self.impl)) + +proc stateType*(self: Action): glib.VariantType = + new(result) + result.impl = g_action_get_state_type(cast[ptr Action00](self.impl)) + +type + SimpleAction* = ref object of gobject.Object + SimpleAction00* = object of gobject.Object00 + +proc scActivate*(self: SimpleAction; p: proc (self: ptr gobject.Object00; parameter: glib.Variant00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scChangeState*(self: SimpleAction; p: proc (self: ptr gobject.Object00; value: glib.Variant00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "change-state", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_simple_action_new*(name: cstring; parameterType: ptr glib.VariantType00): ptr SimpleAction00 {. + importc: "g_simple_action_new", libprag.} + +proc newSimpleAction*(name: string; parameterType: glib.VariantType): SimpleAction = + new(result, finalizeGObject) + result.impl = g_simple_action_new(cstring(name), cast[ptr glib.VariantType00](parameterType.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSimpleAction*[T](result: var T; name: string; parameterType: glib.VariantType) = + assert(result is SimpleAction) + new(result, finalizeGObject) + result.impl = g_simple_action_new(cstring(name), cast[ptr glib.VariantType00](parameterType.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_simple_action_new_stateful*(name: cstring; parameterType: ptr glib.VariantType00; + state: ptr glib.Variant00): ptr SimpleAction00 {. + importc: "g_simple_action_new_stateful", libprag.} + +proc newSimpleActionStateful*(name: string; parameterType: glib.VariantType; state: glib.Variant): SimpleAction = + new(result, finalizeGObject) + result.impl = g_simple_action_new_stateful(cstring(name), cast[ptr glib.VariantType00](parameterType.impl), cast[ptr glib.Variant00](state.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSimpleActionStateful*[T](result: var T; name: string; parameterType: glib.VariantType; state: glib.Variant) = + assert(result is SimpleAction) + new(result, finalizeGObject) + result.impl = g_simple_action_new_stateful(cstring(name), cast[ptr glib.VariantType00](parameterType.impl), cast[ptr glib.Variant00](state.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_simple_action_set_enabled*(self: ptr SimpleAction00; enabled: gboolean) {. + importc: "g_simple_action_set_enabled", libprag.} + +proc setEnabled*(self: SimpleAction; enabled: bool) = + g_simple_action_set_enabled(cast[ptr SimpleAction00](self.impl), gboolean(enabled)) + +proc `enabled=`*(self: SimpleAction; enabled: bool) = + g_simple_action_set_enabled(cast[ptr SimpleAction00](self.impl), gboolean(enabled)) + +proc g_simple_action_set_state*(self: ptr SimpleAction00; value: ptr glib.Variant00) {. + importc: "g_simple_action_set_state", libprag.} + +proc setState*(self: SimpleAction; value: glib.Variant) = + g_simple_action_set_state(cast[ptr SimpleAction00](self.impl), cast[ptr glib.Variant00](value.impl)) + +proc `state=`*(self: SimpleAction; value: glib.Variant) = + g_simple_action_set_state(cast[ptr SimpleAction00](self.impl), cast[ptr glib.Variant00](value.impl)) + +proc g_simple_action_set_state_hint*(self: ptr SimpleAction00; stateHint: ptr glib.Variant00) {. + importc: "g_simple_action_set_state_hint", libprag.} + +proc setStateHint*(self: SimpleAction; stateHint: glib.Variant) = + g_simple_action_set_state_hint(cast[ptr SimpleAction00](self.impl), cast[ptr glib.Variant00](stateHint.impl)) + +proc `stateHint=`*(self: SimpleAction; stateHint: glib.Variant) = + g_simple_action_set_state_hint(cast[ptr SimpleAction00](self.impl), cast[ptr glib.Variant00](stateHint.impl)) + +type + ActionEntry00* {.pure.} = object + name*: cstring + activate*: proc(action: ptr SimpleAction00; parameter: ptr glib.Variant00; + userData: pointer) {.cdecl.} + parameterType*: cstring + state*: cstring + changeState*: proc(action: ptr SimpleAction00; value: ptr glib.Variant00; + userData: pointer) {.cdecl.} + padding*: array[3, uint64] + ActionEntry* = ref object + impl*: ptr ActionEntry00 + +type + ActionGroup00* {.pure.} = object + ActionGroup* = ref object + impl*: ptr ActionGroup00 + +proc g_action_group_action_added*(self: ptr ActionGroup00; actionName: cstring) {. + importc: "g_action_group_action_added", libprag.} + +proc actionAdded*(self: ActionGroup; actionName: string) = + g_action_group_action_added(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc g_action_group_action_enabled_changed*(self: ptr ActionGroup00; actionName: cstring; enabled: gboolean) {. + importc: "g_action_group_action_enabled_changed", libprag.} + +proc actionEnabledChanged*(self: ActionGroup; actionName: string; enabled: bool) = + g_action_group_action_enabled_changed(cast[ptr ActionGroup00](self.impl), cstring(actionName), gboolean(enabled)) + +proc g_action_group_action_removed*(self: ptr ActionGroup00; actionName: cstring) {. + importc: "g_action_group_action_removed", libprag.} + +proc actionRemoved*(self: ActionGroup; actionName: string) = + g_action_group_action_removed(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc g_action_group_action_state_changed*(self: ptr ActionGroup00; actionName: cstring; state: ptr glib.Variant00) {. + importc: "g_action_group_action_state_changed", libprag.} + +proc actionStateChanged*(self: ActionGroup; actionName: string; state: glib.Variant) = + g_action_group_action_state_changed(cast[ptr ActionGroup00](self.impl), cstring(actionName), cast[ptr glib.Variant00](state.impl)) + +proc g_action_group_activate_action*(self: ptr ActionGroup00; actionName: cstring; parameter: ptr glib.Variant00) {. + importc: "g_action_group_activate_action", libprag.} + +proc activateAction*(self: ActionGroup; actionName: string; parameter: glib.Variant) = + g_action_group_activate_action(cast[ptr ActionGroup00](self.impl), cstring(actionName), cast[ptr glib.Variant00](parameter.impl)) + +proc g_action_group_change_action_state*(self: ptr ActionGroup00; actionName: cstring; value: ptr glib.Variant00) {. + importc: "g_action_group_change_action_state", libprag.} + +proc changeActionState*(self: ActionGroup; actionName: string; value: glib.Variant) = + g_action_group_change_action_state(cast[ptr ActionGroup00](self.impl), cstring(actionName), cast[ptr glib.Variant00](value.impl)) + +proc g_action_group_get_action_enabled*(self: ptr ActionGroup00; actionName: cstring): gboolean {. + importc: "g_action_group_get_action_enabled", libprag.} + +proc getActionEnabled*(self: ActionGroup; actionName: string): bool = + toBool(g_action_group_get_action_enabled(cast[ptr ActionGroup00](self.impl), cstring(actionName))) + +proc actionEnabled*(self: ActionGroup; actionName: string): bool = + toBool(g_action_group_get_action_enabled(cast[ptr ActionGroup00](self.impl), cstring(actionName))) + +proc g_action_group_get_action_parameter_type*(self: ptr ActionGroup00; actionName: cstring): ptr glib.VariantType00 {. + importc: "g_action_group_get_action_parameter_type", libprag.} + +proc getActionParameterType*(self: ActionGroup; actionName: string): glib.VariantType = + new(result) + result.impl = g_action_group_get_action_parameter_type(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc actionParameterType*(self: ActionGroup; actionName: string): glib.VariantType = + new(result) + result.impl = g_action_group_get_action_parameter_type(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc g_action_group_get_action_state*(self: ptr ActionGroup00; actionName: cstring): ptr glib.Variant00 {. + importc: "g_action_group_get_action_state", libprag.} + +proc getActionState*(self: ActionGroup; actionName: string): glib.Variant = + new(result) + result.impl = g_action_group_get_action_state(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc actionState*(self: ActionGroup; actionName: string): glib.Variant = + new(result) + result.impl = g_action_group_get_action_state(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc g_action_group_get_action_state_hint*(self: ptr ActionGroup00; actionName: cstring): ptr glib.Variant00 {. + importc: "g_action_group_get_action_state_hint", libprag.} + +proc getActionStateHint*(self: ActionGroup; actionName: string): glib.Variant = + new(result) + result.impl = g_action_group_get_action_state_hint(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc actionStateHint*(self: ActionGroup; actionName: string): glib.Variant = + new(result) + result.impl = g_action_group_get_action_state_hint(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc g_action_group_get_action_state_type*(self: ptr ActionGroup00; actionName: cstring): ptr glib.VariantType00 {. + importc: "g_action_group_get_action_state_type", libprag.} + +proc getActionStateType*(self: ActionGroup; actionName: string): glib.VariantType = + new(result) + result.impl = g_action_group_get_action_state_type(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc actionStateType*(self: ActionGroup; actionName: string): glib.VariantType = + new(result) + result.impl = g_action_group_get_action_state_type(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + +proc g_action_group_has_action*(self: ptr ActionGroup00; actionName: cstring): gboolean {. + importc: "g_action_group_has_action", libprag.} + +proc hasAction*(self: ActionGroup; actionName: string): bool = + toBool(g_action_group_has_action(cast[ptr ActionGroup00](self.impl), cstring(actionName))) + +proc g_action_group_list_actions*(self: ptr ActionGroup00): cstringArray {. + importc: "g_action_group_list_actions", libprag.} + +proc listActions*(self: ActionGroup): cstringArray = + g_action_group_list_actions(cast[ptr ActionGroup00](self.impl)) + +proc g_action_group_query_action*(self: ptr ActionGroup00; actionName: cstring; enabled: var gboolean; + parameterType: var ptr glib.VariantType00; stateType: var ptr glib.VariantType00; + stateHint: var ptr glib.Variant00; state: var ptr glib.Variant00): gboolean {. + importc: "g_action_group_query_action", libprag.} + +proc queryAction*(self: ptr ActionGroup00; actionName: cstring; enabled: var gboolean; + parameterType: var ptr glib.VariantType00; stateType: var ptr glib.VariantType00; + stateHint: var ptr glib.Variant00; state: var ptr glib.Variant00): gboolean {. + importc: "g_action_group_query_action", libprag.} + +type + ActionGroupInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + hasAction*: proc(actionGroup: ptr ActionGroup00; actionName: cstring): gboolean {.cdecl.} + listActions*: proc(actionGroup: ptr ActionGroup00): cstringArray {.cdecl.} + getActionEnabled*: proc(actionGroup: ptr ActionGroup00; actionName: cstring): gboolean {.cdecl.} + getActionParameterType*: proc(actionGroup: ptr ActionGroup00; actionName: cstring): ptr glib.VariantType00 {.cdecl.} + getActionStateType*: proc(actionGroup: ptr ActionGroup00; actionName: cstring): ptr glib.VariantType00 {.cdecl.} + getActionStateHint*: proc(actionGroup: ptr ActionGroup00; actionName: cstring): ptr glib.Variant00 {.cdecl.} + getActionState*: proc(actionGroup: ptr ActionGroup00; actionName: cstring): ptr glib.Variant00 {.cdecl.} + changeActionState*: proc(actionGroup: ptr ActionGroup00; actionName: cstring; + value: ptr glib.Variant00) {.cdecl.} + activateAction*: proc(actionGroup: ptr ActionGroup00; actionName: cstring; + parameter: ptr glib.Variant00) {.cdecl.} + actionAdded*: proc(actionGroup: ptr ActionGroup00; actionName: cstring) {.cdecl.} + actionRemoved*: proc(actionGroup: ptr ActionGroup00; actionName: cstring) {.cdecl.} + actionEnabledChanged*: proc(actionGroup: ptr ActionGroup00; actionName: cstring; + enabled: gboolean) {.cdecl.} + actionStateChanged*: proc(actionGroup: ptr ActionGroup00; actionName: cstring; + state: ptr glib.Variant00) {.cdecl.} + queryAction*: proc(actionGroup: ptr ActionGroup00; actionName: cstring; + enabled: var gboolean; parameterType: var ptr glib.VariantType00; stateType: var ptr glib.VariantType00; + stateHint: var ptr glib.Variant00; state: var ptr glib.Variant00): gboolean {.cdecl.} + ActionGroupInterface* = ref object + impl*: ptr ActionGroupInterface00 + +type + ActionInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + getName*: proc(action: ptr Action00): cstring {.cdecl.} + getParameterType*: proc(action: ptr Action00): ptr glib.VariantType00 {.cdecl.} + getStateType*: proc(action: ptr Action00): ptr glib.VariantType00 {.cdecl.} + getStateHint*: proc(action: ptr Action00): ptr glib.Variant00 {.cdecl.} + getEnabled*: proc(action: ptr Action00): gboolean {.cdecl.} + getState*: proc(action: ptr Action00): ptr glib.Variant00 {.cdecl.} + changeState*: proc(action: ptr Action00; value: ptr glib.Variant00) {.cdecl.} + activate*: proc(action: ptr Action00; parameter: ptr glib.Variant00) {.cdecl.} + ActionInterface* = ref object + impl*: ptr ActionInterface00 + +type + ActionMap00* {.pure.} = object + ActionMap* = ref object + impl*: ptr ActionMap00 + +proc g_action_map_add_action*(self: ptr ActionMap00; action: ptr Action00) {. + importc: "g_action_map_add_action", libprag.} + +proc addAction*(self: ActionMap; action: Action) = + g_action_map_add_action(cast[ptr ActionMap00](self.impl), cast[ptr Action00](action.impl)) + +proc g_action_map_add_action_entries*(self: ptr ActionMap00; entries: ActionEntry00Array; + nEntries: int32; userData: pointer) {. + importc: "g_action_map_add_action_entries", libprag.} + +proc addActionEntries*(self: ActionMap; entries: ActionEntry00Array; nEntries: int; + userData: pointer) = + g_action_map_add_action_entries(cast[ptr ActionMap00](self.impl), entries, int32(nEntries), userData) + +proc g_action_map_lookup_action*(self: ptr ActionMap00; actionName: cstring): ptr Action00 {. + importc: "g_action_map_lookup_action", libprag.} + +proc lookupAction*(self: ActionMap; actionName: string): Action = + new(result) + result.impl = g_action_map_lookup_action(cast[ptr ActionMap00](self.impl), cstring(actionName)) + +proc g_action_map_remove_action*(self: ptr ActionMap00; actionName: cstring) {. + importc: "g_action_map_remove_action", libprag.} + +proc removeAction*(self: ActionMap; actionName: string) = + g_action_map_remove_action(cast[ptr ActionMap00](self.impl), cstring(actionName)) + +type + ActionMapInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + lookupAction*: proc(actionMap: ptr ActionMap00; actionName: cstring): ptr Action00 {.cdecl.} + addAction*: proc(actionMap: ptr ActionMap00; action: ptr Action00) {.cdecl.} + removeAction*: proc(actionMap: ptr ActionMap00; actionName: cstring) {.cdecl.} + ActionMapInterface* = ref object + impl*: ptr ActionMapInterface00 + +type + AppInfo00* {.pure.} = object + AppInfo* = ref object + impl*: ptr AppInfo00 + +proc g_app_info_get_all*(): ptr pointer {. + importc: "g_app_info_get_all", libprag.} + +proc getAll*(): ptr pointer {. + importc: "g_app_info_get_all", libprag.} + +proc all*(): ptr pointer {. + importc: "g_app_info_get_all", libprag.} + +proc g_app_info_get_all_for_type*(contentType: cstring): ptr pointer {. + importc: "g_app_info_get_all_for_type", libprag.} + +proc getAllForType*(contentType: cstring): ptr pointer {. + importc: "g_app_info_get_all_for_type", libprag.} + +proc allForType*(contentType: cstring): ptr pointer {. + importc: "g_app_info_get_all_for_type", libprag.} + +proc g_app_info_get_default_for_type*(contentType: cstring; mustSupportUris: gboolean): ptr AppInfo00 {. + importc: "g_app_info_get_default_for_type", libprag.} + +proc getDefaultForType*(contentType: string; mustSupportUris: bool): AppInfo = + new(result) + result.impl = g_app_info_get_default_for_type(cstring(contentType), gboolean(mustSupportUris)) + +proc defaultForType*(contentType: string; mustSupportUris: bool): AppInfo = + new(result) + result.impl = g_app_info_get_default_for_type(cstring(contentType), gboolean(mustSupportUris)) + +proc g_app_info_get_default_for_uri_scheme*(uriScheme: cstring): ptr AppInfo00 {. + importc: "g_app_info_get_default_for_uri_scheme", libprag.} + +proc getDefaultForUriScheme*(uriScheme: string): AppInfo = + new(result) + result.impl = g_app_info_get_default_for_uri_scheme(cstring(uriScheme)) + +proc defaultForUriScheme*(uriScheme: string): AppInfo = + new(result) + result.impl = g_app_info_get_default_for_uri_scheme(cstring(uriScheme)) + +proc g_app_info_get_fallback_for_type*(contentType: cstring): ptr pointer {. + importc: "g_app_info_get_fallback_for_type", libprag.} + +proc getFallbackForType*(contentType: cstring): ptr pointer {. + importc: "g_app_info_get_fallback_for_type", libprag.} + +proc fallbackForType*(contentType: cstring): ptr pointer {. + importc: "g_app_info_get_fallback_for_type", libprag.} + +proc g_app_info_get_recommended_for_type*(contentType: cstring): ptr pointer {. + importc: "g_app_info_get_recommended_for_type", libprag.} + +proc getRecommendedForType*(contentType: cstring): ptr pointer {. + importc: "g_app_info_get_recommended_for_type", libprag.} + +proc recommendedForType*(contentType: cstring): ptr pointer {. + importc: "g_app_info_get_recommended_for_type", libprag.} + +proc g_app_info_reset_type_associations*(contentType: cstring) {. + importc: "g_app_info_reset_type_associations", libprag.} + +proc resetTypeAssociations*(contentType: cstring) {. + importc: "g_app_info_reset_type_associations", libprag.} + +proc g_app_info_add_supports_type*(self: ptr AppInfo00; contentType: cstring): gboolean {. + importc: "g_app_info_add_supports_type", libprag.} + +proc addSupportsType*(self: AppInfo; contentType: string): bool = + toBool(g_app_info_add_supports_type(cast[ptr AppInfo00](self.impl), cstring(contentType))) + +proc g_app_info_can_delete*(self: ptr AppInfo00): gboolean {. + importc: "g_app_info_can_delete", libprag.} + +proc canDelete*(self: AppInfo): bool = + toBool(g_app_info_can_delete(cast[ptr AppInfo00](self.impl))) + +proc g_app_info_can_remove_supports_type*(self: ptr AppInfo00): gboolean {. + importc: "g_app_info_can_remove_supports_type", libprag.} + +proc canRemoveSupportsType*(self: AppInfo): bool = + toBool(g_app_info_can_remove_supports_type(cast[ptr AppInfo00](self.impl))) + +proc g_app_info_delete*(self: ptr AppInfo00): gboolean {. + importc: "g_app_info_delete", libprag.} + +proc delete*(self: AppInfo): bool = + toBool(g_app_info_delete(cast[ptr AppInfo00](self.impl))) + +proc g_app_info_dup*(self: ptr AppInfo00): ptr AppInfo00 {. + importc: "g_app_info_dup", libprag.} + +proc dup*(self: AppInfo): AppInfo = + new(result) + result.impl = g_app_info_dup(cast[ptr AppInfo00](self.impl)) + +proc g_app_info_equal*(self: ptr AppInfo00; appinfo2: ptr AppInfo00): gboolean {. + importc: "g_app_info_equal", libprag.} + +proc equal*(self: AppInfo; appinfo2: AppInfo): bool = + toBool(g_app_info_equal(cast[ptr AppInfo00](self.impl), cast[ptr AppInfo00](appinfo2.impl))) + +proc g_app_info_get_commandline*(self: ptr AppInfo00): ucstring {. + importc: "g_app_info_get_commandline", libprag.} + +proc getCommandline*(self: AppInfo): ucstring = + g_app_info_get_commandline(cast[ptr AppInfo00](self.impl)) + +proc commandline*(self: AppInfo): ucstring = + g_app_info_get_commandline(cast[ptr AppInfo00](self.impl)) + +proc g_app_info_get_description*(self: ptr AppInfo00): cstring {. + importc: "g_app_info_get_description", libprag.} + +proc getDescription*(self: AppInfo): string = + let resul0 = g_app_info_get_description(cast[ptr AppInfo00](self.impl)) + result = $resul0 + +proc description*(self: AppInfo): string = + let resul0 = g_app_info_get_description(cast[ptr AppInfo00](self.impl)) + result = $resul0 + +proc g_app_info_get_display_name*(self: ptr AppInfo00): cstring {. + importc: "g_app_info_get_display_name", libprag.} + +proc getDisplayName*(self: AppInfo): string = + let resul0 = g_app_info_get_display_name(cast[ptr AppInfo00](self.impl)) + result = $resul0 + +proc displayName*(self: AppInfo): string = + let resul0 = g_app_info_get_display_name(cast[ptr AppInfo00](self.impl)) + result = $resul0 + +proc g_app_info_get_executable*(self: ptr AppInfo00): ucstring {. + importc: "g_app_info_get_executable", libprag.} + +proc getExecutable*(self: AppInfo): ucstring = + g_app_info_get_executable(cast[ptr AppInfo00](self.impl)) + +proc executable*(self: AppInfo): ucstring = + g_app_info_get_executable(cast[ptr AppInfo00](self.impl)) + +proc g_app_info_get_id*(self: ptr AppInfo00): cstring {. + importc: "g_app_info_get_id", libprag.} + +proc getId*(self: AppInfo): string = + let resul0 = g_app_info_get_id(cast[ptr AppInfo00](self.impl)) + result = $resul0 + +proc id*(self: AppInfo): string = + let resul0 = g_app_info_get_id(cast[ptr AppInfo00](self.impl)) + result = $resul0 + +proc g_app_info_get_name*(self: ptr AppInfo00): cstring {. + importc: "g_app_info_get_name", libprag.} + +proc getName*(self: AppInfo): string = + let resul0 = g_app_info_get_name(cast[ptr AppInfo00](self.impl)) + result = $resul0 + +proc name*(self: AppInfo): string = + let resul0 = g_app_info_get_name(cast[ptr AppInfo00](self.impl)) + result = $resul0 + +proc g_app_info_get_supported_types*(self: ptr AppInfo00): cstringArray {. + importc: "g_app_info_get_supported_types", libprag.} + +proc getSupportedTypes*(self: AppInfo): cstringArray = + g_app_info_get_supported_types(cast[ptr AppInfo00](self.impl)) + +proc supportedTypes*(self: AppInfo): cstringArray = + g_app_info_get_supported_types(cast[ptr AppInfo00](self.impl)) + +proc g_app_info_remove_supports_type*(self: ptr AppInfo00; contentType: cstring): gboolean {. + importc: "g_app_info_remove_supports_type", libprag.} + +proc removeSupportsType*(self: AppInfo; contentType: string): bool = + toBool(g_app_info_remove_supports_type(cast[ptr AppInfo00](self.impl), cstring(contentType))) + +proc g_app_info_set_as_default_for_extension*(self: ptr AppInfo00; extension: ucstring): gboolean {. + importc: "g_app_info_set_as_default_for_extension", libprag.} + +proc setAsDefaultForExtension*(self: AppInfo; extension: ucstring): bool = + toBool(g_app_info_set_as_default_for_extension(cast[ptr AppInfo00](self.impl), extension)) + +proc `asDefaultForExtension=`*(self: AppInfo; extension: ucstring): bool = + toBool(g_app_info_set_as_default_for_extension(cast[ptr AppInfo00](self.impl), extension)) + +proc g_app_info_set_as_default_for_type*(self: ptr AppInfo00; contentType: cstring): gboolean {. + importc: "g_app_info_set_as_default_for_type", libprag.} + +proc setAsDefaultForType*(self: AppInfo; contentType: string): bool = + toBool(g_app_info_set_as_default_for_type(cast[ptr AppInfo00](self.impl), cstring(contentType))) + +proc `asDefaultForType=`*(self: AppInfo; contentType: string): bool = + toBool(g_app_info_set_as_default_for_type(cast[ptr AppInfo00](self.impl), cstring(contentType))) + +proc g_app_info_set_as_last_used_for_type*(self: ptr AppInfo00; contentType: cstring): gboolean {. + importc: "g_app_info_set_as_last_used_for_type", libprag.} + +proc setAsLastUsedForType*(self: AppInfo; contentType: string): bool = + toBool(g_app_info_set_as_last_used_for_type(cast[ptr AppInfo00](self.impl), cstring(contentType))) + +proc `asLastUsedForType=`*(self: AppInfo; contentType: string): bool = + toBool(g_app_info_set_as_last_used_for_type(cast[ptr AppInfo00](self.impl), cstring(contentType))) + +proc g_app_info_should_show*(self: ptr AppInfo00): gboolean {. + importc: "g_app_info_should_show", libprag.} + +proc shouldShow*(self: AppInfo): bool = + toBool(g_app_info_should_show(cast[ptr AppInfo00](self.impl))) + +proc g_app_info_supports_files*(self: ptr AppInfo00): gboolean {. + importc: "g_app_info_supports_files", libprag.} + +proc supportsFiles*(self: AppInfo): bool = + toBool(g_app_info_supports_files(cast[ptr AppInfo00](self.impl))) + +proc g_app_info_supports_uris*(self: ptr AppInfo00): gboolean {. + importc: "g_app_info_supports_uris", libprag.} + +proc supportsUris*(self: AppInfo): bool = + toBool(g_app_info_supports_uris(cast[ptr AppInfo00](self.impl))) + +type + AppInfoCreateFlag* {.size: sizeof(cint), pure.} = enum + needsTerminal = 1 + supportsUris = 2 + supportsStartupNotification = 3 + + AppInfoCreateFlags* {.size: sizeof(cint).} = set[AppInfoCreateFlag] + +proc g_app_info_create_from_commandline*(commandline: cstring; applicationName: cstring; flags: AppInfoCreateFlags): ptr AppInfo00 {. + importc: "g_app_info_create_from_commandline", libprag.} + +proc createFromCommandline*(commandline: string; applicationName: string; flags: AppInfoCreateFlags): AppInfo = + new(result) + result.impl = g_app_info_create_from_commandline(cstring(commandline), cstring(applicationName), flags) + +type + AsyncResult00* {.pure.} = object + AsyncResult* = ref object + impl*: ptr AsyncResult00 + +proc g_async_result_get_source_object*(self: ptr AsyncResult00): ptr gobject.Object00 {. + importc: "g_async_result_get_source_object", libprag.} + +proc getSourceObject*(self: AsyncResult): gobject.Object = + let gobj = g_async_result_get_source_object(cast[ptr AsyncResult00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc sourceObject*(self: AsyncResult): gobject.Object = + let gobj = g_async_result_get_source_object(cast[ptr AsyncResult00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_async_result_get_user_data*(self: ptr AsyncResult00): pointer {. + importc: "g_async_result_get_user_data", libprag.} + +proc getUserData*(self: AsyncResult): pointer = + g_async_result_get_user_data(cast[ptr AsyncResult00](self.impl)) + +proc userData*(self: AsyncResult): pointer = + g_async_result_get_user_data(cast[ptr AsyncResult00](self.impl)) + +proc g_async_result_is_tagged*(self: ptr AsyncResult00; sourceTag: pointer): gboolean {. + importc: "g_async_result_is_tagged", libprag.} + +proc isTagged*(self: AsyncResult; sourceTag: pointer): bool = + toBool(g_async_result_is_tagged(cast[ptr AsyncResult00](self.impl), sourceTag)) + +proc g_async_result_legacy_propagate_error*(self: ptr AsyncResult00): gboolean {. + importc: "g_async_result_legacy_propagate_error", libprag.} + +proc legacyPropagateError*(self: AsyncResult): bool = + toBool(g_async_result_legacy_propagate_error(cast[ptr AsyncResult00](self.impl))) + +proc g_app_info_launch_default_for_uri_finish*(resu: ptr AsyncResult00): gboolean {. + importc: "g_app_info_launch_default_for_uri_finish", libprag.} + +proc launchDefaultForUriFinish*(resu: AsyncResult): bool = + toBool(g_app_info_launch_default_for_uri_finish(cast[ptr AsyncResult00](resu.impl))) + +type + Icon00* {.pure.} = object + Icon* = ref object + impl*: ptr Icon00 + +proc g_icon_deserialize*(value: ptr glib.Variant00): ptr Icon00 {. + importc: "g_icon_deserialize", libprag.} + +proc deserialize*(value: glib.Variant): Icon = + new(result) + result.impl = g_icon_deserialize(cast[ptr glib.Variant00](value.impl)) + +proc g_icon_hash*(icon: pointer): uint32 {. + importc: "g_icon_hash", libprag.} + +proc hash*(icon: pointer): uint32 {. + importc: "g_icon_hash", libprag.} + +proc g_icon_new_for_string*(str: cstring): ptr Icon00 {. + importc: "g_icon_new_for_string", libprag.} + +proc newIconForString*(str: string): Icon = + new(result) + result.impl = g_icon_new_for_string(cstring(str)) + +proc g_icon_equal*(self: ptr Icon00; icon2: ptr Icon00): gboolean {. + importc: "g_icon_equal", libprag.} + +proc equal*(self: Icon; icon2: Icon): bool = + toBool(g_icon_equal(cast[ptr Icon00](self.impl), cast[ptr Icon00](icon2.impl))) + +proc g_icon_serialize*(self: ptr Icon00): ptr glib.Variant00 {. + importc: "g_icon_serialize", libprag.} + +proc serialize*(self: Icon): glib.Variant = + new(result) + result.impl = g_icon_serialize(cast[ptr Icon00](self.impl)) + +proc g_icon_to_string*(self: ptr Icon00): cstring {. + importc: "g_icon_to_string", libprag.} + +proc toString*(self: Icon): string = + let resul0 = g_icon_to_string(cast[ptr Icon00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_app_info_get_icon*(self: ptr AppInfo00): ptr Icon00 {. + importc: "g_app_info_get_icon", libprag.} + +proc getIcon*(self: AppInfo): Icon = + new(result) + result.impl = g_app_info_get_icon(cast[ptr AppInfo00](self.impl)) + +proc icon*(self: AppInfo): Icon = + new(result) + result.impl = g_app_info_get_icon(cast[ptr AppInfo00](self.impl)) + +type + AppLaunchContextPrivate00* {.pure.} = object + AppLaunchContextPrivate* = ref object + impl*: ptr AppLaunchContextPrivate00 + +type + AppLaunchContext* = ref object of gobject.Object + AppLaunchContext00* = object of gobject.Object00 + priv1: ptr AppLaunchContextPrivate00 + +proc scLaunchFailed*(self: AppLaunchContext; p: proc (self: ptr gobject.Object00; startupNotifyId: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "launch-failed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scLaunched*(self: AppLaunchContext; p: proc (self: ptr gobject.Object00; info: AppInfo00; platformData: glib.Variant00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "launched", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_app_launch_context_new*(): ptr AppLaunchContext00 {. + importc: "g_app_launch_context_new", libprag.} + +proc newAppLaunchContext*(): AppLaunchContext = + new(result, finalizeGObject) + result.impl = g_app_launch_context_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAppLaunchContext*[T](result: var T) = + assert(result is AppLaunchContext) + new(result, finalizeGObject) + result.impl = g_app_launch_context_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_app_launch_context_get_display*(self: ptr AppLaunchContext00; info: ptr AppInfo00; + files: ptr pointer): cstring {. + importc: "g_app_launch_context_get_display", libprag.} + +proc getDisplay*(self: AppLaunchContext; info: AppInfo; files: ptr pointer): string = + let resul0 = g_app_launch_context_get_display(cast[ptr AppLaunchContext00](self.impl), cast[ptr AppInfo00](info.impl), files) + result = $resul0 + cogfree(resul0) + +proc display*(self: AppLaunchContext; info: AppInfo; files: ptr pointer): string = + let resul0 = g_app_launch_context_get_display(cast[ptr AppLaunchContext00](self.impl), cast[ptr AppInfo00](info.impl), files) + result = $resul0 + cogfree(resul0) + +proc g_app_launch_context_get_environment*(self: ptr AppLaunchContext00): cstringArray {. + importc: "g_app_launch_context_get_environment", libprag.} + +proc getEnvironment*(self: AppLaunchContext): cstringArray = + g_app_launch_context_get_environment(cast[ptr AppLaunchContext00](self.impl)) + +proc environment*(self: AppLaunchContext): cstringArray = + g_app_launch_context_get_environment(cast[ptr AppLaunchContext00](self.impl)) + +proc g_app_launch_context_get_startup_notify_id*(self: ptr AppLaunchContext00; info: ptr AppInfo00; + files: ptr pointer): cstring {. + importc: "g_app_launch_context_get_startup_notify_id", libprag.} + +proc getStartupNotifyId*(self: AppLaunchContext; info: AppInfo; files: ptr pointer): string = + let resul0 = g_app_launch_context_get_startup_notify_id(cast[ptr AppLaunchContext00](self.impl), cast[ptr AppInfo00](info.impl), files) + result = $resul0 + cogfree(resul0) + +proc startupNotifyId*(self: AppLaunchContext; info: AppInfo; files: ptr pointer): string = + let resul0 = g_app_launch_context_get_startup_notify_id(cast[ptr AppLaunchContext00](self.impl), cast[ptr AppInfo00](info.impl), files) + result = $resul0 + cogfree(resul0) + +proc g_app_launch_context_launch_failed*(self: ptr AppLaunchContext00; startupNotifyId: cstring) {. + importc: "g_app_launch_context_launch_failed", libprag.} + +proc launchFailed*(self: AppLaunchContext; startupNotifyId: string) = + g_app_launch_context_launch_failed(cast[ptr AppLaunchContext00](self.impl), cstring(startupNotifyId)) + +proc g_app_launch_context_setenv*(self: ptr AppLaunchContext00; variable: cstring; value: cstring) {. + importc: "g_app_launch_context_setenv", libprag.} + +proc setenv*(self: AppLaunchContext; variable: string; value: string) = + g_app_launch_context_setenv(cast[ptr AppLaunchContext00](self.impl), cstring(variable), cstring(value)) + +proc g_app_launch_context_unsetenv*(self: ptr AppLaunchContext00; variable: cstring) {. + importc: "g_app_launch_context_unsetenv", libprag.} + +proc unsetenv*(self: AppLaunchContext; variable: string) = + g_app_launch_context_unsetenv(cast[ptr AppLaunchContext00](self.impl), cstring(variable)) + +proc g_app_info_launch_default_for_uri*(uri: cstring; launchContext: ptr AppLaunchContext00): gboolean {. + importc: "g_app_info_launch_default_for_uri", libprag.} + +proc launchDefaultForUri*(uri: string; launchContext: AppLaunchContext): bool = + toBool(g_app_info_launch_default_for_uri(cstring(uri), cast[ptr AppLaunchContext00](launchContext.impl))) + +proc g_app_info_launch*(self: ptr AppInfo00; files: ptr pointer; launchContext: ptr AppLaunchContext00): gboolean {. + importc: "g_app_info_launch", libprag.} + +proc launch*(self: AppInfo; files: ptr pointer; launchContext: AppLaunchContext): bool = + toBool(g_app_info_launch(cast[ptr AppInfo00](self.impl), files, cast[ptr AppLaunchContext00](launchContext.impl))) + +proc g_app_info_launch_uris*(self: ptr AppInfo00; uris: ptr pointer; launchContext: ptr AppLaunchContext00): gboolean {. + importc: "g_app_info_launch_uris", libprag.} + +proc launchUris*(self: AppInfo; uris: ptr pointer; launchContext: AppLaunchContext): bool = + toBool(g_app_info_launch_uris(cast[ptr AppInfo00](self.impl), uris, cast[ptr AppLaunchContext00](launchContext.impl))) + +type + CancellablePrivate00* {.pure.} = object + CancellablePrivate* = ref object + impl*: ptr CancellablePrivate00 + +type + Cancellable* = ref object of gobject.Object + Cancellable00* = object of gobject.Object00 + priv1: ptr CancellablePrivate00 + +proc scCancelled*(self: Cancellable; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cancelled", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_cancellable_new*(): ptr Cancellable00 {. + importc: "g_cancellable_new", libprag.} + +proc newCancellable*(): Cancellable = + new(result, finalizeGObject) + result.impl = g_cancellable_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCancellable*[T](result: var T) = + assert(result is Cancellable) + new(result, finalizeGObject) + result.impl = g_cancellable_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_cancellable_get_current*(): ptr Cancellable00 {. + importc: "g_cancellable_get_current", libprag.} + +proc getCurrent*(): Cancellable = + let gobj = g_cancellable_get_current() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Cancellable](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc current*(): Cancellable = + let gobj = g_cancellable_get_current() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Cancellable](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_cancellable_cancel*(self: ptr Cancellable00) {. + importc: "g_cancellable_cancel", libprag.} + +proc cancel*(self: Cancellable) = + g_cancellable_cancel(cast[ptr Cancellable00](self.impl)) + +proc g_cancellable_connect*(self: ptr Cancellable00; callback: Callback; data: pointer; + dataDestroyFunc: DestroyNotify): uint64 {. + importc: "g_cancellable_connect", libprag.} + +proc connect*(self: Cancellable; callback: Callback; data: pointer; + dataDestroyFunc: DestroyNotify): uint64 = + g_cancellable_connect(cast[ptr Cancellable00](self.impl), callback, data, dataDestroyFunc) + +proc g_cancellable_disconnect*(self: ptr Cancellable00; handlerId: uint64) {. + importc: "g_cancellable_disconnect", libprag.} + +proc disconnect*(self: Cancellable; handlerId: uint64) = + g_cancellable_disconnect(cast[ptr Cancellable00](self.impl), handlerId) + +proc g_cancellable_get_fd*(self: ptr Cancellable00): int32 {. + importc: "g_cancellable_get_fd", libprag.} + +proc getFd*(self: Cancellable): int = + int(g_cancellable_get_fd(cast[ptr Cancellable00](self.impl))) + +proc fd*(self: Cancellable): int = + int(g_cancellable_get_fd(cast[ptr Cancellable00](self.impl))) + +proc g_cancellable_is_cancelled*(self: ptr Cancellable00): gboolean {. + importc: "g_cancellable_is_cancelled", libprag.} + +proc isCancelled*(self: Cancellable): bool = + toBool(g_cancellable_is_cancelled(cast[ptr Cancellable00](self.impl))) + +proc g_cancellable_make_pollfd*(self: ptr Cancellable00; pollfd: ptr glib.PollFD00): gboolean {. + importc: "g_cancellable_make_pollfd", libprag.} + +proc makePollfd*(self: Cancellable; pollfd: glib.PollFD): bool = + toBool(g_cancellable_make_pollfd(cast[ptr Cancellable00](self.impl), cast[ptr glib.PollFD00](pollfd.impl))) + +proc g_cancellable_pop_current*(self: ptr Cancellable00) {. + importc: "g_cancellable_pop_current", libprag.} + +proc popCurrent*(self: Cancellable) = + g_cancellable_pop_current(cast[ptr Cancellable00](self.impl)) + +proc g_cancellable_push_current*(self: ptr Cancellable00) {. + importc: "g_cancellable_push_current", libprag.} + +proc pushCurrent*(self: Cancellable) = + g_cancellable_push_current(cast[ptr Cancellable00](self.impl)) + +proc g_cancellable_release_fd*(self: ptr Cancellable00) {. + importc: "g_cancellable_release_fd", libprag.} + +proc releaseFd*(self: Cancellable) = + g_cancellable_release_fd(cast[ptr Cancellable00](self.impl)) + +proc g_cancellable_reset*(self: ptr Cancellable00) {. + importc: "g_cancellable_reset", libprag.} + +proc reset*(self: Cancellable) = + g_cancellable_reset(cast[ptr Cancellable00](self.impl)) + +proc g_cancellable_set_error_if_cancelled*(self: ptr Cancellable00): gboolean {. + importc: "g_cancellable_set_error_if_cancelled", libprag.} + +proc setErrorIfCancelled*(self: Cancellable): bool = + toBool(g_cancellable_set_error_if_cancelled(cast[ptr Cancellable00](self.impl))) + +proc `errorIfCancelled=`*(self: Cancellable): bool = + toBool(g_cancellable_set_error_if_cancelled(cast[ptr Cancellable00](self.impl))) + +type + AppInfoIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + dup*: proc(appinfo: ptr AppInfo00): ptr AppInfo00 {.cdecl.} + equal*: proc(appinfo1: ptr AppInfo00; appinfo2: ptr AppInfo00): gboolean {.cdecl.} + getId*: proc(appinfo: ptr AppInfo00): cstring {.cdecl.} + getName*: proc(appinfo: ptr AppInfo00): cstring {.cdecl.} + getDescription*: proc(appinfo: ptr AppInfo00): cstring {.cdecl.} + getExecutable*: proc(appinfo: ptr AppInfo00): cstring {.cdecl.} + getIcon*: proc(appinfo: ptr AppInfo00): ptr Icon00 {.cdecl.} + launch*: proc(appinfo: ptr AppInfo00; files: ptr pointer; launchContext: ptr AppLaunchContext00): gboolean {.cdecl.} + supportsUris*: proc(appinfo: ptr AppInfo00): gboolean {.cdecl.} + supportsFiles*: proc(appinfo: ptr AppInfo00): gboolean {.cdecl.} + launchUris*: proc(appinfo: ptr AppInfo00; uris: ptr pointer; launchContext: ptr AppLaunchContext00): gboolean {.cdecl.} + shouldShow*: proc(appinfo: ptr AppInfo00): gboolean {.cdecl.} + setAsDefaultForType*: proc(appinfo: ptr AppInfo00; contentType: cstring): gboolean {.cdecl.} + setAsDefaultForExtension*: proc(appinfo: ptr AppInfo00; extension: ucstring): gboolean {.cdecl.} + addSupportsType*: proc(appinfo: ptr AppInfo00; contentType: cstring): gboolean {.cdecl.} + canRemoveSupportsType*: proc(appinfo: ptr AppInfo00): gboolean {.cdecl.} + removeSupportsType*: proc(appinfo: ptr AppInfo00; contentType: cstring): gboolean {.cdecl.} + canDelete*: proc(appinfo: ptr AppInfo00): gboolean {.cdecl.} + doDelete*: proc(appinfo: ptr AppInfo00): gboolean {.cdecl.} + getCommandline*: proc(appinfo: ptr AppInfo00): cstring {.cdecl.} + getDisplayName*: proc(appinfo: ptr AppInfo00): cstring {.cdecl.} + setAsLastUsedForType*: proc(appinfo: ptr AppInfo00; contentType: cstring): gboolean {.cdecl.} + getSupportedTypes*: proc(appinfo: ptr AppInfo00): cstringArray {.cdecl.} + AppInfoIface* = ref object + impl*: ptr AppInfoIface00 + +type + AppInfoMonitor* = ref object of gobject.Object + AppInfoMonitor00* = object of gobject.Object00 + +proc scChanged*(self: AppInfoMonitor; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_app_info_monitor_get*(): ptr AppInfoMonitor00 {. + importc: "g_app_info_monitor_get", libprag.} + +proc get*(): AppInfoMonitor = + let gobj = g_app_info_monitor_get() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AppInfoMonitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + AppLaunchContextClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getDisplay*: proc(context: ptr AppLaunchContext00; info: ptr AppInfo00; + files: ptr pointer): cstring {.cdecl.} + getStartupNotifyId*: proc(context: ptr AppLaunchContext00; info: ptr AppInfo00; + files: ptr pointer): cstring {.cdecl.} + launchFailed*: proc(context: ptr AppLaunchContext00; startupNotifyId: cstring) {.cdecl.} + launched*: proc(context: ptr AppLaunchContext00; info: ptr AppInfo00; + platformData: ptr glib.Variant00) {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + AppLaunchContextClass* = ref object + impl*: ptr AppLaunchContextClass00 + +type + ApplicationPrivate00* {.pure.} = object + ApplicationPrivate* = ref object + impl*: ptr ApplicationPrivate00 + +type + ApplicationCommandLinePrivate00* {.pure.} = object + ApplicationCommandLinePrivate* = ref object + impl*: ptr ApplicationCommandLinePrivate00 + +type + ApplicationCommandLine* = ref object of gobject.Object + ApplicationCommandLine00* = object of gobject.Object00 + priv1: ptr ApplicationCommandLinePrivate00 + +proc g_application_command_line_get_arguments*(self: ptr ApplicationCommandLine00; argc: var int32): cstringArray {. + importc: "g_application_command_line_get_arguments", libprag.} + +proc getArguments*(self: ApplicationCommandLine; argc: var int): cstringArray = + var argc_00 = int32(argc) + result = g_application_command_line_get_arguments(cast[ptr ApplicationCommandLine00](self.impl), argc_00) + argc = int(argc_00) + +proc arguments*(self: ApplicationCommandLine; argc: var int): cstringArray = + var argc_00 = int32(argc) + result = g_application_command_line_get_arguments(cast[ptr ApplicationCommandLine00](self.impl), argc_00) + argc = int(argc_00) + +proc g_application_command_line_get_cwd*(self: ptr ApplicationCommandLine00): ucstring {. + importc: "g_application_command_line_get_cwd", libprag.} + +proc getCwd*(self: ApplicationCommandLine): ucstring = + g_application_command_line_get_cwd(cast[ptr ApplicationCommandLine00](self.impl)) + +proc cwd*(self: ApplicationCommandLine): ucstring = + g_application_command_line_get_cwd(cast[ptr ApplicationCommandLine00](self.impl)) + +proc g_application_command_line_get_environ*(self: ptr ApplicationCommandLine00): cstringArray {. + importc: "g_application_command_line_get_environ", libprag.} + +proc getEnviron*(self: ApplicationCommandLine): cstringArray = + g_application_command_line_get_environ(cast[ptr ApplicationCommandLine00](self.impl)) + +proc environ*(self: ApplicationCommandLine): cstringArray = + g_application_command_line_get_environ(cast[ptr ApplicationCommandLine00](self.impl)) + +proc g_application_command_line_get_exit_status*(self: ptr ApplicationCommandLine00): int32 {. + importc: "g_application_command_line_get_exit_status", libprag.} + +proc getExitStatus*(self: ApplicationCommandLine): int = + int(g_application_command_line_get_exit_status(cast[ptr ApplicationCommandLine00](self.impl))) + +proc exitStatus*(self: ApplicationCommandLine): int = + int(g_application_command_line_get_exit_status(cast[ptr ApplicationCommandLine00](self.impl))) + +proc g_application_command_line_get_is_remote*(self: ptr ApplicationCommandLine00): gboolean {. + importc: "g_application_command_line_get_is_remote", libprag.} + +proc getIsRemote*(self: ApplicationCommandLine): bool = + toBool(g_application_command_line_get_is_remote(cast[ptr ApplicationCommandLine00](self.impl))) + +proc isRemote*(self: ApplicationCommandLine): bool = + toBool(g_application_command_line_get_is_remote(cast[ptr ApplicationCommandLine00](self.impl))) + +proc g_application_command_line_get_options_dict*(self: ptr ApplicationCommandLine00): ptr glib.VariantDict00 {. + importc: "g_application_command_line_get_options_dict", libprag.} + +proc getOptionsDict*(self: ApplicationCommandLine): glib.VariantDict = + new(result) + result.impl = g_application_command_line_get_options_dict(cast[ptr ApplicationCommandLine00](self.impl)) + +proc optionsDict*(self: ApplicationCommandLine): glib.VariantDict = + new(result) + result.impl = g_application_command_line_get_options_dict(cast[ptr ApplicationCommandLine00](self.impl)) + +proc g_application_command_line_get_platform_data*(self: ptr ApplicationCommandLine00): ptr glib.Variant00 {. + importc: "g_application_command_line_get_platform_data", libprag.} + +proc getPlatformData*(self: ApplicationCommandLine): glib.Variant = + new(result) + result.impl = g_application_command_line_get_platform_data(cast[ptr ApplicationCommandLine00](self.impl)) + +proc platformData*(self: ApplicationCommandLine): glib.Variant = + new(result) + result.impl = g_application_command_line_get_platform_data(cast[ptr ApplicationCommandLine00](self.impl)) + +proc g_application_command_line_getenv*(self: ptr ApplicationCommandLine00; name: cstring): cstring {. + importc: "g_application_command_line_getenv", libprag.} + +proc getenv*(self: ApplicationCommandLine; name: string): string = + let resul0 = g_application_command_line_getenv(cast[ptr ApplicationCommandLine00](self.impl), cstring(name)) + result = $resul0 + +proc env*(self: ApplicationCommandLine; name: string): string = + let resul0 = g_application_command_line_getenv(cast[ptr ApplicationCommandLine00](self.impl), cstring(name)) + result = $resul0 + +proc g_application_command_line_set_exit_status*(self: ptr ApplicationCommandLine00; exitStatus: int32) {. + importc: "g_application_command_line_set_exit_status", libprag.} + +proc setExitStatus*(self: ApplicationCommandLine; exitStatus: int) = + g_application_command_line_set_exit_status(cast[ptr ApplicationCommandLine00](self.impl), int32(exitStatus)) + +proc `exitStatus=`*(self: ApplicationCommandLine; exitStatus: int) = + g_application_command_line_set_exit_status(cast[ptr ApplicationCommandLine00](self.impl), int32(exitStatus)) + +type + File00* {.pure.} = object + File* = ref object + impl*: ptr File00 + +proc g_file_new_for_commandline_arg*(arg: cstring): ptr File00 {. + importc: "g_file_new_for_commandline_arg", libprag.} + +proc newFileForCommandlineArg*(arg: string): File = + new(result) + result.impl = g_file_new_for_commandline_arg(cstring(arg)) + +proc g_file_new_for_commandline_arg_and_cwd*(arg: cstring; cwd: ucstring): ptr File00 {. + importc: "g_file_new_for_commandline_arg_and_cwd", libprag.} + +proc newFileForCommandlineArgAndCwd*(arg: string; cwd: ucstring): File = + new(result) + result.impl = g_file_new_for_commandline_arg_and_cwd(cstring(arg), cwd) + +proc g_file_new_for_path*(path: ucstring): ptr File00 {. + importc: "g_file_new_for_path", libprag.} + +proc newFileForPath*(path: ucstring): File = + new(result) + result.impl = g_file_new_for_path(path) + +proc g_file_new_for_uri*(uri: cstring): ptr File00 {. + importc: "g_file_new_for_uri", libprag.} + +proc newFileForUri*(uri: string): File = + new(result) + result.impl = g_file_new_for_uri(cstring(uri)) + +proc g_file_parse_name*(parseName: cstring): ptr File00 {. + importc: "g_file_parse_name", libprag.} + +proc parseName*(parseName: string): File = + new(result) + result.impl = g_file_parse_name(cstring(parseName)) + +proc g_file_copy_finish*(self: ptr File00; res: ptr AsyncResult00): gboolean {. + importc: "g_file_copy_finish", libprag.} + +proc copyFinish*(self: File; res: AsyncResult): bool = + toBool(g_file_copy_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl))) + +proc g_file_delete*(self: ptr File00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_delete", libprag.} + +proc delete*(self: File; cancellable: Cancellable): bool = + toBool(g_file_delete(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_delete_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_delete_finish", libprag.} + +proc deleteFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_delete_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_dup*(self: ptr File00): ptr File00 {. + importc: "g_file_dup", libprag.} + +proc dup*(self: File): File = + new(result) + result.impl = g_file_dup(cast[ptr File00](self.impl)) + +proc g_file_eject_mountable_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_eject_mountable_finish", libprag.} + +proc ejectMountableFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_eject_mountable_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_eject_mountable_with_operation_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_eject_mountable_with_operation_finish", libprag.} + +proc ejectMountableWithOperationFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_eject_mountable_with_operation_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_equal*(self: ptr File00; file2: ptr File00): gboolean {. + importc: "g_file_equal", libprag.} + +proc equal*(self: File; file2: File): bool = + toBool(g_file_equal(cast[ptr File00](self.impl), cast[ptr File00](file2.impl))) + +proc g_file_get_basename*(self: ptr File00): ucstring {. + importc: "g_file_get_basename", libprag.} + +proc getBasename*(self: File): ucstring = + g_file_get_basename(cast[ptr File00](self.impl)) + +proc basename*(self: File): ucstring = + g_file_get_basename(cast[ptr File00](self.impl)) + +proc g_file_get_child*(self: ptr File00; name: ucstring): ptr File00 {. + importc: "g_file_get_child", libprag.} + +proc getChild*(self: File; name: ucstring): File = + new(result) + result.impl = g_file_get_child(cast[ptr File00](self.impl), name) + +proc child*(self: File; name: ucstring): File = + new(result) + result.impl = g_file_get_child(cast[ptr File00](self.impl), name) + +proc g_file_get_child_for_display_name*(self: ptr File00; displayName: cstring): ptr File00 {. + importc: "g_file_get_child_for_display_name", libprag.} + +proc getChildForDisplayName*(self: File; displayName: string): File = + new(result) + result.impl = g_file_get_child_for_display_name(cast[ptr File00](self.impl), cstring(displayName)) + +proc childForDisplayName*(self: File; displayName: string): File = + new(result) + result.impl = g_file_get_child_for_display_name(cast[ptr File00](self.impl), cstring(displayName)) + +proc g_file_get_parent*(self: ptr File00): ptr File00 {. + importc: "g_file_get_parent", libprag.} + +proc getParent*(self: File): File = + new(result) + result.impl = g_file_get_parent(cast[ptr File00](self.impl)) + +proc parent*(self: File): File = + new(result) + result.impl = g_file_get_parent(cast[ptr File00](self.impl)) + +proc g_file_get_parse_name*(self: ptr File00): cstring {. + importc: "g_file_get_parse_name", libprag.} + +proc getParseName*(self: File): string = + let resul0 = g_file_get_parse_name(cast[ptr File00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc parseName*(self: File): string = + let resul0 = g_file_get_parse_name(cast[ptr File00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_file_get_path*(self: ptr File00): ucstring {. + importc: "g_file_get_path", libprag.} + +proc getPath*(self: File): ucstring = + g_file_get_path(cast[ptr File00](self.impl)) + +proc path*(self: File): ucstring = + g_file_get_path(cast[ptr File00](self.impl)) + +proc g_file_get_relative_path*(self: ptr File00; descendant: ptr File00): ucstring {. + importc: "g_file_get_relative_path", libprag.} + +proc getRelativePath*(self: File; descendant: File): ucstring = + g_file_get_relative_path(cast[ptr File00](self.impl), cast[ptr File00](descendant.impl)) + +proc relativePath*(self: File; descendant: File): ucstring = + g_file_get_relative_path(cast[ptr File00](self.impl), cast[ptr File00](descendant.impl)) + +proc g_file_get_uri*(self: ptr File00): cstring {. + importc: "g_file_get_uri", libprag.} + +proc getUri*(self: File): string = + let resul0 = g_file_get_uri(cast[ptr File00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc uri*(self: File): string = + let resul0 = g_file_get_uri(cast[ptr File00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_file_get_uri_scheme*(self: ptr File00): cstring {. + importc: "g_file_get_uri_scheme", libprag.} + +proc getUriScheme*(self: File): string = + let resul0 = g_file_get_uri_scheme(cast[ptr File00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc uriScheme*(self: File): string = + let resul0 = g_file_get_uri_scheme(cast[ptr File00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_file_has_parent*(self: ptr File00; parent: ptr File00): gboolean {. + importc: "g_file_has_parent", libprag.} + +proc hasParent*(self: File; parent: File): bool = + toBool(g_file_has_parent(cast[ptr File00](self.impl), cast[ptr File00](parent.impl))) + +proc g_file_has_prefix*(self: ptr File00; prefix: ptr File00): gboolean {. + importc: "g_file_has_prefix", libprag.} + +proc hasPrefix*(self: File; prefix: File): bool = + toBool(g_file_has_prefix(cast[ptr File00](self.impl), cast[ptr File00](prefix.impl))) + +proc g_file_has_uri_scheme*(self: ptr File00; uriScheme: cstring): gboolean {. + importc: "g_file_has_uri_scheme", libprag.} + +proc hasUriScheme*(self: File; uriScheme: string): bool = + toBool(g_file_has_uri_scheme(cast[ptr File00](self.impl), cstring(uriScheme))) + +proc g_file_hash*(self: ptr File00): uint32 {. + importc: "g_file_hash", libprag.} + +proc hash*(self: File): int = + int(g_file_hash(cast[ptr File00](self.impl))) + +proc g_file_is_native*(self: ptr File00): gboolean {. + importc: "g_file_is_native", libprag.} + +proc isNative*(self: File): bool = + toBool(g_file_is_native(cast[ptr File00](self.impl))) + +proc g_file_load_contents*(self: ptr File00; cancellable: ptr Cancellable00; + contents: var uint8Array; length: var uint64; etagOut: var cstring): gboolean {. + importc: "g_file_load_contents", libprag.} + +proc loadContents*(self: File; cancellable: Cancellable; contents: var uint8Array; + length: var uint64; etagOut: var string): bool = + var etagOut_00 = cstring(etagOut) + result = toBool(g_file_load_contents(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl), contents, length, etagOut_00)) + etagOut = $(etagOut_00) + +proc g_file_load_contents_finish*(self: ptr File00; res: ptr AsyncResult00; contents: var uint8Array; + length: var uint64; etagOut: var cstring): gboolean {. + importc: "g_file_load_contents_finish", libprag.} + +proc loadContentsFinish*(self: File; res: AsyncResult; contents: var uint8Array; + length: var uint64; etagOut: var string): bool = + var etagOut_00 = cstring(etagOut) + result = toBool(g_file_load_contents_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl), contents, length, etagOut_00)) + etagOut = $(etagOut_00) + +proc g_file_load_partial_contents_finish*(self: ptr File00; res: ptr AsyncResult00; contents: var uint8Array; + length: var uint64; etagOut: var cstring): gboolean {. + importc: "g_file_load_partial_contents_finish", libprag.} + +proc loadPartialContentsFinish*(self: File; res: AsyncResult; contents: var uint8Array; + length: var uint64; etagOut: var string): bool = + var etagOut_00 = cstring(etagOut) + result = toBool(g_file_load_partial_contents_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl), contents, length, etagOut_00)) + etagOut = $(etagOut_00) + +proc g_file_make_directory*(self: ptr File00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_make_directory", libprag.} + +proc makeDirectory*(self: File; cancellable: Cancellable): bool = + toBool(g_file_make_directory(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_make_directory_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_make_directory_finish", libprag.} + +proc makeDirectoryFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_make_directory_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_make_directory_with_parents*(self: ptr File00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_make_directory_with_parents", libprag.} + +proc makeDirectoryWithParents*(self: File; cancellable: Cancellable): bool = + toBool(g_file_make_directory_with_parents(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_make_symbolic_link*(self: ptr File00; symlinkValue: ucstring; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_make_symbolic_link", libprag.} + +proc makeSymbolicLink*(self: File; symlinkValue: ucstring; cancellable: Cancellable): bool = + toBool(g_file_make_symbolic_link(cast[ptr File00](self.impl), symlinkValue, cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_measure_disk_usage_finish*(self: ptr File00; resu: ptr AsyncResult00; diskUsage: var uint64; + numDirs: var uint64; numFiles: var uint64): gboolean {. + importc: "g_file_measure_disk_usage_finish", libprag.} + +proc measureDiskUsageFinish*(self: File; resu: AsyncResult; diskUsage: var uint64; + numDirs: var uint64; numFiles: var uint64): bool = + toBool(g_file_measure_disk_usage_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl), diskUsage, numDirs, numFiles)) + +proc g_file_mount_enclosing_volume_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_mount_enclosing_volume_finish", libprag.} + +proc mountEnclosingVolumeFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_mount_enclosing_volume_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_mount_mountable_finish*(self: ptr File00; resu: ptr AsyncResult00): ptr File00 {. + importc: "g_file_mount_mountable_finish", libprag.} + +proc mountMountableFinish*(self: File; resu: AsyncResult): File = + new(result) + result.impl = g_file_mount_mountable_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_file_poll_mountable_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_poll_mountable_finish", libprag.} + +proc pollMountableFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_poll_mountable_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_query_default_handler*(self: ptr File00; cancellable: ptr Cancellable00): ptr AppInfo00 {. + importc: "g_file_query_default_handler", libprag.} + +proc queryDefaultHandler*(self: File; cancellable: Cancellable): AppInfo = + new(result) + result.impl = g_file_query_default_handler(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_file_query_exists*(self: ptr File00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_query_exists", libprag.} + +proc queryExists*(self: File; cancellable: Cancellable): bool = + toBool(g_file_query_exists(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_replace_contents_finish*(self: ptr File00; res: ptr AsyncResult00; newEtag: var cstring): gboolean {. + importc: "g_file_replace_contents_finish", libprag.} + +proc replaceContentsFinish*(self: File; res: AsyncResult; newEtag: var string): bool = + var newEtag_00 = cstring(newEtag) + result = toBool(g_file_replace_contents_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl), newEtag_00)) + newEtag = $(newEtag_00) + +proc g_file_resolve_relative_path*(self: ptr File00; relativePath: ucstring): ptr File00 {. + importc: "g_file_resolve_relative_path", libprag.} + +proc resolveRelativePath*(self: File; relativePath: ucstring): File = + new(result) + result.impl = g_file_resolve_relative_path(cast[ptr File00](self.impl), relativePath) + +proc g_file_set_display_name*(self: ptr File00; displayName: cstring; cancellable: ptr Cancellable00): ptr File00 {. + importc: "g_file_set_display_name", libprag.} + +proc setDisplayName*(self: File; displayName: string; cancellable: Cancellable): File = + new(result) + result.impl = g_file_set_display_name(cast[ptr File00](self.impl), cstring(displayName), cast[ptr Cancellable00](cancellable.impl)) + +proc g_file_set_display_name_finish*(self: ptr File00; res: ptr AsyncResult00): ptr File00 {. + importc: "g_file_set_display_name_finish", libprag.} + +proc setDisplayNameFinish*(self: File; res: AsyncResult): File = + new(result) + result.impl = g_file_set_display_name_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + +proc `displayNameFinish=`*(self: File; res: AsyncResult): File = + new(result) + result.impl = g_file_set_display_name_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + +proc g_file_start_mountable_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_start_mountable_finish", libprag.} + +proc startMountableFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_start_mountable_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_stop_mountable_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_stop_mountable_finish", libprag.} + +proc stopMountableFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_stop_mountable_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_supports_thread_contexts*(self: ptr File00): gboolean {. + importc: "g_file_supports_thread_contexts", libprag.} + +proc supportsThreadContexts*(self: File): bool = + toBool(g_file_supports_thread_contexts(cast[ptr File00](self.impl))) + +proc g_file_trash*(self: ptr File00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_trash", libprag.} + +proc trash*(self: File; cancellable: Cancellable): bool = + toBool(g_file_trash(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_trash_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_trash_finish", libprag.} + +proc trashFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_trash_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_unmount_mountable_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_unmount_mountable_finish", libprag.} + +proc unmountMountableFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_unmount_mountable_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_unmount_mountable_with_operation_finish*(self: ptr File00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_unmount_mountable_with_operation_finish", libprag.} + +proc unmountMountableWithOperationFinish*(self: File; resu: AsyncResult): bool = + toBool(g_file_unmount_mountable_with_operation_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +type + Application* = ref object of gobject.Object + Application00* = object of gobject.Object00 + priv1: ptr ApplicationPrivate00 + +proc scActivate*(self: Application; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCommandLine*(self: Application; p: proc (self: ptr gobject.Object00; commandLine: ApplicationCommandLine00; xdata: pointer): int32 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "command-line", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scHandleLocalOptions*(self: Application; p: proc (self: ptr gobject.Object00; options: glib.VariantDict00; xdata: pointer): int32 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "handle-local-options", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scOpen*(self: Application; p: proc (self: ptr gobject.Object00; files: File00Array; nFiles: int32; hint: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "open", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShutdown*(self: Application; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "shutdown", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStartup*(self: Application; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "startup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_application_get_default*(): ptr Application00 {. + importc: "g_application_get_default", libprag.} + +proc getDefault*(): Application = + let gobj = g_application_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Application](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): Application = + let gobj = g_application_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Application](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_application_id_is_valid*(applicationId: cstring): gboolean {. + importc: "g_application_id_is_valid", libprag.} + +proc idIsValid*(applicationId: cstring): gboolean {. + importc: "g_application_id_is_valid", libprag.} + +proc g_application_activate*(self: ptr Application00) {. + importc: "g_application_activate", libprag.} + +proc activate*(self: Application) = + g_application_activate(cast[ptr Application00](self.impl)) + +proc g_application_add_main_option*(self: ptr Application00; longName: cstring; shortName: int8; + flags: glib.OptionFlags; arg: glib.OptionArg; description: cstring; argDescription: cstring) {. + importc: "g_application_add_main_option", libprag.} + +proc addMainOption*(self: Application; longName: string; shortName: int8; + flags: glib.OptionFlags; arg: glib.OptionArg; description: string; argDescription: string) = + g_application_add_main_option(cast[ptr Application00](self.impl), cstring(longName), shortName, flags, arg, cstring(description), cstring(argDescription)) + +proc g_application_add_main_option_entries*(self: ptr Application00; entries: glib.OptionEntry00Array) {. + importc: "g_application_add_main_option_entries", libprag.} + +proc addMainOptionEntries*(self: Application; entries: glib.OptionEntry00Array) = + g_application_add_main_option_entries(cast[ptr Application00](self.impl), entries) + +proc g_application_add_option_group*(self: ptr Application00; group: ptr glib.OptionGroup00) {. + importc: "g_application_add_option_group", libprag.} + +proc addOptionGroup*(self: Application; group: glib.OptionGroup) = + g_application_add_option_group(cast[ptr Application00](self.impl), cast[ptr glib.OptionGroup00](group.impl)) + +proc g_application_bind_busy_property*(self: ptr Application00; `object`: ptr gobject.Object00; + property: cstring) {. + importc: "g_application_bind_busy_property", libprag.} + +proc bindBusyProperty*(self: Application; `object`: gobject.Object; property: string) = + g_application_bind_busy_property(cast[ptr Application00](self.impl), cast[ptr gobject.Object00](`object`.impl), cstring(property)) + +proc g_application_get_application_id*(self: ptr Application00): cstring {. + importc: "g_application_get_application_id", libprag.} + +proc getApplicationId*(self: Application): string = + let resul0 = g_application_get_application_id(cast[ptr Application00](self.impl)) + result = $resul0 + +proc applicationId*(self: Application): string = + let resul0 = g_application_get_application_id(cast[ptr Application00](self.impl)) + result = $resul0 + +proc g_application_get_dbus_object_path*(self: ptr Application00): cstring {. + importc: "g_application_get_dbus_object_path", libprag.} + +proc getDbusObjectPath*(self: Application): string = + let resul0 = g_application_get_dbus_object_path(cast[ptr Application00](self.impl)) + result = $resul0 + +proc dbusObjectPath*(self: Application): string = + let resul0 = g_application_get_dbus_object_path(cast[ptr Application00](self.impl)) + result = $resul0 + +proc g_application_get_inactivity_timeout*(self: ptr Application00): uint32 {. + importc: "g_application_get_inactivity_timeout", libprag.} + +proc getInactivityTimeout*(self: Application): int = + int(g_application_get_inactivity_timeout(cast[ptr Application00](self.impl))) + +proc inactivityTimeout*(self: Application): int = + int(g_application_get_inactivity_timeout(cast[ptr Application00](self.impl))) + +proc g_application_get_is_busy*(self: ptr Application00): gboolean {. + importc: "g_application_get_is_busy", libprag.} + +proc getIsBusy*(self: Application): bool = + toBool(g_application_get_is_busy(cast[ptr Application00](self.impl))) + +proc isBusy*(self: Application): bool = + toBool(g_application_get_is_busy(cast[ptr Application00](self.impl))) + +proc g_application_get_is_registered*(self: ptr Application00): gboolean {. + importc: "g_application_get_is_registered", libprag.} + +proc getIsRegistered*(self: Application): bool = + toBool(g_application_get_is_registered(cast[ptr Application00](self.impl))) + +proc isRegistered*(self: Application): bool = + toBool(g_application_get_is_registered(cast[ptr Application00](self.impl))) + +proc g_application_get_is_remote*(self: ptr Application00): gboolean {. + importc: "g_application_get_is_remote", libprag.} + +proc getIsRemote*(self: Application): bool = + toBool(g_application_get_is_remote(cast[ptr Application00](self.impl))) + +proc isRemote*(self: Application): bool = + toBool(g_application_get_is_remote(cast[ptr Application00](self.impl))) + +proc g_application_get_resource_base_path*(self: ptr Application00): cstring {. + importc: "g_application_get_resource_base_path", libprag.} + +proc getResourceBasePath*(self: Application): string = + let resul0 = g_application_get_resource_base_path(cast[ptr Application00](self.impl)) + result = $resul0 + +proc resourceBasePath*(self: Application): string = + let resul0 = g_application_get_resource_base_path(cast[ptr Application00](self.impl)) + result = $resul0 + +proc g_application_hold*(self: ptr Application00) {. + importc: "g_application_hold", libprag.} + +proc hold*(self: Application) = + g_application_hold(cast[ptr Application00](self.impl)) + +proc g_application_mark_busy*(self: ptr Application00) {. + importc: "g_application_mark_busy", libprag.} + +proc markBusy*(self: Application) = + g_application_mark_busy(cast[ptr Application00](self.impl)) + +proc g_application_open*(self: ptr Application00; files: ptr File00Array; nFiles: int32; + hint: cstring) {. + importc: "g_application_open", libprag.} + +proc open*(self: Application; files: ptr File00Array; nFiles: int; + hint: string) = + g_application_open(cast[ptr Application00](self.impl), files, int32(nFiles), cstring(hint)) + +proc g_application_quit*(self: ptr Application00) {. + importc: "g_application_quit", libprag.} + +proc quit*(self: Application) = + g_application_quit(cast[ptr Application00](self.impl)) + +proc g_application_register*(self: ptr Application00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_application_register", libprag.} + +proc register*(self: Application; cancellable: Cancellable): bool = + toBool(g_application_register(cast[ptr Application00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_application_release*(self: ptr Application00) {. + importc: "g_application_release", libprag.} + +proc release*(self: Application) = + g_application_release(cast[ptr Application00](self.impl)) + +proc g_application_run*(self: ptr Application00; argc: int32; argv: cstringArray): int32 {. + importc: "g_application_run", libprag.} + +proc run*(self: Application; argc: int; argv: cstringArray): int = + int(g_application_run(cast[ptr Application00](self.impl), int32(argc), argv)) + +proc g_application_set_action_group*(self: ptr Application00; actionGroup: ptr ActionGroup00) {. + importc: "g_application_set_action_group", libprag.} + +proc setActionGroup*(self: Application; actionGroup: ActionGroup) = + g_application_set_action_group(cast[ptr Application00](self.impl), cast[ptr ActionGroup00](actionGroup.impl)) + +proc `actionGroup=`*(self: Application; actionGroup: ActionGroup) = + g_application_set_action_group(cast[ptr Application00](self.impl), cast[ptr ActionGroup00](actionGroup.impl)) + +proc g_application_set_application_id*(self: ptr Application00; applicationId: cstring) {. + importc: "g_application_set_application_id", libprag.} + +proc setApplicationId*(self: Application; applicationId: string) = + g_application_set_application_id(cast[ptr Application00](self.impl), cstring(applicationId)) + +proc `applicationId=`*(self: Application; applicationId: string) = + g_application_set_application_id(cast[ptr Application00](self.impl), cstring(applicationId)) + +proc g_application_set_default*(self: ptr Application00) {. + importc: "g_application_set_default", libprag.} + +proc setDefault*(self: Application) = + g_application_set_default(cast[ptr Application00](self.impl)) + +proc `default=`*(self: Application) = + g_application_set_default(cast[ptr Application00](self.impl)) + +proc g_application_set_inactivity_timeout*(self: ptr Application00; inactivityTimeout: uint32) {. + importc: "g_application_set_inactivity_timeout", libprag.} + +proc setInactivityTimeout*(self: Application; inactivityTimeout: int) = + g_application_set_inactivity_timeout(cast[ptr Application00](self.impl), uint32(inactivityTimeout)) + +proc `inactivityTimeout=`*(self: Application; inactivityTimeout: int) = + g_application_set_inactivity_timeout(cast[ptr Application00](self.impl), uint32(inactivityTimeout)) + +proc g_application_set_resource_base_path*(self: ptr Application00; resourcePath: cstring) {. + importc: "g_application_set_resource_base_path", libprag.} + +proc setResourceBasePath*(self: Application; resourcePath: string) = + g_application_set_resource_base_path(cast[ptr Application00](self.impl), cstring(resourcePath)) + +proc `resourceBasePath=`*(self: Application; resourcePath: string) = + g_application_set_resource_base_path(cast[ptr Application00](self.impl), cstring(resourcePath)) + +proc g_application_unbind_busy_property*(self: ptr Application00; `object`: ptr gobject.Object00; + property: cstring) {. + importc: "g_application_unbind_busy_property", libprag.} + +proc unbindBusyProperty*(self: Application; `object`: gobject.Object; property: string) = + g_application_unbind_busy_property(cast[ptr Application00](self.impl), cast[ptr gobject.Object00](`object`.impl), cstring(property)) + +proc g_application_unmark_busy*(self: ptr Application00) {. + importc: "g_application_unmark_busy", libprag.} + +proc unmarkBusy*(self: Application) = + g_application_unmark_busy(cast[ptr Application00](self.impl)) + +proc g_application_withdraw_notification*(self: ptr Application00; id: cstring) {. + importc: "g_application_withdraw_notification", libprag.} + +proc withdrawNotification*(self: Application; id: string) = + g_application_withdraw_notification(cast[ptr Application00](self.impl), cstring(id)) + +proc g_application_command_line_create_file_for_arg*(self: ptr ApplicationCommandLine00; arg: cstring): ptr File00 {. + importc: "g_application_command_line_create_file_for_arg", libprag.} + +proc createFileForArg*(self: ApplicationCommandLine; arg: string): File = + new(result) + result.impl = g_application_command_line_create_file_for_arg(cast[ptr ApplicationCommandLine00](self.impl), cstring(arg)) + +type + FileEnumeratorPrivate00* {.pure.} = object + FileEnumeratorPrivate* = ref object + impl*: ptr FileEnumeratorPrivate00 + +type + FileEnumerator* = ref object of gobject.Object + FileEnumerator00* = object of gobject.Object00 + priv1: ptr FileEnumeratorPrivate00 + +proc g_file_enumerator_close*(self: ptr FileEnumerator00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_enumerator_close", libprag.} + +proc close*(self: FileEnumerator; cancellable: Cancellable): bool = + toBool(g_file_enumerator_close(cast[ptr FileEnumerator00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_enumerator_close_finish*(self: ptr FileEnumerator00; resu: ptr AsyncResult00): gboolean {. + importc: "g_file_enumerator_close_finish", libprag.} + +proc closeFinish*(self: FileEnumerator; resu: AsyncResult): bool = + toBool(g_file_enumerator_close_finish(cast[ptr FileEnumerator00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_file_enumerator_get_container*(self: ptr FileEnumerator00): ptr File00 {. + importc: "g_file_enumerator_get_container", libprag.} + +proc getContainer*(self: FileEnumerator): File = + new(result) + result.impl = g_file_enumerator_get_container(cast[ptr FileEnumerator00](self.impl)) + +proc container*(self: FileEnumerator): File = + new(result) + result.impl = g_file_enumerator_get_container(cast[ptr FileEnumerator00](self.impl)) + +proc g_file_enumerator_has_pending*(self: ptr FileEnumerator00): gboolean {. + importc: "g_file_enumerator_has_pending", libprag.} + +proc hasPending*(self: FileEnumerator): bool = + toBool(g_file_enumerator_has_pending(cast[ptr FileEnumerator00](self.impl))) + +proc g_file_enumerator_is_closed*(self: ptr FileEnumerator00): gboolean {. + importc: "g_file_enumerator_is_closed", libprag.} + +proc isClosed*(self: FileEnumerator): bool = + toBool(g_file_enumerator_is_closed(cast[ptr FileEnumerator00](self.impl))) + +proc g_file_enumerator_next_files_finish*(self: ptr FileEnumerator00; resu: ptr AsyncResult00): ptr pointer {. + importc: "g_file_enumerator_next_files_finish", libprag.} + +proc nextFilesFinish*(self: FileEnumerator; resu: AsyncResult): ptr pointer = + g_file_enumerator_next_files_finish(cast[ptr FileEnumerator00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_file_enumerator_set_pending*(self: ptr FileEnumerator00; pending: gboolean) {. + importc: "g_file_enumerator_set_pending", libprag.} + +proc setPending*(self: FileEnumerator; pending: bool) = + g_file_enumerator_set_pending(cast[ptr FileEnumerator00](self.impl), gboolean(pending)) + +proc `pending=`*(self: FileEnumerator; pending: bool) = + g_file_enumerator_set_pending(cast[ptr FileEnumerator00](self.impl), gboolean(pending)) + +proc g_file_enumerate_children_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileEnumerator00 {. + importc: "g_file_enumerate_children_finish", libprag.} + +proc enumerateChildrenFinish*(self: File; res: AsyncResult): FileEnumerator = + let gobj = g_file_enumerate_children_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileEnumerator](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + Mount00* {.pure.} = object + Mount* = ref object + impl*: ptr Mount00 + +proc g_mount_can_eject*(self: ptr Mount00): gboolean {. + importc: "g_mount_can_eject", libprag.} + +proc canEject*(self: Mount): bool = + toBool(g_mount_can_eject(cast[ptr Mount00](self.impl))) + +proc g_mount_can_unmount*(self: ptr Mount00): gboolean {. + importc: "g_mount_can_unmount", libprag.} + +proc canUnmount*(self: Mount): bool = + toBool(g_mount_can_unmount(cast[ptr Mount00](self.impl))) + +proc g_mount_eject_finish*(self: ptr Mount00; resu: ptr AsyncResult00): gboolean {. + importc: "g_mount_eject_finish", libprag.} + +proc ejectFinish*(self: Mount; resu: AsyncResult): bool = + toBool(g_mount_eject_finish(cast[ptr Mount00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_mount_eject_with_operation_finish*(self: ptr Mount00; resu: ptr AsyncResult00): gboolean {. + importc: "g_mount_eject_with_operation_finish", libprag.} + +proc ejectWithOperationFinish*(self: Mount; resu: AsyncResult): bool = + toBool(g_mount_eject_with_operation_finish(cast[ptr Mount00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_mount_get_default_location*(self: ptr Mount00): ptr File00 {. + importc: "g_mount_get_default_location", libprag.} + +proc getDefaultLocation*(self: Mount): File = + new(result) + result.impl = g_mount_get_default_location(cast[ptr Mount00](self.impl)) + +proc defaultLocation*(self: Mount): File = + new(result) + result.impl = g_mount_get_default_location(cast[ptr Mount00](self.impl)) + +proc g_mount_get_icon*(self: ptr Mount00): ptr Icon00 {. + importc: "g_mount_get_icon", libprag.} + +proc getIcon*(self: Mount): Icon = + new(result) + result.impl = g_mount_get_icon(cast[ptr Mount00](self.impl)) + +proc icon*(self: Mount): Icon = + new(result) + result.impl = g_mount_get_icon(cast[ptr Mount00](self.impl)) + +proc g_mount_get_name*(self: ptr Mount00): cstring {. + importc: "g_mount_get_name", libprag.} + +proc getName*(self: Mount): string = + let resul0 = g_mount_get_name(cast[ptr Mount00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc name*(self: Mount): string = + let resul0 = g_mount_get_name(cast[ptr Mount00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_mount_get_root*(self: ptr Mount00): ptr File00 {. + importc: "g_mount_get_root", libprag.} + +proc getRoot*(self: Mount): File = + new(result) + result.impl = g_mount_get_root(cast[ptr Mount00](self.impl)) + +proc root*(self: Mount): File = + new(result) + result.impl = g_mount_get_root(cast[ptr Mount00](self.impl)) + +proc g_mount_get_sort_key*(self: ptr Mount00): cstring {. + importc: "g_mount_get_sort_key", libprag.} + +proc getSortKey*(self: Mount): string = + let resul0 = g_mount_get_sort_key(cast[ptr Mount00](self.impl)) + result = $resul0 + +proc sortKey*(self: Mount): string = + let resul0 = g_mount_get_sort_key(cast[ptr Mount00](self.impl)) + result = $resul0 + +proc g_mount_get_symbolic_icon*(self: ptr Mount00): ptr Icon00 {. + importc: "g_mount_get_symbolic_icon", libprag.} + +proc getSymbolicIcon*(self: Mount): Icon = + new(result) + result.impl = g_mount_get_symbolic_icon(cast[ptr Mount00](self.impl)) + +proc symbolicIcon*(self: Mount): Icon = + new(result) + result.impl = g_mount_get_symbolic_icon(cast[ptr Mount00](self.impl)) + +proc g_mount_get_uuid*(self: ptr Mount00): cstring {. + importc: "g_mount_get_uuid", libprag.} + +proc getUuid*(self: Mount): string = + let resul0 = g_mount_get_uuid(cast[ptr Mount00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc uuid*(self: Mount): string = + let resul0 = g_mount_get_uuid(cast[ptr Mount00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_mount_guess_content_type_finish*(self: ptr Mount00; resu: ptr AsyncResult00): cstringArray {. + importc: "g_mount_guess_content_type_finish", libprag.} + +proc guessContentTypeFinish*(self: Mount; resu: AsyncResult): cstringArray = + g_mount_guess_content_type_finish(cast[ptr Mount00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_mount_guess_content_type_sync*(self: ptr Mount00; forceRescan: gboolean; cancellable: ptr Cancellable00): cstringArray {. + importc: "g_mount_guess_content_type_sync", libprag.} + +proc guessContentTypeSync*(self: Mount; forceRescan: bool; cancellable: Cancellable): cstringArray = + g_mount_guess_content_type_sync(cast[ptr Mount00](self.impl), gboolean(forceRescan), cast[ptr Cancellable00](cancellable.impl)) + +proc g_mount_is_shadowed*(self: ptr Mount00): gboolean {. + importc: "g_mount_is_shadowed", libprag.} + +proc isShadowed*(self: Mount): bool = + toBool(g_mount_is_shadowed(cast[ptr Mount00](self.impl))) + +proc g_mount_remount_finish*(self: ptr Mount00; resu: ptr AsyncResult00): gboolean {. + importc: "g_mount_remount_finish", libprag.} + +proc remountFinish*(self: Mount; resu: AsyncResult): bool = + toBool(g_mount_remount_finish(cast[ptr Mount00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_mount_shadow*(self: ptr Mount00) {. + importc: "g_mount_shadow", libprag.} + +proc shadow*(self: Mount) = + g_mount_shadow(cast[ptr Mount00](self.impl)) + +proc g_mount_unmount_finish*(self: ptr Mount00; resu: ptr AsyncResult00): gboolean {. + importc: "g_mount_unmount_finish", libprag.} + +proc unmountFinish*(self: Mount; resu: AsyncResult): bool = + toBool(g_mount_unmount_finish(cast[ptr Mount00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_mount_unmount_with_operation_finish*(self: ptr Mount00; resu: ptr AsyncResult00): gboolean {. + importc: "g_mount_unmount_with_operation_finish", libprag.} + +proc unmountWithOperationFinish*(self: Mount; resu: AsyncResult): bool = + toBool(g_mount_unmount_with_operation_finish(cast[ptr Mount00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_mount_unshadow*(self: ptr Mount00) {. + importc: "g_mount_unshadow", libprag.} + +proc unshadow*(self: Mount) = + g_mount_unshadow(cast[ptr Mount00](self.impl)) + +proc g_file_find_enclosing_mount*(self: ptr File00; cancellable: ptr Cancellable00): ptr Mount00 {. + importc: "g_file_find_enclosing_mount", libprag.} + +proc findEnclosingMount*(self: File; cancellable: Cancellable): Mount = + new(result) + result.impl = g_file_find_enclosing_mount(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_file_find_enclosing_mount_finish*(self: ptr File00; res: ptr AsyncResult00): ptr Mount00 {. + importc: "g_file_find_enclosing_mount_finish", libprag.} + +proc findEnclosingMountFinish*(self: File; res: AsyncResult): Mount = + new(result) + result.impl = g_file_find_enclosing_mount_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + +type + Drive00* {.pure.} = object + Drive* = ref object + impl*: ptr Drive00 + +proc g_drive_can_eject*(self: ptr Drive00): gboolean {. + importc: "g_drive_can_eject", libprag.} + +proc canEject*(self: Drive): bool = + toBool(g_drive_can_eject(cast[ptr Drive00](self.impl))) + +proc g_drive_can_poll_for_media*(self: ptr Drive00): gboolean {. + importc: "g_drive_can_poll_for_media", libprag.} + +proc canPollForMedia*(self: Drive): bool = + toBool(g_drive_can_poll_for_media(cast[ptr Drive00](self.impl))) + +proc g_drive_can_start*(self: ptr Drive00): gboolean {. + importc: "g_drive_can_start", libprag.} + +proc canStart*(self: Drive): bool = + toBool(g_drive_can_start(cast[ptr Drive00](self.impl))) + +proc g_drive_can_start_degraded*(self: ptr Drive00): gboolean {. + importc: "g_drive_can_start_degraded", libprag.} + +proc canStartDegraded*(self: Drive): bool = + toBool(g_drive_can_start_degraded(cast[ptr Drive00](self.impl))) + +proc g_drive_can_stop*(self: ptr Drive00): gboolean {. + importc: "g_drive_can_stop", libprag.} + +proc canStop*(self: Drive): bool = + toBool(g_drive_can_stop(cast[ptr Drive00](self.impl))) + +proc g_drive_eject_finish*(self: ptr Drive00; resu: ptr AsyncResult00): gboolean {. + importc: "g_drive_eject_finish", libprag.} + +proc ejectFinish*(self: Drive; resu: AsyncResult): bool = + toBool(g_drive_eject_finish(cast[ptr Drive00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_drive_eject_with_operation_finish*(self: ptr Drive00; resu: ptr AsyncResult00): gboolean {. + importc: "g_drive_eject_with_operation_finish", libprag.} + +proc ejectWithOperationFinish*(self: Drive; resu: AsyncResult): bool = + toBool(g_drive_eject_with_operation_finish(cast[ptr Drive00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_drive_enumerate_identifiers*(self: ptr Drive00): cstringArray {. + importc: "g_drive_enumerate_identifiers", libprag.} + +proc enumerateIdentifiers*(self: Drive): cstringArray = + g_drive_enumerate_identifiers(cast[ptr Drive00](self.impl)) + +proc g_drive_get_icon*(self: ptr Drive00): ptr Icon00 {. + importc: "g_drive_get_icon", libprag.} + +proc getIcon*(self: Drive): Icon = + new(result) + result.impl = g_drive_get_icon(cast[ptr Drive00](self.impl)) + +proc icon*(self: Drive): Icon = + new(result) + result.impl = g_drive_get_icon(cast[ptr Drive00](self.impl)) + +proc g_drive_get_identifier*(self: ptr Drive00; kind: cstring): cstring {. + importc: "g_drive_get_identifier", libprag.} + +proc getIdentifier*(self: Drive; kind: string): string = + let resul0 = g_drive_get_identifier(cast[ptr Drive00](self.impl), cstring(kind)) + result = $resul0 + cogfree(resul0) + +proc identifier*(self: Drive; kind: string): string = + let resul0 = g_drive_get_identifier(cast[ptr Drive00](self.impl), cstring(kind)) + result = $resul0 + cogfree(resul0) + +proc g_drive_get_name*(self: ptr Drive00): cstring {. + importc: "g_drive_get_name", libprag.} + +proc getName*(self: Drive): string = + let resul0 = g_drive_get_name(cast[ptr Drive00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc name*(self: Drive): string = + let resul0 = g_drive_get_name(cast[ptr Drive00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_drive_get_sort_key*(self: ptr Drive00): cstring {. + importc: "g_drive_get_sort_key", libprag.} + +proc getSortKey*(self: Drive): string = + let resul0 = g_drive_get_sort_key(cast[ptr Drive00](self.impl)) + result = $resul0 + +proc sortKey*(self: Drive): string = + let resul0 = g_drive_get_sort_key(cast[ptr Drive00](self.impl)) + result = $resul0 + +proc g_drive_get_symbolic_icon*(self: ptr Drive00): ptr Icon00 {. + importc: "g_drive_get_symbolic_icon", libprag.} + +proc getSymbolicIcon*(self: Drive): Icon = + new(result) + result.impl = g_drive_get_symbolic_icon(cast[ptr Drive00](self.impl)) + +proc symbolicIcon*(self: Drive): Icon = + new(result) + result.impl = g_drive_get_symbolic_icon(cast[ptr Drive00](self.impl)) + +proc g_drive_get_volumes*(self: ptr Drive00): ptr pointer {. + importc: "g_drive_get_volumes", libprag.} + +proc getVolumes*(self: Drive): ptr pointer = + g_drive_get_volumes(cast[ptr Drive00](self.impl)) + +proc volumes*(self: Drive): ptr pointer = + g_drive_get_volumes(cast[ptr Drive00](self.impl)) + +proc g_drive_has_media*(self: ptr Drive00): gboolean {. + importc: "g_drive_has_media", libprag.} + +proc hasMedia*(self: Drive): bool = + toBool(g_drive_has_media(cast[ptr Drive00](self.impl))) + +proc g_drive_has_volumes*(self: ptr Drive00): gboolean {. + importc: "g_drive_has_volumes", libprag.} + +proc hasVolumes*(self: Drive): bool = + toBool(g_drive_has_volumes(cast[ptr Drive00](self.impl))) + +proc g_drive_is_media_check_automatic*(self: ptr Drive00): gboolean {. + importc: "g_drive_is_media_check_automatic", libprag.} + +proc isMediaCheckAutomatic*(self: Drive): bool = + toBool(g_drive_is_media_check_automatic(cast[ptr Drive00](self.impl))) + +proc g_drive_is_media_removable*(self: ptr Drive00): gboolean {. + importc: "g_drive_is_media_removable", libprag.} + +proc isMediaRemovable*(self: Drive): bool = + toBool(g_drive_is_media_removable(cast[ptr Drive00](self.impl))) + +proc g_drive_is_removable*(self: ptr Drive00): gboolean {. + importc: "g_drive_is_removable", libprag.} + +proc isRemovable*(self: Drive): bool = + toBool(g_drive_is_removable(cast[ptr Drive00](self.impl))) + +proc g_drive_poll_for_media_finish*(self: ptr Drive00; resu: ptr AsyncResult00): gboolean {. + importc: "g_drive_poll_for_media_finish", libprag.} + +proc pollForMediaFinish*(self: Drive; resu: AsyncResult): bool = + toBool(g_drive_poll_for_media_finish(cast[ptr Drive00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_drive_start_finish*(self: ptr Drive00; resu: ptr AsyncResult00): gboolean {. + importc: "g_drive_start_finish", libprag.} + +proc startFinish*(self: Drive; resu: AsyncResult): bool = + toBool(g_drive_start_finish(cast[ptr Drive00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_drive_stop_finish*(self: ptr Drive00; resu: ptr AsyncResult00): gboolean {. + importc: "g_drive_stop_finish", libprag.} + +proc stopFinish*(self: Drive; resu: AsyncResult): bool = + toBool(g_drive_stop_finish(cast[ptr Drive00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_mount_get_drive*(self: ptr Mount00): ptr Drive00 {. + importc: "g_mount_get_drive", libprag.} + +proc getDrive*(self: Mount): Drive = + new(result) + result.impl = g_mount_get_drive(cast[ptr Mount00](self.impl)) + +proc drive*(self: Mount): Drive = + new(result) + result.impl = g_mount_get_drive(cast[ptr Mount00](self.impl)) + +type + DriveStartStopType* {.size: sizeof(cint), pure.} = enum + unknown = 0 + shutdown = 1 + network = 2 + multidisk = 3 + password = 4 + +proc g_drive_get_start_stop_type*(self: ptr Drive00): DriveStartStopType {. + importc: "g_drive_get_start_stop_type", libprag.} + +proc getStartStopType*(self: Drive): DriveStartStopType = + g_drive_get_start_stop_type(cast[ptr Drive00](self.impl)) + +proc startStopType*(self: Drive): DriveStartStopType = + g_drive_get_start_stop_type(cast[ptr Drive00](self.impl)) + +type + Volume00* {.pure.} = object + Volume* = ref object + impl*: ptr Volume00 + +proc g_volume_can_eject*(self: ptr Volume00): gboolean {. + importc: "g_volume_can_eject", libprag.} + +proc canEject*(self: Volume): bool = + toBool(g_volume_can_eject(cast[ptr Volume00](self.impl))) + +proc g_volume_can_mount*(self: ptr Volume00): gboolean {. + importc: "g_volume_can_mount", libprag.} + +proc canMount*(self: Volume): bool = + toBool(g_volume_can_mount(cast[ptr Volume00](self.impl))) + +proc g_volume_eject_finish*(self: ptr Volume00; resu: ptr AsyncResult00): gboolean {. + importc: "g_volume_eject_finish", libprag.} + +proc ejectFinish*(self: Volume; resu: AsyncResult): bool = + toBool(g_volume_eject_finish(cast[ptr Volume00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_volume_eject_with_operation_finish*(self: ptr Volume00; resu: ptr AsyncResult00): gboolean {. + importc: "g_volume_eject_with_operation_finish", libprag.} + +proc ejectWithOperationFinish*(self: Volume; resu: AsyncResult): bool = + toBool(g_volume_eject_with_operation_finish(cast[ptr Volume00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_volume_enumerate_identifiers*(self: ptr Volume00): cstringArray {. + importc: "g_volume_enumerate_identifiers", libprag.} + +proc enumerateIdentifiers*(self: Volume): cstringArray = + g_volume_enumerate_identifiers(cast[ptr Volume00](self.impl)) + +proc g_volume_get_activation_root*(self: ptr Volume00): ptr File00 {. + importc: "g_volume_get_activation_root", libprag.} + +proc getActivationRoot*(self: Volume): File = + new(result) + result.impl = g_volume_get_activation_root(cast[ptr Volume00](self.impl)) + +proc activationRoot*(self: Volume): File = + new(result) + result.impl = g_volume_get_activation_root(cast[ptr Volume00](self.impl)) + +proc g_volume_get_drive*(self: ptr Volume00): ptr Drive00 {. + importc: "g_volume_get_drive", libprag.} + +proc getDrive*(self: Volume): Drive = + new(result) + result.impl = g_volume_get_drive(cast[ptr Volume00](self.impl)) + +proc drive*(self: Volume): Drive = + new(result) + result.impl = g_volume_get_drive(cast[ptr Volume00](self.impl)) + +proc g_volume_get_icon*(self: ptr Volume00): ptr Icon00 {. + importc: "g_volume_get_icon", libprag.} + +proc getIcon*(self: Volume): Icon = + new(result) + result.impl = g_volume_get_icon(cast[ptr Volume00](self.impl)) + +proc icon*(self: Volume): Icon = + new(result) + result.impl = g_volume_get_icon(cast[ptr Volume00](self.impl)) + +proc g_volume_get_identifier*(self: ptr Volume00; kind: cstring): cstring {. + importc: "g_volume_get_identifier", libprag.} + +proc getIdentifier*(self: Volume; kind: string): string = + let resul0 = g_volume_get_identifier(cast[ptr Volume00](self.impl), cstring(kind)) + result = $resul0 + cogfree(resul0) + +proc identifier*(self: Volume; kind: string): string = + let resul0 = g_volume_get_identifier(cast[ptr Volume00](self.impl), cstring(kind)) + result = $resul0 + cogfree(resul0) + +proc g_volume_get_mount*(self: ptr Volume00): ptr Mount00 {. + importc: "g_volume_get_mount", libprag.} + +proc getMount*(self: Volume): Mount = + new(result) + result.impl = g_volume_get_mount(cast[ptr Volume00](self.impl)) + +proc mount*(self: Volume): Mount = + new(result) + result.impl = g_volume_get_mount(cast[ptr Volume00](self.impl)) + +proc g_volume_get_name*(self: ptr Volume00): cstring {. + importc: "g_volume_get_name", libprag.} + +proc getName*(self: Volume): string = + let resul0 = g_volume_get_name(cast[ptr Volume00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc name*(self: Volume): string = + let resul0 = g_volume_get_name(cast[ptr Volume00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_volume_get_sort_key*(self: ptr Volume00): cstring {. + importc: "g_volume_get_sort_key", libprag.} + +proc getSortKey*(self: Volume): string = + let resul0 = g_volume_get_sort_key(cast[ptr Volume00](self.impl)) + result = $resul0 + +proc sortKey*(self: Volume): string = + let resul0 = g_volume_get_sort_key(cast[ptr Volume00](self.impl)) + result = $resul0 + +proc g_volume_get_symbolic_icon*(self: ptr Volume00): ptr Icon00 {. + importc: "g_volume_get_symbolic_icon", libprag.} + +proc getSymbolicIcon*(self: Volume): Icon = + new(result) + result.impl = g_volume_get_symbolic_icon(cast[ptr Volume00](self.impl)) + +proc symbolicIcon*(self: Volume): Icon = + new(result) + result.impl = g_volume_get_symbolic_icon(cast[ptr Volume00](self.impl)) + +proc g_volume_get_uuid*(self: ptr Volume00): cstring {. + importc: "g_volume_get_uuid", libprag.} + +proc getUuid*(self: Volume): string = + let resul0 = g_volume_get_uuid(cast[ptr Volume00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc uuid*(self: Volume): string = + let resul0 = g_volume_get_uuid(cast[ptr Volume00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_volume_mount_finish*(self: ptr Volume00; resu: ptr AsyncResult00): gboolean {. + importc: "g_volume_mount_finish", libprag.} + +proc mountFinish*(self: Volume; resu: AsyncResult): bool = + toBool(g_volume_mount_finish(cast[ptr Volume00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_volume_should_automount*(self: ptr Volume00): gboolean {. + importc: "g_volume_should_automount", libprag.} + +proc shouldAutomount*(self: Volume): bool = + toBool(g_volume_should_automount(cast[ptr Volume00](self.impl))) + +proc g_mount_get_volume*(self: ptr Mount00): ptr Volume00 {. + importc: "g_mount_get_volume", libprag.} + +proc getVolume*(self: Mount): Volume = + new(result) + result.impl = g_mount_get_volume(cast[ptr Mount00](self.impl)) + +proc volume*(self: Mount): Volume = + new(result) + result.impl = g_mount_get_volume(cast[ptr Mount00](self.impl)) + +type + FileMonitorFlag* {.size: sizeof(cint), pure.} = enum + watchMounts = 1 + sendMoved = 2 + watchHardLinks = 3 + watchMoves = 4 + + FileMonitorFlags* {.size: sizeof(cint).} = set[FileMonitorFlag] + +type + FileMonitorPrivate00* {.pure.} = object + FileMonitorPrivate* = ref object + impl*: ptr FileMonitorPrivate00 + +type + FileMonitorEvent* {.size: sizeof(cint), pure.} = enum + changed = 0 + changesDoneHint = 1 + deleted = 2 + created = 3 + attributeChanged = 4 + preUnmount = 5 + unmounted = 6 + moved = 7 + renamed = 8 + movedIn = 9 + movedOut = 10 + +type + FileMonitor* = ref object of gobject.Object + FileMonitor00* = object of gobject.Object00 + priv1: ptr FileMonitorPrivate00 + +proc scChanged*(self: FileMonitor; p: proc (self: ptr gobject.Object00; file: File00; otherFile: File00; eventType: FileMonitorEvent; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_file_monitor_cancel*(self: ptr FileMonitor00): gboolean {. + importc: "g_file_monitor_cancel", libprag.} + +proc cancel*(self: FileMonitor): bool = + toBool(g_file_monitor_cancel(cast[ptr FileMonitor00](self.impl))) + +proc g_file_monitor_emit_event*(self: ptr FileMonitor00; child: ptr File00; otherFile: ptr File00; + eventType: FileMonitorEvent) {. + importc: "g_file_monitor_emit_event", libprag.} + +proc emitEvent*(self: FileMonitor; child: File; otherFile: File; eventType: FileMonitorEvent) = + g_file_monitor_emit_event(cast[ptr FileMonitor00](self.impl), cast[ptr File00](child.impl), cast[ptr File00](otherFile.impl), eventType) + +proc g_file_monitor_is_cancelled*(self: ptr FileMonitor00): gboolean {. + importc: "g_file_monitor_is_cancelled", libprag.} + +proc isCancelled*(self: FileMonitor): bool = + toBool(g_file_monitor_is_cancelled(cast[ptr FileMonitor00](self.impl))) + +proc g_file_monitor_set_rate_limit*(self: ptr FileMonitor00; limitMsecs: int32) {. + importc: "g_file_monitor_set_rate_limit", libprag.} + +proc setRateLimit*(self: FileMonitor; limitMsecs: int) = + g_file_monitor_set_rate_limit(cast[ptr FileMonitor00](self.impl), int32(limitMsecs)) + +proc `rateLimit=`*(self: FileMonitor; limitMsecs: int) = + g_file_monitor_set_rate_limit(cast[ptr FileMonitor00](self.impl), int32(limitMsecs)) + +proc g_file_monitor*(self: ptr File00; flags: FileMonitorFlags; cancellable: ptr Cancellable00): ptr FileMonitor00 {. + importc: "g_file_monitor", libprag.} + +proc monitor*(self: File; flags: FileMonitorFlags; cancellable: Cancellable): FileMonitor = + let gobj = g_file_monitor(cast[ptr File00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileMonitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_monitor_directory*(self: ptr File00; flags: FileMonitorFlags; cancellable: ptr Cancellable00): ptr FileMonitor00 {. + importc: "g_file_monitor_directory", libprag.} + +proc monitorDirectory*(self: File; flags: FileMonitorFlags; cancellable: Cancellable): FileMonitor = + let gobj = g_file_monitor_directory(cast[ptr File00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileMonitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_monitor_file*(self: ptr File00; flags: FileMonitorFlags; cancellable: ptr Cancellable00): ptr FileMonitor00 {. + importc: "g_file_monitor_file", libprag.} + +proc monitorFile*(self: File; flags: FileMonitorFlags; cancellable: Cancellable): FileMonitor = + let gobj = g_file_monitor_file(cast[ptr File00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileMonitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + MountMountFlags* {.size: sizeof(cint), pure.} = enum + none = 0 + +type + MountOperationPrivate00* {.pure.} = object + MountOperationPrivate* = ref object + impl*: ptr MountOperationPrivate00 + +type + AskPasswordFlag* {.size: sizeof(cint), pure.} = enum + needPassword = 1 + needUsername = 2 + needDomain = 3 + savingSupported = 4 + anonymousSupported = 5 + + AskPasswordFlags* {.size: sizeof(cint).} = set[AskPasswordFlag] + +type + MountOperationResult* {.size: sizeof(cint), pure.} = enum + handled = 0 + aborted = 1 + unhandled = 2 + +type + MountOperation* = ref object of gobject.Object + MountOperation00* = object of gobject.Object00 + priv1: ptr MountOperationPrivate00 + +proc scAborted*(self: MountOperation; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "aborted", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scAskPassword*(self: MountOperation; p: proc (self: ptr gobject.Object00; message: cstring; defaultUser: cstring; defaultDomain: cstring; + flags: AskPasswordFlags; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "ask-password", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scAskQuestion*(self: MountOperation; p: proc (self: ptr gobject.Object00; message: cstring; choices: cstringArray; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "ask-question", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scReply*(self: MountOperation; p: proc (self: ptr gobject.Object00; resu: MountOperationResult; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "reply", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShowProcesses*(self: MountOperation; p: proc (self: ptr gobject.Object00; message: cstring; processes: ptr Array; choices: cstringArray; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-processes", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShowUnmountProgress*(self: MountOperation; p: proc (self: ptr gobject.Object00; message: cstring; timeLeft: int64; bytesLeft: int64; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-unmount-progress", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_mount_operation_new*(): ptr MountOperation00 {. + importc: "g_mount_operation_new", libprag.} + +proc newMountOperation*(): MountOperation = + new(result, finalizeGObject) + result.impl = g_mount_operation_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMountOperation*[T](result: var T) = + assert(result is MountOperation) + new(result, finalizeGObject) + result.impl = g_mount_operation_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_mount_operation_get_anonymous*(self: ptr MountOperation00): gboolean {. + importc: "g_mount_operation_get_anonymous", libprag.} + +proc getAnonymous*(self: MountOperation): bool = + toBool(g_mount_operation_get_anonymous(cast[ptr MountOperation00](self.impl))) + +proc anonymous*(self: MountOperation): bool = + toBool(g_mount_operation_get_anonymous(cast[ptr MountOperation00](self.impl))) + +proc g_mount_operation_get_choice*(self: ptr MountOperation00): int32 {. + importc: "g_mount_operation_get_choice", libprag.} + +proc getChoice*(self: MountOperation): int = + int(g_mount_operation_get_choice(cast[ptr MountOperation00](self.impl))) + +proc choice*(self: MountOperation): int = + int(g_mount_operation_get_choice(cast[ptr MountOperation00](self.impl))) + +proc g_mount_operation_get_domain*(self: ptr MountOperation00): cstring {. + importc: "g_mount_operation_get_domain", libprag.} + +proc getDomain*(self: MountOperation): string = + let resul0 = g_mount_operation_get_domain(cast[ptr MountOperation00](self.impl)) + result = $resul0 + +proc domain*(self: MountOperation): string = + let resul0 = g_mount_operation_get_domain(cast[ptr MountOperation00](self.impl)) + result = $resul0 + +proc g_mount_operation_get_password*(self: ptr MountOperation00): cstring {. + importc: "g_mount_operation_get_password", libprag.} + +proc getPassword*(self: MountOperation): string = + let resul0 = g_mount_operation_get_password(cast[ptr MountOperation00](self.impl)) + result = $resul0 + +proc password*(self: MountOperation): string = + let resul0 = g_mount_operation_get_password(cast[ptr MountOperation00](self.impl)) + result = $resul0 + +proc g_mount_operation_get_username*(self: ptr MountOperation00): cstring {. + importc: "g_mount_operation_get_username", libprag.} + +proc getUsername*(self: MountOperation): string = + let resul0 = g_mount_operation_get_username(cast[ptr MountOperation00](self.impl)) + result = $resul0 + +proc username*(self: MountOperation): string = + let resul0 = g_mount_operation_get_username(cast[ptr MountOperation00](self.impl)) + result = $resul0 + +proc g_mount_operation_reply*(self: ptr MountOperation00; resu: MountOperationResult) {. + importc: "g_mount_operation_reply", libprag.} + +proc reply*(self: MountOperation; resu: MountOperationResult) = + g_mount_operation_reply(cast[ptr MountOperation00](self.impl), resu) + +proc g_mount_operation_set_anonymous*(self: ptr MountOperation00; anonymous: gboolean) {. + importc: "g_mount_operation_set_anonymous", libprag.} + +proc setAnonymous*(self: MountOperation; anonymous: bool) = + g_mount_operation_set_anonymous(cast[ptr MountOperation00](self.impl), gboolean(anonymous)) + +proc `anonymous=`*(self: MountOperation; anonymous: bool) = + g_mount_operation_set_anonymous(cast[ptr MountOperation00](self.impl), gboolean(anonymous)) + +proc g_mount_operation_set_choice*(self: ptr MountOperation00; choice: int32) {. + importc: "g_mount_operation_set_choice", libprag.} + +proc setChoice*(self: MountOperation; choice: int) = + g_mount_operation_set_choice(cast[ptr MountOperation00](self.impl), int32(choice)) + +proc `choice=`*(self: MountOperation; choice: int) = + g_mount_operation_set_choice(cast[ptr MountOperation00](self.impl), int32(choice)) + +proc g_mount_operation_set_domain*(self: ptr MountOperation00; domain: cstring) {. + importc: "g_mount_operation_set_domain", libprag.} + +proc setDomain*(self: MountOperation; domain: string) = + g_mount_operation_set_domain(cast[ptr MountOperation00](self.impl), cstring(domain)) + +proc `domain=`*(self: MountOperation; domain: string) = + g_mount_operation_set_domain(cast[ptr MountOperation00](self.impl), cstring(domain)) + +proc g_mount_operation_set_password*(self: ptr MountOperation00; password: cstring) {. + importc: "g_mount_operation_set_password", libprag.} + +proc setPassword*(self: MountOperation; password: string) = + g_mount_operation_set_password(cast[ptr MountOperation00](self.impl), cstring(password)) + +proc `password=`*(self: MountOperation; password: string) = + g_mount_operation_set_password(cast[ptr MountOperation00](self.impl), cstring(password)) + +proc g_mount_operation_set_username*(self: ptr MountOperation00; username: cstring) {. + importc: "g_mount_operation_set_username", libprag.} + +proc setUsername*(self: MountOperation; username: string) = + g_mount_operation_set_username(cast[ptr MountOperation00](self.impl), cstring(username)) + +proc `username=`*(self: MountOperation; username: string) = + g_mount_operation_set_username(cast[ptr MountOperation00](self.impl), cstring(username)) + +type + PasswordSave* {.size: sizeof(cint), pure.} = enum + never = 0 + forSession = 1 + permanently = 2 + +proc g_mount_operation_get_password_save*(self: ptr MountOperation00): PasswordSave {. + importc: "g_mount_operation_get_password_save", libprag.} + +proc getPasswordSave*(self: MountOperation): PasswordSave = + g_mount_operation_get_password_save(cast[ptr MountOperation00](self.impl)) + +proc passwordSave*(self: MountOperation): PasswordSave = + g_mount_operation_get_password_save(cast[ptr MountOperation00](self.impl)) + +proc g_mount_operation_set_password_save*(self: ptr MountOperation00; save: PasswordSave) {. + importc: "g_mount_operation_set_password_save", libprag.} + +proc setPasswordSave*(self: MountOperation; save: PasswordSave) = + g_mount_operation_set_password_save(cast[ptr MountOperation00](self.impl), save) + +proc `passwordSave=`*(self: MountOperation; save: PasswordSave) = + g_mount_operation_set_password_save(cast[ptr MountOperation00](self.impl), save) + +type + FileCopyFlag* {.size: sizeof(cint), pure.} = enum + overwrite = 1 + backup = 2 + nofollowSymlinks = 3 + allMetadata = 4 + noFallbackForMove = 5 + targetDefaultPerms = 6 + + FileCopyFlags* {.size: sizeof(cint).} = set[FileCopyFlag] + +proc g_file_copy_attributes*(self: ptr File00; destination: ptr File00; flags: FileCopyFlags; + cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_copy_attributes", libprag.} + +proc copyAttributes*(self: File; destination: File; flags: FileCopyFlags; + cancellable: Cancellable): bool = + toBool(g_file_copy_attributes(cast[ptr File00](self.impl), cast[ptr File00](destination.impl), flags, cast[ptr Cancellable00](cancellable.impl))) + +type + OutputStreamPrivate00* {.pure.} = object + OutputStreamPrivate* = ref object + impl*: ptr OutputStreamPrivate00 + +type + OutputStream* = ref object of gobject.Object + OutputStream00* = object of gobject.Object00 + priv1: ptr OutputStreamPrivate00 + +proc g_output_stream_clear_pending*(self: ptr OutputStream00) {. + importc: "g_output_stream_clear_pending", libprag.} + +proc clearPending*(self: OutputStream) = + g_output_stream_clear_pending(cast[ptr OutputStream00](self.impl)) + +proc g_output_stream_close*(self: ptr OutputStream00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_output_stream_close", libprag.} + +proc close*(self: OutputStream; cancellable: Cancellable): bool = + toBool(g_output_stream_close(cast[ptr OutputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_output_stream_close_finish*(self: ptr OutputStream00; resu: ptr AsyncResult00): gboolean {. + importc: "g_output_stream_close_finish", libprag.} + +proc closeFinish*(self: OutputStream; resu: AsyncResult): bool = + toBool(g_output_stream_close_finish(cast[ptr OutputStream00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_output_stream_flush*(self: ptr OutputStream00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_output_stream_flush", libprag.} + +proc flush*(self: OutputStream; cancellable: Cancellable): bool = + toBool(g_output_stream_flush(cast[ptr OutputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_output_stream_flush_finish*(self: ptr OutputStream00; resu: ptr AsyncResult00): gboolean {. + importc: "g_output_stream_flush_finish", libprag.} + +proc flushFinish*(self: OutputStream; resu: AsyncResult): bool = + toBool(g_output_stream_flush_finish(cast[ptr OutputStream00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_output_stream_has_pending*(self: ptr OutputStream00): gboolean {. + importc: "g_output_stream_has_pending", libprag.} + +proc hasPending*(self: OutputStream): bool = + toBool(g_output_stream_has_pending(cast[ptr OutputStream00](self.impl))) + +proc g_output_stream_is_closed*(self: ptr OutputStream00): gboolean {. + importc: "g_output_stream_is_closed", libprag.} + +proc isClosed*(self: OutputStream): bool = + toBool(g_output_stream_is_closed(cast[ptr OutputStream00](self.impl))) + +proc g_output_stream_is_closing*(self: ptr OutputStream00): gboolean {. + importc: "g_output_stream_is_closing", libprag.} + +proc isClosing*(self: OutputStream): bool = + toBool(g_output_stream_is_closing(cast[ptr OutputStream00](self.impl))) + +proc g_output_stream_set_pending*(self: ptr OutputStream00): gboolean {. + importc: "g_output_stream_set_pending", libprag.} + +proc setPending*(self: OutputStream): bool = + toBool(g_output_stream_set_pending(cast[ptr OutputStream00](self.impl))) + +proc `pending=`*(self: OutputStream): bool = + toBool(g_output_stream_set_pending(cast[ptr OutputStream00](self.impl))) + +proc g_output_stream_splice_finish*(self: ptr OutputStream00; resu: ptr AsyncResult00): int64 {. + importc: "g_output_stream_splice_finish", libprag.} + +proc spliceFinish*(self: OutputStream; resu: AsyncResult): int64 = + g_output_stream_splice_finish(cast[ptr OutputStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_output_stream_write*(self: ptr OutputStream00; buffer: uint8Array; count: uint64; + cancellable: ptr Cancellable00): int64 {. + importc: "g_output_stream_write", libprag.} + +proc write*(self: OutputStream; buffer: uint8Array; count: uint64; + cancellable: Cancellable): int64 = + g_output_stream_write(cast[ptr OutputStream00](self.impl), buffer, count, cast[ptr Cancellable00](cancellable.impl)) + +proc g_output_stream_write_all*(self: ptr OutputStream00; buffer: uint8Array; count: uint64; + bytesWritten: var uint64; cancellable: ptr Cancellable00): gboolean {. + importc: "g_output_stream_write_all", libprag.} + +proc writeAll*(self: OutputStream; buffer: uint8Array; count: uint64; + bytesWritten: var uint64; cancellable: Cancellable): bool = + toBool(g_output_stream_write_all(cast[ptr OutputStream00](self.impl), buffer, count, bytesWritten, cast[ptr Cancellable00](cancellable.impl))) + +proc g_output_stream_write_all_finish*(self: ptr OutputStream00; resu: ptr AsyncResult00; + bytesWritten: var uint64): gboolean {. + importc: "g_output_stream_write_all_finish", libprag.} + +proc writeAllFinish*(self: OutputStream; resu: AsyncResult; bytesWritten: var uint64): bool = + toBool(g_output_stream_write_all_finish(cast[ptr OutputStream00](self.impl), cast[ptr AsyncResult00](resu.impl), bytesWritten)) + +proc g_output_stream_write_bytes*(self: ptr OutputStream00; bytes: ptr glib.Bytes00; + cancellable: ptr Cancellable00): int64 {. + importc: "g_output_stream_write_bytes", libprag.} + +proc writeBytes*(self: OutputStream; bytes: glib.Bytes; cancellable: Cancellable): int64 = + g_output_stream_write_bytes(cast[ptr OutputStream00](self.impl), cast[ptr glib.Bytes00](bytes.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_output_stream_write_bytes_finish*(self: ptr OutputStream00; resu: ptr AsyncResult00): int64 {. + importc: "g_output_stream_write_bytes_finish", libprag.} + +proc writeBytesFinish*(self: OutputStream; resu: AsyncResult): int64 = + g_output_stream_write_bytes_finish(cast[ptr OutputStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_output_stream_write_finish*(self: ptr OutputStream00; resu: ptr AsyncResult00): int64 {. + importc: "g_output_stream_write_finish", libprag.} + +proc writeFinish*(self: OutputStream; resu: AsyncResult): int64 = + g_output_stream_write_finish(cast[ptr OutputStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +type + FileOutputStreamPrivate00* {.pure.} = object + FileOutputStreamPrivate* = ref object + impl*: ptr FileOutputStreamPrivate00 + +type + FileOutputStream* = ref object of OutputStream + FileOutputStream00* = object of OutputStream00 + priv2: ptr FileOutputStreamPrivate00 + +proc g_file_output_stream_get_etag*(self: ptr FileOutputStream00): cstring {. + importc: "g_file_output_stream_get_etag", libprag.} + +proc getEtag*(self: FileOutputStream): string = + let resul0 = g_file_output_stream_get_etag(cast[ptr FileOutputStream00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc etag*(self: FileOutputStream): string = + let resul0 = g_file_output_stream_get_etag(cast[ptr FileOutputStream00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_file_append_to_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileOutputStream00 {. + importc: "g_file_append_to_finish", libprag.} + +proc appendToFinish*(self: File; res: AsyncResult): FileOutputStream = + let gobj = g_file_append_to_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileOutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_create_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileOutputStream00 {. + importc: "g_file_create_finish", libprag.} + +proc createFinish*(self: File; res: AsyncResult): FileOutputStream = + let gobj = g_file_create_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileOutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_replace_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileOutputStream00 {. + importc: "g_file_replace_finish", libprag.} + +proc replaceFinish*(self: File; res: AsyncResult): FileOutputStream = + let gobj = g_file_replace_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileOutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + FileCreateFlag* {.size: sizeof(cint), pure.} = enum + private = 1 + replaceDestination = 2 + + FileCreateFlags* {.size: sizeof(cint).} = set[FileCreateFlag] + +proc g_file_append_to*(self: ptr File00; flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileOutputStream00 {. + importc: "g_file_append_to", libprag.} + +proc appendTo*(self: File; flags: FileCreateFlags; cancellable: Cancellable): FileOutputStream = + let gobj = g_file_append_to(cast[ptr File00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileOutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_create*(self: ptr File00; flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileOutputStream00 {. + importc: "g_file_create", libprag.} + +proc create*(self: File; flags: FileCreateFlags; cancellable: Cancellable): FileOutputStream = + let gobj = g_file_create(cast[ptr File00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileOutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_replace*(self: ptr File00; etag: cstring; makeBackup: gboolean; + flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileOutputStream00 {. + importc: "g_file_replace", libprag.} + +proc replace*(self: File; etag: string; makeBackup: bool; flags: FileCreateFlags; + cancellable: Cancellable): FileOutputStream = + let gobj = g_file_replace(cast[ptr File00](self.impl), cstring(etag), gboolean(makeBackup), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileOutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_replace_contents*(self: ptr File00; contents: uint8Array; length: uint64; + etag: cstring; makeBackup: gboolean; flags: FileCreateFlags; newEtag: var cstring; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_replace_contents", libprag.} + +proc replaceContents*(self: File; contents: uint8Array; length: uint64; + etag: string; makeBackup: bool; flags: FileCreateFlags; newEtag: var string; cancellable: Cancellable): bool = + var newEtag_00 = cstring(newEtag) + result = toBool(g_file_replace_contents(cast[ptr File00](self.impl), contents, length, cstring(etag), gboolean(makeBackup), flags, newEtag_00, cast[ptr Cancellable00](cancellable.impl))) + newEtag = $(newEtag_00) + +type + IOStreamPrivate00* {.pure.} = object + IOStreamPrivate* = ref object + impl*: ptr IOStreamPrivate00 + +type + IOStream* = ref object of gobject.Object + IOStream00* = object of gobject.Object00 + priv1: ptr IOStreamPrivate00 + +proc g_io_stream_splice_finish*(resu: ptr AsyncResult00): gboolean {. + importc: "g_io_stream_splice_finish", libprag.} + +proc spliceFinish*(resu: AsyncResult): bool = + toBool(g_io_stream_splice_finish(cast[ptr AsyncResult00](resu.impl))) + +proc g_io_stream_clear_pending*(self: ptr IOStream00) {. + importc: "g_io_stream_clear_pending", libprag.} + +proc clearPending*(self: IOStream) = + g_io_stream_clear_pending(cast[ptr IOStream00](self.impl)) + +proc g_io_stream_close*(self: ptr IOStream00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_io_stream_close", libprag.} + +proc close*(self: IOStream; cancellable: Cancellable): bool = + toBool(g_io_stream_close(cast[ptr IOStream00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_io_stream_close_finish*(self: ptr IOStream00; resu: ptr AsyncResult00): gboolean {. + importc: "g_io_stream_close_finish", libprag.} + +proc closeFinish*(self: IOStream; resu: AsyncResult): bool = + toBool(g_io_stream_close_finish(cast[ptr IOStream00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_io_stream_get_output_stream*(self: ptr IOStream00): ptr OutputStream00 {. + importc: "g_io_stream_get_output_stream", libprag.} + +proc getOutputStream*(self: IOStream): OutputStream = + let gobj = g_io_stream_get_output_stream(cast[ptr IOStream00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[OutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc outputStream*(self: IOStream): OutputStream = + let gobj = g_io_stream_get_output_stream(cast[ptr IOStream00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[OutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_io_stream_has_pending*(self: ptr IOStream00): gboolean {. + importc: "g_io_stream_has_pending", libprag.} + +proc hasPending*(self: IOStream): bool = + toBool(g_io_stream_has_pending(cast[ptr IOStream00](self.impl))) + +proc g_io_stream_is_closed*(self: ptr IOStream00): gboolean {. + importc: "g_io_stream_is_closed", libprag.} + +proc isClosed*(self: IOStream): bool = + toBool(g_io_stream_is_closed(cast[ptr IOStream00](self.impl))) + +proc g_io_stream_set_pending*(self: ptr IOStream00): gboolean {. + importc: "g_io_stream_set_pending", libprag.} + +proc setPending*(self: IOStream): bool = + toBool(g_io_stream_set_pending(cast[ptr IOStream00](self.impl))) + +proc `pending=`*(self: IOStream): bool = + toBool(g_io_stream_set_pending(cast[ptr IOStream00](self.impl))) + +type + FileIOStreamPrivate00* {.pure.} = object + FileIOStreamPrivate* = ref object + impl*: ptr FileIOStreamPrivate00 + +type + FileIOStream* = ref object of IOStream + FileIOStream00* = object of IOStream00 + priv2: ptr FileIOStreamPrivate00 + +proc g_file_io_stream_get_etag*(self: ptr FileIOStream00): cstring {. + importc: "g_file_io_stream_get_etag", libprag.} + +proc getEtag*(self: FileIOStream): string = + let resul0 = g_file_io_stream_get_etag(cast[ptr FileIOStream00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc etag*(self: FileIOStream): string = + let resul0 = g_file_io_stream_get_etag(cast[ptr FileIOStream00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_file_new_tmp*(tmpl: ucstring; iostream: var ptr FileIOStream00): ptr File00 {. + importc: "g_file_new_tmp", libprag.} + +proc newTmp*(tmpl: ucstring; iostream: var ptr FileIOStream00): ptr File00 {. + importc: "g_file_new_tmp", libprag.} + +proc g_file_create_readwrite*(self: ptr File00; flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileIOStream00 {. + importc: "g_file_create_readwrite", libprag.} + +proc createReadwrite*(self: File; flags: FileCreateFlags; cancellable: Cancellable): FileIOStream = + let gobj = g_file_create_readwrite(cast[ptr File00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileIOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_create_readwrite_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileIOStream00 {. + importc: "g_file_create_readwrite_finish", libprag.} + +proc createReadwriteFinish*(self: File; res: AsyncResult): FileIOStream = + let gobj = g_file_create_readwrite_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileIOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_open_readwrite*(self: ptr File00; cancellable: ptr Cancellable00): ptr FileIOStream00 {. + importc: "g_file_open_readwrite", libprag.} + +proc openReadwrite*(self: File; cancellable: Cancellable): FileIOStream = + let gobj = g_file_open_readwrite(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileIOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_open_readwrite_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileIOStream00 {. + importc: "g_file_open_readwrite_finish", libprag.} + +proc openReadwriteFinish*(self: File; res: AsyncResult): FileIOStream = + let gobj = g_file_open_readwrite_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileIOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_replace_readwrite*(self: ptr File00; etag: cstring; makeBackup: gboolean; + flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileIOStream00 {. + importc: "g_file_replace_readwrite", libprag.} + +proc replaceReadwrite*(self: File; etag: string; makeBackup: bool; flags: FileCreateFlags; + cancellable: Cancellable): FileIOStream = + let gobj = g_file_replace_readwrite(cast[ptr File00](self.impl), cstring(etag), gboolean(makeBackup), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileIOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_replace_readwrite_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileIOStream00 {. + importc: "g_file_replace_readwrite_finish", libprag.} + +proc replaceReadwriteFinish*(self: File; res: AsyncResult): FileIOStream = + let gobj = g_file_replace_readwrite_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileIOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + IOStreamSpliceFlag* {.size: sizeof(cint), pure.} = enum + closeStream1 = 1 + closeStream2 = 2 + waitForBoth = 3 + + IOStreamSpliceFlags* {.size: sizeof(cint).} = set[IOStreamSpliceFlag] + +type + FileAttributeType* {.size: sizeof(cint), pure.} = enum + invalid = 0 + string = 1 + byteString = 2 + boolean = 3 + uint32 = 4 + int32 = 5 + uint64 = 6 + int64 = 7 + `object` = 8 + stringv = 9 + +type + FileAttributeInfoFlag* {.size: sizeof(cint), pure.} = enum + copyWithFile = 1 + copyWhenMoved = 2 + + FileAttributeInfoFlags* {.size: sizeof(cint).} = set[FileAttributeInfoFlag] + +type + FileAttributeInfo00* {.pure.} = object + name*: cstring + `type`*: FileAttributeType + flags*: FileAttributeInfoFlags + FileAttributeInfo* = ref object + impl*: ptr FileAttributeInfo00 + +type + FileAttributeInfoList00* {.pure.} = object + infos*: ptr FileAttributeInfo00 + nInfos*: int32 + FileAttributeInfoList* = ref object + impl*: ptr FileAttributeInfoList00 + +proc g_file_attribute_info_list_new*(): ptr FileAttributeInfoList00 {. + importc: "g_file_attribute_info_list_new", libprag.} + +proc newFileAttributeInfoList*(): FileAttributeInfoList = + new(result) + result.impl = g_file_attribute_info_list_new() + +proc initFileAttributeInfoList*[T](result: var T) = + assert(result is FileAttributeInfoList) + new(result) + result.impl = g_file_attribute_info_list_new() + +proc g_file_attribute_info_list_add*(self: ptr FileAttributeInfoList00; name: cstring; + `type`: FileAttributeType; flags: FileAttributeInfoFlags) {. + importc: "g_file_attribute_info_list_add", libprag.} + +proc add*(self: FileAttributeInfoList; name: string; `type`: FileAttributeType; + flags: FileAttributeInfoFlags) = + g_file_attribute_info_list_add(cast[ptr FileAttributeInfoList00](self.impl), cstring(name), `type`, flags) + +proc g_file_attribute_info_list_dup*(self: ptr FileAttributeInfoList00): ptr FileAttributeInfoList00 {. + importc: "g_file_attribute_info_list_dup", libprag.} + +proc dup*(self: FileAttributeInfoList): FileAttributeInfoList = + new(result) + result.impl = g_file_attribute_info_list_dup(cast[ptr FileAttributeInfoList00](self.impl)) + +proc g_file_attribute_info_list_lookup*(self: ptr FileAttributeInfoList00; name: cstring): ptr FileAttributeInfo00 {. + importc: "g_file_attribute_info_list_lookup", libprag.} + +proc lookup*(self: FileAttributeInfoList; name: string): FileAttributeInfo = + new(result) + result.impl = g_file_attribute_info_list_lookup(cast[ptr FileAttributeInfoList00](self.impl), cstring(name)) + +proc g_file_attribute_info_list_ref*(self: ptr FileAttributeInfoList00): ptr FileAttributeInfoList00 {. + importc: "g_file_attribute_info_list_ref", libprag.} + +proc `ref`*(self: FileAttributeInfoList): FileAttributeInfoList = + new(result) + result.impl = g_file_attribute_info_list_ref(cast[ptr FileAttributeInfoList00](self.impl)) + +proc g_file_attribute_info_list_unref*(self: ptr FileAttributeInfoList00) {. + importc: "g_file_attribute_info_list_unref", libprag.} + +proc unref*(self: FileAttributeInfoList) = + g_file_attribute_info_list_unref(cast[ptr FileAttributeInfoList00](self.impl)) + +proc g_file_query_settable_attributes*(self: ptr File00; cancellable: ptr Cancellable00): ptr FileAttributeInfoList00 {. + importc: "g_file_query_settable_attributes", libprag.} + +proc querySettableAttributes*(self: File; cancellable: Cancellable): FileAttributeInfoList = + new(result) + result.impl = g_file_query_settable_attributes(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_file_query_writable_namespaces*(self: ptr File00; cancellable: ptr Cancellable00): ptr FileAttributeInfoList00 {. + importc: "g_file_query_writable_namespaces", libprag.} + +proc queryWritableNamespaces*(self: File; cancellable: Cancellable): FileAttributeInfoList = + new(result) + result.impl = g_file_query_writable_namespaces(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +type + FileQueryInfoFlag* {.size: sizeof(cint), pure.} = enum + nofollowSymlinks = 1 + + FileQueryInfoFlags* {.size: sizeof(cint).} = set[FileQueryInfoFlag] + +proc g_file_enumerate_children*(self: ptr File00; attributes: cstring; flags: FileQueryInfoFlags; + cancellable: ptr Cancellable00): ptr FileEnumerator00 {. + importc: "g_file_enumerate_children", libprag.} + +proc enumerateChildren*(self: File; attributes: string; flags: FileQueryInfoFlags; + cancellable: Cancellable): FileEnumerator = + let gobj = g_file_enumerate_children(cast[ptr File00](self.impl), cstring(attributes), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileEnumerator](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_set_attribute*(self: ptr File00; attribute: cstring; `type`: FileAttributeType; + valueP: pointer; flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_set_attribute", libprag.} + +proc setAttribute*(self: File; attribute: string; `type`: FileAttributeType; + valueP: pointer; flags: FileQueryInfoFlags; cancellable: Cancellable): bool = + toBool(g_file_set_attribute(cast[ptr File00](self.impl), cstring(attribute), `type`, valueP, flags, cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_set_attribute_byte_string*(self: ptr File00; attribute: cstring; value: cstring; + flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_set_attribute_byte_string", libprag.} + +proc setAttributeByteString*(self: File; attribute: string; value: string; flags: FileQueryInfoFlags; + cancellable: Cancellable): bool = + toBool(g_file_set_attribute_byte_string(cast[ptr File00](self.impl), cstring(attribute), cstring(value), flags, cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_set_attribute_int32*(self: ptr File00; attribute: cstring; value: int32; + flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_set_attribute_int32", libprag.} + +proc setAttributeInt32*(self: File; attribute: string; value: int; flags: FileQueryInfoFlags; + cancellable: Cancellable): bool = + toBool(g_file_set_attribute_int32(cast[ptr File00](self.impl), cstring(attribute), int32(value), flags, cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_set_attribute_int64*(self: ptr File00; attribute: cstring; value: int64; + flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_set_attribute_int64", libprag.} + +proc setAttributeInt64*(self: File; attribute: string; value: int64; flags: FileQueryInfoFlags; + cancellable: Cancellable): bool = + toBool(g_file_set_attribute_int64(cast[ptr File00](self.impl), cstring(attribute), value, flags, cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_set_attribute_string*(self: ptr File00; attribute: cstring; value: cstring; + flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_set_attribute_string", libprag.} + +proc setAttributeString*(self: File; attribute: string; value: string; flags: FileQueryInfoFlags; + cancellable: Cancellable): bool = + toBool(g_file_set_attribute_string(cast[ptr File00](self.impl), cstring(attribute), cstring(value), flags, cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_set_attribute_uint32*(self: ptr File00; attribute: cstring; value: uint32; + flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_set_attribute_uint32", libprag.} + +proc setAttributeUint32*(self: File; attribute: string; value: int; flags: FileQueryInfoFlags; + cancellable: Cancellable): bool = + toBool(g_file_set_attribute_uint32(cast[ptr File00](self.impl), cstring(attribute), uint32(value), flags, cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_set_attribute_uint64*(self: ptr File00; attribute: cstring; value: uint64; + flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_set_attribute_uint64", libprag.} + +proc setAttributeUint64*(self: File; attribute: string; value: uint64; flags: FileQueryInfoFlags; + cancellable: Cancellable): bool = + toBool(g_file_set_attribute_uint64(cast[ptr File00](self.impl), cstring(attribute), value, flags, cast[ptr Cancellable00](cancellable.impl))) + +type + FileType* {.size: sizeof(cint), pure.} = enum + unknown = 0 + regular = 1 + directory = 2 + symbolicLink = 3 + special = 4 + shortcut = 5 + mountable = 6 + +proc g_file_query_file_type*(self: ptr File00; flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): FileType {. + importc: "g_file_query_file_type", libprag.} + +proc queryFileType*(self: File; flags: FileQueryInfoFlags; cancellable: Cancellable): FileType = + g_file_query_file_type(cast[ptr File00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + +type + FileInfo* = ref object of gobject.Object + FileInfo00* = object of gobject.Object00 + +proc g_file_info_new*(): ptr FileInfo00 {. + importc: "g_file_info_new", libprag.} + +proc newFileInfo*(): FileInfo = + new(result, finalizeGObject) + result.impl = g_file_info_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFileInfo*[T](result: var T) = + assert(result is FileInfo) + new(result, finalizeGObject) + result.impl = g_file_info_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_info_clear_status*(self: ptr FileInfo00) {. + importc: "g_file_info_clear_status", libprag.} + +proc clearStatus*(self: FileInfo) = + g_file_info_clear_status(cast[ptr FileInfo00](self.impl)) + +proc g_file_info_copy_into*(self: ptr FileInfo00; destInfo: ptr FileInfo00) {. + importc: "g_file_info_copy_into", libprag.} + +proc copyInto*(self: FileInfo; destInfo: FileInfo) = + g_file_info_copy_into(cast[ptr FileInfo00](self.impl), cast[ptr FileInfo00](destInfo.impl)) + +proc g_file_info_dup*(self: ptr FileInfo00): ptr FileInfo00 {. + importc: "g_file_info_dup", libprag.} + +proc dup*(self: FileInfo): FileInfo = + let gobj = g_file_info_dup(cast[ptr FileInfo00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_info_get_attribute_as_string*(self: ptr FileInfo00; attribute: cstring): cstring {. + importc: "g_file_info_get_attribute_as_string", libprag.} + +proc getAttributeAsString*(self: FileInfo; attribute: string): string = + let resul0 = g_file_info_get_attribute_as_string(cast[ptr FileInfo00](self.impl), cstring(attribute)) + result = $resul0 + cogfree(resul0) + +proc attributeAsString*(self: FileInfo; attribute: string): string = + let resul0 = g_file_info_get_attribute_as_string(cast[ptr FileInfo00](self.impl), cstring(attribute)) + result = $resul0 + cogfree(resul0) + +proc g_file_info_get_attribute_boolean*(self: ptr FileInfo00; attribute: cstring): gboolean {. + importc: "g_file_info_get_attribute_boolean", libprag.} + +proc getAttributeBoolean*(self: FileInfo; attribute: string): bool = + toBool(g_file_info_get_attribute_boolean(cast[ptr FileInfo00](self.impl), cstring(attribute))) + +proc attributeBoolean*(self: FileInfo; attribute: string): bool = + toBool(g_file_info_get_attribute_boolean(cast[ptr FileInfo00](self.impl), cstring(attribute))) + +proc g_file_info_get_attribute_byte_string*(self: ptr FileInfo00; attribute: cstring): cstring {. + importc: "g_file_info_get_attribute_byte_string", libprag.} + +proc getAttributeByteString*(self: FileInfo; attribute: string): string = + let resul0 = g_file_info_get_attribute_byte_string(cast[ptr FileInfo00](self.impl), cstring(attribute)) + result = $resul0 + +proc attributeByteString*(self: FileInfo; attribute: string): string = + let resul0 = g_file_info_get_attribute_byte_string(cast[ptr FileInfo00](self.impl), cstring(attribute)) + result = $resul0 + +proc g_file_info_get_attribute_int32*(self: ptr FileInfo00; attribute: cstring): int32 {. + importc: "g_file_info_get_attribute_int32", libprag.} + +proc getAttributeInt32*(self: FileInfo; attribute: string): int = + int(g_file_info_get_attribute_int32(cast[ptr FileInfo00](self.impl), cstring(attribute))) + +proc attributeInt32*(self: FileInfo; attribute: string): int = + int(g_file_info_get_attribute_int32(cast[ptr FileInfo00](self.impl), cstring(attribute))) + +proc g_file_info_get_attribute_int64*(self: ptr FileInfo00; attribute: cstring): int64 {. + importc: "g_file_info_get_attribute_int64", libprag.} + +proc getAttributeInt64*(self: FileInfo; attribute: string): int64 = + g_file_info_get_attribute_int64(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc attributeInt64*(self: FileInfo; attribute: string): int64 = + g_file_info_get_attribute_int64(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc g_file_info_get_attribute_object*(self: ptr FileInfo00; attribute: cstring): ptr gobject.Object00 {. + importc: "g_file_info_get_attribute_object", libprag.} + +proc getAttributeObject*(self: FileInfo; attribute: string): gobject.Object = + let gobj = g_file_info_get_attribute_object(cast[ptr FileInfo00](self.impl), cstring(attribute)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc attributeObject*(self: FileInfo; attribute: string): gobject.Object = + let gobj = g_file_info_get_attribute_object(cast[ptr FileInfo00](self.impl), cstring(attribute)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_info_get_attribute_string*(self: ptr FileInfo00; attribute: cstring): cstring {. + importc: "g_file_info_get_attribute_string", libprag.} + +proc getAttributeString*(self: FileInfo; attribute: string): string = + let resul0 = g_file_info_get_attribute_string(cast[ptr FileInfo00](self.impl), cstring(attribute)) + result = $resul0 + +proc attributeString*(self: FileInfo; attribute: string): string = + let resul0 = g_file_info_get_attribute_string(cast[ptr FileInfo00](self.impl), cstring(attribute)) + result = $resul0 + +proc g_file_info_get_attribute_stringv*(self: ptr FileInfo00; attribute: cstring): cstringArray {. + importc: "g_file_info_get_attribute_stringv", libprag.} + +proc getAttributeStringv*(self: FileInfo; attribute: string): cstringArray = + g_file_info_get_attribute_stringv(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc attributeStringv*(self: FileInfo; attribute: string): cstringArray = + g_file_info_get_attribute_stringv(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc g_file_info_get_attribute_type*(self: ptr FileInfo00; attribute: cstring): FileAttributeType {. + importc: "g_file_info_get_attribute_type", libprag.} + +proc getAttributeType*(self: FileInfo; attribute: string): FileAttributeType = + g_file_info_get_attribute_type(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc attributeType*(self: FileInfo; attribute: string): FileAttributeType = + g_file_info_get_attribute_type(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc g_file_info_get_attribute_uint32*(self: ptr FileInfo00; attribute: cstring): uint32 {. + importc: "g_file_info_get_attribute_uint32", libprag.} + +proc getAttributeUint32*(self: FileInfo; attribute: string): int = + int(g_file_info_get_attribute_uint32(cast[ptr FileInfo00](self.impl), cstring(attribute))) + +proc attributeUint32*(self: FileInfo; attribute: string): int = + int(g_file_info_get_attribute_uint32(cast[ptr FileInfo00](self.impl), cstring(attribute))) + +proc g_file_info_get_attribute_uint64*(self: ptr FileInfo00; attribute: cstring): uint64 {. + importc: "g_file_info_get_attribute_uint64", libprag.} + +proc getAttributeUint64*(self: FileInfo; attribute: string): uint64 = + g_file_info_get_attribute_uint64(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc attributeUint64*(self: FileInfo; attribute: string): uint64 = + g_file_info_get_attribute_uint64(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc g_file_info_get_content_type*(self: ptr FileInfo00): cstring {. + importc: "g_file_info_get_content_type", libprag.} + +proc getContentType*(self: FileInfo): string = + let resul0 = g_file_info_get_content_type(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc contentType*(self: FileInfo): string = + let resul0 = g_file_info_get_content_type(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc g_file_info_get_deletion_date*(self: ptr FileInfo00): ptr glib.DateTime00 {. + importc: "g_file_info_get_deletion_date", libprag.} + +proc getDeletionDate*(self: FileInfo): glib.DateTime = + new(result) + result.impl = g_file_info_get_deletion_date(cast[ptr FileInfo00](self.impl)) + +proc deletionDate*(self: FileInfo): glib.DateTime = + new(result) + result.impl = g_file_info_get_deletion_date(cast[ptr FileInfo00](self.impl)) + +proc g_file_info_get_display_name*(self: ptr FileInfo00): cstring {. + importc: "g_file_info_get_display_name", libprag.} + +proc getDisplayName*(self: FileInfo): string = + let resul0 = g_file_info_get_display_name(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc displayName*(self: FileInfo): string = + let resul0 = g_file_info_get_display_name(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc g_file_info_get_edit_name*(self: ptr FileInfo00): cstring {. + importc: "g_file_info_get_edit_name", libprag.} + +proc getEditName*(self: FileInfo): string = + let resul0 = g_file_info_get_edit_name(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc editName*(self: FileInfo): string = + let resul0 = g_file_info_get_edit_name(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc g_file_info_get_etag*(self: ptr FileInfo00): cstring {. + importc: "g_file_info_get_etag", libprag.} + +proc getEtag*(self: FileInfo): string = + let resul0 = g_file_info_get_etag(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc etag*(self: FileInfo): string = + let resul0 = g_file_info_get_etag(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc g_file_info_get_file_type*(self: ptr FileInfo00): FileType {. + importc: "g_file_info_get_file_type", libprag.} + +proc getFileType*(self: FileInfo): FileType = + g_file_info_get_file_type(cast[ptr FileInfo00](self.impl)) + +proc fileType*(self: FileInfo): FileType = + g_file_info_get_file_type(cast[ptr FileInfo00](self.impl)) + +proc g_file_info_get_icon*(self: ptr FileInfo00): ptr Icon00 {. + importc: "g_file_info_get_icon", libprag.} + +proc getIcon*(self: FileInfo): Icon = + new(result) + result.impl = g_file_info_get_icon(cast[ptr FileInfo00](self.impl)) + +proc icon*(self: FileInfo): Icon = + new(result) + result.impl = g_file_info_get_icon(cast[ptr FileInfo00](self.impl)) + +proc g_file_info_get_is_backup*(self: ptr FileInfo00): gboolean {. + importc: "g_file_info_get_is_backup", libprag.} + +proc getIsBackup*(self: FileInfo): bool = + toBool(g_file_info_get_is_backup(cast[ptr FileInfo00](self.impl))) + +proc isBackup*(self: FileInfo): bool = + toBool(g_file_info_get_is_backup(cast[ptr FileInfo00](self.impl))) + +proc g_file_info_get_is_hidden*(self: ptr FileInfo00): gboolean {. + importc: "g_file_info_get_is_hidden", libprag.} + +proc getIsHidden*(self: FileInfo): bool = + toBool(g_file_info_get_is_hidden(cast[ptr FileInfo00](self.impl))) + +proc isHidden*(self: FileInfo): bool = + toBool(g_file_info_get_is_hidden(cast[ptr FileInfo00](self.impl))) + +proc g_file_info_get_is_symlink*(self: ptr FileInfo00): gboolean {. + importc: "g_file_info_get_is_symlink", libprag.} + +proc getIsSymlink*(self: FileInfo): bool = + toBool(g_file_info_get_is_symlink(cast[ptr FileInfo00](self.impl))) + +proc isSymlink*(self: FileInfo): bool = + toBool(g_file_info_get_is_symlink(cast[ptr FileInfo00](self.impl))) + +proc g_file_info_get_modification_time*(self: ptr FileInfo00; resu: var glib.TimeVal00) {. + importc: "g_file_info_get_modification_time", libprag.} + +proc getModificationTime*(self: ptr FileInfo00; resu: var glib.TimeVal00) {. + importc: "g_file_info_get_modification_time", libprag.} + +proc modificationTime*(self: ptr FileInfo00; resu: var glib.TimeVal00) {. + importc: "g_file_info_get_modification_time", libprag.} + +proc g_file_info_get_name*(self: ptr FileInfo00): ucstring {. + importc: "g_file_info_get_name", libprag.} + +proc getName*(self: FileInfo): ucstring = + g_file_info_get_name(cast[ptr FileInfo00](self.impl)) + +proc name*(self: FileInfo): ucstring = + g_file_info_get_name(cast[ptr FileInfo00](self.impl)) + +proc g_file_info_get_size*(self: ptr FileInfo00): int64 {. + importc: "g_file_info_get_size", libprag.} + +proc getSize*(self: FileInfo): int64 = + g_file_info_get_size(cast[ptr FileInfo00](self.impl)) + +proc size*(self: FileInfo): int64 = + g_file_info_get_size(cast[ptr FileInfo00](self.impl)) + +proc g_file_info_get_sort_order*(self: ptr FileInfo00): int32 {. + importc: "g_file_info_get_sort_order", libprag.} + +proc getSortOrder*(self: FileInfo): int = + int(g_file_info_get_sort_order(cast[ptr FileInfo00](self.impl))) + +proc sortOrder*(self: FileInfo): int = + int(g_file_info_get_sort_order(cast[ptr FileInfo00](self.impl))) + +proc g_file_info_get_symbolic_icon*(self: ptr FileInfo00): ptr Icon00 {. + importc: "g_file_info_get_symbolic_icon", libprag.} + +proc getSymbolicIcon*(self: FileInfo): Icon = + new(result) + result.impl = g_file_info_get_symbolic_icon(cast[ptr FileInfo00](self.impl)) + +proc symbolicIcon*(self: FileInfo): Icon = + new(result) + result.impl = g_file_info_get_symbolic_icon(cast[ptr FileInfo00](self.impl)) + +proc g_file_info_get_symlink_target*(self: ptr FileInfo00): cstring {. + importc: "g_file_info_get_symlink_target", libprag.} + +proc getSymlinkTarget*(self: FileInfo): string = + let resul0 = g_file_info_get_symlink_target(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc symlinkTarget*(self: FileInfo): string = + let resul0 = g_file_info_get_symlink_target(cast[ptr FileInfo00](self.impl)) + result = $resul0 + +proc g_file_info_has_attribute*(self: ptr FileInfo00; attribute: cstring): gboolean {. + importc: "g_file_info_has_attribute", libprag.} + +proc hasAttribute*(self: FileInfo; attribute: string): bool = + toBool(g_file_info_has_attribute(cast[ptr FileInfo00](self.impl), cstring(attribute))) + +proc g_file_info_has_namespace*(self: ptr FileInfo00; nameSpace: cstring): gboolean {. + importc: "g_file_info_has_namespace", libprag.} + +proc hasNamespace*(self: FileInfo; nameSpace: string): bool = + toBool(g_file_info_has_namespace(cast[ptr FileInfo00](self.impl), cstring(nameSpace))) + +proc g_file_info_list_attributes*(self: ptr FileInfo00; nameSpace: cstring): cstringArray {. + importc: "g_file_info_list_attributes", libprag.} + +proc listAttributes*(self: FileInfo; nameSpace: string): cstringArray = + g_file_info_list_attributes(cast[ptr FileInfo00](self.impl), cstring(nameSpace)) + +proc g_file_info_remove_attribute*(self: ptr FileInfo00; attribute: cstring) {. + importc: "g_file_info_remove_attribute", libprag.} + +proc removeAttribute*(self: FileInfo; attribute: string) = + g_file_info_remove_attribute(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc g_file_info_set_attribute*(self: ptr FileInfo00; attribute: cstring; `type`: FileAttributeType; + valueP: pointer) {. + importc: "g_file_info_set_attribute", libprag.} + +proc setAttribute*(self: FileInfo; attribute: string; `type`: FileAttributeType; + valueP: pointer) = + g_file_info_set_attribute(cast[ptr FileInfo00](self.impl), cstring(attribute), `type`, valueP) + +proc g_file_info_set_attribute_boolean*(self: ptr FileInfo00; attribute: cstring; attrValue: gboolean) {. + importc: "g_file_info_set_attribute_boolean", libprag.} + +proc setAttributeBoolean*(self: FileInfo; attribute: string; attrValue: bool) = + g_file_info_set_attribute_boolean(cast[ptr FileInfo00](self.impl), cstring(attribute), gboolean(attrValue)) + +proc g_file_info_set_attribute_byte_string*(self: ptr FileInfo00; attribute: cstring; attrValue: cstring) {. + importc: "g_file_info_set_attribute_byte_string", libprag.} + +proc setAttributeByteString*(self: FileInfo; attribute: string; attrValue: string) = + g_file_info_set_attribute_byte_string(cast[ptr FileInfo00](self.impl), cstring(attribute), cstring(attrValue)) + +proc g_file_info_set_attribute_int32*(self: ptr FileInfo00; attribute: cstring; attrValue: int32) {. + importc: "g_file_info_set_attribute_int32", libprag.} + +proc setAttributeInt32*(self: FileInfo; attribute: string; attrValue: int) = + g_file_info_set_attribute_int32(cast[ptr FileInfo00](self.impl), cstring(attribute), int32(attrValue)) + +proc g_file_info_set_attribute_int64*(self: ptr FileInfo00; attribute: cstring; attrValue: int64) {. + importc: "g_file_info_set_attribute_int64", libprag.} + +proc setAttributeInt64*(self: FileInfo; attribute: string; attrValue: int64) = + g_file_info_set_attribute_int64(cast[ptr FileInfo00](self.impl), cstring(attribute), attrValue) + +proc g_file_info_set_attribute_object*(self: ptr FileInfo00; attribute: cstring; attrValue: ptr gobject.Object00) {. + importc: "g_file_info_set_attribute_object", libprag.} + +proc setAttributeObject*(self: FileInfo; attribute: string; attrValue: gobject.Object) = + g_file_info_set_attribute_object(cast[ptr FileInfo00](self.impl), cstring(attribute), cast[ptr gobject.Object00](attrValue.impl)) + +proc g_file_info_set_attribute_string*(self: ptr FileInfo00; attribute: cstring; attrValue: cstring) {. + importc: "g_file_info_set_attribute_string", libprag.} + +proc setAttributeString*(self: FileInfo; attribute: string; attrValue: string) = + g_file_info_set_attribute_string(cast[ptr FileInfo00](self.impl), cstring(attribute), cstring(attrValue)) + +proc g_file_info_set_attribute_stringv*(self: ptr FileInfo00; attribute: cstring; attrValue: cstringArray) {. + importc: "g_file_info_set_attribute_stringv", libprag.} + +proc setAttributeStringv*(self: FileInfo; attribute: string; attrValue: cstringArray) = + g_file_info_set_attribute_stringv(cast[ptr FileInfo00](self.impl), cstring(attribute), attrValue) + +proc g_file_info_set_attribute_uint32*(self: ptr FileInfo00; attribute: cstring; attrValue: uint32) {. + importc: "g_file_info_set_attribute_uint32", libprag.} + +proc setAttributeUint32*(self: FileInfo; attribute: string; attrValue: int) = + g_file_info_set_attribute_uint32(cast[ptr FileInfo00](self.impl), cstring(attribute), uint32(attrValue)) + +proc g_file_info_set_attribute_uint64*(self: ptr FileInfo00; attribute: cstring; attrValue: uint64) {. + importc: "g_file_info_set_attribute_uint64", libprag.} + +proc setAttributeUint64*(self: FileInfo; attribute: string; attrValue: uint64) = + g_file_info_set_attribute_uint64(cast[ptr FileInfo00](self.impl), cstring(attribute), attrValue) + +proc g_file_info_set_content_type*(self: ptr FileInfo00; contentType: cstring) {. + importc: "g_file_info_set_content_type", libprag.} + +proc setContentType*(self: FileInfo; contentType: string) = + g_file_info_set_content_type(cast[ptr FileInfo00](self.impl), cstring(contentType)) + +proc `contentType=`*(self: FileInfo; contentType: string) = + g_file_info_set_content_type(cast[ptr FileInfo00](self.impl), cstring(contentType)) + +proc g_file_info_set_display_name*(self: ptr FileInfo00; displayName: cstring) {. + importc: "g_file_info_set_display_name", libprag.} + +proc setDisplayName*(self: FileInfo; displayName: string) = + g_file_info_set_display_name(cast[ptr FileInfo00](self.impl), cstring(displayName)) + +proc `displayName=`*(self: FileInfo; displayName: string) = + g_file_info_set_display_name(cast[ptr FileInfo00](self.impl), cstring(displayName)) + +proc g_file_info_set_edit_name*(self: ptr FileInfo00; editName: cstring) {. + importc: "g_file_info_set_edit_name", libprag.} + +proc setEditName*(self: FileInfo; editName: string) = + g_file_info_set_edit_name(cast[ptr FileInfo00](self.impl), cstring(editName)) + +proc `editName=`*(self: FileInfo; editName: string) = + g_file_info_set_edit_name(cast[ptr FileInfo00](self.impl), cstring(editName)) + +proc g_file_info_set_file_type*(self: ptr FileInfo00; `type`: FileType) {. + importc: "g_file_info_set_file_type", libprag.} + +proc setFileType*(self: FileInfo; `type`: FileType) = + g_file_info_set_file_type(cast[ptr FileInfo00](self.impl), `type`) + +proc `fileType=`*(self: FileInfo; `type`: FileType) = + g_file_info_set_file_type(cast[ptr FileInfo00](self.impl), `type`) + +proc g_file_info_set_icon*(self: ptr FileInfo00; icon: ptr Icon00) {. + importc: "g_file_info_set_icon", libprag.} + +proc setIcon*(self: FileInfo; icon: Icon) = + g_file_info_set_icon(cast[ptr FileInfo00](self.impl), cast[ptr Icon00](icon.impl)) + +proc `icon=`*(self: FileInfo; icon: Icon) = + g_file_info_set_icon(cast[ptr FileInfo00](self.impl), cast[ptr Icon00](icon.impl)) + +proc g_file_info_set_is_hidden*(self: ptr FileInfo00; isHidden: gboolean) {. + importc: "g_file_info_set_is_hidden", libprag.} + +proc setIsHidden*(self: FileInfo; isHidden: bool) = + g_file_info_set_is_hidden(cast[ptr FileInfo00](self.impl), gboolean(isHidden)) + +proc `isHidden=`*(self: FileInfo; isHidden: bool) = + g_file_info_set_is_hidden(cast[ptr FileInfo00](self.impl), gboolean(isHidden)) + +proc g_file_info_set_is_symlink*(self: ptr FileInfo00; isSymlink: gboolean) {. + importc: "g_file_info_set_is_symlink", libprag.} + +proc setIsSymlink*(self: FileInfo; isSymlink: bool) = + g_file_info_set_is_symlink(cast[ptr FileInfo00](self.impl), gboolean(isSymlink)) + +proc `isSymlink=`*(self: FileInfo; isSymlink: bool) = + g_file_info_set_is_symlink(cast[ptr FileInfo00](self.impl), gboolean(isSymlink)) + +proc g_file_info_set_modification_time*(self: ptr FileInfo00; mtime: ptr glib.TimeVal00) {. + importc: "g_file_info_set_modification_time", libprag.} + +proc setModificationTime*(self: FileInfo; mtime: glib.TimeVal) = + g_file_info_set_modification_time(cast[ptr FileInfo00](self.impl), cast[ptr glib.TimeVal00](mtime.impl)) + +proc `modificationTime=`*(self: FileInfo; mtime: glib.TimeVal) = + g_file_info_set_modification_time(cast[ptr FileInfo00](self.impl), cast[ptr glib.TimeVal00](mtime.impl)) + +proc g_file_info_set_name*(self: ptr FileInfo00; name: ucstring) {. + importc: "g_file_info_set_name", libprag.} + +proc setName*(self: FileInfo; name: ucstring) = + g_file_info_set_name(cast[ptr FileInfo00](self.impl), name) + +proc `name=`*(self: FileInfo; name: ucstring) = + g_file_info_set_name(cast[ptr FileInfo00](self.impl), name) + +proc g_file_info_set_size*(self: ptr FileInfo00; size: int64) {. + importc: "g_file_info_set_size", libprag.} + +proc setSize*(self: FileInfo; size: int64) = + g_file_info_set_size(cast[ptr FileInfo00](self.impl), size) + +proc `size=`*(self: FileInfo; size: int64) = + g_file_info_set_size(cast[ptr FileInfo00](self.impl), size) + +proc g_file_info_set_sort_order*(self: ptr FileInfo00; sortOrder: int32) {. + importc: "g_file_info_set_sort_order", libprag.} + +proc setSortOrder*(self: FileInfo; sortOrder: int) = + g_file_info_set_sort_order(cast[ptr FileInfo00](self.impl), int32(sortOrder)) + +proc `sortOrder=`*(self: FileInfo; sortOrder: int) = + g_file_info_set_sort_order(cast[ptr FileInfo00](self.impl), int32(sortOrder)) + +proc g_file_info_set_symbolic_icon*(self: ptr FileInfo00; icon: ptr Icon00) {. + importc: "g_file_info_set_symbolic_icon", libprag.} + +proc setSymbolicIcon*(self: FileInfo; icon: Icon) = + g_file_info_set_symbolic_icon(cast[ptr FileInfo00](self.impl), cast[ptr Icon00](icon.impl)) + +proc `symbolicIcon=`*(self: FileInfo; icon: Icon) = + g_file_info_set_symbolic_icon(cast[ptr FileInfo00](self.impl), cast[ptr Icon00](icon.impl)) + +proc g_file_info_set_symlink_target*(self: ptr FileInfo00; symlinkTarget: cstring) {. + importc: "g_file_info_set_symlink_target", libprag.} + +proc setSymlinkTarget*(self: FileInfo; symlinkTarget: string) = + g_file_info_set_symlink_target(cast[ptr FileInfo00](self.impl), cstring(symlinkTarget)) + +proc `symlinkTarget=`*(self: FileInfo; symlinkTarget: string) = + g_file_info_set_symlink_target(cast[ptr FileInfo00](self.impl), cstring(symlinkTarget)) + +proc g_file_info_unset_attribute_mask*(self: ptr FileInfo00) {. + importc: "g_file_info_unset_attribute_mask", libprag.} + +proc unsetAttributeMask*(self: FileInfo) = + g_file_info_unset_attribute_mask(cast[ptr FileInfo00](self.impl)) + +proc g_file_query_filesystem_info*(self: ptr File00; attributes: cstring; cancellable: ptr Cancellable00): ptr FileInfo00 {. + importc: "g_file_query_filesystem_info", libprag.} + +proc queryFilesystemInfo*(self: File; attributes: string; cancellable: Cancellable): FileInfo = + let gobj = g_file_query_filesystem_info(cast[ptr File00](self.impl), cstring(attributes), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_query_filesystem_info_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileInfo00 {. + importc: "g_file_query_filesystem_info_finish", libprag.} + +proc queryFilesystemInfoFinish*(self: File; res: AsyncResult): FileInfo = + let gobj = g_file_query_filesystem_info_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_query_info*(self: ptr File00; attributes: cstring; flags: FileQueryInfoFlags; + cancellable: ptr Cancellable00): ptr FileInfo00 {. + importc: "g_file_query_info", libprag.} + +proc queryInfo*(self: File; attributes: string; flags: FileQueryInfoFlags; + cancellable: Cancellable): FileInfo = + let gobj = g_file_query_info(cast[ptr File00](self.impl), cstring(attributes), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_query_info_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileInfo00 {. + importc: "g_file_query_info_finish", libprag.} + +proc queryInfoFinish*(self: File; res: AsyncResult): FileInfo = + let gobj = g_file_query_info_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_set_attributes_finish*(self: ptr File00; resu: ptr AsyncResult00; info: var ptr FileInfo00): gboolean {. + importc: "g_file_set_attributes_finish", libprag.} + +proc setAttributesFinish*(self: ptr File00; resu: ptr AsyncResult00; info: var ptr FileInfo00): gboolean {. + importc: "g_file_set_attributes_finish", libprag.} + +proc g_file_set_attributes_from_info*(self: ptr File00; info: ptr FileInfo00; flags: FileQueryInfoFlags; + cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_set_attributes_from_info", libprag.} + +proc setAttributesFromInfo*(self: File; info: FileInfo; flags: FileQueryInfoFlags; + cancellable: Cancellable): bool = + toBool(g_file_set_attributes_from_info(cast[ptr File00](self.impl), cast[ptr FileInfo00](info.impl), flags, cast[ptr Cancellable00](cancellable.impl))) + +proc g_file_enumerator_get_child*(self: ptr FileEnumerator00; info: ptr FileInfo00): ptr File00 {. + importc: "g_file_enumerator_get_child", libprag.} + +proc getChild*(self: FileEnumerator; info: FileInfo): File = + new(result) + result.impl = g_file_enumerator_get_child(cast[ptr FileEnumerator00](self.impl), cast[ptr FileInfo00](info.impl)) + +proc child*(self: FileEnumerator; info: FileInfo): File = + new(result) + result.impl = g_file_enumerator_get_child(cast[ptr FileEnumerator00](self.impl), cast[ptr FileInfo00](info.impl)) + +proc g_file_enumerator_iterate*(self: ptr FileEnumerator00; outInfo: var ptr FileInfo00; + outChild: var ptr File00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_enumerator_iterate", libprag.} + +proc iterate*(self: ptr FileEnumerator00; outInfo: var ptr FileInfo00; + outChild: var ptr File00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_file_enumerator_iterate", libprag.} + +proc g_file_enumerator_next_file*(self: ptr FileEnumerator00; cancellable: ptr Cancellable00): ptr FileInfo00 {. + importc: "g_file_enumerator_next_file", libprag.} + +proc nextFile*(self: FileEnumerator; cancellable: Cancellable): FileInfo = + let gobj = g_file_enumerator_next_file(cast[ptr FileEnumerator00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_output_stream_query_info*(self: ptr FileOutputStream00; attributes: cstring; + cancellable: ptr Cancellable00): ptr FileInfo00 {. + importc: "g_file_output_stream_query_info", libprag.} + +proc queryInfo*(self: FileOutputStream; attributes: string; cancellable: Cancellable): FileInfo = + let gobj = g_file_output_stream_query_info(cast[ptr FileOutputStream00](self.impl), cstring(attributes), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_output_stream_query_info_finish*(self: ptr FileOutputStream00; resu: ptr AsyncResult00): ptr FileInfo00 {. + importc: "g_file_output_stream_query_info_finish", libprag.} + +proc queryInfoFinish*(self: FileOutputStream; resu: AsyncResult): FileInfo = + let gobj = g_file_output_stream_query_info_finish(cast[ptr FileOutputStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_io_stream_query_info*(self: ptr FileIOStream00; attributes: cstring; cancellable: ptr Cancellable00): ptr FileInfo00 {. + importc: "g_file_io_stream_query_info", libprag.} + +proc queryInfo*(self: FileIOStream; attributes: string; cancellable: Cancellable): FileInfo = + let gobj = g_file_io_stream_query_info(cast[ptr FileIOStream00](self.impl), cstring(attributes), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_io_stream_query_info_finish*(self: ptr FileIOStream00; resu: ptr AsyncResult00): ptr FileInfo00 {. + importc: "g_file_io_stream_query_info_finish", libprag.} + +proc queryInfoFinish*(self: FileIOStream; resu: AsyncResult): FileInfo = + let gobj = g_file_io_stream_query_info_finish(cast[ptr FileIOStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + FileAttributeMatcher00* {.pure.} = object + FileAttributeMatcher* = ref object + impl*: ptr FileAttributeMatcher00 + +proc g_file_attribute_matcher_new*(attributes: cstring): ptr FileAttributeMatcher00 {. + importc: "g_file_attribute_matcher_new", libprag.} + +proc newFileAttributeMatcher*(attributes: string): FileAttributeMatcher = + new(result) + result.impl = g_file_attribute_matcher_new(cstring(attributes)) + +proc initFileAttributeMatcher*[T](result: var T; attributes: string) = + assert(result is FileAttributeMatcher) + new(result) + result.impl = g_file_attribute_matcher_new(cstring(attributes)) + +proc g_file_attribute_matcher_enumerate_namespace*(self: ptr FileAttributeMatcher00; ns: cstring): gboolean {. + importc: "g_file_attribute_matcher_enumerate_namespace", libprag.} + +proc enumerateNamespace*(self: FileAttributeMatcher; ns: string): bool = + toBool(g_file_attribute_matcher_enumerate_namespace(cast[ptr FileAttributeMatcher00](self.impl), cstring(ns))) + +proc g_file_attribute_matcher_enumerate_next*(self: ptr FileAttributeMatcher00): cstring {. + importc: "g_file_attribute_matcher_enumerate_next", libprag.} + +proc enumerateNext*(self: FileAttributeMatcher): string = + let resul0 = g_file_attribute_matcher_enumerate_next(cast[ptr FileAttributeMatcher00](self.impl)) + result = $resul0 + +proc g_file_attribute_matcher_matches*(self: ptr FileAttributeMatcher00; attribute: cstring): gboolean {. + importc: "g_file_attribute_matcher_matches", libprag.} + +proc matches*(self: FileAttributeMatcher; attribute: string): bool = + toBool(g_file_attribute_matcher_matches(cast[ptr FileAttributeMatcher00](self.impl), cstring(attribute))) + +proc g_file_attribute_matcher_matches_only*(self: ptr FileAttributeMatcher00; attribute: cstring): gboolean {. + importc: "g_file_attribute_matcher_matches_only", libprag.} + +proc matchesOnly*(self: FileAttributeMatcher; attribute: string): bool = + toBool(g_file_attribute_matcher_matches_only(cast[ptr FileAttributeMatcher00](self.impl), cstring(attribute))) + +proc g_file_attribute_matcher_ref*(self: ptr FileAttributeMatcher00): ptr FileAttributeMatcher00 {. + importc: "g_file_attribute_matcher_ref", libprag.} + +proc `ref`*(self: FileAttributeMatcher): FileAttributeMatcher = + new(result) + result.impl = g_file_attribute_matcher_ref(cast[ptr FileAttributeMatcher00](self.impl)) + +proc g_file_attribute_matcher_subtract*(self: ptr FileAttributeMatcher00; subtract: ptr FileAttributeMatcher00): ptr FileAttributeMatcher00 {. + importc: "g_file_attribute_matcher_subtract", libprag.} + +proc subtract*(self: FileAttributeMatcher; subtract: FileAttributeMatcher): FileAttributeMatcher = + new(result) + result.impl = g_file_attribute_matcher_subtract(cast[ptr FileAttributeMatcher00](self.impl), cast[ptr FileAttributeMatcher00](subtract.impl)) + +proc g_file_attribute_matcher_to_string*(self: ptr FileAttributeMatcher00): cstring {. + importc: "g_file_attribute_matcher_to_string", libprag.} + +proc toString*(self: FileAttributeMatcher): string = + let resul0 = g_file_attribute_matcher_to_string(cast[ptr FileAttributeMatcher00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_file_attribute_matcher_unref*(self: ptr FileAttributeMatcher00) {. + importc: "g_file_attribute_matcher_unref", libprag.} + +proc unref*(self: FileAttributeMatcher) = + g_file_attribute_matcher_unref(cast[ptr FileAttributeMatcher00](self.impl)) + +proc g_file_info_set_attribute_mask*(self: ptr FileInfo00; mask: ptr FileAttributeMatcher00) {. + importc: "g_file_info_set_attribute_mask", libprag.} + +proc setAttributeMask*(self: FileInfo; mask: FileAttributeMatcher) = + g_file_info_set_attribute_mask(cast[ptr FileInfo00](self.impl), cast[ptr FileAttributeMatcher00](mask.impl)) + +proc `attributeMask=`*(self: FileInfo; mask: FileAttributeMatcher) = + g_file_info_set_attribute_mask(cast[ptr FileInfo00](self.impl), cast[ptr FileAttributeMatcher00](mask.impl)) + +type + FileAttributeStatus* {.size: sizeof(cint), pure.} = enum + unset = 0 + set = 1 + errorSetting = 2 + +proc g_file_info_get_attribute_data*(self: ptr FileInfo00; attribute: cstring; `type`: var FileAttributeType; + valuePp: var pointer; status: var FileAttributeStatus): gboolean {. + importc: "g_file_info_get_attribute_data", libprag.} + +proc getAttributeData*(self: FileInfo; attribute: string; `type`: var FileAttributeType; + valuePp: var pointer; status: var FileAttributeStatus): bool = + toBool(g_file_info_get_attribute_data(cast[ptr FileInfo00](self.impl), cstring(attribute), `type`, valuePp, status)) + +proc attributeData*(self: FileInfo; attribute: string; `type`: var FileAttributeType; + valuePp: var pointer; status: var FileAttributeStatus): bool = + toBool(g_file_info_get_attribute_data(cast[ptr FileInfo00](self.impl), cstring(attribute), `type`, valuePp, status)) + +proc g_file_info_get_attribute_status*(self: ptr FileInfo00; attribute: cstring): FileAttributeStatus {. + importc: "g_file_info_get_attribute_status", libprag.} + +proc getAttributeStatus*(self: FileInfo; attribute: string): FileAttributeStatus = + g_file_info_get_attribute_status(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc attributeStatus*(self: FileInfo; attribute: string): FileAttributeStatus = + g_file_info_get_attribute_status(cast[ptr FileInfo00](self.impl), cstring(attribute)) + +proc g_file_info_set_attribute_status*(self: ptr FileInfo00; attribute: cstring; status: FileAttributeStatus): gboolean {. + importc: "g_file_info_set_attribute_status", libprag.} + +proc setAttributeStatus*(self: FileInfo; attribute: string; status: FileAttributeStatus): bool = + toBool(g_file_info_set_attribute_status(cast[ptr FileInfo00](self.impl), cstring(attribute), status)) + +type + DriveStartFlags* {.size: sizeof(cint), pure.} = enum + none = 0 + +type + MountUnmountFlag* {.size: sizeof(cint), pure.} = enum + force = 1 + + MountUnmountFlags* {.size: sizeof(cint).} = set[MountUnmountFlag] + +type + DBusConnection* = ref object of gobject.Object + DBusConnection00* = object of gobject.Object00 + +proc scClosed*(self: DBusConnection; p: proc (self: ptr gobject.Object00; remotePeerVanished: gboolean; error: ptr Error00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "closed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_dbus_connection_new_finish*(res: ptr AsyncResult00): ptr DBusConnection00 {. + importc: "g_dbus_connection_new_finish", libprag.} + +proc newDBusConnectionFinish*(res: AsyncResult): DBusConnection = + new(result, finalizeGObject) + result.impl = g_dbus_connection_new_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusConnectionFinish*[T](result: var T; res: AsyncResult) = + assert(result is DBusConnection) + new(result, finalizeGObject) + result.impl = g_dbus_connection_new_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_connection_new_for_address_finish*(res: ptr AsyncResult00): ptr DBusConnection00 {. + importc: "g_dbus_connection_new_for_address_finish", libprag.} + +proc newDBusConnectionForAddressFinish*(res: AsyncResult): DBusConnection = + new(result, finalizeGObject) + result.impl = g_dbus_connection_new_for_address_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusConnectionForAddressFinish*[T](result: var T; res: AsyncResult) = + assert(result is DBusConnection) + new(result, finalizeGObject) + result.impl = g_dbus_connection_new_for_address_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_connection_call_finish*(self: ptr DBusConnection00; res: ptr AsyncResult00): ptr glib.Variant00 {. + importc: "g_dbus_connection_call_finish", libprag.} + +proc callFinish*(self: DBusConnection; res: AsyncResult): glib.Variant = + new(result) + result.impl = g_dbus_connection_call_finish(cast[ptr DBusConnection00](self.impl), cast[ptr AsyncResult00](res.impl)) + +proc g_dbus_connection_close_finish*(self: ptr DBusConnection00; res: ptr AsyncResult00): gboolean {. + importc: "g_dbus_connection_close_finish", libprag.} + +proc closeFinish*(self: DBusConnection; res: AsyncResult): bool = + toBool(g_dbus_connection_close_finish(cast[ptr DBusConnection00](self.impl), cast[ptr AsyncResult00](res.impl))) + +proc g_dbus_connection_close_sync*(self: ptr DBusConnection00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_dbus_connection_close_sync", libprag.} + +proc closeSync*(self: DBusConnection; cancellable: Cancellable): bool = + toBool(g_dbus_connection_close_sync(cast[ptr DBusConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_dbus_connection_emit_signal*(self: ptr DBusConnection00; destinationBusName: cstring; + objectPath: cstring; interfaceName: cstring; signalName: cstring; parameters: ptr glib.Variant00): gboolean {. + importc: "g_dbus_connection_emit_signal", libprag.} + +proc emitSignal*(self: DBusConnection; destinationBusName: string; + objectPath: string; interfaceName: string; signalName: string; parameters: glib.Variant): bool = + toBool(g_dbus_connection_emit_signal(cast[ptr DBusConnection00](self.impl), cstring(destinationBusName), cstring(objectPath), cstring(interfaceName), cstring(signalName), cast[ptr glib.Variant00](parameters.impl))) + +proc g_dbus_connection_export_action_group*(self: ptr DBusConnection00; objectPath: cstring; actionGroup: ptr ActionGroup00): uint32 {. + importc: "g_dbus_connection_export_action_group", libprag.} + +proc exportActionGroup*(self: DBusConnection; objectPath: string; actionGroup: ActionGroup): int = + int(g_dbus_connection_export_action_group(cast[ptr DBusConnection00](self.impl), cstring(objectPath), cast[ptr ActionGroup00](actionGroup.impl))) + +proc g_dbus_connection_flush_finish*(self: ptr DBusConnection00; res: ptr AsyncResult00): gboolean {. + importc: "g_dbus_connection_flush_finish", libprag.} + +proc flushFinish*(self: DBusConnection; res: AsyncResult): bool = + toBool(g_dbus_connection_flush_finish(cast[ptr DBusConnection00](self.impl), cast[ptr AsyncResult00](res.impl))) + +proc g_dbus_connection_flush_sync*(self: ptr DBusConnection00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_dbus_connection_flush_sync", libprag.} + +proc flushSync*(self: DBusConnection; cancellable: Cancellable): bool = + toBool(g_dbus_connection_flush_sync(cast[ptr DBusConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_dbus_connection_get_exit_on_close*(self: ptr DBusConnection00): gboolean {. + importc: "g_dbus_connection_get_exit_on_close", libprag.} + +proc getExitOnClose*(self: DBusConnection): bool = + toBool(g_dbus_connection_get_exit_on_close(cast[ptr DBusConnection00](self.impl))) + +proc exitOnClose*(self: DBusConnection): bool = + toBool(g_dbus_connection_get_exit_on_close(cast[ptr DBusConnection00](self.impl))) + +proc g_dbus_connection_get_guid*(self: ptr DBusConnection00): cstring {. + importc: "g_dbus_connection_get_guid", libprag.} + +proc getGuid*(self: DBusConnection): string = + let resul0 = g_dbus_connection_get_guid(cast[ptr DBusConnection00](self.impl)) + result = $resul0 + +proc guid*(self: DBusConnection): string = + let resul0 = g_dbus_connection_get_guid(cast[ptr DBusConnection00](self.impl)) + result = $resul0 + +proc g_dbus_connection_get_last_serial*(self: ptr DBusConnection00): uint32 {. + importc: "g_dbus_connection_get_last_serial", libprag.} + +proc getLastSerial*(self: DBusConnection): int = + int(g_dbus_connection_get_last_serial(cast[ptr DBusConnection00](self.impl))) + +proc lastSerial*(self: DBusConnection): int = + int(g_dbus_connection_get_last_serial(cast[ptr DBusConnection00](self.impl))) + +proc g_dbus_connection_get_stream*(self: ptr DBusConnection00): ptr IOStream00 {. + importc: "g_dbus_connection_get_stream", libprag.} + +proc getStream*(self: DBusConnection): IOStream = + let gobj = g_dbus_connection_get_stream(cast[ptr DBusConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc stream*(self: DBusConnection): IOStream = + let gobj = g_dbus_connection_get_stream(cast[ptr DBusConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_connection_get_unique_name*(self: ptr DBusConnection00): cstring {. + importc: "g_dbus_connection_get_unique_name", libprag.} + +proc getUniqueName*(self: DBusConnection): string = + let resul0 = g_dbus_connection_get_unique_name(cast[ptr DBusConnection00](self.impl)) + result = $resul0 + +proc uniqueName*(self: DBusConnection): string = + let resul0 = g_dbus_connection_get_unique_name(cast[ptr DBusConnection00](self.impl)) + result = $resul0 + +proc g_dbus_connection_is_closed*(self: ptr DBusConnection00): gboolean {. + importc: "g_dbus_connection_is_closed", libprag.} + +proc isClosed*(self: DBusConnection): bool = + toBool(g_dbus_connection_is_closed(cast[ptr DBusConnection00](self.impl))) + +proc g_dbus_connection_remove_filter*(self: ptr DBusConnection00; filterId: uint32) {. + importc: "g_dbus_connection_remove_filter", libprag.} + +proc removeFilter*(self: DBusConnection; filterId: int) = + g_dbus_connection_remove_filter(cast[ptr DBusConnection00](self.impl), uint32(filterId)) + +proc g_dbus_connection_set_exit_on_close*(self: ptr DBusConnection00; exitOnClose: gboolean) {. + importc: "g_dbus_connection_set_exit_on_close", libprag.} + +proc setExitOnClose*(self: DBusConnection; exitOnClose: bool) = + g_dbus_connection_set_exit_on_close(cast[ptr DBusConnection00](self.impl), gboolean(exitOnClose)) + +proc `exitOnClose=`*(self: DBusConnection; exitOnClose: bool) = + g_dbus_connection_set_exit_on_close(cast[ptr DBusConnection00](self.impl), gboolean(exitOnClose)) + +proc g_dbus_connection_signal_unsubscribe*(self: ptr DBusConnection00; subscriptionId: uint32) {. + importc: "g_dbus_connection_signal_unsubscribe", libprag.} + +proc signalUnsubscribe*(self: DBusConnection; subscriptionId: int) = + g_dbus_connection_signal_unsubscribe(cast[ptr DBusConnection00](self.impl), uint32(subscriptionId)) + +proc g_dbus_connection_start_message_processing*(self: ptr DBusConnection00) {. + importc: "g_dbus_connection_start_message_processing", libprag.} + +proc startMessageProcessing*(self: DBusConnection) = + g_dbus_connection_start_message_processing(cast[ptr DBusConnection00](self.impl)) + +proc g_dbus_connection_unexport_action_group*(self: ptr DBusConnection00; exportId: uint32) {. + importc: "g_dbus_connection_unexport_action_group", libprag.} + +proc unexportActionGroup*(self: DBusConnection; exportId: int) = + g_dbus_connection_unexport_action_group(cast[ptr DBusConnection00](self.impl), uint32(exportId)) + +proc g_dbus_connection_unexport_menu_model*(self: ptr DBusConnection00; exportId: uint32) {. + importc: "g_dbus_connection_unexport_menu_model", libprag.} + +proc unexportMenuModel*(self: DBusConnection; exportId: int) = + g_dbus_connection_unexport_menu_model(cast[ptr DBusConnection00](self.impl), uint32(exportId)) + +proc g_dbus_connection_unregister_object*(self: ptr DBusConnection00; registrationId: uint32): gboolean {. + importc: "g_dbus_connection_unregister_object", libprag.} + +proc unregisterObject*(self: DBusConnection; registrationId: int): bool = + toBool(g_dbus_connection_unregister_object(cast[ptr DBusConnection00](self.impl), uint32(registrationId))) + +proc g_dbus_connection_unregister_subtree*(self: ptr DBusConnection00; registrationId: uint32): gboolean {. + importc: "g_dbus_connection_unregister_subtree", libprag.} + +proc unregisterSubtree*(self: DBusConnection; registrationId: int): bool = + toBool(g_dbus_connection_unregister_subtree(cast[ptr DBusConnection00](self.impl), uint32(registrationId))) + +proc g_application_get_dbus_connection*(self: ptr Application00): ptr DBusConnection00 {. + importc: "g_application_get_dbus_connection", libprag.} + +proc getDbusConnection*(self: Application): DBusConnection = + let gobj = g_application_get_dbus_connection(cast[ptr Application00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc dbusConnection*(self: Application): DBusConnection = + let gobj = g_application_get_dbus_connection(cast[ptr Application00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DBusConnectionFlag* {.size: sizeof(cint), pure.} = enum + authenticationClient = 1 + authenticationServer = 2 + authenticationAllowAnonymous = 3 + messageBusConnection = 4 + delayMessageProcessing = 5 + + DBusConnectionFlags* {.size: sizeof(cint).} = set[DBusConnectionFlag] + +type + UnixFDListPrivate00* {.pure.} = object + UnixFDListPrivate* = ref object + impl*: ptr UnixFDListPrivate00 + +type + UnixFDList* = ref object of gobject.Object + UnixFDList00* = object of gobject.Object00 + priv1: ptr UnixFDListPrivate00 + +proc g_unix_fd_list_new*(): ptr UnixFDList00 {. + importc: "g_unix_fd_list_new", libprag.} + +proc newUnixFDList*(): UnixFDList = + new(result, finalizeGObject) + result.impl = g_unix_fd_list_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixFDList*[T](result: var T) = + assert(result is UnixFDList) + new(result, finalizeGObject) + result.impl = g_unix_fd_list_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_fd_list_new_from_array*(fds: int32Array; nFds: int32): ptr UnixFDList00 {. + importc: "g_unix_fd_list_new_from_array", libprag.} + +proc newUnixFDListFromArray*(fds: int32Array; nFds: int): UnixFDList = + new(result, finalizeGObject) + result.impl = g_unix_fd_list_new_from_array(fds, int32(nFds)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixFDListFromArray*[T](result: var T; fds: int32Array; nFds: int) = + assert(result is UnixFDList) + new(result, finalizeGObject) + result.impl = g_unix_fd_list_new_from_array(fds, int32(nFds)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_fd_list_append*(self: ptr UnixFDList00; fd: int32): int32 {. + importc: "g_unix_fd_list_append", libprag.} + +proc append*(self: UnixFDList; fd: int): int = + int(g_unix_fd_list_append(cast[ptr UnixFDList00](self.impl), int32(fd))) + +proc g_unix_fd_list_get*(self: ptr UnixFDList00; index: int32): int32 {. + importc: "g_unix_fd_list_get", libprag.} + +proc get*(self: UnixFDList; index: int): int = + int(g_unix_fd_list_get(cast[ptr UnixFDList00](self.impl), int32(index))) + +proc g_unix_fd_list_get_length*(self: ptr UnixFDList00): int32 {. + importc: "g_unix_fd_list_get_length", libprag.} + +proc getLength*(self: UnixFDList): int = + int(g_unix_fd_list_get_length(cast[ptr UnixFDList00](self.impl))) + +proc length*(self: UnixFDList): int = + int(g_unix_fd_list_get_length(cast[ptr UnixFDList00](self.impl))) + +proc g_unix_fd_list_peek_fds*(self: ptr UnixFDList00; length: var int32): int32Array {. + importc: "g_unix_fd_list_peek_fds", libprag.} + +proc peekFds*(self: UnixFDList; length: var int): int32Array = + var length_00 = int32(length) + result = g_unix_fd_list_peek_fds(cast[ptr UnixFDList00](self.impl), length_00) + length = int(length_00) + +proc g_unix_fd_list_steal_fds*(self: ptr UnixFDList00; length: var int32): int32Array {. + importc: "g_unix_fd_list_steal_fds", libprag.} + +proc stealFds*(self: UnixFDList; length: var int): int32Array = + var length_00 = int32(length) + result = g_unix_fd_list_steal_fds(cast[ptr UnixFDList00](self.impl), length_00) + length = int(length_00) + +proc g_dbus_connection_call_with_unix_fd_list_finish*(self: ptr DBusConnection00; outFdList: var ptr UnixFDList00; + res: ptr AsyncResult00): ptr glib.Variant00 {. + importc: "g_dbus_connection_call_with_unix_fd_list_finish", libprag.} + +proc callWithUnixFdListFinish*(self: ptr DBusConnection00; outFdList: var ptr UnixFDList00; + res: ptr AsyncResult00): ptr glib.Variant00 {. + importc: "g_dbus_connection_call_with_unix_fd_list_finish", libprag.} + +type + DBusCallFlag* {.size: sizeof(cint), pure.} = enum + noAutoStart = 1 + allowInteractiveAuthorization = 2 + + DBusCallFlags* {.size: sizeof(cint).} = set[DBusCallFlag] + +proc g_dbus_connection_call_sync*(self: ptr DBusConnection00; busName: cstring; objectPath: cstring; + interfaceName: cstring; methodName: cstring; parameters: ptr glib.Variant00; replyType: ptr glib.VariantType00; + flags: DBusCallFlags; timeoutMsec: int32; cancellable: ptr Cancellable00): ptr glib.Variant00 {. + importc: "g_dbus_connection_call_sync", libprag.} + +proc callSync*(self: DBusConnection; busName: string; objectPath: string; + interfaceName: string; methodName: string; parameters: glib.Variant; replyType: glib.VariantType; + flags: DBusCallFlags; timeoutMsec: int; cancellable: Cancellable): glib.Variant = + new(result) + result.impl = g_dbus_connection_call_sync(cast[ptr DBusConnection00](self.impl), cstring(busName), cstring(objectPath), cstring(interfaceName), cstring(methodName), cast[ptr glib.Variant00](parameters.impl), cast[ptr glib.VariantType00](replyType.impl), flags, int32(timeoutMsec), cast[ptr Cancellable00](cancellable.impl)) + +proc g_dbus_connection_call_with_unix_fd_list_sync*(self: ptr DBusConnection00; busName: cstring; objectPath: cstring; + interfaceName: cstring; methodName: cstring; parameters: ptr glib.Variant00; replyType: ptr glib.VariantType00; + flags: DBusCallFlags; timeoutMsec: int32; fdList: ptr UnixFDList00; outFdList: var ptr UnixFDList00; cancellable: ptr Cancellable00): ptr glib.Variant00 {. + importc: "g_dbus_connection_call_with_unix_fd_list_sync", libprag.} + +proc callWithUnixFdListSync*(self: ptr DBusConnection00; busName: cstring; objectPath: cstring; + interfaceName: cstring; methodName: cstring; parameters: ptr glib.Variant00; replyType: ptr glib.VariantType00; + flags: DBusCallFlags; timeoutMsec: int32; fdList: ptr UnixFDList00; outFdList: var ptr UnixFDList00; cancellable: ptr Cancellable00): ptr glib.Variant00 {. + importc: "g_dbus_connection_call_with_unix_fd_list_sync", libprag.} + +type + MenuModelPrivate00* {.pure.} = object + MenuModelPrivate* = ref object + impl*: ptr MenuModelPrivate00 + +type + MenuModel* = ref object of gobject.Object + MenuModel00* = object of gobject.Object00 + priv1: ptr MenuModelPrivate00 + +proc scItemsChanged*(self: MenuModel; p: proc (self: ptr gobject.Object00; position: int32; removed: int32; added: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "items-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_menu_model_get_item_attribute_value*(self: ptr MenuModel00; itemIndex: int32; attribute: cstring; + expectedType: ptr glib.VariantType00): ptr glib.Variant00 {. + importc: "g_menu_model_get_item_attribute_value", libprag.} + +proc getItemAttributeValue*(self: MenuModel; itemIndex: int; attribute: string; + expectedType: glib.VariantType): glib.Variant = + new(result) + result.impl = g_menu_model_get_item_attribute_value(cast[ptr MenuModel00](self.impl), int32(itemIndex), cstring(attribute), cast[ptr glib.VariantType00](expectedType.impl)) + +proc itemAttributeValue*(self: MenuModel; itemIndex: int; attribute: string; + expectedType: glib.VariantType): glib.Variant = + new(result) + result.impl = g_menu_model_get_item_attribute_value(cast[ptr MenuModel00](self.impl), int32(itemIndex), cstring(attribute), cast[ptr glib.VariantType00](expectedType.impl)) + +proc g_menu_model_get_item_link*(self: ptr MenuModel00; itemIndex: int32; link: cstring): ptr MenuModel00 {. + importc: "g_menu_model_get_item_link", libprag.} + +proc getItemLink*(self: MenuModel; itemIndex: int; link: string): MenuModel = + let gobj = g_menu_model_get_item_link(cast[ptr MenuModel00](self.impl), int32(itemIndex), cstring(link)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc itemLink*(self: MenuModel; itemIndex: int; link: string): MenuModel = + let gobj = g_menu_model_get_item_link(cast[ptr MenuModel00](self.impl), int32(itemIndex), cstring(link)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_menu_model_get_n_items*(self: ptr MenuModel00): int32 {. + importc: "g_menu_model_get_n_items", libprag.} + +proc getNItems*(self: MenuModel): int = + int(g_menu_model_get_n_items(cast[ptr MenuModel00](self.impl))) + +proc nItems*(self: MenuModel): int = + int(g_menu_model_get_n_items(cast[ptr MenuModel00](self.impl))) + +proc g_menu_model_is_mutable*(self: ptr MenuModel00): gboolean {. + importc: "g_menu_model_is_mutable", libprag.} + +proc isMutable*(self: MenuModel): bool = + toBool(g_menu_model_is_mutable(cast[ptr MenuModel00](self.impl))) + +proc g_menu_model_items_changed*(self: ptr MenuModel00; position: int32; removed: int32; + added: int32) {. + importc: "g_menu_model_items_changed", libprag.} + +proc itemsChanged*(self: MenuModel; position: int; removed: int; added: int) = + g_menu_model_items_changed(cast[ptr MenuModel00](self.impl), int32(position), int32(removed), int32(added)) + +proc g_dbus_connection_export_menu_model*(self: ptr DBusConnection00; objectPath: cstring; menu: ptr MenuModel00): uint32 {. + importc: "g_dbus_connection_export_menu_model", libprag.} + +proc exportMenuModel*(self: DBusConnection; objectPath: string; menu: MenuModel): int = + int(g_dbus_connection_export_menu_model(cast[ptr DBusConnection00](self.impl), cstring(objectPath), cast[ptr MenuModel00](menu.impl))) + +type + MenuAttributeIterPrivate00* {.pure.} = object + MenuAttributeIterPrivate* = ref object + impl*: ptr MenuAttributeIterPrivate00 + +type + MenuAttributeIter* = ref object of gobject.Object + MenuAttributeIter00* = object of gobject.Object00 + priv1: ptr MenuAttributeIterPrivate00 + +proc g_menu_attribute_iter_get_name*(self: ptr MenuAttributeIter00): cstring {. + importc: "g_menu_attribute_iter_get_name", libprag.} + +proc getName*(self: MenuAttributeIter): string = + let resul0 = g_menu_attribute_iter_get_name(cast[ptr MenuAttributeIter00](self.impl)) + result = $resul0 + +proc name*(self: MenuAttributeIter): string = + let resul0 = g_menu_attribute_iter_get_name(cast[ptr MenuAttributeIter00](self.impl)) + result = $resul0 + +proc g_menu_attribute_iter_get_next*(self: ptr MenuAttributeIter00; outName: var cstring; + value: var ptr glib.Variant00): gboolean {. + importc: "g_menu_attribute_iter_get_next", libprag.} + +proc getNext*(self: ptr MenuAttributeIter00; outName: var cstring; + value: var ptr glib.Variant00): gboolean {. + importc: "g_menu_attribute_iter_get_next", libprag.} + +proc next*(self: ptr MenuAttributeIter00; outName: var cstring; + value: var ptr glib.Variant00): gboolean {. + importc: "g_menu_attribute_iter_get_next", libprag.} + +proc g_menu_attribute_iter_get_value*(self: ptr MenuAttributeIter00): ptr glib.Variant00 {. + importc: "g_menu_attribute_iter_get_value", libprag.} + +proc getValue*(self: MenuAttributeIter): glib.Variant = + new(result) + result.impl = g_menu_attribute_iter_get_value(cast[ptr MenuAttributeIter00](self.impl)) + +proc value*(self: MenuAttributeIter): glib.Variant = + new(result) + result.impl = g_menu_attribute_iter_get_value(cast[ptr MenuAttributeIter00](self.impl)) + +proc g_menu_attribute_iter_next*(self: ptr MenuAttributeIter00): gboolean {. + importc: "g_menu_attribute_iter_next", libprag.} + +proc next*(self: MenuAttributeIter): bool = + toBool(g_menu_attribute_iter_next(cast[ptr MenuAttributeIter00](self.impl))) + +proc g_menu_model_iterate_item_attributes*(self: ptr MenuModel00; itemIndex: int32): ptr MenuAttributeIter00 {. + importc: "g_menu_model_iterate_item_attributes", libprag.} + +proc iterateItemAttributes*(self: MenuModel; itemIndex: int): MenuAttributeIter = + let gobj = g_menu_model_iterate_item_attributes(cast[ptr MenuModel00](self.impl), int32(itemIndex)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[MenuAttributeIter](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + MenuLinkIterPrivate00* {.pure.} = object + MenuLinkIterPrivate* = ref object + impl*: ptr MenuLinkIterPrivate00 + +type + MenuLinkIter* = ref object of gobject.Object + MenuLinkIter00* = object of gobject.Object00 + priv1: ptr MenuLinkIterPrivate00 + +proc g_menu_link_iter_get_name*(self: ptr MenuLinkIter00): cstring {. + importc: "g_menu_link_iter_get_name", libprag.} + +proc getName*(self: MenuLinkIter): string = + let resul0 = g_menu_link_iter_get_name(cast[ptr MenuLinkIter00](self.impl)) + result = $resul0 + +proc name*(self: MenuLinkIter): string = + let resul0 = g_menu_link_iter_get_name(cast[ptr MenuLinkIter00](self.impl)) + result = $resul0 + +proc g_menu_link_iter_get_next*(self: ptr MenuLinkIter00; outLink: var cstring; value: var ptr MenuModel00): gboolean {. + importc: "g_menu_link_iter_get_next", libprag.} + +proc getNext*(self: ptr MenuLinkIter00; outLink: var cstring; value: var ptr MenuModel00): gboolean {. + importc: "g_menu_link_iter_get_next", libprag.} + +proc next*(self: ptr MenuLinkIter00; outLink: var cstring; value: var ptr MenuModel00): gboolean {. + importc: "g_menu_link_iter_get_next", libprag.} + +proc g_menu_link_iter_get_value*(self: ptr MenuLinkIter00): ptr MenuModel00 {. + importc: "g_menu_link_iter_get_value", libprag.} + +proc getValue*(self: MenuLinkIter): MenuModel = + let gobj = g_menu_link_iter_get_value(cast[ptr MenuLinkIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc value*(self: MenuLinkIter): MenuModel = + let gobj = g_menu_link_iter_get_value(cast[ptr MenuLinkIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_menu_link_iter_next*(self: ptr MenuLinkIter00): gboolean {. + importc: "g_menu_link_iter_next", libprag.} + +proc next*(self: MenuLinkIter): bool = + toBool(g_menu_link_iter_next(cast[ptr MenuLinkIter00](self.impl))) + +proc g_menu_model_iterate_item_links*(self: ptr MenuModel00; itemIndex: int32): ptr MenuLinkIter00 {. + importc: "g_menu_model_iterate_item_links", libprag.} + +proc iterateItemLinks*(self: MenuModel; itemIndex: int): MenuLinkIter = + let gobj = g_menu_model_iterate_item_links(cast[ptr MenuModel00](self.impl), int32(itemIndex)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[MenuLinkIter](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DBusCapabilityFlag* {.size: sizeof(cint), pure.} = enum + unixFdPassing = 1 + + DBusCapabilityFlags* {.size: sizeof(cint).} = set[DBusCapabilityFlag] + +proc g_dbus_connection_get_capabilities*(self: ptr DBusConnection00): DBusCapabilityFlags {. + importc: "g_dbus_connection_get_capabilities", libprag.} + +proc getCapabilities*(self: DBusConnection): DBusCapabilityFlags = + g_dbus_connection_get_capabilities(cast[ptr DBusConnection00](self.impl)) + +proc capabilities*(self: DBusConnection): DBusCapabilityFlags = + g_dbus_connection_get_capabilities(cast[ptr DBusConnection00](self.impl)) + +type + Credentials* = ref object of gobject.Object + Credentials00* = object of gobject.Object00 + +proc g_credentials_new*(): ptr Credentials00 {. + importc: "g_credentials_new", libprag.} + +proc newCredentials*(): Credentials = + new(result, finalizeGObject) + result.impl = g_credentials_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCredentials*[T](result: var T) = + assert(result is Credentials) + new(result, finalizeGObject) + result.impl = g_credentials_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_credentials_get_unix_pid*(self: ptr Credentials00): int32 {. + importc: "g_credentials_get_unix_pid", libprag.} + +proc getUnixPid*(self: Credentials): int = + int(g_credentials_get_unix_pid(cast[ptr Credentials00](self.impl))) + +proc unixPid*(self: Credentials): int = + int(g_credentials_get_unix_pid(cast[ptr Credentials00](self.impl))) + +proc g_credentials_get_unix_user*(self: ptr Credentials00): uint32 {. + importc: "g_credentials_get_unix_user", libprag.} + +proc getUnixUser*(self: Credentials): int = + int(g_credentials_get_unix_user(cast[ptr Credentials00](self.impl))) + +proc unixUser*(self: Credentials): int = + int(g_credentials_get_unix_user(cast[ptr Credentials00](self.impl))) + +proc g_credentials_is_same_user*(self: ptr Credentials00; otherCredentials: ptr Credentials00): gboolean {. + importc: "g_credentials_is_same_user", libprag.} + +proc isSameUser*(self: Credentials; otherCredentials: Credentials): bool = + toBool(g_credentials_is_same_user(cast[ptr Credentials00](self.impl), cast[ptr Credentials00](otherCredentials.impl))) + +proc g_credentials_set_unix_user*(self: ptr Credentials00; uid: uint32): gboolean {. + importc: "g_credentials_set_unix_user", libprag.} + +proc setUnixUser*(self: Credentials; uid: int): bool = + toBool(g_credentials_set_unix_user(cast[ptr Credentials00](self.impl), uint32(uid))) + +proc `unixUser=`*(self: Credentials; uid: int): bool = + toBool(g_credentials_set_unix_user(cast[ptr Credentials00](self.impl), uint32(uid))) + +proc g_credentials_to_string*(self: ptr Credentials00): cstring {. + importc: "g_credentials_to_string", libprag.} + +proc toString*(self: Credentials): string = + let resul0 = g_credentials_to_string(cast[ptr Credentials00](self.impl)) + result = $resul0 + cogfree(resul0) + +type + DBusAuthObserver* = ref object of gobject.Object + DBusAuthObserver00* = object of gobject.Object00 + +proc scAllowMechanism*(self: DBusAuthObserver; p: proc (self: ptr gobject.Object00; mechanism: cstring; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "allow-mechanism", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scAuthorizeAuthenticatedPeer*(self: DBusAuthObserver; p: proc (self: ptr gobject.Object00; stream: IOStream00; credentials: Credentials00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "authorize-authenticated-peer", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_dbus_auth_observer_new*(): ptr DBusAuthObserver00 {. + importc: "g_dbus_auth_observer_new", libprag.} + +proc newDBusAuthObserver*(): DBusAuthObserver = + new(result, finalizeGObject) + result.impl = g_dbus_auth_observer_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusAuthObserver*[T](result: var T) = + assert(result is DBusAuthObserver) + new(result, finalizeGObject) + result.impl = g_dbus_auth_observer_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_auth_observer_allow_mechanism*(self: ptr DBusAuthObserver00; mechanism: cstring): gboolean {. + importc: "g_dbus_auth_observer_allow_mechanism", libprag.} + +proc allowMechanism*(self: DBusAuthObserver; mechanism: string): bool = + toBool(g_dbus_auth_observer_allow_mechanism(cast[ptr DBusAuthObserver00](self.impl), cstring(mechanism))) + +proc g_dbus_auth_observer_authorize_authenticated_peer*(self: ptr DBusAuthObserver00; stream: ptr IOStream00; + credentials: ptr Credentials00): gboolean {. + importc: "g_dbus_auth_observer_authorize_authenticated_peer", libprag.} + +proc authorizeAuthenticatedPeer*(self: DBusAuthObserver; stream: IOStream; credentials: Credentials): bool = + toBool(g_dbus_auth_observer_authorize_authenticated_peer(cast[ptr DBusAuthObserver00](self.impl), cast[ptr IOStream00](stream.impl), cast[ptr Credentials00](credentials.impl))) + +proc g_dbus_connection_new_for_address_sync*(address: cstring; flags: DBusConnectionFlags; observer: ptr DBusAuthObserver00; + cancellable: ptr Cancellable00): ptr DBusConnection00 {. + importc: "g_dbus_connection_new_for_address_sync", libprag.} + +proc newDBusConnectionForAddressSync*(address: string; flags: DBusConnectionFlags; observer: DBusAuthObserver; + cancellable: Cancellable): DBusConnection = + new(result, finalizeGObject) + result.impl = g_dbus_connection_new_for_address_sync(cstring(address), flags, cast[ptr DBusAuthObserver00](observer.impl), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusConnectionForAddressSync*[T](result: var T; address: string; flags: DBusConnectionFlags; observer: DBusAuthObserver; + cancellable: Cancellable) = + assert(result is DBusConnection) + new(result, finalizeGObject) + result.impl = g_dbus_connection_new_for_address_sync(cstring(address), flags, cast[ptr DBusAuthObserver00](observer.impl), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_connection_new_sync*(stream: ptr IOStream00; guid: cstring; flags: DBusConnectionFlags; + observer: ptr DBusAuthObserver00; cancellable: ptr Cancellable00): ptr DBusConnection00 {. + importc: "g_dbus_connection_new_sync", libprag.} + +proc newDBusConnectionSync*(stream: IOStream; guid: string; flags: DBusConnectionFlags; + observer: DBusAuthObserver; cancellable: Cancellable): DBusConnection = + new(result, finalizeGObject) + result.impl = g_dbus_connection_new_sync(cast[ptr IOStream00](stream.impl), cstring(guid), flags, cast[ptr DBusAuthObserver00](observer.impl), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusConnectionSync*[T](result: var T; stream: IOStream; guid: string; flags: DBusConnectionFlags; + observer: DBusAuthObserver; cancellable: Cancellable) = + assert(result is DBusConnection) + new(result, finalizeGObject) + result.impl = g_dbus_connection_new_sync(cast[ptr IOStream00](stream.impl), cstring(guid), flags, cast[ptr DBusAuthObserver00](observer.impl), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_connection_get_peer_credentials*(self: ptr DBusConnection00): ptr Credentials00 {. + importc: "g_dbus_connection_get_peer_credentials", libprag.} + +proc getPeerCredentials*(self: DBusConnection): Credentials = + let gobj = g_dbus_connection_get_peer_credentials(cast[ptr DBusConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Credentials](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc peerCredentials*(self: DBusConnection): Credentials = + let gobj = g_dbus_connection_get_peer_credentials(cast[ptr DBusConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Credentials](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + CredentialsType* {.size: sizeof(cint), pure.} = enum + invalid = 0 + linuxUcred = 1 + freebsdCmsgcred = 2 + openbsdSockpeercred = 3 + solarisUcred = 4 + netbsdUnpcbid = 5 + +proc g_credentials_set_native*(self: ptr Credentials00; nativeType: CredentialsType; + native: pointer) {. + importc: "g_credentials_set_native", libprag.} + +proc setNative*(self: Credentials; nativeType: CredentialsType; native: pointer) = + g_credentials_set_native(cast[ptr Credentials00](self.impl), nativeType, native) + +type + DBusAnnotationInfo00* {.pure.} = object + refCount*: int32 + key*: cstring + value*: cstring + annotations*: ptr DBusAnnotationInfo00Array + DBusAnnotationInfo* = ref object + impl*: ptr DBusAnnotationInfo00 + +proc g_dbus_annotation_info_ref*(self: ptr DBusAnnotationInfo00): ptr DBusAnnotationInfo00 {. + importc: "g_dbus_annotation_info_ref", libprag.} + +proc `ref`*(self: DBusAnnotationInfo): DBusAnnotationInfo = + new(result) + result.impl = g_dbus_annotation_info_ref(cast[ptr DBusAnnotationInfo00](self.impl)) + +proc g_dbus_annotation_info_unref*(self: ptr DBusAnnotationInfo00) {. + importc: "g_dbus_annotation_info_unref", libprag.} + +proc unref*(self: DBusAnnotationInfo) = + g_dbus_annotation_info_unref(cast[ptr DBusAnnotationInfo00](self.impl)) + +proc g_dbus_annotation_info_lookup*(annotations: ptr DBusAnnotationInfo00Array; name: cstring): cstring {. + importc: "g_dbus_annotation_info_lookup", libprag.} + +proc lookup*(annotations: ptr DBusAnnotationInfo00Array; name: string): string = + let resul0 = g_dbus_annotation_info_lookup(annotations, cstring(name)) + result = $resul0 + +type + DBusArgInfo00* {.pure.} = object + refCount*: int32 + name*: cstring + signature*: cstring + annotations*: ptr DBusAnnotationInfo00Array + DBusArgInfo* = ref object + impl*: ptr DBusArgInfo00 + +proc g_dbus_arg_info_ref*(self: ptr DBusArgInfo00): ptr DBusArgInfo00 {. + importc: "g_dbus_arg_info_ref", libprag.} + +proc `ref`*(self: DBusArgInfo): DBusArgInfo = + new(result) + result.impl = g_dbus_arg_info_ref(cast[ptr DBusArgInfo00](self.impl)) + +proc g_dbus_arg_info_unref*(self: ptr DBusArgInfo00) {. + importc: "g_dbus_arg_info_unref", libprag.} + +proc unref*(self: DBusArgInfo) = + g_dbus_arg_info_unref(cast[ptr DBusArgInfo00](self.impl)) + +type + DBusMethodInfo00* {.pure.} = object + refCount*: int32 + name*: cstring + inArgs*: ptr DBusArgInfo00Array + outArgs*: ptr DBusArgInfo00Array + annotations*: ptr DBusAnnotationInfo00Array + DBusMethodInfo* = ref object + impl*: ptr DBusMethodInfo00 + +proc g_dbus_method_info_ref*(self: ptr DBusMethodInfo00): ptr DBusMethodInfo00 {. + importc: "g_dbus_method_info_ref", libprag.} + +proc `ref`*(self: DBusMethodInfo): DBusMethodInfo = + new(result) + result.impl = g_dbus_method_info_ref(cast[ptr DBusMethodInfo00](self.impl)) + +proc g_dbus_method_info_unref*(self: ptr DBusMethodInfo00) {. + importc: "g_dbus_method_info_unref", libprag.} + +proc unref*(self: DBusMethodInfo) = + g_dbus_method_info_unref(cast[ptr DBusMethodInfo00](self.impl)) + +type + DBusSignalInfo00* {.pure.} = object + refCount*: int32 + name*: cstring + args*: ptr DBusArgInfo00Array + annotations*: ptr DBusAnnotationInfo00Array + DBusSignalInfo* = ref object + impl*: ptr DBusSignalInfo00 + +proc g_dbus_signal_info_ref*(self: ptr DBusSignalInfo00): ptr DBusSignalInfo00 {. + importc: "g_dbus_signal_info_ref", libprag.} + +proc `ref`*(self: DBusSignalInfo): DBusSignalInfo = + new(result) + result.impl = g_dbus_signal_info_ref(cast[ptr DBusSignalInfo00](self.impl)) + +proc g_dbus_signal_info_unref*(self: ptr DBusSignalInfo00) {. + importc: "g_dbus_signal_info_unref", libprag.} + +proc unref*(self: DBusSignalInfo) = + g_dbus_signal_info_unref(cast[ptr DBusSignalInfo00](self.impl)) + +type + DBusPropertyInfoFlag* {.size: sizeof(cint), pure.} = enum + readable = 1 + writable = 2 + + DBusPropertyInfoFlags* {.size: sizeof(cint).} = set[DBusPropertyInfoFlag] + +type + DBusPropertyInfo00* {.pure.} = object + refCount*: int32 + name*: cstring + signature*: cstring + flags*: DBusPropertyInfoFlags + annotations*: ptr DBusAnnotationInfo00Array + DBusPropertyInfo* = ref object + impl*: ptr DBusPropertyInfo00 + +proc g_dbus_property_info_ref*(self: ptr DBusPropertyInfo00): ptr DBusPropertyInfo00 {. + importc: "g_dbus_property_info_ref", libprag.} + +proc `ref`*(self: DBusPropertyInfo): DBusPropertyInfo = + new(result) + result.impl = g_dbus_property_info_ref(cast[ptr DBusPropertyInfo00](self.impl)) + +proc g_dbus_property_info_unref*(self: ptr DBusPropertyInfo00) {. + importc: "g_dbus_property_info_unref", libprag.} + +proc unref*(self: DBusPropertyInfo) = + g_dbus_property_info_unref(cast[ptr DBusPropertyInfo00](self.impl)) + +type + DBusInterfaceInfo00* {.pure.} = object + refCount*: int32 + name*: cstring + methods*: ptr DBusMethodInfo00Array + signals*: ptr DBusSignalInfo00Array + properties*: ptr DBusPropertyInfo00Array + annotations*: ptr DBusAnnotationInfo00Array + DBusInterfaceInfo* = ref object + impl*: ptr DBusInterfaceInfo00 + +proc g_dbus_interface_info_cache_build*(self: ptr DBusInterfaceInfo00) {. + importc: "g_dbus_interface_info_cache_build", libprag.} + +proc cacheBuild*(self: DBusInterfaceInfo) = + g_dbus_interface_info_cache_build(cast[ptr DBusInterfaceInfo00](self.impl)) + +proc g_dbus_interface_info_cache_release*(self: ptr DBusInterfaceInfo00) {. + importc: "g_dbus_interface_info_cache_release", libprag.} + +proc cacheRelease*(self: DBusInterfaceInfo) = + g_dbus_interface_info_cache_release(cast[ptr DBusInterfaceInfo00](self.impl)) + +proc g_dbus_interface_info_generate_xml*(self: ptr DBusInterfaceInfo00; indent: uint32; stringBuilder: var glib.String00) {. + importc: "g_dbus_interface_info_generate_xml", libprag.} + +proc generateXml*(self: ptr DBusInterfaceInfo00; indent: uint32; stringBuilder: var glib.String00) {. + importc: "g_dbus_interface_info_generate_xml", libprag.} + +proc g_dbus_interface_info_lookup_method*(self: ptr DBusInterfaceInfo00; name: cstring): ptr DBusMethodInfo00 {. + importc: "g_dbus_interface_info_lookup_method", libprag.} + +proc lookupMethod*(self: DBusInterfaceInfo; name: string): DBusMethodInfo = + new(result) + result.impl = g_dbus_interface_info_lookup_method(cast[ptr DBusInterfaceInfo00](self.impl), cstring(name)) + +proc g_dbus_interface_info_lookup_property*(self: ptr DBusInterfaceInfo00; name: cstring): ptr DBusPropertyInfo00 {. + importc: "g_dbus_interface_info_lookup_property", libprag.} + +proc lookupProperty*(self: DBusInterfaceInfo; name: string): DBusPropertyInfo = + new(result) + result.impl = g_dbus_interface_info_lookup_property(cast[ptr DBusInterfaceInfo00](self.impl), cstring(name)) + +proc g_dbus_interface_info_lookup_signal*(self: ptr DBusInterfaceInfo00; name: cstring): ptr DBusSignalInfo00 {. + importc: "g_dbus_interface_info_lookup_signal", libprag.} + +proc lookupSignal*(self: DBusInterfaceInfo; name: string): DBusSignalInfo = + new(result) + result.impl = g_dbus_interface_info_lookup_signal(cast[ptr DBusInterfaceInfo00](self.impl), cstring(name)) + +proc g_dbus_interface_info_ref*(self: ptr DBusInterfaceInfo00): ptr DBusInterfaceInfo00 {. + importc: "g_dbus_interface_info_ref", libprag.} + +proc `ref`*(self: DBusInterfaceInfo): DBusInterfaceInfo = + new(result) + result.impl = g_dbus_interface_info_ref(cast[ptr DBusInterfaceInfo00](self.impl)) + +proc g_dbus_interface_info_unref*(self: ptr DBusInterfaceInfo00) {. + importc: "g_dbus_interface_info_unref", libprag.} + +proc unref*(self: DBusInterfaceInfo) = + g_dbus_interface_info_unref(cast[ptr DBusInterfaceInfo00](self.impl)) + +proc g_dbus_connection_register_object_with_closures*(self: ptr DBusConnection00; objectPath: cstring; interfaceInfo: ptr DBusInterfaceInfo00; + methodCallClosure: ptr gobject.Closure00; getPropertyClosure: ptr gobject.Closure00; + setPropertyClosure: ptr gobject.Closure00): uint32 {. + importc: "g_dbus_connection_register_object_with_closures", libprag.} + +proc registerObject*(self: DBusConnection; objectPath: string; interfaceInfo: DBusInterfaceInfo; + methodCallClosure: gobject.Closure; getPropertyClosure: gobject.Closure; + setPropertyClosure: gobject.Closure): int = + int(g_dbus_connection_register_object_with_closures(cast[ptr DBusConnection00](self.impl), cstring(objectPath), cast[ptr DBusInterfaceInfo00](interfaceInfo.impl), cast[ptr gobject.Closure00](methodCallClosure.impl), cast[ptr gobject.Closure00](getPropertyClosure.impl), cast[ptr gobject.Closure00](setPropertyClosure.impl))) + +type + DBusMessage* = ref object of gobject.Object + DBusMessage00* = object of gobject.Object00 + +proc g_dbus_message_new*(): ptr DBusMessage00 {. + importc: "g_dbus_message_new", libprag.} + +proc newDBusMessage*(): DBusMessage = + new(result, finalizeGObject) + result.impl = g_dbus_message_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusMessage*[T](result: var T) = + assert(result is DBusMessage) + new(result, finalizeGObject) + result.impl = g_dbus_message_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_message_new_from_blob*(blob: uint8Array; blobLen: uint64; capabilities: DBusCapabilityFlags): ptr DBusMessage00 {. + importc: "g_dbus_message_new_from_blob", libprag.} + +proc newDBusMessageFromBlob*(blob: uint8Array; blobLen: uint64; capabilities: DBusCapabilityFlags): DBusMessage = + new(result, finalizeGObject) + result.impl = g_dbus_message_new_from_blob(blob, blobLen, capabilities) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusMessageFromBlob*[T](result: var T; blob: uint8Array; blobLen: uint64; capabilities: DBusCapabilityFlags) = + assert(result is DBusMessage) + new(result, finalizeGObject) + result.impl = g_dbus_message_new_from_blob(blob, blobLen, capabilities) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_message_new_method_call*(name: cstring; path: cstring; `interface`: cstring; + `method`: cstring): ptr DBusMessage00 {. + importc: "g_dbus_message_new_method_call", libprag.} + +proc newDBusMessageMethodCall*(name: string; path: string; `interface`: string; `method`: string): DBusMessage = + new(result, finalizeGObject) + result.impl = g_dbus_message_new_method_call(cstring(name), cstring(path), cstring(`interface`), cstring(`method`)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusMessageMethodCall*[T](result: var T; name: string; path: string; `interface`: string; `method`: string) = + assert(result is DBusMessage) + new(result, finalizeGObject) + result.impl = g_dbus_message_new_method_call(cstring(name), cstring(path), cstring(`interface`), cstring(`method`)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_message_new_signal*(path: cstring; `interface`: cstring; signal: cstring): ptr DBusMessage00 {. + importc: "g_dbus_message_new_signal", libprag.} + +proc newDBusMessageSignal*(path: string; `interface`: string; signal: string): DBusMessage = + new(result, finalizeGObject) + result.impl = g_dbus_message_new_signal(cstring(path), cstring(`interface`), cstring(signal)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusMessageSignal*[T](result: var T; path: string; `interface`: string; signal: string) = + assert(result is DBusMessage) + new(result, finalizeGObject) + result.impl = g_dbus_message_new_signal(cstring(path), cstring(`interface`), cstring(signal)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_message_bytes_needed*(blob: uint8Array; blobLen: uint64): int64 {. + importc: "g_dbus_message_bytes_needed", libprag.} + +proc bytesNeeded*(blob: uint8Array; blobLen: uint64): int64 {. + importc: "g_dbus_message_bytes_needed", libprag.} + +proc g_dbus_message_copy*(self: ptr DBusMessage00): ptr DBusMessage00 {. + importc: "g_dbus_message_copy", libprag.} + +proc copy*(self: DBusMessage): DBusMessage = + let gobj = g_dbus_message_copy(cast[ptr DBusMessage00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusMessage](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_message_get_arg0*(self: ptr DBusMessage00): cstring {. + importc: "g_dbus_message_get_arg0", libprag.} + +proc getArg0*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_arg0(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc arg0*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_arg0(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc g_dbus_message_get_body*(self: ptr DBusMessage00): ptr glib.Variant00 {. + importc: "g_dbus_message_get_body", libprag.} + +proc getBody*(self: DBusMessage): glib.Variant = + new(result) + result.impl = g_dbus_message_get_body(cast[ptr DBusMessage00](self.impl)) + +proc body*(self: DBusMessage): glib.Variant = + new(result) + result.impl = g_dbus_message_get_body(cast[ptr DBusMessage00](self.impl)) + +proc g_dbus_message_get_destination*(self: ptr DBusMessage00): cstring {. + importc: "g_dbus_message_get_destination", libprag.} + +proc getDestination*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_destination(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc destination*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_destination(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc g_dbus_message_get_error_name*(self: ptr DBusMessage00): cstring {. + importc: "g_dbus_message_get_error_name", libprag.} + +proc getErrorName*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_error_name(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc errorName*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_error_name(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc g_dbus_message_get_header_fields*(self: ptr DBusMessage00): uint8Array {. + importc: "g_dbus_message_get_header_fields", libprag.} + +proc getHeaderFields*(self: DBusMessage): uint8Array = + g_dbus_message_get_header_fields(cast[ptr DBusMessage00](self.impl)) + +proc headerFields*(self: DBusMessage): uint8Array = + g_dbus_message_get_header_fields(cast[ptr DBusMessage00](self.impl)) + +proc g_dbus_message_get_interface*(self: ptr DBusMessage00): cstring {. + importc: "g_dbus_message_get_interface", libprag.} + +proc getInterface*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_interface(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc g_dbus_message_get_locked*(self: ptr DBusMessage00): gboolean {. + importc: "g_dbus_message_get_locked", libprag.} + +proc getLocked*(self: DBusMessage): bool = + toBool(g_dbus_message_get_locked(cast[ptr DBusMessage00](self.impl))) + +proc locked*(self: DBusMessage): bool = + toBool(g_dbus_message_get_locked(cast[ptr DBusMessage00](self.impl))) + +proc g_dbus_message_get_member*(self: ptr DBusMessage00): cstring {. + importc: "g_dbus_message_get_member", libprag.} + +proc getMember*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_member(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc member*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_member(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc g_dbus_message_get_num_unix_fds*(self: ptr DBusMessage00): uint32 {. + importc: "g_dbus_message_get_num_unix_fds", libprag.} + +proc getNumUnixFds*(self: DBusMessage): int = + int(g_dbus_message_get_num_unix_fds(cast[ptr DBusMessage00](self.impl))) + +proc numUnixFds*(self: DBusMessage): int = + int(g_dbus_message_get_num_unix_fds(cast[ptr DBusMessage00](self.impl))) + +proc g_dbus_message_get_path*(self: ptr DBusMessage00): cstring {. + importc: "g_dbus_message_get_path", libprag.} + +proc getPath*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_path(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc path*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_path(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc g_dbus_message_get_reply_serial*(self: ptr DBusMessage00): uint32 {. + importc: "g_dbus_message_get_reply_serial", libprag.} + +proc getReplySerial*(self: DBusMessage): int = + int(g_dbus_message_get_reply_serial(cast[ptr DBusMessage00](self.impl))) + +proc replySerial*(self: DBusMessage): int = + int(g_dbus_message_get_reply_serial(cast[ptr DBusMessage00](self.impl))) + +proc g_dbus_message_get_sender*(self: ptr DBusMessage00): cstring {. + importc: "g_dbus_message_get_sender", libprag.} + +proc getSender*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_sender(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc sender*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_sender(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc g_dbus_message_get_serial*(self: ptr DBusMessage00): uint32 {. + importc: "g_dbus_message_get_serial", libprag.} + +proc getSerial*(self: DBusMessage): int = + int(g_dbus_message_get_serial(cast[ptr DBusMessage00](self.impl))) + +proc serial*(self: DBusMessage): int = + int(g_dbus_message_get_serial(cast[ptr DBusMessage00](self.impl))) + +proc g_dbus_message_get_signature*(self: ptr DBusMessage00): cstring {. + importc: "g_dbus_message_get_signature", libprag.} + +proc getSignature*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_signature(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc signature*(self: DBusMessage): string = + let resul0 = g_dbus_message_get_signature(cast[ptr DBusMessage00](self.impl)) + result = $resul0 + +proc g_dbus_message_get_unix_fd_list*(self: ptr DBusMessage00): ptr UnixFDList00 {. + importc: "g_dbus_message_get_unix_fd_list", libprag.} + +proc getUnixFdList*(self: DBusMessage): UnixFDList = + let gobj = g_dbus_message_get_unix_fd_list(cast[ptr DBusMessage00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[UnixFDList](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc unixFdList*(self: DBusMessage): UnixFDList = + let gobj = g_dbus_message_get_unix_fd_list(cast[ptr DBusMessage00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[UnixFDList](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_message_lock*(self: ptr DBusMessage00) {. + importc: "g_dbus_message_lock", libprag.} + +proc lock*(self: DBusMessage) = + g_dbus_message_lock(cast[ptr DBusMessage00](self.impl)) + +proc g_dbus_message_new_method_error_literal*(self: ptr DBusMessage00; errorName: cstring; errorMessage: cstring): ptr DBusMessage00 {. + importc: "g_dbus_message_new_method_error_literal", libprag.} + +proc newDBusMessageMethodErrorLiteral*(self: DBusMessage; errorName: string; errorMessage: string): DBusMessage = + let gobj = g_dbus_message_new_method_error_literal(cast[ptr DBusMessage00](self.impl), cstring(errorName), cstring(errorMessage)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusMessage](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_message_new_method_reply*(self: ptr DBusMessage00): ptr DBusMessage00 {. + importc: "g_dbus_message_new_method_reply", libprag.} + +proc newDBusMessageMethodReply*(self: DBusMessage): DBusMessage = + let gobj = g_dbus_message_new_method_reply(cast[ptr DBusMessage00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusMessage](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_message_print*(self: ptr DBusMessage00; indent: uint32): cstring {. + importc: "g_dbus_message_print", libprag.} + +proc print*(self: DBusMessage; indent: int): string = + let resul0 = g_dbus_message_print(cast[ptr DBusMessage00](self.impl), uint32(indent)) + result = $resul0 + cogfree(resul0) + +proc g_dbus_message_set_body*(self: ptr DBusMessage00; body: ptr glib.Variant00) {. + importc: "g_dbus_message_set_body", libprag.} + +proc setBody*(self: DBusMessage; body: glib.Variant) = + g_dbus_message_set_body(cast[ptr DBusMessage00](self.impl), cast[ptr glib.Variant00](body.impl)) + +proc `body=`*(self: DBusMessage; body: glib.Variant) = + g_dbus_message_set_body(cast[ptr DBusMessage00](self.impl), cast[ptr glib.Variant00](body.impl)) + +proc g_dbus_message_set_destination*(self: ptr DBusMessage00; value: cstring) {. + importc: "g_dbus_message_set_destination", libprag.} + +proc setDestination*(self: DBusMessage; value: string) = + g_dbus_message_set_destination(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc `destination=`*(self: DBusMessage; value: string) = + g_dbus_message_set_destination(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc g_dbus_message_set_error_name*(self: ptr DBusMessage00; value: cstring) {. + importc: "g_dbus_message_set_error_name", libprag.} + +proc setErrorName*(self: DBusMessage; value: string) = + g_dbus_message_set_error_name(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc `errorName=`*(self: DBusMessage; value: string) = + g_dbus_message_set_error_name(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc g_dbus_message_set_interface*(self: ptr DBusMessage00; value: cstring) {. + importc: "g_dbus_message_set_interface", libprag.} + +proc setInterface*(self: DBusMessage; value: string) = + g_dbus_message_set_interface(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc `interface=`*(self: DBusMessage; value: string) = + g_dbus_message_set_interface(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc g_dbus_message_set_member*(self: ptr DBusMessage00; value: cstring) {. + importc: "g_dbus_message_set_member", libprag.} + +proc setMember*(self: DBusMessage; value: string) = + g_dbus_message_set_member(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc `member=`*(self: DBusMessage; value: string) = + g_dbus_message_set_member(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc g_dbus_message_set_num_unix_fds*(self: ptr DBusMessage00; value: uint32) {. + importc: "g_dbus_message_set_num_unix_fds", libprag.} + +proc setNumUnixFds*(self: DBusMessage; value: int) = + g_dbus_message_set_num_unix_fds(cast[ptr DBusMessage00](self.impl), uint32(value)) + +proc `numUnixFds=`*(self: DBusMessage; value: int) = + g_dbus_message_set_num_unix_fds(cast[ptr DBusMessage00](self.impl), uint32(value)) + +proc g_dbus_message_set_path*(self: ptr DBusMessage00; value: cstring) {. + importc: "g_dbus_message_set_path", libprag.} + +proc setPath*(self: DBusMessage; value: string) = + g_dbus_message_set_path(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc `path=`*(self: DBusMessage; value: string) = + g_dbus_message_set_path(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc g_dbus_message_set_reply_serial*(self: ptr DBusMessage00; value: uint32) {. + importc: "g_dbus_message_set_reply_serial", libprag.} + +proc setReplySerial*(self: DBusMessage; value: int) = + g_dbus_message_set_reply_serial(cast[ptr DBusMessage00](self.impl), uint32(value)) + +proc `replySerial=`*(self: DBusMessage; value: int) = + g_dbus_message_set_reply_serial(cast[ptr DBusMessage00](self.impl), uint32(value)) + +proc g_dbus_message_set_sender*(self: ptr DBusMessage00; value: cstring) {. + importc: "g_dbus_message_set_sender", libprag.} + +proc setSender*(self: DBusMessage; value: string) = + g_dbus_message_set_sender(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc `sender=`*(self: DBusMessage; value: string) = + g_dbus_message_set_sender(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc g_dbus_message_set_serial*(self: ptr DBusMessage00; serial: uint32) {. + importc: "g_dbus_message_set_serial", libprag.} + +proc setSerial*(self: DBusMessage; serial: int) = + g_dbus_message_set_serial(cast[ptr DBusMessage00](self.impl), uint32(serial)) + +proc `serial=`*(self: DBusMessage; serial: int) = + g_dbus_message_set_serial(cast[ptr DBusMessage00](self.impl), uint32(serial)) + +proc g_dbus_message_set_signature*(self: ptr DBusMessage00; value: cstring) {. + importc: "g_dbus_message_set_signature", libprag.} + +proc setSignature*(self: DBusMessage; value: string) = + g_dbus_message_set_signature(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc `signature=`*(self: DBusMessage; value: string) = + g_dbus_message_set_signature(cast[ptr DBusMessage00](self.impl), cstring(value)) + +proc g_dbus_message_set_unix_fd_list*(self: ptr DBusMessage00; fdList: ptr UnixFDList00) {. + importc: "g_dbus_message_set_unix_fd_list", libprag.} + +proc setUnixFdList*(self: DBusMessage; fdList: UnixFDList) = + g_dbus_message_set_unix_fd_list(cast[ptr DBusMessage00](self.impl), cast[ptr UnixFDList00](fdList.impl)) + +proc `unixFdList=`*(self: DBusMessage; fdList: UnixFDList) = + g_dbus_message_set_unix_fd_list(cast[ptr DBusMessage00](self.impl), cast[ptr UnixFDList00](fdList.impl)) + +proc g_dbus_message_to_blob*(self: ptr DBusMessage00; outSize: var uint64; capabilities: DBusCapabilityFlags): uint8Array {. + importc: "g_dbus_message_to_blob", libprag.} + +proc toBlob*(self: DBusMessage; outSize: var uint64; capabilities: DBusCapabilityFlags): uint8Array = + g_dbus_message_to_blob(cast[ptr DBusMessage00](self.impl), outSize, capabilities) + +proc g_dbus_message_to_gerror*(self: ptr DBusMessage00): gboolean {. + importc: "g_dbus_message_to_gerror", libprag.} + +proc toGerror*(self: DBusMessage): bool = + toBool(g_dbus_message_to_gerror(cast[ptr DBusMessage00](self.impl))) + +proc g_dbus_connection_send_message_with_reply_finish*(self: ptr DBusConnection00; res: ptr AsyncResult00): ptr DBusMessage00 {. + importc: "g_dbus_connection_send_message_with_reply_finish", libprag.} + +proc sendMessageWithReplyFinish*(self: DBusConnection; res: AsyncResult): DBusMessage = + let gobj = g_dbus_connection_send_message_with_reply_finish(cast[ptr DBusConnection00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusMessage](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DBusSendMessageFlag* {.size: sizeof(cint), pure.} = enum + preserveSerial = 1 + + DBusSendMessageFlags* {.size: sizeof(cint).} = set[DBusSendMessageFlag] + +proc g_dbus_connection_send_message*(self: ptr DBusConnection00; message: ptr DBusMessage00; + flags: DBusSendMessageFlags; outSerial: var uint32): gboolean {. + importc: "g_dbus_connection_send_message", libprag.} + +proc sendMessage*(self: DBusConnection; message: DBusMessage; flags: DBusSendMessageFlags; + outSerial: var int): bool = + var outSerial_00 = uint32(outSerial) + result = toBool(g_dbus_connection_send_message(cast[ptr DBusConnection00](self.impl), cast[ptr DBusMessage00](message.impl), flags, outSerial_00)) + outSerial = int(outSerial_00) + +proc g_dbus_connection_send_message_with_reply_sync*(self: ptr DBusConnection00; message: ptr DBusMessage00; + flags: DBusSendMessageFlags; timeoutMsec: int32; outSerial: var uint32; cancellable: ptr Cancellable00): ptr DBusMessage00 {. + importc: "g_dbus_connection_send_message_with_reply_sync", libprag.} + +proc sendMessageWithReplySync*(self: DBusConnection; message: DBusMessage; flags: DBusSendMessageFlags; + timeoutMsec: int; outSerial: var int; cancellable: Cancellable): DBusMessage = + var outSerial_00 = uint32(outSerial) + let gobj = g_dbus_connection_send_message_with_reply_sync(cast[ptr DBusConnection00](self.impl), cast[ptr DBusMessage00](message.impl), flags, int32(timeoutMsec), outSerial_00, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusMessage](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + outSerial = int(outSerial_00) + +type + DBusMessageByteOrder* {.size: sizeof(cint), pure.} = enum + bigEndian = 66 + littleEndian = 108 + +proc g_dbus_message_get_byte_order*(self: ptr DBusMessage00): DBusMessageByteOrder {. + importc: "g_dbus_message_get_byte_order", libprag.} + +proc getByteOrder*(self: DBusMessage): DBusMessageByteOrder = + g_dbus_message_get_byte_order(cast[ptr DBusMessage00](self.impl)) + +proc byteOrder*(self: DBusMessage): DBusMessageByteOrder = + g_dbus_message_get_byte_order(cast[ptr DBusMessage00](self.impl)) + +proc g_dbus_message_set_byte_order*(self: ptr DBusMessage00; byteOrder: DBusMessageByteOrder) {. + importc: "g_dbus_message_set_byte_order", libprag.} + +proc setByteOrder*(self: DBusMessage; byteOrder: DBusMessageByteOrder) = + g_dbus_message_set_byte_order(cast[ptr DBusMessage00](self.impl), byteOrder) + +proc `byteOrder=`*(self: DBusMessage; byteOrder: DBusMessageByteOrder) = + g_dbus_message_set_byte_order(cast[ptr DBusMessage00](self.impl), byteOrder) + +type + DBusMessageFlag* {.size: sizeof(cint), pure.} = enum + noReplyExpected = 1 + noAutoStart = 2 + allowInteractiveAuthorization = 3 + + DBusMessageFlags* {.size: sizeof(cint).} = set[DBusMessageFlag] + +proc g_dbus_message_get_flags*(self: ptr DBusMessage00): DBusMessageFlags {. + importc: "g_dbus_message_get_flags", libprag.} + +proc getFlags*(self: DBusMessage): DBusMessageFlags = + g_dbus_message_get_flags(cast[ptr DBusMessage00](self.impl)) + +proc flags*(self: DBusMessage): DBusMessageFlags = + g_dbus_message_get_flags(cast[ptr DBusMessage00](self.impl)) + +proc g_dbus_message_set_flags*(self: ptr DBusMessage00; flags: DBusMessageFlags) {. + importc: "g_dbus_message_set_flags", libprag.} + +proc setFlags*(self: DBusMessage; flags: DBusMessageFlags) = + g_dbus_message_set_flags(cast[ptr DBusMessage00](self.impl), flags) + +proc `flags=`*(self: DBusMessage; flags: DBusMessageFlags) = + g_dbus_message_set_flags(cast[ptr DBusMessage00](self.impl), flags) + +type + DBusMessageHeaderField* {.size: sizeof(cint), pure.} = enum + invalid = 0 + path = 1 + `interface` = 2 + member = 3 + errorName = 4 + replySerial = 5 + destination = 6 + sender = 7 + signature = 8 + numUnixFds = 9 + +proc g_dbus_message_get_header*(self: ptr DBusMessage00; headerField: DBusMessageHeaderField): ptr glib.Variant00 {. + importc: "g_dbus_message_get_header", libprag.} + +proc getHeader*(self: DBusMessage; headerField: DBusMessageHeaderField): glib.Variant = + new(result) + result.impl = g_dbus_message_get_header(cast[ptr DBusMessage00](self.impl), headerField) + +proc header*(self: DBusMessage; headerField: DBusMessageHeaderField): glib.Variant = + new(result) + result.impl = g_dbus_message_get_header(cast[ptr DBusMessage00](self.impl), headerField) + +proc g_dbus_message_set_header*(self: ptr DBusMessage00; headerField: DBusMessageHeaderField; + value: ptr glib.Variant00) {. + importc: "g_dbus_message_set_header", libprag.} + +proc setHeader*(self: DBusMessage; headerField: DBusMessageHeaderField; + value: glib.Variant) = + g_dbus_message_set_header(cast[ptr DBusMessage00](self.impl), headerField, cast[ptr glib.Variant00](value.impl)) + +type + DBusMessageType* {.size: sizeof(cint), pure.} = enum + invalid = 0 + methodCall = 1 + methodReturn = 2 + error = 3 + signal = 4 + +proc g_dbus_message_get_message_type*(self: ptr DBusMessage00): DBusMessageType {. + importc: "g_dbus_message_get_message_type", libprag.} + +proc getMessageType*(self: DBusMessage): DBusMessageType = + g_dbus_message_get_message_type(cast[ptr DBusMessage00](self.impl)) + +proc messageType*(self: DBusMessage): DBusMessageType = + g_dbus_message_get_message_type(cast[ptr DBusMessage00](self.impl)) + +proc g_dbus_message_set_message_type*(self: ptr DBusMessage00; `type`: DBusMessageType) {. + importc: "g_dbus_message_set_message_type", libprag.} + +proc setMessageType*(self: DBusMessage; `type`: DBusMessageType) = + g_dbus_message_set_message_type(cast[ptr DBusMessage00](self.impl), `type`) + +proc `messageType=`*(self: DBusMessage; `type`: DBusMessageType) = + g_dbus_message_set_message_type(cast[ptr DBusMessage00](self.impl), `type`) + +type + DBusSignalFlag* {.size: sizeof(cint), pure.} = enum + noMatchRule = 1 + matchArg0Namespace = 2 + matchArg0Path = 3 + + DBusSignalFlags* {.size: sizeof(cint).} = set[DBusSignalFlag] + +type + Notification* = ref object of gobject.Object + Notification00* = object of gobject.Object00 + +proc g_notification_new*(title: cstring): ptr Notification00 {. + importc: "g_notification_new", libprag.} + +proc newNotification*(title: string): Notification = + new(result, finalizeGObject) + result.impl = g_notification_new(cstring(title)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initNotification*[T](result: var T; title: string) = + assert(result is Notification) + new(result, finalizeGObject) + result.impl = g_notification_new(cstring(title)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_notification_add_button*(self: ptr Notification00; label: cstring; detailedAction: cstring) {. + importc: "g_notification_add_button", libprag.} + +proc addButton*(self: Notification; label: string; detailedAction: string) = + g_notification_add_button(cast[ptr Notification00](self.impl), cstring(label), cstring(detailedAction)) + +proc g_notification_add_button_with_target_value*(self: ptr Notification00; label: cstring; action: cstring; + target: ptr glib.Variant00) {. + importc: "g_notification_add_button_with_target_value", libprag.} + +proc addButtonWithTarget*(self: Notification; label: string; action: string; + target: glib.Variant) = + g_notification_add_button_with_target_value(cast[ptr Notification00](self.impl), cstring(label), cstring(action), cast[ptr glib.Variant00](target.impl)) + +proc g_notification_set_body*(self: ptr Notification00; body: cstring) {. + importc: "g_notification_set_body", libprag.} + +proc setBody*(self: Notification; body: string) = + g_notification_set_body(cast[ptr Notification00](self.impl), cstring(body)) + +proc `body=`*(self: Notification; body: string) = + g_notification_set_body(cast[ptr Notification00](self.impl), cstring(body)) + +proc g_notification_set_default_action*(self: ptr Notification00; detailedAction: cstring) {. + importc: "g_notification_set_default_action", libprag.} + +proc setDefaultAction*(self: Notification; detailedAction: string) = + g_notification_set_default_action(cast[ptr Notification00](self.impl), cstring(detailedAction)) + +proc `defaultAction=`*(self: Notification; detailedAction: string) = + g_notification_set_default_action(cast[ptr Notification00](self.impl), cstring(detailedAction)) + +proc g_notification_set_default_action_and_target_value*(self: ptr Notification00; action: cstring; target: ptr glib.Variant00) {. + importc: "g_notification_set_default_action_and_target_value", libprag.} + +proc setDefaultActionAndTarget*(self: Notification; action: string; target: glib.Variant) = + g_notification_set_default_action_and_target_value(cast[ptr Notification00](self.impl), cstring(action), cast[ptr glib.Variant00](target.impl)) + +proc g_notification_set_icon*(self: ptr Notification00; icon: ptr Icon00) {. + importc: "g_notification_set_icon", libprag.} + +proc setIcon*(self: Notification; icon: Icon) = + g_notification_set_icon(cast[ptr Notification00](self.impl), cast[ptr Icon00](icon.impl)) + +proc `icon=`*(self: Notification; icon: Icon) = + g_notification_set_icon(cast[ptr Notification00](self.impl), cast[ptr Icon00](icon.impl)) + +proc g_notification_set_title*(self: ptr Notification00; title: cstring) {. + importc: "g_notification_set_title", libprag.} + +proc setTitle*(self: Notification; title: string) = + g_notification_set_title(cast[ptr Notification00](self.impl), cstring(title)) + +proc `title=`*(self: Notification; title: string) = + g_notification_set_title(cast[ptr Notification00](self.impl), cstring(title)) + +proc g_notification_set_urgent*(self: ptr Notification00; urgent: gboolean) {. + importc: "g_notification_set_urgent", libprag.} + +proc setUrgent*(self: Notification; urgent: bool) = + g_notification_set_urgent(cast[ptr Notification00](self.impl), gboolean(urgent)) + +proc `urgent=`*(self: Notification; urgent: bool) = + g_notification_set_urgent(cast[ptr Notification00](self.impl), gboolean(urgent)) + +proc g_application_send_notification*(self: ptr Application00; id: cstring; notification: ptr Notification00) {. + importc: "g_application_send_notification", libprag.} + +proc sendNotification*(self: Application; id: string; notification: Notification) = + g_application_send_notification(cast[ptr Application00](self.impl), cstring(id), cast[ptr Notification00](notification.impl)) + +type + NotificationPriority* {.size: sizeof(cint), pure.} = enum + normal = 0 + low = 1 + high = 2 + urgent = 3 + +proc g_notification_set_priority*(self: ptr Notification00; priority: NotificationPriority) {. + importc: "g_notification_set_priority", libprag.} + +proc setPriority*(self: Notification; priority: NotificationPriority) = + g_notification_set_priority(cast[ptr Notification00](self.impl), priority) + +proc `priority=`*(self: Notification; priority: NotificationPriority) = + g_notification_set_priority(cast[ptr Notification00](self.impl), priority) + +type + ApplicationFlag* {.size: sizeof(cint), pure.} = enum + isService = 1 + isLauncher = 2 + handlesOpen = 3 + handlesCommandLine = 4 + sendEnvironment = 5 + nonUnique = 6 + canOverrideAppId = 7 + + ApplicationFlags* {.size: sizeof(cint).} = set[ApplicationFlag] + +proc g_application_new*(applicationId: cstring; flags: ApplicationFlags): ptr Application00 {. + importc: "g_application_new", libprag.} + +proc newApplication*(applicationId: string; flags: ApplicationFlags): Application = + new(result, finalizeGObject) + result.impl = g_application_new(cstring(applicationId), flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initApplication*[T](result: var T; applicationId: string; flags: ApplicationFlags) = + assert(result is Application) + new(result, finalizeGObject) + result.impl = g_application_new(cstring(applicationId), flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_application_get_flags*(self: ptr Application00): ApplicationFlags {. + importc: "g_application_get_flags", libprag.} + +proc getFlags*(self: Application): ApplicationFlags = + g_application_get_flags(cast[ptr Application00](self.impl)) + +proc flags*(self: Application): ApplicationFlags = + g_application_get_flags(cast[ptr Application00](self.impl)) + +proc g_application_set_flags*(self: ptr Application00; flags: ApplicationFlags) {. + importc: "g_application_set_flags", libprag.} + +proc setFlags*(self: Application; flags: ApplicationFlags) = + g_application_set_flags(cast[ptr Application00](self.impl), flags) + +proc `flags=`*(self: Application; flags: ApplicationFlags) = + g_application_set_flags(cast[ptr Application00](self.impl), flags) + +type + InputStreamPrivate00* {.pure.} = object + InputStreamPrivate* = ref object + impl*: ptr InputStreamPrivate00 + +type + InputStream* = ref object of gobject.Object + InputStream00* = object of gobject.Object00 + priv1: ptr InputStreamPrivate00 + +proc g_input_stream_clear_pending*(self: ptr InputStream00) {. + importc: "g_input_stream_clear_pending", libprag.} + +proc clearPending*(self: InputStream) = + g_input_stream_clear_pending(cast[ptr InputStream00](self.impl)) + +proc g_input_stream_close*(self: ptr InputStream00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_input_stream_close", libprag.} + +proc close*(self: InputStream; cancellable: Cancellable): bool = + toBool(g_input_stream_close(cast[ptr InputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_input_stream_close_finish*(self: ptr InputStream00; resu: ptr AsyncResult00): gboolean {. + importc: "g_input_stream_close_finish", libprag.} + +proc closeFinish*(self: InputStream; resu: AsyncResult): bool = + toBool(g_input_stream_close_finish(cast[ptr InputStream00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_input_stream_has_pending*(self: ptr InputStream00): gboolean {. + importc: "g_input_stream_has_pending", libprag.} + +proc hasPending*(self: InputStream): bool = + toBool(g_input_stream_has_pending(cast[ptr InputStream00](self.impl))) + +proc g_input_stream_is_closed*(self: ptr InputStream00): gboolean {. + importc: "g_input_stream_is_closed", libprag.} + +proc isClosed*(self: InputStream): bool = + toBool(g_input_stream_is_closed(cast[ptr InputStream00](self.impl))) + +proc g_input_stream_read*(self: ptr InputStream00; buffer: uint8Array; count: uint64; + cancellable: ptr Cancellable00): int64 {. + importc: "g_input_stream_read", libprag.} + +proc read*(self: InputStream; buffer: uint8Array; count: uint64; + cancellable: Cancellable): int64 = + g_input_stream_read(cast[ptr InputStream00](self.impl), buffer, count, cast[ptr Cancellable00](cancellable.impl)) + +proc g_input_stream_read_all*(self: ptr InputStream00; buffer: uint8Array; count: uint64; + bytesRead: var uint64; cancellable: ptr Cancellable00): gboolean {. + importc: "g_input_stream_read_all", libprag.} + +proc readAll*(self: InputStream; buffer: uint8Array; count: uint64; + bytesRead: var uint64; cancellable: Cancellable): bool = + toBool(g_input_stream_read_all(cast[ptr InputStream00](self.impl), buffer, count, bytesRead, cast[ptr Cancellable00](cancellable.impl))) + +proc g_input_stream_read_all_finish*(self: ptr InputStream00; resu: ptr AsyncResult00; + bytesRead: var uint64): gboolean {. + importc: "g_input_stream_read_all_finish", libprag.} + +proc readAllFinish*(self: InputStream; resu: AsyncResult; bytesRead: var uint64): bool = + toBool(g_input_stream_read_all_finish(cast[ptr InputStream00](self.impl), cast[ptr AsyncResult00](resu.impl), bytesRead)) + +proc g_input_stream_read_bytes*(self: ptr InputStream00; count: uint64; cancellable: ptr Cancellable00): ptr glib.Bytes00 {. + importc: "g_input_stream_read_bytes", libprag.} + +proc readBytes*(self: InputStream; count: uint64; cancellable: Cancellable): glib.Bytes = + new(result) + result.impl = g_input_stream_read_bytes(cast[ptr InputStream00](self.impl), count, cast[ptr Cancellable00](cancellable.impl)) + +proc g_input_stream_read_bytes_finish*(self: ptr InputStream00; resu: ptr AsyncResult00): ptr glib.Bytes00 {. + importc: "g_input_stream_read_bytes_finish", libprag.} + +proc readBytesFinish*(self: InputStream; resu: AsyncResult): glib.Bytes = + new(result) + result.impl = g_input_stream_read_bytes_finish(cast[ptr InputStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_input_stream_read_finish*(self: ptr InputStream00; resu: ptr AsyncResult00): int64 {. + importc: "g_input_stream_read_finish", libprag.} + +proc readFinish*(self: InputStream; resu: AsyncResult): int64 = + g_input_stream_read_finish(cast[ptr InputStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_input_stream_set_pending*(self: ptr InputStream00): gboolean {. + importc: "g_input_stream_set_pending", libprag.} + +proc setPending*(self: InputStream): bool = + toBool(g_input_stream_set_pending(cast[ptr InputStream00](self.impl))) + +proc `pending=`*(self: InputStream): bool = + toBool(g_input_stream_set_pending(cast[ptr InputStream00](self.impl))) + +proc g_input_stream_skip*(self: ptr InputStream00; count: uint64; cancellable: ptr Cancellable00): int64 {. + importc: "g_input_stream_skip", libprag.} + +proc skip*(self: InputStream; count: uint64; cancellable: Cancellable): int64 = + g_input_stream_skip(cast[ptr InputStream00](self.impl), count, cast[ptr Cancellable00](cancellable.impl)) + +proc g_input_stream_skip_finish*(self: ptr InputStream00; resu: ptr AsyncResult00): int64 {. + importc: "g_input_stream_skip_finish", libprag.} + +proc skipFinish*(self: InputStream; resu: AsyncResult): int64 = + g_input_stream_skip_finish(cast[ptr InputStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_application_command_line_get_stdin*(self: ptr ApplicationCommandLine00): ptr InputStream00 {. + importc: "g_application_command_line_get_stdin", libprag.} + +proc getStdin*(self: ApplicationCommandLine): InputStream = + let gobj = g_application_command_line_get_stdin(cast[ptr ApplicationCommandLine00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc stdin*(self: ApplicationCommandLine): InputStream = + let gobj = g_application_command_line_get_stdin(cast[ptr ApplicationCommandLine00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_io_stream_get_input_stream*(self: ptr IOStream00): ptr InputStream00 {. + importc: "g_io_stream_get_input_stream", libprag.} + +proc getInputStream*(self: IOStream): InputStream = + let gobj = g_io_stream_get_input_stream(cast[ptr IOStream00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc inputStream*(self: IOStream): InputStream = + let gobj = g_io_stream_get_input_stream(cast[ptr IOStream00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + FileInputStreamPrivate00* {.pure.} = object + FileInputStreamPrivate* = ref object + impl*: ptr FileInputStreamPrivate00 + +type + FileInputStream* = ref object of InputStream + FileInputStream00* = object of InputStream00 + priv2: ptr FileInputStreamPrivate00 + +proc g_file_input_stream_query_info*(self: ptr FileInputStream00; attributes: cstring; + cancellable: ptr Cancellable00): ptr FileInfo00 {. + importc: "g_file_input_stream_query_info", libprag.} + +proc queryInfo*(self: FileInputStream; attributes: string; cancellable: Cancellable): FileInfo = + let gobj = g_file_input_stream_query_info(cast[ptr FileInputStream00](self.impl), cstring(attributes), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_input_stream_query_info_finish*(self: ptr FileInputStream00; resu: ptr AsyncResult00): ptr FileInfo00 {. + importc: "g_file_input_stream_query_info_finish", libprag.} + +proc queryInfoFinish*(self: FileInputStream; resu: AsyncResult): FileInfo = + let gobj = g_file_input_stream_query_info_finish(cast[ptr FileInputStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_read*(self: ptr File00; cancellable: ptr Cancellable00): ptr FileInputStream00 {. + importc: "g_file_read", libprag.} + +proc read*(self: File; cancellable: Cancellable): FileInputStream = + let gobj = g_file_read(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_read_finish*(self: ptr File00; res: ptr AsyncResult00): ptr FileInputStream00 {. + importc: "g_file_read_finish", libprag.} + +proc readFinish*(self: File; res: AsyncResult): FileInputStream = + let gobj = g_file_read_finish(cast[ptr File00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + OutputStreamSpliceFlag* {.size: sizeof(cint), pure.} = enum + closeSource = 1 + closeTarget = 2 + + OutputStreamSpliceFlags* {.size: sizeof(cint).} = set[OutputStreamSpliceFlag] + +proc g_output_stream_splice*(self: ptr OutputStream00; source: ptr InputStream00; + flags: OutputStreamSpliceFlags; cancellable: ptr Cancellable00): int64 {. + importc: "g_output_stream_splice", libprag.} + +proc splice*(self: OutputStream; source: InputStream; flags: OutputStreamSpliceFlags; + cancellable: Cancellable): int64 = + g_output_stream_splice(cast[ptr OutputStream00](self.impl), cast[ptr InputStream00](source.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + +type + ApplicationClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + startup*: proc(application: ptr Application00) {.cdecl.} + activate*: proc(application: ptr Application00) {.cdecl.} + open*: proc(application: ptr Application00; files: ptr File00Array; + nFiles: int32; hint: cstring) {.cdecl.} + commandLine*: proc(application: ptr Application00; commandLine: ptr ApplicationCommandLine00): int32 {.cdecl.} + localCommandLine*: proc(application: ptr Application00; arguments: cstringArray; + exitStatus: var int32): gboolean {.cdecl.} + beforeEmit*: proc(application: ptr Application00; platformData: ptr glib.Variant00) {.cdecl.} + afterEmit*: proc(application: ptr Application00; platformData: ptr glib.Variant00) {.cdecl.} + addPlatformData*: proc(application: ptr Application00; builder: ptr glib.VariantBuilder00) {.cdecl.} + quitMainloop*: proc(application: ptr Application00) {.cdecl.} + runMainloop*: proc(application: ptr Application00) {.cdecl.} + shutdown*: proc(application: ptr Application00) {.cdecl.} + dbusRegister*: proc(application: ptr Application00; connection: ptr DBusConnection00; + objectPath: cstring): gboolean {.cdecl.} + dbusUnregister*: proc(application: ptr Application00; connection: ptr DBusConnection00; + objectPath: cstring) {.cdecl.} + handleLocalOptions*: proc(application: ptr Application00; options: ptr glib.VariantDict00): int32 {.cdecl.} + padding*: array[8, pointer] + ApplicationClass* = ref object + impl*: ptr ApplicationClass00 + +type + ApplicationCommandLineClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + printLiteral*: proc(cmdline: ptr ApplicationCommandLine00; message: cstring) {.cdecl.} + printerrLiteral*: proc(cmdline: ptr ApplicationCommandLine00; message: cstring) {.cdecl.} + getStdin*: proc(cmdline: ptr ApplicationCommandLine00): ptr InputStream00 {.cdecl.} + padding*: array[11, pointer] + ApplicationCommandLineClass* = ref object + impl*: ptr ApplicationCommandLineClass00 + +type + AsyncInitable00* {.pure.} = object + AsyncInitable* = ref object + impl*: ptr AsyncInitable00 + +proc g_async_initable_init_finish*(self: ptr AsyncInitable00; res: ptr AsyncResult00): gboolean {. + importc: "g_async_initable_init_finish", libprag.} + +proc initFinish*(self: AsyncInitable; res: AsyncResult): bool = + toBool(g_async_initable_init_finish(cast[ptr AsyncInitable00](self.impl), cast[ptr AsyncResult00](res.impl))) + +proc g_async_initable_new_finish*(self: ptr AsyncInitable00; res: ptr AsyncResult00): ptr gobject.Object00 {. + importc: "g_async_initable_new_finish", libprag.} + +proc newAsyncInitableFinish*(self: AsyncInitable; res: AsyncResult): gobject.Object = + let gobj = g_async_initable_new_finish(cast[ptr AsyncInitable00](self.impl), cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + AsyncReadyCallback* = proc (sourceObject: ptr gobject.Object00; res: ptr AsyncResult00; + userData: pointer) {.cdecl.} + +type + AsyncInitableIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + initAsync*: proc(initable: ptr AsyncInitable00; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + initFinish*: proc(initable: ptr AsyncInitable00; res: ptr AsyncResult00): gboolean {.cdecl.} + AsyncInitableIface* = ref object + impl*: ptr AsyncInitableIface00 + +proc g_app_info_launch_default_for_uri_async*(uri: cstring; launchContext: ptr AppLaunchContext00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_app_info_launch_default_for_uri_async", libprag.} + +proc launchDefaultForUriAsync*(uri: string; launchContext: AppLaunchContext; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_app_info_launch_default_for_uri_async(cstring(uri), cast[ptr AppLaunchContext00](launchContext.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_append_to_async*(self: ptr File00; flags: FileCreateFlags; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_append_to_async", libprag.} + +proc appendToAsync*(self: File; flags: FileCreateFlags; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_append_to_async(cast[ptr File00](self.impl), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_create_async*(self: ptr File00; flags: FileCreateFlags; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_create_async", libprag.} + +proc createAsync*(self: File; flags: FileCreateFlags; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_create_async(cast[ptr File00](self.impl), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_create_readwrite_async*(self: ptr File00; flags: FileCreateFlags; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_create_readwrite_async", libprag.} + +proc createReadwriteAsync*(self: File; flags: FileCreateFlags; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_create_readwrite_async(cast[ptr File00](self.impl), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_delete_async*(self: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_delete_async", libprag.} + +proc deleteAsync*(self: File; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_delete_async(cast[ptr File00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_eject_mountable*(self: ptr File00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_eject_mountable", libprag.} + +proc ejectMountable*(self: File; flags: MountUnmountFlags; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_eject_mountable(cast[ptr File00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_eject_mountable_with_operation*(self: ptr File00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_eject_mountable_with_operation", libprag.} + +proc ejectMountableWithOperation*(self: File; flags: MountUnmountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_eject_mountable_with_operation(cast[ptr File00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_enumerate_children_async*(self: ptr File00; attributes: cstring; flags: FileQueryInfoFlags; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_file_enumerate_children_async", libprag.} + +proc enumerateChildrenAsync*(self: File; attributes: string; flags: FileQueryInfoFlags; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_enumerate_children_async(cast[ptr File00](self.impl), cstring(attributes), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_find_enclosing_mount_async*(self: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_find_enclosing_mount_async", libprag.} + +proc findEnclosingMountAsync*(self: File; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_find_enclosing_mount_async(cast[ptr File00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_load_contents_async*(self: ptr File00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_load_contents_async", libprag.} + +proc loadContentsAsync*(self: File; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_file_load_contents_async(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_make_directory_async*(self: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_make_directory_async", libprag.} + +proc makeDirectoryAsync*(self: File; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_make_directory_async(cast[ptr File00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_mount_enclosing_volume*(self: ptr File00; flags: MountMountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_mount_enclosing_volume", libprag.} + +proc mountEnclosingVolume*(self: File; flags: MountMountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_mount_enclosing_volume(cast[ptr File00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_mount_mountable*(self: ptr File00; flags: MountMountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_mount_mountable", libprag.} + +proc mountMountable*(self: File; flags: MountMountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_mount_mountable(cast[ptr File00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_open_readwrite_async*(self: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_open_readwrite_async", libprag.} + +proc openReadwriteAsync*(self: File; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_open_readwrite_async(cast[ptr File00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_poll_mountable*(self: ptr File00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_poll_mountable", libprag.} + +proc pollMountable*(self: File; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_file_poll_mountable(cast[ptr File00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_query_filesystem_info_async*(self: ptr File00; attributes: cstring; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_query_filesystem_info_async", libprag.} + +proc queryFilesystemInfoAsync*(self: File; attributes: string; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_query_filesystem_info_async(cast[ptr File00](self.impl), cstring(attributes), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_query_info_async*(self: ptr File00; attributes: cstring; flags: FileQueryInfoFlags; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_file_query_info_async", libprag.} + +proc queryInfoAsync*(self: File; attributes: string; flags: FileQueryInfoFlags; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_query_info_async(cast[ptr File00](self.impl), cstring(attributes), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_read_async*(self: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_read_async", libprag.} + +proc readAsync*(self: File; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_read_async(cast[ptr File00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_replace_async*(self: ptr File00; etag: cstring; makeBackup: gboolean; + flags: FileCreateFlags; ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_file_replace_async", libprag.} + +proc replaceAsync*(self: File; etag: string; makeBackup: bool; flags: FileCreateFlags; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_replace_async(cast[ptr File00](self.impl), cstring(etag), gboolean(makeBackup), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_replace_contents_async*(self: ptr File00; contents: uint8Array; length: uint64; + etag: cstring; makeBackup: gboolean; flags: FileCreateFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_replace_contents_async", libprag.} + +proc replaceContentsAsync*(self: File; contents: uint8Array; length: uint64; + etag: string; makeBackup: bool; flags: FileCreateFlags; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_file_replace_contents_async(cast[ptr File00](self.impl), contents, length, cstring(etag), gboolean(makeBackup), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_replace_contents_bytes_async*(self: ptr File00; contents: ptr glib.Bytes00; etag: cstring; + makeBackup: gboolean; flags: FileCreateFlags; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_file_replace_contents_bytes_async", libprag.} + +proc replaceContentsBytesAsync*(self: File; contents: glib.Bytes; etag: string; makeBackup: bool; + flags: FileCreateFlags; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_file_replace_contents_bytes_async(cast[ptr File00](self.impl), cast[ptr glib.Bytes00](contents.impl), cstring(etag), gboolean(makeBackup), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_replace_readwrite_async*(self: ptr File00; etag: cstring; makeBackup: gboolean; + flags: FileCreateFlags; ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_file_replace_readwrite_async", libprag.} + +proc replaceReadwriteAsync*(self: File; etag: string; makeBackup: bool; flags: FileCreateFlags; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_replace_readwrite_async(cast[ptr File00](self.impl), cstring(etag), gboolean(makeBackup), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_set_attributes_async*(self: ptr File00; info: ptr FileInfo00; flags: FileQueryInfoFlags; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_file_set_attributes_async", libprag.} + +proc setAttributesAsync*(self: File; info: FileInfo; flags: FileQueryInfoFlags; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_set_attributes_async(cast[ptr File00](self.impl), cast[ptr FileInfo00](info.impl), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_set_display_name_async*(self: ptr File00; displayName: cstring; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_set_display_name_async", libprag.} + +proc setDisplayNameAsync*(self: File; displayName: string; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_set_display_name_async(cast[ptr File00](self.impl), cstring(displayName), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_start_mountable*(self: ptr File00; flags: DriveStartFlags; startOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_start_mountable", libprag.} + +proc startMountable*(self: File; flags: DriveStartFlags; startOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_start_mountable(cast[ptr File00](self.impl), flags, cast[ptr MountOperation00](startOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_stop_mountable*(self: ptr File00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_stop_mountable", libprag.} + +proc stopMountable*(self: File; flags: MountUnmountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_stop_mountable(cast[ptr File00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_trash_async*(self: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_trash_async", libprag.} + +proc trashAsync*(self: File; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_trash_async(cast[ptr File00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_unmount_mountable*(self: ptr File00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_unmount_mountable", libprag.} + +proc unmountMountable*(self: File; flags: MountUnmountFlags; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_unmount_mountable(cast[ptr File00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_unmount_mountable_with_operation*(self: ptr File00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_unmount_mountable_with_operation", libprag.} + +proc unmountMountableWithOperation*(self: File; flags: MountUnmountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_unmount_mountable_with_operation(cast[ptr File00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_enumerator_close_async*(self: ptr FileEnumerator00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_enumerator_close_async", libprag.} + +proc closeAsync*(self: FileEnumerator; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_file_enumerator_close_async(cast[ptr FileEnumerator00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_enumerator_next_files_async*(self: ptr FileEnumerator00; numFiles: int32; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_enumerator_next_files_async", libprag.} + +proc nextFilesAsync*(self: FileEnumerator; numFiles: int; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_enumerator_next_files_async(cast[ptr FileEnumerator00](self.impl), int32(numFiles), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_mount_eject*(self: ptr Mount00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_mount_eject", libprag.} + +proc eject*(self: Mount; flags: MountUnmountFlags; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_mount_eject(cast[ptr Mount00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_mount_eject_with_operation*(self: ptr Mount00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_mount_eject_with_operation", libprag.} + +proc ejectWithOperation*(self: Mount; flags: MountUnmountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_mount_eject_with_operation(cast[ptr Mount00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_mount_guess_content_type*(self: ptr Mount00; forceRescan: gboolean; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_mount_guess_content_type", libprag.} + +proc guessContentType*(self: Mount; forceRescan: bool; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_mount_guess_content_type(cast[ptr Mount00](self.impl), gboolean(forceRescan), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_mount_remount*(self: ptr Mount00; flags: MountMountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_mount_remount", libprag.} + +proc remount*(self: Mount; flags: MountMountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_mount_remount(cast[ptr Mount00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_mount_unmount*(self: ptr Mount00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_mount_unmount", libprag.} + +proc unmount*(self: Mount; flags: MountUnmountFlags; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_mount_unmount(cast[ptr Mount00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_mount_unmount_with_operation*(self: ptr Mount00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_mount_unmount_with_operation", libprag.} + +proc unmountWithOperation*(self: Mount; flags: MountUnmountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_mount_unmount_with_operation(cast[ptr Mount00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_drive_eject*(self: ptr Drive00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_drive_eject", libprag.} + +proc eject*(self: Drive; flags: MountUnmountFlags; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_drive_eject(cast[ptr Drive00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_drive_eject_with_operation*(self: ptr Drive00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_drive_eject_with_operation", libprag.} + +proc ejectWithOperation*(self: Drive; flags: MountUnmountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_drive_eject_with_operation(cast[ptr Drive00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_drive_poll_for_media*(self: ptr Drive00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_drive_poll_for_media", libprag.} + +proc pollForMedia*(self: Drive; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_drive_poll_for_media(cast[ptr Drive00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_drive_start*(self: ptr Drive00; flags: DriveStartFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_drive_start", libprag.} + +proc start*(self: Drive; flags: DriveStartFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_drive_start(cast[ptr Drive00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_drive_stop*(self: ptr Drive00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_drive_stop", libprag.} + +proc stop*(self: Drive; flags: MountUnmountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_drive_stop(cast[ptr Drive00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_volume_eject*(self: ptr Volume00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_volume_eject", libprag.} + +proc eject*(self: Volume; flags: MountUnmountFlags; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_volume_eject(cast[ptr Volume00](self.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_volume_eject_with_operation*(self: ptr Volume00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_volume_eject_with_operation", libprag.} + +proc ejectWithOperation*(self: Volume; flags: MountUnmountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_volume_eject_with_operation(cast[ptr Volume00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_volume_mount*(self: ptr Volume00; flags: MountMountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_volume_mount", libprag.} + +proc mount*(self: Volume; flags: MountMountFlags; mountOperation: MountOperation; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_volume_mount(cast[ptr Volume00](self.impl), flags, cast[ptr MountOperation00](mountOperation.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_output_stream_close_async*(self: ptr OutputStream00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_output_stream_close_async", libprag.} + +proc closeAsync*(self: OutputStream; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_output_stream_close_async(cast[ptr OutputStream00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_output_stream_flush_async*(self: ptr OutputStream00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_output_stream_flush_async", libprag.} + +proc flushAsync*(self: OutputStream; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_output_stream_flush_async(cast[ptr OutputStream00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_output_stream_splice_async*(self: ptr OutputStream00; source: ptr InputStream00; + flags: OutputStreamSpliceFlags; ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_output_stream_splice_async", libprag.} + +proc spliceAsync*(self: OutputStream; source: InputStream; flags: OutputStreamSpliceFlags; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_output_stream_splice_async(cast[ptr OutputStream00](self.impl), cast[ptr InputStream00](source.impl), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_output_stream_write_all_async*(self: ptr OutputStream00; buffer: uint8Array; count: uint64; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_output_stream_write_all_async", libprag.} + +proc writeAllAsync*(self: OutputStream; buffer: uint8Array; count: uint64; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_output_stream_write_all_async(cast[ptr OutputStream00](self.impl), buffer, count, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_output_stream_write_async*(self: ptr OutputStream00; buffer: uint8Array; count: uint64; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_output_stream_write_async", libprag.} + +proc writeAsync*(self: OutputStream; buffer: uint8Array; count: uint64; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_output_stream_write_async(cast[ptr OutputStream00](self.impl), buffer, count, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_output_stream_write_bytes_async*(self: ptr OutputStream00; bytes: ptr glib.Bytes00; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_output_stream_write_bytes_async", libprag.} + +proc writeBytesAsync*(self: OutputStream; bytes: glib.Bytes; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_output_stream_write_bytes_async(cast[ptr OutputStream00](self.impl), cast[ptr glib.Bytes00](bytes.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_output_stream_query_info_async*(self: ptr FileOutputStream00; attributes: cstring; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_output_stream_query_info_async", libprag.} + +proc queryInfoAsync*(self: FileOutputStream; attributes: string; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_output_stream_query_info_async(cast[ptr FileOutputStream00](self.impl), cstring(attributes), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_io_stream_close_async*(self: ptr IOStream00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_io_stream_close_async", libprag.} + +proc closeAsync*(self: IOStream; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_io_stream_close_async(cast[ptr IOStream00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_io_stream_splice_async*(self: ptr IOStream00; stream2: ptr IOStream00; flags: IOStreamSpliceFlags; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_io_stream_splice_async", libprag.} + +proc spliceAsync*(self: IOStream; stream2: IOStream; flags: IOStreamSpliceFlags; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_io_stream_splice_async(cast[ptr IOStream00](self.impl), cast[ptr IOStream00](stream2.impl), flags, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_io_stream_query_info_async*(self: ptr FileIOStream00; attributes: cstring; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_io_stream_query_info_async", libprag.} + +proc queryInfoAsync*(self: FileIOStream; attributes: string; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_io_stream_query_info_async(cast[ptr FileIOStream00](self.impl), cstring(attributes), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_connection_new*(stream: ptr IOStream00; guid: cstring; flags: DBusConnectionFlags; + observer: ptr DBusAuthObserver00; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_dbus_connection_new", libprag.} + +proc new*(stream: IOStream; guid: string; flags: DBusConnectionFlags; + observer: DBusAuthObserver; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_dbus_connection_new(cast[ptr IOStream00](stream.impl), cstring(guid), flags, cast[ptr DBusAuthObserver00](observer.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_connection_new_for_address*(address: cstring; flags: DBusConnectionFlags; observer: ptr DBusAuthObserver00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_connection_new_for_address", libprag.} + +proc newForAddress*(address: string; flags: DBusConnectionFlags; observer: DBusAuthObserver; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_dbus_connection_new_for_address(cstring(address), flags, cast[ptr DBusAuthObserver00](observer.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_connection_call*(self: ptr DBusConnection00; busName: cstring; objectPath: cstring; + interfaceName: cstring; methodName: cstring; parameters: ptr glib.Variant00; replyType: ptr glib.VariantType00; + flags: DBusCallFlags; timeoutMsec: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_connection_call", libprag.} + +proc call*(self: DBusConnection; busName: string; objectPath: string; + interfaceName: string; methodName: string; parameters: glib.Variant; replyType: glib.VariantType; + flags: DBusCallFlags; timeoutMsec: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_dbus_connection_call(cast[ptr DBusConnection00](self.impl), cstring(busName), cstring(objectPath), cstring(interfaceName), cstring(methodName), cast[ptr glib.Variant00](parameters.impl), cast[ptr glib.VariantType00](replyType.impl), flags, int32(timeoutMsec), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_connection_call_with_unix_fd_list*(self: ptr DBusConnection00; busName: cstring; objectPath: cstring; + interfaceName: cstring; methodName: cstring; parameters: ptr glib.Variant00; replyType: ptr glib.VariantType00; + flags: DBusCallFlags; timeoutMsec: int32; fdList: ptr UnixFDList00; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_connection_call_with_unix_fd_list", libprag.} + +proc callWithUnixFdList*(self: DBusConnection; busName: string; objectPath: string; + interfaceName: string; methodName: string; parameters: glib.Variant; replyType: glib.VariantType; + flags: DBusCallFlags; timeoutMsec: int; fdList: UnixFDList; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_dbus_connection_call_with_unix_fd_list(cast[ptr DBusConnection00](self.impl), cstring(busName), cstring(objectPath), cstring(interfaceName), cstring(methodName), cast[ptr glib.Variant00](parameters.impl), cast[ptr glib.VariantType00](replyType.impl), flags, int32(timeoutMsec), cast[ptr UnixFDList00](fdList.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_connection_close*(self: ptr DBusConnection00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_connection_close", libprag.} + +proc close*(self: DBusConnection; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_dbus_connection_close(cast[ptr DBusConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_connection_flush*(self: ptr DBusConnection00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_connection_flush", libprag.} + +proc flush*(self: DBusConnection; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_dbus_connection_flush(cast[ptr DBusConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_connection_send_message_with_reply*(self: ptr DBusConnection00; message: ptr DBusMessage00; + flags: DBusSendMessageFlags; timeoutMsec: int32; outSerial: var uint32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_connection_send_message_with_reply", libprag.} + +proc sendMessageWithReply*(self: DBusConnection; message: DBusMessage; flags: DBusSendMessageFlags; + timeoutMsec: int; outSerial: var int; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + var outSerial_00 = uint32(outSerial) + g_dbus_connection_send_message_with_reply(cast[ptr DBusConnection00](self.impl), cast[ptr DBusMessage00](message.impl), flags, int32(timeoutMsec), outSerial_00, cast[ptr Cancellable00](cancellable.impl), callback, userData) + outSerial = int(outSerial_00) + +proc g_input_stream_close_async*(self: ptr InputStream00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_input_stream_close_async", libprag.} + +proc closeAsync*(self: InputStream; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_input_stream_close_async(cast[ptr InputStream00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_input_stream_read_all_async*(self: ptr InputStream00; buffer: uint8Array; count: uint64; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_input_stream_read_all_async", libprag.} + +proc readAllAsync*(self: InputStream; buffer: uint8Array; count: uint64; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_input_stream_read_all_async(cast[ptr InputStream00](self.impl), buffer, count, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_input_stream_read_async*(self: ptr InputStream00; buffer: uint8Array; count: uint64; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_input_stream_read_async", libprag.} + +proc readAsync*(self: InputStream; buffer: uint8Array; count: uint64; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_input_stream_read_async(cast[ptr InputStream00](self.impl), buffer, count, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_input_stream_read_bytes_async*(self: ptr InputStream00; count: uint64; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_input_stream_read_bytes_async", libprag.} + +proc readBytesAsync*(self: InputStream; count: uint64; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_input_stream_read_bytes_async(cast[ptr InputStream00](self.impl), count, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_input_stream_skip_async*(self: ptr InputStream00; count: uint64; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_input_stream_skip_async", libprag.} + +proc skipAsync*(self: InputStream; count: uint64; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_input_stream_skip_async(cast[ptr InputStream00](self.impl), count, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_file_input_stream_query_info_async*(self: ptr FileInputStream00; attributes: cstring; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_file_input_stream_query_info_async", libprag.} + +proc queryInfoAsync*(self: FileInputStream; attributes: string; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_file_input_stream_query_info_async(cast[ptr FileInputStream00](self.impl), cstring(attributes), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_async_initable_newv_async*(objectType: GType; nParameters: uint32; parameters: ptr gobject.Parameter00; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_async_initable_newv_async", libprag.} + +proc newvAsync*(objectType: GType; nParameters: int; parameters: gobject.Parameter; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_async_initable_newv_async(objectType, uint32(nParameters), cast[ptr gobject.Parameter00](parameters.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_async_initable_init_async*(self: ptr AsyncInitable00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_async_initable_init_async", libprag.} + +proc initAsync*(self: AsyncInitable; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_async_initable_init_async(cast[ptr AsyncInitable00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +type + AsyncResultIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + getUserData*: proc(res: ptr AsyncResult00): pointer {.cdecl.} + getSourceObject*: proc(res: ptr AsyncResult00): ptr gobject.Object00 {.cdecl.} + isTagged*: proc(res: ptr AsyncResult00; sourceTag: pointer): gboolean {.cdecl.} + AsyncResultIface* = ref object + impl*: ptr AsyncResultIface00 + +type + FilterInputStream* = ref object of InputStream + FilterInputStream00* = object of InputStream00 + baseStream*: ptr InputStream00 + +proc g_filter_input_stream_get_base_stream*(self: ptr FilterInputStream00): ptr InputStream00 {. + importc: "g_filter_input_stream_get_base_stream", libprag.} + +proc getBaseStream*(self: FilterInputStream): InputStream = + let gobj = g_filter_input_stream_get_base_stream(cast[ptr FilterInputStream00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc baseStream*(self: FilterInputStream): InputStream = + let gobj = g_filter_input_stream_get_base_stream(cast[ptr FilterInputStream00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_filter_input_stream_get_close_base_stream*(self: ptr FilterInputStream00): gboolean {. + importc: "g_filter_input_stream_get_close_base_stream", libprag.} + +proc getCloseBaseStream*(self: FilterInputStream): bool = + toBool(g_filter_input_stream_get_close_base_stream(cast[ptr FilterInputStream00](self.impl))) + +proc closeBaseStream*(self: FilterInputStream): bool = + toBool(g_filter_input_stream_get_close_base_stream(cast[ptr FilterInputStream00](self.impl))) + +proc g_filter_input_stream_set_close_base_stream*(self: ptr FilterInputStream00; closeBase: gboolean) {. + importc: "g_filter_input_stream_set_close_base_stream", libprag.} + +proc setCloseBaseStream*(self: FilterInputStream; closeBase: bool) = + g_filter_input_stream_set_close_base_stream(cast[ptr FilterInputStream00](self.impl), gboolean(closeBase)) + +proc `closeBaseStream=`*(self: FilterInputStream; closeBase: bool) = + g_filter_input_stream_set_close_base_stream(cast[ptr FilterInputStream00](self.impl), gboolean(closeBase)) + +type + BufferedInputStreamPrivate00* {.pure.} = object + BufferedInputStreamPrivate* = ref object + impl*: ptr BufferedInputStreamPrivate00 + +type + BufferedInputStream* = ref object of FilterInputStream + BufferedInputStream00* = object of FilterInputStream00 + priv3: ptr BufferedInputStreamPrivate00 + +proc g_buffered_input_stream_new*(baseStream: ptr InputStream00): ptr BufferedInputStream00 {. + importc: "g_buffered_input_stream_new", libprag.} + +proc newBufferedInputStream*(baseStream: InputStream): BufferedInputStream = + new(result, finalizeGObject) + result.impl = g_buffered_input_stream_new(cast[ptr InputStream00](baseStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBufferedInputStream*[T](result: var T; baseStream: InputStream) = + assert(result is BufferedInputStream) + new(result, finalizeGObject) + result.impl = g_buffered_input_stream_new(cast[ptr InputStream00](baseStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_buffered_input_stream_new_sized*(baseStream: ptr InputStream00; size: uint64): ptr BufferedInputStream00 {. + importc: "g_buffered_input_stream_new_sized", libprag.} + +proc newBufferedInputStreamSized*(baseStream: InputStream; size: uint64): BufferedInputStream = + new(result, finalizeGObject) + result.impl = g_buffered_input_stream_new_sized(cast[ptr InputStream00](baseStream.impl), size) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBufferedInputStreamSized*[T](result: var T; baseStream: InputStream; size: uint64) = + assert(result is BufferedInputStream) + new(result, finalizeGObject) + result.impl = g_buffered_input_stream_new_sized(cast[ptr InputStream00](baseStream.impl), size) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_buffered_input_stream_fill*(self: ptr BufferedInputStream00; count: int64; cancellable: ptr Cancellable00): int64 {. + importc: "g_buffered_input_stream_fill", libprag.} + +proc fill*(self: BufferedInputStream; count: int64; cancellable: Cancellable): int64 = + g_buffered_input_stream_fill(cast[ptr BufferedInputStream00](self.impl), count, cast[ptr Cancellable00](cancellable.impl)) + +proc g_buffered_input_stream_fill_async*(self: ptr BufferedInputStream00; count: int64; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_buffered_input_stream_fill_async", libprag.} + +proc fillAsync*(self: BufferedInputStream; count: int64; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_buffered_input_stream_fill_async(cast[ptr BufferedInputStream00](self.impl), count, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_buffered_input_stream_fill_finish*(self: ptr BufferedInputStream00; resu: ptr AsyncResult00): int64 {. + importc: "g_buffered_input_stream_fill_finish", libprag.} + +proc fillFinish*(self: BufferedInputStream; resu: AsyncResult): int64 = + g_buffered_input_stream_fill_finish(cast[ptr BufferedInputStream00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_buffered_input_stream_get_available*(self: ptr BufferedInputStream00): uint64 {. + importc: "g_buffered_input_stream_get_available", libprag.} + +proc getAvailable*(self: BufferedInputStream): uint64 = + g_buffered_input_stream_get_available(cast[ptr BufferedInputStream00](self.impl)) + +proc available*(self: BufferedInputStream): uint64 = + g_buffered_input_stream_get_available(cast[ptr BufferedInputStream00](self.impl)) + +proc g_buffered_input_stream_get_buffer_size*(self: ptr BufferedInputStream00): uint64 {. + importc: "g_buffered_input_stream_get_buffer_size", libprag.} + +proc getBufferSize*(self: BufferedInputStream): uint64 = + g_buffered_input_stream_get_buffer_size(cast[ptr BufferedInputStream00](self.impl)) + +proc bufferSize*(self: BufferedInputStream): uint64 = + g_buffered_input_stream_get_buffer_size(cast[ptr BufferedInputStream00](self.impl)) + +proc g_buffered_input_stream_peek*(self: ptr BufferedInputStream00; buffer: uint8Array; + offset: uint64; count: uint64): uint64 {. + importc: "g_buffered_input_stream_peek", libprag.} + +proc peek*(self: BufferedInputStream; buffer: uint8Array; offset: uint64; + count: uint64): uint64 = + g_buffered_input_stream_peek(cast[ptr BufferedInputStream00](self.impl), buffer, offset, count) + +proc g_buffered_input_stream_peek_buffer*(self: ptr BufferedInputStream00; count: var uint64): uint8Array {. + importc: "g_buffered_input_stream_peek_buffer", libprag.} + +proc peekBuffer*(self: BufferedInputStream; count: var uint64): uint8Array = + g_buffered_input_stream_peek_buffer(cast[ptr BufferedInputStream00](self.impl), count) + +proc g_buffered_input_stream_read_byte*(self: ptr BufferedInputStream00; cancellable: ptr Cancellable00): int32 {. + importc: "g_buffered_input_stream_read_byte", libprag.} + +proc readByte*(self: BufferedInputStream; cancellable: Cancellable): int = + int(g_buffered_input_stream_read_byte(cast[ptr BufferedInputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_buffered_input_stream_set_buffer_size*(self: ptr BufferedInputStream00; size: uint64) {. + importc: "g_buffered_input_stream_set_buffer_size", libprag.} + +proc setBufferSize*(self: BufferedInputStream; size: uint64) = + g_buffered_input_stream_set_buffer_size(cast[ptr BufferedInputStream00](self.impl), size) + +proc `bufferSize=`*(self: BufferedInputStream; size: uint64) = + g_buffered_input_stream_set_buffer_size(cast[ptr BufferedInputStream00](self.impl), size) + +type + InputStreamClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + readFn*: proc(stream: ptr InputStream00; buffer: pointer; count: uint64; + cancellable: ptr Cancellable00): int64 {.cdecl.} + skip*: proc(stream: ptr InputStream00; count: uint64; cancellable: ptr Cancellable00): int64 {.cdecl.} + closeFn*: proc(stream: ptr InputStream00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + readAsync*: proc(stream: ptr InputStream00; buffer: uint8Array; count: uint64; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + readFinish*: proc(stream: ptr InputStream00; resu: ptr AsyncResult00): int64 {.cdecl.} + skipAsync*: proc(stream: ptr InputStream00; count: uint64; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + skipFinish*: proc(stream: ptr InputStream00; resu: ptr AsyncResult00): int64 {.cdecl.} + closeAsync*: proc(stream: ptr InputStream00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + closeFinish*: proc(stream: ptr InputStream00; resu: ptr AsyncResult00): gboolean {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + InputStreamClass* = ref object + impl*: ptr InputStreamClass00 + +type + FilterInputStreamClass00* {.pure.} = object + parentClass*: InputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + FilterInputStreamClass* = ref object + impl*: ptr FilterInputStreamClass00 + +type + BufferedInputStreamClass00* {.pure.} = object + parentClass*: FilterInputStreamClass00 + fill*: proc(stream: ptr BufferedInputStream00; count: int64; cancellable: ptr Cancellable00): int64 {.cdecl.} + fillAsync*: proc(stream: ptr BufferedInputStream00; count: int64; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + fillFinish*: proc(stream: ptr BufferedInputStream00; resu: ptr AsyncResult00): int64 {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + BufferedInputStreamClass* = ref object + impl*: ptr BufferedInputStreamClass00 + +type + FilterOutputStream* = ref object of OutputStream + FilterOutputStream00* = object of OutputStream00 + baseStream*: ptr OutputStream00 + +proc g_filter_output_stream_get_base_stream*(self: ptr FilterOutputStream00): ptr OutputStream00 {. + importc: "g_filter_output_stream_get_base_stream", libprag.} + +proc getBaseStream*(self: FilterOutputStream): OutputStream = + let gobj = g_filter_output_stream_get_base_stream(cast[ptr FilterOutputStream00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[OutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc baseStream*(self: FilterOutputStream): OutputStream = + let gobj = g_filter_output_stream_get_base_stream(cast[ptr FilterOutputStream00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[OutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_filter_output_stream_get_close_base_stream*(self: ptr FilterOutputStream00): gboolean {. + importc: "g_filter_output_stream_get_close_base_stream", libprag.} + +proc getCloseBaseStream*(self: FilterOutputStream): bool = + toBool(g_filter_output_stream_get_close_base_stream(cast[ptr FilterOutputStream00](self.impl))) + +proc closeBaseStream*(self: FilterOutputStream): bool = + toBool(g_filter_output_stream_get_close_base_stream(cast[ptr FilterOutputStream00](self.impl))) + +proc g_filter_output_stream_set_close_base_stream*(self: ptr FilterOutputStream00; closeBase: gboolean) {. + importc: "g_filter_output_stream_set_close_base_stream", libprag.} + +proc setCloseBaseStream*(self: FilterOutputStream; closeBase: bool) = + g_filter_output_stream_set_close_base_stream(cast[ptr FilterOutputStream00](self.impl), gboolean(closeBase)) + +proc `closeBaseStream=`*(self: FilterOutputStream; closeBase: bool) = + g_filter_output_stream_set_close_base_stream(cast[ptr FilterOutputStream00](self.impl), gboolean(closeBase)) + +type + BufferedOutputStreamPrivate00* {.pure.} = object + BufferedOutputStreamPrivate* = ref object + impl*: ptr BufferedOutputStreamPrivate00 + +type + BufferedOutputStream* = ref object of FilterOutputStream + BufferedOutputStream00* = object of FilterOutputStream00 + priv3: ptr BufferedOutputStreamPrivate00 + +proc g_buffered_output_stream_new*(baseStream: ptr OutputStream00): ptr BufferedOutputStream00 {. + importc: "g_buffered_output_stream_new", libprag.} + +proc newBufferedOutputStream*(baseStream: OutputStream): BufferedOutputStream = + new(result, finalizeGObject) + result.impl = g_buffered_output_stream_new(cast[ptr OutputStream00](baseStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBufferedOutputStream*[T](result: var T; baseStream: OutputStream) = + assert(result is BufferedOutputStream) + new(result, finalizeGObject) + result.impl = g_buffered_output_stream_new(cast[ptr OutputStream00](baseStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_buffered_output_stream_new_sized*(baseStream: ptr OutputStream00; size: uint64): ptr BufferedOutputStream00 {. + importc: "g_buffered_output_stream_new_sized", libprag.} + +proc newBufferedOutputStreamSized*(baseStream: OutputStream; size: uint64): BufferedOutputStream = + new(result, finalizeGObject) + result.impl = g_buffered_output_stream_new_sized(cast[ptr OutputStream00](baseStream.impl), size) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBufferedOutputStreamSized*[T](result: var T; baseStream: OutputStream; size: uint64) = + assert(result is BufferedOutputStream) + new(result, finalizeGObject) + result.impl = g_buffered_output_stream_new_sized(cast[ptr OutputStream00](baseStream.impl), size) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_buffered_output_stream_get_auto_grow*(self: ptr BufferedOutputStream00): gboolean {. + importc: "g_buffered_output_stream_get_auto_grow", libprag.} + +proc getAutoGrow*(self: BufferedOutputStream): bool = + toBool(g_buffered_output_stream_get_auto_grow(cast[ptr BufferedOutputStream00](self.impl))) + +proc autoGrow*(self: BufferedOutputStream): bool = + toBool(g_buffered_output_stream_get_auto_grow(cast[ptr BufferedOutputStream00](self.impl))) + +proc g_buffered_output_stream_get_buffer_size*(self: ptr BufferedOutputStream00): uint64 {. + importc: "g_buffered_output_stream_get_buffer_size", libprag.} + +proc getBufferSize*(self: BufferedOutputStream): uint64 = + g_buffered_output_stream_get_buffer_size(cast[ptr BufferedOutputStream00](self.impl)) + +proc bufferSize*(self: BufferedOutputStream): uint64 = + g_buffered_output_stream_get_buffer_size(cast[ptr BufferedOutputStream00](self.impl)) + +proc g_buffered_output_stream_set_auto_grow*(self: ptr BufferedOutputStream00; autoGrow: gboolean) {. + importc: "g_buffered_output_stream_set_auto_grow", libprag.} + +proc setAutoGrow*(self: BufferedOutputStream; autoGrow: bool) = + g_buffered_output_stream_set_auto_grow(cast[ptr BufferedOutputStream00](self.impl), gboolean(autoGrow)) + +proc `autoGrow=`*(self: BufferedOutputStream; autoGrow: bool) = + g_buffered_output_stream_set_auto_grow(cast[ptr BufferedOutputStream00](self.impl), gboolean(autoGrow)) + +proc g_buffered_output_stream_set_buffer_size*(self: ptr BufferedOutputStream00; size: uint64) {. + importc: "g_buffered_output_stream_set_buffer_size", libprag.} + +proc setBufferSize*(self: BufferedOutputStream; size: uint64) = + g_buffered_output_stream_set_buffer_size(cast[ptr BufferedOutputStream00](self.impl), size) + +proc `bufferSize=`*(self: BufferedOutputStream; size: uint64) = + g_buffered_output_stream_set_buffer_size(cast[ptr BufferedOutputStream00](self.impl), size) + +type + OutputStreamClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + writeFn*: proc(stream: ptr OutputStream00; buffer: uint8Array; count: uint64; + cancellable: ptr Cancellable00): int64 {.cdecl.} + splice*: proc(stream: ptr OutputStream00; source: ptr InputStream00; + flags: OutputStreamSpliceFlags; cancellable: ptr Cancellable00): int64 {.cdecl.} + flush*: proc(stream: ptr OutputStream00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + closeFn*: proc(stream: ptr OutputStream00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + writeAsync*: proc(stream: ptr OutputStream00; buffer: uint8Array; count: uint64; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + writeFinish*: proc(stream: ptr OutputStream00; resu: ptr AsyncResult00): int64 {.cdecl.} + spliceAsync*: proc(stream: ptr OutputStream00; source: ptr InputStream00; + flags: OutputStreamSpliceFlags; ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + spliceFinish*: proc(stream: ptr OutputStream00; resu: ptr AsyncResult00): int64 {.cdecl.} + flushAsync*: proc(stream: ptr OutputStream00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + flushFinish*: proc(stream: ptr OutputStream00; resu: ptr AsyncResult00): gboolean {.cdecl.} + closeAsync*: proc(stream: ptr OutputStream00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + closeFinish*: proc(stream: ptr OutputStream00; resu: ptr AsyncResult00): gboolean {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + gReserved7*: pointer + gReserved8*: pointer + OutputStreamClass* = ref object + impl*: ptr OutputStreamClass00 + +type + FilterOutputStreamClass00* {.pure.} = object + parentClass*: OutputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + FilterOutputStreamClass* = ref object + impl*: ptr FilterOutputStreamClass00 + +type + BufferedOutputStreamClass00* {.pure.} = object + parentClass*: FilterOutputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + BufferedOutputStreamClass* = ref object + impl*: ptr BufferedOutputStreamClass00 + +type + BusAcquiredCallback* = proc (connection: ptr DBusConnection00; name: cstring; userData: pointer) {.cdecl.} + +type + BusNameAcquiredCallback* = proc (connection: ptr DBusConnection00; name: cstring; userData: pointer) {.cdecl.} + +type + BusNameAppearedCallback* = proc (connection: ptr DBusConnection00; name: cstring; nameOwner: cstring; + userData: pointer) {.cdecl.} + +type + BusNameLostCallback* = proc (connection: ptr DBusConnection00; name: cstring; userData: pointer) {.cdecl.} + +type + BusNameOwnerFlag* {.size: sizeof(cint), pure.} = enum + allowReplacement = 1 + replace = 2 + + BusNameOwnerFlags* {.size: sizeof(cint).} = set[BusNameOwnerFlag] + +type + BusNameVanishedCallback* = proc (connection: ptr DBusConnection00; name: cstring; userData: pointer) {.cdecl.} + +type + BusNameWatcherFlag* {.size: sizeof(cint), pure.} = enum + autoStart = 1 + + BusNameWatcherFlags* {.size: sizeof(cint).} = set[BusNameWatcherFlag] + +type + BusType* {.size: sizeof(cint), pure.} = enum + starter = -1 + none = 0 + system = 1 + session = 2 + +type + BytesIcon* = ref object of gobject.Object + BytesIcon00* = object of gobject.Object00 + +proc g_bytes_icon_new*(bytes: ptr glib.Bytes00): ptr BytesIcon00 {. + importc: "g_bytes_icon_new", libprag.} + +proc newBytesIcon*(bytes: glib.Bytes): BytesIcon = + new(result, finalizeGObject) + result.impl = g_bytes_icon_new(cast[ptr glib.Bytes00](bytes.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBytesIcon*[T](result: var T; bytes: glib.Bytes) = + assert(result is BytesIcon) + new(result, finalizeGObject) + result.impl = g_bytes_icon_new(cast[ptr glib.Bytes00](bytes.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_bytes_icon_get_bytes*(self: ptr BytesIcon00): ptr glib.Bytes00 {. + importc: "g_bytes_icon_get_bytes", libprag.} + +proc getBytes*(self: BytesIcon): glib.Bytes = + new(result) + result.impl = g_bytes_icon_get_bytes(cast[ptr BytesIcon00](self.impl)) + +proc bytes*(self: BytesIcon): glib.Bytes = + new(result) + result.impl = g_bytes_icon_get_bytes(cast[ptr BytesIcon00](self.impl)) + +type + CancellableClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + cancelled*: proc(cancellable: ptr Cancellable00) {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + CancellableClass* = ref object + impl*: ptr CancellableClass00 + +type + CancellableSourceFunc* = proc (cancellable: ptr Cancellable00; userData: pointer): gboolean {.cdecl.} + +type + CharsetConverter* = ref object of gobject.Object + CharsetConverter00* = object of gobject.Object00 + +proc g_charset_converter_new*(toCharset: cstring; fromCharset: cstring): ptr CharsetConverter00 {. + importc: "g_charset_converter_new", libprag.} + +proc newCharsetConverter*(toCharset: string; fromCharset: string): CharsetConverter = + new(result, finalizeGObject) + result.impl = g_charset_converter_new(cstring(toCharset), cstring(fromCharset)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCharsetConverter*[T](result: var T; toCharset: string; fromCharset: string) = + assert(result is CharsetConverter) + new(result, finalizeGObject) + result.impl = g_charset_converter_new(cstring(toCharset), cstring(fromCharset)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_charset_converter_get_num_fallbacks*(self: ptr CharsetConverter00): uint32 {. + importc: "g_charset_converter_get_num_fallbacks", libprag.} + +proc getNumFallbacks*(self: CharsetConverter): int = + int(g_charset_converter_get_num_fallbacks(cast[ptr CharsetConverter00](self.impl))) + +proc numFallbacks*(self: CharsetConverter): int = + int(g_charset_converter_get_num_fallbacks(cast[ptr CharsetConverter00](self.impl))) + +proc g_charset_converter_get_use_fallback*(self: ptr CharsetConverter00): gboolean {. + importc: "g_charset_converter_get_use_fallback", libprag.} + +proc getUseFallback*(self: CharsetConverter): bool = + toBool(g_charset_converter_get_use_fallback(cast[ptr CharsetConverter00](self.impl))) + +proc useFallback*(self: CharsetConverter): bool = + toBool(g_charset_converter_get_use_fallback(cast[ptr CharsetConverter00](self.impl))) + +proc g_charset_converter_set_use_fallback*(self: ptr CharsetConverter00; useFallback: gboolean) {. + importc: "g_charset_converter_set_use_fallback", libprag.} + +proc setUseFallback*(self: CharsetConverter; useFallback: bool) = + g_charset_converter_set_use_fallback(cast[ptr CharsetConverter00](self.impl), gboolean(useFallback)) + +proc `useFallback=`*(self: CharsetConverter; useFallback: bool) = + g_charset_converter_set_use_fallback(cast[ptr CharsetConverter00](self.impl), gboolean(useFallback)) + +type + CharsetConverterClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + CharsetConverterClass* = ref object + impl*: ptr CharsetConverterClass00 + +type + Converter00* {.pure.} = object + Converter* = ref object + impl*: ptr Converter00 + +proc g_converter_reset*(self: ptr Converter00) {. + importc: "g_converter_reset", libprag.} + +proc reset*(self: Converter) = + g_converter_reset(cast[ptr Converter00](self.impl)) + +type + ConverterFlag* {.size: sizeof(cint), pure.} = enum + inputAtEnd = 1 + flush = 2 + + ConverterFlags* {.size: sizeof(cint).} = set[ConverterFlag] + +type + ConverterResult* {.size: sizeof(cint), pure.} = enum + error = 0 + converted = 1 + finished = 2 + flushed = 3 + +proc g_converter_convert*(self: ptr Converter00; inbuf: uint8Array; inbufSize: uint64; + outbuf: uint8Array; outbufSize: uint64; flags: ConverterFlags; bytesRead: var uint64; + bytesWritten: var uint64): ConverterResult {. + importc: "g_converter_convert", libprag.} + +proc convert*(self: Converter; inbuf: uint8Array; inbufSize: uint64; + outbuf: uint8Array; outbufSize: uint64; flags: ConverterFlags; bytesRead: var uint64; bytesWritten: var uint64): ConverterResult = + g_converter_convert(cast[ptr Converter00](self.impl), inbuf, inbufSize, outbuf, outbufSize, flags, bytesRead, bytesWritten) + +type + ConverterIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + convert*: proc(`converter`: ptr Converter00; inbuf: uint8Array; inbufSize: uint64; + outbuf: uint8Array; outbufSize: uint64; flags: ConverterFlags; bytesRead: var uint64; + bytesWritten: var uint64): ConverterResult {.cdecl.} + reset*: proc(`converter`: ptr Converter00) {.cdecl.} + ConverterIface* = ref object + impl*: ptr ConverterIface00 + +type + ConverterInputStreamPrivate00* {.pure.} = object + ConverterInputStreamPrivate* = ref object + impl*: ptr ConverterInputStreamPrivate00 + +type + ConverterInputStream* = ref object of FilterInputStream + ConverterInputStream00* = object of FilterInputStream00 + priv3: ptr ConverterInputStreamPrivate00 + +proc g_converter_input_stream_new*(baseStream: ptr InputStream00; `converter`: ptr Converter00): ptr ConverterInputStream00 {. + importc: "g_converter_input_stream_new", libprag.} + +proc newConverterInputStream*(baseStream: InputStream; `converter`: Converter): ConverterInputStream = + new(result, finalizeGObject) + result.impl = g_converter_input_stream_new(cast[ptr InputStream00](baseStream.impl), cast[ptr Converter00](`converter`.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initConverterInputStream*[T](result: var T; baseStream: InputStream; `converter`: Converter) = + assert(result is ConverterInputStream) + new(result, finalizeGObject) + result.impl = g_converter_input_stream_new(cast[ptr InputStream00](baseStream.impl), cast[ptr Converter00](`converter`.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_converter_input_stream_get_converter*(self: ptr ConverterInputStream00): ptr Converter00 {. + importc: "g_converter_input_stream_get_converter", libprag.} + +proc getConverter*(self: ConverterInputStream): Converter = + new(result) + result.impl = g_converter_input_stream_get_converter(cast[ptr ConverterInputStream00](self.impl)) + +type + ConverterInputStreamClass00* {.pure.} = object + parentClass*: FilterInputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + ConverterInputStreamClass* = ref object + impl*: ptr ConverterInputStreamClass00 + +type + ConverterOutputStreamPrivate00* {.pure.} = object + ConverterOutputStreamPrivate* = ref object + impl*: ptr ConverterOutputStreamPrivate00 + +type + ConverterOutputStream* = ref object of FilterOutputStream + ConverterOutputStream00* = object of FilterOutputStream00 + priv3: ptr ConverterOutputStreamPrivate00 + +proc g_converter_output_stream_new*(baseStream: ptr OutputStream00; `converter`: ptr Converter00): ptr ConverterOutputStream00 {. + importc: "g_converter_output_stream_new", libprag.} + +proc newConverterOutputStream*(baseStream: OutputStream; `converter`: Converter): ConverterOutputStream = + new(result, finalizeGObject) + result.impl = g_converter_output_stream_new(cast[ptr OutputStream00](baseStream.impl), cast[ptr Converter00](`converter`.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initConverterOutputStream*[T](result: var T; baseStream: OutputStream; `converter`: Converter) = + assert(result is ConverterOutputStream) + new(result, finalizeGObject) + result.impl = g_converter_output_stream_new(cast[ptr OutputStream00](baseStream.impl), cast[ptr Converter00](`converter`.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_converter_output_stream_get_converter*(self: ptr ConverterOutputStream00): ptr Converter00 {. + importc: "g_converter_output_stream_get_converter", libprag.} + +proc getConverter*(self: ConverterOutputStream): Converter = + new(result) + result.impl = g_converter_output_stream_get_converter(cast[ptr ConverterOutputStream00](self.impl)) + +type + ConverterOutputStreamClass00* {.pure.} = object + parentClass*: FilterOutputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + ConverterOutputStreamClass* = ref object + impl*: ptr ConverterOutputStreamClass00 + +type + CredentialsClass00* {.pure.} = object + CredentialsClass* = ref object + impl*: ptr CredentialsClass00 + +type + DBusActionGroup* = ref object of gobject.Object + DBusActionGroup00* = object of gobject.Object00 + +proc g_dbus_action_group_get*(connection: ptr DBusConnection00; busName: cstring; + objectPath: cstring): ptr DBusActionGroup00 {. + importc: "g_dbus_action_group_get", libprag.} + +proc get*(connection: DBusConnection; busName: string; objectPath: string): DBusActionGroup = + let gobj = g_dbus_action_group_get(cast[ptr DBusConnection00](connection.impl), cstring(busName), cstring(objectPath)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusActionGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DBusError* {.size: sizeof(cint), pure.} = enum + failed = 0 + noMemory = 1 + serviceUnknown = 2 + nameHasNoOwner = 3 + noReply = 4 + ioError = 5 + badAddress = 6 + notSupported = 7 + limitsExceeded = 8 + accessDenied = 9 + authFailed = 10 + noServer = 11 + timeout = 12 + noNetwork = 13 + addressInUse = 14 + disconnected = 15 + invalidArgs = 16 + fileNotFound = 17 + fileExists = 18 + unknownMethod = 19 + timedOut = 20 + matchRuleNotFound = 21 + matchRuleInvalid = 22 + spawnExecFailed = 23 + spawnForkFailed = 24 + spawnChildExited = 25 + spawnChildSignaled = 26 + spawnFailed = 27 + spawnSetupFailed = 28 + spawnConfigInvalid = 29 + spawnServiceInvalid = 30 + spawnServiceNotFound = 31 + spawnPermissionsInvalid = 32 + spawnFileInvalid = 33 + spawnNoMemory = 34 + unixProcessIdUnknown = 35 + invalidSignature = 36 + invalidFileContent = 37 + selinuxSecurityContextUnknown = 38 + adtAuditDataUnknown = 39 + objectPathInUse = 40 + unknownObject = 41 + unknownInterface = 42 + unknownProperty = 43 + propertyReadOnly = 44 + +proc g_dbus_error_encode_gerror*(error: ptr Error00): cstring {. + importc: "g_dbus_error_encode_gerror", libprag.} + +proc encodeGerror*(error: ptr Error00): string = + let resul0 = g_dbus_error_encode_gerror(error) + result = $resul0 + cogfree(resul0) + +proc g_dbus_error_get_remote_error*(error: ptr Error00): cstring {. + importc: "g_dbus_error_get_remote_error", libprag.} + +proc getRemoteError*(error: ptr Error00): string = + let resul0 = g_dbus_error_get_remote_error(error) + result = $resul0 + cogfree(resul0) + +proc remoteError*(error: ptr Error00): string = + let resul0 = g_dbus_error_get_remote_error(error) + result = $resul0 + cogfree(resul0) + +proc g_dbus_error_is_remote_error*(error: ptr Error00): gboolean {. + importc: "g_dbus_error_is_remote_error", libprag.} + +proc isRemoteError*(error: ptr Error00): gboolean {. + importc: "g_dbus_error_is_remote_error", libprag.} + +proc g_dbus_error_new_for_dbus_error*(dbusErrorName: cstring; dbusErrorMessage: cstring): ptr Error00 {. + importc: "g_dbus_error_new_for_dbus_error", libprag.} + +proc newForDbusError*(dbusErrorName: cstring; dbusErrorMessage: cstring): ptr Error00 {. + importc: "g_dbus_error_new_for_dbus_error", libprag.} + +proc g_dbus_error_quark*(): uint32 {. + importc: "g_dbus_error_quark", libprag.} + +proc g_dbus_error_register_error*(errorDomain: uint32; errorCode: int32; dbusErrorName: cstring): gboolean {. + importc: "g_dbus_error_register_error", libprag.} + +proc registerError*(errorDomain: uint32; errorCode: int32; dbusErrorName: cstring): gboolean {. + importc: "g_dbus_error_register_error", libprag.} + +proc g_dbus_error_strip_remote_error*(error: ptr Error00): gboolean {. + importc: "g_dbus_error_strip_remote_error", libprag.} + +proc stripRemoteError*(error: ptr Error00): gboolean {. + importc: "g_dbus_error_strip_remote_error", libprag.} + +proc g_dbus_error_unregister_error*(errorDomain: uint32; errorCode: int32; dbusErrorName: cstring): gboolean {. + importc: "g_dbus_error_unregister_error", libprag.} + +proc unregisterError*(errorDomain: uint32; errorCode: int32; dbusErrorName: cstring): gboolean {. + importc: "g_dbus_error_unregister_error", libprag.} + +type + DBusErrorEntry00* {.pure.} = object + errorCode*: int32 + dbusErrorName*: cstring + DBusErrorEntry* = ref object + impl*: ptr DBusErrorEntry00 + +proc g_dbus_error_register_error_domain*(errorDomainQuarkName: cstring; quarkVolatile: ptr uint64; + entries: ptr DBusErrorEntry00; numEntries: uint32) {. + importc: "g_dbus_error_register_error_domain", libprag.} + +proc registerErrorDomain*(errorDomainQuarkName: string; quarkVolatile: ptr uint64; + entries: DBusErrorEntry; numEntries: int) = + g_dbus_error_register_error_domain(cstring(errorDomainQuarkName), quarkVolatile, cast[ptr DBusErrorEntry00](entries.impl), uint32(numEntries)) + +type + DBusInterface00* {.pure.} = object + DBusInterface* = ref object + impl*: ptr DBusInterface00 + +proc g_dbus_interface_get_info*(self: ptr DBusInterface00): ptr DBusInterfaceInfo00 {. + importc: "g_dbus_interface_get_info", libprag.} + +proc getInfo*(self: DBusInterface): DBusInterfaceInfo = + new(result) + result.impl = g_dbus_interface_get_info(cast[ptr DBusInterface00](self.impl)) + +proc info*(self: DBusInterface): DBusInterfaceInfo = + new(result) + result.impl = g_dbus_interface_get_info(cast[ptr DBusInterface00](self.impl)) + +type + DBusObject00* {.pure.} = object + DBusObject* = ref object + impl*: ptr DBusObject00 + +proc g_dbus_object_get_interface*(self: ptr DBusObject00; interfaceName: cstring): ptr DBusInterface00 {. + importc: "g_dbus_object_get_interface", libprag.} + +proc getInterface*(self: DBusObject; interfaceName: string): DBusInterface = + new(result) + result.impl = g_dbus_object_get_interface(cast[ptr DBusObject00](self.impl), cstring(interfaceName)) + +proc g_dbus_object_get_interfaces*(self: ptr DBusObject00): ptr pointer {. + importc: "g_dbus_object_get_interfaces", libprag.} + +proc getInterfaces*(self: DBusObject): ptr pointer = + g_dbus_object_get_interfaces(cast[ptr DBusObject00](self.impl)) + +proc interfaces*(self: DBusObject): ptr pointer = + g_dbus_object_get_interfaces(cast[ptr DBusObject00](self.impl)) + +proc g_dbus_object_get_object_path*(self: ptr DBusObject00): cstring {. + importc: "g_dbus_object_get_object_path", libprag.} + +proc getObjectPath*(self: DBusObject): string = + let resul0 = g_dbus_object_get_object_path(cast[ptr DBusObject00](self.impl)) + result = $resul0 + +proc objectPath*(self: DBusObject): string = + let resul0 = g_dbus_object_get_object_path(cast[ptr DBusObject00](self.impl)) + result = $resul0 + +proc g_dbus_interface_dup_object*(self: ptr DBusInterface00): ptr DBusObject00 {. + importc: "g_dbus_interface_dup_object", libprag.} + +proc getObject*(self: DBusInterface): DBusObject = + new(result) + result.impl = g_dbus_interface_dup_object(cast[ptr DBusInterface00](self.impl)) + +proc g_dbus_interface_set_object*(self: ptr DBusInterface00; `object`: ptr DBusObject00) {. + importc: "g_dbus_interface_set_object", libprag.} + +proc setObject*(self: DBusInterface; `object`: DBusObject) = + g_dbus_interface_set_object(cast[ptr DBusInterface00](self.impl), cast[ptr DBusObject00](`object`.impl)) + +proc `object=`*(self: DBusInterface; `object`: DBusObject) = + g_dbus_interface_set_object(cast[ptr DBusInterface00](self.impl), cast[ptr DBusObject00](`object`.impl)) + +type + DBusInterfaceGetPropertyFunc* = proc (connection: ptr DBusConnection00; sender: cstring; + objectPath: cstring; interfaceName: cstring; propertyName: cstring; error: ptr Error00; userData: pointer): ptr glib.Variant00 {.cdecl.} + +type + DBusInterfaceIface00* {.pure.} = object + parentIface*: gobject.TypeInterface00 + getInfo*: proc(`interface`: ptr DBusInterface00): ptr DBusInterfaceInfo00 {.cdecl.} + getObject*: proc(`interface`: ptr DBusInterface00): ptr DBusObject00 {.cdecl.} + setObject*: proc(`interface`: ptr DBusInterface00; `object`: ptr DBusObject00) {.cdecl.} + dupObject*: proc(`interface`: ptr DBusInterface00): ptr DBusObject00 {.cdecl.} + DBusInterfaceIface* = ref object + impl*: ptr DBusInterfaceIface00 + +type + DBusMethodInvocation* = ref object of gobject.Object + DBusMethodInvocation00* = object of gobject.Object00 + +proc g_dbus_method_invocation_get_connection*(self: ptr DBusMethodInvocation00): ptr DBusConnection00 {. + importc: "g_dbus_method_invocation_get_connection", libprag.} + +proc getConnection*(self: DBusMethodInvocation): DBusConnection = + let gobj = g_dbus_method_invocation_get_connection(cast[ptr DBusMethodInvocation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc connection*(self: DBusMethodInvocation): DBusConnection = + let gobj = g_dbus_method_invocation_get_connection(cast[ptr DBusMethodInvocation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_method_invocation_get_interface_name*(self: ptr DBusMethodInvocation00): cstring {. + importc: "g_dbus_method_invocation_get_interface_name", libprag.} + +proc getInterfaceName*(self: DBusMethodInvocation): string = + let resul0 = g_dbus_method_invocation_get_interface_name(cast[ptr DBusMethodInvocation00](self.impl)) + result = $resul0 + +proc interfaceName*(self: DBusMethodInvocation): string = + let resul0 = g_dbus_method_invocation_get_interface_name(cast[ptr DBusMethodInvocation00](self.impl)) + result = $resul0 + +proc g_dbus_method_invocation_get_message*(self: ptr DBusMethodInvocation00): ptr DBusMessage00 {. + importc: "g_dbus_method_invocation_get_message", libprag.} + +proc getMessage*(self: DBusMethodInvocation): DBusMessage = + let gobj = g_dbus_method_invocation_get_message(cast[ptr DBusMethodInvocation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusMessage](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc message*(self: DBusMethodInvocation): DBusMessage = + let gobj = g_dbus_method_invocation_get_message(cast[ptr DBusMethodInvocation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusMessage](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_method_invocation_get_method_info*(self: ptr DBusMethodInvocation00): ptr DBusMethodInfo00 {. + importc: "g_dbus_method_invocation_get_method_info", libprag.} + +proc getMethodInfo*(self: DBusMethodInvocation): DBusMethodInfo = + new(result) + result.impl = g_dbus_method_invocation_get_method_info(cast[ptr DBusMethodInvocation00](self.impl)) + +proc methodInfo*(self: DBusMethodInvocation): DBusMethodInfo = + new(result) + result.impl = g_dbus_method_invocation_get_method_info(cast[ptr DBusMethodInvocation00](self.impl)) + +proc g_dbus_method_invocation_get_method_name*(self: ptr DBusMethodInvocation00): cstring {. + importc: "g_dbus_method_invocation_get_method_name", libprag.} + +proc getMethodName*(self: DBusMethodInvocation): string = + let resul0 = g_dbus_method_invocation_get_method_name(cast[ptr DBusMethodInvocation00](self.impl)) + result = $resul0 + +proc methodName*(self: DBusMethodInvocation): string = + let resul0 = g_dbus_method_invocation_get_method_name(cast[ptr DBusMethodInvocation00](self.impl)) + result = $resul0 + +proc g_dbus_method_invocation_get_object_path*(self: ptr DBusMethodInvocation00): cstring {. + importc: "g_dbus_method_invocation_get_object_path", libprag.} + +proc getObjectPath*(self: DBusMethodInvocation): string = + let resul0 = g_dbus_method_invocation_get_object_path(cast[ptr DBusMethodInvocation00](self.impl)) + result = $resul0 + +proc objectPath*(self: DBusMethodInvocation): string = + let resul0 = g_dbus_method_invocation_get_object_path(cast[ptr DBusMethodInvocation00](self.impl)) + result = $resul0 + +proc g_dbus_method_invocation_get_parameters*(self: ptr DBusMethodInvocation00): ptr glib.Variant00 {. + importc: "g_dbus_method_invocation_get_parameters", libprag.} + +proc getParameters*(self: DBusMethodInvocation): glib.Variant = + new(result) + result.impl = g_dbus_method_invocation_get_parameters(cast[ptr DBusMethodInvocation00](self.impl)) + +proc parameters*(self: DBusMethodInvocation): glib.Variant = + new(result) + result.impl = g_dbus_method_invocation_get_parameters(cast[ptr DBusMethodInvocation00](self.impl)) + +proc g_dbus_method_invocation_get_property_info*(self: ptr DBusMethodInvocation00): ptr DBusPropertyInfo00 {. + importc: "g_dbus_method_invocation_get_property_info", libprag.} + +proc getPropertyInfo*(self: DBusMethodInvocation): DBusPropertyInfo = + new(result) + result.impl = g_dbus_method_invocation_get_property_info(cast[ptr DBusMethodInvocation00](self.impl)) + +proc propertyInfo*(self: DBusMethodInvocation): DBusPropertyInfo = + new(result) + result.impl = g_dbus_method_invocation_get_property_info(cast[ptr DBusMethodInvocation00](self.impl)) + +proc g_dbus_method_invocation_get_sender*(self: ptr DBusMethodInvocation00): cstring {. + importc: "g_dbus_method_invocation_get_sender", libprag.} + +proc getSender*(self: DBusMethodInvocation): string = + let resul0 = g_dbus_method_invocation_get_sender(cast[ptr DBusMethodInvocation00](self.impl)) + result = $resul0 + +proc sender*(self: DBusMethodInvocation): string = + let resul0 = g_dbus_method_invocation_get_sender(cast[ptr DBusMethodInvocation00](self.impl)) + result = $resul0 + +proc g_dbus_method_invocation_return_dbus_error*(self: ptr DBusMethodInvocation00; errorName: cstring; + errorMessage: cstring) {. + importc: "g_dbus_method_invocation_return_dbus_error", libprag.} + +proc returnDbusError*(self: DBusMethodInvocation; errorName: string; errorMessage: string) = + g_dbus_method_invocation_return_dbus_error(cast[ptr DBusMethodInvocation00](self.impl), cstring(errorName), cstring(errorMessage)) + +proc g_dbus_method_invocation_return_error_literal*(self: ptr DBusMethodInvocation00; domain: uint32; + code: int32; message: cstring) {. + importc: "g_dbus_method_invocation_return_error_literal", libprag.} + +proc returnErrorLiteral*(self: DBusMethodInvocation; domain: int; code: int; + message: string) = + g_dbus_method_invocation_return_error_literal(cast[ptr DBusMethodInvocation00](self.impl), uint32(domain), int32(code), cstring(message)) + +proc g_dbus_method_invocation_return_gerror*(self: ptr DBusMethodInvocation00; error: ptr Error00) {. + importc: "g_dbus_method_invocation_return_gerror", libprag.} + +proc returnGerror*(self: DBusMethodInvocation; error: ptr Error00) = + g_dbus_method_invocation_return_gerror(cast[ptr DBusMethodInvocation00](self.impl), error) + +proc g_dbus_method_invocation_return_value*(self: ptr DBusMethodInvocation00; parameters: ptr glib.Variant00) {. + importc: "g_dbus_method_invocation_return_value", libprag.} + +proc returnValue*(self: DBusMethodInvocation; parameters: glib.Variant) = + g_dbus_method_invocation_return_value(cast[ptr DBusMethodInvocation00](self.impl), cast[ptr glib.Variant00](parameters.impl)) + +proc g_dbus_method_invocation_return_value_with_unix_fd_list*(self: ptr DBusMethodInvocation00; parameters: ptr glib.Variant00; + fdList: ptr UnixFDList00) {. + importc: "g_dbus_method_invocation_return_value_with_unix_fd_list", libprag.} + +proc returnValueWithUnixFdList*(self: DBusMethodInvocation; parameters: glib.Variant; + fdList: UnixFDList) = + g_dbus_method_invocation_return_value_with_unix_fd_list(cast[ptr DBusMethodInvocation00](self.impl), cast[ptr glib.Variant00](parameters.impl), cast[ptr UnixFDList00](fdList.impl)) + +type + DBusInterfaceMethodCallFunc* = proc (connection: ptr DBusConnection00; sender: cstring; + objectPath: cstring; interfaceName: cstring; methodName: cstring; parameters: ptr glib.Variant00; + invocation: ptr DBusMethodInvocation00; userData: pointer) {.cdecl.} + +type + DBusInterfaceSetPropertyFunc* = proc (connection: ptr DBusConnection00; sender: cstring; + objectPath: cstring; interfaceName: cstring; propertyName: cstring; value: ptr glib.Variant00; + error: ptr Error00; userData: pointer): gboolean {.cdecl.} + +type + DBusInterfaceSkeletonPrivate00* {.pure.} = object + DBusInterfaceSkeletonPrivate* = ref object + impl*: ptr DBusInterfaceSkeletonPrivate00 + +type + DBusInterfaceSkeleton* = ref object of gobject.Object + DBusInterfaceSkeleton00* = object of gobject.Object00 + priv1: ptr DBusInterfaceSkeletonPrivate00 + +proc scGAuthorizeMethod*(self: DBusInterfaceSkeleton; p: proc (self: ptr gobject.Object00; invocation: DBusMethodInvocation00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "g-authorize-method", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_dbus_interface_skeleton_export*(self: ptr DBusInterfaceSkeleton00; connection: ptr DBusConnection00; + objectPath: cstring): gboolean {. + importc: "g_dbus_interface_skeleton_export", libprag.} + +proc `export`*(self: DBusInterfaceSkeleton; connection: DBusConnection; + objectPath: string): bool = + toBool(g_dbus_interface_skeleton_export(cast[ptr DBusInterfaceSkeleton00](self.impl), cast[ptr DBusConnection00](connection.impl), cstring(objectPath))) + +proc g_dbus_interface_skeleton_flush*(self: ptr DBusInterfaceSkeleton00) {. + importc: "g_dbus_interface_skeleton_flush", libprag.} + +proc flush*(self: DBusInterfaceSkeleton) = + g_dbus_interface_skeleton_flush(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc g_dbus_interface_skeleton_get_connection*(self: ptr DBusInterfaceSkeleton00): ptr DBusConnection00 {. + importc: "g_dbus_interface_skeleton_get_connection", libprag.} + +proc getConnection*(self: DBusInterfaceSkeleton): DBusConnection = + let gobj = g_dbus_interface_skeleton_get_connection(cast[ptr DBusInterfaceSkeleton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc connection*(self: DBusInterfaceSkeleton): DBusConnection = + let gobj = g_dbus_interface_skeleton_get_connection(cast[ptr DBusInterfaceSkeleton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_interface_skeleton_get_connections*(self: ptr DBusInterfaceSkeleton00): ptr pointer {. + importc: "g_dbus_interface_skeleton_get_connections", libprag.} + +proc getConnections*(self: DBusInterfaceSkeleton): ptr pointer = + g_dbus_interface_skeleton_get_connections(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc connections*(self: DBusInterfaceSkeleton): ptr pointer = + g_dbus_interface_skeleton_get_connections(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc g_dbus_interface_skeleton_get_info*(self: ptr DBusInterfaceSkeleton00): ptr DBusInterfaceInfo00 {. + importc: "g_dbus_interface_skeleton_get_info", libprag.} + +proc getInfo*(self: DBusInterfaceSkeleton): DBusInterfaceInfo = + new(result) + result.impl = g_dbus_interface_skeleton_get_info(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc info*(self: DBusInterfaceSkeleton): DBusInterfaceInfo = + new(result) + result.impl = g_dbus_interface_skeleton_get_info(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc g_dbus_interface_skeleton_get_object_path*(self: ptr DBusInterfaceSkeleton00): cstring {. + importc: "g_dbus_interface_skeleton_get_object_path", libprag.} + +proc getObjectPath*(self: DBusInterfaceSkeleton): string = + let resul0 = g_dbus_interface_skeleton_get_object_path(cast[ptr DBusInterfaceSkeleton00](self.impl)) + result = $resul0 + +proc objectPath*(self: DBusInterfaceSkeleton): string = + let resul0 = g_dbus_interface_skeleton_get_object_path(cast[ptr DBusInterfaceSkeleton00](self.impl)) + result = $resul0 + +proc g_dbus_interface_skeleton_get_properties*(self: ptr DBusInterfaceSkeleton00): ptr glib.Variant00 {. + importc: "g_dbus_interface_skeleton_get_properties", libprag.} + +proc getProperties*(self: DBusInterfaceSkeleton): glib.Variant = + new(result) + result.impl = g_dbus_interface_skeleton_get_properties(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc properties*(self: DBusInterfaceSkeleton): glib.Variant = + new(result) + result.impl = g_dbus_interface_skeleton_get_properties(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc g_dbus_interface_skeleton_has_connection*(self: ptr DBusInterfaceSkeleton00; connection: ptr DBusConnection00): gboolean {. + importc: "g_dbus_interface_skeleton_has_connection", libprag.} + +proc hasConnection*(self: DBusInterfaceSkeleton; connection: DBusConnection): bool = + toBool(g_dbus_interface_skeleton_has_connection(cast[ptr DBusInterfaceSkeleton00](self.impl), cast[ptr DBusConnection00](connection.impl))) + +proc g_dbus_interface_skeleton_unexport*(self: ptr DBusInterfaceSkeleton00) {. + importc: "g_dbus_interface_skeleton_unexport", libprag.} + +proc unexport*(self: DBusInterfaceSkeleton) = + g_dbus_interface_skeleton_unexport(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc g_dbus_interface_skeleton_unexport_from_connection*(self: ptr DBusInterfaceSkeleton00; connection: ptr DBusConnection00) {. + importc: "g_dbus_interface_skeleton_unexport_from_connection", libprag.} + +proc unexportFromConnection*(self: DBusInterfaceSkeleton; connection: DBusConnection) = + g_dbus_interface_skeleton_unexport_from_connection(cast[ptr DBusInterfaceSkeleton00](self.impl), cast[ptr DBusConnection00](connection.impl)) + +type + DBusInterfaceSkeletonFlag* {.size: sizeof(cint), pure.} = enum + handleMethodInvocationsInThread = 1 + + DBusInterfaceSkeletonFlags* {.size: sizeof(cint).} = set[DBusInterfaceSkeletonFlag] + +proc g_dbus_interface_skeleton_get_flags*(self: ptr DBusInterfaceSkeleton00): DBusInterfaceSkeletonFlags {. + importc: "g_dbus_interface_skeleton_get_flags", libprag.} + +proc getFlags*(self: DBusInterfaceSkeleton): DBusInterfaceSkeletonFlags = + g_dbus_interface_skeleton_get_flags(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc flags*(self: DBusInterfaceSkeleton): DBusInterfaceSkeletonFlags = + g_dbus_interface_skeleton_get_flags(cast[ptr DBusInterfaceSkeleton00](self.impl)) + +proc g_dbus_interface_skeleton_set_flags*(self: ptr DBusInterfaceSkeleton00; flags: DBusInterfaceSkeletonFlags) {. + importc: "g_dbus_interface_skeleton_set_flags", libprag.} + +proc setFlags*(self: DBusInterfaceSkeleton; flags: DBusInterfaceSkeletonFlags) = + g_dbus_interface_skeleton_set_flags(cast[ptr DBusInterfaceSkeleton00](self.impl), flags) + +proc `flags=`*(self: DBusInterfaceSkeleton; flags: DBusInterfaceSkeletonFlags) = + g_dbus_interface_skeleton_set_flags(cast[ptr DBusInterfaceSkeleton00](self.impl), flags) + +type + DBusInterfaceSkeletonClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getInfo*: proc(`interface`: ptr DBusInterfaceSkeleton00): ptr DBusInterfaceInfo00 {.cdecl.} + getVtable*: pointer + getProperties*: proc(`interface`: ptr DBusInterfaceSkeleton00): ptr glib.Variant00 {.cdecl.} + flush*: proc(`interface`: ptr DBusInterfaceSkeleton00) {.cdecl.} + vfuncPadding*: array[8, pointer] + gAuthorizeMethod*: proc(`interface`: ptr DBusInterfaceSkeleton00; invocation: ptr DBusMethodInvocation00): gboolean {.cdecl.} + signalPadding*: array[8, pointer] + DBusInterfaceSkeletonClass* = ref object + impl*: ptr DBusInterfaceSkeletonClass00 + +type + DBusInterfaceVTable00* {.pure.} = object + methodCall*: DBusInterfaceMethodCallFunc + getProperty*: DBusInterfaceGetPropertyFunc + setProperty*: DBusInterfaceSetPropertyFunc + padding*: array[8, pointer] + DBusInterfaceVTable* = ref object + impl*: ptr DBusInterfaceVTable00 + +type + DBusMenuModel* = ref object of MenuModel + DBusMenuModel00* = object of MenuModel00 + +proc g_dbus_menu_model_get*(connection: ptr DBusConnection00; busName: cstring; + objectPath: cstring): ptr DBusMenuModel00 {. + importc: "g_dbus_menu_model_get", libprag.} + +proc get*(connection: DBusConnection; busName: string; objectPath: string): DBusMenuModel = + let gobj = g_dbus_menu_model_get(cast[ptr DBusConnection00](connection.impl), cstring(busName), cstring(objectPath)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusMenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DBusMessageFilterFunction* = proc (connection: ptr DBusConnection00; message: ptr DBusMessage00; + incoming: gboolean; userData: pointer): ptr DBusMessage00 {.cdecl.} + +proc g_dbus_connection_add_filter*(self: ptr DBusConnection00; filterFunction: DBusMessageFilterFunction; + userData: pointer; userDataFreeFunc: DestroyNotify): uint32 {. + importc: "g_dbus_connection_add_filter", libprag.} + +proc addFilter*(self: DBusConnection; filterFunction: DBusMessageFilterFunction; + userData: pointer; userDataFreeFunc: DestroyNotify): int = + int(g_dbus_connection_add_filter(cast[ptr DBusConnection00](self.impl), filterFunction, userData, userDataFreeFunc)) + +type + DBusNodeInfo00* {.pure.} = object + refCount*: int32 + path*: cstring + interfaces*: ptr DBusInterfaceInfo00Array + nodes*: ptr DBusNodeInfo00Array + annotations*: ptr DBusAnnotationInfo00Array + DBusNodeInfo* = ref object + impl*: ptr DBusNodeInfo00 + +proc g_dbus_node_info_new_for_xml*(xmlData: cstring): ptr DBusNodeInfo00 {. + importc: "g_dbus_node_info_new_for_xml", libprag.} + +proc newDBusNodeInfoForXml*(xmlData: string): DBusNodeInfo = + new(result) + result.impl = g_dbus_node_info_new_for_xml(cstring(xmlData)) + +proc initDBusNodeInfoForXml*[T](result: var T; xmlData: string) = + assert(result is DBusNodeInfo) + new(result) + result.impl = g_dbus_node_info_new_for_xml(cstring(xmlData)) + +proc g_dbus_node_info_generate_xml*(self: ptr DBusNodeInfo00; indent: uint32; stringBuilder: var glib.String00) {. + importc: "g_dbus_node_info_generate_xml", libprag.} + +proc generateXml*(self: ptr DBusNodeInfo00; indent: uint32; stringBuilder: var glib.String00) {. + importc: "g_dbus_node_info_generate_xml", libprag.} + +proc g_dbus_node_info_lookup_interface*(self: ptr DBusNodeInfo00; name: cstring): ptr DBusInterfaceInfo00 {. + importc: "g_dbus_node_info_lookup_interface", libprag.} + +proc lookupInterface*(self: DBusNodeInfo; name: string): DBusInterfaceInfo = + new(result) + result.impl = g_dbus_node_info_lookup_interface(cast[ptr DBusNodeInfo00](self.impl), cstring(name)) + +proc g_dbus_node_info_ref*(self: ptr DBusNodeInfo00): ptr DBusNodeInfo00 {. + importc: "g_dbus_node_info_ref", libprag.} + +proc `ref`*(self: DBusNodeInfo): DBusNodeInfo = + new(result) + result.impl = g_dbus_node_info_ref(cast[ptr DBusNodeInfo00](self.impl)) + +proc g_dbus_node_info_unref*(self: ptr DBusNodeInfo00) {. + importc: "g_dbus_node_info_unref", libprag.} + +proc unref*(self: DBusNodeInfo) = + g_dbus_node_info_unref(cast[ptr DBusNodeInfo00](self.impl)) + +type + DBusObjectIface00* {.pure.} = object + parentIface*: gobject.TypeInterface00 + getObjectPath*: proc(`object`: ptr DBusObject00): cstring {.cdecl.} + getInterfaces*: proc(`object`: ptr DBusObject00): ptr pointer {.cdecl.} + getInterface*: proc(`object`: ptr DBusObject00; interfaceName: cstring): ptr DBusInterface00 {.cdecl.} + interfaceAdded*: proc(`object`: ptr DBusObject00; `interface`: ptr DBusInterface00) {.cdecl.} + interfaceRemoved*: proc(`object`: ptr DBusObject00; `interface`: ptr DBusInterface00) {.cdecl.} + DBusObjectIface* = ref object + impl*: ptr DBusObjectIface00 + +type + DBusObjectManager00* {.pure.} = object + DBusObjectManager* = ref object + impl*: ptr DBusObjectManager00 + +proc g_dbus_object_manager_get_interface*(self: ptr DBusObjectManager00; objectPath: cstring; + interfaceName: cstring): ptr DBusInterface00 {. + importc: "g_dbus_object_manager_get_interface", libprag.} + +proc getInterface*(self: DBusObjectManager; objectPath: string; interfaceName: string): DBusInterface = + new(result) + result.impl = g_dbus_object_manager_get_interface(cast[ptr DBusObjectManager00](self.impl), cstring(objectPath), cstring(interfaceName)) + +proc g_dbus_object_manager_get_object*(self: ptr DBusObjectManager00; objectPath: cstring): ptr DBusObject00 {. + importc: "g_dbus_object_manager_get_object", libprag.} + +proc getObject*(self: DBusObjectManager; objectPath: string): DBusObject = + new(result) + result.impl = g_dbus_object_manager_get_object(cast[ptr DBusObjectManager00](self.impl), cstring(objectPath)) + +proc g_dbus_object_manager_get_object_path*(self: ptr DBusObjectManager00): cstring {. + importc: "g_dbus_object_manager_get_object_path", libprag.} + +proc getObjectPath*(self: DBusObjectManager): string = + let resul0 = g_dbus_object_manager_get_object_path(cast[ptr DBusObjectManager00](self.impl)) + result = $resul0 + +proc objectPath*(self: DBusObjectManager): string = + let resul0 = g_dbus_object_manager_get_object_path(cast[ptr DBusObjectManager00](self.impl)) + result = $resul0 + +proc g_dbus_object_manager_get_objects*(self: ptr DBusObjectManager00): ptr pointer {. + importc: "g_dbus_object_manager_get_objects", libprag.} + +proc getObjects*(self: DBusObjectManager): ptr pointer = + g_dbus_object_manager_get_objects(cast[ptr DBusObjectManager00](self.impl)) + +proc objects*(self: DBusObjectManager): ptr pointer = + g_dbus_object_manager_get_objects(cast[ptr DBusObjectManager00](self.impl)) + +type + DBusObjectManagerClientPrivate00* {.pure.} = object + DBusObjectManagerClientPrivate* = ref object + impl*: ptr DBusObjectManagerClientPrivate00 + +type + DBusObjectProxyPrivate00* {.pure.} = object + DBusObjectProxyPrivate* = ref object + impl*: ptr DBusObjectProxyPrivate00 + +type + DBusObjectProxy* = ref object of gobject.Object + DBusObjectProxy00* = object of gobject.Object00 + priv1: ptr DBusObjectProxyPrivate00 + +proc g_dbus_object_proxy_new*(connection: ptr DBusConnection00; objectPath: cstring): ptr DBusObjectProxy00 {. + importc: "g_dbus_object_proxy_new", libprag.} + +proc newDBusObjectProxy*(connection: DBusConnection; objectPath: string): DBusObjectProxy = + new(result, finalizeGObject) + result.impl = g_dbus_object_proxy_new(cast[ptr DBusConnection00](connection.impl), cstring(objectPath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusObjectProxy*[T](result: var T; connection: DBusConnection; objectPath: string) = + assert(result is DBusObjectProxy) + new(result, finalizeGObject) + result.impl = g_dbus_object_proxy_new(cast[ptr DBusConnection00](connection.impl), cstring(objectPath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_object_proxy_get_connection*(self: ptr DBusObjectProxy00): ptr DBusConnection00 {. + importc: "g_dbus_object_proxy_get_connection", libprag.} + +proc getConnection*(self: DBusObjectProxy): DBusConnection = + let gobj = g_dbus_object_proxy_get_connection(cast[ptr DBusObjectProxy00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc connection*(self: DBusObjectProxy): DBusConnection = + let gobj = g_dbus_object_proxy_get_connection(cast[ptr DBusObjectProxy00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DBusProxyPrivate00* {.pure.} = object + DBusProxyPrivate* = ref object + impl*: ptr DBusProxyPrivate00 + +type + DBusProxy* = ref object of gobject.Object + DBusProxy00* = object of gobject.Object00 + priv1: ptr DBusProxyPrivate00 + +proc scGPropertiesChanged*(self: DBusProxy; p: proc (self: ptr gobject.Object00; changedProperties: glib.Variant00; invalidatedProperties: cstringArray; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "g-properties-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scGSignal*(self: DBusProxy; p: proc (self: ptr gobject.Object00; senderName: cstring; signalName: cstring; parameters: glib.Variant00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "g-signal", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_dbus_proxy_new_finish*(res: ptr AsyncResult00): ptr DBusProxy00 {. + importc: "g_dbus_proxy_new_finish", libprag.} + +proc newDBusProxyFinish*(res: AsyncResult): DBusProxy = + new(result, finalizeGObject) + result.impl = g_dbus_proxy_new_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusProxyFinish*[T](result: var T; res: AsyncResult) = + assert(result is DBusProxy) + new(result, finalizeGObject) + result.impl = g_dbus_proxy_new_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_proxy_new_for_bus_finish*(res: ptr AsyncResult00): ptr DBusProxy00 {. + importc: "g_dbus_proxy_new_for_bus_finish", libprag.} + +proc newDBusProxyForBusFinish*(res: AsyncResult): DBusProxy = + new(result, finalizeGObject) + result.impl = g_dbus_proxy_new_for_bus_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusProxyForBusFinish*[T](result: var T; res: AsyncResult) = + assert(result is DBusProxy) + new(result, finalizeGObject) + result.impl = g_dbus_proxy_new_for_bus_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_proxy_call*(self: ptr DBusProxy00; methodName: cstring; parameters: ptr glib.Variant00; + flags: DBusCallFlags; timeoutMsec: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_proxy_call", libprag.} + +proc call*(self: DBusProxy; methodName: string; parameters: glib.Variant; + flags: DBusCallFlags; timeoutMsec: int; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_dbus_proxy_call(cast[ptr DBusProxy00](self.impl), cstring(methodName), cast[ptr glib.Variant00](parameters.impl), flags, int32(timeoutMsec), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_proxy_call_finish*(self: ptr DBusProxy00; res: ptr AsyncResult00): ptr glib.Variant00 {. + importc: "g_dbus_proxy_call_finish", libprag.} + +proc callFinish*(self: DBusProxy; res: AsyncResult): glib.Variant = + new(result) + result.impl = g_dbus_proxy_call_finish(cast[ptr DBusProxy00](self.impl), cast[ptr AsyncResult00](res.impl)) + +proc g_dbus_proxy_call_sync*(self: ptr DBusProxy00; methodName: cstring; parameters: ptr glib.Variant00; + flags: DBusCallFlags; timeoutMsec: int32; cancellable: ptr Cancellable00): ptr glib.Variant00 {. + importc: "g_dbus_proxy_call_sync", libprag.} + +proc callSync*(self: DBusProxy; methodName: string; parameters: glib.Variant; + flags: DBusCallFlags; timeoutMsec: int; cancellable: Cancellable): glib.Variant = + new(result) + result.impl = g_dbus_proxy_call_sync(cast[ptr DBusProxy00](self.impl), cstring(methodName), cast[ptr glib.Variant00](parameters.impl), flags, int32(timeoutMsec), cast[ptr Cancellable00](cancellable.impl)) + +proc g_dbus_proxy_call_with_unix_fd_list*(self: ptr DBusProxy00; methodName: cstring; parameters: ptr glib.Variant00; + flags: DBusCallFlags; timeoutMsec: int32; fdList: ptr UnixFDList00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_proxy_call_with_unix_fd_list", libprag.} + +proc callWithUnixFdList*(self: DBusProxy; methodName: string; parameters: glib.Variant; + flags: DBusCallFlags; timeoutMsec: int; fdList: UnixFDList; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_dbus_proxy_call_with_unix_fd_list(cast[ptr DBusProxy00](self.impl), cstring(methodName), cast[ptr glib.Variant00](parameters.impl), flags, int32(timeoutMsec), cast[ptr UnixFDList00](fdList.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_proxy_call_with_unix_fd_list_finish*(self: ptr DBusProxy00; outFdList: var ptr UnixFDList00; + res: ptr AsyncResult00): ptr glib.Variant00 {. + importc: "g_dbus_proxy_call_with_unix_fd_list_finish", libprag.} + +proc callWithUnixFdListFinish*(self: ptr DBusProxy00; outFdList: var ptr UnixFDList00; + res: ptr AsyncResult00): ptr glib.Variant00 {. + importc: "g_dbus_proxy_call_with_unix_fd_list_finish", libprag.} + +proc g_dbus_proxy_call_with_unix_fd_list_sync*(self: ptr DBusProxy00; methodName: cstring; parameters: ptr glib.Variant00; + flags: DBusCallFlags; timeoutMsec: int32; fdList: ptr UnixFDList00; outFdList: var ptr UnixFDList00; + cancellable: ptr Cancellable00): ptr glib.Variant00 {. + importc: "g_dbus_proxy_call_with_unix_fd_list_sync", libprag.} + +proc callWithUnixFdListSync*(self: ptr DBusProxy00; methodName: cstring; parameters: ptr glib.Variant00; + flags: DBusCallFlags; timeoutMsec: int32; fdList: ptr UnixFDList00; outFdList: var ptr UnixFDList00; + cancellable: ptr Cancellable00): ptr glib.Variant00 {. + importc: "g_dbus_proxy_call_with_unix_fd_list_sync", libprag.} + +proc g_dbus_proxy_get_cached_property*(self: ptr DBusProxy00; propertyName: cstring): ptr glib.Variant00 {. + importc: "g_dbus_proxy_get_cached_property", libprag.} + +proc getCachedProperty*(self: DBusProxy; propertyName: string): glib.Variant = + new(result) + result.impl = g_dbus_proxy_get_cached_property(cast[ptr DBusProxy00](self.impl), cstring(propertyName)) + +proc cachedProperty*(self: DBusProxy; propertyName: string): glib.Variant = + new(result) + result.impl = g_dbus_proxy_get_cached_property(cast[ptr DBusProxy00](self.impl), cstring(propertyName)) + +proc g_dbus_proxy_get_cached_property_names*(self: ptr DBusProxy00): cstringArray {. + importc: "g_dbus_proxy_get_cached_property_names", libprag.} + +proc getCachedPropertyNames*(self: DBusProxy): cstringArray = + g_dbus_proxy_get_cached_property_names(cast[ptr DBusProxy00](self.impl)) + +proc cachedPropertyNames*(self: DBusProxy): cstringArray = + g_dbus_proxy_get_cached_property_names(cast[ptr DBusProxy00](self.impl)) + +proc g_dbus_proxy_get_connection*(self: ptr DBusProxy00): ptr DBusConnection00 {. + importc: "g_dbus_proxy_get_connection", libprag.} + +proc getConnection*(self: DBusProxy): DBusConnection = + let gobj = g_dbus_proxy_get_connection(cast[ptr DBusProxy00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc connection*(self: DBusProxy): DBusConnection = + let gobj = g_dbus_proxy_get_connection(cast[ptr DBusProxy00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_proxy_get_default_timeout*(self: ptr DBusProxy00): int32 {. + importc: "g_dbus_proxy_get_default_timeout", libprag.} + +proc getDefaultTimeout*(self: DBusProxy): int = + int(g_dbus_proxy_get_default_timeout(cast[ptr DBusProxy00](self.impl))) + +proc defaultTimeout*(self: DBusProxy): int = + int(g_dbus_proxy_get_default_timeout(cast[ptr DBusProxy00](self.impl))) + +proc g_dbus_proxy_get_interface_info*(self: ptr DBusProxy00): ptr DBusInterfaceInfo00 {. + importc: "g_dbus_proxy_get_interface_info", libprag.} + +proc getInterfaceInfo*(self: DBusProxy): DBusInterfaceInfo = + new(result) + result.impl = g_dbus_proxy_get_interface_info(cast[ptr DBusProxy00](self.impl)) + +proc interfaceInfo*(self: DBusProxy): DBusInterfaceInfo = + new(result) + result.impl = g_dbus_proxy_get_interface_info(cast[ptr DBusProxy00](self.impl)) + +proc g_dbus_proxy_get_interface_name*(self: ptr DBusProxy00): cstring {. + importc: "g_dbus_proxy_get_interface_name", libprag.} + +proc getInterfaceName*(self: DBusProxy): string = + let resul0 = g_dbus_proxy_get_interface_name(cast[ptr DBusProxy00](self.impl)) + result = $resul0 + +proc interfaceName*(self: DBusProxy): string = + let resul0 = g_dbus_proxy_get_interface_name(cast[ptr DBusProxy00](self.impl)) + result = $resul0 + +proc g_dbus_proxy_get_name*(self: ptr DBusProxy00): cstring {. + importc: "g_dbus_proxy_get_name", libprag.} + +proc getName*(self: DBusProxy): string = + let resul0 = g_dbus_proxy_get_name(cast[ptr DBusProxy00](self.impl)) + result = $resul0 + +proc name*(self: DBusProxy): string = + let resul0 = g_dbus_proxy_get_name(cast[ptr DBusProxy00](self.impl)) + result = $resul0 + +proc g_dbus_proxy_get_name_owner*(self: ptr DBusProxy00): cstring {. + importc: "g_dbus_proxy_get_name_owner", libprag.} + +proc getNameOwner*(self: DBusProxy): string = + let resul0 = g_dbus_proxy_get_name_owner(cast[ptr DBusProxy00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc nameOwner*(self: DBusProxy): string = + let resul0 = g_dbus_proxy_get_name_owner(cast[ptr DBusProxy00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_dbus_proxy_get_object_path*(self: ptr DBusProxy00): cstring {. + importc: "g_dbus_proxy_get_object_path", libprag.} + +proc getObjectPath*(self: DBusProxy): string = + let resul0 = g_dbus_proxy_get_object_path(cast[ptr DBusProxy00](self.impl)) + result = $resul0 + +proc objectPath*(self: DBusProxy): string = + let resul0 = g_dbus_proxy_get_object_path(cast[ptr DBusProxy00](self.impl)) + result = $resul0 + +proc g_dbus_proxy_set_cached_property*(self: ptr DBusProxy00; propertyName: cstring; value: ptr glib.Variant00) {. + importc: "g_dbus_proxy_set_cached_property", libprag.} + +proc setCachedProperty*(self: DBusProxy; propertyName: string; value: glib.Variant) = + g_dbus_proxy_set_cached_property(cast[ptr DBusProxy00](self.impl), cstring(propertyName), cast[ptr glib.Variant00](value.impl)) + +proc g_dbus_proxy_set_default_timeout*(self: ptr DBusProxy00; timeoutMsec: int32) {. + importc: "g_dbus_proxy_set_default_timeout", libprag.} + +proc setDefaultTimeout*(self: DBusProxy; timeoutMsec: int) = + g_dbus_proxy_set_default_timeout(cast[ptr DBusProxy00](self.impl), int32(timeoutMsec)) + +proc `defaultTimeout=`*(self: DBusProxy; timeoutMsec: int) = + g_dbus_proxy_set_default_timeout(cast[ptr DBusProxy00](self.impl), int32(timeoutMsec)) + +proc g_dbus_proxy_set_interface_info*(self: ptr DBusProxy00; info: ptr DBusInterfaceInfo00) {. + importc: "g_dbus_proxy_set_interface_info", libprag.} + +proc setInterfaceInfo*(self: DBusProxy; info: DBusInterfaceInfo) = + g_dbus_proxy_set_interface_info(cast[ptr DBusProxy00](self.impl), cast[ptr DBusInterfaceInfo00](info.impl)) + +proc `interfaceInfo=`*(self: DBusProxy; info: DBusInterfaceInfo) = + g_dbus_proxy_set_interface_info(cast[ptr DBusProxy00](self.impl), cast[ptr DBusInterfaceInfo00](info.impl)) + +type + DBusObjectManagerClient* = ref object of gobject.Object + DBusObjectManagerClient00* = object of gobject.Object00 + priv1: ptr DBusObjectManagerClientPrivate00 + +proc scInterfaceProxyPropertiesChanged*(self: DBusObjectManagerClient; p: proc (self: ptr gobject.Object00; objectProxy: DBusObjectProxy00; interfaceProxy: DBusProxy00; + changedProperties: glib.Variant00; invalidatedProperties: cstringArray; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "interface-proxy-properties-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInterfaceProxySignal*(self: DBusObjectManagerClient; p: proc (self: ptr gobject.Object00; objectProxy: DBusObjectProxy00; interfaceProxy: DBusProxy00; + senderName: cstring; signalName: cstring; parameters: glib.Variant00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "interface-proxy-signal", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_dbus_object_manager_client_new_finish*(res: ptr AsyncResult00): ptr DBusObjectManagerClient00 {. + importc: "g_dbus_object_manager_client_new_finish", libprag.} + +proc newDBusObjectManagerClientFinish*(res: AsyncResult): DBusObjectManagerClient = + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_client_new_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusObjectManagerClientFinish*[T](result: var T; res: AsyncResult) = + assert(result is DBusObjectManagerClient) + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_client_new_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_object_manager_client_new_for_bus_finish*(res: ptr AsyncResult00): ptr DBusObjectManagerClient00 {. + importc: "g_dbus_object_manager_client_new_for_bus_finish", libprag.} + +proc newDBusObjectManagerClientForBusFinish*(res: AsyncResult): DBusObjectManagerClient = + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_client_new_for_bus_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusObjectManagerClientForBusFinish*[T](result: var T; res: AsyncResult) = + assert(result is DBusObjectManagerClient) + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_client_new_for_bus_finish(cast[ptr AsyncResult00](res.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_object_manager_client_get_connection*(self: ptr DBusObjectManagerClient00): ptr DBusConnection00 {. + importc: "g_dbus_object_manager_client_get_connection", libprag.} + +proc getConnection*(self: DBusObjectManagerClient): DBusConnection = + let gobj = g_dbus_object_manager_client_get_connection(cast[ptr DBusObjectManagerClient00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc connection*(self: DBusObjectManagerClient): DBusConnection = + let gobj = g_dbus_object_manager_client_get_connection(cast[ptr DBusObjectManagerClient00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_object_manager_client_get_name*(self: ptr DBusObjectManagerClient00): cstring {. + importc: "g_dbus_object_manager_client_get_name", libprag.} + +proc getName*(self: DBusObjectManagerClient): string = + let resul0 = g_dbus_object_manager_client_get_name(cast[ptr DBusObjectManagerClient00](self.impl)) + result = $resul0 + +proc name*(self: DBusObjectManagerClient): string = + let resul0 = g_dbus_object_manager_client_get_name(cast[ptr DBusObjectManagerClient00](self.impl)) + result = $resul0 + +proc g_dbus_object_manager_client_get_name_owner*(self: ptr DBusObjectManagerClient00): cstring {. + importc: "g_dbus_object_manager_client_get_name_owner", libprag.} + +proc getNameOwner*(self: DBusObjectManagerClient): string = + let resul0 = g_dbus_object_manager_client_get_name_owner(cast[ptr DBusObjectManagerClient00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc nameOwner*(self: DBusObjectManagerClient): string = + let resul0 = g_dbus_object_manager_client_get_name_owner(cast[ptr DBusObjectManagerClient00](self.impl)) + result = $resul0 + cogfree(resul0) + +type + DBusProxyFlag* {.size: sizeof(cint), pure.} = enum + doNotLoadProperties = 1 + doNotConnectSignals = 2 + doNotAutoStart = 3 + getInvalidatedProperties = 4 + doNotAutoStartAtConstruction = 5 + + DBusProxyFlags* {.size: sizeof(cint).} = set[DBusProxyFlag] + +proc g_dbus_proxy_new_for_bus_sync*(busType: BusType; flags: DBusProxyFlags; info: ptr DBusInterfaceInfo00; + name: cstring; objectPath: cstring; interfaceName: cstring; cancellable: ptr Cancellable00): ptr DBusProxy00 {. + importc: "g_dbus_proxy_new_for_bus_sync", libprag.} + +proc newDBusProxyForBusSync*(busType: BusType; flags: DBusProxyFlags; info: DBusInterfaceInfo; + name: string; objectPath: string; interfaceName: string; cancellable: Cancellable): DBusProxy = + new(result, finalizeGObject) + result.impl = g_dbus_proxy_new_for_bus_sync(busType, flags, cast[ptr DBusInterfaceInfo00](info.impl), cstring(name), cstring(objectPath), cstring(interfaceName), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusProxyForBusSync*[T](result: var T; busType: BusType; flags: DBusProxyFlags; info: DBusInterfaceInfo; + name: string; objectPath: string; interfaceName: string; cancellable: Cancellable) = + assert(result is DBusProxy) + new(result, finalizeGObject) + result.impl = g_dbus_proxy_new_for_bus_sync(busType, flags, cast[ptr DBusInterfaceInfo00](info.impl), cstring(name), cstring(objectPath), cstring(interfaceName), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_proxy_new_sync*(connection: ptr DBusConnection00; flags: DBusProxyFlags; + info: ptr DBusInterfaceInfo00; name: cstring; objectPath: cstring; interfaceName: cstring; + cancellable: ptr Cancellable00): ptr DBusProxy00 {. + importc: "g_dbus_proxy_new_sync", libprag.} + +proc newDBusProxySync*(connection: DBusConnection; flags: DBusProxyFlags; + info: DBusInterfaceInfo; name: string; objectPath: string; interfaceName: string; cancellable: Cancellable): DBusProxy = + new(result, finalizeGObject) + result.impl = g_dbus_proxy_new_sync(cast[ptr DBusConnection00](connection.impl), flags, cast[ptr DBusInterfaceInfo00](info.impl), cstring(name), cstring(objectPath), cstring(interfaceName), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusProxySync*[T](result: var T; connection: DBusConnection; flags: DBusProxyFlags; + info: DBusInterfaceInfo; name: string; objectPath: string; interfaceName: string; cancellable: Cancellable) = + assert(result is DBusProxy) + new(result, finalizeGObject) + result.impl = g_dbus_proxy_new_sync(cast[ptr DBusConnection00](connection.impl), flags, cast[ptr DBusInterfaceInfo00](info.impl), cstring(name), cstring(objectPath), cstring(interfaceName), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_proxy_new*(connection: ptr DBusConnection00; flags: DBusProxyFlags; + info: ptr DBusInterfaceInfo00; name: cstring; objectPath: cstring; interfaceName: cstring; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_proxy_new", libprag.} + +proc new*(connection: DBusConnection; flags: DBusProxyFlags; + info: DBusInterfaceInfo; name: string; objectPath: string; interfaceName: string; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_dbus_proxy_new(cast[ptr DBusConnection00](connection.impl), flags, cast[ptr DBusInterfaceInfo00](info.impl), cstring(name), cstring(objectPath), cstring(interfaceName), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_proxy_new_for_bus*(busType: BusType; flags: DBusProxyFlags; info: ptr DBusInterfaceInfo00; + name: cstring; objectPath: cstring; interfaceName: cstring; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_proxy_new_for_bus", libprag.} + +proc newForBus*(busType: BusType; flags: DBusProxyFlags; info: DBusInterfaceInfo; + name: string; objectPath: string; interfaceName: string; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_dbus_proxy_new_for_bus(busType, flags, cast[ptr DBusInterfaceInfo00](info.impl), cstring(name), cstring(objectPath), cstring(interfaceName), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_proxy_get_flags*(self: ptr DBusProxy00): DBusProxyFlags {. + importc: "g_dbus_proxy_get_flags", libprag.} + +proc getFlags*(self: DBusProxy): DBusProxyFlags = + g_dbus_proxy_get_flags(cast[ptr DBusProxy00](self.impl)) + +proc flags*(self: DBusProxy): DBusProxyFlags = + g_dbus_proxy_get_flags(cast[ptr DBusProxy00](self.impl)) + +type + DBusObjectManagerClientFlag* {.size: sizeof(cint), pure.} = enum + doNotAutoStart = 1 + + DBusObjectManagerClientFlags* {.size: sizeof(cint).} = set[DBusObjectManagerClientFlag] + +proc g_dbus_object_manager_client_get_flags*(self: ptr DBusObjectManagerClient00): DBusObjectManagerClientFlags {. + importc: "g_dbus_object_manager_client_get_flags", libprag.} + +proc getFlags*(self: DBusObjectManagerClient): DBusObjectManagerClientFlags = + g_dbus_object_manager_client_get_flags(cast[ptr DBusObjectManagerClient00](self.impl)) + +proc flags*(self: DBusObjectManagerClient): DBusObjectManagerClientFlags = + g_dbus_object_manager_client_get_flags(cast[ptr DBusObjectManagerClient00](self.impl)) + +type + DBusObjectManagerClientClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + interfaceProxySignal*: proc(manager: ptr DBusObjectManagerClient00; objectProxy: ptr DBusObjectProxy00; + interfaceProxy: ptr DBusProxy00; senderName: cstring; signalName: cstring; + parameters: ptr glib.Variant00) {.cdecl.} + interfaceProxyPropertiesChanged*: proc(manager: ptr DBusObjectManagerClient00; objectProxy: ptr DBusObjectProxy00; + interfaceProxy: ptr DBusProxy00; changedProperties: ptr glib.Variant00; + invalidatedProperties: cstring) {.cdecl.} + padding*: array[8, pointer] + DBusObjectManagerClientClass* = ref object + impl*: ptr DBusObjectManagerClientClass00 + +type + DBusObjectManagerIface00* {.pure.} = object + parentIface*: gobject.TypeInterface00 + getObjectPath*: proc(manager: ptr DBusObjectManager00): cstring {.cdecl.} + getObjects*: proc(manager: ptr DBusObjectManager00): ptr pointer {.cdecl.} + getObject*: proc(manager: ptr DBusObjectManager00; objectPath: cstring): ptr DBusObject00 {.cdecl.} + getInterface*: proc(manager: ptr DBusObjectManager00; objectPath: cstring; + interfaceName: cstring): ptr DBusInterface00 {.cdecl.} + objectAdded*: proc(manager: ptr DBusObjectManager00; `object`: ptr DBusObject00) {.cdecl.} + objectRemoved*: proc(manager: ptr DBusObjectManager00; `object`: ptr DBusObject00) {.cdecl.} + interfaceAdded*: proc(manager: ptr DBusObjectManager00; `object`: ptr DBusObject00; + `interface`: ptr DBusInterface00) {.cdecl.} + interfaceRemoved*: proc(manager: ptr DBusObjectManager00; `object`: ptr DBusObject00; + `interface`: ptr DBusInterface00) {.cdecl.} + DBusObjectManagerIface* = ref object + impl*: ptr DBusObjectManagerIface00 + +type + DBusObjectManagerServerPrivate00* {.pure.} = object + DBusObjectManagerServerPrivate* = ref object + impl*: ptr DBusObjectManagerServerPrivate00 + +type + DBusObjectManagerServer* = ref object of gobject.Object + DBusObjectManagerServer00* = object of gobject.Object00 + priv1: ptr DBusObjectManagerServerPrivate00 + +proc g_dbus_object_manager_server_new*(objectPath: cstring): ptr DBusObjectManagerServer00 {. + importc: "g_dbus_object_manager_server_new", libprag.} + +proc newDBusObjectManagerServer*(objectPath: string): DBusObjectManagerServer = + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_server_new(cstring(objectPath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusObjectManagerServer*[T](result: var T; objectPath: string) = + assert(result is DBusObjectManagerServer) + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_server_new(cstring(objectPath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_object_manager_server_get_connection*(self: ptr DBusObjectManagerServer00): ptr DBusConnection00 {. + importc: "g_dbus_object_manager_server_get_connection", libprag.} + +proc getConnection*(self: DBusObjectManagerServer): DBusConnection = + let gobj = g_dbus_object_manager_server_get_connection(cast[ptr DBusObjectManagerServer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc connection*(self: DBusObjectManagerServer): DBusConnection = + let gobj = g_dbus_object_manager_server_get_connection(cast[ptr DBusObjectManagerServer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_object_manager_server_set_connection*(self: ptr DBusObjectManagerServer00; connection: ptr DBusConnection00) {. + importc: "g_dbus_object_manager_server_set_connection", libprag.} + +proc setConnection*(self: DBusObjectManagerServer; connection: DBusConnection) = + g_dbus_object_manager_server_set_connection(cast[ptr DBusObjectManagerServer00](self.impl), cast[ptr DBusConnection00](connection.impl)) + +proc `connection=`*(self: DBusObjectManagerServer; connection: DBusConnection) = + g_dbus_object_manager_server_set_connection(cast[ptr DBusObjectManagerServer00](self.impl), cast[ptr DBusConnection00](connection.impl)) + +proc g_dbus_object_manager_server_unexport*(self: ptr DBusObjectManagerServer00; objectPath: cstring): gboolean {. + importc: "g_dbus_object_manager_server_unexport", libprag.} + +proc unexport*(self: DBusObjectManagerServer; objectPath: string): bool = + toBool(g_dbus_object_manager_server_unexport(cast[ptr DBusObjectManagerServer00](self.impl), cstring(objectPath))) + +type + DBusObjectSkeletonPrivate00* {.pure.} = object + DBusObjectSkeletonPrivate* = ref object + impl*: ptr DBusObjectSkeletonPrivate00 + +type + DBusObjectSkeleton* = ref object of gobject.Object + DBusObjectSkeleton00* = object of gobject.Object00 + priv1: ptr DBusObjectSkeletonPrivate00 + +proc scAuthorizeMethod*(self: DBusObjectSkeleton; p: proc (self: ptr gobject.Object00; `interface`: DBusInterfaceSkeleton00; invocation: DBusMethodInvocation00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "authorize-method", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_dbus_object_skeleton_new*(objectPath: cstring): ptr DBusObjectSkeleton00 {. + importc: "g_dbus_object_skeleton_new", libprag.} + +proc newDBusObjectSkeleton*(objectPath: string): DBusObjectSkeleton = + new(result, finalizeGObject) + result.impl = g_dbus_object_skeleton_new(cstring(objectPath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusObjectSkeleton*[T](result: var T; objectPath: string) = + assert(result is DBusObjectSkeleton) + new(result, finalizeGObject) + result.impl = g_dbus_object_skeleton_new(cstring(objectPath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_object_skeleton_add_interface*(self: ptr DBusObjectSkeleton00; `interface`: ptr DBusInterfaceSkeleton00) {. + importc: "g_dbus_object_skeleton_add_interface", libprag.} + +proc addInterface*(self: DBusObjectSkeleton; `interface`: DBusInterfaceSkeleton) = + g_dbus_object_skeleton_add_interface(cast[ptr DBusObjectSkeleton00](self.impl), cast[ptr DBusInterfaceSkeleton00](`interface`.impl)) + +proc g_dbus_object_skeleton_flush*(self: ptr DBusObjectSkeleton00) {. + importc: "g_dbus_object_skeleton_flush", libprag.} + +proc flush*(self: DBusObjectSkeleton) = + g_dbus_object_skeleton_flush(cast[ptr DBusObjectSkeleton00](self.impl)) + +proc g_dbus_object_skeleton_remove_interface*(self: ptr DBusObjectSkeleton00; `interface`: ptr DBusInterfaceSkeleton00) {. + importc: "g_dbus_object_skeleton_remove_interface", libprag.} + +proc removeInterface*(self: DBusObjectSkeleton; `interface`: DBusInterfaceSkeleton) = + g_dbus_object_skeleton_remove_interface(cast[ptr DBusObjectSkeleton00](self.impl), cast[ptr DBusInterfaceSkeleton00](`interface`.impl)) + +proc g_dbus_object_skeleton_remove_interface_by_name*(self: ptr DBusObjectSkeleton00; interfaceName: cstring) {. + importc: "g_dbus_object_skeleton_remove_interface_by_name", libprag.} + +proc removeInterfaceByName*(self: DBusObjectSkeleton; interfaceName: string) = + g_dbus_object_skeleton_remove_interface_by_name(cast[ptr DBusObjectSkeleton00](self.impl), cstring(interfaceName)) + +proc g_dbus_object_skeleton_set_object_path*(self: ptr DBusObjectSkeleton00; objectPath: cstring) {. + importc: "g_dbus_object_skeleton_set_object_path", libprag.} + +proc setObjectPath*(self: DBusObjectSkeleton; objectPath: string) = + g_dbus_object_skeleton_set_object_path(cast[ptr DBusObjectSkeleton00](self.impl), cstring(objectPath)) + +proc `objectPath=`*(self: DBusObjectSkeleton; objectPath: string) = + g_dbus_object_skeleton_set_object_path(cast[ptr DBusObjectSkeleton00](self.impl), cstring(objectPath)) + +proc g_dbus_object_manager_server_export*(self: ptr DBusObjectManagerServer00; `object`: ptr DBusObjectSkeleton00) {. + importc: "g_dbus_object_manager_server_export", libprag.} + +proc `export`*(self: DBusObjectManagerServer; `object`: DBusObjectSkeleton) = + g_dbus_object_manager_server_export(cast[ptr DBusObjectManagerServer00](self.impl), cast[ptr DBusObjectSkeleton00](`object`.impl)) + +proc g_dbus_object_manager_server_export_uniquely*(self: ptr DBusObjectManagerServer00; `object`: ptr DBusObjectSkeleton00) {. + importc: "g_dbus_object_manager_server_export_uniquely", libprag.} + +proc exportUniquely*(self: DBusObjectManagerServer; `object`: DBusObjectSkeleton) = + g_dbus_object_manager_server_export_uniquely(cast[ptr DBusObjectManagerServer00](self.impl), cast[ptr DBusObjectSkeleton00](`object`.impl)) + +proc g_dbus_object_manager_server_is_exported*(self: ptr DBusObjectManagerServer00; `object`: ptr DBusObjectSkeleton00): gboolean {. + importc: "g_dbus_object_manager_server_is_exported", libprag.} + +proc isExported*(self: DBusObjectManagerServer; `object`: DBusObjectSkeleton): bool = + toBool(g_dbus_object_manager_server_is_exported(cast[ptr DBusObjectManagerServer00](self.impl), cast[ptr DBusObjectSkeleton00](`object`.impl))) + +type + DBusObjectManagerServerClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + padding*: array[8, pointer] + DBusObjectManagerServerClass* = ref object + impl*: ptr DBusObjectManagerServerClass00 + +type + DBusObjectProxyClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + padding*: array[8, pointer] + DBusObjectProxyClass* = ref object + impl*: ptr DBusObjectProxyClass00 + +type + DBusObjectSkeletonClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + authorizeMethod*: proc(`object`: ptr DBusObjectSkeleton00; `interface`: ptr DBusInterfaceSkeleton00; + invocation: ptr DBusMethodInvocation00): gboolean {.cdecl.} + padding*: array[8, pointer] + DBusObjectSkeletonClass* = ref object + impl*: ptr DBusObjectSkeletonClass00 + +type + DBusProxyClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gPropertiesChanged*: proc(proxy: ptr DBusProxy00; changedProperties: ptr glib.Variant00; + invalidatedProperties: cstring) {.cdecl.} + gSignal*: proc(proxy: ptr DBusProxy00; senderName: cstring; signalName: cstring; + parameters: ptr glib.Variant00) {.cdecl.} + padding*: array[32, pointer] + DBusProxyClass* = ref object + impl*: ptr DBusProxyClass00 + +type + DBusProxyTypeFunc* = proc (manager: ptr DBusObjectManagerClient00; objectPath: cstring; + interfaceName: cstring; userData: pointer): GType {.cdecl.} + +proc g_dbus_object_manager_client_new_for_bus_sync*(busType: BusType; flags: DBusObjectManagerClientFlags; + name: cstring; objectPath: cstring; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: ptr Cancellable00): ptr DBusObjectManagerClient00 {. + importc: "g_dbus_object_manager_client_new_for_bus_sync", libprag.} + +proc newDBusObjectManagerClientForBusSync*(busType: BusType; flags: DBusObjectManagerClientFlags; + name: string; objectPath: string; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: Cancellable): DBusObjectManagerClient = + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_client_new_for_bus_sync(busType, flags, cstring(name), cstring(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusObjectManagerClientForBusSync*[T](result: var T; busType: BusType; flags: DBusObjectManagerClientFlags; + name: string; objectPath: string; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: Cancellable) = + assert(result is DBusObjectManagerClient) + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_client_new_for_bus_sync(busType, flags, cstring(name), cstring(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_object_manager_client_new_sync*(connection: ptr DBusConnection00; flags: DBusObjectManagerClientFlags; + name: cstring; objectPath: cstring; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: ptr Cancellable00): ptr DBusObjectManagerClient00 {. + importc: "g_dbus_object_manager_client_new_sync", libprag.} + +proc newDBusObjectManagerClientSync*(connection: DBusConnection; flags: DBusObjectManagerClientFlags; + name: string; objectPath: string; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: Cancellable): DBusObjectManagerClient = + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_client_new_sync(cast[ptr DBusConnection00](connection.impl), flags, cstring(name), cstring(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusObjectManagerClientSync*[T](result: var T; connection: DBusConnection; flags: DBusObjectManagerClientFlags; + name: string; objectPath: string; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: Cancellable) = + assert(result is DBusObjectManagerClient) + new(result, finalizeGObject) + result.impl = g_dbus_object_manager_client_new_sync(cast[ptr DBusConnection00](connection.impl), flags, cstring(name), cstring(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_object_manager_client_new*(connection: ptr DBusConnection00; flags: DBusObjectManagerClientFlags; + name: cstring; objectPath: cstring; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_object_manager_client_new", libprag.} + +proc new*(connection: DBusConnection; flags: DBusObjectManagerClientFlags; + name: string; objectPath: string; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_dbus_object_manager_client_new(cast[ptr DBusConnection00](connection.impl), flags, cstring(name), cstring(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_object_manager_client_new_for_bus*(busType: BusType; flags: DBusObjectManagerClientFlags; + name: cstring; objectPath: cstring; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_object_manager_client_new_for_bus", libprag.} + +proc newForBus*(busType: BusType; flags: DBusObjectManagerClientFlags; + name: string; objectPath: string; getProxyTypeFunc: DBusProxyTypeFunc; getProxyTypeUserData: pointer; + getProxyTypeDestroyNotify: DestroyNotify; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_dbus_object_manager_client_new_for_bus(busType, flags, cstring(name), cstring(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +type + DBusServer* = ref object of gobject.Object + DBusServer00* = object of gobject.Object00 + +proc scNewConnection*(self: DBusServer; p: proc (self: ptr gobject.Object00; connection: DBusConnection00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "new-connection", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_dbus_server_get_client_address*(self: ptr DBusServer00): cstring {. + importc: "g_dbus_server_get_client_address", libprag.} + +proc getClientAddress*(self: DBusServer): string = + let resul0 = g_dbus_server_get_client_address(cast[ptr DBusServer00](self.impl)) + result = $resul0 + +proc clientAddress*(self: DBusServer): string = + let resul0 = g_dbus_server_get_client_address(cast[ptr DBusServer00](self.impl)) + result = $resul0 + +proc g_dbus_server_get_guid*(self: ptr DBusServer00): cstring {. + importc: "g_dbus_server_get_guid", libprag.} + +proc getGuid*(self: DBusServer): string = + let resul0 = g_dbus_server_get_guid(cast[ptr DBusServer00](self.impl)) + result = $resul0 + +proc guid*(self: DBusServer): string = + let resul0 = g_dbus_server_get_guid(cast[ptr DBusServer00](self.impl)) + result = $resul0 + +proc g_dbus_server_is_active*(self: ptr DBusServer00): gboolean {. + importc: "g_dbus_server_is_active", libprag.} + +proc isActive*(self: DBusServer): bool = + toBool(g_dbus_server_is_active(cast[ptr DBusServer00](self.impl))) + +proc g_dbus_server_start*(self: ptr DBusServer00) {. + importc: "g_dbus_server_start", libprag.} + +proc start*(self: DBusServer) = + g_dbus_server_start(cast[ptr DBusServer00](self.impl)) + +proc g_dbus_server_stop*(self: ptr DBusServer00) {. + importc: "g_dbus_server_stop", libprag.} + +proc stop*(self: DBusServer) = + g_dbus_server_stop(cast[ptr DBusServer00](self.impl)) + +type + DBusServerFlag* {.size: sizeof(cint), pure.} = enum + runInThread = 1 + authenticationAllowAnonymous = 2 + + DBusServerFlags* {.size: sizeof(cint).} = set[DBusServerFlag] + +proc g_dbus_server_new_sync*(address: cstring; flags: DBusServerFlags; guid: cstring; + observer: ptr DBusAuthObserver00; cancellable: ptr Cancellable00): ptr DBusServer00 {. + importc: "g_dbus_server_new_sync", libprag.} + +proc newDBusServerSync*(address: string; flags: DBusServerFlags; guid: string; + observer: DBusAuthObserver; cancellable: Cancellable): DBusServer = + new(result, finalizeGObject) + result.impl = g_dbus_server_new_sync(cstring(address), flags, cstring(guid), cast[ptr DBusAuthObserver00](observer.impl), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDBusServerSync*[T](result: var T; address: string; flags: DBusServerFlags; guid: string; + observer: DBusAuthObserver; cancellable: Cancellable) = + assert(result is DBusServer) + new(result, finalizeGObject) + result.impl = g_dbus_server_new_sync(cstring(address), flags, cstring(guid), cast[ptr DBusAuthObserver00](observer.impl), cast[ptr Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dbus_server_get_flags*(self: ptr DBusServer00): DBusServerFlags {. + importc: "g_dbus_server_get_flags", libprag.} + +proc getFlags*(self: DBusServer): DBusServerFlags = + g_dbus_server_get_flags(cast[ptr DBusServer00](self.impl)) + +proc flags*(self: DBusServer): DBusServerFlags = + g_dbus_server_get_flags(cast[ptr DBusServer00](self.impl)) + +type + DBusSignalCallback* = proc (connection: ptr DBusConnection00; senderName: cstring; + objectPath: cstring; interfaceName: cstring; signalName: cstring; parameters: ptr glib.Variant00; + userData: pointer) {.cdecl.} + +proc g_dbus_connection_signal_subscribe*(self: ptr DBusConnection00; sender: cstring; interfaceName: cstring; + member: cstring; objectPath: cstring; arg0: cstring; flags: DBusSignalFlags; + callback: DBusSignalCallback; userData: pointer; userDataFreeFunc: DestroyNotify): uint32 {. + importc: "g_dbus_connection_signal_subscribe", libprag.} + +proc signalSubscribe*(self: DBusConnection; sender: string; interfaceName: string; + member: string; objectPath: string; arg0: string; flags: DBusSignalFlags; callback: DBusSignalCallback; + userData: pointer; userDataFreeFunc: DestroyNotify): int = + int(g_dbus_connection_signal_subscribe(cast[ptr DBusConnection00](self.impl), cstring(sender), cstring(interfaceName), cstring(member), cstring(objectPath), cstring(arg0), flags, callback, userData, userDataFreeFunc)) + +type + DBusSubtreeDispatchFunc* = proc (connection: ptr DBusConnection00; sender: cstring; + objectPath: cstring; interfaceName: cstring; node: cstring; outUserData: pointer; userData: pointer): ptr DBusInterfaceVTable00 {.cdecl.} + +type + DBusSubtreeFlag* {.size: sizeof(cint), pure.} = enum + dispatchToUnenumeratedNodes = 1 + + DBusSubtreeFlags* {.size: sizeof(cint).} = set[DBusSubtreeFlag] + +type + DBusSubtreeIntrospectFunc* = proc (connection: ptr DBusConnection00; sender: cstring; + objectPath: cstring; node: cstring; userData: pointer): ptr DBusInterfaceInfo00 {.cdecl.} + +type + DBusSubtreeVTable00* {.pure.} = object + enumerate*: pointer + introspect*: DBusSubtreeIntrospectFunc + dispatch*: DBusSubtreeDispatchFunc + padding*: array[8, pointer] + DBusSubtreeVTable* = ref object + impl*: ptr DBusSubtreeVTable00 + +proc g_dbus_connection_register_subtree*(self: ptr DBusConnection00; objectPath: cstring; vtable: ptr DBusSubtreeVTable00; + flags: DBusSubtreeFlags; userData: pointer; userDataFreeFunc: DestroyNotify): uint32 {. + importc: "g_dbus_connection_register_subtree", libprag.} + +proc registerSubtree*(self: DBusConnection; objectPath: string; vtable: DBusSubtreeVTable; + flags: DBusSubtreeFlags; userData: pointer; userDataFreeFunc: DestroyNotify): int = + int(g_dbus_connection_register_subtree(cast[ptr DBusConnection00](self.impl), cstring(objectPath), cast[ptr DBusSubtreeVTable00](vtable.impl), flags, userData, userDataFreeFunc)) + +const DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME* = "gio-desktop-app-info-lookup" + +type + DataInputStreamPrivate00* {.pure.} = object + DataInputStreamPrivate* = ref object + impl*: ptr DataInputStreamPrivate00 + +type + DataInputStream* = ref object of BufferedInputStream + DataInputStream00* = object of BufferedInputStream00 + priv4: ptr DataInputStreamPrivate00 + +proc g_data_input_stream_new*(baseStream: ptr InputStream00): ptr DataInputStream00 {. + importc: "g_data_input_stream_new", libprag.} + +proc newDataInputStream*(baseStream: InputStream): DataInputStream = + new(result, finalizeGObject) + result.impl = g_data_input_stream_new(cast[ptr InputStream00](baseStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDataInputStream*[T](result: var T; baseStream: InputStream) = + assert(result is DataInputStream) + new(result, finalizeGObject) + result.impl = g_data_input_stream_new(cast[ptr InputStream00](baseStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_data_input_stream_read_byte*(self: ptr DataInputStream00; cancellable: ptr Cancellable00): uint8 {. + importc: "g_data_input_stream_read_byte", libprag.} + +proc readByte*(self: DataInputStream; cancellable: Cancellable): uint8 = + g_data_input_stream_read_byte(cast[ptr DataInputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_data_input_stream_read_int16*(self: ptr DataInputStream00; cancellable: ptr Cancellable00): int16 {. + importc: "g_data_input_stream_read_int16", libprag.} + +proc readInt16*(self: DataInputStream; cancellable: Cancellable): int16 = + g_data_input_stream_read_int16(cast[ptr DataInputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_data_input_stream_read_int32*(self: ptr DataInputStream00; cancellable: ptr Cancellable00): int32 {. + importc: "g_data_input_stream_read_int32", libprag.} + +proc readInt32*(self: DataInputStream; cancellable: Cancellable): int = + int(g_data_input_stream_read_int32(cast[ptr DataInputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_input_stream_read_int64*(self: ptr DataInputStream00; cancellable: ptr Cancellable00): int64 {. + importc: "g_data_input_stream_read_int64", libprag.} + +proc readInt64*(self: DataInputStream; cancellable: Cancellable): int64 = + g_data_input_stream_read_int64(cast[ptr DataInputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_data_input_stream_read_line*(self: ptr DataInputStream00; length: var uint64; cancellable: ptr Cancellable00): uint8Array {. + importc: "g_data_input_stream_read_line", libprag.} + +proc readLine*(self: DataInputStream; length: var uint64; cancellable: Cancellable): uint8Array = + g_data_input_stream_read_line(cast[ptr DataInputStream00](self.impl), length, cast[ptr Cancellable00](cancellable.impl)) + +proc g_data_input_stream_read_line_async*(self: ptr DataInputStream00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_data_input_stream_read_line_async", libprag.} + +proc readLineAsync*(self: DataInputStream; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_data_input_stream_read_line_async(cast[ptr DataInputStream00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_data_input_stream_read_line_finish*(self: ptr DataInputStream00; resu: ptr AsyncResult00; + length: var uint64): uint8Array {. + importc: "g_data_input_stream_read_line_finish", libprag.} + +proc readLineFinish*(self: DataInputStream; resu: AsyncResult; length: var uint64): uint8Array = + g_data_input_stream_read_line_finish(cast[ptr DataInputStream00](self.impl), cast[ptr AsyncResult00](resu.impl), length) + +proc g_data_input_stream_read_line_finish_utf8*(self: ptr DataInputStream00; resu: ptr AsyncResult00; + length: var uint64): cstring {. + importc: "g_data_input_stream_read_line_finish_utf8", libprag.} + +proc readLineFinishUtf8*(self: DataInputStream; resu: AsyncResult; length: var uint64): string = + let resul0 = g_data_input_stream_read_line_finish_utf8(cast[ptr DataInputStream00](self.impl), cast[ptr AsyncResult00](resu.impl), length) + result = $resul0 + cogfree(resul0) + +proc g_data_input_stream_read_line_utf8*(self: ptr DataInputStream00; length: var uint64; cancellable: ptr Cancellable00): cstring {. + importc: "g_data_input_stream_read_line_utf8", libprag.} + +proc readLineUtf8*(self: DataInputStream; length: var uint64; cancellable: Cancellable): string = + let resul0 = g_data_input_stream_read_line_utf8(cast[ptr DataInputStream00](self.impl), length, cast[ptr Cancellable00](cancellable.impl)) + result = $resul0 + cogfree(resul0) + +proc g_data_input_stream_read_uint16*(self: ptr DataInputStream00; cancellable: ptr Cancellable00): uint16 {. + importc: "g_data_input_stream_read_uint16", libprag.} + +proc readUint16*(self: DataInputStream; cancellable: Cancellable): uint16 = + g_data_input_stream_read_uint16(cast[ptr DataInputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_data_input_stream_read_uint32*(self: ptr DataInputStream00; cancellable: ptr Cancellable00): uint32 {. + importc: "g_data_input_stream_read_uint32", libprag.} + +proc readUint32*(self: DataInputStream; cancellable: Cancellable): int = + int(g_data_input_stream_read_uint32(cast[ptr DataInputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_input_stream_read_uint64*(self: ptr DataInputStream00; cancellable: ptr Cancellable00): uint64 {. + importc: "g_data_input_stream_read_uint64", libprag.} + +proc readUint64*(self: DataInputStream; cancellable: Cancellable): uint64 = + g_data_input_stream_read_uint64(cast[ptr DataInputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_data_input_stream_read_until*(self: ptr DataInputStream00; stopChars: cstring; length: var uint64; + cancellable: ptr Cancellable00): cstring {. + importc: "g_data_input_stream_read_until", libprag.} + +proc readUntil*(self: DataInputStream; stopChars: string; length: var uint64; + cancellable: Cancellable): string = + let resul0 = g_data_input_stream_read_until(cast[ptr DataInputStream00](self.impl), cstring(stopChars), length, cast[ptr Cancellable00](cancellable.impl)) + result = $resul0 + cogfree(resul0) + +proc g_data_input_stream_read_until_async*(self: ptr DataInputStream00; stopChars: cstring; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_data_input_stream_read_until_async", libprag.} + +proc readUntilAsync*(self: DataInputStream; stopChars: string; ioPriority: int; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_data_input_stream_read_until_async(cast[ptr DataInputStream00](self.impl), cstring(stopChars), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_data_input_stream_read_until_finish*(self: ptr DataInputStream00; resu: ptr AsyncResult00; + length: var uint64): cstring {. + importc: "g_data_input_stream_read_until_finish", libprag.} + +proc readUntilFinish*(self: DataInputStream; resu: AsyncResult; length: var uint64): string = + let resul0 = g_data_input_stream_read_until_finish(cast[ptr DataInputStream00](self.impl), cast[ptr AsyncResult00](resu.impl), length) + result = $resul0 + cogfree(resul0) + +proc g_data_input_stream_read_upto*(self: ptr DataInputStream00; stopChars: cstring; stopCharsLen: int64; + length: var uint64; cancellable: ptr Cancellable00): cstring {. + importc: "g_data_input_stream_read_upto", libprag.} + +proc readUpto*(self: DataInputStream; stopChars: string; stopCharsLen: int64; + length: var uint64; cancellable: Cancellable): string = + let resul0 = g_data_input_stream_read_upto(cast[ptr DataInputStream00](self.impl), cstring(stopChars), stopCharsLen, length, cast[ptr Cancellable00](cancellable.impl)) + result = $resul0 + cogfree(resul0) + +proc g_data_input_stream_read_upto_async*(self: ptr DataInputStream00; stopChars: cstring; stopCharsLen: int64; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_data_input_stream_read_upto_async", libprag.} + +proc readUptoAsync*(self: DataInputStream; stopChars: string; stopCharsLen: int64; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_data_input_stream_read_upto_async(cast[ptr DataInputStream00](self.impl), cstring(stopChars), stopCharsLen, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_data_input_stream_read_upto_finish*(self: ptr DataInputStream00; resu: ptr AsyncResult00; + length: var uint64): cstring {. + importc: "g_data_input_stream_read_upto_finish", libprag.} + +proc readUptoFinish*(self: DataInputStream; resu: AsyncResult; length: var uint64): string = + let resul0 = g_data_input_stream_read_upto_finish(cast[ptr DataInputStream00](self.impl), cast[ptr AsyncResult00](resu.impl), length) + result = $resul0 + cogfree(resul0) + +type + DataStreamByteOrder* {.size: sizeof(cint), pure.} = enum + bigEndian = 0 + littleEndian = 1 + hostEndian = 2 + +proc g_data_input_stream_get_byte_order*(self: ptr DataInputStream00): DataStreamByteOrder {. + importc: "g_data_input_stream_get_byte_order", libprag.} + +proc getByteOrder*(self: DataInputStream): DataStreamByteOrder = + g_data_input_stream_get_byte_order(cast[ptr DataInputStream00](self.impl)) + +proc byteOrder*(self: DataInputStream): DataStreamByteOrder = + g_data_input_stream_get_byte_order(cast[ptr DataInputStream00](self.impl)) + +proc g_data_input_stream_set_byte_order*(self: ptr DataInputStream00; order: DataStreamByteOrder) {. + importc: "g_data_input_stream_set_byte_order", libprag.} + +proc setByteOrder*(self: DataInputStream; order: DataStreamByteOrder) = + g_data_input_stream_set_byte_order(cast[ptr DataInputStream00](self.impl), order) + +proc `byteOrder=`*(self: DataInputStream; order: DataStreamByteOrder) = + g_data_input_stream_set_byte_order(cast[ptr DataInputStream00](self.impl), order) + +type + DataStreamNewlineType* {.size: sizeof(cint), pure.} = enum + lf = 0 + cr = 1 + crLf = 2 + any = 3 + +proc g_data_input_stream_get_newline_type*(self: ptr DataInputStream00): DataStreamNewlineType {. + importc: "g_data_input_stream_get_newline_type", libprag.} + +proc getNewlineType*(self: DataInputStream): DataStreamNewlineType = + g_data_input_stream_get_newline_type(cast[ptr DataInputStream00](self.impl)) + +proc newlineType*(self: DataInputStream): DataStreamNewlineType = + g_data_input_stream_get_newline_type(cast[ptr DataInputStream00](self.impl)) + +proc g_data_input_stream_set_newline_type*(self: ptr DataInputStream00; `type`: DataStreamNewlineType) {. + importc: "g_data_input_stream_set_newline_type", libprag.} + +proc setNewlineType*(self: DataInputStream; `type`: DataStreamNewlineType) = + g_data_input_stream_set_newline_type(cast[ptr DataInputStream00](self.impl), `type`) + +proc `newlineType=`*(self: DataInputStream; `type`: DataStreamNewlineType) = + g_data_input_stream_set_newline_type(cast[ptr DataInputStream00](self.impl), `type`) + +type + DataInputStreamClass00* {.pure.} = object + parentClass*: BufferedInputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + DataInputStreamClass* = ref object + impl*: ptr DataInputStreamClass00 + +type + DataOutputStreamPrivate00* {.pure.} = object + DataOutputStreamPrivate* = ref object + impl*: ptr DataOutputStreamPrivate00 + +type + DataOutputStream* = ref object of FilterOutputStream + DataOutputStream00* = object of FilterOutputStream00 + priv3: ptr DataOutputStreamPrivate00 + +proc g_data_output_stream_new*(baseStream: ptr OutputStream00): ptr DataOutputStream00 {. + importc: "g_data_output_stream_new", libprag.} + +proc newDataOutputStream*(baseStream: OutputStream): DataOutputStream = + new(result, finalizeGObject) + result.impl = g_data_output_stream_new(cast[ptr OutputStream00](baseStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDataOutputStream*[T](result: var T; baseStream: OutputStream) = + assert(result is DataOutputStream) + new(result, finalizeGObject) + result.impl = g_data_output_stream_new(cast[ptr OutputStream00](baseStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_data_output_stream_get_byte_order*(self: ptr DataOutputStream00): DataStreamByteOrder {. + importc: "g_data_output_stream_get_byte_order", libprag.} + +proc getByteOrder*(self: DataOutputStream): DataStreamByteOrder = + g_data_output_stream_get_byte_order(cast[ptr DataOutputStream00](self.impl)) + +proc byteOrder*(self: DataOutputStream): DataStreamByteOrder = + g_data_output_stream_get_byte_order(cast[ptr DataOutputStream00](self.impl)) + +proc g_data_output_stream_put_byte*(self: ptr DataOutputStream00; data: uint8; cancellable: ptr Cancellable00): gboolean {. + importc: "g_data_output_stream_put_byte", libprag.} + +proc putByte*(self: DataOutputStream; data: uint8; cancellable: Cancellable): bool = + toBool(g_data_output_stream_put_byte(cast[ptr DataOutputStream00](self.impl), data, cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_output_stream_put_int16*(self: ptr DataOutputStream00; data: int16; cancellable: ptr Cancellable00): gboolean {. + importc: "g_data_output_stream_put_int16", libprag.} + +proc putInt16*(self: DataOutputStream; data: int16; cancellable: Cancellable): bool = + toBool(g_data_output_stream_put_int16(cast[ptr DataOutputStream00](self.impl), data, cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_output_stream_put_int32*(self: ptr DataOutputStream00; data: int32; cancellable: ptr Cancellable00): gboolean {. + importc: "g_data_output_stream_put_int32", libprag.} + +proc putInt32*(self: DataOutputStream; data: int; cancellable: Cancellable): bool = + toBool(g_data_output_stream_put_int32(cast[ptr DataOutputStream00](self.impl), int32(data), cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_output_stream_put_int64*(self: ptr DataOutputStream00; data: int64; cancellable: ptr Cancellable00): gboolean {. + importc: "g_data_output_stream_put_int64", libprag.} + +proc putInt64*(self: DataOutputStream; data: int64; cancellable: Cancellable): bool = + toBool(g_data_output_stream_put_int64(cast[ptr DataOutputStream00](self.impl), data, cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_output_stream_put_string*(self: ptr DataOutputStream00; str: cstring; cancellable: ptr Cancellable00): gboolean {. + importc: "g_data_output_stream_put_string", libprag.} + +proc putString*(self: DataOutputStream; str: string; cancellable: Cancellable): bool = + toBool(g_data_output_stream_put_string(cast[ptr DataOutputStream00](self.impl), cstring(str), cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_output_stream_put_uint16*(self: ptr DataOutputStream00; data: uint16; cancellable: ptr Cancellable00): gboolean {. + importc: "g_data_output_stream_put_uint16", libprag.} + +proc putUint16*(self: DataOutputStream; data: uint16; cancellable: Cancellable): bool = + toBool(g_data_output_stream_put_uint16(cast[ptr DataOutputStream00](self.impl), data, cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_output_stream_put_uint32*(self: ptr DataOutputStream00; data: uint32; cancellable: ptr Cancellable00): gboolean {. + importc: "g_data_output_stream_put_uint32", libprag.} + +proc putUint32*(self: DataOutputStream; data: int; cancellable: Cancellable): bool = + toBool(g_data_output_stream_put_uint32(cast[ptr DataOutputStream00](self.impl), uint32(data), cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_output_stream_put_uint64*(self: ptr DataOutputStream00; data: uint64; cancellable: ptr Cancellable00): gboolean {. + importc: "g_data_output_stream_put_uint64", libprag.} + +proc putUint64*(self: DataOutputStream; data: uint64; cancellable: Cancellable): bool = + toBool(g_data_output_stream_put_uint64(cast[ptr DataOutputStream00](self.impl), data, cast[ptr Cancellable00](cancellable.impl))) + +proc g_data_output_stream_set_byte_order*(self: ptr DataOutputStream00; order: DataStreamByteOrder) {. + importc: "g_data_output_stream_set_byte_order", libprag.} + +proc setByteOrder*(self: DataOutputStream; order: DataStreamByteOrder) = + g_data_output_stream_set_byte_order(cast[ptr DataOutputStream00](self.impl), order) + +proc `byteOrder=`*(self: DataOutputStream; order: DataStreamByteOrder) = + g_data_output_stream_set_byte_order(cast[ptr DataOutputStream00](self.impl), order) + +type + DataOutputStreamClass00* {.pure.} = object + parentClass*: FilterOutputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + DataOutputStreamClass* = ref object + impl*: ptr DataOutputStreamClass00 + +type + DatagramBased00* {.pure.} = object + DatagramBased* = ref object + impl*: ptr DatagramBased00 + +proc g_datagram_based_condition_check*(self: ptr DatagramBased00; condition: glib.IOCondition): glib.IOCondition {. + importc: "g_datagram_based_condition_check", libprag.} + +proc conditionCheck*(self: DatagramBased; condition: glib.IOCondition): glib.IOCondition = + g_datagram_based_condition_check(cast[ptr DatagramBased00](self.impl), condition) + +proc g_datagram_based_condition_wait*(self: ptr DatagramBased00; condition: glib.IOCondition; + timeout: int64; cancellable: ptr Cancellable00): gboolean {. + importc: "g_datagram_based_condition_wait", libprag.} + +proc conditionWait*(self: DatagramBased; condition: glib.IOCondition; + timeout: int64; cancellable: Cancellable): bool = + toBool(g_datagram_based_condition_wait(cast[ptr DatagramBased00](self.impl), condition, timeout, cast[ptr Cancellable00](cancellable.impl))) + +proc g_datagram_based_create_source*(self: ptr DatagramBased00; condition: glib.IOCondition; + cancellable: ptr Cancellable00): ptr glib.Source00 {. + importc: "g_datagram_based_create_source", libprag.} + +proc createSource*(self: DatagramBased; condition: glib.IOCondition; + cancellable: Cancellable): glib.Source = + new(result) + result.impl = g_datagram_based_create_source(cast[ptr DatagramBased00](self.impl), condition, cast[ptr Cancellable00](cancellable.impl)) + +type + SocketAddress* = ref object of gobject.Object + SocketAddress00* = object of gobject.Object00 + +proc g_socket_address_new_from_native*(native: pointer; len: uint64): ptr SocketAddress00 {. + importc: "g_socket_address_new_from_native", libprag.} + +proc newSocketAddressFromNative*(native: pointer; len: uint64): SocketAddress = + new(result, finalizeGObject) + result.impl = g_socket_address_new_from_native(native, len) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSocketAddressFromNative*[T](result: var T; native: pointer; len: uint64) = + assert(result is SocketAddress) + new(result, finalizeGObject) + result.impl = g_socket_address_new_from_native(native, len) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_address_get_native_size*(self: ptr SocketAddress00): int64 {. + importc: "g_socket_address_get_native_size", libprag.} + +proc getNativeSize*(self: SocketAddress): int64 = + g_socket_address_get_native_size(cast[ptr SocketAddress00](self.impl)) + +proc nativeSize*(self: SocketAddress): int64 = + g_socket_address_get_native_size(cast[ptr SocketAddress00](self.impl)) + +proc g_socket_address_to_native*(self: ptr SocketAddress00; dest: pointer; destlen: uint64): gboolean {. + importc: "g_socket_address_to_native", libprag.} + +proc toNative*(self: SocketAddress; dest: pointer; destlen: uint64): bool = + toBool(g_socket_address_to_native(cast[ptr SocketAddress00](self.impl), dest, destlen)) + +type + InputVector00* {.pure.} = object + buffer*: pointer + size*: uint64 + InputVector* = ref object + impl*: ptr InputVector00 + +type + SocketControlMessagePrivate00* {.pure.} = object + SocketControlMessagePrivate* = ref object + impl*: ptr SocketControlMessagePrivate00 + +type + SocketControlMessage* = ref object of gobject.Object + SocketControlMessage00* = object of gobject.Object00 + priv1: ptr SocketControlMessagePrivate00 + +proc g_socket_control_message_deserialize*(level: int32; `type`: int32; size: uint64; data: uint8Array): ptr SocketControlMessage00 {. + importc: "g_socket_control_message_deserialize", libprag.} + +proc deserialize*(level: int; `type`: int; size: uint64; data: uint8Array): SocketControlMessage = + let gobj = g_socket_control_message_deserialize(int32(level), int32(`type`), size, data) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketControlMessage](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_control_message_get_level*(self: ptr SocketControlMessage00): int32 {. + importc: "g_socket_control_message_get_level", libprag.} + +proc getLevel*(self: SocketControlMessage): int = + int(g_socket_control_message_get_level(cast[ptr SocketControlMessage00](self.impl))) + +proc level*(self: SocketControlMessage): int = + int(g_socket_control_message_get_level(cast[ptr SocketControlMessage00](self.impl))) + +proc g_socket_control_message_get_msg_type*(self: ptr SocketControlMessage00): int32 {. + importc: "g_socket_control_message_get_msg_type", libprag.} + +proc getMsgType*(self: SocketControlMessage): int = + int(g_socket_control_message_get_msg_type(cast[ptr SocketControlMessage00](self.impl))) + +proc msgType*(self: SocketControlMessage): int = + int(g_socket_control_message_get_msg_type(cast[ptr SocketControlMessage00](self.impl))) + +proc g_socket_control_message_get_size*(self: ptr SocketControlMessage00): uint64 {. + importc: "g_socket_control_message_get_size", libprag.} + +proc getSize*(self: SocketControlMessage): uint64 = + g_socket_control_message_get_size(cast[ptr SocketControlMessage00](self.impl)) + +proc size*(self: SocketControlMessage): uint64 = + g_socket_control_message_get_size(cast[ptr SocketControlMessage00](self.impl)) + +proc g_socket_control_message_serialize*(self: ptr SocketControlMessage00; data: pointer) {. + importc: "g_socket_control_message_serialize", libprag.} + +proc serialize*(self: SocketControlMessage; data: pointer) = + g_socket_control_message_serialize(cast[ptr SocketControlMessage00](self.impl), data) + +type + InputMessage00* {.pure.} = object + address*: ptr SocketAddress00 + vectors*: InputVector00Array + numVectors*: uint32 + bytesReceived*: uint64 + flags*: int32 + controlMessages*: ptr SocketControlMessage00Array + numControlMessages*: ptr uint32 + InputMessage* = ref object + impl*: ptr InputMessage00 + +proc g_datagram_based_receive_messages*(self: ptr DatagramBased00; messages: InputMessage00Array; + numMessages: uint32; flags: int32; timeout: int64; cancellable: ptr Cancellable00): int32 {. + importc: "g_datagram_based_receive_messages", libprag.} + +proc receiveMessages*(self: DatagramBased; messages: InputMessage00Array; + numMessages: int; flags: int; timeout: int64; cancellable: Cancellable): int = + int(g_datagram_based_receive_messages(cast[ptr DatagramBased00](self.impl), messages, uint32(numMessages), int32(flags), timeout, cast[ptr Cancellable00](cancellable.impl))) + +type + SocketFamily* {.size: sizeof(cint), pure.} = enum + invalid = 0 + unix = 1 + ipv4 = 2 + ipv6 = 10 + +proc g_socket_address_get_family*(self: ptr SocketAddress00): SocketFamily {. + importc: "g_socket_address_get_family", libprag.} + +proc getFamily*(self: SocketAddress): SocketFamily = + g_socket_address_get_family(cast[ptr SocketAddress00](self.impl)) + +proc family*(self: SocketAddress): SocketFamily = + g_socket_address_get_family(cast[ptr SocketAddress00](self.impl)) + +type + OutputVector00* {.pure.} = object + buffer*: pointer + size*: uint64 + OutputVector* = ref object + impl*: ptr OutputVector00 + +type + OutputMessage00* {.pure.} = object + address*: ptr SocketAddress00 + vectors*: ptr OutputVector00 + numVectors*: uint32 + bytesSent*: uint32 + controlMessages*: ptr SocketControlMessage00Array + numControlMessages*: uint32 + OutputMessage* = ref object + impl*: ptr OutputMessage00 + +proc g_datagram_based_send_messages*(self: ptr DatagramBased00; messages: OutputMessage00Array; + numMessages: uint32; flags: int32; timeout: int64; cancellable: ptr Cancellable00): int32 {. + importc: "g_datagram_based_send_messages", libprag.} + +proc sendMessages*(self: DatagramBased; messages: OutputMessage00Array; + numMessages: int; flags: int; timeout: int64; cancellable: Cancellable): int = + int(g_datagram_based_send_messages(cast[ptr DatagramBased00](self.impl), messages, uint32(numMessages), int32(flags), timeout, cast[ptr Cancellable00](cancellable.impl))) + +type + DatagramBasedInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + receiveMessages*: proc(datagramBased: ptr DatagramBased00; messages: InputMessage00Array; + numMessages: uint32; flags: int32; timeout: int64; cancellable: ptr Cancellable00): int32 {.cdecl.} + sendMessages*: proc(datagramBased: ptr DatagramBased00; messages: OutputMessage00Array; + numMessages: uint32; flags: int32; timeout: int64; cancellable: ptr Cancellable00): int32 {.cdecl.} + createSource*: proc(datagramBased: ptr DatagramBased00; condition: glib.IOCondition; + cancellable: ptr Cancellable00): ptr glib.Source00 {.cdecl.} + conditionCheck*: proc(datagramBased: ptr DatagramBased00; condition: glib.IOCondition): glib.IOCondition {.cdecl.} + conditionWait*: proc(datagramBased: ptr DatagramBased00; condition: glib.IOCondition; + timeout: int64; cancellable: ptr Cancellable00): gboolean {.cdecl.} + DatagramBasedInterface* = ref object + impl*: ptr DatagramBasedInterface00 + +type + DatagramBasedSourceFunc* = proc (datagramBased: ptr DatagramBased00; condition: glib.IOCondition; + userData: pointer): gboolean {.cdecl.} + +type + DesktopAppInfo* = ref object of gobject.Object + DesktopAppInfo00* = object of gobject.Object00 + +proc g_desktop_app_info_new*(desktopId: cstring): ptr DesktopAppInfo00 {. + importc: "g_desktop_app_info_new", libprag.} + +proc newDesktopAppInfo*(desktopId: string): DesktopAppInfo = + new(result, finalizeGObject) + result.impl = g_desktop_app_info_new(cstring(desktopId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDesktopAppInfo*[T](result: var T; desktopId: string) = + assert(result is DesktopAppInfo) + new(result, finalizeGObject) + result.impl = g_desktop_app_info_new(cstring(desktopId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_desktop_app_info_new_from_filename*(filename: ucstring): ptr DesktopAppInfo00 {. + importc: "g_desktop_app_info_new_from_filename", libprag.} + +proc newDesktopAppInfoFromFilename*(filename: ucstring): DesktopAppInfo = + new(result, finalizeGObject) + result.impl = g_desktop_app_info_new_from_filename(filename) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDesktopAppInfoFromFilename*[T](result: var T; filename: ucstring) = + assert(result is DesktopAppInfo) + new(result, finalizeGObject) + result.impl = g_desktop_app_info_new_from_filename(filename) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_desktop_app_info_new_from_keyfile*(keyFile: ptr glib.KeyFile00): ptr DesktopAppInfo00 {. + importc: "g_desktop_app_info_new_from_keyfile", libprag.} + +proc newDesktopAppInfoFromKeyfile*(keyFile: glib.KeyFile): DesktopAppInfo = + new(result, finalizeGObject) + result.impl = g_desktop_app_info_new_from_keyfile(cast[ptr glib.KeyFile00](keyFile.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDesktopAppInfoFromKeyfile*[T](result: var T; keyFile: glib.KeyFile) = + assert(result is DesktopAppInfo) + new(result, finalizeGObject) + result.impl = g_desktop_app_info_new_from_keyfile(cast[ptr glib.KeyFile00](keyFile.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_desktop_app_info_get_implementations*(`interface`: cstring): ptr pointer {. + importc: "g_desktop_app_info_get_implementations", libprag.} + +proc getImplementations*(`interface`: cstring): ptr pointer {. + importc: "g_desktop_app_info_get_implementations", libprag.} + +proc implementations*(`interface`: cstring): ptr pointer {. + importc: "g_desktop_app_info_get_implementations", libprag.} + +proc g_desktop_app_info_search*(searchString: cstring): cstringArrayArray {. + importc: "g_desktop_app_info_search", libprag.} + +proc search*(searchString: cstring): cstringArrayArray {. + importc: "g_desktop_app_info_search", libprag.} + +proc g_desktop_app_info_set_desktop_env*(desktopEnv: cstring) {. + importc: "g_desktop_app_info_set_desktop_env", libprag.} + +proc setDesktopEnv*(desktopEnv: cstring) {. + importc: "g_desktop_app_info_set_desktop_env", libprag.} + +proc `desktopEnv=`*(desktopEnv: cstring) {. + importc: "g_desktop_app_info_set_desktop_env", libprag.} + +proc g_desktop_app_info_get_action_name*(self: ptr DesktopAppInfo00; actionName: cstring): cstring {. + importc: "g_desktop_app_info_get_action_name", libprag.} + +proc getActionName*(self: DesktopAppInfo; actionName: string): string = + let resul0 = g_desktop_app_info_get_action_name(cast[ptr DesktopAppInfo00](self.impl), cstring(actionName)) + result = $resul0 + cogfree(resul0) + +proc actionName*(self: DesktopAppInfo; actionName: string): string = + let resul0 = g_desktop_app_info_get_action_name(cast[ptr DesktopAppInfo00](self.impl), cstring(actionName)) + result = $resul0 + cogfree(resul0) + +proc g_desktop_app_info_get_boolean*(self: ptr DesktopAppInfo00; key: cstring): gboolean {. + importc: "g_desktop_app_info_get_boolean", libprag.} + +proc getBoolean*(self: DesktopAppInfo; key: string): bool = + toBool(g_desktop_app_info_get_boolean(cast[ptr DesktopAppInfo00](self.impl), cstring(key))) + +proc boolean*(self: DesktopAppInfo; key: string): bool = + toBool(g_desktop_app_info_get_boolean(cast[ptr DesktopAppInfo00](self.impl), cstring(key))) + +proc g_desktop_app_info_get_categories*(self: ptr DesktopAppInfo00): cstring {. + importc: "g_desktop_app_info_get_categories", libprag.} + +proc getCategories*(self: DesktopAppInfo): string = + let resul0 = g_desktop_app_info_get_categories(cast[ptr DesktopAppInfo00](self.impl)) + result = $resul0 + +proc categories*(self: DesktopAppInfo): string = + let resul0 = g_desktop_app_info_get_categories(cast[ptr DesktopAppInfo00](self.impl)) + result = $resul0 + +proc g_desktop_app_info_get_filename*(self: ptr DesktopAppInfo00): ucstring {. + importc: "g_desktop_app_info_get_filename", libprag.} + +proc getFilename*(self: DesktopAppInfo): ucstring = + g_desktop_app_info_get_filename(cast[ptr DesktopAppInfo00](self.impl)) + +proc filename*(self: DesktopAppInfo): ucstring = + g_desktop_app_info_get_filename(cast[ptr DesktopAppInfo00](self.impl)) + +proc g_desktop_app_info_get_generic_name*(self: ptr DesktopAppInfo00): cstring {. + importc: "g_desktop_app_info_get_generic_name", libprag.} + +proc getGenericName*(self: DesktopAppInfo): string = + let resul0 = g_desktop_app_info_get_generic_name(cast[ptr DesktopAppInfo00](self.impl)) + result = $resul0 + +proc genericName*(self: DesktopAppInfo): string = + let resul0 = g_desktop_app_info_get_generic_name(cast[ptr DesktopAppInfo00](self.impl)) + result = $resul0 + +proc g_desktop_app_info_get_is_hidden*(self: ptr DesktopAppInfo00): gboolean {. + importc: "g_desktop_app_info_get_is_hidden", libprag.} + +proc getIsHidden*(self: DesktopAppInfo): bool = + toBool(g_desktop_app_info_get_is_hidden(cast[ptr DesktopAppInfo00](self.impl))) + +proc isHidden*(self: DesktopAppInfo): bool = + toBool(g_desktop_app_info_get_is_hidden(cast[ptr DesktopAppInfo00](self.impl))) + +proc g_desktop_app_info_get_keywords*(self: ptr DesktopAppInfo00): cstringArray {. + importc: "g_desktop_app_info_get_keywords", libprag.} + +proc getKeywords*(self: DesktopAppInfo): cstringArray = + g_desktop_app_info_get_keywords(cast[ptr DesktopAppInfo00](self.impl)) + +proc keywords*(self: DesktopAppInfo): cstringArray = + g_desktop_app_info_get_keywords(cast[ptr DesktopAppInfo00](self.impl)) + +proc g_desktop_app_info_get_nodisplay*(self: ptr DesktopAppInfo00): gboolean {. + importc: "g_desktop_app_info_get_nodisplay", libprag.} + +proc getNodisplay*(self: DesktopAppInfo): bool = + toBool(g_desktop_app_info_get_nodisplay(cast[ptr DesktopAppInfo00](self.impl))) + +proc nodisplay*(self: DesktopAppInfo): bool = + toBool(g_desktop_app_info_get_nodisplay(cast[ptr DesktopAppInfo00](self.impl))) + +proc g_desktop_app_info_get_show_in*(self: ptr DesktopAppInfo00; desktopEnv: cstring): gboolean {. + importc: "g_desktop_app_info_get_show_in", libprag.} + +proc getShowIn*(self: DesktopAppInfo; desktopEnv: string): bool = + toBool(g_desktop_app_info_get_show_in(cast[ptr DesktopAppInfo00](self.impl), cstring(desktopEnv))) + +proc showIn*(self: DesktopAppInfo; desktopEnv: string): bool = + toBool(g_desktop_app_info_get_show_in(cast[ptr DesktopAppInfo00](self.impl), cstring(desktopEnv))) + +proc g_desktop_app_info_get_startup_wm_class*(self: ptr DesktopAppInfo00): cstring {. + importc: "g_desktop_app_info_get_startup_wm_class", libprag.} + +proc getStartupWmClass*(self: DesktopAppInfo): string = + let resul0 = g_desktop_app_info_get_startup_wm_class(cast[ptr DesktopAppInfo00](self.impl)) + result = $resul0 + +proc startupWmClass*(self: DesktopAppInfo): string = + let resul0 = g_desktop_app_info_get_startup_wm_class(cast[ptr DesktopAppInfo00](self.impl)) + result = $resul0 + +proc g_desktop_app_info_get_string*(self: ptr DesktopAppInfo00; key: cstring): cstring {. + importc: "g_desktop_app_info_get_string", libprag.} + +proc getString*(self: DesktopAppInfo; key: string): string = + let resul0 = g_desktop_app_info_get_string(cast[ptr DesktopAppInfo00](self.impl), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc string*(self: DesktopAppInfo; key: string): string = + let resul0 = g_desktop_app_info_get_string(cast[ptr DesktopAppInfo00](self.impl), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc g_desktop_app_info_has_key*(self: ptr DesktopAppInfo00; key: cstring): gboolean {. + importc: "g_desktop_app_info_has_key", libprag.} + +proc hasKey*(self: DesktopAppInfo; key: string): bool = + toBool(g_desktop_app_info_has_key(cast[ptr DesktopAppInfo00](self.impl), cstring(key))) + +proc g_desktop_app_info_launch_action*(self: ptr DesktopAppInfo00; actionName: cstring; launchContext: ptr AppLaunchContext00) {. + importc: "g_desktop_app_info_launch_action", libprag.} + +proc launchAction*(self: DesktopAppInfo; actionName: string; launchContext: AppLaunchContext) = + g_desktop_app_info_launch_action(cast[ptr DesktopAppInfo00](self.impl), cstring(actionName), cast[ptr AppLaunchContext00](launchContext.impl)) + +proc g_desktop_app_info_list_actions*(self: ptr DesktopAppInfo00): cstringArray {. + importc: "g_desktop_app_info_list_actions", libprag.} + +proc listActions*(self: DesktopAppInfo): cstringArray = + g_desktop_app_info_list_actions(cast[ptr DesktopAppInfo00](self.impl)) + +type + DesktopAppInfoClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + DesktopAppInfoClass* = ref object + impl*: ptr DesktopAppInfoClass00 + +type + DesktopAppInfoLookup00* {.pure.} = object + DesktopAppInfoLookup* = ref object + impl*: ptr DesktopAppInfoLookup00 + +proc g_desktop_app_info_lookup_get_default_for_uri_scheme*(self: ptr DesktopAppInfoLookup00; uriScheme: cstring): ptr AppInfo00 {. + importc: "g_desktop_app_info_lookup_get_default_for_uri_scheme", libprag.} + +proc getDefaultForUriScheme*(self: DesktopAppInfoLookup; uriScheme: string): AppInfo = + new(result) + result.impl = g_desktop_app_info_lookup_get_default_for_uri_scheme(cast[ptr DesktopAppInfoLookup00](self.impl), cstring(uriScheme)) + +proc defaultForUriScheme*(self: DesktopAppInfoLookup; uriScheme: string): AppInfo = + new(result) + result.impl = g_desktop_app_info_lookup_get_default_for_uri_scheme(cast[ptr DesktopAppInfoLookup00](self.impl), cstring(uriScheme)) + +type + DesktopAppInfoLookupIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + getDefaultForUriScheme*: proc(lookup: ptr DesktopAppInfoLookup00; uriScheme: cstring): ptr AppInfo00 {.cdecl.} + DesktopAppInfoLookupIface* = ref object + impl*: ptr DesktopAppInfoLookupIface00 + +type + DesktopAppLaunchCallback* = proc (appinfo: ptr DesktopAppInfo00; pid: int32; userData: pointer) {.cdecl.} + +proc g_desktop_app_info_launch_uris_as_manager*(self: ptr DesktopAppInfo00; uris: ptr pointer; launchContext: ptr AppLaunchContext00; + spawnFlags: glib.SpawnFlags; userSetup: SpawnChildSetupFunc; + userSetupData: pointer; pidCallback: DesktopAppLaunchCallback; pidCallbackData: pointer): gboolean {. + importc: "g_desktop_app_info_launch_uris_as_manager", libprag.} + +proc launchUrisAsManager*(self: DesktopAppInfo; uris: ptr pointer; launchContext: AppLaunchContext; + spawnFlags: glib.SpawnFlags; userSetup: SpawnChildSetupFunc; userSetupData: pointer; + pidCallback: DesktopAppLaunchCallback; pidCallbackData: pointer): bool = + toBool(g_desktop_app_info_launch_uris_as_manager(cast[ptr DesktopAppInfo00](self.impl), uris, cast[ptr AppLaunchContext00](launchContext.impl), spawnFlags, userSetup, userSetupData, pidCallback, pidCallbackData)) + +type + DriveIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + changed*: proc(drive: ptr Drive00) {.cdecl.} + disconnected*: proc(drive: ptr Drive00) {.cdecl.} + ejectButton*: proc(drive: ptr Drive00) {.cdecl.} + getName*: proc(drive: ptr Drive00): cstring {.cdecl.} + getIcon*: proc(drive: ptr Drive00): ptr Icon00 {.cdecl.} + hasVolumes*: proc(drive: ptr Drive00): gboolean {.cdecl.} + getVolumes*: proc(drive: ptr Drive00): ptr pointer {.cdecl.} + isMediaRemovable*: proc(drive: ptr Drive00): gboolean {.cdecl.} + hasMedia*: proc(drive: ptr Drive00): gboolean {.cdecl.} + isMediaCheckAutomatic*: proc(drive: ptr Drive00): gboolean {.cdecl.} + canEject*: proc(drive: ptr Drive00): gboolean {.cdecl.} + canPollForMedia*: proc(drive: ptr Drive00): gboolean {.cdecl.} + eject*: proc(drive: ptr Drive00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + ejectFinish*: proc(drive: ptr Drive00; resu: ptr AsyncResult00): gboolean {.cdecl.} + pollForMedia*: proc(drive: ptr Drive00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + pollForMediaFinish*: proc(drive: ptr Drive00; resu: ptr AsyncResult00): gboolean {.cdecl.} + getIdentifier*: proc(drive: ptr Drive00; kind: cstring): cstring {.cdecl.} + enumerateIdentifiers*: proc(drive: ptr Drive00): cstringArray {.cdecl.} + getStartStopType*: proc(drive: ptr Drive00): DriveStartStopType {.cdecl.} + canStart*: proc(drive: ptr Drive00): gboolean {.cdecl.} + canStartDegraded*: proc(drive: ptr Drive00): gboolean {.cdecl.} + start*: proc(drive: ptr Drive00; flags: DriveStartFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + startFinish*: proc(drive: ptr Drive00; resu: ptr AsyncResult00): gboolean {.cdecl.} + canStop*: proc(drive: ptr Drive00): gboolean {.cdecl.} + stop*: proc(drive: ptr Drive00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + stopFinish*: proc(drive: ptr Drive00; resu: ptr AsyncResult00): gboolean {.cdecl.} + stopButton*: proc(drive: ptr Drive00) {.cdecl.} + ejectWithOperation*: proc(drive: ptr Drive00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + ejectWithOperationFinish*: proc(drive: ptr Drive00; resu: ptr AsyncResult00): gboolean {.cdecl.} + getSortKey*: proc(drive: ptr Drive00): cstring {.cdecl.} + getSymbolicIcon*: proc(drive: ptr Drive00): ptr Icon00 {.cdecl.} + isRemovable*: proc(drive: ptr Drive00): gboolean {.cdecl.} + DriveIface* = ref object + impl*: ptr DriveIface00 + +type + DtlsClientConnection00* {.pure.} = object + DtlsClientConnection* = ref object + impl*: ptr DtlsClientConnection00 + +proc g_dtls_client_connection_get_accepted_cas*(self: ptr DtlsClientConnection00): ptr pointer {. + importc: "g_dtls_client_connection_get_accepted_cas", libprag.} + +proc getAcceptedCas*(self: DtlsClientConnection): ptr pointer = + g_dtls_client_connection_get_accepted_cas(cast[ptr DtlsClientConnection00](self.impl)) + +proc acceptedCas*(self: DtlsClientConnection): ptr pointer = + g_dtls_client_connection_get_accepted_cas(cast[ptr DtlsClientConnection00](self.impl)) + +type + SocketConnectable00* {.pure.} = object + SocketConnectable* = ref object + impl*: ptr SocketConnectable00 + +proc g_socket_connectable_to_string*(self: ptr SocketConnectable00): cstring {. + importc: "g_socket_connectable_to_string", libprag.} + +proc toString*(self: SocketConnectable): string = + let resul0 = g_socket_connectable_to_string(cast[ptr SocketConnectable00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_dtls_client_connection_new*(baseSocket: ptr DatagramBased00; serverIdentity: ptr SocketConnectable00): ptr DtlsClientConnection00 {. + importc: "g_dtls_client_connection_new", libprag.} + +proc newDtlsClientConnection*(baseSocket: DatagramBased; serverIdentity: SocketConnectable): DtlsClientConnection = + new(result) + result.impl = g_dtls_client_connection_new(cast[ptr DatagramBased00](baseSocket.impl), cast[ptr SocketConnectable00](serverIdentity.impl)) + +proc g_dtls_client_connection_get_server_identity*(self: ptr DtlsClientConnection00): ptr SocketConnectable00 {. + importc: "g_dtls_client_connection_get_server_identity", libprag.} + +proc getServerIdentity*(self: DtlsClientConnection): SocketConnectable = + new(result) + result.impl = g_dtls_client_connection_get_server_identity(cast[ptr DtlsClientConnection00](self.impl)) + +proc serverIdentity*(self: DtlsClientConnection): SocketConnectable = + new(result) + result.impl = g_dtls_client_connection_get_server_identity(cast[ptr DtlsClientConnection00](self.impl)) + +proc g_dtls_client_connection_set_server_identity*(self: ptr DtlsClientConnection00; identity: ptr SocketConnectable00) {. + importc: "g_dtls_client_connection_set_server_identity", libprag.} + +proc setServerIdentity*(self: DtlsClientConnection; identity: SocketConnectable) = + g_dtls_client_connection_set_server_identity(cast[ptr DtlsClientConnection00](self.impl), cast[ptr SocketConnectable00](identity.impl)) + +proc `serverIdentity=`*(self: DtlsClientConnection; identity: SocketConnectable) = + g_dtls_client_connection_set_server_identity(cast[ptr DtlsClientConnection00](self.impl), cast[ptr SocketConnectable00](identity.impl)) + +type + SocketAddressEnumerator* = ref object of gobject.Object + SocketAddressEnumerator00* = object of gobject.Object00 + +proc g_socket_address_enumerator_next*(self: ptr SocketAddressEnumerator00; cancellable: ptr Cancellable00): ptr SocketAddress00 {. + importc: "g_socket_address_enumerator_next", libprag.} + +proc next*(self: SocketAddressEnumerator; cancellable: Cancellable): SocketAddress = + let gobj = g_socket_address_enumerator_next(cast[ptr SocketAddressEnumerator00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_address_enumerator_next_async*(self: ptr SocketAddressEnumerator00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_socket_address_enumerator_next_async", libprag.} + +proc nextAsync*(self: SocketAddressEnumerator; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_socket_address_enumerator_next_async(cast[ptr SocketAddressEnumerator00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_socket_address_enumerator_next_finish*(self: ptr SocketAddressEnumerator00; resu: ptr AsyncResult00): ptr SocketAddress00 {. + importc: "g_socket_address_enumerator_next_finish", libprag.} + +proc nextFinish*(self: SocketAddressEnumerator; resu: AsyncResult): SocketAddress = + let gobj = g_socket_address_enumerator_next_finish(cast[ptr SocketAddressEnumerator00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_connectable_enumerate*(self: ptr SocketConnectable00): ptr SocketAddressEnumerator00 {. + importc: "g_socket_connectable_enumerate", libprag.} + +proc enumerate*(self: SocketConnectable): SocketAddressEnumerator = + let gobj = g_socket_connectable_enumerate(cast[ptr SocketConnectable00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddressEnumerator](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_connectable_proxy_enumerate*(self: ptr SocketConnectable00): ptr SocketAddressEnumerator00 {. + importc: "g_socket_connectable_proxy_enumerate", libprag.} + +proc proxyEnumerate*(self: SocketConnectable): SocketAddressEnumerator = + let gobj = g_socket_connectable_proxy_enumerate(cast[ptr SocketConnectable00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddressEnumerator](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + TlsCertificateFlags* {.size: sizeof(cint), pure.} = enum + unknownCa = 1 + badIdentity = 2 + notActivated = 4 + expired = 8 + revoked = 16 + insecure = 32 + genericError = 64 + validateAll = 127 + +proc g_dtls_client_connection_get_validation_flags*(self: ptr DtlsClientConnection00): TlsCertificateFlags {. + importc: "g_dtls_client_connection_get_validation_flags", libprag.} + +proc getValidationFlags*(self: DtlsClientConnection): TlsCertificateFlags = + g_dtls_client_connection_get_validation_flags(cast[ptr DtlsClientConnection00](self.impl)) + +proc validationFlags*(self: DtlsClientConnection): TlsCertificateFlags = + g_dtls_client_connection_get_validation_flags(cast[ptr DtlsClientConnection00](self.impl)) + +proc g_dtls_client_connection_set_validation_flags*(self: ptr DtlsClientConnection00; flags: TlsCertificateFlags) {. + importc: "g_dtls_client_connection_set_validation_flags", libprag.} + +proc setValidationFlags*(self: DtlsClientConnection; flags: TlsCertificateFlags) = + g_dtls_client_connection_set_validation_flags(cast[ptr DtlsClientConnection00](self.impl), flags) + +proc `validationFlags=`*(self: DtlsClientConnection; flags: TlsCertificateFlags) = + g_dtls_client_connection_set_validation_flags(cast[ptr DtlsClientConnection00](self.impl), flags) + +type + DtlsClientConnectionInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + DtlsClientConnectionInterface* = ref object + impl*: ptr DtlsClientConnectionInterface00 + +type + DtlsConnection00* {.pure.} = object + DtlsConnection* = ref object + impl*: ptr DtlsConnection00 + +proc g_dtls_connection_close*(self: ptr DtlsConnection00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_dtls_connection_close", libprag.} + +proc close*(self: DtlsConnection; cancellable: Cancellable): bool = + toBool(g_dtls_connection_close(cast[ptr DtlsConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_dtls_connection_close_async*(self: ptr DtlsConnection00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dtls_connection_close_async", libprag.} + +proc closeAsync*(self: DtlsConnection; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_dtls_connection_close_async(cast[ptr DtlsConnection00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dtls_connection_close_finish*(self: ptr DtlsConnection00; resu: ptr AsyncResult00): gboolean {. + importc: "g_dtls_connection_close_finish", libprag.} + +proc closeFinish*(self: DtlsConnection; resu: AsyncResult): bool = + toBool(g_dtls_connection_close_finish(cast[ptr DtlsConnection00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_dtls_connection_get_peer_certificate_errors*(self: ptr DtlsConnection00): TlsCertificateFlags {. + importc: "g_dtls_connection_get_peer_certificate_errors", libprag.} + +proc getPeerCertificateErrors*(self: DtlsConnection): TlsCertificateFlags = + g_dtls_connection_get_peer_certificate_errors(cast[ptr DtlsConnection00](self.impl)) + +proc peerCertificateErrors*(self: DtlsConnection): TlsCertificateFlags = + g_dtls_connection_get_peer_certificate_errors(cast[ptr DtlsConnection00](self.impl)) + +proc g_dtls_connection_get_require_close_notify*(self: ptr DtlsConnection00): gboolean {. + importc: "g_dtls_connection_get_require_close_notify", libprag.} + +proc getRequireCloseNotify*(self: DtlsConnection): bool = + toBool(g_dtls_connection_get_require_close_notify(cast[ptr DtlsConnection00](self.impl))) + +proc requireCloseNotify*(self: DtlsConnection): bool = + toBool(g_dtls_connection_get_require_close_notify(cast[ptr DtlsConnection00](self.impl))) + +proc g_dtls_connection_handshake*(self: ptr DtlsConnection00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_dtls_connection_handshake", libprag.} + +proc handshake*(self: DtlsConnection; cancellable: Cancellable): bool = + toBool(g_dtls_connection_handshake(cast[ptr DtlsConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_dtls_connection_handshake_async*(self: ptr DtlsConnection00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dtls_connection_handshake_async", libprag.} + +proc handshakeAsync*(self: DtlsConnection; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_dtls_connection_handshake_async(cast[ptr DtlsConnection00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dtls_connection_handshake_finish*(self: ptr DtlsConnection00; resu: ptr AsyncResult00): gboolean {. + importc: "g_dtls_connection_handshake_finish", libprag.} + +proc handshakeFinish*(self: DtlsConnection; resu: AsyncResult): bool = + toBool(g_dtls_connection_handshake_finish(cast[ptr DtlsConnection00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_dtls_connection_set_require_close_notify*(self: ptr DtlsConnection00; requireCloseNotify: gboolean) {. + importc: "g_dtls_connection_set_require_close_notify", libprag.} + +proc setRequireCloseNotify*(self: DtlsConnection; requireCloseNotify: bool) = + g_dtls_connection_set_require_close_notify(cast[ptr DtlsConnection00](self.impl), gboolean(requireCloseNotify)) + +proc `requireCloseNotify=`*(self: DtlsConnection; requireCloseNotify: bool) = + g_dtls_connection_set_require_close_notify(cast[ptr DtlsConnection00](self.impl), gboolean(requireCloseNotify)) + +proc g_dtls_connection_shutdown*(self: ptr DtlsConnection00; shutdownRead: gboolean; + shutdownWrite: gboolean; cancellable: ptr Cancellable00): gboolean {. + importc: "g_dtls_connection_shutdown", libprag.} + +proc shutdown*(self: DtlsConnection; shutdownRead: bool; shutdownWrite: bool; + cancellable: Cancellable): bool = + toBool(g_dtls_connection_shutdown(cast[ptr DtlsConnection00](self.impl), gboolean(shutdownRead), gboolean(shutdownWrite), cast[ptr Cancellable00](cancellable.impl))) + +proc g_dtls_connection_shutdown_async*(self: ptr DtlsConnection00; shutdownRead: gboolean; + shutdownWrite: gboolean; ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_dtls_connection_shutdown_async", libprag.} + +proc shutdownAsync*(self: DtlsConnection; shutdownRead: bool; shutdownWrite: bool; + ioPriority: int; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_dtls_connection_shutdown_async(cast[ptr DtlsConnection00](self.impl), gboolean(shutdownRead), gboolean(shutdownWrite), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dtls_connection_shutdown_finish*(self: ptr DtlsConnection00; resu: ptr AsyncResult00): gboolean {. + importc: "g_dtls_connection_shutdown_finish", libprag.} + +proc shutdownFinish*(self: DtlsConnection; resu: AsyncResult): bool = + toBool(g_dtls_connection_shutdown_finish(cast[ptr DtlsConnection00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +type + TlsCertificatePrivate00* {.pure.} = object + TlsCertificatePrivate* = ref object + impl*: ptr TlsCertificatePrivate00 + +type + TlsCertificate* = ref object of gobject.Object + TlsCertificate00* = object of gobject.Object00 + priv1: ptr TlsCertificatePrivate00 + +proc g_tls_certificate_new_from_file*(file: ucstring): ptr TlsCertificate00 {. + importc: "g_tls_certificate_new_from_file", libprag.} + +proc newTlsCertificateFromFile*(file: ucstring): TlsCertificate = + new(result, finalizeGObject) + result.impl = g_tls_certificate_new_from_file(file) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTlsCertificateFromFile*[T](result: var T; file: ucstring) = + assert(result is TlsCertificate) + new(result, finalizeGObject) + result.impl = g_tls_certificate_new_from_file(file) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_certificate_new_from_files*(certFile: ucstring; keyFile: ucstring): ptr TlsCertificate00 {. + importc: "g_tls_certificate_new_from_files", libprag.} + +proc newTlsCertificateFromFiles*(certFile: ucstring; keyFile: ucstring): TlsCertificate = + new(result, finalizeGObject) + result.impl = g_tls_certificate_new_from_files(certFile, keyFile) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTlsCertificateFromFiles*[T](result: var T; certFile: ucstring; keyFile: ucstring) = + assert(result is TlsCertificate) + new(result, finalizeGObject) + result.impl = g_tls_certificate_new_from_files(certFile, keyFile) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_certificate_new_from_pem*(data: cstring; length: int64): ptr TlsCertificate00 {. + importc: "g_tls_certificate_new_from_pem", libprag.} + +proc newTlsCertificateFromPem*(data: string; length: int64): TlsCertificate = + new(result, finalizeGObject) + result.impl = g_tls_certificate_new_from_pem(cstring(data), length) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTlsCertificateFromPem*[T](result: var T; data: string; length: int64) = + assert(result is TlsCertificate) + new(result, finalizeGObject) + result.impl = g_tls_certificate_new_from_pem(cstring(data), length) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_certificate_list_new_from_file*(file: ucstring): ptr pointer {. + importc: "g_tls_certificate_list_new_from_file", libprag.} + +proc listNewFromFile*(file: ucstring): ptr pointer {. + importc: "g_tls_certificate_list_new_from_file", libprag.} + +proc g_tls_certificate_get_issuer*(self: ptr TlsCertificate00): ptr TlsCertificate00 {. + importc: "g_tls_certificate_get_issuer", libprag.} + +proc getIssuer*(self: TlsCertificate): TlsCertificate = + let gobj = g_tls_certificate_get_issuer(cast[ptr TlsCertificate00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc issuer*(self: TlsCertificate): TlsCertificate = + let gobj = g_tls_certificate_get_issuer(cast[ptr TlsCertificate00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_certificate_is_same*(self: ptr TlsCertificate00; certTwo: ptr TlsCertificate00): gboolean {. + importc: "g_tls_certificate_is_same", libprag.} + +proc isSame*(self: TlsCertificate; certTwo: TlsCertificate): bool = + toBool(g_tls_certificate_is_same(cast[ptr TlsCertificate00](self.impl), cast[ptr TlsCertificate00](certTwo.impl))) + +proc g_tls_certificate_verify*(self: ptr TlsCertificate00; identity: ptr SocketConnectable00; + trustedCa: ptr TlsCertificate00): TlsCertificateFlags {. + importc: "g_tls_certificate_verify", libprag.} + +proc verify*(self: TlsCertificate; identity: SocketConnectable; + trustedCa: TlsCertificate): TlsCertificateFlags = + g_tls_certificate_verify(cast[ptr TlsCertificate00](self.impl), cast[ptr SocketConnectable00](identity.impl), cast[ptr TlsCertificate00](trustedCa.impl)) + +proc g_dtls_connection_emit_accept_certificate*(self: ptr DtlsConnection00; peerCert: ptr TlsCertificate00; + errors: TlsCertificateFlags): gboolean {. + importc: "g_dtls_connection_emit_accept_certificate", libprag.} + +proc emitAcceptCertificate*(self: DtlsConnection; peerCert: TlsCertificate; errors: TlsCertificateFlags): bool = + toBool(g_dtls_connection_emit_accept_certificate(cast[ptr DtlsConnection00](self.impl), cast[ptr TlsCertificate00](peerCert.impl), errors)) + +proc g_dtls_connection_get_certificate*(self: ptr DtlsConnection00): ptr TlsCertificate00 {. + importc: "g_dtls_connection_get_certificate", libprag.} + +proc getCertificate*(self: DtlsConnection): TlsCertificate = + let gobj = g_dtls_connection_get_certificate(cast[ptr DtlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc certificate*(self: DtlsConnection): TlsCertificate = + let gobj = g_dtls_connection_get_certificate(cast[ptr DtlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dtls_connection_get_peer_certificate*(self: ptr DtlsConnection00): ptr TlsCertificate00 {. + importc: "g_dtls_connection_get_peer_certificate", libprag.} + +proc getPeerCertificate*(self: DtlsConnection): TlsCertificate = + let gobj = g_dtls_connection_get_peer_certificate(cast[ptr DtlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc peerCertificate*(self: DtlsConnection): TlsCertificate = + let gobj = g_dtls_connection_get_peer_certificate(cast[ptr DtlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dtls_connection_set_certificate*(self: ptr DtlsConnection00; certificate: ptr TlsCertificate00) {. + importc: "g_dtls_connection_set_certificate", libprag.} + +proc setCertificate*(self: DtlsConnection; certificate: TlsCertificate) = + g_dtls_connection_set_certificate(cast[ptr DtlsConnection00](self.impl), cast[ptr TlsCertificate00](certificate.impl)) + +proc `certificate=`*(self: DtlsConnection; certificate: TlsCertificate) = + g_dtls_connection_set_certificate(cast[ptr DtlsConnection00](self.impl), cast[ptr TlsCertificate00](certificate.impl)) + +type + TlsDatabasePrivate00* {.pure.} = object + TlsDatabasePrivate* = ref object + impl*: ptr TlsDatabasePrivate00 + +type + TlsDatabase* = ref object of gobject.Object + TlsDatabase00* = object of gobject.Object00 + priv1: ptr TlsDatabasePrivate00 + +proc g_tls_database_create_certificate_handle*(self: ptr TlsDatabase00; certificate: ptr TlsCertificate00): cstring {. + importc: "g_tls_database_create_certificate_handle", libprag.} + +proc createCertificateHandle*(self: TlsDatabase; certificate: TlsCertificate): string = + let resul0 = g_tls_database_create_certificate_handle(cast[ptr TlsDatabase00](self.impl), cast[ptr TlsCertificate00](certificate.impl)) + result = $resul0 + cogfree(resul0) + +proc g_tls_database_lookup_certificate_for_handle_finish*(self: ptr TlsDatabase00; resu: ptr AsyncResult00): ptr TlsCertificate00 {. + importc: "g_tls_database_lookup_certificate_for_handle_finish", libprag.} + +proc lookupCertificateForHandleFinish*(self: TlsDatabase; resu: AsyncResult): TlsCertificate = + let gobj = g_tls_database_lookup_certificate_for_handle_finish(cast[ptr TlsDatabase00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_database_lookup_certificate_issuer_finish*(self: ptr TlsDatabase00; resu: ptr AsyncResult00): ptr TlsCertificate00 {. + importc: "g_tls_database_lookup_certificate_issuer_finish", libprag.} + +proc lookupCertificateIssuerFinish*(self: TlsDatabase; resu: AsyncResult): TlsCertificate = + let gobj = g_tls_database_lookup_certificate_issuer_finish(cast[ptr TlsDatabase00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_database_lookup_certificates_issued_by_finish*(self: ptr TlsDatabase00; resu: ptr AsyncResult00): ptr pointer {. + importc: "g_tls_database_lookup_certificates_issued_by_finish", libprag.} + +proc lookupCertificatesIssuedByFinish*(self: TlsDatabase; resu: AsyncResult): ptr pointer = + g_tls_database_lookup_certificates_issued_by_finish(cast[ptr TlsDatabase00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_tls_database_verify_chain_finish*(self: ptr TlsDatabase00; resu: ptr AsyncResult00): TlsCertificateFlags {. + importc: "g_tls_database_verify_chain_finish", libprag.} + +proc verifyChainFinish*(self: TlsDatabase; resu: AsyncResult): TlsCertificateFlags = + g_tls_database_verify_chain_finish(cast[ptr TlsDatabase00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_dtls_connection_get_database*(self: ptr DtlsConnection00): ptr TlsDatabase00 {. + importc: "g_dtls_connection_get_database", libprag.} + +proc getDatabase*(self: DtlsConnection): TlsDatabase = + let gobj = g_dtls_connection_get_database(cast[ptr DtlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsDatabase](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc database*(self: DtlsConnection): TlsDatabase = + let gobj = g_dtls_connection_get_database(cast[ptr DtlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsDatabase](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dtls_connection_set_database*(self: ptr DtlsConnection00; database: ptr TlsDatabase00) {. + importc: "g_dtls_connection_set_database", libprag.} + +proc setDatabase*(self: DtlsConnection; database: TlsDatabase) = + g_dtls_connection_set_database(cast[ptr DtlsConnection00](self.impl), cast[ptr TlsDatabase00](database.impl)) + +proc `database=`*(self: DtlsConnection; database: TlsDatabase) = + g_dtls_connection_set_database(cast[ptr DtlsConnection00](self.impl), cast[ptr TlsDatabase00](database.impl)) + +type + TlsInteractionPrivate00* {.pure.} = object + TlsInteractionPrivate* = ref object + impl*: ptr TlsInteractionPrivate00 + +type + TlsInteraction* = ref object of gobject.Object + TlsInteraction00* = object of gobject.Object00 + priv1: ptr TlsInteractionPrivate00 + +proc g_dtls_connection_get_interaction*(self: ptr DtlsConnection00): ptr TlsInteraction00 {. + importc: "g_dtls_connection_get_interaction", libprag.} + +proc getInteraction*(self: DtlsConnection): TlsInteraction = + let gobj = g_dtls_connection_get_interaction(cast[ptr DtlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsInteraction](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc interaction*(self: DtlsConnection): TlsInteraction = + let gobj = g_dtls_connection_get_interaction(cast[ptr DtlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsInteraction](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_dtls_connection_set_interaction*(self: ptr DtlsConnection00; interaction: ptr TlsInteraction00) {. + importc: "g_dtls_connection_set_interaction", libprag.} + +proc setInteraction*(self: DtlsConnection; interaction: TlsInteraction) = + g_dtls_connection_set_interaction(cast[ptr DtlsConnection00](self.impl), cast[ptr TlsInteraction00](interaction.impl)) + +proc `interaction=`*(self: DtlsConnection; interaction: TlsInteraction) = + g_dtls_connection_set_interaction(cast[ptr DtlsConnection00](self.impl), cast[ptr TlsInteraction00](interaction.impl)) + +type + TlsDatabaseLookupFlag* {.size: sizeof(cint), pure.} = enum + keypair = 1 + + TlsDatabaseLookupFlags* {.size: sizeof(cint).} = set[TlsDatabaseLookupFlag] + +proc g_tls_database_lookup_certificate_for_handle*(self: ptr TlsDatabase00; handle: cstring; interaction: ptr TlsInteraction00; + flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00): ptr TlsCertificate00 {. + importc: "g_tls_database_lookup_certificate_for_handle", libprag.} + +proc lookupCertificateForHandle*(self: TlsDatabase; handle: string; interaction: TlsInteraction; + flags: TlsDatabaseLookupFlags; cancellable: Cancellable): TlsCertificate = + let gobj = g_tls_database_lookup_certificate_for_handle(cast[ptr TlsDatabase00](self.impl), cstring(handle), cast[ptr TlsInteraction00](interaction.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_database_lookup_certificate_for_handle_async*(self: ptr TlsDatabase00; handle: cstring; interaction: ptr TlsInteraction00; + flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_tls_database_lookup_certificate_for_handle_async", libprag.} + +proc lookupCertificateForHandleAsync*(self: TlsDatabase; handle: string; interaction: TlsInteraction; + flags: TlsDatabaseLookupFlags; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_tls_database_lookup_certificate_for_handle_async(cast[ptr TlsDatabase00](self.impl), cstring(handle), cast[ptr TlsInteraction00](interaction.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_tls_database_lookup_certificate_issuer*(self: ptr TlsDatabase00; certificate: ptr TlsCertificate00; + interaction: ptr TlsInteraction00; flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00): ptr TlsCertificate00 {. + importc: "g_tls_database_lookup_certificate_issuer", libprag.} + +proc lookupCertificateIssuer*(self: TlsDatabase; certificate: TlsCertificate; interaction: TlsInteraction; + flags: TlsDatabaseLookupFlags; cancellable: Cancellable): TlsCertificate = + let gobj = g_tls_database_lookup_certificate_issuer(cast[ptr TlsDatabase00](self.impl), cast[ptr TlsCertificate00](certificate.impl), cast[ptr TlsInteraction00](interaction.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_database_lookup_certificate_issuer_async*(self: ptr TlsDatabase00; certificate: ptr TlsCertificate00; + interaction: ptr TlsInteraction00; flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_tls_database_lookup_certificate_issuer_async", libprag.} + +proc lookupCertificateIssuerAsync*(self: TlsDatabase; certificate: TlsCertificate; interaction: TlsInteraction; + flags: TlsDatabaseLookupFlags; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_tls_database_lookup_certificate_issuer_async(cast[ptr TlsDatabase00](self.impl), cast[ptr TlsCertificate00](certificate.impl), cast[ptr TlsInteraction00](interaction.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_tls_database_lookup_certificates_issued_by*(self: ptr TlsDatabase00; issuerRawDn: ptr ByteArray00; + interaction: ptr TlsInteraction00; flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00): ptr pointer {. + importc: "g_tls_database_lookup_certificates_issued_by", libprag.} + +proc lookupCertificatesIssuedBy*(self: TlsDatabase; issuerRawDn: ptr ByteArray00; interaction: TlsInteraction; + flags: TlsDatabaseLookupFlags; cancellable: Cancellable): ptr pointer = + g_tls_database_lookup_certificates_issued_by(cast[ptr TlsDatabase00](self.impl), issuerRawDn, cast[ptr TlsInteraction00](interaction.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + +proc g_tls_database_lookup_certificates_issued_by_async*(self: ptr TlsDatabase00; issuerRawDn: ptr ByteArray00; + interaction: ptr TlsInteraction00; flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_tls_database_lookup_certificates_issued_by_async", libprag.} + +proc lookupCertificatesIssuedByAsync*(self: TlsDatabase; issuerRawDn: ptr ByteArray00; interaction: TlsInteraction; + flags: TlsDatabaseLookupFlags; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_tls_database_lookup_certificates_issued_by_async(cast[ptr TlsDatabase00](self.impl), issuerRawDn, cast[ptr TlsInteraction00](interaction.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +type + TlsDatabaseVerifyFlags* {.size: sizeof(cint), pure.} = enum + none = 0 + +proc g_tls_database_verify_chain*(self: ptr TlsDatabase00; chain: ptr TlsCertificate00; + purpose: cstring; identity: ptr SocketConnectable00; interaction: ptr TlsInteraction00; flags: TlsDatabaseVerifyFlags; + cancellable: ptr Cancellable00): TlsCertificateFlags {. + importc: "g_tls_database_verify_chain", libprag.} + +proc verifyChain*(self: TlsDatabase; chain: TlsCertificate; purpose: string; + identity: SocketConnectable; interaction: TlsInteraction; flags: TlsDatabaseVerifyFlags; + cancellable: Cancellable): TlsCertificateFlags = + g_tls_database_verify_chain(cast[ptr TlsDatabase00](self.impl), cast[ptr TlsCertificate00](chain.impl), cstring(purpose), cast[ptr SocketConnectable00](identity.impl), cast[ptr TlsInteraction00](interaction.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + +proc g_tls_database_verify_chain_async*(self: ptr TlsDatabase00; chain: ptr TlsCertificate00; + purpose: cstring; identity: ptr SocketConnectable00; interaction: ptr TlsInteraction00; flags: TlsDatabaseVerifyFlags; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_tls_database_verify_chain_async", libprag.} + +proc verifyChainAsync*(self: TlsDatabase; chain: TlsCertificate; purpose: string; + identity: SocketConnectable; interaction: TlsInteraction; flags: TlsDatabaseVerifyFlags; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_tls_database_verify_chain_async(cast[ptr TlsDatabase00](self.impl), cast[ptr TlsCertificate00](chain.impl), cstring(purpose), cast[ptr SocketConnectable00](identity.impl), cast[ptr TlsInteraction00](interaction.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +type + TlsPasswordPrivate00* {.pure.} = object + TlsPasswordPrivate* = ref object + impl*: ptr TlsPasswordPrivate00 + +type + TlsPassword* = ref object of gobject.Object + TlsPassword00* = object of gobject.Object00 + priv1: ptr TlsPasswordPrivate00 + +proc g_tls_password_get_description*(self: ptr TlsPassword00): cstring {. + importc: "g_tls_password_get_description", libprag.} + +proc getDescription*(self: TlsPassword): string = + let resul0 = g_tls_password_get_description(cast[ptr TlsPassword00](self.impl)) + result = $resul0 + +proc description*(self: TlsPassword): string = + let resul0 = g_tls_password_get_description(cast[ptr TlsPassword00](self.impl)) + result = $resul0 + +proc g_tls_password_get_value*(self: ptr TlsPassword00; length: ptr uint64): ptr uint8 {. + importc: "g_tls_password_get_value", libprag.} + +proc getValue*(self: TlsPassword; length: ptr uint64): ptr uint8 = + g_tls_password_get_value(cast[ptr TlsPassword00](self.impl), length) + +proc value*(self: TlsPassword; length: ptr uint64): ptr uint8 = + g_tls_password_get_value(cast[ptr TlsPassword00](self.impl), length) + +proc g_tls_password_get_warning*(self: ptr TlsPassword00): cstring {. + importc: "g_tls_password_get_warning", libprag.} + +proc getWarning*(self: TlsPassword): string = + let resul0 = g_tls_password_get_warning(cast[ptr TlsPassword00](self.impl)) + result = $resul0 + +proc warning*(self: TlsPassword): string = + let resul0 = g_tls_password_get_warning(cast[ptr TlsPassword00](self.impl)) + result = $resul0 + +proc g_tls_password_set_description*(self: ptr TlsPassword00; description: cstring) {. + importc: "g_tls_password_set_description", libprag.} + +proc setDescription*(self: TlsPassword; description: string) = + g_tls_password_set_description(cast[ptr TlsPassword00](self.impl), cstring(description)) + +proc `description=`*(self: TlsPassword; description: string) = + g_tls_password_set_description(cast[ptr TlsPassword00](self.impl), cstring(description)) + +proc g_tls_password_set_value*(self: ptr TlsPassword00; value: ptr uint8; length: int64) {. + importc: "g_tls_password_set_value", libprag.} + +proc setValue*(self: TlsPassword; value: ptr uint8; length: int64) = + g_tls_password_set_value(cast[ptr TlsPassword00](self.impl), value, length) + +proc g_tls_password_set_value_full*(self: ptr TlsPassword00; value: ptr uint8; length: int64; + destroy: DestroyNotify) {. + importc: "g_tls_password_set_value_full", libprag.} + +proc setValueFull*(self: TlsPassword; value: ptr uint8; length: int64; + destroy: DestroyNotify) = + g_tls_password_set_value_full(cast[ptr TlsPassword00](self.impl), value, length, destroy) + +proc g_tls_password_set_warning*(self: ptr TlsPassword00; warning: cstring) {. + importc: "g_tls_password_set_warning", libprag.} + +proc setWarning*(self: TlsPassword; warning: string) = + g_tls_password_set_warning(cast[ptr TlsPassword00](self.impl), cstring(warning)) + +proc `warning=`*(self: TlsPassword; warning: string) = + g_tls_password_set_warning(cast[ptr TlsPassword00](self.impl), cstring(warning)) + +proc g_tls_interaction_ask_password_async*(self: ptr TlsInteraction00; password: ptr TlsPassword00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_tls_interaction_ask_password_async", libprag.} + +proc askPasswordAsync*(self: TlsInteraction; password: TlsPassword; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_tls_interaction_ask_password_async(cast[ptr TlsInteraction00](self.impl), cast[ptr TlsPassword00](password.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +type + TlsPasswordFlag* {.size: sizeof(cint), pure.} = enum + retry = 2 + manyTries = 3 + finalTry = 4 + + TlsPasswordFlags* {.size: sizeof(cint).} = set[TlsPasswordFlag] + +proc g_tls_password_new*(flags: TlsPasswordFlags; description: cstring): ptr TlsPassword00 {. + importc: "g_tls_password_new", libprag.} + +proc newTlsPassword*(flags: TlsPasswordFlags; description: string): TlsPassword = + new(result, finalizeGObject) + result.impl = g_tls_password_new(flags, cstring(description)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTlsPassword*[T](result: var T; flags: TlsPasswordFlags; description: string) = + assert(result is TlsPassword) + new(result, finalizeGObject) + result.impl = g_tls_password_new(flags, cstring(description)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_password_get_flags*(self: ptr TlsPassword00): TlsPasswordFlags {. + importc: "g_tls_password_get_flags", libprag.} + +proc getFlags*(self: TlsPassword): TlsPasswordFlags = + g_tls_password_get_flags(cast[ptr TlsPassword00](self.impl)) + +proc flags*(self: TlsPassword): TlsPasswordFlags = + g_tls_password_get_flags(cast[ptr TlsPassword00](self.impl)) + +proc g_tls_password_set_flags*(self: ptr TlsPassword00; flags: TlsPasswordFlags) {. + importc: "g_tls_password_set_flags", libprag.} + +proc setFlags*(self: TlsPassword; flags: TlsPasswordFlags) = + g_tls_password_set_flags(cast[ptr TlsPassword00](self.impl), flags) + +proc `flags=`*(self: TlsPassword; flags: TlsPasswordFlags) = + g_tls_password_set_flags(cast[ptr TlsPassword00](self.impl), flags) + +type + TlsConnectionPrivate00* {.pure.} = object + TlsConnectionPrivate* = ref object + impl*: ptr TlsConnectionPrivate00 + +type + TlsConnection* = ref object of IOStream + TlsConnection00* = object of IOStream00 + priv2: ptr TlsConnectionPrivate00 + +proc scAcceptCertificate*(self: TlsConnection; p: proc (self: ptr gobject.Object00; peerCert: TlsCertificate00; errors: TlsCertificateFlags; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "accept-certificate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_tls_connection_emit_accept_certificate*(self: ptr TlsConnection00; peerCert: ptr TlsCertificate00; + errors: TlsCertificateFlags): gboolean {. + importc: "g_tls_connection_emit_accept_certificate", libprag.} + +proc emitAcceptCertificate*(self: TlsConnection; peerCert: TlsCertificate; errors: TlsCertificateFlags): bool = + toBool(g_tls_connection_emit_accept_certificate(cast[ptr TlsConnection00](self.impl), cast[ptr TlsCertificate00](peerCert.impl), errors)) + +proc g_tls_connection_get_certificate*(self: ptr TlsConnection00): ptr TlsCertificate00 {. + importc: "g_tls_connection_get_certificate", libprag.} + +proc getCertificate*(self: TlsConnection): TlsCertificate = + let gobj = g_tls_connection_get_certificate(cast[ptr TlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc certificate*(self: TlsConnection): TlsCertificate = + let gobj = g_tls_connection_get_certificate(cast[ptr TlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_connection_get_database*(self: ptr TlsConnection00): ptr TlsDatabase00 {. + importc: "g_tls_connection_get_database", libprag.} + +proc getDatabase*(self: TlsConnection): TlsDatabase = + let gobj = g_tls_connection_get_database(cast[ptr TlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsDatabase](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc database*(self: TlsConnection): TlsDatabase = + let gobj = g_tls_connection_get_database(cast[ptr TlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsDatabase](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_connection_get_interaction*(self: ptr TlsConnection00): ptr TlsInteraction00 {. + importc: "g_tls_connection_get_interaction", libprag.} + +proc getInteraction*(self: TlsConnection): TlsInteraction = + let gobj = g_tls_connection_get_interaction(cast[ptr TlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsInteraction](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc interaction*(self: TlsConnection): TlsInteraction = + let gobj = g_tls_connection_get_interaction(cast[ptr TlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsInteraction](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_connection_get_peer_certificate*(self: ptr TlsConnection00): ptr TlsCertificate00 {. + importc: "g_tls_connection_get_peer_certificate", libprag.} + +proc getPeerCertificate*(self: TlsConnection): TlsCertificate = + let gobj = g_tls_connection_get_peer_certificate(cast[ptr TlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc peerCertificate*(self: TlsConnection): TlsCertificate = + let gobj = g_tls_connection_get_peer_certificate(cast[ptr TlsConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsCertificate](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_connection_get_peer_certificate_errors*(self: ptr TlsConnection00): TlsCertificateFlags {. + importc: "g_tls_connection_get_peer_certificate_errors", libprag.} + +proc getPeerCertificateErrors*(self: TlsConnection): TlsCertificateFlags = + g_tls_connection_get_peer_certificate_errors(cast[ptr TlsConnection00](self.impl)) + +proc peerCertificateErrors*(self: TlsConnection): TlsCertificateFlags = + g_tls_connection_get_peer_certificate_errors(cast[ptr TlsConnection00](self.impl)) + +proc g_tls_connection_get_require_close_notify*(self: ptr TlsConnection00): gboolean {. + importc: "g_tls_connection_get_require_close_notify", libprag.} + +proc getRequireCloseNotify*(self: TlsConnection): bool = + toBool(g_tls_connection_get_require_close_notify(cast[ptr TlsConnection00](self.impl))) + +proc requireCloseNotify*(self: TlsConnection): bool = + toBool(g_tls_connection_get_require_close_notify(cast[ptr TlsConnection00](self.impl))) + +proc g_tls_connection_get_use_system_certdb*(self: ptr TlsConnection00): gboolean {. + importc: "g_tls_connection_get_use_system_certdb", libprag.} + +proc getUseSystemCertdb*(self: TlsConnection): bool = + toBool(g_tls_connection_get_use_system_certdb(cast[ptr TlsConnection00](self.impl))) + +proc useSystemCertdb*(self: TlsConnection): bool = + toBool(g_tls_connection_get_use_system_certdb(cast[ptr TlsConnection00](self.impl))) + +proc g_tls_connection_handshake*(self: ptr TlsConnection00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_tls_connection_handshake", libprag.} + +proc handshake*(self: TlsConnection; cancellable: Cancellable): bool = + toBool(g_tls_connection_handshake(cast[ptr TlsConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_tls_connection_handshake_async*(self: ptr TlsConnection00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_tls_connection_handshake_async", libprag.} + +proc handshakeAsync*(self: TlsConnection; ioPriority: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_tls_connection_handshake_async(cast[ptr TlsConnection00](self.impl), int32(ioPriority), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_tls_connection_handshake_finish*(self: ptr TlsConnection00; resu: ptr AsyncResult00): gboolean {. + importc: "g_tls_connection_handshake_finish", libprag.} + +proc handshakeFinish*(self: TlsConnection; resu: AsyncResult): bool = + toBool(g_tls_connection_handshake_finish(cast[ptr TlsConnection00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_tls_connection_set_certificate*(self: ptr TlsConnection00; certificate: ptr TlsCertificate00) {. + importc: "g_tls_connection_set_certificate", libprag.} + +proc setCertificate*(self: TlsConnection; certificate: TlsCertificate) = + g_tls_connection_set_certificate(cast[ptr TlsConnection00](self.impl), cast[ptr TlsCertificate00](certificate.impl)) + +proc `certificate=`*(self: TlsConnection; certificate: TlsCertificate) = + g_tls_connection_set_certificate(cast[ptr TlsConnection00](self.impl), cast[ptr TlsCertificate00](certificate.impl)) + +proc g_tls_connection_set_database*(self: ptr TlsConnection00; database: ptr TlsDatabase00) {. + importc: "g_tls_connection_set_database", libprag.} + +proc setDatabase*(self: TlsConnection; database: TlsDatabase) = + g_tls_connection_set_database(cast[ptr TlsConnection00](self.impl), cast[ptr TlsDatabase00](database.impl)) + +proc `database=`*(self: TlsConnection; database: TlsDatabase) = + g_tls_connection_set_database(cast[ptr TlsConnection00](self.impl), cast[ptr TlsDatabase00](database.impl)) + +proc g_tls_connection_set_interaction*(self: ptr TlsConnection00; interaction: ptr TlsInteraction00) {. + importc: "g_tls_connection_set_interaction", libprag.} + +proc setInteraction*(self: TlsConnection; interaction: TlsInteraction) = + g_tls_connection_set_interaction(cast[ptr TlsConnection00](self.impl), cast[ptr TlsInteraction00](interaction.impl)) + +proc `interaction=`*(self: TlsConnection; interaction: TlsInteraction) = + g_tls_connection_set_interaction(cast[ptr TlsConnection00](self.impl), cast[ptr TlsInteraction00](interaction.impl)) + +proc g_tls_connection_set_require_close_notify*(self: ptr TlsConnection00; requireCloseNotify: gboolean) {. + importc: "g_tls_connection_set_require_close_notify", libprag.} + +proc setRequireCloseNotify*(self: TlsConnection; requireCloseNotify: bool) = + g_tls_connection_set_require_close_notify(cast[ptr TlsConnection00](self.impl), gboolean(requireCloseNotify)) + +proc `requireCloseNotify=`*(self: TlsConnection; requireCloseNotify: bool) = + g_tls_connection_set_require_close_notify(cast[ptr TlsConnection00](self.impl), gboolean(requireCloseNotify)) + +proc g_tls_connection_set_use_system_certdb*(self: ptr TlsConnection00; useSystemCertdb: gboolean) {. + importc: "g_tls_connection_set_use_system_certdb", libprag.} + +proc setUseSystemCertdb*(self: TlsConnection; useSystemCertdb: bool) = + g_tls_connection_set_use_system_certdb(cast[ptr TlsConnection00](self.impl), gboolean(useSystemCertdb)) + +proc `useSystemCertdb=`*(self: TlsConnection; useSystemCertdb: bool) = + g_tls_connection_set_use_system_certdb(cast[ptr TlsConnection00](self.impl), gboolean(useSystemCertdb)) + +type + TlsCertificateRequestFlags* {.size: sizeof(cint), pure.} = enum + none = 0 + +proc g_tls_interaction_request_certificate_async*(self: ptr TlsInteraction00; connection: ptr TlsConnection00; + flags: TlsCertificateRequestFlags; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {. + importc: "g_tls_interaction_request_certificate_async", libprag.} + +proc requestCertificateAsync*(self: TlsInteraction; connection: TlsConnection; flags: TlsCertificateRequestFlags; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_tls_interaction_request_certificate_async(cast[ptr TlsInteraction00](self.impl), cast[ptr TlsConnection00](connection.impl), flags, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +type + TlsInteractionResult* {.size: sizeof(cint), pure.} = enum + unhandled = 0 + handled = 1 + failed = 2 + +proc g_tls_interaction_ask_password*(self: ptr TlsInteraction00; password: ptr TlsPassword00; + cancellable: ptr Cancellable00): TlsInteractionResult {. + importc: "g_tls_interaction_ask_password", libprag.} + +proc askPassword*(self: TlsInteraction; password: TlsPassword; cancellable: Cancellable): TlsInteractionResult = + g_tls_interaction_ask_password(cast[ptr TlsInteraction00](self.impl), cast[ptr TlsPassword00](password.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_tls_interaction_ask_password_finish*(self: ptr TlsInteraction00; resu: ptr AsyncResult00): TlsInteractionResult {. + importc: "g_tls_interaction_ask_password_finish", libprag.} + +proc askPasswordFinish*(self: TlsInteraction; resu: AsyncResult): TlsInteractionResult = + g_tls_interaction_ask_password_finish(cast[ptr TlsInteraction00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_tls_interaction_invoke_ask_password*(self: ptr TlsInteraction00; password: ptr TlsPassword00; + cancellable: ptr Cancellable00): TlsInteractionResult {. + importc: "g_tls_interaction_invoke_ask_password", libprag.} + +proc invokeAskPassword*(self: TlsInteraction; password: TlsPassword; cancellable: Cancellable): TlsInteractionResult = + g_tls_interaction_invoke_ask_password(cast[ptr TlsInteraction00](self.impl), cast[ptr TlsPassword00](password.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_tls_interaction_invoke_request_certificate*(self: ptr TlsInteraction00; connection: ptr TlsConnection00; + flags: TlsCertificateRequestFlags; cancellable: ptr Cancellable00): TlsInteractionResult {. + importc: "g_tls_interaction_invoke_request_certificate", libprag.} + +proc invokeRequestCertificate*(self: TlsInteraction; connection: TlsConnection; flags: TlsCertificateRequestFlags; + cancellable: Cancellable): TlsInteractionResult = + g_tls_interaction_invoke_request_certificate(cast[ptr TlsInteraction00](self.impl), cast[ptr TlsConnection00](connection.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + +proc g_tls_interaction_request_certificate*(self: ptr TlsInteraction00; connection: ptr TlsConnection00; + flags: TlsCertificateRequestFlags; cancellable: ptr Cancellable00): TlsInteractionResult {. + importc: "g_tls_interaction_request_certificate", libprag.} + +proc requestCertificate*(self: TlsInteraction; connection: TlsConnection; flags: TlsCertificateRequestFlags; + cancellable: Cancellable): TlsInteractionResult = + g_tls_interaction_request_certificate(cast[ptr TlsInteraction00](self.impl), cast[ptr TlsConnection00](connection.impl), flags, cast[ptr Cancellable00](cancellable.impl)) + +proc g_tls_interaction_request_certificate_finish*(self: ptr TlsInteraction00; resu: ptr AsyncResult00): TlsInteractionResult {. + importc: "g_tls_interaction_request_certificate_finish", libprag.} + +proc requestCertificateFinish*(self: TlsInteraction; resu: AsyncResult): TlsInteractionResult = + g_tls_interaction_request_certificate_finish(cast[ptr TlsInteraction00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +type + TlsRehandshakeMode* {.size: sizeof(cint), pure.} = enum + never = 0 + safely = 1 + unsafely = 2 + +proc g_dtls_connection_get_rehandshake_mode*(self: ptr DtlsConnection00): TlsRehandshakeMode {. + importc: "g_dtls_connection_get_rehandshake_mode", libprag.} + +proc getRehandshakeMode*(self: DtlsConnection): TlsRehandshakeMode = + g_dtls_connection_get_rehandshake_mode(cast[ptr DtlsConnection00](self.impl)) + +proc rehandshakeMode*(self: DtlsConnection): TlsRehandshakeMode = + g_dtls_connection_get_rehandshake_mode(cast[ptr DtlsConnection00](self.impl)) + +proc g_dtls_connection_set_rehandshake_mode*(self: ptr DtlsConnection00; mode: TlsRehandshakeMode) {. + importc: "g_dtls_connection_set_rehandshake_mode", libprag.} + +proc setRehandshakeMode*(self: DtlsConnection; mode: TlsRehandshakeMode) = + g_dtls_connection_set_rehandshake_mode(cast[ptr DtlsConnection00](self.impl), mode) + +proc `rehandshakeMode=`*(self: DtlsConnection; mode: TlsRehandshakeMode) = + g_dtls_connection_set_rehandshake_mode(cast[ptr DtlsConnection00](self.impl), mode) + +proc g_tls_connection_get_rehandshake_mode*(self: ptr TlsConnection00): TlsRehandshakeMode {. + importc: "g_tls_connection_get_rehandshake_mode", libprag.} + +proc getRehandshakeMode*(self: TlsConnection): TlsRehandshakeMode = + g_tls_connection_get_rehandshake_mode(cast[ptr TlsConnection00](self.impl)) + +proc rehandshakeMode*(self: TlsConnection): TlsRehandshakeMode = + g_tls_connection_get_rehandshake_mode(cast[ptr TlsConnection00](self.impl)) + +proc g_tls_connection_set_rehandshake_mode*(self: ptr TlsConnection00; mode: TlsRehandshakeMode) {. + importc: "g_tls_connection_set_rehandshake_mode", libprag.} + +proc setRehandshakeMode*(self: TlsConnection; mode: TlsRehandshakeMode) = + g_tls_connection_set_rehandshake_mode(cast[ptr TlsConnection00](self.impl), mode) + +proc `rehandshakeMode=`*(self: TlsConnection; mode: TlsRehandshakeMode) = + g_tls_connection_set_rehandshake_mode(cast[ptr TlsConnection00](self.impl), mode) + +type + DtlsConnectionInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + acceptCertificate*: proc(connection: ptr DtlsConnection00; peerCert: ptr TlsCertificate00; + errors: TlsCertificateFlags): gboolean {.cdecl.} + handshake*: proc(conn: ptr DtlsConnection00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + handshakeAsync*: proc(conn: ptr DtlsConnection00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + handshakeFinish*: proc(conn: ptr DtlsConnection00; resu: ptr AsyncResult00): gboolean {.cdecl.} + shutdown*: proc(conn: ptr DtlsConnection00; shutdownRead: gboolean; + shutdownWrite: gboolean; cancellable: ptr Cancellable00): gboolean {.cdecl.} + shutdownAsync*: proc(conn: ptr DtlsConnection00; shutdownRead: gboolean; + shutdownWrite: gboolean; ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + shutdownFinish*: proc(conn: ptr DtlsConnection00; resu: ptr AsyncResult00): gboolean {.cdecl.} + DtlsConnectionInterface* = ref object + impl*: ptr DtlsConnectionInterface00 + +type + DtlsServerConnection00* {.pure.} = object + DtlsServerConnection* = ref object + impl*: ptr DtlsServerConnection00 + +proc g_dtls_server_connection_new*(baseSocket: ptr DatagramBased00; certificate: ptr TlsCertificate00): ptr DtlsServerConnection00 {. + importc: "g_dtls_server_connection_new", libprag.} + +proc newDtlsServerConnection*(baseSocket: DatagramBased; certificate: TlsCertificate): DtlsServerConnection = + new(result) + result.impl = g_dtls_server_connection_new(cast[ptr DatagramBased00](baseSocket.impl), cast[ptr TlsCertificate00](certificate.impl)) + +type + DtlsServerConnectionInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + DtlsServerConnectionInterface* = ref object + impl*: ptr DtlsServerConnectionInterface00 + +type + Emblem* = ref object of gobject.Object + Emblem00* = object of gobject.Object00 + +proc g_emblem_new*(icon: ptr Icon00): ptr Emblem00 {. + importc: "g_emblem_new", libprag.} + +proc newEmblem*(icon: Icon): Emblem = + new(result, finalizeGObject) + result.impl = g_emblem_new(cast[ptr Icon00](icon.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initEmblem*[T](result: var T; icon: Icon) = + assert(result is Emblem) + new(result, finalizeGObject) + result.impl = g_emblem_new(cast[ptr Icon00](icon.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_emblem_get_icon*(self: ptr Emblem00): ptr Icon00 {. + importc: "g_emblem_get_icon", libprag.} + +proc getIcon*(self: Emblem): Icon = + new(result) + result.impl = g_emblem_get_icon(cast[ptr Emblem00](self.impl)) + +proc icon*(self: Emblem): Icon = + new(result) + result.impl = g_emblem_get_icon(cast[ptr Emblem00](self.impl)) + +type + EmblemOrigin* {.size: sizeof(cint), pure.} = enum + unknown = 0 + device = 1 + livemetadata = 2 + tag = 3 + +proc g_emblem_new_with_origin*(icon: ptr Icon00; origin: EmblemOrigin): ptr Emblem00 {. + importc: "g_emblem_new_with_origin", libprag.} + +proc newEmblemWithOrigin*(icon: Icon; origin: EmblemOrigin): Emblem = + new(result, finalizeGObject) + result.impl = g_emblem_new_with_origin(cast[ptr Icon00](icon.impl), origin) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initEmblemWithOrigin*[T](result: var T; icon: Icon; origin: EmblemOrigin) = + assert(result is Emblem) + new(result, finalizeGObject) + result.impl = g_emblem_new_with_origin(cast[ptr Icon00](icon.impl), origin) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_emblem_get_origin*(self: ptr Emblem00): EmblemOrigin {. + importc: "g_emblem_get_origin", libprag.} + +proc getOrigin*(self: Emblem): EmblemOrigin = + g_emblem_get_origin(cast[ptr Emblem00](self.impl)) + +proc origin*(self: Emblem): EmblemOrigin = + g_emblem_get_origin(cast[ptr Emblem00](self.impl)) + +type + EmblemClass00* {.pure.} = object + EmblemClass* = ref object + impl*: ptr EmblemClass00 + +type + EmblemedIconPrivate00* {.pure.} = object + EmblemedIconPrivate* = ref object + impl*: ptr EmblemedIconPrivate00 + +type + EmblemedIcon* = ref object of gobject.Object + EmblemedIcon00* = object of gobject.Object00 + priv1: ptr EmblemedIconPrivate00 + +proc g_emblemed_icon_new*(icon: ptr Icon00; emblem: ptr Emblem00): ptr EmblemedIcon00 {. + importc: "g_emblemed_icon_new", libprag.} + +proc newEmblemedIcon*(icon: Icon; emblem: Emblem): EmblemedIcon = + new(result, finalizeGObject) + result.impl = g_emblemed_icon_new(cast[ptr Icon00](icon.impl), cast[ptr Emblem00](emblem.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initEmblemedIcon*[T](result: var T; icon: Icon; emblem: Emblem) = + assert(result is EmblemedIcon) + new(result, finalizeGObject) + result.impl = g_emblemed_icon_new(cast[ptr Icon00](icon.impl), cast[ptr Emblem00](emblem.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_emblemed_icon_add_emblem*(self: ptr EmblemedIcon00; emblem: ptr Emblem00) {. + importc: "g_emblemed_icon_add_emblem", libprag.} + +proc addEmblem*(self: EmblemedIcon; emblem: Emblem) = + g_emblemed_icon_add_emblem(cast[ptr EmblemedIcon00](self.impl), cast[ptr Emblem00](emblem.impl)) + +proc g_emblemed_icon_clear_emblems*(self: ptr EmblemedIcon00) {. + importc: "g_emblemed_icon_clear_emblems", libprag.} + +proc clearEmblems*(self: EmblemedIcon) = + g_emblemed_icon_clear_emblems(cast[ptr EmblemedIcon00](self.impl)) + +proc g_emblemed_icon_get_emblems*(self: ptr EmblemedIcon00): ptr pointer {. + importc: "g_emblemed_icon_get_emblems", libprag.} + +proc getEmblems*(self: EmblemedIcon): ptr pointer = + g_emblemed_icon_get_emblems(cast[ptr EmblemedIcon00](self.impl)) + +proc emblems*(self: EmblemedIcon): ptr pointer = + g_emblemed_icon_get_emblems(cast[ptr EmblemedIcon00](self.impl)) + +proc g_emblemed_icon_get_icon*(self: ptr EmblemedIcon00): ptr Icon00 {. + importc: "g_emblemed_icon_get_icon", libprag.} + +proc getIcon*(self: EmblemedIcon): Icon = + new(result) + result.impl = g_emblemed_icon_get_icon(cast[ptr EmblemedIcon00](self.impl)) + +proc icon*(self: EmblemedIcon): Icon = + new(result) + result.impl = g_emblemed_icon_get_icon(cast[ptr EmblemedIcon00](self.impl)) + +type + EmblemedIconClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + EmblemedIconClass* = ref object + impl*: ptr EmblemedIconClass00 + +const FILE_ATTRIBUTE_ACCESS_CAN_DELETE* = "access::can-delete" + +const FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE* = "access::can-execute" + +const FILE_ATTRIBUTE_ACCESS_CAN_READ* = "access::can-read" + +const FILE_ATTRIBUTE_ACCESS_CAN_RENAME* = "access::can-rename" + +const FILE_ATTRIBUTE_ACCESS_CAN_TRASH* = "access::can-trash" + +const FILE_ATTRIBUTE_ACCESS_CAN_WRITE* = "access::can-write" + +const FILE_ATTRIBUTE_DOS_IS_ARCHIVE* = "dos::is-archive" + +const FILE_ATTRIBUTE_DOS_IS_SYSTEM* = "dos::is-system" + +const FILE_ATTRIBUTE_ETAG_VALUE* = "etag::value" + +const FILE_ATTRIBUTE_FILESYSTEM_FREE* = "filesystem::free" + +const FILE_ATTRIBUTE_FILESYSTEM_READONLY* = "filesystem::readonly" + +const FILE_ATTRIBUTE_FILESYSTEM_REMOTE* = "filesystem::remote" + +const FILE_ATTRIBUTE_FILESYSTEM_SIZE* = "filesystem::size" + +const FILE_ATTRIBUTE_FILESYSTEM_TYPE* = "filesystem::type" + +const FILE_ATTRIBUTE_FILESYSTEM_USED* = "filesystem::used" + +const FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW* = "filesystem::use-preview" + +const FILE_ATTRIBUTE_GVFS_BACKEND* = "gvfs::backend" + +const FILE_ATTRIBUTE_ID_FILE* = "id::file" + +const FILE_ATTRIBUTE_ID_FILESYSTEM* = "id::filesystem" + +const FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT* = "mountable::can-eject" + +const FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT* = "mountable::can-mount" + +const FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL* = "mountable::can-poll" + +const FILE_ATTRIBUTE_MOUNTABLE_CAN_START* = "mountable::can-start" + +const FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED* = "mountable::can-start-degraded" + +const FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP* = "mountable::can-stop" + +const FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT* = "mountable::can-unmount" + +const FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI* = "mountable::hal-udi" + +const FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC* = "mountable::is-media-check-automatic" + +const FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE* = "mountable::start-stop-type" + +const FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE* = "mountable::unix-device" + +const FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE* = "mountable::unix-device-file" + +const FILE_ATTRIBUTE_OWNER_GROUP* = "owner::group" + +const FILE_ATTRIBUTE_OWNER_USER* = "owner::user" + +const FILE_ATTRIBUTE_OWNER_USER_REAL* = "owner::user-real" + +const FILE_ATTRIBUTE_PREVIEW_ICON* = "preview::icon" + +const FILE_ATTRIBUTE_SELINUX_CONTEXT* = "selinux::context" + +const FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE* = "standard::allocated-size" + +const FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE* = "standard::content-type" + +const FILE_ATTRIBUTE_STANDARD_COPY_NAME* = "standard::copy-name" + +const FILE_ATTRIBUTE_STANDARD_DESCRIPTION* = "standard::description" + +const FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME* = "standard::display-name" + +const FILE_ATTRIBUTE_STANDARD_EDIT_NAME* = "standard::edit-name" + +const FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE* = "standard::fast-content-type" + +const FILE_ATTRIBUTE_STANDARD_ICON* = "standard::icon" + +const FILE_ATTRIBUTE_STANDARD_IS_BACKUP* = "standard::is-backup" + +const FILE_ATTRIBUTE_STANDARD_IS_HIDDEN* = "standard::is-hidden" + +const FILE_ATTRIBUTE_STANDARD_IS_SYMLINK* = "standard::is-symlink" + +const FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL* = "standard::is-virtual" + +const FILE_ATTRIBUTE_STANDARD_IS_VOLATILE* = "standard::is-volatile" + +const FILE_ATTRIBUTE_STANDARD_NAME* = "standard::name" + +const FILE_ATTRIBUTE_STANDARD_SIZE* = "standard::size" + +const FILE_ATTRIBUTE_STANDARD_SORT_ORDER* = "standard::sort-order" + +const FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON* = "standard::symbolic-icon" + +const FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET* = "standard::symlink-target" + +const FILE_ATTRIBUTE_STANDARD_TARGET_URI* = "standard::target-uri" + +const FILE_ATTRIBUTE_STANDARD_TYPE* = "standard::type" + +const FILE_ATTRIBUTE_THUMBNAILING_FAILED* = "thumbnail::failed" + +const FILE_ATTRIBUTE_THUMBNAIL_IS_VALID* = "thumbnail::is-valid" + +const FILE_ATTRIBUTE_THUMBNAIL_PATH* = "thumbnail::path" + +const FILE_ATTRIBUTE_TIME_ACCESS* = "time::access" + +const FILE_ATTRIBUTE_TIME_ACCESS_USEC* = "time::access-usec" + +const FILE_ATTRIBUTE_TIME_CHANGED* = "time::changed" + +const FILE_ATTRIBUTE_TIME_CHANGED_USEC* = "time::changed-usec" + +const FILE_ATTRIBUTE_TIME_CREATED* = "time::created" + +const FILE_ATTRIBUTE_TIME_CREATED_USEC* = "time::created-usec" + +const FILE_ATTRIBUTE_TIME_MODIFIED* = "time::modified" + +const FILE_ATTRIBUTE_TIME_MODIFIED_USEC* = "time::modified-usec" + +const FILE_ATTRIBUTE_TRASH_DELETION_DATE* = "trash::deletion-date" + +const FILE_ATTRIBUTE_TRASH_ITEM_COUNT* = "trash::item-count" + +const FILE_ATTRIBUTE_TRASH_ORIG_PATH* = "trash::orig-path" + +const FILE_ATTRIBUTE_UNIX_BLOCKS* = "unix::blocks" + +const FILE_ATTRIBUTE_UNIX_BLOCK_SIZE* = "unix::block-size" + +const FILE_ATTRIBUTE_UNIX_DEVICE* = "unix::device" + +const FILE_ATTRIBUTE_UNIX_GID* = "unix::gid" + +const FILE_ATTRIBUTE_UNIX_INODE* = "unix::inode" + +const FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT* = "unix::is-mountpoint" + +const FILE_ATTRIBUTE_UNIX_MODE* = "unix::mode" + +const FILE_ATTRIBUTE_UNIX_NLINK* = "unix::nlink" + +const FILE_ATTRIBUTE_UNIX_RDEV* = "unix::rdev" + +const FILE_ATTRIBUTE_UNIX_UID* = "unix::uid" + +type + FileDescriptorBased00* {.pure.} = object + FileDescriptorBased* = ref object + impl*: ptr FileDescriptorBased00 + +proc g_file_descriptor_based_get_fd*(self: ptr FileDescriptorBased00): int32 {. + importc: "g_file_descriptor_based_get_fd", libprag.} + +proc getFd*(self: FileDescriptorBased): int = + int(g_file_descriptor_based_get_fd(cast[ptr FileDescriptorBased00](self.impl))) + +proc fd*(self: FileDescriptorBased): int = + int(g_file_descriptor_based_get_fd(cast[ptr FileDescriptorBased00](self.impl))) + +type + FileDescriptorBasedIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + getFd*: proc(fdBased: ptr FileDescriptorBased00): int32 {.cdecl.} + FileDescriptorBasedIface* = ref object + impl*: ptr FileDescriptorBasedIface00 + +type + FileEnumeratorClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + nextFile*: proc(enumerator: ptr FileEnumerator00; cancellable: ptr Cancellable00): ptr FileInfo00 {.cdecl.} + closeFn*: proc(enumerator: ptr FileEnumerator00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + nextFilesAsync*: proc(enumerator: ptr FileEnumerator00; numFiles: int32; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + nextFilesFinish*: proc(enumerator: ptr FileEnumerator00; resu: ptr AsyncResult00): ptr pointer {.cdecl.} + closeAsync*: proc(enumerator: ptr FileEnumerator00; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + closeFinish*: proc(enumerator: ptr FileEnumerator00; resu: ptr AsyncResult00): gboolean {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + gReserved7*: pointer + FileEnumeratorClass* = ref object + impl*: ptr FileEnumeratorClass00 + +type + IOStreamClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getInputStream*: proc(stream: ptr IOStream00): ptr InputStream00 {.cdecl.} + getOutputStream*: proc(stream: ptr IOStream00): ptr OutputStream00 {.cdecl.} + closeFn*: proc(stream: ptr IOStream00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + closeAsync*: proc(stream: ptr IOStream00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + closeFinish*: proc(stream: ptr IOStream00; resu: ptr AsyncResult00): gboolean {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + gReserved7*: pointer + gReserved8*: pointer + gReserved9*: pointer + gReserved10*: pointer + IOStreamClass* = ref object + impl*: ptr IOStreamClass00 + +type + FileIOStreamClass00* {.pure.} = object + parentClass*: IOStreamClass00 + tell*: proc(stream: ptr FileIOStream00): int64 {.cdecl.} + canSeek*: proc(stream: ptr FileIOStream00): gboolean {.cdecl.} + seek*: proc(stream: ptr FileIOStream00; offset: int64; `type`: glib.SeekType; + cancellable: ptr Cancellable00): gboolean {.cdecl.} + canTruncate*: proc(stream: ptr FileIOStream00): gboolean {.cdecl.} + truncateFn*: proc(stream: ptr FileIOStream00; size: int64; cancellable: ptr Cancellable00): gboolean {.cdecl.} + queryInfo*: proc(stream: ptr FileIOStream00; attributes: cstring; cancellable: ptr Cancellable00): ptr FileInfo00 {.cdecl.} + queryInfoAsync*: proc(stream: ptr FileIOStream00; attributes: cstring; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + queryInfoFinish*: proc(stream: ptr FileIOStream00; resu: ptr AsyncResult00): ptr FileInfo00 {.cdecl.} + getEtag*: proc(stream: ptr FileIOStream00): cstring {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + FileIOStreamClass* = ref object + impl*: ptr FileIOStreamClass00 + +type + FileIcon* = ref object of gobject.Object + FileIcon00* = object of gobject.Object00 + +proc g_file_icon_new*(file: ptr File00): ptr FileIcon00 {. + importc: "g_file_icon_new", libprag.} + +proc newFileIcon*(file: File): FileIcon = + new(result, finalizeGObject) + result.impl = g_file_icon_new(cast[ptr File00](file.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFileIcon*[T](result: var T; file: File) = + assert(result is FileIcon) + new(result, finalizeGObject) + result.impl = g_file_icon_new(cast[ptr File00](file.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_file_icon_get_file*(self: ptr FileIcon00): ptr File00 {. + importc: "g_file_icon_get_file", libprag.} + +proc getFile*(self: FileIcon): File = + new(result) + result.impl = g_file_icon_get_file(cast[ptr FileIcon00](self.impl)) + +proc file*(self: FileIcon): File = + new(result) + result.impl = g_file_icon_get_file(cast[ptr FileIcon00](self.impl)) + +type + FileIconClass00* {.pure.} = object + FileIconClass* = ref object + impl*: ptr FileIconClass00 + +type + FileInfoClass00* {.pure.} = object + FileInfoClass* = ref object + impl*: ptr FileInfoClass00 + +type + FileInputStreamClass00* {.pure.} = object + parentClass*: InputStreamClass00 + tell*: proc(stream: ptr FileInputStream00): int64 {.cdecl.} + canSeek*: proc(stream: ptr FileInputStream00): gboolean {.cdecl.} + seek*: proc(stream: ptr FileInputStream00; offset: int64; `type`: glib.SeekType; + cancellable: ptr Cancellable00): gboolean {.cdecl.} + queryInfo*: proc(stream: ptr FileInputStream00; attributes: cstring; + cancellable: ptr Cancellable00): ptr FileInfo00 {.cdecl.} + queryInfoAsync*: proc(stream: ptr FileInputStream00; attributes: cstring; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + queryInfoFinish*: proc(stream: ptr FileInputStream00; resu: ptr AsyncResult00): ptr FileInfo00 {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + FileInputStreamClass* = ref object + impl*: ptr FileInputStreamClass00 + +type + FileMeasureFlag* {.size: sizeof(cint), pure.} = enum + reportAnyError = 2 + apparentSize = 3 + noXdev = 4 + + FileMeasureFlags* {.size: sizeof(cint).} = set[FileMeasureFlag] + +type + FileMeasureProgressCallback* = proc (reporting: gboolean; currentSize: uint64; numDirs: uint64; + numFiles: uint64; userData: pointer) {.cdecl.} + +type + FileMonitorClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + changed*: proc(monitor: ptr FileMonitor00; file: ptr File00; otherFile: ptr File00; + eventType: FileMonitorEvent) {.cdecl.} + cancel*: proc(monitor: ptr FileMonitor00): gboolean {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + FileMonitorClass* = ref object + impl*: ptr FileMonitorClass00 + +type + FileOutputStreamClass00* {.pure.} = object + parentClass*: OutputStreamClass00 + tell*: proc(stream: ptr FileOutputStream00): int64 {.cdecl.} + canSeek*: proc(stream: ptr FileOutputStream00): gboolean {.cdecl.} + seek*: proc(stream: ptr FileOutputStream00; offset: int64; `type`: glib.SeekType; + cancellable: ptr Cancellable00): gboolean {.cdecl.} + canTruncate*: proc(stream: ptr FileOutputStream00): gboolean {.cdecl.} + truncateFn*: proc(stream: ptr FileOutputStream00; size: int64; cancellable: ptr Cancellable00): gboolean {.cdecl.} + queryInfo*: proc(stream: ptr FileOutputStream00; attributes: cstring; + cancellable: ptr Cancellable00): ptr FileInfo00 {.cdecl.} + queryInfoAsync*: proc(stream: ptr FileOutputStream00; attributes: cstring; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + queryInfoFinish*: proc(stream: ptr FileOutputStream00; resu: ptr AsyncResult00): ptr FileInfo00 {.cdecl.} + getEtag*: proc(stream: ptr FileOutputStream00): cstring {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + FileOutputStreamClass* = ref object + impl*: ptr FileOutputStreamClass00 + +type + FileProgressCallback* = proc (currentNumBytes: int64; totalNumBytes: int64; userData: pointer) {.cdecl.} + +type + FileIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + dup*: proc(file: ptr File00): ptr File00 {.cdecl.} + hash*: proc(file: ptr File00): uint32 {.cdecl.} + equal*: proc(file1: ptr File00; file2: ptr File00): gboolean {.cdecl.} + isNative*: proc(file: ptr File00): gboolean {.cdecl.} + hasUriScheme*: proc(file: ptr File00; uriScheme: cstring): gboolean {.cdecl.} + getUriScheme*: proc(file: ptr File00): cstring {.cdecl.} + getBasename*: proc(file: ptr File00): cstring {.cdecl.} + getPath*: proc(file: ptr File00): cstring {.cdecl.} + getUri*: proc(file: ptr File00): cstring {.cdecl.} + getParseName*: proc(file: ptr File00): cstring {.cdecl.} + getParent*: proc(file: ptr File00): ptr File00 {.cdecl.} + prefixMatches*: proc(prefix: ptr File00; file: ptr File00): gboolean {.cdecl.} + getRelativePath*: proc(parent: ptr File00; descendant: ptr File00): cstring {.cdecl.} + resolveRelativePath*: proc(file: ptr File00; relativePath: ucstring): ptr File00 {.cdecl.} + getChildForDisplayName*: proc(file: ptr File00; displayName: cstring): ptr File00 {.cdecl.} + enumerateChildren*: proc(file: ptr File00; attributes: cstring; flags: FileQueryInfoFlags; + cancellable: ptr Cancellable00): ptr FileEnumerator00 {.cdecl.} + enumerateChildrenAsync*: proc(file: ptr File00; attributes: cstring; flags: FileQueryInfoFlags; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + enumerateChildrenFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileEnumerator00 {.cdecl.} + queryInfo*: proc(file: ptr File00; attributes: cstring; flags: FileQueryInfoFlags; + cancellable: ptr Cancellable00): ptr FileInfo00 {.cdecl.} + queryInfoAsync*: proc(file: ptr File00; attributes: cstring; flags: FileQueryInfoFlags; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + queryInfoFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileInfo00 {.cdecl.} + queryFilesystemInfo*: proc(file: ptr File00; attributes: cstring; cancellable: ptr Cancellable00): ptr FileInfo00 {.cdecl.} + queryFilesystemInfoAsync*: proc(file: ptr File00; attributes: cstring; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + queryFilesystemInfoFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileInfo00 {.cdecl.} + findEnclosingMount*: proc(file: ptr File00; cancellable: ptr Cancellable00): ptr Mount00 {.cdecl.} + findEnclosingMountAsync*: proc(file: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + findEnclosingMountFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr Mount00 {.cdecl.} + setDisplayName*: proc(file: ptr File00; displayName: cstring; cancellable: ptr Cancellable00): ptr File00 {.cdecl.} + setDisplayNameAsync*: proc(file: ptr File00; displayName: cstring; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + setDisplayNameFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr File00 {.cdecl.} + querySettableAttributes*: proc(file: ptr File00; cancellable: ptr Cancellable00): ptr FileAttributeInfoList00 {.cdecl.} + querySettableAttributesAsync*: pointer + querySettableAttributesFinish*: pointer + queryWritableNamespaces*: proc(file: ptr File00; cancellable: ptr Cancellable00): ptr FileAttributeInfoList00 {.cdecl.} + queryWritableNamespacesAsync*: pointer + queryWritableNamespacesFinish*: pointer + setAttribute*: proc(file: ptr File00; attribute: cstring; `type`: FileAttributeType; + valueP: pointer; flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): gboolean {.cdecl.} + setAttributesFromInfo*: proc(file: ptr File00; info: ptr FileInfo00; flags: FileQueryInfoFlags; + cancellable: ptr Cancellable00): gboolean {.cdecl.} + setAttributesAsync*: proc(file: ptr File00; info: ptr FileInfo00; flags: FileQueryInfoFlags; + ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + setAttributesFinish*: proc(file: ptr File00; resu: ptr AsyncResult00; info: var ptr FileInfo00): gboolean {.cdecl.} + readFn*: proc(file: ptr File00; cancellable: ptr Cancellable00): ptr FileInputStream00 {.cdecl.} + readAsync*: proc(file: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + readFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileInputStream00 {.cdecl.} + appendTo*: proc(file: ptr File00; flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileOutputStream00 {.cdecl.} + appendToAsync*: proc(file: ptr File00; flags: FileCreateFlags; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + appendToFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileOutputStream00 {.cdecl.} + create*: proc(file: ptr File00; flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileOutputStream00 {.cdecl.} + createAsync*: proc(file: ptr File00; flags: FileCreateFlags; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + createFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileOutputStream00 {.cdecl.} + replace*: proc(file: ptr File00; etag: cstring; makeBackup: gboolean; + flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileOutputStream00 {.cdecl.} + replaceAsync*: proc(file: ptr File00; etag: cstring; makeBackup: gboolean; + flags: FileCreateFlags; ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + replaceFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileOutputStream00 {.cdecl.} + deleteFile*: proc(file: ptr File00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + deleteFileAsync*: proc(file: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + deleteFileFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + trash*: proc(file: ptr File00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + trashAsync*: proc(file: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + trashFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + makeDirectory*: proc(file: ptr File00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + makeDirectoryAsync*: proc(file: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + makeDirectoryFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + makeSymbolicLink*: proc(file: ptr File00; symlinkValue: ucstring; cancellable: ptr Cancellable00): gboolean {.cdecl.} + makeSymbolicLinkAsync*: pointer + makeSymbolicLinkFinish*: pointer + copy*: proc(source: ptr File00; destination: ptr File00; flags: FileCopyFlags; + cancellable: ptr Cancellable00; progressCallback: FileProgressCallback; progressCallbackData: pointer): gboolean {.cdecl.} + copyAsync*: pointer + copyFinish*: proc(file: ptr File00; res: ptr AsyncResult00): gboolean {.cdecl.} + move*: proc(source: ptr File00; destination: ptr File00; flags: FileCopyFlags; + cancellable: ptr Cancellable00; progressCallback: FileProgressCallback; progressCallbackData: pointer): gboolean {.cdecl.} + moveAsync*: pointer + moveFinish*: pointer + mountMountable*: proc(file: ptr File00; flags: MountMountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + mountMountableFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): ptr File00 {.cdecl.} + unmountMountable*: proc(file: ptr File00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + unmountMountableFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + ejectMountable*: proc(file: ptr File00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + ejectMountableFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + mountEnclosingVolume*: proc(location: ptr File00; flags: MountMountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + mountEnclosingVolumeFinish*: proc(location: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + monitorDir*: proc(file: ptr File00; flags: FileMonitorFlags; cancellable: ptr Cancellable00): ptr FileMonitor00 {.cdecl.} + monitorFile*: proc(file: ptr File00; flags: FileMonitorFlags; cancellable: ptr Cancellable00): ptr FileMonitor00 {.cdecl.} + openReadwrite*: proc(file: ptr File00; cancellable: ptr Cancellable00): ptr FileIOStream00 {.cdecl.} + openReadwriteAsync*: proc(file: ptr File00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + openReadwriteFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileIOStream00 {.cdecl.} + createReadwrite*: proc(file: ptr File00; flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileIOStream00 {.cdecl.} + createReadwriteAsync*: proc(file: ptr File00; flags: FileCreateFlags; ioPriority: int32; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + createReadwriteFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileIOStream00 {.cdecl.} + replaceReadwrite*: proc(file: ptr File00; etag: cstring; makeBackup: gboolean; + flags: FileCreateFlags; cancellable: ptr Cancellable00): ptr FileIOStream00 {.cdecl.} + replaceReadwriteAsync*: proc(file: ptr File00; etag: cstring; makeBackup: gboolean; + flags: FileCreateFlags; ioPriority: int32; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + replaceReadwriteFinish*: proc(file: ptr File00; res: ptr AsyncResult00): ptr FileIOStream00 {.cdecl.} + startMountable*: proc(file: ptr File00; flags: DriveStartFlags; startOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + startMountableFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + stopMountable*: proc(file: ptr File00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + stopMountableFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + supportsThreadContexts*: gboolean + unmountMountableWithOperation*: proc(file: ptr File00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + unmountMountableWithOperationFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + ejectMountableWithOperation*: proc(file: ptr File00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + ejectMountableWithOperationFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + pollMountable*: proc(file: ptr File00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + pollMountableFinish*: proc(file: ptr File00; resu: ptr AsyncResult00): gboolean {.cdecl.} + measureDiskUsage*: pointer + measureDiskUsageAsync*: pointer + measureDiskUsageFinish*: proc(file: ptr File00; resu: ptr AsyncResult00; diskUsage: var uint64; + numDirs: var uint64; numFiles: var uint64): gboolean {.cdecl.} + FileIface* = ref object + impl*: ptr FileIface00 + +proc g_file_copy*(self: ptr File00; destination: ptr File00; flags: FileCopyFlags; + cancellable: ptr Cancellable00; progressCallback: FileProgressCallback; progressCallbackData: pointer): gboolean {. + importc: "g_file_copy", libprag.} + +proc copy*(self: File; destination: File; flags: FileCopyFlags; + cancellable: Cancellable; progressCallback: FileProgressCallback; progressCallbackData: pointer): bool = + toBool(g_file_copy(cast[ptr File00](self.impl), cast[ptr File00](destination.impl), flags, cast[ptr Cancellable00](cancellable.impl), progressCallback, progressCallbackData)) + +proc g_file_move*(self: ptr File00; destination: ptr File00; flags: FileCopyFlags; + cancellable: ptr Cancellable00; progressCallback: FileProgressCallback; progressCallbackData: pointer): gboolean {. + importc: "g_file_move", libprag.} + +proc move*(self: File; destination: File; flags: FileCopyFlags; + cancellable: Cancellable; progressCallback: FileProgressCallback; progressCallbackData: pointer): bool = + toBool(g_file_move(cast[ptr File00](self.impl), cast[ptr File00](destination.impl), flags, cast[ptr Cancellable00](cancellable.impl), progressCallback, progressCallbackData)) + +type + FileReadMoreCallback* = proc (fileContents: cstring; fileSize: int64; callbackData: pointer): gboolean {.cdecl.} + +type + FilenameCompleter* = ref object of gobject.Object + FilenameCompleter00* = object of gobject.Object00 + +proc scGotCompletionData*(self: FilenameCompleter; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "got-completion-data", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_filename_completer_new*(): ptr FilenameCompleter00 {. + importc: "g_filename_completer_new", libprag.} + +proc newFilenameCompleter*(): FilenameCompleter = + new(result, finalizeGObject) + result.impl = g_filename_completer_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFilenameCompleter*[T](result: var T) = + assert(result is FilenameCompleter) + new(result, finalizeGObject) + result.impl = g_filename_completer_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_filename_completer_get_completion_suffix*(self: ptr FilenameCompleter00; initialText: cstring): cstring {. + importc: "g_filename_completer_get_completion_suffix", libprag.} + +proc getCompletionSuffix*(self: FilenameCompleter; initialText: string): string = + let resul0 = g_filename_completer_get_completion_suffix(cast[ptr FilenameCompleter00](self.impl), cstring(initialText)) + result = $resul0 + cogfree(resul0) + +proc completionSuffix*(self: FilenameCompleter; initialText: string): string = + let resul0 = g_filename_completer_get_completion_suffix(cast[ptr FilenameCompleter00](self.impl), cstring(initialText)) + result = $resul0 + cogfree(resul0) + +proc g_filename_completer_get_completions*(self: ptr FilenameCompleter00; initialText: cstring): cstringArray {. + importc: "g_filename_completer_get_completions", libprag.} + +proc getCompletions*(self: FilenameCompleter; initialText: string): cstringArray = + g_filename_completer_get_completions(cast[ptr FilenameCompleter00](self.impl), cstring(initialText)) + +proc completions*(self: FilenameCompleter; initialText: string): cstringArray = + g_filename_completer_get_completions(cast[ptr FilenameCompleter00](self.impl), cstring(initialText)) + +proc g_filename_completer_set_dirs_only*(self: ptr FilenameCompleter00; dirsOnly: gboolean) {. + importc: "g_filename_completer_set_dirs_only", libprag.} + +proc setDirsOnly*(self: FilenameCompleter; dirsOnly: bool) = + g_filename_completer_set_dirs_only(cast[ptr FilenameCompleter00](self.impl), gboolean(dirsOnly)) + +proc `dirsOnly=`*(self: FilenameCompleter; dirsOnly: bool) = + g_filename_completer_set_dirs_only(cast[ptr FilenameCompleter00](self.impl), gboolean(dirsOnly)) + +type + FilenameCompleterClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gotCompletionData*: proc(filenameCompleter: ptr FilenameCompleter00) {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + FilenameCompleterClass* = ref object + impl*: ptr FilenameCompleterClass00 + +type + FilesystemPreviewType* {.size: sizeof(cint), pure.} = enum + ifAlways = 0 + ifLocal = 1 + never = 2 + +type + IOErrorEnum* {.size: sizeof(cint), pure.} = enum + failed = 0 + notFound = 1 + exists = 2 + isDirectory = 3 + notDirectory = 4 + notEmpty = 5 + notRegularFile = 6 + notSymbolicLink = 7 + notMountableFile = 8 + filenameTooLong = 9 + invalidFilename = 10 + tooManyLinks = 11 + noSpace = 12 + invalidArgument = 13 + permissionDenied = 14 + notSupported = 15 + notMounted = 16 + alreadyMounted = 17 + closed = 18 + cancelled = 19 + pending = 20 + readOnly = 21 + cantCreateBackup = 22 + wrongEtag = 23 + timedOut = 24 + wouldRecurse = 25 + busy = 26 + wouldBlock = 27 + hostNotFound = 28 + wouldMerge = 29 + failedHandled = 30 + tooManyOpenFiles = 31 + notInitialized = 32 + addressInUse = 33 + partialInput = 34 + invalidData = 35 + dbusError = 36 + hostUnreachable = 37 + networkUnreachable = 38 + connectionRefused = 39 + proxyFailed = 40 + proxyAuthFailed = 41 + proxyNeedAuth = 42 + proxyNotAllowed = 43 + brokenPipe = 44 + notConnected = 45 + messageTooLarge = 46 + +const + IOErrorEnumConnectionClosed* = IOErrorEnum.brokenPipe + +type + IOExtension00* {.pure.} = object + IOExtension* = ref object + impl*: ptr IOExtension00 + +proc g_io_extension_get_name*(self: ptr IOExtension00): cstring {. + importc: "g_io_extension_get_name", libprag.} + +proc getName*(self: IOExtension): string = + let resul0 = g_io_extension_get_name(cast[ptr IOExtension00](self.impl)) + result = $resul0 + +proc name*(self: IOExtension): string = + let resul0 = g_io_extension_get_name(cast[ptr IOExtension00](self.impl)) + result = $resul0 + +proc g_io_extension_get_priority*(self: ptr IOExtension00): int32 {. + importc: "g_io_extension_get_priority", libprag.} + +proc getPriority*(self: IOExtension): int = + int(g_io_extension_get_priority(cast[ptr IOExtension00](self.impl))) + +proc priority*(self: IOExtension): int = + int(g_io_extension_get_priority(cast[ptr IOExtension00](self.impl))) + +proc g_io_extension_get_type*(self: ptr IOExtension00): GType {. + importc: "g_io_extension_get_type", libprag.} + +proc getType*(self: IOExtension): GType = + g_io_extension_get_type(cast[ptr IOExtension00](self.impl)) + +type + IOExtensionPoint00* {.pure.} = object + IOExtensionPoint* = ref object + impl*: ptr IOExtensionPoint00 + +proc g_io_extension_point_get_extension_by_name*(self: ptr IOExtensionPoint00; name: cstring): ptr IOExtension00 {. + importc: "g_io_extension_point_get_extension_by_name", libprag.} + +proc getExtensionByName*(self: IOExtensionPoint; name: string): IOExtension = + new(result) + result.impl = g_io_extension_point_get_extension_by_name(cast[ptr IOExtensionPoint00](self.impl), cstring(name)) + +proc extensionByName*(self: IOExtensionPoint; name: string): IOExtension = + new(result) + result.impl = g_io_extension_point_get_extension_by_name(cast[ptr IOExtensionPoint00](self.impl), cstring(name)) + +proc g_io_extension_point_get_extensions*(self: ptr IOExtensionPoint00): ptr pointer {. + importc: "g_io_extension_point_get_extensions", libprag.} + +proc getExtensions*(self: IOExtensionPoint): ptr pointer = + g_io_extension_point_get_extensions(cast[ptr IOExtensionPoint00](self.impl)) + +proc extensions*(self: IOExtensionPoint): ptr pointer = + g_io_extension_point_get_extensions(cast[ptr IOExtensionPoint00](self.impl)) + +proc g_io_extension_point_get_required_type*(self: ptr IOExtensionPoint00): GType {. + importc: "g_io_extension_point_get_required_type", libprag.} + +proc getRequiredType*(self: IOExtensionPoint): GType = + g_io_extension_point_get_required_type(cast[ptr IOExtensionPoint00](self.impl)) + +proc requiredType*(self: IOExtensionPoint): GType = + g_io_extension_point_get_required_type(cast[ptr IOExtensionPoint00](self.impl)) + +proc g_io_extension_point_set_required_type*(self: ptr IOExtensionPoint00; `type`: GType) {. + importc: "g_io_extension_point_set_required_type", libprag.} + +proc setRequiredType*(self: IOExtensionPoint; `type`: GType) = + g_io_extension_point_set_required_type(cast[ptr IOExtensionPoint00](self.impl), `type`) + +proc `requiredType=`*(self: IOExtensionPoint; `type`: GType) = + g_io_extension_point_set_required_type(cast[ptr IOExtensionPoint00](self.impl), `type`) + +proc g_io_extension_point_implement*(extensionPointName: cstring; `type`: GType; extensionName: cstring; + priority: int32): ptr IOExtension00 {. + importc: "g_io_extension_point_implement", libprag.} + +proc implement*(extensionPointName: string; `type`: GType; extensionName: string; + priority: int): IOExtension = + new(result) + result.impl = g_io_extension_point_implement(cstring(extensionPointName), `type`, cstring(extensionName), int32(priority)) + +proc g_io_extension_point_lookup*(name: cstring): ptr IOExtensionPoint00 {. + importc: "g_io_extension_point_lookup", libprag.} + +proc lookup*(name: string): IOExtensionPoint = + new(result) + result.impl = g_io_extension_point_lookup(cstring(name)) + +proc g_io_extension_point_register*(name: cstring): ptr IOExtensionPoint00 {. + importc: "g_io_extension_point_register", libprag.} + +proc register*(name: string): IOExtensionPoint = + new(result) + result.impl = g_io_extension_point_register(cstring(name)) + +type + IOModule* = ref object of gobject.TypeModule + IOModule00* = object of gobject.TypeModule00 + +proc g_io_module_new*(filename: ucstring): ptr IOModule00 {. + importc: "g_io_module_new", libprag.} + +proc newIOModule*(filename: ucstring): IOModule = + new(result, finalizeGObject) + result.impl = g_io_module_new(filename) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initIOModule*[T](result: var T; filename: ucstring) = + assert(result is IOModule) + new(result, finalizeGObject) + result.impl = g_io_module_new(filename) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_io_module_query*(): cstringArray {. + importc: "g_io_module_query", libprag.} + +proc query*(): cstringArray {. + importc: "g_io_module_query", libprag.} + +proc g_io_module_load*(self: ptr IOModule00) {. + importc: "g_io_module_load", libprag.} + +proc load*(self: IOModule) = + g_io_module_load(cast[ptr IOModule00](self.impl)) + +proc g_io_module_unload*(self: ptr IOModule00) {. + importc: "g_io_module_unload", libprag.} + +proc unload*(self: IOModule) = + g_io_module_unload(cast[ptr IOModule00](self.impl)) + +type + IOModuleClass00* {.pure.} = object + IOModuleClass* = ref object + impl*: ptr IOModuleClass00 + +type + IOModuleScope00* {.pure.} = object + IOModuleScope* = ref object + impl*: ptr IOModuleScope00 + +proc g_io_module_scope_block*(self: ptr IOModuleScope00; basename: cstring) {. + importc: "g_io_module_scope_block", libprag.} + +proc `block`*(self: IOModuleScope; basename: string) = + g_io_module_scope_block(cast[ptr IOModuleScope00](self.impl), cstring(basename)) + +proc g_io_module_scope_free*(self: ptr IOModuleScope00) {. + importc: "g_io_module_scope_free", libprag.} + +proc free*(self: IOModuleScope) = + g_io_module_scope_free(cast[ptr IOModuleScope00](self.impl)) + +type + IOModuleScopeFlag* {.size: sizeof(cint), pure.} = enum + blockDuplicates = 1 + + IOModuleScopeFlags* {.size: sizeof(cint).} = set[IOModuleScopeFlag] + +type + IOSchedulerJob00* {.pure.} = object + IOSchedulerJob* = ref object + impl*: ptr IOSchedulerJob00 + +proc g_io_scheduler_job_send_to_mainloop*(self: ptr IOSchedulerJob00; `func`: SourceFunc; userData: pointer; + notify: DestroyNotify): gboolean {. + importc: "g_io_scheduler_job_send_to_mainloop", libprag.} + +proc sendToMainloop*(self: IOSchedulerJob; `func`: SourceFunc; userData: pointer; + notify: DestroyNotify): bool = + toBool(g_io_scheduler_job_send_to_mainloop(cast[ptr IOSchedulerJob00](self.impl), `func`, userData, notify)) + +proc g_io_scheduler_job_send_to_mainloop_async*(self: ptr IOSchedulerJob00; `func`: SourceFunc; userData: pointer; + notify: DestroyNotify) {. + importc: "g_io_scheduler_job_send_to_mainloop_async", libprag.} + +proc sendToMainloopAsync*(self: IOSchedulerJob; `func`: SourceFunc; userData: pointer; + notify: DestroyNotify) = + g_io_scheduler_job_send_to_mainloop_async(cast[ptr IOSchedulerJob00](self.impl), `func`, userData, notify) + +type + IOSchedulerJobFunc* = proc (job: ptr IOSchedulerJob00; cancellable: ptr Cancellable00; + userData: pointer): gboolean {.cdecl.} + +type + IOStreamAdapter00* {.pure.} = object + IOStreamAdapter* = ref object + impl*: ptr IOStreamAdapter00 + +type + IconIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + hash*: proc(icon: ptr Icon00): uint32 {.cdecl.} + equal*: proc(icon1: ptr Icon00; icon2: ptr Icon00): gboolean {.cdecl.} + toTokens*: pointer + fromTokens*: pointer + serialize*: proc(icon: ptr Icon00): ptr glib.Variant00 {.cdecl.} + IconIface* = ref object + impl*: ptr IconIface00 + +type + InetAddressPrivate00* {.pure.} = object + InetAddressPrivate* = ref object + impl*: ptr InetAddressPrivate00 + +type + InetAddress* = ref object of gobject.Object + InetAddress00* = object of gobject.Object00 + priv1: ptr InetAddressPrivate00 + +proc g_inet_address_new_any*(family: SocketFamily): ptr InetAddress00 {. + importc: "g_inet_address_new_any", libprag.} + +proc newInetAddressAny*(family: SocketFamily): InetAddress = + new(result, finalizeGObject) + result.impl = g_inet_address_new_any(family) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInetAddressAny*[T](result: var T; family: SocketFamily) = + assert(result is InetAddress) + new(result, finalizeGObject) + result.impl = g_inet_address_new_any(family) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_address_new_from_bytes*(bytes: uint8Array; family: SocketFamily): ptr InetAddress00 {. + importc: "g_inet_address_new_from_bytes", libprag.} + +proc newInetAddressFromBytes*(bytes: uint8Array; family: SocketFamily): InetAddress = + new(result, finalizeGObject) + result.impl = g_inet_address_new_from_bytes(bytes, family) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInetAddressFromBytes*[T](result: var T; bytes: uint8Array; family: SocketFamily) = + assert(result is InetAddress) + new(result, finalizeGObject) + result.impl = g_inet_address_new_from_bytes(bytes, family) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_address_new_from_string*(string: cstring): ptr InetAddress00 {. + importc: "g_inet_address_new_from_string", libprag.} + +proc newInetAddressFromString*(string: string): InetAddress = + new(result, finalizeGObject) + result.impl = g_inet_address_new_from_string(cstring(string)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInetAddressFromString*[T](result: var T; string: string) = + assert(result is InetAddress) + new(result, finalizeGObject) + result.impl = g_inet_address_new_from_string(cstring(string)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_address_new_loopback*(family: SocketFamily): ptr InetAddress00 {. + importc: "g_inet_address_new_loopback", libprag.} + +proc newInetAddressLoopback*(family: SocketFamily): InetAddress = + new(result, finalizeGObject) + result.impl = g_inet_address_new_loopback(family) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInetAddressLoopback*[T](result: var T; family: SocketFamily) = + assert(result is InetAddress) + new(result, finalizeGObject) + result.impl = g_inet_address_new_loopback(family) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_address_equal*(self: ptr InetAddress00; otherAddress: ptr InetAddress00): gboolean {. + importc: "g_inet_address_equal", libprag.} + +proc equal*(self: InetAddress; otherAddress: InetAddress): bool = + toBool(g_inet_address_equal(cast[ptr InetAddress00](self.impl), cast[ptr InetAddress00](otherAddress.impl))) + +proc g_inet_address_get_family*(self: ptr InetAddress00): SocketFamily {. + importc: "g_inet_address_get_family", libprag.} + +proc getFamily*(self: InetAddress): SocketFamily = + g_inet_address_get_family(cast[ptr InetAddress00](self.impl)) + +proc family*(self: InetAddress): SocketFamily = + g_inet_address_get_family(cast[ptr InetAddress00](self.impl)) + +proc g_inet_address_get_is_any*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_any", libprag.} + +proc getIsAny*(self: InetAddress): bool = + toBool(g_inet_address_get_is_any(cast[ptr InetAddress00](self.impl))) + +proc isAny*(self: InetAddress): bool = + toBool(g_inet_address_get_is_any(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_is_link_local*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_link_local", libprag.} + +proc getIsLinkLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_link_local(cast[ptr InetAddress00](self.impl))) + +proc isLinkLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_link_local(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_is_loopback*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_loopback", libprag.} + +proc getIsLoopback*(self: InetAddress): bool = + toBool(g_inet_address_get_is_loopback(cast[ptr InetAddress00](self.impl))) + +proc isLoopback*(self: InetAddress): bool = + toBool(g_inet_address_get_is_loopback(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_is_mc_global*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_mc_global", libprag.} + +proc getIsMcGlobal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_global(cast[ptr InetAddress00](self.impl))) + +proc isMcGlobal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_global(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_is_mc_link_local*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_mc_link_local", libprag.} + +proc getIsMcLinkLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_link_local(cast[ptr InetAddress00](self.impl))) + +proc isMcLinkLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_link_local(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_is_mc_node_local*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_mc_node_local", libprag.} + +proc getIsMcNodeLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_node_local(cast[ptr InetAddress00](self.impl))) + +proc isMcNodeLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_node_local(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_is_mc_org_local*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_mc_org_local", libprag.} + +proc getIsMcOrgLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_org_local(cast[ptr InetAddress00](self.impl))) + +proc isMcOrgLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_org_local(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_is_mc_site_local*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_mc_site_local", libprag.} + +proc getIsMcSiteLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_site_local(cast[ptr InetAddress00](self.impl))) + +proc isMcSiteLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_mc_site_local(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_is_multicast*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_multicast", libprag.} + +proc getIsMulticast*(self: InetAddress): bool = + toBool(g_inet_address_get_is_multicast(cast[ptr InetAddress00](self.impl))) + +proc isMulticast*(self: InetAddress): bool = + toBool(g_inet_address_get_is_multicast(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_is_site_local*(self: ptr InetAddress00): gboolean {. + importc: "g_inet_address_get_is_site_local", libprag.} + +proc getIsSiteLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_site_local(cast[ptr InetAddress00](self.impl))) + +proc isSiteLocal*(self: InetAddress): bool = + toBool(g_inet_address_get_is_site_local(cast[ptr InetAddress00](self.impl))) + +proc g_inet_address_get_native_size*(self: ptr InetAddress00): uint64 {. + importc: "g_inet_address_get_native_size", libprag.} + +proc getNativeSize*(self: InetAddress): uint64 = + g_inet_address_get_native_size(cast[ptr InetAddress00](self.impl)) + +proc nativeSize*(self: InetAddress): uint64 = + g_inet_address_get_native_size(cast[ptr InetAddress00](self.impl)) + +proc g_inet_address_to_string*(self: ptr InetAddress00): cstring {. + importc: "g_inet_address_to_string", libprag.} + +proc toString*(self: InetAddress): string = + let resul0 = g_inet_address_to_string(cast[ptr InetAddress00](self.impl)) + result = $resul0 + cogfree(resul0) + +type + InetAddressClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + toString*: proc(address: ptr InetAddress00): cstring {.cdecl.} + toBytes*: proc(address: ptr InetAddress00): ptr uint8 {.cdecl.} + InetAddressClass* = ref object + impl*: ptr InetAddressClass00 + +type + InetAddressMaskPrivate00* {.pure.} = object + InetAddressMaskPrivate* = ref object + impl*: ptr InetAddressMaskPrivate00 + +type + InetAddressMask* = ref object of gobject.Object + InetAddressMask00* = object of gobject.Object00 + priv1: ptr InetAddressMaskPrivate00 + +proc g_inet_address_mask_new*(`addr`: ptr InetAddress00; length: uint32): ptr InetAddressMask00 {. + importc: "g_inet_address_mask_new", libprag.} + +proc newInetAddressMask*(`addr`: InetAddress; length: int): InetAddressMask = + new(result, finalizeGObject) + result.impl = g_inet_address_mask_new(cast[ptr InetAddress00](`addr`.impl), uint32(length)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInetAddressMask*[T](result: var T; `addr`: InetAddress; length: int) = + assert(result is InetAddressMask) + new(result, finalizeGObject) + result.impl = g_inet_address_mask_new(cast[ptr InetAddress00](`addr`.impl), uint32(length)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_address_mask_new_from_string*(maskString: cstring): ptr InetAddressMask00 {. + importc: "g_inet_address_mask_new_from_string", libprag.} + +proc newInetAddressMaskFromString*(maskString: string): InetAddressMask = + new(result, finalizeGObject) + result.impl = g_inet_address_mask_new_from_string(cstring(maskString)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInetAddressMaskFromString*[T](result: var T; maskString: string) = + assert(result is InetAddressMask) + new(result, finalizeGObject) + result.impl = g_inet_address_mask_new_from_string(cstring(maskString)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_address_mask_equal*(self: ptr InetAddressMask00; mask2: ptr InetAddressMask00): gboolean {. + importc: "g_inet_address_mask_equal", libprag.} + +proc equal*(self: InetAddressMask; mask2: InetAddressMask): bool = + toBool(g_inet_address_mask_equal(cast[ptr InetAddressMask00](self.impl), cast[ptr InetAddressMask00](mask2.impl))) + +proc g_inet_address_mask_get_address*(self: ptr InetAddressMask00): ptr InetAddress00 {. + importc: "g_inet_address_mask_get_address", libprag.} + +proc getAddress*(self: InetAddressMask): InetAddress = + let gobj = g_inet_address_mask_get_address(cast[ptr InetAddressMask00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InetAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc address*(self: InetAddressMask): InetAddress = + let gobj = g_inet_address_mask_get_address(cast[ptr InetAddressMask00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InetAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_address_mask_get_family*(self: ptr InetAddressMask00): SocketFamily {. + importc: "g_inet_address_mask_get_family", libprag.} + +proc getFamily*(self: InetAddressMask): SocketFamily = + g_inet_address_mask_get_family(cast[ptr InetAddressMask00](self.impl)) + +proc family*(self: InetAddressMask): SocketFamily = + g_inet_address_mask_get_family(cast[ptr InetAddressMask00](self.impl)) + +proc g_inet_address_mask_get_length*(self: ptr InetAddressMask00): uint32 {. + importc: "g_inet_address_mask_get_length", libprag.} + +proc getLength*(self: InetAddressMask): int = + int(g_inet_address_mask_get_length(cast[ptr InetAddressMask00](self.impl))) + +proc length*(self: InetAddressMask): int = + int(g_inet_address_mask_get_length(cast[ptr InetAddressMask00](self.impl))) + +proc g_inet_address_mask_matches*(self: ptr InetAddressMask00; address: ptr InetAddress00): gboolean {. + importc: "g_inet_address_mask_matches", libprag.} + +proc matches*(self: InetAddressMask; address: InetAddress): bool = + toBool(g_inet_address_mask_matches(cast[ptr InetAddressMask00](self.impl), cast[ptr InetAddress00](address.impl))) + +proc g_inet_address_mask_to_string*(self: ptr InetAddressMask00): cstring {. + importc: "g_inet_address_mask_to_string", libprag.} + +proc toString*(self: InetAddressMask): string = + let resul0 = g_inet_address_mask_to_string(cast[ptr InetAddressMask00](self.impl)) + result = $resul0 + cogfree(resul0) + +type + InetAddressMaskClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + InetAddressMaskClass* = ref object + impl*: ptr InetAddressMaskClass00 + +type + InetSocketAddressPrivate00* {.pure.} = object + InetSocketAddressPrivate* = ref object + impl*: ptr InetSocketAddressPrivate00 + +type + InetSocketAddress* = ref object of SocketAddress + InetSocketAddress00* = object of SocketAddress00 + priv2: ptr InetSocketAddressPrivate00 + +proc g_inet_socket_address_new*(address: ptr InetAddress00; port: uint16): ptr InetSocketAddress00 {. + importc: "g_inet_socket_address_new", libprag.} + +proc newInetSocketAddress*(address: InetAddress; port: uint16): InetSocketAddress = + new(result, finalizeGObject) + result.impl = g_inet_socket_address_new(cast[ptr InetAddress00](address.impl), port) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInetSocketAddress*[T](result: var T; address: InetAddress; port: uint16) = + assert(result is InetSocketAddress) + new(result, finalizeGObject) + result.impl = g_inet_socket_address_new(cast[ptr InetAddress00](address.impl), port) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_socket_address_new_from_string*(address: cstring; port: uint32): ptr InetSocketAddress00 {. + importc: "g_inet_socket_address_new_from_string", libprag.} + +proc newInetSocketAddressFromString*(address: string; port: int): InetSocketAddress = + new(result, finalizeGObject) + result.impl = g_inet_socket_address_new_from_string(cstring(address), uint32(port)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInetSocketAddressFromString*[T](result: var T; address: string; port: int) = + assert(result is InetSocketAddress) + new(result, finalizeGObject) + result.impl = g_inet_socket_address_new_from_string(cstring(address), uint32(port)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_socket_address_get_address*(self: ptr InetSocketAddress00): ptr InetAddress00 {. + importc: "g_inet_socket_address_get_address", libprag.} + +proc getAddress*(self: InetSocketAddress): InetAddress = + let gobj = g_inet_socket_address_get_address(cast[ptr InetSocketAddress00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InetAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc address*(self: InetSocketAddress): InetAddress = + let gobj = g_inet_socket_address_get_address(cast[ptr InetSocketAddress00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InetAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_inet_socket_address_get_flowinfo*(self: ptr InetSocketAddress00): uint32 {. + importc: "g_inet_socket_address_get_flowinfo", libprag.} + +proc getFlowinfo*(self: InetSocketAddress): int = + int(g_inet_socket_address_get_flowinfo(cast[ptr InetSocketAddress00](self.impl))) + +proc flowinfo*(self: InetSocketAddress): int = + int(g_inet_socket_address_get_flowinfo(cast[ptr InetSocketAddress00](self.impl))) + +proc g_inet_socket_address_get_port*(self: ptr InetSocketAddress00): uint16 {. + importc: "g_inet_socket_address_get_port", libprag.} + +proc getPort*(self: InetSocketAddress): uint16 = + g_inet_socket_address_get_port(cast[ptr InetSocketAddress00](self.impl)) + +proc port*(self: InetSocketAddress): uint16 = + g_inet_socket_address_get_port(cast[ptr InetSocketAddress00](self.impl)) + +proc g_inet_socket_address_get_scope_id*(self: ptr InetSocketAddress00): uint32 {. + importc: "g_inet_socket_address_get_scope_id", libprag.} + +proc getScopeId*(self: InetSocketAddress): int = + int(g_inet_socket_address_get_scope_id(cast[ptr InetSocketAddress00](self.impl))) + +proc scopeId*(self: InetSocketAddress): int = + int(g_inet_socket_address_get_scope_id(cast[ptr InetSocketAddress00](self.impl))) + +type + SocketAddressClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getFamily*: proc(address: ptr SocketAddress00): SocketFamily {.cdecl.} + getNativeSize*: proc(address: ptr SocketAddress00): int64 {.cdecl.} + toNative*: proc(address: ptr SocketAddress00; dest: pointer; destlen: uint64): gboolean {.cdecl.} + SocketAddressClass* = ref object + impl*: ptr SocketAddressClass00 + +type + InetSocketAddressClass00* {.pure.} = object + parentClass*: SocketAddressClass00 + InetSocketAddressClass* = ref object + impl*: ptr InetSocketAddressClass00 + +type + Initable00* {.pure.} = object + Initable* = ref object + impl*: ptr Initable00 + +proc g_initable_newv*(objectType: GType; nParameters: uint32; parameters: gobject.Parameter00Array; + cancellable: ptr Cancellable00): ptr gobject.Object00 {. + importc: "g_initable_newv", libprag.} + +proc newInitablev*(objectType: GType; nParameters: int; parameters: gobject.Parameter00Array; + cancellable: Cancellable): gobject.Object = + let gobj = g_initable_newv(objectType, uint32(nParameters), parameters, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_initable_init*(self: ptr Initable00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_initable_init", libprag.} + +proc init*(self: Initable; cancellable: Cancellable): bool = + toBool(g_initable_init(cast[ptr Initable00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +type + InitableIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + init*: proc(initable: ptr Initable00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + InitableIface* = ref object + impl*: ptr InitableIface00 + +type + ListModel00* {.pure.} = object + ListModel* = ref object + impl*: ptr ListModel00 + +proc g_list_model_get_item_type*(self: ptr ListModel00): GType {. + importc: "g_list_model_get_item_type", libprag.} + +proc getItemType*(self: ListModel): GType = + g_list_model_get_item_type(cast[ptr ListModel00](self.impl)) + +proc itemType*(self: ListModel): GType = + g_list_model_get_item_type(cast[ptr ListModel00](self.impl)) + +proc g_list_model_get_n_items*(self: ptr ListModel00): uint32 {. + importc: "g_list_model_get_n_items", libprag.} + +proc getNItems*(self: ListModel): int = + int(g_list_model_get_n_items(cast[ptr ListModel00](self.impl))) + +proc nItems*(self: ListModel): int = + int(g_list_model_get_n_items(cast[ptr ListModel00](self.impl))) + +proc g_list_model_get_object*(self: ptr ListModel00; position: uint32): ptr gobject.Object00 {. + importc: "g_list_model_get_object", libprag.} + +proc getItem*(self: ListModel; position: int): gobject.Object = + let gobj = g_list_model_get_object(cast[ptr ListModel00](self.impl), uint32(position)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc item*(self: ListModel; position: int): gobject.Object = + let gobj = g_list_model_get_object(cast[ptr ListModel00](self.impl), uint32(position)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_list_model_items_changed*(self: ptr ListModel00; position: uint32; removed: uint32; + added: uint32) {. + importc: "g_list_model_items_changed", libprag.} + +proc itemsChanged*(self: ListModel; position: int; removed: int; added: int) = + g_list_model_items_changed(cast[ptr ListModel00](self.impl), uint32(position), uint32(removed), uint32(added)) + +type + ListModelInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + getItemType*: proc(list: ptr ListModel00): GType {.cdecl.} + getNItems*: proc(list: ptr ListModel00): uint32 {.cdecl.} + getItem*: proc(list: ptr ListModel00; position: uint32): pointer {.cdecl.} + ListModelInterface* = ref object + impl*: ptr ListModelInterface00 + +type + ListStore* = ref object of gobject.Object + ListStore00* = object of gobject.Object00 + +proc g_list_store_new*(itemType: GType): ptr ListStore00 {. + importc: "g_list_store_new", libprag.} + +proc newListStore*(itemType: GType): ListStore = + new(result, finalizeGObject) + result.impl = g_list_store_new(itemType) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initListStore*[T](result: var T; itemType: GType) = + assert(result is ListStore) + new(result, finalizeGObject) + result.impl = g_list_store_new(itemType) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_list_store_append*(self: ptr ListStore00; item: ptr gobject.Object00) {. + importc: "g_list_store_append", libprag.} + +proc append*(self: ListStore; item: gobject.Object) = + g_list_store_append(cast[ptr ListStore00](self.impl), cast[ptr gobject.Object00](item.impl)) + +proc g_list_store_insert*(self: ptr ListStore00; position: uint32; item: ptr gobject.Object00) {. + importc: "g_list_store_insert", libprag.} + +proc insert*(self: ListStore; position: int; item: gobject.Object) = + g_list_store_insert(cast[ptr ListStore00](self.impl), uint32(position), cast[ptr gobject.Object00](item.impl)) + +proc g_list_store_insert_sorted*(self: ptr ListStore00; item: ptr gobject.Object00; + compareFunc: CompareDataFunc; userData: pointer): uint32 {. + importc: "g_list_store_insert_sorted", libprag.} + +proc insertSorted*(self: ListStore; item: gobject.Object; compareFunc: CompareDataFunc; + userData: pointer): int = + int(g_list_store_insert_sorted(cast[ptr ListStore00](self.impl), cast[ptr gobject.Object00](item.impl), compareFunc, userData)) + +proc g_list_store_remove*(self: ptr ListStore00; position: uint32) {. + importc: "g_list_store_remove", libprag.} + +proc remove*(self: ListStore; position: int) = + g_list_store_remove(cast[ptr ListStore00](self.impl), uint32(position)) + +proc g_list_store_remove_all*(self: ptr ListStore00) {. + importc: "g_list_store_remove_all", libprag.} + +proc removeAll*(self: ListStore) = + g_list_store_remove_all(cast[ptr ListStore00](self.impl)) + +proc g_list_store_sort*(self: ptr ListStore00; compareFunc: CompareDataFunc; + userData: pointer) {. + importc: "g_list_store_sort", libprag.} + +proc sort*(self: ListStore; compareFunc: CompareDataFunc; userData: pointer) = + g_list_store_sort(cast[ptr ListStore00](self.impl), compareFunc, userData) + +proc g_list_store_splice*(self: ptr ListStore00; position: uint32; nRemovals: uint32; + additions: gobject.Object00Array; nAdditions: uint32) {. + importc: "g_list_store_splice", libprag.} + +proc splice*(self: ListStore; position: int; nRemovals: int; additions: gobject.Object00Array; + nAdditions: int) = + g_list_store_splice(cast[ptr ListStore00](self.impl), uint32(position), uint32(nRemovals), additions, uint32(nAdditions)) + +type + ListStoreClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + ListStoreClass* = ref object + impl*: ptr ListStoreClass00 + +type + LoadableIcon00* {.pure.} = object + LoadableIcon* = ref object + impl*: ptr LoadableIcon00 + +proc g_loadable_icon_load*(self: ptr LoadableIcon00; size: int32; `type`: var cstring; + cancellable: ptr Cancellable00): ptr InputStream00 {. + importc: "g_loadable_icon_load", libprag.} + +proc load*(self: LoadableIcon; size: int; `type`: var string; + cancellable: Cancellable): InputStream = + var type_00 = cstring(`type`) + let gobj = g_loadable_icon_load(cast[ptr LoadableIcon00](self.impl), int32(size), type_00, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + `type` = $(type_00) + +proc g_loadable_icon_load_async*(self: ptr LoadableIcon00; size: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_loadable_icon_load_async", libprag.} + +proc loadAsync*(self: LoadableIcon; size: int; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_loadable_icon_load_async(cast[ptr LoadableIcon00](self.impl), int32(size), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_loadable_icon_load_finish*(self: ptr LoadableIcon00; res: ptr AsyncResult00; + `type`: var cstring): ptr InputStream00 {. + importc: "g_loadable_icon_load_finish", libprag.} + +proc loadFinish*(self: LoadableIcon; res: AsyncResult; `type`: var string): InputStream = + var type_00 = cstring(`type`) + let gobj = g_loadable_icon_load_finish(cast[ptr LoadableIcon00](self.impl), cast[ptr AsyncResult00](res.impl), type_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + `type` = $(type_00) + +type + LoadableIconIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + load*: proc(icon: ptr LoadableIcon00; size: int32; `type`: var cstring; + cancellable: ptr Cancellable00): ptr InputStream00 {.cdecl.} + loadAsync*: proc(icon: ptr LoadableIcon00; size: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + loadFinish*: proc(icon: ptr LoadableIcon00; res: ptr AsyncResult00; + `type`: var cstring): ptr InputStream00 {.cdecl.} + LoadableIconIface* = ref object + impl*: ptr LoadableIconIface00 + +const MENU_ATTRIBUTE_ACTION* = "action" + +const MENU_ATTRIBUTE_ACTION_NAMESPACE* = "action-namespace" + +const MENU_ATTRIBUTE_ICON* = "icon" + +const MENU_ATTRIBUTE_LABEL* = "label" + +const MENU_ATTRIBUTE_TARGET* = "target" + +const MENU_LINK_SECTION* = "section" + +const MENU_LINK_SUBMENU* = "submenu" + +type + MemoryInputStreamPrivate00* {.pure.} = object + MemoryInputStreamPrivate* = ref object + impl*: ptr MemoryInputStreamPrivate00 + +type + MemoryInputStream* = ref object of InputStream + MemoryInputStream00* = object of InputStream00 + priv2: ptr MemoryInputStreamPrivate00 + +proc g_memory_input_stream_new*(): ptr MemoryInputStream00 {. + importc: "g_memory_input_stream_new", libprag.} + +proc newMemoryInputStream*(): MemoryInputStream = + new(result, finalizeGObject) + result.impl = g_memory_input_stream_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMemoryInputStream*[T](result: var T) = + assert(result is MemoryInputStream) + new(result, finalizeGObject) + result.impl = g_memory_input_stream_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_memory_input_stream_new_from_bytes*(bytes: ptr glib.Bytes00): ptr MemoryInputStream00 {. + importc: "g_memory_input_stream_new_from_bytes", libprag.} + +proc newMemoryInputStreamFromBytes*(bytes: glib.Bytes): MemoryInputStream = + new(result, finalizeGObject) + result.impl = g_memory_input_stream_new_from_bytes(cast[ptr glib.Bytes00](bytes.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMemoryInputStreamFromBytes*[T](result: var T; bytes: glib.Bytes) = + assert(result is MemoryInputStream) + new(result, finalizeGObject) + result.impl = g_memory_input_stream_new_from_bytes(cast[ptr glib.Bytes00](bytes.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_memory_input_stream_new_from_data*(data: uint8Array; len: int64; destroy: DestroyNotify): ptr MemoryInputStream00 {. + importc: "g_memory_input_stream_new_from_data", libprag.} + +proc newMemoryInputStreamFromData*(data: uint8Array; len: int64; destroy: DestroyNotify): MemoryInputStream = + new(result, finalizeGObject) + result.impl = g_memory_input_stream_new_from_data(data, len, destroy) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMemoryInputStreamFromData*[T](result: var T; data: uint8Array; len: int64; destroy: DestroyNotify) = + assert(result is MemoryInputStream) + new(result, finalizeGObject) + result.impl = g_memory_input_stream_new_from_data(data, len, destroy) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_memory_input_stream_add_bytes*(self: ptr MemoryInputStream00; bytes: ptr glib.Bytes00) {. + importc: "g_memory_input_stream_add_bytes", libprag.} + +proc addBytes*(self: MemoryInputStream; bytes: glib.Bytes) = + g_memory_input_stream_add_bytes(cast[ptr MemoryInputStream00](self.impl), cast[ptr glib.Bytes00](bytes.impl)) + +proc g_memory_input_stream_add_data*(self: ptr MemoryInputStream00; data: uint8Array; len: int64; + destroy: DestroyNotify) {. + importc: "g_memory_input_stream_add_data", libprag.} + +proc addData*(self: MemoryInputStream; data: uint8Array; len: int64; + destroy: DestroyNotify) = + g_memory_input_stream_add_data(cast[ptr MemoryInputStream00](self.impl), data, len, destroy) + +type + MemoryInputStreamClass00* {.pure.} = object + parentClass*: InputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + MemoryInputStreamClass* = ref object + impl*: ptr MemoryInputStreamClass00 + +type + MemoryOutputStreamPrivate00* {.pure.} = object + MemoryOutputStreamPrivate* = ref object + impl*: ptr MemoryOutputStreamPrivate00 + +type + MemoryOutputStream* = ref object of OutputStream + MemoryOutputStream00* = object of OutputStream00 + priv2: ptr MemoryOutputStreamPrivate00 + +proc g_memory_output_stream_new_resizable*(): ptr MemoryOutputStream00 {. + importc: "g_memory_output_stream_new_resizable", libprag.} + +proc newMemoryOutputStreamResizable*(): MemoryOutputStream = + new(result, finalizeGObject) + result.impl = g_memory_output_stream_new_resizable() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMemoryOutputStreamResizable*[T](result: var T) = + assert(result is MemoryOutputStream) + new(result, finalizeGObject) + result.impl = g_memory_output_stream_new_resizable() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_memory_output_stream_get_data*(self: ptr MemoryOutputStream00): pointer {. + importc: "g_memory_output_stream_get_data", libprag.} + +proc getData*(self: MemoryOutputStream): pointer = + g_memory_output_stream_get_data(cast[ptr MemoryOutputStream00](self.impl)) + +proc data*(self: MemoryOutputStream): pointer = + g_memory_output_stream_get_data(cast[ptr MemoryOutputStream00](self.impl)) + +proc g_memory_output_stream_get_data_size*(self: ptr MemoryOutputStream00): uint64 {. + importc: "g_memory_output_stream_get_data_size", libprag.} + +proc getDataSize*(self: MemoryOutputStream): uint64 = + g_memory_output_stream_get_data_size(cast[ptr MemoryOutputStream00](self.impl)) + +proc dataSize*(self: MemoryOutputStream): uint64 = + g_memory_output_stream_get_data_size(cast[ptr MemoryOutputStream00](self.impl)) + +proc g_memory_output_stream_get_size*(self: ptr MemoryOutputStream00): uint64 {. + importc: "g_memory_output_stream_get_size", libprag.} + +proc getSize*(self: MemoryOutputStream): uint64 = + g_memory_output_stream_get_size(cast[ptr MemoryOutputStream00](self.impl)) + +proc size*(self: MemoryOutputStream): uint64 = + g_memory_output_stream_get_size(cast[ptr MemoryOutputStream00](self.impl)) + +proc g_memory_output_stream_steal_as_bytes*(self: ptr MemoryOutputStream00): ptr glib.Bytes00 {. + importc: "g_memory_output_stream_steal_as_bytes", libprag.} + +proc stealAsBytes*(self: MemoryOutputStream): glib.Bytes = + new(result) + result.impl = g_memory_output_stream_steal_as_bytes(cast[ptr MemoryOutputStream00](self.impl)) + +proc g_memory_output_stream_steal_data*(self: ptr MemoryOutputStream00): pointer {. + importc: "g_memory_output_stream_steal_data", libprag.} + +proc stealData*(self: MemoryOutputStream): pointer = + g_memory_output_stream_steal_data(cast[ptr MemoryOutputStream00](self.impl)) + +type + MemoryOutputStreamClass00* {.pure.} = object + parentClass*: OutputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + MemoryOutputStreamClass* = ref object + impl*: ptr MemoryOutputStreamClass00 + +type + Menu* = ref object of MenuModel + Menu00* = object of MenuModel00 + +proc g_menu_new*(): ptr Menu00 {. + importc: "g_menu_new", libprag.} + +proc newMenu*(): Menu = + new(result, finalizeGObject) + result.impl = g_menu_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenu*[T](result: var T) = + assert(result is Menu) + new(result, finalizeGObject) + result.impl = g_menu_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_menu_append*(self: ptr Menu00; label: cstring; detailedAction: cstring) {. + importc: "g_menu_append", libprag.} + +proc append*(self: Menu; label: string; detailedAction: string) = + g_menu_append(cast[ptr Menu00](self.impl), cstring(label), cstring(detailedAction)) + +proc g_menu_append_section*(self: ptr Menu00; label: cstring; section: ptr MenuModel00) {. + importc: "g_menu_append_section", libprag.} + +proc appendSection*(self: Menu; label: string; section: MenuModel) = + g_menu_append_section(cast[ptr Menu00](self.impl), cstring(label), cast[ptr MenuModel00](section.impl)) + +proc g_menu_append_submenu*(self: ptr Menu00; label: cstring; submenu: ptr MenuModel00) {. + importc: "g_menu_append_submenu", libprag.} + +proc appendSubmenu*(self: Menu; label: string; submenu: MenuModel) = + g_menu_append_submenu(cast[ptr Menu00](self.impl), cstring(label), cast[ptr MenuModel00](submenu.impl)) + +proc g_menu_freeze*(self: ptr Menu00) {. + importc: "g_menu_freeze", libprag.} + +proc freeze*(self: Menu) = + g_menu_freeze(cast[ptr Menu00](self.impl)) + +proc g_menu_insert*(self: ptr Menu00; position: int32; label: cstring; + detailedAction: cstring) {. + importc: "g_menu_insert", libprag.} + +proc insert*(self: Menu; position: int; label: string; detailedAction: string) = + g_menu_insert(cast[ptr Menu00](self.impl), int32(position), cstring(label), cstring(detailedAction)) + +proc g_menu_insert_section*(self: ptr Menu00; position: int32; label: cstring; + section: ptr MenuModel00) {. + importc: "g_menu_insert_section", libprag.} + +proc insertSection*(self: Menu; position: int; label: string; section: MenuModel) = + g_menu_insert_section(cast[ptr Menu00](self.impl), int32(position), cstring(label), cast[ptr MenuModel00](section.impl)) + +proc g_menu_insert_submenu*(self: ptr Menu00; position: int32; label: cstring; + submenu: ptr MenuModel00) {. + importc: "g_menu_insert_submenu", libprag.} + +proc insertSubmenu*(self: Menu; position: int; label: string; submenu: MenuModel) = + g_menu_insert_submenu(cast[ptr Menu00](self.impl), int32(position), cstring(label), cast[ptr MenuModel00](submenu.impl)) + +proc g_menu_prepend*(self: ptr Menu00; label: cstring; detailedAction: cstring) {. + importc: "g_menu_prepend", libprag.} + +proc prepend*(self: Menu; label: string; detailedAction: string) = + g_menu_prepend(cast[ptr Menu00](self.impl), cstring(label), cstring(detailedAction)) + +proc g_menu_prepend_section*(self: ptr Menu00; label: cstring; section: ptr MenuModel00) {. + importc: "g_menu_prepend_section", libprag.} + +proc prependSection*(self: Menu; label: string; section: MenuModel) = + g_menu_prepend_section(cast[ptr Menu00](self.impl), cstring(label), cast[ptr MenuModel00](section.impl)) + +proc g_menu_prepend_submenu*(self: ptr Menu00; label: cstring; submenu: ptr MenuModel00) {. + importc: "g_menu_prepend_submenu", libprag.} + +proc prependSubmenu*(self: Menu; label: string; submenu: MenuModel) = + g_menu_prepend_submenu(cast[ptr Menu00](self.impl), cstring(label), cast[ptr MenuModel00](submenu.impl)) + +proc g_menu_remove*(self: ptr Menu00; position: int32) {. + importc: "g_menu_remove", libprag.} + +proc remove*(self: Menu; position: int) = + g_menu_remove(cast[ptr Menu00](self.impl), int32(position)) + +proc g_menu_remove_all*(self: ptr Menu00) {. + importc: "g_menu_remove_all", libprag.} + +proc removeAll*(self: Menu) = + g_menu_remove_all(cast[ptr Menu00](self.impl)) + +type + MenuItem* = ref object of gobject.Object + MenuItem00* = object of gobject.Object00 + +proc g_menu_item_new*(label: cstring; detailedAction: cstring): ptr MenuItem00 {. + importc: "g_menu_item_new", libprag.} + +proc newMenuItem*(label: string; detailedAction: string): MenuItem = + new(result, finalizeGObject) + result.impl = g_menu_item_new(cstring(label), cstring(detailedAction)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuItem*[T](result: var T; label: string; detailedAction: string) = + assert(result is MenuItem) + new(result, finalizeGObject) + result.impl = g_menu_item_new(cstring(label), cstring(detailedAction)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_menu_item_new_from_model*(model: ptr MenuModel00; itemIndex: int32): ptr MenuItem00 {. + importc: "g_menu_item_new_from_model", libprag.} + +proc newMenuItemFromModel*(model: MenuModel; itemIndex: int): MenuItem = + new(result, finalizeGObject) + result.impl = g_menu_item_new_from_model(cast[ptr MenuModel00](model.impl), int32(itemIndex)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuItemFromModel*[T](result: var T; model: MenuModel; itemIndex: int) = + assert(result is MenuItem) + new(result, finalizeGObject) + result.impl = g_menu_item_new_from_model(cast[ptr MenuModel00](model.impl), int32(itemIndex)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_menu_item_new_section*(label: cstring; section: ptr MenuModel00): ptr MenuItem00 {. + importc: "g_menu_item_new_section", libprag.} + +proc newMenuItemSection*(label: string; section: MenuModel): MenuItem = + new(result, finalizeGObject) + result.impl = g_menu_item_new_section(cstring(label), cast[ptr MenuModel00](section.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuItemSection*[T](result: var T; label: string; section: MenuModel) = + assert(result is MenuItem) + new(result, finalizeGObject) + result.impl = g_menu_item_new_section(cstring(label), cast[ptr MenuModel00](section.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_menu_item_new_submenu*(label: cstring; submenu: ptr MenuModel00): ptr MenuItem00 {. + importc: "g_menu_item_new_submenu", libprag.} + +proc newMenuItemSubmenu*(label: string; submenu: MenuModel): MenuItem = + new(result, finalizeGObject) + result.impl = g_menu_item_new_submenu(cstring(label), cast[ptr MenuModel00](submenu.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuItemSubmenu*[T](result: var T; label: string; submenu: MenuModel) = + assert(result is MenuItem) + new(result, finalizeGObject) + result.impl = g_menu_item_new_submenu(cstring(label), cast[ptr MenuModel00](submenu.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_menu_item_get_attribute_value*(self: ptr MenuItem00; attribute: cstring; expectedType: ptr glib.VariantType00): ptr glib.Variant00 {. + importc: "g_menu_item_get_attribute_value", libprag.} + +proc getAttributeValue*(self: MenuItem; attribute: string; expectedType: glib.VariantType): glib.Variant = + new(result) + result.impl = g_menu_item_get_attribute_value(cast[ptr MenuItem00](self.impl), cstring(attribute), cast[ptr glib.VariantType00](expectedType.impl)) + +proc attributeValue*(self: MenuItem; attribute: string; expectedType: glib.VariantType): glib.Variant = + new(result) + result.impl = g_menu_item_get_attribute_value(cast[ptr MenuItem00](self.impl), cstring(attribute), cast[ptr glib.VariantType00](expectedType.impl)) + +proc g_menu_item_get_link*(self: ptr MenuItem00; link: cstring): ptr MenuModel00 {. + importc: "g_menu_item_get_link", libprag.} + +proc getLink*(self: MenuItem; link: string): MenuModel = + let gobj = g_menu_item_get_link(cast[ptr MenuItem00](self.impl), cstring(link)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc link*(self: MenuItem; link: string): MenuModel = + let gobj = g_menu_item_get_link(cast[ptr MenuItem00](self.impl), cstring(link)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_menu_item_set_action_and_target_value*(self: ptr MenuItem00; action: cstring; targetValue: ptr glib.Variant00) {. + importc: "g_menu_item_set_action_and_target_value", libprag.} + +proc setActionAndTargetValue*(self: MenuItem; action: string; targetValue: glib.Variant) = + g_menu_item_set_action_and_target_value(cast[ptr MenuItem00](self.impl), cstring(action), cast[ptr glib.Variant00](targetValue.impl)) + +proc g_menu_item_set_attribute_value*(self: ptr MenuItem00; attribute: cstring; value: ptr glib.Variant00) {. + importc: "g_menu_item_set_attribute_value", libprag.} + +proc setAttributeValue*(self: MenuItem; attribute: string; value: glib.Variant) = + g_menu_item_set_attribute_value(cast[ptr MenuItem00](self.impl), cstring(attribute), cast[ptr glib.Variant00](value.impl)) + +proc g_menu_item_set_detailed_action*(self: ptr MenuItem00; detailedAction: cstring) {. + importc: "g_menu_item_set_detailed_action", libprag.} + +proc setDetailedAction*(self: MenuItem; detailedAction: string) = + g_menu_item_set_detailed_action(cast[ptr MenuItem00](self.impl), cstring(detailedAction)) + +proc `detailedAction=`*(self: MenuItem; detailedAction: string) = + g_menu_item_set_detailed_action(cast[ptr MenuItem00](self.impl), cstring(detailedAction)) + +proc g_menu_item_set_icon*(self: ptr MenuItem00; icon: ptr Icon00) {. + importc: "g_menu_item_set_icon", libprag.} + +proc setIcon*(self: MenuItem; icon: Icon) = + g_menu_item_set_icon(cast[ptr MenuItem00](self.impl), cast[ptr Icon00](icon.impl)) + +proc `icon=`*(self: MenuItem; icon: Icon) = + g_menu_item_set_icon(cast[ptr MenuItem00](self.impl), cast[ptr Icon00](icon.impl)) + +proc g_menu_item_set_label*(self: ptr MenuItem00; label: cstring) {. + importc: "g_menu_item_set_label", libprag.} + +proc setLabel*(self: MenuItem; label: string) = + g_menu_item_set_label(cast[ptr MenuItem00](self.impl), cstring(label)) + +proc `label=`*(self: MenuItem; label: string) = + g_menu_item_set_label(cast[ptr MenuItem00](self.impl), cstring(label)) + +proc g_menu_item_set_link*(self: ptr MenuItem00; link: cstring; model: ptr MenuModel00) {. + importc: "g_menu_item_set_link", libprag.} + +proc setLink*(self: MenuItem; link: string; model: MenuModel) = + g_menu_item_set_link(cast[ptr MenuItem00](self.impl), cstring(link), cast[ptr MenuModel00](model.impl)) + +proc g_menu_item_set_section*(self: ptr MenuItem00; section: ptr MenuModel00) {. + importc: "g_menu_item_set_section", libprag.} + +proc setSection*(self: MenuItem; section: MenuModel) = + g_menu_item_set_section(cast[ptr MenuItem00](self.impl), cast[ptr MenuModel00](section.impl)) + +proc `section=`*(self: MenuItem; section: MenuModel) = + g_menu_item_set_section(cast[ptr MenuItem00](self.impl), cast[ptr MenuModel00](section.impl)) + +proc g_menu_item_set_submenu*(self: ptr MenuItem00; submenu: ptr MenuModel00) {. + importc: "g_menu_item_set_submenu", libprag.} + +proc setSubmenu*(self: MenuItem; submenu: MenuModel) = + g_menu_item_set_submenu(cast[ptr MenuItem00](self.impl), cast[ptr MenuModel00](submenu.impl)) + +proc `submenu=`*(self: MenuItem; submenu: MenuModel) = + g_menu_item_set_submenu(cast[ptr MenuItem00](self.impl), cast[ptr MenuModel00](submenu.impl)) + +proc g_menu_append_item*(self: ptr Menu00; item: ptr MenuItem00) {. + importc: "g_menu_append_item", libprag.} + +proc appendItem*(self: Menu; item: MenuItem) = + g_menu_append_item(cast[ptr Menu00](self.impl), cast[ptr MenuItem00](item.impl)) + +proc g_menu_insert_item*(self: ptr Menu00; position: int32; item: ptr MenuItem00) {. + importc: "g_menu_insert_item", libprag.} + +proc insertItem*(self: Menu; position: int; item: MenuItem) = + g_menu_insert_item(cast[ptr Menu00](self.impl), int32(position), cast[ptr MenuItem00](item.impl)) + +proc g_menu_prepend_item*(self: ptr Menu00; item: ptr MenuItem00) {. + importc: "g_menu_prepend_item", libprag.} + +proc prependItem*(self: Menu; item: MenuItem) = + g_menu_prepend_item(cast[ptr Menu00](self.impl), cast[ptr MenuItem00](item.impl)) + +type + MenuAttributeIterClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getNext*: proc(iter: ptr MenuAttributeIter00; outName: var cstring; + value: var ptr glib.Variant00): gboolean {.cdecl.} + MenuAttributeIterClass* = ref object + impl*: ptr MenuAttributeIterClass00 + +type + MenuLinkIterClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getNext*: proc(iter: ptr MenuLinkIter00; outLink: var cstring; value: var ptr MenuModel00): gboolean {.cdecl.} + MenuLinkIterClass* = ref object + impl*: ptr MenuLinkIterClass00 + +type + MenuModelClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + isMutable*: proc(model: ptr MenuModel00): gboolean {.cdecl.} + getNItems*: proc(model: ptr MenuModel00): int32 {.cdecl.} + getItemAttributes*: proc(model: ptr MenuModel00; itemIndex: int32; attributes: var ptr HashTable00) {.cdecl.} + iterateItemAttributes*: proc(model: ptr MenuModel00; itemIndex: int32): ptr MenuAttributeIter00 {.cdecl.} + getItemAttributeValue*: proc(model: ptr MenuModel00; itemIndex: int32; attribute: cstring; + expectedType: ptr glib.VariantType00): ptr glib.Variant00 {.cdecl.} + getItemLinks*: proc(model: ptr MenuModel00; itemIndex: int32; links: var ptr HashTable00) {.cdecl.} + iterateItemLinks*: proc(model: ptr MenuModel00; itemIndex: int32): ptr MenuLinkIter00 {.cdecl.} + getItemLink*: proc(model: ptr MenuModel00; itemIndex: int32; link: cstring): ptr MenuModel00 {.cdecl.} + MenuModelClass* = ref object + impl*: ptr MenuModelClass00 + +type + MountIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + changed*: proc(mount: ptr Mount00) {.cdecl.} + unmounted*: proc(mount: ptr Mount00) {.cdecl.} + getRoot*: proc(mount: ptr Mount00): ptr File00 {.cdecl.} + getName*: proc(mount: ptr Mount00): cstring {.cdecl.} + getIcon*: proc(mount: ptr Mount00): ptr Icon00 {.cdecl.} + getUuid*: proc(mount: ptr Mount00): cstring {.cdecl.} + getVolume*: proc(mount: ptr Mount00): ptr Volume00 {.cdecl.} + getDrive*: proc(mount: ptr Mount00): ptr Drive00 {.cdecl.} + canUnmount*: proc(mount: ptr Mount00): gboolean {.cdecl.} + canEject*: proc(mount: ptr Mount00): gboolean {.cdecl.} + unmount*: proc(mount: ptr Mount00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + unmountFinish*: proc(mount: ptr Mount00; resu: ptr AsyncResult00): gboolean {.cdecl.} + eject*: proc(mount: ptr Mount00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + ejectFinish*: proc(mount: ptr Mount00; resu: ptr AsyncResult00): gboolean {.cdecl.} + remount*: proc(mount: ptr Mount00; flags: MountMountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + remountFinish*: proc(mount: ptr Mount00; resu: ptr AsyncResult00): gboolean {.cdecl.} + guessContentType*: proc(mount: ptr Mount00; forceRescan: gboolean; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + guessContentTypeFinish*: proc(mount: ptr Mount00; resu: ptr AsyncResult00): cstringArray {.cdecl.} + guessContentTypeSync*: proc(mount: ptr Mount00; forceRescan: gboolean; cancellable: ptr Cancellable00): cstringArray {.cdecl.} + preUnmount*: proc(mount: ptr Mount00) {.cdecl.} + unmountWithOperation*: proc(mount: ptr Mount00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + unmountWithOperationFinish*: proc(mount: ptr Mount00; resu: ptr AsyncResult00): gboolean {.cdecl.} + ejectWithOperation*: proc(mount: ptr Mount00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + ejectWithOperationFinish*: proc(mount: ptr Mount00; resu: ptr AsyncResult00): gboolean {.cdecl.} + getDefaultLocation*: proc(mount: ptr Mount00): ptr File00 {.cdecl.} + getSortKey*: proc(mount: ptr Mount00): cstring {.cdecl.} + getSymbolicIcon*: proc(mount: ptr Mount00): ptr Icon00 {.cdecl.} + MountIface* = ref object + impl*: ptr MountIface00 + +type + MountOperationClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + askPassword*: proc(op: ptr MountOperation00; message: cstring; defaultUser: cstring; + defaultDomain: cstring; flags: AskPasswordFlags) {.cdecl.} + askQuestion*: proc(op: ptr MountOperation00; message: cstring; choices: cstring) {.cdecl.} + reply*: proc(op: ptr MountOperation00; resu: MountOperationResult) {.cdecl.} + aborted*: proc(op: ptr MountOperation00) {.cdecl.} + showProcesses*: pointer + showUnmountProgress*: proc(op: ptr MountOperation00; message: cstring; timeLeft: int64; + bytesLeft: int64) {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + gReserved7*: pointer + gReserved8*: pointer + gReserved9*: pointer + MountOperationClass* = ref object + impl*: ptr MountOperationClass00 + +const NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME* = "gio-native-volume-monitor" + +const NETWORK_MONITOR_EXTENSION_POINT_NAME* = "gio-network-monitor" + +type + NativeSocketAddress00* {.pure.} = object + NativeSocketAddress* = ref object + impl*: ptr NativeSocketAddress00 + +type + VolumeMonitor* = ref object of gobject.Object + VolumeMonitor00* = object of gobject.Object00 + priv1: pointer + +proc scDriveChanged*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; drive: Drive00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drive-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDriveConnected*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; drive: Drive00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drive-connected", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDriveDisconnected*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; drive: Drive00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drive-disconnected", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDriveEjectButton*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; drive: Drive00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drive-eject-button", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDriveStopButton*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; drive: Drive00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drive-stop-button", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMountAdded*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; mount: Mount00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mount-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMountChanged*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; mount: Mount00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mount-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMountPreUnmount*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; mount: Mount00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mount-pre-unmount", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMountRemoved*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; mount: Mount00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mount-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scVolumeAdded*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; volume: Volume00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "volume-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scVolumeChanged*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; volume: Volume00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "volume-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scVolumeRemoved*(self: VolumeMonitor; p: proc (self: ptr gobject.Object00; volume: Volume00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "volume-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_volume_monitor_adopt_orphan_mount*(mount: ptr Mount00): ptr Volume00 {. + importc: "g_volume_monitor_adopt_orphan_mount", libprag.} + +proc adoptOrphanMount*(mount: Mount): Volume = + new(result) + result.impl = g_volume_monitor_adopt_orphan_mount(cast[ptr Mount00](mount.impl)) + +proc g_volume_monitor_get*(): ptr VolumeMonitor00 {. + importc: "g_volume_monitor_get", libprag.} + +proc get*(): VolumeMonitor = + let gobj = g_volume_monitor_get() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[VolumeMonitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_volume_monitor_get_connected_drives*(self: ptr VolumeMonitor00): ptr pointer {. + importc: "g_volume_monitor_get_connected_drives", libprag.} + +proc getConnectedDrives*(self: VolumeMonitor): ptr pointer = + g_volume_monitor_get_connected_drives(cast[ptr VolumeMonitor00](self.impl)) + +proc connectedDrives*(self: VolumeMonitor): ptr pointer = + g_volume_monitor_get_connected_drives(cast[ptr VolumeMonitor00](self.impl)) + +proc g_volume_monitor_get_mount_for_uuid*(self: ptr VolumeMonitor00; uuid: cstring): ptr Mount00 {. + importc: "g_volume_monitor_get_mount_for_uuid", libprag.} + +proc getMountForUuid*(self: VolumeMonitor; uuid: string): Mount = + new(result) + result.impl = g_volume_monitor_get_mount_for_uuid(cast[ptr VolumeMonitor00](self.impl), cstring(uuid)) + +proc mountForUuid*(self: VolumeMonitor; uuid: string): Mount = + new(result) + result.impl = g_volume_monitor_get_mount_for_uuid(cast[ptr VolumeMonitor00](self.impl), cstring(uuid)) + +proc g_volume_monitor_get_mounts*(self: ptr VolumeMonitor00): ptr pointer {. + importc: "g_volume_monitor_get_mounts", libprag.} + +proc getMounts*(self: VolumeMonitor): ptr pointer = + g_volume_monitor_get_mounts(cast[ptr VolumeMonitor00](self.impl)) + +proc mounts*(self: VolumeMonitor): ptr pointer = + g_volume_monitor_get_mounts(cast[ptr VolumeMonitor00](self.impl)) + +proc g_volume_monitor_get_volume_for_uuid*(self: ptr VolumeMonitor00; uuid: cstring): ptr Volume00 {. + importc: "g_volume_monitor_get_volume_for_uuid", libprag.} + +proc getVolumeForUuid*(self: VolumeMonitor; uuid: string): Volume = + new(result) + result.impl = g_volume_monitor_get_volume_for_uuid(cast[ptr VolumeMonitor00](self.impl), cstring(uuid)) + +proc volumeForUuid*(self: VolumeMonitor; uuid: string): Volume = + new(result) + result.impl = g_volume_monitor_get_volume_for_uuid(cast[ptr VolumeMonitor00](self.impl), cstring(uuid)) + +proc g_volume_monitor_get_volumes*(self: ptr VolumeMonitor00): ptr pointer {. + importc: "g_volume_monitor_get_volumes", libprag.} + +proc getVolumes*(self: VolumeMonitor): ptr pointer = + g_volume_monitor_get_volumes(cast[ptr VolumeMonitor00](self.impl)) + +proc volumes*(self: VolumeMonitor): ptr pointer = + g_volume_monitor_get_volumes(cast[ptr VolumeMonitor00](self.impl)) + +type + NativeVolumeMonitor* = ref object of VolumeMonitor + NativeVolumeMonitor00* = object of VolumeMonitor00 + +type + VolumeMonitorClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + volumeAdded*: proc(volumeMonitor: ptr VolumeMonitor00; volume: ptr Volume00) {.cdecl.} + volumeRemoved*: proc(volumeMonitor: ptr VolumeMonitor00; volume: ptr Volume00) {.cdecl.} + volumeChanged*: proc(volumeMonitor: ptr VolumeMonitor00; volume: ptr Volume00) {.cdecl.} + mountAdded*: proc(volumeMonitor: ptr VolumeMonitor00; mount: ptr Mount00) {.cdecl.} + mountRemoved*: proc(volumeMonitor: ptr VolumeMonitor00; mount: ptr Mount00) {.cdecl.} + mountPreUnmount*: proc(volumeMonitor: ptr VolumeMonitor00; mount: ptr Mount00) {.cdecl.} + mountChanged*: proc(volumeMonitor: ptr VolumeMonitor00; mount: ptr Mount00) {.cdecl.} + driveConnected*: proc(volumeMonitor: ptr VolumeMonitor00; drive: ptr Drive00) {.cdecl.} + driveDisconnected*: proc(volumeMonitor: ptr VolumeMonitor00; drive: ptr Drive00) {.cdecl.} + driveChanged*: proc(volumeMonitor: ptr VolumeMonitor00; drive: ptr Drive00) {.cdecl.} + isSupported*: proc(): gboolean {.cdecl.} + getConnectedDrives*: proc(volumeMonitor: ptr VolumeMonitor00): ptr pointer {.cdecl.} + getVolumes*: proc(volumeMonitor: ptr VolumeMonitor00): ptr pointer {.cdecl.} + getMounts*: proc(volumeMonitor: ptr VolumeMonitor00): ptr pointer {.cdecl.} + getVolumeForUuid*: proc(volumeMonitor: ptr VolumeMonitor00; uuid: cstring): ptr Volume00 {.cdecl.} + getMountForUuid*: proc(volumeMonitor: ptr VolumeMonitor00; uuid: cstring): ptr Mount00 {.cdecl.} + adoptOrphanMount*: pointer + driveEjectButton*: proc(volumeMonitor: ptr VolumeMonitor00; drive: ptr Drive00) {.cdecl.} + driveStopButton*: proc(volumeMonitor: ptr VolumeMonitor00; drive: ptr Drive00) {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + VolumeMonitorClass* = ref object + impl*: ptr VolumeMonitorClass00 + +type + NativeVolumeMonitorClass00* {.pure.} = object + parentClass*: VolumeMonitorClass00 + getMountForMountPath*: pointer + NativeVolumeMonitorClass* = ref object + impl*: ptr NativeVolumeMonitorClass00 + +type + NetworkAddressPrivate00* {.pure.} = object + NetworkAddressPrivate* = ref object + impl*: ptr NetworkAddressPrivate00 + +type + NetworkAddress* = ref object of gobject.Object + NetworkAddress00* = object of gobject.Object00 + priv1: ptr NetworkAddressPrivate00 + +proc g_network_address_new*(hostname: cstring; port: uint16): ptr NetworkAddress00 {. + importc: "g_network_address_new", libprag.} + +proc newNetworkAddress*(hostname: string; port: uint16): NetworkAddress = + new(result, finalizeGObject) + result.impl = g_network_address_new(cstring(hostname), port) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initNetworkAddress*[T](result: var T; hostname: string; port: uint16) = + assert(result is NetworkAddress) + new(result, finalizeGObject) + result.impl = g_network_address_new(cstring(hostname), port) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_network_address_new_loopback*(port: uint16): ptr NetworkAddress00 {. + importc: "g_network_address_new_loopback", libprag.} + +proc newNetworkAddressLoopback*(port: uint16): NetworkAddress = + new(result, finalizeGObject) + result.impl = g_network_address_new_loopback(port) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initNetworkAddressLoopback*[T](result: var T; port: uint16) = + assert(result is NetworkAddress) + new(result, finalizeGObject) + result.impl = g_network_address_new_loopback(port) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_network_address_parse*(hostAndPort: cstring; defaultPort: uint16): ptr NetworkAddress00 {. + importc: "g_network_address_parse", libprag.} + +proc parse*(hostAndPort: string; defaultPort: uint16): NetworkAddress = + let gobj = g_network_address_parse(cstring(hostAndPort), defaultPort) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[NetworkAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_network_address_parse_uri*(uri: cstring; defaultPort: uint16): ptr NetworkAddress00 {. + importc: "g_network_address_parse_uri", libprag.} + +proc parseUri*(uri: string; defaultPort: uint16): NetworkAddress = + let gobj = g_network_address_parse_uri(cstring(uri), defaultPort) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[NetworkAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_network_address_get_hostname*(self: ptr NetworkAddress00): cstring {. + importc: "g_network_address_get_hostname", libprag.} + +proc getHostname*(self: NetworkAddress): string = + let resul0 = g_network_address_get_hostname(cast[ptr NetworkAddress00](self.impl)) + result = $resul0 + +proc hostname*(self: NetworkAddress): string = + let resul0 = g_network_address_get_hostname(cast[ptr NetworkAddress00](self.impl)) + result = $resul0 + +proc g_network_address_get_port*(self: ptr NetworkAddress00): uint16 {. + importc: "g_network_address_get_port", libprag.} + +proc getPort*(self: NetworkAddress): uint16 = + g_network_address_get_port(cast[ptr NetworkAddress00](self.impl)) + +proc port*(self: NetworkAddress): uint16 = + g_network_address_get_port(cast[ptr NetworkAddress00](self.impl)) + +proc g_network_address_get_scheme*(self: ptr NetworkAddress00): cstring {. + importc: "g_network_address_get_scheme", libprag.} + +proc getScheme*(self: NetworkAddress): string = + let resul0 = g_network_address_get_scheme(cast[ptr NetworkAddress00](self.impl)) + result = $resul0 + +proc scheme*(self: NetworkAddress): string = + let resul0 = g_network_address_get_scheme(cast[ptr NetworkAddress00](self.impl)) + result = $resul0 + +type + NetworkAddressClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + NetworkAddressClass* = ref object + impl*: ptr NetworkAddressClass00 + +type + NetworkConnectivity* {.size: sizeof(cint), pure.} = enum + local = 1 + limited = 2 + portal = 3 + full = 4 + +type + NetworkMonitor00* {.pure.} = object + NetworkMonitor* = ref object + impl*: ptr NetworkMonitor00 + +proc g_network_monitor_get_default*(): ptr NetworkMonitor00 {. + importc: "g_network_monitor_get_default", libprag.} + +proc getDefault*(): NetworkMonitor = + new(result) + result.impl = g_network_monitor_get_default() + +proc default*(): NetworkMonitor = + new(result) + result.impl = g_network_monitor_get_default() + +proc g_network_monitor_can_reach*(self: ptr NetworkMonitor00; connectable: ptr SocketConnectable00; + cancellable: ptr Cancellable00): gboolean {. + importc: "g_network_monitor_can_reach", libprag.} + +proc canReach*(self: NetworkMonitor; connectable: SocketConnectable; + cancellable: Cancellable): bool = + toBool(g_network_monitor_can_reach(cast[ptr NetworkMonitor00](self.impl), cast[ptr SocketConnectable00](connectable.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_network_monitor_can_reach_async*(self: ptr NetworkMonitor00; connectable: ptr SocketConnectable00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_network_monitor_can_reach_async", libprag.} + +proc canReachAsync*(self: NetworkMonitor; connectable: SocketConnectable; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_network_monitor_can_reach_async(cast[ptr NetworkMonitor00](self.impl), cast[ptr SocketConnectable00](connectable.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_network_monitor_can_reach_finish*(self: ptr NetworkMonitor00; resu: ptr AsyncResult00): gboolean {. + importc: "g_network_monitor_can_reach_finish", libprag.} + +proc canReachFinish*(self: NetworkMonitor; resu: AsyncResult): bool = + toBool(g_network_monitor_can_reach_finish(cast[ptr NetworkMonitor00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_network_monitor_get_connectivity*(self: ptr NetworkMonitor00): NetworkConnectivity {. + importc: "g_network_monitor_get_connectivity", libprag.} + +proc getConnectivity*(self: NetworkMonitor): NetworkConnectivity = + g_network_monitor_get_connectivity(cast[ptr NetworkMonitor00](self.impl)) + +proc connectivity*(self: NetworkMonitor): NetworkConnectivity = + g_network_monitor_get_connectivity(cast[ptr NetworkMonitor00](self.impl)) + +proc g_network_monitor_get_network_available*(self: ptr NetworkMonitor00): gboolean {. + importc: "g_network_monitor_get_network_available", libprag.} + +proc getNetworkAvailable*(self: NetworkMonitor): bool = + toBool(g_network_monitor_get_network_available(cast[ptr NetworkMonitor00](self.impl))) + +proc networkAvailable*(self: NetworkMonitor): bool = + toBool(g_network_monitor_get_network_available(cast[ptr NetworkMonitor00](self.impl))) + +proc g_network_monitor_get_network_metered*(self: ptr NetworkMonitor00): gboolean {. + importc: "g_network_monitor_get_network_metered", libprag.} + +proc getNetworkMetered*(self: NetworkMonitor): bool = + toBool(g_network_monitor_get_network_metered(cast[ptr NetworkMonitor00](self.impl))) + +proc networkMetered*(self: NetworkMonitor): bool = + toBool(g_network_monitor_get_network_metered(cast[ptr NetworkMonitor00](self.impl))) + +type + NetworkMonitorInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + networkChanged*: proc(monitor: ptr NetworkMonitor00; available: gboolean) {.cdecl.} + canReach*: proc(monitor: ptr NetworkMonitor00; connectable: ptr SocketConnectable00; + cancellable: ptr Cancellable00): gboolean {.cdecl.} + canReachAsync*: proc(monitor: ptr NetworkMonitor00; connectable: ptr SocketConnectable00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + canReachFinish*: proc(monitor: ptr NetworkMonitor00; resu: ptr AsyncResult00): gboolean {.cdecl.} + NetworkMonitorInterface* = ref object + impl*: ptr NetworkMonitorInterface00 + +type + NetworkServicePrivate00* {.pure.} = object + NetworkServicePrivate* = ref object + impl*: ptr NetworkServicePrivate00 + +type + NetworkService* = ref object of gobject.Object + NetworkService00* = object of gobject.Object00 + priv1: ptr NetworkServicePrivate00 + +proc g_network_service_new*(service: cstring; protocol: cstring; domain: cstring): ptr NetworkService00 {. + importc: "g_network_service_new", libprag.} + +proc newNetworkService*(service: string; protocol: string; domain: string): NetworkService = + new(result, finalizeGObject) + result.impl = g_network_service_new(cstring(service), cstring(protocol), cstring(domain)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initNetworkService*[T](result: var T; service: string; protocol: string; domain: string) = + assert(result is NetworkService) + new(result, finalizeGObject) + result.impl = g_network_service_new(cstring(service), cstring(protocol), cstring(domain)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_network_service_get_domain*(self: ptr NetworkService00): cstring {. + importc: "g_network_service_get_domain", libprag.} + +proc getDomain*(self: NetworkService): string = + let resul0 = g_network_service_get_domain(cast[ptr NetworkService00](self.impl)) + result = $resul0 + +proc domain*(self: NetworkService): string = + let resul0 = g_network_service_get_domain(cast[ptr NetworkService00](self.impl)) + result = $resul0 + +proc g_network_service_get_protocol*(self: ptr NetworkService00): cstring {. + importc: "g_network_service_get_protocol", libprag.} + +proc getProtocol*(self: NetworkService): string = + let resul0 = g_network_service_get_protocol(cast[ptr NetworkService00](self.impl)) + result = $resul0 + +proc protocol*(self: NetworkService): string = + let resul0 = g_network_service_get_protocol(cast[ptr NetworkService00](self.impl)) + result = $resul0 + +proc g_network_service_get_scheme*(self: ptr NetworkService00): cstring {. + importc: "g_network_service_get_scheme", libprag.} + +proc getScheme*(self: NetworkService): string = + let resul0 = g_network_service_get_scheme(cast[ptr NetworkService00](self.impl)) + result = $resul0 + +proc scheme*(self: NetworkService): string = + let resul0 = g_network_service_get_scheme(cast[ptr NetworkService00](self.impl)) + result = $resul0 + +proc g_network_service_get_service*(self: ptr NetworkService00): cstring {. + importc: "g_network_service_get_service", libprag.} + +proc getService*(self: NetworkService): string = + let resul0 = g_network_service_get_service(cast[ptr NetworkService00](self.impl)) + result = $resul0 + +proc service*(self: NetworkService): string = + let resul0 = g_network_service_get_service(cast[ptr NetworkService00](self.impl)) + result = $resul0 + +proc g_network_service_set_scheme*(self: ptr NetworkService00; scheme: cstring) {. + importc: "g_network_service_set_scheme", libprag.} + +proc setScheme*(self: NetworkService; scheme: string) = + g_network_service_set_scheme(cast[ptr NetworkService00](self.impl), cstring(scheme)) + +proc `scheme=`*(self: NetworkService; scheme: string) = + g_network_service_set_scheme(cast[ptr NetworkService00](self.impl), cstring(scheme)) + +type + NetworkServiceClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + NetworkServiceClass* = ref object + impl*: ptr NetworkServiceClass00 + +const PROXY_EXTENSION_POINT_NAME* = "gio-proxy" + +const PROXY_RESOLVER_EXTENSION_POINT_NAME* = "gio-proxy-resolver" + +type + PermissionPrivate00* {.pure.} = object + PermissionPrivate* = ref object + impl*: ptr PermissionPrivate00 + +type + Permission* = ref object of gobject.Object + Permission00* = object of gobject.Object00 + priv1: ptr PermissionPrivate00 + +proc g_permission_acquire*(self: ptr Permission00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_permission_acquire", libprag.} + +proc acquire*(self: Permission; cancellable: Cancellable): bool = + toBool(g_permission_acquire(cast[ptr Permission00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_permission_acquire_async*(self: ptr Permission00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_permission_acquire_async", libprag.} + +proc acquireAsync*(self: Permission; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_permission_acquire_async(cast[ptr Permission00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_permission_acquire_finish*(self: ptr Permission00; resu: ptr AsyncResult00): gboolean {. + importc: "g_permission_acquire_finish", libprag.} + +proc acquireFinish*(self: Permission; resu: AsyncResult): bool = + toBool(g_permission_acquire_finish(cast[ptr Permission00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_permission_get_allowed*(self: ptr Permission00): gboolean {. + importc: "g_permission_get_allowed", libprag.} + +proc getAllowed*(self: Permission): bool = + toBool(g_permission_get_allowed(cast[ptr Permission00](self.impl))) + +proc allowed*(self: Permission): bool = + toBool(g_permission_get_allowed(cast[ptr Permission00](self.impl))) + +proc g_permission_get_can_acquire*(self: ptr Permission00): gboolean {. + importc: "g_permission_get_can_acquire", libprag.} + +proc getCanAcquire*(self: Permission): bool = + toBool(g_permission_get_can_acquire(cast[ptr Permission00](self.impl))) + +proc canAcquire*(self: Permission): bool = + toBool(g_permission_get_can_acquire(cast[ptr Permission00](self.impl))) + +proc g_permission_get_can_release*(self: ptr Permission00): gboolean {. + importc: "g_permission_get_can_release", libprag.} + +proc getCanRelease*(self: Permission): bool = + toBool(g_permission_get_can_release(cast[ptr Permission00](self.impl))) + +proc canRelease*(self: Permission): bool = + toBool(g_permission_get_can_release(cast[ptr Permission00](self.impl))) + +proc g_permission_impl_update*(self: ptr Permission00; allowed: gboolean; canAcquire: gboolean; + canRelease: gboolean) {. + importc: "g_permission_impl_update", libprag.} + +proc implUpdate*(self: Permission; allowed: bool; canAcquire: bool; + canRelease: bool) = + g_permission_impl_update(cast[ptr Permission00](self.impl), gboolean(allowed), gboolean(canAcquire), gboolean(canRelease)) + +proc g_permission_release*(self: ptr Permission00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_permission_release", libprag.} + +proc release*(self: Permission; cancellable: Cancellable): bool = + toBool(g_permission_release(cast[ptr Permission00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_permission_release_async*(self: ptr Permission00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_permission_release_async", libprag.} + +proc releaseAsync*(self: Permission; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_permission_release_async(cast[ptr Permission00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_permission_release_finish*(self: ptr Permission00; resu: ptr AsyncResult00): gboolean {. + importc: "g_permission_release_finish", libprag.} + +proc releaseFinish*(self: Permission; resu: AsyncResult): bool = + toBool(g_permission_release_finish(cast[ptr Permission00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +type + PermissionClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + acquire*: proc(permission: ptr Permission00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + acquireAsync*: proc(permission: ptr Permission00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + acquireFinish*: proc(permission: ptr Permission00; resu: ptr AsyncResult00): gboolean {.cdecl.} + release*: proc(permission: ptr Permission00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + releaseAsync*: proc(permission: ptr Permission00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + releaseFinish*: proc(permission: ptr Permission00; resu: ptr AsyncResult00): gboolean {.cdecl.} + reserved*: array[16, pointer] + PermissionClass* = ref object + impl*: ptr PermissionClass00 + +type + PollableInputStream00* {.pure.} = object + PollableInputStream* = ref object + impl*: ptr PollableInputStream00 + +proc g_pollable_input_stream_can_poll*(self: ptr PollableInputStream00): gboolean {. + importc: "g_pollable_input_stream_can_poll", libprag.} + +proc canPoll*(self: PollableInputStream): bool = + toBool(g_pollable_input_stream_can_poll(cast[ptr PollableInputStream00](self.impl))) + +proc g_pollable_input_stream_create_source*(self: ptr PollableInputStream00; cancellable: ptr Cancellable00): ptr glib.Source00 {. + importc: "g_pollable_input_stream_create_source", libprag.} + +proc createSource*(self: PollableInputStream; cancellable: Cancellable): glib.Source = + new(result) + result.impl = g_pollable_input_stream_create_source(cast[ptr PollableInputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_pollable_input_stream_is_readable*(self: ptr PollableInputStream00): gboolean {. + importc: "g_pollable_input_stream_is_readable", libprag.} + +proc isReadable*(self: PollableInputStream): bool = + toBool(g_pollable_input_stream_is_readable(cast[ptr PollableInputStream00](self.impl))) + +proc g_pollable_input_stream_read_nonblocking*(self: ptr PollableInputStream00; buffer: uint8Array; + count: uint64; cancellable: ptr Cancellable00): int64 {. + importc: "g_pollable_input_stream_read_nonblocking", libprag.} + +proc readNonblocking*(self: PollableInputStream; buffer: uint8Array; count: uint64; + cancellable: Cancellable): int64 = + g_pollable_input_stream_read_nonblocking(cast[ptr PollableInputStream00](self.impl), buffer, count, cast[ptr Cancellable00](cancellable.impl)) + +type + PollableInputStreamInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + canPoll*: proc(stream: ptr PollableInputStream00): gboolean {.cdecl.} + isReadable*: proc(stream: ptr PollableInputStream00): gboolean {.cdecl.} + createSource*: proc(stream: ptr PollableInputStream00; cancellable: ptr Cancellable00): ptr glib.Source00 {.cdecl.} + readNonblocking*: proc(stream: ptr PollableInputStream00; buffer: uint8Array; + count: uint64): int64 {.cdecl.} + PollableInputStreamInterface* = ref object + impl*: ptr PollableInputStreamInterface00 + +type + PollableOutputStream00* {.pure.} = object + PollableOutputStream* = ref object + impl*: ptr PollableOutputStream00 + +proc g_pollable_output_stream_can_poll*(self: ptr PollableOutputStream00): gboolean {. + importc: "g_pollable_output_stream_can_poll", libprag.} + +proc canPoll*(self: PollableOutputStream): bool = + toBool(g_pollable_output_stream_can_poll(cast[ptr PollableOutputStream00](self.impl))) + +proc g_pollable_output_stream_create_source*(self: ptr PollableOutputStream00; cancellable: ptr Cancellable00): ptr glib.Source00 {. + importc: "g_pollable_output_stream_create_source", libprag.} + +proc createSource*(self: PollableOutputStream; cancellable: Cancellable): glib.Source = + new(result) + result.impl = g_pollable_output_stream_create_source(cast[ptr PollableOutputStream00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_pollable_output_stream_is_writable*(self: ptr PollableOutputStream00): gboolean {. + importc: "g_pollable_output_stream_is_writable", libprag.} + +proc isWritable*(self: PollableOutputStream): bool = + toBool(g_pollable_output_stream_is_writable(cast[ptr PollableOutputStream00](self.impl))) + +proc g_pollable_output_stream_write_nonblocking*(self: ptr PollableOutputStream00; buffer: uint8Array; + count: uint64; cancellable: ptr Cancellable00): int64 {. + importc: "g_pollable_output_stream_write_nonblocking", libprag.} + +proc writeNonblocking*(self: PollableOutputStream; buffer: uint8Array; count: uint64; + cancellable: Cancellable): int64 = + g_pollable_output_stream_write_nonblocking(cast[ptr PollableOutputStream00](self.impl), buffer, count, cast[ptr Cancellable00](cancellable.impl)) + +type + PollableOutputStreamInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + canPoll*: proc(stream: ptr PollableOutputStream00): gboolean {.cdecl.} + isWritable*: proc(stream: ptr PollableOutputStream00): gboolean {.cdecl.} + createSource*: proc(stream: ptr PollableOutputStream00; cancellable: ptr Cancellable00): ptr glib.Source00 {.cdecl.} + writeNonblocking*: proc(stream: ptr PollableOutputStream00; buffer: uint8Array; + count: uint64): int64 {.cdecl.} + PollableOutputStreamInterface* = ref object + impl*: ptr PollableOutputStreamInterface00 + +type + PollableSourceFunc* = proc (pollableStream: ptr gobject.Object00; userData: pointer): gboolean {.cdecl.} + +type + PropertyAction* = ref object of gobject.Object + PropertyAction00* = object of gobject.Object00 + +proc g_property_action_new*(name: cstring; `object`: ptr gobject.Object00; propertyName: cstring): ptr PropertyAction00 {. + importc: "g_property_action_new", libprag.} + +proc newPropertyAction*(name: string; `object`: gobject.Object; propertyName: string): PropertyAction = + new(result, finalizeGObject) + result.impl = g_property_action_new(cstring(name), cast[ptr gobject.Object00](`object`.impl), cstring(propertyName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPropertyAction*[T](result: var T; name: string; `object`: gobject.Object; propertyName: string) = + assert(result is PropertyAction) + new(result, finalizeGObject) + result.impl = g_property_action_new(cstring(name), cast[ptr gobject.Object00](`object`.impl), cstring(propertyName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + Proxy00* {.pure.} = object + Proxy* = ref object + impl*: ptr Proxy00 + +proc g_proxy_get_default_for_protocol*(protocol: cstring): ptr Proxy00 {. + importc: "g_proxy_get_default_for_protocol", libprag.} + +proc getDefaultForProtocol*(protocol: string): Proxy = + new(result) + result.impl = g_proxy_get_default_for_protocol(cstring(protocol)) + +proc defaultForProtocol*(protocol: string): Proxy = + new(result) + result.impl = g_proxy_get_default_for_protocol(cstring(protocol)) + +proc g_proxy_connect_finish*(self: ptr Proxy00; resu: ptr AsyncResult00): ptr IOStream00 {. + importc: "g_proxy_connect_finish", libprag.} + +proc connectFinish*(self: Proxy; resu: AsyncResult): IOStream = + let gobj = g_proxy_connect_finish(cast[ptr Proxy00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_proxy_supports_hostname*(self: ptr Proxy00): gboolean {. + importc: "g_proxy_supports_hostname", libprag.} + +proc supportsHostname*(self: Proxy): bool = + toBool(g_proxy_supports_hostname(cast[ptr Proxy00](self.impl))) + +type + ProxyAddressPrivate00* {.pure.} = object + ProxyAddressPrivate* = ref object + impl*: ptr ProxyAddressPrivate00 + +type + ProxyAddress* = ref object of InetSocketAddress + ProxyAddress00* = object of InetSocketAddress00 + priv3: ptr ProxyAddressPrivate00 + +proc g_proxy_address_new*(inetaddr: ptr InetAddress00; port: uint16; protocol: cstring; + destHostname: cstring; destPort: uint16; username: cstring; password: cstring): ptr ProxyAddress00 {. + importc: "g_proxy_address_new", libprag.} + +proc newProxyAddress*(inetaddr: InetAddress; port: uint16; protocol: string; + destHostname: string; destPort: uint16; username: string; password: string): ProxyAddress = + new(result, finalizeGObject) + result.impl = g_proxy_address_new(cast[ptr InetAddress00](inetaddr.impl), port, cstring(protocol), cstring(destHostname), destPort, cstring(username), cstring(password)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initProxyAddress*[T](result: var T; inetaddr: InetAddress; port: uint16; protocol: string; + destHostname: string; destPort: uint16; username: string; password: string) = + assert(result is ProxyAddress) + new(result, finalizeGObject) + result.impl = g_proxy_address_new(cast[ptr InetAddress00](inetaddr.impl), port, cstring(protocol), cstring(destHostname), destPort, cstring(username), cstring(password)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_proxy_address_get_destination_hostname*(self: ptr ProxyAddress00): cstring {. + importc: "g_proxy_address_get_destination_hostname", libprag.} + +proc getDestinationHostname*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_destination_hostname(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc destinationHostname*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_destination_hostname(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc g_proxy_address_get_destination_port*(self: ptr ProxyAddress00): uint16 {. + importc: "g_proxy_address_get_destination_port", libprag.} + +proc getDestinationPort*(self: ProxyAddress): uint16 = + g_proxy_address_get_destination_port(cast[ptr ProxyAddress00](self.impl)) + +proc destinationPort*(self: ProxyAddress): uint16 = + g_proxy_address_get_destination_port(cast[ptr ProxyAddress00](self.impl)) + +proc g_proxy_address_get_destination_protocol*(self: ptr ProxyAddress00): cstring {. + importc: "g_proxy_address_get_destination_protocol", libprag.} + +proc getDestinationProtocol*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_destination_protocol(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc destinationProtocol*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_destination_protocol(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc g_proxy_address_get_password*(self: ptr ProxyAddress00): cstring {. + importc: "g_proxy_address_get_password", libprag.} + +proc getPassword*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_password(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc password*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_password(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc g_proxy_address_get_protocol*(self: ptr ProxyAddress00): cstring {. + importc: "g_proxy_address_get_protocol", libprag.} + +proc getProtocol*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_protocol(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc protocol*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_protocol(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc g_proxy_address_get_uri*(self: ptr ProxyAddress00): cstring {. + importc: "g_proxy_address_get_uri", libprag.} + +proc getUri*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_uri(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc uri*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_uri(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc g_proxy_address_get_username*(self: ptr ProxyAddress00): cstring {. + importc: "g_proxy_address_get_username", libprag.} + +proc getUsername*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_username(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc username*(self: ProxyAddress): string = + let resul0 = g_proxy_address_get_username(cast[ptr ProxyAddress00](self.impl)) + result = $resul0 + +proc g_proxy_connect*(self: ptr Proxy00; connection: ptr IOStream00; proxyAddress: ptr ProxyAddress00; + cancellable: ptr Cancellable00): ptr IOStream00 {. + importc: "g_proxy_connect", libprag.} + +proc connect*(self: Proxy; connection: IOStream; proxyAddress: ProxyAddress; + cancellable: Cancellable): IOStream = + let gobj = g_proxy_connect(cast[ptr Proxy00](self.impl), cast[ptr IOStream00](connection.impl), cast[ptr ProxyAddress00](proxyAddress.impl), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_proxy_connect_async*(self: ptr Proxy00; connection: ptr IOStream00; proxyAddress: ptr ProxyAddress00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_proxy_connect_async", libprag.} + +proc connectAsync*(self: Proxy; connection: IOStream; proxyAddress: ProxyAddress; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_proxy_connect_async(cast[ptr Proxy00](self.impl), cast[ptr IOStream00](connection.impl), cast[ptr ProxyAddress00](proxyAddress.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +type + ProxyAddressClass00* {.pure.} = object + parentClass*: InetSocketAddressClass00 + ProxyAddressClass* = ref object + impl*: ptr ProxyAddressClass00 + +type + ProxyAddressEnumeratorPrivate00* {.pure.} = object + ProxyAddressEnumeratorPrivate* = ref object + impl*: ptr ProxyAddressEnumeratorPrivate00 + +type + ProxyAddressEnumerator* = ref object of SocketAddressEnumerator + ProxyAddressEnumerator00* = object of SocketAddressEnumerator00 + priv2: ptr ProxyAddressEnumeratorPrivate00 + +type + SocketAddressEnumeratorClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + next*: proc(enumerator: ptr SocketAddressEnumerator00; cancellable: ptr Cancellable00): ptr SocketAddress00 {.cdecl.} + nextAsync*: proc(enumerator: ptr SocketAddressEnumerator00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + nextFinish*: proc(enumerator: ptr SocketAddressEnumerator00; resu: ptr AsyncResult00): ptr SocketAddress00 {.cdecl.} + SocketAddressEnumeratorClass* = ref object + impl*: ptr SocketAddressEnumeratorClass00 + +type + ProxyAddressEnumeratorClass00* {.pure.} = object + parentClass*: SocketAddressEnumeratorClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + gReserved7*: pointer + ProxyAddressEnumeratorClass* = ref object + impl*: ptr ProxyAddressEnumeratorClass00 + +type + ProxyInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + connect*: proc(proxy: ptr Proxy00; connection: ptr IOStream00; proxyAddress: ptr ProxyAddress00; + cancellable: ptr Cancellable00): ptr IOStream00 {.cdecl.} + connectAsync*: proc(proxy: ptr Proxy00; connection: ptr IOStream00; proxyAddress: ptr ProxyAddress00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + connectFinish*: proc(proxy: ptr Proxy00; resu: ptr AsyncResult00): ptr IOStream00 {.cdecl.} + supportsHostname*: proc(proxy: ptr Proxy00): gboolean {.cdecl.} + ProxyInterface* = ref object + impl*: ptr ProxyInterface00 + +type + ProxyResolver00* {.pure.} = object + ProxyResolver* = ref object + impl*: ptr ProxyResolver00 + +proc g_proxy_resolver_get_default*(): ptr ProxyResolver00 {. + importc: "g_proxy_resolver_get_default", libprag.} + +proc getDefault*(): ProxyResolver = + new(result) + result.impl = g_proxy_resolver_get_default() + +proc default*(): ProxyResolver = + new(result) + result.impl = g_proxy_resolver_get_default() + +proc g_proxy_resolver_is_supported*(self: ptr ProxyResolver00): gboolean {. + importc: "g_proxy_resolver_is_supported", libprag.} + +proc isSupported*(self: ProxyResolver): bool = + toBool(g_proxy_resolver_is_supported(cast[ptr ProxyResolver00](self.impl))) + +proc g_proxy_resolver_lookup*(self: ptr ProxyResolver00; uri: cstring; cancellable: ptr Cancellable00): cstringArray {. + importc: "g_proxy_resolver_lookup", libprag.} + +proc lookup*(self: ProxyResolver; uri: string; cancellable: Cancellable): cstringArray = + g_proxy_resolver_lookup(cast[ptr ProxyResolver00](self.impl), cstring(uri), cast[ptr Cancellable00](cancellable.impl)) + +proc g_proxy_resolver_lookup_async*(self: ptr ProxyResolver00; uri: cstring; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_proxy_resolver_lookup_async", libprag.} + +proc lookupAsync*(self: ProxyResolver; uri: string; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_proxy_resolver_lookup_async(cast[ptr ProxyResolver00](self.impl), cstring(uri), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_proxy_resolver_lookup_finish*(self: ptr ProxyResolver00; resu: ptr AsyncResult00): cstringArray {. + importc: "g_proxy_resolver_lookup_finish", libprag.} + +proc lookupFinish*(self: ProxyResolver; resu: AsyncResult): cstringArray = + g_proxy_resolver_lookup_finish(cast[ptr ProxyResolver00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +type + ProxyResolverInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + isSupported*: proc(resolver: ptr ProxyResolver00): gboolean {.cdecl.} + lookup*: proc(resolver: ptr ProxyResolver00; uri: cstring; cancellable: ptr Cancellable00): cstringArray {.cdecl.} + lookupAsync*: proc(resolver: ptr ProxyResolver00; uri: cstring; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + lookupFinish*: proc(resolver: ptr ProxyResolver00; resu: ptr AsyncResult00): cstringArray {.cdecl.} + ProxyResolverInterface* = ref object + impl*: ptr ProxyResolverInterface00 + +type + ReallocFunc* = proc (data: pointer; size: uint64): pointer {.cdecl.} + +type + RemoteActionGroup00* {.pure.} = object + RemoteActionGroup* = ref object + impl*: ptr RemoteActionGroup00 + +proc g_remote_action_group_activate_action_full*(self: ptr RemoteActionGroup00; actionName: cstring; + parameter: ptr glib.Variant00; platformData: ptr glib.Variant00) {. + importc: "g_remote_action_group_activate_action_full", libprag.} + +proc activateActionFull*(self: RemoteActionGroup; actionName: string; parameter: glib.Variant; + platformData: glib.Variant) = + g_remote_action_group_activate_action_full(cast[ptr RemoteActionGroup00](self.impl), cstring(actionName), cast[ptr glib.Variant00](parameter.impl), cast[ptr glib.Variant00](platformData.impl)) + +proc g_remote_action_group_change_action_state_full*(self: ptr RemoteActionGroup00; actionName: cstring; + value: ptr glib.Variant00; platformData: ptr glib.Variant00) {. + importc: "g_remote_action_group_change_action_state_full", libprag.} + +proc changeActionStateFull*(self: RemoteActionGroup; actionName: string; value: glib.Variant; + platformData: glib.Variant) = + g_remote_action_group_change_action_state_full(cast[ptr RemoteActionGroup00](self.impl), cstring(actionName), cast[ptr glib.Variant00](value.impl), cast[ptr glib.Variant00](platformData.impl)) + +type + RemoteActionGroupInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + activateActionFull*: proc(remote: ptr RemoteActionGroup00; actionName: cstring; + parameter: ptr glib.Variant00; platformData: ptr glib.Variant00) {.cdecl.} + changeActionStateFull*: proc(remote: ptr RemoteActionGroup00; actionName: cstring; + value: ptr glib.Variant00; platformData: ptr glib.Variant00) {.cdecl.} + RemoteActionGroupInterface* = ref object + impl*: ptr RemoteActionGroupInterface00 + +type + ResolverPrivate00* {.pure.} = object + ResolverPrivate* = ref object + impl*: ptr ResolverPrivate00 + +type + Resolver* = ref object of gobject.Object + Resolver00* = object of gobject.Object00 + priv1: ptr ResolverPrivate00 + +proc scReload*(self: Resolver; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "reload", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_resolver_get_default*(): ptr Resolver00 {. + importc: "g_resolver_get_default", libprag.} + +proc getDefault*(): Resolver = + let gobj = g_resolver_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Resolver](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): Resolver = + let gobj = g_resolver_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Resolver](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_resolver_lookup_by_address*(self: ptr Resolver00; address: ptr InetAddress00; + cancellable: ptr Cancellable00): cstring {. + importc: "g_resolver_lookup_by_address", libprag.} + +proc lookupByAddress*(self: Resolver; address: InetAddress; cancellable: Cancellable): string = + let resul0 = g_resolver_lookup_by_address(cast[ptr Resolver00](self.impl), cast[ptr InetAddress00](address.impl), cast[ptr Cancellable00](cancellable.impl)) + result = $resul0 + cogfree(resul0) + +proc g_resolver_lookup_by_address_async*(self: ptr Resolver00; address: ptr InetAddress00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_resolver_lookup_by_address_async", libprag.} + +proc lookupByAddressAsync*(self: Resolver; address: InetAddress; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_resolver_lookup_by_address_async(cast[ptr Resolver00](self.impl), cast[ptr InetAddress00](address.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_resolver_lookup_by_address_finish*(self: ptr Resolver00; resu: ptr AsyncResult00): cstring {. + importc: "g_resolver_lookup_by_address_finish", libprag.} + +proc lookupByAddressFinish*(self: Resolver; resu: AsyncResult): string = + let resul0 = g_resolver_lookup_by_address_finish(cast[ptr Resolver00](self.impl), cast[ptr AsyncResult00](resu.impl)) + result = $resul0 + cogfree(resul0) + +proc g_resolver_lookup_by_name*(self: ptr Resolver00; hostname: cstring; cancellable: ptr Cancellable00): ptr pointer {. + importc: "g_resolver_lookup_by_name", libprag.} + +proc lookupByName*(self: Resolver; hostname: string; cancellable: Cancellable): ptr pointer = + g_resolver_lookup_by_name(cast[ptr Resolver00](self.impl), cstring(hostname), cast[ptr Cancellable00](cancellable.impl)) + +proc g_resolver_lookup_by_name_async*(self: ptr Resolver00; hostname: cstring; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_resolver_lookup_by_name_async", libprag.} + +proc lookupByNameAsync*(self: Resolver; hostname: string; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_resolver_lookup_by_name_async(cast[ptr Resolver00](self.impl), cstring(hostname), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_resolver_lookup_by_name_finish*(self: ptr Resolver00; resu: ptr AsyncResult00): ptr pointer {. + importc: "g_resolver_lookup_by_name_finish", libprag.} + +proc lookupByNameFinish*(self: Resolver; resu: AsyncResult): ptr pointer = + g_resolver_lookup_by_name_finish(cast[ptr Resolver00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_resolver_lookup_records_finish*(self: ptr Resolver00; resu: ptr AsyncResult00): ptr pointer {. + importc: "g_resolver_lookup_records_finish", libprag.} + +proc lookupRecordsFinish*(self: Resolver; resu: AsyncResult): ptr pointer = + g_resolver_lookup_records_finish(cast[ptr Resolver00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_resolver_lookup_service*(self: ptr Resolver00; service: cstring; protocol: cstring; + domain: cstring; cancellable: ptr Cancellable00): ptr pointer {. + importc: "g_resolver_lookup_service", libprag.} + +proc lookupService*(self: Resolver; service: string; protocol: string; + domain: string; cancellable: Cancellable): ptr pointer = + g_resolver_lookup_service(cast[ptr Resolver00](self.impl), cstring(service), cstring(protocol), cstring(domain), cast[ptr Cancellable00](cancellable.impl)) + +proc g_resolver_lookup_service_async*(self: ptr Resolver00; service: cstring; protocol: cstring; + domain: cstring; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_resolver_lookup_service_async", libprag.} + +proc lookupServiceAsync*(self: Resolver; service: string; protocol: string; + domain: string; cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_resolver_lookup_service_async(cast[ptr Resolver00](self.impl), cstring(service), cstring(protocol), cstring(domain), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_resolver_lookup_service_finish*(self: ptr Resolver00; resu: ptr AsyncResult00): ptr pointer {. + importc: "g_resolver_lookup_service_finish", libprag.} + +proc lookupServiceFinish*(self: Resolver; resu: AsyncResult): ptr pointer = + g_resolver_lookup_service_finish(cast[ptr Resolver00](self.impl), cast[ptr AsyncResult00](resu.impl)) + +proc g_resolver_set_default*(self: ptr Resolver00) {. + importc: "g_resolver_set_default", libprag.} + +proc setDefault*(self: Resolver) = + g_resolver_set_default(cast[ptr Resolver00](self.impl)) + +proc `default=`*(self: Resolver) = + g_resolver_set_default(cast[ptr Resolver00](self.impl)) + +type + ResolverRecordType* {.size: sizeof(cint), pure.} = enum + srv = 1 + mx = 2 + txt = 3 + soa = 4 + ns = 5 + +proc g_resolver_lookup_records*(self: ptr Resolver00; rrname: cstring; recordType: ResolverRecordType; + cancellable: ptr Cancellable00): ptr pointer {. + importc: "g_resolver_lookup_records", libprag.} + +proc lookupRecords*(self: Resolver; rrname: string; recordType: ResolverRecordType; + cancellable: Cancellable): ptr pointer = + g_resolver_lookup_records(cast[ptr Resolver00](self.impl), cstring(rrname), recordType, cast[ptr Cancellable00](cancellable.impl)) + +proc g_resolver_lookup_records_async*(self: ptr Resolver00; rrname: cstring; recordType: ResolverRecordType; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_resolver_lookup_records_async", libprag.} + +proc lookupRecordsAsync*(self: Resolver; rrname: string; recordType: ResolverRecordType; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_resolver_lookup_records_async(cast[ptr Resolver00](self.impl), cstring(rrname), recordType, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +type + ResolverClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + reload*: proc(resolver: ptr Resolver00) {.cdecl.} + lookupByName*: proc(resolver: ptr Resolver00; hostname: cstring; cancellable: ptr Cancellable00): ptr pointer {.cdecl.} + lookupByNameAsync*: proc(resolver: ptr Resolver00; hostname: cstring; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + lookupByNameFinish*: proc(resolver: ptr Resolver00; resu: ptr AsyncResult00): ptr pointer {.cdecl.} + lookupByAddress*: proc(resolver: ptr Resolver00; address: ptr InetAddress00; + cancellable: ptr Cancellable00): cstring {.cdecl.} + lookupByAddressAsync*: proc(resolver: ptr Resolver00; address: ptr InetAddress00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + lookupByAddressFinish*: proc(resolver: ptr Resolver00; resu: ptr AsyncResult00): cstring {.cdecl.} + lookupService*: pointer + lookupServiceAsync*: proc(resolver: ptr Resolver00; rrname: cstring; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + lookupServiceFinish*: proc(resolver: ptr Resolver00; resu: ptr AsyncResult00): ptr pointer {.cdecl.} + lookupRecords*: proc(resolver: ptr Resolver00; rrname: cstring; recordType: ResolverRecordType; + cancellable: ptr Cancellable00): ptr pointer {.cdecl.} + lookupRecordsAsync*: proc(resolver: ptr Resolver00; rrname: cstring; recordType: ResolverRecordType; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + lookupRecordsFinish*: proc(resolver: ptr Resolver00; resu: ptr AsyncResult00): ptr pointer {.cdecl.} + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + ResolverClass* = ref object + impl*: ptr ResolverClass00 + +type + ResolverError* {.size: sizeof(cint), pure.} = enum + notFound = 0 + temporaryFailure = 1 + internal = 2 + +proc g_resolver_error_quark*(): uint32 {. + importc: "g_resolver_error_quark", libprag.} + +type + Resource00* {.pure.} = object + Resource* = ref object + impl*: ptr Resource00 + +proc g_resource_new_from_data*(data: ptr glib.Bytes00): ptr Resource00 {. + importc: "g_resource_new_from_data", libprag.} + +proc newResourceFromData*(data: glib.Bytes): Resource = + new(result) + result.impl = g_resource_new_from_data(cast[ptr glib.Bytes00](data.impl)) + +proc initResourceFromData*[T](result: var T; data: glib.Bytes) = + assert(result is Resource) + new(result) + result.impl = g_resource_new_from_data(cast[ptr glib.Bytes00](data.impl)) + +proc g_resources_register*(self: ptr Resource00) {. + importc: "g_resources_register", libprag.} + +proc register*(self: Resource) = + g_resources_register(cast[ptr Resource00](self.impl)) + +proc g_resources_unregister*(self: ptr Resource00) {. + importc: "g_resources_unregister", libprag.} + +proc unregister*(self: Resource) = + g_resources_unregister(cast[ptr Resource00](self.impl)) + +proc g_resource_ref*(self: ptr Resource00): ptr Resource00 {. + importc: "g_resource_ref", libprag.} + +proc `ref`*(self: Resource): Resource = + new(result) + result.impl = g_resource_ref(cast[ptr Resource00](self.impl)) + +proc g_resource_unref*(self: ptr Resource00) {. + importc: "g_resource_unref", libprag.} + +proc unref*(self: Resource) = + g_resource_unref(cast[ptr Resource00](self.impl)) + +proc g_resource_load*(filename: ucstring): ptr Resource00 {. + importc: "g_resource_load", libprag.} + +proc load*(filename: ucstring): Resource = + new(result) + result.impl = g_resource_load(filename) + +type + ResourceLookupFlags* {.size: sizeof(cint), pure.} = enum + none = 0 + +proc g_resource_enumerate_children*(self: ptr Resource00; path: cstring; lookupFlags: ResourceLookupFlags): cstringArray {. + importc: "g_resource_enumerate_children", libprag.} + +proc enumerateChildren*(self: Resource; path: string; lookupFlags: ResourceLookupFlags): cstringArray = + g_resource_enumerate_children(cast[ptr Resource00](self.impl), cstring(path), lookupFlags) + +proc g_resource_get_info*(self: ptr Resource00; path: cstring; lookupFlags: ResourceLookupFlags; + size: var uint64; flags: var uint32): gboolean {. + importc: "g_resource_get_info", libprag.} + +proc getInfo*(self: Resource; path: string; lookupFlags: ResourceLookupFlags; + size: var uint64; flags: var int): bool = + var flags_00 = uint32(flags) + result = toBool(g_resource_get_info(cast[ptr Resource00](self.impl), cstring(path), lookupFlags, size, flags_00)) + flags = int(flags_00) + +proc info*(self: Resource; path: string; lookupFlags: ResourceLookupFlags; + size: var uint64; flags: var int): bool = + var flags_00 = uint32(flags) + result = toBool(g_resource_get_info(cast[ptr Resource00](self.impl), cstring(path), lookupFlags, size, flags_00)) + flags = int(flags_00) + +proc g_resource_lookup_data*(self: ptr Resource00; path: cstring; lookupFlags: ResourceLookupFlags): ptr glib.Bytes00 {. + importc: "g_resource_lookup_data", libprag.} + +proc lookupData*(self: Resource; path: string; lookupFlags: ResourceLookupFlags): glib.Bytes = + new(result) + result.impl = g_resource_lookup_data(cast[ptr Resource00](self.impl), cstring(path), lookupFlags) + +proc g_resource_open_stream*(self: ptr Resource00; path: cstring; lookupFlags: ResourceLookupFlags): ptr InputStream00 {. + importc: "g_resource_open_stream", libprag.} + +proc openStream*(self: Resource; path: string; lookupFlags: ResourceLookupFlags): InputStream = + let gobj = g_resource_open_stream(cast[ptr Resource00](self.impl), cstring(path), lookupFlags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ResourceError* {.size: sizeof(cint), pure.} = enum + notFound = 0 + internal = 1 + +proc g_resource_error_quark*(): uint32 {. + importc: "g_resource_error_quark", libprag.} + +type + ResourceFlag* {.size: sizeof(cint), pure.} = enum + compressed = 1 + + ResourceFlags* {.size: sizeof(cint).} = set[ResourceFlag] + +type + Seekable00* {.pure.} = object + Seekable* = ref object + impl*: ptr Seekable00 + +proc g_seekable_can_seek*(self: ptr Seekable00): gboolean {. + importc: "g_seekable_can_seek", libprag.} + +proc canSeek*(self: Seekable): bool = + toBool(g_seekable_can_seek(cast[ptr Seekable00](self.impl))) + +proc g_seekable_can_truncate*(self: ptr Seekable00): gboolean {. + importc: "g_seekable_can_truncate", libprag.} + +proc canTruncate*(self: Seekable): bool = + toBool(g_seekable_can_truncate(cast[ptr Seekable00](self.impl))) + +proc g_seekable_seek*(self: ptr Seekable00; offset: int64; `type`: glib.SeekType; + cancellable: ptr Cancellable00): gboolean {. + importc: "g_seekable_seek", libprag.} + +proc seek*(self: Seekable; offset: int64; `type`: glib.SeekType; + cancellable: Cancellable): bool = + toBool(g_seekable_seek(cast[ptr Seekable00](self.impl), offset, `type`, cast[ptr Cancellable00](cancellable.impl))) + +proc g_seekable_tell*(self: ptr Seekable00): int64 {. + importc: "g_seekable_tell", libprag.} + +proc tell*(self: Seekable): int64 = + g_seekable_tell(cast[ptr Seekable00](self.impl)) + +proc g_seekable_truncate*(self: ptr Seekable00; offset: int64; cancellable: ptr Cancellable00): gboolean {. + importc: "g_seekable_truncate", libprag.} + +proc truncate*(self: Seekable; offset: int64; cancellable: Cancellable): bool = + toBool(g_seekable_truncate(cast[ptr Seekable00](self.impl), offset, cast[ptr Cancellable00](cancellable.impl))) + +type + SeekableIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + tell*: proc(seekable: ptr Seekable00): int64 {.cdecl.} + canSeek*: proc(seekable: ptr Seekable00): gboolean {.cdecl.} + seek*: proc(seekable: ptr Seekable00; offset: int64; `type`: glib.SeekType; + cancellable: ptr Cancellable00): gboolean {.cdecl.} + canTruncate*: proc(seekable: ptr Seekable00): gboolean {.cdecl.} + truncateFn*: proc(seekable: ptr Seekable00; offset: int64; cancellable: ptr Cancellable00): gboolean {.cdecl.} + SeekableIface* = ref object + impl*: ptr SeekableIface00 + +type + SettingsPrivate00* {.pure.} = object + SettingsPrivate* = ref object + impl*: ptr SettingsPrivate00 + +type + Settings* = ref object of gobject.Object + Settings00* = object of gobject.Object00 + priv1: ptr SettingsPrivate00 + +proc scChangeEvent*(self: Settings; p: proc (self: ptr gobject.Object00; keys: uint32Array; nKeys: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "change-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scChanged*(self: Settings; p: proc (self: ptr gobject.Object00; key: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scWritableChangeEvent*(self: Settings; p: proc (self: ptr gobject.Object00; key: uint32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "writable-change-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scWritableChanged*(self: Settings; p: proc (self: ptr gobject.Object00; key: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "writable-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_settings_new*(schemaId: cstring): ptr Settings00 {. + importc: "g_settings_new", libprag.} + +proc newSettings*(schemaId: string): Settings = + new(result, finalizeGObject) + result.impl = g_settings_new(cstring(schemaId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSettings*[T](result: var T; schemaId: string) = + assert(result is Settings) + new(result, finalizeGObject) + result.impl = g_settings_new(cstring(schemaId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_settings_new_with_path*(schemaId: cstring; path: cstring): ptr Settings00 {. + importc: "g_settings_new_with_path", libprag.} + +proc newSettingsWithPath*(schemaId: string; path: string): Settings = + new(result, finalizeGObject) + result.impl = g_settings_new_with_path(cstring(schemaId), cstring(path)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSettingsWithPath*[T](result: var T; schemaId: string; path: string) = + assert(result is Settings) + new(result, finalizeGObject) + result.impl = g_settings_new_with_path(cstring(schemaId), cstring(path)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_settings_list_relocatable_schemas*(): cstringArray {. + importc: "g_settings_list_relocatable_schemas", libprag.} + +proc listRelocatableSchemas*(): cstringArray {. + importc: "g_settings_list_relocatable_schemas", libprag.} + +proc g_settings_list_schemas*(): cstringArray {. + importc: "g_settings_list_schemas", libprag.} + +proc listSchemas*(): cstringArray {. + importc: "g_settings_list_schemas", libprag.} + +proc g_settings_sync*() {. + importc: "g_settings_sync", libprag.} + +proc sync*() {. + importc: "g_settings_sync", libprag.} + +proc g_settings_unbind*(`object`: ptr gobject.Object00; property: cstring) {. + importc: "g_settings_unbind", libprag.} + +proc unbind*(`object`: gobject.Object; property: string) = + g_settings_unbind(cast[ptr gobject.Object00](`object`.impl), cstring(property)) + +proc g_settings_apply*(self: ptr Settings00) {. + importc: "g_settings_apply", libprag.} + +proc apply*(self: Settings) = + g_settings_apply(cast[ptr Settings00](self.impl)) + +proc g_settings_bind_writable*(self: ptr Settings00; key: cstring; `object`: ptr gobject.Object00; + property: cstring; inverted: gboolean) {. + importc: "g_settings_bind_writable", libprag.} + +proc bindWritable*(self: Settings; key: string; `object`: gobject.Object; + property: string; inverted: bool) = + g_settings_bind_writable(cast[ptr Settings00](self.impl), cstring(key), cast[ptr gobject.Object00](`object`.impl), cstring(property), gboolean(inverted)) + +proc g_settings_create_action*(self: ptr Settings00; key: cstring): ptr Action00 {. + importc: "g_settings_create_action", libprag.} + +proc createAction*(self: Settings; key: string): Action = + new(result) + result.impl = g_settings_create_action(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_delay*(self: ptr Settings00) {. + importc: "g_settings_delay", libprag.} + +proc delay*(self: Settings) = + g_settings_delay(cast[ptr Settings00](self.impl)) + +proc g_settings_get_boolean*(self: ptr Settings00; key: cstring): gboolean {. + importc: "g_settings_get_boolean", libprag.} + +proc getBoolean*(self: Settings; key: string): bool = + toBool(g_settings_get_boolean(cast[ptr Settings00](self.impl), cstring(key))) + +proc boolean*(self: Settings; key: string): bool = + toBool(g_settings_get_boolean(cast[ptr Settings00](self.impl), cstring(key))) + +proc g_settings_get_child*(self: ptr Settings00; name: cstring): ptr Settings00 {. + importc: "g_settings_get_child", libprag.} + +proc getChild*(self: Settings; name: string): Settings = + let gobj = g_settings_get_child(cast[ptr Settings00](self.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Settings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc child*(self: Settings; name: string): Settings = + let gobj = g_settings_get_child(cast[ptr Settings00](self.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Settings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_settings_get_default_value*(self: ptr Settings00; key: cstring): ptr glib.Variant00 {. + importc: "g_settings_get_default_value", libprag.} + +proc getDefaultValue*(self: Settings; key: string): glib.Variant = + new(result) + result.impl = g_settings_get_default_value(cast[ptr Settings00](self.impl), cstring(key)) + +proc defaultValue*(self: Settings; key: string): glib.Variant = + new(result) + result.impl = g_settings_get_default_value(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_get_double*(self: ptr Settings00; key: cstring): cdouble {. + importc: "g_settings_get_double", libprag.} + +proc getDouble*(self: Settings; key: string): cdouble = + g_settings_get_double(cast[ptr Settings00](self.impl), cstring(key)) + +proc double*(self: Settings; key: string): cdouble = + g_settings_get_double(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_get_enum*(self: ptr Settings00; key: cstring): int32 {. + importc: "g_settings_get_enum", libprag.} + +proc getEnum*(self: Settings; key: string): int = + int(g_settings_get_enum(cast[ptr Settings00](self.impl), cstring(key))) + +proc g_settings_get_flags*(self: ptr Settings00; key: cstring): uint32 {. + importc: "g_settings_get_flags", libprag.} + +proc getFlags*(self: Settings; key: string): int = + int(g_settings_get_flags(cast[ptr Settings00](self.impl), cstring(key))) + +proc flags*(self: Settings; key: string): int = + int(g_settings_get_flags(cast[ptr Settings00](self.impl), cstring(key))) + +proc g_settings_get_has_unapplied*(self: ptr Settings00): gboolean {. + importc: "g_settings_get_has_unapplied", libprag.} + +proc getHasUnapplied*(self: Settings): bool = + toBool(g_settings_get_has_unapplied(cast[ptr Settings00](self.impl))) + +proc hasUnapplied*(self: Settings): bool = + toBool(g_settings_get_has_unapplied(cast[ptr Settings00](self.impl))) + +proc g_settings_get_int*(self: ptr Settings00; key: cstring): int32 {. + importc: "g_settings_get_int", libprag.} + +proc getInt*(self: Settings; key: string): int = + int(g_settings_get_int(cast[ptr Settings00](self.impl), cstring(key))) + +proc g_settings_get_int64*(self: ptr Settings00; key: cstring): int64 {. + importc: "g_settings_get_int64", libprag.} + +proc getInt64*(self: Settings; key: string): int64 = + g_settings_get_int64(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_get_range*(self: ptr Settings00; key: cstring): ptr glib.Variant00 {. + importc: "g_settings_get_range", libprag.} + +proc getRange*(self: Settings; key: string): glib.Variant = + new(result) + result.impl = g_settings_get_range(cast[ptr Settings00](self.impl), cstring(key)) + +proc range*(self: Settings; key: string): glib.Variant = + new(result) + result.impl = g_settings_get_range(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_get_string*(self: ptr Settings00; key: cstring): cstring {. + importc: "g_settings_get_string", libprag.} + +proc getString*(self: Settings; key: string): string = + let resul0 = g_settings_get_string(cast[ptr Settings00](self.impl), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc string*(self: Settings; key: string): string = + let resul0 = g_settings_get_string(cast[ptr Settings00](self.impl), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc g_settings_get_strv*(self: ptr Settings00; key: cstring): cstringArray {. + importc: "g_settings_get_strv", libprag.} + +proc getStrv*(self: Settings; key: string): cstringArray = + g_settings_get_strv(cast[ptr Settings00](self.impl), cstring(key)) + +proc strv*(self: Settings; key: string): cstringArray = + g_settings_get_strv(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_get_uint*(self: ptr Settings00; key: cstring): uint32 {. + importc: "g_settings_get_uint", libprag.} + +proc getUint*(self: Settings; key: string): int = + int(g_settings_get_uint(cast[ptr Settings00](self.impl), cstring(key))) + +proc g_settings_get_uint64*(self: ptr Settings00; key: cstring): uint64 {. + importc: "g_settings_get_uint64", libprag.} + +proc getUint64*(self: Settings; key: string): uint64 = + g_settings_get_uint64(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_get_user_value*(self: ptr Settings00; key: cstring): ptr glib.Variant00 {. + importc: "g_settings_get_user_value", libprag.} + +proc getUserValue*(self: Settings; key: string): glib.Variant = + new(result) + result.impl = g_settings_get_user_value(cast[ptr Settings00](self.impl), cstring(key)) + +proc userValue*(self: Settings; key: string): glib.Variant = + new(result) + result.impl = g_settings_get_user_value(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_get_value*(self: ptr Settings00; key: cstring): ptr glib.Variant00 {. + importc: "g_settings_get_value", libprag.} + +proc getValue*(self: Settings; key: string): glib.Variant = + new(result) + result.impl = g_settings_get_value(cast[ptr Settings00](self.impl), cstring(key)) + +proc value*(self: Settings; key: string): glib.Variant = + new(result) + result.impl = g_settings_get_value(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_is_writable*(self: ptr Settings00; name: cstring): gboolean {. + importc: "g_settings_is_writable", libprag.} + +proc isWritable*(self: Settings; name: string): bool = + toBool(g_settings_is_writable(cast[ptr Settings00](self.impl), cstring(name))) + +proc g_settings_list_children*(self: ptr Settings00): cstringArray {. + importc: "g_settings_list_children", libprag.} + +proc listChildren*(self: Settings): cstringArray = + g_settings_list_children(cast[ptr Settings00](self.impl)) + +proc g_settings_list_keys*(self: ptr Settings00): cstringArray {. + importc: "g_settings_list_keys", libprag.} + +proc listKeys*(self: Settings): cstringArray = + g_settings_list_keys(cast[ptr Settings00](self.impl)) + +proc g_settings_range_check*(self: ptr Settings00; key: cstring; value: ptr glib.Variant00): gboolean {. + importc: "g_settings_range_check", libprag.} + +proc rangeCheck*(self: Settings; key: string; value: glib.Variant): bool = + toBool(g_settings_range_check(cast[ptr Settings00](self.impl), cstring(key), cast[ptr glib.Variant00](value.impl))) + +proc g_settings_reset*(self: ptr Settings00; key: cstring) {. + importc: "g_settings_reset", libprag.} + +proc reset*(self: Settings; key: string) = + g_settings_reset(cast[ptr Settings00](self.impl), cstring(key)) + +proc g_settings_revert*(self: ptr Settings00) {. + importc: "g_settings_revert", libprag.} + +proc revert*(self: Settings) = + g_settings_revert(cast[ptr Settings00](self.impl)) + +proc g_settings_set_boolean*(self: ptr Settings00; key: cstring; value: gboolean): gboolean {. + importc: "g_settings_set_boolean", libprag.} + +proc setBoolean*(self: Settings; key: string; value: bool): bool = + toBool(g_settings_set_boolean(cast[ptr Settings00](self.impl), cstring(key), gboolean(value))) + +proc g_settings_set_double*(self: ptr Settings00; key: cstring; value: cdouble): gboolean {. + importc: "g_settings_set_double", libprag.} + +proc setDouble*(self: Settings; key: string; value: cdouble): bool = + toBool(g_settings_set_double(cast[ptr Settings00](self.impl), cstring(key), value)) + +proc g_settings_set_enum*(self: ptr Settings00; key: cstring; value: int32): gboolean {. + importc: "g_settings_set_enum", libprag.} + +proc setEnum*(self: Settings; key: string; value: int): bool = + toBool(g_settings_set_enum(cast[ptr Settings00](self.impl), cstring(key), int32(value))) + +proc g_settings_set_flags*(self: ptr Settings00; key: cstring; value: uint32): gboolean {. + importc: "g_settings_set_flags", libprag.} + +proc setFlags*(self: Settings; key: string; value: int): bool = + toBool(g_settings_set_flags(cast[ptr Settings00](self.impl), cstring(key), uint32(value))) + +proc g_settings_set_int*(self: ptr Settings00; key: cstring; value: int32): gboolean {. + importc: "g_settings_set_int", libprag.} + +proc setInt*(self: Settings; key: string; value: int): bool = + toBool(g_settings_set_int(cast[ptr Settings00](self.impl), cstring(key), int32(value))) + +proc g_settings_set_int64*(self: ptr Settings00; key: cstring; value: int64): gboolean {. + importc: "g_settings_set_int64", libprag.} + +proc setInt64*(self: Settings; key: string; value: int64): bool = + toBool(g_settings_set_int64(cast[ptr Settings00](self.impl), cstring(key), value)) + +proc g_settings_set_string*(self: ptr Settings00; key: cstring; value: cstring): gboolean {. + importc: "g_settings_set_string", libprag.} + +proc setString*(self: Settings; key: string; value: string): bool = + toBool(g_settings_set_string(cast[ptr Settings00](self.impl), cstring(key), cstring(value))) + +proc g_settings_set_strv*(self: ptr Settings00; key: cstring; value: cstringArray): gboolean {. + importc: "g_settings_set_strv", libprag.} + +proc setStrv*(self: Settings; key: string; value: cstringArray): bool = + toBool(g_settings_set_strv(cast[ptr Settings00](self.impl), cstring(key), value)) + +proc g_settings_set_uint*(self: ptr Settings00; key: cstring; value: uint32): gboolean {. + importc: "g_settings_set_uint", libprag.} + +proc setUint*(self: Settings; key: string; value: int): bool = + toBool(g_settings_set_uint(cast[ptr Settings00](self.impl), cstring(key), uint32(value))) + +proc g_settings_set_uint64*(self: ptr Settings00; key: cstring; value: uint64): gboolean {. + importc: "g_settings_set_uint64", libprag.} + +proc setUint64*(self: Settings; key: string; value: uint64): bool = + toBool(g_settings_set_uint64(cast[ptr Settings00](self.impl), cstring(key), value)) + +proc g_settings_set_value*(self: ptr Settings00; key: cstring; value: ptr glib.Variant00): gboolean {. + importc: "g_settings_set_value", libprag.} + +proc setValue*(self: Settings; key: string; value: glib.Variant): bool = + toBool(g_settings_set_value(cast[ptr Settings00](self.impl), cstring(key), cast[ptr glib.Variant00](value.impl))) + +type + SettingsSchema00* {.pure.} = object + SettingsSchema* = ref object + impl*: ptr SettingsSchema00 + +proc g_settings_schema_get_id*(self: ptr SettingsSchema00): cstring {. + importc: "g_settings_schema_get_id", libprag.} + +proc getId*(self: SettingsSchema): string = + let resul0 = g_settings_schema_get_id(cast[ptr SettingsSchema00](self.impl)) + result = $resul0 + +proc id*(self: SettingsSchema): string = + let resul0 = g_settings_schema_get_id(cast[ptr SettingsSchema00](self.impl)) + result = $resul0 + +proc g_settings_schema_get_path*(self: ptr SettingsSchema00): cstring {. + importc: "g_settings_schema_get_path", libprag.} + +proc getPath*(self: SettingsSchema): string = + let resul0 = g_settings_schema_get_path(cast[ptr SettingsSchema00](self.impl)) + result = $resul0 + +proc path*(self: SettingsSchema): string = + let resul0 = g_settings_schema_get_path(cast[ptr SettingsSchema00](self.impl)) + result = $resul0 + +proc g_settings_schema_has_key*(self: ptr SettingsSchema00; name: cstring): gboolean {. + importc: "g_settings_schema_has_key", libprag.} + +proc hasKey*(self: SettingsSchema; name: string): bool = + toBool(g_settings_schema_has_key(cast[ptr SettingsSchema00](self.impl), cstring(name))) + +proc g_settings_schema_list_children*(self: ptr SettingsSchema00): cstringArray {. + importc: "g_settings_schema_list_children", libprag.} + +proc listChildren*(self: SettingsSchema): cstringArray = + g_settings_schema_list_children(cast[ptr SettingsSchema00](self.impl)) + +proc g_settings_schema_list_keys*(self: ptr SettingsSchema00): cstringArray {. + importc: "g_settings_schema_list_keys", libprag.} + +proc listKeys*(self: SettingsSchema): cstringArray = + g_settings_schema_list_keys(cast[ptr SettingsSchema00](self.impl)) + +proc g_settings_schema_ref*(self: ptr SettingsSchema00): ptr SettingsSchema00 {. + importc: "g_settings_schema_ref", libprag.} + +proc `ref`*(self: SettingsSchema): SettingsSchema = + new(result) + result.impl = g_settings_schema_ref(cast[ptr SettingsSchema00](self.impl)) + +proc g_settings_schema_unref*(self: ptr SettingsSchema00) {. + importc: "g_settings_schema_unref", libprag.} + +proc unref*(self: SettingsSchema) = + g_settings_schema_unref(cast[ptr SettingsSchema00](self.impl)) + +type + SettingsSchemaKey00* {.pure.} = object + SettingsSchemaKey* = ref object + impl*: ptr SettingsSchemaKey00 + +proc g_settings_schema_key_get_default_value*(self: ptr SettingsSchemaKey00): ptr glib.Variant00 {. + importc: "g_settings_schema_key_get_default_value", libprag.} + +proc getDefaultValue*(self: SettingsSchemaKey): glib.Variant = + new(result) + result.impl = g_settings_schema_key_get_default_value(cast[ptr SettingsSchemaKey00](self.impl)) + +proc defaultValue*(self: SettingsSchemaKey): glib.Variant = + new(result) + result.impl = g_settings_schema_key_get_default_value(cast[ptr SettingsSchemaKey00](self.impl)) + +proc g_settings_schema_key_get_description*(self: ptr SettingsSchemaKey00): cstring {. + importc: "g_settings_schema_key_get_description", libprag.} + +proc getDescription*(self: SettingsSchemaKey): string = + let resul0 = g_settings_schema_key_get_description(cast[ptr SettingsSchemaKey00](self.impl)) + result = $resul0 + +proc description*(self: SettingsSchemaKey): string = + let resul0 = g_settings_schema_key_get_description(cast[ptr SettingsSchemaKey00](self.impl)) + result = $resul0 + +proc g_settings_schema_key_get_name*(self: ptr SettingsSchemaKey00): cstring {. + importc: "g_settings_schema_key_get_name", libprag.} + +proc getName*(self: SettingsSchemaKey): string = + let resul0 = g_settings_schema_key_get_name(cast[ptr SettingsSchemaKey00](self.impl)) + result = $resul0 + +proc name*(self: SettingsSchemaKey): string = + let resul0 = g_settings_schema_key_get_name(cast[ptr SettingsSchemaKey00](self.impl)) + result = $resul0 + +proc g_settings_schema_key_get_range*(self: ptr SettingsSchemaKey00): ptr glib.Variant00 {. + importc: "g_settings_schema_key_get_range", libprag.} + +proc getRange*(self: SettingsSchemaKey): glib.Variant = + new(result) + result.impl = g_settings_schema_key_get_range(cast[ptr SettingsSchemaKey00](self.impl)) + +proc range*(self: SettingsSchemaKey): glib.Variant = + new(result) + result.impl = g_settings_schema_key_get_range(cast[ptr SettingsSchemaKey00](self.impl)) + +proc g_settings_schema_key_get_summary*(self: ptr SettingsSchemaKey00): cstring {. + importc: "g_settings_schema_key_get_summary", libprag.} + +proc getSummary*(self: SettingsSchemaKey): string = + let resul0 = g_settings_schema_key_get_summary(cast[ptr SettingsSchemaKey00](self.impl)) + result = $resul0 + +proc summary*(self: SettingsSchemaKey): string = + let resul0 = g_settings_schema_key_get_summary(cast[ptr SettingsSchemaKey00](self.impl)) + result = $resul0 + +proc g_settings_schema_key_get_value_type*(self: ptr SettingsSchemaKey00): ptr glib.VariantType00 {. + importc: "g_settings_schema_key_get_value_type", libprag.} + +proc getValueType*(self: SettingsSchemaKey): glib.VariantType = + new(result) + result.impl = g_settings_schema_key_get_value_type(cast[ptr SettingsSchemaKey00](self.impl)) + +proc valueType*(self: SettingsSchemaKey): glib.VariantType = + new(result) + result.impl = g_settings_schema_key_get_value_type(cast[ptr SettingsSchemaKey00](self.impl)) + +proc g_settings_schema_key_range_check*(self: ptr SettingsSchemaKey00; value: ptr glib.Variant00): gboolean {. + importc: "g_settings_schema_key_range_check", libprag.} + +proc rangeCheck*(self: SettingsSchemaKey; value: glib.Variant): bool = + toBool(g_settings_schema_key_range_check(cast[ptr SettingsSchemaKey00](self.impl), cast[ptr glib.Variant00](value.impl))) + +proc g_settings_schema_key_ref*(self: ptr SettingsSchemaKey00): ptr SettingsSchemaKey00 {. + importc: "g_settings_schema_key_ref", libprag.} + +proc `ref`*(self: SettingsSchemaKey): SettingsSchemaKey = + new(result) + result.impl = g_settings_schema_key_ref(cast[ptr SettingsSchemaKey00](self.impl)) + +proc g_settings_schema_key_unref*(self: ptr SettingsSchemaKey00) {. + importc: "g_settings_schema_key_unref", libprag.} + +proc unref*(self: SettingsSchemaKey) = + g_settings_schema_key_unref(cast[ptr SettingsSchemaKey00](self.impl)) + +proc g_settings_schema_get_key*(self: ptr SettingsSchema00; name: cstring): ptr SettingsSchemaKey00 {. + importc: "g_settings_schema_get_key", libprag.} + +proc getKey*(self: SettingsSchema; name: string): SettingsSchemaKey = + new(result) + result.impl = g_settings_schema_get_key(cast[ptr SettingsSchema00](self.impl), cstring(name)) + +proc key*(self: SettingsSchema; name: string): SettingsSchemaKey = + new(result) + result.impl = g_settings_schema_get_key(cast[ptr SettingsSchema00](self.impl), cstring(name)) + +type + SettingsBackend00* {.pure.} = object + SettingsBackend* = ref object + impl*: ptr SettingsBackend00 + +proc g_settings_new_full*(schema: ptr SettingsSchema00; backend: ptr SettingsBackend00; + path: cstring): ptr Settings00 {. + importc: "g_settings_new_full", libprag.} + +proc newSettingsFull*(schema: SettingsSchema; backend: SettingsBackend; + path: string): Settings = + new(result, finalizeGObject) + result.impl = g_settings_new_full(cast[ptr SettingsSchema00](schema.impl), cast[ptr SettingsBackend00](backend.impl), cstring(path)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSettingsFull*[T](result: var T; schema: SettingsSchema; backend: SettingsBackend; + path: string) = + assert(result is Settings) + new(result, finalizeGObject) + result.impl = g_settings_new_full(cast[ptr SettingsSchema00](schema.impl), cast[ptr SettingsBackend00](backend.impl), cstring(path)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_settings_new_with_backend*(schemaId: cstring; backend: ptr SettingsBackend00): ptr Settings00 {. + importc: "g_settings_new_with_backend", libprag.} + +proc newSettingsWithBackend*(schemaId: string; backend: SettingsBackend): Settings = + new(result, finalizeGObject) + result.impl = g_settings_new_with_backend(cstring(schemaId), cast[ptr SettingsBackend00](backend.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSettingsWithBackend*[T](result: var T; schemaId: string; backend: SettingsBackend) = + assert(result is Settings) + new(result, finalizeGObject) + result.impl = g_settings_new_with_backend(cstring(schemaId), cast[ptr SettingsBackend00](backend.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_settings_new_with_backend_and_path*(schemaId: cstring; backend: ptr SettingsBackend00; + path: cstring): ptr Settings00 {. + importc: "g_settings_new_with_backend_and_path", libprag.} + +proc newSettingsWithBackendAndPath*(schemaId: string; backend: SettingsBackend; path: string): Settings = + new(result, finalizeGObject) + result.impl = g_settings_new_with_backend_and_path(cstring(schemaId), cast[ptr SettingsBackend00](backend.impl), cstring(path)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSettingsWithBackendAndPath*[T](result: var T; schemaId: string; backend: SettingsBackend; path: string) = + assert(result is Settings) + new(result, finalizeGObject) + result.impl = g_settings_new_with_backend_and_path(cstring(schemaId), cast[ptr SettingsBackend00](backend.impl), cstring(path)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SettingsBindFlag* {.size: sizeof(cint), pure.} = enum + get = 1 + set = 2 + noSensitivity = 3 + getNoChanges = 4 + invertBoolean = 5 + + SettingsBindFlags* {.size: sizeof(cint).} = set[SettingsBindFlag] + +proc g_settings_bind*(self: ptr Settings00; key: cstring; `object`: ptr gobject.Object00; + property: cstring; flags: SettingsBindFlags) {. + importc: "g_settings_bind", libprag.} + +proc `bind`*(self: Settings; key: string; `object`: gobject.Object; + property: string; flags: SettingsBindFlags) = + g_settings_bind(cast[ptr Settings00](self.impl), cstring(key), cast[ptr gobject.Object00](`object`.impl), cstring(property), flags) + +type + SettingsBindGetMapping* = proc (value: ptr gobject.Value00; variant: ptr glib.Variant00; + userData: pointer): gboolean {.cdecl.} + +type + SettingsBindSetMapping* = proc (value: ptr gobject.Value00; expectedType: ptr glib.VariantType00; + userData: pointer): ptr glib.Variant00 {.cdecl.} + +type + SettingsClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + writableChanged*: proc(settings: ptr Settings00; key: cstring) {.cdecl.} + changed*: proc(settings: ptr Settings00; key: cstring) {.cdecl.} + writableChangeEvent*: proc(settings: ptr Settings00; key: uint32): gboolean {.cdecl.} + changeEvent*: proc(settings: ptr Settings00; keys: ptr uint32; nKeys: int32): gboolean {.cdecl.} + padding*: array[20, pointer] + SettingsClass* = ref object + impl*: ptr SettingsClass00 + +type + SettingsGetMapping* = proc (value: ptr glib.Variant00; resu: var pointer; userData: pointer): gboolean {.cdecl.} + +proc g_settings_get_mapped*(self: ptr Settings00; key: cstring; mapping: SettingsGetMapping; + userData: pointer): pointer {. + importc: "g_settings_get_mapped", libprag.} + +proc getMapped*(self: Settings; key: string; mapping: SettingsGetMapping; + userData: pointer): pointer = + g_settings_get_mapped(cast[ptr Settings00](self.impl), cstring(key), mapping, userData) + +proc mapped*(self: Settings; key: string; mapping: SettingsGetMapping; + userData: pointer): pointer = + g_settings_get_mapped(cast[ptr Settings00](self.impl), cstring(key), mapping, userData) + +type + SettingsSchemaSource00* {.pure.} = object + SettingsSchemaSource* = ref object + impl*: ptr SettingsSchemaSource00 + +proc g_settings_schema_source_new_from_directory*(directory: ucstring; parent: ptr SettingsSchemaSource00; + trusted: gboolean): ptr SettingsSchemaSource00 {. + importc: "g_settings_schema_source_new_from_directory", libprag.} + +proc newSettingsSchemaSourceFromDirectory*(directory: ucstring; parent: SettingsSchemaSource; + trusted: bool): SettingsSchemaSource = + new(result) + result.impl = g_settings_schema_source_new_from_directory(directory, cast[ptr SettingsSchemaSource00](parent.impl), gboolean(trusted)) + +proc initSettingsSchemaSourceFromDirectory*[T](result: var T; directory: ucstring; parent: SettingsSchemaSource; + trusted: bool) = + assert(result is SettingsSchemaSource) + new(result) + result.impl = g_settings_schema_source_new_from_directory(directory, cast[ptr SettingsSchemaSource00](parent.impl), gboolean(trusted)) + +proc g_settings_schema_source_list_schemas*(self: ptr SettingsSchemaSource00; recursive: gboolean; + nonRelocatable: var cstringArray; relocatable: var cstringArray) {. + importc: "g_settings_schema_source_list_schemas", libprag.} + +proc listSchemas*(self: SettingsSchemaSource; recursive: bool; nonRelocatable: var cstringArray; + relocatable: var cstringArray) = + g_settings_schema_source_list_schemas(cast[ptr SettingsSchemaSource00](self.impl), gboolean(recursive), nonRelocatable, relocatable) + +proc g_settings_schema_source_lookup*(self: ptr SettingsSchemaSource00; schemaId: cstring; + recursive: gboolean): ptr SettingsSchema00 {. + importc: "g_settings_schema_source_lookup", libprag.} + +proc lookup*(self: SettingsSchemaSource; schemaId: string; recursive: bool): SettingsSchema = + new(result) + result.impl = g_settings_schema_source_lookup(cast[ptr SettingsSchemaSource00](self.impl), cstring(schemaId), gboolean(recursive)) + +proc g_settings_schema_source_ref*(self: ptr SettingsSchemaSource00): ptr SettingsSchemaSource00 {. + importc: "g_settings_schema_source_ref", libprag.} + +proc `ref`*(self: SettingsSchemaSource): SettingsSchemaSource = + new(result) + result.impl = g_settings_schema_source_ref(cast[ptr SettingsSchemaSource00](self.impl)) + +proc g_settings_schema_source_unref*(self: ptr SettingsSchemaSource00) {. + importc: "g_settings_schema_source_unref", libprag.} + +proc unref*(self: SettingsSchemaSource) = + g_settings_schema_source_unref(cast[ptr SettingsSchemaSource00](self.impl)) + +proc g_settings_schema_source_get_default*(): ptr SettingsSchemaSource00 {. + importc: "g_settings_schema_source_get_default", libprag.} + +proc getDefault*(): SettingsSchemaSource = + new(result) + result.impl = g_settings_schema_source_get_default() + +proc default*(): SettingsSchemaSource = + new(result) + result.impl = g_settings_schema_source_get_default() + +type + SimpleActionGroupPrivate00* {.pure.} = object + SimpleActionGroupPrivate* = ref object + impl*: ptr SimpleActionGroupPrivate00 + +type + SimpleActionGroup* = ref object of gobject.Object + SimpleActionGroup00* = object of gobject.Object00 + priv1: ptr SimpleActionGroupPrivate00 + +proc g_simple_action_group_new*(): ptr SimpleActionGroup00 {. + importc: "g_simple_action_group_new", libprag.} + +proc newSimpleActionGroup*(): SimpleActionGroup = + new(result, finalizeGObject) + result.impl = g_simple_action_group_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSimpleActionGroup*[T](result: var T) = + assert(result is SimpleActionGroup) + new(result, finalizeGObject) + result.impl = g_simple_action_group_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_simple_action_group_add_entries*(self: ptr SimpleActionGroup00; entries: ActionEntry00Array; + nEntries: int32; userData: pointer) {. + importc: "g_simple_action_group_add_entries", libprag.} + +proc addEntries*(self: SimpleActionGroup; entries: ActionEntry00Array; + nEntries: int; userData: pointer) = + g_simple_action_group_add_entries(cast[ptr SimpleActionGroup00](self.impl), entries, int32(nEntries), userData) + +proc g_simple_action_group_insert*(self: ptr SimpleActionGroup00; action: ptr Action00) {. + importc: "g_simple_action_group_insert", libprag.} + +proc insert*(self: SimpleActionGroup; action: Action) = + g_simple_action_group_insert(cast[ptr SimpleActionGroup00](self.impl), cast[ptr Action00](action.impl)) + +proc g_simple_action_group_lookup*(self: ptr SimpleActionGroup00; actionName: cstring): ptr Action00 {. + importc: "g_simple_action_group_lookup", libprag.} + +proc lookup*(self: SimpleActionGroup; actionName: string): Action = + new(result) + result.impl = g_simple_action_group_lookup(cast[ptr SimpleActionGroup00](self.impl), cstring(actionName)) + +proc g_simple_action_group_remove*(self: ptr SimpleActionGroup00; actionName: cstring) {. + importc: "g_simple_action_group_remove", libprag.} + +proc remove*(self: SimpleActionGroup; actionName: string) = + g_simple_action_group_remove(cast[ptr SimpleActionGroup00](self.impl), cstring(actionName)) + +type + SimpleActionGroupClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + padding*: array[12, pointer] + SimpleActionGroupClass* = ref object + impl*: ptr SimpleActionGroupClass00 + +type + SimpleAsyncResult* = ref object of gobject.Object + SimpleAsyncResult00* = object of gobject.Object00 + +proc g_simple_async_result_new*(sourceObject: ptr gobject.Object00; callback: AsyncReadyCallback; + userData: pointer; sourceTag: pointer): ptr SimpleAsyncResult00 {. + importc: "g_simple_async_result_new", libprag.} + +proc newSimpleAsyncResult*(sourceObject: gobject.Object; callback: AsyncReadyCallback; + userData: pointer; sourceTag: pointer): SimpleAsyncResult = + new(result, finalizeGObject) + result.impl = g_simple_async_result_new(cast[ptr gobject.Object00](sourceObject.impl), callback, userData, sourceTag) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSimpleAsyncResult*[T](result: var T; sourceObject: gobject.Object; callback: AsyncReadyCallback; + userData: pointer; sourceTag: pointer) = + assert(result is SimpleAsyncResult) + new(result, finalizeGObject) + result.impl = g_simple_async_result_new(cast[ptr gobject.Object00](sourceObject.impl), callback, userData, sourceTag) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_simple_async_result_new_from_error*(sourceObject: ptr gobject.Object00; callback: AsyncReadyCallback; + userData: pointer; error: ptr Error00): ptr SimpleAsyncResult00 {. + importc: "g_simple_async_result_new_from_error", libprag.} + +proc newSimpleAsyncResultFromError*(sourceObject: gobject.Object; callback: AsyncReadyCallback; + userData: pointer; error: ptr Error00): SimpleAsyncResult = + new(result, finalizeGObject) + result.impl = g_simple_async_result_new_from_error(cast[ptr gobject.Object00](sourceObject.impl), callback, userData, error) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSimpleAsyncResultFromError*[T](result: var T; sourceObject: gobject.Object; callback: AsyncReadyCallback; + userData: pointer; error: ptr Error00) = + assert(result is SimpleAsyncResult) + new(result, finalizeGObject) + result.impl = g_simple_async_result_new_from_error(cast[ptr gobject.Object00](sourceObject.impl), callback, userData, error) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_simple_async_result_is_valid*(resu: ptr AsyncResult00; source: ptr gobject.Object00; + sourceTag: pointer): gboolean {. + importc: "g_simple_async_result_is_valid", libprag.} + +proc isValid*(resu: AsyncResult; source: gobject.Object; sourceTag: pointer): bool = + toBool(g_simple_async_result_is_valid(cast[ptr AsyncResult00](resu.impl), cast[ptr gobject.Object00](source.impl), sourceTag)) + +proc g_simple_async_result_complete*(self: ptr SimpleAsyncResult00) {. + importc: "g_simple_async_result_complete", libprag.} + +proc complete*(self: SimpleAsyncResult) = + g_simple_async_result_complete(cast[ptr SimpleAsyncResult00](self.impl)) + +proc g_simple_async_result_complete_in_idle*(self: ptr SimpleAsyncResult00) {. + importc: "g_simple_async_result_complete_in_idle", libprag.} + +proc completeInIdle*(self: SimpleAsyncResult) = + g_simple_async_result_complete_in_idle(cast[ptr SimpleAsyncResult00](self.impl)) + +proc g_simple_async_result_get_op_res_gboolean*(self: ptr SimpleAsyncResult00): gboolean {. + importc: "g_simple_async_result_get_op_res_gboolean", libprag.} + +proc getOpResGboolean*(self: SimpleAsyncResult): bool = + toBool(g_simple_async_result_get_op_res_gboolean(cast[ptr SimpleAsyncResult00](self.impl))) + +proc opResGboolean*(self: SimpleAsyncResult): bool = + toBool(g_simple_async_result_get_op_res_gboolean(cast[ptr SimpleAsyncResult00](self.impl))) + +proc g_simple_async_result_get_op_res_gssize*(self: ptr SimpleAsyncResult00): int64 {. + importc: "g_simple_async_result_get_op_res_gssize", libprag.} + +proc getOpResGssize*(self: SimpleAsyncResult): int64 = + g_simple_async_result_get_op_res_gssize(cast[ptr SimpleAsyncResult00](self.impl)) + +proc opResGssize*(self: SimpleAsyncResult): int64 = + g_simple_async_result_get_op_res_gssize(cast[ptr SimpleAsyncResult00](self.impl)) + +proc g_simple_async_result_propagate_error*(self: ptr SimpleAsyncResult00): gboolean {. + importc: "g_simple_async_result_propagate_error", libprag.} + +proc propagateError*(self: SimpleAsyncResult): bool = + toBool(g_simple_async_result_propagate_error(cast[ptr SimpleAsyncResult00](self.impl))) + +proc g_simple_async_result_set_check_cancellable*(self: ptr SimpleAsyncResult00; checkCancellable: ptr Cancellable00) {. + importc: "g_simple_async_result_set_check_cancellable", libprag.} + +proc setCheckCancellable*(self: SimpleAsyncResult; checkCancellable: Cancellable) = + g_simple_async_result_set_check_cancellable(cast[ptr SimpleAsyncResult00](self.impl), cast[ptr Cancellable00](checkCancellable.impl)) + +proc `checkCancellable=`*(self: SimpleAsyncResult; checkCancellable: Cancellable) = + g_simple_async_result_set_check_cancellable(cast[ptr SimpleAsyncResult00](self.impl), cast[ptr Cancellable00](checkCancellable.impl)) + +proc g_simple_async_result_set_from_error*(self: ptr SimpleAsyncResult00; error: ptr Error00) {. + importc: "g_simple_async_result_set_from_error", libprag.} + +proc setFromError*(self: SimpleAsyncResult; error: ptr Error00) = + g_simple_async_result_set_from_error(cast[ptr SimpleAsyncResult00](self.impl), error) + +proc `fromError=`*(self: SimpleAsyncResult; error: ptr Error00) = + g_simple_async_result_set_from_error(cast[ptr SimpleAsyncResult00](self.impl), error) + +proc g_simple_async_result_set_handle_cancellation*(self: ptr SimpleAsyncResult00; handleCancellation: gboolean) {. + importc: "g_simple_async_result_set_handle_cancellation", libprag.} + +proc setHandleCancellation*(self: SimpleAsyncResult; handleCancellation: bool) = + g_simple_async_result_set_handle_cancellation(cast[ptr SimpleAsyncResult00](self.impl), gboolean(handleCancellation)) + +proc `handleCancellation=`*(self: SimpleAsyncResult; handleCancellation: bool) = + g_simple_async_result_set_handle_cancellation(cast[ptr SimpleAsyncResult00](self.impl), gboolean(handleCancellation)) + +proc g_simple_async_result_set_op_res_gboolean*(self: ptr SimpleAsyncResult00; opRes: gboolean) {. + importc: "g_simple_async_result_set_op_res_gboolean", libprag.} + +proc setOpResGboolean*(self: SimpleAsyncResult; opRes: bool) = + g_simple_async_result_set_op_res_gboolean(cast[ptr SimpleAsyncResult00](self.impl), gboolean(opRes)) + +proc `opResGboolean=`*(self: SimpleAsyncResult; opRes: bool) = + g_simple_async_result_set_op_res_gboolean(cast[ptr SimpleAsyncResult00](self.impl), gboolean(opRes)) + +proc g_simple_async_result_set_op_res_gssize*(self: ptr SimpleAsyncResult00; opRes: int64) {. + importc: "g_simple_async_result_set_op_res_gssize", libprag.} + +proc setOpResGssize*(self: SimpleAsyncResult; opRes: int64) = + g_simple_async_result_set_op_res_gssize(cast[ptr SimpleAsyncResult00](self.impl), opRes) + +proc `opResGssize=`*(self: SimpleAsyncResult; opRes: int64) = + g_simple_async_result_set_op_res_gssize(cast[ptr SimpleAsyncResult00](self.impl), opRes) + +type + SimpleAsyncResultClass00* {.pure.} = object + SimpleAsyncResultClass* = ref object + impl*: ptr SimpleAsyncResultClass00 + +type + SimpleAsyncThreadFunc* = proc (res: ptr SimpleAsyncResult00; `object`: ptr gobject.Object00; + cancellable: ptr Cancellable00) {.cdecl.} + +type + SimpleIOStream* = ref object of IOStream + SimpleIOStream00* = object of IOStream00 + +proc g_simple_io_stream_new*(inputStream: ptr InputStream00; outputStream: ptr OutputStream00): ptr SimpleIOStream00 {. + importc: "g_simple_io_stream_new", libprag.} + +proc newSimpleIOStream*(inputStream: InputStream; outputStream: OutputStream): SimpleIOStream = + new(result, finalizeGObject) + result.impl = g_simple_io_stream_new(cast[ptr InputStream00](inputStream.impl), cast[ptr OutputStream00](outputStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSimpleIOStream*[T](result: var T; inputStream: InputStream; outputStream: OutputStream) = + assert(result is SimpleIOStream) + new(result, finalizeGObject) + result.impl = g_simple_io_stream_new(cast[ptr InputStream00](inputStream.impl), cast[ptr OutputStream00](outputStream.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SimplePermission* = ref object of Permission + SimplePermission00* = object of Permission00 + +proc g_simple_permission_new*(allowed: gboolean): ptr SimplePermission00 {. + importc: "g_simple_permission_new", libprag.} + +proc newSimplePermission*(allowed: bool): SimplePermission = + new(result, finalizeGObject) + result.impl = g_simple_permission_new(gboolean(allowed)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSimplePermission*[T](result: var T; allowed: bool) = + assert(result is SimplePermission) + new(result, finalizeGObject) + result.impl = g_simple_permission_new(gboolean(allowed)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SimpleProxyResolverPrivate00* {.pure.} = object + SimpleProxyResolverPrivate* = ref object + impl*: ptr SimpleProxyResolverPrivate00 + +type + SimpleProxyResolver* = ref object of gobject.Object + SimpleProxyResolver00* = object of gobject.Object00 + priv1: ptr SimpleProxyResolverPrivate00 + +proc g_simple_proxy_resolver_new*(defaultProxy: cstring; ignoreHosts: cstring): ptr ProxyResolver00 {. + importc: "g_simple_proxy_resolver_new", libprag.} + +proc newSimpleProxyResolver*(defaultProxy: string; ignoreHosts: string): ProxyResolver = + new(result) + result.impl = g_simple_proxy_resolver_new(cstring(defaultProxy), cstring(ignoreHosts)) + +proc g_simple_proxy_resolver_set_default_proxy*(self: ptr SimpleProxyResolver00; defaultProxy: cstring) {. + importc: "g_simple_proxy_resolver_set_default_proxy", libprag.} + +proc setDefaultProxy*(self: SimpleProxyResolver; defaultProxy: string) = + g_simple_proxy_resolver_set_default_proxy(cast[ptr SimpleProxyResolver00](self.impl), cstring(defaultProxy)) + +proc `defaultProxy=`*(self: SimpleProxyResolver; defaultProxy: string) = + g_simple_proxy_resolver_set_default_proxy(cast[ptr SimpleProxyResolver00](self.impl), cstring(defaultProxy)) + +proc g_simple_proxy_resolver_set_ignore_hosts*(self: ptr SimpleProxyResolver00; ignoreHosts: cstring) {. + importc: "g_simple_proxy_resolver_set_ignore_hosts", libprag.} + +proc setIgnoreHosts*(self: SimpleProxyResolver; ignoreHosts: string) = + g_simple_proxy_resolver_set_ignore_hosts(cast[ptr SimpleProxyResolver00](self.impl), cstring(ignoreHosts)) + +proc `ignoreHosts=`*(self: SimpleProxyResolver; ignoreHosts: string) = + g_simple_proxy_resolver_set_ignore_hosts(cast[ptr SimpleProxyResolver00](self.impl), cstring(ignoreHosts)) + +proc g_simple_proxy_resolver_set_uri_proxy*(self: ptr SimpleProxyResolver00; uriScheme: cstring; + proxy: cstring) {. + importc: "g_simple_proxy_resolver_set_uri_proxy", libprag.} + +proc setUriProxy*(self: SimpleProxyResolver; uriScheme: string; proxy: string) = + g_simple_proxy_resolver_set_uri_proxy(cast[ptr SimpleProxyResolver00](self.impl), cstring(uriScheme), cstring(proxy)) + +type + SimpleProxyResolverClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + SimpleProxyResolverClass* = ref object + impl*: ptr SimpleProxyResolverClass00 + +type + SocketPrivate00* {.pure.} = object + SocketPrivate* = ref object + impl*: ptr SocketPrivate00 + +type + Socket* = ref object of gobject.Object + Socket00* = object of gobject.Object00 + priv1: ptr SocketPrivate00 + +proc g_socket_new_from_fd*(fd: int32): ptr Socket00 {. + importc: "g_socket_new_from_fd", libprag.} + +proc newSocketFromFd*(fd: int): Socket = + new(result, finalizeGObject) + result.impl = g_socket_new_from_fd(int32(fd)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSocketFromFd*[T](result: var T; fd: int) = + assert(result is Socket) + new(result, finalizeGObject) + result.impl = g_socket_new_from_fd(int32(fd)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_accept*(self: ptr Socket00; cancellable: ptr Cancellable00): ptr Socket00 {. + importc: "g_socket_accept", libprag.} + +proc accept*(self: Socket; cancellable: Cancellable): Socket = + let gobj = g_socket_accept(cast[ptr Socket00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Socket](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_bind*(self: ptr Socket00; address: ptr SocketAddress00; + allowReuse: gboolean): gboolean {. + importc: "g_socket_bind", libprag.} + +proc `bind`*(self: Socket; address: SocketAddress; allowReuse: bool): bool = + toBool(g_socket_bind(cast[ptr Socket00](self.impl), cast[ptr SocketAddress00](address.impl), gboolean(allowReuse))) + +proc g_socket_check_connect_result*(self: ptr Socket00): gboolean {. + importc: "g_socket_check_connect_result", libprag.} + +proc checkConnectResult*(self: Socket): bool = + toBool(g_socket_check_connect_result(cast[ptr Socket00](self.impl))) + +proc g_socket_close*(self: ptr Socket00): gboolean {. + importc: "g_socket_close", libprag.} + +proc close*(self: Socket): bool = + toBool(g_socket_close(cast[ptr Socket00](self.impl))) + +proc g_socket_condition_check*(self: ptr Socket00; condition: glib.IOCondition): glib.IOCondition {. + importc: "g_socket_condition_check", libprag.} + +proc conditionCheck*(self: Socket; condition: glib.IOCondition): glib.IOCondition = + g_socket_condition_check(cast[ptr Socket00](self.impl), condition) + +proc g_socket_condition_timed_wait*(self: ptr Socket00; condition: glib.IOCondition; timeout: int64; + cancellable: ptr Cancellable00): gboolean {. + importc: "g_socket_condition_timed_wait", libprag.} + +proc conditionTimedWait*(self: Socket; condition: glib.IOCondition; timeout: int64; + cancellable: Cancellable): bool = + toBool(g_socket_condition_timed_wait(cast[ptr Socket00](self.impl), condition, timeout, cast[ptr Cancellable00](cancellable.impl))) + +proc g_socket_condition_wait*(self: ptr Socket00; condition: glib.IOCondition; cancellable: ptr Cancellable00): gboolean {. + importc: "g_socket_condition_wait", libprag.} + +proc conditionWait*(self: Socket; condition: glib.IOCondition; cancellable: Cancellable): bool = + toBool(g_socket_condition_wait(cast[ptr Socket00](self.impl), condition, cast[ptr Cancellable00](cancellable.impl))) + +proc g_socket_connect*(self: ptr Socket00; address: ptr SocketAddress00; + cancellable: ptr Cancellable00): gboolean {. + importc: "g_socket_connect", libprag.} + +proc connect*(self: Socket; address: SocketAddress; cancellable: Cancellable): bool = + toBool(g_socket_connect(cast[ptr Socket00](self.impl), cast[ptr SocketAddress00](address.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_socket_get_available_bytes*(self: ptr Socket00): int64 {. + importc: "g_socket_get_available_bytes", libprag.} + +proc getAvailableBytes*(self: Socket): int64 = + g_socket_get_available_bytes(cast[ptr Socket00](self.impl)) + +proc availableBytes*(self: Socket): int64 = + g_socket_get_available_bytes(cast[ptr Socket00](self.impl)) + +proc g_socket_get_blocking*(self: ptr Socket00): gboolean {. + importc: "g_socket_get_blocking", libprag.} + +proc getBlocking*(self: Socket): bool = + toBool(g_socket_get_blocking(cast[ptr Socket00](self.impl))) + +proc blocking*(self: Socket): bool = + toBool(g_socket_get_blocking(cast[ptr Socket00](self.impl))) + +proc g_socket_get_broadcast*(self: ptr Socket00): gboolean {. + importc: "g_socket_get_broadcast", libprag.} + +proc getBroadcast*(self: Socket): bool = + toBool(g_socket_get_broadcast(cast[ptr Socket00](self.impl))) + +proc broadcast*(self: Socket): bool = + toBool(g_socket_get_broadcast(cast[ptr Socket00](self.impl))) + +proc g_socket_get_credentials*(self: ptr Socket00): ptr Credentials00 {. + importc: "g_socket_get_credentials", libprag.} + +proc getCredentials*(self: Socket): Credentials = + let gobj = g_socket_get_credentials(cast[ptr Socket00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Credentials](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc credentials*(self: Socket): Credentials = + let gobj = g_socket_get_credentials(cast[ptr Socket00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Credentials](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_get_family*(self: ptr Socket00): SocketFamily {. + importc: "g_socket_get_family", libprag.} + +proc getFamily*(self: Socket): SocketFamily = + g_socket_get_family(cast[ptr Socket00](self.impl)) + +proc family*(self: Socket): SocketFamily = + g_socket_get_family(cast[ptr Socket00](self.impl)) + +proc g_socket_get_fd*(self: ptr Socket00): int32 {. + importc: "g_socket_get_fd", libprag.} + +proc getFd*(self: Socket): int = + int(g_socket_get_fd(cast[ptr Socket00](self.impl))) + +proc fd*(self: Socket): int = + int(g_socket_get_fd(cast[ptr Socket00](self.impl))) + +proc g_socket_get_keepalive*(self: ptr Socket00): gboolean {. + importc: "g_socket_get_keepalive", libprag.} + +proc getKeepalive*(self: Socket): bool = + toBool(g_socket_get_keepalive(cast[ptr Socket00](self.impl))) + +proc keepalive*(self: Socket): bool = + toBool(g_socket_get_keepalive(cast[ptr Socket00](self.impl))) + +proc g_socket_get_listen_backlog*(self: ptr Socket00): int32 {. + importc: "g_socket_get_listen_backlog", libprag.} + +proc getListenBacklog*(self: Socket): int = + int(g_socket_get_listen_backlog(cast[ptr Socket00](self.impl))) + +proc listenBacklog*(self: Socket): int = + int(g_socket_get_listen_backlog(cast[ptr Socket00](self.impl))) + +proc g_socket_get_local_address*(self: ptr Socket00): ptr SocketAddress00 {. + importc: "g_socket_get_local_address", libprag.} + +proc getLocalAddress*(self: Socket): SocketAddress = + let gobj = g_socket_get_local_address(cast[ptr Socket00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc localAddress*(self: Socket): SocketAddress = + let gobj = g_socket_get_local_address(cast[ptr Socket00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_get_multicast_loopback*(self: ptr Socket00): gboolean {. + importc: "g_socket_get_multicast_loopback", libprag.} + +proc getMulticastLoopback*(self: Socket): bool = + toBool(g_socket_get_multicast_loopback(cast[ptr Socket00](self.impl))) + +proc multicastLoopback*(self: Socket): bool = + toBool(g_socket_get_multicast_loopback(cast[ptr Socket00](self.impl))) + +proc g_socket_get_multicast_ttl*(self: ptr Socket00): uint32 {. + importc: "g_socket_get_multicast_ttl", libprag.} + +proc getMulticastTtl*(self: Socket): int = + int(g_socket_get_multicast_ttl(cast[ptr Socket00](self.impl))) + +proc multicastTtl*(self: Socket): int = + int(g_socket_get_multicast_ttl(cast[ptr Socket00](self.impl))) + +proc g_socket_get_option*(self: ptr Socket00; level: int32; optname: int32; + value: var int32): gboolean {. + importc: "g_socket_get_option", libprag.} + +proc getOption*(self: Socket; level: int; optname: int; value: var int): bool = + var value_00 = int32(value) + result = toBool(g_socket_get_option(cast[ptr Socket00](self.impl), int32(level), int32(optname), value_00)) + value = int(value_00) + +proc option*(self: Socket; level: int; optname: int; value: var int): bool = + var value_00 = int32(value) + result = toBool(g_socket_get_option(cast[ptr Socket00](self.impl), int32(level), int32(optname), value_00)) + value = int(value_00) + +proc g_socket_get_remote_address*(self: ptr Socket00): ptr SocketAddress00 {. + importc: "g_socket_get_remote_address", libprag.} + +proc getRemoteAddress*(self: Socket): SocketAddress = + let gobj = g_socket_get_remote_address(cast[ptr Socket00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc remoteAddress*(self: Socket): SocketAddress = + let gobj = g_socket_get_remote_address(cast[ptr Socket00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_get_timeout*(self: ptr Socket00): uint32 {. + importc: "g_socket_get_timeout", libprag.} + +proc getTimeout*(self: Socket): int = + int(g_socket_get_timeout(cast[ptr Socket00](self.impl))) + +proc timeout*(self: Socket): int = + int(g_socket_get_timeout(cast[ptr Socket00](self.impl))) + +proc g_socket_get_ttl*(self: ptr Socket00): uint32 {. + importc: "g_socket_get_ttl", libprag.} + +proc getTtl*(self: Socket): int = + int(g_socket_get_ttl(cast[ptr Socket00](self.impl))) + +proc ttl*(self: Socket): int = + int(g_socket_get_ttl(cast[ptr Socket00](self.impl))) + +proc g_socket_is_closed*(self: ptr Socket00): gboolean {. + importc: "g_socket_is_closed", libprag.} + +proc isClosed*(self: Socket): bool = + toBool(g_socket_is_closed(cast[ptr Socket00](self.impl))) + +proc g_socket_is_connected*(self: ptr Socket00): gboolean {. + importc: "g_socket_is_connected", libprag.} + +proc isConnected*(self: Socket): bool = + toBool(g_socket_is_connected(cast[ptr Socket00](self.impl))) + +proc g_socket_join_multicast_group*(self: ptr Socket00; group: ptr InetAddress00; sourceSpecific: gboolean; + iface: cstring): gboolean {. + importc: "g_socket_join_multicast_group", libprag.} + +proc joinMulticastGroup*(self: Socket; group: InetAddress; sourceSpecific: bool; + iface: string): bool = + toBool(g_socket_join_multicast_group(cast[ptr Socket00](self.impl), cast[ptr InetAddress00](group.impl), gboolean(sourceSpecific), cstring(iface))) + +proc g_socket_leave_multicast_group*(self: ptr Socket00; group: ptr InetAddress00; sourceSpecific: gboolean; + iface: cstring): gboolean {. + importc: "g_socket_leave_multicast_group", libprag.} + +proc leaveMulticastGroup*(self: Socket; group: InetAddress; sourceSpecific: bool; + iface: string): bool = + toBool(g_socket_leave_multicast_group(cast[ptr Socket00](self.impl), cast[ptr InetAddress00](group.impl), gboolean(sourceSpecific), cstring(iface))) + +proc g_socket_listen*(self: ptr Socket00): gboolean {. + importc: "g_socket_listen", libprag.} + +proc listen*(self: Socket): bool = + toBool(g_socket_listen(cast[ptr Socket00](self.impl))) + +proc g_socket_receive*(self: ptr Socket00; buffer: uint8Array; size: uint64; + cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_receive", libprag.} + +proc receive*(self: Socket; buffer: uint8Array; size: uint64; cancellable: Cancellable): int64 = + g_socket_receive(cast[ptr Socket00](self.impl), buffer, size, cast[ptr Cancellable00](cancellable.impl)) + +proc g_socket_receive_from*(self: ptr Socket00; address: var ptr SocketAddress00; + buffer: uint8Array; size: uint64; cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_receive_from", libprag.} + +proc receiveFrom*(self: ptr Socket00; address: var ptr SocketAddress00; + buffer: uint8Array; size: uint64; cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_receive_from", libprag.} + +proc g_socket_receive_message*(self: ptr Socket00; address: var ptr SocketAddress00; + vectors: InputVector00Array; numVectors: int32; messages: var ptr SocketControlMessage00Array; + numMessages: var int32; flags: int32; cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_receive_message", libprag.} + +proc receiveMessage*(self: ptr Socket00; address: var ptr SocketAddress00; + vectors: InputVector00Array; numVectors: int32; messages: var ptr SocketControlMessage00Array; + numMessages: var int32; flags: int32; cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_receive_message", libprag.} + +proc g_socket_receive_messages*(self: ptr Socket00; messages: InputMessage00Array; + numMessages: uint32; flags: int32; cancellable: ptr Cancellable00): int32 {. + importc: "g_socket_receive_messages", libprag.} + +proc receiveMessages*(self: Socket; messages: InputMessage00Array; numMessages: int; + flags: int; cancellable: Cancellable): int = + int(g_socket_receive_messages(cast[ptr Socket00](self.impl), messages, uint32(numMessages), int32(flags), cast[ptr Cancellable00](cancellable.impl))) + +proc g_socket_receive_with_blocking*(self: ptr Socket00; buffer: uint8Array; size: uint64; + blocking: gboolean; cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_receive_with_blocking", libprag.} + +proc receiveWithBlocking*(self: Socket; buffer: uint8Array; size: uint64; blocking: bool; + cancellable: Cancellable): int64 = + g_socket_receive_with_blocking(cast[ptr Socket00](self.impl), buffer, size, gboolean(blocking), cast[ptr Cancellable00](cancellable.impl)) + +proc g_socket_send*(self: ptr Socket00; buffer: uint8Array; size: uint64; + cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_send", libprag.} + +proc send*(self: Socket; buffer: uint8Array; size: uint64; cancellable: Cancellable): int64 = + g_socket_send(cast[ptr Socket00](self.impl), buffer, size, cast[ptr Cancellable00](cancellable.impl)) + +proc g_socket_send_message*(self: ptr Socket00; address: ptr SocketAddress00; + vectors: OutputVector00Array; numVectors: int32; messages: ptr SocketControlMessage00Array; numMessages: int32; + flags: int32; cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_send_message", libprag.} + +proc sendMessage*(self: Socket; address: SocketAddress; vectors: OutputVector00Array; + numVectors: int; messages: ptr SocketControlMessage00Array; numMessages: int; + flags: int; cancellable: Cancellable): int64 = + g_socket_send_message(cast[ptr Socket00](self.impl), cast[ptr SocketAddress00](address.impl), vectors, int32(numVectors), messages, int32(numMessages), int32(flags), cast[ptr Cancellable00](cancellable.impl)) + +proc g_socket_send_messages*(self: ptr Socket00; messages: OutputMessage00Array; + numMessages: uint32; flags: int32; cancellable: ptr Cancellable00): int32 {. + importc: "g_socket_send_messages", libprag.} + +proc sendMessages*(self: Socket; messages: OutputMessage00Array; numMessages: int; + flags: int; cancellable: Cancellable): int = + int(g_socket_send_messages(cast[ptr Socket00](self.impl), messages, uint32(numMessages), int32(flags), cast[ptr Cancellable00](cancellable.impl))) + +proc g_socket_send_to*(self: ptr Socket00; address: ptr SocketAddress00; + buffer: uint8Array; size: uint64; cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_send_to", libprag.} + +proc sendTo*(self: Socket; address: SocketAddress; buffer: uint8Array; + size: uint64; cancellable: Cancellable): int64 = + g_socket_send_to(cast[ptr Socket00](self.impl), cast[ptr SocketAddress00](address.impl), buffer, size, cast[ptr Cancellable00](cancellable.impl)) + +proc g_socket_send_with_blocking*(self: ptr Socket00; buffer: uint8Array; size: uint64; + blocking: gboolean; cancellable: ptr Cancellable00): int64 {. + importc: "g_socket_send_with_blocking", libprag.} + +proc sendWithBlocking*(self: Socket; buffer: uint8Array; size: uint64; blocking: bool; + cancellable: Cancellable): int64 = + g_socket_send_with_blocking(cast[ptr Socket00](self.impl), buffer, size, gboolean(blocking), cast[ptr Cancellable00](cancellable.impl)) + +proc g_socket_set_blocking*(self: ptr Socket00; blocking: gboolean) {. + importc: "g_socket_set_blocking", libprag.} + +proc setBlocking*(self: Socket; blocking: bool) = + g_socket_set_blocking(cast[ptr Socket00](self.impl), gboolean(blocking)) + +proc `blocking=`*(self: Socket; blocking: bool) = + g_socket_set_blocking(cast[ptr Socket00](self.impl), gboolean(blocking)) + +proc g_socket_set_broadcast*(self: ptr Socket00; broadcast: gboolean) {. + importc: "g_socket_set_broadcast", libprag.} + +proc setBroadcast*(self: Socket; broadcast: bool) = + g_socket_set_broadcast(cast[ptr Socket00](self.impl), gboolean(broadcast)) + +proc `broadcast=`*(self: Socket; broadcast: bool) = + g_socket_set_broadcast(cast[ptr Socket00](self.impl), gboolean(broadcast)) + +proc g_socket_set_keepalive*(self: ptr Socket00; keepalive: gboolean) {. + importc: "g_socket_set_keepalive", libprag.} + +proc setKeepalive*(self: Socket; keepalive: bool) = + g_socket_set_keepalive(cast[ptr Socket00](self.impl), gboolean(keepalive)) + +proc `keepalive=`*(self: Socket; keepalive: bool) = + g_socket_set_keepalive(cast[ptr Socket00](self.impl), gboolean(keepalive)) + +proc g_socket_set_listen_backlog*(self: ptr Socket00; backlog: int32) {. + importc: "g_socket_set_listen_backlog", libprag.} + +proc setListenBacklog*(self: Socket; backlog: int) = + g_socket_set_listen_backlog(cast[ptr Socket00](self.impl), int32(backlog)) + +proc `listenBacklog=`*(self: Socket; backlog: int) = + g_socket_set_listen_backlog(cast[ptr Socket00](self.impl), int32(backlog)) + +proc g_socket_set_multicast_loopback*(self: ptr Socket00; loopback: gboolean) {. + importc: "g_socket_set_multicast_loopback", libprag.} + +proc setMulticastLoopback*(self: Socket; loopback: bool) = + g_socket_set_multicast_loopback(cast[ptr Socket00](self.impl), gboolean(loopback)) + +proc `multicastLoopback=`*(self: Socket; loopback: bool) = + g_socket_set_multicast_loopback(cast[ptr Socket00](self.impl), gboolean(loopback)) + +proc g_socket_set_multicast_ttl*(self: ptr Socket00; ttl: uint32) {. + importc: "g_socket_set_multicast_ttl", libprag.} + +proc setMulticastTtl*(self: Socket; ttl: int) = + g_socket_set_multicast_ttl(cast[ptr Socket00](self.impl), uint32(ttl)) + +proc `multicastTtl=`*(self: Socket; ttl: int) = + g_socket_set_multicast_ttl(cast[ptr Socket00](self.impl), uint32(ttl)) + +proc g_socket_set_option*(self: ptr Socket00; level: int32; optname: int32; + value: int32): gboolean {. + importc: "g_socket_set_option", libprag.} + +proc setOption*(self: Socket; level: int; optname: int; value: int): bool = + toBool(g_socket_set_option(cast[ptr Socket00](self.impl), int32(level), int32(optname), int32(value))) + +proc g_socket_set_timeout*(self: ptr Socket00; timeout: uint32) {. + importc: "g_socket_set_timeout", libprag.} + +proc setTimeout*(self: Socket; timeout: int) = + g_socket_set_timeout(cast[ptr Socket00](self.impl), uint32(timeout)) + +proc `timeout=`*(self: Socket; timeout: int) = + g_socket_set_timeout(cast[ptr Socket00](self.impl), uint32(timeout)) + +proc g_socket_set_ttl*(self: ptr Socket00; ttl: uint32) {. + importc: "g_socket_set_ttl", libprag.} + +proc setTtl*(self: Socket; ttl: int) = + g_socket_set_ttl(cast[ptr Socket00](self.impl), uint32(ttl)) + +proc `ttl=`*(self: Socket; ttl: int) = + g_socket_set_ttl(cast[ptr Socket00](self.impl), uint32(ttl)) + +proc g_socket_shutdown*(self: ptr Socket00; shutdownRead: gboolean; shutdownWrite: gboolean): gboolean {. + importc: "g_socket_shutdown", libprag.} + +proc shutdown*(self: Socket; shutdownRead: bool; shutdownWrite: bool): bool = + toBool(g_socket_shutdown(cast[ptr Socket00](self.impl), gboolean(shutdownRead), gboolean(shutdownWrite))) + +proc g_socket_speaks_ipv4*(self: ptr Socket00): gboolean {. + importc: "g_socket_speaks_ipv4", libprag.} + +proc speaksIpv4*(self: Socket): bool = + toBool(g_socket_speaks_ipv4(cast[ptr Socket00](self.impl))) + +type + SocketConnectionPrivate00* {.pure.} = object + SocketConnectionPrivate* = ref object + impl*: ptr SocketConnectionPrivate00 + +type + SocketConnection* = ref object of IOStream + SocketConnection00* = object of IOStream00 + priv2: ptr SocketConnectionPrivate00 + +proc g_socket_connection_connect*(self: ptr SocketConnection00; address: ptr SocketAddress00; + cancellable: ptr Cancellable00): gboolean {. + importc: "g_socket_connection_connect", libprag.} + +proc connect*(self: SocketConnection; address: SocketAddress; cancellable: Cancellable): bool = + toBool(g_socket_connection_connect(cast[ptr SocketConnection00](self.impl), cast[ptr SocketAddress00](address.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_socket_connection_connect_async*(self: ptr SocketConnection00; address: ptr SocketAddress00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_socket_connection_connect_async", libprag.} + +proc connectAsync*(self: SocketConnection; address: SocketAddress; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_socket_connection_connect_async(cast[ptr SocketConnection00](self.impl), cast[ptr SocketAddress00](address.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_socket_connection_connect_finish*(self: ptr SocketConnection00; resu: ptr AsyncResult00): gboolean {. + importc: "g_socket_connection_connect_finish", libprag.} + +proc connectFinish*(self: SocketConnection; resu: AsyncResult): bool = + toBool(g_socket_connection_connect_finish(cast[ptr SocketConnection00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_socket_connection_get_local_address*(self: ptr SocketConnection00): ptr SocketAddress00 {. + importc: "g_socket_connection_get_local_address", libprag.} + +proc getLocalAddress*(self: SocketConnection): SocketAddress = + let gobj = g_socket_connection_get_local_address(cast[ptr SocketConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc localAddress*(self: SocketConnection): SocketAddress = + let gobj = g_socket_connection_get_local_address(cast[ptr SocketConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_connection_get_remote_address*(self: ptr SocketConnection00): ptr SocketAddress00 {. + importc: "g_socket_connection_get_remote_address", libprag.} + +proc getRemoteAddress*(self: SocketConnection): SocketAddress = + let gobj = g_socket_connection_get_remote_address(cast[ptr SocketConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc remoteAddress*(self: SocketConnection): SocketAddress = + let gobj = g_socket_connection_get_remote_address(cast[ptr SocketConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_connection_get_socket*(self: ptr SocketConnection00): ptr Socket00 {. + importc: "g_socket_connection_get_socket", libprag.} + +proc getSocket*(self: SocketConnection): Socket = + let gobj = g_socket_connection_get_socket(cast[ptr SocketConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Socket](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc socket*(self: SocketConnection): Socket = + let gobj = g_socket_connection_get_socket(cast[ptr SocketConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Socket](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_connection_is_connected*(self: ptr SocketConnection00): gboolean {. + importc: "g_socket_connection_is_connected", libprag.} + +proc isConnected*(self: SocketConnection): bool = + toBool(g_socket_connection_is_connected(cast[ptr SocketConnection00](self.impl))) + +proc g_socket_connection_factory_create_connection*(self: ptr Socket00): ptr SocketConnection00 {. + importc: "g_socket_connection_factory_create_connection", libprag.} + +proc connectionFactoryCreateConnection*(self: Socket): SocketConnection = + let gobj = g_socket_connection_factory_create_connection(cast[ptr Socket00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SocketProtocol* {.size: sizeof(cint), pure.} = enum + unknown = -1 + default = 0 + tcp = 6 + udp = 17 + sctp = 132 + +proc g_socket_get_protocol*(self: ptr Socket00): SocketProtocol {. + importc: "g_socket_get_protocol", libprag.} + +proc getProtocol*(self: Socket): SocketProtocol = + g_socket_get_protocol(cast[ptr Socket00](self.impl)) + +proc protocol*(self: Socket): SocketProtocol = + g_socket_get_protocol(cast[ptr Socket00](self.impl)) + +type + SocketType* {.size: sizeof(cint), pure.} = enum + invalid = 0 + stream = 1 + datagram = 2 + seqpacket = 3 + +proc g_socket_new*(family: SocketFamily; `type`: SocketType; protocol: SocketProtocol): ptr Socket00 {. + importc: "g_socket_new", libprag.} + +proc newSocket*(family: SocketFamily; `type`: SocketType; protocol: SocketProtocol): Socket = + new(result, finalizeGObject) + result.impl = g_socket_new(family, `type`, protocol) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSocket*[T](result: var T; family: SocketFamily; `type`: SocketType; protocol: SocketProtocol) = + assert(result is Socket) + new(result, finalizeGObject) + result.impl = g_socket_new(family, `type`, protocol) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_get_socket_type*(self: ptr Socket00): SocketType {. + importc: "g_socket_get_socket_type", libprag.} + +proc getSocketType*(self: Socket): SocketType = + g_socket_get_socket_type(cast[ptr Socket00](self.impl)) + +proc socketType*(self: Socket): SocketType = + g_socket_get_socket_type(cast[ptr Socket00](self.impl)) + +proc g_socket_connection_factory_lookup_type*(family: SocketFamily; `type`: SocketType; protocolId: int32): GType {. + importc: "g_socket_connection_factory_lookup_type", libprag.} + +proc factoryLookupType*(family: SocketFamily; `type`: SocketType; protocolId: int32): GType {. + importc: "g_socket_connection_factory_lookup_type", libprag.} + +proc g_socket_connection_factory_register_type*(gType: GType; family: SocketFamily; `type`: SocketType; + protocol: int32) {. + importc: "g_socket_connection_factory_register_type", libprag.} + +proc factoryRegisterType*(gType: GType; family: SocketFamily; `type`: SocketType; + protocol: int32) {. + importc: "g_socket_connection_factory_register_type", libprag.} + +type + SocketClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + gReserved7*: pointer + gReserved8*: pointer + gReserved9*: pointer + gReserved10*: pointer + SocketClass* = ref object + impl*: ptr SocketClass00 + +type + SocketClientPrivate00* {.pure.} = object + SocketClientPrivate* = ref object + impl*: ptr SocketClientPrivate00 + +type + SocketClientEvent* {.size: sizeof(cint), pure.} = enum + resolving = 0 + resolved = 1 + connecting = 2 + connected = 3 + proxyNegotiating = 4 + proxyNegotiated = 5 + tlsHandshaking = 6 + tlsHandshaked = 7 + complete = 8 + +type + SocketClient* = ref object of gobject.Object + SocketClient00* = object of gobject.Object00 + priv1: ptr SocketClientPrivate00 + +proc scEvent*(self: SocketClient; p: proc (self: ptr gobject.Object00; event: SocketClientEvent; connectable: SocketConnectable00; + connection: IOStream00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_socket_client_new*(): ptr SocketClient00 {. + importc: "g_socket_client_new", libprag.} + +proc newSocketClient*(): SocketClient = + new(result, finalizeGObject) + result.impl = g_socket_client_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSocketClient*[T](result: var T) = + assert(result is SocketClient) + new(result, finalizeGObject) + result.impl = g_socket_client_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_add_application_proxy*(self: ptr SocketClient00; protocol: cstring) {. + importc: "g_socket_client_add_application_proxy", libprag.} + +proc addApplicationProxy*(self: SocketClient; protocol: string) = + g_socket_client_add_application_proxy(cast[ptr SocketClient00](self.impl), cstring(protocol)) + +proc g_socket_client_connect*(self: ptr SocketClient00; connectable: ptr SocketConnectable00; + cancellable: ptr Cancellable00): ptr SocketConnection00 {. + importc: "g_socket_client_connect", libprag.} + +proc connect*(self: SocketClient; connectable: SocketConnectable; + cancellable: Cancellable): SocketConnection = + let gobj = g_socket_client_connect(cast[ptr SocketClient00](self.impl), cast[ptr SocketConnectable00](connectable.impl), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_connect_async*(self: ptr SocketClient00; connectable: ptr SocketConnectable00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_socket_client_connect_async", libprag.} + +proc connectAsync*(self: SocketClient; connectable: SocketConnectable; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_socket_client_connect_async(cast[ptr SocketClient00](self.impl), cast[ptr SocketConnectable00](connectable.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_socket_client_connect_finish*(self: ptr SocketClient00; resu: ptr AsyncResult00): ptr SocketConnection00 {. + importc: "g_socket_client_connect_finish", libprag.} + +proc connectFinish*(self: SocketClient; resu: AsyncResult): SocketConnection = + let gobj = g_socket_client_connect_finish(cast[ptr SocketClient00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_connect_to_host*(self: ptr SocketClient00; hostAndPort: cstring; defaultPort: uint16; + cancellable: ptr Cancellable00): ptr SocketConnection00 {. + importc: "g_socket_client_connect_to_host", libprag.} + +proc connectToHost*(self: SocketClient; hostAndPort: string; defaultPort: uint16; + cancellable: Cancellable): SocketConnection = + let gobj = g_socket_client_connect_to_host(cast[ptr SocketClient00](self.impl), cstring(hostAndPort), defaultPort, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_connect_to_host_async*(self: ptr SocketClient00; hostAndPort: cstring; defaultPort: uint16; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_socket_client_connect_to_host_async", libprag.} + +proc connectToHostAsync*(self: SocketClient; hostAndPort: string; defaultPort: uint16; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_socket_client_connect_to_host_async(cast[ptr SocketClient00](self.impl), cstring(hostAndPort), defaultPort, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_socket_client_connect_to_host_finish*(self: ptr SocketClient00; resu: ptr AsyncResult00): ptr SocketConnection00 {. + importc: "g_socket_client_connect_to_host_finish", libprag.} + +proc connectToHostFinish*(self: SocketClient; resu: AsyncResult): SocketConnection = + let gobj = g_socket_client_connect_to_host_finish(cast[ptr SocketClient00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_connect_to_service*(self: ptr SocketClient00; domain: cstring; service: cstring; + cancellable: ptr Cancellable00): ptr SocketConnection00 {. + importc: "g_socket_client_connect_to_service", libprag.} + +proc connectToService*(self: SocketClient; domain: string; service: string; + cancellable: Cancellable): SocketConnection = + let gobj = g_socket_client_connect_to_service(cast[ptr SocketClient00](self.impl), cstring(domain), cstring(service), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_connect_to_service_async*(self: ptr SocketClient00; domain: cstring; service: cstring; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_socket_client_connect_to_service_async", libprag.} + +proc connectToServiceAsync*(self: SocketClient; domain: string; service: string; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_socket_client_connect_to_service_async(cast[ptr SocketClient00](self.impl), cstring(domain), cstring(service), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_socket_client_connect_to_service_finish*(self: ptr SocketClient00; resu: ptr AsyncResult00): ptr SocketConnection00 {. + importc: "g_socket_client_connect_to_service_finish", libprag.} + +proc connectToServiceFinish*(self: SocketClient; resu: AsyncResult): SocketConnection = + let gobj = g_socket_client_connect_to_service_finish(cast[ptr SocketClient00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_connect_to_uri*(self: ptr SocketClient00; uri: cstring; defaultPort: uint16; + cancellable: ptr Cancellable00): ptr SocketConnection00 {. + importc: "g_socket_client_connect_to_uri", libprag.} + +proc connectToUri*(self: SocketClient; uri: string; defaultPort: uint16; + cancellable: Cancellable): SocketConnection = + let gobj = g_socket_client_connect_to_uri(cast[ptr SocketClient00](self.impl), cstring(uri), defaultPort, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_connect_to_uri_async*(self: ptr SocketClient00; uri: cstring; defaultPort: uint16; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_socket_client_connect_to_uri_async", libprag.} + +proc connectToUriAsync*(self: SocketClient; uri: string; defaultPort: uint16; + cancellable: Cancellable; callback: AsyncReadyCallback; userData: pointer) = + g_socket_client_connect_to_uri_async(cast[ptr SocketClient00](self.impl), cstring(uri), defaultPort, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_socket_client_connect_to_uri_finish*(self: ptr SocketClient00; resu: ptr AsyncResult00): ptr SocketConnection00 {. + importc: "g_socket_client_connect_to_uri_finish", libprag.} + +proc connectToUriFinish*(self: SocketClient; resu: AsyncResult): SocketConnection = + let gobj = g_socket_client_connect_to_uri_finish(cast[ptr SocketClient00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_get_enable_proxy*(self: ptr SocketClient00): gboolean {. + importc: "g_socket_client_get_enable_proxy", libprag.} + +proc getEnableProxy*(self: SocketClient): bool = + toBool(g_socket_client_get_enable_proxy(cast[ptr SocketClient00](self.impl))) + +proc enableProxy*(self: SocketClient): bool = + toBool(g_socket_client_get_enable_proxy(cast[ptr SocketClient00](self.impl))) + +proc g_socket_client_get_family*(self: ptr SocketClient00): SocketFamily {. + importc: "g_socket_client_get_family", libprag.} + +proc getFamily*(self: SocketClient): SocketFamily = + g_socket_client_get_family(cast[ptr SocketClient00](self.impl)) + +proc family*(self: SocketClient): SocketFamily = + g_socket_client_get_family(cast[ptr SocketClient00](self.impl)) + +proc g_socket_client_get_local_address*(self: ptr SocketClient00): ptr SocketAddress00 {. + importc: "g_socket_client_get_local_address", libprag.} + +proc getLocalAddress*(self: SocketClient): SocketAddress = + let gobj = g_socket_client_get_local_address(cast[ptr SocketClient00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc localAddress*(self: SocketClient): SocketAddress = + let gobj = g_socket_client_get_local_address(cast[ptr SocketClient00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SocketAddress](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_client_get_protocol*(self: ptr SocketClient00): SocketProtocol {. + importc: "g_socket_client_get_protocol", libprag.} + +proc getProtocol*(self: SocketClient): SocketProtocol = + g_socket_client_get_protocol(cast[ptr SocketClient00](self.impl)) + +proc protocol*(self: SocketClient): SocketProtocol = + g_socket_client_get_protocol(cast[ptr SocketClient00](self.impl)) + +proc g_socket_client_get_proxy_resolver*(self: ptr SocketClient00): ptr ProxyResolver00 {. + importc: "g_socket_client_get_proxy_resolver", libprag.} + +proc getProxyResolver*(self: SocketClient): ProxyResolver = + new(result) + result.impl = g_socket_client_get_proxy_resolver(cast[ptr SocketClient00](self.impl)) + +proc proxyResolver*(self: SocketClient): ProxyResolver = + new(result) + result.impl = g_socket_client_get_proxy_resolver(cast[ptr SocketClient00](self.impl)) + +proc g_socket_client_get_socket_type*(self: ptr SocketClient00): SocketType {. + importc: "g_socket_client_get_socket_type", libprag.} + +proc getSocketType*(self: SocketClient): SocketType = + g_socket_client_get_socket_type(cast[ptr SocketClient00](self.impl)) + +proc socketType*(self: SocketClient): SocketType = + g_socket_client_get_socket_type(cast[ptr SocketClient00](self.impl)) + +proc g_socket_client_get_timeout*(self: ptr SocketClient00): uint32 {. + importc: "g_socket_client_get_timeout", libprag.} + +proc getTimeout*(self: SocketClient): int = + int(g_socket_client_get_timeout(cast[ptr SocketClient00](self.impl))) + +proc timeout*(self: SocketClient): int = + int(g_socket_client_get_timeout(cast[ptr SocketClient00](self.impl))) + +proc g_socket_client_get_tls*(self: ptr SocketClient00): gboolean {. + importc: "g_socket_client_get_tls", libprag.} + +proc getTls*(self: SocketClient): bool = + toBool(g_socket_client_get_tls(cast[ptr SocketClient00](self.impl))) + +proc tls*(self: SocketClient): bool = + toBool(g_socket_client_get_tls(cast[ptr SocketClient00](self.impl))) + +proc g_socket_client_get_tls_validation_flags*(self: ptr SocketClient00): TlsCertificateFlags {. + importc: "g_socket_client_get_tls_validation_flags", libprag.} + +proc getTlsValidationFlags*(self: SocketClient): TlsCertificateFlags = + g_socket_client_get_tls_validation_flags(cast[ptr SocketClient00](self.impl)) + +proc tlsValidationFlags*(self: SocketClient): TlsCertificateFlags = + g_socket_client_get_tls_validation_flags(cast[ptr SocketClient00](self.impl)) + +proc g_socket_client_set_enable_proxy*(self: ptr SocketClient00; enable: gboolean) {. + importc: "g_socket_client_set_enable_proxy", libprag.} + +proc setEnableProxy*(self: SocketClient; enable: bool) = + g_socket_client_set_enable_proxy(cast[ptr SocketClient00](self.impl), gboolean(enable)) + +proc `enableProxy=`*(self: SocketClient; enable: bool) = + g_socket_client_set_enable_proxy(cast[ptr SocketClient00](self.impl), gboolean(enable)) + +proc g_socket_client_set_family*(self: ptr SocketClient00; family: SocketFamily) {. + importc: "g_socket_client_set_family", libprag.} + +proc setFamily*(self: SocketClient; family: SocketFamily) = + g_socket_client_set_family(cast[ptr SocketClient00](self.impl), family) + +proc `family=`*(self: SocketClient; family: SocketFamily) = + g_socket_client_set_family(cast[ptr SocketClient00](self.impl), family) + +proc g_socket_client_set_local_address*(self: ptr SocketClient00; address: ptr SocketAddress00) {. + importc: "g_socket_client_set_local_address", libprag.} + +proc setLocalAddress*(self: SocketClient; address: SocketAddress) = + g_socket_client_set_local_address(cast[ptr SocketClient00](self.impl), cast[ptr SocketAddress00](address.impl)) + +proc `localAddress=`*(self: SocketClient; address: SocketAddress) = + g_socket_client_set_local_address(cast[ptr SocketClient00](self.impl), cast[ptr SocketAddress00](address.impl)) + +proc g_socket_client_set_protocol*(self: ptr SocketClient00; protocol: SocketProtocol) {. + importc: "g_socket_client_set_protocol", libprag.} + +proc setProtocol*(self: SocketClient; protocol: SocketProtocol) = + g_socket_client_set_protocol(cast[ptr SocketClient00](self.impl), protocol) + +proc `protocol=`*(self: SocketClient; protocol: SocketProtocol) = + g_socket_client_set_protocol(cast[ptr SocketClient00](self.impl), protocol) + +proc g_socket_client_set_proxy_resolver*(self: ptr SocketClient00; proxyResolver: ptr ProxyResolver00) {. + importc: "g_socket_client_set_proxy_resolver", libprag.} + +proc setProxyResolver*(self: SocketClient; proxyResolver: ProxyResolver) = + g_socket_client_set_proxy_resolver(cast[ptr SocketClient00](self.impl), cast[ptr ProxyResolver00](proxyResolver.impl)) + +proc `proxyResolver=`*(self: SocketClient; proxyResolver: ProxyResolver) = + g_socket_client_set_proxy_resolver(cast[ptr SocketClient00](self.impl), cast[ptr ProxyResolver00](proxyResolver.impl)) + +proc g_socket_client_set_socket_type*(self: ptr SocketClient00; `type`: SocketType) {. + importc: "g_socket_client_set_socket_type", libprag.} + +proc setSocketType*(self: SocketClient; `type`: SocketType) = + g_socket_client_set_socket_type(cast[ptr SocketClient00](self.impl), `type`) + +proc `socketType=`*(self: SocketClient; `type`: SocketType) = + g_socket_client_set_socket_type(cast[ptr SocketClient00](self.impl), `type`) + +proc g_socket_client_set_timeout*(self: ptr SocketClient00; timeout: uint32) {. + importc: "g_socket_client_set_timeout", libprag.} + +proc setTimeout*(self: SocketClient; timeout: int) = + g_socket_client_set_timeout(cast[ptr SocketClient00](self.impl), uint32(timeout)) + +proc `timeout=`*(self: SocketClient; timeout: int) = + g_socket_client_set_timeout(cast[ptr SocketClient00](self.impl), uint32(timeout)) + +proc g_socket_client_set_tls*(self: ptr SocketClient00; tls: gboolean) {. + importc: "g_socket_client_set_tls", libprag.} + +proc setTls*(self: SocketClient; tls: bool) = + g_socket_client_set_tls(cast[ptr SocketClient00](self.impl), gboolean(tls)) + +proc `tls=`*(self: SocketClient; tls: bool) = + g_socket_client_set_tls(cast[ptr SocketClient00](self.impl), gboolean(tls)) + +proc g_socket_client_set_tls_validation_flags*(self: ptr SocketClient00; flags: TlsCertificateFlags) {. + importc: "g_socket_client_set_tls_validation_flags", libprag.} + +proc setTlsValidationFlags*(self: SocketClient; flags: TlsCertificateFlags) = + g_socket_client_set_tls_validation_flags(cast[ptr SocketClient00](self.impl), flags) + +proc `tlsValidationFlags=`*(self: SocketClient; flags: TlsCertificateFlags) = + g_socket_client_set_tls_validation_flags(cast[ptr SocketClient00](self.impl), flags) + +type + SocketClientClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + event*: proc(client: ptr SocketClient00; event: SocketClientEvent; + connectable: ptr SocketConnectable00; connection: ptr IOStream00) {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + SocketClientClass* = ref object + impl*: ptr SocketClientClass00 + +type + SocketConnectableIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + enumerate*: proc(connectable: ptr SocketConnectable00): ptr SocketAddressEnumerator00 {.cdecl.} + proxyEnumerate*: proc(connectable: ptr SocketConnectable00): ptr SocketAddressEnumerator00 {.cdecl.} + toString*: proc(connectable: ptr SocketConnectable00): cstring {.cdecl.} + SocketConnectableIface* = ref object + impl*: ptr SocketConnectableIface00 + +type + SocketConnectionClass00* {.pure.} = object + parentClass*: IOStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + SocketConnectionClass* = ref object + impl*: ptr SocketConnectionClass00 + +type + SocketControlMessageClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getSize*: proc(message: ptr SocketControlMessage00): uint64 {.cdecl.} + getLevel*: proc(message: ptr SocketControlMessage00): int32 {.cdecl.} + getType*: proc(message: ptr SocketControlMessage00): int32 {.cdecl.} + serialize*: proc(message: ptr SocketControlMessage00; data: pointer) {.cdecl.} + deserialize*: pointer + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + SocketControlMessageClass* = ref object + impl*: ptr SocketControlMessageClass00 + +type + SocketListenerPrivate00* {.pure.} = object + SocketListenerPrivate* = ref object + impl*: ptr SocketListenerPrivate00 + +type + SocketListenerEvent* {.size: sizeof(cint), pure.} = enum + binding = 0 + bound = 1 + listening = 2 + listened = 3 + +type + SocketListener* = ref object of gobject.Object + SocketListener00* = object of gobject.Object00 + priv1: ptr SocketListenerPrivate00 + +proc scEvent*(self: SocketListener; p: proc (self: ptr gobject.Object00; event: SocketListenerEvent; socket: Socket00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_socket_listener_new*(): ptr SocketListener00 {. + importc: "g_socket_listener_new", libprag.} + +proc newSocketListener*(): SocketListener = + new(result, finalizeGObject) + result.impl = g_socket_listener_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSocketListener*[T](result: var T) = + assert(result is SocketListener) + new(result, finalizeGObject) + result.impl = g_socket_listener_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_listener_accept*(self: ptr SocketListener00; sourceObject: var ptr gobject.Object00; + cancellable: ptr Cancellable00): ptr SocketConnection00 {. + importc: "g_socket_listener_accept", libprag.} + +proc accept*(self: ptr SocketListener00; sourceObject: var ptr gobject.Object00; + cancellable: ptr Cancellable00): ptr SocketConnection00 {. + importc: "g_socket_listener_accept", libprag.} + +proc g_socket_listener_accept_async*(self: ptr SocketListener00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_socket_listener_accept_async", libprag.} + +proc acceptAsync*(self: SocketListener; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_socket_listener_accept_async(cast[ptr SocketListener00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_socket_listener_accept_finish*(self: ptr SocketListener00; resu: ptr AsyncResult00; + sourceObject: var ptr gobject.Object00): ptr SocketConnection00 {. + importc: "g_socket_listener_accept_finish", libprag.} + +proc acceptFinish*(self: ptr SocketListener00; resu: ptr AsyncResult00; + sourceObject: var ptr gobject.Object00): ptr SocketConnection00 {. + importc: "g_socket_listener_accept_finish", libprag.} + +proc g_socket_listener_accept_socket*(self: ptr SocketListener00; sourceObject: var ptr gobject.Object00; + cancellable: ptr Cancellable00): ptr Socket00 {. + importc: "g_socket_listener_accept_socket", libprag.} + +proc acceptSocket*(self: ptr SocketListener00; sourceObject: var ptr gobject.Object00; + cancellable: ptr Cancellable00): ptr Socket00 {. + importc: "g_socket_listener_accept_socket", libprag.} + +proc g_socket_listener_accept_socket_async*(self: ptr SocketListener00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_socket_listener_accept_socket_async", libprag.} + +proc acceptSocketAsync*(self: SocketListener; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_socket_listener_accept_socket_async(cast[ptr SocketListener00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_socket_listener_accept_socket_finish*(self: ptr SocketListener00; resu: ptr AsyncResult00; + sourceObject: var ptr gobject.Object00): ptr Socket00 {. + importc: "g_socket_listener_accept_socket_finish", libprag.} + +proc acceptSocketFinish*(self: ptr SocketListener00; resu: ptr AsyncResult00; + sourceObject: var ptr gobject.Object00): ptr Socket00 {. + importc: "g_socket_listener_accept_socket_finish", libprag.} + +proc g_socket_listener_add_address*(self: ptr SocketListener00; address: ptr SocketAddress00; + `type`: SocketType; protocol: SocketProtocol; sourceObject: ptr gobject.Object00; effectiveAddress: var ptr SocketAddress00): gboolean {. + importc: "g_socket_listener_add_address", libprag.} + +proc addAddress*(self: ptr SocketListener00; address: ptr SocketAddress00; + `type`: SocketType; protocol: SocketProtocol; sourceObject: ptr gobject.Object00; effectiveAddress: var ptr SocketAddress00): gboolean {. + importc: "g_socket_listener_add_address", libprag.} + +proc g_socket_listener_add_any_inet_port*(self: ptr SocketListener00; sourceObject: ptr gobject.Object00): uint16 {. + importc: "g_socket_listener_add_any_inet_port", libprag.} + +proc addAnyInetPort*(self: SocketListener; sourceObject: gobject.Object): uint16 = + g_socket_listener_add_any_inet_port(cast[ptr SocketListener00](self.impl), cast[ptr gobject.Object00](sourceObject.impl)) + +proc g_socket_listener_add_inet_port*(self: ptr SocketListener00; port: uint16; sourceObject: ptr gobject.Object00): gboolean {. + importc: "g_socket_listener_add_inet_port", libprag.} + +proc addInetPort*(self: SocketListener; port: uint16; sourceObject: gobject.Object): bool = + toBool(g_socket_listener_add_inet_port(cast[ptr SocketListener00](self.impl), port, cast[ptr gobject.Object00](sourceObject.impl))) + +proc g_socket_listener_add_socket*(self: ptr SocketListener00; socket: ptr Socket00; + sourceObject: ptr gobject.Object00): gboolean {. + importc: "g_socket_listener_add_socket", libprag.} + +proc addSocket*(self: SocketListener; socket: Socket; sourceObject: gobject.Object): bool = + toBool(g_socket_listener_add_socket(cast[ptr SocketListener00](self.impl), cast[ptr Socket00](socket.impl), cast[ptr gobject.Object00](sourceObject.impl))) + +proc g_socket_listener_close*(self: ptr SocketListener00) {. + importc: "g_socket_listener_close", libprag.} + +proc close*(self: SocketListener) = + g_socket_listener_close(cast[ptr SocketListener00](self.impl)) + +proc g_socket_listener_set_backlog*(self: ptr SocketListener00; listenBacklog: int32) {. + importc: "g_socket_listener_set_backlog", libprag.} + +proc setBacklog*(self: SocketListener; listenBacklog: int) = + g_socket_listener_set_backlog(cast[ptr SocketListener00](self.impl), int32(listenBacklog)) + +proc `backlog=`*(self: SocketListener; listenBacklog: int) = + g_socket_listener_set_backlog(cast[ptr SocketListener00](self.impl), int32(listenBacklog)) + +type + SocketListenerClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + changed*: proc(listener: ptr SocketListener00) {.cdecl.} + event*: proc(listener: ptr SocketListener00; event: ptr SocketListenerEvent; + socket: ptr Socket00) {.cdecl.} + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + SocketListenerClass* = ref object + impl*: ptr SocketListenerClass00 + +type + SocketMsgFlag* {.size: sizeof(cint), pure.} = enum + oob = 1 + peek = 2 + dontroute = 3 + + SocketMsgFlags* {.size: sizeof(cint).} = set[SocketMsgFlag] + +type + SocketServicePrivate00* {.pure.} = object + SocketServicePrivate* = ref object + impl*: ptr SocketServicePrivate00 + +type + SocketService* = ref object of SocketListener + SocketService00* = object of SocketListener00 + priv2: ptr SocketServicePrivate00 + +proc scIncoming*(self: SocketService; p: proc (self: ptr gobject.Object00; connection: SocketConnection00; sourceObject: gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "incoming", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_socket_service_new*(): ptr SocketService00 {. + importc: "g_socket_service_new", libprag.} + +proc newSocketService*(): SocketService = + new(result, finalizeGObject) + result.impl = g_socket_service_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSocketService*[T](result: var T) = + assert(result is SocketService) + new(result, finalizeGObject) + result.impl = g_socket_service_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_socket_service_is_active*(self: ptr SocketService00): gboolean {. + importc: "g_socket_service_is_active", libprag.} + +proc isActive*(self: SocketService): bool = + toBool(g_socket_service_is_active(cast[ptr SocketService00](self.impl))) + +proc g_socket_service_start*(self: ptr SocketService00) {. + importc: "g_socket_service_start", libprag.} + +proc start*(self: SocketService) = + g_socket_service_start(cast[ptr SocketService00](self.impl)) + +proc g_socket_service_stop*(self: ptr SocketService00) {. + importc: "g_socket_service_stop", libprag.} + +proc stop*(self: SocketService) = + g_socket_service_stop(cast[ptr SocketService00](self.impl)) + +type + SocketServiceClass00* {.pure.} = object + parentClass*: SocketListenerClass00 + incoming*: proc(service: ptr SocketService00; connection: ptr SocketConnection00; + sourceObject: ptr gobject.Object00): gboolean {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + SocketServiceClass* = ref object + impl*: ptr SocketServiceClass00 + +type + SocketSourceFunc* = proc (socket: ptr Socket00; condition: glib.IOCondition; + userData: pointer): gboolean {.cdecl.} + +type + SrvTarget00* {.pure.} = object + SrvTarget* = ref object + impl*: ptr SrvTarget00 + +proc g_srv_target_new*(hostname: cstring; port: uint16; priority: uint16; + weight: uint16): ptr SrvTarget00 {. + importc: "g_srv_target_new", libprag.} + +proc newSrvTarget*(hostname: string; port: uint16; priority: uint16; + weight: uint16): SrvTarget = + new(result) + result.impl = g_srv_target_new(cstring(hostname), port, priority, weight) + +proc initSrvTarget*[T](result: var T; hostname: string; port: uint16; priority: uint16; + weight: uint16) = + assert(result is SrvTarget) + new(result) + result.impl = g_srv_target_new(cstring(hostname), port, priority, weight) + +proc g_srv_target_copy*(self: ptr SrvTarget00): ptr SrvTarget00 {. + importc: "g_srv_target_copy", libprag.} + +proc copy*(self: SrvTarget): SrvTarget = + new(result) + result.impl = g_srv_target_copy(cast[ptr SrvTarget00](self.impl)) + +proc g_srv_target_free*(self: ptr SrvTarget00) {. + importc: "g_srv_target_free", libprag.} + +proc free*(self: SrvTarget) = + g_srv_target_free(cast[ptr SrvTarget00](self.impl)) + +proc g_srv_target_get_hostname*(self: ptr SrvTarget00): cstring {. + importc: "g_srv_target_get_hostname", libprag.} + +proc getHostname*(self: SrvTarget): string = + let resul0 = g_srv_target_get_hostname(cast[ptr SrvTarget00](self.impl)) + result = $resul0 + +proc hostname*(self: SrvTarget): string = + let resul0 = g_srv_target_get_hostname(cast[ptr SrvTarget00](self.impl)) + result = $resul0 + +proc g_srv_target_get_port*(self: ptr SrvTarget00): uint16 {. + importc: "g_srv_target_get_port", libprag.} + +proc getPort*(self: SrvTarget): uint16 = + g_srv_target_get_port(cast[ptr SrvTarget00](self.impl)) + +proc port*(self: SrvTarget): uint16 = + g_srv_target_get_port(cast[ptr SrvTarget00](self.impl)) + +proc g_srv_target_get_priority*(self: ptr SrvTarget00): uint16 {. + importc: "g_srv_target_get_priority", libprag.} + +proc getPriority*(self: SrvTarget): uint16 = + g_srv_target_get_priority(cast[ptr SrvTarget00](self.impl)) + +proc priority*(self: SrvTarget): uint16 = + g_srv_target_get_priority(cast[ptr SrvTarget00](self.impl)) + +proc g_srv_target_get_weight*(self: ptr SrvTarget00): uint16 {. + importc: "g_srv_target_get_weight", libprag.} + +proc getWeight*(self: SrvTarget): uint16 = + g_srv_target_get_weight(cast[ptr SrvTarget00](self.impl)) + +proc weight*(self: SrvTarget): uint16 = + g_srv_target_get_weight(cast[ptr SrvTarget00](self.impl)) + +type + StaticResource00* {.pure.} = object + data*: ptr uint8 + dataLen*: uint64 + resource*: ptr Resource00 + next*: ptr StaticResource00 + padding*: pointer + StaticResource* = ref object + impl*: ptr StaticResource00 + +proc g_static_resource_fini*(self: ptr StaticResource00) {. + importc: "g_static_resource_fini", libprag.} + +proc fini*(self: StaticResource) = + g_static_resource_fini(cast[ptr StaticResource00](self.impl)) + +proc g_static_resource_get_resource*(self: ptr StaticResource00): ptr Resource00 {. + importc: "g_static_resource_get_resource", libprag.} + +proc getResource*(self: StaticResource): Resource = + new(result) + result.impl = g_static_resource_get_resource(cast[ptr StaticResource00](self.impl)) + +proc resource*(self: StaticResource): Resource = + new(result) + result.impl = g_static_resource_get_resource(cast[ptr StaticResource00](self.impl)) + +proc g_static_resource_init*(self: ptr StaticResource00) {. + importc: "g_static_resource_init", libprag.} + +proc init*(self: StaticResource) = + g_static_resource_init(cast[ptr StaticResource00](self.impl)) + +type + Subprocess* = ref object of gobject.Object + Subprocess00* = object of gobject.Object00 + +proc g_subprocess_communicate*(self: ptr Subprocess00; stdinBuf: ptr glib.Bytes00; + cancellable: ptr Cancellable00; stdoutBuf: var ptr glib.Bytes00; stderrBuf: var ptr glib.Bytes00): gboolean {. + importc: "g_subprocess_communicate", libprag.} + +proc communicate*(self: ptr Subprocess00; stdinBuf: ptr glib.Bytes00; + cancellable: ptr Cancellable00; stdoutBuf: var ptr glib.Bytes00; stderrBuf: var ptr glib.Bytes00): gboolean {. + importc: "g_subprocess_communicate", libprag.} + +proc g_subprocess_communicate_async*(self: ptr Subprocess00; stdinBuf: ptr glib.Bytes00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_subprocess_communicate_async", libprag.} + +proc communicateAsync*(self: Subprocess; stdinBuf: glib.Bytes; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_subprocess_communicate_async(cast[ptr Subprocess00](self.impl), cast[ptr glib.Bytes00](stdinBuf.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_subprocess_communicate_finish*(self: ptr Subprocess00; resu: ptr AsyncResult00; stdoutBuf: var ptr glib.Bytes00; + stderrBuf: var ptr glib.Bytes00): gboolean {. + importc: "g_subprocess_communicate_finish", libprag.} + +proc communicateFinish*(self: ptr Subprocess00; resu: ptr AsyncResult00; stdoutBuf: var ptr glib.Bytes00; + stderrBuf: var ptr glib.Bytes00): gboolean {. + importc: "g_subprocess_communicate_finish", libprag.} + +proc g_subprocess_communicate_utf8*(self: ptr Subprocess00; stdinBuf: cstring; cancellable: ptr Cancellable00; + stdoutBuf: var cstring; stderrBuf: var cstring): gboolean {. + importc: "g_subprocess_communicate_utf8", libprag.} + +proc communicateUtf8*(self: Subprocess; stdinBuf: string; cancellable: Cancellable; + stdoutBuf: var string; stderrBuf: var string): bool = + var stdoutBuf_00 = cstring(stdoutBuf) + var stderrBuf_00 = cstring(stderrBuf) + result = toBool(g_subprocess_communicate_utf8(cast[ptr Subprocess00](self.impl), cstring(stdinBuf), cast[ptr Cancellable00](cancellable.impl), stdoutBuf_00, stderrBuf_00)) + stdoutBuf = $(stdoutBuf_00) + stderrBuf = $(stderrBuf_00) + +proc g_subprocess_communicate_utf8_async*(self: ptr Subprocess00; stdinBuf: cstring; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_subprocess_communicate_utf8_async", libprag.} + +proc communicateUtf8Async*(self: Subprocess; stdinBuf: string; cancellable: Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + g_subprocess_communicate_utf8_async(cast[ptr Subprocess00](self.impl), cstring(stdinBuf), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_subprocess_communicate_utf8_finish*(self: ptr Subprocess00; resu: ptr AsyncResult00; stdoutBuf: var cstring; + stderrBuf: var cstring): gboolean {. + importc: "g_subprocess_communicate_utf8_finish", libprag.} + +proc communicateUtf8Finish*(self: Subprocess; resu: AsyncResult; stdoutBuf: var string; + stderrBuf: var string): bool = + var stdoutBuf_00 = cstring(stdoutBuf) + var stderrBuf_00 = cstring(stderrBuf) + result = toBool(g_subprocess_communicate_utf8_finish(cast[ptr Subprocess00](self.impl), cast[ptr AsyncResult00](resu.impl), stdoutBuf_00, stderrBuf_00)) + stdoutBuf = $(stdoutBuf_00) + stderrBuf = $(stderrBuf_00) + +proc g_subprocess_force_exit*(self: ptr Subprocess00) {. + importc: "g_subprocess_force_exit", libprag.} + +proc forceExit*(self: Subprocess) = + g_subprocess_force_exit(cast[ptr Subprocess00](self.impl)) + +proc g_subprocess_get_exit_status*(self: ptr Subprocess00): int32 {. + importc: "g_subprocess_get_exit_status", libprag.} + +proc getExitStatus*(self: Subprocess): int = + int(g_subprocess_get_exit_status(cast[ptr Subprocess00](self.impl))) + +proc exitStatus*(self: Subprocess): int = + int(g_subprocess_get_exit_status(cast[ptr Subprocess00](self.impl))) + +proc g_subprocess_get_identifier*(self: ptr Subprocess00): cstring {. + importc: "g_subprocess_get_identifier", libprag.} + +proc getIdentifier*(self: Subprocess): string = + let resul0 = g_subprocess_get_identifier(cast[ptr Subprocess00](self.impl)) + result = $resul0 + +proc identifier*(self: Subprocess): string = + let resul0 = g_subprocess_get_identifier(cast[ptr Subprocess00](self.impl)) + result = $resul0 + +proc g_subprocess_get_if_exited*(self: ptr Subprocess00): gboolean {. + importc: "g_subprocess_get_if_exited", libprag.} + +proc getIfExited*(self: Subprocess): bool = + toBool(g_subprocess_get_if_exited(cast[ptr Subprocess00](self.impl))) + +proc ifExited*(self: Subprocess): bool = + toBool(g_subprocess_get_if_exited(cast[ptr Subprocess00](self.impl))) + +proc g_subprocess_get_if_signaled*(self: ptr Subprocess00): gboolean {. + importc: "g_subprocess_get_if_signaled", libprag.} + +proc getIfSignaled*(self: Subprocess): bool = + toBool(g_subprocess_get_if_signaled(cast[ptr Subprocess00](self.impl))) + +proc ifSignaled*(self: Subprocess): bool = + toBool(g_subprocess_get_if_signaled(cast[ptr Subprocess00](self.impl))) + +proc g_subprocess_get_status*(self: ptr Subprocess00): int32 {. + importc: "g_subprocess_get_status", libprag.} + +proc getStatus*(self: Subprocess): int = + int(g_subprocess_get_status(cast[ptr Subprocess00](self.impl))) + +proc status*(self: Subprocess): int = + int(g_subprocess_get_status(cast[ptr Subprocess00](self.impl))) + +proc g_subprocess_get_stderr_pipe*(self: ptr Subprocess00): ptr InputStream00 {. + importc: "g_subprocess_get_stderr_pipe", libprag.} + +proc getStderrPipe*(self: Subprocess): InputStream = + let gobj = g_subprocess_get_stderr_pipe(cast[ptr Subprocess00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc stderrPipe*(self: Subprocess): InputStream = + let gobj = g_subprocess_get_stderr_pipe(cast[ptr Subprocess00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_subprocess_get_stdin_pipe*(self: ptr Subprocess00): ptr OutputStream00 {. + importc: "g_subprocess_get_stdin_pipe", libprag.} + +proc getStdinPipe*(self: Subprocess): OutputStream = + let gobj = g_subprocess_get_stdin_pipe(cast[ptr Subprocess00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[OutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc stdinPipe*(self: Subprocess): OutputStream = + let gobj = g_subprocess_get_stdin_pipe(cast[ptr Subprocess00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[OutputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_subprocess_get_stdout_pipe*(self: ptr Subprocess00): ptr InputStream00 {. + importc: "g_subprocess_get_stdout_pipe", libprag.} + +proc getStdoutPipe*(self: Subprocess): InputStream = + let gobj = g_subprocess_get_stdout_pipe(cast[ptr Subprocess00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc stdoutPipe*(self: Subprocess): InputStream = + let gobj = g_subprocess_get_stdout_pipe(cast[ptr Subprocess00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_subprocess_get_successful*(self: ptr Subprocess00): gboolean {. + importc: "g_subprocess_get_successful", libprag.} + +proc getSuccessful*(self: Subprocess): bool = + toBool(g_subprocess_get_successful(cast[ptr Subprocess00](self.impl))) + +proc successful*(self: Subprocess): bool = + toBool(g_subprocess_get_successful(cast[ptr Subprocess00](self.impl))) + +proc g_subprocess_get_term_sig*(self: ptr Subprocess00): int32 {. + importc: "g_subprocess_get_term_sig", libprag.} + +proc getTermSig*(self: Subprocess): int = + int(g_subprocess_get_term_sig(cast[ptr Subprocess00](self.impl))) + +proc termSig*(self: Subprocess): int = + int(g_subprocess_get_term_sig(cast[ptr Subprocess00](self.impl))) + +proc g_subprocess_send_signal*(self: ptr Subprocess00; signalNum: int32) {. + importc: "g_subprocess_send_signal", libprag.} + +proc sendSignal*(self: Subprocess; signalNum: int) = + g_subprocess_send_signal(cast[ptr Subprocess00](self.impl), int32(signalNum)) + +proc g_subprocess_wait*(self: ptr Subprocess00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_subprocess_wait", libprag.} + +proc wait*(self: Subprocess; cancellable: Cancellable): bool = + toBool(g_subprocess_wait(cast[ptr Subprocess00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_subprocess_wait_async*(self: ptr Subprocess00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_subprocess_wait_async", libprag.} + +proc waitAsync*(self: Subprocess; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_subprocess_wait_async(cast[ptr Subprocess00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_subprocess_wait_check*(self: ptr Subprocess00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_subprocess_wait_check", libprag.} + +proc waitCheck*(self: Subprocess; cancellable: Cancellable): bool = + toBool(g_subprocess_wait_check(cast[ptr Subprocess00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_subprocess_wait_check_async*(self: ptr Subprocess00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_subprocess_wait_check_async", libprag.} + +proc waitCheckAsync*(self: Subprocess; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_subprocess_wait_check_async(cast[ptr Subprocess00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_subprocess_wait_check_finish*(self: ptr Subprocess00; resu: ptr AsyncResult00): gboolean {. + importc: "g_subprocess_wait_check_finish", libprag.} + +proc waitCheckFinish*(self: Subprocess; resu: AsyncResult): bool = + toBool(g_subprocess_wait_check_finish(cast[ptr Subprocess00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_subprocess_wait_finish*(self: ptr Subprocess00; resu: ptr AsyncResult00): gboolean {. + importc: "g_subprocess_wait_finish", libprag.} + +proc waitFinish*(self: Subprocess; resu: AsyncResult): bool = + toBool(g_subprocess_wait_finish(cast[ptr Subprocess00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +type + SubprocessFlag* {.size: sizeof(cint), pure.} = enum + stdinPipe = 1 + stdinInherit = 2 + stdoutPipe = 3 + stdoutSilence = 4 + stderrPipe = 5 + stderrSilence = 6 + stderrMerge = 7 + inheritFds = 8 + + SubprocessFlags* {.size: sizeof(cint).} = set[SubprocessFlag] + +proc g_subprocess_newv*(argv: cstringArray; flags: SubprocessFlags): ptr Subprocess00 {. + importc: "g_subprocess_newv", libprag.} + +proc newSubprocess*(argv: cstringArray; flags: SubprocessFlags): Subprocess = + new(result, finalizeGObject) + result.impl = g_subprocess_newv(argv, flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSubprocess*[T](result: var T; argv: cstringArray; flags: SubprocessFlags) = + assert(result is Subprocess) + new(result, finalizeGObject) + result.impl = g_subprocess_newv(argv, flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SubprocessLauncher* = ref object of gobject.Object + SubprocessLauncher00* = object of gobject.Object00 + +proc g_subprocess_launcher_new*(flags: SubprocessFlags): ptr SubprocessLauncher00 {. + importc: "g_subprocess_launcher_new", libprag.} + +proc newSubprocessLauncher*(flags: SubprocessFlags): SubprocessLauncher = + new(result, finalizeGObject) + result.impl = g_subprocess_launcher_new(flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSubprocessLauncher*[T](result: var T; flags: SubprocessFlags) = + assert(result is SubprocessLauncher) + new(result, finalizeGObject) + result.impl = g_subprocess_launcher_new(flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_subprocess_launcher_getenv*(self: ptr SubprocessLauncher00; variable: cstring): cstring {. + importc: "g_subprocess_launcher_getenv", libprag.} + +proc getenv*(self: SubprocessLauncher; variable: string): string = + let resul0 = g_subprocess_launcher_getenv(cast[ptr SubprocessLauncher00](self.impl), cstring(variable)) + result = $resul0 + +proc env*(self: SubprocessLauncher; variable: string): string = + let resul0 = g_subprocess_launcher_getenv(cast[ptr SubprocessLauncher00](self.impl), cstring(variable)) + result = $resul0 + +proc g_subprocess_launcher_set_child_setup*(self: ptr SubprocessLauncher00; childSetup: SpawnChildSetupFunc; + userData: pointer; destroyNotify: DestroyNotify) {. + importc: "g_subprocess_launcher_set_child_setup", libprag.} + +proc setChildSetup*(self: SubprocessLauncher; childSetup: SpawnChildSetupFunc; + userData: pointer; destroyNotify: DestroyNotify) = + g_subprocess_launcher_set_child_setup(cast[ptr SubprocessLauncher00](self.impl), childSetup, userData, destroyNotify) + +proc g_subprocess_launcher_set_cwd*(self: ptr SubprocessLauncher00; cwd: ucstring) {. + importc: "g_subprocess_launcher_set_cwd", libprag.} + +proc setCwd*(self: SubprocessLauncher; cwd: ucstring) = + g_subprocess_launcher_set_cwd(cast[ptr SubprocessLauncher00](self.impl), cwd) + +proc `cwd=`*(self: SubprocessLauncher; cwd: ucstring) = + g_subprocess_launcher_set_cwd(cast[ptr SubprocessLauncher00](self.impl), cwd) + +proc g_subprocess_launcher_set_environ*(self: ptr SubprocessLauncher00; env: cstringArray) {. + importc: "g_subprocess_launcher_set_environ", libprag.} + +proc setEnviron*(self: SubprocessLauncher; env: cstringArray) = + g_subprocess_launcher_set_environ(cast[ptr SubprocessLauncher00](self.impl), env) + +proc `environ=`*(self: SubprocessLauncher; env: cstringArray) = + g_subprocess_launcher_set_environ(cast[ptr SubprocessLauncher00](self.impl), env) + +proc g_subprocess_launcher_set_flags*(self: ptr SubprocessLauncher00; flags: SubprocessFlags) {. + importc: "g_subprocess_launcher_set_flags", libprag.} + +proc setFlags*(self: SubprocessLauncher; flags: SubprocessFlags) = + g_subprocess_launcher_set_flags(cast[ptr SubprocessLauncher00](self.impl), flags) + +proc `flags=`*(self: SubprocessLauncher; flags: SubprocessFlags) = + g_subprocess_launcher_set_flags(cast[ptr SubprocessLauncher00](self.impl), flags) + +proc g_subprocess_launcher_set_stderr_file_path*(self: ptr SubprocessLauncher00; path: ucstring) {. + importc: "g_subprocess_launcher_set_stderr_file_path", libprag.} + +proc setStderrFilePath*(self: SubprocessLauncher; path: ucstring) = + g_subprocess_launcher_set_stderr_file_path(cast[ptr SubprocessLauncher00](self.impl), path) + +proc `stderrFilePath=`*(self: SubprocessLauncher; path: ucstring) = + g_subprocess_launcher_set_stderr_file_path(cast[ptr SubprocessLauncher00](self.impl), path) + +proc g_subprocess_launcher_set_stdin_file_path*(self: ptr SubprocessLauncher00; path: cstring) {. + importc: "g_subprocess_launcher_set_stdin_file_path", libprag.} + +proc setStdinFilePath*(self: SubprocessLauncher; path: string) = + g_subprocess_launcher_set_stdin_file_path(cast[ptr SubprocessLauncher00](self.impl), cstring(path)) + +proc `stdinFilePath=`*(self: SubprocessLauncher; path: string) = + g_subprocess_launcher_set_stdin_file_path(cast[ptr SubprocessLauncher00](self.impl), cstring(path)) + +proc g_subprocess_launcher_set_stdout_file_path*(self: ptr SubprocessLauncher00; path: ucstring) {. + importc: "g_subprocess_launcher_set_stdout_file_path", libprag.} + +proc setStdoutFilePath*(self: SubprocessLauncher; path: ucstring) = + g_subprocess_launcher_set_stdout_file_path(cast[ptr SubprocessLauncher00](self.impl), path) + +proc `stdoutFilePath=`*(self: SubprocessLauncher; path: ucstring) = + g_subprocess_launcher_set_stdout_file_path(cast[ptr SubprocessLauncher00](self.impl), path) + +proc g_subprocess_launcher_setenv*(self: ptr SubprocessLauncher00; variable: cstring; + value: cstring; overwrite: gboolean) {. + importc: "g_subprocess_launcher_setenv", libprag.} + +proc setenv*(self: SubprocessLauncher; variable: string; value: string; + overwrite: bool) = + g_subprocess_launcher_setenv(cast[ptr SubprocessLauncher00](self.impl), cstring(variable), cstring(value), gboolean(overwrite)) + +proc g_subprocess_launcher_spawnv*(self: ptr SubprocessLauncher00; argv: cstringArray): ptr Subprocess00 {. + importc: "g_subprocess_launcher_spawnv", libprag.} + +proc spawnv*(self: SubprocessLauncher; argv: cstringArray): Subprocess = + let gobj = g_subprocess_launcher_spawnv(cast[ptr SubprocessLauncher00](self.impl), argv) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Subprocess](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_subprocess_launcher_take_fd*(self: ptr SubprocessLauncher00; sourceFd: int32; targetFd: int32) {. + importc: "g_subprocess_launcher_take_fd", libprag.} + +proc takeFd*(self: SubprocessLauncher; sourceFd: int; targetFd: int) = + g_subprocess_launcher_take_fd(cast[ptr SubprocessLauncher00](self.impl), int32(sourceFd), int32(targetFd)) + +proc g_subprocess_launcher_take_stderr_fd*(self: ptr SubprocessLauncher00; fd: int32) {. + importc: "g_subprocess_launcher_take_stderr_fd", libprag.} + +proc takeStderrFd*(self: SubprocessLauncher; fd: int) = + g_subprocess_launcher_take_stderr_fd(cast[ptr SubprocessLauncher00](self.impl), int32(fd)) + +proc g_subprocess_launcher_take_stdin_fd*(self: ptr SubprocessLauncher00; fd: int32) {. + importc: "g_subprocess_launcher_take_stdin_fd", libprag.} + +proc takeStdinFd*(self: SubprocessLauncher; fd: int) = + g_subprocess_launcher_take_stdin_fd(cast[ptr SubprocessLauncher00](self.impl), int32(fd)) + +proc g_subprocess_launcher_take_stdout_fd*(self: ptr SubprocessLauncher00; fd: int32) {. + importc: "g_subprocess_launcher_take_stdout_fd", libprag.} + +proc takeStdoutFd*(self: SubprocessLauncher; fd: int) = + g_subprocess_launcher_take_stdout_fd(cast[ptr SubprocessLauncher00](self.impl), int32(fd)) + +proc g_subprocess_launcher_unsetenv*(self: ptr SubprocessLauncher00; variable: cstring) {. + importc: "g_subprocess_launcher_unsetenv", libprag.} + +proc unsetenv*(self: SubprocessLauncher; variable: string) = + g_subprocess_launcher_unsetenv(cast[ptr SubprocessLauncher00](self.impl), cstring(variable)) + +const TLS_BACKEND_EXTENSION_POINT_NAME* = "gio-tls-backend" + +const TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT* = "1.3.6.1.5.5.7.3.2" + +const TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER* = "1.3.6.1.5.5.7.3.1" + +type + Task* = ref object of gobject.Object + Task00* = object of gobject.Object00 + +proc g_task_new*(sourceObject: ptr gobject.Object00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; callbackData: pointer): ptr Task00 {. + importc: "g_task_new", libprag.} + +proc newTask*(sourceObject: gobject.Object; cancellable: Cancellable; + callback: AsyncReadyCallback; callbackData: pointer): Task = + new(result, finalizeGObject) + result.impl = g_task_new(cast[ptr gobject.Object00](sourceObject.impl), cast[ptr Cancellable00](cancellable.impl), callback, callbackData) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTask*[T](result: var T; sourceObject: gobject.Object; cancellable: Cancellable; + callback: AsyncReadyCallback; callbackData: pointer) = + assert(result is Task) + new(result, finalizeGObject) + result.impl = g_task_new(cast[ptr gobject.Object00](sourceObject.impl), cast[ptr Cancellable00](cancellable.impl), callback, callbackData) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_task_is_valid*(resu: ptr AsyncResult00; sourceObject: ptr gobject.Object00): gboolean {. + importc: "g_task_is_valid", libprag.} + +proc isValid*(resu: AsyncResult; sourceObject: gobject.Object): bool = + toBool(g_task_is_valid(cast[ptr AsyncResult00](resu.impl), cast[ptr gobject.Object00](sourceObject.impl))) + +proc g_task_report_error*(sourceObject: ptr gobject.Object00; callback: AsyncReadyCallback; + callbackData: pointer; sourceTag: pointer; error: ptr Error00) {. + importc: "g_task_report_error", libprag.} + +proc reportError*(sourceObject: gobject.Object; callback: AsyncReadyCallback; + callbackData: pointer; sourceTag: pointer; error: ptr Error00) = + g_task_report_error(cast[ptr gobject.Object00](sourceObject.impl), callback, callbackData, sourceTag, error) + +proc g_task_get_cancellable*(self: ptr Task00): ptr Cancellable00 {. + importc: "g_task_get_cancellable", libprag.} + +proc getCancellable*(self: Task): Cancellable = + let gobj = g_task_get_cancellable(cast[ptr Task00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Cancellable](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc cancellable*(self: Task): Cancellable = + let gobj = g_task_get_cancellable(cast[ptr Task00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Cancellable](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_task_get_check_cancellable*(self: ptr Task00): gboolean {. + importc: "g_task_get_check_cancellable", libprag.} + +proc getCheckCancellable*(self: Task): bool = + toBool(g_task_get_check_cancellable(cast[ptr Task00](self.impl))) + +proc checkCancellable*(self: Task): bool = + toBool(g_task_get_check_cancellable(cast[ptr Task00](self.impl))) + +proc g_task_get_completed*(self: ptr Task00): gboolean {. + importc: "g_task_get_completed", libprag.} + +proc getCompleted*(self: Task): bool = + toBool(g_task_get_completed(cast[ptr Task00](self.impl))) + +proc completed*(self: Task): bool = + toBool(g_task_get_completed(cast[ptr Task00](self.impl))) + +proc g_task_get_context*(self: ptr Task00): ptr glib.MainContext00 {. + importc: "g_task_get_context", libprag.} + +proc getContext*(self: Task): glib.MainContext = + new(result) + result.impl = g_task_get_context(cast[ptr Task00](self.impl)) + +proc context*(self: Task): glib.MainContext = + new(result) + result.impl = g_task_get_context(cast[ptr Task00](self.impl)) + +proc g_task_get_priority*(self: ptr Task00): int32 {. + importc: "g_task_get_priority", libprag.} + +proc getPriority*(self: Task): int = + int(g_task_get_priority(cast[ptr Task00](self.impl))) + +proc priority*(self: Task): int = + int(g_task_get_priority(cast[ptr Task00](self.impl))) + +proc g_task_get_return_on_cancel*(self: ptr Task00): gboolean {. + importc: "g_task_get_return_on_cancel", libprag.} + +proc getReturnOnCancel*(self: Task): bool = + toBool(g_task_get_return_on_cancel(cast[ptr Task00](self.impl))) + +proc returnOnCancel*(self: Task): bool = + toBool(g_task_get_return_on_cancel(cast[ptr Task00](self.impl))) + +proc g_task_get_source_object*(self: ptr Task00): ptr gobject.Object00 {. + importc: "g_task_get_source_object", libprag.} + +proc getSourceObject*(self: Task): gobject.Object = + let gobj = g_task_get_source_object(cast[ptr Task00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc sourceObject*(self: Task): gobject.Object = + let gobj = g_task_get_source_object(cast[ptr Task00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_task_get_source_tag*(self: ptr Task00): pointer {. + importc: "g_task_get_source_tag", libprag.} + +proc getSourceTag*(self: Task): pointer = + g_task_get_source_tag(cast[ptr Task00](self.impl)) + +proc sourceTag*(self: Task): pointer = + g_task_get_source_tag(cast[ptr Task00](self.impl)) + +proc g_task_get_task_data*(self: ptr Task00): pointer {. + importc: "g_task_get_task_data", libprag.} + +proc getTaskData*(self: Task): pointer = + g_task_get_task_data(cast[ptr Task00](self.impl)) + +proc taskData*(self: Task): pointer = + g_task_get_task_data(cast[ptr Task00](self.impl)) + +proc g_task_had_error*(self: ptr Task00): gboolean {. + importc: "g_task_had_error", libprag.} + +proc hadError*(self: Task): bool = + toBool(g_task_had_error(cast[ptr Task00](self.impl))) + +proc g_task_propagate_boolean*(self: ptr Task00): gboolean {. + importc: "g_task_propagate_boolean", libprag.} + +proc propagateBoolean*(self: Task): bool = + toBool(g_task_propagate_boolean(cast[ptr Task00](self.impl))) + +proc g_task_propagate_int*(self: ptr Task00): int64 {. + importc: "g_task_propagate_int", libprag.} + +proc propagateInt*(self: Task): int64 = + g_task_propagate_int(cast[ptr Task00](self.impl)) + +proc g_task_propagate_pointer*(self: ptr Task00): pointer {. + importc: "g_task_propagate_pointer", libprag.} + +proc propagatePointer*(self: Task): pointer = + g_task_propagate_pointer(cast[ptr Task00](self.impl)) + +proc g_task_return_boolean*(self: ptr Task00; resu: gboolean) {. + importc: "g_task_return_boolean", libprag.} + +proc returnBoolean*(self: Task; resu: bool) = + g_task_return_boolean(cast[ptr Task00](self.impl), gboolean(resu)) + +proc g_task_return_error*(self: ptr Task00; error: ptr Error00) {. + importc: "g_task_return_error", libprag.} + +proc returnError*(self: Task; error: ptr Error00) = + g_task_return_error(cast[ptr Task00](self.impl), error) + +proc g_task_return_error_if_cancelled*(self: ptr Task00): gboolean {. + importc: "g_task_return_error_if_cancelled", libprag.} + +proc returnErrorIfCancelled*(self: Task): bool = + toBool(g_task_return_error_if_cancelled(cast[ptr Task00](self.impl))) + +proc g_task_return_int*(self: ptr Task00; resu: int64) {. + importc: "g_task_return_int", libprag.} + +proc returnInt*(self: Task; resu: int64) = + g_task_return_int(cast[ptr Task00](self.impl), resu) + +proc g_task_return_pointer*(self: ptr Task00; resu: pointer; resultDestroy: DestroyNotify) {. + importc: "g_task_return_pointer", libprag.} + +proc returnPointer*(self: Task; resu: pointer; resultDestroy: DestroyNotify) = + g_task_return_pointer(cast[ptr Task00](self.impl), resu, resultDestroy) + +proc g_task_set_check_cancellable*(self: ptr Task00; checkCancellable: gboolean) {. + importc: "g_task_set_check_cancellable", libprag.} + +proc setCheckCancellable*(self: Task; checkCancellable: bool) = + g_task_set_check_cancellable(cast[ptr Task00](self.impl), gboolean(checkCancellable)) + +proc `checkCancellable=`*(self: Task; checkCancellable: bool) = + g_task_set_check_cancellable(cast[ptr Task00](self.impl), gboolean(checkCancellable)) + +proc g_task_set_priority*(self: ptr Task00; priority: int32) {. + importc: "g_task_set_priority", libprag.} + +proc setPriority*(self: Task; priority: int) = + g_task_set_priority(cast[ptr Task00](self.impl), int32(priority)) + +proc `priority=`*(self: Task; priority: int) = + g_task_set_priority(cast[ptr Task00](self.impl), int32(priority)) + +proc g_task_set_return_on_cancel*(self: ptr Task00; returnOnCancel: gboolean): gboolean {. + importc: "g_task_set_return_on_cancel", libprag.} + +proc setReturnOnCancel*(self: Task; returnOnCancel: bool): bool = + toBool(g_task_set_return_on_cancel(cast[ptr Task00](self.impl), gboolean(returnOnCancel))) + +proc `returnOnCancel=`*(self: Task; returnOnCancel: bool): bool = + toBool(g_task_set_return_on_cancel(cast[ptr Task00](self.impl), gboolean(returnOnCancel))) + +proc g_task_set_source_tag*(self: ptr Task00; sourceTag: pointer) {. + importc: "g_task_set_source_tag", libprag.} + +proc setSourceTag*(self: Task; sourceTag: pointer) = + g_task_set_source_tag(cast[ptr Task00](self.impl), sourceTag) + +proc `sourceTag=`*(self: Task; sourceTag: pointer) = + g_task_set_source_tag(cast[ptr Task00](self.impl), sourceTag) + +proc g_task_set_task_data*(self: ptr Task00; taskData: pointer; taskDataDestroy: DestroyNotify) {. + importc: "g_task_set_task_data", libprag.} + +proc setTaskData*(self: Task; taskData: pointer; taskDataDestroy: DestroyNotify) = + g_task_set_task_data(cast[ptr Task00](self.impl), taskData, taskDataDestroy) + +type + TaskClass00* {.pure.} = object + TaskClass* = ref object + impl*: ptr TaskClass00 + +type + TaskThreadFunc* = proc (task: ptr Task00; sourceObject: ptr gobject.Object00; + taskData: pointer; cancellable: ptr Cancellable00) {.cdecl.} + +type + TcpConnectionPrivate00* {.pure.} = object + TcpConnectionPrivate* = ref object + impl*: ptr TcpConnectionPrivate00 + +type + TcpConnection* = ref object of SocketConnection + TcpConnection00* = object of SocketConnection00 + priv3: ptr TcpConnectionPrivate00 + +proc g_tcp_connection_get_graceful_disconnect*(self: ptr TcpConnection00): gboolean {. + importc: "g_tcp_connection_get_graceful_disconnect", libprag.} + +proc getGracefulDisconnect*(self: TcpConnection): bool = + toBool(g_tcp_connection_get_graceful_disconnect(cast[ptr TcpConnection00](self.impl))) + +proc gracefulDisconnect*(self: TcpConnection): bool = + toBool(g_tcp_connection_get_graceful_disconnect(cast[ptr TcpConnection00](self.impl))) + +proc g_tcp_connection_set_graceful_disconnect*(self: ptr TcpConnection00; gracefulDisconnect: gboolean) {. + importc: "g_tcp_connection_set_graceful_disconnect", libprag.} + +proc setGracefulDisconnect*(self: TcpConnection; gracefulDisconnect: bool) = + g_tcp_connection_set_graceful_disconnect(cast[ptr TcpConnection00](self.impl), gboolean(gracefulDisconnect)) + +proc `gracefulDisconnect=`*(self: TcpConnection; gracefulDisconnect: bool) = + g_tcp_connection_set_graceful_disconnect(cast[ptr TcpConnection00](self.impl), gboolean(gracefulDisconnect)) + +type + TcpConnectionClass00* {.pure.} = object + parentClass*: SocketConnectionClass00 + TcpConnectionClass* = ref object + impl*: ptr TcpConnectionClass00 + +type + TcpWrapperConnectionPrivate00* {.pure.} = object + TcpWrapperConnectionPrivate* = ref object + impl*: ptr TcpWrapperConnectionPrivate00 + +type + TcpWrapperConnection* = ref object of TcpConnection + TcpWrapperConnection00* = object of TcpConnection00 + priv4: ptr TcpWrapperConnectionPrivate00 + +proc g_tcp_wrapper_connection_new*(baseIoStream: ptr IOStream00; socket: ptr Socket00): ptr TcpWrapperConnection00 {. + importc: "g_tcp_wrapper_connection_new", libprag.} + +proc newTcpWrapperConnection*(baseIoStream: IOStream; socket: Socket): TcpWrapperConnection = + new(result, finalizeGObject) + result.impl = g_tcp_wrapper_connection_new(cast[ptr IOStream00](baseIoStream.impl), cast[ptr Socket00](socket.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTcpWrapperConnection*[T](result: var T; baseIoStream: IOStream; socket: Socket) = + assert(result is TcpWrapperConnection) + new(result, finalizeGObject) + result.impl = g_tcp_wrapper_connection_new(cast[ptr IOStream00](baseIoStream.impl), cast[ptr Socket00](socket.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tcp_wrapper_connection_get_base_io_stream*(self: ptr TcpWrapperConnection00): ptr IOStream00 {. + importc: "g_tcp_wrapper_connection_get_base_io_stream", libprag.} + +proc getBaseIoStream*(self: TcpWrapperConnection): IOStream = + let gobj = g_tcp_wrapper_connection_get_base_io_stream(cast[ptr TcpWrapperConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc baseIoStream*(self: TcpWrapperConnection): IOStream = + let gobj = g_tcp_wrapper_connection_get_base_io_stream(cast[ptr TcpWrapperConnection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + TcpWrapperConnectionClass00* {.pure.} = object + parentClass*: TcpConnectionClass00 + TcpWrapperConnectionClass* = ref object + impl*: ptr TcpWrapperConnectionClass00 + +type + TestDBus* = ref object of gobject.Object + TestDBus00* = object of gobject.Object00 + +proc g_test_dbus_unset*() {. + importc: "g_test_dbus_unset", libprag.} + +proc unset*() {. + importc: "g_test_dbus_unset", libprag.} + +proc g_test_dbus_add_service_dir*(self: ptr TestDBus00; path: cstring) {. + importc: "g_test_dbus_add_service_dir", libprag.} + +proc addServiceDir*(self: TestDBus; path: string) = + g_test_dbus_add_service_dir(cast[ptr TestDBus00](self.impl), cstring(path)) + +proc g_test_dbus_down*(self: ptr TestDBus00) {. + importc: "g_test_dbus_down", libprag.} + +proc down*(self: TestDBus) = + g_test_dbus_down(cast[ptr TestDBus00](self.impl)) + +proc g_test_dbus_get_bus_address*(self: ptr TestDBus00): cstring {. + importc: "g_test_dbus_get_bus_address", libprag.} + +proc getBusAddress*(self: TestDBus): string = + let resul0 = g_test_dbus_get_bus_address(cast[ptr TestDBus00](self.impl)) + result = $resul0 + +proc busAddress*(self: TestDBus): string = + let resul0 = g_test_dbus_get_bus_address(cast[ptr TestDBus00](self.impl)) + result = $resul0 + +proc g_test_dbus_stop*(self: ptr TestDBus00) {. + importc: "g_test_dbus_stop", libprag.} + +proc stop*(self: TestDBus) = + g_test_dbus_stop(cast[ptr TestDBus00](self.impl)) + +proc g_test_dbus_up*(self: ptr TestDBus00) {. + importc: "g_test_dbus_up", libprag.} + +proc up*(self: TestDBus) = + g_test_dbus_up(cast[ptr TestDBus00](self.impl)) + +type + TestDBusFlags* {.size: sizeof(cint), pure.} = enum + none = 0 + +proc g_test_dbus_new*(flags: TestDBusFlags): ptr TestDBus00 {. + importc: "g_test_dbus_new", libprag.} + +proc newTestDBus*(flags: TestDBusFlags): TestDBus = + new(result, finalizeGObject) + result.impl = g_test_dbus_new(flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTestDBus*[T](result: var T; flags: TestDBusFlags) = + assert(result is TestDBus) + new(result, finalizeGObject) + result.impl = g_test_dbus_new(flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_test_dbus_get_flags*(self: ptr TestDBus00): TestDBusFlags {. + importc: "g_test_dbus_get_flags", libprag.} + +proc getFlags*(self: TestDBus): TestDBusFlags = + g_test_dbus_get_flags(cast[ptr TestDBus00](self.impl)) + +proc flags*(self: TestDBus): TestDBusFlags = + g_test_dbus_get_flags(cast[ptr TestDBus00](self.impl)) + +type + ThemedIcon* = ref object of gobject.Object + ThemedIcon00* = object of gobject.Object00 + +proc g_themed_icon_new*(iconname: cstring): ptr ThemedIcon00 {. + importc: "g_themed_icon_new", libprag.} + +proc newThemedIcon*(iconname: string): ThemedIcon = + new(result, finalizeGObject) + result.impl = g_themed_icon_new(cstring(iconname)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initThemedIcon*[T](result: var T; iconname: string) = + assert(result is ThemedIcon) + new(result, finalizeGObject) + result.impl = g_themed_icon_new(cstring(iconname)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_themed_icon_new_from_names*(iconnames: cstringArray; len: int32): ptr ThemedIcon00 {. + importc: "g_themed_icon_new_from_names", libprag.} + +proc newThemedIconFromNames*(iconnames: cstringArray; len: int): ThemedIcon = + new(result, finalizeGObject) + result.impl = g_themed_icon_new_from_names(iconnames, int32(len)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initThemedIconFromNames*[T](result: var T; iconnames: cstringArray; len: int) = + assert(result is ThemedIcon) + new(result, finalizeGObject) + result.impl = g_themed_icon_new_from_names(iconnames, int32(len)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_themed_icon_new_with_default_fallbacks*(iconname: cstring): ptr ThemedIcon00 {. + importc: "g_themed_icon_new_with_default_fallbacks", libprag.} + +proc newThemedIconWithDefaultFallbacks*(iconname: string): ThemedIcon = + new(result, finalizeGObject) + result.impl = g_themed_icon_new_with_default_fallbacks(cstring(iconname)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initThemedIconWithDefaultFallbacks*[T](result: var T; iconname: string) = + assert(result is ThemedIcon) + new(result, finalizeGObject) + result.impl = g_themed_icon_new_with_default_fallbacks(cstring(iconname)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_themed_icon_append_name*(self: ptr ThemedIcon00; iconname: cstring) {. + importc: "g_themed_icon_append_name", libprag.} + +proc appendName*(self: ThemedIcon; iconname: string) = + g_themed_icon_append_name(cast[ptr ThemedIcon00](self.impl), cstring(iconname)) + +proc g_themed_icon_get_names*(self: ptr ThemedIcon00): cstringArray {. + importc: "g_themed_icon_get_names", libprag.} + +proc getNames*(self: ThemedIcon): cstringArray = + g_themed_icon_get_names(cast[ptr ThemedIcon00](self.impl)) + +proc names*(self: ThemedIcon): cstringArray = + g_themed_icon_get_names(cast[ptr ThemedIcon00](self.impl)) + +proc g_themed_icon_prepend_name*(self: ptr ThemedIcon00; iconname: cstring) {. + importc: "g_themed_icon_prepend_name", libprag.} + +proc prependName*(self: ThemedIcon; iconname: string) = + g_themed_icon_prepend_name(cast[ptr ThemedIcon00](self.impl), cstring(iconname)) + +type + ThemedIconClass00* {.pure.} = object + ThemedIconClass* = ref object + impl*: ptr ThemedIconClass00 + +type + ThreadedSocketServicePrivate00* {.pure.} = object + ThreadedSocketServicePrivate* = ref object + impl*: ptr ThreadedSocketServicePrivate00 + +type + ThreadedSocketService* = ref object of SocketService + ThreadedSocketService00* = object of SocketService00 + priv3: ptr ThreadedSocketServicePrivate00 + +proc scRun*(self: ThreadedSocketService; p: proc (self: ptr gobject.Object00; connection: SocketConnection00; sourceObject: gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "run", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_threaded_socket_service_new*(maxThreads: int32): ptr ThreadedSocketService00 {. + importc: "g_threaded_socket_service_new", libprag.} + +proc newThreadedSocketService*(maxThreads: int): ThreadedSocketService = + new(result, finalizeGObject) + result.impl = g_threaded_socket_service_new(int32(maxThreads)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initThreadedSocketService*[T](result: var T; maxThreads: int) = + assert(result is ThreadedSocketService) + new(result, finalizeGObject) + result.impl = g_threaded_socket_service_new(int32(maxThreads)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ThreadedSocketServiceClass00* {.pure.} = object + parentClass*: SocketServiceClass00 + run*: proc(service: ptr ThreadedSocketService00; connection: ptr SocketConnection00; + sourceObject: ptr gobject.Object00): gboolean {.cdecl.} + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + ThreadedSocketServiceClass* = ref object + impl*: ptr ThreadedSocketServiceClass00 + +type + TlsAuthenticationMode* {.size: sizeof(cint), pure.} = enum + none = 0 + requested = 1 + required = 2 + +type + TlsBackend00* {.pure.} = object + TlsBackend* = ref object + impl*: ptr TlsBackend00 + +proc g_tls_backend_get_default*(): ptr TlsBackend00 {. + importc: "g_tls_backend_get_default", libprag.} + +proc getDefault*(): TlsBackend = + new(result) + result.impl = g_tls_backend_get_default() + +proc default*(): TlsBackend = + new(result) + result.impl = g_tls_backend_get_default() + +proc g_tls_backend_get_certificate_type*(self: ptr TlsBackend00): GType {. + importc: "g_tls_backend_get_certificate_type", libprag.} + +proc getCertificateType*(self: TlsBackend): GType = + g_tls_backend_get_certificate_type(cast[ptr TlsBackend00](self.impl)) + +proc certificateType*(self: TlsBackend): GType = + g_tls_backend_get_certificate_type(cast[ptr TlsBackend00](self.impl)) + +proc g_tls_backend_get_client_connection_type*(self: ptr TlsBackend00): GType {. + importc: "g_tls_backend_get_client_connection_type", libprag.} + +proc getClientConnectionType*(self: TlsBackend): GType = + g_tls_backend_get_client_connection_type(cast[ptr TlsBackend00](self.impl)) + +proc clientConnectionType*(self: TlsBackend): GType = + g_tls_backend_get_client_connection_type(cast[ptr TlsBackend00](self.impl)) + +proc g_tls_backend_get_default_database*(self: ptr TlsBackend00): ptr TlsDatabase00 {. + importc: "g_tls_backend_get_default_database", libprag.} + +proc getDefaultDatabase*(self: TlsBackend): TlsDatabase = + let gobj = g_tls_backend_get_default_database(cast[ptr TlsBackend00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsDatabase](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultDatabase*(self: TlsBackend): TlsDatabase = + let gobj = g_tls_backend_get_default_database(cast[ptr TlsBackend00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TlsDatabase](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_tls_backend_get_dtls_client_connection_type*(self: ptr TlsBackend00): GType {. + importc: "g_tls_backend_get_dtls_client_connection_type", libprag.} + +proc getDtlsClientConnectionType*(self: TlsBackend): GType = + g_tls_backend_get_dtls_client_connection_type(cast[ptr TlsBackend00](self.impl)) + +proc dtlsClientConnectionType*(self: TlsBackend): GType = + g_tls_backend_get_dtls_client_connection_type(cast[ptr TlsBackend00](self.impl)) + +proc g_tls_backend_get_dtls_server_connection_type*(self: ptr TlsBackend00): GType {. + importc: "g_tls_backend_get_dtls_server_connection_type", libprag.} + +proc getDtlsServerConnectionType*(self: TlsBackend): GType = + g_tls_backend_get_dtls_server_connection_type(cast[ptr TlsBackend00](self.impl)) + +proc dtlsServerConnectionType*(self: TlsBackend): GType = + g_tls_backend_get_dtls_server_connection_type(cast[ptr TlsBackend00](self.impl)) + +proc g_tls_backend_get_file_database_type*(self: ptr TlsBackend00): GType {. + importc: "g_tls_backend_get_file_database_type", libprag.} + +proc getFileDatabaseType*(self: TlsBackend): GType = + g_tls_backend_get_file_database_type(cast[ptr TlsBackend00](self.impl)) + +proc fileDatabaseType*(self: TlsBackend): GType = + g_tls_backend_get_file_database_type(cast[ptr TlsBackend00](self.impl)) + +proc g_tls_backend_get_server_connection_type*(self: ptr TlsBackend00): GType {. + importc: "g_tls_backend_get_server_connection_type", libprag.} + +proc getServerConnectionType*(self: TlsBackend): GType = + g_tls_backend_get_server_connection_type(cast[ptr TlsBackend00](self.impl)) + +proc serverConnectionType*(self: TlsBackend): GType = + g_tls_backend_get_server_connection_type(cast[ptr TlsBackend00](self.impl)) + +proc g_tls_backend_supports_dtls*(self: ptr TlsBackend00): gboolean {. + importc: "g_tls_backend_supports_dtls", libprag.} + +proc supportsDtls*(self: TlsBackend): bool = + toBool(g_tls_backend_supports_dtls(cast[ptr TlsBackend00](self.impl))) + +proc g_tls_backend_supports_tls*(self: ptr TlsBackend00): gboolean {. + importc: "g_tls_backend_supports_tls", libprag.} + +proc supportsTls*(self: TlsBackend): bool = + toBool(g_tls_backend_supports_tls(cast[ptr TlsBackend00](self.impl))) + +type + TlsBackendInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + supportsTls*: proc(backend: ptr TlsBackend00): gboolean {.cdecl.} + getCertificateType*: proc(): GType {.cdecl.} + getClientConnectionType*: proc(): GType {.cdecl.} + getServerConnectionType*: proc(): GType {.cdecl.} + getFileDatabaseType*: proc(): GType {.cdecl.} + getDefaultDatabase*: proc(backend: ptr TlsBackend00): ptr TlsDatabase00 {.cdecl.} + supportsDtls*: proc(backend: ptr TlsBackend00): gboolean {.cdecl.} + getDtlsClientConnectionType*: proc(): GType {.cdecl.} + getDtlsServerConnectionType*: proc(): GType {.cdecl.} + TlsBackendInterface* = ref object + impl*: ptr TlsBackendInterface00 + +type + TlsCertificateClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + verify*: proc(cert: ptr TlsCertificate00; identity: ptr SocketConnectable00; + trustedCa: ptr TlsCertificate00): TlsCertificateFlags {.cdecl.} + padding*: array[8, pointer] + TlsCertificateClass* = ref object + impl*: ptr TlsCertificateClass00 + +type + TlsClientConnection00* {.pure.} = object + TlsClientConnection* = ref object + impl*: ptr TlsClientConnection00 + +proc g_tls_client_connection_new*(baseIoStream: ptr IOStream00; serverIdentity: ptr SocketConnectable00): ptr TlsClientConnection00 {. + importc: "g_tls_client_connection_new", libprag.} + +proc newTlsClientConnection*(baseIoStream: IOStream; serverIdentity: SocketConnectable): TlsClientConnection = + new(result) + result.impl = g_tls_client_connection_new(cast[ptr IOStream00](baseIoStream.impl), cast[ptr SocketConnectable00](serverIdentity.impl)) + +proc g_tls_client_connection_copy_session_state*(self: ptr TlsClientConnection00; source: ptr TlsClientConnection00) {. + importc: "g_tls_client_connection_copy_session_state", libprag.} + +proc copySessionState*(self: TlsClientConnection; source: TlsClientConnection) = + g_tls_client_connection_copy_session_state(cast[ptr TlsClientConnection00](self.impl), cast[ptr TlsClientConnection00](source.impl)) + +proc g_tls_client_connection_get_accepted_cas*(self: ptr TlsClientConnection00): ptr pointer {. + importc: "g_tls_client_connection_get_accepted_cas", libprag.} + +proc getAcceptedCas*(self: TlsClientConnection): ptr pointer = + g_tls_client_connection_get_accepted_cas(cast[ptr TlsClientConnection00](self.impl)) + +proc acceptedCas*(self: TlsClientConnection): ptr pointer = + g_tls_client_connection_get_accepted_cas(cast[ptr TlsClientConnection00](self.impl)) + +proc g_tls_client_connection_get_server_identity*(self: ptr TlsClientConnection00): ptr SocketConnectable00 {. + importc: "g_tls_client_connection_get_server_identity", libprag.} + +proc getServerIdentity*(self: TlsClientConnection): SocketConnectable = + new(result) + result.impl = g_tls_client_connection_get_server_identity(cast[ptr TlsClientConnection00](self.impl)) + +proc serverIdentity*(self: TlsClientConnection): SocketConnectable = + new(result) + result.impl = g_tls_client_connection_get_server_identity(cast[ptr TlsClientConnection00](self.impl)) + +proc g_tls_client_connection_get_use_ssl3*(self: ptr TlsClientConnection00): gboolean {. + importc: "g_tls_client_connection_get_use_ssl3", libprag.} + +proc getUseSsl3*(self: TlsClientConnection): bool = + toBool(g_tls_client_connection_get_use_ssl3(cast[ptr TlsClientConnection00](self.impl))) + +proc useSsl3*(self: TlsClientConnection): bool = + toBool(g_tls_client_connection_get_use_ssl3(cast[ptr TlsClientConnection00](self.impl))) + +proc g_tls_client_connection_get_validation_flags*(self: ptr TlsClientConnection00): TlsCertificateFlags {. + importc: "g_tls_client_connection_get_validation_flags", libprag.} + +proc getValidationFlags*(self: TlsClientConnection): TlsCertificateFlags = + g_tls_client_connection_get_validation_flags(cast[ptr TlsClientConnection00](self.impl)) + +proc validationFlags*(self: TlsClientConnection): TlsCertificateFlags = + g_tls_client_connection_get_validation_flags(cast[ptr TlsClientConnection00](self.impl)) + +proc g_tls_client_connection_set_server_identity*(self: ptr TlsClientConnection00; identity: ptr SocketConnectable00) {. + importc: "g_tls_client_connection_set_server_identity", libprag.} + +proc setServerIdentity*(self: TlsClientConnection; identity: SocketConnectable) = + g_tls_client_connection_set_server_identity(cast[ptr TlsClientConnection00](self.impl), cast[ptr SocketConnectable00](identity.impl)) + +proc `serverIdentity=`*(self: TlsClientConnection; identity: SocketConnectable) = + g_tls_client_connection_set_server_identity(cast[ptr TlsClientConnection00](self.impl), cast[ptr SocketConnectable00](identity.impl)) + +proc g_tls_client_connection_set_use_ssl3*(self: ptr TlsClientConnection00; useSsl3: gboolean) {. + importc: "g_tls_client_connection_set_use_ssl3", libprag.} + +proc setUseSsl3*(self: TlsClientConnection; useSsl3: bool) = + g_tls_client_connection_set_use_ssl3(cast[ptr TlsClientConnection00](self.impl), gboolean(useSsl3)) + +proc `useSsl3=`*(self: TlsClientConnection; useSsl3: bool) = + g_tls_client_connection_set_use_ssl3(cast[ptr TlsClientConnection00](self.impl), gboolean(useSsl3)) + +proc g_tls_client_connection_set_validation_flags*(self: ptr TlsClientConnection00; flags: TlsCertificateFlags) {. + importc: "g_tls_client_connection_set_validation_flags", libprag.} + +proc setValidationFlags*(self: TlsClientConnection; flags: TlsCertificateFlags) = + g_tls_client_connection_set_validation_flags(cast[ptr TlsClientConnection00](self.impl), flags) + +proc `validationFlags=`*(self: TlsClientConnection; flags: TlsCertificateFlags) = + g_tls_client_connection_set_validation_flags(cast[ptr TlsClientConnection00](self.impl), flags) + +type + TlsClientConnectionInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + copySessionState*: proc(conn: ptr TlsClientConnection00; source: ptr TlsClientConnection00) {.cdecl.} + TlsClientConnectionInterface* = ref object + impl*: ptr TlsClientConnectionInterface00 + +type + TlsConnectionClass00* {.pure.} = object + parentClass*: IOStreamClass00 + acceptCertificate*: proc(connection: ptr TlsConnection00; peerCert: ptr TlsCertificate00; + errors: TlsCertificateFlags): gboolean {.cdecl.} + handshake*: proc(conn: ptr TlsConnection00; cancellable: ptr Cancellable00): gboolean {.cdecl.} + handshakeAsync*: proc(conn: ptr TlsConnection00; ioPriority: int32; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + handshakeFinish*: proc(conn: ptr TlsConnection00; resu: ptr AsyncResult00): gboolean {.cdecl.} + padding*: array[8, pointer] + TlsConnectionClass* = ref object + impl*: ptr TlsConnectionClass00 + +type + TlsDatabaseClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + verifyChain*: proc(self: ptr TlsDatabase00; chain: ptr TlsCertificate00; + purpose: cstring; identity: ptr SocketConnectable00; interaction: ptr TlsInteraction00; flags: TlsDatabaseVerifyFlags; + cancellable: ptr Cancellable00): TlsCertificateFlags {.cdecl.} + verifyChainAsync*: proc(self: ptr TlsDatabase00; chain: ptr TlsCertificate00; + purpose: cstring; identity: ptr SocketConnectable00; interaction: ptr TlsInteraction00; flags: TlsDatabaseVerifyFlags; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + verifyChainFinish*: proc(self: ptr TlsDatabase00; resu: ptr AsyncResult00): TlsCertificateFlags {.cdecl.} + createCertificateHandle*: proc(self: ptr TlsDatabase00; certificate: ptr TlsCertificate00): cstring {.cdecl.} + lookupCertificateForHandle*: proc(self: ptr TlsDatabase00; handle: cstring; interaction: ptr TlsInteraction00; + flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00): ptr TlsCertificate00 {.cdecl.} + lookupCertificateForHandleAsync*: proc(self: ptr TlsDatabase00; handle: cstring; interaction: ptr TlsInteraction00; + flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + lookupCertificateForHandleFinish*: proc(self: ptr TlsDatabase00; resu: ptr AsyncResult00): ptr TlsCertificate00 {.cdecl.} + lookupCertificateIssuer*: proc(self: ptr TlsDatabase00; certificate: ptr TlsCertificate00; + interaction: ptr TlsInteraction00; flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00): ptr TlsCertificate00 {.cdecl.} + lookupCertificateIssuerAsync*: proc(self: ptr TlsDatabase00; certificate: ptr TlsCertificate00; + interaction: ptr TlsInteraction00; flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + lookupCertificateIssuerFinish*: proc(self: ptr TlsDatabase00; resu: ptr AsyncResult00): ptr TlsCertificate00 {.cdecl.} + lookupCertificatesIssuedBy*: proc(self: ptr TlsDatabase00; issuerRawDn: ptr ByteArray00; + interaction: ptr TlsInteraction00; flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00): ptr pointer {.cdecl.} + lookupCertificatesIssuedByAsync*: proc(self: ptr TlsDatabase00; issuerRawDn: ptr ByteArray00; + interaction: ptr TlsInteraction00; flags: TlsDatabaseLookupFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + lookupCertificatesIssuedByFinish*: proc(self: ptr TlsDatabase00; resu: ptr AsyncResult00): ptr pointer {.cdecl.} + padding*: array[16, pointer] + TlsDatabaseClass* = ref object + impl*: ptr TlsDatabaseClass00 + +type + TlsError* {.size: sizeof(cint), pure.} = enum + unavailable = 0 + misc = 1 + badCertificate = 2 + notTls = 3 + handshake = 4 + certificateRequired = 5 + eof = 6 + +proc g_tls_error_quark*(): uint32 {. + importc: "g_tls_error_quark", libprag.} + +type + TlsFileDatabase00* {.pure.} = object + TlsFileDatabase* = ref object + impl*: ptr TlsFileDatabase00 + +proc g_tls_file_database_new*(anchors: ucstring): ptr TlsFileDatabase00 {. + importc: "g_tls_file_database_new", libprag.} + +proc newTlsFileDatabase*(anchors: ucstring): TlsFileDatabase = + new(result) + result.impl = g_tls_file_database_new(anchors) + +type + TlsFileDatabaseInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + padding*: array[8, pointer] + TlsFileDatabaseInterface* = ref object + impl*: ptr TlsFileDatabaseInterface00 + +type + TlsInteractionClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + askPassword*: proc(interaction: ptr TlsInteraction00; password: ptr TlsPassword00; + cancellable: ptr Cancellable00): TlsInteractionResult {.cdecl.} + askPasswordAsync*: proc(interaction: ptr TlsInteraction00; password: ptr TlsPassword00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + askPasswordFinish*: proc(interaction: ptr TlsInteraction00; resu: ptr AsyncResult00): TlsInteractionResult {.cdecl.} + requestCertificate*: proc(interaction: ptr TlsInteraction00; connection: ptr TlsConnection00; + flags: TlsCertificateRequestFlags; cancellable: ptr Cancellable00): TlsInteractionResult {.cdecl.} + requestCertificateAsync*: proc(interaction: ptr TlsInteraction00; connection: ptr TlsConnection00; + flags: TlsCertificateRequestFlags; cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + requestCertificateFinish*: proc(interaction: ptr TlsInteraction00; resu: ptr AsyncResult00): TlsInteractionResult {.cdecl.} + padding*: array[21, pointer] + TlsInteractionClass* = ref object + impl*: ptr TlsInteractionClass00 + +type + TlsPasswordClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getValue*: proc(password: ptr TlsPassword00; length: ptr uint64): ptr uint8 {.cdecl.} + setValue*: proc(password: ptr TlsPassword00; value: ptr uint8; length: int64; + destroy: DestroyNotify) {.cdecl.} + getDefaultWarning*: proc(password: ptr TlsPassword00): cstring {.cdecl.} + padding*: array[4, pointer] + TlsPasswordClass* = ref object + impl*: ptr TlsPasswordClass00 + +type + TlsServerConnection00* {.pure.} = object + TlsServerConnection* = ref object + impl*: ptr TlsServerConnection00 + +proc g_tls_server_connection_new*(baseIoStream: ptr IOStream00; certificate: ptr TlsCertificate00): ptr TlsServerConnection00 {. + importc: "g_tls_server_connection_new", libprag.} + +proc newTlsServerConnection*(baseIoStream: IOStream; certificate: TlsCertificate): TlsServerConnection = + new(result) + result.impl = g_tls_server_connection_new(cast[ptr IOStream00](baseIoStream.impl), cast[ptr TlsCertificate00](certificate.impl)) + +type + TlsServerConnectionInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + TlsServerConnectionInterface* = ref object + impl*: ptr TlsServerConnectionInterface00 + +type + UnixConnectionPrivate00* {.pure.} = object + UnixConnectionPrivate* = ref object + impl*: ptr UnixConnectionPrivate00 + +type + UnixConnection* = ref object of SocketConnection + UnixConnection00* = object of SocketConnection00 + priv3: ptr UnixConnectionPrivate00 + +proc g_unix_connection_receive_credentials*(self: ptr UnixConnection00; cancellable: ptr Cancellable00): ptr Credentials00 {. + importc: "g_unix_connection_receive_credentials", libprag.} + +proc receiveCredentials*(self: UnixConnection; cancellable: Cancellable): Credentials = + let gobj = g_unix_connection_receive_credentials(cast[ptr UnixConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Credentials](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_connection_receive_credentials_async*(self: ptr UnixConnection00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_unix_connection_receive_credentials_async", libprag.} + +proc receiveCredentialsAsync*(self: UnixConnection; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_unix_connection_receive_credentials_async(cast[ptr UnixConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_unix_connection_receive_credentials_finish*(self: ptr UnixConnection00; resu: ptr AsyncResult00): ptr Credentials00 {. + importc: "g_unix_connection_receive_credentials_finish", libprag.} + +proc receiveCredentialsFinish*(self: UnixConnection; resu: AsyncResult): Credentials = + let gobj = g_unix_connection_receive_credentials_finish(cast[ptr UnixConnection00](self.impl), cast[ptr AsyncResult00](resu.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Credentials](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_connection_receive_fd*(self: ptr UnixConnection00; cancellable: ptr Cancellable00): int32 {. + importc: "g_unix_connection_receive_fd", libprag.} + +proc receiveFd*(self: UnixConnection; cancellable: Cancellable): int = + int(g_unix_connection_receive_fd(cast[ptr UnixConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_unix_connection_send_credentials*(self: ptr UnixConnection00; cancellable: ptr Cancellable00): gboolean {. + importc: "g_unix_connection_send_credentials", libprag.} + +proc sendCredentials*(self: UnixConnection; cancellable: Cancellable): bool = + toBool(g_unix_connection_send_credentials(cast[ptr UnixConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl))) + +proc g_unix_connection_send_credentials_async*(self: ptr UnixConnection00; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_unix_connection_send_credentials_async", libprag.} + +proc sendCredentialsAsync*(self: UnixConnection; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_unix_connection_send_credentials_async(cast[ptr UnixConnection00](self.impl), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_unix_connection_send_credentials_finish*(self: ptr UnixConnection00; resu: ptr AsyncResult00): gboolean {. + importc: "g_unix_connection_send_credentials_finish", libprag.} + +proc sendCredentialsFinish*(self: UnixConnection; resu: AsyncResult): bool = + toBool(g_unix_connection_send_credentials_finish(cast[ptr UnixConnection00](self.impl), cast[ptr AsyncResult00](resu.impl))) + +proc g_unix_connection_send_fd*(self: ptr UnixConnection00; fd: int32; cancellable: ptr Cancellable00): gboolean {. + importc: "g_unix_connection_send_fd", libprag.} + +proc sendFd*(self: UnixConnection; fd: int; cancellable: Cancellable): bool = + toBool(g_unix_connection_send_fd(cast[ptr UnixConnection00](self.impl), int32(fd), cast[ptr Cancellable00](cancellable.impl))) + +type + UnixConnectionClass00* {.pure.} = object + parentClass*: SocketConnectionClass00 + UnixConnectionClass* = ref object + impl*: ptr UnixConnectionClass00 + +type + UnixCredentialsMessagePrivate00* {.pure.} = object + UnixCredentialsMessagePrivate* = ref object + impl*: ptr UnixCredentialsMessagePrivate00 + +type + UnixCredentialsMessage* = ref object of SocketControlMessage + UnixCredentialsMessage00* = object of SocketControlMessage00 + priv2: ptr UnixCredentialsMessagePrivate00 + +proc g_unix_credentials_message_new*(): ptr UnixCredentialsMessage00 {. + importc: "g_unix_credentials_message_new", libprag.} + +proc newUnixCredentialsMessage*(): UnixCredentialsMessage = + new(result, finalizeGObject) + result.impl = g_unix_credentials_message_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixCredentialsMessage*[T](result: var T) = + assert(result is UnixCredentialsMessage) + new(result, finalizeGObject) + result.impl = g_unix_credentials_message_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_credentials_message_new_with_credentials*(credentials: ptr Credentials00): ptr UnixCredentialsMessage00 {. + importc: "g_unix_credentials_message_new_with_credentials", libprag.} + +proc newUnixCredentialsMessageWithCredentials*(credentials: Credentials): UnixCredentialsMessage = + new(result, finalizeGObject) + result.impl = g_unix_credentials_message_new_with_credentials(cast[ptr Credentials00](credentials.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixCredentialsMessageWithCredentials*[T](result: var T; credentials: Credentials) = + assert(result is UnixCredentialsMessage) + new(result, finalizeGObject) + result.impl = g_unix_credentials_message_new_with_credentials(cast[ptr Credentials00](credentials.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_credentials_message_is_supported*(): gboolean {. + importc: "g_unix_credentials_message_is_supported", libprag.} + +proc isSupported*(): gboolean {. + importc: "g_unix_credentials_message_is_supported", libprag.} + +proc g_unix_credentials_message_get_credentials*(self: ptr UnixCredentialsMessage00): ptr Credentials00 {. + importc: "g_unix_credentials_message_get_credentials", libprag.} + +proc getCredentials*(self: UnixCredentialsMessage): Credentials = + let gobj = g_unix_credentials_message_get_credentials(cast[ptr UnixCredentialsMessage00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Credentials](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc credentials*(self: UnixCredentialsMessage): Credentials = + let gobj = g_unix_credentials_message_get_credentials(cast[ptr UnixCredentialsMessage00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Credentials](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + UnixCredentialsMessageClass00* {.pure.} = object + parentClass*: SocketControlMessageClass00 + gReserved1*: pointer + gReserved2*: pointer + UnixCredentialsMessageClass* = ref object + impl*: ptr UnixCredentialsMessageClass00 + +type + UnixFDListClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + UnixFDListClass* = ref object + impl*: ptr UnixFDListClass00 + +type + UnixFDMessagePrivate00* {.pure.} = object + UnixFDMessagePrivate* = ref object + impl*: ptr UnixFDMessagePrivate00 + +type + UnixFDMessage* = ref object of SocketControlMessage + UnixFDMessage00* = object of SocketControlMessage00 + priv2: ptr UnixFDMessagePrivate00 + +proc g_unix_fd_message_new*(): ptr UnixFDMessage00 {. + importc: "g_unix_fd_message_new", libprag.} + +proc newUnixFDMessage*(): UnixFDMessage = + new(result, finalizeGObject) + result.impl = g_unix_fd_message_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixFDMessage*[T](result: var T) = + assert(result is UnixFDMessage) + new(result, finalizeGObject) + result.impl = g_unix_fd_message_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_fd_message_new_with_fd_list*(fdList: ptr UnixFDList00): ptr UnixFDMessage00 {. + importc: "g_unix_fd_message_new_with_fd_list", libprag.} + +proc newUnixFDMessageWithFdList*(fdList: UnixFDList): UnixFDMessage = + new(result, finalizeGObject) + result.impl = g_unix_fd_message_new_with_fd_list(cast[ptr UnixFDList00](fdList.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixFDMessageWithFdList*[T](result: var T; fdList: UnixFDList) = + assert(result is UnixFDMessage) + new(result, finalizeGObject) + result.impl = g_unix_fd_message_new_with_fd_list(cast[ptr UnixFDList00](fdList.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_fd_message_append_fd*(self: ptr UnixFDMessage00; fd: int32): gboolean {. + importc: "g_unix_fd_message_append_fd", libprag.} + +proc appendFd*(self: UnixFDMessage; fd: int): bool = + toBool(g_unix_fd_message_append_fd(cast[ptr UnixFDMessage00](self.impl), int32(fd))) + +proc g_unix_fd_message_get_fd_list*(self: ptr UnixFDMessage00): ptr UnixFDList00 {. + importc: "g_unix_fd_message_get_fd_list", libprag.} + +proc getFdList*(self: UnixFDMessage): UnixFDList = + let gobj = g_unix_fd_message_get_fd_list(cast[ptr UnixFDMessage00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[UnixFDList](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fdList*(self: UnixFDMessage): UnixFDList = + let gobj = g_unix_fd_message_get_fd_list(cast[ptr UnixFDMessage00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[UnixFDList](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_fd_message_steal_fds*(self: ptr UnixFDMessage00; length: var int32): int32Array {. + importc: "g_unix_fd_message_steal_fds", libprag.} + +proc stealFds*(self: UnixFDMessage; length: var int): int32Array = + var length_00 = int32(length) + result = g_unix_fd_message_steal_fds(cast[ptr UnixFDMessage00](self.impl), length_00) + length = int(length_00) + +type + UnixFDMessageClass00* {.pure.} = object + parentClass*: SocketControlMessageClass00 + gReserved1*: pointer + gReserved2*: pointer + UnixFDMessageClass* = ref object + impl*: ptr UnixFDMessageClass00 + +type + UnixInputStreamPrivate00* {.pure.} = object + UnixInputStreamPrivate* = ref object + impl*: ptr UnixInputStreamPrivate00 + +type + UnixInputStream* = ref object of InputStream + UnixInputStream00* = object of InputStream00 + priv2: ptr UnixInputStreamPrivate00 + +proc g_unix_input_stream_new*(fd: int32; closeFd: gboolean): ptr UnixInputStream00 {. + importc: "g_unix_input_stream_new", libprag.} + +proc newUnixInputStream*(fd: int; closeFd: bool): UnixInputStream = + new(result, finalizeGObject) + result.impl = g_unix_input_stream_new(int32(fd), gboolean(closeFd)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixInputStream*[T](result: var T; fd: int; closeFd: bool) = + assert(result is UnixInputStream) + new(result, finalizeGObject) + result.impl = g_unix_input_stream_new(int32(fd), gboolean(closeFd)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_input_stream_get_close_fd*(self: ptr UnixInputStream00): gboolean {. + importc: "g_unix_input_stream_get_close_fd", libprag.} + +proc getCloseFd*(self: UnixInputStream): bool = + toBool(g_unix_input_stream_get_close_fd(cast[ptr UnixInputStream00](self.impl))) + +proc closeFd*(self: UnixInputStream): bool = + toBool(g_unix_input_stream_get_close_fd(cast[ptr UnixInputStream00](self.impl))) + +proc g_unix_input_stream_get_fd*(self: ptr UnixInputStream00): int32 {. + importc: "g_unix_input_stream_get_fd", libprag.} + +proc getFd*(self: UnixInputStream): int = + int(g_unix_input_stream_get_fd(cast[ptr UnixInputStream00](self.impl))) + +proc fd*(self: UnixInputStream): int = + int(g_unix_input_stream_get_fd(cast[ptr UnixInputStream00](self.impl))) + +proc g_unix_input_stream_set_close_fd*(self: ptr UnixInputStream00; closeFd: gboolean) {. + importc: "g_unix_input_stream_set_close_fd", libprag.} + +proc setCloseFd*(self: UnixInputStream; closeFd: bool) = + g_unix_input_stream_set_close_fd(cast[ptr UnixInputStream00](self.impl), gboolean(closeFd)) + +proc `closeFd=`*(self: UnixInputStream; closeFd: bool) = + g_unix_input_stream_set_close_fd(cast[ptr UnixInputStream00](self.impl), gboolean(closeFd)) + +type + UnixInputStreamClass00* {.pure.} = object + parentClass*: InputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + UnixInputStreamClass* = ref object + impl*: ptr UnixInputStreamClass00 + +type + UnixMountEntry00* {.pure.} = object + UnixMountEntry* = ref object + impl*: ptr UnixMountEntry00 + +type + UnixMountMonitor* = ref object of gobject.Object + UnixMountMonitor00* = object of gobject.Object00 + +proc scMountpointsChanged*(self: UnixMountMonitor; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mountpoints-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMountsChanged*(self: UnixMountMonitor; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mounts-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc g_unix_mount_monitor_new*(): ptr UnixMountMonitor00 {. + importc: "g_unix_mount_monitor_new", libprag.} + +proc newUnixMountMonitor*(): UnixMountMonitor = + new(result, finalizeGObject) + result.impl = g_unix_mount_monitor_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixMountMonitor*[T](result: var T) = + assert(result is UnixMountMonitor) + new(result, finalizeGObject) + result.impl = g_unix_mount_monitor_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_mount_monitor_get*(): ptr UnixMountMonitor00 {. + importc: "g_unix_mount_monitor_get", libprag.} + +proc get*(): UnixMountMonitor = + let gobj = g_unix_mount_monitor_get() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[UnixMountMonitor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_mount_monitor_set_rate_limit*(self: ptr UnixMountMonitor00; limitMsec: int32) {. + importc: "g_unix_mount_monitor_set_rate_limit", libprag.} + +proc setRateLimit*(self: UnixMountMonitor; limitMsec: int) = + g_unix_mount_monitor_set_rate_limit(cast[ptr UnixMountMonitor00](self.impl), int32(limitMsec)) + +proc `rateLimit=`*(self: UnixMountMonitor; limitMsec: int) = + g_unix_mount_monitor_set_rate_limit(cast[ptr UnixMountMonitor00](self.impl), int32(limitMsec)) + +type + UnixMountMonitorClass00* {.pure.} = object + UnixMountMonitorClass* = ref object + impl*: ptr UnixMountMonitorClass00 + +type + UnixMountPoint00* {.pure.} = object + UnixMountPoint* = ref object + impl*: ptr UnixMountPoint00 + +proc g_unix_mount_point_compare*(self: ptr UnixMountPoint00; mount2: ptr UnixMountPoint00): int32 {. + importc: "g_unix_mount_point_compare", libprag.} + +proc compare*(self: UnixMountPoint; mount2: UnixMountPoint): int = + int(g_unix_mount_point_compare(cast[ptr UnixMountPoint00](self.impl), cast[ptr UnixMountPoint00](mount2.impl))) + +proc g_unix_mount_point_free*(self: ptr UnixMountPoint00) {. + importc: "g_unix_mount_point_free", libprag.} + +proc free*(self: UnixMountPoint) = + g_unix_mount_point_free(cast[ptr UnixMountPoint00](self.impl)) + +proc g_unix_mount_point_get_device_path*(self: ptr UnixMountPoint00): ucstring {. + importc: "g_unix_mount_point_get_device_path", libprag.} + +proc getDevicePath*(self: UnixMountPoint): ucstring = + g_unix_mount_point_get_device_path(cast[ptr UnixMountPoint00](self.impl)) + +proc devicePath*(self: UnixMountPoint): ucstring = + g_unix_mount_point_get_device_path(cast[ptr UnixMountPoint00](self.impl)) + +proc g_unix_mount_point_get_fs_type*(self: ptr UnixMountPoint00): cstring {. + importc: "g_unix_mount_point_get_fs_type", libprag.} + +proc getFsType*(self: UnixMountPoint): string = + let resul0 = g_unix_mount_point_get_fs_type(cast[ptr UnixMountPoint00](self.impl)) + result = $resul0 + +proc fsType*(self: UnixMountPoint): string = + let resul0 = g_unix_mount_point_get_fs_type(cast[ptr UnixMountPoint00](self.impl)) + result = $resul0 + +proc g_unix_mount_point_get_mount_path*(self: ptr UnixMountPoint00): ucstring {. + importc: "g_unix_mount_point_get_mount_path", libprag.} + +proc getMountPath*(self: UnixMountPoint): ucstring = + g_unix_mount_point_get_mount_path(cast[ptr UnixMountPoint00](self.impl)) + +proc mountPath*(self: UnixMountPoint): ucstring = + g_unix_mount_point_get_mount_path(cast[ptr UnixMountPoint00](self.impl)) + +proc g_unix_mount_point_get_options*(self: ptr UnixMountPoint00): cstring {. + importc: "g_unix_mount_point_get_options", libprag.} + +proc getOptions*(self: UnixMountPoint): string = + let resul0 = g_unix_mount_point_get_options(cast[ptr UnixMountPoint00](self.impl)) + result = $resul0 + +proc options*(self: UnixMountPoint): string = + let resul0 = g_unix_mount_point_get_options(cast[ptr UnixMountPoint00](self.impl)) + result = $resul0 + +proc g_unix_mount_point_guess_can_eject*(self: ptr UnixMountPoint00): gboolean {. + importc: "g_unix_mount_point_guess_can_eject", libprag.} + +proc guessCanEject*(self: UnixMountPoint): bool = + toBool(g_unix_mount_point_guess_can_eject(cast[ptr UnixMountPoint00](self.impl))) + +proc g_unix_mount_point_guess_icon*(self: ptr UnixMountPoint00): ptr Icon00 {. + importc: "g_unix_mount_point_guess_icon", libprag.} + +proc guessIcon*(self: UnixMountPoint): Icon = + new(result) + result.impl = g_unix_mount_point_guess_icon(cast[ptr UnixMountPoint00](self.impl)) + +proc g_unix_mount_point_guess_name*(self: ptr UnixMountPoint00): cstring {. + importc: "g_unix_mount_point_guess_name", libprag.} + +proc guessName*(self: UnixMountPoint): string = + let resul0 = g_unix_mount_point_guess_name(cast[ptr UnixMountPoint00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_unix_mount_point_guess_symbolic_icon*(self: ptr UnixMountPoint00): ptr Icon00 {. + importc: "g_unix_mount_point_guess_symbolic_icon", libprag.} + +proc guessSymbolicIcon*(self: UnixMountPoint): Icon = + new(result) + result.impl = g_unix_mount_point_guess_symbolic_icon(cast[ptr UnixMountPoint00](self.impl)) + +proc g_unix_mount_point_is_loopback*(self: ptr UnixMountPoint00): gboolean {. + importc: "g_unix_mount_point_is_loopback", libprag.} + +proc isLoopback*(self: UnixMountPoint): bool = + toBool(g_unix_mount_point_is_loopback(cast[ptr UnixMountPoint00](self.impl))) + +proc g_unix_mount_point_is_readonly*(self: ptr UnixMountPoint00): gboolean {. + importc: "g_unix_mount_point_is_readonly", libprag.} + +proc isReadonly*(self: UnixMountPoint): bool = + toBool(g_unix_mount_point_is_readonly(cast[ptr UnixMountPoint00](self.impl))) + +proc g_unix_mount_point_is_user_mountable*(self: ptr UnixMountPoint00): gboolean {. + importc: "g_unix_mount_point_is_user_mountable", libprag.} + +proc isUserMountable*(self: UnixMountPoint): bool = + toBool(g_unix_mount_point_is_user_mountable(cast[ptr UnixMountPoint00](self.impl))) + +type + UnixOutputStreamPrivate00* {.pure.} = object + UnixOutputStreamPrivate* = ref object + impl*: ptr UnixOutputStreamPrivate00 + +type + UnixOutputStream* = ref object of OutputStream + UnixOutputStream00* = object of OutputStream00 + priv2: ptr UnixOutputStreamPrivate00 + +proc g_unix_output_stream_new*(fd: int32; closeFd: gboolean): ptr UnixOutputStream00 {. + importc: "g_unix_output_stream_new", libprag.} + +proc newUnixOutputStream*(fd: int; closeFd: bool): UnixOutputStream = + new(result, finalizeGObject) + result.impl = g_unix_output_stream_new(int32(fd), gboolean(closeFd)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixOutputStream*[T](result: var T; fd: int; closeFd: bool) = + assert(result is UnixOutputStream) + new(result, finalizeGObject) + result.impl = g_unix_output_stream_new(int32(fd), gboolean(closeFd)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_output_stream_get_close_fd*(self: ptr UnixOutputStream00): gboolean {. + importc: "g_unix_output_stream_get_close_fd", libprag.} + +proc getCloseFd*(self: UnixOutputStream): bool = + toBool(g_unix_output_stream_get_close_fd(cast[ptr UnixOutputStream00](self.impl))) + +proc closeFd*(self: UnixOutputStream): bool = + toBool(g_unix_output_stream_get_close_fd(cast[ptr UnixOutputStream00](self.impl))) + +proc g_unix_output_stream_get_fd*(self: ptr UnixOutputStream00): int32 {. + importc: "g_unix_output_stream_get_fd", libprag.} + +proc getFd*(self: UnixOutputStream): int = + int(g_unix_output_stream_get_fd(cast[ptr UnixOutputStream00](self.impl))) + +proc fd*(self: UnixOutputStream): int = + int(g_unix_output_stream_get_fd(cast[ptr UnixOutputStream00](self.impl))) + +proc g_unix_output_stream_set_close_fd*(self: ptr UnixOutputStream00; closeFd: gboolean) {. + importc: "g_unix_output_stream_set_close_fd", libprag.} + +proc setCloseFd*(self: UnixOutputStream; closeFd: bool) = + g_unix_output_stream_set_close_fd(cast[ptr UnixOutputStream00](self.impl), gboolean(closeFd)) + +proc `closeFd=`*(self: UnixOutputStream; closeFd: bool) = + g_unix_output_stream_set_close_fd(cast[ptr UnixOutputStream00](self.impl), gboolean(closeFd)) + +type + UnixOutputStreamClass00* {.pure.} = object + parentClass*: OutputStreamClass00 + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + UnixOutputStreamClass* = ref object + impl*: ptr UnixOutputStreamClass00 + +type + UnixSocketAddressPrivate00* {.pure.} = object + UnixSocketAddressPrivate* = ref object + impl*: ptr UnixSocketAddressPrivate00 + +type + UnixSocketAddress* = ref object of SocketAddress + UnixSocketAddress00* = object of SocketAddress00 + priv2: ptr UnixSocketAddressPrivate00 + +proc g_unix_socket_address_new*(path: cstring): ptr UnixSocketAddress00 {. + importc: "g_unix_socket_address_new", libprag.} + +proc newUnixSocketAddress*(path: string): UnixSocketAddress = + new(result, finalizeGObject) + result.impl = g_unix_socket_address_new(cstring(path)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixSocketAddress*[T](result: var T; path: string) = + assert(result is UnixSocketAddress) + new(result, finalizeGObject) + result.impl = g_unix_socket_address_new(cstring(path)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_socket_address_new_abstract*(path: int8Array; pathLen: int32): ptr UnixSocketAddress00 {. + importc: "g_unix_socket_address_new_abstract", libprag.} + +proc newUnixSocketAddressAbstract*(path: int8Array; pathLen: int): UnixSocketAddress = + new(result, finalizeGObject) + result.impl = g_unix_socket_address_new_abstract(path, int32(pathLen)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixSocketAddressAbstract*[T](result: var T; path: int8Array; pathLen: int) = + assert(result is UnixSocketAddress) + new(result, finalizeGObject) + result.impl = g_unix_socket_address_new_abstract(path, int32(pathLen)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_socket_address_abstract_names_supported*(): gboolean {. + importc: "g_unix_socket_address_abstract_names_supported", libprag.} + +proc abstractNamesSupported*(): gboolean {. + importc: "g_unix_socket_address_abstract_names_supported", libprag.} + +proc g_unix_socket_address_get_is_abstract*(self: ptr UnixSocketAddress00): gboolean {. + importc: "g_unix_socket_address_get_is_abstract", libprag.} + +proc getIsAbstract*(self: UnixSocketAddress): bool = + toBool(g_unix_socket_address_get_is_abstract(cast[ptr UnixSocketAddress00](self.impl))) + +proc isAbstract*(self: UnixSocketAddress): bool = + toBool(g_unix_socket_address_get_is_abstract(cast[ptr UnixSocketAddress00](self.impl))) + +proc g_unix_socket_address_get_path*(self: ptr UnixSocketAddress00): cstring {. + importc: "g_unix_socket_address_get_path", libprag.} + +proc getPath*(self: UnixSocketAddress): string = + let resul0 = g_unix_socket_address_get_path(cast[ptr UnixSocketAddress00](self.impl)) + result = $resul0 + +proc path*(self: UnixSocketAddress): string = + let resul0 = g_unix_socket_address_get_path(cast[ptr UnixSocketAddress00](self.impl)) + result = $resul0 + +proc g_unix_socket_address_get_path_len*(self: ptr UnixSocketAddress00): uint64 {. + importc: "g_unix_socket_address_get_path_len", libprag.} + +proc getPathLen*(self: UnixSocketAddress): uint64 = + g_unix_socket_address_get_path_len(cast[ptr UnixSocketAddress00](self.impl)) + +proc pathLen*(self: UnixSocketAddress): uint64 = + g_unix_socket_address_get_path_len(cast[ptr UnixSocketAddress00](self.impl)) + +type + UnixSocketAddressType* {.size: sizeof(cint), pure.} = enum + invalid = 0 + anonymous = 1 + path = 2 + abstract = 3 + abstractPadded = 4 + +proc g_unix_socket_address_new_with_type*(path: int8Array; pathLen: int32; `type`: UnixSocketAddressType): ptr UnixSocketAddress00 {. + importc: "g_unix_socket_address_new_with_type", libprag.} + +proc newUnixSocketAddressWithType*(path: int8Array; pathLen: int; `type`: UnixSocketAddressType): UnixSocketAddress = + new(result, finalizeGObject) + result.impl = g_unix_socket_address_new_with_type(path, int32(pathLen), `type`) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUnixSocketAddressWithType*[T](result: var T; path: int8Array; pathLen: int; `type`: UnixSocketAddressType) = + assert(result is UnixSocketAddress) + new(result, finalizeGObject) + result.impl = g_unix_socket_address_new_with_type(path, int32(pathLen), `type`) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_unix_socket_address_get_address_type*(self: ptr UnixSocketAddress00): UnixSocketAddressType {. + importc: "g_unix_socket_address_get_address_type", libprag.} + +proc getAddressType*(self: UnixSocketAddress): UnixSocketAddressType = + g_unix_socket_address_get_address_type(cast[ptr UnixSocketAddress00](self.impl)) + +proc addressType*(self: UnixSocketAddress): UnixSocketAddressType = + g_unix_socket_address_get_address_type(cast[ptr UnixSocketAddress00](self.impl)) + +type + UnixSocketAddressClass00* {.pure.} = object + parentClass*: SocketAddressClass00 + UnixSocketAddressClass* = ref object + impl*: ptr UnixSocketAddressClass00 + +const VFS_EXTENSION_POINT_NAME* = "gio-vfs" + +const VOLUME_IDENTIFIER_KIND_CLASS* = "class" + +const VOLUME_IDENTIFIER_KIND_HAL_UDI* = "hal-udi" + +const VOLUME_IDENTIFIER_KIND_LABEL* = "label" + +const VOLUME_IDENTIFIER_KIND_NFS_MOUNT* = "nfs-mount" + +const VOLUME_IDENTIFIER_KIND_UNIX_DEVICE* = "unix-device" + +const VOLUME_IDENTIFIER_KIND_UUID* = "uuid" + +const VOLUME_MONITOR_EXTENSION_POINT_NAME* = "gio-volume-monitor" + +type + Vfs* = ref object of gobject.Object + Vfs00* = object of gobject.Object00 + +proc g_vfs_get_default*(): ptr Vfs00 {. + importc: "g_vfs_get_default", libprag.} + +proc getDefault*(): Vfs = + let gobj = g_vfs_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Vfs](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): Vfs = + let gobj = g_vfs_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Vfs](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_vfs_get_local*(): ptr Vfs00 {. + importc: "g_vfs_get_local", libprag.} + +proc getLocal*(): Vfs = + let gobj = g_vfs_get_local() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Vfs](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc local*(): Vfs = + let gobj = g_vfs_get_local() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Vfs](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_vfs_get_file_for_path*(self: ptr Vfs00; path: cstring): ptr File00 {. + importc: "g_vfs_get_file_for_path", libprag.} + +proc getFileForPath*(self: Vfs; path: string): File = + new(result) + result.impl = g_vfs_get_file_for_path(cast[ptr Vfs00](self.impl), cstring(path)) + +proc fileForPath*(self: Vfs; path: string): File = + new(result) + result.impl = g_vfs_get_file_for_path(cast[ptr Vfs00](self.impl), cstring(path)) + +proc g_vfs_get_file_for_uri*(self: ptr Vfs00; uri: cstring): ptr File00 {. + importc: "g_vfs_get_file_for_uri", libprag.} + +proc getFileForUri*(self: Vfs; uri: string): File = + new(result) + result.impl = g_vfs_get_file_for_uri(cast[ptr Vfs00](self.impl), cstring(uri)) + +proc fileForUri*(self: Vfs; uri: string): File = + new(result) + result.impl = g_vfs_get_file_for_uri(cast[ptr Vfs00](self.impl), cstring(uri)) + +proc g_vfs_get_supported_uri_schemes*(self: ptr Vfs00): cstringArray {. + importc: "g_vfs_get_supported_uri_schemes", libprag.} + +proc getSupportedUriSchemes*(self: Vfs): cstringArray = + g_vfs_get_supported_uri_schemes(cast[ptr Vfs00](self.impl)) + +proc supportedUriSchemes*(self: Vfs): cstringArray = + g_vfs_get_supported_uri_schemes(cast[ptr Vfs00](self.impl)) + +proc g_vfs_is_active*(self: ptr Vfs00): gboolean {. + importc: "g_vfs_is_active", libprag.} + +proc isActive*(self: Vfs): bool = + toBool(g_vfs_is_active(cast[ptr Vfs00](self.impl))) + +proc g_vfs_parse_name*(self: ptr Vfs00; parseName: cstring): ptr File00 {. + importc: "g_vfs_parse_name", libprag.} + +proc parseName*(self: Vfs; parseName: string): File = + new(result) + result.impl = g_vfs_parse_name(cast[ptr Vfs00](self.impl), cstring(parseName)) + +proc g_vfs_unregister_uri_scheme*(self: ptr Vfs00; scheme: cstring): gboolean {. + importc: "g_vfs_unregister_uri_scheme", libprag.} + +proc unregisterUriScheme*(self: Vfs; scheme: string): bool = + toBool(g_vfs_unregister_uri_scheme(cast[ptr Vfs00](self.impl), cstring(scheme))) + +type + VfsClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + isActive*: proc(vfs: ptr Vfs00): gboolean {.cdecl.} + getFileForPath*: proc(vfs: ptr Vfs00; path: cstring): ptr File00 {.cdecl.} + getFileForUri*: proc(vfs: ptr Vfs00; uri: cstring): ptr File00 {.cdecl.} + getSupportedUriSchemes*: proc(vfs: ptr Vfs00): cstringArray {.cdecl.} + parseName*: proc(vfs: ptr Vfs00; parseName: cstring): ptr File00 {.cdecl.} + localFileAddInfo*: proc(vfs: ptr Vfs00; filename: cstring; device: uint64; + attributeMatcher: ptr FileAttributeMatcher00; info: ptr FileInfo00; cancellable: ptr Cancellable00; + extraData: pointer; freeExtraData: ptr DestroyNotify) {.cdecl.} + addWritableNamespaces*: proc(vfs: ptr Vfs00; list: ptr FileAttributeInfoList00) {.cdecl.} + localFileSetAttributes*: proc(vfs: ptr Vfs00; filename: cstring; info: ptr FileInfo00; + flags: FileQueryInfoFlags; cancellable: ptr Cancellable00): gboolean {.cdecl.} + localFileRemoved*: proc(vfs: ptr Vfs00; filename: cstring) {.cdecl.} + localFileMoved*: proc(vfs: ptr Vfs00; source: cstring; dest: cstring) {.cdecl.} + deserializeIcon*: pointer + gReserved1*: pointer + gReserved2*: pointer + gReserved3*: pointer + gReserved4*: pointer + gReserved5*: pointer + gReserved6*: pointer + VfsClass* = ref object + impl*: ptr VfsClass00 + +type + VfsFileLookupFunc* = proc (vfs: ptr Vfs00; identifier: cstring; userData: pointer): ptr File00 {.cdecl.} + +proc g_vfs_register_uri_scheme*(self: ptr Vfs00; scheme: cstring; uriFunc: VfsFileLookupFunc; + uriData: pointer; uriDestroy: DestroyNotify; parseNameFunc: VfsFileLookupFunc; parseNameData: pointer; + parseNameDestroy: DestroyNotify): gboolean {. + importc: "g_vfs_register_uri_scheme", libprag.} + +proc registerUriScheme*(self: Vfs; scheme: string; uriFunc: VfsFileLookupFunc; + uriData: pointer; uriDestroy: DestroyNotify; parseNameFunc: VfsFileLookupFunc; parseNameData: pointer; + parseNameDestroy: DestroyNotify): bool = + toBool(g_vfs_register_uri_scheme(cast[ptr Vfs00](self.impl), cstring(scheme), uriFunc, uriData, uriDestroy, parseNameFunc, parseNameData, parseNameDestroy)) + +type + VolumeIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + changed*: proc(volume: ptr Volume00) {.cdecl.} + removed*: proc(volume: ptr Volume00) {.cdecl.} + getName*: proc(volume: ptr Volume00): cstring {.cdecl.} + getIcon*: proc(volume: ptr Volume00): ptr Icon00 {.cdecl.} + getUuid*: proc(volume: ptr Volume00): cstring {.cdecl.} + getDrive*: proc(volume: ptr Volume00): ptr Drive00 {.cdecl.} + getMount*: proc(volume: ptr Volume00): ptr Mount00 {.cdecl.} + canMount*: proc(volume: ptr Volume00): gboolean {.cdecl.} + canEject*: proc(volume: ptr Volume00): gboolean {.cdecl.} + mountFn*: proc(volume: ptr Volume00; flags: MountMountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + mountFinish*: proc(volume: ptr Volume00; resu: ptr AsyncResult00): gboolean {.cdecl.} + eject*: proc(volume: ptr Volume00; flags: MountUnmountFlags; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {.cdecl.} + ejectFinish*: proc(volume: ptr Volume00; resu: ptr AsyncResult00): gboolean {.cdecl.} + getIdentifier*: proc(volume: ptr Volume00; kind: cstring): cstring {.cdecl.} + enumerateIdentifiers*: proc(volume: ptr Volume00): cstringArray {.cdecl.} + shouldAutomount*: proc(volume: ptr Volume00): gboolean {.cdecl.} + getActivationRoot*: proc(volume: ptr Volume00): ptr File00 {.cdecl.} + ejectWithOperation*: proc(volume: ptr Volume00; flags: MountUnmountFlags; mountOperation: ptr MountOperation00; + cancellable: ptr Cancellable00; callback: AsyncReadyCallback; + userData: pointer) {.cdecl.} + ejectWithOperationFinish*: proc(volume: ptr Volume00; resu: ptr AsyncResult00): gboolean {.cdecl.} + getSortKey*: proc(volume: ptr Volume00): cstring {.cdecl.} + getSymbolicIcon*: proc(volume: ptr Volume00): ptr Icon00 {.cdecl.} + VolumeIface* = ref object + impl*: ptr VolumeIface00 + +type + ZlibCompressor* = ref object of gobject.Object + ZlibCompressor00* = object of gobject.Object00 + +proc g_zlib_compressor_get_file_info*(self: ptr ZlibCompressor00): ptr FileInfo00 {. + importc: "g_zlib_compressor_get_file_info", libprag.} + +proc getFileInfo*(self: ZlibCompressor): FileInfo = + let gobj = g_zlib_compressor_get_file_info(cast[ptr ZlibCompressor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fileInfo*(self: ZlibCompressor): FileInfo = + let gobj = g_zlib_compressor_get_file_info(cast[ptr ZlibCompressor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_zlib_compressor_set_file_info*(self: ptr ZlibCompressor00; fileInfo: ptr FileInfo00) {. + importc: "g_zlib_compressor_set_file_info", libprag.} + +proc setFileInfo*(self: ZlibCompressor; fileInfo: FileInfo) = + g_zlib_compressor_set_file_info(cast[ptr ZlibCompressor00](self.impl), cast[ptr FileInfo00](fileInfo.impl)) + +proc `fileInfo=`*(self: ZlibCompressor; fileInfo: FileInfo) = + g_zlib_compressor_set_file_info(cast[ptr ZlibCompressor00](self.impl), cast[ptr FileInfo00](fileInfo.impl)) + +type + ZlibCompressorFormat* {.size: sizeof(cint), pure.} = enum + zlib = 0 + gzip = 1 + raw = 2 + +proc g_zlib_compressor_new*(format: ZlibCompressorFormat; level: int32): ptr ZlibCompressor00 {. + importc: "g_zlib_compressor_new", libprag.} + +proc newZlibCompressor*(format: ZlibCompressorFormat; level: int): ZlibCompressor = + new(result, finalizeGObject) + result.impl = g_zlib_compressor_new(format, int32(level)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initZlibCompressor*[T](result: var T; format: ZlibCompressorFormat; level: int) = + assert(result is ZlibCompressor) + new(result, finalizeGObject) + result.impl = g_zlib_compressor_new(format, int32(level)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ZlibCompressorClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + ZlibCompressorClass* = ref object + impl*: ptr ZlibCompressorClass00 + +type + ZlibDecompressor* = ref object of gobject.Object + ZlibDecompressor00* = object of gobject.Object00 + +proc g_zlib_decompressor_new*(format: ZlibCompressorFormat): ptr ZlibDecompressor00 {. + importc: "g_zlib_decompressor_new", libprag.} + +proc newZlibDecompressor*(format: ZlibCompressorFormat): ZlibDecompressor = + new(result, finalizeGObject) + result.impl = g_zlib_decompressor_new(format) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initZlibDecompressor*[T](result: var T; format: ZlibCompressorFormat) = + assert(result is ZlibDecompressor) + new(result, finalizeGObject) + result.impl = g_zlib_decompressor_new(format) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_zlib_decompressor_get_file_info*(self: ptr ZlibDecompressor00): ptr FileInfo00 {. + importc: "g_zlib_decompressor_get_file_info", libprag.} + +proc getFileInfo*(self: ZlibDecompressor): FileInfo = + let gobj = g_zlib_decompressor_get_file_info(cast[ptr ZlibDecompressor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fileInfo*(self: ZlibDecompressor): FileInfo = + let gobj = g_zlib_decompressor_get_file_info(cast[ptr ZlibDecompressor00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FileInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ZlibDecompressorClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + ZlibDecompressorClass* = ref object + impl*: ptr ZlibDecompressorClass00 + +proc g_bus_get*(busType: BusType; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_bus_get", libprag.} + +proc busGet*(busType: BusType; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_bus_get(busType, cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_bus_get_finish*(res: ptr AsyncResult00): ptr DBusConnection00 {. + importc: "g_bus_get_finish", libprag.} + +proc busGetFinish*(res: AsyncResult): DBusConnection = + let gobj = g_bus_get_finish(cast[ptr AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_bus_get_sync*(busType: BusType; cancellable: ptr Cancellable00): ptr DBusConnection00 {. + importc: "g_bus_get_sync", libprag.} + +proc busGetSync*(busType: BusType; cancellable: Cancellable): DBusConnection = + let gobj = g_bus_get_sync(busType, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[DBusConnection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_bus_own_name_on_connection_with_closures*(connection: ptr DBusConnection00; name: cstring; flags: BusNameOwnerFlags; + nameAcquiredClosure: ptr gobject.Closure00; nameLostClosure: ptr gobject.Closure00): uint32 {. + importc: "g_bus_own_name_on_connection_with_closures", libprag.} + +proc busOwnNameOnConnection*(connection: DBusConnection; name: string; flags: BusNameOwnerFlags; + nameAcquiredClosure: gobject.Closure; nameLostClosure: gobject.Closure): int = + int(g_bus_own_name_on_connection_with_closures(cast[ptr DBusConnection00](connection.impl), cstring(name), flags, cast[ptr gobject.Closure00](nameAcquiredClosure.impl), cast[ptr gobject.Closure00](nameLostClosure.impl))) + +proc g_bus_own_name_with_closures*(busType: BusType; name: cstring; flags: BusNameOwnerFlags; + busAcquiredClosure: ptr gobject.Closure00; nameAcquiredClosure: ptr gobject.Closure00; + nameLostClosure: ptr gobject.Closure00): uint32 {. + importc: "g_bus_own_name_with_closures", libprag.} + +proc busOwnName*(busType: BusType; name: string; flags: BusNameOwnerFlags; + busAcquiredClosure: gobject.Closure; nameAcquiredClosure: gobject.Closure; nameLostClosure: gobject.Closure): int = + int(g_bus_own_name_with_closures(busType, cstring(name), flags, cast[ptr gobject.Closure00](busAcquiredClosure.impl), cast[ptr gobject.Closure00](nameAcquiredClosure.impl), cast[ptr gobject.Closure00](nameLostClosure.impl))) + +proc g_bus_unown_name*(ownerId: uint32) {. + importc: "g_bus_unown_name", libprag.} + +proc busUnownName*(ownerId: uint32) {. + importc: "g_bus_unown_name", libprag.} + +proc g_bus_unwatch_name*(watcherId: uint32) {. + importc: "g_bus_unwatch_name", libprag.} + +proc busUnwatchName*(watcherId: uint32) {. + importc: "g_bus_unwatch_name", libprag.} + +proc g_bus_watch_name_on_connection_with_closures*(connection: ptr DBusConnection00; name: cstring; flags: BusNameWatcherFlags; + nameAppearedClosure: ptr gobject.Closure00; nameVanishedClosure: ptr gobject.Closure00): uint32 {. + importc: "g_bus_watch_name_on_connection_with_closures", libprag.} + +proc busWatchNameOnConnection*(connection: DBusConnection; name: string; flags: BusNameWatcherFlags; + nameAppearedClosure: gobject.Closure; nameVanishedClosure: gobject.Closure): int = + int(g_bus_watch_name_on_connection_with_closures(cast[ptr DBusConnection00](connection.impl), cstring(name), flags, cast[ptr gobject.Closure00](nameAppearedClosure.impl), cast[ptr gobject.Closure00](nameVanishedClosure.impl))) + +proc g_bus_watch_name_with_closures*(busType: BusType; name: cstring; flags: BusNameWatcherFlags; + nameAppearedClosure: ptr gobject.Closure00; nameVanishedClosure: ptr gobject.Closure00): uint32 {. + importc: "g_bus_watch_name_with_closures", libprag.} + +proc busWatchName*(busType: BusType; name: string; flags: BusNameWatcherFlags; + nameAppearedClosure: gobject.Closure; nameVanishedClosure: gobject.Closure): int = + int(g_bus_watch_name_with_closures(busType, cstring(name), flags, cast[ptr gobject.Closure00](nameAppearedClosure.impl), cast[ptr gobject.Closure00](nameVanishedClosure.impl))) + +proc g_content_type_can_be_executable*(`type`: cstring): gboolean {. + importc: "g_content_type_can_be_executable", libprag.} + +proc contentTypeCanBeExecutable*(`type`: cstring): gboolean {. + importc: "g_content_type_can_be_executable", libprag.} + +proc g_content_type_equals*(type1: cstring; type2: cstring): gboolean {. + importc: "g_content_type_equals", libprag.} + +proc contentTypeEquals*(type1: cstring; type2: cstring): gboolean {. + importc: "g_content_type_equals", libprag.} + +proc g_content_type_from_mime_type*(mimeType: cstring): cstring {. + importc: "g_content_type_from_mime_type", libprag.} + +proc contentTypeFromMimeType*(mimeType: string): string = + let resul0 = g_content_type_from_mime_type(cstring(mimeType)) + result = $resul0 + cogfree(resul0) + +proc g_content_type_get_description*(`type`: cstring): cstring {. + importc: "g_content_type_get_description", libprag.} + +proc contentTypeGetDescription*(`type`: string): string = + let resul0 = g_content_type_get_description(cstring(`type`)) + result = $resul0 + cogfree(resul0) + +proc g_content_type_get_generic_icon_name*(`type`: cstring): cstring {. + importc: "g_content_type_get_generic_icon_name", libprag.} + +proc contentTypeGetGenericIconName*(`type`: string): string = + let resul0 = g_content_type_get_generic_icon_name(cstring(`type`)) + result = $resul0 + cogfree(resul0) + +proc g_content_type_get_icon*(`type`: cstring): ptr Icon00 {. + importc: "g_content_type_get_icon", libprag.} + +proc contentTypeGetIcon*(`type`: string): Icon = + new(result) + result.impl = g_content_type_get_icon(cstring(`type`)) + +proc g_content_type_get_mime_type*(`type`: cstring): cstring {. + importc: "g_content_type_get_mime_type", libprag.} + +proc contentTypeGetMimeType*(`type`: string): string = + let resul0 = g_content_type_get_mime_type(cstring(`type`)) + result = $resul0 + cogfree(resul0) + +proc g_content_type_get_symbolic_icon*(`type`: cstring): ptr Icon00 {. + importc: "g_content_type_get_symbolic_icon", libprag.} + +proc contentTypeGetSymbolicIcon*(`type`: string): Icon = + new(result) + result.impl = g_content_type_get_symbolic_icon(cstring(`type`)) + +proc g_content_type_guess*(filename: cstring; data: uint8Array; dataSize: uint64; + resultUncertain: var gboolean): cstring {. + importc: "g_content_type_guess", libprag.} + +proc contentTypeGuess*(filename: string; data: uint8Array; dataSize: uint64; + resultUncertain: var bool): string = + var resultUncertain_00 = gboolean(resultUncertain) + let resul0 = g_content_type_guess(cstring(filename), data, dataSize, resultUncertain_00) + result = $resul0 + cogfree(resul0) + resultUncertain = toBool(resultUncertain_00) + +proc g_content_type_guess_for_tree*(root: ptr File00): cstringArray {. + importc: "g_content_type_guess_for_tree", libprag.} + +proc contentTypeGuessForTree*(root: File): cstringArray = + g_content_type_guess_for_tree(cast[ptr File00](root.impl)) + +proc g_content_type_is_a*(`type`: cstring; supertype: cstring): gboolean {. + importc: "g_content_type_is_a", libprag.} + +proc contentTypeIsA*(`type`: cstring; supertype: cstring): gboolean {. + importc: "g_content_type_is_a", libprag.} + +proc g_content_type_is_unknown*(`type`: cstring): gboolean {. + importc: "g_content_type_is_unknown", libprag.} + +proc contentTypeIsUnknown*(`type`: cstring): gboolean {. + importc: "g_content_type_is_unknown", libprag.} + +proc g_content_types_get_registered*(): ptr pointer {. + importc: "g_content_types_get_registered", libprag.} + +proc contentTypesGetRegistered*(): ptr pointer {. + importc: "g_content_types_get_registered", libprag.} + +proc g_dbus_address_escape_value*(string: cstring): cstring {. + importc: "g_dbus_address_escape_value", libprag.} + +proc dbusAddressEscapeValue*(string: string): string = + let resul0 = g_dbus_address_escape_value(cstring(string)) + result = $resul0 + cogfree(resul0) + +proc g_dbus_address_get_for_bus_sync*(busType: BusType; cancellable: ptr Cancellable00): cstring {. + importc: "g_dbus_address_get_for_bus_sync", libprag.} + +proc dbusAddressGetForBusSync*(busType: BusType; cancellable: Cancellable): string = + let resul0 = g_dbus_address_get_for_bus_sync(busType, cast[ptr Cancellable00](cancellable.impl)) + result = $resul0 + cogfree(resul0) + +proc g_dbus_address_get_stream*(address: cstring; cancellable: ptr Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "g_dbus_address_get_stream", libprag.} + +proc dbusAddressGetStream*(address: string; cancellable: Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + g_dbus_address_get_stream(cstring(address), cast[ptr Cancellable00](cancellable.impl), callback, userData) + +proc g_dbus_address_get_stream_finish*(res: ptr AsyncResult00; outGuid: var cstring): ptr IOStream00 {. + importc: "g_dbus_address_get_stream_finish", libprag.} + +proc dbusAddressGetStreamFinish*(res: AsyncResult; outGuid: var string): IOStream = + var outGuid_00 = cstring(outGuid) + let gobj = g_dbus_address_get_stream_finish(cast[ptr AsyncResult00](res.impl), outGuid_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + outGuid = $(outGuid_00) + +proc g_dbus_address_get_stream_sync*(address: cstring; outGuid: var cstring; cancellable: ptr Cancellable00): ptr IOStream00 {. + importc: "g_dbus_address_get_stream_sync", libprag.} + +proc dbusAddressGetStreamSync*(address: string; outGuid: var string; cancellable: Cancellable): IOStream = + var outGuid_00 = cstring(outGuid) + let gobj = g_dbus_address_get_stream_sync(cstring(address), outGuid_00, cast[ptr Cancellable00](cancellable.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IOStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + outGuid = $(outGuid_00) + +proc g_dbus_generate_guid*(): cstring {. + importc: "g_dbus_generate_guid", libprag.} + +proc dbusGenerateGuid*(): string = + let resul0 = g_dbus_generate_guid() + result = $resul0 + cogfree(resul0) + +proc g_dbus_gvalue_to_gvariant*(gvalue: ptr gobject.Value00; `type`: ptr glib.VariantType00): ptr glib.Variant00 {. + importc: "g_dbus_gvalue_to_gvariant", libprag.} + +proc dbusGvalueToGvariant*(gvalue: gobject.Value; `type`: glib.VariantType): glib.Variant = + new(result) + result.impl = g_dbus_gvalue_to_gvariant(cast[ptr gobject.Value00](gvalue.impl), cast[ptr glib.VariantType00](`type`.impl)) + +proc g_dbus_gvariant_to_gvalue*(value: ptr glib.Variant00; outGvalue: var gobject.Value00) {. + importc: "g_dbus_gvariant_to_gvalue", libprag.} + +proc dbusGvariantToGvalue*(value: ptr glib.Variant00; outGvalue: var gobject.Value00) {. + importc: "g_dbus_gvariant_to_gvalue", libprag.} + +proc g_dbus_is_address*(string: cstring): gboolean {. + importc: "g_dbus_is_address", libprag.} + +proc dbusIsAddress*(string: cstring): gboolean {. + importc: "g_dbus_is_address", libprag.} + +proc g_dbus_is_guid*(string: cstring): gboolean {. + importc: "g_dbus_is_guid", libprag.} + +proc dbusIsGuid*(string: cstring): gboolean {. + importc: "g_dbus_is_guid", libprag.} + +proc g_dbus_is_interface_name*(string: cstring): gboolean {. + importc: "g_dbus_is_interface_name", libprag.} + +proc dbusIsInterfaceName*(string: cstring): gboolean {. + importc: "g_dbus_is_interface_name", libprag.} + +proc g_dbus_is_member_name*(string: cstring): gboolean {. + importc: "g_dbus_is_member_name", libprag.} + +proc dbusIsMemberName*(string: cstring): gboolean {. + importc: "g_dbus_is_member_name", libprag.} + +proc g_dbus_is_name*(string: cstring): gboolean {. + importc: "g_dbus_is_name", libprag.} + +proc dbusIsName*(string: cstring): gboolean {. + importc: "g_dbus_is_name", libprag.} + +proc g_dbus_is_supported_address*(string: cstring): gboolean {. + importc: "g_dbus_is_supported_address", libprag.} + +proc dbusIsSupportedAddress*(string: cstring): gboolean {. + importc: "g_dbus_is_supported_address", libprag.} + +proc g_dbus_is_unique_name*(string: cstring): gboolean {. + importc: "g_dbus_is_unique_name", libprag.} + +proc dbusIsUniqueName*(string: cstring): gboolean {. + importc: "g_dbus_is_unique_name", libprag.} + +proc g_io_error_from_errno*(errNo: int32): IOErrorEnum {. + importc: "g_io_error_from_errno", libprag.} + +proc ioErrorFromErrno*(errNo: int32): IOErrorEnum {. + importc: "g_io_error_from_errno", libprag.} + +proc g_io_error_quark*(): uint32 {. + importc: "g_io_error_quark", libprag.} + +proc ioErrorQuark*(): uint32 {. + importc: "g_io_error_quark", libprag.} + +proc g_io_modules_load_all_in_directory*(dirname: ucstring): ptr pointer {. + importc: "g_io_modules_load_all_in_directory", libprag.} + +proc ioModulesLoadAllInDirectory*(dirname: ucstring): ptr pointer {. + importc: "g_io_modules_load_all_in_directory", libprag.} + +proc g_io_modules_load_all_in_directory_with_scope*(dirname: ucstring; scope: ptr IOModuleScope00): ptr pointer {. + importc: "g_io_modules_load_all_in_directory_with_scope", libprag.} + +proc ioModulesLoadAllInDirectoryWithScope*(dirname: ucstring; scope: IOModuleScope): ptr pointer = + g_io_modules_load_all_in_directory_with_scope(dirname, cast[ptr IOModuleScope00](scope.impl)) + +proc g_io_modules_scan_all_in_directory*(dirname: ucstring) {. + importc: "g_io_modules_scan_all_in_directory", libprag.} + +proc ioModulesScanAllInDirectory*(dirname: ucstring) {. + importc: "g_io_modules_scan_all_in_directory", libprag.} + +proc g_io_modules_scan_all_in_directory_with_scope*(dirname: ucstring; scope: ptr IOModuleScope00) {. + importc: "g_io_modules_scan_all_in_directory_with_scope", libprag.} + +proc ioModulesScanAllInDirectoryWithScope*(dirname: ucstring; scope: IOModuleScope) = + g_io_modules_scan_all_in_directory_with_scope(dirname, cast[ptr IOModuleScope00](scope.impl)) + +proc g_io_scheduler_cancel_all_jobs*() {. + importc: "g_io_scheduler_cancel_all_jobs", libprag.} + +proc ioSchedulerCancelAllJobs*() {. + importc: "g_io_scheduler_cancel_all_jobs", libprag.} + +proc g_io_scheduler_push_job*(jobFunc: IOSchedulerJobFunc; userData: pointer; notify: DestroyNotify; + ioPriority: int32; cancellable: ptr Cancellable00) {. + importc: "g_io_scheduler_push_job", libprag.} + +proc ioSchedulerPushJob*(jobFunc: IOSchedulerJobFunc; userData: pointer; notify: DestroyNotify; + ioPriority: int; cancellable: Cancellable) = + g_io_scheduler_push_job(jobFunc, userData, notify, int32(ioPriority), cast[ptr Cancellable00](cancellable.impl)) + +proc g_networking_init*() {. + importc: "g_networking_init", libprag.} + +proc networkingInit*() {. + importc: "g_networking_init", libprag.} + +proc g_pollable_source_new*(pollableStream: ptr gobject.Object00): ptr glib.Source00 {. + importc: "g_pollable_source_new", libprag.} + +proc pollableSourceNew*(pollableStream: gobject.Object): glib.Source = + new(result) + result.impl = g_pollable_source_new(cast[ptr gobject.Object00](pollableStream.impl)) + +proc g_pollable_source_new_full*(pollableStream: ptr gobject.Object00; childSource: ptr glib.Source00; + cancellable: ptr Cancellable00): ptr glib.Source00 {. + importc: "g_pollable_source_new_full", libprag.} + +proc pollableSourceNewFull*(pollableStream: gobject.Object; childSource: glib.Source; + cancellable: Cancellable): glib.Source = + new(result) + result.impl = g_pollable_source_new_full(cast[ptr gobject.Object00](pollableStream.impl), cast[ptr glib.Source00](childSource.impl), cast[ptr Cancellable00](cancellable.impl)) + +proc g_pollable_stream_read*(stream: ptr InputStream00; buffer: uint8Array; count: uint64; + blocking: gboolean; cancellable: ptr Cancellable00): int64 {. + importc: "g_pollable_stream_read", libprag.} + +proc pollableStreamRead*(stream: InputStream; buffer: uint8Array; count: uint64; + blocking: bool; cancellable: Cancellable): int64 = + g_pollable_stream_read(cast[ptr InputStream00](stream.impl), buffer, count, gboolean(blocking), cast[ptr Cancellable00](cancellable.impl)) + +proc g_pollable_stream_write*(stream: ptr OutputStream00; buffer: uint8Array; count: uint64; + blocking: gboolean; cancellable: ptr Cancellable00): int64 {. + importc: "g_pollable_stream_write", libprag.} + +proc pollableStreamWrite*(stream: OutputStream; buffer: uint8Array; count: uint64; + blocking: bool; cancellable: Cancellable): int64 = + g_pollable_stream_write(cast[ptr OutputStream00](stream.impl), buffer, count, gboolean(blocking), cast[ptr Cancellable00](cancellable.impl)) + +proc g_pollable_stream_write_all*(stream: ptr OutputStream00; buffer: uint8Array; count: uint64; + blocking: gboolean; bytesWritten: var uint64; cancellable: ptr Cancellable00): gboolean {. + importc: "g_pollable_stream_write_all", libprag.} + +proc pollableStreamWriteAll*(stream: OutputStream; buffer: uint8Array; count: uint64; + blocking: bool; bytesWritten: var uint64; cancellable: Cancellable): bool = + toBool(g_pollable_stream_write_all(cast[ptr OutputStream00](stream.impl), buffer, count, gboolean(blocking), bytesWritten, cast[ptr Cancellable00](cancellable.impl))) + +proc g_resources_enumerate_children*(path: cstring; lookupFlags: ResourceLookupFlags): cstringArray {. + importc: "g_resources_enumerate_children", libprag.} + +proc resourcesEnumerateChildren*(path: cstring; lookupFlags: ResourceLookupFlags): cstringArray {. + importc: "g_resources_enumerate_children", libprag.} + +proc g_resources_get_info*(path: cstring; lookupFlags: ResourceLookupFlags; size: var uint64; + flags: var uint32): gboolean {. + importc: "g_resources_get_info", libprag.} + +proc resourcesGetInfo*(path: cstring; lookupFlags: ResourceLookupFlags; size: var uint64; + flags: var uint32): gboolean {. + importc: "g_resources_get_info", libprag.} + +proc g_resources_lookup_data*(path: cstring; lookupFlags: ResourceLookupFlags): ptr glib.Bytes00 {. + importc: "g_resources_lookup_data", libprag.} + +proc resourcesLookupData*(path: string; lookupFlags: ResourceLookupFlags): glib.Bytes = + new(result) + result.impl = g_resources_lookup_data(cstring(path), lookupFlags) + +proc g_resources_open_stream*(path: cstring; lookupFlags: ResourceLookupFlags): ptr InputStream00 {. + importc: "g_resources_open_stream", libprag.} + +proc resourcesOpenStream*(path: string; lookupFlags: ResourceLookupFlags): InputStream = + let gobj = g_resources_open_stream(cstring(path), lookupFlags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[InputStream](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_simple_async_report_gerror_in_idle*(`object`: ptr gobject.Object00; callback: AsyncReadyCallback; + userData: pointer; error: ptr Error00) {. + importc: "g_simple_async_report_gerror_in_idle", libprag.} + +proc simpleAsyncReportGerrorInIdle*(`object`: gobject.Object; callback: AsyncReadyCallback; + userData: pointer; error: ptr Error00) = + g_simple_async_report_gerror_in_idle(cast[ptr gobject.Object00](`object`.impl), callback, userData, error) + +proc g_unix_is_mount_path_system_internal*(mountPath: ucstring): gboolean {. + importc: "g_unix_is_mount_path_system_internal", libprag.} + +proc unixIsMountPathSystemInternal*(mountPath: ucstring): gboolean {. + importc: "g_unix_is_mount_path_system_internal", libprag.} + +proc g_unix_mount_compare*(mount1: ptr UnixMountEntry00; mount2: ptr UnixMountEntry00): int32 {. + importc: "g_unix_mount_compare", libprag.} + +proc unixMountCompare*(mount1: UnixMountEntry; mount2: UnixMountEntry): int = + int(g_unix_mount_compare(cast[ptr UnixMountEntry00](mount1.impl), cast[ptr UnixMountEntry00](mount2.impl))) + +proc g_unix_mount_free*(mountEntry: ptr UnixMountEntry00) {. + importc: "g_unix_mount_free", libprag.} + +proc unixMountFree*(mountEntry: UnixMountEntry) = + g_unix_mount_free(cast[ptr UnixMountEntry00](mountEntry.impl)) + +proc g_unix_mount_get_device_path*(mountEntry: ptr UnixMountEntry00): ucstring {. + importc: "g_unix_mount_get_device_path", libprag.} + +proc unixMountGetDevicePath*(mountEntry: UnixMountEntry): ucstring = + g_unix_mount_get_device_path(cast[ptr UnixMountEntry00](mountEntry.impl)) + +proc g_unix_mount_get_fs_type*(mountEntry: ptr UnixMountEntry00): cstring {. + importc: "g_unix_mount_get_fs_type", libprag.} + +proc unixMountGetFsType*(mountEntry: UnixMountEntry): string = + let resul0 = g_unix_mount_get_fs_type(cast[ptr UnixMountEntry00](mountEntry.impl)) + result = $resul0 + +proc g_unix_mount_get_mount_path*(mountEntry: ptr UnixMountEntry00): ucstring {. + importc: "g_unix_mount_get_mount_path", libprag.} + +proc unixMountGetMountPath*(mountEntry: UnixMountEntry): ucstring = + g_unix_mount_get_mount_path(cast[ptr UnixMountEntry00](mountEntry.impl)) + +proc g_unix_mount_guess_can_eject*(mountEntry: ptr UnixMountEntry00): gboolean {. + importc: "g_unix_mount_guess_can_eject", libprag.} + +proc unixMountGuessCanEject*(mountEntry: UnixMountEntry): bool = + toBool(g_unix_mount_guess_can_eject(cast[ptr UnixMountEntry00](mountEntry.impl))) + +proc g_unix_mount_guess_icon*(mountEntry: ptr UnixMountEntry00): ptr Icon00 {. + importc: "g_unix_mount_guess_icon", libprag.} + +proc unixMountGuessIcon*(mountEntry: UnixMountEntry): Icon = + new(result) + result.impl = g_unix_mount_guess_icon(cast[ptr UnixMountEntry00](mountEntry.impl)) + +proc g_unix_mount_guess_name*(mountEntry: ptr UnixMountEntry00): cstring {. + importc: "g_unix_mount_guess_name", libprag.} + +proc unixMountGuessName*(mountEntry: UnixMountEntry): string = + let resul0 = g_unix_mount_guess_name(cast[ptr UnixMountEntry00](mountEntry.impl)) + result = $resul0 + cogfree(resul0) + +proc g_unix_mount_guess_should_display*(mountEntry: ptr UnixMountEntry00): gboolean {. + importc: "g_unix_mount_guess_should_display", libprag.} + +proc unixMountGuessShouldDisplay*(mountEntry: UnixMountEntry): bool = + toBool(g_unix_mount_guess_should_display(cast[ptr UnixMountEntry00](mountEntry.impl))) + +proc g_unix_mount_guess_symbolic_icon*(mountEntry: ptr UnixMountEntry00): ptr Icon00 {. + importc: "g_unix_mount_guess_symbolic_icon", libprag.} + +proc unixMountGuessSymbolicIcon*(mountEntry: UnixMountEntry): Icon = + new(result) + result.impl = g_unix_mount_guess_symbolic_icon(cast[ptr UnixMountEntry00](mountEntry.impl)) + +proc g_unix_mount_is_readonly*(mountEntry: ptr UnixMountEntry00): gboolean {. + importc: "g_unix_mount_is_readonly", libprag.} + +proc unixMountIsReadonly*(mountEntry: UnixMountEntry): bool = + toBool(g_unix_mount_is_readonly(cast[ptr UnixMountEntry00](mountEntry.impl))) + +proc g_unix_mount_is_system_internal*(mountEntry: ptr UnixMountEntry00): gboolean {. + importc: "g_unix_mount_is_system_internal", libprag.} + +proc unixMountIsSystemInternal*(mountEntry: UnixMountEntry): bool = + toBool(g_unix_mount_is_system_internal(cast[ptr UnixMountEntry00](mountEntry.impl))) + +proc g_unix_mount_points_changed_since*(time: uint64): gboolean {. + importc: "g_unix_mount_points_changed_since", libprag.} + +proc unixMountPointsChangedSince*(time: uint64): gboolean {. + importc: "g_unix_mount_points_changed_since", libprag.} + +proc g_unix_mounts_changed_since*(time: uint64): gboolean {. + importc: "g_unix_mounts_changed_since", libprag.} + +proc unixMountsChangedSince*(time: uint64): gboolean {. + importc: "g_unix_mounts_changed_since", libprag.} +# === remaining symbols: + +proc run*(self: Application): int = + int(g_application_run(cast[ptr Application00](self.impl), 0, nil)) diff --git a/gintro/glib.nim b/gintro/glib.nim new file mode 100644 index 0000000..eef6d4c --- /dev/null +++ b/gintro/glib.nim @@ -0,0 +1,10450 @@ +# dependencies: +# immediate dependencies: +# libraries: +# libglib-2.0.so.0,libgobject-2.0.so.0 +{.deadCodeElim: on.} + +const Lib* = "libglib-2.0.so.0" +{.pragma: libprag, cdecl, dynlib: Lib.} +type + OptionEntry00Array* = pointer +type + int8Array* = pointer +type + uintArray* = pointer +type + gbooleanArray* = pointer +type + cdoubleArray* = pointer +type + int32Array* = pointer +type + PollFD00Array* = pointer +type + Variant00Array* = pointer +type + LogField00Array* = pointer +type + VariantType00Array* = pointer +type + DebugKey00Array* = pointer +type + utf8Array* = pointer +type + uint8Array* = pointer +type + ucstringArray* = pointer +type + ucstring* = distinct cstring +type + gboolean* = distinct cint +type + GType* = distinct cint +type + gunichar* = uint32 +type + utf8* = char +const GFalse = gboolean(0) +const GTrue = gboolean(1) +proc cogfree*(mem: pointer) {.importc: "g_free", libprag.} +proc toBool*(g: gboolean): bool = g.int != 0 + +const ANALYZER_ANALYZING* = 1'i32 + +const ASCII_DTOSTR_BUF_SIZE* = 39'i32 + +type + Array00* {.pure.} = object + data*: cstring + len*: uint32 + Array* = ref object + impl*: ptr Array00 + +type + AsciiType* {.size: sizeof(cint), pure.} = enum + alnum = 1 + alpha = 2 + cntrl = 4 + digit = 8 + graph = 16 + lower = 32 + print = 64 + punct = 128 + space = 256 + upper = 512 + xdigit = 1024 + +type + AsyncQueue00* {.pure.} = object + AsyncQueue* = ref object + impl*: ptr AsyncQueue00 + +proc g_async_queue_length*(self: ptr AsyncQueue00): int32 {. + importc: "g_async_queue_length", libprag.} + +proc length*(self: AsyncQueue): int = + int(g_async_queue_length(cast[ptr AsyncQueue00](self.impl))) + +proc g_async_queue_length_unlocked*(self: ptr AsyncQueue00): int32 {. + importc: "g_async_queue_length_unlocked", libprag.} + +proc lengthUnlocked*(self: AsyncQueue): int = + int(g_async_queue_length_unlocked(cast[ptr AsyncQueue00](self.impl))) + +proc g_async_queue_lock*(self: ptr AsyncQueue00) {. + importc: "g_async_queue_lock", libprag.} + +proc lock*(self: AsyncQueue) = + g_async_queue_lock(cast[ptr AsyncQueue00](self.impl)) + +proc g_async_queue_pop*(self: ptr AsyncQueue00): pointer {. + importc: "g_async_queue_pop", libprag.} + +proc pop*(self: AsyncQueue): pointer = + g_async_queue_pop(cast[ptr AsyncQueue00](self.impl)) + +proc g_async_queue_pop_unlocked*(self: ptr AsyncQueue00): pointer {. + importc: "g_async_queue_pop_unlocked", libprag.} + +proc popUnlocked*(self: AsyncQueue): pointer = + g_async_queue_pop_unlocked(cast[ptr AsyncQueue00](self.impl)) + +proc g_async_queue_push*(self: ptr AsyncQueue00; data: pointer) {. + importc: "g_async_queue_push", libprag.} + +proc push*(self: AsyncQueue; data: pointer) = + g_async_queue_push(cast[ptr AsyncQueue00](self.impl), data) + +proc g_async_queue_push_front*(self: ptr AsyncQueue00; item: pointer) {. + importc: "g_async_queue_push_front", libprag.} + +proc pushFront*(self: AsyncQueue; item: pointer) = + g_async_queue_push_front(cast[ptr AsyncQueue00](self.impl), item) + +proc g_async_queue_push_front_unlocked*(self: ptr AsyncQueue00; item: pointer) {. + importc: "g_async_queue_push_front_unlocked", libprag.} + +proc pushFrontUnlocked*(self: AsyncQueue; item: pointer) = + g_async_queue_push_front_unlocked(cast[ptr AsyncQueue00](self.impl), item) + +proc g_async_queue_push_unlocked*(self: ptr AsyncQueue00; data: pointer) {. + importc: "g_async_queue_push_unlocked", libprag.} + +proc pushUnlocked*(self: AsyncQueue; data: pointer) = + g_async_queue_push_unlocked(cast[ptr AsyncQueue00](self.impl), data) + +proc g_async_queue_ref_unlocked*(self: ptr AsyncQueue00) {. + importc: "g_async_queue_ref_unlocked", libprag.} + +proc refUnlocked*(self: AsyncQueue) = + g_async_queue_ref_unlocked(cast[ptr AsyncQueue00](self.impl)) + +proc g_async_queue_remove*(self: ptr AsyncQueue00; item: pointer): gboolean {. + importc: "g_async_queue_remove", libprag.} + +proc remove*(self: AsyncQueue; item: pointer): bool = + toBool(g_async_queue_remove(cast[ptr AsyncQueue00](self.impl), item)) + +proc g_async_queue_remove_unlocked*(self: ptr AsyncQueue00; item: pointer): gboolean {. + importc: "g_async_queue_remove_unlocked", libprag.} + +proc removeUnlocked*(self: AsyncQueue; item: pointer): bool = + toBool(g_async_queue_remove_unlocked(cast[ptr AsyncQueue00](self.impl), item)) + +proc g_async_queue_timeout_pop*(self: ptr AsyncQueue00; timeout: uint64): pointer {. + importc: "g_async_queue_timeout_pop", libprag.} + +proc timeoutPop*(self: AsyncQueue; timeout: uint64): pointer = + g_async_queue_timeout_pop(cast[ptr AsyncQueue00](self.impl), timeout) + +proc g_async_queue_timeout_pop_unlocked*(self: ptr AsyncQueue00; timeout: uint64): pointer {. + importc: "g_async_queue_timeout_pop_unlocked", libprag.} + +proc timeoutPopUnlocked*(self: AsyncQueue; timeout: uint64): pointer = + g_async_queue_timeout_pop_unlocked(cast[ptr AsyncQueue00](self.impl), timeout) + +proc g_async_queue_try_pop*(self: ptr AsyncQueue00): pointer {. + importc: "g_async_queue_try_pop", libprag.} + +proc tryPop*(self: AsyncQueue): pointer = + g_async_queue_try_pop(cast[ptr AsyncQueue00](self.impl)) + +proc g_async_queue_try_pop_unlocked*(self: ptr AsyncQueue00): pointer {. + importc: "g_async_queue_try_pop_unlocked", libprag.} + +proc tryPopUnlocked*(self: AsyncQueue): pointer = + g_async_queue_try_pop_unlocked(cast[ptr AsyncQueue00](self.impl)) + +proc g_async_queue_unlock*(self: ptr AsyncQueue00) {. + importc: "g_async_queue_unlock", libprag.} + +proc unlock*(self: AsyncQueue) = + g_async_queue_unlock(cast[ptr AsyncQueue00](self.impl)) + +proc g_async_queue_unref*(self: ptr AsyncQueue00) {. + importc: "g_async_queue_unref", libprag.} + +proc unref*(self: AsyncQueue) = + g_async_queue_unref(cast[ptr AsyncQueue00](self.impl)) + +proc g_async_queue_unref_and_unlock*(self: ptr AsyncQueue00) {. + importc: "g_async_queue_unref_and_unlock", libprag.} + +proc unrefAndUnlock*(self: AsyncQueue) = + g_async_queue_unref_and_unlock(cast[ptr AsyncQueue00](self.impl)) + +type + TimeVal00* {.pure.} = object + tvSec*: int64 + tvUsec*: int64 + TimeVal* = ref object + impl*: ptr TimeVal00 + +proc g_time_val_add*(self: ptr TimeVal00; microseconds: int64) {. + importc: "g_time_val_add", libprag.} + +proc add*(self: TimeVal; microseconds: int64) = + g_time_val_add(cast[ptr TimeVal00](self.impl), microseconds) + +proc g_time_val_to_iso8601*(self: ptr TimeVal00): cstring {. + importc: "g_time_val_to_iso8601", libprag.} + +proc toIso8601*(self: TimeVal): string = + let resul0 = g_time_val_to_iso8601(cast[ptr TimeVal00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_time_val_from_iso8601*(isoDate: cstring; time: var TimeVal00): gboolean {. + importc: "g_time_val_from_iso8601", libprag.} + +proc fromIso8601*(isoDate: cstring; time: var TimeVal00): gboolean {. + importc: "g_time_val_from_iso8601", libprag.} + +proc g_async_queue_timed_pop*(self: ptr AsyncQueue00; endTime: ptr TimeVal00): pointer {. + importc: "g_async_queue_timed_pop", libprag.} + +proc timedPop*(self: AsyncQueue; endTime: TimeVal): pointer = + g_async_queue_timed_pop(cast[ptr AsyncQueue00](self.impl), cast[ptr TimeVal00](endTime.impl)) + +proc g_async_queue_timed_pop_unlocked*(self: ptr AsyncQueue00; endTime: ptr TimeVal00): pointer {. + importc: "g_async_queue_timed_pop_unlocked", libprag.} + +proc timedPopUnlocked*(self: AsyncQueue; endTime: TimeVal): pointer = + g_async_queue_timed_pop_unlocked(cast[ptr AsyncQueue00](self.impl), cast[ptr TimeVal00](endTime.impl)) + +const BIG_ENDIAN* = 4321'i32 + +type + BookmarkFile00* {.pure.} = object + BookmarkFile* = ref object + impl*: ptr BookmarkFile00 + +proc g_bookmark_file_add_application*(self: ptr BookmarkFile00; uri: cstring; name: cstring; + exec: cstring) {. + importc: "g_bookmark_file_add_application", libprag.} + +proc addApplication*(self: BookmarkFile; uri: string; name: string; exec: string) = + g_bookmark_file_add_application(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(name), cstring(exec)) + +proc g_bookmark_file_add_group*(self: ptr BookmarkFile00; uri: cstring; group: cstring) {. + importc: "g_bookmark_file_add_group", libprag.} + +proc addGroup*(self: BookmarkFile; uri: string; group: string) = + g_bookmark_file_add_group(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(group)) + +proc g_bookmark_file_free*(self: ptr BookmarkFile00) {. + importc: "g_bookmark_file_free", libprag.} + +proc free*(self: BookmarkFile) = + g_bookmark_file_free(cast[ptr BookmarkFile00](self.impl)) + +proc g_bookmark_file_get_added*(self: ptr BookmarkFile00; uri: cstring): int64 {. + importc: "g_bookmark_file_get_added", libprag.} + +proc getAdded*(self: BookmarkFile; uri: string): int64 = + g_bookmark_file_get_added(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + +proc added*(self: BookmarkFile; uri: string): int64 = + g_bookmark_file_get_added(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + +proc g_bookmark_file_get_app_info*(self: ptr BookmarkFile00; uri: cstring; name: cstring; + exec: var cstring; count: var uint32; stamp: var int64): gboolean {. + importc: "g_bookmark_file_get_app_info", libprag.} + +proc getAppInfo*(self: BookmarkFile; uri: string; name: string; exec: var string; + count: var int; stamp: var int64): bool = + var exec_00 = cstring(exec) + var count_00 = uint32(count) + result = toBool(g_bookmark_file_get_app_info(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(name), exec_00, count_00, stamp)) + exec = $(exec_00) + count = int(count_00) + +proc appInfo*(self: BookmarkFile; uri: string; name: string; exec: var string; + count: var int; stamp: var int64): bool = + var exec_00 = cstring(exec) + var count_00 = uint32(count) + result = toBool(g_bookmark_file_get_app_info(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(name), exec_00, count_00, stamp)) + exec = $(exec_00) + count = int(count_00) + +proc g_bookmark_file_get_applications*(self: ptr BookmarkFile00; uri: cstring; length: var uint64): cstringArray {. + importc: "g_bookmark_file_get_applications", libprag.} + +proc getApplications*(self: BookmarkFile; uri: string; length: var uint64): cstringArray = + g_bookmark_file_get_applications(cast[ptr BookmarkFile00](self.impl), cstring(uri), length) + +proc applications*(self: BookmarkFile; uri: string; length: var uint64): cstringArray = + g_bookmark_file_get_applications(cast[ptr BookmarkFile00](self.impl), cstring(uri), length) + +proc g_bookmark_file_get_description*(self: ptr BookmarkFile00; uri: cstring): cstring {. + importc: "g_bookmark_file_get_description", libprag.} + +proc getDescription*(self: BookmarkFile; uri: string): string = + let resul0 = g_bookmark_file_get_description(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + result = $resul0 + cogfree(resul0) + +proc description*(self: BookmarkFile; uri: string): string = + let resul0 = g_bookmark_file_get_description(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + result = $resul0 + cogfree(resul0) + +proc g_bookmark_file_get_groups*(self: ptr BookmarkFile00; uri: cstring; length: var uint64): cstringArray {. + importc: "g_bookmark_file_get_groups", libprag.} + +proc getGroups*(self: BookmarkFile; uri: string; length: var uint64): cstringArray = + g_bookmark_file_get_groups(cast[ptr BookmarkFile00](self.impl), cstring(uri), length) + +proc groups*(self: BookmarkFile; uri: string; length: var uint64): cstringArray = + g_bookmark_file_get_groups(cast[ptr BookmarkFile00](self.impl), cstring(uri), length) + +proc g_bookmark_file_get_icon*(self: ptr BookmarkFile00; uri: cstring; href: var cstring; + mimeType: var cstring): gboolean {. + importc: "g_bookmark_file_get_icon", libprag.} + +proc getIcon*(self: BookmarkFile; uri: string; href: var string; + mimeType: var string): bool = + var href_00 = cstring(href) + var mimeType_00 = cstring(mimeType) + result = toBool(g_bookmark_file_get_icon(cast[ptr BookmarkFile00](self.impl), cstring(uri), href_00, mimeType_00)) + href = $(href_00) + mimeType = $(mimeType_00) + +proc icon*(self: BookmarkFile; uri: string; href: var string; + mimeType: var string): bool = + var href_00 = cstring(href) + var mimeType_00 = cstring(mimeType) + result = toBool(g_bookmark_file_get_icon(cast[ptr BookmarkFile00](self.impl), cstring(uri), href_00, mimeType_00)) + href = $(href_00) + mimeType = $(mimeType_00) + +proc g_bookmark_file_get_is_private*(self: ptr BookmarkFile00; uri: cstring): gboolean {. + importc: "g_bookmark_file_get_is_private", libprag.} + +proc getIsPrivate*(self: BookmarkFile; uri: string): bool = + toBool(g_bookmark_file_get_is_private(cast[ptr BookmarkFile00](self.impl), cstring(uri))) + +proc isPrivate*(self: BookmarkFile; uri: string): bool = + toBool(g_bookmark_file_get_is_private(cast[ptr BookmarkFile00](self.impl), cstring(uri))) + +proc g_bookmark_file_get_mime_type*(self: ptr BookmarkFile00; uri: cstring): cstring {. + importc: "g_bookmark_file_get_mime_type", libprag.} + +proc getMimeType*(self: BookmarkFile; uri: string): string = + let resul0 = g_bookmark_file_get_mime_type(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + result = $resul0 + cogfree(resul0) + +proc mimeType*(self: BookmarkFile; uri: string): string = + let resul0 = g_bookmark_file_get_mime_type(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + result = $resul0 + cogfree(resul0) + +proc g_bookmark_file_get_modified*(self: ptr BookmarkFile00; uri: cstring): int64 {. + importc: "g_bookmark_file_get_modified", libprag.} + +proc getModified*(self: BookmarkFile; uri: string): int64 = + g_bookmark_file_get_modified(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + +proc modified*(self: BookmarkFile; uri: string): int64 = + g_bookmark_file_get_modified(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + +proc g_bookmark_file_get_size*(self: ptr BookmarkFile00): int32 {. + importc: "g_bookmark_file_get_size", libprag.} + +proc getSize*(self: BookmarkFile): int = + int(g_bookmark_file_get_size(cast[ptr BookmarkFile00](self.impl))) + +proc size*(self: BookmarkFile): int = + int(g_bookmark_file_get_size(cast[ptr BookmarkFile00](self.impl))) + +proc g_bookmark_file_get_title*(self: ptr BookmarkFile00; uri: cstring): cstring {. + importc: "g_bookmark_file_get_title", libprag.} + +proc getTitle*(self: BookmarkFile; uri: string): string = + let resul0 = g_bookmark_file_get_title(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + result = $resul0 + cogfree(resul0) + +proc title*(self: BookmarkFile; uri: string): string = + let resul0 = g_bookmark_file_get_title(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + result = $resul0 + cogfree(resul0) + +proc g_bookmark_file_get_uris*(self: ptr BookmarkFile00; length: var uint64): cstringArray {. + importc: "g_bookmark_file_get_uris", libprag.} + +proc getUris*(self: BookmarkFile; length: var uint64): cstringArray = + g_bookmark_file_get_uris(cast[ptr BookmarkFile00](self.impl), length) + +proc uris*(self: BookmarkFile; length: var uint64): cstringArray = + g_bookmark_file_get_uris(cast[ptr BookmarkFile00](self.impl), length) + +proc g_bookmark_file_get_visited*(self: ptr BookmarkFile00; uri: cstring): int64 {. + importc: "g_bookmark_file_get_visited", libprag.} + +proc getVisited*(self: BookmarkFile; uri: string): int64 = + g_bookmark_file_get_visited(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + +proc visited*(self: BookmarkFile; uri: string): int64 = + g_bookmark_file_get_visited(cast[ptr BookmarkFile00](self.impl), cstring(uri)) + +proc g_bookmark_file_has_application*(self: ptr BookmarkFile00; uri: cstring; name: cstring): gboolean {. + importc: "g_bookmark_file_has_application", libprag.} + +proc hasApplication*(self: BookmarkFile; uri: string; name: string): bool = + toBool(g_bookmark_file_has_application(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(name))) + +proc g_bookmark_file_has_group*(self: ptr BookmarkFile00; uri: cstring; group: cstring): gboolean {. + importc: "g_bookmark_file_has_group", libprag.} + +proc hasGroup*(self: BookmarkFile; uri: string; group: string): bool = + toBool(g_bookmark_file_has_group(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(group))) + +proc g_bookmark_file_has_item*(self: ptr BookmarkFile00; uri: cstring): gboolean {. + importc: "g_bookmark_file_has_item", libprag.} + +proc hasItem*(self: BookmarkFile; uri: string): bool = + toBool(g_bookmark_file_has_item(cast[ptr BookmarkFile00](self.impl), cstring(uri))) + +proc g_bookmark_file_load_from_data*(self: ptr BookmarkFile00; data: cstring; length: uint64): gboolean {. + importc: "g_bookmark_file_load_from_data", libprag.} + +proc loadFromData*(self: BookmarkFile; data: string; length: uint64): bool = + toBool(g_bookmark_file_load_from_data(cast[ptr BookmarkFile00](self.impl), cstring(data), length)) + +proc g_bookmark_file_load_from_data_dirs*(self: ptr BookmarkFile00; file: ucstring; fullPath: ucstring): gboolean {. + importc: "g_bookmark_file_load_from_data_dirs", libprag.} + +proc loadFromDataDirs*(self: BookmarkFile; file: ucstring; fullPath: ucstring): bool = + toBool(g_bookmark_file_load_from_data_dirs(cast[ptr BookmarkFile00](self.impl), file, fullPath)) + +proc g_bookmark_file_load_from_file*(self: ptr BookmarkFile00; filename: ucstring): gboolean {. + importc: "g_bookmark_file_load_from_file", libprag.} + +proc loadFromFile*(self: BookmarkFile; filename: ucstring): bool = + toBool(g_bookmark_file_load_from_file(cast[ptr BookmarkFile00](self.impl), filename)) + +proc g_bookmark_file_move_item*(self: ptr BookmarkFile00; oldUri: cstring; newUri: cstring): gboolean {. + importc: "g_bookmark_file_move_item", libprag.} + +proc moveItem*(self: BookmarkFile; oldUri: string; newUri: string): bool = + toBool(g_bookmark_file_move_item(cast[ptr BookmarkFile00](self.impl), cstring(oldUri), cstring(newUri))) + +proc g_bookmark_file_remove_application*(self: ptr BookmarkFile00; uri: cstring; name: cstring): gboolean {. + importc: "g_bookmark_file_remove_application", libprag.} + +proc removeApplication*(self: BookmarkFile; uri: string; name: string): bool = + toBool(g_bookmark_file_remove_application(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(name))) + +proc g_bookmark_file_remove_group*(self: ptr BookmarkFile00; uri: cstring; group: cstring): gboolean {. + importc: "g_bookmark_file_remove_group", libprag.} + +proc removeGroup*(self: BookmarkFile; uri: string; group: string): bool = + toBool(g_bookmark_file_remove_group(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(group))) + +proc g_bookmark_file_remove_item*(self: ptr BookmarkFile00; uri: cstring): gboolean {. + importc: "g_bookmark_file_remove_item", libprag.} + +proc removeItem*(self: BookmarkFile; uri: string): bool = + toBool(g_bookmark_file_remove_item(cast[ptr BookmarkFile00](self.impl), cstring(uri))) + +proc g_bookmark_file_set_added*(self: ptr BookmarkFile00; uri: cstring; added: int64) {. + importc: "g_bookmark_file_set_added", libprag.} + +proc setAdded*(self: BookmarkFile; uri: string; added: int64) = + g_bookmark_file_set_added(cast[ptr BookmarkFile00](self.impl), cstring(uri), added) + +proc g_bookmark_file_set_app_info*(self: ptr BookmarkFile00; uri: cstring; name: cstring; + exec: cstring; count: int32; stamp: int64): gboolean {. + importc: "g_bookmark_file_set_app_info", libprag.} + +proc setAppInfo*(self: BookmarkFile; uri: string; name: string; exec: string; + count: int; stamp: int64): bool = + toBool(g_bookmark_file_set_app_info(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(name), cstring(exec), int32(count), stamp)) + +proc g_bookmark_file_set_description*(self: ptr BookmarkFile00; uri: cstring; description: cstring) {. + importc: "g_bookmark_file_set_description", libprag.} + +proc setDescription*(self: BookmarkFile; uri: string; description: string) = + g_bookmark_file_set_description(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(description)) + +proc g_bookmark_file_set_groups*(self: ptr BookmarkFile00; uri: cstring; groups: cstring; + length: uint64) {. + importc: "g_bookmark_file_set_groups", libprag.} + +proc setGroups*(self: BookmarkFile; uri: string; groups: string; length: uint64) = + g_bookmark_file_set_groups(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(groups), length) + +proc g_bookmark_file_set_icon*(self: ptr BookmarkFile00; uri: cstring; href: cstring; + mimeType: cstring) {. + importc: "g_bookmark_file_set_icon", libprag.} + +proc setIcon*(self: BookmarkFile; uri: string; href: string; mimeType: string) = + g_bookmark_file_set_icon(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(href), cstring(mimeType)) + +proc g_bookmark_file_set_is_private*(self: ptr BookmarkFile00; uri: cstring; isPrivate: gboolean) {. + importc: "g_bookmark_file_set_is_private", libprag.} + +proc setIsPrivate*(self: BookmarkFile; uri: string; isPrivate: bool) = + g_bookmark_file_set_is_private(cast[ptr BookmarkFile00](self.impl), cstring(uri), gboolean(isPrivate)) + +proc g_bookmark_file_set_mime_type*(self: ptr BookmarkFile00; uri: cstring; mimeType: cstring) {. + importc: "g_bookmark_file_set_mime_type", libprag.} + +proc setMimeType*(self: BookmarkFile; uri: string; mimeType: string) = + g_bookmark_file_set_mime_type(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(mimeType)) + +proc g_bookmark_file_set_modified*(self: ptr BookmarkFile00; uri: cstring; modified: int64) {. + importc: "g_bookmark_file_set_modified", libprag.} + +proc setModified*(self: BookmarkFile; uri: string; modified: int64) = + g_bookmark_file_set_modified(cast[ptr BookmarkFile00](self.impl), cstring(uri), modified) + +proc g_bookmark_file_set_title*(self: ptr BookmarkFile00; uri: cstring; title: cstring) {. + importc: "g_bookmark_file_set_title", libprag.} + +proc setTitle*(self: BookmarkFile; uri: string; title: string) = + g_bookmark_file_set_title(cast[ptr BookmarkFile00](self.impl), cstring(uri), cstring(title)) + +proc g_bookmark_file_set_visited*(self: ptr BookmarkFile00; uri: cstring; visited: int64) {. + importc: "g_bookmark_file_set_visited", libprag.} + +proc setVisited*(self: BookmarkFile; uri: string; visited: int64) = + g_bookmark_file_set_visited(cast[ptr BookmarkFile00](self.impl), cstring(uri), visited) + +proc g_bookmark_file_to_data*(self: ptr BookmarkFile00; length: var uint64): cstring {. + importc: "g_bookmark_file_to_data", libprag.} + +proc toData*(self: BookmarkFile; length: var uint64): string = + let resul0 = g_bookmark_file_to_data(cast[ptr BookmarkFile00](self.impl), length) + result = $resul0 + cogfree(resul0) + +proc g_bookmark_file_to_file*(self: ptr BookmarkFile00; filename: ucstring): gboolean {. + importc: "g_bookmark_file_to_file", libprag.} + +proc toFile*(self: BookmarkFile; filename: ucstring): bool = + toBool(g_bookmark_file_to_file(cast[ptr BookmarkFile00](self.impl), filename)) + +proc g_bookmark_file_error_quark*(): uint32 {. + importc: "g_bookmark_file_error_quark", libprag.} + +type + BookmarkFileError* {.size: sizeof(cint), pure.} = enum + invalidUri = 0 + invalidValue = 1 + appNotRegistered = 2 + uriNotFound = 3 + read = 4 + unknownEncoding = 5 + write = 6 + fileNotFound = 7 + +type + ByteArray00* {.pure.} = object + data*: ptr uint8 + len*: uint32 + ByteArray* = ref object + impl*: ptr ByteArray00 + +proc g_byte_array_free*(array: ptr ByteArray00; freeSegment: gboolean): ptr uint8 {. + importc: "g_byte_array_free", libprag.} + +proc free*(array: ptr ByteArray00; freeSegment: gboolean): ptr uint8 {. + importc: "g_byte_array_free", libprag.} + +proc g_byte_array_new*(): ptr ByteArray00 {. + importc: "g_byte_array_new", libprag.} + +proc new*(): ptr ByteArray00 {. + importc: "g_byte_array_new", libprag.} + +proc g_byte_array_new_take*(data: uint8Array; len: uint64): ptr ByteArray00 {. + importc: "g_byte_array_new_take", libprag.} + +proc newTake*(data: uint8Array; len: uint64): ptr ByteArray00 {. + importc: "g_byte_array_new_take", libprag.} + +proc g_byte_array_unref*(array: ptr ByteArray00) {. + importc: "g_byte_array_unref", libprag.} + +proc unref*(array: ptr ByteArray00) {. + importc: "g_byte_array_unref", libprag.} + +type + Bytes00* {.pure.} = object + Bytes* = ref object + impl*: ptr Bytes00 + +proc g_bytes_new*(data: uint8Array; size: uint64): ptr Bytes00 {. + importc: "g_bytes_new", libprag.} + +proc newBytes*(data: uint8Array; size: uint64): Bytes = + new(result) + result.impl = g_bytes_new(data, size) + +proc initBytes*[T](result: var T; data: uint8Array; size: uint64) = + assert(result is Bytes) + new(result) + result.impl = g_bytes_new(data, size) + +proc g_bytes_new_take*(data: uint8Array; size: uint64): ptr Bytes00 {. + importc: "g_bytes_new_take", libprag.} + +proc newBytesTake*(data: uint8Array; size: uint64): Bytes = + new(result) + result.impl = g_bytes_new_take(data, size) + +proc initBytesTake*[T](result: var T; data: uint8Array; size: uint64) = + assert(result is Bytes) + new(result) + result.impl = g_bytes_new_take(data, size) + +proc g_bytes_compare*(self: ptr Bytes00; bytes2: ptr Bytes00): int32 {. + importc: "g_bytes_compare", libprag.} + +proc compare*(self: Bytes; bytes2: Bytes): int = + int(g_bytes_compare(cast[ptr Bytes00](self.impl), cast[ptr Bytes00](bytes2.impl))) + +proc g_bytes_equal*(self: ptr Bytes00; bytes2: ptr Bytes00): gboolean {. + importc: "g_bytes_equal", libprag.} + +proc equal*(self: Bytes; bytes2: Bytes): bool = + toBool(g_bytes_equal(cast[ptr Bytes00](self.impl), cast[ptr Bytes00](bytes2.impl))) + +proc g_bytes_get_data*(self: ptr Bytes00; size: var uint64): uint8Array {. + importc: "g_bytes_get_data", libprag.} + +proc getData*(self: Bytes; size: var uint64): uint8Array = + g_bytes_get_data(cast[ptr Bytes00](self.impl), size) + +proc data*(self: Bytes; size: var uint64): uint8Array = + g_bytes_get_data(cast[ptr Bytes00](self.impl), size) + +proc g_bytes_get_size*(self: ptr Bytes00): uint64 {. + importc: "g_bytes_get_size", libprag.} + +proc getSize*(self: Bytes): uint64 = + g_bytes_get_size(cast[ptr Bytes00](self.impl)) + +proc size*(self: Bytes): uint64 = + g_bytes_get_size(cast[ptr Bytes00](self.impl)) + +proc g_bytes_hash*(self: ptr Bytes00): uint32 {. + importc: "g_bytes_hash", libprag.} + +proc hash*(self: Bytes): int = + int(g_bytes_hash(cast[ptr Bytes00](self.impl))) + +proc g_bytes_new_from_bytes*(self: ptr Bytes00; offset: uint64; length: uint64): ptr Bytes00 {. + importc: "g_bytes_new_from_bytes", libprag.} + +proc newBytesFromBytes*(self: Bytes; offset: uint64; length: uint64): Bytes = + new(result) + result.impl = g_bytes_new_from_bytes(cast[ptr Bytes00](self.impl), offset, length) + +proc g_bytes_ref*(self: ptr Bytes00): ptr Bytes00 {. + importc: "g_bytes_ref", libprag.} + +proc `ref`*(self: Bytes): Bytes = + new(result) + result.impl = g_bytes_ref(cast[ptr Bytes00](self.impl)) + +proc g_bytes_unref*(self: ptr Bytes00) {. + importc: "g_bytes_unref", libprag.} + +proc unref*(self: Bytes) = + g_bytes_unref(cast[ptr Bytes00](self.impl)) + +proc g_bytes_unref_to_array*(self: ptr Bytes00): ptr ByteArray00 {. + importc: "g_bytes_unref_to_array", libprag.} + +proc unrefToArray*(self: Bytes): ptr ByteArray00 = + g_bytes_unref_to_array(cast[ptr Bytes00](self.impl)) + +proc g_bytes_unref_to_data*(self: ptr Bytes00; size: var uint64): uint8Array {. + importc: "g_bytes_unref_to_data", libprag.} + +proc unrefToData*(self: Bytes; size: var uint64): uint8Array = + g_bytes_unref_to_data(cast[ptr Bytes00](self.impl), size) + +proc g_byte_array_free_to_bytes*(array: ptr ByteArray00): ptr Bytes00 {. + importc: "g_byte_array_free_to_bytes", libprag.} + +proc freeToBytes*(array: ptr ByteArray00): Bytes = + new(result) + result.impl = g_byte_array_free_to_bytes(array) + +const CSET_A_2_Z_U* = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + +const CSET_DIGITS* = "0123456789" + +const CSET_a_2Z* = "abcdefghijklmnopqrstuvwxyz" + +type + Checksum00* {.pure.} = object + Checksum* = ref object + impl*: ptr Checksum00 + +proc g_checksum_copy*(self: ptr Checksum00): ptr Checksum00 {. + importc: "g_checksum_copy", libprag.} + +proc copy*(self: Checksum): Checksum = + new(result) + result.impl = g_checksum_copy(cast[ptr Checksum00](self.impl)) + +proc g_checksum_free*(self: ptr Checksum00) {. + importc: "g_checksum_free", libprag.} + +proc free*(self: Checksum) = + g_checksum_free(cast[ptr Checksum00](self.impl)) + +proc g_checksum_get_string*(self: ptr Checksum00): cstring {. + importc: "g_checksum_get_string", libprag.} + +proc getString*(self: Checksum): string = + let resul0 = g_checksum_get_string(cast[ptr Checksum00](self.impl)) + result = $resul0 + +proc string*(self: Checksum): string = + let resul0 = g_checksum_get_string(cast[ptr Checksum00](self.impl)) + result = $resul0 + +proc g_checksum_reset*(self: ptr Checksum00) {. + importc: "g_checksum_reset", libprag.} + +proc reset*(self: Checksum) = + g_checksum_reset(cast[ptr Checksum00](self.impl)) + +proc g_checksum_update*(self: ptr Checksum00; data: uint8Array; length: int64) {. + importc: "g_checksum_update", libprag.} + +proc update*(self: Checksum; data: uint8Array; length: int64) = + g_checksum_update(cast[ptr Checksum00](self.impl), data, length) + +type + ChecksumType* {.size: sizeof(cint), pure.} = enum + md5 = 0 + sha1 = 1 + sha256 = 2 + sha512 = 3 + +proc g_checksum_new*(checksumType: ChecksumType): ptr Checksum00 {. + importc: "g_checksum_new", libprag.} + +proc newChecksum*(checksumType: ChecksumType): Checksum = + new(result) + result.impl = g_checksum_new(checksumType) + +proc initChecksum*[T](result: var T; checksumType: ChecksumType) = + assert(result is Checksum) + new(result) + result.impl = g_checksum_new(checksumType) + +proc g_checksum_type_get_length*(checksumType: ChecksumType): int64 {. + importc: "g_checksum_type_get_length", libprag.} + +proc typeGetLength*(checksumType: ChecksumType): int64 {. + importc: "g_checksum_type_get_length", libprag.} + +type + ChildWatchFunc* = proc (pid: int32; status: int32; userData: pointer) {.cdecl.} + +type + CompareDataFunc* = proc (a: pointer; b: pointer; userData: pointer): int32 {.cdecl.} + +type + CompareFunc* = proc (a: pointer; b: pointer): int32 {.cdecl.} + +type + Cond00* {.pure.} = object + p*: pointer + i*: array[2, uint32] + Cond* = ref object + impl*: ptr Cond00 + +proc g_cond_broadcast*(self: ptr Cond00) {. + importc: "g_cond_broadcast", libprag.} + +proc broadcast*(self: Cond) = + g_cond_broadcast(cast[ptr Cond00](self.impl)) + +proc g_cond_clear*(self: ptr Cond00) {. + importc: "g_cond_clear", libprag.} + +proc clear*(self: Cond) = + g_cond_clear(cast[ptr Cond00](self.impl)) + +proc g_cond_init*(self: ptr Cond00) {. + importc: "g_cond_init", libprag.} + +proc init*(self: Cond) = + g_cond_init(cast[ptr Cond00](self.impl)) + +proc g_cond_signal*(self: ptr Cond00) {. + importc: "g_cond_signal", libprag.} + +proc signal*(self: Cond) = + g_cond_signal(cast[ptr Cond00](self.impl)) + +type + ConvertError* {.size: sizeof(cint), pure.} = enum + noConversion = 0 + illegalSequence = 1 + failed = 2 + partialInput = 3 + badUri = 4 + notAbsolutePath = 5 + noMemory = 6 + +type + CopyFunc* = proc (src: pointer; data: pointer): pointer {.cdecl.} + +const DATALIST_FLAGS_MASK* = 3'i32 + +const DATE_BAD_DAY* = 0'i32 + +const DATE_BAD_JULIAN* = 0'i32 + +const DATE_BAD_YEAR* = 0'i32 + +const DIR_SEPARATOR* = 92'i32 + +const DIR_SEPARATOR_S* = "\\" + +type + Data00* {.pure.} = object + Data* = ref object + impl*: ptr Data00 + +type + DataForeachFunc* = proc (keyId: uint32; data: pointer; userData: pointer) {.cdecl.} + +type + Date00* {.pure.} = object + julianDays*: uint32 + julian*: uint32 + dmy*: uint32 + day*: uint32 + month*: uint32 + year*: uint32 + Date* = ref object + impl*: ptr Date00 + +proc g_date_new*(): ptr Date00 {. + importc: "g_date_new", libprag.} + +proc newDate*(): Date = + new(result) + result.impl = g_date_new() + +proc initDate*[T](result: var T) = + assert(result is Date) + new(result) + result.impl = g_date_new() + +proc g_date_new_julian*(julianDay: uint32): ptr Date00 {. + importc: "g_date_new_julian", libprag.} + +proc newDateJulian*(julianDay: int): Date = + new(result) + result.impl = g_date_new_julian(uint32(julianDay)) + +proc initDateJulian*[T](result: var T; julianDay: int) = + assert(result is Date) + new(result) + result.impl = g_date_new_julian(uint32(julianDay)) + +proc g_date_add_days*(self: ptr Date00; nDays: uint32) {. + importc: "g_date_add_days", libprag.} + +proc addDays*(self: Date; nDays: int) = + g_date_add_days(cast[ptr Date00](self.impl), uint32(nDays)) + +proc g_date_add_months*(self: ptr Date00; nMonths: uint32) {. + importc: "g_date_add_months", libprag.} + +proc addMonths*(self: Date; nMonths: int) = + g_date_add_months(cast[ptr Date00](self.impl), uint32(nMonths)) + +proc g_date_add_years*(self: ptr Date00; nYears: uint32) {. + importc: "g_date_add_years", libprag.} + +proc addYears*(self: Date; nYears: int) = + g_date_add_years(cast[ptr Date00](self.impl), uint32(nYears)) + +proc g_date_clamp*(self: ptr Date00; minDate: ptr Date00; maxDate: ptr Date00) {. + importc: "g_date_clamp", libprag.} + +proc clamp*(self: Date; minDate: Date; maxDate: Date) = + g_date_clamp(cast[ptr Date00](self.impl), cast[ptr Date00](minDate.impl), cast[ptr Date00](maxDate.impl)) + +proc g_date_clear*(self: ptr Date00; nDates: uint32) {. + importc: "g_date_clear", libprag.} + +proc clear*(self: Date; nDates: int) = + g_date_clear(cast[ptr Date00](self.impl), uint32(nDates)) + +proc g_date_compare*(self: ptr Date00; rhs: ptr Date00): int32 {. + importc: "g_date_compare", libprag.} + +proc compare*(self: Date; rhs: Date): int = + int(g_date_compare(cast[ptr Date00](self.impl), cast[ptr Date00](rhs.impl))) + +proc g_date_days_between*(self: ptr Date00; date2: ptr Date00): int32 {. + importc: "g_date_days_between", libprag.} + +proc daysBetween*(self: Date; date2: Date): int = + int(g_date_days_between(cast[ptr Date00](self.impl), cast[ptr Date00](date2.impl))) + +proc g_date_free*(self: ptr Date00) {. + importc: "g_date_free", libprag.} + +proc free*(self: Date) = + g_date_free(cast[ptr Date00](self.impl)) + +proc g_date_get_day*(self: ptr Date00): uint8 {. + importc: "g_date_get_day", libprag.} + +proc getDay*(self: Date): uint8 = + g_date_get_day(cast[ptr Date00](self.impl)) + +proc day*(self: Date): uint8 = + g_date_get_day(cast[ptr Date00](self.impl)) + +proc g_date_get_day_of_year*(self: ptr Date00): uint32 {. + importc: "g_date_get_day_of_year", libprag.} + +proc getDayOfYear*(self: Date): int = + int(g_date_get_day_of_year(cast[ptr Date00](self.impl))) + +proc dayOfYear*(self: Date): int = + int(g_date_get_day_of_year(cast[ptr Date00](self.impl))) + +proc g_date_get_iso8601_week_of_year*(self: ptr Date00): uint32 {. + importc: "g_date_get_iso8601_week_of_year", libprag.} + +proc getIso8601WeekOfYear*(self: Date): int = + int(g_date_get_iso8601_week_of_year(cast[ptr Date00](self.impl))) + +proc iso8601WeekOfYear*(self: Date): int = + int(g_date_get_iso8601_week_of_year(cast[ptr Date00](self.impl))) + +proc g_date_get_julian*(self: ptr Date00): uint32 {. + importc: "g_date_get_julian", libprag.} + +proc getJulian*(self: Date): int = + int(g_date_get_julian(cast[ptr Date00](self.impl))) + +proc julian*(self: Date): int = + int(g_date_get_julian(cast[ptr Date00](self.impl))) + +proc g_date_get_monday_week_of_year*(self: ptr Date00): uint32 {. + importc: "g_date_get_monday_week_of_year", libprag.} + +proc getMondayWeekOfYear*(self: Date): int = + int(g_date_get_monday_week_of_year(cast[ptr Date00](self.impl))) + +proc mondayWeekOfYear*(self: Date): int = + int(g_date_get_monday_week_of_year(cast[ptr Date00](self.impl))) + +proc g_date_get_sunday_week_of_year*(self: ptr Date00): uint32 {. + importc: "g_date_get_sunday_week_of_year", libprag.} + +proc getSundayWeekOfYear*(self: Date): int = + int(g_date_get_sunday_week_of_year(cast[ptr Date00](self.impl))) + +proc sundayWeekOfYear*(self: Date): int = + int(g_date_get_sunday_week_of_year(cast[ptr Date00](self.impl))) + +proc g_date_get_year*(self: ptr Date00): uint16 {. + importc: "g_date_get_year", libprag.} + +proc getYear*(self: Date): uint16 = + g_date_get_year(cast[ptr Date00](self.impl)) + +proc year*(self: Date): uint16 = + g_date_get_year(cast[ptr Date00](self.impl)) + +proc g_date_is_first_of_month*(self: ptr Date00): gboolean {. + importc: "g_date_is_first_of_month", libprag.} + +proc isFirstOfMonth*(self: Date): bool = + toBool(g_date_is_first_of_month(cast[ptr Date00](self.impl))) + +proc g_date_is_last_of_month*(self: ptr Date00): gboolean {. + importc: "g_date_is_last_of_month", libprag.} + +proc isLastOfMonth*(self: Date): bool = + toBool(g_date_is_last_of_month(cast[ptr Date00](self.impl))) + +proc g_date_order*(self: ptr Date00; date2: ptr Date00) {. + importc: "g_date_order", libprag.} + +proc order*(self: Date; date2: Date) = + g_date_order(cast[ptr Date00](self.impl), cast[ptr Date00](date2.impl)) + +proc g_date_set_day*(self: ptr Date00; day: uint8) {. + importc: "g_date_set_day", libprag.} + +proc setDay*(self: Date; day: uint8) = + g_date_set_day(cast[ptr Date00](self.impl), day) + +proc `day=`*(self: Date; day: uint8) = + g_date_set_day(cast[ptr Date00](self.impl), day) + +proc g_date_set_julian*(self: ptr Date00; julianDate: uint32) {. + importc: "g_date_set_julian", libprag.} + +proc setJulian*(self: Date; julianDate: int) = + g_date_set_julian(cast[ptr Date00](self.impl), uint32(julianDate)) + +proc `julian=`*(self: Date; julianDate: int) = + g_date_set_julian(cast[ptr Date00](self.impl), uint32(julianDate)) + +proc g_date_set_parse*(self: ptr Date00; str: cstring) {. + importc: "g_date_set_parse", libprag.} + +proc setParse*(self: Date; str: string) = + g_date_set_parse(cast[ptr Date00](self.impl), cstring(str)) + +proc `parse=`*(self: Date; str: string) = + g_date_set_parse(cast[ptr Date00](self.impl), cstring(str)) + +proc g_date_set_time*(self: ptr Date00; time: int32) {. + importc: "g_date_set_time", libprag.} + +proc setTime*(self: Date; time: int) = + g_date_set_time(cast[ptr Date00](self.impl), int32(time)) + +proc `time=`*(self: Date; time: int) = + g_date_set_time(cast[ptr Date00](self.impl), int32(time)) + +proc g_date_set_time_t*(self: ptr Date00; timet: int64) {. + importc: "g_date_set_time_t", libprag.} + +proc setTimeT*(self: Date; timet: int64) = + g_date_set_time_t(cast[ptr Date00](self.impl), timet) + +proc `timeT=`*(self: Date; timet: int64) = + g_date_set_time_t(cast[ptr Date00](self.impl), timet) + +proc g_date_set_time_val*(self: ptr Date00; timeval: ptr TimeVal00) {. + importc: "g_date_set_time_val", libprag.} + +proc setTimeVal*(self: Date; timeval: TimeVal) = + g_date_set_time_val(cast[ptr Date00](self.impl), cast[ptr TimeVal00](timeval.impl)) + +proc `timeVal=`*(self: Date; timeval: TimeVal) = + g_date_set_time_val(cast[ptr Date00](self.impl), cast[ptr TimeVal00](timeval.impl)) + +proc g_date_set_year*(self: ptr Date00; year: uint16) {. + importc: "g_date_set_year", libprag.} + +proc setYear*(self: Date; year: uint16) = + g_date_set_year(cast[ptr Date00](self.impl), year) + +proc `year=`*(self: Date; year: uint16) = + g_date_set_year(cast[ptr Date00](self.impl), year) + +proc g_date_subtract_days*(self: ptr Date00; nDays: uint32) {. + importc: "g_date_subtract_days", libprag.} + +proc subtractDays*(self: Date; nDays: int) = + g_date_subtract_days(cast[ptr Date00](self.impl), uint32(nDays)) + +proc g_date_subtract_months*(self: ptr Date00; nMonths: uint32) {. + importc: "g_date_subtract_months", libprag.} + +proc subtractMonths*(self: Date; nMonths: int) = + g_date_subtract_months(cast[ptr Date00](self.impl), uint32(nMonths)) + +proc g_date_subtract_years*(self: ptr Date00; nYears: uint32) {. + importc: "g_date_subtract_years", libprag.} + +proc subtractYears*(self: Date; nYears: int) = + g_date_subtract_years(cast[ptr Date00](self.impl), uint32(nYears)) + +proc g_date_to_struct_tm*(self: ptr Date00; tm: pointer) {. + importc: "g_date_to_struct_tm", libprag.} + +proc toStructTm*(self: Date; tm: pointer) = + g_date_to_struct_tm(cast[ptr Date00](self.impl), tm) + +proc g_date_valid*(self: ptr Date00): gboolean {. + importc: "g_date_valid", libprag.} + +proc valid*(self: Date): bool = + toBool(g_date_valid(cast[ptr Date00](self.impl))) + +proc g_date_get_monday_weeks_in_year*(year: uint16): uint8 {. + importc: "g_date_get_monday_weeks_in_year", libprag.} + +proc getMondayWeeksInYear*(year: uint16): uint8 {. + importc: "g_date_get_monday_weeks_in_year", libprag.} + +proc mondayWeeksInYear*(year: uint16): uint8 {. + importc: "g_date_get_monday_weeks_in_year", libprag.} + +proc g_date_get_sunday_weeks_in_year*(year: uint16): uint8 {. + importc: "g_date_get_sunday_weeks_in_year", libprag.} + +proc getSundayWeeksInYear*(year: uint16): uint8 {. + importc: "g_date_get_sunday_weeks_in_year", libprag.} + +proc sundayWeeksInYear*(year: uint16): uint8 {. + importc: "g_date_get_sunday_weeks_in_year", libprag.} + +proc g_date_is_leap_year*(year: uint16): gboolean {. + importc: "g_date_is_leap_year", libprag.} + +proc isLeapYear*(year: uint16): gboolean {. + importc: "g_date_is_leap_year", libprag.} + +proc g_date_strftime*(s: cstring; slen: uint64; format: cstring; date: ptr Date00): uint64 {. + importc: "g_date_strftime", libprag.} + +proc strftime*(s: string; slen: uint64; format: string; date: Date): uint64 = + g_date_strftime(cstring(s), slen, cstring(format), cast[ptr Date00](date.impl)) + +proc g_date_valid_day*(day: uint8): gboolean {. + importc: "g_date_valid_day", libprag.} + +proc validDay*(day: uint8): gboolean {. + importc: "g_date_valid_day", libprag.} + +proc g_date_valid_julian*(julianDate: uint32): gboolean {. + importc: "g_date_valid_julian", libprag.} + +proc validJulian*(julianDate: uint32): gboolean {. + importc: "g_date_valid_julian", libprag.} + +proc g_date_valid_year*(year: uint16): gboolean {. + importc: "g_date_valid_year", libprag.} + +proc validYear*(year: uint16): gboolean {. + importc: "g_date_valid_year", libprag.} + +type + DateMonth* {.size: sizeof(cint), pure.} = enum + badMonth = 0 + january = 1 + february = 2 + march = 3 + april = 4 + may = 5 + june = 6 + july = 7 + august = 8 + september = 9 + october = 10 + november = 11 + december = 12 + +proc g_date_new_dmy*(day: uint8; month: DateMonth; year: uint16): ptr Date00 {. + importc: "g_date_new_dmy", libprag.} + +proc newDateDmy*(day: uint8; month: DateMonth; year: uint16): Date = + new(result) + result.impl = g_date_new_dmy(day, month, year) + +proc initDateDmy*[T](result: var T; day: uint8; month: DateMonth; year: uint16) = + assert(result is Date) + new(result) + result.impl = g_date_new_dmy(day, month, year) + +proc g_date_get_month*(self: ptr Date00): DateMonth {. + importc: "g_date_get_month", libprag.} + +proc getMonth*(self: Date): DateMonth = + g_date_get_month(cast[ptr Date00](self.impl)) + +proc month*(self: Date): DateMonth = + g_date_get_month(cast[ptr Date00](self.impl)) + +proc g_date_set_dmy*(self: ptr Date00; day: uint8; month: DateMonth; y: uint16) {. + importc: "g_date_set_dmy", libprag.} + +proc setDmy*(self: Date; day: uint8; month: DateMonth; y: uint16) = + g_date_set_dmy(cast[ptr Date00](self.impl), day, month, y) + +proc g_date_set_month*(self: ptr Date00; month: DateMonth) {. + importc: "g_date_set_month", libprag.} + +proc setMonth*(self: Date; month: DateMonth) = + g_date_set_month(cast[ptr Date00](self.impl), month) + +proc `month=`*(self: Date; month: DateMonth) = + g_date_set_month(cast[ptr Date00](self.impl), month) + +proc g_date_get_days_in_month*(month: DateMonth; year: uint16): uint8 {. + importc: "g_date_get_days_in_month", libprag.} + +proc getDaysInMonth*(month: DateMonth; year: uint16): uint8 {. + importc: "g_date_get_days_in_month", libprag.} + +proc daysInMonth*(month: DateMonth; year: uint16): uint8 {. + importc: "g_date_get_days_in_month", libprag.} + +proc g_date_valid_dmy*(day: uint8; month: DateMonth; year: uint16): gboolean {. + importc: "g_date_valid_dmy", libprag.} + +proc validDmy*(day: uint8; month: DateMonth; year: uint16): gboolean {. + importc: "g_date_valid_dmy", libprag.} + +proc g_date_valid_month*(month: DateMonth): gboolean {. + importc: "g_date_valid_month", libprag.} + +proc validMonth*(month: DateMonth): gboolean {. + importc: "g_date_valid_month", libprag.} + +type + DateWeekday* {.size: sizeof(cint), pure.} = enum + badWeekday = 0 + monday = 1 + tuesday = 2 + wednesday = 3 + thursday = 4 + friday = 5 + saturday = 6 + sunday = 7 + +proc g_date_get_weekday*(self: ptr Date00): DateWeekday {. + importc: "g_date_get_weekday", libprag.} + +proc getWeekday*(self: Date): DateWeekday = + g_date_get_weekday(cast[ptr Date00](self.impl)) + +proc weekday*(self: Date): DateWeekday = + g_date_get_weekday(cast[ptr Date00](self.impl)) + +proc g_date_valid_weekday*(weekday: DateWeekday): gboolean {. + importc: "g_date_valid_weekday", libprag.} + +proc validWeekday*(weekday: DateWeekday): gboolean {. + importc: "g_date_valid_weekday", libprag.} + +type + DateDMY* {.size: sizeof(cint), pure.} = enum + day = 0 + month = 1 + year = 2 + +type + DateTime00* {.pure.} = object + DateTime* = ref object + impl*: ptr DateTime00 + +proc g_date_time_new_from_timeval_local*(tv: ptr TimeVal00): ptr DateTime00 {. + importc: "g_date_time_new_from_timeval_local", libprag.} + +proc newDateTimeFromTimevalLocal*(tv: TimeVal): DateTime = + new(result) + result.impl = g_date_time_new_from_timeval_local(cast[ptr TimeVal00](tv.impl)) + +proc initDateTimeFromTimevalLocal*[T](result: var T; tv: TimeVal) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new_from_timeval_local(cast[ptr TimeVal00](tv.impl)) + +proc g_date_time_new_from_timeval_utc*(tv: ptr TimeVal00): ptr DateTime00 {. + importc: "g_date_time_new_from_timeval_utc", libprag.} + +proc newDateTimeFromTimevalUtc*(tv: TimeVal): DateTime = + new(result) + result.impl = g_date_time_new_from_timeval_utc(cast[ptr TimeVal00](tv.impl)) + +proc initDateTimeFromTimevalUtc*[T](result: var T; tv: TimeVal) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new_from_timeval_utc(cast[ptr TimeVal00](tv.impl)) + +proc g_date_time_new_from_unix_local*(t: int64): ptr DateTime00 {. + importc: "g_date_time_new_from_unix_local", libprag.} + +proc newDateTimeFromUnixLocal*(t: int64): DateTime = + new(result) + result.impl = g_date_time_new_from_unix_local(t) + +proc initDateTimeFromUnixLocal*[T](result: var T; t: int64) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new_from_unix_local(t) + +proc g_date_time_new_from_unix_utc*(t: int64): ptr DateTime00 {. + importc: "g_date_time_new_from_unix_utc", libprag.} + +proc newDateTimeFromUnixUtc*(t: int64): DateTime = + new(result) + result.impl = g_date_time_new_from_unix_utc(t) + +proc initDateTimeFromUnixUtc*[T](result: var T; t: int64) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new_from_unix_utc(t) + +proc g_date_time_new_local*(year: int32; month: int32; day: int32; hour: int32; + minute: int32; seconds: cdouble): ptr DateTime00 {. + importc: "g_date_time_new_local", libprag.} + +proc newDateTimeLocal*(year: int; month: int; day: int; hour: int; minute: int; + seconds: cdouble): DateTime = + new(result) + result.impl = g_date_time_new_local(int32(year), int32(month), int32(day), int32(hour), int32(minute), seconds) + +proc initDateTimeLocal*[T](result: var T; year: int; month: int; day: int; hour: int; minute: int; + seconds: cdouble) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new_local(int32(year), int32(month), int32(day), int32(hour), int32(minute), seconds) + +proc g_date_time_new_now_local*(): ptr DateTime00 {. + importc: "g_date_time_new_now_local", libprag.} + +proc newDateTimeNowLocal*(): DateTime = + new(result) + result.impl = g_date_time_new_now_local() + +proc initDateTimeNowLocal*[T](result: var T) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new_now_local() + +proc g_date_time_new_now_utc*(): ptr DateTime00 {. + importc: "g_date_time_new_now_utc", libprag.} + +proc newDateTimeNowUtc*(): DateTime = + new(result) + result.impl = g_date_time_new_now_utc() + +proc initDateTimeNowUtc*[T](result: var T) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new_now_utc() + +proc g_date_time_new_utc*(year: int32; month: int32; day: int32; hour: int32; + minute: int32; seconds: cdouble): ptr DateTime00 {. + importc: "g_date_time_new_utc", libprag.} + +proc newDateTimeUtc*(year: int; month: int; day: int; hour: int; minute: int; + seconds: cdouble): DateTime = + new(result) + result.impl = g_date_time_new_utc(int32(year), int32(month), int32(day), int32(hour), int32(minute), seconds) + +proc initDateTimeUtc*[T](result: var T; year: int; month: int; day: int; hour: int; minute: int; + seconds: cdouble) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new_utc(int32(year), int32(month), int32(day), int32(hour), int32(minute), seconds) + +proc g_date_time_add*(self: ptr DateTime00; timespan: int64): ptr DateTime00 {. + importc: "g_date_time_add", libprag.} + +proc add*(self: DateTime; timespan: int64): DateTime = + new(result) + result.impl = g_date_time_add(cast[ptr DateTime00](self.impl), timespan) + +proc g_date_time_add_days*(self: ptr DateTime00; days: int32): ptr DateTime00 {. + importc: "g_date_time_add_days", libprag.} + +proc addDays*(self: DateTime; days: int): DateTime = + new(result) + result.impl = g_date_time_add_days(cast[ptr DateTime00](self.impl), int32(days)) + +proc g_date_time_add_full*(self: ptr DateTime00; years: int32; months: int32; + days: int32; hours: int32; minutes: int32; seconds: cdouble): ptr DateTime00 {. + importc: "g_date_time_add_full", libprag.} + +proc addFull*(self: DateTime; years: int; months: int; days: int; + hours: int; minutes: int; seconds: cdouble): DateTime = + new(result) + result.impl = g_date_time_add_full(cast[ptr DateTime00](self.impl), int32(years), int32(months), int32(days), int32(hours), int32(minutes), seconds) + +proc g_date_time_add_hours*(self: ptr DateTime00; hours: int32): ptr DateTime00 {. + importc: "g_date_time_add_hours", libprag.} + +proc addHours*(self: DateTime; hours: int): DateTime = + new(result) + result.impl = g_date_time_add_hours(cast[ptr DateTime00](self.impl), int32(hours)) + +proc g_date_time_add_minutes*(self: ptr DateTime00; minutes: int32): ptr DateTime00 {. + importc: "g_date_time_add_minutes", libprag.} + +proc addMinutes*(self: DateTime; minutes: int): DateTime = + new(result) + result.impl = g_date_time_add_minutes(cast[ptr DateTime00](self.impl), int32(minutes)) + +proc g_date_time_add_months*(self: ptr DateTime00; months: int32): ptr DateTime00 {. + importc: "g_date_time_add_months", libprag.} + +proc addMonths*(self: DateTime; months: int): DateTime = + new(result) + result.impl = g_date_time_add_months(cast[ptr DateTime00](self.impl), int32(months)) + +proc g_date_time_add_seconds*(self: ptr DateTime00; seconds: cdouble): ptr DateTime00 {. + importc: "g_date_time_add_seconds", libprag.} + +proc addSeconds*(self: DateTime; seconds: cdouble): DateTime = + new(result) + result.impl = g_date_time_add_seconds(cast[ptr DateTime00](self.impl), seconds) + +proc g_date_time_add_weeks*(self: ptr DateTime00; weeks: int32): ptr DateTime00 {. + importc: "g_date_time_add_weeks", libprag.} + +proc addWeeks*(self: DateTime; weeks: int): DateTime = + new(result) + result.impl = g_date_time_add_weeks(cast[ptr DateTime00](self.impl), int32(weeks)) + +proc g_date_time_add_years*(self: ptr DateTime00; years: int32): ptr DateTime00 {. + importc: "g_date_time_add_years", libprag.} + +proc addYears*(self: DateTime; years: int): DateTime = + new(result) + result.impl = g_date_time_add_years(cast[ptr DateTime00](self.impl), int32(years)) + +proc g_date_time_difference*(self: ptr DateTime00; begin: ptr DateTime00): int64 {. + importc: "g_date_time_difference", libprag.} + +proc difference*(self: DateTime; begin: DateTime): int64 = + g_date_time_difference(cast[ptr DateTime00](self.impl), cast[ptr DateTime00](begin.impl)) + +proc g_date_time_format*(self: ptr DateTime00; format: cstring): cstring {. + importc: "g_date_time_format", libprag.} + +proc format*(self: DateTime; format: string): string = + let resul0 = g_date_time_format(cast[ptr DateTime00](self.impl), cstring(format)) + result = $resul0 + cogfree(resul0) + +proc g_date_time_get_day_of_month*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_day_of_month", libprag.} + +proc getDayOfMonth*(self: DateTime): int = + int(g_date_time_get_day_of_month(cast[ptr DateTime00](self.impl))) + +proc dayOfMonth*(self: DateTime): int = + int(g_date_time_get_day_of_month(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_day_of_week*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_day_of_week", libprag.} + +proc getDayOfWeek*(self: DateTime): int = + int(g_date_time_get_day_of_week(cast[ptr DateTime00](self.impl))) + +proc dayOfWeek*(self: DateTime): int = + int(g_date_time_get_day_of_week(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_day_of_year*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_day_of_year", libprag.} + +proc getDayOfYear*(self: DateTime): int = + int(g_date_time_get_day_of_year(cast[ptr DateTime00](self.impl))) + +proc dayOfYear*(self: DateTime): int = + int(g_date_time_get_day_of_year(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_hour*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_hour", libprag.} + +proc getHour*(self: DateTime): int = + int(g_date_time_get_hour(cast[ptr DateTime00](self.impl))) + +proc hour*(self: DateTime): int = + int(g_date_time_get_hour(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_microsecond*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_microsecond", libprag.} + +proc getMicrosecond*(self: DateTime): int = + int(g_date_time_get_microsecond(cast[ptr DateTime00](self.impl))) + +proc microsecond*(self: DateTime): int = + int(g_date_time_get_microsecond(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_minute*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_minute", libprag.} + +proc getMinute*(self: DateTime): int = + int(g_date_time_get_minute(cast[ptr DateTime00](self.impl))) + +proc minute*(self: DateTime): int = + int(g_date_time_get_minute(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_month*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_month", libprag.} + +proc getMonth*(self: DateTime): int = + int(g_date_time_get_month(cast[ptr DateTime00](self.impl))) + +proc month*(self: DateTime): int = + int(g_date_time_get_month(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_second*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_second", libprag.} + +proc getSecond*(self: DateTime): int = + int(g_date_time_get_second(cast[ptr DateTime00](self.impl))) + +proc second*(self: DateTime): int = + int(g_date_time_get_second(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_seconds*(self: ptr DateTime00): cdouble {. + importc: "g_date_time_get_seconds", libprag.} + +proc getSeconds*(self: DateTime): cdouble = + g_date_time_get_seconds(cast[ptr DateTime00](self.impl)) + +proc seconds*(self: DateTime): cdouble = + g_date_time_get_seconds(cast[ptr DateTime00](self.impl)) + +proc g_date_time_get_timezone_abbreviation*(self: ptr DateTime00): cstring {. + importc: "g_date_time_get_timezone_abbreviation", libprag.} + +proc getTimezoneAbbreviation*(self: DateTime): string = + let resul0 = g_date_time_get_timezone_abbreviation(cast[ptr DateTime00](self.impl)) + result = $resul0 + +proc timezoneAbbreviation*(self: DateTime): string = + let resul0 = g_date_time_get_timezone_abbreviation(cast[ptr DateTime00](self.impl)) + result = $resul0 + +proc g_date_time_get_utc_offset*(self: ptr DateTime00): int64 {. + importc: "g_date_time_get_utc_offset", libprag.} + +proc getUtcOffset*(self: DateTime): int64 = + g_date_time_get_utc_offset(cast[ptr DateTime00](self.impl)) + +proc utcOffset*(self: DateTime): int64 = + g_date_time_get_utc_offset(cast[ptr DateTime00](self.impl)) + +proc g_date_time_get_week_numbering_year*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_week_numbering_year", libprag.} + +proc getWeekNumberingYear*(self: DateTime): int = + int(g_date_time_get_week_numbering_year(cast[ptr DateTime00](self.impl))) + +proc weekNumberingYear*(self: DateTime): int = + int(g_date_time_get_week_numbering_year(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_week_of_year*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_week_of_year", libprag.} + +proc getWeekOfYear*(self: DateTime): int = + int(g_date_time_get_week_of_year(cast[ptr DateTime00](self.impl))) + +proc weekOfYear*(self: DateTime): int = + int(g_date_time_get_week_of_year(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_year*(self: ptr DateTime00): int32 {. + importc: "g_date_time_get_year", libprag.} + +proc getYear*(self: DateTime): int = + int(g_date_time_get_year(cast[ptr DateTime00](self.impl))) + +proc year*(self: DateTime): int = + int(g_date_time_get_year(cast[ptr DateTime00](self.impl))) + +proc g_date_time_get_ymd*(self: ptr DateTime00; year: var int32; month: var int32; + day: var int32) {. + importc: "g_date_time_get_ymd", libprag.} + +proc getYmd*(self: DateTime; year: var int; month: var int; day: var int) = + var day_00 = int32(day) + var month_00 = int32(month) + var year_00 = int32(year) + g_date_time_get_ymd(cast[ptr DateTime00](self.impl), year_00, month_00, day_00) + day = int(day_00) + month = int(month_00) + year = int(year_00) + +proc ymd*(self: DateTime; year: var int; month: var int; day: var int) = + var day_00 = int32(day) + var month_00 = int32(month) + var year_00 = int32(year) + g_date_time_get_ymd(cast[ptr DateTime00](self.impl), year_00, month_00, day_00) + day = int(day_00) + month = int(month_00) + year = int(year_00) + +proc g_date_time_is_daylight_savings*(self: ptr DateTime00): gboolean {. + importc: "g_date_time_is_daylight_savings", libprag.} + +proc isDaylightSavings*(self: DateTime): bool = + toBool(g_date_time_is_daylight_savings(cast[ptr DateTime00](self.impl))) + +proc g_date_time_ref*(self: ptr DateTime00): ptr DateTime00 {. + importc: "g_date_time_ref", libprag.} + +proc `ref`*(self: DateTime): DateTime = + new(result) + result.impl = g_date_time_ref(cast[ptr DateTime00](self.impl)) + +proc g_date_time_to_local*(self: ptr DateTime00): ptr DateTime00 {. + importc: "g_date_time_to_local", libprag.} + +proc toLocal*(self: DateTime): DateTime = + new(result) + result.impl = g_date_time_to_local(cast[ptr DateTime00](self.impl)) + +proc g_date_time_to_timeval*(self: ptr DateTime00; tv: ptr TimeVal00): gboolean {. + importc: "g_date_time_to_timeval", libprag.} + +proc toTimeval*(self: DateTime; tv: TimeVal): bool = + toBool(g_date_time_to_timeval(cast[ptr DateTime00](self.impl), cast[ptr TimeVal00](tv.impl))) + +proc g_date_time_to_unix*(self: ptr DateTime00): int64 {. + importc: "g_date_time_to_unix", libprag.} + +proc toUnix*(self: DateTime): int64 = + g_date_time_to_unix(cast[ptr DateTime00](self.impl)) + +proc g_date_time_to_utc*(self: ptr DateTime00): ptr DateTime00 {. + importc: "g_date_time_to_utc", libprag.} + +proc toUtc*(self: DateTime): DateTime = + new(result) + result.impl = g_date_time_to_utc(cast[ptr DateTime00](self.impl)) + +proc g_date_time_unref*(self: ptr DateTime00) {. + importc: "g_date_time_unref", libprag.} + +proc unref*(self: DateTime) = + g_date_time_unref(cast[ptr DateTime00](self.impl)) + +proc g_date_time_compare*(dt1: pointer; dt2: pointer): int32 {. + importc: "g_date_time_compare", libprag.} + +proc compare*(dt1: pointer; dt2: pointer): int32 {. + importc: "g_date_time_compare", libprag.} + +proc g_date_time_equal*(dt1: pointer; dt2: pointer): gboolean {. + importc: "g_date_time_equal", libprag.} + +proc equal*(dt1: pointer; dt2: pointer): gboolean {. + importc: "g_date_time_equal", libprag.} + +proc g_date_time_hash*(datetime: pointer): uint32 {. + importc: "g_date_time_hash", libprag.} + +proc hash*(datetime: pointer): uint32 {. + importc: "g_date_time_hash", libprag.} + +type + TimeZone00* {.pure.} = object + TimeZone* = ref object + impl*: ptr TimeZone00 + +proc g_time_zone_new*(identifier: cstring): ptr TimeZone00 {. + importc: "g_time_zone_new", libprag.} + +proc newTimeZone*(identifier: string): TimeZone = + new(result) + result.impl = g_time_zone_new(cstring(identifier)) + +proc initTimeZone*[T](result: var T; identifier: string) = + assert(result is TimeZone) + new(result) + result.impl = g_time_zone_new(cstring(identifier)) + +proc g_time_zone_new_local*(): ptr TimeZone00 {. + importc: "g_time_zone_new_local", libprag.} + +proc newTimeZoneLocal*(): TimeZone = + new(result) + result.impl = g_time_zone_new_local() + +proc initTimeZoneLocal*[T](result: var T) = + assert(result is TimeZone) + new(result) + result.impl = g_time_zone_new_local() + +proc g_time_zone_new_utc*(): ptr TimeZone00 {. + importc: "g_time_zone_new_utc", libprag.} + +proc newTimeZoneUtc*(): TimeZone = + new(result) + result.impl = g_time_zone_new_utc() + +proc initTimeZoneUtc*[T](result: var T) = + assert(result is TimeZone) + new(result) + result.impl = g_time_zone_new_utc() + +proc g_time_zone_get_abbreviation*(self: ptr TimeZone00; interval: int32): cstring {. + importc: "g_time_zone_get_abbreviation", libprag.} + +proc getAbbreviation*(self: TimeZone; interval: int): string = + let resul0 = g_time_zone_get_abbreviation(cast[ptr TimeZone00](self.impl), int32(interval)) + result = $resul0 + +proc abbreviation*(self: TimeZone; interval: int): string = + let resul0 = g_time_zone_get_abbreviation(cast[ptr TimeZone00](self.impl), int32(interval)) + result = $resul0 + +proc g_time_zone_get_offset*(self: ptr TimeZone00; interval: int32): int32 {. + importc: "g_time_zone_get_offset", libprag.} + +proc getOffset*(self: TimeZone; interval: int): int = + int(g_time_zone_get_offset(cast[ptr TimeZone00](self.impl), int32(interval))) + +proc offset*(self: TimeZone; interval: int): int = + int(g_time_zone_get_offset(cast[ptr TimeZone00](self.impl), int32(interval))) + +proc g_time_zone_is_dst*(self: ptr TimeZone00; interval: int32): gboolean {. + importc: "g_time_zone_is_dst", libprag.} + +proc isDst*(self: TimeZone; interval: int): bool = + toBool(g_time_zone_is_dst(cast[ptr TimeZone00](self.impl), int32(interval))) + +proc g_time_zone_ref*(self: ptr TimeZone00): ptr TimeZone00 {. + importc: "g_time_zone_ref", libprag.} + +proc `ref`*(self: TimeZone): TimeZone = + new(result) + result.impl = g_time_zone_ref(cast[ptr TimeZone00](self.impl)) + +proc g_time_zone_unref*(self: ptr TimeZone00) {. + importc: "g_time_zone_unref", libprag.} + +proc unref*(self: TimeZone) = + g_time_zone_unref(cast[ptr TimeZone00](self.impl)) + +proc g_date_time_new*(tz: ptr TimeZone00; year: int32; month: int32; day: int32; + hour: int32; minute: int32; seconds: cdouble): ptr DateTime00 {. + importc: "g_date_time_new", libprag.} + +proc newDateTime*(tz: TimeZone; year: int; month: int; day: int; hour: int; + minute: int; seconds: cdouble): DateTime = + new(result) + result.impl = g_date_time_new(cast[ptr TimeZone00](tz.impl), int32(year), int32(month), int32(day), int32(hour), int32(minute), seconds) + +proc initDateTime*[T](result: var T; tz: TimeZone; year: int; month: int; day: int; hour: int; + minute: int; seconds: cdouble) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new(cast[ptr TimeZone00](tz.impl), int32(year), int32(month), int32(day), int32(hour), int32(minute), seconds) + +proc g_date_time_new_now*(tz: ptr TimeZone00): ptr DateTime00 {. + importc: "g_date_time_new_now", libprag.} + +proc newDateTimeNow*(tz: TimeZone): DateTime = + new(result) + result.impl = g_date_time_new_now(cast[ptr TimeZone00](tz.impl)) + +proc initDateTimeNow*[T](result: var T; tz: TimeZone) = + assert(result is DateTime) + new(result) + result.impl = g_date_time_new_now(cast[ptr TimeZone00](tz.impl)) + +proc g_date_time_to_timezone*(self: ptr DateTime00; tz: ptr TimeZone00): ptr DateTime00 {. + importc: "g_date_time_to_timezone", libprag.} + +proc toTimezone*(self: DateTime; tz: TimeZone): DateTime = + new(result) + result.impl = g_date_time_to_timezone(cast[ptr DateTime00](self.impl), cast[ptr TimeZone00](tz.impl)) + +type + TimeType* {.size: sizeof(cint), pure.} = enum + standard = 0 + daylight = 1 + universal = 2 + +proc g_time_zone_adjust_time*(self: ptr TimeZone00; `type`: TimeType; time: ptr int64): int32 {. + importc: "g_time_zone_adjust_time", libprag.} + +proc adjustTime*(self: TimeZone; `type`: TimeType; time: ptr int64): int = + int(g_time_zone_adjust_time(cast[ptr TimeZone00](self.impl), `type`, time)) + +proc g_time_zone_find_interval*(self: ptr TimeZone00; `type`: TimeType; time: int64): int32 {. + importc: "g_time_zone_find_interval", libprag.} + +proc findInterval*(self: TimeZone; `type`: TimeType; time: int64): int = + int(g_time_zone_find_interval(cast[ptr TimeZone00](self.impl), `type`, time)) + +type + DebugKey00* {.pure.} = object + key*: cstring + value*: uint32 + DebugKey* = ref object + impl*: ptr DebugKey00 + +type + DestroyNotify* = proc (data: pointer) {.cdecl.} + +type + Dir00* {.pure.} = object + Dir* = ref object + impl*: ptr Dir00 + +proc g_dir_close*(self: ptr Dir00) {. + importc: "g_dir_close", libprag.} + +proc close*(self: Dir) = + g_dir_close(cast[ptr Dir00](self.impl)) + +proc g_dir_read_name*(self: ptr Dir00): ucstring {. + importc: "g_dir_read_name", libprag.} + +proc readName*(self: Dir): ucstring = + g_dir_read_name(cast[ptr Dir00](self.impl)) + +proc g_dir_rewind*(self: ptr Dir00) {. + importc: "g_dir_rewind", libprag.} + +proc rewind*(self: Dir) = + g_dir_rewind(cast[ptr Dir00](self.impl)) + +proc g_dir_make_tmp*(tmpl: ucstring): ucstring {. + importc: "g_dir_make_tmp", libprag.} + +proc makeTmp*(tmpl: ucstring): ucstring {. + importc: "g_dir_make_tmp", libprag.} + +type + DoubleIEEE75400* = object {.union.} + vDouble*: cdouble + DoubleIEEE754* = ref object + impl*: ptr DoubleIEEE75400 + +type + DuplicateFunc* = proc (data: pointer; userData: pointer): pointer {.cdecl.} + +const E* = 2.718282'f64 + +type + EqualFunc* = proc (a: pointer; b: pointer): gboolean {.cdecl.} + +type + Error00* {.pure.} = object + domain*: uint32 + code*: int32 + message*: cstring + Error* = ref object + impl*: ptr Error00 + +proc g_error_new_literal*(domain: uint32; code: int32; message: cstring): ptr Error00 {. + importc: "g_error_new_literal", libprag.} + +proc newLiteral*(domain: uint32; code: int32; message: cstring): ptr Error00 {. + importc: "g_error_new_literal", libprag.} + +proc g_error_copy*(self: ptr Error00): ptr Error00 {. + importc: "g_error_copy", libprag.} + +proc copy*(self: Error): ptr Error00 = + g_error_copy(cast[ptr Error00](self.impl)) + +proc g_error_free*(self: ptr Error00) {. + importc: "g_error_free", libprag.} + +proc free*(self: Error) = + g_error_free(cast[ptr Error00](self.impl)) + +proc g_error_matches*(self: ptr Error00; domain: uint32; code: int32): gboolean {. + importc: "g_error_matches", libprag.} + +proc matches*(self: Error; domain: int; code: int): bool = + toBool(g_error_matches(cast[ptr Error00](self.impl), uint32(domain), int32(code))) + +type + ErrorType* {.size: sizeof(cint), pure.} = enum + unknown = 0 + unexpEof = 1 + unexpEofInString = 2 + unexpEofInComment = 3 + nonDigitInConst = 4 + digitRadix = 5 + floatRadix = 6 + floatMalformed = 7 + +type + FileError* {.size: sizeof(cint), pure.} = enum + exist = 0 + isdir = 1 + acces = 2 + nametoolong = 3 + noent = 4 + notdir = 5 + nxio = 6 + nodev = 7 + rofs = 8 + txtbsy = 9 + fault = 10 + loop = 11 + nospc = 12 + nomem = 13 + mfile = 14 + nfile = 15 + badf = 16 + inval = 17 + pipe = 18 + again = 19 + intr = 20 + io = 21 + perm = 22 + nosys = 23 + failed = 24 + +type + FileTest* {.size: sizeof(cint), pure.} = enum + isRegular = 1 + isSymlink = 2 + isDir = 4 + isExecutable = 8 + exists = 16 + +type + FloatIEEE75400* = object {.union.} + vFloat*: cfloat + FloatIEEE754* = ref object + impl*: ptr FloatIEEE75400 + +type + FormatSizeFlag* {.size: sizeof(cint), pure.} = enum + longFormat = 1 + iecUnits = 2 + + FormatSizeFlags* {.size: sizeof(cint).} = set[FormatSizeFlag] + +type + FreeFunc* = proc (data: pointer) {.cdecl.} + +type + Func* = proc (data: pointer; userData: pointer) {.cdecl.} + +const GINT16_FORMAT* = "hi" + +const GINT16_MODIFIER* = "h" + +const GINT32_FORMAT* = "i" + +const GINT32_MODIFIER* = "" + +const GINT64_FORMAT* = "li" + +const GINT64_MODIFIER* = "l" + +const GINTPTR_FORMAT* = "li" + +const GINTPTR_MODIFIER* = "l" + +const GNUC_FUNCTION* = "" + +const GNUC_PRETTY_FUNCTION* = "" + +const GSIZE_FORMAT* = "lu" + +const GSIZE_MODIFIER* = "l" + +const GSSIZE_FORMAT* = "li" + +const GSSIZE_MODIFIER* = "l" + +const GUINT16_FORMAT* = "hu" + +const GUINT32_FORMAT* = "u" + +const GUINT64_FORMAT* = "lu" + +const GUINTPTR_FORMAT* = "lu" + +const HAVE_GINT64* = 1'i32 + +const HAVE_GNUC_VARARGS* = 1'i32 + +const HAVE_GNUC_VISIBILITY* = 1'i32 + +const HAVE_GROWING_STACK* = 0'i32 + +const HAVE_ISO_VARARGS* = 1'i32 + +type + HFunc* = proc (key: pointer; value: pointer; userData: pointer) {.cdecl.} + +const HOOK_FLAG_USER_SHIFT* = 4'i32 + +type + HRFunc* = proc (key: pointer; value: pointer; userData: pointer): gboolean {.cdecl.} + +type + HashFunc* = proc (key: pointer): uint32 {.cdecl.} + +type + HashTable00* {.pure.} = object + HashTable* = ref object + impl*: ptr HashTable00 + +proc g_hash_table_add*(hashTable: ptr HashTable00; key: pointer): gboolean {. + importc: "g_hash_table_add", libprag.} + +proc add*(hashTable: ptr HashTable00; key: pointer): gboolean {. + importc: "g_hash_table_add", libprag.} + +proc g_hash_table_contains*(hashTable: ptr HashTable00; key: pointer): gboolean {. + importc: "g_hash_table_contains", libprag.} + +proc contains*(hashTable: ptr HashTable00; key: pointer): gboolean {. + importc: "g_hash_table_contains", libprag.} + +proc g_hash_table_destroy*(hashTable: ptr HashTable00) {. + importc: "g_hash_table_destroy", libprag.} + +proc destroy*(hashTable: ptr HashTable00) {. + importc: "g_hash_table_destroy", libprag.} + +proc g_hash_table_insert*(hashTable: ptr HashTable00; key: pointer; value: pointer): gboolean {. + importc: "g_hash_table_insert", libprag.} + +proc insert*(hashTable: ptr HashTable00; key: pointer; value: pointer): gboolean {. + importc: "g_hash_table_insert", libprag.} + +proc g_hash_table_lookup*(hashTable: ptr HashTable00; key: pointer): pointer {. + importc: "g_hash_table_lookup", libprag.} + +proc lookup*(hashTable: ptr HashTable00; key: pointer): pointer {. + importc: "g_hash_table_lookup", libprag.} + +proc g_hash_table_lookup_extended*(hashTable: ptr HashTable00; lookupKey: pointer; origKey: var pointer; + value: var pointer): gboolean {. + importc: "g_hash_table_lookup_extended", libprag.} + +proc lookupExtended*(hashTable: ptr HashTable00; lookupKey: pointer; origKey: var pointer; + value: var pointer): gboolean {. + importc: "g_hash_table_lookup_extended", libprag.} + +proc g_hash_table_remove*(hashTable: ptr HashTable00; key: pointer): gboolean {. + importc: "g_hash_table_remove", libprag.} + +proc remove*(hashTable: ptr HashTable00; key: pointer): gboolean {. + importc: "g_hash_table_remove", libprag.} + +proc g_hash_table_remove_all*(hashTable: ptr HashTable00) {. + importc: "g_hash_table_remove_all", libprag.} + +proc removeAll*(hashTable: ptr HashTable00) {. + importc: "g_hash_table_remove_all", libprag.} + +proc g_hash_table_replace*(hashTable: ptr HashTable00; key: pointer; value: pointer): gboolean {. + importc: "g_hash_table_replace", libprag.} + +proc replace*(hashTable: ptr HashTable00; key: pointer; value: pointer): gboolean {. + importc: "g_hash_table_replace", libprag.} + +proc g_hash_table_size*(hashTable: ptr HashTable00): uint32 {. + importc: "g_hash_table_size", libprag.} + +proc size*(hashTable: ptr HashTable00): uint32 {. + importc: "g_hash_table_size", libprag.} + +proc g_hash_table_steal*(hashTable: ptr HashTable00; key: pointer): gboolean {. + importc: "g_hash_table_steal", libprag.} + +proc steal*(hashTable: ptr HashTable00; key: pointer): gboolean {. + importc: "g_hash_table_steal", libprag.} + +proc g_hash_table_steal_all*(hashTable: ptr HashTable00) {. + importc: "g_hash_table_steal_all", libprag.} + +proc stealAll*(hashTable: ptr HashTable00) {. + importc: "g_hash_table_steal_all", libprag.} + +proc g_hash_table_unref*(hashTable: ptr HashTable00) {. + importc: "g_hash_table_unref", libprag.} + +proc unref*(hashTable: ptr HashTable00) {. + importc: "g_hash_table_unref", libprag.} + +type + HashTableIter00* {.pure.} = object + dummy1*: pointer + dummy2*: pointer + dummy3*: pointer + dummy4*: int32 + dummy5*: gboolean + dummy6*: pointer + HashTableIter* = ref object + impl*: ptr HashTableIter00 + +proc g_hash_table_iter_init*(self: ptr HashTableIter00; hashTable: ptr HashTable00) {. + importc: "g_hash_table_iter_init", libprag.} + +proc init*(self: HashTableIter; hashTable: ptr HashTable00) = + g_hash_table_iter_init(cast[ptr HashTableIter00](self.impl), hashTable) + +proc g_hash_table_iter_next*(self: ptr HashTableIter00; key: var pointer; value: var pointer): gboolean {. + importc: "g_hash_table_iter_next", libprag.} + +proc next*(self: HashTableIter; key: var pointer; value: var pointer): bool = + toBool(g_hash_table_iter_next(cast[ptr HashTableIter00](self.impl), key, value)) + +proc g_hash_table_iter_remove*(self: ptr HashTableIter00) {. + importc: "g_hash_table_iter_remove", libprag.} + +proc remove*(self: HashTableIter) = + g_hash_table_iter_remove(cast[ptr HashTableIter00](self.impl)) + +proc g_hash_table_iter_replace*(self: ptr HashTableIter00; value: pointer) {. + importc: "g_hash_table_iter_replace", libprag.} + +proc replace*(self: HashTableIter; value: pointer) = + g_hash_table_iter_replace(cast[ptr HashTableIter00](self.impl), value) + +proc g_hash_table_iter_steal*(self: ptr HashTableIter00) {. + importc: "g_hash_table_iter_steal", libprag.} + +proc steal*(self: HashTableIter) = + g_hash_table_iter_steal(cast[ptr HashTableIter00](self.impl)) + +type + Hmac00* {.pure.} = object + Hmac* = ref object + impl*: ptr Hmac00 + +proc g_hmac_get_digest*(self: ptr Hmac00; buffer: ptr uint8; digestLen: ptr uint64) {. + importc: "g_hmac_get_digest", libprag.} + +proc getDigest*(self: Hmac; buffer: ptr uint8; digestLen: ptr uint64) = + g_hmac_get_digest(cast[ptr Hmac00](self.impl), buffer, digestLen) + +proc digest*(self: Hmac; buffer: ptr uint8; digestLen: ptr uint64) = + g_hmac_get_digest(cast[ptr Hmac00](self.impl), buffer, digestLen) + +proc g_hmac_get_string*(self: ptr Hmac00): cstring {. + importc: "g_hmac_get_string", libprag.} + +proc getString*(self: Hmac): string = + let resul0 = g_hmac_get_string(cast[ptr Hmac00](self.impl)) + result = $resul0 + +proc string*(self: Hmac): string = + let resul0 = g_hmac_get_string(cast[ptr Hmac00](self.impl)) + result = $resul0 + +proc g_hmac_unref*(self: ptr Hmac00) {. + importc: "g_hmac_unref", libprag.} + +proc unref*(self: Hmac) = + g_hmac_unref(cast[ptr Hmac00](self.impl)) + +proc g_hmac_update*(self: ptr Hmac00; data: uint8Array; length: int64) {. + importc: "g_hmac_update", libprag.} + +proc update*(self: Hmac; data: uint8Array; length: int64) = + g_hmac_update(cast[ptr Hmac00](self.impl), data, length) + +type + Hook00* {.pure.} = object + data*: pointer + next*: ptr Hook00 + prev*: ptr Hook00 + refCount*: uint32 + hookId*: uint64 + flags*: uint32 + `func`*: pointer + destroy*: DestroyNotify + Hook* = ref object + impl*: ptr Hook00 + +proc g_hook_compare_ids*(self: ptr Hook00; sibling: ptr Hook00): int32 {. + importc: "g_hook_compare_ids", libprag.} + +proc compareIds*(self: Hook; sibling: Hook): int = + int(g_hook_compare_ids(cast[ptr Hook00](self.impl), cast[ptr Hook00](sibling.impl))) + +type + HookCheckFunc* = proc (data: pointer): gboolean {.cdecl.} + +type + HookCheckMarshaller* = proc (hook: ptr Hook00; marshalData: pointer): gboolean {.cdecl.} + +type + HookCompareFunc* = proc (newHook: ptr Hook00; sibling: ptr Hook00): int32 {.cdecl.} +type + + HookFinalizeFunc* = proc (hookList: ptr HookList00; hook: ptr Hook00) {.cdecl.} + + HookList00* {.pure.} = object + seqId*: uint64 + hookSize*: uint32 + isSetup*: uint32 + hooks*: ptr Hook00 + dummy3*: pointer + finalizeHook*: HookFinalizeFunc + dummy*: array[2, pointer] + HookList* = ref object + impl*: ptr HookList00 + +proc g_hook_list_clear*(self: ptr HookList00) {. + importc: "g_hook_list_clear", libprag.} + +proc clear*(self: HookList) = + g_hook_list_clear(cast[ptr HookList00](self.impl)) + +proc g_hook_list_init*(self: ptr HookList00; hookSize: uint32) {. + importc: "g_hook_list_init", libprag.} + +proc init*(self: HookList; hookSize: int) = + g_hook_list_init(cast[ptr HookList00](self.impl), uint32(hookSize)) + +proc g_hook_list_invoke*(self: ptr HookList00; mayRecurse: gboolean) {. + importc: "g_hook_list_invoke", libprag.} + +proc invoke*(self: HookList; mayRecurse: bool) = + g_hook_list_invoke(cast[ptr HookList00](self.impl), gboolean(mayRecurse)) + +proc g_hook_list_invoke_check*(self: ptr HookList00; mayRecurse: gboolean) {. + importc: "g_hook_list_invoke_check", libprag.} + +proc invokeCheck*(self: HookList; mayRecurse: bool) = + g_hook_list_invoke_check(cast[ptr HookList00](self.impl), gboolean(mayRecurse)) + +proc g_hook_destroy*(hookList: ptr HookList00; hookId: uint64): gboolean {. + importc: "g_hook_destroy", libprag.} + +proc destroy*(hookList: HookList; hookId: uint64): bool = + toBool(g_hook_destroy(cast[ptr HookList00](hookList.impl), hookId)) + +proc g_hook_destroy_link*(hookList: ptr HookList00; hook: ptr Hook00) {. + importc: "g_hook_destroy_link", libprag.} + +proc destroyLink*(hookList: HookList; hook: Hook) = + g_hook_destroy_link(cast[ptr HookList00](hookList.impl), cast[ptr Hook00](hook.impl)) + +proc g_hook_free*(hookList: ptr HookList00; hook: ptr Hook00) {. + importc: "g_hook_free", libprag.} + +proc free*(hookList: HookList; hook: Hook) = + g_hook_free(cast[ptr HookList00](hookList.impl), cast[ptr Hook00](hook.impl)) + +proc g_hook_insert_before*(hookList: ptr HookList00; sibling: ptr Hook00; hook: ptr Hook00) {. + importc: "g_hook_insert_before", libprag.} + +proc insertBefore*(hookList: HookList; sibling: Hook; hook: Hook) = + g_hook_insert_before(cast[ptr HookList00](hookList.impl), cast[ptr Hook00](sibling.impl), cast[ptr Hook00](hook.impl)) + +proc g_hook_prepend*(hookList: ptr HookList00; hook: ptr Hook00) {. + importc: "g_hook_prepend", libprag.} + +proc prepend*(hookList: HookList; hook: Hook) = + g_hook_prepend(cast[ptr HookList00](hookList.impl), cast[ptr Hook00](hook.impl)) + +proc g_hook_unref*(hookList: ptr HookList00; hook: ptr Hook00) {. + importc: "g_hook_unref", libprag.} + +proc unref*(hookList: HookList; hook: Hook) = + g_hook_unref(cast[ptr HookList00](hookList.impl), cast[ptr Hook00](hook.impl)) + +type + HookFindFunc* = proc (hook: ptr Hook00; data: pointer): gboolean {.cdecl.} + +type + HookFlagMask* {.size: sizeof(cint), pure.} = enum + active = 1 + inCall = 2 + mask = 15 + +type + HookFunc* = proc (data: pointer) {.cdecl.} + +type + HookMarshaller* = proc (hook: ptr Hook00; marshalData: pointer) {.cdecl.} + +type + IConv00* {.pure.} = object + IConv* = ref object + impl*: ptr IConv00 + +proc g_iconv_close*(self: ptr IConv00): int32 {. + importc: "g_iconv_close", libprag.} + +proc close*(self: IConv): int = + int(g_iconv_close(cast[ptr IConv00](self.impl))) + +const IEEE754_DOUBLE_BIAS* = 1023'i32 + +const IEEE754_FLOAT_BIAS* = 127'i32 + +type + IOStatus* {.size: sizeof(cint), pure.} = enum + error = 0 + normal = 1 + eof = 2 + again = 3 + +type + SeekType* {.size: sizeof(cint), pure.} = enum + cur = 0 + set = 1 + `end` = 2 + +type + IOCondition* {.size: sizeof(cint), pure.} = enum + `in` = 1 + pri = 2 + `out` = 4 + err = 8 + hup = 16 + nval = 32 + +type + SourceCallbackFuncs00* {.pure.} = object + `ref`*: proc(cbData: pointer) {.cdecl.} + unref*: proc(cbData: pointer) {.cdecl.} + get*: pointer + SourceCallbackFuncs* = ref object + impl*: ptr SourceCallbackFuncs00 + +type + IOChannelError* {.size: sizeof(cint), pure.} = enum + fbig = 0 + inval = 1 + io = 2 + isdir = 3 + nospc = 4 + nxio = 5 + overflow = 6 + pipe = 7 + failed = 8 + +type + IOError* {.size: sizeof(cint), pure.} = enum + none = 0 + again = 1 + inval = 2 + unknown = 3 + +type + IOFlags* {.size: sizeof(cint), pure.} = enum + append = 1 + nonblock = 2 + setMask = 3 + isReadable = 4 + isWritable = 8 + isSeekable = 16 + getMask = 31 + +const + IOFlagsIsWriteable* = IOFlags.isWritable + IOFlagsMask* = IOFlags.getMask + +const KEY_FILE_DESKTOP_GROUP* = "Desktop Entry" + +const KEY_FILE_DESKTOP_KEY_ACTIONS* = "Actions" + +const KEY_FILE_DESKTOP_KEY_CATEGORIES* = "Categories" + +const KEY_FILE_DESKTOP_KEY_COMMENT* = "Comment" + +const KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE* = "DBusActivatable" + +const KEY_FILE_DESKTOP_KEY_EXEC* = "Exec" + +const KEY_FILE_DESKTOP_KEY_GENERIC_NAME* = "GenericName" + +const KEY_FILE_DESKTOP_KEY_HIDDEN* = "Hidden" + +const KEY_FILE_DESKTOP_KEY_ICON* = "Icon" + +const KEY_FILE_DESKTOP_KEY_MIME_TYPE* = "MimeType" + +const KEY_FILE_DESKTOP_KEY_NAME* = "Name" + +const KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN* = "NotShowIn" + +const KEY_FILE_DESKTOP_KEY_NO_DISPLAY* = "NoDisplay" + +const KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN* = "OnlyShowIn" + +const KEY_FILE_DESKTOP_KEY_PATH* = "Path" + +const KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY* = "StartupNotify" + +const KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS* = "StartupWMClass" + +const KEY_FILE_DESKTOP_KEY_TERMINAL* = "Terminal" + +const KEY_FILE_DESKTOP_KEY_TRY_EXEC* = "TryExec" + +const KEY_FILE_DESKTOP_KEY_TYPE* = "Type" + +const KEY_FILE_DESKTOP_KEY_URL* = "URL" + +const KEY_FILE_DESKTOP_KEY_VERSION* = "Version" + +const KEY_FILE_DESKTOP_TYPE_APPLICATION* = "Application" + +const KEY_FILE_DESKTOP_TYPE_DIRECTORY* = "Directory" + +const KEY_FILE_DESKTOP_TYPE_LINK* = "Link" + +type + KeyFile00* {.pure.} = object + KeyFile* = ref object + impl*: ptr KeyFile00 + +proc g_key_file_new*(): ptr KeyFile00 {. + importc: "g_key_file_new", libprag.} + +proc newKeyFile*(): KeyFile = + new(result) + result.impl = g_key_file_new() + +proc initKeyFile*[T](result: var T) = + assert(result is KeyFile) + new(result) + result.impl = g_key_file_new() + +proc g_key_file_get_boolean*(self: ptr KeyFile00; groupName: cstring; key: cstring): gboolean {. + importc: "g_key_file_get_boolean", libprag.} + +proc getBoolean*(self: KeyFile; groupName: string; key: string): bool = + toBool(g_key_file_get_boolean(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key))) + +proc boolean*(self: KeyFile; groupName: string; key: string): bool = + toBool(g_key_file_get_boolean(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key))) + +proc g_key_file_get_boolean_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + length: var uint64): gbooleanArray {. + importc: "g_key_file_get_boolean_list", libprag.} + +proc getBooleanList*(self: KeyFile; groupName: string; key: string; length: var uint64): gbooleanArray = + g_key_file_get_boolean_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), length) + +proc booleanList*(self: KeyFile; groupName: string; key: string; length: var uint64): gbooleanArray = + g_key_file_get_boolean_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), length) + +proc g_key_file_get_comment*(self: ptr KeyFile00; groupName: cstring; key: cstring): cstring {. + importc: "g_key_file_get_comment", libprag.} + +proc getComment*(self: KeyFile; groupName: string; key: string): string = + let resul0 = g_key_file_get_comment(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc comment*(self: KeyFile; groupName: string; key: string): string = + let resul0 = g_key_file_get_comment(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc g_key_file_get_double*(self: ptr KeyFile00; groupName: cstring; key: cstring): cdouble {. + importc: "g_key_file_get_double", libprag.} + +proc getDouble*(self: KeyFile; groupName: string; key: string): cdouble = + g_key_file_get_double(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + +proc double*(self: KeyFile; groupName: string; key: string): cdouble = + g_key_file_get_double(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + +proc g_key_file_get_double_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + length: var uint64): cdoubleArray {. + importc: "g_key_file_get_double_list", libprag.} + +proc getDoubleList*(self: KeyFile; groupName: string; key: string; length: var uint64): cdoubleArray = + g_key_file_get_double_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), length) + +proc doubleList*(self: KeyFile; groupName: string; key: string; length: var uint64): cdoubleArray = + g_key_file_get_double_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), length) + +proc g_key_file_get_groups*(self: ptr KeyFile00; length: var uint64): cstringArray {. + importc: "g_key_file_get_groups", libprag.} + +proc getGroups*(self: KeyFile; length: var uint64): cstringArray = + g_key_file_get_groups(cast[ptr KeyFile00](self.impl), length) + +proc groups*(self: KeyFile; length: var uint64): cstringArray = + g_key_file_get_groups(cast[ptr KeyFile00](self.impl), length) + +proc g_key_file_get_int64*(self: ptr KeyFile00; groupName: cstring; key: cstring): int64 {. + importc: "g_key_file_get_int64", libprag.} + +proc getInt64*(self: KeyFile; groupName: string; key: string): int64 = + g_key_file_get_int64(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + +proc g_key_file_get_integer*(self: ptr KeyFile00; groupName: cstring; key: cstring): int32 {. + importc: "g_key_file_get_integer", libprag.} + +proc getInteger*(self: KeyFile; groupName: string; key: string): int = + int(g_key_file_get_integer(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key))) + +proc integer*(self: KeyFile; groupName: string; key: string): int = + int(g_key_file_get_integer(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key))) + +proc g_key_file_get_integer_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + length: var uint64): int32Array {. + importc: "g_key_file_get_integer_list", libprag.} + +proc getIntegerList*(self: KeyFile; groupName: string; key: string; length: var uint64): int32Array = + g_key_file_get_integer_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), length) + +proc integerList*(self: KeyFile; groupName: string; key: string; length: var uint64): int32Array = + g_key_file_get_integer_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), length) + +proc g_key_file_get_keys*(self: ptr KeyFile00; groupName: cstring; length: var uint64): cstringArray {. + importc: "g_key_file_get_keys", libprag.} + +proc getKeys*(self: KeyFile; groupName: string; length: var uint64): cstringArray = + g_key_file_get_keys(cast[ptr KeyFile00](self.impl), cstring(groupName), length) + +proc keys*(self: KeyFile; groupName: string; length: var uint64): cstringArray = + g_key_file_get_keys(cast[ptr KeyFile00](self.impl), cstring(groupName), length) + +proc g_key_file_get_locale_string*(self: ptr KeyFile00; groupName: cstring; key: cstring; + locale: cstring): cstring {. + importc: "g_key_file_get_locale_string", libprag.} + +proc getLocaleString*(self: KeyFile; groupName: string; key: string; locale: string): string = + let resul0 = g_key_file_get_locale_string(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), cstring(locale)) + result = $resul0 + cogfree(resul0) + +proc localeString*(self: KeyFile; groupName: string; key: string; locale: string): string = + let resul0 = g_key_file_get_locale_string(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), cstring(locale)) + result = $resul0 + cogfree(resul0) + +proc g_key_file_get_locale_string_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + locale: cstring; length: var uint64): cstringArray {. + importc: "g_key_file_get_locale_string_list", libprag.} + +proc getLocaleStringList*(self: KeyFile; groupName: string; key: string; locale: string; + length: var uint64): cstringArray = + g_key_file_get_locale_string_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), cstring(locale), length) + +proc localeStringList*(self: KeyFile; groupName: string; key: string; locale: string; + length: var uint64): cstringArray = + g_key_file_get_locale_string_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), cstring(locale), length) + +proc g_key_file_get_start_group*(self: ptr KeyFile00): cstring {. + importc: "g_key_file_get_start_group", libprag.} + +proc getStartGroup*(self: KeyFile): string = + let resul0 = g_key_file_get_start_group(cast[ptr KeyFile00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc startGroup*(self: KeyFile): string = + let resul0 = g_key_file_get_start_group(cast[ptr KeyFile00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_key_file_get_string*(self: ptr KeyFile00; groupName: cstring; key: cstring): cstring {. + importc: "g_key_file_get_string", libprag.} + +proc getString*(self: KeyFile; groupName: string; key: string): string = + let resul0 = g_key_file_get_string(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc string*(self: KeyFile; groupName: string; key: string): string = + let resul0 = g_key_file_get_string(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc g_key_file_get_string_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + length: var uint64): cstringArray {. + importc: "g_key_file_get_string_list", libprag.} + +proc getStringList*(self: KeyFile; groupName: string; key: string; length: var uint64): cstringArray = + g_key_file_get_string_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), length) + +proc stringList*(self: KeyFile; groupName: string; key: string; length: var uint64): cstringArray = + g_key_file_get_string_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), length) + +proc g_key_file_get_uint64*(self: ptr KeyFile00; groupName: cstring; key: cstring): uint64 {. + importc: "g_key_file_get_uint64", libprag.} + +proc getUint64*(self: KeyFile; groupName: string; key: string): uint64 = + g_key_file_get_uint64(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + +proc g_key_file_get_value*(self: ptr KeyFile00; groupName: cstring; key: cstring): cstring {. + importc: "g_key_file_get_value", libprag.} + +proc getValue*(self: KeyFile; groupName: string; key: string): string = + let resul0 = g_key_file_get_value(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc value*(self: KeyFile; groupName: string; key: string): string = + let resul0 = g_key_file_get_value(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc g_key_file_has_group*(self: ptr KeyFile00; groupName: cstring): gboolean {. + importc: "g_key_file_has_group", libprag.} + +proc hasGroup*(self: KeyFile; groupName: string): bool = + toBool(g_key_file_has_group(cast[ptr KeyFile00](self.impl), cstring(groupName))) + +proc g_key_file_remove_comment*(self: ptr KeyFile00; groupName: cstring; key: cstring): gboolean {. + importc: "g_key_file_remove_comment", libprag.} + +proc removeComment*(self: KeyFile; groupName: string; key: string): bool = + toBool(g_key_file_remove_comment(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key))) + +proc g_key_file_remove_group*(self: ptr KeyFile00; groupName: cstring): gboolean {. + importc: "g_key_file_remove_group", libprag.} + +proc removeGroup*(self: KeyFile; groupName: string): bool = + toBool(g_key_file_remove_group(cast[ptr KeyFile00](self.impl), cstring(groupName))) + +proc g_key_file_remove_key*(self: ptr KeyFile00; groupName: cstring; key: cstring): gboolean {. + importc: "g_key_file_remove_key", libprag.} + +proc removeKey*(self: KeyFile; groupName: string; key: string): bool = + toBool(g_key_file_remove_key(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key))) + +proc g_key_file_save_to_file*(self: ptr KeyFile00; filename: cstring): gboolean {. + importc: "g_key_file_save_to_file", libprag.} + +proc saveToFile*(self: KeyFile; filename: string): bool = + toBool(g_key_file_save_to_file(cast[ptr KeyFile00](self.impl), cstring(filename))) + +proc g_key_file_set_boolean*(self: ptr KeyFile00; groupName: cstring; key: cstring; + value: gboolean) {. + importc: "g_key_file_set_boolean", libprag.} + +proc setBoolean*(self: KeyFile; groupName: string; key: string; value: bool) = + g_key_file_set_boolean(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), gboolean(value)) + +proc g_key_file_set_boolean_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + list: gbooleanArray; length: uint64) {. + importc: "g_key_file_set_boolean_list", libprag.} + +proc setBooleanList*(self: KeyFile; groupName: string; key: string; list: gbooleanArray; + length: uint64) = + g_key_file_set_boolean_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), list, length) + +proc g_key_file_set_comment*(self: ptr KeyFile00; groupName: cstring; key: cstring; + comment: cstring): gboolean {. + importc: "g_key_file_set_comment", libprag.} + +proc setComment*(self: KeyFile; groupName: string; key: string; comment: string): bool = + toBool(g_key_file_set_comment(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), cstring(comment))) + +proc g_key_file_set_double*(self: ptr KeyFile00; groupName: cstring; key: cstring; + value: cdouble) {. + importc: "g_key_file_set_double", libprag.} + +proc setDouble*(self: KeyFile; groupName: string; key: string; value: cdouble) = + g_key_file_set_double(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), value) + +proc g_key_file_set_double_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + list: cdoubleArray; length: uint64) {. + importc: "g_key_file_set_double_list", libprag.} + +proc setDoubleList*(self: KeyFile; groupName: string; key: string; list: cdoubleArray; + length: uint64) = + g_key_file_set_double_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), list, length) + +proc g_key_file_set_int64*(self: ptr KeyFile00; groupName: cstring; key: cstring; + value: int64) {. + importc: "g_key_file_set_int64", libprag.} + +proc setInt64*(self: KeyFile; groupName: string; key: string; value: int64) = + g_key_file_set_int64(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), value) + +proc g_key_file_set_integer*(self: ptr KeyFile00; groupName: cstring; key: cstring; + value: int32) {. + importc: "g_key_file_set_integer", libprag.} + +proc setInteger*(self: KeyFile; groupName: string; key: string; value: int) = + g_key_file_set_integer(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), int32(value)) + +proc g_key_file_set_integer_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + list: int32Array; length: uint64) {. + importc: "g_key_file_set_integer_list", libprag.} + +proc setIntegerList*(self: KeyFile; groupName: string; key: string; list: int32Array; + length: uint64) = + g_key_file_set_integer_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), list, length) + +proc g_key_file_set_list_separator*(self: ptr KeyFile00; separator: int8) {. + importc: "g_key_file_set_list_separator", libprag.} + +proc setListSeparator*(self: KeyFile; separator: int8) = + g_key_file_set_list_separator(cast[ptr KeyFile00](self.impl), separator) + +proc `listSeparator=`*(self: KeyFile; separator: int8) = + g_key_file_set_list_separator(cast[ptr KeyFile00](self.impl), separator) + +proc g_key_file_set_locale_string*(self: ptr KeyFile00; groupName: cstring; key: cstring; + locale: cstring; string: cstring) {. + importc: "g_key_file_set_locale_string", libprag.} + +proc setLocaleString*(self: KeyFile; groupName: string; key: string; locale: string; + string: string) = + g_key_file_set_locale_string(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), cstring(locale), cstring(string)) + +proc g_key_file_set_locale_string_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + locale: cstring; list: cstringArray; length: uint64) {. + importc: "g_key_file_set_locale_string_list", libprag.} + +proc setLocaleStringList*(self: KeyFile; groupName: string; key: string; locale: string; + list: cstringArray; length: uint64) = + g_key_file_set_locale_string_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), cstring(locale), list, length) + +proc g_key_file_set_string*(self: ptr KeyFile00; groupName: cstring; key: cstring; + string: cstring) {. + importc: "g_key_file_set_string", libprag.} + +proc setString*(self: KeyFile; groupName: string; key: string; string: string) = + g_key_file_set_string(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), cstring(string)) + +proc g_key_file_set_string_list*(self: ptr KeyFile00; groupName: cstring; key: cstring; + list: cstringArray; length: uint64) {. + importc: "g_key_file_set_string_list", libprag.} + +proc setStringList*(self: KeyFile; groupName: string; key: string; list: cstringArray; + length: uint64) = + g_key_file_set_string_list(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), list, length) + +proc g_key_file_set_uint64*(self: ptr KeyFile00; groupName: cstring; key: cstring; + value: uint64) {. + importc: "g_key_file_set_uint64", libprag.} + +proc setUint64*(self: KeyFile; groupName: string; key: string; value: uint64) = + g_key_file_set_uint64(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), value) + +proc g_key_file_set_value*(self: ptr KeyFile00; groupName: cstring; key: cstring; + value: cstring) {. + importc: "g_key_file_set_value", libprag.} + +proc setValue*(self: KeyFile; groupName: string; key: string; value: string) = + g_key_file_set_value(cast[ptr KeyFile00](self.impl), cstring(groupName), cstring(key), cstring(value)) + +proc g_key_file_to_data*(self: ptr KeyFile00; length: var uint64): cstring {. + importc: "g_key_file_to_data", libprag.} + +proc toData*(self: KeyFile; length: var uint64): string = + let resul0 = g_key_file_to_data(cast[ptr KeyFile00](self.impl), length) + result = $resul0 + cogfree(resul0) + +proc g_key_file_unref*(self: ptr KeyFile00) {. + importc: "g_key_file_unref", libprag.} + +proc unref*(self: KeyFile) = + g_key_file_unref(cast[ptr KeyFile00](self.impl)) + +proc g_key_file_error_quark*(): uint32 {. + importc: "g_key_file_error_quark", libprag.} + +type + KeyFileFlag* {.size: sizeof(cint), pure.} = enum + keepComments = 1 + keepTranslations = 2 + + KeyFileFlags* {.size: sizeof(cint).} = set[KeyFileFlag] + +proc g_key_file_load_from_bytes*(self: ptr KeyFile00; bytes: ptr Bytes00; flags: KeyFileFlags): gboolean {. + importc: "g_key_file_load_from_bytes", libprag.} + +proc loadFromBytes*(self: KeyFile; bytes: Bytes; flags: KeyFileFlags): bool = + toBool(g_key_file_load_from_bytes(cast[ptr KeyFile00](self.impl), cast[ptr Bytes00](bytes.impl), flags)) + +proc g_key_file_load_from_data*(self: ptr KeyFile00; data: cstring; length: uint64; + flags: KeyFileFlags): gboolean {. + importc: "g_key_file_load_from_data", libprag.} + +proc loadFromData*(self: KeyFile; data: string; length: uint64; flags: KeyFileFlags): bool = + toBool(g_key_file_load_from_data(cast[ptr KeyFile00](self.impl), cstring(data), length, flags)) + +proc g_key_file_load_from_data_dirs*(self: ptr KeyFile00; file: ucstring; fullPath: var ucstring; + flags: KeyFileFlags): gboolean {. + importc: "g_key_file_load_from_data_dirs", libprag.} + +proc loadFromDataDirs*(self: KeyFile; file: ucstring; fullPath: var ucstring; + flags: KeyFileFlags): bool = + toBool(g_key_file_load_from_data_dirs(cast[ptr KeyFile00](self.impl), file, fullPath, flags)) + +proc g_key_file_load_from_dirs*(self: ptr KeyFile00; file: ucstring; searchDirs: ucstringArray; + fullPath: var ucstring; flags: KeyFileFlags): gboolean {. + importc: "g_key_file_load_from_dirs", libprag.} + +proc loadFromDirs*(self: KeyFile; file: ucstring; searchDirs: ucstringArray; + fullPath: var ucstring; flags: KeyFileFlags): bool = + toBool(g_key_file_load_from_dirs(cast[ptr KeyFile00](self.impl), file, searchDirs, fullPath, flags)) + +proc g_key_file_load_from_file*(self: ptr KeyFile00; file: ucstring; flags: KeyFileFlags): gboolean {. + importc: "g_key_file_load_from_file", libprag.} + +proc loadFromFile*(self: KeyFile; file: ucstring; flags: KeyFileFlags): bool = + toBool(g_key_file_load_from_file(cast[ptr KeyFile00](self.impl), file, flags)) + +type + KeyFileError* {.size: sizeof(cint), pure.} = enum + unknownEncoding = 0 + parse = 1 + notFound = 2 + keyNotFound = 3 + groupNotFound = 4 + invalidValue = 5 + +const LITTLE_ENDIAN* = 1234'i32 + +const LN10* = 2.302585'f64 + +const LN2* = 0.693147'f64 + +const LOG_2_BASE_10* = 0.30103'f64 + +const LOG_DOMAIN* = 0'i8 + +const LOG_FATAL_MASK* = 0'i32 + +const LOG_LEVEL_USER_SHIFT* = 8'i32 + +type + List00* {.pure.} = object + data*: pointer + next*: ptr pointer + prev*: ptr pointer + List* = ref object + impl*: ptr List00 + +type + LogField00* {.pure.} = object + key*: cstring + value*: pointer + length*: int64 + LogField* = ref object + impl*: ptr LogField00 + +type + LogLevelFlags* {.size: sizeof(cint), pure.} = enum + levelMask = -4 + flagRecursion = 1 + flagFatal = 2 + levelError = 4 + levelCritical = 8 + levelWarning = 16 + levelMessage = 32 + levelInfo = 64 + levelDebug = 128 + +type + LogFunc* = proc (logDomain: cstring; logLevel: LogLevelFlags; message: cstring; + userData: pointer) {.cdecl.} + +type + LogWriterOutput* {.size: sizeof(cint), pure.} = enum + unhandled = 0 + handled = 1 + +type + LogWriterFunc* = proc (logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64; userData: pointer): LogWriterOutput {.cdecl.} + +const MAJOR_VERSION* = 2'i32 + +const MAXINT16* = 32767'i16 + +const MAXINT32* = 2147483647'i32 + +const MAXINT64* = 9223372036854775807'i64 + +const MAXINT8* = 127'i8 + +const MAXUINT16* = 65535'u16 + +const MAXUINT32* = 4294967295'u32 + +const MAXUINT64* = 18446744073709551615'u64 + +const MAXUINT8* = 255'u8 + +const MICRO_VERSION* = 3'i32 + +const MINOR_VERSION* = 50'i32 + +const MODULE_SUFFIX* = "so" + +type + MainContext00* {.pure.} = object + MainContext* = ref object + impl*: ptr MainContext00 + +proc g_main_context_new*(): ptr MainContext00 {. + importc: "g_main_context_new", libprag.} + +proc newMainContext*(): MainContext = + new(result) + result.impl = g_main_context_new() + +proc initMainContext*[T](result: var T) = + assert(result is MainContext) + new(result) + result.impl = g_main_context_new() + +proc g_main_context_acquire*(self: ptr MainContext00): gboolean {. + importc: "g_main_context_acquire", libprag.} + +proc acquire*(self: MainContext): bool = + toBool(g_main_context_acquire(cast[ptr MainContext00](self.impl))) + +proc g_main_context_dispatch*(self: ptr MainContext00) {. + importc: "g_main_context_dispatch", libprag.} + +proc dispatch*(self: MainContext) = + g_main_context_dispatch(cast[ptr MainContext00](self.impl)) + +proc g_main_context_is_owner*(self: ptr MainContext00): gboolean {. + importc: "g_main_context_is_owner", libprag.} + +proc isOwner*(self: MainContext): bool = + toBool(g_main_context_is_owner(cast[ptr MainContext00](self.impl))) + +proc g_main_context_iteration*(self: ptr MainContext00; mayBlock: gboolean): gboolean {. + importc: "g_main_context_iteration", libprag.} + +proc iteration*(self: MainContext; mayBlock: bool): bool = + toBool(g_main_context_iteration(cast[ptr MainContext00](self.impl), gboolean(mayBlock))) + +proc g_main_context_pending*(self: ptr MainContext00): gboolean {. + importc: "g_main_context_pending", libprag.} + +proc pending*(self: MainContext): bool = + toBool(g_main_context_pending(cast[ptr MainContext00](self.impl))) + +proc g_main_context_pop_thread_default*(self: ptr MainContext00) {. + importc: "g_main_context_pop_thread_default", libprag.} + +proc popThreadDefault*(self: MainContext) = + g_main_context_pop_thread_default(cast[ptr MainContext00](self.impl)) + +proc g_main_context_prepare*(self: ptr MainContext00; priority: ptr int32): gboolean {. + importc: "g_main_context_prepare", libprag.} + +proc prepare*(self: MainContext; priority: ptr int32): bool = + toBool(g_main_context_prepare(cast[ptr MainContext00](self.impl), priority)) + +proc g_main_context_push_thread_default*(self: ptr MainContext00) {. + importc: "g_main_context_push_thread_default", libprag.} + +proc pushThreadDefault*(self: MainContext) = + g_main_context_push_thread_default(cast[ptr MainContext00](self.impl)) + +proc g_main_context_ref*(self: ptr MainContext00): ptr MainContext00 {. + importc: "g_main_context_ref", libprag.} + +proc `ref`*(self: MainContext): MainContext = + new(result) + result.impl = g_main_context_ref(cast[ptr MainContext00](self.impl)) + +proc g_main_context_release*(self: ptr MainContext00) {. + importc: "g_main_context_release", libprag.} + +proc release*(self: MainContext) = + g_main_context_release(cast[ptr MainContext00](self.impl)) + +proc g_main_context_unref*(self: ptr MainContext00) {. + importc: "g_main_context_unref", libprag.} + +proc unref*(self: MainContext) = + g_main_context_unref(cast[ptr MainContext00](self.impl)) + +proc g_main_context_wakeup*(self: ptr MainContext00) {. + importc: "g_main_context_wakeup", libprag.} + +proc wakeup*(self: MainContext) = + g_main_context_wakeup(cast[ptr MainContext00](self.impl)) + +proc g_main_context_default*(): ptr MainContext00 {. + importc: "g_main_context_default", libprag.} + +proc default*(): MainContext = + new(result) + result.impl = g_main_context_default() + +proc g_main_context_get_thread_default*(): ptr MainContext00 {. + importc: "g_main_context_get_thread_default", libprag.} + +proc getThreadDefault*(): MainContext = + new(result) + result.impl = g_main_context_get_thread_default() + +proc threadDefault*(): MainContext = + new(result) + result.impl = g_main_context_get_thread_default() + +proc g_main_context_ref_thread_default*(): ptr MainContext00 {. + importc: "g_main_context_ref_thread_default", libprag.} + +proc refThreadDefault*(): MainContext = + new(result) + result.impl = g_main_context_ref_thread_default() + +type + PollFD00* {.pure.} = object + fd*: int32 + events*: uint16 + revents*: uint16 + PollFD* = ref object + impl*: ptr PollFD00 + +proc g_main_context_add_poll*(self: ptr MainContext00; fd: ptr PollFD00; priority: int32) {. + importc: "g_main_context_add_poll", libprag.} + +proc addPoll*(self: MainContext; fd: PollFD; priority: int) = + g_main_context_add_poll(cast[ptr MainContext00](self.impl), cast[ptr PollFD00](fd.impl), int32(priority)) + +proc g_main_context_check*(self: ptr MainContext00; maxPriority: int32; fds: PollFD00Array; + nFds: int32): int32 {. + importc: "g_main_context_check", libprag.} + +proc check*(self: MainContext; maxPriority: int; fds: PollFD00Array; + nFds: int): int = + int(g_main_context_check(cast[ptr MainContext00](self.impl), int32(maxPriority), fds, int32(nFds))) + +proc g_main_context_query*(self: ptr MainContext00; maxPriority: int32; timeout: var int32; + fds: var PollFD00Array; nFds: int32): int32 {. + importc: "g_main_context_query", libprag.} + +proc query*(self: MainContext; maxPriority: int; timeout: var int; + fds: var PollFD00Array; nFds: int): int = + var timeout_00 = int32(timeout) + result = int(g_main_context_query(cast[ptr MainContext00](self.impl), int32(maxPriority), timeout_00, fds, int32(nFds))) + timeout = int(timeout_00) + +proc g_main_context_remove_poll*(self: ptr MainContext00; fd: ptr PollFD00) {. + importc: "g_main_context_remove_poll", libprag.} + +proc removePoll*(self: MainContext; fd: PollFD) = + g_main_context_remove_poll(cast[ptr MainContext00](self.impl), cast[ptr PollFD00](fd.impl)) + +type + MainLoop00* {.pure.} = object + MainLoop* = ref object + impl*: ptr MainLoop00 + +proc g_main_loop_new*(context: ptr MainContext00; isRunning: gboolean): ptr MainLoop00 {. + importc: "g_main_loop_new", libprag.} + +proc newMainLoop*(context: MainContext; isRunning: bool): MainLoop = + new(result) + result.impl = g_main_loop_new(cast[ptr MainContext00](context.impl), gboolean(isRunning)) + +proc initMainLoop*[T](result: var T; context: MainContext; isRunning: bool) = + assert(result is MainLoop) + new(result) + result.impl = g_main_loop_new(cast[ptr MainContext00](context.impl), gboolean(isRunning)) + +proc g_main_loop_get_context*(self: ptr MainLoop00): ptr MainContext00 {. + importc: "g_main_loop_get_context", libprag.} + +proc getContext*(self: MainLoop): MainContext = + new(result) + result.impl = g_main_loop_get_context(cast[ptr MainLoop00](self.impl)) + +proc context*(self: MainLoop): MainContext = + new(result) + result.impl = g_main_loop_get_context(cast[ptr MainLoop00](self.impl)) + +proc g_main_loop_is_running*(self: ptr MainLoop00): gboolean {. + importc: "g_main_loop_is_running", libprag.} + +proc isRunning*(self: MainLoop): bool = + toBool(g_main_loop_is_running(cast[ptr MainLoop00](self.impl))) + +proc g_main_loop_quit*(self: ptr MainLoop00) {. + importc: "g_main_loop_quit", libprag.} + +proc quit*(self: MainLoop) = + g_main_loop_quit(cast[ptr MainLoop00](self.impl)) + +proc g_main_loop_ref*(self: ptr MainLoop00): ptr MainLoop00 {. + importc: "g_main_loop_ref", libprag.} + +proc `ref`*(self: MainLoop): MainLoop = + new(result) + result.impl = g_main_loop_ref(cast[ptr MainLoop00](self.impl)) + +proc g_main_loop_run*(self: ptr MainLoop00) {. + importc: "g_main_loop_run", libprag.} + +proc run*(self: MainLoop) = + g_main_loop_run(cast[ptr MainLoop00](self.impl)) + +proc g_main_loop_unref*(self: ptr MainLoop00) {. + importc: "g_main_loop_unref", libprag.} + +proc unref*(self: MainLoop) = + g_main_loop_unref(cast[ptr MainLoop00](self.impl)) + +type + MappedFile00* {.pure.} = object + MappedFile* = ref object + impl*: ptr MappedFile00 + +proc g_mapped_file_new*(filename: ucstring; writable: gboolean): ptr MappedFile00 {. + importc: "g_mapped_file_new", libprag.} + +proc newMappedFile*(filename: ucstring; writable: bool): MappedFile = + new(result) + result.impl = g_mapped_file_new(filename, gboolean(writable)) + +proc initMappedFile*[T](result: var T; filename: ucstring; writable: bool) = + assert(result is MappedFile) + new(result) + result.impl = g_mapped_file_new(filename, gboolean(writable)) + +proc g_mapped_file_new_from_fd*(fd: int32; writable: gboolean): ptr MappedFile00 {. + importc: "g_mapped_file_new_from_fd", libprag.} + +proc newMappedFileFromFd*(fd: int; writable: bool): MappedFile = + new(result) + result.impl = g_mapped_file_new_from_fd(int32(fd), gboolean(writable)) + +proc initMappedFileFromFd*[T](result: var T; fd: int; writable: bool) = + assert(result is MappedFile) + new(result) + result.impl = g_mapped_file_new_from_fd(int32(fd), gboolean(writable)) + +proc g_mapped_file_free*(self: ptr MappedFile00) {. + importc: "g_mapped_file_free", libprag.} + +proc free*(self: MappedFile) = + g_mapped_file_free(cast[ptr MappedFile00](self.impl)) + +proc g_mapped_file_get_bytes*(self: ptr MappedFile00): ptr Bytes00 {. + importc: "g_mapped_file_get_bytes", libprag.} + +proc getBytes*(self: MappedFile): Bytes = + new(result) + result.impl = g_mapped_file_get_bytes(cast[ptr MappedFile00](self.impl)) + +proc bytes*(self: MappedFile): Bytes = + new(result) + result.impl = g_mapped_file_get_bytes(cast[ptr MappedFile00](self.impl)) + +proc g_mapped_file_get_contents*(self: ptr MappedFile00): cstring {. + importc: "g_mapped_file_get_contents", libprag.} + +proc getContents*(self: MappedFile): string = + let resul0 = g_mapped_file_get_contents(cast[ptr MappedFile00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc contents*(self: MappedFile): string = + let resul0 = g_mapped_file_get_contents(cast[ptr MappedFile00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_mapped_file_get_length*(self: ptr MappedFile00): uint64 {. + importc: "g_mapped_file_get_length", libprag.} + +proc getLength*(self: MappedFile): uint64 = + g_mapped_file_get_length(cast[ptr MappedFile00](self.impl)) + +proc length*(self: MappedFile): uint64 = + g_mapped_file_get_length(cast[ptr MappedFile00](self.impl)) + +proc g_mapped_file_ref*(self: ptr MappedFile00): ptr MappedFile00 {. + importc: "g_mapped_file_ref", libprag.} + +proc `ref`*(self: MappedFile): MappedFile = + new(result) + result.impl = g_mapped_file_ref(cast[ptr MappedFile00](self.impl)) + +proc g_mapped_file_unref*(self: ptr MappedFile00) {. + importc: "g_mapped_file_unref", libprag.} + +proc unref*(self: MappedFile) = + g_mapped_file_unref(cast[ptr MappedFile00](self.impl)) + +type + MarkupCollectType* {.size: sizeof(cint), pure.} = enum + invalid = 0 + string = 1 + strdup = 2 + boolean = 3 + tristate = 4 + optional = 65536 + +type + MarkupError* {.size: sizeof(cint), pure.} = enum + badUtf8 = 0 + empty = 1 + parse = 2 + unknownElement = 3 + unknownAttribute = 4 + invalidContent = 5 + missingAttribute = 6 + +type + MarkupParseContext00* {.pure.} = object + MarkupParseContext* = ref object + impl*: ptr MarkupParseContext00 + +proc g_markup_parse_context_end_parse*(self: ptr MarkupParseContext00): gboolean {. + importc: "g_markup_parse_context_end_parse", libprag.} + +proc endParse*(self: MarkupParseContext): bool = + toBool(g_markup_parse_context_end_parse(cast[ptr MarkupParseContext00](self.impl))) + +proc g_markup_parse_context_free*(self: ptr MarkupParseContext00) {. + importc: "g_markup_parse_context_free", libprag.} + +proc free*(self: MarkupParseContext) = + g_markup_parse_context_free(cast[ptr MarkupParseContext00](self.impl)) + +proc g_markup_parse_context_get_element*(self: ptr MarkupParseContext00): cstring {. + importc: "g_markup_parse_context_get_element", libprag.} + +proc getElement*(self: MarkupParseContext): string = + let resul0 = g_markup_parse_context_get_element(cast[ptr MarkupParseContext00](self.impl)) + result = $resul0 + +proc element*(self: MarkupParseContext): string = + let resul0 = g_markup_parse_context_get_element(cast[ptr MarkupParseContext00](self.impl)) + result = $resul0 + +proc g_markup_parse_context_get_position*(self: ptr MarkupParseContext00; lineNumber: ptr int32; + charNumber: ptr int32) {. + importc: "g_markup_parse_context_get_position", libprag.} + +proc getPosition*(self: MarkupParseContext; lineNumber: ptr int32; charNumber: ptr int32) = + g_markup_parse_context_get_position(cast[ptr MarkupParseContext00](self.impl), lineNumber, charNumber) + +proc position*(self: MarkupParseContext; lineNumber: ptr int32; charNumber: ptr int32) = + g_markup_parse_context_get_position(cast[ptr MarkupParseContext00](self.impl), lineNumber, charNumber) + +proc g_markup_parse_context_get_user_data*(self: ptr MarkupParseContext00): pointer {. + importc: "g_markup_parse_context_get_user_data", libprag.} + +proc getUserData*(self: MarkupParseContext): pointer = + g_markup_parse_context_get_user_data(cast[ptr MarkupParseContext00](self.impl)) + +proc userData*(self: MarkupParseContext): pointer = + g_markup_parse_context_get_user_data(cast[ptr MarkupParseContext00](self.impl)) + +proc g_markup_parse_context_parse*(self: ptr MarkupParseContext00; text: cstring; textLen: int64): gboolean {. + importc: "g_markup_parse_context_parse", libprag.} + +proc parse*(self: MarkupParseContext; text: string; textLen: int64): bool = + toBool(g_markup_parse_context_parse(cast[ptr MarkupParseContext00](self.impl), cstring(text), textLen)) + +proc g_markup_parse_context_pop*(self: ptr MarkupParseContext00): pointer {. + importc: "g_markup_parse_context_pop", libprag.} + +proc pop*(self: MarkupParseContext): pointer = + g_markup_parse_context_pop(cast[ptr MarkupParseContext00](self.impl)) + +proc g_markup_parse_context_ref*(self: ptr MarkupParseContext00): ptr MarkupParseContext00 {. + importc: "g_markup_parse_context_ref", libprag.} + +proc `ref`*(self: MarkupParseContext): MarkupParseContext = + new(result) + result.impl = g_markup_parse_context_ref(cast[ptr MarkupParseContext00](self.impl)) + +proc g_markup_parse_context_unref*(self: ptr MarkupParseContext00) {. + importc: "g_markup_parse_context_unref", libprag.} + +proc unref*(self: MarkupParseContext) = + g_markup_parse_context_unref(cast[ptr MarkupParseContext00](self.impl)) + +type + MarkupParser00* {.pure.} = object + startElement*: proc(context: ptr MarkupParseContext00; elementName: cstring; + attributeNames: cstring; attributeValues: cstring; userData: pointer) {.cdecl.} + endElement*: proc(context: ptr MarkupParseContext00; elementName: cstring; + userData: pointer) {.cdecl.} + text*: proc(context: ptr MarkupParseContext00; text: cstring; + textLen: uint64; userData: pointer) {.cdecl.} + passthrough*: proc(context: ptr MarkupParseContext00; passthroughText: cstring; + textLen: uint64; userData: pointer) {.cdecl.} + error*: proc(context: ptr MarkupParseContext00; error: ptr Error00; + userData: pointer) {.cdecl.} + MarkupParser* = ref object + impl*: ptr MarkupParser00 + +proc g_markup_parse_context_push*(self: ptr MarkupParseContext00; parser: ptr MarkupParser00; + userData: pointer) {. + importc: "g_markup_parse_context_push", libprag.} + +proc push*(self: MarkupParseContext; parser: MarkupParser; userData: pointer) = + g_markup_parse_context_push(cast[ptr MarkupParseContext00](self.impl), cast[ptr MarkupParser00](parser.impl), userData) + +type + MarkupParseFlag* {.size: sizeof(cint), pure.} = enum + doNotUseThisUnsupportedFlag = 1 + treatCdataAsText = 2 + prefixErrorPosition = 3 + ignoreQualified = 4 + + MarkupParseFlags* {.size: sizeof(cint).} = set[MarkupParseFlag] + +proc g_markup_parse_context_new*(parser: ptr MarkupParser00; flags: MarkupParseFlags; + userData: pointer; userDataDnotify: DestroyNotify): ptr MarkupParseContext00 {. + importc: "g_markup_parse_context_new", libprag.} + +proc newMarkupParseContext*(parser: MarkupParser; flags: MarkupParseFlags; userData: pointer; + userDataDnotify: DestroyNotify): MarkupParseContext = + new(result) + result.impl = g_markup_parse_context_new(cast[ptr MarkupParser00](parser.impl), flags, userData, userDataDnotify) + +proc initMarkupParseContext*[T](result: var T; parser: MarkupParser; flags: MarkupParseFlags; userData: pointer; + userDataDnotify: DestroyNotify) = + assert(result is MarkupParseContext) + new(result) + result.impl = g_markup_parse_context_new(cast[ptr MarkupParser00](parser.impl), flags, userData, userDataDnotify) + +type + MatchInfo00* {.pure.} = object + MatchInfo* = ref object + impl*: ptr MatchInfo00 + +proc g_match_info_expand_references*(self: ptr MatchInfo00; stringToExpand: cstring): cstring {. + importc: "g_match_info_expand_references", libprag.} + +proc expandReferences*(self: MatchInfo; stringToExpand: string): string = + let resul0 = g_match_info_expand_references(cast[ptr MatchInfo00](self.impl), cstring(stringToExpand)) + result = $resul0 + cogfree(resul0) + +proc g_match_info_fetch*(self: ptr MatchInfo00; matchNum: int32): cstring {. + importc: "g_match_info_fetch", libprag.} + +proc fetch*(self: MatchInfo; matchNum: int): string = + let resul0 = g_match_info_fetch(cast[ptr MatchInfo00](self.impl), int32(matchNum)) + result = $resul0 + cogfree(resul0) + +proc g_match_info_fetch_all*(self: ptr MatchInfo00): cstringArray {. + importc: "g_match_info_fetch_all", libprag.} + +proc fetchAll*(self: MatchInfo): cstringArray = + g_match_info_fetch_all(cast[ptr MatchInfo00](self.impl)) + +proc g_match_info_fetch_named*(self: ptr MatchInfo00; name: cstring): cstring {. + importc: "g_match_info_fetch_named", libprag.} + +proc fetchNamed*(self: MatchInfo; name: string): string = + let resul0 = g_match_info_fetch_named(cast[ptr MatchInfo00](self.impl), cstring(name)) + result = $resul0 + cogfree(resul0) + +proc g_match_info_fetch_named_pos*(self: ptr MatchInfo00; name: cstring; startPos: var int32; + endPos: var int32): gboolean {. + importc: "g_match_info_fetch_named_pos", libprag.} + +proc fetchNamedPos*(self: MatchInfo; name: string; startPos: var int; + endPos: var int): bool = + var startPos_00 = int32(startPos) + var endPos_00 = int32(endPos) + result = toBool(g_match_info_fetch_named_pos(cast[ptr MatchInfo00](self.impl), cstring(name), startPos_00, endPos_00)) + startPos = int(startPos_00) + endPos = int(endPos_00) + +proc g_match_info_fetch_pos*(self: ptr MatchInfo00; matchNum: int32; startPos: var int32; + endPos: var int32): gboolean {. + importc: "g_match_info_fetch_pos", libprag.} + +proc fetchPos*(self: MatchInfo; matchNum: int; startPos: var int; + endPos: var int): bool = + var startPos_00 = int32(startPos) + var endPos_00 = int32(endPos) + result = toBool(g_match_info_fetch_pos(cast[ptr MatchInfo00](self.impl), int32(matchNum), startPos_00, endPos_00)) + startPos = int(startPos_00) + endPos = int(endPos_00) + +proc g_match_info_free*(self: ptr MatchInfo00) {. + importc: "g_match_info_free", libprag.} + +proc free*(self: MatchInfo) = + g_match_info_free(cast[ptr MatchInfo00](self.impl)) + +proc g_match_info_get_match_count*(self: ptr MatchInfo00): int32 {. + importc: "g_match_info_get_match_count", libprag.} + +proc getMatchCount*(self: MatchInfo): int = + int(g_match_info_get_match_count(cast[ptr MatchInfo00](self.impl))) + +proc matchCount*(self: MatchInfo): int = + int(g_match_info_get_match_count(cast[ptr MatchInfo00](self.impl))) + +proc g_match_info_get_string*(self: ptr MatchInfo00): cstring {. + importc: "g_match_info_get_string", libprag.} + +proc getString*(self: MatchInfo): string = + let resul0 = g_match_info_get_string(cast[ptr MatchInfo00](self.impl)) + result = $resul0 + +proc string*(self: MatchInfo): string = + let resul0 = g_match_info_get_string(cast[ptr MatchInfo00](self.impl)) + result = $resul0 + +proc g_match_info_is_partial_match*(self: ptr MatchInfo00): gboolean {. + importc: "g_match_info_is_partial_match", libprag.} + +proc isPartialMatch*(self: MatchInfo): bool = + toBool(g_match_info_is_partial_match(cast[ptr MatchInfo00](self.impl))) + +proc g_match_info_matches*(self: ptr MatchInfo00): gboolean {. + importc: "g_match_info_matches", libprag.} + +proc matches*(self: MatchInfo): bool = + toBool(g_match_info_matches(cast[ptr MatchInfo00](self.impl))) + +proc g_match_info_next*(self: ptr MatchInfo00): gboolean {. + importc: "g_match_info_next", libprag.} + +proc next*(self: MatchInfo): bool = + toBool(g_match_info_next(cast[ptr MatchInfo00](self.impl))) + +proc g_match_info_ref*(self: ptr MatchInfo00): ptr MatchInfo00 {. + importc: "g_match_info_ref", libprag.} + +proc `ref`*(self: MatchInfo): MatchInfo = + new(result) + result.impl = g_match_info_ref(cast[ptr MatchInfo00](self.impl)) + +proc g_match_info_unref*(self: ptr MatchInfo00) {. + importc: "g_match_info_unref", libprag.} + +proc unref*(self: MatchInfo) = + g_match_info_unref(cast[ptr MatchInfo00](self.impl)) + +type + Regex00* {.pure.} = object + Regex* = ref object + impl*: ptr Regex00 + +proc g_regex_get_capture_count*(self: ptr Regex00): int32 {. + importc: "g_regex_get_capture_count", libprag.} + +proc getCaptureCount*(self: Regex): int = + int(g_regex_get_capture_count(cast[ptr Regex00](self.impl))) + +proc captureCount*(self: Regex): int = + int(g_regex_get_capture_count(cast[ptr Regex00](self.impl))) + +proc g_regex_get_has_cr_or_lf*(self: ptr Regex00): gboolean {. + importc: "g_regex_get_has_cr_or_lf", libprag.} + +proc getHasCrOrLf*(self: Regex): bool = + toBool(g_regex_get_has_cr_or_lf(cast[ptr Regex00](self.impl))) + +proc hasCrOrLf*(self: Regex): bool = + toBool(g_regex_get_has_cr_or_lf(cast[ptr Regex00](self.impl))) + +proc g_regex_get_max_backref*(self: ptr Regex00): int32 {. + importc: "g_regex_get_max_backref", libprag.} + +proc getMaxBackref*(self: Regex): int = + int(g_regex_get_max_backref(cast[ptr Regex00](self.impl))) + +proc maxBackref*(self: Regex): int = + int(g_regex_get_max_backref(cast[ptr Regex00](self.impl))) + +proc g_regex_get_max_lookbehind*(self: ptr Regex00): int32 {. + importc: "g_regex_get_max_lookbehind", libprag.} + +proc getMaxLookbehind*(self: Regex): int = + int(g_regex_get_max_lookbehind(cast[ptr Regex00](self.impl))) + +proc maxLookbehind*(self: Regex): int = + int(g_regex_get_max_lookbehind(cast[ptr Regex00](self.impl))) + +proc g_regex_get_pattern*(self: ptr Regex00): cstring {. + importc: "g_regex_get_pattern", libprag.} + +proc getPattern*(self: Regex): string = + let resul0 = g_regex_get_pattern(cast[ptr Regex00](self.impl)) + result = $resul0 + +proc pattern*(self: Regex): string = + let resul0 = g_regex_get_pattern(cast[ptr Regex00](self.impl)) + result = $resul0 + +proc g_regex_get_string_number*(self: ptr Regex00; name: cstring): int32 {. + importc: "g_regex_get_string_number", libprag.} + +proc getStringNumber*(self: Regex; name: string): int = + int(g_regex_get_string_number(cast[ptr Regex00](self.impl), cstring(name))) + +proc stringNumber*(self: Regex; name: string): int = + int(g_regex_get_string_number(cast[ptr Regex00](self.impl), cstring(name))) + +proc g_regex_ref*(self: ptr Regex00): ptr Regex00 {. + importc: "g_regex_ref", libprag.} + +proc `ref`*(self: Regex): Regex = + new(result) + result.impl = g_regex_ref(cast[ptr Regex00](self.impl)) + +proc g_regex_unref*(self: ptr Regex00) {. + importc: "g_regex_unref", libprag.} + +proc unref*(self: Regex) = + g_regex_unref(cast[ptr Regex00](self.impl)) + +proc g_regex_check_replacement*(replacement: cstring; hasReferences: var gboolean): gboolean {. + importc: "g_regex_check_replacement", libprag.} + +proc checkReplacement*(replacement: cstring; hasReferences: var gboolean): gboolean {. + importc: "g_regex_check_replacement", libprag.} + +proc g_regex_error_quark*(): uint32 {. + importc: "g_regex_error_quark", libprag.} + +proc g_regex_escape_nul*(string: cstring; length: int32): cstring {. + importc: "g_regex_escape_nul", libprag.} + +proc escapeNul*(string: string; length: int): string = + let resul0 = g_regex_escape_nul(cstring(string), int32(length)) + result = $resul0 + cogfree(resul0) + +proc g_regex_escape_string*(string: cstringArray; length: int32): cstring {. + importc: "g_regex_escape_string", libprag.} + +proc escapeString*(string: cstringArray; length: int): string = + let resul0 = g_regex_escape_string(string, int32(length)) + result = $resul0 + cogfree(resul0) + +proc g_match_info_get_regex*(self: ptr MatchInfo00): ptr Regex00 {. + importc: "g_match_info_get_regex", libprag.} + +proc getRegex*(self: MatchInfo): Regex = + new(result) + result.impl = g_match_info_get_regex(cast[ptr MatchInfo00](self.impl)) + +proc regex*(self: MatchInfo): Regex = + new(result) + result.impl = g_match_info_get_regex(cast[ptr MatchInfo00](self.impl)) + +type + RegexMatchFlags* {.size: sizeof(cint), pure.} = enum + anchored = 16 + notbol = 128 + noteol = 256 + notempty = 1024 + partial = 32768 + newlineCr = 1048576 + newlineLf = 2097152 + newlineCrlf = 3145728 + newlineAny = 4194304 + newlineAnycrlf = 5242880 + bsrAnycrlf = 8388608 + bsrAny = 16777216 + partialHard = 134217728 + notemptyAtstart = 268435456 + +const + RegexMatchFlagsPartialSoft* = RegexMatchFlags.partial + +proc g_regex_get_match_flags*(self: ptr Regex00): RegexMatchFlags {. + importc: "g_regex_get_match_flags", libprag.} + +proc getMatchFlags*(self: Regex): RegexMatchFlags = + g_regex_get_match_flags(cast[ptr Regex00](self.impl)) + +proc matchFlags*(self: Regex): RegexMatchFlags = + g_regex_get_match_flags(cast[ptr Regex00](self.impl)) + +proc g_regex_match*(self: ptr Regex00; string: cstring; matchOptions: RegexMatchFlags; + matchInfo: var ptr MatchInfo00): gboolean {. + importc: "g_regex_match", libprag.} + +proc match*(self: ptr Regex00; string: cstring; matchOptions: RegexMatchFlags; + matchInfo: var ptr MatchInfo00): gboolean {. + importc: "g_regex_match", libprag.} + +proc g_regex_match_all*(self: ptr Regex00; string: cstring; matchOptions: RegexMatchFlags; + matchInfo: var ptr MatchInfo00): gboolean {. + importc: "g_regex_match_all", libprag.} + +proc matchAll*(self: ptr Regex00; string: cstring; matchOptions: RegexMatchFlags; + matchInfo: var ptr MatchInfo00): gboolean {. + importc: "g_regex_match_all", libprag.} + +proc g_regex_match_all_full*(self: ptr Regex00; string: cstringArray; stringLen: int64; + startPosition: int32; matchOptions: RegexMatchFlags; matchInfo: var ptr MatchInfo00): gboolean {. + importc: "g_regex_match_all_full", libprag.} + +proc matchAllFull*(self: ptr Regex00; string: cstringArray; stringLen: int64; + startPosition: int32; matchOptions: RegexMatchFlags; matchInfo: var ptr MatchInfo00): gboolean {. + importc: "g_regex_match_all_full", libprag.} + +proc g_regex_match_full*(self: ptr Regex00; string: cstringArray; stringLen: int64; + startPosition: int32; matchOptions: RegexMatchFlags; matchInfo: var ptr MatchInfo00): gboolean {. + importc: "g_regex_match_full", libprag.} + +proc matchFull*(self: ptr Regex00; string: cstringArray; stringLen: int64; + startPosition: int32; matchOptions: RegexMatchFlags; matchInfo: var ptr MatchInfo00): gboolean {. + importc: "g_regex_match_full", libprag.} + +proc g_regex_replace*(self: ptr Regex00; string: cstringArray; stringLen: int64; + startPosition: int32; replacement: cstring; matchOptions: RegexMatchFlags): cstring {. + importc: "g_regex_replace", libprag.} + +proc replace*(self: Regex; string: cstringArray; stringLen: int64; + startPosition: int; replacement: string; matchOptions: RegexMatchFlags): string = + let resul0 = g_regex_replace(cast[ptr Regex00](self.impl), string, stringLen, int32(startPosition), cstring(replacement), matchOptions) + result = $resul0 + cogfree(resul0) + +proc g_regex_replace_literal*(self: ptr Regex00; string: cstringArray; stringLen: int64; + startPosition: int32; replacement: cstring; matchOptions: RegexMatchFlags): cstring {. + importc: "g_regex_replace_literal", libprag.} + +proc replaceLiteral*(self: Regex; string: cstringArray; stringLen: int64; + startPosition: int; replacement: string; matchOptions: RegexMatchFlags): string = + let resul0 = g_regex_replace_literal(cast[ptr Regex00](self.impl), string, stringLen, int32(startPosition), cstring(replacement), matchOptions) + result = $resul0 + cogfree(resul0) + +proc g_regex_split*(self: ptr Regex00; string: cstring; matchOptions: RegexMatchFlags): cstringArray {. + importc: "g_regex_split", libprag.} + +proc split*(self: Regex; string: string; matchOptions: RegexMatchFlags): cstringArray = + g_regex_split(cast[ptr Regex00](self.impl), cstring(string), matchOptions) + +proc g_regex_split_full*(self: ptr Regex00; string: cstringArray; stringLen: int64; + startPosition: int32; matchOptions: RegexMatchFlags; maxTokens: int32): cstringArray {. + importc: "g_regex_split_full", libprag.} + +proc splitFull*(self: Regex; string: cstringArray; stringLen: int64; + startPosition: int; matchOptions: RegexMatchFlags; maxTokens: int): cstringArray = + g_regex_split_full(cast[ptr Regex00](self.impl), string, stringLen, int32(startPosition), matchOptions, int32(maxTokens)) + +type + RegexCompileFlags* {.size: sizeof(cint), pure.} = enum + caseless = 1 + multiline = 2 + dotall = 4 + extended = 8 + anchored = 16 + dollarEndonly = 32 + ungreedy = 512 + raw = 2048 + noAutoCapture = 4096 + optimize = 8192 + firstline = 262144 + dupnames = 524288 + newlineCr = 1048576 + newlineLf = 2097152 + newlineCrlf = 3145728 + newlineAnycrlf = 5242880 + bsrAnycrlf = 8388608 + javascriptCompat = 33554432 + +proc g_regex_new*(pattern: cstring; compileOptions: RegexCompileFlags; + matchOptions: RegexMatchFlags): ptr Regex00 {. + importc: "g_regex_new", libprag.} + +proc newRegex*(pattern: string; compileOptions: RegexCompileFlags; + matchOptions: RegexMatchFlags): Regex = + new(result) + result.impl = g_regex_new(cstring(pattern), compileOptions, matchOptions) + +proc initRegex*[T](result: var T; pattern: string; compileOptions: RegexCompileFlags; + matchOptions: RegexMatchFlags) = + assert(result is Regex) + new(result) + result.impl = g_regex_new(cstring(pattern), compileOptions, matchOptions) + +proc g_regex_get_compile_flags*(self: ptr Regex00): RegexCompileFlags {. + importc: "g_regex_get_compile_flags", libprag.} + +proc getCompileFlags*(self: Regex): RegexCompileFlags = + g_regex_get_compile_flags(cast[ptr Regex00](self.impl)) + +proc compileFlags*(self: Regex): RegexCompileFlags = + g_regex_get_compile_flags(cast[ptr Regex00](self.impl)) + +proc g_regex_match_simple*(pattern: cstring; string: cstring; compileOptions: RegexCompileFlags; + matchOptions: RegexMatchFlags): gboolean {. + importc: "g_regex_match_simple", libprag.} + +proc matchSimple*(pattern: cstring; string: cstring; compileOptions: RegexCompileFlags; + matchOptions: RegexMatchFlags): gboolean {. + importc: "g_regex_match_simple", libprag.} + +proc g_regex_split_simple*(pattern: cstring; string: cstring; compileOptions: RegexCompileFlags; + matchOptions: RegexMatchFlags): cstringArray {. + importc: "g_regex_split_simple", libprag.} + +proc splitSimple*(pattern: cstring; string: cstring; compileOptions: RegexCompileFlags; + matchOptions: RegexMatchFlags): cstringArray {. + importc: "g_regex_split_simple", libprag.} + +type + MemVTable00* {.pure.} = object + malloc*: proc(nBytes: uint64): pointer {.cdecl.} + realloc*: proc(mem: pointer; nBytes: uint64): pointer {.cdecl.} + free*: proc(mem: pointer) {.cdecl.} + calloc*: proc(nBlocks: uint64; nBlockBytes: uint64): pointer {.cdecl.} + tryMalloc*: proc(nBytes: uint64): pointer {.cdecl.} + tryRealloc*: proc(mem: pointer; nBytes: uint64): pointer {.cdecl.} + MemVTable* = ref object + impl*: ptr MemVTable00 + +type + Mutex00* = object {.union.} + p*: pointer + i*: array[2, uint32] + Mutex* = ref object + impl*: ptr Mutex00 + +proc g_mutex_clear*(self: ptr Mutex00) {. + importc: "g_mutex_clear", libprag.} + +proc clear*(self: Mutex) = + g_mutex_clear(cast[ptr Mutex00](self.impl)) + +proc g_mutex_init*(self: ptr Mutex00) {. + importc: "g_mutex_init", libprag.} + +proc init*(self: Mutex) = + g_mutex_init(cast[ptr Mutex00](self.impl)) + +proc g_mutex_lock*(self: ptr Mutex00) {. + importc: "g_mutex_lock", libprag.} + +proc lock*(self: Mutex) = + g_mutex_lock(cast[ptr Mutex00](self.impl)) + +proc g_mutex_trylock*(self: ptr Mutex00): gboolean {. + importc: "g_mutex_trylock", libprag.} + +proc trylock*(self: Mutex): bool = + toBool(g_mutex_trylock(cast[ptr Mutex00](self.impl))) + +proc g_mutex_unlock*(self: ptr Mutex00) {. + importc: "g_mutex_unlock", libprag.} + +proc unlock*(self: Mutex) = + g_mutex_unlock(cast[ptr Mutex00](self.impl)) + +proc g_cond_wait*(self: ptr Cond00; mutex: ptr Mutex00) {. + importc: "g_cond_wait", libprag.} + +proc wait*(self: Cond; mutex: Mutex) = + g_cond_wait(cast[ptr Cond00](self.impl), cast[ptr Mutex00](mutex.impl)) + +proc g_cond_wait_until*(self: ptr Cond00; mutex: ptr Mutex00; endTime: int64): gboolean {. + importc: "g_cond_wait_until", libprag.} + +proc waitUntil*(self: Cond; mutex: Mutex; endTime: int64): bool = + toBool(g_cond_wait_until(cast[ptr Cond00](self.impl), cast[ptr Mutex00](mutex.impl), endTime)) + +proc g_main_context_wait*(self: ptr MainContext00; cond: ptr Cond00; mutex: ptr Mutex00): gboolean {. + importc: "g_main_context_wait", libprag.} + +proc wait*(self: MainContext; cond: Cond; mutex: Mutex): bool = + toBool(g_main_context_wait(cast[ptr MainContext00](self.impl), cast[ptr Cond00](cond.impl), cast[ptr Mutex00](mutex.impl))) + +type + Node00* {.pure.} = object + data*: pointer + next*: ptr Node00 + prev*: ptr Node00 + parent*: ptr Node00 + children*: ptr Node00 + Node* = ref object + impl*: ptr Node00 + +proc g_node_child_index*(self: ptr Node00; data: pointer): int32 {. + importc: "g_node_child_index", libprag.} + +proc childIndex*(self: Node; data: pointer): int = + int(g_node_child_index(cast[ptr Node00](self.impl), data)) + +proc g_node_child_position*(self: ptr Node00; child: ptr Node00): int32 {. + importc: "g_node_child_position", libprag.} + +proc childPosition*(self: Node; child: Node): int = + int(g_node_child_position(cast[ptr Node00](self.impl), cast[ptr Node00](child.impl))) + +proc g_node_depth*(self: ptr Node00): uint32 {. + importc: "g_node_depth", libprag.} + +proc depth*(self: Node): int = + int(g_node_depth(cast[ptr Node00](self.impl))) + +proc g_node_destroy*(self: ptr Node00) {. + importc: "g_node_destroy", libprag.} + +proc destroy*(self: Node) = + g_node_destroy(cast[ptr Node00](self.impl)) + +proc g_node_is_ancestor*(self: ptr Node00; descendant: ptr Node00): gboolean {. + importc: "g_node_is_ancestor", libprag.} + +proc isAncestor*(self: Node; descendant: Node): bool = + toBool(g_node_is_ancestor(cast[ptr Node00](self.impl), cast[ptr Node00](descendant.impl))) + +proc g_node_max_height*(self: ptr Node00): uint32 {. + importc: "g_node_max_height", libprag.} + +proc maxHeight*(self: Node): int = + int(g_node_max_height(cast[ptr Node00](self.impl))) + +proc g_node_n_children*(self: ptr Node00): uint32 {. + importc: "g_node_n_children", libprag.} + +proc nChildren*(self: Node): int = + int(g_node_n_children(cast[ptr Node00](self.impl))) + +proc g_node_reverse_children*(self: ptr Node00) {. + importc: "g_node_reverse_children", libprag.} + +proc reverseChildren*(self: Node) = + g_node_reverse_children(cast[ptr Node00](self.impl)) + +proc g_node_unlink*(self: ptr Node00) {. + importc: "g_node_unlink", libprag.} + +proc unlink*(self: Node) = + g_node_unlink(cast[ptr Node00](self.impl)) + +type + TraverseFlags* {.size: sizeof(cint), pure.} = enum + leafs = 1 + nonLeafs = 2 + all = 3 + +const + TraverseFlagsLeaves* = TraverseFlags.leafs + TraverseFlagsNonLeaves* = TraverseFlags.nonLeafs + TraverseFlagsMask* = TraverseFlags.all + +proc g_node_n_nodes*(self: ptr Node00; flags: TraverseFlags): uint32 {. + importc: "g_node_n_nodes", libprag.} + +proc nNodes*(self: Node; flags: TraverseFlags): int = + int(g_node_n_nodes(cast[ptr Node00](self.impl), flags)) + +type + NodeForeachFunc* = proc (node: ptr Node00; data: pointer) {.cdecl.} + +type + NodeTraverseFunc* = proc (node: ptr Node00; data: pointer): gboolean {.cdecl.} + +type + NormalizeMode* {.size: sizeof(cint), pure.} = enum + default = 0 + defaultCompose = 1 + all = 2 + allCompose = 3 + +const + NormalizeModeNfd* = NormalizeMode.default + NormalizeModeNfc* = NormalizeMode.defaultCompose + NormalizeModeNfkd* = NormalizeMode.all + NormalizeModeNfkc* = NormalizeMode.allCompose + +const OPTION_REMAINING* = "" + +type + OnceStatus* {.size: sizeof(cint), pure.} = enum + notcalled = 0 + progress = 1 + ready = 2 + +type + Once00* {.pure.} = object + status*: OnceStatus + retval*: pointer + Once* = ref object + impl*: ptr Once00 + +proc g_once_init_enter*(location: pointer): gboolean {. + importc: "g_once_init_enter", libprag.} + +proc initEnter*(location: pointer): gboolean {. + importc: "g_once_init_enter", libprag.} + +proc g_once_init_leave*(location: pointer; resu: uint64) {. + importc: "g_once_init_leave", libprag.} + +proc initLeave*(location: pointer; resu: uint64) {. + importc: "g_once_init_leave", libprag.} + +type + OptionArg* {.size: sizeof(cint), pure.} = enum + none = 0 + string = 1 + int = 2 + callback = 3 + filename = 4 + stringArray = 5 + filenameArray = 6 + double = 7 + int64 = 8 + +type + OptionArgFunc* = proc (optionName: cstring; value: cstring; data: pointer): gboolean {.cdecl.} + +type + OptionContext00* {.pure.} = object + OptionContext* = ref object + impl*: ptr OptionContext00 + +proc g_option_context_free*(self: ptr OptionContext00) {. + importc: "g_option_context_free", libprag.} + +proc free*(self: OptionContext) = + g_option_context_free(cast[ptr OptionContext00](self.impl)) + +proc g_option_context_get_description*(self: ptr OptionContext00): cstring {. + importc: "g_option_context_get_description", libprag.} + +proc getDescription*(self: OptionContext): string = + let resul0 = g_option_context_get_description(cast[ptr OptionContext00](self.impl)) + result = $resul0 + +proc description*(self: OptionContext): string = + let resul0 = g_option_context_get_description(cast[ptr OptionContext00](self.impl)) + result = $resul0 + +proc g_option_context_get_help_enabled*(self: ptr OptionContext00): gboolean {. + importc: "g_option_context_get_help_enabled", libprag.} + +proc getHelpEnabled*(self: OptionContext): bool = + toBool(g_option_context_get_help_enabled(cast[ptr OptionContext00](self.impl))) + +proc helpEnabled*(self: OptionContext): bool = + toBool(g_option_context_get_help_enabled(cast[ptr OptionContext00](self.impl))) + +proc g_option_context_get_ignore_unknown_options*(self: ptr OptionContext00): gboolean {. + importc: "g_option_context_get_ignore_unknown_options", libprag.} + +proc getIgnoreUnknownOptions*(self: OptionContext): bool = + toBool(g_option_context_get_ignore_unknown_options(cast[ptr OptionContext00](self.impl))) + +proc ignoreUnknownOptions*(self: OptionContext): bool = + toBool(g_option_context_get_ignore_unknown_options(cast[ptr OptionContext00](self.impl))) + +proc g_option_context_get_strict_posix*(self: ptr OptionContext00): gboolean {. + importc: "g_option_context_get_strict_posix", libprag.} + +proc getStrictPosix*(self: OptionContext): bool = + toBool(g_option_context_get_strict_posix(cast[ptr OptionContext00](self.impl))) + +proc strictPosix*(self: OptionContext): bool = + toBool(g_option_context_get_strict_posix(cast[ptr OptionContext00](self.impl))) + +proc g_option_context_get_summary*(self: ptr OptionContext00): cstring {. + importc: "g_option_context_get_summary", libprag.} + +proc getSummary*(self: OptionContext): string = + let resul0 = g_option_context_get_summary(cast[ptr OptionContext00](self.impl)) + result = $resul0 + +proc summary*(self: OptionContext): string = + let resul0 = g_option_context_get_summary(cast[ptr OptionContext00](self.impl)) + result = $resul0 + +proc g_option_context_parse*(self: ptr OptionContext00; argc: int32; argv: cstringArray): gboolean {. + importc: "g_option_context_parse", libprag.} + +proc parse*(self: OptionContext; argc: int; argv: cstringArray): bool = + toBool(g_option_context_parse(cast[ptr OptionContext00](self.impl), int32(argc), argv)) + +proc g_option_context_parse_strv*(self: ptr OptionContext00; arguments: cstringArray): gboolean {. + importc: "g_option_context_parse_strv", libprag.} + +proc parseStrv*(self: OptionContext; arguments: cstringArray): bool = + toBool(g_option_context_parse_strv(cast[ptr OptionContext00](self.impl), arguments)) + +proc g_option_context_set_description*(self: ptr OptionContext00; description: cstring) {. + importc: "g_option_context_set_description", libprag.} + +proc setDescription*(self: OptionContext; description: string) = + g_option_context_set_description(cast[ptr OptionContext00](self.impl), cstring(description)) + +proc `description=`*(self: OptionContext; description: string) = + g_option_context_set_description(cast[ptr OptionContext00](self.impl), cstring(description)) + +proc g_option_context_set_help_enabled*(self: ptr OptionContext00; helpEnabled: gboolean) {. + importc: "g_option_context_set_help_enabled", libprag.} + +proc setHelpEnabled*(self: OptionContext; helpEnabled: bool) = + g_option_context_set_help_enabled(cast[ptr OptionContext00](self.impl), gboolean(helpEnabled)) + +proc `helpEnabled=`*(self: OptionContext; helpEnabled: bool) = + g_option_context_set_help_enabled(cast[ptr OptionContext00](self.impl), gboolean(helpEnabled)) + +proc g_option_context_set_ignore_unknown_options*(self: ptr OptionContext00; ignoreUnknown: gboolean) {. + importc: "g_option_context_set_ignore_unknown_options", libprag.} + +proc setIgnoreUnknownOptions*(self: OptionContext; ignoreUnknown: bool) = + g_option_context_set_ignore_unknown_options(cast[ptr OptionContext00](self.impl), gboolean(ignoreUnknown)) + +proc `ignoreUnknownOptions=`*(self: OptionContext; ignoreUnknown: bool) = + g_option_context_set_ignore_unknown_options(cast[ptr OptionContext00](self.impl), gboolean(ignoreUnknown)) + +proc g_option_context_set_strict_posix*(self: ptr OptionContext00; strictPosix: gboolean) {. + importc: "g_option_context_set_strict_posix", libprag.} + +proc setStrictPosix*(self: OptionContext; strictPosix: bool) = + g_option_context_set_strict_posix(cast[ptr OptionContext00](self.impl), gboolean(strictPosix)) + +proc `strictPosix=`*(self: OptionContext; strictPosix: bool) = + g_option_context_set_strict_posix(cast[ptr OptionContext00](self.impl), gboolean(strictPosix)) + +proc g_option_context_set_summary*(self: ptr OptionContext00; summary: cstring) {. + importc: "g_option_context_set_summary", libprag.} + +proc setSummary*(self: OptionContext; summary: string) = + g_option_context_set_summary(cast[ptr OptionContext00](self.impl), cstring(summary)) + +proc `summary=`*(self: OptionContext; summary: string) = + g_option_context_set_summary(cast[ptr OptionContext00](self.impl), cstring(summary)) + +proc g_option_context_set_translation_domain*(self: ptr OptionContext00; domain: cstring) {. + importc: "g_option_context_set_translation_domain", libprag.} + +proc setTranslationDomain*(self: OptionContext; domain: string) = + g_option_context_set_translation_domain(cast[ptr OptionContext00](self.impl), cstring(domain)) + +proc `translationDomain=`*(self: OptionContext; domain: string) = + g_option_context_set_translation_domain(cast[ptr OptionContext00](self.impl), cstring(domain)) + +type + OptionEntry00* {.pure.} = object + longName*: cstring + shortName*: int8 + flags*: int32 + arg*: OptionArg + argData*: pointer + description*: cstring + argDescription*: cstring + OptionEntry* = ref object + impl*: ptr OptionEntry00 + +proc g_option_context_add_main_entries*(self: ptr OptionContext00; entries: ptr OptionEntry00; + translationDomain: cstring) {. + importc: "g_option_context_add_main_entries", libprag.} + +proc addMainEntries*(self: OptionContext; entries: OptionEntry; translationDomain: string) = + g_option_context_add_main_entries(cast[ptr OptionContext00](self.impl), cast[ptr OptionEntry00](entries.impl), cstring(translationDomain)) + +type + OptionGroup00* {.pure.} = object + OptionGroup* = ref object + impl*: ptr OptionGroup00 + +proc g_option_group_new*(name: cstring; description: cstring; helpDescription: cstring; + userData: pointer; destroy: DestroyNotify): ptr OptionGroup00 {. + importc: "g_option_group_new", libprag.} + +proc newOptionGroup*(name: string; description: string; helpDescription: string; + userData: pointer; destroy: DestroyNotify): OptionGroup = + new(result) + result.impl = g_option_group_new(cstring(name), cstring(description), cstring(helpDescription), userData, destroy) + +proc initOptionGroup*[T](result: var T; name: string; description: string; helpDescription: string; + userData: pointer; destroy: DestroyNotify) = + assert(result is OptionGroup) + new(result) + result.impl = g_option_group_new(cstring(name), cstring(description), cstring(helpDescription), userData, destroy) + +proc g_option_group_add_entries*(self: ptr OptionGroup00; entries: ptr OptionEntry00) {. + importc: "g_option_group_add_entries", libprag.} + +proc addEntries*(self: OptionGroup; entries: OptionEntry) = + g_option_group_add_entries(cast[ptr OptionGroup00](self.impl), cast[ptr OptionEntry00](entries.impl)) + +proc g_option_group_free*(self: ptr OptionGroup00) {. + importc: "g_option_group_free", libprag.} + +proc free*(self: OptionGroup) = + g_option_group_free(cast[ptr OptionGroup00](self.impl)) + +proc g_option_group_ref*(self: ptr OptionGroup00): ptr OptionGroup00 {. + importc: "g_option_group_ref", libprag.} + +proc `ref`*(self: OptionGroup): OptionGroup = + new(result) + result.impl = g_option_group_ref(cast[ptr OptionGroup00](self.impl)) + +proc g_option_group_set_translation_domain*(self: ptr OptionGroup00; domain: cstring) {. + importc: "g_option_group_set_translation_domain", libprag.} + +proc setTranslationDomain*(self: OptionGroup; domain: string) = + g_option_group_set_translation_domain(cast[ptr OptionGroup00](self.impl), cstring(domain)) + +proc `translationDomain=`*(self: OptionGroup; domain: string) = + g_option_group_set_translation_domain(cast[ptr OptionGroup00](self.impl), cstring(domain)) + +proc g_option_group_unref*(self: ptr OptionGroup00) {. + importc: "g_option_group_unref", libprag.} + +proc unref*(self: OptionGroup) = + g_option_group_unref(cast[ptr OptionGroup00](self.impl)) + +proc g_option_context_add_group*(self: ptr OptionContext00; group: ptr OptionGroup00) {. + importc: "g_option_context_add_group", libprag.} + +proc addGroup*(self: OptionContext; group: OptionGroup) = + g_option_context_add_group(cast[ptr OptionContext00](self.impl), cast[ptr OptionGroup00](group.impl)) + +proc g_option_context_get_help*(self: ptr OptionContext00; mainHelp: gboolean; group: ptr OptionGroup00): cstring {. + importc: "g_option_context_get_help", libprag.} + +proc getHelp*(self: OptionContext; mainHelp: bool; group: OptionGroup): string = + let resul0 = g_option_context_get_help(cast[ptr OptionContext00](self.impl), gboolean(mainHelp), cast[ptr OptionGroup00](group.impl)) + result = $resul0 + cogfree(resul0) + +proc help*(self: OptionContext; mainHelp: bool; group: OptionGroup): string = + let resul0 = g_option_context_get_help(cast[ptr OptionContext00](self.impl), gboolean(mainHelp), cast[ptr OptionGroup00](group.impl)) + result = $resul0 + cogfree(resul0) + +proc g_option_context_get_main_group*(self: ptr OptionContext00): ptr OptionGroup00 {. + importc: "g_option_context_get_main_group", libprag.} + +proc getMainGroup*(self: OptionContext): OptionGroup = + new(result) + result.impl = g_option_context_get_main_group(cast[ptr OptionContext00](self.impl)) + +proc mainGroup*(self: OptionContext): OptionGroup = + new(result) + result.impl = g_option_context_get_main_group(cast[ptr OptionContext00](self.impl)) + +proc g_option_context_set_main_group*(self: ptr OptionContext00; group: ptr OptionGroup00) {. + importc: "g_option_context_set_main_group", libprag.} + +proc setMainGroup*(self: OptionContext; group: OptionGroup) = + g_option_context_set_main_group(cast[ptr OptionContext00](self.impl), cast[ptr OptionGroup00](group.impl)) + +proc `mainGroup=`*(self: OptionContext; group: OptionGroup) = + g_option_context_set_main_group(cast[ptr OptionContext00](self.impl), cast[ptr OptionGroup00](group.impl)) + +type + OptionError* {.size: sizeof(cint), pure.} = enum + unknownOption = 0 + badValue = 1 + failed = 2 + +type + OptionErrorFunc* = proc (context: ptr OptionContext00; group: ptr OptionGroup00; + data: pointer) {.cdecl.} + +type + OptionFlag* {.size: sizeof(cint), pure.} = enum + hidden = 1 + inMain = 2 + reverse = 3 + noArg = 4 + filename = 5 + optionalArg = 6 + noalias = 7 + + OptionFlags* {.size: sizeof(cint).} = set[OptionFlag] + +type + OptionParseFunc* = proc (context: ptr OptionContext00; group: ptr OptionGroup00; + data: pointer): gboolean {.cdecl.} + +const PDP_ENDIAN* = 3412'i32 + +const PI* = 3.141593'f64 + +const PID_FORMAT* = "i" + +const PI_2* = 1.570796'f64 + +const PI_4* = 0.785398'f64 + +const POLLFD_FORMAT* = "%d" + +const PRIORITY_DEFAULT* = 0'i32 + +const PRIORITY_DEFAULT_IDLE* = 200'i32 + +const PRIORITY_HIGH* = -100'i32 + +const PRIORITY_HIGH_IDLE* = 100'i32 + +const PRIORITY_LOW* = 300'i32 + +type + PatternSpec00* {.pure.} = object + PatternSpec* = ref object + impl*: ptr PatternSpec00 + +proc g_pattern_spec_equal*(self: ptr PatternSpec00; pspec2: ptr PatternSpec00): gboolean {. + importc: "g_pattern_spec_equal", libprag.} + +proc equal*(self: PatternSpec; pspec2: PatternSpec): bool = + toBool(g_pattern_spec_equal(cast[ptr PatternSpec00](self.impl), cast[ptr PatternSpec00](pspec2.impl))) + +proc g_pattern_spec_free*(self: ptr PatternSpec00) {. + importc: "g_pattern_spec_free", libprag.} + +proc free*(self: PatternSpec) = + g_pattern_spec_free(cast[ptr PatternSpec00](self.impl)) + +type + PollFunc* = proc (ufds: ptr PollFD00; nfsd: uint32; timeout: int32): int32 {.cdecl.} + +type + PrintFunc* = proc (string: cstring) {.cdecl.} + +type + Private00* {.pure.} = object + p*: pointer + notify*: DestroyNotify + future*: array[2, pointer] + Private* = ref object + impl*: ptr Private00 + +proc g_private_get*(self: ptr Private00): pointer {. + importc: "g_private_get", libprag.} + +proc get*(self: Private): pointer = + g_private_get(cast[ptr Private00](self.impl)) + +proc g_private_replace*(self: ptr Private00; value: pointer) {. + importc: "g_private_replace", libprag.} + +proc replace*(self: Private; value: pointer) = + g_private_replace(cast[ptr Private00](self.impl), value) + +proc g_private_set*(self: ptr Private00; value: pointer) {. + importc: "g_private_set", libprag.} + +proc set*(self: Private; value: pointer) = + g_private_set(cast[ptr Private00](self.impl), value) + +type + PtrArray00* {.pure.} = object + pdata*: pointer + len*: uint32 + PtrArray* = ref object + impl*: ptr PtrArray00 + +type + Queue00* {.pure.} = object + head*: ptr pointer + tail*: ptr pointer + length*: uint32 + Queue* = ref object + impl*: ptr Queue00 + +proc g_queue_clear*(self: ptr Queue00) {. + importc: "g_queue_clear", libprag.} + +proc clear*(self: Queue) = + g_queue_clear(cast[ptr Queue00](self.impl)) + +proc g_queue_free*(self: ptr Queue00) {. + importc: "g_queue_free", libprag.} + +proc free*(self: Queue) = + g_queue_free(cast[ptr Queue00](self.impl)) + +proc g_queue_free_full*(self: ptr Queue00; freeFunc: DestroyNotify) {. + importc: "g_queue_free_full", libprag.} + +proc freeFull*(self: Queue; freeFunc: DestroyNotify) = + g_queue_free_full(cast[ptr Queue00](self.impl), freeFunc) + +proc g_queue_get_length*(self: ptr Queue00): uint32 {. + importc: "g_queue_get_length", libprag.} + +proc getLength*(self: Queue): int = + int(g_queue_get_length(cast[ptr Queue00](self.impl))) + +proc length*(self: Queue): int = + int(g_queue_get_length(cast[ptr Queue00](self.impl))) + +proc g_queue_index*(self: ptr Queue00; data: pointer): int32 {. + importc: "g_queue_index", libprag.} + +proc index*(self: Queue; data: pointer): int = + int(g_queue_index(cast[ptr Queue00](self.impl), data)) + +proc g_queue_init*(self: ptr Queue00) {. + importc: "g_queue_init", libprag.} + +proc init*(self: Queue) = + g_queue_init(cast[ptr Queue00](self.impl)) + +proc g_queue_is_empty*(self: ptr Queue00): gboolean {. + importc: "g_queue_is_empty", libprag.} + +proc isEmpty*(self: Queue): bool = + toBool(g_queue_is_empty(cast[ptr Queue00](self.impl))) + +proc g_queue_peek_head*(self: ptr Queue00): pointer {. + importc: "g_queue_peek_head", libprag.} + +proc peekHead*(self: Queue): pointer = + g_queue_peek_head(cast[ptr Queue00](self.impl)) + +proc g_queue_peek_nth*(self: ptr Queue00; n: uint32): pointer {. + importc: "g_queue_peek_nth", libprag.} + +proc peekNth*(self: Queue; n: int): pointer = + g_queue_peek_nth(cast[ptr Queue00](self.impl), uint32(n)) + +proc g_queue_peek_tail*(self: ptr Queue00): pointer {. + importc: "g_queue_peek_tail", libprag.} + +proc peekTail*(self: Queue): pointer = + g_queue_peek_tail(cast[ptr Queue00](self.impl)) + +proc g_queue_pop_head*(self: ptr Queue00): pointer {. + importc: "g_queue_pop_head", libprag.} + +proc popHead*(self: Queue): pointer = + g_queue_pop_head(cast[ptr Queue00](self.impl)) + +proc g_queue_pop_nth*(self: ptr Queue00; n: uint32): pointer {. + importc: "g_queue_pop_nth", libprag.} + +proc popNth*(self: Queue; n: int): pointer = + g_queue_pop_nth(cast[ptr Queue00](self.impl), uint32(n)) + +proc g_queue_pop_tail*(self: ptr Queue00): pointer {. + importc: "g_queue_pop_tail", libprag.} + +proc popTail*(self: Queue): pointer = + g_queue_pop_tail(cast[ptr Queue00](self.impl)) + +proc g_queue_push_head*(self: ptr Queue00; data: pointer) {. + importc: "g_queue_push_head", libprag.} + +proc pushHead*(self: Queue; data: pointer) = + g_queue_push_head(cast[ptr Queue00](self.impl), data) + +proc g_queue_push_nth*(self: ptr Queue00; data: pointer; n: int32) {. + importc: "g_queue_push_nth", libprag.} + +proc pushNth*(self: Queue; data: pointer; n: int) = + g_queue_push_nth(cast[ptr Queue00](self.impl), data, int32(n)) + +proc g_queue_push_tail*(self: ptr Queue00; data: pointer) {. + importc: "g_queue_push_tail", libprag.} + +proc pushTail*(self: Queue; data: pointer) = + g_queue_push_tail(cast[ptr Queue00](self.impl), data) + +proc g_queue_remove*(self: ptr Queue00; data: pointer): gboolean {. + importc: "g_queue_remove", libprag.} + +proc remove*(self: Queue; data: pointer): bool = + toBool(g_queue_remove(cast[ptr Queue00](self.impl), data)) + +proc g_queue_remove_all*(self: ptr Queue00; data: pointer): uint32 {. + importc: "g_queue_remove_all", libprag.} + +proc removeAll*(self: Queue; data: pointer): int = + int(g_queue_remove_all(cast[ptr Queue00](self.impl), data)) + +proc g_queue_reverse*(self: ptr Queue00) {. + importc: "g_queue_reverse", libprag.} + +proc reverse*(self: Queue) = + g_queue_reverse(cast[ptr Queue00](self.impl)) + +type + RWLock00* {.pure.} = object + p*: pointer + i*: array[2, uint32] + RWLock* = ref object + impl*: ptr RWLock00 + +proc g_rw_lock_clear*(self: ptr RWLock00) {. + importc: "g_rw_lock_clear", libprag.} + +proc clear*(self: RWLock) = + g_rw_lock_clear(cast[ptr RWLock00](self.impl)) + +proc g_rw_lock_init*(self: ptr RWLock00) {. + importc: "g_rw_lock_init", libprag.} + +proc init*(self: RWLock) = + g_rw_lock_init(cast[ptr RWLock00](self.impl)) + +proc g_rw_lock_reader_lock*(self: ptr RWLock00) {. + importc: "g_rw_lock_reader_lock", libprag.} + +proc readerLock*(self: RWLock) = + g_rw_lock_reader_lock(cast[ptr RWLock00](self.impl)) + +proc g_rw_lock_reader_trylock*(self: ptr RWLock00): gboolean {. + importc: "g_rw_lock_reader_trylock", libprag.} + +proc readerTrylock*(self: RWLock): bool = + toBool(g_rw_lock_reader_trylock(cast[ptr RWLock00](self.impl))) + +proc g_rw_lock_reader_unlock*(self: ptr RWLock00) {. + importc: "g_rw_lock_reader_unlock", libprag.} + +proc readerUnlock*(self: RWLock) = + g_rw_lock_reader_unlock(cast[ptr RWLock00](self.impl)) + +proc g_rw_lock_writer_lock*(self: ptr RWLock00) {. + importc: "g_rw_lock_writer_lock", libprag.} + +proc writerLock*(self: RWLock) = + g_rw_lock_writer_lock(cast[ptr RWLock00](self.impl)) + +proc g_rw_lock_writer_trylock*(self: ptr RWLock00): gboolean {. + importc: "g_rw_lock_writer_trylock", libprag.} + +proc writerTrylock*(self: RWLock): bool = + toBool(g_rw_lock_writer_trylock(cast[ptr RWLock00](self.impl))) + +proc g_rw_lock_writer_unlock*(self: ptr RWLock00) {. + importc: "g_rw_lock_writer_unlock", libprag.} + +proc writerUnlock*(self: RWLock) = + g_rw_lock_writer_unlock(cast[ptr RWLock00](self.impl)) + +type + Rand00* {.pure.} = object + Rand* = ref object + impl*: ptr Rand00 + +proc g_rand_double*(self: ptr Rand00): cdouble {. + importc: "g_rand_double", libprag.} + +proc double*(self: Rand): cdouble = + g_rand_double(cast[ptr Rand00](self.impl)) + +proc g_rand_double_range*(self: ptr Rand00; begin: cdouble; `end`: cdouble): cdouble {. + importc: "g_rand_double_range", libprag.} + +proc doubleRange*(self: Rand; begin: cdouble; `end`: cdouble): cdouble = + g_rand_double_range(cast[ptr Rand00](self.impl), begin, `end`) + +proc g_rand_free*(self: ptr Rand00) {. + importc: "g_rand_free", libprag.} + +proc free*(self: Rand) = + g_rand_free(cast[ptr Rand00](self.impl)) + +proc g_rand_int*(self: ptr Rand00): uint32 {. + importc: "g_rand_int", libprag.} + +proc intP*(self: Rand): int = + int(g_rand_int(cast[ptr Rand00](self.impl))) + +proc g_rand_int_range*(self: ptr Rand00; begin: int32; `end`: int32): int32 {. + importc: "g_rand_int_range", libprag.} + +proc intRange*(self: Rand; begin: int; `end`: int): int = + int(g_rand_int_range(cast[ptr Rand00](self.impl), int32(begin), int32(`end`))) + +proc g_rand_set_seed*(self: ptr Rand00; seed: uint32) {. + importc: "g_rand_set_seed", libprag.} + +proc setSeed*(self: Rand; seed: int) = + g_rand_set_seed(cast[ptr Rand00](self.impl), uint32(seed)) + +proc `seed=`*(self: Rand; seed: int) = + g_rand_set_seed(cast[ptr Rand00](self.impl), uint32(seed)) + +proc g_rand_set_seed_array*(self: ptr Rand00; seed: ptr uint32; seedLength: uint32) {. + importc: "g_rand_set_seed_array", libprag.} + +proc setSeedArray*(self: Rand; seed: ptr uint32; seedLength: int) = + g_rand_set_seed_array(cast[ptr Rand00](self.impl), seed, uint32(seedLength)) + +type + RecMutex00* {.pure.} = object + p*: pointer + i*: array[2, uint32] + RecMutex* = ref object + impl*: ptr RecMutex00 + +proc g_rec_mutex_clear*(self: ptr RecMutex00) {. + importc: "g_rec_mutex_clear", libprag.} + +proc clear*(self: RecMutex) = + g_rec_mutex_clear(cast[ptr RecMutex00](self.impl)) + +proc g_rec_mutex_init*(self: ptr RecMutex00) {. + importc: "g_rec_mutex_init", libprag.} + +proc init*(self: RecMutex) = + g_rec_mutex_init(cast[ptr RecMutex00](self.impl)) + +proc g_rec_mutex_lock*(self: ptr RecMutex00) {. + importc: "g_rec_mutex_lock", libprag.} + +proc lock*(self: RecMutex) = + g_rec_mutex_lock(cast[ptr RecMutex00](self.impl)) + +proc g_rec_mutex_trylock*(self: ptr RecMutex00): gboolean {. + importc: "g_rec_mutex_trylock", libprag.} + +proc trylock*(self: RecMutex): bool = + toBool(g_rec_mutex_trylock(cast[ptr RecMutex00](self.impl))) + +proc g_rec_mutex_unlock*(self: ptr RecMutex00) {. + importc: "g_rec_mutex_unlock", libprag.} + +proc unlock*(self: RecMutex) = + g_rec_mutex_unlock(cast[ptr RecMutex00](self.impl)) + +type + RegexError* {.size: sizeof(cint), pure.} = enum + compile = 0 + optimize = 1 + replace = 2 + match = 3 + internal = 4 + strayBackslash = 101 + missingControlChar = 102 + unrecognizedEscape = 103 + quantifiersOutOfOrder = 104 + quantifierTooBig = 105 + unterminatedCharacterClass = 106 + invalidEscapeInCharacterClass = 107 + rangeOutOfOrder = 108 + nothingToRepeat = 109 + unrecognizedCharacter = 112 + posixNamedClassOutsideClass = 113 + unmatchedParenthesis = 114 + inexistentSubpatternReference = 115 + unterminatedComment = 118 + expressionTooLarge = 120 + memoryError = 121 + variableLengthLookbehind = 125 + malformedCondition = 126 + tooManyConditionalBranches = 127 + assertionExpected = 128 + unknownPosixClassName = 130 + posixCollatingElementsNotSupported = 131 + hexCodeTooLarge = 134 + invalidCondition = 135 + singleByteMatchInLookbehind = 136 + infiniteLoop = 140 + missingSubpatternNameTerminator = 142 + duplicateSubpatternName = 143 + malformedProperty = 146 + unknownProperty = 147 + subpatternNameTooLong = 148 + tooManySubpatterns = 149 + invalidOctalValue = 151 + tooManyBranchesInDefine = 154 + defineRepetion = 155 + inconsistentNewlineOptions = 156 + missingBackReference = 157 + invalidRelativeReference = 158 + backtrackingControlVerbArgumentForbidden = 159 + unknownBacktrackingControlVerb = 160 + numberTooBig = 161 + missingSubpatternName = 162 + missingDigit = 163 + invalidDataCharacter = 164 + extraSubpatternName = 165 + backtrackingControlVerbArgumentRequired = 166 + invalidControlChar = 168 + missingName = 169 + notSupportedInClass = 171 + tooManyForwardReferences = 172 + nameTooLong = 175 + characterValueTooLarge = 176 + +type + String00* {.pure.} = object + str*: cstring + len*: uint64 + allocatedLen*: uint64 + String* = ref object + impl*: ptr String00 + +proc g_string_append*(self: ptr String00; val: cstring): ptr String00 {. + importc: "g_string_append", libprag.} + +proc append*(self: String; val: string): String = + new(result) + result.impl = g_string_append(cast[ptr String00](self.impl), cstring(val)) + +proc g_string_append_c*(self: ptr String00; c: int8): ptr String00 {. + importc: "g_string_append_c", libprag.} + +proc appendC*(self: String; c: int8): String = + new(result) + result.impl = g_string_append_c(cast[ptr String00](self.impl), c) + +proc g_string_append_len*(self: ptr String00; val: cstring; len: int64): ptr String00 {. + importc: "g_string_append_len", libprag.} + +proc appendLen*(self: String; val: string; len: int64): String = + new(result) + result.impl = g_string_append_len(cast[ptr String00](self.impl), cstring(val), len) + +proc g_string_append_unichar*(self: ptr String00; wc: gunichar): ptr String00 {. + importc: "g_string_append_unichar", libprag.} + +proc appendUnichar*(self: String; wc: gunichar): String = + new(result) + result.impl = g_string_append_unichar(cast[ptr String00](self.impl), wc) + +proc g_string_append_uri_escaped*(self: ptr String00; unescaped: cstring; reservedCharsAllowed: cstring; + allowUtf8: gboolean): ptr String00 {. + importc: "g_string_append_uri_escaped", libprag.} + +proc appendUriEscaped*(self: String; unescaped: string; reservedCharsAllowed: string; + allowUtf8: bool): String = + new(result) + result.impl = g_string_append_uri_escaped(cast[ptr String00](self.impl), cstring(unescaped), cstring(reservedCharsAllowed), gboolean(allowUtf8)) + +proc g_string_ascii_down*(self: ptr String00): ptr String00 {. + importc: "g_string_ascii_down", libprag.} + +proc asciiDown*(self: String): String = + new(result) + result.impl = g_string_ascii_down(cast[ptr String00](self.impl)) + +proc g_string_ascii_up*(self: ptr String00): ptr String00 {. + importc: "g_string_ascii_up", libprag.} + +proc asciiUp*(self: String): String = + new(result) + result.impl = g_string_ascii_up(cast[ptr String00](self.impl)) + +proc g_string_assign*(self: ptr String00; rval: cstring): ptr String00 {. + importc: "g_string_assign", libprag.} + +proc assign*(self: String; rval: string): String = + new(result) + result.impl = g_string_assign(cast[ptr String00](self.impl), cstring(rval)) + +proc g_string_down*(self: ptr String00): ptr String00 {. + importc: "g_string_down", libprag.} + +proc down*(self: String): String = + new(result) + result.impl = g_string_down(cast[ptr String00](self.impl)) + +proc g_string_equal*(self: ptr String00; v2: ptr String00): gboolean {. + importc: "g_string_equal", libprag.} + +proc equal*(self: String; v2: String): bool = + toBool(g_string_equal(cast[ptr String00](self.impl), cast[ptr String00](v2.impl))) + +proc g_string_erase*(self: ptr String00; pos: int64; len: int64): ptr String00 {. + importc: "g_string_erase", libprag.} + +proc erase*(self: String; pos: int64; len: int64): String = + new(result) + result.impl = g_string_erase(cast[ptr String00](self.impl), pos, len) + +proc g_string_free*(self: ptr String00; freeSegment: gboolean): cstring {. + importc: "g_string_free", libprag.} + +proc free*(self: String; freeSegment: bool): string = + let resul0 = g_string_free(cast[ptr String00](self.impl), gboolean(freeSegment)) + result = $resul0 + cogfree(resul0) + +proc g_string_free_to_bytes*(self: ptr String00): ptr Bytes00 {. + importc: "g_string_free_to_bytes", libprag.} + +proc freeToBytes*(self: String): Bytes = + new(result) + result.impl = g_string_free_to_bytes(cast[ptr String00](self.impl)) + +proc g_string_hash*(self: ptr String00): uint32 {. + importc: "g_string_hash", libprag.} + +proc hash*(self: String): int = + int(g_string_hash(cast[ptr String00](self.impl))) + +proc g_string_insert*(self: ptr String00; pos: int64; val: cstring): ptr String00 {. + importc: "g_string_insert", libprag.} + +proc insert*(self: String; pos: int64; val: string): String = + new(result) + result.impl = g_string_insert(cast[ptr String00](self.impl), pos, cstring(val)) + +proc g_string_insert_c*(self: ptr String00; pos: int64; c: int8): ptr String00 {. + importc: "g_string_insert_c", libprag.} + +proc insertC*(self: String; pos: int64; c: int8): String = + new(result) + result.impl = g_string_insert_c(cast[ptr String00](self.impl), pos, c) + +proc g_string_insert_len*(self: ptr String00; pos: int64; val: cstring; len: int64): ptr String00 {. + importc: "g_string_insert_len", libprag.} + +proc insertLen*(self: String; pos: int64; val: string; len: int64): String = + new(result) + result.impl = g_string_insert_len(cast[ptr String00](self.impl), pos, cstring(val), len) + +proc g_string_insert_unichar*(self: ptr String00; pos: int64; wc: gunichar): ptr String00 {. + importc: "g_string_insert_unichar", libprag.} + +proc insertUnichar*(self: String; pos: int64; wc: gunichar): String = + new(result) + result.impl = g_string_insert_unichar(cast[ptr String00](self.impl), pos, wc) + +proc g_string_overwrite*(self: ptr String00; pos: uint64; val: cstring): ptr String00 {. + importc: "g_string_overwrite", libprag.} + +proc overwrite*(self: String; pos: uint64; val: string): String = + new(result) + result.impl = g_string_overwrite(cast[ptr String00](self.impl), pos, cstring(val)) + +proc g_string_overwrite_len*(self: ptr String00; pos: uint64; val: cstring; len: int64): ptr String00 {. + importc: "g_string_overwrite_len", libprag.} + +proc overwriteLen*(self: String; pos: uint64; val: string; len: int64): String = + new(result) + result.impl = g_string_overwrite_len(cast[ptr String00](self.impl), pos, cstring(val), len) + +proc g_string_prepend*(self: ptr String00; val: cstring): ptr String00 {. + importc: "g_string_prepend", libprag.} + +proc prepend*(self: String; val: string): String = + new(result) + result.impl = g_string_prepend(cast[ptr String00](self.impl), cstring(val)) + +proc g_string_prepend_c*(self: ptr String00; c: int8): ptr String00 {. + importc: "g_string_prepend_c", libprag.} + +proc prependC*(self: String; c: int8): String = + new(result) + result.impl = g_string_prepend_c(cast[ptr String00](self.impl), c) + +proc g_string_prepend_len*(self: ptr String00; val: cstring; len: int64): ptr String00 {. + importc: "g_string_prepend_len", libprag.} + +proc prependLen*(self: String; val: string; len: int64): String = + new(result) + result.impl = g_string_prepend_len(cast[ptr String00](self.impl), cstring(val), len) + +proc g_string_prepend_unichar*(self: ptr String00; wc: gunichar): ptr String00 {. + importc: "g_string_prepend_unichar", libprag.} + +proc prependUnichar*(self: String; wc: gunichar): String = + new(result) + result.impl = g_string_prepend_unichar(cast[ptr String00](self.impl), wc) + +proc g_string_set_size*(self: ptr String00; len: uint64): ptr String00 {. + importc: "g_string_set_size", libprag.} + +proc setSize*(self: String; len: uint64): String = + new(result) + result.impl = g_string_set_size(cast[ptr String00](self.impl), len) + +proc `size=`*(self: String; len: uint64): String = + new(result) + result.impl = g_string_set_size(cast[ptr String00](self.impl), len) + +proc g_string_truncate*(self: ptr String00; len: uint64): ptr String00 {. + importc: "g_string_truncate", libprag.} + +proc truncate*(self: String; len: uint64): String = + new(result) + result.impl = g_string_truncate(cast[ptr String00](self.impl), len) + +proc g_string_up*(self: ptr String00): ptr String00 {. + importc: "g_string_up", libprag.} + +proc up*(self: String): String = + new(result) + result.impl = g_string_up(cast[ptr String00](self.impl)) + +type + RegexEvalCallback* = proc (matchInfo: ptr MatchInfo00; resu: ptr String00; userData: pointer): gboolean {.cdecl.} + +const SEARCHPATH_SEPARATOR* = 59'i32 + +const SEARCHPATH_SEPARATOR_S* = ";" + +const SIZEOF_LONG* = 8'i32 + +const SIZEOF_SIZE_T* = 8'i32 + +const SIZEOF_SSIZE_T* = 8'i32 + +const SIZEOF_VOID_P* = 8'i32 + +type + SList00* {.pure.} = object + data*: pointer + next*: ptr pointer + SList* = ref object + impl*: ptr SList00 + +const SOURCE_CONTINUE* = true + +const SOURCE_REMOVE* = false + +const SQRT2* = 1.414214'f64 + +const STR_DELIMITERS* = "_-|> <." + +const SYSDEF_AF_INET* = 2'i32 + +const SYSDEF_AF_INET6* = 10'i32 + +const SYSDEF_AF_UNIX* = 1'i32 + +const SYSDEF_MSG_DONTROUTE* = 4'i32 + +const SYSDEF_MSG_OOB* = 1'i32 + +const SYSDEF_MSG_PEEK* = 2'i32 + +type + ScannerConfig00* {.pure.} = object + csetSkipCharacters*: cstring + csetIdentifierFirst*: cstring + csetIdentifierNth*: cstring + cpairCommentSingle*: cstring + caseSensitive*: uint32 + skipCommentMulti*: uint32 + skipCommentSingle*: uint32 + scanCommentMulti*: uint32 + scanIdentifier*: uint32 + scanIdentifier_1char*: uint32 + scanIdentifier_NULL*: uint32 + scanSymbols*: uint32 + scanBinary*: uint32 + scanOctal*: uint32 + scanFloat*: uint32 + scanHex*: uint32 + scanHexDollar*: uint32 + scanStringSq*: uint32 + scanStringDq*: uint32 + numbers_2Int*: uint32 + int_2Float*: uint32 + identifier_2String*: uint32 + char_2Token*: uint32 + symbol_2Token*: uint32 + scope_0Fallback*: uint32 + storeInt64*: uint32 + paddingDummy*: uint32 + ScannerConfig* = ref object + impl*: ptr ScannerConfig00 + +type + TokenType* {.size: sizeof(cint), pure.} = enum + eof = 0 + leftParen = 40 + rightParen = 41 + comma = 44 + equalSign = 61 + leftBrace = 91 + rightBrace = 93 + leftCurly = 123 + rightCurly = 125 + none = 256 + error = 257 + char = 258 + binary = 259 + octal = 260 + int = 261 + hex = 262 + float = 263 + string = 264 + symbol = 265 + identifier = 266 + identifierNull = 267 + commentSingle = 268 + commentMulti = 269 + +type + Sequence00* {.pure.} = object + Sequence* = ref object + impl*: ptr Sequence00 + +proc g_sequence_free*(self: ptr Sequence00) {. + importc: "g_sequence_free", libprag.} + +proc free*(self: Sequence) = + g_sequence_free(cast[ptr Sequence00](self.impl)) + +proc g_sequence_get_length*(self: ptr Sequence00): int32 {. + importc: "g_sequence_get_length", libprag.} + +proc getLength*(self: Sequence): int = + int(g_sequence_get_length(cast[ptr Sequence00](self.impl))) + +proc length*(self: Sequence): int = + int(g_sequence_get_length(cast[ptr Sequence00](self.impl))) + +proc g_sequence_is_empty*(self: ptr Sequence00): gboolean {. + importc: "g_sequence_is_empty", libprag.} + +proc isEmpty*(self: Sequence): bool = + toBool(g_sequence_is_empty(cast[ptr Sequence00](self.impl))) + +type + SequenceIter00* {.pure.} = object + SequenceIter* = ref object + impl*: ptr SequenceIter00 + +proc g_sequence_iter_compare*(self: ptr SequenceIter00; b: ptr SequenceIter00): int32 {. + importc: "g_sequence_iter_compare", libprag.} + +proc compare*(self: SequenceIter; b: SequenceIter): int = + int(g_sequence_iter_compare(cast[ptr SequenceIter00](self.impl), cast[ptr SequenceIter00](b.impl))) + +proc g_sequence_iter_get_position*(self: ptr SequenceIter00): int32 {. + importc: "g_sequence_iter_get_position", libprag.} + +proc getPosition*(self: SequenceIter): int = + int(g_sequence_iter_get_position(cast[ptr SequenceIter00](self.impl))) + +proc position*(self: SequenceIter): int = + int(g_sequence_iter_get_position(cast[ptr SequenceIter00](self.impl))) + +proc g_sequence_iter_is_begin*(self: ptr SequenceIter00): gboolean {. + importc: "g_sequence_iter_is_begin", libprag.} + +proc isBegin*(self: SequenceIter): bool = + toBool(g_sequence_iter_is_begin(cast[ptr SequenceIter00](self.impl))) + +proc g_sequence_iter_is_end*(self: ptr SequenceIter00): gboolean {. + importc: "g_sequence_iter_is_end", libprag.} + +proc isEnd*(self: SequenceIter): bool = + toBool(g_sequence_iter_is_end(cast[ptr SequenceIter00](self.impl))) + +proc g_sequence_get*(iter: ptr SequenceIter00): pointer {. + importc: "g_sequence_get", libprag.} + +proc get*(iter: SequenceIter): pointer = + g_sequence_get(cast[ptr SequenceIter00](iter.impl)) + +proc g_sequence_move*(src: ptr SequenceIter00; dest: ptr SequenceIter00) {. + importc: "g_sequence_move", libprag.} + +proc move*(src: SequenceIter; dest: SequenceIter) = + g_sequence_move(cast[ptr SequenceIter00](src.impl), cast[ptr SequenceIter00](dest.impl)) + +proc g_sequence_move_range*(dest: ptr SequenceIter00; begin: ptr SequenceIter00; + `end`: ptr SequenceIter00) {. + importc: "g_sequence_move_range", libprag.} + +proc moveRange*(dest: SequenceIter; begin: SequenceIter; `end`: SequenceIter) = + g_sequence_move_range(cast[ptr SequenceIter00](dest.impl), cast[ptr SequenceIter00](begin.impl), cast[ptr SequenceIter00](`end`.impl)) + +proc g_sequence_remove*(iter: ptr SequenceIter00) {. + importc: "g_sequence_remove", libprag.} + +proc remove*(iter: SequenceIter) = + g_sequence_remove(cast[ptr SequenceIter00](iter.impl)) + +proc g_sequence_remove_range*(begin: ptr SequenceIter00; `end`: ptr SequenceIter00) {. + importc: "g_sequence_remove_range", libprag.} + +proc removeRange*(begin: SequenceIter; `end`: SequenceIter) = + g_sequence_remove_range(cast[ptr SequenceIter00](begin.impl), cast[ptr SequenceIter00](`end`.impl)) + +proc g_sequence_set*(iter: ptr SequenceIter00; data: pointer) {. + importc: "g_sequence_set", libprag.} + +proc set*(iter: SequenceIter; data: pointer) = + g_sequence_set(cast[ptr SequenceIter00](iter.impl), data) + +proc g_sequence_swap*(a: ptr SequenceIter00; b: ptr SequenceIter00) {. + importc: "g_sequence_swap", libprag.} + +proc swap*(a: SequenceIter; b: SequenceIter) = + g_sequence_swap(cast[ptr SequenceIter00](a.impl), cast[ptr SequenceIter00](b.impl)) + +type + SequenceIterCompareFunc* = proc (a: ptr SequenceIter00; b: ptr SequenceIter00; data: pointer): int32 {.cdecl.} + +type + ShellError* {.size: sizeof(cint), pure.} = enum + badQuoting = 0 + emptyString = 1 + failed = 2 + +type + SliceConfig* {.size: sizeof(cint), pure.} = enum + alwaysMalloc = 1 + bypassMagazines = 2 + workingSetMsecs = 3 + colorIncrement = 4 + chunkSizes = 5 + contentionCounter = 6 + +type + SourceDummyMarshal* = proc () {.cdecl.} + +type + SourceFunc* = proc (userData: pointer): gboolean {.cdecl.} + +proc g_main_context_invoke_full*(self: ptr MainContext00; priority: int32; function: SourceFunc; + data: pointer; notify: DestroyNotify) {. + importc: "g_main_context_invoke_full", libprag.} + +proc invokeFull*(self: MainContext; priority: int; function: SourceFunc; + data: pointer; notify: DestroyNotify) = + g_main_context_invoke_full(cast[ptr MainContext00](self.impl), int32(priority), function, data, notify) + +type + SourcePrivate00* {.pure.} = object + SourcePrivate* = ref object + impl*: ptr SourcePrivate00 +type + + SourceFuncs00* {.pure.} = object + prepare*: proc(source: ptr Source00; timeout: ptr int32): gboolean {.cdecl.} + check*: proc(source: ptr Source00): gboolean {.cdecl.} + dispatch*: pointer + finalize*: proc(source: ptr Source00) {.cdecl.} + closureCallback*: SourceFunc + closureMarshal*: SourceDummyMarshal + SourceFuncs* = ref object + impl*: ptr SourceFuncs00 + + Source00* {.pure.} = object + callbackData*: pointer + callbackFuncs*: ptr SourceCallbackFuncs00 + sourceFuncs*: ptr SourceFuncs00 + refCount*: uint32 + context*: ptr MainContext00 + priority*: int32 + flags*: uint32 + sourceId*: uint32 + pollFds*: ptr pointer + prev*: ptr Source00 + next*: ptr Source00 + name*: cstring + priv*: ptr SourcePrivate00 + Source* = ref object + impl*: ptr Source00 + +proc g_source_new*(sourceFuncs: ptr SourceFuncs00; structSize: uint32): ptr Source00 {. + importc: "g_source_new", libprag.} + +proc newSource*(sourceFuncs: SourceFuncs; structSize: int): Source = + new(result) + result.impl = g_source_new(cast[ptr SourceFuncs00](sourceFuncs.impl), uint32(structSize)) + +proc initSource*[T](result: var T; sourceFuncs: SourceFuncs; structSize: int) = + assert(result is Source) + new(result) + result.impl = g_source_new(cast[ptr SourceFuncs00](sourceFuncs.impl), uint32(structSize)) + +proc g_source_add_child_source*(self: ptr Source00; childSource: ptr Source00) {. + importc: "g_source_add_child_source", libprag.} + +proc addChildSource*(self: Source; childSource: Source) = + g_source_add_child_source(cast[ptr Source00](self.impl), cast[ptr Source00](childSource.impl)) + +proc g_source_add_poll*(self: ptr Source00; fd: ptr PollFD00) {. + importc: "g_source_add_poll", libprag.} + +proc addPoll*(self: Source; fd: PollFD) = + g_source_add_poll(cast[ptr Source00](self.impl), cast[ptr PollFD00](fd.impl)) + +proc g_source_add_unix_fd*(self: ptr Source00; fd: int32; events: IOCondition): pointer {. + importc: "g_source_add_unix_fd", libprag.} + +proc addUnixFd*(self: Source; fd: int; events: IOCondition): pointer = + g_source_add_unix_fd(cast[ptr Source00](self.impl), int32(fd), events) + +proc g_source_attach*(self: ptr Source00; context: ptr MainContext00): uint32 {. + importc: "g_source_attach", libprag.} + +proc attach*(self: Source; context: MainContext): int = + int(g_source_attach(cast[ptr Source00](self.impl), cast[ptr MainContext00](context.impl))) + +proc g_source_destroy*(self: ptr Source00) {. + importc: "g_source_destroy", libprag.} + +proc destroy*(self: Source) = + g_source_destroy(cast[ptr Source00](self.impl)) + +proc g_source_get_can_recurse*(self: ptr Source00): gboolean {. + importc: "g_source_get_can_recurse", libprag.} + +proc getCanRecurse*(self: Source): bool = + toBool(g_source_get_can_recurse(cast[ptr Source00](self.impl))) + +proc canRecurse*(self: Source): bool = + toBool(g_source_get_can_recurse(cast[ptr Source00](self.impl))) + +proc g_source_get_context*(self: ptr Source00): ptr MainContext00 {. + importc: "g_source_get_context", libprag.} + +proc getContext*(self: Source): MainContext = + new(result) + result.impl = g_source_get_context(cast[ptr Source00](self.impl)) + +proc context*(self: Source): MainContext = + new(result) + result.impl = g_source_get_context(cast[ptr Source00](self.impl)) + +proc g_source_get_current_time*(self: ptr Source00; timeval: ptr TimeVal00) {. + importc: "g_source_get_current_time", libprag.} + +proc getCurrentTime*(self: Source; timeval: TimeVal) = + g_source_get_current_time(cast[ptr Source00](self.impl), cast[ptr TimeVal00](timeval.impl)) + +proc currentTime*(self: Source; timeval: TimeVal) = + g_source_get_current_time(cast[ptr Source00](self.impl), cast[ptr TimeVal00](timeval.impl)) + +proc g_source_get_id*(self: ptr Source00): uint32 {. + importc: "g_source_get_id", libprag.} + +proc getId*(self: Source): int = + int(g_source_get_id(cast[ptr Source00](self.impl))) + +proc id*(self: Source): int = + int(g_source_get_id(cast[ptr Source00](self.impl))) + +proc g_source_get_name*(self: ptr Source00): cstring {. + importc: "g_source_get_name", libprag.} + +proc getName*(self: Source): string = + let resul0 = g_source_get_name(cast[ptr Source00](self.impl)) + result = $resul0 + +proc name*(self: Source): string = + let resul0 = g_source_get_name(cast[ptr Source00](self.impl)) + result = $resul0 + +proc g_source_get_priority*(self: ptr Source00): int32 {. + importc: "g_source_get_priority", libprag.} + +proc getPriority*(self: Source): int = + int(g_source_get_priority(cast[ptr Source00](self.impl))) + +proc priority*(self: Source): int = + int(g_source_get_priority(cast[ptr Source00](self.impl))) + +proc g_source_get_ready_time*(self: ptr Source00): int64 {. + importc: "g_source_get_ready_time", libprag.} + +proc getReadyTime*(self: Source): int64 = + g_source_get_ready_time(cast[ptr Source00](self.impl)) + +proc readyTime*(self: Source): int64 = + g_source_get_ready_time(cast[ptr Source00](self.impl)) + +proc g_source_get_time*(self: ptr Source00): int64 {. + importc: "g_source_get_time", libprag.} + +proc getTime*(self: Source): int64 = + g_source_get_time(cast[ptr Source00](self.impl)) + +proc time*(self: Source): int64 = + g_source_get_time(cast[ptr Source00](self.impl)) + +proc g_source_is_destroyed*(self: ptr Source00): gboolean {. + importc: "g_source_is_destroyed", libprag.} + +proc isDestroyed*(self: Source): bool = + toBool(g_source_is_destroyed(cast[ptr Source00](self.impl))) + +proc g_source_modify_unix_fd*(self: ptr Source00; tag: pointer; newEvents: IOCondition) {. + importc: "g_source_modify_unix_fd", libprag.} + +proc modifyUnixFd*(self: Source; tag: pointer; newEvents: IOCondition) = + g_source_modify_unix_fd(cast[ptr Source00](self.impl), tag, newEvents) + +proc g_source_query_unix_fd*(self: ptr Source00; tag: pointer): IOCondition {. + importc: "g_source_query_unix_fd", libprag.} + +proc queryUnixFd*(self: Source; tag: pointer): IOCondition = + g_source_query_unix_fd(cast[ptr Source00](self.impl), tag) + +proc g_source_ref*(self: ptr Source00): ptr Source00 {. + importc: "g_source_ref", libprag.} + +proc `ref`*(self: Source): Source = + new(result) + result.impl = g_source_ref(cast[ptr Source00](self.impl)) + +proc g_source_remove_child_source*(self: ptr Source00; childSource: ptr Source00) {. + importc: "g_source_remove_child_source", libprag.} + +proc removeChildSource*(self: Source; childSource: Source) = + g_source_remove_child_source(cast[ptr Source00](self.impl), cast[ptr Source00](childSource.impl)) + +proc g_source_remove_poll*(self: ptr Source00; fd: ptr PollFD00) {. + importc: "g_source_remove_poll", libprag.} + +proc removePoll*(self: Source; fd: PollFD) = + g_source_remove_poll(cast[ptr Source00](self.impl), cast[ptr PollFD00](fd.impl)) + +proc g_source_remove_unix_fd*(self: ptr Source00; tag: pointer) {. + importc: "g_source_remove_unix_fd", libprag.} + +proc removeUnixFd*(self: Source; tag: pointer) = + g_source_remove_unix_fd(cast[ptr Source00](self.impl), tag) + +proc g_source_set_callback*(self: ptr Source00; `func`: SourceFunc; data: pointer; + notify: DestroyNotify) {. + importc: "g_source_set_callback", libprag.} + +proc setCallback*(self: Source; `func`: SourceFunc; data: pointer; notify: DestroyNotify) = + g_source_set_callback(cast[ptr Source00](self.impl), `func`, data, notify) + +proc g_source_set_callback_indirect*(self: ptr Source00; callbackData: pointer; callbackFuncs: ptr SourceCallbackFuncs00) {. + importc: "g_source_set_callback_indirect", libprag.} + +proc setCallbackIndirect*(self: Source; callbackData: pointer; callbackFuncs: SourceCallbackFuncs) = + g_source_set_callback_indirect(cast[ptr Source00](self.impl), callbackData, cast[ptr SourceCallbackFuncs00](callbackFuncs.impl)) + +proc g_source_set_can_recurse*(self: ptr Source00; canRecurse: gboolean) {. + importc: "g_source_set_can_recurse", libprag.} + +proc setCanRecurse*(self: Source; canRecurse: bool) = + g_source_set_can_recurse(cast[ptr Source00](self.impl), gboolean(canRecurse)) + +proc `canRecurse=`*(self: Source; canRecurse: bool) = + g_source_set_can_recurse(cast[ptr Source00](self.impl), gboolean(canRecurse)) + +proc g_source_set_funcs*(self: ptr Source00; funcs: ptr SourceFuncs00) {. + importc: "g_source_set_funcs", libprag.} + +proc setFuncs*(self: Source; funcs: SourceFuncs) = + g_source_set_funcs(cast[ptr Source00](self.impl), cast[ptr SourceFuncs00](funcs.impl)) + +proc `funcs=`*(self: Source; funcs: SourceFuncs) = + g_source_set_funcs(cast[ptr Source00](self.impl), cast[ptr SourceFuncs00](funcs.impl)) + +proc g_source_set_name*(self: ptr Source00; name: cstring) {. + importc: "g_source_set_name", libprag.} + +proc setName*(self: Source; name: string) = + g_source_set_name(cast[ptr Source00](self.impl), cstring(name)) + +proc `name=`*(self: Source; name: string) = + g_source_set_name(cast[ptr Source00](self.impl), cstring(name)) + +proc g_source_set_priority*(self: ptr Source00; priority: int32) {. + importc: "g_source_set_priority", libprag.} + +proc setPriority*(self: Source; priority: int) = + g_source_set_priority(cast[ptr Source00](self.impl), int32(priority)) + +proc `priority=`*(self: Source; priority: int) = + g_source_set_priority(cast[ptr Source00](self.impl), int32(priority)) + +proc g_source_set_ready_time*(self: ptr Source00; readyTime: int64) {. + importc: "g_source_set_ready_time", libprag.} + +proc setReadyTime*(self: Source; readyTime: int64) = + g_source_set_ready_time(cast[ptr Source00](self.impl), readyTime) + +proc `readyTime=`*(self: Source; readyTime: int64) = + g_source_set_ready_time(cast[ptr Source00](self.impl), readyTime) + +proc g_source_unref*(self: ptr Source00) {. + importc: "g_source_unref", libprag.} + +proc unref*(self: Source) = + g_source_unref(cast[ptr Source00](self.impl)) + +proc g_source_remove*(tag: uint32): gboolean {. + importc: "g_source_remove", libprag.} + +proc remove*(tag: uint32): gboolean {. + importc: "g_source_remove", libprag.} + +proc g_source_remove_by_funcs_user_data*(funcs: ptr SourceFuncs00; userData: pointer): gboolean {. + importc: "g_source_remove_by_funcs_user_data", libprag.} + +proc removeByFuncsUserData*(funcs: SourceFuncs; userData: pointer): bool = + toBool(g_source_remove_by_funcs_user_data(cast[ptr SourceFuncs00](funcs.impl), userData)) + +proc g_source_remove_by_user_data*(userData: pointer): gboolean {. + importc: "g_source_remove_by_user_data", libprag.} + +proc removeByUserData*(userData: pointer): gboolean {. + importc: "g_source_remove_by_user_data", libprag.} + +proc g_source_set_name_by_id*(tag: uint32; name: cstring) {. + importc: "g_source_set_name_by_id", libprag.} + +proc setNameById*(tag: uint32; name: cstring) {. + importc: "g_source_set_name_by_id", libprag.} + +proc `nameById=`*(tag: uint32; name: cstring) {. + importc: "g_source_set_name_by_id", libprag.} + +proc g_main_context_find_source_by_funcs_user_data*(self: ptr MainContext00; funcs: ptr SourceFuncs00; + userData: pointer): ptr Source00 {. + importc: "g_main_context_find_source_by_funcs_user_data", libprag.} + +proc findSourceByFuncsUserData*(self: MainContext; funcs: SourceFuncs; userData: pointer): Source = + new(result) + result.impl = g_main_context_find_source_by_funcs_user_data(cast[ptr MainContext00](self.impl), cast[ptr SourceFuncs00](funcs.impl), userData) + +proc g_main_context_find_source_by_id*(self: ptr MainContext00; sourceId: uint32): ptr Source00 {. + importc: "g_main_context_find_source_by_id", libprag.} + +proc findSourceById*(self: MainContext; sourceId: int): Source = + new(result) + result.impl = g_main_context_find_source_by_id(cast[ptr MainContext00](self.impl), uint32(sourceId)) + +proc g_main_context_find_source_by_user_data*(self: ptr MainContext00; userData: pointer): ptr Source00 {. + importc: "g_main_context_find_source_by_user_data", libprag.} + +proc findSourceByUserData*(self: MainContext; userData: pointer): Source = + new(result) + result.impl = g_main_context_find_source_by_user_data(cast[ptr MainContext00](self.impl), userData) + +type + SpawnChildSetupFunc* = proc (userData: pointer) {.cdecl.} +type + + IOFuncs00* {.pure.} = object + ioRead*: proc(channel: ptr IOChannel00; buf: cstring; count: uint64; + bytesRead: ptr uint64): IOStatus {.cdecl.} + ioWrite*: proc(channel: ptr IOChannel00; buf: cstring; count: uint64; + bytesWritten: ptr uint64): IOStatus {.cdecl.} + ioSeek*: proc(channel: ptr IOChannel00; offset: int64; `type`: SeekType): IOStatus {.cdecl.} + ioClose*: proc(channel: ptr IOChannel00): IOStatus {.cdecl.} + ioCreateWatch*: proc(channel: ptr IOChannel00; condition: IOCondition): ptr Source00 {.cdecl.} + ioFree*: proc(channel: ptr IOChannel00) {.cdecl.} + ioSetFlags*: proc(channel: ptr IOChannel00; flags: IOFlags): IOStatus {.cdecl.} + ioGetFlags*: proc(channel: ptr IOChannel00): IOFlags {.cdecl.} + IOFuncs* = ref object + impl*: ptr IOFuncs00 + + IOChannel00* {.pure.} = object + refCount*: int32 + funcs*: ptr IOFuncs00 + encoding*: cstring + readCd*: ptr IConv00 + writeCd*: ptr IConv00 + lineTerm*: cstring + lineTermLen*: uint32 + bufSize*: uint64 + readBuf*: ptr String00 + encodedReadBuf*: ptr String00 + writeBuf*: ptr String00 + partialWriteBuf*: array[6, int8] + useBuffer*: uint32 + doEncode*: uint32 + closeOnUnref*: uint32 + isReadable*: uint32 + isWriteable*: uint32 + isSeekable*: uint32 + reserved1*: pointer + reserved2*: pointer + IOChannel* = ref object + impl*: ptr IOChannel00 + +proc g_io_channel_new_file*(filename: ucstring; mode: cstring): ptr IOChannel00 {. + importc: "g_io_channel_new_file", libprag.} + +proc newIOChannelFile*(filename: ucstring; mode: string): IOChannel = + new(result) + result.impl = g_io_channel_new_file(filename, cstring(mode)) + +proc initIOChannelFile*[T](result: var T; filename: ucstring; mode: string) = + assert(result is IOChannel) + new(result) + result.impl = g_io_channel_new_file(filename, cstring(mode)) + +proc g_io_channel_unix_new*(fd: int32): ptr IOChannel00 {. + importc: "g_io_channel_unix_new", libprag.} + +proc unixNew*(fd: int): IOChannel = + new(result) + result.impl = g_io_channel_unix_new(int32(fd)) + +proc unixNew*[T](result: var T; fd: int) = + assert(result is IOChannel) + new(result) + result.impl = g_io_channel_unix_new(int32(fd)) + +proc g_io_channel_close*(self: ptr IOChannel00) {. + importc: "g_io_channel_close", libprag.} + +proc close*(self: IOChannel) = + g_io_channel_close(cast[ptr IOChannel00](self.impl)) + +proc g_io_channel_flush*(self: ptr IOChannel00): IOStatus {. + importc: "g_io_channel_flush", libprag.} + +proc flush*(self: IOChannel): IOStatus = + g_io_channel_flush(cast[ptr IOChannel00](self.impl)) + +proc g_io_channel_get_buffer_condition*(self: ptr IOChannel00): IOCondition {. + importc: "g_io_channel_get_buffer_condition", libprag.} + +proc getBufferCondition*(self: IOChannel): IOCondition = + g_io_channel_get_buffer_condition(cast[ptr IOChannel00](self.impl)) + +proc bufferCondition*(self: IOChannel): IOCondition = + g_io_channel_get_buffer_condition(cast[ptr IOChannel00](self.impl)) + +proc g_io_channel_get_buffer_size*(self: ptr IOChannel00): uint64 {. + importc: "g_io_channel_get_buffer_size", libprag.} + +proc getBufferSize*(self: IOChannel): uint64 = + g_io_channel_get_buffer_size(cast[ptr IOChannel00](self.impl)) + +proc bufferSize*(self: IOChannel): uint64 = + g_io_channel_get_buffer_size(cast[ptr IOChannel00](self.impl)) + +proc g_io_channel_get_buffered*(self: ptr IOChannel00): gboolean {. + importc: "g_io_channel_get_buffered", libprag.} + +proc getBuffered*(self: IOChannel): bool = + toBool(g_io_channel_get_buffered(cast[ptr IOChannel00](self.impl))) + +proc buffered*(self: IOChannel): bool = + toBool(g_io_channel_get_buffered(cast[ptr IOChannel00](self.impl))) + +proc g_io_channel_get_close_on_unref*(self: ptr IOChannel00): gboolean {. + importc: "g_io_channel_get_close_on_unref", libprag.} + +proc getCloseOnUnref*(self: IOChannel): bool = + toBool(g_io_channel_get_close_on_unref(cast[ptr IOChannel00](self.impl))) + +proc closeOnUnref*(self: IOChannel): bool = + toBool(g_io_channel_get_close_on_unref(cast[ptr IOChannel00](self.impl))) + +proc g_io_channel_get_encoding*(self: ptr IOChannel00): cstring {. + importc: "g_io_channel_get_encoding", libprag.} + +proc getEncoding*(self: IOChannel): string = + let resul0 = g_io_channel_get_encoding(cast[ptr IOChannel00](self.impl)) + result = $resul0 + +proc encoding*(self: IOChannel): string = + let resul0 = g_io_channel_get_encoding(cast[ptr IOChannel00](self.impl)) + result = $resul0 + +proc g_io_channel_get_flags*(self: ptr IOChannel00): IOFlags {. + importc: "g_io_channel_get_flags", libprag.} + +proc getFlags*(self: IOChannel): IOFlags = + g_io_channel_get_flags(cast[ptr IOChannel00](self.impl)) + +proc flags*(self: IOChannel): IOFlags = + g_io_channel_get_flags(cast[ptr IOChannel00](self.impl)) + +proc g_io_channel_get_line_term*(self: ptr IOChannel00; length: ptr int32): cstring {. + importc: "g_io_channel_get_line_term", libprag.} + +proc getLineTerm*(self: IOChannel; length: ptr int32): string = + let resul0 = g_io_channel_get_line_term(cast[ptr IOChannel00](self.impl), length) + result = $resul0 + +proc lineTerm*(self: IOChannel; length: ptr int32): string = + let resul0 = g_io_channel_get_line_term(cast[ptr IOChannel00](self.impl), length) + result = $resul0 + +proc g_io_channel_init*(self: ptr IOChannel00) {. + importc: "g_io_channel_init", libprag.} + +proc init*(self: IOChannel) = + g_io_channel_init(cast[ptr IOChannel00](self.impl)) + +proc g_io_channel_read*(self: ptr IOChannel00; buf: cstring; count: uint64; + bytesRead: ptr uint64): IOError {. + importc: "g_io_channel_read", libprag.} + +proc read*(self: IOChannel; buf: string; count: uint64; bytesRead: ptr uint64): IOError = + g_io_channel_read(cast[ptr IOChannel00](self.impl), cstring(buf), count, bytesRead) + +proc g_io_channel_read_chars*(self: ptr IOChannel00; buf: var uint8Array; count: uint64; + bytesRead: var uint64): IOStatus {. + importc: "g_io_channel_read_chars", libprag.} + +proc readChars*(self: IOChannel; buf: var uint8Array; count: uint64; + bytesRead: var uint64): IOStatus = + g_io_channel_read_chars(cast[ptr IOChannel00](self.impl), buf, count, bytesRead) + +proc g_io_channel_read_line*(self: ptr IOChannel00; strReturn: var cstring; length: var uint64; + terminatorPos: var uint64): IOStatus {. + importc: "g_io_channel_read_line", libprag.} + +proc readLine*(self: IOChannel; strReturn: var string; length: var uint64; + terminatorPos: var uint64): IOStatus = + var strReturn_00 = cstring(strReturn) + result = g_io_channel_read_line(cast[ptr IOChannel00](self.impl), strReturn_00, length, terminatorPos) + strReturn = $(strReturn_00) + +proc g_io_channel_read_line_string*(self: ptr IOChannel00; buffer: ptr String00; terminatorPos: ptr uint64): IOStatus {. + importc: "g_io_channel_read_line_string", libprag.} + +proc readLineString*(self: IOChannel; buffer: String; terminatorPos: ptr uint64): IOStatus = + g_io_channel_read_line_string(cast[ptr IOChannel00](self.impl), cast[ptr String00](buffer.impl), terminatorPos) + +proc g_io_channel_read_to_end*(self: ptr IOChannel00; strReturn: var uint8Array; + length: var uint64): IOStatus {. + importc: "g_io_channel_read_to_end", libprag.} + +proc readToEnd*(self: IOChannel; strReturn: var uint8Array; length: var uint64): IOStatus = + g_io_channel_read_to_end(cast[ptr IOChannel00](self.impl), strReturn, length) + +proc g_io_channel_read_unichar*(self: ptr IOChannel00; thechar: var gunichar): IOStatus {. + importc: "g_io_channel_read_unichar", libprag.} + +proc readUnichar*(self: IOChannel; thechar: var gunichar): IOStatus = + g_io_channel_read_unichar(cast[ptr IOChannel00](self.impl), thechar) + +proc g_io_channel_ref*(self: ptr IOChannel00): ptr IOChannel00 {. + importc: "g_io_channel_ref", libprag.} + +proc `ref`*(self: IOChannel): IOChannel = + new(result) + result.impl = g_io_channel_ref(cast[ptr IOChannel00](self.impl)) + +proc g_io_channel_seek*(self: ptr IOChannel00; offset: int64; `type`: SeekType): IOError {. + importc: "g_io_channel_seek", libprag.} + +proc seek*(self: IOChannel; offset: int64; `type`: SeekType): IOError = + g_io_channel_seek(cast[ptr IOChannel00](self.impl), offset, `type`) + +proc g_io_channel_seek_position*(self: ptr IOChannel00; offset: int64; `type`: SeekType): IOStatus {. + importc: "g_io_channel_seek_position", libprag.} + +proc seekPosition*(self: IOChannel; offset: int64; `type`: SeekType): IOStatus = + g_io_channel_seek_position(cast[ptr IOChannel00](self.impl), offset, `type`) + +proc g_io_channel_set_buffer_size*(self: ptr IOChannel00; size: uint64) {. + importc: "g_io_channel_set_buffer_size", libprag.} + +proc setBufferSize*(self: IOChannel; size: uint64) = + g_io_channel_set_buffer_size(cast[ptr IOChannel00](self.impl), size) + +proc `bufferSize=`*(self: IOChannel; size: uint64) = + g_io_channel_set_buffer_size(cast[ptr IOChannel00](self.impl), size) + +proc g_io_channel_set_buffered*(self: ptr IOChannel00; buffered: gboolean) {. + importc: "g_io_channel_set_buffered", libprag.} + +proc setBuffered*(self: IOChannel; buffered: bool) = + g_io_channel_set_buffered(cast[ptr IOChannel00](self.impl), gboolean(buffered)) + +proc `buffered=`*(self: IOChannel; buffered: bool) = + g_io_channel_set_buffered(cast[ptr IOChannel00](self.impl), gboolean(buffered)) + +proc g_io_channel_set_close_on_unref*(self: ptr IOChannel00; doClose: gboolean) {. + importc: "g_io_channel_set_close_on_unref", libprag.} + +proc setCloseOnUnref*(self: IOChannel; doClose: bool) = + g_io_channel_set_close_on_unref(cast[ptr IOChannel00](self.impl), gboolean(doClose)) + +proc `closeOnUnref=`*(self: IOChannel; doClose: bool) = + g_io_channel_set_close_on_unref(cast[ptr IOChannel00](self.impl), gboolean(doClose)) + +proc g_io_channel_set_encoding*(self: ptr IOChannel00; encoding: cstring): IOStatus {. + importc: "g_io_channel_set_encoding", libprag.} + +proc setEncoding*(self: IOChannel; encoding: string): IOStatus = + g_io_channel_set_encoding(cast[ptr IOChannel00](self.impl), cstring(encoding)) + +proc `encoding=`*(self: IOChannel; encoding: string): IOStatus = + g_io_channel_set_encoding(cast[ptr IOChannel00](self.impl), cstring(encoding)) + +proc g_io_channel_set_flags*(self: ptr IOChannel00; flags: IOFlags): IOStatus {. + importc: "g_io_channel_set_flags", libprag.} + +proc setFlags*(self: IOChannel; flags: IOFlags): IOStatus = + g_io_channel_set_flags(cast[ptr IOChannel00](self.impl), flags) + +proc `flags=`*(self: IOChannel; flags: IOFlags): IOStatus = + g_io_channel_set_flags(cast[ptr IOChannel00](self.impl), flags) + +proc g_io_channel_set_line_term*(self: ptr IOChannel00; lineTerm: cstring; length: int32) {. + importc: "g_io_channel_set_line_term", libprag.} + +proc setLineTerm*(self: IOChannel; lineTerm: string; length: int) = + g_io_channel_set_line_term(cast[ptr IOChannel00](self.impl), cstring(lineTerm), int32(length)) + +proc g_io_channel_shutdown*(self: ptr IOChannel00; flush: gboolean): IOStatus {. + importc: "g_io_channel_shutdown", libprag.} + +proc shutdown*(self: IOChannel; flush: bool): IOStatus = + g_io_channel_shutdown(cast[ptr IOChannel00](self.impl), gboolean(flush)) + +proc g_io_channel_unix_get_fd*(self: ptr IOChannel00): int32 {. + importc: "g_io_channel_unix_get_fd", libprag.} + +proc unixGetFd*(self: IOChannel): int = + int(g_io_channel_unix_get_fd(cast[ptr IOChannel00](self.impl))) + +proc g_io_channel_unref*(self: ptr IOChannel00) {. + importc: "g_io_channel_unref", libprag.} + +proc unref*(self: IOChannel) = + g_io_channel_unref(cast[ptr IOChannel00](self.impl)) + +proc g_io_channel_write*(self: ptr IOChannel00; buf: cstring; count: uint64; + bytesWritten: ptr uint64): IOError {. + importc: "g_io_channel_write", libprag.} + +proc write*(self: IOChannel; buf: string; count: uint64; bytesWritten: ptr uint64): IOError = + g_io_channel_write(cast[ptr IOChannel00](self.impl), cstring(buf), count, bytesWritten) + +proc g_io_channel_write_chars*(self: ptr IOChannel00; buf: uint8Array; count: int64; + bytesWritten: var uint64): IOStatus {. + importc: "g_io_channel_write_chars", libprag.} + +proc writeChars*(self: IOChannel; buf: uint8Array; count: int64; bytesWritten: var uint64): IOStatus = + g_io_channel_write_chars(cast[ptr IOChannel00](self.impl), buf, count, bytesWritten) + +proc g_io_channel_write_unichar*(self: ptr IOChannel00; thechar: gunichar): IOStatus {. + importc: "g_io_channel_write_unichar", libprag.} + +proc writeUnichar*(self: IOChannel; thechar: gunichar): IOStatus = + g_io_channel_write_unichar(cast[ptr IOChannel00](self.impl), thechar) + +proc g_io_channel_error_from_errno*(en: int32): IOChannelError {. + importc: "g_io_channel_error_from_errno", libprag.} + +proc errorFromErrno*(en: int32): IOChannelError {. + importc: "g_io_channel_error_from_errno", libprag.} + +proc g_io_channel_error_quark*(): uint32 {. + importc: "g_io_channel_error_quark", libprag.} + +type + SpawnError* {.size: sizeof(cint), pure.} = enum + fork = 0 + read = 1 + chdir = 2 + acces = 3 + perm = 4 + tooBig = 5 + noexec = 6 + nametoolong = 7 + noent = 8 + nomem = 9 + notdir = 10 + loop = 11 + txtbusy = 12 + io = 13 + nfile = 14 + mfile = 15 + inval = 16 + isdir = 17 + libbad = 18 + failed = 19 + +type + IOFunc* = proc (source: ptr IOChannel00; condition: IOCondition; data: pointer): gboolean {.cdecl.} + +type + SpawnFlag* {.size: sizeof(cint), pure.} = enum + leaveDescriptorsOpen = 1 + doNotReapChild = 2 + searchPath = 3 + stdoutToDevNull = 4 + stderrToDevNull = 5 + childInheritsStdin = 6 + fileAndArgvZero = 7 + searchPathFromEnvp = 8 + cloexecPipes = 9 + + SpawnFlags* {.size: sizeof(cint).} = set[SpawnFlag] + +type + StatBuf00* {.pure.} = object + StatBuf* = ref object + impl*: ptr StatBuf00 + +type + StringChunk00* {.pure.} = object + StringChunk* = ref object + impl*: ptr StringChunk00 + +proc g_string_chunk_clear*(self: ptr StringChunk00) {. + importc: "g_string_chunk_clear", libprag.} + +proc clear*(self: StringChunk) = + g_string_chunk_clear(cast[ptr StringChunk00](self.impl)) + +proc g_string_chunk_free*(self: ptr StringChunk00) {. + importc: "g_string_chunk_free", libprag.} + +proc free*(self: StringChunk) = + g_string_chunk_free(cast[ptr StringChunk00](self.impl)) + +proc g_string_chunk_insert*(self: ptr StringChunk00; string: cstring): cstring {. + importc: "g_string_chunk_insert", libprag.} + +proc insert*(self: StringChunk; string: string): string = + let resul0 = g_string_chunk_insert(cast[ptr StringChunk00](self.impl), cstring(string)) + result = $resul0 + cogfree(resul0) + +proc g_string_chunk_insert_const*(self: ptr StringChunk00; string: cstring): cstring {. + importc: "g_string_chunk_insert_const", libprag.} + +proc insertConst*(self: StringChunk; string: string): string = + let resul0 = g_string_chunk_insert_const(cast[ptr StringChunk00](self.impl), cstring(string)) + result = $resul0 + cogfree(resul0) + +proc g_string_chunk_insert_len*(self: ptr StringChunk00; string: cstring; len: int64): cstring {. + importc: "g_string_chunk_insert_len", libprag.} + +proc insertLen*(self: StringChunk; string: string; len: int64): string = + let resul0 = g_string_chunk_insert_len(cast[ptr StringChunk00](self.impl), cstring(string), len) + result = $resul0 + cogfree(resul0) + +const TIME_SPAN_DAY* = 86400000000'i64 + +const TIME_SPAN_HOUR* = 3600000000'i64 + +const TIME_SPAN_MILLISECOND* = 1000'i64 + +const TIME_SPAN_MINUTE* = 60000000'i64 + +const TIME_SPAN_SECOND* = 1000000'i64 + +type + TestCase00* {.pure.} = object + TestCase* = ref object + impl*: ptr TestCase00 + +type + TestConfig00* {.pure.} = object + testInitialized*: gboolean + testQuick*: gboolean + testPerf*: gboolean + testVerbose*: gboolean + testQuiet*: gboolean + testUndefined*: gboolean + TestConfig* = ref object + impl*: ptr TestConfig00 + +type + TestDataFunc* = proc (userData: pointer) {.cdecl.} + +type + TestFileType* {.size: sizeof(cint), pure.} = enum + dist = 0 + built = 1 + +type + TestFixtureFunc* = proc (fixture: pointer; userData: pointer) {.cdecl.} + +type + TestFunc* = proc () {.cdecl.} + +type + TestLogBuffer00* {.pure.} = object + data*: ptr String00 + msgs*: ptr pointer + TestLogBuffer* = ref object + impl*: ptr TestLogBuffer00 + +proc g_test_log_buffer_free*(self: ptr TestLogBuffer00) {. + importc: "g_test_log_buffer_free", libprag.} + +proc free*(self: TestLogBuffer) = + g_test_log_buffer_free(cast[ptr TestLogBuffer00](self.impl)) + +proc g_test_log_buffer_push*(self: ptr TestLogBuffer00; nBytes: uint32; bytes: ptr uint8) {. + importc: "g_test_log_buffer_push", libprag.} + +proc push*(self: TestLogBuffer; nBytes: int; bytes: ptr uint8) = + g_test_log_buffer_push(cast[ptr TestLogBuffer00](self.impl), uint32(nBytes), bytes) + +type + TestLogFatalFunc* = proc (logDomain: cstring; logLevel: LogLevelFlags; message: cstring; + userData: pointer): gboolean {.cdecl.} + +type + TestLogType* {.size: sizeof(cint), pure.} = enum + none = 0 + error = 1 + startBinary = 2 + listCase = 3 + skipCase = 4 + startCase = 5 + stopCase = 6 + minResult = 7 + maxResult = 8 + message = 9 + startSuite = 10 + stopSuite = 11 + +type + TestLogMsg00* {.pure.} = object + logType*: TestLogType + nStrings*: uint32 + strings*: cstring + nNums*: uint32 + nums*: ptr int64 + TestLogMsg* = ref object + impl*: ptr TestLogMsg00 + +proc g_test_log_msg_free*(self: ptr TestLogMsg00) {. + importc: "g_test_log_msg_free", libprag.} + +proc free*(self: TestLogMsg) = + g_test_log_msg_free(cast[ptr TestLogMsg00](self.impl)) + +type + TestSubprocessFlag* {.size: sizeof(cint), pure.} = enum + stdin = 1 + stdout = 2 + stderr = 3 + + TestSubprocessFlags* {.size: sizeof(cint).} = set[TestSubprocessFlag] + +type + TestSuite00* {.pure.} = object + TestSuite* = ref object + impl*: ptr TestSuite00 + +proc g_test_suite_add*(self: ptr TestSuite00; testCase: ptr TestCase00) {. + importc: "g_test_suite_add", libprag.} + +proc add*(self: TestSuite; testCase: TestCase) = + g_test_suite_add(cast[ptr TestSuite00](self.impl), cast[ptr TestCase00](testCase.impl)) + +proc g_test_suite_add_suite*(self: ptr TestSuite00; nestedsuite: ptr TestSuite00) {. + importc: "g_test_suite_add_suite", libprag.} + +proc addSuite*(self: TestSuite; nestedsuite: TestSuite) = + g_test_suite_add_suite(cast[ptr TestSuite00](self.impl), cast[ptr TestSuite00](nestedsuite.impl)) + +type + TestTrapFlag* {.size: sizeof(cint), pure.} = enum + silenceStdout = 8 + silenceStderr = 9 + inheritStdin = 10 + + TestTrapFlags* {.size: sizeof(cint).} = set[TestTrapFlag] + +type + Thread00* {.pure.} = object + Thread* = ref object + impl*: ptr Thread00 + +proc g_thread_join*(self: ptr Thread00): pointer {. + importc: "g_thread_join", libprag.} + +proc join*(self: Thread): pointer = + g_thread_join(cast[ptr Thread00](self.impl)) + +proc g_thread_ref*(self: ptr Thread00): ptr Thread00 {. + importc: "g_thread_ref", libprag.} + +proc `ref`*(self: Thread): Thread = + new(result) + result.impl = g_thread_ref(cast[ptr Thread00](self.impl)) + +proc g_thread_unref*(self: ptr Thread00) {. + importc: "g_thread_unref", libprag.} + +proc unref*(self: Thread) = + g_thread_unref(cast[ptr Thread00](self.impl)) + +proc g_thread_error_quark*(): uint32 {. + importc: "g_thread_error_quark", libprag.} + +proc g_thread_exit*(retval: pointer) {. + importc: "g_thread_exit", libprag.} + +proc exit*(retval: pointer) {. + importc: "g_thread_exit", libprag.} + +proc g_thread_self*(): ptr Thread00 {. + importc: "g_thread_self", libprag.} + +proc self*(): Thread = + new(result) + result.impl = g_thread_self() + +proc g_thread_yield*() {. + importc: "g_thread_yield", libprag.} + +proc `yield`*() {. + importc: "g_thread_yield", libprag.} + +type + ThreadError* {.size: sizeof(cint), pure.} = enum + threadErrorAgain = 0 + +type + ThreadFunc* = proc (data: pointer): pointer {.cdecl.} + +type + ThreadPool00* {.pure.} = object + `func`*: Func + userData*: pointer + exclusive*: gboolean + ThreadPool* = ref object + impl*: ptr ThreadPool00 + +proc g_thread_pool_free*(self: ptr ThreadPool00; immediate: gboolean; wait: gboolean) {. + importc: "g_thread_pool_free", libprag.} + +proc free*(self: ThreadPool; immediate: bool; wait: bool) = + g_thread_pool_free(cast[ptr ThreadPool00](self.impl), gboolean(immediate), gboolean(wait)) + +proc g_thread_pool_get_max_threads*(self: ptr ThreadPool00): int32 {. + importc: "g_thread_pool_get_max_threads", libprag.} + +proc getMaxThreads*(self: ThreadPool): int = + int(g_thread_pool_get_max_threads(cast[ptr ThreadPool00](self.impl))) + +proc maxThreads*(self: ThreadPool): int = + int(g_thread_pool_get_max_threads(cast[ptr ThreadPool00](self.impl))) + +proc g_thread_pool_get_num_threads*(self: ptr ThreadPool00): uint32 {. + importc: "g_thread_pool_get_num_threads", libprag.} + +proc getNumThreads*(self: ThreadPool): int = + int(g_thread_pool_get_num_threads(cast[ptr ThreadPool00](self.impl))) + +proc numThreads*(self: ThreadPool): int = + int(g_thread_pool_get_num_threads(cast[ptr ThreadPool00](self.impl))) + +proc g_thread_pool_move_to_front*(self: ptr ThreadPool00; data: pointer): gboolean {. + importc: "g_thread_pool_move_to_front", libprag.} + +proc moveToFront*(self: ThreadPool; data: pointer): bool = + toBool(g_thread_pool_move_to_front(cast[ptr ThreadPool00](self.impl), data)) + +proc g_thread_pool_push*(self: ptr ThreadPool00; data: pointer): gboolean {. + importc: "g_thread_pool_push", libprag.} + +proc push*(self: ThreadPool; data: pointer): bool = + toBool(g_thread_pool_push(cast[ptr ThreadPool00](self.impl), data)) + +proc g_thread_pool_set_max_threads*(self: ptr ThreadPool00; maxThreads: int32): gboolean {. + importc: "g_thread_pool_set_max_threads", libprag.} + +proc setMaxThreads*(self: ThreadPool; maxThreads: int): bool = + toBool(g_thread_pool_set_max_threads(cast[ptr ThreadPool00](self.impl), int32(maxThreads))) + +proc `maxThreads=`*(self: ThreadPool; maxThreads: int): bool = + toBool(g_thread_pool_set_max_threads(cast[ptr ThreadPool00](self.impl), int32(maxThreads))) + +proc g_thread_pool_unprocessed*(self: ptr ThreadPool00): uint32 {. + importc: "g_thread_pool_unprocessed", libprag.} + +proc unprocessed*(self: ThreadPool): int = + int(g_thread_pool_unprocessed(cast[ptr ThreadPool00](self.impl))) + +proc g_thread_pool_get_max_idle_time*(): uint32 {. + importc: "g_thread_pool_get_max_idle_time", libprag.} + +proc getMaxIdleTime*(): uint32 {. + importc: "g_thread_pool_get_max_idle_time", libprag.} + +proc maxIdleTime*(): uint32 {. + importc: "g_thread_pool_get_max_idle_time", libprag.} + +proc g_thread_pool_get_max_unused_threads*(): int32 {. + importc: "g_thread_pool_get_max_unused_threads", libprag.} + +proc getMaxUnusedThreads*(): int32 {. + importc: "g_thread_pool_get_max_unused_threads", libprag.} + +proc maxUnusedThreads*(): int32 {. + importc: "g_thread_pool_get_max_unused_threads", libprag.} + +proc g_thread_pool_get_num_unused_threads*(): uint32 {. + importc: "g_thread_pool_get_num_unused_threads", libprag.} + +proc getNumUnusedThreads*(): uint32 {. + importc: "g_thread_pool_get_num_unused_threads", libprag.} + +proc numUnusedThreads*(): uint32 {. + importc: "g_thread_pool_get_num_unused_threads", libprag.} + +proc g_thread_pool_set_max_idle_time*(interval: uint32) {. + importc: "g_thread_pool_set_max_idle_time", libprag.} + +proc setMaxIdleTime*(interval: uint32) {. + importc: "g_thread_pool_set_max_idle_time", libprag.} + +proc `maxIdleTime=`*(interval: uint32) {. + importc: "g_thread_pool_set_max_idle_time", libprag.} + +proc g_thread_pool_set_max_unused_threads*(maxThreads: int32) {. + importc: "g_thread_pool_set_max_unused_threads", libprag.} + +proc setMaxUnusedThreads*(maxThreads: int32) {. + importc: "g_thread_pool_set_max_unused_threads", libprag.} + +proc `maxUnusedThreads=`*(maxThreads: int32) {. + importc: "g_thread_pool_set_max_unused_threads", libprag.} + +proc g_thread_pool_stop_unused_threads*() {. + importc: "g_thread_pool_stop_unused_threads", libprag.} + +proc stopUnusedThreads*() {. + importc: "g_thread_pool_stop_unused_threads", libprag.} + +type + Timer00* {.pure.} = object + Timer* = ref object + impl*: ptr Timer00 + +proc g_timer_continue*(self: ptr Timer00) {. + importc: "g_timer_continue", libprag.} + +proc `continue`*(self: Timer) = + g_timer_continue(cast[ptr Timer00](self.impl)) + +proc g_timer_destroy*(self: ptr Timer00) {. + importc: "g_timer_destroy", libprag.} + +proc destroy*(self: Timer) = + g_timer_destroy(cast[ptr Timer00](self.impl)) + +proc g_timer_elapsed*(self: ptr Timer00; microseconds: ptr uint64): cdouble {. + importc: "g_timer_elapsed", libprag.} + +proc elapsed*(self: Timer; microseconds: ptr uint64): cdouble = + g_timer_elapsed(cast[ptr Timer00](self.impl), microseconds) + +proc g_timer_reset*(self: ptr Timer00) {. + importc: "g_timer_reset", libprag.} + +proc reset*(self: Timer) = + g_timer_reset(cast[ptr Timer00](self.impl)) + +proc g_timer_start*(self: ptr Timer00) {. + importc: "g_timer_start", libprag.} + +proc start*(self: Timer) = + g_timer_start(cast[ptr Timer00](self.impl)) + +proc g_timer_stop*(self: ptr Timer00) {. + importc: "g_timer_stop", libprag.} + +proc stop*(self: Timer) = + g_timer_stop(cast[ptr Timer00](self.impl)) + +type + TokenValue00* = object {.union.} + vSymbol*: pointer + vIdentifier*: cstring + vBinary*: uint64 + vOctal*: uint64 + vInt*: uint64 + vInt64*: uint64 + vFloat*: cdouble + vHex*: uint64 + vString*: cstring + vComment*: cstring + vChar*: uint8 + vError*: uint32 + TokenValue* = ref object + impl*: ptr TokenValue00 +type + + ScannerMsgFunc* = proc (scanner: ptr Scanner00; message: cstring; error: gboolean) {.cdecl.} + + Scanner00* {.pure.} = object + userData*: pointer + maxParseErrors*: uint32 + parseErrors*: uint32 + inputName*: cstring + qdata*: ptr Data00 + config*: ptr ScannerConfig00 + token*: TokenType + value*: TokenValue00 + line*: uint32 + position*: uint32 + nextToken*: TokenType + nextValue*: TokenValue00 + nextLine*: uint32 + nextPosition*: uint32 + symbolTable*: ptr HashTable00 + inputFd*: int32 + text*: cstring + textEnd*: cstring + buffer*: cstring + scopeId*: uint32 + msgHandler*: ScannerMsgFunc + Scanner* = ref object + impl*: ptr Scanner00 + +proc g_scanner_cur_line*(self: ptr Scanner00): uint32 {. + importc: "g_scanner_cur_line", libprag.} + +proc curLine*(self: Scanner): int = + int(g_scanner_cur_line(cast[ptr Scanner00](self.impl))) + +proc g_scanner_cur_position*(self: ptr Scanner00): uint32 {. + importc: "g_scanner_cur_position", libprag.} + +proc curPosition*(self: Scanner): int = + int(g_scanner_cur_position(cast[ptr Scanner00](self.impl))) + +proc g_scanner_cur_token*(self: ptr Scanner00): TokenType {. + importc: "g_scanner_cur_token", libprag.} + +proc curToken*(self: Scanner): TokenType = + g_scanner_cur_token(cast[ptr Scanner00](self.impl)) + +proc g_scanner_destroy*(self: ptr Scanner00) {. + importc: "g_scanner_destroy", libprag.} + +proc destroy*(self: Scanner) = + g_scanner_destroy(cast[ptr Scanner00](self.impl)) + +proc g_scanner_eof*(self: ptr Scanner00): gboolean {. + importc: "g_scanner_eof", libprag.} + +proc eof*(self: Scanner): bool = + toBool(g_scanner_eof(cast[ptr Scanner00](self.impl))) + +proc g_scanner_get_next_token*(self: ptr Scanner00): TokenType {. + importc: "g_scanner_get_next_token", libprag.} + +proc getNextToken*(self: Scanner): TokenType = + g_scanner_get_next_token(cast[ptr Scanner00](self.impl)) + +proc nextToken*(self: Scanner): TokenType = + g_scanner_get_next_token(cast[ptr Scanner00](self.impl)) + +proc g_scanner_input_file*(self: ptr Scanner00; inputFd: int32) {. + importc: "g_scanner_input_file", libprag.} + +proc inputFile*(self: Scanner; inputFd: int) = + g_scanner_input_file(cast[ptr Scanner00](self.impl), int32(inputFd)) + +proc g_scanner_input_text*(self: ptr Scanner00; text: cstring; textLen: uint32) {. + importc: "g_scanner_input_text", libprag.} + +proc inputText*(self: Scanner; text: string; textLen: int) = + g_scanner_input_text(cast[ptr Scanner00](self.impl), cstring(text), uint32(textLen)) + +proc g_scanner_lookup_symbol*(self: ptr Scanner00; symbol: cstring): pointer {. + importc: "g_scanner_lookup_symbol", libprag.} + +proc lookupSymbol*(self: Scanner; symbol: string): pointer = + g_scanner_lookup_symbol(cast[ptr Scanner00](self.impl), cstring(symbol)) + +proc g_scanner_peek_next_token*(self: ptr Scanner00): TokenType {. + importc: "g_scanner_peek_next_token", libprag.} + +proc peekNextToken*(self: Scanner): TokenType = + g_scanner_peek_next_token(cast[ptr Scanner00](self.impl)) + +proc g_scanner_scope_add_symbol*(self: ptr Scanner00; scopeId: uint32; symbol: cstring; + value: pointer) {. + importc: "g_scanner_scope_add_symbol", libprag.} + +proc scopeAddSymbol*(self: Scanner; scopeId: int; symbol: string; value: pointer) = + g_scanner_scope_add_symbol(cast[ptr Scanner00](self.impl), uint32(scopeId), cstring(symbol), value) + +proc g_scanner_scope_lookup_symbol*(self: ptr Scanner00; scopeId: uint32; symbol: cstring): pointer {. + importc: "g_scanner_scope_lookup_symbol", libprag.} + +proc scopeLookupSymbol*(self: Scanner; scopeId: int; symbol: string): pointer = + g_scanner_scope_lookup_symbol(cast[ptr Scanner00](self.impl), uint32(scopeId), cstring(symbol)) + +proc g_scanner_scope_remove_symbol*(self: ptr Scanner00; scopeId: uint32; symbol: cstring) {. + importc: "g_scanner_scope_remove_symbol", libprag.} + +proc scopeRemoveSymbol*(self: Scanner; scopeId: int; symbol: string) = + g_scanner_scope_remove_symbol(cast[ptr Scanner00](self.impl), uint32(scopeId), cstring(symbol)) + +proc g_scanner_set_scope*(self: ptr Scanner00; scopeId: uint32): uint32 {. + importc: "g_scanner_set_scope", libprag.} + +proc setScope*(self: Scanner; scopeId: int): int = + int(g_scanner_set_scope(cast[ptr Scanner00](self.impl), uint32(scopeId))) + +proc `scope=`*(self: Scanner; scopeId: int): int = + int(g_scanner_set_scope(cast[ptr Scanner00](self.impl), uint32(scopeId))) + +proc g_scanner_sync_file_offset*(self: ptr Scanner00) {. + importc: "g_scanner_sync_file_offset", libprag.} + +proc syncFileOffset*(self: Scanner) = + g_scanner_sync_file_offset(cast[ptr Scanner00](self.impl)) + +proc g_scanner_unexp_token*(self: ptr Scanner00; expectedToken: TokenType; identifierSpec: cstring; + symbolSpec: cstring; symbolName: cstring; message: cstring; isError: int32) {. + importc: "g_scanner_unexp_token", libprag.} + +proc unexpToken*(self: Scanner; expectedToken: TokenType; identifierSpec: string; + symbolSpec: string; symbolName: string; message: string; isError: int) = + g_scanner_unexp_token(cast[ptr Scanner00](self.impl), expectedToken, cstring(identifierSpec), cstring(symbolSpec), cstring(symbolName), cstring(message), int32(isError)) + +type + TranslateFunc* = proc (str: cstring; data: pointer): cstring {.cdecl.} + +proc g_option_context_set_translate_func*(self: ptr OptionContext00; `func`: TranslateFunc; + data: pointer; destroyNotify: DestroyNotify) {. + importc: "g_option_context_set_translate_func", libprag.} + +proc setTranslateFunc*(self: OptionContext; `func`: TranslateFunc; data: pointer; + destroyNotify: DestroyNotify) = + g_option_context_set_translate_func(cast[ptr OptionContext00](self.impl), `func`, data, destroyNotify) + +proc g_option_group_set_translate_func*(self: ptr OptionGroup00; `func`: TranslateFunc; data: pointer; + destroyNotify: DestroyNotify) {. + importc: "g_option_group_set_translate_func", libprag.} + +proc setTranslateFunc*(self: OptionGroup; `func`: TranslateFunc; data: pointer; + destroyNotify: DestroyNotify) = + g_option_group_set_translate_func(cast[ptr OptionGroup00](self.impl), `func`, data, destroyNotify) + +type + TrashStack00* {.pure.} = object + next*: ptr TrashStack00 + TrashStack* = ref object + impl*: ptr TrashStack00 + +proc g_trash_stack_height*(stackP: ptr TrashStack00): uint32 {. + importc: "g_trash_stack_height", libprag.} + +proc height*(stackP: TrashStack): int = + int(g_trash_stack_height(cast[ptr TrashStack00](stackP.impl))) + +proc g_trash_stack_peek*(stackP: ptr TrashStack00): pointer {. + importc: "g_trash_stack_peek", libprag.} + +proc peek*(stackP: TrashStack): pointer = + g_trash_stack_peek(cast[ptr TrashStack00](stackP.impl)) + +proc g_trash_stack_pop*(stackP: ptr TrashStack00): pointer {. + importc: "g_trash_stack_pop", libprag.} + +proc pop*(stackP: TrashStack): pointer = + g_trash_stack_pop(cast[ptr TrashStack00](stackP.impl)) + +proc g_trash_stack_push*(stackP: ptr TrashStack00; dataP: pointer) {. + importc: "g_trash_stack_push", libprag.} + +proc push*(stackP: TrashStack; dataP: pointer) = + g_trash_stack_push(cast[ptr TrashStack00](stackP.impl), dataP) + +type + TraverseFunc* = proc (key: pointer; value: pointer; data: pointer): gboolean {.cdecl.} + +type + TraverseType* {.size: sizeof(cint), pure.} = enum + inOrder = 0 + preOrder = 1 + postOrder = 2 + levelOrder = 3 + +type + Tree00* {.pure.} = object + Tree* = ref object + impl*: ptr Tree00 + +proc g_tree_destroy*(self: ptr Tree00) {. + importc: "g_tree_destroy", libprag.} + +proc destroy*(self: Tree) = + g_tree_destroy(cast[ptr Tree00](self.impl)) + +proc g_tree_height*(self: ptr Tree00): int32 {. + importc: "g_tree_height", libprag.} + +proc height*(self: Tree): int = + int(g_tree_height(cast[ptr Tree00](self.impl))) + +proc g_tree_insert*(self: ptr Tree00; key: pointer; value: pointer) {. + importc: "g_tree_insert", libprag.} + +proc insert*(self: Tree; key: pointer; value: pointer) = + g_tree_insert(cast[ptr Tree00](self.impl), key, value) + +proc g_tree_lookup*(self: ptr Tree00; key: pointer): pointer {. + importc: "g_tree_lookup", libprag.} + +proc lookup*(self: Tree; key: pointer): pointer = + g_tree_lookup(cast[ptr Tree00](self.impl), key) + +proc g_tree_lookup_extended*(self: ptr Tree00; lookupKey: pointer; origKey: pointer; + value: pointer): gboolean {. + importc: "g_tree_lookup_extended", libprag.} + +proc lookupExtended*(self: Tree; lookupKey: pointer; origKey: pointer; + value: pointer): bool = + toBool(g_tree_lookup_extended(cast[ptr Tree00](self.impl), lookupKey, origKey, value)) + +proc g_tree_nnodes*(self: ptr Tree00): int32 {. + importc: "g_tree_nnodes", libprag.} + +proc nnodes*(self: Tree): int = + int(g_tree_nnodes(cast[ptr Tree00](self.impl))) + +proc g_tree_remove*(self: ptr Tree00; key: pointer): gboolean {. + importc: "g_tree_remove", libprag.} + +proc remove*(self: Tree; key: pointer): bool = + toBool(g_tree_remove(cast[ptr Tree00](self.impl), key)) + +proc g_tree_replace*(self: ptr Tree00; key: pointer; value: pointer) {. + importc: "g_tree_replace", libprag.} + +proc replace*(self: Tree; key: pointer; value: pointer) = + g_tree_replace(cast[ptr Tree00](self.impl), key, value) + +proc g_tree_steal*(self: ptr Tree00; key: pointer): gboolean {. + importc: "g_tree_steal", libprag.} + +proc steal*(self: Tree; key: pointer): bool = + toBool(g_tree_steal(cast[ptr Tree00](self.impl), key)) + +proc g_tree_unref*(self: ptr Tree00) {. + importc: "g_tree_unref", libprag.} + +proc unref*(self: Tree) = + g_tree_unref(cast[ptr Tree00](self.impl)) + +const UNICHAR_MAX_DECOMPOSITION_LENGTH* = 18'i32 + +const URI_RESERVED_CHARS_GENERIC_DELIMITERS* = ":/?#[]@" + +const URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS* = "!$&'()*+,;=" + +const USEC_PER_SEC* = 1000000'i32 + +type + UnicodeBreakType* {.size: sizeof(cint), pure.} = enum + mandatory = 0 + carriageReturn = 1 + lineFeed = 2 + combiningMark = 3 + surrogate = 4 + zeroWidthSpace = 5 + inseparable = 6 + nonBreakingGlue = 7 + contingent = 8 + space = 9 + after = 10 + before = 11 + beforeAndAfter = 12 + hyphen = 13 + nonStarter = 14 + openPunctuation = 15 + closePunctuation = 16 + quotation = 17 + exclamation = 18 + ideographic = 19 + numeric = 20 + infixSeparator = 21 + symbol = 22 + alphabetic = 23 + prefix = 24 + postfix = 25 + complexContext = 26 + ambiguous = 27 + unknown = 28 + nextLine = 29 + wordJoiner = 30 + hangulLJamo = 31 + hangulVJamo = 32 + hangulTJamo = 33 + hangulLvSyllable = 34 + hangulLvtSyllable = 35 + closeParanthesis = 36 + conditionalJapaneseStarter = 37 + hebrewLetter = 38 + regionalIndicator = 39 + emojiBase = 40 + emojiModifier = 41 + zeroWidthJoiner = 42 + +type + UnicodeScript* {.size: sizeof(cint), pure.} = enum + invalidCode = -1 + common = 0 + inherited = 1 + arabic = 2 + armenian = 3 + bengali = 4 + bopomofo = 5 + cherokee = 6 + coptic = 7 + cyrillic = 8 + deseret = 9 + devanagari = 10 + ethiopic = 11 + georgian = 12 + gothic = 13 + greek = 14 + gujarati = 15 + gurmukhi = 16 + han = 17 + hangul = 18 + hebrew = 19 + hiragana = 20 + kannada = 21 + katakana = 22 + khmer = 23 + lao = 24 + latin = 25 + malayalam = 26 + mongolian = 27 + myanmar = 28 + ogham = 29 + oldItalic = 30 + oriya = 31 + runic = 32 + sinhala = 33 + syriac = 34 + tamil = 35 + telugu = 36 + thaana = 37 + thai = 38 + tibetan = 39 + canadianAboriginal = 40 + yi = 41 + tagalog = 42 + hanunoo = 43 + buhid = 44 + tagbanwa = 45 + braille = 46 + cypriot = 47 + limbu = 48 + osmanya = 49 + shavian = 50 + linearB = 51 + taiLe = 52 + ugaritic = 53 + newTaiLue = 54 + buginese = 55 + glagolitic = 56 + tifinagh = 57 + sylotiNagri = 58 + oldPersian = 59 + kharoshthi = 60 + unknown = 61 + balinese = 62 + cuneiform = 63 + phoenician = 64 + phagsPa = 65 + nko = 66 + kayahLi = 67 + lepcha = 68 + rejang = 69 + sundanese = 70 + saurashtra = 71 + cham = 72 + olChiki = 73 + vai = 74 + carian = 75 + lycian = 76 + lydian = 77 + avestan = 78 + bamum = 79 + egyptianHieroglyphs = 80 + imperialAramaic = 81 + inscriptionalPahlavi = 82 + inscriptionalParthian = 83 + javanese = 84 + kaithi = 85 + lisu = 86 + meeteiMayek = 87 + oldSouthArabian = 88 + oldTurkic = 89 + samaritan = 90 + taiTham = 91 + taiViet = 92 + batak = 93 + brahmi = 94 + mandaic = 95 + chakma = 96 + meroiticCursive = 97 + meroiticHieroglyphs = 98 + miao = 99 + sharada = 100 + soraSompeng = 101 + takri = 102 + bassaVah = 103 + caucasianAlbanian = 104 + duployan = 105 + elbasan = 106 + grantha = 107 + khojki = 108 + khudawadi = 109 + linearA = 110 + mahajani = 111 + manichaean = 112 + mendeKikakui = 113 + modi = 114 + mro = 115 + nabataean = 116 + oldNorthArabian = 117 + oldPermic = 118 + pahawhHmong = 119 + palmyrene = 120 + pauCinHau = 121 + psalterPahlavi = 122 + siddham = 123 + tirhuta = 124 + warangCiti = 125 + ahom = 126 + anatolianHieroglyphs = 127 + hatran = 128 + multani = 129 + oldHungarian = 130 + signwriting = 131 + adlam = 132 + bhaiksuki = 133 + marchen = 134 + newa = 135 + osage = 136 + tangut = 137 + +type + UnicodeType* {.size: sizeof(cint), pure.} = enum + control = 0 + format = 1 + unassigned = 2 + privateUse = 3 + surrogate = 4 + lowercaseLetter = 5 + modifierLetter = 6 + otherLetter = 7 + titlecaseLetter = 8 + uppercaseLetter = 9 + spacingMark = 10 + enclosingMark = 11 + nonSpacingMark = 12 + decimalNumber = 13 + letterNumber = 14 + otherNumber = 15 + connectPunctuation = 16 + dashPunctuation = 17 + closePunctuation = 18 + finalPunctuation = 19 + initialPunctuation = 20 + otherPunctuation = 21 + openPunctuation = 22 + currencySymbol = 23 + modifierSymbol = 24 + mathSymbol = 25 + otherSymbol = 26 + lineSeparator = 27 + paragraphSeparator = 28 + spaceSeparator = 29 + +type + UnixFDSourceFunc* = proc (fd: int32; condition: IOCondition; userData: pointer): gboolean {.cdecl.} + +type + UserDirectory* {.size: sizeof(cint), pure.} = enum + directoryDesktop = 0 + directoryDocuments = 1 + directoryDownload = 2 + directoryMusic = 3 + directoryPictures = 4 + directoryPublicShare = 5 + directoryTemplates = 6 + directoryVideos = 7 + nDirectories = 8 + +const VA_COPY_AS_ARRAY* = 1'i32 + +const VERSION_MIN_REQUIRED* = 2'i32 + +type + Variant00* {.pure.} = object + Variant* = ref object + impl*: ptr Variant00 + +proc g_variant_new_boolean*(value: gboolean): ptr Variant00 {. + importc: "g_variant_new_boolean", libprag.} + +proc newVariantBoolean*(value: bool): Variant = + new(result) + result.impl = g_variant_new_boolean(gboolean(value)) + +proc initVariantBoolean*[T](result: var T; value: bool) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_boolean(gboolean(value)) + +proc g_variant_new_byte*(value: uint8): ptr Variant00 {. + importc: "g_variant_new_byte", libprag.} + +proc newVariantByte*(value: uint8): Variant = + new(result) + result.impl = g_variant_new_byte(value) + +proc initVariantByte*[T](result: var T; value: uint8) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_byte(value) + +proc g_variant_new_bytestring*(string: uint8Array): ptr Variant00 {. + importc: "g_variant_new_bytestring", libprag.} + +proc newVariantBytestring*(string: uint8Array): Variant = + new(result) + result.impl = g_variant_new_bytestring(string) + +proc initVariantBytestring*[T](result: var T; string: uint8Array) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_bytestring(string) + +proc g_variant_new_bytestring_array*(strv: cstringArray; length: int64): ptr Variant00 {. + importc: "g_variant_new_bytestring_array", libprag.} + +proc newVariantBytestringArray*(strv: cstringArray; length: int64): Variant = + new(result) + result.impl = g_variant_new_bytestring_array(strv, length) + +proc initVariantBytestringArray*[T](result: var T; strv: cstringArray; length: int64) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_bytestring_array(strv, length) + +proc g_variant_new_dict_entry*(key: ptr Variant00; value: ptr Variant00): ptr Variant00 {. + importc: "g_variant_new_dict_entry", libprag.} + +proc newVariantDictEntry*(key: Variant; value: Variant): Variant = + new(result) + result.impl = g_variant_new_dict_entry(cast[ptr Variant00](key.impl), cast[ptr Variant00](value.impl)) + +proc initVariantDictEntry*[T](result: var T; key: Variant; value: Variant) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_dict_entry(cast[ptr Variant00](key.impl), cast[ptr Variant00](value.impl)) + +proc g_variant_new_double*(value: cdouble): ptr Variant00 {. + importc: "g_variant_new_double", libprag.} + +proc newVariantDouble*(value: cdouble): Variant = + new(result) + result.impl = g_variant_new_double(value) + +proc initVariantDouble*[T](result: var T; value: cdouble) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_double(value) + +proc g_variant_new_handle*(value: int32): ptr Variant00 {. + importc: "g_variant_new_handle", libprag.} + +proc newVariantHandle*(value: int): Variant = + new(result) + result.impl = g_variant_new_handle(int32(value)) + +proc initVariantHandle*[T](result: var T; value: int) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_handle(int32(value)) + +proc g_variant_new_int16*(value: int16): ptr Variant00 {. + importc: "g_variant_new_int16", libprag.} + +proc newVariantInt16*(value: int16): Variant = + new(result) + result.impl = g_variant_new_int16(value) + +proc initVariantInt16*[T](result: var T; value: int16) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_int16(value) + +proc g_variant_new_int32*(value: int32): ptr Variant00 {. + importc: "g_variant_new_int32", libprag.} + +proc newVariantInt32*(value: int): Variant = + new(result) + result.impl = g_variant_new_int32(int32(value)) + +proc initVariantInt32*[T](result: var T; value: int) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_int32(int32(value)) + +proc g_variant_new_int64*(value: int64): ptr Variant00 {. + importc: "g_variant_new_int64", libprag.} + +proc newVariantInt64*(value: int64): Variant = + new(result) + result.impl = g_variant_new_int64(value) + +proc initVariantInt64*[T](result: var T; value: int64) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_int64(value) + +proc g_variant_new_object_path*(objectPath: cstring): ptr Variant00 {. + importc: "g_variant_new_object_path", libprag.} + +proc newVariantObjectPath*(objectPath: string): Variant = + new(result) + result.impl = g_variant_new_object_path(cstring(objectPath)) + +proc initVariantObjectPath*[T](result: var T; objectPath: string) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_object_path(cstring(objectPath)) + +proc g_variant_new_objv*(strv: cstringArray; length: int64): ptr Variant00 {. + importc: "g_variant_new_objv", libprag.} + +proc newVariantObjv*(strv: cstringArray; length: int64): Variant = + new(result) + result.impl = g_variant_new_objv(strv, length) + +proc initVariantObjv*[T](result: var T; strv: cstringArray; length: int64) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_objv(strv, length) + +proc g_variant_new_signature*(signature: cstring): ptr Variant00 {. + importc: "g_variant_new_signature", libprag.} + +proc newVariantSignature*(signature: string): Variant = + new(result) + result.impl = g_variant_new_signature(cstring(signature)) + +proc initVariantSignature*[T](result: var T; signature: string) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_signature(cstring(signature)) + +proc g_variant_new_string*(string: cstring): ptr Variant00 {. + importc: "g_variant_new_string", libprag.} + +proc newVariantString*(string: string): Variant = + new(result) + result.impl = g_variant_new_string(cstring(string)) + +proc initVariantString*[T](result: var T; string: string) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_string(cstring(string)) + +proc g_variant_new_strv*(strv: cstringArray; length: int64): ptr Variant00 {. + importc: "g_variant_new_strv", libprag.} + +proc newVariantStrv*(strv: cstringArray; length: int64): Variant = + new(result) + result.impl = g_variant_new_strv(strv, length) + +proc initVariantStrv*[T](result: var T; strv: cstringArray; length: int64) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_strv(strv, length) + +proc g_variant_new_tuple*(children: ptr Variant00Array; nChildren: uint64): ptr Variant00 {. + importc: "g_variant_new_tuple", libprag.} + +proc newVariantTuple*(children: ptr Variant00Array; nChildren: uint64): Variant = + new(result) + result.impl = g_variant_new_tuple(children, nChildren) + +proc initVariantTuple*[T](result: var T; children: ptr Variant00Array; nChildren: uint64) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_tuple(children, nChildren) + +proc g_variant_new_uint16*(value: uint16): ptr Variant00 {. + importc: "g_variant_new_uint16", libprag.} + +proc newVariantUint16*(value: uint16): Variant = + new(result) + result.impl = g_variant_new_uint16(value) + +proc initVariantUint16*[T](result: var T; value: uint16) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_uint16(value) + +proc g_variant_new_uint32*(value: uint32): ptr Variant00 {. + importc: "g_variant_new_uint32", libprag.} + +proc newVariantUint32*(value: int): Variant = + new(result) + result.impl = g_variant_new_uint32(uint32(value)) + +proc initVariantUint32*[T](result: var T; value: int) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_uint32(uint32(value)) + +proc g_variant_new_uint64*(value: uint64): ptr Variant00 {. + importc: "g_variant_new_uint64", libprag.} + +proc newVariantUint64*(value: uint64): Variant = + new(result) + result.impl = g_variant_new_uint64(value) + +proc initVariantUint64*[T](result: var T; value: uint64) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_uint64(value) + +proc g_variant_new_variant*(value: ptr Variant00): ptr Variant00 {. + importc: "g_variant_new_variant", libprag.} + +proc newVariantVariant*(value: Variant): Variant = + new(result) + result.impl = g_variant_new_variant(cast[ptr Variant00](value.impl)) + +proc initVariantVariant*[T](result: var T; value: Variant) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_variant(cast[ptr Variant00](value.impl)) + +proc g_variant_byteswap*(self: ptr Variant00): ptr Variant00 {. + importc: "g_variant_byteswap", libprag.} + +proc byteswap*(self: Variant): Variant = + new(result) + result.impl = g_variant_byteswap(cast[ptr Variant00](self.impl)) + +proc g_variant_check_format_string*(self: ptr Variant00; formatString: cstring; copyOnly: gboolean): gboolean {. + importc: "g_variant_check_format_string", libprag.} + +proc checkFormatString*(self: Variant; formatString: string; copyOnly: bool): bool = + toBool(g_variant_check_format_string(cast[ptr Variant00](self.impl), cstring(formatString), gboolean(copyOnly))) + +proc g_variant_compare*(self: ptr Variant00; two: ptr Variant00): int32 {. + importc: "g_variant_compare", libprag.} + +proc compare*(self: Variant; two: Variant): int = + int(g_variant_compare(cast[ptr Variant00](self.impl), cast[ptr Variant00](two.impl))) + +proc g_variant_dup_bytestring*(self: ptr Variant00; length: var uint64): uint8Array {. + importc: "g_variant_dup_bytestring", libprag.} + +proc dupBytestring*(self: Variant; length: var uint64): uint8Array = + g_variant_dup_bytestring(cast[ptr Variant00](self.impl), length) + +proc g_variant_dup_bytestring_array*(self: ptr Variant00; length: var uint64): cstringArray {. + importc: "g_variant_dup_bytestring_array", libprag.} + +proc dupBytestringArray*(self: Variant; length: var uint64): cstringArray = + g_variant_dup_bytestring_array(cast[ptr Variant00](self.impl), length) + +proc g_variant_dup_objv*(self: ptr Variant00; length: var uint64): cstringArray {. + importc: "g_variant_dup_objv", libprag.} + +proc dupObjv*(self: Variant; length: var uint64): cstringArray = + g_variant_dup_objv(cast[ptr Variant00](self.impl), length) + +proc g_variant_dup_string*(self: ptr Variant00; length: var uint64): cstring {. + importc: "g_variant_dup_string", libprag.} + +proc dupString*(self: Variant; length: var uint64): string = + let resul0 = g_variant_dup_string(cast[ptr Variant00](self.impl), length) + result = $resul0 + cogfree(resul0) + +proc g_variant_dup_strv*(self: ptr Variant00; length: var uint64): cstringArray {. + importc: "g_variant_dup_strv", libprag.} + +proc dupStrv*(self: Variant; length: var uint64): cstringArray = + g_variant_dup_strv(cast[ptr Variant00](self.impl), length) + +proc g_variant_equal*(self: ptr Variant00; two: ptr Variant00): gboolean {. + importc: "g_variant_equal", libprag.} + +proc equal*(self: Variant; two: Variant): bool = + toBool(g_variant_equal(cast[ptr Variant00](self.impl), cast[ptr Variant00](two.impl))) + +proc g_variant_get_boolean*(self: ptr Variant00): gboolean {. + importc: "g_variant_get_boolean", libprag.} + +proc getBoolean*(self: Variant): bool = + toBool(g_variant_get_boolean(cast[ptr Variant00](self.impl))) + +proc boolean*(self: Variant): bool = + toBool(g_variant_get_boolean(cast[ptr Variant00](self.impl))) + +proc g_variant_get_byte*(self: ptr Variant00): uint8 {. + importc: "g_variant_get_byte", libprag.} + +proc getByte*(self: Variant): uint8 = + g_variant_get_byte(cast[ptr Variant00](self.impl)) + +proc byte*(self: Variant): uint8 = + g_variant_get_byte(cast[ptr Variant00](self.impl)) + +proc g_variant_get_bytestring*(self: ptr Variant00): uint8Array {. + importc: "g_variant_get_bytestring", libprag.} + +proc getBytestring*(self: Variant): uint8Array = + g_variant_get_bytestring(cast[ptr Variant00](self.impl)) + +proc bytestring*(self: Variant): uint8Array = + g_variant_get_bytestring(cast[ptr Variant00](self.impl)) + +proc g_variant_get_bytestring_array*(self: ptr Variant00; length: var uint64): cstringArray {. + importc: "g_variant_get_bytestring_array", libprag.} + +proc getBytestringArray*(self: Variant; length: var uint64): cstringArray = + g_variant_get_bytestring_array(cast[ptr Variant00](self.impl), length) + +proc bytestringArray*(self: Variant; length: var uint64): cstringArray = + g_variant_get_bytestring_array(cast[ptr Variant00](self.impl), length) + +proc g_variant_get_child_value*(self: ptr Variant00; index: uint64): ptr Variant00 {. + importc: "g_variant_get_child_value", libprag.} + +proc getChildValue*(self: Variant; index: uint64): Variant = + new(result) + result.impl = g_variant_get_child_value(cast[ptr Variant00](self.impl), index) + +proc childValue*(self: Variant; index: uint64): Variant = + new(result) + result.impl = g_variant_get_child_value(cast[ptr Variant00](self.impl), index) + +proc g_variant_get_data*(self: ptr Variant00): pointer {. + importc: "g_variant_get_data", libprag.} + +proc getData*(self: Variant): pointer = + g_variant_get_data(cast[ptr Variant00](self.impl)) + +proc data*(self: Variant): pointer = + g_variant_get_data(cast[ptr Variant00](self.impl)) + +proc g_variant_get_data_as_bytes*(self: ptr Variant00): ptr Bytes00 {. + importc: "g_variant_get_data_as_bytes", libprag.} + +proc getDataAsBytes*(self: Variant): Bytes = + new(result) + result.impl = g_variant_get_data_as_bytes(cast[ptr Variant00](self.impl)) + +proc dataAsBytes*(self: Variant): Bytes = + new(result) + result.impl = g_variant_get_data_as_bytes(cast[ptr Variant00](self.impl)) + +proc g_variant_get_double*(self: ptr Variant00): cdouble {. + importc: "g_variant_get_double", libprag.} + +proc getDouble*(self: Variant): cdouble = + g_variant_get_double(cast[ptr Variant00](self.impl)) + +proc double*(self: Variant): cdouble = + g_variant_get_double(cast[ptr Variant00](self.impl)) + +proc g_variant_get_handle*(self: ptr Variant00): int32 {. + importc: "g_variant_get_handle", libprag.} + +proc getHandle*(self: Variant): int = + int(g_variant_get_handle(cast[ptr Variant00](self.impl))) + +proc handle*(self: Variant): int = + int(g_variant_get_handle(cast[ptr Variant00](self.impl))) + +proc g_variant_get_int16*(self: ptr Variant00): int16 {. + importc: "g_variant_get_int16", libprag.} + +proc getInt16*(self: Variant): int16 = + g_variant_get_int16(cast[ptr Variant00](self.impl)) + +proc g_variant_get_int32*(self: ptr Variant00): int32 {. + importc: "g_variant_get_int32", libprag.} + +proc getInt32*(self: Variant): int = + int(g_variant_get_int32(cast[ptr Variant00](self.impl))) + +proc g_variant_get_int64*(self: ptr Variant00): int64 {. + importc: "g_variant_get_int64", libprag.} + +proc getInt64*(self: Variant): int64 = + g_variant_get_int64(cast[ptr Variant00](self.impl)) + +proc g_variant_get_maybe*(self: ptr Variant00): ptr Variant00 {. + importc: "g_variant_get_maybe", libprag.} + +proc getMaybe*(self: Variant): Variant = + new(result) + result.impl = g_variant_get_maybe(cast[ptr Variant00](self.impl)) + +proc maybe*(self: Variant): Variant = + new(result) + result.impl = g_variant_get_maybe(cast[ptr Variant00](self.impl)) + +proc g_variant_get_normal_form*(self: ptr Variant00): ptr Variant00 {. + importc: "g_variant_get_normal_form", libprag.} + +proc getNormalForm*(self: Variant): Variant = + new(result) + result.impl = g_variant_get_normal_form(cast[ptr Variant00](self.impl)) + +proc normalForm*(self: Variant): Variant = + new(result) + result.impl = g_variant_get_normal_form(cast[ptr Variant00](self.impl)) + +proc g_variant_get_objv*(self: ptr Variant00; length: var uint64): cstringArray {. + importc: "g_variant_get_objv", libprag.} + +proc getObjv*(self: Variant; length: var uint64): cstringArray = + g_variant_get_objv(cast[ptr Variant00](self.impl), length) + +proc objv*(self: Variant; length: var uint64): cstringArray = + g_variant_get_objv(cast[ptr Variant00](self.impl), length) + +proc g_variant_get_size*(self: ptr Variant00): uint64 {. + importc: "g_variant_get_size", libprag.} + +proc getSize*(self: Variant): uint64 = + g_variant_get_size(cast[ptr Variant00](self.impl)) + +proc size*(self: Variant): uint64 = + g_variant_get_size(cast[ptr Variant00](self.impl)) + +proc g_variant_get_string*(self: ptr Variant00; length: var uint64): cstring {. + importc: "g_variant_get_string", libprag.} + +proc getString*(self: Variant; length: var uint64): string = + let resul0 = g_variant_get_string(cast[ptr Variant00](self.impl), length) + result = $resul0 + +proc string*(self: Variant; length: var uint64): string = + let resul0 = g_variant_get_string(cast[ptr Variant00](self.impl), length) + result = $resul0 + +proc g_variant_get_strv*(self: ptr Variant00; length: var uint64): cstringArray {. + importc: "g_variant_get_strv", libprag.} + +proc getStrv*(self: Variant; length: var uint64): cstringArray = + g_variant_get_strv(cast[ptr Variant00](self.impl), length) + +proc strv*(self: Variant; length: var uint64): cstringArray = + g_variant_get_strv(cast[ptr Variant00](self.impl), length) + +proc g_variant_get_type_string*(self: ptr Variant00): cstring {. + importc: "g_variant_get_type_string", libprag.} + +proc getTypeString*(self: Variant): string = + let resul0 = g_variant_get_type_string(cast[ptr Variant00](self.impl)) + result = $resul0 + +proc typeString*(self: Variant): string = + let resul0 = g_variant_get_type_string(cast[ptr Variant00](self.impl)) + result = $resul0 + +proc g_variant_get_uint16*(self: ptr Variant00): uint16 {. + importc: "g_variant_get_uint16", libprag.} + +proc getUint16*(self: Variant): uint16 = + g_variant_get_uint16(cast[ptr Variant00](self.impl)) + +proc g_variant_get_uint32*(self: ptr Variant00): uint32 {. + importc: "g_variant_get_uint32", libprag.} + +proc getUint32*(self: Variant): int = + int(g_variant_get_uint32(cast[ptr Variant00](self.impl))) + +proc g_variant_get_uint64*(self: ptr Variant00): uint64 {. + importc: "g_variant_get_uint64", libprag.} + +proc getUint64*(self: Variant): uint64 = + g_variant_get_uint64(cast[ptr Variant00](self.impl)) + +proc g_variant_get_variant*(self: ptr Variant00): ptr Variant00 {. + importc: "g_variant_get_variant", libprag.} + +proc getVariant*(self: Variant): Variant = + new(result) + result.impl = g_variant_get_variant(cast[ptr Variant00](self.impl)) + +proc variant*(self: Variant): Variant = + new(result) + result.impl = g_variant_get_variant(cast[ptr Variant00](self.impl)) + +proc g_variant_hash*(self: ptr Variant00): uint32 {. + importc: "g_variant_hash", libprag.} + +proc hash*(self: Variant): int = + int(g_variant_hash(cast[ptr Variant00](self.impl))) + +proc g_variant_is_container*(self: ptr Variant00): gboolean {. + importc: "g_variant_is_container", libprag.} + +proc isContainer*(self: Variant): bool = + toBool(g_variant_is_container(cast[ptr Variant00](self.impl))) + +proc g_variant_is_floating*(self: ptr Variant00): gboolean {. + importc: "g_variant_is_floating", libprag.} + +proc isFloating*(self: Variant): bool = + toBool(g_variant_is_floating(cast[ptr Variant00](self.impl))) + +proc g_variant_is_normal_form*(self: ptr Variant00): gboolean {. + importc: "g_variant_is_normal_form", libprag.} + +proc isNormalForm*(self: Variant): bool = + toBool(g_variant_is_normal_form(cast[ptr Variant00](self.impl))) + +proc g_variant_n_children*(self: ptr Variant00): uint64 {. + importc: "g_variant_n_children", libprag.} + +proc nChildren*(self: Variant): uint64 = + g_variant_n_children(cast[ptr Variant00](self.impl)) + +proc g_variant_print*(self: ptr Variant00; typeAnnotate: gboolean): cstring {. + importc: "g_variant_print", libprag.} + +proc print*(self: Variant; typeAnnotate: bool): string = + let resul0 = g_variant_print(cast[ptr Variant00](self.impl), gboolean(typeAnnotate)) + result = $resul0 + cogfree(resul0) + +proc g_variant_ref*(self: ptr Variant00): ptr Variant00 {. + importc: "g_variant_ref", libprag.} + +proc `ref`*(self: Variant): Variant = + new(result) + result.impl = g_variant_ref(cast[ptr Variant00](self.impl)) + +proc g_variant_ref_sink*(self: ptr Variant00): ptr Variant00 {. + importc: "g_variant_ref_sink", libprag.} + +proc refSink*(self: Variant): Variant = + new(result) + result.impl = g_variant_ref_sink(cast[ptr Variant00](self.impl)) + +proc g_variant_store*(self: ptr Variant00; data: pointer) {. + importc: "g_variant_store", libprag.} + +proc store*(self: Variant; data: pointer) = + g_variant_store(cast[ptr Variant00](self.impl), data) + +proc g_variant_take_ref*(self: ptr Variant00): ptr Variant00 {. + importc: "g_variant_take_ref", libprag.} + +proc takeRef*(self: Variant): Variant = + new(result) + result.impl = g_variant_take_ref(cast[ptr Variant00](self.impl)) + +proc g_variant_unref*(self: ptr Variant00) {. + importc: "g_variant_unref", libprag.} + +proc unref*(self: Variant) = + g_variant_unref(cast[ptr Variant00](self.impl)) + +proc g_variant_is_object_path*(string: cstring): gboolean {. + importc: "g_variant_is_object_path", libprag.} + +proc isObjectPath*(string: cstring): gboolean {. + importc: "g_variant_is_object_path", libprag.} + +proc g_variant_is_signature*(string: cstring): gboolean {. + importc: "g_variant_is_signature", libprag.} + +proc isSignature*(string: cstring): gboolean {. + importc: "g_variant_is_signature", libprag.} + +proc g_variant_parse_error_print_context*(error: ptr Error00; sourceStr: cstring): cstring {. + importc: "g_variant_parse_error_print_context", libprag.} + +proc parseErrorPrintContext*(error: ptr Error00; sourceStr: string): string = + let resul0 = g_variant_parse_error_print_context(error, cstring(sourceStr)) + result = $resul0 + cogfree(resul0) + +proc g_variant_parse_error_quark*(): uint32 {. + importc: "g_variant_parse_error_quark", libprag.} + +proc parseErrorQuark*(): uint32 {. + importc: "g_variant_parse_error_quark", libprag.} + +proc g_variant_parser_get_error_quark*(): uint32 {. + importc: "g_variant_parser_get_error_quark", libprag.} + +proc parserGetErrorQuark*(): uint32 {. + importc: "g_variant_parser_get_error_quark", libprag.} + +type + VariantClass* {.size: sizeof(cint), pure.} = enum + `tuple` = 40 + array = 97 + boolean = 98 + double = 100 + signature = 103 + handle = 104 + int32 = 105 + maybe = 109 + int16 = 110 + objectPath = 111 + uint16 = 113 + string = 115 + uint64 = 116 + uint32 = 117 + variant = 118 + int64 = 120 + byte = 121 + dictEntry = 123 + +proc g_variant_classify*(self: ptr Variant00): VariantClass {. + importc: "g_variant_classify", libprag.} + +proc classify*(self: Variant): VariantClass = + g_variant_classify(cast[ptr Variant00](self.impl)) + +type + VariantType00* {.pure.} = object + VariantType* = ref object + impl*: ptr VariantType00 + +proc g_variant_type_new*(typeString: cstring): ptr VariantType00 {. + importc: "g_variant_type_new", libprag.} + +proc newVariantType*(typeString: string): VariantType = + new(result) + result.impl = g_variant_type_new(cstring(typeString)) + +proc initVariantType*[T](result: var T; typeString: string) = + assert(result is VariantType) + new(result) + result.impl = g_variant_type_new(cstring(typeString)) + +proc g_variant_type_new_array*(element: ptr VariantType00): ptr VariantType00 {. + importc: "g_variant_type_new_array", libprag.} + +proc newVariantTypeArray*(element: VariantType): VariantType = + new(result) + result.impl = g_variant_type_new_array(cast[ptr VariantType00](element.impl)) + +proc initVariantTypeArray*[T](result: var T; element: VariantType) = + assert(result is VariantType) + new(result) + result.impl = g_variant_type_new_array(cast[ptr VariantType00](element.impl)) + +proc g_variant_type_new_dict_entry*(key: ptr VariantType00; value: ptr VariantType00): ptr VariantType00 {. + importc: "g_variant_type_new_dict_entry", libprag.} + +proc newVariantTypeDictEntry*(key: VariantType; value: VariantType): VariantType = + new(result) + result.impl = g_variant_type_new_dict_entry(cast[ptr VariantType00](key.impl), cast[ptr VariantType00](value.impl)) + +proc initVariantTypeDictEntry*[T](result: var T; key: VariantType; value: VariantType) = + assert(result is VariantType) + new(result) + result.impl = g_variant_type_new_dict_entry(cast[ptr VariantType00](key.impl), cast[ptr VariantType00](value.impl)) + +proc g_variant_type_new_maybe*(element: ptr VariantType00): ptr VariantType00 {. + importc: "g_variant_type_new_maybe", libprag.} + +proc newVariantTypeMaybe*(element: VariantType): VariantType = + new(result) + result.impl = g_variant_type_new_maybe(cast[ptr VariantType00](element.impl)) + +proc initVariantTypeMaybe*[T](result: var T; element: VariantType) = + assert(result is VariantType) + new(result) + result.impl = g_variant_type_new_maybe(cast[ptr VariantType00](element.impl)) + +proc g_variant_type_new_tuple*(items: ptr VariantType00Array; length: int32): ptr VariantType00 {. + importc: "g_variant_type_new_tuple", libprag.} + +proc newVariantTypeTuple*(items: ptr VariantType00Array; length: int): VariantType = + new(result) + result.impl = g_variant_type_new_tuple(items, int32(length)) + +proc initVariantTypeTuple*[T](result: var T; items: ptr VariantType00Array; length: int) = + assert(result is VariantType) + new(result) + result.impl = g_variant_type_new_tuple(items, int32(length)) + +proc g_variant_type_copy*(self: ptr VariantType00): ptr VariantType00 {. + importc: "g_variant_type_copy", libprag.} + +proc copy*(self: VariantType): VariantType = + new(result) + result.impl = g_variant_type_copy(cast[ptr VariantType00](self.impl)) + +proc g_variant_type_dup_string*(self: ptr VariantType00): cstring {. + importc: "g_variant_type_dup_string", libprag.} + +proc dupString*(self: VariantType): string = + let resul0 = g_variant_type_dup_string(cast[ptr VariantType00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc g_variant_type_element*(self: ptr VariantType00): ptr VariantType00 {. + importc: "g_variant_type_element", libprag.} + +proc element*(self: VariantType): VariantType = + new(result) + result.impl = g_variant_type_element(cast[ptr VariantType00](self.impl)) + +proc g_variant_type_equal*(self: ptr VariantType00; type2: ptr VariantType00): gboolean {. + importc: "g_variant_type_equal", libprag.} + +proc equal*(self: VariantType; type2: VariantType): bool = + toBool(g_variant_type_equal(cast[ptr VariantType00](self.impl), cast[ptr VariantType00](type2.impl))) + +proc g_variant_type_first*(self: ptr VariantType00): ptr VariantType00 {. + importc: "g_variant_type_first", libprag.} + +proc first*(self: VariantType): VariantType = + new(result) + result.impl = g_variant_type_first(cast[ptr VariantType00](self.impl)) + +proc g_variant_type_free*(self: ptr VariantType00) {. + importc: "g_variant_type_free", libprag.} + +proc free*(self: VariantType) = + g_variant_type_free(cast[ptr VariantType00](self.impl)) + +proc g_variant_type_get_string_length*(self: ptr VariantType00): uint64 {. + importc: "g_variant_type_get_string_length", libprag.} + +proc getStringLength*(self: VariantType): uint64 = + g_variant_type_get_string_length(cast[ptr VariantType00](self.impl)) + +proc stringLength*(self: VariantType): uint64 = + g_variant_type_get_string_length(cast[ptr VariantType00](self.impl)) + +proc g_variant_type_hash*(self: ptr VariantType00): uint32 {. + importc: "g_variant_type_hash", libprag.} + +proc hash*(self: VariantType): int = + int(g_variant_type_hash(cast[ptr VariantType00](self.impl))) + +proc g_variant_type_is_array*(self: ptr VariantType00): gboolean {. + importc: "g_variant_type_is_array", libprag.} + +proc isArray*(self: VariantType): bool = + toBool(g_variant_type_is_array(cast[ptr VariantType00](self.impl))) + +proc g_variant_type_is_basic*(self: ptr VariantType00): gboolean {. + importc: "g_variant_type_is_basic", libprag.} + +proc isBasic*(self: VariantType): bool = + toBool(g_variant_type_is_basic(cast[ptr VariantType00](self.impl))) + +proc g_variant_type_is_container*(self: ptr VariantType00): gboolean {. + importc: "g_variant_type_is_container", libprag.} + +proc isContainer*(self: VariantType): bool = + toBool(g_variant_type_is_container(cast[ptr VariantType00](self.impl))) + +proc g_variant_type_is_definite*(self: ptr VariantType00): gboolean {. + importc: "g_variant_type_is_definite", libprag.} + +proc isDefinite*(self: VariantType): bool = + toBool(g_variant_type_is_definite(cast[ptr VariantType00](self.impl))) + +proc g_variant_type_is_dict_entry*(self: ptr VariantType00): gboolean {. + importc: "g_variant_type_is_dict_entry", libprag.} + +proc isDictEntry*(self: VariantType): bool = + toBool(g_variant_type_is_dict_entry(cast[ptr VariantType00](self.impl))) + +proc g_variant_type_is_maybe*(self: ptr VariantType00): gboolean {. + importc: "g_variant_type_is_maybe", libprag.} + +proc isMaybe*(self: VariantType): bool = + toBool(g_variant_type_is_maybe(cast[ptr VariantType00](self.impl))) + +proc g_variant_type_is_subtype_of*(self: ptr VariantType00; supertype: ptr VariantType00): gboolean {. + importc: "g_variant_type_is_subtype_of", libprag.} + +proc isSubtypeOf*(self: VariantType; supertype: VariantType): bool = + toBool(g_variant_type_is_subtype_of(cast[ptr VariantType00](self.impl), cast[ptr VariantType00](supertype.impl))) + +proc g_variant_type_is_tuple*(self: ptr VariantType00): gboolean {. + importc: "g_variant_type_is_tuple", libprag.} + +proc isTuple*(self: VariantType): bool = + toBool(g_variant_type_is_tuple(cast[ptr VariantType00](self.impl))) + +proc g_variant_type_is_variant*(self: ptr VariantType00): gboolean {. + importc: "g_variant_type_is_variant", libprag.} + +proc isVariant*(self: VariantType): bool = + toBool(g_variant_type_is_variant(cast[ptr VariantType00](self.impl))) + +proc g_variant_type_key*(self: ptr VariantType00): ptr VariantType00 {. + importc: "g_variant_type_key", libprag.} + +proc key*(self: VariantType): VariantType = + new(result) + result.impl = g_variant_type_key(cast[ptr VariantType00](self.impl)) + +proc g_variant_type_n_items*(self: ptr VariantType00): uint64 {. + importc: "g_variant_type_n_items", libprag.} + +proc nItems*(self: VariantType): uint64 = + g_variant_type_n_items(cast[ptr VariantType00](self.impl)) + +proc g_variant_type_next*(self: ptr VariantType00): ptr VariantType00 {. + importc: "g_variant_type_next", libprag.} + +proc next*(self: VariantType): VariantType = + new(result) + result.impl = g_variant_type_next(cast[ptr VariantType00](self.impl)) + +proc g_variant_type_value*(self: ptr VariantType00): ptr VariantType00 {. + importc: "g_variant_type_value", libprag.} + +proc value*(self: VariantType): VariantType = + new(result) + result.impl = g_variant_type_value(cast[ptr VariantType00](self.impl)) + +proc g_variant_type_string_is_valid*(typeString: cstring): gboolean {. + importc: "g_variant_type_string_is_valid", libprag.} + +proc stringIsValid*(typeString: cstring): gboolean {. + importc: "g_variant_type_string_is_valid", libprag.} + +proc g_variant_type_string_scan*(string: cstring; limit: cstring; endptr: var cstring): gboolean {. + importc: "g_variant_type_string_scan", libprag.} + +proc stringScan*(string: cstring; limit: cstring; endptr: var cstring): gboolean {. + importc: "g_variant_type_string_scan", libprag.} + +proc g_variant_new_array*(childType: ptr VariantType00; children: ptr Variant00Array; + nChildren: uint64): ptr Variant00 {. + importc: "g_variant_new_array", libprag.} + +proc newVariantArray*(childType: VariantType; children: ptr Variant00Array; + nChildren: uint64): Variant = + new(result) + result.impl = g_variant_new_array(cast[ptr VariantType00](childType.impl), children, nChildren) + +proc initVariantArray*[T](result: var T; childType: VariantType; children: ptr Variant00Array; + nChildren: uint64) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_array(cast[ptr VariantType00](childType.impl), children, nChildren) + +proc g_variant_new_fixed_array*(elementType: ptr VariantType00; elements: pointer; + nElements: uint64; elementSize: uint64): ptr Variant00 {. + importc: "g_variant_new_fixed_array", libprag.} + +proc newVariantFixedArray*(elementType: VariantType; elements: pointer; nElements: uint64; + elementSize: uint64): Variant = + new(result) + result.impl = g_variant_new_fixed_array(cast[ptr VariantType00](elementType.impl), elements, nElements, elementSize) + +proc initVariantFixedArray*[T](result: var T; elementType: VariantType; elements: pointer; nElements: uint64; + elementSize: uint64) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_fixed_array(cast[ptr VariantType00](elementType.impl), elements, nElements, elementSize) + +proc g_variant_new_from_bytes*(`type`: ptr VariantType00; bytes: ptr Bytes00; trusted: gboolean): ptr Variant00 {. + importc: "g_variant_new_from_bytes", libprag.} + +proc newVariantFromBytes*(`type`: VariantType; bytes: Bytes; trusted: bool): Variant = + new(result) + result.impl = g_variant_new_from_bytes(cast[ptr VariantType00](`type`.impl), cast[ptr Bytes00](bytes.impl), gboolean(trusted)) + +proc initVariantFromBytes*[T](result: var T; `type`: VariantType; bytes: Bytes; trusted: bool) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_from_bytes(cast[ptr VariantType00](`type`.impl), cast[ptr Bytes00](bytes.impl), gboolean(trusted)) + +proc g_variant_new_from_data*(`type`: ptr VariantType00; data: uint8Array; size: uint64; + trusted: gboolean; notify: DestroyNotify; userData: pointer): ptr Variant00 {. + importc: "g_variant_new_from_data", libprag.} + +proc newVariantFromData*(`type`: VariantType; data: uint8Array; size: uint64; + trusted: bool; notify: DestroyNotify; userData: pointer): Variant = + new(result) + result.impl = g_variant_new_from_data(cast[ptr VariantType00](`type`.impl), data, size, gboolean(trusted), notify, userData) + +proc initVariantFromData*[T](result: var T; `type`: VariantType; data: uint8Array; size: uint64; + trusted: bool; notify: DestroyNotify; userData: pointer) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_from_data(cast[ptr VariantType00](`type`.impl), data, size, gboolean(trusted), notify, userData) + +proc g_variant_new_maybe*(childType: ptr VariantType00; child: ptr Variant00): ptr Variant00 {. + importc: "g_variant_new_maybe", libprag.} + +proc newVariantMaybe*(childType: VariantType; child: Variant): Variant = + new(result) + result.impl = g_variant_new_maybe(cast[ptr VariantType00](childType.impl), cast[ptr Variant00](child.impl)) + +proc initVariantMaybe*[T](result: var T; childType: VariantType; child: Variant) = + assert(result is Variant) + new(result) + result.impl = g_variant_new_maybe(cast[ptr VariantType00](childType.impl), cast[ptr Variant00](child.impl)) + +proc g_variant_get_type*(self: ptr Variant00): ptr VariantType00 {. + importc: "g_variant_get_type", libprag.} + +proc getType*(self: Variant): VariantType = + new(result) + result.impl = g_variant_get_type(cast[ptr Variant00](self.impl)) + +proc g_variant_is_of_type*(self: ptr Variant00; `type`: ptr VariantType00): gboolean {. + importc: "g_variant_is_of_type", libprag.} + +proc isOfType*(self: Variant; `type`: VariantType): bool = + toBool(g_variant_is_of_type(cast[ptr Variant00](self.impl), cast[ptr VariantType00](`type`.impl))) + +proc g_variant_lookup_value*(self: ptr Variant00; key: cstring; expectedType: ptr VariantType00): ptr Variant00 {. + importc: "g_variant_lookup_value", libprag.} + +proc lookupValue*(self: Variant; key: string; expectedType: VariantType): Variant = + new(result) + result.impl = g_variant_lookup_value(cast[ptr Variant00](self.impl), cstring(key), cast[ptr VariantType00](expectedType.impl)) + +proc g_variant_parse*(`type`: ptr VariantType00; text: cstring; limit: cstring; + endptr: cstring): ptr Variant00 {. + importc: "g_variant_parse", libprag.} + +proc parse*(`type`: VariantType; text: string; limit: string; + endptr: string): Variant = + new(result) + result.impl = g_variant_parse(cast[ptr VariantType00](`type`.impl), cstring(text), cstring(limit), cstring(endptr)) + +type + VariantBuilder00* {.pure.} = object + VariantBuilder* = ref object + impl*: ptr VariantBuilder00 + +proc g_variant_builder_new*(`type`: ptr VariantType00): ptr VariantBuilder00 {. + importc: "g_variant_builder_new", libprag.} + +proc newVariantBuilder*(`type`: VariantType): VariantBuilder = + new(result) + result.impl = g_variant_builder_new(cast[ptr VariantType00](`type`.impl)) + +proc initVariantBuilder*[T](result: var T; `type`: VariantType) = + assert(result is VariantBuilder) + new(result) + result.impl = g_variant_builder_new(cast[ptr VariantType00](`type`.impl)) + +proc g_variant_builder_add_value*(self: ptr VariantBuilder00; value: ptr Variant00) {. + importc: "g_variant_builder_add_value", libprag.} + +proc addValue*(self: VariantBuilder; value: Variant) = + g_variant_builder_add_value(cast[ptr VariantBuilder00](self.impl), cast[ptr Variant00](value.impl)) + +proc g_variant_builder_close*(self: ptr VariantBuilder00) {. + importc: "g_variant_builder_close", libprag.} + +proc close*(self: VariantBuilder) = + g_variant_builder_close(cast[ptr VariantBuilder00](self.impl)) + +proc g_variant_builder_end*(self: ptr VariantBuilder00): ptr Variant00 {. + importc: "g_variant_builder_end", libprag.} + +proc `end`*(self: VariantBuilder): Variant = + new(result) + result.impl = g_variant_builder_end(cast[ptr VariantBuilder00](self.impl)) + +proc g_variant_builder_open*(self: ptr VariantBuilder00; `type`: ptr VariantType00) {. + importc: "g_variant_builder_open", libprag.} + +proc open*(self: VariantBuilder; `type`: VariantType) = + g_variant_builder_open(cast[ptr VariantBuilder00](self.impl), cast[ptr VariantType00](`type`.impl)) + +proc g_variant_builder_ref*(self: ptr VariantBuilder00): ptr VariantBuilder00 {. + importc: "g_variant_builder_ref", libprag.} + +proc `ref`*(self: VariantBuilder): VariantBuilder = + new(result) + result.impl = g_variant_builder_ref(cast[ptr VariantBuilder00](self.impl)) + +proc g_variant_builder_unref*(self: ptr VariantBuilder00) {. + importc: "g_variant_builder_unref", libprag.} + +proc unref*(self: VariantBuilder) = + g_variant_builder_unref(cast[ptr VariantBuilder00](self.impl)) + +type + VariantDict00* {.pure.} = object + VariantDict* = ref object + impl*: ptr VariantDict00 + +proc g_variant_dict_new*(fromAsv: ptr Variant00): ptr VariantDict00 {. + importc: "g_variant_dict_new", libprag.} + +proc newVariantDict*(fromAsv: Variant): VariantDict = + new(result) + result.impl = g_variant_dict_new(cast[ptr Variant00](fromAsv.impl)) + +proc initVariantDict*[T](result: var T; fromAsv: Variant) = + assert(result is VariantDict) + new(result) + result.impl = g_variant_dict_new(cast[ptr Variant00](fromAsv.impl)) + +proc g_variant_dict_clear*(self: ptr VariantDict00) {. + importc: "g_variant_dict_clear", libprag.} + +proc clear*(self: VariantDict) = + g_variant_dict_clear(cast[ptr VariantDict00](self.impl)) + +proc g_variant_dict_contains*(self: ptr VariantDict00; key: cstring): gboolean {. + importc: "g_variant_dict_contains", libprag.} + +proc contains*(self: VariantDict; key: string): bool = + toBool(g_variant_dict_contains(cast[ptr VariantDict00](self.impl), cstring(key))) + +proc g_variant_dict_end*(self: ptr VariantDict00): ptr Variant00 {. + importc: "g_variant_dict_end", libprag.} + +proc `end`*(self: VariantDict): Variant = + new(result) + result.impl = g_variant_dict_end(cast[ptr VariantDict00](self.impl)) + +proc g_variant_dict_insert_value*(self: ptr VariantDict00; key: cstring; value: ptr Variant00) {. + importc: "g_variant_dict_insert_value", libprag.} + +proc insertValue*(self: VariantDict; key: string; value: Variant) = + g_variant_dict_insert_value(cast[ptr VariantDict00](self.impl), cstring(key), cast[ptr Variant00](value.impl)) + +proc g_variant_dict_lookup_value*(self: ptr VariantDict00; key: cstring; expectedType: ptr VariantType00): ptr Variant00 {. + importc: "g_variant_dict_lookup_value", libprag.} + +proc lookupValue*(self: VariantDict; key: string; expectedType: VariantType): Variant = + new(result) + result.impl = g_variant_dict_lookup_value(cast[ptr VariantDict00](self.impl), cstring(key), cast[ptr VariantType00](expectedType.impl)) + +proc g_variant_dict_ref*(self: ptr VariantDict00): ptr VariantDict00 {. + importc: "g_variant_dict_ref", libprag.} + +proc `ref`*(self: VariantDict): VariantDict = + new(result) + result.impl = g_variant_dict_ref(cast[ptr VariantDict00](self.impl)) + +proc g_variant_dict_remove*(self: ptr VariantDict00; key: cstring): gboolean {. + importc: "g_variant_dict_remove", libprag.} + +proc remove*(self: VariantDict; key: string): bool = + toBool(g_variant_dict_remove(cast[ptr VariantDict00](self.impl), cstring(key))) + +proc g_variant_dict_unref*(self: ptr VariantDict00) {. + importc: "g_variant_dict_unref", libprag.} + +proc unref*(self: VariantDict) = + g_variant_dict_unref(cast[ptr VariantDict00](self.impl)) + +type + VariantParseError* {.size: sizeof(cint), pure.} = enum + failed = 0 + basicTypeExpected = 1 + cannotInferType = 2 + definiteTypeExpected = 3 + inputNotAtEnd = 4 + invalidCharacter = 5 + invalidFormatString = 6 + invalidObjectPath = 7 + invalidSignature = 8 + invalidTypeString = 9 + noCommonType = 10 + numberOutOfRange = 11 + numberTooBig = 12 + typeError = 13 + unexpectedToken = 14 + unknownKeyword = 15 + unterminatedStringConstant = 16 + valueExpected = 17 + +type + VoidFunc* = proc () {.cdecl.} + +const WIN32_MSG_HANDLE* = 19981206'i32 + +proc g_access*(filename: ucstring; mode: int32): int32 {. + importc: "g_access", libprag.} + +proc access*(filename: ucstring; mode: int32): int32 {. + importc: "g_access", libprag.} + +proc g_ascii_digit_value*(c: int8): int32 {. + importc: "g_ascii_digit_value", libprag.} + +proc asciiDigitValue*(c: int8): int32 {. + importc: "g_ascii_digit_value", libprag.} + +proc g_ascii_dtostr*(buffer: cstring; bufLen: int32; d: cdouble): cstring {. + importc: "g_ascii_dtostr", libprag.} + +proc asciiDtostr*(buffer: string; bufLen: int; d: cdouble): string = + let resul0 = g_ascii_dtostr(cstring(buffer), int32(bufLen), d) + result = $resul0 + cogfree(resul0) + +proc g_ascii_formatd*(buffer: cstring; bufLen: int32; format: cstring; d: cdouble): cstring {. + importc: "g_ascii_formatd", libprag.} + +proc asciiFormatd*(buffer: string; bufLen: int; format: string; d: cdouble): string = + let resul0 = g_ascii_formatd(cstring(buffer), int32(bufLen), cstring(format), d) + result = $resul0 + cogfree(resul0) + +proc g_ascii_strcasecmp*(s1: cstring; s2: cstring): int32 {. + importc: "g_ascii_strcasecmp", libprag.} + +proc asciiStrcasecmp*(s1: cstring; s2: cstring): int32 {. + importc: "g_ascii_strcasecmp", libprag.} + +proc g_ascii_strdown*(str: cstring; len: int64): cstring {. + importc: "g_ascii_strdown", libprag.} + +proc asciiStrdown*(str: string; len: int64): string = + let resul0 = g_ascii_strdown(cstring(str), len) + result = $resul0 + cogfree(resul0) + +proc g_ascii_strncasecmp*(s1: cstring; s2: cstring; n: uint64): int32 {. + importc: "g_ascii_strncasecmp", libprag.} + +proc asciiStrncasecmp*(s1: cstring; s2: cstring; n: uint64): int32 {. + importc: "g_ascii_strncasecmp", libprag.} + +proc g_ascii_strtod*(nptr: cstring; endptr: var cstring): cdouble {. + importc: "g_ascii_strtod", libprag.} + +proc asciiStrtod*(nptr: cstring; endptr: var cstring): cdouble {. + importc: "g_ascii_strtod", libprag.} + +proc g_ascii_strtoll*(nptr: cstring; endptr: var cstring; base: uint32): int64 {. + importc: "g_ascii_strtoll", libprag.} + +proc asciiStrtoll*(nptr: cstring; endptr: var cstring; base: uint32): int64 {. + importc: "g_ascii_strtoll", libprag.} + +proc g_ascii_strtoull*(nptr: cstring; endptr: var cstring; base: uint32): uint64 {. + importc: "g_ascii_strtoull", libprag.} + +proc asciiStrtoull*(nptr: cstring; endptr: var cstring; base: uint32): uint64 {. + importc: "g_ascii_strtoull", libprag.} + +proc g_ascii_strup*(str: cstring; len: int64): cstring {. + importc: "g_ascii_strup", libprag.} + +proc asciiStrup*(str: string; len: int64): string = + let resul0 = g_ascii_strup(cstring(str), len) + result = $resul0 + cogfree(resul0) + +proc g_ascii_tolower*(c: int8): int8 {. + importc: "g_ascii_tolower", libprag.} + +proc asciiTolower*(c: int8): int8 {. + importc: "g_ascii_tolower", libprag.} + +proc g_ascii_toupper*(c: int8): int8 {. + importc: "g_ascii_toupper", libprag.} + +proc asciiToupper*(c: int8): int8 {. + importc: "g_ascii_toupper", libprag.} + +proc g_ascii_xdigit_value*(c: int8): int32 {. + importc: "g_ascii_xdigit_value", libprag.} + +proc asciiXdigitValue*(c: int8): int32 {. + importc: "g_ascii_xdigit_value", libprag.} + +proc g_assert_warning*(logDomain: cstring; file: cstring; line: int32; prettyFunction: cstring; + expression: cstring) {. + importc: "g_assert_warning", libprag.} + +proc assertWarning*(logDomain: cstring; file: cstring; line: int32; prettyFunction: cstring; + expression: cstring) {. + importc: "g_assert_warning", libprag.} + +proc g_assertion_message*(domain: cstring; file: cstring; line: int32; `func`: cstring; + message: cstring) {. + importc: "g_assertion_message", libprag.} + +proc assertionMessage*(domain: cstring; file: cstring; line: int32; `func`: cstring; + message: cstring) {. + importc: "g_assertion_message", libprag.} + +proc g_assertion_message_cmpstr*(domain: cstring; file: cstring; line: int32; `func`: cstring; + expr: cstring; arg1: cstring; cmp: cstring; arg2: cstring) {. + importc: "g_assertion_message_cmpstr", libprag.} + +proc assertionMessageCmpstr*(domain: cstring; file: cstring; line: int32; `func`: cstring; + expr: cstring; arg1: cstring; cmp: cstring; arg2: cstring) {. + importc: "g_assertion_message_cmpstr", libprag.} + +proc g_assertion_message_error*(domain: cstring; file: cstring; line: int32; `func`: cstring; + expr: cstring; error: ptr Error00; errorDomain: uint32; errorCode: int32) {. + importc: "g_assertion_message_error", libprag.} + +proc assertionMessageError*(domain: cstring; file: cstring; line: int32; `func`: cstring; + expr: cstring; error: ptr Error00; errorDomain: uint32; errorCode: int32) {. + importc: "g_assertion_message_error", libprag.} + +proc g_atexit*(`func`: VoidFunc) {. + importc: "g_atexit", libprag.} + +proc atexit*(`func`: VoidFunc) {. + importc: "g_atexit", libprag.} + +proc g_atomic_int_add*(`atomic`: ptr int32; val: int32): int32 {. + importc: "g_atomic_int_add", libprag.} + +proc atomicIntAdd*(`atomic`: ptr int32; val: int32): int32 {. + importc: "g_atomic_int_add", libprag.} + +proc g_atomic_int_and*(`atomic`: ptr uint32; val: uint32): uint32 {. + importc: "g_atomic_int_and", libprag.} + +proc atomicIntAnd*(`atomic`: ptr uint32; val: uint32): uint32 {. + importc: "g_atomic_int_and", libprag.} + +proc g_atomic_int_compare_and_exchange*(`atomic`: ptr int32; oldval: int32; newval: int32): gboolean {. + importc: "g_atomic_int_compare_and_exchange", libprag.} + +proc atomicIntCompareAndExchange*(`atomic`: ptr int32; oldval: int32; newval: int32): gboolean {. + importc: "g_atomic_int_compare_and_exchange", libprag.} + +proc g_atomic_int_dec_and_test*(`atomic`: ptr int32): gboolean {. + importc: "g_atomic_int_dec_and_test", libprag.} + +proc atomicIntDecAndTest*(`atomic`: ptr int32): gboolean {. + importc: "g_atomic_int_dec_and_test", libprag.} + +proc g_atomic_int_exchange_and_add*(`atomic`: ptr int32; val: int32): int32 {. + importc: "g_atomic_int_exchange_and_add", libprag.} + +proc atomicIntExchangeAndAdd*(`atomic`: ptr int32; val: int32): int32 {. + importc: "g_atomic_int_exchange_and_add", libprag.} + +proc g_atomic_int_get*(`atomic`: ptr int32): int32 {. + importc: "g_atomic_int_get", libprag.} + +proc atomicIntGet*(`atomic`: ptr int32): int32 {. + importc: "g_atomic_int_get", libprag.} + +proc g_atomic_int_inc*(`atomic`: ptr int32) {. + importc: "g_atomic_int_inc", libprag.} + +proc atomicIntInc*(`atomic`: ptr int32) {. + importc: "g_atomic_int_inc", libprag.} + +proc g_atomic_int_or*(`atomic`: ptr uint32; val: uint32): uint32 {. + importc: "g_atomic_int_or", libprag.} + +proc atomicIntOr*(`atomic`: ptr uint32; val: uint32): uint32 {. + importc: "g_atomic_int_or", libprag.} + +proc g_atomic_int_set*(`atomic`: ptr int32; newval: int32) {. + importc: "g_atomic_int_set", libprag.} + +proc atomicIntSet*(`atomic`: ptr int32; newval: int32) {. + importc: "g_atomic_int_set", libprag.} + +proc g_atomic_int_xor*(`atomic`: ptr uint32; val: uint32): uint32 {. + importc: "g_atomic_int_xor", libprag.} + +proc atomicIntXor*(`atomic`: ptr uint32; val: uint32): uint32 {. + importc: "g_atomic_int_xor", libprag.} + +proc g_atomic_pointer_add*(`atomic`: pointer; val: int64): int64 {. + importc: "g_atomic_pointer_add", libprag.} + +proc atomicPointerAdd*(`atomic`: pointer; val: int64): int64 {. + importc: "g_atomic_pointer_add", libprag.} + +proc g_atomic_pointer_and*(`atomic`: pointer; val: uint64): uint64 {. + importc: "g_atomic_pointer_and", libprag.} + +proc atomicPointerAnd*(`atomic`: pointer; val: uint64): uint64 {. + importc: "g_atomic_pointer_and", libprag.} + +proc g_atomic_pointer_compare_and_exchange*(`atomic`: pointer; oldval: pointer; newval: pointer): gboolean {. + importc: "g_atomic_pointer_compare_and_exchange", libprag.} + +proc atomicPointerCompareAndExchange*(`atomic`: pointer; oldval: pointer; newval: pointer): gboolean {. + importc: "g_atomic_pointer_compare_and_exchange", libprag.} + +proc g_atomic_pointer_get*(`atomic`: pointer): pointer {. + importc: "g_atomic_pointer_get", libprag.} + +proc atomicPointerGet*(`atomic`: pointer): pointer {. + importc: "g_atomic_pointer_get", libprag.} + +proc g_atomic_pointer_or*(`atomic`: pointer; val: uint64): uint64 {. + importc: "g_atomic_pointer_or", libprag.} + +proc atomicPointerOr*(`atomic`: pointer; val: uint64): uint64 {. + importc: "g_atomic_pointer_or", libprag.} + +proc g_atomic_pointer_set*(`atomic`: pointer; newval: pointer) {. + importc: "g_atomic_pointer_set", libprag.} + +proc atomicPointerSet*(`atomic`: pointer; newval: pointer) {. + importc: "g_atomic_pointer_set", libprag.} + +proc g_atomic_pointer_xor*(`atomic`: pointer; val: uint64): uint64 {. + importc: "g_atomic_pointer_xor", libprag.} + +proc atomicPointerXor*(`atomic`: pointer; val: uint64): uint64 {. + importc: "g_atomic_pointer_xor", libprag.} + +proc g_base64_decode*(text: cstring; outLen: var uint64): uint8Array {. + importc: "g_base64_decode", libprag.} + +proc base64Decode*(text: cstring; outLen: var uint64): uint8Array {. + importc: "g_base64_decode", libprag.} + +proc g_base64_decode_inplace*(text: uint8Array; outLen: uint64): ptr uint8 {. + importc: "g_base64_decode_inplace", libprag.} + +proc base64DecodeInplace*(text: uint8Array; outLen: uint64): ptr uint8 {. + importc: "g_base64_decode_inplace", libprag.} + +proc g_base64_decode_step*(`in`: uint8Array; len: uint64; `out`: var uint8Array; + state: int32; save: uint32): uint64 {. + importc: "g_base64_decode_step", libprag.} + +proc base64DecodeStep*(`in`: uint8Array; len: uint64; `out`: var uint8Array; + state: int32; save: uint32): uint64 {. + importc: "g_base64_decode_step", libprag.} + +proc g_base64_encode*(data: uint8Array; len: uint64): cstring {. + importc: "g_base64_encode", libprag.} + +proc base64Encode*(data: uint8Array; len: uint64): string = + let resul0 = g_base64_encode(data, len) + result = $resul0 + cogfree(resul0) + +proc g_base64_encode_close*(breakLines: gboolean; `out`: var uint8Array; state: int32; + save: int32): uint64 {. + importc: "g_base64_encode_close", libprag.} + +proc base64EncodeClose*(breakLines: gboolean; `out`: var uint8Array; state: int32; + save: int32): uint64 {. + importc: "g_base64_encode_close", libprag.} + +proc g_base64_encode_step*(`in`: uint8Array; len: uint64; breakLines: gboolean; + `out`: var uint8Array; state: int32; save: int32): uint64 {. + importc: "g_base64_encode_step", libprag.} + +proc base64EncodeStep*(`in`: uint8Array; len: uint64; breakLines: gboolean; + `out`: var uint8Array; state: int32; save: int32): uint64 {. + importc: "g_base64_encode_step", libprag.} + +proc g_basename*(fileName: ucstring): ucstring {. + importc: "g_basename", libprag.} + +proc basename*(fileName: ucstring): ucstring {. + importc: "g_basename", libprag.} + +proc g_bit_lock*(address: ptr int32; lockBit: int32) {. + importc: "g_bit_lock", libprag.} + +proc bitLock*(address: ptr int32; lockBit: int32) {. + importc: "g_bit_lock", libprag.} + +proc g_bit_nth_lsf*(mask: uint64; nthBit: int32): int32 {. + importc: "g_bit_nth_lsf", libprag.} + +proc bitNthLsf*(mask: uint64; nthBit: int32): int32 {. + importc: "g_bit_nth_lsf", libprag.} + +proc g_bit_nth_msf*(mask: uint64; nthBit: int32): int32 {. + importc: "g_bit_nth_msf", libprag.} + +proc bitNthMsf*(mask: uint64; nthBit: int32): int32 {. + importc: "g_bit_nth_msf", libprag.} + +proc g_bit_storage*(number: uint64): uint32 {. + importc: "g_bit_storage", libprag.} + +proc bitStorage*(number: uint64): uint32 {. + importc: "g_bit_storage", libprag.} + +proc g_bit_trylock*(address: ptr int32; lockBit: int32): gboolean {. + importc: "g_bit_trylock", libprag.} + +proc bitTrylock*(address: ptr int32; lockBit: int32): gboolean {. + importc: "g_bit_trylock", libprag.} + +proc g_bit_unlock*(address: ptr int32; lockBit: int32) {. + importc: "g_bit_unlock", libprag.} + +proc bitUnlock*(address: ptr int32; lockBit: int32) {. + importc: "g_bit_unlock", libprag.} + +proc g_build_filenamev*(args: ucstringArray): ucstring {. + importc: "g_build_filenamev", libprag.} + +proc buildFilenamev*(args: ucstringArray): ucstring {. + importc: "g_build_filenamev", libprag.} + +proc g_build_pathv*(separator: cstring; args: ucstringArray): ucstring {. + importc: "g_build_pathv", libprag.} + +proc buildPathv*(separator: cstring; args: ucstringArray): ucstring {. + importc: "g_build_pathv", libprag.} + +proc g_chdir*(path: ucstring): int32 {. + importc: "g_chdir", libprag.} + +proc chdir*(path: ucstring): int32 {. + importc: "g_chdir", libprag.} + +proc glib_check_version*(requiredMajor: uint32; requiredMinor: uint32; requiredMicro: uint32): cstring {. + importc: "glib_check_version", libprag.} + +proc checkVersion*(requiredMajor: int; requiredMinor: int; requiredMicro: int): string = + let resul0 = glib_check_version(uint32(requiredMajor), uint32(requiredMinor), uint32(requiredMicro)) + result = $resul0 + +proc g_child_watch_add_full*(priority: int32; pid: int32; function: ChildWatchFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "g_child_watch_add_full", libprag.} + +proc childWatchAdd*(priority: int32; pid: int32; function: ChildWatchFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "g_child_watch_add_full", libprag.} + +proc g_child_watch_source_new*(pid: int32): ptr Source00 {. + importc: "g_child_watch_source_new", libprag.} + +proc childWatchSourceNew*(pid: int): Source = + new(result) + result.impl = g_child_watch_source_new(int32(pid)) + +proc g_clear_error*() {. + importc: "g_clear_error", libprag.} + +proc clearError*() {. + importc: "g_clear_error", libprag.} + +proc g_close*(fd: int32): gboolean {. + importc: "g_close", libprag.} + +proc close*(fd: int32): gboolean {. + importc: "g_close", libprag.} + +proc g_compute_checksum_for_bytes*(checksumType: ChecksumType; data: ptr Bytes00): cstring {. + importc: "g_compute_checksum_for_bytes", libprag.} + +proc computeChecksumForBytes*(checksumType: ChecksumType; data: Bytes): string = + let resul0 = g_compute_checksum_for_bytes(checksumType, cast[ptr Bytes00](data.impl)) + result = $resul0 + cogfree(resul0) + +proc g_compute_checksum_for_data*(checksumType: ChecksumType; data: uint8Array; length: uint64): cstring {. + importc: "g_compute_checksum_for_data", libprag.} + +proc computeChecksumForData*(checksumType: ChecksumType; data: uint8Array; length: uint64): string = + let resul0 = g_compute_checksum_for_data(checksumType, data, length) + result = $resul0 + cogfree(resul0) + +proc g_compute_checksum_for_string*(checksumType: ChecksumType; str: cstring; length: int64): cstring {. + importc: "g_compute_checksum_for_string", libprag.} + +proc computeChecksumForString*(checksumType: ChecksumType; str: string; length: int64): string = + let resul0 = g_compute_checksum_for_string(checksumType, cstring(str), length) + result = $resul0 + cogfree(resul0) + +proc g_compute_hmac_for_bytes*(digestType: ChecksumType; key: ptr Bytes00; data: ptr Bytes00): cstring {. + importc: "g_compute_hmac_for_bytes", libprag.} + +proc computeHmacForBytes*(digestType: ChecksumType; key: Bytes; data: Bytes): string = + let resul0 = g_compute_hmac_for_bytes(digestType, cast[ptr Bytes00](key.impl), cast[ptr Bytes00](data.impl)) + result = $resul0 + cogfree(resul0) + +proc g_compute_hmac_for_data*(digestType: ChecksumType; key: uint8Array; keyLen: uint64; + data: uint8Array; length: uint64): cstring {. + importc: "g_compute_hmac_for_data", libprag.} + +proc computeHmacForData*(digestType: ChecksumType; key: uint8Array; keyLen: uint64; + data: uint8Array; length: uint64): string = + let resul0 = g_compute_hmac_for_data(digestType, key, keyLen, data, length) + result = $resul0 + cogfree(resul0) + +proc g_compute_hmac_for_string*(digestType: ChecksumType; key: uint8Array; keyLen: uint64; + str: cstring; length: int64): cstring {. + importc: "g_compute_hmac_for_string", libprag.} + +proc computeHmacForString*(digestType: ChecksumType; key: uint8Array; keyLen: uint64; + str: string; length: int64): string = + let resul0 = g_compute_hmac_for_string(digestType, key, keyLen, cstring(str), length) + result = $resul0 + cogfree(resul0) + +proc g_convert*(str: cstring; len: int64; toCodeset: cstring; fromCodeset: cstring; + bytesRead: var uint64; bytesWritten: var uint64): cstring {. + importc: "g_convert", libprag.} + +proc convert*(str: string; len: int64; toCodeset: string; fromCodeset: string; + bytesRead: var uint64; bytesWritten: var uint64): string = + let resul0 = g_convert(cstring(str), len, cstring(toCodeset), cstring(fromCodeset), bytesRead, bytesWritten) + result = $resul0 + cogfree(resul0) + +proc g_convert_error_quark*(): uint32 {. + importc: "g_convert_error_quark", libprag.} + +proc convertErrorQuark*(): uint32 {. + importc: "g_convert_error_quark", libprag.} + +proc g_convert_with_fallback*(str: cstring; len: int64; toCodeset: cstring; fromCodeset: cstring; + fallback: cstring; bytesRead: ptr uint64; bytesWritten: ptr uint64): cstring {. + importc: "g_convert_with_fallback", libprag.} + +proc convertWithFallback*(str: string; len: int64; toCodeset: string; fromCodeset: string; + fallback: string; bytesRead: ptr uint64; bytesWritten: ptr uint64): string = + let resul0 = g_convert_with_fallback(cstring(str), len, cstring(toCodeset), cstring(fromCodeset), cstring(fallback), bytesRead, bytesWritten) + result = $resul0 + cogfree(resul0) + +proc g_convert_with_iconv*(str: cstring; len: int64; `converter`: ptr IConv00; + bytesRead: ptr uint64; bytesWritten: ptr uint64): cstring {. + importc: "g_convert_with_iconv", libprag.} + +proc convertWithIconv*(str: string; len: int64; `converter`: IConv; bytesRead: ptr uint64; + bytesWritten: ptr uint64): string = + let resul0 = g_convert_with_iconv(cstring(str), len, cast[ptr IConv00](`converter`.impl), bytesRead, bytesWritten) + result = $resul0 + cogfree(resul0) + +proc g_datalist_clear*(datalist: ptr Data00) {. + importc: "g_datalist_clear", libprag.} + +proc datalistClear*(datalist: Data) = + g_datalist_clear(cast[ptr Data00](datalist.impl)) + +proc g_datalist_get_data*(datalist: ptr Data00; key: cstring): pointer {. + importc: "g_datalist_get_data", libprag.} + +proc datalistGetData*(datalist: Data; key: string): pointer = + g_datalist_get_data(cast[ptr Data00](datalist.impl), cstring(key)) + +proc g_datalist_get_flags*(datalist: ptr Data00): uint32 {. + importc: "g_datalist_get_flags", libprag.} + +proc datalistGetFlags*(datalist: Data): int = + int(g_datalist_get_flags(cast[ptr Data00](datalist.impl))) + +proc g_datalist_id_get_data*(datalist: ptr Data00; keyId: uint32): pointer {. + importc: "g_datalist_id_get_data", libprag.} + +proc datalistIdGetData*(datalist: Data; keyId: int): pointer = + g_datalist_id_get_data(cast[ptr Data00](datalist.impl), uint32(keyId)) + +proc g_datalist_id_remove_no_notify*(datalist: ptr Data00; keyId: uint32): pointer {. + importc: "g_datalist_id_remove_no_notify", libprag.} + +proc datalistIdRemoveNoNotify*(datalist: Data; keyId: int): pointer = + g_datalist_id_remove_no_notify(cast[ptr Data00](datalist.impl), uint32(keyId)) + +proc g_datalist_id_replace_data*(datalist: ptr Data00; keyId: uint32; oldval: pointer; + newval: pointer; destroy: DestroyNotify; oldDestroy: ptr DestroyNotify): gboolean {. + importc: "g_datalist_id_replace_data", libprag.} + +proc datalistIdReplaceData*(datalist: Data; keyId: int; oldval: pointer; newval: pointer; + destroy: DestroyNotify; oldDestroy: ptr DestroyNotify): bool = + toBool(g_datalist_id_replace_data(cast[ptr Data00](datalist.impl), uint32(keyId), oldval, newval, destroy, oldDestroy)) + +proc g_datalist_id_set_data_full*(datalist: ptr Data00; keyId: uint32; data: pointer; + destroyFunc: DestroyNotify) {. + importc: "g_datalist_id_set_data_full", libprag.} + +proc datalistIdSetDataFull*(datalist: Data; keyId: int; data: pointer; destroyFunc: DestroyNotify) = + g_datalist_id_set_data_full(cast[ptr Data00](datalist.impl), uint32(keyId), data, destroyFunc) + +proc g_datalist_init*(datalist: ptr Data00) {. + importc: "g_datalist_init", libprag.} + +proc datalistInit*(datalist: Data) = + g_datalist_init(cast[ptr Data00](datalist.impl)) + +proc g_datalist_set_flags*(datalist: ptr Data00; flags: uint32) {. + importc: "g_datalist_set_flags", libprag.} + +proc datalistSetFlags*(datalist: Data; flags: int) = + g_datalist_set_flags(cast[ptr Data00](datalist.impl), uint32(flags)) + +proc g_datalist_unset_flags*(datalist: ptr Data00; flags: uint32) {. + importc: "g_datalist_unset_flags", libprag.} + +proc datalistUnsetFlags*(datalist: Data; flags: int) = + g_datalist_unset_flags(cast[ptr Data00](datalist.impl), uint32(flags)) + +proc g_dataset_destroy*(datasetLocation: pointer) {. + importc: "g_dataset_destroy", libprag.} + +proc datasetDestroy*(datasetLocation: pointer) {. + importc: "g_dataset_destroy", libprag.} + +proc g_dataset_id_get_data*(datasetLocation: pointer; keyId: uint32): pointer {. + importc: "g_dataset_id_get_data", libprag.} + +proc datasetIdGetData*(datasetLocation: pointer; keyId: uint32): pointer {. + importc: "g_dataset_id_get_data", libprag.} + +proc g_dataset_id_remove_no_notify*(datasetLocation: pointer; keyId: uint32): pointer {. + importc: "g_dataset_id_remove_no_notify", libprag.} + +proc datasetIdRemoveNoNotify*(datasetLocation: pointer; keyId: uint32): pointer {. + importc: "g_dataset_id_remove_no_notify", libprag.} + +proc g_dataset_id_set_data_full*(datasetLocation: pointer; keyId: uint32; data: pointer; + destroyFunc: DestroyNotify) {. + importc: "g_dataset_id_set_data_full", libprag.} + +proc datasetIdSetDataFull*(datasetLocation: pointer; keyId: uint32; data: pointer; + destroyFunc: DestroyNotify) {. + importc: "g_dataset_id_set_data_full", libprag.} + +proc g_dcgettext*(domain: cstring; msgid: cstring; category: int32): cstring {. + importc: "g_dcgettext", libprag.} + +proc dcgettext*(domain: string; msgid: string; category: int): string = + let resul0 = g_dcgettext(cstring(domain), cstring(msgid), int32(category)) + result = $resul0 + +proc g_dgettext*(domain: cstring; msgid: cstring): cstring {. + importc: "g_dgettext", libprag.} + +proc dgettext*(domain: string; msgid: string): string = + let resul0 = g_dgettext(cstring(domain), cstring(msgid)) + result = $resul0 + +proc g_direct_equal*(v1: pointer; v2: pointer): gboolean {. + importc: "g_direct_equal", libprag.} + +proc directEqual*(v1: pointer; v2: pointer): gboolean {. + importc: "g_direct_equal", libprag.} + +proc g_direct_hash*(v: pointer): uint32 {. + importc: "g_direct_hash", libprag.} + +proc directHash*(v: pointer): uint32 {. + importc: "g_direct_hash", libprag.} + +proc g_dngettext*(domain: cstring; msgid: cstring; msgidPlural: cstring; + n: uint64): cstring {. + importc: "g_dngettext", libprag.} + +proc dngettext*(domain: string; msgid: string; msgidPlural: string; + n: uint64): string = + let resul0 = g_dngettext(cstring(domain), cstring(msgid), cstring(msgidPlural), n) + result = $resul0 + +proc g_double_equal*(v1: pointer; v2: pointer): gboolean {. + importc: "g_double_equal", libprag.} + +proc doubleEqual*(v1: pointer; v2: pointer): gboolean {. + importc: "g_double_equal", libprag.} + +proc g_double_hash*(v: pointer): uint32 {. + importc: "g_double_hash", libprag.} + +proc doubleHash*(v: pointer): uint32 {. + importc: "g_double_hash", libprag.} + +proc g_dpgettext*(domain: cstring; msgctxtid: cstring; msgidoffset: uint64): cstring {. + importc: "g_dpgettext", libprag.} + +proc dpgettext*(domain: string; msgctxtid: string; msgidoffset: uint64): string = + let resul0 = g_dpgettext(cstring(domain), cstring(msgctxtid), msgidoffset) + result = $resul0 + +proc g_dpgettext2*(domain: cstring; context: cstring; msgid: cstring): cstring {. + importc: "g_dpgettext2", libprag.} + +proc dpgettext2*(domain: string; context: string; msgid: string): string = + let resul0 = g_dpgettext2(cstring(domain), cstring(context), cstring(msgid)) + result = $resul0 + +proc g_environ_getenv*(envp: cstringArray; variable: cstring): cstring {. + importc: "g_environ_getenv", libprag.} + +proc environGetenv*(envp: cstringArray; variable: string): string = + let resul0 = g_environ_getenv(envp, cstring(variable)) + result = $resul0 + +proc g_environ_setenv*(envp: cstringArray; variable: cstring; value: cstring; + overwrite: gboolean): cstringArray {. + importc: "g_environ_setenv", libprag.} + +proc environSetenv*(envp: cstringArray; variable: cstring; value: cstring; + overwrite: gboolean): cstringArray {. + importc: "g_environ_setenv", libprag.} + +proc g_environ_unsetenv*(envp: cstringArray; variable: cstring): cstringArray {. + importc: "g_environ_unsetenv", libprag.} + +proc environUnsetenv*(envp: cstringArray; variable: cstring): cstringArray {. + importc: "g_environ_unsetenv", libprag.} + +proc g_file_error_from_errno*(errNo: int32): FileError {. + importc: "g_file_error_from_errno", libprag.} + +proc fileErrorFromErrno*(errNo: int32): FileError {. + importc: "g_file_error_from_errno", libprag.} + +proc g_file_error_quark*(): uint32 {. + importc: "g_file_error_quark", libprag.} + +proc fileErrorQuark*(): uint32 {. + importc: "g_file_error_quark", libprag.} + +proc g_file_get_contents*(filename: ucstring; contents: var uint8Array; length: var uint64): gboolean {. + importc: "g_file_get_contents", libprag.} + +proc fileGetContents*(filename: ucstring; contents: var uint8Array; length: var uint64): gboolean {. + importc: "g_file_get_contents", libprag.} + +proc g_file_open_tmp*(tmpl: ucstring; nameUsed: var ucstring): int32 {. + importc: "g_file_open_tmp", libprag.} + +proc fileOpenTmp*(tmpl: ucstring; nameUsed: var ucstring): int32 {. + importc: "g_file_open_tmp", libprag.} + +proc g_file_read_link*(filename: ucstring): ucstring {. + importc: "g_file_read_link", libprag.} + +proc fileReadLink*(filename: ucstring): ucstring {. + importc: "g_file_read_link", libprag.} + +proc g_file_set_contents*(filename: ucstring; contents: uint8Array; length: int64): gboolean {. + importc: "g_file_set_contents", libprag.} + +proc fileSetContents*(filename: ucstring; contents: uint8Array; length: int64): gboolean {. + importc: "g_file_set_contents", libprag.} + +proc g_file_test*(filename: ucstring; test: FileTest): gboolean {. + importc: "g_file_test", libprag.} + +proc fileTest*(filename: ucstring; test: FileTest): gboolean {. + importc: "g_file_test", libprag.} + +proc g_filename_display_basename*(filename: ucstring): cstring {. + importc: "g_filename_display_basename", libprag.} + +proc filenameDisplayBasename*(filename: ucstring): string = + let resul0 = g_filename_display_basename(filename) + result = $resul0 + cogfree(resul0) + +proc g_filename_display_name*(filename: ucstring): cstring {. + importc: "g_filename_display_name", libprag.} + +proc filenameDisplayName*(filename: ucstring): string = + let resul0 = g_filename_display_name(filename) + result = $resul0 + cogfree(resul0) + +proc g_filename_from_uri*(uri: cstring; hostname: var cstring): ucstring {. + importc: "g_filename_from_uri", libprag.} + +proc filenameFromUri*(uri: cstring; hostname: var cstring): ucstring {. + importc: "g_filename_from_uri", libprag.} + +proc g_filename_from_utf8*(utf8string: cstring; len: int64; bytesRead: var uint64; + bytesWritten: var uint64): uint8Array {. + importc: "g_filename_from_utf8", libprag.} + +proc filenameFromUtf8*(utf8string: cstring; len: int64; bytesRead: var uint64; + bytesWritten: var uint64): uint8Array {. + importc: "g_filename_from_utf8", libprag.} + +proc g_filename_to_uri*(filename: ucstring; hostname: cstring): cstring {. + importc: "g_filename_to_uri", libprag.} + +proc filenameToUri*(filename: ucstring; hostname: string): string = + let resul0 = g_filename_to_uri(filename, cstring(hostname)) + result = $resul0 + cogfree(resul0) + +proc g_filename_to_utf8*(opsysstring: ucstring; len: int64; bytesRead: var uint64; + bytesWritten: var uint64): cstring {. + importc: "g_filename_to_utf8", libprag.} + +proc filenameToUtf8*(opsysstring: ucstring; len: int64; bytesRead: var uint64; + bytesWritten: var uint64): string = + let resul0 = g_filename_to_utf8(opsysstring, len, bytesRead, bytesWritten) + result = $resul0 + cogfree(resul0) + +proc g_find_program_in_path*(program: ucstring): ucstring {. + importc: "g_find_program_in_path", libprag.} + +proc findProgramInPath*(program: ucstring): ucstring {. + importc: "g_find_program_in_path", libprag.} + +proc g_format_size*(size: uint64): cstring {. + importc: "g_format_size", libprag.} + +proc formatSize*(size: uint64): string = + let resul0 = g_format_size(size) + result = $resul0 + cogfree(resul0) + +proc g_format_size_for_display*(size: int64): cstring {. + importc: "g_format_size_for_display", libprag.} + +proc formatSizeForDisplay*(size: int64): string = + let resul0 = g_format_size_for_display(size) + result = $resul0 + cogfree(resul0) + +proc g_format_size_full*(size: uint64; flags: FormatSizeFlags): cstring {. + importc: "g_format_size_full", libprag.} + +proc formatSizeFull*(size: uint64; flags: FormatSizeFlags): string = + let resul0 = g_format_size_full(size, flags) + result = $resul0 + cogfree(resul0) + +proc g_free*(mem: pointer) {. + importc: "g_free", libprag.} + +proc free*(mem: pointer) {. + importc: "g_free", libprag.} + +proc g_get_application_name*(): cstring {. + importc: "g_get_application_name", libprag.} + +proc getApplicationName*(): string = + let resul0 = g_get_application_name() + result = $resul0 + +proc applicationName*(): string = + let resul0 = g_get_application_name() + result = $resul0 + +proc g_get_charset*(charset: var cstring): gboolean {. + importc: "g_get_charset", libprag.} + +proc getCharset*(charset: var cstring): gboolean {. + importc: "g_get_charset", libprag.} + +proc charset*(charset: var cstring): gboolean {. + importc: "g_get_charset", libprag.} + +proc g_get_codeset*(): cstring {. + importc: "g_get_codeset", libprag.} + +proc getCodeset*(): string = + let resul0 = g_get_codeset() + result = $resul0 + cogfree(resul0) + +proc codeset*(): string = + let resul0 = g_get_codeset() + result = $resul0 + cogfree(resul0) + +proc g_get_current_dir*(): ucstring {. + importc: "g_get_current_dir", libprag.} + +proc getCurrentDir*(): ucstring {. + importc: "g_get_current_dir", libprag.} + +proc currentDir*(): ucstring {. + importc: "g_get_current_dir", libprag.} + +proc g_get_current_time*(resu: ptr TimeVal00) {. + importc: "g_get_current_time", libprag.} + +proc getCurrentTime*(resu: TimeVal) = + g_get_current_time(cast[ptr TimeVal00](resu.impl)) + +proc currentTime*(resu: TimeVal) = + g_get_current_time(cast[ptr TimeVal00](resu.impl)) + +proc g_get_environ*(): cstringArray {. + importc: "g_get_environ", libprag.} + +proc getEnviron*(): cstringArray {. + importc: "g_get_environ", libprag.} + +proc environ*(): cstringArray {. + importc: "g_get_environ", libprag.} + +proc g_get_filename_charsets*(charsets: cstring): gboolean {. + importc: "g_get_filename_charsets", libprag.} + +proc getFilenameCharsets*(charsets: cstring): gboolean {. + importc: "g_get_filename_charsets", libprag.} + +proc filenameCharsets*(charsets: cstring): gboolean {. + importc: "g_get_filename_charsets", libprag.} + +proc g_get_home_dir*(): ucstring {. + importc: "g_get_home_dir", libprag.} + +proc getHomeDir*(): ucstring {. + importc: "g_get_home_dir", libprag.} + +proc homeDir*(): ucstring {. + importc: "g_get_home_dir", libprag.} + +proc g_get_host_name*(): cstring {. + importc: "g_get_host_name", libprag.} + +proc getHostName*(): string = + let resul0 = g_get_host_name() + result = $resul0 + +proc hostName*(): string = + let resul0 = g_get_host_name() + result = $resul0 + +proc g_get_language_names*(): cstringArray {. + importc: "g_get_language_names", libprag.} + +proc getLanguageNames*(): cstringArray {. + importc: "g_get_language_names", libprag.} + +proc languageNames*(): cstringArray {. + importc: "g_get_language_names", libprag.} + +proc g_get_locale_variants*(locale: cstring): cstringArray {. + importc: "g_get_locale_variants", libprag.} + +proc getLocaleVariants*(locale: cstring): cstringArray {. + importc: "g_get_locale_variants", libprag.} + +proc localeVariants*(locale: cstring): cstringArray {. + importc: "g_get_locale_variants", libprag.} + +proc g_get_monotonic_time*(): int64 {. + importc: "g_get_monotonic_time", libprag.} + +proc getMonotonicTime*(): int64 {. + importc: "g_get_monotonic_time", libprag.} + +proc monotonicTime*(): int64 {. + importc: "g_get_monotonic_time", libprag.} + +proc g_get_num_processors*(): uint32 {. + importc: "g_get_num_processors", libprag.} + +proc getNumProcessors*(): uint32 {. + importc: "g_get_num_processors", libprag.} + +proc numProcessors*(): uint32 {. + importc: "g_get_num_processors", libprag.} + +proc g_get_prgname*(): cstring {. + importc: "g_get_prgname", libprag.} + +proc getPrgname*(): string = + let resul0 = g_get_prgname() + result = $resul0 + +proc prgname*(): string = + let resul0 = g_get_prgname() + result = $resul0 + +proc g_get_real_name*(): ucstring {. + importc: "g_get_real_name", libprag.} + +proc getRealName*(): ucstring {. + importc: "g_get_real_name", libprag.} + +proc realName*(): ucstring {. + importc: "g_get_real_name", libprag.} + +proc g_get_real_time*(): int64 {. + importc: "g_get_real_time", libprag.} + +proc getRealTime*(): int64 {. + importc: "g_get_real_time", libprag.} + +proc realTime*(): int64 {. + importc: "g_get_real_time", libprag.} + +proc g_get_system_config_dirs*(): ucstringArray {. + importc: "g_get_system_config_dirs", libprag.} + +proc getSystemConfigDirs*(): ucstringArray {. + importc: "g_get_system_config_dirs", libprag.} + +proc systemConfigDirs*(): ucstringArray {. + importc: "g_get_system_config_dirs", libprag.} + +proc g_get_system_data_dirs*(): ucstringArray {. + importc: "g_get_system_data_dirs", libprag.} + +proc getSystemDataDirs*(): ucstringArray {. + importc: "g_get_system_data_dirs", libprag.} + +proc systemDataDirs*(): ucstringArray {. + importc: "g_get_system_data_dirs", libprag.} + +proc g_get_tmp_dir*(): ucstring {. + importc: "g_get_tmp_dir", libprag.} + +proc getTmpDir*(): ucstring {. + importc: "g_get_tmp_dir", libprag.} + +proc tmpDir*(): ucstring {. + importc: "g_get_tmp_dir", libprag.} + +proc g_get_user_cache_dir*(): ucstring {. + importc: "g_get_user_cache_dir", libprag.} + +proc getUserCacheDir*(): ucstring {. + importc: "g_get_user_cache_dir", libprag.} + +proc userCacheDir*(): ucstring {. + importc: "g_get_user_cache_dir", libprag.} + +proc g_get_user_config_dir*(): ucstring {. + importc: "g_get_user_config_dir", libprag.} + +proc getUserConfigDir*(): ucstring {. + importc: "g_get_user_config_dir", libprag.} + +proc userConfigDir*(): ucstring {. + importc: "g_get_user_config_dir", libprag.} + +proc g_get_user_data_dir*(): ucstring {. + importc: "g_get_user_data_dir", libprag.} + +proc getUserDataDir*(): ucstring {. + importc: "g_get_user_data_dir", libprag.} + +proc userDataDir*(): ucstring {. + importc: "g_get_user_data_dir", libprag.} + +proc g_get_user_name*(): ucstring {. + importc: "g_get_user_name", libprag.} + +proc getUserName*(): ucstring {. + importc: "g_get_user_name", libprag.} + +proc userName*(): ucstring {. + importc: "g_get_user_name", libprag.} + +proc g_get_user_runtime_dir*(): ucstring {. + importc: "g_get_user_runtime_dir", libprag.} + +proc getUserRuntimeDir*(): ucstring {. + importc: "g_get_user_runtime_dir", libprag.} + +proc userRuntimeDir*(): ucstring {. + importc: "g_get_user_runtime_dir", libprag.} + +proc g_get_user_special_dir*(directory: UserDirectory): ucstring {. + importc: "g_get_user_special_dir", libprag.} + +proc getUserSpecialDir*(directory: UserDirectory): ucstring {. + importc: "g_get_user_special_dir", libprag.} + +proc userSpecialDir*(directory: UserDirectory): ucstring {. + importc: "g_get_user_special_dir", libprag.} + +proc g_getenv*(variable: cstring): cstring {. + importc: "g_getenv", libprag.} + +proc getenv*(variable: string): string = + let resul0 = g_getenv(cstring(variable)) + result = $resul0 + +proc env*(variable: string): string = + let resul0 = g_getenv(cstring(variable)) + result = $resul0 + +proc g_hostname_is_ascii_encoded*(hostname: cstring): gboolean {. + importc: "g_hostname_is_ascii_encoded", libprag.} + +proc hostnameIsAsciiEncoded*(hostname: cstring): gboolean {. + importc: "g_hostname_is_ascii_encoded", libprag.} + +proc g_hostname_is_ip_address*(hostname: cstring): gboolean {. + importc: "g_hostname_is_ip_address", libprag.} + +proc hostnameIsIpAddress*(hostname: cstring): gboolean {. + importc: "g_hostname_is_ip_address", libprag.} + +proc g_hostname_is_non_ascii*(hostname: cstring): gboolean {. + importc: "g_hostname_is_non_ascii", libprag.} + +proc hostnameIsNonAscii*(hostname: cstring): gboolean {. + importc: "g_hostname_is_non_ascii", libprag.} + +proc g_hostname_to_ascii*(hostname: cstring): cstring {. + importc: "g_hostname_to_ascii", libprag.} + +proc hostnameToAscii*(hostname: string): string = + let resul0 = g_hostname_to_ascii(cstring(hostname)) + result = $resul0 + cogfree(resul0) + +proc g_hostname_to_unicode*(hostname: cstring): cstring {. + importc: "g_hostname_to_unicode", libprag.} + +proc hostnameToUnicode*(hostname: string): string = + let resul0 = g_hostname_to_unicode(cstring(hostname)) + result = $resul0 + cogfree(resul0) + +proc g_idle_add_full*(priority: int32; function: SourceFunc; data: pointer; + notify: DestroyNotify): uint32 {. + importc: "g_idle_add_full", libprag.} + +proc idleAdd*(priority: int32; function: SourceFunc; data: pointer; + notify: DestroyNotify): uint32 {. + importc: "g_idle_add_full", libprag.} + +proc g_idle_remove_by_data*(data: pointer): gboolean {. + importc: "g_idle_remove_by_data", libprag.} + +proc idleRemoveByData*(data: pointer): gboolean {. + importc: "g_idle_remove_by_data", libprag.} + +proc g_idle_source_new*(): ptr Source00 {. + importc: "g_idle_source_new", libprag.} + +proc idleSourceNew*(): Source = + new(result) + result.impl = g_idle_source_new() + +proc g_int64_equal*(v1: pointer; v2: pointer): gboolean {. + importc: "g_int64_equal", libprag.} + +proc int64Equal*(v1: pointer; v2: pointer): gboolean {. + importc: "g_int64_equal", libprag.} + +proc g_int64_hash*(v: pointer): uint32 {. + importc: "g_int64_hash", libprag.} + +proc int64Hash*(v: pointer): uint32 {. + importc: "g_int64_hash", libprag.} + +proc g_int_equal*(v1: pointer; v2: pointer): gboolean {. + importc: "g_int_equal", libprag.} + +proc intEqual*(v1: pointer; v2: pointer): gboolean {. + importc: "g_int_equal", libprag.} + +proc g_int_hash*(v: pointer): uint32 {. + importc: "g_int_hash", libprag.} + +proc intHash*(v: pointer): uint32 {. + importc: "g_int_hash", libprag.} + +proc g_intern_static_string*(string: cstring): cstring {. + importc: "g_intern_static_string", libprag.} + +proc internStaticString*(string: string): string = + let resul0 = g_intern_static_string(cstring(string)) + result = $resul0 + +proc g_intern_string*(string: cstring): cstring {. + importc: "g_intern_string", libprag.} + +proc internString*(string: string): string = + let resul0 = g_intern_string(cstring(string)) + result = $resul0 + +proc g_io_add_watch_full*(channel: ptr IOChannel00; priority: int32; condition: IOCondition; + `func`: IOFunc; userData: pointer; notify: DestroyNotify): uint32 {. + importc: "g_io_add_watch_full", libprag.} + +proc ioAddWatch*(channel: IOChannel; priority: int; condition: IOCondition; + `func`: IOFunc; userData: pointer; notify: DestroyNotify): int = + int(g_io_add_watch_full(cast[ptr IOChannel00](channel.impl), int32(priority), condition, `func`, userData, notify)) + +proc g_io_create_watch*(channel: ptr IOChannel00; condition: IOCondition): ptr Source00 {. + importc: "g_io_create_watch", libprag.} + +proc ioCreateWatch*(channel: IOChannel; condition: IOCondition): Source = + new(result) + result.impl = g_io_create_watch(cast[ptr IOChannel00](channel.impl), condition) + +proc g_listenv*(): cstringArray {. + importc: "g_listenv", libprag.} + +proc listenv*(): cstringArray {. + importc: "g_listenv", libprag.} + +proc g_locale_from_utf8*(utf8string: cstring; len: int64; bytesRead: var uint64; + bytesWritten: var uint64): cstring {. + importc: "g_locale_from_utf8", libprag.} + +proc localeFromUtf8*(utf8string: string; len: int64; bytesRead: var uint64; + bytesWritten: var uint64): string = + let resul0 = g_locale_from_utf8(cstring(utf8string), len, bytesRead, bytesWritten) + result = $resul0 + cogfree(resul0) + +proc g_locale_to_utf8*(opsysstring: cstring; len: int64; bytesRead: var uint64; + bytesWritten: var uint64): cstring {. + importc: "g_locale_to_utf8", libprag.} + +proc localeToUtf8*(opsysstring: string; len: int64; bytesRead: var uint64; + bytesWritten: var uint64): string = + let resul0 = g_locale_to_utf8(cstring(opsysstring), len, bytesRead, bytesWritten) + result = $resul0 + cogfree(resul0) + +proc g_log_default_handler*(logDomain: cstring; logLevel: LogLevelFlags; message: cstring; + unusedData: pointer) {. + importc: "g_log_default_handler", libprag.} + +proc logDefaultHandler*(logDomain: cstring; logLevel: LogLevelFlags; message: cstring; + unusedData: pointer) {. + importc: "g_log_default_handler", libprag.} + +proc g_log_remove_handler*(logDomain: cstring; handlerId: uint32) {. + importc: "g_log_remove_handler", libprag.} + +proc logRemoveHandler*(logDomain: cstring; handlerId: uint32) {. + importc: "g_log_remove_handler", libprag.} + +proc g_log_set_always_fatal*(fatalMask: LogLevelFlags): LogLevelFlags {. + importc: "g_log_set_always_fatal", libprag.} + +proc logSetAlwaysFatal*(fatalMask: LogLevelFlags): LogLevelFlags {. + importc: "g_log_set_always_fatal", libprag.} + +proc g_log_set_fatal_mask*(logDomain: cstring; fatalMask: LogLevelFlags): LogLevelFlags {. + importc: "g_log_set_fatal_mask", libprag.} + +proc logSetFatalMask*(logDomain: cstring; fatalMask: LogLevelFlags): LogLevelFlags {. + importc: "g_log_set_fatal_mask", libprag.} + +proc g_log_set_handler_full*(logDomain: cstring; logLevels: LogLevelFlags; logFunc: LogFunc; + userData: pointer; destroy: DestroyNotify): uint32 {. + importc: "g_log_set_handler_full", libprag.} + +proc logSetHandler*(logDomain: cstring; logLevels: LogLevelFlags; logFunc: LogFunc; + userData: pointer; destroy: DestroyNotify): uint32 {. + importc: "g_log_set_handler_full", libprag.} + +proc g_log_set_writer_func*(`func`: LogWriterFunc; userData: pointer; userDataFree: DestroyNotify) {. + importc: "g_log_set_writer_func", libprag.} + +proc logSetWriterFunc*(`func`: LogWriterFunc; userData: pointer; userDataFree: DestroyNotify) {. + importc: "g_log_set_writer_func", libprag.} + +proc g_log_structured_array*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64) {. + importc: "g_log_structured_array", libprag.} + +proc logStructuredArray*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64) {. + importc: "g_log_structured_array", libprag.} + +proc g_log_variant*(logDomain: cstring; logLevel: LogLevelFlags; fields: ptr Variant00) {. + importc: "g_log_variant", libprag.} + +proc logVariant*(logDomain: string; logLevel: LogLevelFlags; fields: Variant) = + g_log_variant(cstring(logDomain), logLevel, cast[ptr Variant00](fields.impl)) + +proc g_log_writer_default*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64; userData: pointer): LogWriterOutput {. + importc: "g_log_writer_default", libprag.} + +proc logWriterDefault*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64; userData: pointer): LogWriterOutput {. + importc: "g_log_writer_default", libprag.} + +proc g_log_writer_format_fields*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64; useColor: gboolean): cstring {. + importc: "g_log_writer_format_fields", libprag.} + +proc logWriterFormatFields*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64; useColor: bool): string = + let resul0 = g_log_writer_format_fields(logLevel, fields, nFields, gboolean(useColor)) + result = $resul0 + cogfree(resul0) + +proc g_log_writer_is_journald*(outputFd: int32): gboolean {. + importc: "g_log_writer_is_journald", libprag.} + +proc logWriterIsJournald*(outputFd: int32): gboolean {. + importc: "g_log_writer_is_journald", libprag.} + +proc g_log_writer_journald*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64; userData: pointer): LogWriterOutput {. + importc: "g_log_writer_journald", libprag.} + +proc logWriterJournald*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64; userData: pointer): LogWriterOutput {. + importc: "g_log_writer_journald", libprag.} + +proc g_log_writer_standard_streams*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64; userData: pointer): LogWriterOutput {. + importc: "g_log_writer_standard_streams", libprag.} + +proc logWriterStandardStreams*(logLevel: LogLevelFlags; fields: LogField00Array; + nFields: uint64; userData: pointer): LogWriterOutput {. + importc: "g_log_writer_standard_streams", libprag.} + +proc g_log_writer_supports_color*(outputFd: int32): gboolean {. + importc: "g_log_writer_supports_color", libprag.} + +proc logWriterSupportsColor*(outputFd: int32): gboolean {. + importc: "g_log_writer_supports_color", libprag.} + +proc g_main_current_source*(): ptr Source00 {. + importc: "g_main_current_source", libprag.} + +proc mainCurrentSource*(): Source = + new(result) + result.impl = g_main_current_source() + +proc g_main_depth*(): int32 {. + importc: "g_main_depth", libprag.} + +proc mainDepth*(): int32 {. + importc: "g_main_depth", libprag.} + +proc g_malloc*(nBytes: uint64): pointer {. + importc: "g_malloc", libprag.} + +proc malloc*(nBytes: uint64): pointer {. + importc: "g_malloc", libprag.} + +proc g_malloc0*(nBytes: uint64): pointer {. + importc: "g_malloc0", libprag.} + +proc malloc0*(nBytes: uint64): pointer {. + importc: "g_malloc0", libprag.} + +proc g_malloc0_n*(nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_malloc0_n", libprag.} + +proc malloc0N*(nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_malloc0_n", libprag.} + +proc g_malloc_n*(nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_malloc_n", libprag.} + +proc mallocN*(nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_malloc_n", libprag.} + +proc g_markup_error_quark*(): uint32 {. + importc: "g_markup_error_quark", libprag.} + +proc markupErrorQuark*(): uint32 {. + importc: "g_markup_error_quark", libprag.} + +proc g_markup_escape_text*(text: cstring; length: int64): cstring {. + importc: "g_markup_escape_text", libprag.} + +proc markupEscapeText*(text: string; length: int64): string = + let resul0 = g_markup_escape_text(cstring(text), length) + result = $resul0 + cogfree(resul0) + +proc g_mem_is_system_malloc*(): gboolean {. + importc: "g_mem_is_system_malloc", libprag.} + +proc memIsSystemMalloc*(): gboolean {. + importc: "g_mem_is_system_malloc", libprag.} + +proc g_mem_profile*() {. + importc: "g_mem_profile", libprag.} + +proc memProfile*() {. + importc: "g_mem_profile", libprag.} + +proc g_mem_set_vtable*(vtable: ptr MemVTable00) {. + importc: "g_mem_set_vtable", libprag.} + +proc memSetVtable*(vtable: MemVTable) = + g_mem_set_vtable(cast[ptr MemVTable00](vtable.impl)) + +proc g_memdup*(mem: pointer; byteSize: uint32): pointer {. + importc: "g_memdup", libprag.} + +proc memdup*(mem: pointer; byteSize: uint32): pointer {. + importc: "g_memdup", libprag.} + +proc g_mkdir_with_parents*(pathname: ucstring; mode: int32): int32 {. + importc: "g_mkdir_with_parents", libprag.} + +proc mkdirWithParents*(pathname: ucstring; mode: int32): int32 {. + importc: "g_mkdir_with_parents", libprag.} + +proc g_mkdtemp*(tmpl: ucstring): ucstring {. + importc: "g_mkdtemp", libprag.} + +proc mkdtemp*(tmpl: ucstring): ucstring {. + importc: "g_mkdtemp", libprag.} + +proc g_mkdtemp_full*(tmpl: ucstring; mode: int32): ucstring {. + importc: "g_mkdtemp_full", libprag.} + +proc mkdtempFull*(tmpl: ucstring; mode: int32): ucstring {. + importc: "g_mkdtemp_full", libprag.} + +proc g_mkstemp*(tmpl: ucstring): int32 {. + importc: "g_mkstemp", libprag.} + +proc mkstemp*(tmpl: ucstring): int32 {. + importc: "g_mkstemp", libprag.} + +proc g_mkstemp_full*(tmpl: ucstring; flags: int32; mode: int32): int32 {. + importc: "g_mkstemp_full", libprag.} + +proc mkstempFull*(tmpl: ucstring; flags: int32; mode: int32): int32 {. + importc: "g_mkstemp_full", libprag.} + +proc g_nullify_pointer*(nullifyLocation: pointer) {. + importc: "g_nullify_pointer", libprag.} + +proc nullifyPointer*(nullifyLocation: pointer) {. + importc: "g_nullify_pointer", libprag.} + +proc g_on_error_query*(prgName: cstring) {. + importc: "g_on_error_query", libprag.} + +proc onErrorQuery*(prgName: cstring) {. + importc: "g_on_error_query", libprag.} + +proc g_on_error_stack_trace*(prgName: cstring) {. + importc: "g_on_error_stack_trace", libprag.} + +proc onErrorStackTrace*(prgName: cstring) {. + importc: "g_on_error_stack_trace", libprag.} + +proc g_option_error_quark*(): uint32 {. + importc: "g_option_error_quark", libprag.} + +proc optionErrorQuark*(): uint32 {. + importc: "g_option_error_quark", libprag.} + +proc g_parse_debug_string*(string: cstring; keys: DebugKey00Array; nkeys: uint32): uint32 {. + importc: "g_parse_debug_string", libprag.} + +proc parseDebugString*(string: cstring; keys: DebugKey00Array; nkeys: uint32): uint32 {. + importc: "g_parse_debug_string", libprag.} + +proc g_path_get_basename*(fileName: ucstring): ucstring {. + importc: "g_path_get_basename", libprag.} + +proc pathGetBasename*(fileName: ucstring): ucstring {. + importc: "g_path_get_basename", libprag.} + +proc g_path_get_dirname*(fileName: ucstring): ucstring {. + importc: "g_path_get_dirname", libprag.} + +proc pathGetDirname*(fileName: ucstring): ucstring {. + importc: "g_path_get_dirname", libprag.} + +proc g_path_is_absolute*(fileName: ucstring): gboolean {. + importc: "g_path_is_absolute", libprag.} + +proc pathIsAbsolute*(fileName: ucstring): gboolean {. + importc: "g_path_is_absolute", libprag.} + +proc g_path_skip_root*(fileName: ucstring): ucstring {. + importc: "g_path_skip_root", libprag.} + +proc pathSkipRoot*(fileName: ucstring): ucstring {. + importc: "g_path_skip_root", libprag.} + +proc g_pattern_match*(pspec: ptr PatternSpec00; stringLength: uint32; string: cstring; + stringReversed: cstring): gboolean {. + importc: "g_pattern_match", libprag.} + +proc patternMatch*(pspec: PatternSpec; stringLength: int; string: string; + stringReversed: string): bool = + toBool(g_pattern_match(cast[ptr PatternSpec00](pspec.impl), uint32(stringLength), cstring(string), cstring(stringReversed))) + +proc g_pattern_match_simple*(pattern: cstring; string: cstring): gboolean {. + importc: "g_pattern_match_simple", libprag.} + +proc patternMatchSimple*(pattern: cstring; string: cstring): gboolean {. + importc: "g_pattern_match_simple", libprag.} + +proc g_pattern_match_string*(pspec: ptr PatternSpec00; string: cstring): gboolean {. + importc: "g_pattern_match_string", libprag.} + +proc patternMatchString*(pspec: PatternSpec; string: string): bool = + toBool(g_pattern_match_string(cast[ptr PatternSpec00](pspec.impl), cstring(string))) + +proc g_pointer_bit_lock*(address: pointer; lockBit: int32) {. + importc: "g_pointer_bit_lock", libprag.} + +proc pointerBitLock*(address: pointer; lockBit: int32) {. + importc: "g_pointer_bit_lock", libprag.} + +proc g_pointer_bit_trylock*(address: pointer; lockBit: int32): gboolean {. + importc: "g_pointer_bit_trylock", libprag.} + +proc pointerBitTrylock*(address: pointer; lockBit: int32): gboolean {. + importc: "g_pointer_bit_trylock", libprag.} + +proc g_pointer_bit_unlock*(address: pointer; lockBit: int32) {. + importc: "g_pointer_bit_unlock", libprag.} + +proc pointerBitUnlock*(address: pointer; lockBit: int32) {. + importc: "g_pointer_bit_unlock", libprag.} + +proc g_poll*(fds: ptr PollFD00; nfds: uint32; timeout: int32): int32 {. + importc: "g_poll", libprag.} + +proc poll*(fds: PollFD; nfds: int; timeout: int): int = + int(g_poll(cast[ptr PollFD00](fds.impl), uint32(nfds), int32(timeout))) + +proc g_propagate_error*(dest: var ptr Error00; src: ptr Error00) {. + importc: "g_propagate_error", libprag.} + +proc propagateError*(dest: var ptr Error00; src: ptr Error00) {. + importc: "g_propagate_error", libprag.} + +proc g_quark_from_static_string*(string: cstring): uint32 {. + importc: "g_quark_from_static_string", libprag.} + +proc quarkFromStaticString*(string: cstring): uint32 {. + importc: "g_quark_from_static_string", libprag.} + +proc g_quark_from_string*(string: cstring): uint32 {. + importc: "g_quark_from_string", libprag.} + +proc quarkFromString*(string: cstring): uint32 {. + importc: "g_quark_from_string", libprag.} + +proc g_quark_to_string*(quark: uint32): cstring {. + importc: "g_quark_to_string", libprag.} + +proc quarkToString*(quark: int): string = + let resul0 = g_quark_to_string(uint32(quark)) + result = $resul0 + +proc g_quark_try_string*(string: cstring): uint32 {. + importc: "g_quark_try_string", libprag.} + +proc quarkTryString*(string: cstring): uint32 {. + importc: "g_quark_try_string", libprag.} + +proc g_random_double*(): cdouble {. + importc: "g_random_double", libprag.} + +proc randomDouble*(): cdouble {. + importc: "g_random_double", libprag.} + +proc g_random_double_range*(begin: cdouble; `end`: cdouble): cdouble {. + importc: "g_random_double_range", libprag.} + +proc randomDoubleRange*(begin: cdouble; `end`: cdouble): cdouble {. + importc: "g_random_double_range", libprag.} + +proc g_random_int*(): uint32 {. + importc: "g_random_int", libprag.} + +proc randomInt*(): uint32 {. + importc: "g_random_int", libprag.} + +proc g_random_int_range*(begin: int32; `end`: int32): int32 {. + importc: "g_random_int_range", libprag.} + +proc randomIntRange*(begin: int32; `end`: int32): int32 {. + importc: "g_random_int_range", libprag.} + +proc g_random_set_seed*(seed: uint32) {. + importc: "g_random_set_seed", libprag.} + +proc randomSetSeed*(seed: uint32) {. + importc: "g_random_set_seed", libprag.} + +proc g_realloc*(mem: pointer; nBytes: uint64): pointer {. + importc: "g_realloc", libprag.} + +proc realloc*(mem: pointer; nBytes: uint64): pointer {. + importc: "g_realloc", libprag.} + +proc g_realloc_n*(mem: pointer; nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_realloc_n", libprag.} + +proc reallocN*(mem: pointer; nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_realloc_n", libprag.} + +proc g_reload_user_special_dirs_cache*() {. + importc: "g_reload_user_special_dirs_cache", libprag.} + +proc reloadUserSpecialDirsCache*() {. + importc: "g_reload_user_special_dirs_cache", libprag.} + +proc g_rmdir*(filename: ucstring): int32 {. + importc: "g_rmdir", libprag.} + +proc rmdir*(filename: ucstring): int32 {. + importc: "g_rmdir", libprag.} + +proc g_set_application_name*(applicationName: cstring) {. + importc: "g_set_application_name", libprag.} + +proc setApplicationName*(applicationName: cstring) {. + importc: "g_set_application_name", libprag.} + +proc `applicationName=`*(applicationName: cstring) {. + importc: "g_set_application_name", libprag.} + +proc g_set_error_literal*(err: var ptr Error00; domain: uint32; code: int32; + message: cstring) {. + importc: "g_set_error_literal", libprag.} + +proc setErrorLiteral*(err: var ptr Error00; domain: uint32; code: int32; + message: cstring) {. + importc: "g_set_error_literal", libprag.} + +proc g_set_prgname*(prgname: cstring) {. + importc: "g_set_prgname", libprag.} + +proc setPrgname*(prgname: cstring) {. + importc: "g_set_prgname", libprag.} + +proc `prgname=`*(prgname: cstring) {. + importc: "g_set_prgname", libprag.} + +proc g_setenv*(variable: cstring; value: cstring; overwrite: gboolean): gboolean {. + importc: "g_setenv", libprag.} + +proc setenv*(variable: cstring; value: cstring; overwrite: gboolean): gboolean {. + importc: "g_setenv", libprag.} + +proc g_shell_error_quark*(): uint32 {. + importc: "g_shell_error_quark", libprag.} + +proc shellErrorQuark*(): uint32 {. + importc: "g_shell_error_quark", libprag.} + +proc g_shell_parse_argv*(commandLine: cstring; argcp: var int32; argvp: var cstringArray): gboolean {. + importc: "g_shell_parse_argv", libprag.} + +proc shellParseArgv*(commandLine: cstring; argcp: var int32; argvp: var cstringArray): gboolean {. + importc: "g_shell_parse_argv", libprag.} + +proc g_shell_quote*(unquotedString: cstring): cstring {. + importc: "g_shell_quote", libprag.} + +proc shellQuote*(unquotedString: string): string = + let resul0 = g_shell_quote(cstring(unquotedString)) + result = $resul0 + cogfree(resul0) + +proc g_shell_unquote*(quotedString: cstring): cstring {. + importc: "g_shell_unquote", libprag.} + +proc shellUnquote*(quotedString: string): string = + let resul0 = g_shell_unquote(cstring(quotedString)) + result = $resul0 + cogfree(resul0) + +proc g_slice_alloc*(blockSize: uint64): pointer {. + importc: "g_slice_alloc", libprag.} + +proc sliceAlloc*(blockSize: uint64): pointer {. + importc: "g_slice_alloc", libprag.} + +proc g_slice_alloc0*(blockSize: uint64): pointer {. + importc: "g_slice_alloc0", libprag.} + +proc sliceAlloc0*(blockSize: uint64): pointer {. + importc: "g_slice_alloc0", libprag.} + +proc g_slice_copy*(blockSize: uint64; memBlock: pointer): pointer {. + importc: "g_slice_copy", libprag.} + +proc sliceCopy*(blockSize: uint64; memBlock: pointer): pointer {. + importc: "g_slice_copy", libprag.} + +proc g_slice_free1*(blockSize: uint64; memBlock: pointer) {. + importc: "g_slice_free1", libprag.} + +proc sliceFree1*(blockSize: uint64; memBlock: pointer) {. + importc: "g_slice_free1", libprag.} + +proc g_slice_free_chain_with_offset*(blockSize: uint64; memChain: pointer; nextOffset: uint64) {. + importc: "g_slice_free_chain_with_offset", libprag.} + +proc sliceFreeChainWithOffset*(blockSize: uint64; memChain: pointer; nextOffset: uint64) {. + importc: "g_slice_free_chain_with_offset", libprag.} + +proc g_slice_get_config*(ckey: SliceConfig): int64 {. + importc: "g_slice_get_config", libprag.} + +proc sliceGetConfig*(ckey: SliceConfig): int64 {. + importc: "g_slice_get_config", libprag.} + +proc g_slice_get_config_state*(ckey: SliceConfig; address: int64; nValues: ptr uint32): ptr int64 {. + importc: "g_slice_get_config_state", libprag.} + +proc sliceGetConfigState*(ckey: SliceConfig; address: int64; nValues: ptr uint32): ptr int64 {. + importc: "g_slice_get_config_state", libprag.} + +proc g_slice_set_config*(ckey: SliceConfig; value: int64) {. + importc: "g_slice_set_config", libprag.} + +proc sliceSetConfig*(ckey: SliceConfig; value: int64) {. + importc: "g_slice_set_config", libprag.} + +proc g_spaced_primes_closest*(num: uint32): uint32 {. + importc: "g_spaced_primes_closest", libprag.} + +proc spacedPrimesClosest*(num: uint32): uint32 {. + importc: "g_spaced_primes_closest", libprag.} + +proc g_spawn_async*(workingDirectory: ucstring; argv: cstringArray; envp: cstringArray; + flags: SpawnFlags; childSetup: SpawnChildSetupFunc; userData: pointer; childPid: var int32): gboolean {. + importc: "g_spawn_async", libprag.} + +proc spawnAsync*(workingDirectory: ucstring; argv: cstringArray; envp: cstringArray; + flags: SpawnFlags; childSetup: SpawnChildSetupFunc; userData: pointer; childPid: var int32): gboolean {. + importc: "g_spawn_async", libprag.} + +proc g_spawn_async_with_pipes*(workingDirectory: ucstring; argv: cstringArray; envp: cstringArray; + flags: SpawnFlags; childSetup: SpawnChildSetupFunc; userData: pointer; childPid: var int32; + standardInput: var int32; standardOutput: var int32; standardError: var int32): gboolean {. + importc: "g_spawn_async_with_pipes", libprag.} + +proc spawnAsyncWithPipes*(workingDirectory: ucstring; argv: cstringArray; envp: cstringArray; + flags: SpawnFlags; childSetup: SpawnChildSetupFunc; userData: pointer; childPid: var int32; + standardInput: var int32; standardOutput: var int32; standardError: var int32): gboolean {. + importc: "g_spawn_async_with_pipes", libprag.} + +proc g_spawn_check_exit_status*(exitStatus: int32): gboolean {. + importc: "g_spawn_check_exit_status", libprag.} + +proc spawnCheckExitStatus*(exitStatus: int32): gboolean {. + importc: "g_spawn_check_exit_status", libprag.} + +proc g_spawn_close_pid*(pid: int32) {. + importc: "g_spawn_close_pid", libprag.} + +proc spawnClosePid*(pid: int32) {. + importc: "g_spawn_close_pid", libprag.} + +proc g_spawn_command_line_async*(commandLine: cstring): gboolean {. + importc: "g_spawn_command_line_async", libprag.} + +proc spawnCommandLineAsync*(commandLine: cstring): gboolean {. + importc: "g_spawn_command_line_async", libprag.} + +proc g_spawn_command_line_sync*(commandLine: cstring; standardOutput: var uint8Array; + standardError: var uint8Array; exitStatus: var int32): gboolean {. + importc: "g_spawn_command_line_sync", libprag.} + +proc spawnCommandLineSync*(commandLine: cstring; standardOutput: var uint8Array; + standardError: var uint8Array; exitStatus: var int32): gboolean {. + importc: "g_spawn_command_line_sync", libprag.} + +proc g_spawn_error_quark*(): uint32 {. + importc: "g_spawn_error_quark", libprag.} + +proc spawnErrorQuark*(): uint32 {. + importc: "g_spawn_error_quark", libprag.} + +proc g_spawn_exit_error_quark*(): uint32 {. + importc: "g_spawn_exit_error_quark", libprag.} + +proc spawnExitErrorQuark*(): uint32 {. + importc: "g_spawn_exit_error_quark", libprag.} + +proc g_spawn_sync*(workingDirectory: ucstring; argv: cstringArray; envp: cstringArray; + flags: SpawnFlags; childSetup: SpawnChildSetupFunc; userData: pointer; standardOutput: var uint8Array; + standardError: var uint8Array; exitStatus: var int32): gboolean {. + importc: "g_spawn_sync", libprag.} + +proc spawnSync*(workingDirectory: ucstring; argv: cstringArray; envp: cstringArray; + flags: SpawnFlags; childSetup: SpawnChildSetupFunc; userData: pointer; standardOutput: var uint8Array; + standardError: var uint8Array; exitStatus: var int32): gboolean {. + importc: "g_spawn_sync", libprag.} + +proc g_stpcpy*(dest: cstring; src: cstring): cstring {. + importc: "g_stpcpy", libprag.} + +proc stpcpy*(dest: string; src: string): string = + let resul0 = g_stpcpy(cstring(dest), cstring(src)) + result = $resul0 + cogfree(resul0) + +proc g_str_equal*(v1: pointer; v2: pointer): gboolean {. + importc: "g_str_equal", libprag.} + +proc strEqual*(v1: pointer; v2: pointer): gboolean {. + importc: "g_str_equal", libprag.} + +proc g_str_has_prefix*(str: cstring; prefix: cstring): gboolean {. + importc: "g_str_has_prefix", libprag.} + +proc strHasPrefix*(str: cstring; prefix: cstring): gboolean {. + importc: "g_str_has_prefix", libprag.} + +proc g_str_has_suffix*(str: cstring; suffix: cstring): gboolean {. + importc: "g_str_has_suffix", libprag.} + +proc strHasSuffix*(str: cstring; suffix: cstring): gboolean {. + importc: "g_str_has_suffix", libprag.} + +proc g_str_hash*(v: pointer): uint32 {. + importc: "g_str_hash", libprag.} + +proc strHash*(v: pointer): uint32 {. + importc: "g_str_hash", libprag.} + +proc g_str_is_ascii*(str: cstring): gboolean {. + importc: "g_str_is_ascii", libprag.} + +proc strIsAscii*(str: cstring): gboolean {. + importc: "g_str_is_ascii", libprag.} + +proc g_str_match_string*(searchTerm: cstring; potentialHit: cstring; acceptAlternates: gboolean): gboolean {. + importc: "g_str_match_string", libprag.} + +proc strMatchString*(searchTerm: cstring; potentialHit: cstring; acceptAlternates: gboolean): gboolean {. + importc: "g_str_match_string", libprag.} + +proc g_str_to_ascii*(str: cstring; fromLocale: cstring): cstring {. + importc: "g_str_to_ascii", libprag.} + +proc strToAscii*(str: string; fromLocale: string): string = + let resul0 = g_str_to_ascii(cstring(str), cstring(fromLocale)) + result = $resul0 + cogfree(resul0) + +proc g_str_tokenize_and_fold*(string: cstring; translitLocale: cstring; asciiAlternates: var cstringArray): cstringArray {. + importc: "g_str_tokenize_and_fold", libprag.} + +proc strTokenizeAndFold*(string: cstring; translitLocale: cstring; asciiAlternates: var cstringArray): cstringArray {. + importc: "g_str_tokenize_and_fold", libprag.} + +proc g_strcanon*(string: cstring; validChars: cstring; substitutor: int8): cstring {. + importc: "g_strcanon", libprag.} + +proc strcanon*(string: string; validChars: string; substitutor: int8): string = + let resul0 = g_strcanon(cstring(string), cstring(validChars), substitutor) + result = $resul0 + cogfree(resul0) + +proc g_strcasecmp*(s1: cstring; s2: cstring): int32 {. + importc: "g_strcasecmp", libprag.} + +proc strcasecmp*(s1: cstring; s2: cstring): int32 {. + importc: "g_strcasecmp", libprag.} + +proc g_strchomp*(string: cstring): cstring {. + importc: "g_strchomp", libprag.} + +proc strchomp*(string: string): string = + let resul0 = g_strchomp(cstring(string)) + result = $resul0 + cogfree(resul0) + +proc g_strchug*(string: cstring): cstring {. + importc: "g_strchug", libprag.} + +proc strchug*(string: string): string = + let resul0 = g_strchug(cstring(string)) + result = $resul0 + cogfree(resul0) + +proc g_strcmp0*(str1: cstring; str2: cstring): int32 {. + importc: "g_strcmp0", libprag.} + +proc strcmp0*(str1: cstring; str2: cstring): int32 {. + importc: "g_strcmp0", libprag.} + +proc g_strcompress*(source: cstring): cstring {. + importc: "g_strcompress", libprag.} + +proc strcompress*(source: string): string = + let resul0 = g_strcompress(cstring(source)) + result = $resul0 + cogfree(resul0) + +proc g_strdelimit*(string: cstring; delimiters: cstring; newDelimiter: int8): cstring {. + importc: "g_strdelimit", libprag.} + +proc strdelimit*(string: string; delimiters: string; newDelimiter: int8): string = + let resul0 = g_strdelimit(cstring(string), cstring(delimiters), newDelimiter) + result = $resul0 + cogfree(resul0) + +proc g_strdown*(string: cstring): cstring {. + importc: "g_strdown", libprag.} + +proc strdown*(string: string): string = + let resul0 = g_strdown(cstring(string)) + result = $resul0 + cogfree(resul0) + +proc g_strdup*(str: cstring): cstring {. + importc: "g_strdup", libprag.} + +proc strdup*(str: string): string = + let resul0 = g_strdup(cstring(str)) + result = $resul0 + cogfree(resul0) + +proc g_strerror*(errnum: int32): cstring {. + importc: "g_strerror", libprag.} + +proc strerror*(errnum: int): string = + let resul0 = g_strerror(int32(errnum)) + result = $resul0 + +proc g_strescape*(source: cstring; exceptions: cstring): cstring {. + importc: "g_strescape", libprag.} + +proc strescape*(source: string; exceptions: string): string = + let resul0 = g_strescape(cstring(source), cstring(exceptions)) + result = $resul0 + cogfree(resul0) + +proc g_strfreev*(strArray: cstring) {. + importc: "g_strfreev", libprag.} + +proc strfreev*(strArray: cstring) {. + importc: "g_strfreev", libprag.} + +proc g_string_new*(init: cstring): ptr String00 {. + importc: "g_string_new", libprag.} + +proc stringNew*(init: string): String = + new(result) + result.impl = g_string_new(cstring(init)) + +proc g_string_new_len*(init: cstring; len: int64): ptr String00 {. + importc: "g_string_new_len", libprag.} + +proc stringNewLen*(init: string; len: int64): String = + new(result) + result.impl = g_string_new_len(cstring(init), len) + +proc g_string_sized_new*(dflSize: uint64): ptr String00 {. + importc: "g_string_sized_new", libprag.} + +proc stringSizedNew*(dflSize: uint64): String = + new(result) + result.impl = g_string_sized_new(dflSize) + +proc g_strip_context*(msgid: cstring; msgval: cstring): cstring {. + importc: "g_strip_context", libprag.} + +proc stripContext*(msgid: string; msgval: string): string = + let resul0 = g_strip_context(cstring(msgid), cstring(msgval)) + result = $resul0 + +proc g_strjoinv*(separator: cstring; strArray: cstring): cstring {. + importc: "g_strjoinv", libprag.} + +proc strjoinv*(separator: string; strArray: string): string = + let resul0 = g_strjoinv(cstring(separator), cstring(strArray)) + result = $resul0 + cogfree(resul0) + +proc g_strlcat*(dest: cstring; src: cstring; destSize: uint64): uint64 {. + importc: "g_strlcat", libprag.} + +proc strlcat*(dest: cstring; src: cstring; destSize: uint64): uint64 {. + importc: "g_strlcat", libprag.} + +proc g_strlcpy*(dest: cstring; src: cstring; destSize: uint64): uint64 {. + importc: "g_strlcpy", libprag.} + +proc strlcpy*(dest: cstring; src: cstring; destSize: uint64): uint64 {. + importc: "g_strlcpy", libprag.} + +proc g_strncasecmp*(s1: cstring; s2: cstring; n: uint32): int32 {. + importc: "g_strncasecmp", libprag.} + +proc strncasecmp*(s1: cstring; s2: cstring; n: uint32): int32 {. + importc: "g_strncasecmp", libprag.} + +proc g_strndup*(str: cstring; n: uint64): cstring {. + importc: "g_strndup", libprag.} + +proc strndup*(str: string; n: uint64): string = + let resul0 = g_strndup(cstring(str), n) + result = $resul0 + cogfree(resul0) + +proc g_strnfill*(length: uint64; fillChar: int8): cstring {. + importc: "g_strnfill", libprag.} + +proc strnfill*(length: uint64; fillChar: int8): string = + let resul0 = g_strnfill(length, fillChar) + result = $resul0 + cogfree(resul0) + +proc g_strreverse*(string: cstring): cstring {. + importc: "g_strreverse", libprag.} + +proc strreverse*(string: string): string = + let resul0 = g_strreverse(cstring(string)) + result = $resul0 + cogfree(resul0) + +proc g_strrstr*(haystack: cstring; needle: cstring): cstring {. + importc: "g_strrstr", libprag.} + +proc strrstr*(haystack: string; needle: string): string = + let resul0 = g_strrstr(cstring(haystack), cstring(needle)) + result = $resul0 + cogfree(resul0) + +proc g_strrstr_len*(haystack: cstring; haystackLen: int64; needle: cstring): cstring {. + importc: "g_strrstr_len", libprag.} + +proc strrstrLen*(haystack: string; haystackLen: int64; needle: string): string = + let resul0 = g_strrstr_len(cstring(haystack), haystackLen, cstring(needle)) + result = $resul0 + cogfree(resul0) + +proc g_strsignal*(signum: int32): cstring {. + importc: "g_strsignal", libprag.} + +proc strsignal*(signum: int): string = + let resul0 = g_strsignal(int32(signum)) + result = $resul0 + +proc g_strstr_len*(haystack: cstring; haystackLen: int64; needle: cstring): cstring {. + importc: "g_strstr_len", libprag.} + +proc strstrLen*(haystack: string; haystackLen: int64; needle: string): string = + let resul0 = g_strstr_len(cstring(haystack), haystackLen, cstring(needle)) + result = $resul0 + cogfree(resul0) + +proc g_strtod*(nptr: cstring; endptr: var cstring): cdouble {. + importc: "g_strtod", libprag.} + +proc strtod*(nptr: cstring; endptr: var cstring): cdouble {. + importc: "g_strtod", libprag.} + +proc g_strup*(string: cstring): cstring {. + importc: "g_strup", libprag.} + +proc strup*(string: string): string = + let resul0 = g_strup(cstring(string)) + result = $resul0 + cogfree(resul0) + +proc g_strv_contains*(strv: cstring; str: cstring): gboolean {. + importc: "g_strv_contains", libprag.} + +proc strvContains*(strv: cstring; str: cstring): gboolean {. + importc: "g_strv_contains", libprag.} + +proc g_strv_get_type*(): GType {. + importc: "g_strv_get_type", libprag.} + +proc strvGetType*(): GType {. + importc: "g_strv_get_type", libprag.} + +proc g_strv_length*(strArray: cstring): uint32 {. + importc: "g_strv_length", libprag.} + +proc strvLength*(strArray: cstring): uint32 {. + importc: "g_strv_length", libprag.} + +proc g_test_add_data_func*(testpath: cstring; testData: pointer; testFunc: TestDataFunc) {. + importc: "g_test_add_data_func", libprag.} + +proc testAddDataFunc*(testpath: cstring; testData: pointer; testFunc: TestDataFunc) {. + importc: "g_test_add_data_func", libprag.} + +proc g_test_add_data_func_full*(testpath: cstring; testData: pointer; testFunc: TestDataFunc; + dataFreeFunc: DestroyNotify) {. + importc: "g_test_add_data_func_full", libprag.} + +proc testAddDataFuncFull*(testpath: cstring; testData: pointer; testFunc: TestDataFunc; + dataFreeFunc: DestroyNotify) {. + importc: "g_test_add_data_func_full", libprag.} + +proc g_test_add_func*(testpath: cstring; testFunc: TestFunc) {. + importc: "g_test_add_func", libprag.} + +proc testAddFunc*(testpath: cstring; testFunc: TestFunc) {. + importc: "g_test_add_func", libprag.} + +proc g_test_assert_expected_messages_internal*(domain: cstring; file: cstring; line: int32; `func`: cstring) {. + importc: "g_test_assert_expected_messages_internal", libprag.} + +proc testAssertExpectedMessagesInternal*(domain: cstring; file: cstring; line: int32; `func`: cstring) {. + importc: "g_test_assert_expected_messages_internal", libprag.} + +proc g_test_bug*(bugUriSnippet: cstring) {. + importc: "g_test_bug", libprag.} + +proc testBug*(bugUriSnippet: cstring) {. + importc: "g_test_bug", libprag.} + +proc g_test_bug_base*(uriPattern: cstring) {. + importc: "g_test_bug_base", libprag.} + +proc testBugBase*(uriPattern: cstring) {. + importc: "g_test_bug_base", libprag.} + +proc g_test_expect_message*(logDomain: cstring; logLevel: LogLevelFlags; pattern: cstring) {. + importc: "g_test_expect_message", libprag.} + +proc testExpectMessage*(logDomain: cstring; logLevel: LogLevelFlags; pattern: cstring) {. + importc: "g_test_expect_message", libprag.} + +proc g_test_fail*() {. + importc: "g_test_fail", libprag.} + +proc testFail*() {. + importc: "g_test_fail", libprag.} + +proc g_test_failed*(): gboolean {. + importc: "g_test_failed", libprag.} + +proc testFailed*(): gboolean {. + importc: "g_test_failed", libprag.} + +proc g_test_get_dir*(fileType: TestFileType): ucstring {. + importc: "g_test_get_dir", libprag.} + +proc testGetDir*(fileType: TestFileType): ucstring {. + importc: "g_test_get_dir", libprag.} + +proc g_test_incomplete*(msg: cstring) {. + importc: "g_test_incomplete", libprag.} + +proc testIncomplete*(msg: cstring) {. + importc: "g_test_incomplete", libprag.} + +proc g_test_log_type_name*(logType: TestLogType): cstring {. + importc: "g_test_log_type_name", libprag.} + +proc testLogTypeName*(logType: TestLogType): string = + let resul0 = g_test_log_type_name(logType) + result = $resul0 + +proc g_test_queue_destroy*(destroyFunc: DestroyNotify; destroyData: pointer) {. + importc: "g_test_queue_destroy", libprag.} + +proc testQueueDestroy*(destroyFunc: DestroyNotify; destroyData: pointer) {. + importc: "g_test_queue_destroy", libprag.} + +proc g_test_queue_free*(gfreePointer: pointer) {. + importc: "g_test_queue_free", libprag.} + +proc testQueueFree*(gfreePointer: pointer) {. + importc: "g_test_queue_free", libprag.} + +proc g_test_rand_double*(): cdouble {. + importc: "g_test_rand_double", libprag.} + +proc testRandDouble*(): cdouble {. + importc: "g_test_rand_double", libprag.} + +proc g_test_rand_double_range*(rangeStart: cdouble; rangeEnd: cdouble): cdouble {. + importc: "g_test_rand_double_range", libprag.} + +proc testRandDoubleRange*(rangeStart: cdouble; rangeEnd: cdouble): cdouble {. + importc: "g_test_rand_double_range", libprag.} + +proc g_test_rand_int*(): int32 {. + importc: "g_test_rand_int", libprag.} + +proc testRandInt*(): int32 {. + importc: "g_test_rand_int", libprag.} + +proc g_test_rand_int_range*(begin: int32; `end`: int32): int32 {. + importc: "g_test_rand_int_range", libprag.} + +proc testRandIntRange*(begin: int32; `end`: int32): int32 {. + importc: "g_test_rand_int_range", libprag.} + +proc g_test_run*(): int32 {. + importc: "g_test_run", libprag.} + +proc testRun*(): int32 {. + importc: "g_test_run", libprag.} + +proc g_test_run_suite*(suite: ptr TestSuite00): int32 {. + importc: "g_test_run_suite", libprag.} + +proc testRunSuite*(suite: TestSuite): int = + int(g_test_run_suite(cast[ptr TestSuite00](suite.impl))) + +proc g_test_set_nonfatal_assertions*() {. + importc: "g_test_set_nonfatal_assertions", libprag.} + +proc testSetNonfatalAssertions*() {. + importc: "g_test_set_nonfatal_assertions", libprag.} + +proc g_test_skip*(msg: cstring) {. + importc: "g_test_skip", libprag.} + +proc testSkip*(msg: cstring) {. + importc: "g_test_skip", libprag.} + +proc g_test_subprocess*(): gboolean {. + importc: "g_test_subprocess", libprag.} + +proc testSubprocess*(): gboolean {. + importc: "g_test_subprocess", libprag.} + +proc g_test_timer_elapsed*(): cdouble {. + importc: "g_test_timer_elapsed", libprag.} + +proc testTimerElapsed*(): cdouble {. + importc: "g_test_timer_elapsed", libprag.} + +proc g_test_timer_last*(): cdouble {. + importc: "g_test_timer_last", libprag.} + +proc testTimerLast*(): cdouble {. + importc: "g_test_timer_last", libprag.} + +proc g_test_timer_start*() {. + importc: "g_test_timer_start", libprag.} + +proc testTimerStart*() {. + importc: "g_test_timer_start", libprag.} + +proc g_test_trap_assertions*(domain: cstring; file: cstring; line: int32; `func`: cstring; + assertionFlags: uint64; pattern: cstring) {. + importc: "g_test_trap_assertions", libprag.} + +proc testTrapAssertions*(domain: cstring; file: cstring; line: int32; `func`: cstring; + assertionFlags: uint64; pattern: cstring) {. + importc: "g_test_trap_assertions", libprag.} + +proc g_test_trap_fork*(usecTimeout: uint64; testTrapFlags: TestTrapFlags): gboolean {. + importc: "g_test_trap_fork", libprag.} + +proc testTrapFork*(usecTimeout: uint64; testTrapFlags: TestTrapFlags): gboolean {. + importc: "g_test_trap_fork", libprag.} + +proc g_test_trap_has_passed*(): gboolean {. + importc: "g_test_trap_has_passed", libprag.} + +proc testTrapHasPassed*(): gboolean {. + importc: "g_test_trap_has_passed", libprag.} + +proc g_test_trap_reached_timeout*(): gboolean {. + importc: "g_test_trap_reached_timeout", libprag.} + +proc testTrapReachedTimeout*(): gboolean {. + importc: "g_test_trap_reached_timeout", libprag.} + +proc g_test_trap_subprocess*(testPath: cstring; usecTimeout: uint64; testFlags: TestSubprocessFlags) {. + importc: "g_test_trap_subprocess", libprag.} + +proc testTrapSubprocess*(testPath: cstring; usecTimeout: uint64; testFlags: TestSubprocessFlags) {. + importc: "g_test_trap_subprocess", libprag.} + +proc g_timeout_add_full*(priority: int32; interval: uint32; function: SourceFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "g_timeout_add_full", libprag.} + +proc timeoutAdd*(priority: int32; interval: uint32; function: SourceFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "g_timeout_add_full", libprag.} + +proc g_timeout_add_seconds_full*(priority: int32; interval: uint32; function: SourceFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "g_timeout_add_seconds_full", libprag.} + +proc timeoutAddSeconds*(priority: int32; interval: uint32; function: SourceFunc; + data: pointer; notify: DestroyNotify): uint32 {. + importc: "g_timeout_add_seconds_full", libprag.} + +proc g_timeout_source_new*(interval: uint32): ptr Source00 {. + importc: "g_timeout_source_new", libprag.} + +proc timeoutSourceNew*(interval: int): Source = + new(result) + result.impl = g_timeout_source_new(uint32(interval)) + +proc g_timeout_source_new_seconds*(interval: uint32): ptr Source00 {. + importc: "g_timeout_source_new_seconds", libprag.} + +proc timeoutSourceNewSeconds*(interval: int): Source = + new(result) + result.impl = g_timeout_source_new_seconds(uint32(interval)) + +proc g_try_malloc*(nBytes: uint64): pointer {. + importc: "g_try_malloc", libprag.} + +proc tryMalloc*(nBytes: uint64): pointer {. + importc: "g_try_malloc", libprag.} + +proc g_try_malloc0*(nBytes: uint64): pointer {. + importc: "g_try_malloc0", libprag.} + +proc tryMalloc0*(nBytes: uint64): pointer {. + importc: "g_try_malloc0", libprag.} + +proc g_try_malloc0_n*(nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_try_malloc0_n", libprag.} + +proc tryMalloc0N*(nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_try_malloc0_n", libprag.} + +proc g_try_malloc_n*(nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_try_malloc_n", libprag.} + +proc tryMallocN*(nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_try_malloc_n", libprag.} + +proc g_try_realloc*(mem: pointer; nBytes: uint64): pointer {. + importc: "g_try_realloc", libprag.} + +proc tryRealloc*(mem: pointer; nBytes: uint64): pointer {. + importc: "g_try_realloc", libprag.} + +proc g_try_realloc_n*(mem: pointer; nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_try_realloc_n", libprag.} + +proc tryReallocN*(mem: pointer; nBlocks: uint64; nBlockBytes: uint64): pointer {. + importc: "g_try_realloc_n", libprag.} + +proc g_ucs4_to_utf16*(str: ptr gunichar; len: int64; itemsRead: var int64; + itemsWritten: var int64): ptr uint16 {. + importc: "g_ucs4_to_utf16", libprag.} + +proc ucs4ToUtf16*(str: ptr gunichar; len: int64; itemsRead: var int64; + itemsWritten: var int64): ptr uint16 {. + importc: "g_ucs4_to_utf16", libprag.} + +proc g_ucs4_to_utf8*(str: ptr gunichar; len: int64; itemsRead: var int64; + itemsWritten: var int64): cstring {. + importc: "g_ucs4_to_utf8", libprag.} + +proc ucs4ToUtf8*(str: ptr gunichar; len: int64; itemsRead: var int64; + itemsWritten: var int64): string = + let resul0 = g_ucs4_to_utf8(str, len, itemsRead, itemsWritten) + result = $resul0 + cogfree(resul0) + +proc g_unichar_break_type*(c: gunichar): UnicodeBreakType {. + importc: "g_unichar_break_type", libprag.} + +proc unicharBreakType*(c: gunichar): UnicodeBreakType {. + importc: "g_unichar_break_type", libprag.} + +proc g_unichar_combining_class*(uc: gunichar): int32 {. + importc: "g_unichar_combining_class", libprag.} + +proc unicharCombiningClass*(uc: gunichar): int32 {. + importc: "g_unichar_combining_class", libprag.} + +proc g_unichar_compose*(a: gunichar; b: gunichar; ch: ptr gunichar): gboolean {. + importc: "g_unichar_compose", libprag.} + +proc unicharCompose*(a: gunichar; b: gunichar; ch: ptr gunichar): gboolean {. + importc: "g_unichar_compose", libprag.} + +proc g_unichar_decompose*(ch: gunichar; a: ptr gunichar; b: ptr gunichar): gboolean {. + importc: "g_unichar_decompose", libprag.} + +proc unicharDecompose*(ch: gunichar; a: ptr gunichar; b: ptr gunichar): gboolean {. + importc: "g_unichar_decompose", libprag.} + +proc g_unichar_digit_value*(c: gunichar): int32 {. + importc: "g_unichar_digit_value", libprag.} + +proc unicharDigitValue*(c: gunichar): int32 {. + importc: "g_unichar_digit_value", libprag.} + +proc g_unichar_fully_decompose*(ch: gunichar; compat: gboolean; resu: ptr gunichar; + resultLen: uint64): uint64 {. + importc: "g_unichar_fully_decompose", libprag.} + +proc unicharFullyDecompose*(ch: gunichar; compat: gboolean; resu: ptr gunichar; + resultLen: uint64): uint64 {. + importc: "g_unichar_fully_decompose", libprag.} + +proc g_unichar_get_mirror_char*(ch: gunichar; mirroredCh: ptr gunichar): gboolean {. + importc: "g_unichar_get_mirror_char", libprag.} + +proc unicharGetMirrorChar*(ch: gunichar; mirroredCh: ptr gunichar): gboolean {. + importc: "g_unichar_get_mirror_char", libprag.} + +proc g_unichar_get_script*(ch: gunichar): UnicodeScript {. + importc: "g_unichar_get_script", libprag.} + +proc unicharGetScript*(ch: gunichar): UnicodeScript {. + importc: "g_unichar_get_script", libprag.} + +proc g_unichar_isalnum*(c: gunichar): gboolean {. + importc: "g_unichar_isalnum", libprag.} + +proc unicharIsalnum*(c: gunichar): gboolean {. + importc: "g_unichar_isalnum", libprag.} + +proc g_unichar_isalpha*(c: gunichar): gboolean {. + importc: "g_unichar_isalpha", libprag.} + +proc unicharIsalpha*(c: gunichar): gboolean {. + importc: "g_unichar_isalpha", libprag.} + +proc g_unichar_iscntrl*(c: gunichar): gboolean {. + importc: "g_unichar_iscntrl", libprag.} + +proc unicharIscntrl*(c: gunichar): gboolean {. + importc: "g_unichar_iscntrl", libprag.} + +proc g_unichar_isdefined*(c: gunichar): gboolean {. + importc: "g_unichar_isdefined", libprag.} + +proc unicharIsdefined*(c: gunichar): gboolean {. + importc: "g_unichar_isdefined", libprag.} + +proc g_unichar_isdigit*(c: gunichar): gboolean {. + importc: "g_unichar_isdigit", libprag.} + +proc unicharIsdigit*(c: gunichar): gboolean {. + importc: "g_unichar_isdigit", libprag.} + +proc g_unichar_isgraph*(c: gunichar): gboolean {. + importc: "g_unichar_isgraph", libprag.} + +proc unicharIsgraph*(c: gunichar): gboolean {. + importc: "g_unichar_isgraph", libprag.} + +proc g_unichar_islower*(c: gunichar): gboolean {. + importc: "g_unichar_islower", libprag.} + +proc unicharIslower*(c: gunichar): gboolean {. + importc: "g_unichar_islower", libprag.} + +proc g_unichar_ismark*(c: gunichar): gboolean {. + importc: "g_unichar_ismark", libprag.} + +proc unicharIsmark*(c: gunichar): gboolean {. + importc: "g_unichar_ismark", libprag.} + +proc g_unichar_isprint*(c: gunichar): gboolean {. + importc: "g_unichar_isprint", libprag.} + +proc unicharIsprint*(c: gunichar): gboolean {. + importc: "g_unichar_isprint", libprag.} + +proc g_unichar_ispunct*(c: gunichar): gboolean {. + importc: "g_unichar_ispunct", libprag.} + +proc unicharIspunct*(c: gunichar): gboolean {. + importc: "g_unichar_ispunct", libprag.} + +proc g_unichar_isspace*(c: gunichar): gboolean {. + importc: "g_unichar_isspace", libprag.} + +proc unicharIsspace*(c: gunichar): gboolean {. + importc: "g_unichar_isspace", libprag.} + +proc g_unichar_istitle*(c: gunichar): gboolean {. + importc: "g_unichar_istitle", libprag.} + +proc unicharIstitle*(c: gunichar): gboolean {. + importc: "g_unichar_istitle", libprag.} + +proc g_unichar_isupper*(c: gunichar): gboolean {. + importc: "g_unichar_isupper", libprag.} + +proc unicharIsupper*(c: gunichar): gboolean {. + importc: "g_unichar_isupper", libprag.} + +proc g_unichar_iswide*(c: gunichar): gboolean {. + importc: "g_unichar_iswide", libprag.} + +proc unicharIswide*(c: gunichar): gboolean {. + importc: "g_unichar_iswide", libprag.} + +proc g_unichar_iswide_cjk*(c: gunichar): gboolean {. + importc: "g_unichar_iswide_cjk", libprag.} + +proc unicharIswideCjk*(c: gunichar): gboolean {. + importc: "g_unichar_iswide_cjk", libprag.} + +proc g_unichar_isxdigit*(c: gunichar): gboolean {. + importc: "g_unichar_isxdigit", libprag.} + +proc unicharIsxdigit*(c: gunichar): gboolean {. + importc: "g_unichar_isxdigit", libprag.} + +proc g_unichar_iszerowidth*(c: gunichar): gboolean {. + importc: "g_unichar_iszerowidth", libprag.} + +proc unicharIszerowidth*(c: gunichar): gboolean {. + importc: "g_unichar_iszerowidth", libprag.} + +proc g_unichar_to_utf8*(c: gunichar; outbuf: var cstring): int32 {. + importc: "g_unichar_to_utf8", libprag.} + +proc unicharToUtf8*(c: gunichar; outbuf: var cstring): int32 {. + importc: "g_unichar_to_utf8", libprag.} + +proc g_unichar_tolower*(c: gunichar): gunichar {. + importc: "g_unichar_tolower", libprag.} + +proc unicharTolower*(c: gunichar): gunichar {. + importc: "g_unichar_tolower", libprag.} + +proc g_unichar_totitle*(c: gunichar): gunichar {. + importc: "g_unichar_totitle", libprag.} + +proc unicharTotitle*(c: gunichar): gunichar {. + importc: "g_unichar_totitle", libprag.} + +proc g_unichar_toupper*(c: gunichar): gunichar {. + importc: "g_unichar_toupper", libprag.} + +proc unicharToupper*(c: gunichar): gunichar {. + importc: "g_unichar_toupper", libprag.} + +proc g_unichar_type*(c: gunichar): UnicodeType {. + importc: "g_unichar_type", libprag.} + +proc unicharType*(c: gunichar): UnicodeType {. + importc: "g_unichar_type", libprag.} + +proc g_unichar_validate*(ch: gunichar): gboolean {. + importc: "g_unichar_validate", libprag.} + +proc unicharValidate*(ch: gunichar): gboolean {. + importc: "g_unichar_validate", libprag.} + +proc g_unichar_xdigit_value*(c: gunichar): int32 {. + importc: "g_unichar_xdigit_value", libprag.} + +proc unicharXdigitValue*(c: gunichar): int32 {. + importc: "g_unichar_xdigit_value", libprag.} + +proc g_unicode_canonical_decomposition*(ch: gunichar; resultLen: ptr uint64): ptr gunichar {. + importc: "g_unicode_canonical_decomposition", libprag.} + +proc unicodeCanonicalDecomposition*(ch: gunichar; resultLen: ptr uint64): ptr gunichar {. + importc: "g_unicode_canonical_decomposition", libprag.} + +proc g_unicode_canonical_ordering*(string: ptr gunichar; len: uint64) {. + importc: "g_unicode_canonical_ordering", libprag.} + +proc unicodeCanonicalOrdering*(string: ptr gunichar; len: uint64) {. + importc: "g_unicode_canonical_ordering", libprag.} + +proc g_unicode_script_from_iso15924*(iso15924: uint32): UnicodeScript {. + importc: "g_unicode_script_from_iso15924", libprag.} + +proc unicodeScriptFromIso15924*(iso15924: uint32): UnicodeScript {. + importc: "g_unicode_script_from_iso15924", libprag.} + +proc g_unicode_script_to_iso15924*(script: UnicodeScript): uint32 {. + importc: "g_unicode_script_to_iso15924", libprag.} + +proc unicodeScriptToIso15924*(script: UnicodeScript): uint32 {. + importc: "g_unicode_script_to_iso15924", libprag.} + +proc g_unix_error_quark*(): uint32 {. + importc: "g_unix_error_quark", libprag.} + +proc unixErrorQuark*(): uint32 {. + importc: "g_unix_error_quark", libprag.} + +proc g_unix_fd_add_full*(priority: int32; fd: int32; condition: IOCondition; + function: UnixFDSourceFunc; userData: pointer; notify: DestroyNotify): uint32 {. + importc: "g_unix_fd_add_full", libprag.} + +proc unixFdAddFull*(priority: int32; fd: int32; condition: IOCondition; + function: UnixFDSourceFunc; userData: pointer; notify: DestroyNotify): uint32 {. + importc: "g_unix_fd_add_full", libprag.} + +proc g_unix_fd_source_new*(fd: int32; condition: IOCondition): ptr Source00 {. + importc: "g_unix_fd_source_new", libprag.} + +proc unixFdSourceNew*(fd: int; condition: IOCondition): Source = + new(result) + result.impl = g_unix_fd_source_new(int32(fd), condition) + +proc g_unix_open_pipe*(fds: ptr int32; flags: int32): gboolean {. + importc: "g_unix_open_pipe", libprag.} + +proc unixOpenPipe*(fds: ptr int32; flags: int32): gboolean {. + importc: "g_unix_open_pipe", libprag.} + +proc g_unix_set_fd_nonblocking*(fd: int32; nonblock: gboolean): gboolean {. + importc: "g_unix_set_fd_nonblocking", libprag.} + +proc unixSetFdNonblocking*(fd: int32; nonblock: gboolean): gboolean {. + importc: "g_unix_set_fd_nonblocking", libprag.} + +proc g_unix_signal_add_full*(priority: int32; signum: int32; handler: SourceFunc; + userData: pointer; notify: DestroyNotify): uint32 {. + importc: "g_unix_signal_add_full", libprag.} + +proc unixSignalAdd*(priority: int32; signum: int32; handler: SourceFunc; + userData: pointer; notify: DestroyNotify): uint32 {. + importc: "g_unix_signal_add_full", libprag.} + +proc g_unix_signal_source_new*(signum: int32): ptr Source00 {. + importc: "g_unix_signal_source_new", libprag.} + +proc unixSignalSourceNew*(signum: int): Source = + new(result) + result.impl = g_unix_signal_source_new(int32(signum)) + +proc g_unlink*(filename: ucstring): int32 {. + importc: "g_unlink", libprag.} + +proc unlink*(filename: ucstring): int32 {. + importc: "g_unlink", libprag.} + +proc g_unsetenv*(variable: cstring) {. + importc: "g_unsetenv", libprag.} + +proc unsetenv*(variable: cstring) {. + importc: "g_unsetenv", libprag.} + +proc g_uri_escape_string*(unescaped: cstring; reservedCharsAllowed: cstring; + allowUtf8: gboolean): cstring {. + importc: "g_uri_escape_string", libprag.} + +proc uriEscapeString*(unescaped: string; reservedCharsAllowed: string; allowUtf8: bool): string = + let resul0 = g_uri_escape_string(cstring(unescaped), cstring(reservedCharsAllowed), gboolean(allowUtf8)) + result = $resul0 + cogfree(resul0) + +proc g_uri_list_extract_uris*(uriList: cstring): cstringArray {. + importc: "g_uri_list_extract_uris", libprag.} + +proc uriListExtractUris*(uriList: cstring): cstringArray {. + importc: "g_uri_list_extract_uris", libprag.} + +proc g_uri_parse_scheme*(uri: cstring): cstring {. + importc: "g_uri_parse_scheme", libprag.} + +proc uriParseScheme*(uri: string): string = + let resul0 = g_uri_parse_scheme(cstring(uri)) + result = $resul0 + cogfree(resul0) + +proc g_uri_unescape_segment*(escapedString: cstring; escapedStringEnd: cstring; + illegalCharacters: cstring): cstring {. + importc: "g_uri_unescape_segment", libprag.} + +proc uriUnescapeSegment*(escapedString: string; escapedStringEnd: string; illegalCharacters: string): string = + let resul0 = g_uri_unescape_segment(cstring(escapedString), cstring(escapedStringEnd), cstring(illegalCharacters)) + result = $resul0 + cogfree(resul0) + +proc g_uri_unescape_string*(escapedString: cstring; illegalCharacters: cstring): cstring {. + importc: "g_uri_unescape_string", libprag.} + +proc uriUnescapeString*(escapedString: string; illegalCharacters: string): string = + let resul0 = g_uri_unescape_string(cstring(escapedString), cstring(illegalCharacters)) + result = $resul0 + cogfree(resul0) + +proc g_usleep*(microseconds: uint64) {. + importc: "g_usleep", libprag.} + +proc usleep*(microseconds: uint64) {. + importc: "g_usleep", libprag.} + +proc g_utf16_to_ucs4*(str: ptr uint16; len: int64; itemsRead: var int64; + itemsWritten: var int64): ptr gunichar {. + importc: "g_utf16_to_ucs4", libprag.} + +proc utf16ToUcs4*(str: ptr uint16; len: int64; itemsRead: var int64; + itemsWritten: var int64): ptr gunichar {. + importc: "g_utf16_to_ucs4", libprag.} + +proc g_utf16_to_utf8*(str: ptr uint16; len: int64; itemsRead: var int64; + itemsWritten: var int64): cstring {. + importc: "g_utf16_to_utf8", libprag.} + +proc utf16ToUtf8*(str: ptr uint16; len: int64; itemsRead: var int64; + itemsWritten: var int64): string = + let resul0 = g_utf16_to_utf8(str, len, itemsRead, itemsWritten) + result = $resul0 + cogfree(resul0) + +proc g_utf8_casefold*(str: cstring; len: int64): cstring {. + importc: "g_utf8_casefold", libprag.} + +proc utf8Casefold*(str: string; len: int64): string = + let resul0 = g_utf8_casefold(cstring(str), len) + result = $resul0 + cogfree(resul0) + +proc g_utf8_collate*(str1: cstring; str2: cstring): int32 {. + importc: "g_utf8_collate", libprag.} + +proc utf8Collate*(str1: cstring; str2: cstring): int32 {. + importc: "g_utf8_collate", libprag.} + +proc g_utf8_collate_key*(str: cstring; len: int64): cstring {. + importc: "g_utf8_collate_key", libprag.} + +proc utf8CollateKey*(str: string; len: int64): string = + let resul0 = g_utf8_collate_key(cstring(str), len) + result = $resul0 + cogfree(resul0) + +proc g_utf8_collate_key_for_filename*(str: cstring; len: int64): cstring {. + importc: "g_utf8_collate_key_for_filename", libprag.} + +proc utf8CollateKeyForFilename*(str: string; len: int64): string = + let resul0 = g_utf8_collate_key_for_filename(cstring(str), len) + result = $resul0 + cogfree(resul0) + +proc g_utf8_find_next_char*(p: cstring; `end`: cstring): cstring {. + importc: "g_utf8_find_next_char", libprag.} + +proc utf8FindNextChar*(p: string; `end`: string): string = + let resul0 = g_utf8_find_next_char(cstring(p), cstring(`end`)) + result = $resul0 + cogfree(resul0) + +proc g_utf8_find_prev_char*(str: cstring; p: cstring): cstring {. + importc: "g_utf8_find_prev_char", libprag.} + +proc utf8FindPrevChar*(str: string; p: string): string = + let resul0 = g_utf8_find_prev_char(cstring(str), cstring(p)) + result = $resul0 + cogfree(resul0) + +proc g_utf8_get_char*(p: cstring): gunichar {. + importc: "g_utf8_get_char", libprag.} + +proc utf8GetChar*(p: cstring): gunichar {. + importc: "g_utf8_get_char", libprag.} + +proc g_utf8_get_char_validated*(p: cstring; maxLen: int64): gunichar {. + importc: "g_utf8_get_char_validated", libprag.} + +proc utf8GetCharValidated*(p: cstring; maxLen: int64): gunichar {. + importc: "g_utf8_get_char_validated", libprag.} + +proc g_utf8_normalize*(str: cstring; len: int64; mode: NormalizeMode): cstring {. + importc: "g_utf8_normalize", libprag.} + +proc utf8Normalize*(str: string; len: int64; mode: NormalizeMode): string = + let resul0 = g_utf8_normalize(cstring(str), len, mode) + result = $resul0 + cogfree(resul0) + +proc g_utf8_offset_to_pointer*(str: cstring; offset: int64): cstring {. + importc: "g_utf8_offset_to_pointer", libprag.} + +proc utf8OffsetToPointer*(str: string; offset: int64): string = + let resul0 = g_utf8_offset_to_pointer(cstring(str), offset) + result = $resul0 + cogfree(resul0) + +proc g_utf8_pointer_to_offset*(str: cstring; pos: cstring): int64 {. + importc: "g_utf8_pointer_to_offset", libprag.} + +proc utf8PointerToOffset*(str: cstring; pos: cstring): int64 {. + importc: "g_utf8_pointer_to_offset", libprag.} + +proc g_utf8_prev_char*(p: cstring): cstring {. + importc: "g_utf8_prev_char", libprag.} + +proc utf8PrevChar*(p: string): string = + let resul0 = g_utf8_prev_char(cstring(p)) + result = $resul0 + cogfree(resul0) + +proc g_utf8_strchr*(p: cstring; len: int64; c: gunichar): cstring {. + importc: "g_utf8_strchr", libprag.} + +proc utf8Strchr*(p: string; len: int64; c: gunichar): string = + let resul0 = g_utf8_strchr(cstring(p), len, c) + result = $resul0 + cogfree(resul0) + +proc g_utf8_strdown*(str: cstring; len: int64): cstring {. + importc: "g_utf8_strdown", libprag.} + +proc utf8Strdown*(str: string; len: int64): string = + let resul0 = g_utf8_strdown(cstring(str), len) + result = $resul0 + cogfree(resul0) + +proc g_utf8_strlen*(p: cstring; max: int64): int64 {. + importc: "g_utf8_strlen", libprag.} + +proc utf8Strlen*(p: cstring; max: int64): int64 {. + importc: "g_utf8_strlen", libprag.} + +proc g_utf8_strncpy*(dest: cstring; src: cstring; n: uint64): cstring {. + importc: "g_utf8_strncpy", libprag.} + +proc utf8Strncpy*(dest: string; src: string; n: uint64): string = + let resul0 = g_utf8_strncpy(cstring(dest), cstring(src), n) + result = $resul0 + cogfree(resul0) + +proc g_utf8_strrchr*(p: cstring; len: int64; c: gunichar): cstring {. + importc: "g_utf8_strrchr", libprag.} + +proc utf8Strrchr*(p: string; len: int64; c: gunichar): string = + let resul0 = g_utf8_strrchr(cstring(p), len, c) + result = $resul0 + cogfree(resul0) + +proc g_utf8_strreverse*(str: cstring; len: int64): cstring {. + importc: "g_utf8_strreverse", libprag.} + +proc utf8Strreverse*(str: string; len: int64): string = + let resul0 = g_utf8_strreverse(cstring(str), len) + result = $resul0 + cogfree(resul0) + +proc g_utf8_strup*(str: cstring; len: int64): cstring {. + importc: "g_utf8_strup", libprag.} + +proc utf8Strup*(str: string; len: int64): string = + let resul0 = g_utf8_strup(cstring(str), len) + result = $resul0 + cogfree(resul0) + +proc g_utf8_substring*(str: cstring; startPos: int64; endPos: int64): cstring {. + importc: "g_utf8_substring", libprag.} + +proc utf8Substring*(str: string; startPos: int64; endPos: int64): string = + let resul0 = g_utf8_substring(cstring(str), startPos, endPos) + result = $resul0 + cogfree(resul0) + +proc g_utf8_to_ucs4*(str: cstring; len: int64; itemsRead: var int64; itemsWritten: var int64): ptr gunichar {. + importc: "g_utf8_to_ucs4", libprag.} + +proc utf8ToUcs4*(str: cstring; len: int64; itemsRead: var int64; itemsWritten: var int64): ptr gunichar {. + importc: "g_utf8_to_ucs4", libprag.} + +proc g_utf8_to_ucs4_fast*(str: cstring; len: int64; itemsWritten: var int64): ptr gunichar {. + importc: "g_utf8_to_ucs4_fast", libprag.} + +proc utf8ToUcs4Fast*(str: cstring; len: int64; itemsWritten: var int64): ptr gunichar {. + importc: "g_utf8_to_ucs4_fast", libprag.} + +proc g_utf8_to_utf16*(str: cstring; len: int64; itemsRead: var int64; itemsWritten: var int64): ptr uint16 {. + importc: "g_utf8_to_utf16", libprag.} + +proc utf8ToUtf16*(str: cstring; len: int64; itemsRead: var int64; itemsWritten: var int64): ptr uint16 {. + importc: "g_utf8_to_utf16", libprag.} + +proc g_utf8_validate*(str: uint8Array; maxLen: int64; `end`: var cstring): gboolean {. + importc: "g_utf8_validate", libprag.} + +proc utf8Validate*(str: uint8Array; maxLen: int64; `end`: var cstring): gboolean {. + importc: "g_utf8_validate", libprag.} + +proc g_variant_get_gtype*(): GType {. + importc: "g_variant_get_gtype", libprag.} + +proc variantGetGtype*(): GType {. + importc: "g_variant_get_gtype", libprag.} +# === remaining symbols: diff --git a/gintro/gmodule.nim b/gintro/gmodule.nim new file mode 100644 index 0000000..2ef4008 --- /dev/null +++ b/gintro/gmodule.nim @@ -0,0 +1,75 @@ +# dependencies: +# GLib-2.0 +# immediate dependencies: +# GLib-2.0 +# libraries: +# libgmodule-2.0.so.0 +{.deadCodeElim: on.} +import glib +const Lib* = "libgmodule-2.0.so.0" +{.pragma: libprag, cdecl, dynlib: Lib.} +let Quark = g_quark_from_static_string("NimGIQuark") + +type + Module00* {.pure.} = object + Module* = ref object + impl*: ptr Module00 + +proc g_module_close*(self: ptr Module00): gboolean {. + importc: "g_module_close", libprag.} + +proc close*(self: Module): bool = + toBool(g_module_close(cast[ptr Module00](self.impl))) + +proc g_module_make_resident*(self: ptr Module00) {. + importc: "g_module_make_resident", libprag.} + +proc makeResident*(self: Module) = + g_module_make_resident(cast[ptr Module00](self.impl)) + +proc g_module_name*(self: ptr Module00): cstring {. + importc: "g_module_name", libprag.} + +proc name*(self: Module): string = + let resul0 = g_module_name(cast[ptr Module00](self.impl)) + result = $resul0 + +proc g_module_symbol*(self: ptr Module00; symbolName: cstring; symbol: var pointer): gboolean {. + importc: "g_module_symbol", libprag.} + +proc symbol*(self: Module; symbolName: string; symbol: var pointer): bool = + toBool(g_module_symbol(cast[ptr Module00](self.impl), cstring(symbolName), symbol)) + +proc g_module_build_path*(directory: cstring; moduleName: cstring): cstring {. + importc: "g_module_build_path", libprag.} + +proc buildPath*(directory: string; moduleName: string): string = + let resul0 = g_module_build_path(cstring(directory), cstring(moduleName)) + result = $resul0 + cogfree(resul0) + +proc g_module_error*(): cstring {. + importc: "g_module_error", libprag.} + +proc error*(): string = + let resul0 = g_module_error() + result = $resul0 + +proc g_module_supported*(): gboolean {. + importc: "g_module_supported", libprag.} + +proc supported*(): gboolean {. + importc: "g_module_supported", libprag.} + +type + ModuleCheckInit* = proc (module: ptr Module00): cstring {.cdecl.} + +type + ModuleFlags* {.size: sizeof(cint), pure.} = enum + lazy = 1 + local = 2 + mask = 3 + +type + ModuleUnload* = proc (module: ptr Module00) {.cdecl.} +# === remaining symbols: diff --git a/gintro/gobject.nim b/gintro/gobject.nim new file mode 100644 index 0000000..ee349ed --- /dev/null +++ b/gintro/gobject.nim @@ -0,0 +1,2162 @@ +# dependencies: +# GLib-2.0 +# immediate dependencies: +# GLib-2.0 +# libraries: +# libgobject-2.0.so.0 +{.deadCodeElim: on.} +import glib +const Lib* = "libgobject-2.0.so.0" +{.pragma: libprag, cdecl, dynlib: Lib.} +type + GCallback* = proc () {.cdecl.} +type + Parameter00Array* = pointer +type + Object00Array* = pointer +type + Value00Array* = pointer +type + GTypeArray* = pointer +type + ParamSpec00Array* = pointer +type + TypePlugin00Array* = pointer +type + uint32Array* = pointer +type + VaClosureMarshal* = pointer +type + TypePlugin00* = object +let Quark = g_quark_from_static_string("NimGIQuark") + +type + TypeClass00* {.pure.} = object + gType*: GType + TypeClass* = ref object + impl*: ptr TypeClass00 + +proc g_type_class_add_private*(self: ptr TypeClass00; privateSize: uint64) {. + importc: "g_type_class_add_private", libprag.} + +proc addPrivate*(self: TypeClass; privateSize: uint64) = + g_type_class_add_private(cast[ptr TypeClass00](self.impl), privateSize) + +proc g_type_class_get_private*(self: ptr TypeClass00; privateType: GType): pointer {. + importc: "g_type_class_get_private", libprag.} + +proc getPrivate*(self: TypeClass; privateType: GType): pointer = + g_type_class_get_private(cast[ptr TypeClass00](self.impl), privateType) + +proc private*(self: TypeClass; privateType: GType): pointer = + g_type_class_get_private(cast[ptr TypeClass00](self.impl), privateType) + +proc g_type_class_peek_parent*(self: ptr TypeClass00): ptr TypeClass00 {. + importc: "g_type_class_peek_parent", libprag.} + +proc peekParent*(self: TypeClass): TypeClass = + new(result) + result.impl = g_type_class_peek_parent(cast[ptr TypeClass00](self.impl)) + +proc g_type_class_unref*(self: ptr TypeClass00) {. + importc: "g_type_class_unref", libprag.} + +proc unref*(self: TypeClass) = + g_type_class_unref(cast[ptr TypeClass00](self.impl)) + +proc g_type_class_adjust_private_offset*(gClass: pointer; privateSizeOrOffset: ptr int32) {. + importc: "g_type_class_adjust_private_offset", libprag.} + +proc adjustPrivateOffset*(gClass: pointer; privateSizeOrOffset: ptr int32) {. + importc: "g_type_class_adjust_private_offset", libprag.} + +proc g_type_class_peek*(`type`: GType): ptr TypeClass00 {. + importc: "g_type_class_peek", libprag.} + +proc peek*(`type`: GType): TypeClass = + new(result) + result.impl = g_type_class_peek(`type`) + +proc g_type_class_peek_static*(`type`: GType): ptr TypeClass00 {. + importc: "g_type_class_peek_static", libprag.} + +proc peekStatic*(`type`: GType): TypeClass = + new(result) + result.impl = g_type_class_peek_static(`type`) + +proc g_type_class_ref*(`type`: GType): ptr TypeClass00 {. + importc: "g_type_class_ref", libprag.} + +proc `ref`*(`type`: GType): TypeClass = + new(result) + result.impl = g_type_class_ref(`type`) + +type + BaseFinalizeFunc* = proc (gClass: ptr TypeClass00) {.cdecl.} + +type + BaseInitFunc* = proc (gClass: ptr TypeClass00) {.cdecl.} + +type + TypeInstance00* {.pure.} = object + gClass*: ptr TypeClass00 + TypeInstance* = ref object + impl*: ptr TypeInstance00 + +proc g_type_instance_get_private*(self: ptr TypeInstance00; privateType: GType): pointer {. + importc: "g_type_instance_get_private", libprag.} + +proc getPrivate*(self: TypeInstance; privateType: GType): pointer = + g_type_instance_get_private(cast[ptr TypeInstance00](self.impl), privateType) + +proc private*(self: TypeInstance; privateType: GType): pointer = + g_type_instance_get_private(cast[ptr TypeInstance00](self.impl), privateType) + +type + Object00*{.inheritable, pure.} = object + gTypeInstance*: TypeInstance00 + refCount*: uint32 + qdata*: ptr glib.Data00 +type + GToggleNotify* = proc (data: pointer; obj: ptr Object00; isLastRef: gboolean) {.cdecl.} + +proc g_object_add_toggle_ref*(obj: ptr Object00; notify: GToggleNotify; data: pointer) {. + importc: "g_object_add_toggle_ref", libprag.} +proc g_object_remove_toggle_ref*(obj: ptr Object00; notify: GToggleNotify; data: pointer) {. + importc: "g_object_remove_toggle_ref", libprag.} + +proc g_object_set_qdata*(self: ptr Object00; quark: uint32; p: pointer) {. + importc: "g_object_set_qdata", libprag.} +proc toggleNotify*(data: pointer; obj: ptr Object00; isLastRef: gboolean) {.cdecl.} = + if isLastRef.int == 0: + GC_ref(cast[RootRef](data)) + echo "GC_ref(cast[RootRef](data)" + else: + GC_unref(cast[RootRef](data)) + echo "GC_unref(cast[RootRef](data)" + echo "toggleNotify" + echo obj.ref_count + +type + Object* = ref object of RootRef + impl*: ptr Object00 + +proc finalizeGObject*[T](o: T) = + echo("finalizeGObject") + g_object_remove_toggle_ref(o.impl, toggleNotify, addr(o[])) + +proc g_object_compat_control*(what: uint64; data: pointer): uint64 {. + importc: "g_object_compat_control", libprag.} + +proc compatControl*(what: uint64; data: pointer): uint64 {. + importc: "g_object_compat_control", libprag.} + +proc g_object_force_floating*(self: ptr Object00) {. + importc: "g_object_force_floating", libprag.} + +proc forceFloating*(self: Object) = + g_object_force_floating(cast[ptr Object00](self.impl)) + +proc g_object_freeze_notify*(self: ptr Object00) {. + importc: "g_object_freeze_notify", libprag.} + +proc freezeNotify*(self: Object) = + g_object_freeze_notify(cast[ptr Object00](self.impl)) + +proc g_object_get_data*(self: ptr Object00; key: cstring): pointer {. + importc: "g_object_get_data", libprag.} + +proc getData*(self: Object; key: string): pointer = + g_object_get_data(cast[ptr Object00](self.impl), cstring(key)) + +proc data*(self: Object; key: string): pointer = + g_object_get_data(cast[ptr Object00](self.impl), cstring(key)) + +proc g_object_get_qdata*(self: ptr Object00; quark: uint32): pointer {. + importc: "g_object_get_qdata", libprag.} + +proc getQdata*(self: Object; quark: int): pointer = + g_object_get_qdata(cast[ptr Object00](self.impl), uint32(quark)) + +proc qdata*(self: Object; quark: int): pointer = + g_object_get_qdata(cast[ptr Object00](self.impl), uint32(quark)) + +proc g_object_is_floating*(self: ptr Object00): gboolean {. + importc: "g_object_is_floating", libprag.} + +proc isFloating*(self: Object): bool = + toBool(g_object_is_floating(cast[ptr Object00](self.impl))) + +proc g_object_notify*(self: ptr Object00; propertyName: cstring) {. + importc: "g_object_notify", libprag.} + +proc notify*(self: Object; propertyName: string) = + g_object_notify(cast[ptr Object00](self.impl), cstring(propertyName)) + +proc g_object_ref*(self: ptr Object00): ptr Object00 {. + importc: "g_object_ref", libprag.} + +proc `ref`*(self: Object): Object = + let gobj = g_object_ref(cast[ptr Object00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + assert(false) + +proc g_object_ref_sink*(self: ptr Object00): ptr Object00 {. + importc: "g_object_ref_sink", libprag.} + +proc refSink*(self: Object): Object = + let gobj = g_object_ref_sink(cast[ptr Object00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + assert(false) + +proc g_object_replace_data*(self: ptr Object00; key: cstring; oldval: pointer; + newval: pointer; destroy: DestroyNotify; oldDestroy: ptr DestroyNotify): gboolean {. + importc: "g_object_replace_data", libprag.} + +proc replaceData*(self: Object; key: string; oldval: pointer; newval: pointer; + destroy: DestroyNotify; oldDestroy: ptr DestroyNotify): bool = + toBool(g_object_replace_data(cast[ptr Object00](self.impl), cstring(key), oldval, newval, destroy, oldDestroy)) + +proc g_object_replace_qdata*(self: ptr Object00; quark: uint32; oldval: pointer; + newval: pointer; destroy: DestroyNotify; oldDestroy: ptr DestroyNotify): gboolean {. + importc: "g_object_replace_qdata", libprag.} + +proc replaceQdata*(self: Object; quark: int; oldval: pointer; newval: pointer; + destroy: DestroyNotify; oldDestroy: ptr DestroyNotify): bool = + toBool(g_object_replace_qdata(cast[ptr Object00](self.impl), uint32(quark), oldval, newval, destroy, oldDestroy)) + +proc g_object_run_dispose*(self: ptr Object00) {. + importc: "g_object_run_dispose", libprag.} + +proc runDispose*(self: Object) = + g_object_run_dispose(cast[ptr Object00](self.impl)) + +proc g_object_set_data*(self: ptr Object00; key: cstring; data: pointer) {. + importc: "g_object_set_data", libprag.} + +proc setData*(self: Object; key: string; data: pointer) = + g_object_set_data(cast[ptr Object00](self.impl), cstring(key), data) + +proc g_object_steal_data*(self: ptr Object00; key: cstring): pointer {. + importc: "g_object_steal_data", libprag.} + +proc stealData*(self: Object; key: string): pointer = + g_object_steal_data(cast[ptr Object00](self.impl), cstring(key)) + +proc g_object_steal_qdata*(self: ptr Object00; quark: uint32): pointer {. + importc: "g_object_steal_qdata", libprag.} + +proc stealQdata*(self: Object; quark: int): pointer = + g_object_steal_qdata(cast[ptr Object00](self.impl), uint32(quark)) + +proc g_object_thaw_notify*(self: ptr Object00) {. + importc: "g_object_thaw_notify", libprag.} + +proc thawNotify*(self: Object) = + g_object_thaw_notify(cast[ptr Object00](self.impl)) + +proc g_object_unref*(self: ptr Object00) {. + importc: "g_object_unref", libprag.} + +proc unref*(self: Object) = + g_object_unref(cast[ptr Object00](self.impl)) + +type + Binding* = ref object of Object + Binding00* = object of Object00 + +proc g_binding_get_source*(self: ptr Binding00): ptr Object00 {. + importc: "g_binding_get_source", libprag.} + +proc getSource*(self: Binding): Object = + let gobj = g_binding_get_source(cast[ptr Binding00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc source*(self: Binding): Object = + let gobj = g_binding_get_source(cast[ptr Binding00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_binding_get_source_property*(self: ptr Binding00): cstring {. + importc: "g_binding_get_source_property", libprag.} + +proc getSourceProperty*(self: Binding): string = + let resul0 = g_binding_get_source_property(cast[ptr Binding00](self.impl)) + result = $resul0 + +proc sourceProperty*(self: Binding): string = + let resul0 = g_binding_get_source_property(cast[ptr Binding00](self.impl)) + result = $resul0 + +proc g_binding_get_target*(self: ptr Binding00): ptr Object00 {. + importc: "g_binding_get_target", libprag.} + +proc getTarget*(self: Binding): Object = + let gobj = g_binding_get_target(cast[ptr Binding00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc target*(self: Binding): Object = + let gobj = g_binding_get_target(cast[ptr Binding00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_binding_get_target_property*(self: ptr Binding00): cstring {. + importc: "g_binding_get_target_property", libprag.} + +proc getTargetProperty*(self: Binding): string = + let resul0 = g_binding_get_target_property(cast[ptr Binding00](self.impl)) + result = $resul0 + +proc targetProperty*(self: Binding): string = + let resul0 = g_binding_get_target_property(cast[ptr Binding00](self.impl)) + result = $resul0 + +proc g_binding_unbind*(self: ptr Binding00) {. + importc: "g_binding_unbind", libprag.} + +proc unbind*(self: Binding) = + g_binding_unbind(cast[ptr Binding00](self.impl)) + +type + TypeInterface00* {.pure.} = object + gType*: GType + gInstanceType*: GType + TypeInterface* = ref object + impl*: ptr TypeInterface00 + +proc g_type_interface_peek_parent*(self: ptr TypeInterface00): ptr TypeInterface00 {. + importc: "g_type_interface_peek_parent", libprag.} + +proc g_type_interface_add_prerequisite*(interfaceType: GType; prerequisiteType: GType) {. + importc: "g_type_interface_add_prerequisite", libprag.} + +proc g_type_interface_peek*(instanceClass: ptr TypeClass00; ifaceType: GType): ptr TypeInterface00 {. + importc: "g_type_interface_peek", libprag.} + +proc g_type_interface_prerequisites*(interfaceType: GType; nPrerequisites: var uint32): GTypeArray {. + importc: "g_type_interface_prerequisites", libprag.} + + +proc g_type_interface_get_plugin*(instanceType: GType; interfaceType: GType): ptr TypePlugin00 {. + importc: "g_type_interface_get_plugin", libprag.} + +type + ParamFlags* {.size: sizeof(cint), pure.} = enum + readable = 1 + writable = 2 + readwrite = 3 + construct = 4 + constructOnly = 8 + laxValidation = 16 + private = 32 + staticNick = 64 + staticBlurb = 128 + explicitNotify = 1073741824 + deprecated = 2147483648 + +const + ParamFlagsStaticName* = ParamFlags.private + +type + ParamSpec* = ref object of RootRef + impl*: ptr ParamSpec00 + ParamSpec00*{.inheritable, pure.} = object + gTypeInstance*: TypeInstance00 + name*: cstring + flags*: ParamFlags + valueType*: GType + ownerType*: GType + nick*: cstring + blurb*: cstring + qdata*: ptr glib.Data00 + refCount*: uint32 + paramId*: uint32 + +proc g_param_spec_get_blurb*(self: ptr ParamSpec00): cstring {. + importc: "g_param_spec_get_blurb", libprag.} + +proc g_param_spec_get_name*(self: ptr ParamSpec00): cstring {. + importc: "g_param_spec_get_name", libprag.} + +proc g_param_spec_get_name_quark*(self: ptr ParamSpec00): uint32 {. + importc: "g_param_spec_get_name_quark", libprag.} + +proc g_param_spec_get_nick*(self: ptr ParamSpec00): cstring {. + importc: "g_param_spec_get_nick", libprag.} + +proc g_param_spec_get_qdata*(self: ptr ParamSpec00; quark: uint32): pointer {. + importc: "g_param_spec_get_qdata", libprag.} + +proc g_param_spec_get_redirect_target*(self: ptr ParamSpec00): ptr ParamSpec00 {. + importc: "g_param_spec_get_redirect_target", libprag.} + +proc g_param_spec_set_qdata*(self: ptr ParamSpec00; quark: uint32; data: pointer) {. + importc: "g_param_spec_set_qdata", libprag.} + +proc g_param_spec_sink*(self: ptr ParamSpec00) {. + importc: "g_param_spec_sink", libprag.} + +proc g_param_spec_steal_qdata*(self: ptr ParamSpec00; quark: uint32): pointer {. + importc: "g_param_spec_steal_qdata", libprag.} + +proc g_object_interface_find_property*(gIface: ptr TypeInterface00; propertyName: cstring): ptr ParamSpec00 {. + importc: "g_object_interface_find_property", libprag.} + +proc g_object_interface_install_property*(gIface: ptr TypeInterface00; pspec: ptr ParamSpec00) {. + importc: "g_object_interface_install_property", libprag.} + +proc g_object_interface_list_properties*(gIface: ptr TypeInterface00; nPropertiesP: var uint32): ptr ParamSpec00Array {. + importc: "g_object_interface_list_properties", libprag.} + +proc g_object_notify_by_pspec*(self: ptr Object00; pspec: ptr ParamSpec00) {. + importc: "g_object_notify_by_pspec", libprag.} + +proc notifyByPspec*(self: Object; pspec: ParamSpec) = + g_object_notify_by_pspec(cast[ptr Object00](self.impl), cast[ptr ParamSpec00](pspec.impl)) + +type + BindingFlag* {.size: sizeof(cint), pure.} = enum + bidirectional = 1 + syncCreate = 2 + invertBoolean = 3 + + BindingFlags* {.size: sizeof(cint).} = set[BindingFlag] + +proc g_object_bind_property*(self: ptr Object00; sourceProperty: cstring; target: ptr Object00; + targetProperty: cstring; flags: BindingFlags): ptr Binding00 {. + importc: "g_object_bind_property", libprag.} + +proc bindProperty*(self: Object; sourceProperty: string; target: Object; + targetProperty: string; flags: BindingFlags): Binding = + let gobj = g_object_bind_property(cast[ptr Object00](self.impl), cstring(sourceProperty), cast[ptr Object00](target.impl), cstring(targetProperty), flags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Binding](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_binding_get_flags*(self: ptr Binding00): BindingFlags {. + importc: "g_binding_get_flags", libprag.} + +proc getFlags*(self: Binding): BindingFlags = + g_binding_get_flags(cast[ptr Binding00](self.impl)) + +proc flags*(self: Binding): BindingFlags = + g_binding_get_flags(cast[ptr Binding00](self.impl)) + +type + BoxedCopyFunc* = proc (boxed: pointer): pointer {.cdecl.} + +type + BoxedFreeFunc* = proc (boxed: pointer) {.cdecl.} + +type + Callback* = proc () {.cdecl.} + +type + ClassFinalizeFunc* = proc (gClass: ptr TypeClass00; classData: pointer) {.cdecl.} + +type + ClassInitFunc* = proc (gClass: ptr TypeClass00; classData: pointer) {.cdecl.} + +type + ConnectFlag* {.size: sizeof(cint), pure.} = enum + after = 1 + swapped = 2 + + ConnectFlags* {.size: sizeof(cint).} = set[ConnectFlag] + +type + EnumValue00* {.pure.} = object + value*: int32 + valueName*: cstring + valueNick*: cstring + EnumValue* = ref object + impl*: ptr EnumValue00 + +type + EnumClass00* {.pure.} = object + gTypeClass*: TypeClass00 + minimum*: int32 + maximum*: int32 + nValues*: uint32 + values*: ptr EnumValue00 + EnumClass* = ref object + impl*: ptr EnumClass00 + +type + FlagsValue00* {.pure.} = object + value*: uint32 + valueName*: cstring + valueNick*: cstring + FlagsValue* = ref object + impl*: ptr FlagsValue00 + +type + FlagsClass00* {.pure.} = object + gTypeClass*: TypeClass00 + mask*: uint32 + nValues*: uint32 + values*: ptr FlagsValue00 + FlagsClass* = ref object + impl*: ptr FlagsClass00 + +type + InitiallyUnowned* = ref object of Object + InitiallyUnowned00* = object of Object00 + +type + InstanceInitFunc* = proc (instance: ptr TypeInstance00; gClass: ptr TypeClass00) {.cdecl.} + +type + InterfaceFinalizeFunc* = proc (gIface: ptr TypeInterface00; ifaceData: pointer) {.cdecl.} + +type + InterfaceInitFunc* = proc (gIface: ptr TypeInterface00; ifaceData: pointer) {.cdecl.} + +type + InterfaceInfo00* {.pure.} = object + interfaceInit*: InterfaceInitFunc + interfaceFinalize*: InterfaceFinalizeFunc + interfaceData*: pointer + InterfaceInfo* = ref object + impl*: ptr InterfaceInfo00 + +type + ObjectFinalizeFunc* = proc (`object`: ptr Object00) {.cdecl.} + +const PARAM_MASK* = 255'i32 + +const PARAM_STATIC_STRINGS* = 0'i32 + +const PARAM_USER_SHIFT* = 8'i32 + +type + ParamSpecBoolean* = ref object of ParamSpec + ParamSpecBoolean00* = object of ParamSpec00 + defaultValue*: gboolean + +type + ParamSpecBoxed* = ref object of ParamSpec + ParamSpecBoxed00* = object of ParamSpec00 + +type + ParamSpecChar* = ref object of ParamSpec + ParamSpecChar00* = object of ParamSpec00 + minimum*: int8 + maximum*: int8 + defaultValue*: int8 + +type + ParamSpecDouble* = ref object of ParamSpec + ParamSpecDouble00* = object of ParamSpec00 + minimum*: cdouble + maximum*: cdouble + defaultValue*: cdouble + epsilon*: cdouble + +type + ParamSpecEnum* = ref object of ParamSpec + ParamSpecEnum00* = object of ParamSpec00 + enumClass*: ptr EnumClass00 + defaultValue*: int32 + +type + ParamSpecFlags* = ref object of ParamSpec + ParamSpecFlags00* = object of ParamSpec00 + flagsClass*: ptr FlagsClass00 + defaultValue*: uint32 + +type + ParamSpecFloat* = ref object of ParamSpec + ParamSpecFloat00* = object of ParamSpec00 + minimum*: cfloat + maximum*: cfloat + defaultValue*: cfloat + epsilon*: cfloat + +type + ParamSpecGType* = ref object of ParamSpec + ParamSpecGType00* = object of ParamSpec00 + isAType*: GType + +type + ParamSpecInt* = ref object of ParamSpec + ParamSpecInt00* = object of ParamSpec00 + minimum*: int32 + maximum*: int32 + defaultValue*: int32 + +type + ParamSpecInt64* = ref object of ParamSpec + ParamSpecInt6400* = object of ParamSpec00 + minimum*: int64 + maximum*: int64 + defaultValue*: int64 + +type + ParamSpecLong* = ref object of ParamSpec + ParamSpecLong00* = object of ParamSpec00 + minimum*: int64 + maximum*: int64 + defaultValue*: int64 + +type + ParamSpecObject* = ref object of ParamSpec + ParamSpecObject00* = object of ParamSpec00 + +type + ParamSpecOverride* = ref object of ParamSpec + ParamSpecOverride00* = object of ParamSpec00 + overridden*: ptr ParamSpec00 + +type + ParamSpecParam* = ref object of ParamSpec + ParamSpecParam00* = object of ParamSpec00 + +type + ParamSpecPointer* = ref object of ParamSpec + ParamSpecPointer00* = object of ParamSpec00 + +type + ParamSpecPool00* {.pure.} = object + ParamSpecPool* = ref object + impl*: ptr ParamSpecPool00 + +proc g_param_spec_pool_insert*(self: ptr ParamSpecPool00; pspec: ptr ParamSpec00; + ownerType: GType) {. + importc: "g_param_spec_pool_insert", libprag.} + +proc g_param_spec_pool_list*(self: ptr ParamSpecPool00; ownerType: GType; nPspecsP: var uint32): ptr ParamSpec00Array {. + importc: "g_param_spec_pool_list", libprag.} + +proc g_param_spec_pool_list_owned*(self: ptr ParamSpecPool00; ownerType: GType): ptr pointer {. + importc: "g_param_spec_pool_list_owned", libprag.} + +proc g_param_spec_pool_lookup*(self: ptr ParamSpecPool00; paramName: cstring; ownerType: GType; + walkAncestors: gboolean): ptr ParamSpec00 {. + importc: "g_param_spec_pool_lookup", libprag.} + +proc g_param_spec_pool_remove*(self: ptr ParamSpecPool00; pspec: ptr ParamSpec00) {. + importc: "g_param_spec_pool_remove", libprag.} + +proc g_param_spec_pool_new*(typePrefixing: gboolean): ptr ParamSpecPool00 {. + importc: "g_param_spec_pool_new", libprag.} + +type + ParamSpecString* = ref object of ParamSpec + ParamSpecString00* = object of ParamSpec00 + defaultValue*: cstring + csetFirst*: cstring + csetNth*: cstring + substitutor*: int8 + nullFoldIfEmpty*: uint32 + ensureNonNull*: uint32 + +type + ParamSpecUChar* = ref object of ParamSpec + ParamSpecUChar00* = object of ParamSpec00 + minimum*: uint8 + maximum*: uint8 + defaultValue*: uint8 + +type + ParamSpecUInt* = ref object of ParamSpec + ParamSpecUInt00* = object of ParamSpec00 + minimum*: uint32 + maximum*: uint32 + defaultValue*: uint32 + +type + ParamSpecUInt64* = ref object of ParamSpec + ParamSpecUInt6400* = object of ParamSpec00 + minimum*: uint64 + maximum*: uint64 + defaultValue*: uint64 + +type + ParamSpecULong* = ref object of ParamSpec + ParamSpecULong00* = object of ParamSpec00 + minimum*: uint64 + maximum*: uint64 + defaultValue*: uint64 + +type + ParamSpecUnichar* = ref object of ParamSpec + ParamSpecUnichar00* = object of ParamSpec00 + defaultValue*: gunichar + +type + ParamSpecValueArray* = ref object of ParamSpec + ParamSpecValueArray00* = object of ParamSpec00 + elementSpec*: ptr ParamSpec00 + fixedNElements*: uint32 + +type + ParamSpecVariant* = ref object of ParamSpec + ParamSpecVariant00* = object of ParamSpec00 + `type`*: ptr glib.VariantType00 + defaultValue*: ptr glib.Variant00 + padding1: array[4, pointer] + +const SIGNAL_FLAGS_MASK* = 511'i32 + +const SIGNAL_MATCH_MASK* = 63'i32 + +type + SignalFlag* {.size: sizeof(cint), pure.} = enum + runFirst = 1 + runLast = 2 + runCleanup = 3 + noRecurse = 4 + detailed = 5 + action = 6 + noHooks = 7 + mustCollect = 8 + deprecated = 9 + + SignalFlags* {.size: sizeof(cint).} = set[SignalFlag] + +type + SignalInvocationHint00* {.pure.} = object + signalId*: uint32 + detail*: uint32 + runType*: SignalFlags + SignalInvocationHint* = ref object + impl*: ptr SignalInvocationHint00 + +type + SignalMatchType* {.size: sizeof(cint), pure.} = enum + id = 1 + detail = 2 + closure = 4 + `func` = 8 + data = 16 + unblocked = 32 + +type + SignalQuery00* {.pure.} = object + signalId*: uint32 + signalName*: cstring + itype*: GType + signalFlags*: SignalFlags + returnType*: GType + nParams*: uint32 + paramTypes*: GTypeArray + SignalQuery* = ref object + impl*: ptr SignalQuery00 + +const TYPE_FLAG_RESERVED_ID_BIT* = 1'u64 + +const TYPE_FUNDAMENTAL_MAX* = 255'i32 + +const TYPE_FUNDAMENTAL_SHIFT* = 2'i32 + +const TYPE_RESERVED_BSE_FIRST* = 32'i32 + +const TYPE_RESERVED_BSE_LAST* = 48'i32 + +const TYPE_RESERVED_GLIB_FIRST* = 22'i32 + +const TYPE_RESERVED_GLIB_LAST* = 31'i32 + +const TYPE_RESERVED_USER_FIRST* = 49'i32 + +type + ToggleNotify* = proc (data: pointer; `object`: ptr Object00; isLastRef: gboolean) {.cdecl.} + +type + TypeCValue00* = object {.union.} + vInt*: int32 + vLong*: int64 + vInt64*: int64 + vDouble*: cdouble + vPointer*: pointer + TypeCValue* = ref object + impl*: ptr TypeCValue00 + +type + TypeClassCacheFunc* = proc (cacheData: pointer; gClass: ptr TypeClass00): gboolean {.cdecl.} + +type + TypeDebugFlags* {.size: sizeof(cint), pure.} = enum + none = 0 + objects = 1 + signals = 2 + instanceCount = 4 + mask = 7 + +type + TypeFlag* {.size: sizeof(cint), pure.} = enum + abstract = 5 + valueAbstract = 6 + + TypeFlags* {.size: sizeof(cint).} = set[TypeFlag] + +type + TypeFundamentalFlag* {.size: sizeof(cint), pure.} = enum + classed = 1 + instantiatable = 2 + derivable = 3 + deepDerivable = 4 + + TypeFundamentalFlags* {.size: sizeof(cint).} = set[TypeFundamentalFlag] + +type + TypeFundamentalInfo00* {.pure.} = object + typeFlags*: TypeFundamentalFlags + TypeFundamentalInfo* = ref object + impl*: ptr TypeFundamentalInfo00 + +type + TypeInterfaceCheckFunc* = proc (checkData: pointer; gIface: ptr TypeInterface00) {.cdecl.} + +type + TypeModule* = ref object of Object + TypeModule00* = object of Object00 + useCount*: uint32 + typeInfos*: ptr pointer + interfaceInfos*: ptr pointer + name*: cstring + +proc g_type_module_add_interface*(self: ptr TypeModule00; instanceType: GType; interfaceType: GType; + interfaceInfo: ptr InterfaceInfo00) {. + importc: "g_type_module_add_interface", libprag.} + +proc addInterface*(self: TypeModule; instanceType: GType; interfaceType: GType; + interfaceInfo: InterfaceInfo) = + g_type_module_add_interface(cast[ptr TypeModule00](self.impl), instanceType, interfaceType, cast[ptr InterfaceInfo00](interfaceInfo.impl)) + +proc g_type_module_register_enum*(self: ptr TypeModule00; name: cstring; constStaticValues: ptr EnumValue00): GType {. + importc: "g_type_module_register_enum", libprag.} + +proc registerEnum*(self: TypeModule; name: string; constStaticValues: EnumValue): GType = + g_type_module_register_enum(cast[ptr TypeModule00](self.impl), cstring(name), cast[ptr EnumValue00](constStaticValues.impl)) + +proc g_type_module_register_flags*(self: ptr TypeModule00; name: cstring; constStaticValues: ptr FlagsValue00): GType {. + importc: "g_type_module_register_flags", libprag.} + +proc registerFlags*(self: TypeModule; name: string; constStaticValues: FlagsValue): GType = + g_type_module_register_flags(cast[ptr TypeModule00](self.impl), cstring(name), cast[ptr FlagsValue00](constStaticValues.impl)) + +proc g_type_module_set_name*(self: ptr TypeModule00; name: cstring) {. + importc: "g_type_module_set_name", libprag.} + +proc setName*(self: TypeModule; name: string) = + g_type_module_set_name(cast[ptr TypeModule00](self.impl), cstring(name)) + +proc `name=`*(self: TypeModule; name: string) = + g_type_module_set_name(cast[ptr TypeModule00](self.impl), cstring(name)) + +proc g_type_module_unuse*(self: ptr TypeModule00) {. + importc: "g_type_module_unuse", libprag.} + +proc unuse*(self: TypeModule) = + g_type_module_unuse(cast[ptr TypeModule00](self.impl)) + +proc g_type_module_use*(self: ptr TypeModule00): gboolean {. + importc: "g_type_module_use", libprag.} + +proc use*(self: TypeModule): bool = + toBool(g_type_module_use(cast[ptr TypeModule00](self.impl))) + +type + TypePluginCompleteInterfaceInfo* = proc (plugin: ptr TypePlugin00; instanceType: GType; interfaceType: GType; + info: ptr InterfaceInfo00) {.cdecl.} + +type + TypePluginUnuse* = proc (plugin: ptr TypePlugin00) {.cdecl.} + +type + TypePluginUse* = proc (plugin: ptr TypePlugin00) {.cdecl.} + +type + TypeQuery00* {.pure.} = object + `type`*: GType + typeName*: cstring + classSize*: uint32 + instanceSize*: uint32 + TypeQuery* = ref object + impl*: ptr TypeQuery00 + +const VALUE_COLLECT_FORMAT_MAX_LENGTH* = 8'i32 + +const VALUE_NOCOPY_CONTENTS* = 134217728'i32 + +type + WeakNotify* = proc (data: pointer; whereTheObjectWas: ptr Object00) {.cdecl.} + +type + WeakRef00* {.pure.} = object + WeakRef* = ref object + impl*: ptr WeakRef00 + +type + ValueDataUnion00* = object {.union.} + vInt*: int32 + vUint*: uint32 + vLong*: int64 + vUlong*: uint64 + vInt64*: int64 + vUint64*: uint64 + vFloat*: cfloat + vDouble*: cdouble + vPointer*: pointer + ValueDataUnion* = ref object + impl*: ptr ValueDataUnion00 + +type + Value00* {.pure.} = object + gType*: GType + data*: array[2, ValueDataUnion00] + Value* = ref object + impl*: ptr Value00 + +proc g_value_copy*(self: ptr Value00; destValue: ptr Value00) {. + importc: "g_value_copy", libprag.} + +proc g_value_dup_object*(self: ptr Value00): ptr Object00 {. + importc: "g_value_dup_object", libprag.} + +proc g_value_dup_string*(self: ptr Value00): cstring {. + importc: "g_value_dup_string", libprag.} + +proc g_value_dup_variant*(self: ptr Value00): ptr glib.Variant00 {. + importc: "g_value_dup_variant", libprag.} + +proc g_value_fits_pointer*(self: ptr Value00): gboolean {. + importc: "g_value_fits_pointer", libprag.} + +proc g_value_get_boolean*(self: ptr Value00): gboolean {. + importc: "g_value_get_boolean", libprag.} + +proc g_value_get_boxed*(self: ptr Value00): pointer {. + importc: "g_value_get_boxed", libprag.} + +proc g_value_get_char*(self: ptr Value00): int8 {. + importc: "g_value_get_char", libprag.} + +proc g_value_get_double*(self: ptr Value00): cdouble {. + importc: "g_value_get_double", libprag.} + +proc g_value_get_enum*(self: ptr Value00): int32 {. + importc: "g_value_get_enum", libprag.} + +proc g_value_get_flags*(self: ptr Value00): uint32 {. + importc: "g_value_get_flags", libprag.} + +proc g_value_get_float*(self: ptr Value00): cfloat {. + importc: "g_value_get_float", libprag.} + +proc g_value_get_gtype*(self: ptr Value00): GType {. + importc: "g_value_get_gtype", libprag.} + +proc g_value_get_int*(self: ptr Value00): int32 {. + importc: "g_value_get_int", libprag.} + +proc g_value_get_int64*(self: ptr Value00): int64 {. + importc: "g_value_get_int64", libprag.} + +proc g_value_get_long*(self: ptr Value00): int64 {. + importc: "g_value_get_long", libprag.} + +proc g_value_get_object*(self: ptr Value00): ptr Object00 {. + importc: "g_value_get_object", libprag.} + +proc g_value_get_param*(self: ptr Value00): ptr ParamSpec00 {. + importc: "g_value_get_param", libprag.} + +proc g_value_get_pointer*(self: ptr Value00): pointer {. + importc: "g_value_get_pointer", libprag.} + +proc g_value_get_schar*(self: ptr Value00): int8 {. + importc: "g_value_get_schar", libprag.} + +proc g_value_get_string*(self: ptr Value00): cstring {. + importc: "g_value_get_string", libprag.} + +proc g_value_get_uchar*(self: ptr Value00): uint8 {. + importc: "g_value_get_uchar", libprag.} + +proc g_value_get_uint*(self: ptr Value00): uint32 {. + importc: "g_value_get_uint", libprag.} + +proc g_value_get_uint64*(self: ptr Value00): uint64 {. + importc: "g_value_get_uint64", libprag.} + +proc g_value_get_ulong*(self: ptr Value00): uint64 {. + importc: "g_value_get_ulong", libprag.} + +proc g_value_get_variant*(self: ptr Value00): ptr glib.Variant00 {. + importc: "g_value_get_variant", libprag.} + +proc g_value_init*(self: ptr Value00; gType: GType): ptr Value00 {. + importc: "g_value_init", libprag.} + +proc g_value_init_from_instance*(self: ptr Value00; instance: ptr TypeInstance00) {. + importc: "g_value_init_from_instance", libprag.} + +proc g_value_peek_pointer*(self: ptr Value00): pointer {. + importc: "g_value_peek_pointer", libprag.} + +proc g_value_reset*(self: ptr Value00): ptr Value00 {. + importc: "g_value_reset", libprag.} + +proc g_value_set_boolean*(self: ptr Value00; vBoolean: gboolean) {. + importc: "g_value_set_boolean", libprag.} + +proc g_value_set_boxed*(self: ptr Value00; vBoxed: pointer) {. + importc: "g_value_set_boxed", libprag.} + +proc g_value_set_boxed_take_ownership*(self: ptr Value00; vBoxed: pointer) {. + importc: "g_value_set_boxed_take_ownership", libprag.} + +proc g_value_set_char*(self: ptr Value00; vChar: int8) {. + importc: "g_value_set_char", libprag.} + +proc g_value_set_double*(self: ptr Value00; vDouble: cdouble) {. + importc: "g_value_set_double", libprag.} + +proc g_value_set_enum*(self: ptr Value00; vEnum: int32) {. + importc: "g_value_set_enum", libprag.} + +proc g_value_set_flags*(self: ptr Value00; vFlags: uint32) {. + importc: "g_value_set_flags", libprag.} + +proc g_value_set_float*(self: ptr Value00; vFloat: cfloat) {. + importc: "g_value_set_float", libprag.} + +proc g_value_set_gtype*(self: ptr Value00; vGtype: GType) {. + importc: "g_value_set_gtype", libprag.} + +proc g_value_set_instance*(self: ptr Value00; instance: pointer) {. + importc: "g_value_set_instance", libprag.} + +proc g_value_set_int*(self: ptr Value00; vInt: int32) {. + importc: "g_value_set_int", libprag.} + +proc g_value_set_int64*(self: ptr Value00; vInt64: int64) {. + importc: "g_value_set_int64", libprag.} + +proc g_value_set_long*(self: ptr Value00; vLong: int64) {. + importc: "g_value_set_long", libprag.} + +proc g_value_set_object*(self: ptr Value00; vObject: ptr Object00) {. + importc: "g_value_set_object", libprag.} + +proc g_value_set_param*(self: ptr Value00; param: ptr ParamSpec00) {. + importc: "g_value_set_param", libprag.} + +proc g_value_set_pointer*(self: ptr Value00; vPointer: pointer) {. + importc: "g_value_set_pointer", libprag.} + +proc g_value_set_schar*(self: ptr Value00; vChar: int8) {. + importc: "g_value_set_schar", libprag.} + +proc g_value_set_static_boxed*(self: ptr Value00; vBoxed: pointer) {. + importc: "g_value_set_static_boxed", libprag.} + +proc g_value_set_static_string*(self: ptr Value00; vString: cstring) {. + importc: "g_value_set_static_string", libprag.} + +proc g_value_set_string*(self: ptr Value00; vString: cstring) {. + importc: "g_value_set_string", libprag.} + +proc g_value_set_string_take_ownership*(self: ptr Value00; vString: cstring) {. + importc: "g_value_set_string_take_ownership", libprag.} + +proc g_value_set_uchar*(self: ptr Value00; vUchar: uint8) {. + importc: "g_value_set_uchar", libprag.} + +proc g_value_set_uint*(self: ptr Value00; vUint: uint32) {. + importc: "g_value_set_uint", libprag.} + +proc g_value_set_uint64*(self: ptr Value00; vUint64: uint64) {. + importc: "g_value_set_uint64", libprag.} + +proc g_value_set_ulong*(self: ptr Value00; vUlong: uint64) {. + importc: "g_value_set_ulong", libprag.} + +proc g_value_set_variant*(self: ptr Value00; variant: ptr glib.Variant00) {. + importc: "g_value_set_variant", libprag.} + +proc g_value_take_boxed*(self: ptr Value00; vBoxed: pointer) {. + importc: "g_value_take_boxed", libprag.} + +proc g_value_take_string*(self: ptr Value00; vString: cstring) {. + importc: "g_value_take_string", libprag.} + +proc g_value_take_variant*(self: ptr Value00; variant: ptr glib.Variant00) {. + importc: "g_value_take_variant", libprag.} + +proc g_value_transform*(self: ptr Value00; destValue: ptr Value00): gboolean {. + importc: "g_value_transform", libprag.} + +proc g_value_unset*(self: ptr Value00) {. + importc: "g_value_unset", libprag.} + +proc g_value_type_compatible*(srcType: GType; destType: GType): gboolean {. + importc: "g_value_type_compatible", libprag.} + +proc g_value_type_transformable*(srcType: GType; destType: GType): gboolean {. + importc: "g_value_type_transformable", libprag.} + +type + Parameter00* {.pure.} = object + name*: cstring + value*: Value00 + Parameter* = ref object + impl*: ptr Parameter00 +type + + ValueTransform* = proc (srcValue: ptr Value00; destValue: ptr Value00) {.cdecl.} + + ValueArray00* {.pure.} = object + nValues*: uint32 + values*: ptr Value00 + nPrealloced*: uint32 + ValueArray* = ref object + impl*: ptr ValueArray00 + +proc g_object_newv*(objectType: GType; nParameters: uint32; parameters: Parameter00Array): ptr Object00 {. + importc: "g_object_newv", libprag.} + +proc newObject*(objectType: GType; nParameters: int; parameters: Parameter00Array): Object = + new(result, finalizeGObject) + result.impl = g_object_newv(objectType, uint32(nParameters), parameters) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initObject*[T](result: var T; objectType: GType; nParameters: int; parameters: Parameter00Array) = + assert(result is Object) + new(result, finalizeGObject) + result.impl = g_object_newv(objectType, uint32(nParameters), parameters) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_object_get_property*(self: ptr Object00; propertyName: cstring; value: ptr Value00) {. + importc: "g_object_get_property", libprag.} + +proc getProperty*(self: Object; propertyName: string; value: Value) = + g_object_get_property(cast[ptr Object00](self.impl), cstring(propertyName), cast[ptr Value00](value.impl)) + +proc property*(self: Object; propertyName: string; value: Value) = + g_object_get_property(cast[ptr Object00](self.impl), cstring(propertyName), cast[ptr Value00](value.impl)) + +proc g_object_set_property*(self: ptr Object00; propertyName: cstring; value: ptr Value00) {. + importc: "g_object_set_property", libprag.} + +proc setProperty*(self: Object; propertyName: string; value: Value) = + g_object_set_property(cast[ptr Object00](self.impl), cstring(propertyName), cast[ptr Value00](value.impl)) + +proc g_param_spec_get_default_value*(self: ptr ParamSpec00): ptr Value00 {. + importc: "g_param_spec_get_default_value", libprag.} + +proc g_boxed_copy*(boxedType: GType; srcBoxed: pointer): pointer {. + importc: "g_boxed_copy", libprag.} + +proc boxedCopy*(boxedType: GType; srcBoxed: pointer): pointer {. + importc: "g_boxed_copy", libprag.} + +type + TypeValueTable00* {.pure.} = object + valueInit*: proc(value: ptr Value00) {.cdecl.} + valueFree*: proc(value: ptr Value00) {.cdecl.} + valueCopy*: proc(srcValue: ptr Value00; destValue: ptr Value00) {.cdecl.} + valuePeekPointer*: proc(value: ptr Value00): pointer {.cdecl.} + collectFormat*: cstring + collectValue*: proc(value: ptr Value00; nCollectValues: uint32; collectValues: ptr TypeCValue00; + collectFlags: uint32): cstring {.cdecl.} + lcopyFormat*: cstring + lcopyValue*: proc(value: ptr Value00; nCollectValues: uint32; collectValues: ptr TypeCValue00; + collectFlags: uint32): cstring {.cdecl.} + TypeValueTable* = ref object + impl*: ptr TypeValueTable00 + +type + TypeInfo00* {.pure.} = object + classSize*: uint16 + baseInit*: BaseInitFunc + baseFinalize*: BaseFinalizeFunc + classInit*: ClassInitFunc + classFinalize*: ClassFinalizeFunc + classData*: pointer + instanceSize*: uint16 + nPreallocs*: uint16 + instanceInit*: InstanceInitFunc + valueTable*: ptr TypeValueTable00 + TypeInfo* = ref object + impl*: ptr TypeInfo00 + +type + SignalEmissionHook* = proc (ihint: ptr SignalInvocationHint00; nParamValues: uint32; + paramValues: Value00Array; data: pointer): gboolean {.cdecl.} + +type + SignalAccumulator* = proc (ihint: ptr SignalInvocationHint00; returnAccu: ptr Value00; + handlerReturn: ptr Value00; data: pointer): gboolean {.cdecl.} + +type + ParamSpecTypeInfo00* {.pure.} = object + instanceSize*: uint16 + nPreallocs*: uint16 + instanceInit*: proc(pspec: ptr ParamSpec00) {.cdecl.} + valueType*: GType + finalize*: proc(pspec: ptr ParamSpec00) {.cdecl.} + valueSetDefault*: proc(pspec: ptr ParamSpec00; value: ptr Value00) {.cdecl.} + valueValidate*: proc(pspec: ptr ParamSpec00; value: ptr Value00): gboolean {.cdecl.} + valuesCmp*: proc(pspec: ptr ParamSpec00; value1: ptr Value00; value2: ptr Value00): int32 {.cdecl.} + ParamSpecTypeInfo* = ref object + impl*: ptr ParamSpecTypeInfo00 + +type + ParamSpecClass00* {.pure.} = object + gTypeClass*: TypeClass00 + valueType*: GType + finalize*: proc(pspec: ptr ParamSpec00) {.cdecl.} + valueSetDefault*: proc(pspec: ptr ParamSpec00; value: ptr Value00) {.cdecl.} + valueValidate*: proc(pspec: ptr ParamSpec00; value: ptr Value00): gboolean {.cdecl.} + valuesCmp*: proc(pspec: ptr ParamSpec00; value1: ptr Value00; value2: ptr Value00): int32 {.cdecl.} + dummy*: array[4, pointer] + ParamSpecClass* = ref object + impl*: ptr ParamSpecClass00 + +type + ObjectSetPropertyFunc* = proc (`object`: ptr Object00; propertyId: uint32; value: ptr Value00; + pspec: ptr ParamSpec00) {.cdecl.} + +type + ObjectGetPropertyFunc* = proc (`object`: ptr Object00; propertyId: uint32; value: ptr Value00; + pspec: ptr ParamSpec00) {.cdecl.} + +type + ObjectConstructParam00* {.pure.} = object + pspec*: ptr ParamSpec00 + value*: ptr Value00 + ObjectConstructParam* = ref object + impl*: ptr ObjectConstructParam00 + +type + ObjectClass00* {.pure.} = object + gTypeClass*: TypeClass00 + constructProperties*: ptr pointer + constructor*: pointer + setProperty*: proc(`object`: ptr Object00; propertyId: uint32; value: ptr Value00; + pspec: ptr ParamSpec00) {.cdecl.} + getProperty*: proc(`object`: ptr Object00; propertyId: uint32; value: ptr Value00; + pspec: ptr ParamSpec00) {.cdecl.} + dispose*: proc(`object`: ptr Object00) {.cdecl.} + finalize*: proc(`object`: ptr Object00) {.cdecl.} + dispatchPropertiesChanged*: proc(`object`: ptr Object00; nPspecs: uint32; pspecs: ptr ParamSpec00) {.cdecl.} + notify*: proc(`object`: ptr Object00; pspec: ptr ParamSpec00) {.cdecl.} + constructed*: proc(`object`: ptr Object00) {.cdecl.} + flags*: uint64 + pdummy*: array[6, pointer] + ObjectClass* = ref object + impl*: ptr ObjectClass00 + +type + InitiallyUnownedClass00* {.pure.} = object + gTypeClass*: TypeClass00 + constructProperties*: ptr pointer + constructor*: pointer + setProperty*: proc(`object`: ptr Object00; propertyId: uint32; value: ptr Value00; + pspec: ptr ParamSpec00) {.cdecl.} + getProperty*: proc(`object`: ptr Object00; propertyId: uint32; value: ptr Value00; + pspec: ptr ParamSpec00) {.cdecl.} + dispose*: proc(`object`: ptr Object00) {.cdecl.} + finalize*: proc(`object`: ptr Object00) {.cdecl.} + dispatchPropertiesChanged*: proc(`object`: ptr Object00; nPspecs: uint32; pspecs: ptr ParamSpec00) {.cdecl.} + notify*: proc(`object`: ptr Object00; pspec: ptr ParamSpec00) {.cdecl.} + constructed*: proc(`object`: ptr Object00) {.cdecl.} + flags*: uint64 + pdummy*: array[6, pointer] + InitiallyUnownedClass* = ref object + impl*: ptr InitiallyUnownedClass00 + +type + BindingTransformFunc* = proc (binding: ptr Binding00; fromValue: ptr Value00; toValue: ptr Value00; + userData: pointer): gboolean {.cdecl.} +type + + TypePluginCompleteTypeInfo* = proc (plugin: ptr TypePlugin00; gType: GType; info: ptr TypeInfo00; + valueTable: ptr TypeValueTable00) {.cdecl.} + + TypePluginClass00* {.pure.} = object + baseIface*: TypeInterface00 + usePlugin*: TypePluginUse + unusePlugin*: TypePluginUnuse + completeTypeInfo*: TypePluginCompleteTypeInfo + completeInterfaceInfo*: TypePluginCompleteInterfaceInfo + TypePluginClass* = ref object + impl*: ptr TypePluginClass00 + +proc g_type_module_register_type*(self: ptr TypeModule00; parentType: GType; typeName: cstring; + typeInfo: ptr TypeInfo00; flags: TypeFlags): GType {. + importc: "g_type_module_register_type", libprag.} + +proc registerType*(self: TypeModule; parentType: GType; typeName: string; + typeInfo: TypeInfo; flags: TypeFlags): GType = + g_type_module_register_type(cast[ptr TypeModule00](self.impl), parentType, cstring(typeName), cast[ptr TypeInfo00](typeInfo.impl), flags) + +proc g_boxed_free*(boxedType: GType; boxed: pointer) {. + importc: "g_boxed_free", libprag.} + +proc boxedFree*(boxedType: GType; boxed: pointer) {. + importc: "g_boxed_free", libprag.} + +type + TypeModuleClass00* {.pure.} = object + parentClass*: ObjectClass00 + load*: proc(module: ptr TypeModule00): gboolean {.cdecl.} + unload*: proc(module: ptr TypeModule00) {.cdecl.} + reserved1*: proc() {.cdecl.} + reserved2*: proc() {.cdecl.} + reserved3*: proc() {.cdecl.} + reserved4*: proc() {.cdecl.} + TypeModuleClass* = ref object + impl*: ptr TypeModuleClass00 +type + + ClosureNotify* = proc (data: pointer; closure: ptr Closure00) {.cdecl.} + + ClosureNotifyData00* {.pure.} = object + data*: pointer + notify*: ClosureNotify + ClosureNotifyData* = ref object + impl*: ptr ClosureNotifyData00 + + Closure00* {.pure.} = object + refCount*: uint32 + metaMarshalNouse*: uint32 + nGuards*: uint32 + nFnotifiers*: uint32 + nInotifiers*: uint32 + inInotify*: uint32 + floating*: uint32 + derivativeFlag*: uint32 + inMarshal*: uint32 + isInvalid*: uint32 + marshal*: proc(closure: ptr Closure00; returnValue: ptr Value00; + nParamValues: uint32; paramValues: ptr Value00; invocationHint: pointer; marshalData: pointer) {.cdecl.} + data*: pointer + notifiers*: ptr ClosureNotifyData00 + Closure* = ref object + impl*: ptr Closure00 + +proc g_closure_new_object*(sizeofClosure: uint32; `object`: ptr Object00): ptr Closure00 {. + importc: "g_closure_new_object", libprag.} + +proc newClosureObject*(sizeofClosure: int; `object`: Object): Closure = + new(result) + result.impl = g_closure_new_object(uint32(sizeofClosure), cast[ptr Object00](`object`.impl)) + +proc initClosureObject*[T](result: var T; sizeofClosure: int; `object`: Object) = + assert(result is Closure) + new(result) + result.impl = g_closure_new_object(uint32(sizeofClosure), cast[ptr Object00](`object`.impl)) + +proc g_closure_new_simple*(sizeofClosure: uint32; data: pointer): ptr Closure00 {. + importc: "g_closure_new_simple", libprag.} + +proc newClosureSimple*(sizeofClosure: int; data: pointer): Closure = + new(result) + result.impl = g_closure_new_simple(uint32(sizeofClosure), data) + +proc initClosureSimple*[T](result: var T; sizeofClosure: int; data: pointer) = + assert(result is Closure) + new(result) + result.impl = g_closure_new_simple(uint32(sizeofClosure), data) + +proc g_closure_invalidate*(self: ptr Closure00) {. + importc: "g_closure_invalidate", libprag.} + +proc invalidate*(self: Closure) = + g_closure_invalidate(cast[ptr Closure00](self.impl)) + +proc g_closure_invoke*(self: ptr Closure00; returnValue: var Value00; nParamValues: uint32; + paramValues: Value00Array; invocationHint: pointer) {. + importc: "g_closure_invoke", libprag.} + +proc invoke*(self: ptr Closure00; returnValue: var Value00; nParamValues: uint32; + paramValues: Value00Array; invocationHint: pointer) {. + importc: "g_closure_invoke", libprag.} + +proc g_closure_ref*(self: ptr Closure00): ptr Closure00 {. + importc: "g_closure_ref", libprag.} + +proc `ref`*(self: Closure): Closure = + new(result) + result.impl = g_closure_ref(cast[ptr Closure00](self.impl)) + +proc g_closure_sink*(self: ptr Closure00) {. + importc: "g_closure_sink", libprag.} + +proc sink*(self: Closure) = + g_closure_sink(cast[ptr Closure00](self.impl)) + +proc g_closure_unref*(self: ptr Closure00) {. + importc: "g_closure_unref", libprag.} + +proc unref*(self: Closure) = + g_closure_unref(cast[ptr Closure00](self.impl)) + +proc g_object_bind_property_with_closures*(self: ptr Object00; sourceProperty: cstring; target: ptr Object00; + targetProperty: cstring; flags: BindingFlags; transformTo: ptr Closure00; transformFrom: ptr Closure00): ptr Binding00 {. + importc: "g_object_bind_property_with_closures", libprag.} + +proc bindPropertyFull*(self: Object; sourceProperty: string; target: Object; + targetProperty: string; flags: BindingFlags; transformTo: Closure; transformFrom: Closure): Binding = + let gobj = g_object_bind_property_with_closures(cast[ptr Object00](self.impl), cstring(sourceProperty), cast[ptr Object00](target.impl), cstring(targetProperty), flags, cast[ptr Closure00](transformTo.impl), cast[ptr Closure00](transformFrom.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Binding](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc g_object_watch_closure*(self: ptr Object00; closure: ptr Closure00) {. + importc: "g_object_watch_closure", libprag.} + +proc watchClosure*(self: Object; closure: Closure) = + g_object_watch_closure(cast[ptr Object00](self.impl), cast[ptr Closure00](closure.impl)) +proc g_signal_connect_data*(instance: pointer; detailedSignal: cstring; cHandler: GCallback; + data: pointer; destroyData: ClosureNotify; connectFlags: ConnectFlags): culong {. + importc: "g_signal_connect_data", libprag.} + +type + ClosureMarshal* = proc (closure: ptr Closure00; returnValue: ptr Value00; + nParamValues: uint32; paramValues: Value00Array; invocationHint: pointer; marshalData: pointer) {.cdecl.} + +type + CClosure00* {.pure.} = object + closure*: Closure00 + callback*: pointer + CClosure* = ref object + impl*: ptr CClosure00 + +proc g_enum_complete_type_info*(gEnumType: GType; info: var TypeInfo00; constValues: ptr EnumValue00) {. + importc: "g_enum_complete_type_info", libprag.} + +proc enumCompleteTypeInfo*(gEnumType: GType; info: var TypeInfo00; constValues: ptr EnumValue00) {. + importc: "g_enum_complete_type_info", libprag.} + +proc g_enum_get_value*(enumClass: ptr EnumClass00; value: int32): ptr EnumValue00 {. + importc: "g_enum_get_value", libprag.} + +proc enumGetValue*(enumClass: EnumClass; value: int): EnumValue = + new(result) + result.impl = g_enum_get_value(cast[ptr EnumClass00](enumClass.impl), int32(value)) + +proc g_enum_get_value_by_name*(enumClass: ptr EnumClass00; name: cstring): ptr EnumValue00 {. + importc: "g_enum_get_value_by_name", libprag.} + +proc enumGetValueByName*(enumClass: EnumClass; name: string): EnumValue = + new(result) + result.impl = g_enum_get_value_by_name(cast[ptr EnumClass00](enumClass.impl), cstring(name)) + +proc g_enum_get_value_by_nick*(enumClass: ptr EnumClass00; nick: cstring): ptr EnumValue00 {. + importc: "g_enum_get_value_by_nick", libprag.} + +proc enumGetValueByNick*(enumClass: EnumClass; nick: string): EnumValue = + new(result) + result.impl = g_enum_get_value_by_nick(cast[ptr EnumClass00](enumClass.impl), cstring(nick)) + +proc g_enum_register_static*(name: cstring; constStaticValues: ptr EnumValue00): GType {. + importc: "g_enum_register_static", libprag.} + +proc enumRegisterStatic*(name: string; constStaticValues: EnumValue): GType = + g_enum_register_static(cstring(name), cast[ptr EnumValue00](constStaticValues.impl)) + +proc g_flags_complete_type_info*(gFlagsType: GType; info: var TypeInfo00; constValues: ptr FlagsValue00) {. + importc: "g_flags_complete_type_info", libprag.} + +proc flagsCompleteTypeInfo*(gFlagsType: GType; info: var TypeInfo00; constValues: ptr FlagsValue00) {. + importc: "g_flags_complete_type_info", libprag.} + +proc g_flags_get_first_value*(flagsClass: ptr FlagsClass00; value: uint32): ptr FlagsValue00 {. + importc: "g_flags_get_first_value", libprag.} + +proc flagsGetFirstValue*(flagsClass: FlagsClass; value: int): FlagsValue = + new(result) + result.impl = g_flags_get_first_value(cast[ptr FlagsClass00](flagsClass.impl), uint32(value)) + +proc g_flags_get_value_by_name*(flagsClass: ptr FlagsClass00; name: cstring): ptr FlagsValue00 {. + importc: "g_flags_get_value_by_name", libprag.} + +proc flagsGetValueByName*(flagsClass: FlagsClass; name: string): FlagsValue = + new(result) + result.impl = g_flags_get_value_by_name(cast[ptr FlagsClass00](flagsClass.impl), cstring(name)) + +proc g_flags_get_value_by_nick*(flagsClass: ptr FlagsClass00; nick: cstring): ptr FlagsValue00 {. + importc: "g_flags_get_value_by_nick", libprag.} + +proc flagsGetValueByNick*(flagsClass: FlagsClass; nick: string): FlagsValue = + new(result) + result.impl = g_flags_get_value_by_nick(cast[ptr FlagsClass00](flagsClass.impl), cstring(nick)) + +proc g_flags_register_static*(name: cstring; constStaticValues: ptr FlagsValue00): GType {. + importc: "g_flags_register_static", libprag.} + +proc flagsRegisterStatic*(name: string; constStaticValues: FlagsValue): GType = + g_flags_register_static(cstring(name), cast[ptr FlagsValue00](constStaticValues.impl)) + +proc g_gtype_get_type*(): GType {. + importc: "g_gtype_get_type", libprag.} + +proc gtypeGetType*(): GType {. + importc: "g_gtype_get_type", libprag.} + +proc g_param_spec_boolean*(name: cstring; nick: cstring; blurb: cstring; defaultValue: gboolean; + flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_boolean", libprag.} + +proc g_param_spec_boxed*(name: cstring; nick: cstring; blurb: cstring; boxedType: GType; + flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_boxed", libprag.} + +proc g_param_spec_char*(name: cstring; nick: cstring; blurb: cstring; minimum: int8; + maximum: int8; defaultValue: int8; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_char", libprag.} + +proc g_param_spec_double*(name: cstring; nick: cstring; blurb: cstring; minimum: cdouble; + maximum: cdouble; defaultValue: cdouble; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_double", libprag.} + +proc g_param_spec_enum*(name: cstring; nick: cstring; blurb: cstring; enumType: GType; + defaultValue: int32; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_enum", libprag.} + +proc g_param_spec_flags*(name: cstring; nick: cstring; blurb: cstring; flagsType: GType; + defaultValue: uint32; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_flags", libprag.} + +proc g_param_spec_float*(name: cstring; nick: cstring; blurb: cstring; minimum: cfloat; + maximum: cfloat; defaultValue: cfloat; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_float", libprag.} + +proc g_param_spec_gtype*(name: cstring; nick: cstring; blurb: cstring; isAType: GType; + flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_gtype", libprag.} + +proc g_param_spec_int*(name: cstring; nick: cstring; blurb: cstring; minimum: int32; + maximum: int32; defaultValue: int32; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_int", libprag.} + +proc g_param_spec_int64*(name: cstring; nick: cstring; blurb: cstring; minimum: int64; + maximum: int64; defaultValue: int64; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_int64", libprag.} + +proc g_param_spec_long*(name: cstring; nick: cstring; blurb: cstring; minimum: int64; + maximum: int64; defaultValue: int64; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_long", libprag.} + +proc g_param_spec_object*(name: cstring; nick: cstring; blurb: cstring; objectType: GType; + flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_object", libprag.} + +proc g_param_spec_param*(name: cstring; nick: cstring; blurb: cstring; paramType: GType; + flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_param", libprag.} + +proc g_param_spec_pointer*(name: cstring; nick: cstring; blurb: cstring; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_pointer", libprag.} + +proc g_param_spec_string*(name: cstring; nick: cstring; blurb: cstring; defaultValue: cstring; + flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_string", libprag.} + +proc g_param_spec_uchar*(name: cstring; nick: cstring; blurb: cstring; minimum: uint8; + maximum: uint8; defaultValue: uint8; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_uchar", libprag.} + +proc g_param_spec_uint*(name: cstring; nick: cstring; blurb: cstring; minimum: uint32; + maximum: uint32; defaultValue: uint32; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_uint", libprag.} + +proc g_param_spec_uint64*(name: cstring; nick: cstring; blurb: cstring; minimum: uint64; + maximum: uint64; defaultValue: uint64; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_uint64", libprag.} + +proc g_param_spec_ulong*(name: cstring; nick: cstring; blurb: cstring; minimum: uint64; + maximum: uint64; defaultValue: uint64; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_ulong", libprag.} + +proc g_param_spec_unichar*(name: cstring; nick: cstring; blurb: cstring; defaultValue: gunichar; + flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_unichar", libprag.} + +proc g_param_spec_variant*(name: cstring; nick: cstring; blurb: cstring; `type`: ptr glib.VariantType00; + defaultValue: ptr glib.Variant00; flags: ParamFlags): ptr ParamSpec00 {. + importc: "g_param_spec_variant", libprag.} + +proc g_param_type_register_static*(name: cstring; pspecInfo: ptr ParamSpecTypeInfo00): GType {. + importc: "g_param_type_register_static", libprag.} + +proc paramTypeRegisterStatic*(name: string; pspecInfo: ParamSpecTypeInfo): GType = + g_param_type_register_static(cstring(name), cast[ptr ParamSpecTypeInfo00](pspecInfo.impl)) + +proc g_param_value_convert*(pspec: ptr ParamSpec00; srcValue: ptr Value00; destValue: ptr Value00; + strictValidation: gboolean): gboolean {. + importc: "g_param_value_convert", libprag.} + +proc paramValueConvert*(pspec: ParamSpec; srcValue: Value; destValue: Value; + strictValidation: bool): bool = + toBool(g_param_value_convert(cast[ptr ParamSpec00](pspec.impl), cast[ptr Value00](srcValue.impl), cast[ptr Value00](destValue.impl), gboolean(strictValidation))) + +proc g_param_value_defaults*(pspec: ptr ParamSpec00; value: ptr Value00): gboolean {. + importc: "g_param_value_defaults", libprag.} + +proc paramValueDefaults*(pspec: ParamSpec; value: Value): bool = + toBool(g_param_value_defaults(cast[ptr ParamSpec00](pspec.impl), cast[ptr Value00](value.impl))) + +proc g_param_value_set_default*(pspec: ptr ParamSpec00; value: ptr Value00) {. + importc: "g_param_value_set_default", libprag.} + +proc paramValueSetDefault*(pspec: ParamSpec; value: Value) = + g_param_value_set_default(cast[ptr ParamSpec00](pspec.impl), cast[ptr Value00](value.impl)) + +proc g_param_value_validate*(pspec: ptr ParamSpec00; value: ptr Value00): gboolean {. + importc: "g_param_value_validate", libprag.} + +proc paramValueValidate*(pspec: ParamSpec; value: Value): bool = + toBool(g_param_value_validate(cast[ptr ParamSpec00](pspec.impl), cast[ptr Value00](value.impl))) + +proc g_param_values_cmp*(pspec: ptr ParamSpec00; value1: ptr Value00; value2: ptr Value00): int32 {. + importc: "g_param_values_cmp", libprag.} + +proc paramValuesCmp*(pspec: ParamSpec; value1: Value; value2: Value): int = + int(g_param_values_cmp(cast[ptr ParamSpec00](pspec.impl), cast[ptr Value00](value1.impl), cast[ptr Value00](value2.impl))) + +proc g_pointer_type_register_static*(name: cstring): GType {. + importc: "g_pointer_type_register_static", libprag.} + +proc pointerTypeRegisterStatic*(name: cstring): GType {. + importc: "g_pointer_type_register_static", libprag.} + +proc g_signal_accumulator_first_wins*(ihint: ptr SignalInvocationHint00; returnAccu: ptr Value00; + handlerReturn: ptr Value00; dummy: pointer): gboolean {. + importc: "g_signal_accumulator_first_wins", libprag.} + +proc signalAccumulatorFirstWins*(ihint: SignalInvocationHint; returnAccu: Value; handlerReturn: Value; + dummy: pointer): bool = + toBool(g_signal_accumulator_first_wins(cast[ptr SignalInvocationHint00](ihint.impl), cast[ptr Value00](returnAccu.impl), cast[ptr Value00](handlerReturn.impl), dummy)) + +proc g_signal_accumulator_true_handled*(ihint: ptr SignalInvocationHint00; returnAccu: ptr Value00; + handlerReturn: ptr Value00; dummy: pointer): gboolean {. + importc: "g_signal_accumulator_true_handled", libprag.} + +proc signalAccumulatorTrueHandled*(ihint: SignalInvocationHint; returnAccu: Value; handlerReturn: Value; + dummy: pointer): bool = + toBool(g_signal_accumulator_true_handled(cast[ptr SignalInvocationHint00](ihint.impl), cast[ptr Value00](returnAccu.impl), cast[ptr Value00](handlerReturn.impl), dummy)) + +proc g_signal_add_emission_hook*(signalId: uint32; detail: uint32; hookFunc: SignalEmissionHook; + hookData: pointer; dataDestroy: DestroyNotify): uint64 {. + importc: "g_signal_add_emission_hook", libprag.} + +proc signalAddEmissionHook*(signalId: uint32; detail: uint32; hookFunc: SignalEmissionHook; + hookData: pointer; dataDestroy: DestroyNotify): uint64 {. + importc: "g_signal_add_emission_hook", libprag.} + +proc g_signal_chain_from_overridden*(instanceAndParams: Value00Array; returnValue: ptr Value00) {. + importc: "g_signal_chain_from_overridden", libprag.} + +proc signalChainFromOverridden*(instanceAndParams: Value00Array; returnValue: Value) = + g_signal_chain_from_overridden(instanceAndParams, cast[ptr Value00](returnValue.impl)) + +proc g_signal_connect_closure*(instance: ptr Object00; detailedSignal: cstring; closure: ptr Closure00; + after: gboolean): uint64 {. + importc: "g_signal_connect_closure", libprag.} + +proc signalConnectClosure*(instance: Object; detailedSignal: string; closure: Closure; + after: bool): uint64 = + g_signal_connect_closure(cast[ptr Object00](instance.impl), cstring(detailedSignal), cast[ptr Closure00](closure.impl), gboolean(after)) + +proc g_signal_connect_closure_by_id*(instance: ptr Object00; signalId: uint32; detail: uint32; + closure: ptr Closure00; after: gboolean): uint64 {. + importc: "g_signal_connect_closure_by_id", libprag.} + +proc signalConnectClosureById*(instance: Object; signalId: int; detail: int; closure: Closure; + after: bool): uint64 = + g_signal_connect_closure_by_id(cast[ptr Object00](instance.impl), uint32(signalId), uint32(detail), cast[ptr Closure00](closure.impl), gboolean(after)) + +proc g_signal_emitv*(instanceAndParams: Value00Array; signalId: uint32; + detail: uint32; returnValue: Value00) {. + importc: "g_signal_emitv", libprag.} + +proc signalEmitv*(instanceAndParams: Value00Array; signalId: uint32; + detail: uint32; returnValue: Value00) {. + importc: "g_signal_emitv", libprag.} + +proc g_signal_get_invocation_hint*(instance: ptr Object00): ptr SignalInvocationHint00 {. + importc: "g_signal_get_invocation_hint", libprag.} + +proc signalGetInvocationHint*(instance: Object): SignalInvocationHint = + new(result) + result.impl = g_signal_get_invocation_hint(cast[ptr Object00](instance.impl)) + +proc g_signal_handler_block*(instance: ptr Object00; handlerId: uint64) {. + importc: "g_signal_handler_block", libprag.} + +proc signalHandlerBlock*(instance: Object; handlerId: uint64) = + g_signal_handler_block(cast[ptr Object00](instance.impl), handlerId) + +proc g_signal_handler_disconnect*(instance: ptr Object00; handlerId: uint64) {. + importc: "g_signal_handler_disconnect", libprag.} + +proc signalHandlerDisconnect*(instance: Object; handlerId: uint64) = + g_signal_handler_disconnect(cast[ptr Object00](instance.impl), handlerId) + +proc g_signal_handler_find*(instance: ptr Object00; mask: SignalMatchType; signalId: uint32; + detail: uint32; closure: ptr Closure00; `func`: pointer; data: pointer): uint64 {. + importc: "g_signal_handler_find", libprag.} + +proc signalHandlerFind*(instance: Object; mask: SignalMatchType; signalId: int; + detail: int; closure: Closure; `func`: pointer; data: pointer): uint64 = + g_signal_handler_find(cast[ptr Object00](instance.impl), mask, uint32(signalId), uint32(detail), cast[ptr Closure00](closure.impl), `func`, data) + +proc g_signal_handler_is_connected*(instance: ptr Object00; handlerId: uint64): gboolean {. + importc: "g_signal_handler_is_connected", libprag.} + +proc signalHandlerIsConnected*(instance: Object; handlerId: uint64): bool = + toBool(g_signal_handler_is_connected(cast[ptr Object00](instance.impl), handlerId)) + +proc g_signal_handler_unblock*(instance: ptr Object00; handlerId: uint64) {. + importc: "g_signal_handler_unblock", libprag.} + +proc signalHandlerUnblock*(instance: Object; handlerId: uint64) = + g_signal_handler_unblock(cast[ptr Object00](instance.impl), handlerId) + +proc g_signal_handlers_block_matched*(instance: ptr Object00; mask: SignalMatchType; signalId: uint32; + detail: uint32; closure: ptr Closure00; `func`: pointer; data: pointer): uint32 {. + importc: "g_signal_handlers_block_matched", libprag.} + +proc signalHandlersBlockMatched*(instance: Object; mask: SignalMatchType; signalId: int; + detail: int; closure: Closure; `func`: pointer; data: pointer): int = + int(g_signal_handlers_block_matched(cast[ptr Object00](instance.impl), mask, uint32(signalId), uint32(detail), cast[ptr Closure00](closure.impl), `func`, data)) + +proc g_signal_handlers_destroy*(instance: ptr Object00) {. + importc: "g_signal_handlers_destroy", libprag.} + +proc signalHandlersDestroy*(instance: Object) = + g_signal_handlers_destroy(cast[ptr Object00](instance.impl)) + +proc g_signal_handlers_disconnect_matched*(instance: ptr Object00; mask: SignalMatchType; signalId: uint32; + detail: uint32; closure: ptr Closure00; `func`: pointer; data: pointer): uint32 {. + importc: "g_signal_handlers_disconnect_matched", libprag.} + +proc signalHandlersDisconnectMatched*(instance: Object; mask: SignalMatchType; signalId: int; + detail: int; closure: Closure; `func`: pointer; data: pointer): int = + int(g_signal_handlers_disconnect_matched(cast[ptr Object00](instance.impl), mask, uint32(signalId), uint32(detail), cast[ptr Closure00](closure.impl), `func`, data)) + +proc g_signal_handlers_unblock_matched*(instance: ptr Object00; mask: SignalMatchType; signalId: uint32; + detail: uint32; closure: ptr Closure00; `func`: pointer; data: pointer): uint32 {. + importc: "g_signal_handlers_unblock_matched", libprag.} + +proc signalHandlersUnblockMatched*(instance: Object; mask: SignalMatchType; signalId: int; + detail: int; closure: Closure; `func`: pointer; data: pointer): int = + int(g_signal_handlers_unblock_matched(cast[ptr Object00](instance.impl), mask, uint32(signalId), uint32(detail), cast[ptr Closure00](closure.impl), `func`, data)) + +proc g_signal_has_handler_pending*(instance: ptr Object00; signalId: uint32; detail: uint32; + mayBeBlocked: gboolean): gboolean {. + importc: "g_signal_has_handler_pending", libprag.} + +proc signalHasHandlerPending*(instance: Object; signalId: int; detail: int; mayBeBlocked: bool): bool = + toBool(g_signal_has_handler_pending(cast[ptr Object00](instance.impl), uint32(signalId), uint32(detail), gboolean(mayBeBlocked))) + +proc g_signal_list_ids*(itype: GType; nIds: var uint32): uint32Array {. + importc: "g_signal_list_ids", libprag.} + +proc signalListIds*(itype: GType; nIds: var uint32): uint32Array {. + importc: "g_signal_list_ids", libprag.} + +proc g_signal_lookup*(name: cstring; itype: GType): uint32 {. + importc: "g_signal_lookup", libprag.} + +proc signalLookup*(name: cstring; itype: GType): uint32 {. + importc: "g_signal_lookup", libprag.} + +proc g_signal_name*(signalId: uint32): cstring {. + importc: "g_signal_name", libprag.} + +proc signalName*(signalId: int): string = + let resul0 = g_signal_name(uint32(signalId)) + result = $resul0 + +proc g_signal_override_class_closure*(signalId: uint32; instanceType: GType; classClosure: ptr Closure00) {. + importc: "g_signal_override_class_closure", libprag.} + +proc signalOverrideClassClosure*(signalId: int; instanceType: GType; classClosure: Closure) = + g_signal_override_class_closure(uint32(signalId), instanceType, cast[ptr Closure00](classClosure.impl)) + +proc g_signal_parse_name*(detailedSignal: cstring; itype: GType; signalIdP: var uint32; + detailP: var uint32; forceDetailQuark: gboolean): gboolean {. + importc: "g_signal_parse_name", libprag.} + +proc signalParseName*(detailedSignal: cstring; itype: GType; signalIdP: var uint32; + detailP: var uint32; forceDetailQuark: gboolean): gboolean {. + importc: "g_signal_parse_name", libprag.} + +proc g_signal_query*(signalId: uint32; query: var SignalQuery00) {. + importc: "g_signal_query", libprag.} + +proc signalQuery*(signalId: uint32; query: var SignalQuery00) {. + importc: "g_signal_query", libprag.} + +proc g_signal_remove_emission_hook*(signalId: uint32; hookId: uint64) {. + importc: "g_signal_remove_emission_hook", libprag.} + +proc signalRemoveEmissionHook*(signalId: uint32; hookId: uint64) {. + importc: "g_signal_remove_emission_hook", libprag.} + +proc g_signal_set_va_marshaller*(signalId: uint32; instanceType: GType; vaMarshaller: VaClosureMarshal) {. + importc: "g_signal_set_va_marshaller", libprag.} + +proc signalSetVaMarshaller*(signalId: uint32; instanceType: GType; vaMarshaller: VaClosureMarshal) {. + importc: "g_signal_set_va_marshaller", libprag.} + +proc g_signal_stop_emission*(instance: ptr Object00; signalId: uint32; detail: uint32) {. + importc: "g_signal_stop_emission", libprag.} + +proc signalStopEmission*(instance: Object; signalId: int; detail: int) = + g_signal_stop_emission(cast[ptr Object00](instance.impl), uint32(signalId), uint32(detail)) + +proc g_signal_stop_emission_by_name*(instance: ptr Object00; detailedSignal: cstring) {. + importc: "g_signal_stop_emission_by_name", libprag.} + +proc signalStopEmissionByName*(instance: Object; detailedSignal: string) = + g_signal_stop_emission_by_name(cast[ptr Object00](instance.impl), cstring(detailedSignal)) + +proc g_signal_type_cclosure_new*(itype: GType; structOffset: uint32): ptr Closure00 {. + importc: "g_signal_type_cclosure_new", libprag.} + +proc signalTypeCclosureNew*(itype: GType; structOffset: int): Closure = + new(result) + result.impl = g_signal_type_cclosure_new(itype, uint32(structOffset)) + +proc g_source_set_closure*(source: ptr glib.Source00; closure: ptr Closure00) {. + importc: "g_source_set_closure", libprag.} + +proc sourceSetClosure*(source: glib.Source; closure: Closure) = + g_source_set_closure(cast[ptr glib.Source00](source.impl), cast[ptr Closure00](closure.impl)) + +proc g_source_set_dummy_callback*(source: ptr glib.Source00) {. + importc: "g_source_set_dummy_callback", libprag.} + +proc sourceSetDummyCallback*(source: glib.Source) = + g_source_set_dummy_callback(cast[ptr glib.Source00](source.impl)) + +proc g_strdup_value_contents*(value: ptr Value00): cstring {. + importc: "g_strdup_value_contents", libprag.} + +proc strdupValueContents*(value: Value): string = + let resul0 = g_strdup_value_contents(cast[ptr Value00](value.impl)) + result = $resul0 + cogfree(resul0) + +proc g_type_add_class_private*(classType: GType; privateSize: uint64) {. + importc: "g_type_add_class_private", libprag.} + +proc typeAddClassPrivate*(classType: GType; privateSize: uint64) {. + importc: "g_type_add_class_private", libprag.} + +proc g_type_add_instance_private*(classType: GType; privateSize: uint64): int32 {. + importc: "g_type_add_instance_private", libprag.} + +proc typeAddInstancePrivate*(classType: GType; privateSize: uint64): int32 {. + importc: "g_type_add_instance_private", libprag.} + +proc g_type_add_interface_static*(instanceType: GType; interfaceType: GType; info: ptr InterfaceInfo00) {. + importc: "g_type_add_interface_static", libprag.} + +proc typeAddInterfaceStatic*(instanceType: GType; interfaceType: GType; info: InterfaceInfo) = + g_type_add_interface_static(instanceType, interfaceType, cast[ptr InterfaceInfo00](info.impl)) + +proc g_type_check_class_is_a*(gClass: ptr TypeClass00; isAType: GType): gboolean {. + importc: "g_type_check_class_is_a", libprag.} + +proc typeCheckClassIsA*(gClass: TypeClass; isAType: GType): bool = + toBool(g_type_check_class_is_a(cast[ptr TypeClass00](gClass.impl), isAType)) + +proc g_type_check_instance*(instance: ptr TypeInstance00): gboolean {. + importc: "g_type_check_instance", libprag.} + +proc typeCheckInstance*(instance: TypeInstance): bool = + toBool(g_type_check_instance(cast[ptr TypeInstance00](instance.impl))) + +proc g_type_check_instance_is_a*(instance: ptr TypeInstance00; ifaceType: GType): gboolean {. + importc: "g_type_check_instance_is_a", libprag.} + +proc typeCheckInstanceIsA*(instance: TypeInstance; ifaceType: GType): bool = + toBool(g_type_check_instance_is_a(cast[ptr TypeInstance00](instance.impl), ifaceType)) + +proc g_type_check_instance_is_fundamentally_a*(instance: ptr TypeInstance00; fundamentalType: GType): gboolean {. + importc: "g_type_check_instance_is_fundamentally_a", libprag.} + +proc typeCheckInstanceIsFundamentallyA*(instance: TypeInstance; fundamentalType: GType): bool = + toBool(g_type_check_instance_is_fundamentally_a(cast[ptr TypeInstance00](instance.impl), fundamentalType)) + +proc g_type_check_is_value_type*(`type`: GType): gboolean {. + importc: "g_type_check_is_value_type", libprag.} + +proc typeCheckIsValueType*(`type`: GType): gboolean {. + importc: "g_type_check_is_value_type", libprag.} + +proc g_type_check_value*(value: ptr Value00): gboolean {. + importc: "g_type_check_value", libprag.} + +proc typeCheckValue*(value: Value): bool = + toBool(g_type_check_value(cast[ptr Value00](value.impl))) + +proc g_type_check_value_holds*(value: ptr Value00; `type`: GType): gboolean {. + importc: "g_type_check_value_holds", libprag.} + +proc typeCheckValueHolds*(value: Value; `type`: GType): bool = + toBool(g_type_check_value_holds(cast[ptr Value00](value.impl), `type`)) + +proc g_type_children*(`type`: GType; nChildren: var uint32): GTypeArray {. + importc: "g_type_children", libprag.} + +proc typeChildren*(`type`: GType; nChildren: var uint32): GTypeArray {. + importc: "g_type_children", libprag.} + +proc g_type_default_interface_peek*(gType: GType): ptr TypeInterface00 {. + importc: "g_type_default_interface_peek", libprag.} + +proc typeDefaultInterfacePeek*(gType: GType): TypeInterface = + new(result) + result.impl = g_type_default_interface_peek(gType) + +proc g_type_default_interface_ref*(gType: GType): ptr TypeInterface00 {. + importc: "g_type_default_interface_ref", libprag.} + +proc typeDefaultInterfaceRef*(gType: GType): TypeInterface = + new(result) + result.impl = g_type_default_interface_ref(gType) + +proc g_type_default_interface_unref*(gIface: ptr TypeInterface00) {. + importc: "g_type_default_interface_unref", libprag.} + +proc typeDefaultInterfaceUnref*(gIface: TypeInterface) = + g_type_default_interface_unref(cast[ptr TypeInterface00](gIface.impl)) + +proc g_type_depth*(`type`: GType): uint32 {. + importc: "g_type_depth", libprag.} + +proc typeDepth*(`type`: GType): uint32 {. + importc: "g_type_depth", libprag.} + +proc g_type_ensure*(`type`: GType) {. + importc: "g_type_ensure", libprag.} + +proc typeEnsure*(`type`: GType) {. + importc: "g_type_ensure", libprag.} + +proc g_type_free_instance*(instance: ptr TypeInstance00) {. + importc: "g_type_free_instance", libprag.} + +proc typeFreeInstance*(instance: TypeInstance) = + g_type_free_instance(cast[ptr TypeInstance00](instance.impl)) + +proc g_type_from_name*(name: cstring): GType {. + importc: "g_type_from_name", libprag.} + +proc typeFromName*(name: cstring): GType {. + importc: "g_type_from_name", libprag.} + +proc g_type_fundamental*(typeId: GType): GType {. + importc: "g_type_fundamental", libprag.} + +proc typeFundamental*(typeId: GType): GType {. + importc: "g_type_fundamental", libprag.} + +proc g_type_fundamental_next*(): GType {. + importc: "g_type_fundamental_next", libprag.} + +proc typeFundamentalNext*(): GType {. + importc: "g_type_fundamental_next", libprag.} + +proc g_type_get_instance_count*(`type`: GType): int32 {. + importc: "g_type_get_instance_count", libprag.} + +proc typeGetInstanceCount*(`type`: GType): int32 {. + importc: "g_type_get_instance_count", libprag.} + +proc g_type_get_qdata*(`type`: GType; quark: uint32): pointer {. + importc: "g_type_get_qdata", libprag.} + +proc typeGetQdata*(`type`: GType; quark: uint32): pointer {. + importc: "g_type_get_qdata", libprag.} + +proc g_type_get_type_registration_serial*(): uint32 {. + importc: "g_type_get_type_registration_serial", libprag.} + +proc typeGetTypeRegistrationSerial*(): uint32 {. + importc: "g_type_get_type_registration_serial", libprag.} + +proc g_type_init*() {. + importc: "g_type_init", libprag.} + +proc typeInit*() {. + importc: "g_type_init", libprag.} + +proc g_type_init_with_debug_flags*(debugFlags: TypeDebugFlags) {. + importc: "g_type_init_with_debug_flags", libprag.} + +proc typeInitWithDebugFlags*(debugFlags: TypeDebugFlags) {. + importc: "g_type_init_with_debug_flags", libprag.} + +proc g_type_interfaces*(`type`: GType; nInterfaces: var uint32): GTypeArray {. + importc: "g_type_interfaces", libprag.} + +proc typeInterfaces*(`type`: GType; nInterfaces: var uint32): GTypeArray {. + importc: "g_type_interfaces", libprag.} + +proc g_type_is_a*(`type`: GType; isAType: GType): gboolean {. + importc: "g_type_is_a", libprag.} + +proc typeIsA*(`type`: GType; isAType: GType): gboolean {. + importc: "g_type_is_a", libprag.} + +proc g_type_name*(`type`: GType): cstring {. + importc: "g_type_name", libprag.} + +proc typeName*(`type`: GType): string = + let resul0 = g_type_name(`type`) + result = $resul0 + +proc g_type_name_from_class*(gClass: ptr TypeClass00): cstring {. + importc: "g_type_name_from_class", libprag.} + +proc typeNameFromClass*(gClass: TypeClass): string = + let resul0 = g_type_name_from_class(cast[ptr TypeClass00](gClass.impl)) + result = $resul0 + +proc g_type_name_from_instance*(instance: ptr TypeInstance00): cstring {. + importc: "g_type_name_from_instance", libprag.} + +proc typeNameFromInstance*(instance: TypeInstance): string = + let resul0 = g_type_name_from_instance(cast[ptr TypeInstance00](instance.impl)) + result = $resul0 + +proc g_type_next_base*(leafType: GType; rootType: GType): GType {. + importc: "g_type_next_base", libprag.} + +proc typeNextBase*(leafType: GType; rootType: GType): GType {. + importc: "g_type_next_base", libprag.} + +proc g_type_parent*(`type`: GType): GType {. + importc: "g_type_parent", libprag.} + +proc typeParent*(`type`: GType): GType {. + importc: "g_type_parent", libprag.} + +proc g_type_qname*(`type`: GType): uint32 {. + importc: "g_type_qname", libprag.} + +proc typeQname*(`type`: GType): uint32 {. + importc: "g_type_qname", libprag.} + +proc g_type_query*(`type`: GType; query: var TypeQuery00) {. + importc: "g_type_query", libprag.} + +proc typeQuery*(`type`: GType; query: var TypeQuery00) {. + importc: "g_type_query", libprag.} + +proc g_type_register_fundamental*(typeId: GType; typeName: cstring; info: ptr TypeInfo00; + finfo: ptr TypeFundamentalInfo00; flags: TypeFlags): GType {. + importc: "g_type_register_fundamental", libprag.} + +proc typeRegisterFundamental*(typeId: GType; typeName: string; info: TypeInfo; finfo: TypeFundamentalInfo; + flags: TypeFlags): GType = + g_type_register_fundamental(typeId, cstring(typeName), cast[ptr TypeInfo00](info.impl), cast[ptr TypeFundamentalInfo00](finfo.impl), flags) + +proc g_type_register_static*(parentType: GType; typeName: cstring; info: ptr TypeInfo00; + flags: TypeFlags): GType {. + importc: "g_type_register_static", libprag.} + +proc typeRegisterStatic*(parentType: GType; typeName: string; info: TypeInfo; + flags: TypeFlags): GType = + g_type_register_static(parentType, cstring(typeName), cast[ptr TypeInfo00](info.impl), flags) + +proc g_type_set_qdata*(`type`: GType; quark: uint32; data: pointer) {. + importc: "g_type_set_qdata", libprag.} + +proc typeSetQdata*(`type`: GType; quark: uint32; data: pointer) {. + importc: "g_type_set_qdata", libprag.} + +proc g_type_test_flags*(`type`: GType; flags: uint32): gboolean {. + importc: "g_type_test_flags", libprag.} + +proc typeTestFlags*(`type`: GType; flags: uint32): gboolean {. + importc: "g_type_test_flags", libprag.} +# === remaining symbols: diff --git a/gintro/gtk.nim b/gintro/gtk.nim new file mode 100644 index 0000000..ac9acaa --- /dev/null +++ b/gintro/gtk.nim @@ -0,0 +1,50546 @@ +# dependencies: +# Pango-1.0 +# GObject-2.0 +# xlib-2.0 +# cairo-1.0 +# Gdk-3.0 +# Gio-2.0 +# Atk-1.0 +# GdkPixbuf-2.0 +# GModule-2.0 +# GLib-2.0 +# immediate dependencies: +# xlib-2.0 +# Gdk-3.0 +# Atk-1.0 +# libraries: +# libgtk-3.so.0,libgdk-3.so.0 +{.deadCodeElim: on.} +import pango, gobject, xlib, cairo, gdk, gio, atk, gdkpixbuf, gmodule, glib +const Lib* = "libgtk-3.so.0" +{.pragma: libprag, cdecl, dynlib: Lib.} +type + TargetEntry00Array* = pointer +type + AccelGroupEntry00Array* = pointer +type + BindingArg00Array* = pointer +type + StockItem00Array* = pointer +type + PageRange00Array* = pointer +type + PadActionEntry00Array* = pointer +type + Array* = pointer +let Quark = g_quark_from_static_string("NimGIQuark") + +type + WidgetPrivate00* {.pure.} = object + WidgetPrivate* = ref object + impl*: ptr WidgetPrivate00 + +type + TextDirection* {.size: sizeof(cint), pure.} = enum + none = 0 + ltr = 1 + rtl = 2 + +type + SelectionData00* {.pure.} = object + SelectionData* = ref object + impl*: ptr SelectionData00 + +proc gtk_selection_data_copy*(self: ptr SelectionData00): ptr SelectionData00 {. + importc: "gtk_selection_data_copy", libprag.} + +proc copy*(self: SelectionData): SelectionData = + new(result) + result.impl = gtk_selection_data_copy(cast[ptr SelectionData00](self.impl)) + +proc gtk_selection_data_free*(self: ptr SelectionData00) {. + importc: "gtk_selection_data_free", libprag.} + +proc free*(self: SelectionData) = + gtk_selection_data_free(cast[ptr SelectionData00](self.impl)) + +proc gtk_selection_data_get_data_type*(self: ptr SelectionData00): ptr gdk.Atom00 {. + importc: "gtk_selection_data_get_data_type", libprag.} + +proc getDataType*(self: SelectionData): gdk.Atom = + new(result) + result.impl = gtk_selection_data_get_data_type(cast[ptr SelectionData00](self.impl)) + +proc dataType*(self: SelectionData): gdk.Atom = + new(result) + result.impl = gtk_selection_data_get_data_type(cast[ptr SelectionData00](self.impl)) + +proc gtk_selection_data_get_data_with_length*(self: ptr SelectionData00; length: var int32): uint8Array {. + importc: "gtk_selection_data_get_data_with_length", libprag.} + +proc getData*(self: SelectionData; length: var int): uint8Array = + var length_00 = int32(length) + result = gtk_selection_data_get_data_with_length(cast[ptr SelectionData00](self.impl), length_00) + length = int(length_00) + +proc data*(self: SelectionData; length: var int): uint8Array = + var length_00 = int32(length) + result = gtk_selection_data_get_data_with_length(cast[ptr SelectionData00](self.impl), length_00) + length = int(length_00) + +proc gtk_selection_data_get_display*(self: ptr SelectionData00): ptr gdk.Display00 {. + importc: "gtk_selection_data_get_display", libprag.} + +proc getDisplay*(self: SelectionData): gdk.Display = + let gobj = gtk_selection_data_get_display(cast[ptr SelectionData00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: SelectionData): gdk.Display = + let gobj = gtk_selection_data_get_display(cast[ptr SelectionData00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_selection_data_get_format*(self: ptr SelectionData00): int32 {. + importc: "gtk_selection_data_get_format", libprag.} + +proc getFormat*(self: SelectionData): int = + int(gtk_selection_data_get_format(cast[ptr SelectionData00](self.impl))) + +proc format*(self: SelectionData): int = + int(gtk_selection_data_get_format(cast[ptr SelectionData00](self.impl))) + +proc gtk_selection_data_get_length*(self: ptr SelectionData00): int32 {. + importc: "gtk_selection_data_get_length", libprag.} + +proc getLength*(self: SelectionData): int = + int(gtk_selection_data_get_length(cast[ptr SelectionData00](self.impl))) + +proc length*(self: SelectionData): int = + int(gtk_selection_data_get_length(cast[ptr SelectionData00](self.impl))) + +proc gtk_selection_data_get_pixbuf*(self: ptr SelectionData00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_selection_data_get_pixbuf", libprag.} + +proc getPixbuf*(self: SelectionData): gdkpixbuf.Pixbuf = + let gobj = gtk_selection_data_get_pixbuf(cast[ptr SelectionData00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbuf*(self: SelectionData): gdkpixbuf.Pixbuf = + let gobj = gtk_selection_data_get_pixbuf(cast[ptr SelectionData00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_selection_data_get_selection*(self: ptr SelectionData00): ptr gdk.Atom00 {. + importc: "gtk_selection_data_get_selection", libprag.} + +proc getSelection*(self: SelectionData): gdk.Atom = + new(result) + result.impl = gtk_selection_data_get_selection(cast[ptr SelectionData00](self.impl)) + +proc selection*(self: SelectionData): gdk.Atom = + new(result) + result.impl = gtk_selection_data_get_selection(cast[ptr SelectionData00](self.impl)) + +proc gtk_selection_data_get_target*(self: ptr SelectionData00): ptr gdk.Atom00 {. + importc: "gtk_selection_data_get_target", libprag.} + +proc getTarget*(self: SelectionData): gdk.Atom = + new(result) + result.impl = gtk_selection_data_get_target(cast[ptr SelectionData00](self.impl)) + +proc target*(self: SelectionData): gdk.Atom = + new(result) + result.impl = gtk_selection_data_get_target(cast[ptr SelectionData00](self.impl)) + +proc gtk_selection_data_get_targets*(self: ptr SelectionData00; targets: var ptr gdk.Atom00Array; + nAtoms: var int32): gboolean {. + importc: "gtk_selection_data_get_targets", libprag.} + +proc getTargets*(self: SelectionData; targets: var ptr gdk.Atom00Array; + nAtoms: var int): bool = + var nAtoms_00 = int32(nAtoms) + result = toBool(gtk_selection_data_get_targets(cast[ptr SelectionData00](self.impl), targets, nAtoms_00)) + nAtoms = int(nAtoms_00) + +proc targets*(self: SelectionData; targets: var ptr gdk.Atom00Array; + nAtoms: var int): bool = + var nAtoms_00 = int32(nAtoms) + result = toBool(gtk_selection_data_get_targets(cast[ptr SelectionData00](self.impl), targets, nAtoms_00)) + nAtoms = int(nAtoms_00) + +proc gtk_selection_data_get_text*(self: ptr SelectionData00): cstring {. + importc: "gtk_selection_data_get_text", libprag.} + +proc getText*(self: SelectionData): string = + let resul0 = gtk_selection_data_get_text(cast[ptr SelectionData00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc text*(self: SelectionData): string = + let resul0 = gtk_selection_data_get_text(cast[ptr SelectionData00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_selection_data_get_uris*(self: ptr SelectionData00): cstringArray {. + importc: "gtk_selection_data_get_uris", libprag.} + +proc getUris*(self: SelectionData): cstringArray = + gtk_selection_data_get_uris(cast[ptr SelectionData00](self.impl)) + +proc uris*(self: SelectionData): cstringArray = + gtk_selection_data_get_uris(cast[ptr SelectionData00](self.impl)) + +proc gtk_selection_data_set*(self: ptr SelectionData00; `type`: ptr gdk.Atom00; + format: int32; data: uint8Array; length: int32) {. + importc: "gtk_selection_data_set", libprag.} + +proc set*(self: SelectionData; `type`: gdk.Atom; format: int; + data: uint8Array; length: int) = + gtk_selection_data_set(cast[ptr SelectionData00](self.impl), cast[ptr gdk.Atom00](`type`.impl), int32(format), data, int32(length)) + +proc gtk_selection_data_set_pixbuf*(self: ptr SelectionData00; pixbuf: ptr gdkpixbuf.Pixbuf00): gboolean {. + importc: "gtk_selection_data_set_pixbuf", libprag.} + +proc setPixbuf*(self: SelectionData; pixbuf: gdkpixbuf.Pixbuf): bool = + toBool(gtk_selection_data_set_pixbuf(cast[ptr SelectionData00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl))) + +proc `pixbuf=`*(self: SelectionData; pixbuf: gdkpixbuf.Pixbuf): bool = + toBool(gtk_selection_data_set_pixbuf(cast[ptr SelectionData00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl))) + +proc gtk_selection_data_set_text*(self: ptr SelectionData00; str: cstring; len: int32): gboolean {. + importc: "gtk_selection_data_set_text", libprag.} + +proc setText*(self: SelectionData; str: string; len: int): bool = + toBool(gtk_selection_data_set_text(cast[ptr SelectionData00](self.impl), cstring(str), int32(len))) + +proc gtk_selection_data_set_uris*(self: ptr SelectionData00; uris: cstringArray): gboolean {. + importc: "gtk_selection_data_set_uris", libprag.} + +proc setUris*(self: SelectionData; uris: cstringArray): bool = + toBool(gtk_selection_data_set_uris(cast[ptr SelectionData00](self.impl), uris)) + +proc `uris=`*(self: SelectionData; uris: cstringArray): bool = + toBool(gtk_selection_data_set_uris(cast[ptr SelectionData00](self.impl), uris)) + +proc gtk_selection_data_targets_include_image*(self: ptr SelectionData00; writable: gboolean): gboolean {. + importc: "gtk_selection_data_targets_include_image", libprag.} + +proc targetsIncludeImage*(self: SelectionData; writable: bool): bool = + toBool(gtk_selection_data_targets_include_image(cast[ptr SelectionData00](self.impl), gboolean(writable))) + +proc gtk_selection_data_targets_include_text*(self: ptr SelectionData00): gboolean {. + importc: "gtk_selection_data_targets_include_text", libprag.} + +proc targetsIncludeText*(self: SelectionData): bool = + toBool(gtk_selection_data_targets_include_text(cast[ptr SelectionData00](self.impl))) + +proc gtk_selection_data_targets_include_uri*(self: ptr SelectionData00): gboolean {. + importc: "gtk_selection_data_targets_include_uri", libprag.} + +proc targetsIncludeUri*(self: SelectionData): bool = + toBool(gtk_selection_data_targets_include_uri(cast[ptr SelectionData00](self.impl))) + +type + DragResult* {.size: sizeof(cint), pure.} = enum + success = 0 + noTarget = 1 + userCancelled = 2 + timeoutExpired = 3 + grabBroken = 4 + error = 5 + +type + DirectionType* {.size: sizeof(cint), pure.} = enum + tabForward = 0 + tabBackward = 1 + up = 2 + down = 3 + left = 4 + right = 5 + +type + Tooltip* = ref object of gobject.Object + Tooltip00* = object of gobject.Object00 + +proc gtk_tooltip_trigger_tooltip_query*(display: ptr gdk.Display00) {. + importc: "gtk_tooltip_trigger_tooltip_query", libprag.} + +proc triggerTooltipQuery*(display: gdk.Display) = + gtk_tooltip_trigger_tooltip_query(cast[ptr gdk.Display00](display.impl)) + +proc gtk_tooltip_set_icon*(self: ptr Tooltip00; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_tooltip_set_icon", libprag.} + +proc setIcon*(self: Tooltip; pixbuf: gdkpixbuf.Pixbuf) = + gtk_tooltip_set_icon(cast[ptr Tooltip00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc `icon=`*(self: Tooltip; pixbuf: gdkpixbuf.Pixbuf) = + gtk_tooltip_set_icon(cast[ptr Tooltip00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_tooltip_set_icon_from_gicon*(self: ptr Tooltip00; gicon: ptr gio.Icon00; size: int32) {. + importc: "gtk_tooltip_set_icon_from_gicon", libprag.} + +proc setIconFromGicon*(self: Tooltip; gicon: gio.Icon; size: int) = + gtk_tooltip_set_icon_from_gicon(cast[ptr Tooltip00](self.impl), cast[ptr gio.Icon00](gicon.impl), int32(size)) + +proc gtk_tooltip_set_icon_from_icon_name*(self: ptr Tooltip00; iconName: cstring; size: int32) {. + importc: "gtk_tooltip_set_icon_from_icon_name", libprag.} + +proc setIconFromIconName*(self: Tooltip; iconName: string; size: int) = + gtk_tooltip_set_icon_from_icon_name(cast[ptr Tooltip00](self.impl), cstring(iconName), int32(size)) + +proc gtk_tooltip_set_icon_from_stock*(self: ptr Tooltip00; stockId: cstring; size: int32) {. + importc: "gtk_tooltip_set_icon_from_stock", libprag.} + +proc setIconFromStock*(self: Tooltip; stockId: string; size: int) = + gtk_tooltip_set_icon_from_stock(cast[ptr Tooltip00](self.impl), cstring(stockId), int32(size)) + +proc gtk_tooltip_set_markup*(self: ptr Tooltip00; markup: cstring) {. + importc: "gtk_tooltip_set_markup", libprag.} + +proc setMarkup*(self: Tooltip; markup: string) = + gtk_tooltip_set_markup(cast[ptr Tooltip00](self.impl), cstring(markup)) + +proc `markup=`*(self: Tooltip; markup: string) = + gtk_tooltip_set_markup(cast[ptr Tooltip00](self.impl), cstring(markup)) + +proc gtk_tooltip_set_text*(self: ptr Tooltip00; text: cstring) {. + importc: "gtk_tooltip_set_text", libprag.} + +proc setText*(self: Tooltip; text: string) = + gtk_tooltip_set_text(cast[ptr Tooltip00](self.impl), cstring(text)) + +proc `text=`*(self: Tooltip; text: string) = + gtk_tooltip_set_text(cast[ptr Tooltip00](self.impl), cstring(text)) + +proc gtk_tooltip_set_tip_area*(self: ptr Tooltip00; rect: ptr gdk.Rectangle00) {. + importc: "gtk_tooltip_set_tip_area", libprag.} + +proc setTipArea*(self: Tooltip; rect: gdk.Rectangle) = + gtk_tooltip_set_tip_area(cast[ptr Tooltip00](self.impl), cast[ptr gdk.Rectangle00](rect.impl)) + +proc `tipArea=`*(self: Tooltip; rect: gdk.Rectangle) = + gtk_tooltip_set_tip_area(cast[ptr Tooltip00](self.impl), cast[ptr gdk.Rectangle00](rect.impl)) + +type + WidgetHelpType* {.size: sizeof(cint), pure.} = enum + tooltip = 0 + whatsThis = 1 + +type + StateType* {.size: sizeof(cint), pure.} = enum + normal = 0 + active = 1 + prelight = 2 + selected = 3 + insensitive = 4 + inconsistent = 5 + focused = 6 + +type + StateFlag* {.size: sizeof(cint), pure.} = enum + active = 1 + prelight = 2 + selected = 3 + insensitive = 4 + inconsistent = 5 + focused = 6 + backdrop = 7 + dirLtr = 8 + dirRtl = 9 + link = 10 + visited = 11 + checked = 12 + dropActive = 13 + + StateFlags* {.size: sizeof(cint).} = set[StateFlag] + +type + RcFlag* {.size: sizeof(cint), pure.} = enum + fg = 1 + bg = 2 + text = 3 + base = 4 + + RcFlags* {.size: sizeof(cint).} = set[RcFlag] + +type + RcStyle* = ref object of gobject.Object + RcStyle00* = object of gobject.Object00 + name*: cstring + bgPixmapName*: array[5, cstring] + fontDesc*: ptr pango.FontDescription00 + colorFlags*: array[5, RcFlags] + fg*: array[5, gdk.Color00] + bg*: array[5, gdk.Color00] + text*: array[5, gdk.Color00] + base*: array[5, gdk.Color00] + xthickness*: int32 + ythickness*: int32 + rcProperties*: ptr Array + rcStyleLists*: ptr pointer + iconFactories*: ptr pointer + engineSpecified*: uint32 + +proc gtk_rc_style_new*(): ptr RcStyle00 {. + importc: "gtk_rc_style_new", libprag.} + +proc newRcStyle*(): RcStyle = + new(result, finalizeGObject) + result.impl = gtk_rc_style_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRcStyle*[T](result: var T) = + assert(result is RcStyle) + new(result, finalizeGObject) + result.impl = gtk_rc_style_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_rc_style_copy*(self: ptr RcStyle00): ptr RcStyle00 {. + importc: "gtk_rc_style_copy", libprag.} + +proc copy*(self: RcStyle): RcStyle = + let gobj = gtk_rc_style_copy(cast[ptr RcStyle00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[RcStyle](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + Style* = ref object of gobject.Object + Style00* = object of gobject.Object00 + fg*: array[5, gdk.Color00] + bg*: array[5, gdk.Color00] + light*: array[5, gdk.Color00] + dark*: array[5, gdk.Color00] + mid*: array[5, gdk.Color00] + text*: array[5, gdk.Color00] + base*: array[5, gdk.Color00] + textAa*: array[5, gdk.Color00] + black*: gdk.Color00 + white*: gdk.Color00 + fontDesc*: ptr pango.FontDescription00 + xthickness*: int32 + ythickness*: int32 + background*: array[5, ptr cairo.Pattern00] + attachCount*: int32 + visual*: ptr gdk.Visual00 + privateFontDesc*: ptr pango.FontDescription00 + rcStyle*: ptr RcStyle00 + styles*: ptr pointer + propertyCache*: ptr Array + iconFactories*: ptr pointer + +proc scRealize*(self: Style; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "realize", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUnrealize*(self: Style; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "unrealize", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_style_new*(): ptr Style00 {. + importc: "gtk_style_new", libprag.} + +proc newStyle*(): Style = + new(result, finalizeGObject) + result.impl = gtk_style_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStyle*[T](result: var T) = + assert(result is Style) + new(result, finalizeGObject) + result.impl = gtk_style_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_style_apply_default_background*(self: ptr Style00; cr: ptr cairo.Context00; window: ptr gdk.Window00; + stateType: StateType; x: int32; y: int32; width: int32; height: int32) {. + importc: "gtk_style_apply_default_background", libprag.} + +proc applyDefaultBackground*(self: Style; cr: cairo.Context; window: gdk.Window; + stateType: StateType; x: int; y: int; width: int; height: int) = + gtk_style_apply_default_background(cast[ptr Style00](self.impl), cast[ptr cairo.Context00](cr.impl), cast[ptr gdk.Window00](window.impl), stateType, int32(x), int32(y), int32(width), int32(height)) + +proc gtk_style_copy*(self: ptr Style00): ptr Style00 {. + importc: "gtk_style_copy", libprag.} + +proc copy*(self: Style): Style = + let gobj = gtk_style_copy(cast[ptr Style00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Style](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_style_detach*(self: ptr Style00) {. + importc: "gtk_style_detach", libprag.} + +proc detach*(self: Style) = + gtk_style_detach(cast[ptr Style00](self.impl)) + +proc gtk_style_get_style_property*(self: ptr Style00; widgetType: GType; propertyName: cstring; + value: var gobject.Value00) {. + importc: "gtk_style_get_style_property", libprag.} + +proc getStyleProperty*(self: ptr Style00; widgetType: GType; propertyName: cstring; + value: var gobject.Value00) {. + importc: "gtk_style_get_style_property", libprag.} + +proc styleProperty*(self: ptr Style00; widgetType: GType; propertyName: cstring; + value: var gobject.Value00) {. + importc: "gtk_style_get_style_property", libprag.} + +proc gtk_style_has_context*(self: ptr Style00): gboolean {. + importc: "gtk_style_has_context", libprag.} + +proc hasContext*(self: Style): bool = + toBool(gtk_style_has_context(cast[ptr Style00](self.impl))) + +proc gtk_style_lookup_color*(self: ptr Style00; colorName: cstring; color: var gdk.Color00): gboolean {. + importc: "gtk_style_lookup_color", libprag.} + +proc lookupColor*(self: ptr Style00; colorName: cstring; color: var gdk.Color00): gboolean {. + importc: "gtk_style_lookup_color", libprag.} + +proc gtk_style_set_background*(self: ptr Style00; window: ptr gdk.Window00; stateType: StateType) {. + importc: "gtk_style_set_background", libprag.} + +proc setBackground*(self: Style; window: gdk.Window; stateType: StateType) = + gtk_style_set_background(cast[ptr Style00](self.impl), cast[ptr gdk.Window00](window.impl), stateType) + +type + Widget* = ref object of gobject.InitiallyUnowned + Widget00* = object of gobject.InitiallyUnowned00 + priv1: ptr WidgetPrivate00 + +proc scAccelClosuresChanged*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "accel-closures-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scButtonPressEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventButton00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "button-press-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scButtonReleaseEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventButton00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "button-release-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCanActivateAccel*(self: Widget; p: proc (self: ptr gobject.Object00; signalId: uint32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "can-activate-accel", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scChildNotify*(self: Widget; p: proc (self: ptr gobject.Object00; childProperty: gobject.ParamSpec00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "child-notify", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCompositedChanged*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "composited-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scConfigureEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventConfigure00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "configure-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDamageEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventExpose00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "damage-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeleteEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.Event00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "delete-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDestroy*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "destroy", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDestroyEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.Event00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "destroy-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDirectionChanged*(self: Widget; p: proc (self: ptr gobject.Object00; previousDirection: TextDirection; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "direction-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragBegin*(self: Widget; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-begin", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragDataDelete*(self: Widget; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-data-delete", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragDataGet*(self: Widget; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; data: SelectionData00; + info: uint32; time: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-data-get", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragDataReceived*(self: Widget; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; x: int32; y: int32; data: SelectionData00; + info: uint32; time: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-data-received", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragDrop*(self: Widget; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; x: int32; y: int32; time: uint32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-drop", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragEnd*(self: Widget; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-end", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragFailed*(self: Widget; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; resu: DragResult; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-failed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragLeave*(self: Widget; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; time: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-leave", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragMotion*(self: Widget; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; x: int32; y: int32; time: uint32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-motion", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDraw*(self: Widget; p: proc (self: ptr gobject.Object00; cr: cairo.Context00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "draw", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEnterNotifyEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventCrossing00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "enter-notify-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.Event00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEventAfter*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.Event00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "event-after", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scFocus*(self: Widget; p: proc (self: ptr gobject.Object00; direction: DirectionType; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "focus", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scFocusInEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventFocus00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "focus-in-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scFocusOutEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventFocus00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "focus-out-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scGrabBrokenEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventGrabBroken00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "grab-broken-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scGrabFocus*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "grab-focus", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scGrabNotify*(self: Widget; p: proc (self: ptr gobject.Object00; wasGrabbed: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "grab-notify", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scHide*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "hide", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scHierarchyChanged*(self: Widget; p: proc (self: ptr gobject.Object00; previousToplevel: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "hierarchy-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scKeyPressEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventKey00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "key-press-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scKeyReleaseEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventKey00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "key-release-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scKeynavFailed*(self: Widget; p: proc (self: ptr gobject.Object00; direction: DirectionType; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "keynav-failed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scLeaveNotifyEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventCrossing00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "leave-notify-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMap*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "map", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMapEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventAny00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "map-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMnemonicActivate*(self: Widget; p: proc (self: ptr gobject.Object00; groupCycling: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mnemonic-activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMotionNotifyEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventMotion00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "motion-notify-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveFocus*(self: Widget; p: proc (self: ptr gobject.Object00; direction: DirectionType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-focus", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scParentSet*(self: Widget; p: proc (self: ptr gobject.Object00; oldParent: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "parent-set", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopupMenu*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "popup-menu", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPropertyNotifyEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventProperty00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "property-notify-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scProximityInEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventProximity00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "proximity-in-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scProximityOutEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventProximity00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "proximity-out-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scQueryTooltip*(self: Widget; p: proc (self: ptr gobject.Object00; x: int32; y: int32; keyboardMode: gboolean; tooltip: Tooltip00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "query-tooltip", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRealize*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "realize", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scScreenChanged*(self: Widget; p: proc (self: ptr gobject.Object00; previousScreen: gdk.Screen00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "screen-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scScrollEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventScroll00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "scroll-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectionClearEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventSelection00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "selection-clear-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectionGet*(self: Widget; p: proc (self: ptr gobject.Object00; data: SelectionData00; info: uint32; time: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "selection-get", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectionNotifyEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventSelection00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "selection-notify-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectionReceived*(self: Widget; p: proc (self: ptr gobject.Object00; data: SelectionData00; time: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "selection-received", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectionRequestEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventSelection00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "selection-request-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShow*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShowHelp*(self: Widget; p: proc (self: ptr gobject.Object00; helpType: WidgetHelpType; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-help", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSizeAllocate*(self: Widget; p: proc (self: ptr gobject.Object00; allocation: gdk.Rectangle00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "size-allocate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStateChanged*(self: Widget; p: proc (self: ptr gobject.Object00; state: StateType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "state-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStateFlagsChanged*(self: Widget; p: proc (self: ptr gobject.Object00; flags: StateFlags; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "state-flags-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStyleSet*(self: Widget; p: proc (self: ptr gobject.Object00; previousStyle: Style00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "style-set", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStyleUpdated*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "style-updated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scTouchEvent*(self: Widget; p: proc (self: ptr gobject.Object00; `object`: gdk.Event00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "touch-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUnmap*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "unmap", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUnmapEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventAny00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "unmap-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUnrealize*(self: Widget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "unrealize", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scVisibilityNotifyEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventVisibility00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "visibility-notify-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scWindowStateEvent*(self: Widget; p: proc (self: ptr gobject.Object00; event: gdk.EventWindowState00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "window-state-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_widget_get_default_direction*(): TextDirection {. + importc: "gtk_widget_get_default_direction", libprag.} + +proc getDefaultDirection*(): TextDirection {. + importc: "gtk_widget_get_default_direction", libprag.} + +proc defaultDirection*(): TextDirection {. + importc: "gtk_widget_get_default_direction", libprag.} + +proc gtk_widget_get_default_style*(): ptr Style00 {. + importc: "gtk_widget_get_default_style", libprag.} + +proc getDefaultStyle*(): Style = + let gobj = gtk_widget_get_default_style() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Style](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultStyle*(): Style = + let gobj = gtk_widget_get_default_style() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Style](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_pop_composite_child*() {. + importc: "gtk_widget_pop_composite_child", libprag.} + +proc popCompositeChild*() {. + importc: "gtk_widget_pop_composite_child", libprag.} + +proc gtk_widget_push_composite_child*() {. + importc: "gtk_widget_push_composite_child", libprag.} + +proc pushCompositeChild*() {. + importc: "gtk_widget_push_composite_child", libprag.} + +proc gtk_widget_set_default_direction*(dir: TextDirection) {. + importc: "gtk_widget_set_default_direction", libprag.} + +proc setDefaultDirection*(dir: TextDirection) {. + importc: "gtk_widget_set_default_direction", libprag.} + +proc `defaultDirection=`*(dir: TextDirection) {. + importc: "gtk_widget_set_default_direction", libprag.} + +proc gtk_widget_activate*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_activate", libprag.} + +proc activate*(self: Widget): bool = + toBool(gtk_widget_activate(cast[ptr Widget00](self.impl))) + +proc gtk_widget_add_device_events*(self: ptr Widget00; device: ptr gdk.Device00; events: gdk.EventMask) {. + importc: "gtk_widget_add_device_events", libprag.} + +proc addDeviceEvents*(self: Widget; device: gdk.Device; events: gdk.EventMask) = + gtk_widget_add_device_events(cast[ptr Widget00](self.impl), cast[ptr gdk.Device00](device.impl), events) + +proc gtk_widget_add_events*(self: ptr Widget00; events: int32) {. + importc: "gtk_widget_add_events", libprag.} + +proc addEvents*(self: Widget; events: int) = + gtk_widget_add_events(cast[ptr Widget00](self.impl), int32(events)) + +proc gtk_widget_add_mnemonic_label*(self: ptr Widget00; label: ptr Widget00) {. + importc: "gtk_widget_add_mnemonic_label", libprag.} + +proc addMnemonicLabel*(self: Widget; label: Widget) = + gtk_widget_add_mnemonic_label(cast[ptr Widget00](self.impl), cast[ptr Widget00](label.impl)) + +proc gtk_widget_can_activate_accel*(self: ptr Widget00; signalId: uint32): gboolean {. + importc: "gtk_widget_can_activate_accel", libprag.} + +proc canActivateAccel*(self: Widget; signalId: int): bool = + toBool(gtk_widget_can_activate_accel(cast[ptr Widget00](self.impl), uint32(signalId))) + +proc gtk_widget_child_focus*(self: ptr Widget00; direction: DirectionType): gboolean {. + importc: "gtk_widget_child_focus", libprag.} + +proc childFocus*(self: Widget; direction: DirectionType): bool = + toBool(gtk_widget_child_focus(cast[ptr Widget00](self.impl), direction)) + +proc gtk_widget_child_notify*(self: ptr Widget00; childProperty: cstring) {. + importc: "gtk_widget_child_notify", libprag.} + +proc childNotify*(self: Widget; childProperty: string) = + gtk_widget_child_notify(cast[ptr Widget00](self.impl), cstring(childProperty)) + +proc gtk_widget_class_path*(self: ptr Widget00; pathLength: var uint32; path: var cstring; + pathReversed: var cstring) {. + importc: "gtk_widget_class_path", libprag.} + +proc classPath*(self: Widget; pathLength: var int; path: var string; + pathReversed: var string) = + var pathReversed_00 = cstring(pathReversed) + var pathLength_00 = uint32(pathLength) + var path_00 = cstring(path) + gtk_widget_class_path(cast[ptr Widget00](self.impl), pathLength_00, path_00, pathReversed_00) + pathReversed = $(pathReversed_00) + pathLength = int(pathLength_00) + path = $(path_00) + +proc gtk_widget_create_pango_context*(self: ptr Widget00): ptr pango.Context00 {. + importc: "gtk_widget_create_pango_context", libprag.} + +proc createPangoContext*(self: Widget): pango.Context = + let gobj = gtk_widget_create_pango_context(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_create_pango_layout*(self: ptr Widget00; text: cstring): ptr pango.Layout00 {. + importc: "gtk_widget_create_pango_layout", libprag.} + +proc createPangoLayout*(self: Widget; text: string): pango.Layout = + let gobj = gtk_widget_create_pango_layout(cast[ptr Widget00](self.impl), cstring(text)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_destroy*(self: ptr Widget00) {. + importc: "gtk_widget_destroy", libprag.} + +proc destroy*(self: Widget) = + gtk_widget_destroy(cast[ptr Widget00](self.impl)) + +proc gtk_widget_destroyed*(self: ptr Widget00; widgetPointer: ptr Widget00) {. + importc: "gtk_widget_destroyed", libprag.} + +proc destroyed*(self: ptr Widget00; widgetPointer: ptr Widget00) {. + importc: "gtk_widget_destroyed", libprag.} + +proc gtk_widget_device_is_shadowed*(self: ptr Widget00; device: ptr gdk.Device00): gboolean {. + importc: "gtk_widget_device_is_shadowed", libprag.} + +proc deviceIsShadowed*(self: Widget; device: gdk.Device): bool = + toBool(gtk_widget_device_is_shadowed(cast[ptr Widget00](self.impl), cast[ptr gdk.Device00](device.impl))) + +proc gtk_drag_check_threshold*(self: ptr Widget00; startX: int32; startY: int32; + currentX: int32; currentY: int32): gboolean {. + importc: "gtk_drag_check_threshold", libprag.} + +proc dragCheckThreshold*(self: Widget; startX: int; startY: int; currentX: int; + currentY: int): bool = + toBool(gtk_drag_check_threshold(cast[ptr Widget00](self.impl), int32(startX), int32(startY), int32(currentX), int32(currentY))) + +proc gtk_drag_dest_add_image_targets*(self: ptr Widget00) {. + importc: "gtk_drag_dest_add_image_targets", libprag.} + +proc dragDestAddImageTargets*(self: Widget) = + gtk_drag_dest_add_image_targets(cast[ptr Widget00](self.impl)) + +proc gtk_drag_dest_add_text_targets*(self: ptr Widget00) {. + importc: "gtk_drag_dest_add_text_targets", libprag.} + +proc dragDestAddTextTargets*(self: Widget) = + gtk_drag_dest_add_text_targets(cast[ptr Widget00](self.impl)) + +proc gtk_drag_dest_add_uri_targets*(self: ptr Widget00) {. + importc: "gtk_drag_dest_add_uri_targets", libprag.} + +proc dragDestAddUriTargets*(self: Widget) = + gtk_drag_dest_add_uri_targets(cast[ptr Widget00](self.impl)) + +proc gtk_drag_dest_get_track_motion*(self: ptr Widget00): gboolean {. + importc: "gtk_drag_dest_get_track_motion", libprag.} + +proc dragDestGetTrackMotion*(self: Widget): bool = + toBool(gtk_drag_dest_get_track_motion(cast[ptr Widget00](self.impl))) + +proc gtk_drag_dest_set_proxy*(self: ptr Widget00; proxyWindow: ptr gdk.Window00; + protocol: gdk.DragProtocol; useCoordinates: gboolean) {. + importc: "gtk_drag_dest_set_proxy", libprag.} + +proc dragDestSetProxy*(self: Widget; proxyWindow: gdk.Window; protocol: gdk.DragProtocol; + useCoordinates: bool) = + gtk_drag_dest_set_proxy(cast[ptr Widget00](self.impl), cast[ptr gdk.Window00](proxyWindow.impl), protocol, gboolean(useCoordinates)) + +proc gtk_drag_dest_set_track_motion*(self: ptr Widget00; trackMotion: gboolean) {. + importc: "gtk_drag_dest_set_track_motion", libprag.} + +proc dragDestSetTrackMotion*(self: Widget; trackMotion: bool) = + gtk_drag_dest_set_track_motion(cast[ptr Widget00](self.impl), gboolean(trackMotion)) + +proc gtk_drag_dest_unset*(self: ptr Widget00) {. + importc: "gtk_drag_dest_unset", libprag.} + +proc dragDestUnset*(self: Widget) = + gtk_drag_dest_unset(cast[ptr Widget00](self.impl)) + +proc gtk_drag_get_data*(self: ptr Widget00; context: ptr gdk.DragContext00; + target: ptr gdk.Atom00; time: uint32) {. + importc: "gtk_drag_get_data", libprag.} + +proc dragGetData*(self: Widget; context: gdk.DragContext; target: gdk.Atom; + time: int) = + gtk_drag_get_data(cast[ptr Widget00](self.impl), cast[ptr gdk.DragContext00](context.impl), cast[ptr gdk.Atom00](target.impl), uint32(time)) + +proc gtk_drag_highlight*(self: ptr Widget00) {. + importc: "gtk_drag_highlight", libprag.} + +proc dragHighlight*(self: Widget) = + gtk_drag_highlight(cast[ptr Widget00](self.impl)) + +proc gtk_drag_source_add_image_targets*(self: ptr Widget00) {. + importc: "gtk_drag_source_add_image_targets", libprag.} + +proc dragSourceAddImageTargets*(self: Widget) = + gtk_drag_source_add_image_targets(cast[ptr Widget00](self.impl)) + +proc gtk_drag_source_add_text_targets*(self: ptr Widget00) {. + importc: "gtk_drag_source_add_text_targets", libprag.} + +proc dragSourceAddTextTargets*(self: Widget) = + gtk_drag_source_add_text_targets(cast[ptr Widget00](self.impl)) + +proc gtk_drag_source_add_uri_targets*(self: ptr Widget00) {. + importc: "gtk_drag_source_add_uri_targets", libprag.} + +proc dragSourceAddUriTargets*(self: Widget) = + gtk_drag_source_add_uri_targets(cast[ptr Widget00](self.impl)) + +proc gtk_drag_source_set_icon_gicon*(self: ptr Widget00; icon: ptr gio.Icon00) {. + importc: "gtk_drag_source_set_icon_gicon", libprag.} + +proc dragSourceSetIconGicon*(self: Widget; icon: gio.Icon) = + gtk_drag_source_set_icon_gicon(cast[ptr Widget00](self.impl), cast[ptr gio.Icon00](icon.impl)) + +proc gtk_drag_source_set_icon_name*(self: ptr Widget00; iconName: cstring) {. + importc: "gtk_drag_source_set_icon_name", libprag.} + +proc dragSourceSetIconName*(self: Widget; iconName: string) = + gtk_drag_source_set_icon_name(cast[ptr Widget00](self.impl), cstring(iconName)) + +proc gtk_drag_source_set_icon_pixbuf*(self: ptr Widget00; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_drag_source_set_icon_pixbuf", libprag.} + +proc dragSourceSetIconPixbuf*(self: Widget; pixbuf: gdkpixbuf.Pixbuf) = + gtk_drag_source_set_icon_pixbuf(cast[ptr Widget00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_drag_source_set_icon_stock*(self: ptr Widget00; stockId: cstring) {. + importc: "gtk_drag_source_set_icon_stock", libprag.} + +proc dragSourceSetIconStock*(self: Widget; stockId: string) = + gtk_drag_source_set_icon_stock(cast[ptr Widget00](self.impl), cstring(stockId)) + +proc gtk_drag_source_unset*(self: ptr Widget00) {. + importc: "gtk_drag_source_unset", libprag.} + +proc dragSourceUnset*(self: Widget) = + gtk_drag_source_unset(cast[ptr Widget00](self.impl)) + +proc gtk_drag_unhighlight*(self: ptr Widget00) {. + importc: "gtk_drag_unhighlight", libprag.} + +proc dragUnhighlight*(self: Widget) = + gtk_drag_unhighlight(cast[ptr Widget00](self.impl)) + +proc gtk_widget_draw*(self: ptr Widget00; cr: ptr cairo.Context00) {. + importc: "gtk_widget_draw", libprag.} + +proc draw*(self: Widget; cr: cairo.Context) = + gtk_widget_draw(cast[ptr Widget00](self.impl), cast[ptr cairo.Context00](cr.impl)) + +proc gtk_widget_ensure_style*(self: ptr Widget00) {. + importc: "gtk_widget_ensure_style", libprag.} + +proc ensureStyle*(self: Widget) = + gtk_widget_ensure_style(cast[ptr Widget00](self.impl)) + +proc gtk_widget_error_bell*(self: ptr Widget00) {. + importc: "gtk_widget_error_bell", libprag.} + +proc errorBell*(self: Widget) = + gtk_widget_error_bell(cast[ptr Widget00](self.impl)) + +proc gtk_widget_event*(self: ptr Widget00; event: ptr gdk.Event00): gboolean {. + importc: "gtk_widget_event", libprag.} + +proc event*(self: Widget; event: gdk.Event): bool = + toBool(gtk_widget_event(cast[ptr Widget00](self.impl), cast[ptr gdk.Event00](event.impl))) + +proc gtk_widget_freeze_child_notify*(self: ptr Widget00) {. + importc: "gtk_widget_freeze_child_notify", libprag.} + +proc freezeChildNotify*(self: Widget) = + gtk_widget_freeze_child_notify(cast[ptr Widget00](self.impl)) + +proc gtk_widget_get_accessible*(self: ptr Widget00): ptr atk.Object00 {. + importc: "gtk_widget_get_accessible", libprag.} + +proc getAccessible*(self: Widget): atk.Object = + let gobj = gtk_widget_get_accessible(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[atk.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc accessible*(self: Widget): atk.Object = + let gobj = gtk_widget_get_accessible(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[atk.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_action_group*(self: ptr Widget00; prefix: cstring): ptr gio.ActionGroup00 {. + importc: "gtk_widget_get_action_group", libprag.} + +proc getActionGroup*(self: Widget; prefix: string): gio.ActionGroup = + new(result) + result.impl = gtk_widget_get_action_group(cast[ptr Widget00](self.impl), cstring(prefix)) + +proc actionGroup*(self: Widget; prefix: string): gio.ActionGroup = + new(result) + result.impl = gtk_widget_get_action_group(cast[ptr Widget00](self.impl), cstring(prefix)) + +proc gtk_widget_get_allocated_baseline*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_allocated_baseline", libprag.} + +proc getAllocatedBaseline*(self: Widget): int = + int(gtk_widget_get_allocated_baseline(cast[ptr Widget00](self.impl))) + +proc allocatedBaseline*(self: Widget): int = + int(gtk_widget_get_allocated_baseline(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_allocated_height*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_allocated_height", libprag.} + +proc getAllocatedHeight*(self: Widget): int = + int(gtk_widget_get_allocated_height(cast[ptr Widget00](self.impl))) + +proc allocatedHeight*(self: Widget): int = + int(gtk_widget_get_allocated_height(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_allocated_size*(self: ptr Widget00; allocation: var gdk.Rectangle00; + baseline: var int32) {. + importc: "gtk_widget_get_allocated_size", libprag.} + +proc getAllocatedSize*(self: ptr Widget00; allocation: var gdk.Rectangle00; + baseline: var int32) {. + importc: "gtk_widget_get_allocated_size", libprag.} + +proc allocatedSize*(self: ptr Widget00; allocation: var gdk.Rectangle00; + baseline: var int32) {. + importc: "gtk_widget_get_allocated_size", libprag.} + +proc gtk_widget_get_allocated_width*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_allocated_width", libprag.} + +proc getAllocatedWidth*(self: Widget): int = + int(gtk_widget_get_allocated_width(cast[ptr Widget00](self.impl))) + +proc allocatedWidth*(self: Widget): int = + int(gtk_widget_get_allocated_width(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_allocation*(self: ptr Widget00; allocation: var gdk.Rectangle00) {. + importc: "gtk_widget_get_allocation", libprag.} + +proc getAllocation*(self: ptr Widget00; allocation: var gdk.Rectangle00) {. + importc: "gtk_widget_get_allocation", libprag.} + +proc allocation*(self: ptr Widget00; allocation: var gdk.Rectangle00) {. + importc: "gtk_widget_get_allocation", libprag.} + +proc gtk_widget_get_ancestor*(self: ptr Widget00; widgetType: GType): ptr Widget00 {. + importc: "gtk_widget_get_ancestor", libprag.} + +proc getAncestor*(self: Widget; widgetType: GType): Widget = + let gobj = gtk_widget_get_ancestor(cast[ptr Widget00](self.impl), widgetType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc ancestor*(self: Widget; widgetType: GType): Widget = + let gobj = gtk_widget_get_ancestor(cast[ptr Widget00](self.impl), widgetType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_app_paintable*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_app_paintable", libprag.} + +proc getAppPaintable*(self: Widget): bool = + toBool(gtk_widget_get_app_paintable(cast[ptr Widget00](self.impl))) + +proc appPaintable*(self: Widget): bool = + toBool(gtk_widget_get_app_paintable(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_can_default*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_can_default", libprag.} + +proc getCanDefault*(self: Widget): bool = + toBool(gtk_widget_get_can_default(cast[ptr Widget00](self.impl))) + +proc canDefault*(self: Widget): bool = + toBool(gtk_widget_get_can_default(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_can_focus*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_can_focus", libprag.} + +proc getCanFocus*(self: Widget): bool = + toBool(gtk_widget_get_can_focus(cast[ptr Widget00](self.impl))) + +proc canFocus*(self: Widget): bool = + toBool(gtk_widget_get_can_focus(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_child_visible*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_child_visible", libprag.} + +proc getChildVisible*(self: Widget): bool = + toBool(gtk_widget_get_child_visible(cast[ptr Widget00](self.impl))) + +proc childVisible*(self: Widget): bool = + toBool(gtk_widget_get_child_visible(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_clip*(self: ptr Widget00; clip: var gdk.Rectangle00) {. + importc: "gtk_widget_get_clip", libprag.} + +proc getClip*(self: ptr Widget00; clip: var gdk.Rectangle00) {. + importc: "gtk_widget_get_clip", libprag.} + +proc clip*(self: ptr Widget00; clip: var gdk.Rectangle00) {. + importc: "gtk_widget_get_clip", libprag.} + +proc gtk_widget_get_composite_name*(self: ptr Widget00): cstring {. + importc: "gtk_widget_get_composite_name", libprag.} + +proc getCompositeName*(self: Widget): string = + let resul0 = gtk_widget_get_composite_name(cast[ptr Widget00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc compositeName*(self: Widget): string = + let resul0 = gtk_widget_get_composite_name(cast[ptr Widget00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_widget_get_device_enabled*(self: ptr Widget00; device: ptr gdk.Device00): gboolean {. + importc: "gtk_widget_get_device_enabled", libprag.} + +proc getDeviceEnabled*(self: Widget; device: gdk.Device): bool = + toBool(gtk_widget_get_device_enabled(cast[ptr Widget00](self.impl), cast[ptr gdk.Device00](device.impl))) + +proc deviceEnabled*(self: Widget; device: gdk.Device): bool = + toBool(gtk_widget_get_device_enabled(cast[ptr Widget00](self.impl), cast[ptr gdk.Device00](device.impl))) + +proc gtk_widget_get_device_events*(self: ptr Widget00; device: ptr gdk.Device00): gdk.EventMask {. + importc: "gtk_widget_get_device_events", libprag.} + +proc getDeviceEvents*(self: Widget; device: gdk.Device): gdk.EventMask = + gtk_widget_get_device_events(cast[ptr Widget00](self.impl), cast[ptr gdk.Device00](device.impl)) + +proc deviceEvents*(self: Widget; device: gdk.Device): gdk.EventMask = + gtk_widget_get_device_events(cast[ptr Widget00](self.impl), cast[ptr gdk.Device00](device.impl)) + +proc gtk_widget_get_direction*(self: ptr Widget00): TextDirection {. + importc: "gtk_widget_get_direction", libprag.} + +proc getDirection*(self: Widget): TextDirection = + gtk_widget_get_direction(cast[ptr Widget00](self.impl)) + +proc direction*(self: Widget): TextDirection = + gtk_widget_get_direction(cast[ptr Widget00](self.impl)) + +proc gtk_widget_get_display*(self: ptr Widget00): ptr gdk.Display00 {. + importc: "gtk_widget_get_display", libprag.} + +proc getDisplay*(self: Widget): gdk.Display = + let gobj = gtk_widget_get_display(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: Widget): gdk.Display = + let gobj = gtk_widget_get_display(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_double_buffered*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_double_buffered", libprag.} + +proc getDoubleBuffered*(self: Widget): bool = + toBool(gtk_widget_get_double_buffered(cast[ptr Widget00](self.impl))) + +proc doubleBuffered*(self: Widget): bool = + toBool(gtk_widget_get_double_buffered(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_events*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_events", libprag.} + +proc getEvents*(self: Widget): int = + int(gtk_widget_get_events(cast[ptr Widget00](self.impl))) + +proc events*(self: Widget): int = + int(gtk_widget_get_events(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_focus_on_click*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_focus_on_click", libprag.} + +proc getFocusOnClick*(self: Widget): bool = + toBool(gtk_widget_get_focus_on_click(cast[ptr Widget00](self.impl))) + +proc focusOnClick*(self: Widget): bool = + toBool(gtk_widget_get_focus_on_click(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_font_map*(self: ptr Widget00): ptr pango.FontMap00 {. + importc: "gtk_widget_get_font_map", libprag.} + +proc getFontMap*(self: Widget): pango.FontMap = + let gobj = gtk_widget_get_font_map(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fontMap*(self: Widget): pango.FontMap = + let gobj = gtk_widget_get_font_map(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_font_options*(self: ptr Widget00): ptr cairo.FontOptions00 {. + importc: "gtk_widget_get_font_options", libprag.} + +proc getFontOptions*(self: Widget): cairo.FontOptions = + new(result) + result.impl = gtk_widget_get_font_options(cast[ptr Widget00](self.impl)) + +proc fontOptions*(self: Widget): cairo.FontOptions = + new(result) + result.impl = gtk_widget_get_font_options(cast[ptr Widget00](self.impl)) + +proc gtk_widget_get_frame_clock*(self: ptr Widget00): ptr gdk.FrameClock00 {. + importc: "gtk_widget_get_frame_clock", libprag.} + +proc getFrameClock*(self: Widget): gdk.FrameClock = + let gobj = gtk_widget_get_frame_clock(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.FrameClock](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc frameClock*(self: Widget): gdk.FrameClock = + let gobj = gtk_widget_get_frame_clock(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.FrameClock](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_has_tooltip*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_has_tooltip", libprag.} + +proc getHasTooltip*(self: Widget): bool = + toBool(gtk_widget_get_has_tooltip(cast[ptr Widget00](self.impl))) + +proc hasTooltip*(self: Widget): bool = + toBool(gtk_widget_get_has_tooltip(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_has_window*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_has_window", libprag.} + +proc getHasWindow*(self: Widget): bool = + toBool(gtk_widget_get_has_window(cast[ptr Widget00](self.impl))) + +proc hasWindow*(self: Widget): bool = + toBool(gtk_widget_get_has_window(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_hexpand*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_hexpand", libprag.} + +proc getHexpand*(self: Widget): bool = + toBool(gtk_widget_get_hexpand(cast[ptr Widget00](self.impl))) + +proc hexpand*(self: Widget): bool = + toBool(gtk_widget_get_hexpand(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_hexpand_set*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_hexpand_set", libprag.} + +proc getHexpandSet*(self: Widget): bool = + toBool(gtk_widget_get_hexpand_set(cast[ptr Widget00](self.impl))) + +proc hexpandSet*(self: Widget): bool = + toBool(gtk_widget_get_hexpand_set(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_mapped*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_mapped", libprag.} + +proc getMapped*(self: Widget): bool = + toBool(gtk_widget_get_mapped(cast[ptr Widget00](self.impl))) + +proc mapped*(self: Widget): bool = + toBool(gtk_widget_get_mapped(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_margin_bottom*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_margin_bottom", libprag.} + +proc getMarginBottom*(self: Widget): int = + int(gtk_widget_get_margin_bottom(cast[ptr Widget00](self.impl))) + +proc marginBottom*(self: Widget): int = + int(gtk_widget_get_margin_bottom(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_margin_end*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_margin_end", libprag.} + +proc getMarginEnd*(self: Widget): int = + int(gtk_widget_get_margin_end(cast[ptr Widget00](self.impl))) + +proc marginEnd*(self: Widget): int = + int(gtk_widget_get_margin_end(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_margin_left*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_margin_left", libprag.} + +proc getMarginLeft*(self: Widget): int = + int(gtk_widget_get_margin_left(cast[ptr Widget00](self.impl))) + +proc marginLeft*(self: Widget): int = + int(gtk_widget_get_margin_left(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_margin_right*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_margin_right", libprag.} + +proc getMarginRight*(self: Widget): int = + int(gtk_widget_get_margin_right(cast[ptr Widget00](self.impl))) + +proc marginRight*(self: Widget): int = + int(gtk_widget_get_margin_right(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_margin_start*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_margin_start", libprag.} + +proc getMarginStart*(self: Widget): int = + int(gtk_widget_get_margin_start(cast[ptr Widget00](self.impl))) + +proc marginStart*(self: Widget): int = + int(gtk_widget_get_margin_start(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_margin_top*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_margin_top", libprag.} + +proc getMarginTop*(self: Widget): int = + int(gtk_widget_get_margin_top(cast[ptr Widget00](self.impl))) + +proc marginTop*(self: Widget): int = + int(gtk_widget_get_margin_top(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_modifier_mask*(self: ptr Widget00; intent: gdk.ModifierIntent): gdk.ModifierType {. + importc: "gtk_widget_get_modifier_mask", libprag.} + +proc getModifierMask*(self: Widget; intent: gdk.ModifierIntent): gdk.ModifierType = + gtk_widget_get_modifier_mask(cast[ptr Widget00](self.impl), intent) + +proc modifierMask*(self: Widget; intent: gdk.ModifierIntent): gdk.ModifierType = + gtk_widget_get_modifier_mask(cast[ptr Widget00](self.impl), intent) + +proc gtk_widget_get_modifier_style*(self: ptr Widget00): ptr RcStyle00 {. + importc: "gtk_widget_get_modifier_style", libprag.} + +proc getModifierStyle*(self: Widget): RcStyle = + let gobj = gtk_widget_get_modifier_style(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[RcStyle](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc modifierStyle*(self: Widget): RcStyle = + let gobj = gtk_widget_get_modifier_style(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[RcStyle](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_name*(self: ptr Widget00): cstring {. + importc: "gtk_widget_get_name", libprag.} + +proc getName*(self: Widget): string = + let resul0 = gtk_widget_get_name(cast[ptr Widget00](self.impl)) + result = $resul0 + +proc name*(self: Widget): string = + let resul0 = gtk_widget_get_name(cast[ptr Widget00](self.impl)) + result = $resul0 + +proc gtk_widget_get_no_show_all*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_no_show_all", libprag.} + +proc getNoShowAll*(self: Widget): bool = + toBool(gtk_widget_get_no_show_all(cast[ptr Widget00](self.impl))) + +proc noShowAll*(self: Widget): bool = + toBool(gtk_widget_get_no_show_all(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_opacity*(self: ptr Widget00): cdouble {. + importc: "gtk_widget_get_opacity", libprag.} + +proc getOpacity*(self: Widget): cdouble = + gtk_widget_get_opacity(cast[ptr Widget00](self.impl)) + +proc opacity*(self: Widget): cdouble = + gtk_widget_get_opacity(cast[ptr Widget00](self.impl)) + +proc gtk_widget_get_pango_context*(self: ptr Widget00): ptr pango.Context00 {. + importc: "gtk_widget_get_pango_context", libprag.} + +proc getPangoContext*(self: Widget): pango.Context = + let gobj = gtk_widget_get_pango_context(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pangoContext*(self: Widget): pango.Context = + let gobj = gtk_widget_get_pango_context(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_parent*(self: ptr Widget00): ptr Widget00 {. + importc: "gtk_widget_get_parent", libprag.} + +proc getParent*(self: Widget): Widget = + let gobj = gtk_widget_get_parent(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc parent*(self: Widget): Widget = + let gobj = gtk_widget_get_parent(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_parent_window*(self: ptr Widget00): ptr gdk.Window00 {. + importc: "gtk_widget_get_parent_window", libprag.} + +proc getParentWindow*(self: Widget): gdk.Window = + let gobj = gtk_widget_get_parent_window(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc parentWindow*(self: Widget): gdk.Window = + let gobj = gtk_widget_get_parent_window(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_pointer*(self: ptr Widget00; x: var int32; y: var int32) {. + importc: "gtk_widget_get_pointer", libprag.} + +proc getPointer*(self: Widget; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gtk_widget_get_pointer(cast[ptr Widget00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc gtk_widget_get_preferred_height*(self: ptr Widget00; minimumHeight: var int32; naturalHeight: var int32) {. + importc: "gtk_widget_get_preferred_height", libprag.} + +proc getPreferredHeight*(self: Widget; minimumHeight: var int; naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_widget_get_preferred_height(cast[ptr Widget00](self.impl), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc preferredHeight*(self: Widget; minimumHeight: var int; naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_widget_get_preferred_height(cast[ptr Widget00](self.impl), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc gtk_widget_get_preferred_height_and_baseline_for_width*(self: ptr Widget00; width: int32; minimumHeight: var int32; + naturalHeight: var int32; minimumBaseline: var int32; naturalBaseline: var int32) {. + importc: "gtk_widget_get_preferred_height_and_baseline_for_width", libprag.} + +proc getPreferredHeightAndBaselineForWidth*(self: Widget; width: int; minimumHeight: var int; + naturalHeight: var int; minimumBaseline: var int; naturalBaseline: var int) = + var minimumBaseline_00 = int32(minimumBaseline) + var naturalHeight_00 = int32(naturalHeight) + var naturalBaseline_00 = int32(naturalBaseline) + var minimumHeight_00 = int32(minimumHeight) + gtk_widget_get_preferred_height_and_baseline_for_width(cast[ptr Widget00](self.impl), int32(width), minimumHeight_00, naturalHeight_00, minimumBaseline_00, naturalBaseline_00) + minimumBaseline = int(minimumBaseline_00) + naturalHeight = int(naturalHeight_00) + naturalBaseline = int(naturalBaseline_00) + minimumHeight = int(minimumHeight_00) + +proc preferredHeightAndBaselineForWidth*(self: Widget; width: int; minimumHeight: var int; + naturalHeight: var int; minimumBaseline: var int; naturalBaseline: var int) = + var minimumBaseline_00 = int32(minimumBaseline) + var naturalHeight_00 = int32(naturalHeight) + var naturalBaseline_00 = int32(naturalBaseline) + var minimumHeight_00 = int32(minimumHeight) + gtk_widget_get_preferred_height_and_baseline_for_width(cast[ptr Widget00](self.impl), int32(width), minimumHeight_00, naturalHeight_00, minimumBaseline_00, naturalBaseline_00) + minimumBaseline = int(minimumBaseline_00) + naturalHeight = int(naturalHeight_00) + naturalBaseline = int(naturalBaseline_00) + minimumHeight = int(minimumHeight_00) + +proc gtk_widget_get_preferred_height_for_width*(self: ptr Widget00; width: int32; minimumHeight: var int32; + naturalHeight: var int32) {. + importc: "gtk_widget_get_preferred_height_for_width", libprag.} + +proc getPreferredHeightForWidth*(self: Widget; width: int; minimumHeight: var int; + naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_widget_get_preferred_height_for_width(cast[ptr Widget00](self.impl), int32(width), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc preferredHeightForWidth*(self: Widget; width: int; minimumHeight: var int; + naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_widget_get_preferred_height_for_width(cast[ptr Widget00](self.impl), int32(width), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc gtk_widget_get_preferred_width*(self: ptr Widget00; minimumWidth: var int32; naturalWidth: var int32) {. + importc: "gtk_widget_get_preferred_width", libprag.} + +proc getPreferredWidth*(self: Widget; minimumWidth: var int; naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_widget_get_preferred_width(cast[ptr Widget00](self.impl), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc preferredWidth*(self: Widget; minimumWidth: var int; naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_widget_get_preferred_width(cast[ptr Widget00](self.impl), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc gtk_widget_get_preferred_width_for_height*(self: ptr Widget00; height: int32; minimumWidth: var int32; + naturalWidth: var int32) {. + importc: "gtk_widget_get_preferred_width_for_height", libprag.} + +proc getPreferredWidthForHeight*(self: Widget; height: int; minimumWidth: var int; + naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_widget_get_preferred_width_for_height(cast[ptr Widget00](self.impl), int32(height), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc preferredWidthForHeight*(self: Widget; height: int; minimumWidth: var int; + naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_widget_get_preferred_width_for_height(cast[ptr Widget00](self.impl), int32(height), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc gtk_widget_get_realized*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_realized", libprag.} + +proc getRealized*(self: Widget): bool = + toBool(gtk_widget_get_realized(cast[ptr Widget00](self.impl))) + +proc realized*(self: Widget): bool = + toBool(gtk_widget_get_realized(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_receives_default*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_receives_default", libprag.} + +proc getReceivesDefault*(self: Widget): bool = + toBool(gtk_widget_get_receives_default(cast[ptr Widget00](self.impl))) + +proc receivesDefault*(self: Widget): bool = + toBool(gtk_widget_get_receives_default(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_root_window*(self: ptr Widget00): ptr gdk.Window00 {. + importc: "gtk_widget_get_root_window", libprag.} + +proc getRootWindow*(self: Widget): gdk.Window = + let gobj = gtk_widget_get_root_window(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rootWindow*(self: Widget): gdk.Window = + let gobj = gtk_widget_get_root_window(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_scale_factor*(self: ptr Widget00): int32 {. + importc: "gtk_widget_get_scale_factor", libprag.} + +proc getScaleFactor*(self: Widget): int = + int(gtk_widget_get_scale_factor(cast[ptr Widget00](self.impl))) + +proc scaleFactor*(self: Widget): int = + int(gtk_widget_get_scale_factor(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_screen*(self: ptr Widget00): ptr gdk.Screen00 {. + importc: "gtk_widget_get_screen", libprag.} + +proc getScreen*(self: Widget): gdk.Screen = + let gobj = gtk_widget_get_screen(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: Widget): gdk.Screen = + let gobj = gtk_widget_get_screen(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_sensitive*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_sensitive", libprag.} + +proc getSensitive*(self: Widget): bool = + toBool(gtk_widget_get_sensitive(cast[ptr Widget00](self.impl))) + +proc sensitive*(self: Widget): bool = + toBool(gtk_widget_get_sensitive(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_size_request*(self: ptr Widget00; width: var int32; height: var int32) {. + importc: "gtk_widget_get_size_request", libprag.} + +proc getSizeRequest*(self: Widget; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_widget_get_size_request(cast[ptr Widget00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc sizeRequest*(self: Widget; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_widget_get_size_request(cast[ptr Widget00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc gtk_widget_get_state*(self: ptr Widget00): StateType {. + importc: "gtk_widget_get_state", libprag.} + +proc getState*(self: Widget): StateType = + gtk_widget_get_state(cast[ptr Widget00](self.impl)) + +proc state*(self: Widget): StateType = + gtk_widget_get_state(cast[ptr Widget00](self.impl)) + +proc gtk_widget_get_state_flags*(self: ptr Widget00): StateFlags {. + importc: "gtk_widget_get_state_flags", libprag.} + +proc getStateFlags*(self: Widget): StateFlags = + gtk_widget_get_state_flags(cast[ptr Widget00](self.impl)) + +proc stateFlags*(self: Widget): StateFlags = + gtk_widget_get_state_flags(cast[ptr Widget00](self.impl)) + +proc gtk_widget_get_style*(self: ptr Widget00): ptr Style00 {. + importc: "gtk_widget_get_style", libprag.} + +proc getStyle*(self: Widget): Style = + let gobj = gtk_widget_get_style(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Style](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc style*(self: Widget): Style = + let gobj = gtk_widget_get_style(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Style](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_support_multidevice*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_support_multidevice", libprag.} + +proc getSupportMultidevice*(self: Widget): bool = + toBool(gtk_widget_get_support_multidevice(cast[ptr Widget00](self.impl))) + +proc supportMultidevice*(self: Widget): bool = + toBool(gtk_widget_get_support_multidevice(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_template_child*(self: ptr Widget00; widgetType: GType; name: cstring): ptr gobject.Object00 {. + importc: "gtk_widget_get_template_child", libprag.} + +proc getTemplateChild*(self: Widget; widgetType: GType; name: string): gobject.Object = + let gobj = gtk_widget_get_template_child(cast[ptr Widget00](self.impl), widgetType, cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc templateChild*(self: Widget; widgetType: GType; name: string): gobject.Object = + let gobj = gtk_widget_get_template_child(cast[ptr Widget00](self.impl), widgetType, cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_tooltip_markup*(self: ptr Widget00): cstring {. + importc: "gtk_widget_get_tooltip_markup", libprag.} + +proc getTooltipMarkup*(self: Widget): string = + let resul0 = gtk_widget_get_tooltip_markup(cast[ptr Widget00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc tooltipMarkup*(self: Widget): string = + let resul0 = gtk_widget_get_tooltip_markup(cast[ptr Widget00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_widget_get_tooltip_text*(self: ptr Widget00): cstring {. + importc: "gtk_widget_get_tooltip_text", libprag.} + +proc getTooltipText*(self: Widget): string = + let resul0 = gtk_widget_get_tooltip_text(cast[ptr Widget00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc tooltipText*(self: Widget): string = + let resul0 = gtk_widget_get_tooltip_text(cast[ptr Widget00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_widget_get_toplevel*(self: ptr Widget00): ptr Widget00 {. + importc: "gtk_widget_get_toplevel", libprag.} + +proc getToplevel*(self: Widget): Widget = + let gobj = gtk_widget_get_toplevel(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc toplevel*(self: Widget): Widget = + let gobj = gtk_widget_get_toplevel(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_vexpand*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_vexpand", libprag.} + +proc getVexpand*(self: Widget): bool = + toBool(gtk_widget_get_vexpand(cast[ptr Widget00](self.impl))) + +proc vexpand*(self: Widget): bool = + toBool(gtk_widget_get_vexpand(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_vexpand_set*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_vexpand_set", libprag.} + +proc getVexpandSet*(self: Widget): bool = + toBool(gtk_widget_get_vexpand_set(cast[ptr Widget00](self.impl))) + +proc vexpandSet*(self: Widget): bool = + toBool(gtk_widget_get_vexpand_set(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_visible*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_get_visible", libprag.} + +proc getVisible*(self: Widget): bool = + toBool(gtk_widget_get_visible(cast[ptr Widget00](self.impl))) + +proc visible*(self: Widget): bool = + toBool(gtk_widget_get_visible(cast[ptr Widget00](self.impl))) + +proc gtk_widget_get_visual*(self: ptr Widget00): ptr gdk.Visual00 {. + importc: "gtk_widget_get_visual", libprag.} + +proc getVisual*(self: Widget): gdk.Visual = + let gobj = gtk_widget_get_visual(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc visual*(self: Widget): gdk.Visual = + let gobj = gtk_widget_get_visual(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Visual](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_get_window*(self: ptr Widget00): ptr gdk.Window00 {. + importc: "gtk_widget_get_window", libprag.} + +proc getWindow*(self: Widget): gdk.Window = + let gobj = gtk_widget_get_window(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc window*(self: Widget): gdk.Window = + let gobj = gtk_widget_get_window(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_grab_add*(self: ptr Widget00) {. + importc: "gtk_grab_add", libprag.} + +proc grabAdd*(self: Widget) = + gtk_grab_add(cast[ptr Widget00](self.impl)) + +proc gtk_widget_grab_default*(self: ptr Widget00) {. + importc: "gtk_widget_grab_default", libprag.} + +proc grabDefault*(self: Widget) = + gtk_widget_grab_default(cast[ptr Widget00](self.impl)) + +proc gtk_widget_grab_focus*(self: ptr Widget00) {. + importc: "gtk_widget_grab_focus", libprag.} + +proc grabFocus*(self: Widget) = + gtk_widget_grab_focus(cast[ptr Widget00](self.impl)) + +proc gtk_grab_remove*(self: ptr Widget00) {. + importc: "gtk_grab_remove", libprag.} + +proc grabRemove*(self: Widget) = + gtk_grab_remove(cast[ptr Widget00](self.impl)) + +proc gtk_widget_has_default*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_has_default", libprag.} + +proc hasDefault*(self: Widget): bool = + toBool(gtk_widget_has_default(cast[ptr Widget00](self.impl))) + +proc gtk_widget_has_focus*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_has_focus", libprag.} + +proc hasFocus*(self: Widget): bool = + toBool(gtk_widget_has_focus(cast[ptr Widget00](self.impl))) + +proc gtk_widget_has_grab*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_has_grab", libprag.} + +proc hasGrab*(self: Widget): bool = + toBool(gtk_widget_has_grab(cast[ptr Widget00](self.impl))) + +proc gtk_widget_has_rc_style*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_has_rc_style", libprag.} + +proc hasRcStyle*(self: Widget): bool = + toBool(gtk_widget_has_rc_style(cast[ptr Widget00](self.impl))) + +proc gtk_widget_has_screen*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_has_screen", libprag.} + +proc hasScreen*(self: Widget): bool = + toBool(gtk_widget_has_screen(cast[ptr Widget00](self.impl))) + +proc gtk_widget_has_visible_focus*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_has_visible_focus", libprag.} + +proc hasVisibleFocus*(self: Widget): bool = + toBool(gtk_widget_has_visible_focus(cast[ptr Widget00](self.impl))) + +proc gtk_widget_hide*(self: ptr Widget00) {. + importc: "gtk_widget_hide", libprag.} + +proc hide*(self: Widget) = + gtk_widget_hide(cast[ptr Widget00](self.impl)) + +proc gtk_widget_hide_on_delete*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_hide_on_delete", libprag.} + +proc hideOnDelete*(self: Widget): bool = + toBool(gtk_widget_hide_on_delete(cast[ptr Widget00](self.impl))) + +proc gtk_widget_in_destruction*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_in_destruction", libprag.} + +proc inDestruction*(self: Widget): bool = + toBool(gtk_widget_in_destruction(cast[ptr Widget00](self.impl))) + +proc gtk_widget_init_template*(self: ptr Widget00) {. + importc: "gtk_widget_init_template", libprag.} + +proc initTemplate*(self: Widget) = + gtk_widget_init_template(cast[ptr Widget00](self.impl)) + +proc gtk_widget_input_shape_combine_region*(self: ptr Widget00; region: ptr cairo.Region00) {. + importc: "gtk_widget_input_shape_combine_region", libprag.} + +proc inputShapeCombineRegion*(self: Widget; region: cairo.Region) = + gtk_widget_input_shape_combine_region(cast[ptr Widget00](self.impl), cast[ptr cairo.Region00](region.impl)) + +proc gtk_widget_insert_action_group*(self: ptr Widget00; name: cstring; group: ptr gio.ActionGroup00) {. + importc: "gtk_widget_insert_action_group", libprag.} + +proc insertActionGroup*(self: Widget; name: string; group: gio.ActionGroup) = + gtk_widget_insert_action_group(cast[ptr Widget00](self.impl), cstring(name), cast[ptr gio.ActionGroup00](group.impl)) + +proc gtk_widget_intersect*(self: ptr Widget00; area: ptr gdk.Rectangle00; intersection: var gdk.Rectangle00): gboolean {. + importc: "gtk_widget_intersect", libprag.} + +proc intersect*(self: ptr Widget00; area: ptr gdk.Rectangle00; intersection: var gdk.Rectangle00): gboolean {. + importc: "gtk_widget_intersect", libprag.} + +proc gtk_widget_is_ancestor*(self: ptr Widget00; ancestor: ptr Widget00): gboolean {. + importc: "gtk_widget_is_ancestor", libprag.} + +proc isAncestor*(self: Widget; ancestor: Widget): bool = + toBool(gtk_widget_is_ancestor(cast[ptr Widget00](self.impl), cast[ptr Widget00](ancestor.impl))) + +proc gtk_widget_is_composited*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_is_composited", libprag.} + +proc isComposited*(self: Widget): bool = + toBool(gtk_widget_is_composited(cast[ptr Widget00](self.impl))) + +proc gtk_widget_is_drawable*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_is_drawable", libprag.} + +proc isDrawable*(self: Widget): bool = + toBool(gtk_widget_is_drawable(cast[ptr Widget00](self.impl))) + +proc gtk_widget_is_focus*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_is_focus", libprag.} + +proc isFocus*(self: Widget): bool = + toBool(gtk_widget_is_focus(cast[ptr Widget00](self.impl))) + +proc gtk_widget_is_sensitive*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_is_sensitive", libprag.} + +proc isSensitive*(self: Widget): bool = + toBool(gtk_widget_is_sensitive(cast[ptr Widget00](self.impl))) + +proc gtk_widget_is_toplevel*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_is_toplevel", libprag.} + +proc isToplevel*(self: Widget): bool = + toBool(gtk_widget_is_toplevel(cast[ptr Widget00](self.impl))) + +proc gtk_widget_is_visible*(self: ptr Widget00): gboolean {. + importc: "gtk_widget_is_visible", libprag.} + +proc isVisible*(self: Widget): bool = + toBool(gtk_widget_is_visible(cast[ptr Widget00](self.impl))) + +proc gtk_widget_keynav_failed*(self: ptr Widget00; direction: DirectionType): gboolean {. + importc: "gtk_widget_keynav_failed", libprag.} + +proc keynavFailed*(self: Widget; direction: DirectionType): bool = + toBool(gtk_widget_keynav_failed(cast[ptr Widget00](self.impl), direction)) + +proc gtk_widget_list_accel_closures*(self: ptr Widget00): ptr pointer {. + importc: "gtk_widget_list_accel_closures", libprag.} + +proc listAccelClosures*(self: Widget): ptr pointer = + gtk_widget_list_accel_closures(cast[ptr Widget00](self.impl)) + +proc gtk_widget_list_action_prefixes*(self: ptr Widget00): cstringArray {. + importc: "gtk_widget_list_action_prefixes", libprag.} + +proc listActionPrefixes*(self: Widget): cstringArray = + gtk_widget_list_action_prefixes(cast[ptr Widget00](self.impl)) + +proc gtk_widget_list_mnemonic_labels*(self: ptr Widget00): ptr pointer {. + importc: "gtk_widget_list_mnemonic_labels", libprag.} + +proc listMnemonicLabels*(self: Widget): ptr pointer = + gtk_widget_list_mnemonic_labels(cast[ptr Widget00](self.impl)) + +proc gtk_widget_map*(self: ptr Widget00) {. + importc: "gtk_widget_map", libprag.} + +proc map*(self: Widget) = + gtk_widget_map(cast[ptr Widget00](self.impl)) + +proc gtk_widget_mnemonic_activate*(self: ptr Widget00; groupCycling: gboolean): gboolean {. + importc: "gtk_widget_mnemonic_activate", libprag.} + +proc mnemonicActivate*(self: Widget; groupCycling: bool): bool = + toBool(gtk_widget_mnemonic_activate(cast[ptr Widget00](self.impl), gboolean(groupCycling))) + +proc gtk_widget_modify_base*(self: ptr Widget00; state: StateType; color: ptr gdk.Color00) {. + importc: "gtk_widget_modify_base", libprag.} + +proc modifyBase*(self: Widget; state: StateType; color: gdk.Color) = + gtk_widget_modify_base(cast[ptr Widget00](self.impl), state, cast[ptr gdk.Color00](color.impl)) + +proc gtk_widget_modify_bg*(self: ptr Widget00; state: StateType; color: ptr gdk.Color00) {. + importc: "gtk_widget_modify_bg", libprag.} + +proc modifyBg*(self: Widget; state: StateType; color: gdk.Color) = + gtk_widget_modify_bg(cast[ptr Widget00](self.impl), state, cast[ptr gdk.Color00](color.impl)) + +proc gtk_widget_modify_cursor*(self: ptr Widget00; primary: ptr gdk.Color00; secondary: ptr gdk.Color00) {. + importc: "gtk_widget_modify_cursor", libprag.} + +proc modifyCursor*(self: Widget; primary: gdk.Color; secondary: gdk.Color) = + gtk_widget_modify_cursor(cast[ptr Widget00](self.impl), cast[ptr gdk.Color00](primary.impl), cast[ptr gdk.Color00](secondary.impl)) + +proc gtk_widget_modify_fg*(self: ptr Widget00; state: StateType; color: ptr gdk.Color00) {. + importc: "gtk_widget_modify_fg", libprag.} + +proc modifyFg*(self: Widget; state: StateType; color: gdk.Color) = + gtk_widget_modify_fg(cast[ptr Widget00](self.impl), state, cast[ptr gdk.Color00](color.impl)) + +proc gtk_widget_modify_font*(self: ptr Widget00; fontDesc: ptr pango.FontDescription00) {. + importc: "gtk_widget_modify_font", libprag.} + +proc modifyFont*(self: Widget; fontDesc: pango.FontDescription) = + gtk_widget_modify_font(cast[ptr Widget00](self.impl), cast[ptr pango.FontDescription00](fontDesc.impl)) + +proc gtk_widget_modify_style*(self: ptr Widget00; style: ptr RcStyle00) {. + importc: "gtk_widget_modify_style", libprag.} + +proc modifyStyle*(self: Widget; style: RcStyle) = + gtk_widget_modify_style(cast[ptr Widget00](self.impl), cast[ptr RcStyle00](style.impl)) + +proc gtk_widget_modify_text*(self: ptr Widget00; state: StateType; color: ptr gdk.Color00) {. + importc: "gtk_widget_modify_text", libprag.} + +proc modifyText*(self: Widget; state: StateType; color: gdk.Color) = + gtk_widget_modify_text(cast[ptr Widget00](self.impl), state, cast[ptr gdk.Color00](color.impl)) + +proc gtk_widget_override_background_color*(self: ptr Widget00; state: StateFlags; color: ptr gdk.RGBA00) {. + importc: "gtk_widget_override_background_color", libprag.} + +proc overrideBackgroundColor*(self: Widget; state: StateFlags; color: gdk.RGBA) = + gtk_widget_override_background_color(cast[ptr Widget00](self.impl), state, cast[ptr gdk.RGBA00](color.impl)) + +proc gtk_widget_override_color*(self: ptr Widget00; state: StateFlags; color: ptr gdk.RGBA00) {. + importc: "gtk_widget_override_color", libprag.} + +proc overrideColor*(self: Widget; state: StateFlags; color: gdk.RGBA) = + gtk_widget_override_color(cast[ptr Widget00](self.impl), state, cast[ptr gdk.RGBA00](color.impl)) + +proc gtk_widget_override_cursor*(self: ptr Widget00; cursor: ptr gdk.RGBA00; secondaryCursor: ptr gdk.RGBA00) {. + importc: "gtk_widget_override_cursor", libprag.} + +proc overrideCursor*(self: Widget; cursor: gdk.RGBA; secondaryCursor: gdk.RGBA) = + gtk_widget_override_cursor(cast[ptr Widget00](self.impl), cast[ptr gdk.RGBA00](cursor.impl), cast[ptr gdk.RGBA00](secondaryCursor.impl)) + +proc gtk_widget_override_font*(self: ptr Widget00; fontDesc: ptr pango.FontDescription00) {. + importc: "gtk_widget_override_font", libprag.} + +proc overrideFont*(self: Widget; fontDesc: pango.FontDescription) = + gtk_widget_override_font(cast[ptr Widget00](self.impl), cast[ptr pango.FontDescription00](fontDesc.impl)) + +proc gtk_widget_override_symbolic_color*(self: ptr Widget00; name: cstring; color: ptr gdk.RGBA00) {. + importc: "gtk_widget_override_symbolic_color", libprag.} + +proc overrideSymbolicColor*(self: Widget; name: string; color: gdk.RGBA) = + gtk_widget_override_symbolic_color(cast[ptr Widget00](self.impl), cstring(name), cast[ptr gdk.RGBA00](color.impl)) + +proc gtk_widget_path*(self: ptr Widget00; pathLength: var uint32; path: var cstring; + pathReversed: var cstring) {. + importc: "gtk_widget_path", libprag.} + +proc path*(self: Widget; pathLength: var int; path: var string; + pathReversed: var string) = + var pathReversed_00 = cstring(pathReversed) + var pathLength_00 = uint32(pathLength) + var path_00 = cstring(path) + gtk_widget_path(cast[ptr Widget00](self.impl), pathLength_00, path_00, pathReversed_00) + pathReversed = $(pathReversed_00) + pathLength = int(pathLength_00) + path = $(path_00) + +proc gtk_widget_queue_allocate*(self: ptr Widget00) {. + importc: "gtk_widget_queue_allocate", libprag.} + +proc queueAllocate*(self: Widget) = + gtk_widget_queue_allocate(cast[ptr Widget00](self.impl)) + +proc gtk_widget_queue_compute_expand*(self: ptr Widget00) {. + importc: "gtk_widget_queue_compute_expand", libprag.} + +proc queueComputeExpand*(self: Widget) = + gtk_widget_queue_compute_expand(cast[ptr Widget00](self.impl)) + +proc gtk_widget_queue_draw*(self: ptr Widget00) {. + importc: "gtk_widget_queue_draw", libprag.} + +proc queueDraw*(self: Widget) = + gtk_widget_queue_draw(cast[ptr Widget00](self.impl)) + +proc gtk_widget_queue_draw_area*(self: ptr Widget00; x: int32; y: int32; width: int32; + height: int32) {. + importc: "gtk_widget_queue_draw_area", libprag.} + +proc queueDrawArea*(self: Widget; x: int; y: int; width: int; height: int) = + gtk_widget_queue_draw_area(cast[ptr Widget00](self.impl), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_widget_queue_draw_region*(self: ptr Widget00; region: ptr cairo.Region00) {. + importc: "gtk_widget_queue_draw_region", libprag.} + +proc queueDrawRegion*(self: Widget; region: cairo.Region) = + gtk_widget_queue_draw_region(cast[ptr Widget00](self.impl), cast[ptr cairo.Region00](region.impl)) + +proc gtk_widget_queue_resize*(self: ptr Widget00) {. + importc: "gtk_widget_queue_resize", libprag.} + +proc queueResize*(self: Widget) = + gtk_widget_queue_resize(cast[ptr Widget00](self.impl)) + +proc gtk_widget_queue_resize_no_redraw*(self: ptr Widget00) {. + importc: "gtk_widget_queue_resize_no_redraw", libprag.} + +proc queueResizeNoRedraw*(self: Widget) = + gtk_widget_queue_resize_no_redraw(cast[ptr Widget00](self.impl)) + +proc gtk_widget_realize*(self: ptr Widget00) {. + importc: "gtk_widget_realize", libprag.} + +proc realize*(self: Widget) = + gtk_widget_realize(cast[ptr Widget00](self.impl)) + +proc gtk_widget_region_intersect*(self: ptr Widget00; region: ptr cairo.Region00): ptr cairo.Region00 {. + importc: "gtk_widget_region_intersect", libprag.} + +proc regionIntersect*(self: Widget; region: cairo.Region): cairo.Region = + new(result) + result.impl = gtk_widget_region_intersect(cast[ptr Widget00](self.impl), cast[ptr cairo.Region00](region.impl)) + +proc gtk_widget_register_window*(self: ptr Widget00; window: ptr gdk.Window00) {. + importc: "gtk_widget_register_window", libprag.} + +proc registerWindow*(self: Widget; window: gdk.Window) = + gtk_widget_register_window(cast[ptr Widget00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc gtk_widget_remove_mnemonic_label*(self: ptr Widget00; label: ptr Widget00) {. + importc: "gtk_widget_remove_mnemonic_label", libprag.} + +proc removeMnemonicLabel*(self: Widget; label: Widget) = + gtk_widget_remove_mnemonic_label(cast[ptr Widget00](self.impl), cast[ptr Widget00](label.impl)) + +proc gtk_widget_remove_tick_callback*(self: ptr Widget00; id: uint32) {. + importc: "gtk_widget_remove_tick_callback", libprag.} + +proc removeTickCallback*(self: Widget; id: int) = + gtk_widget_remove_tick_callback(cast[ptr Widget00](self.impl), uint32(id)) + +proc gtk_widget_render_icon*(self: ptr Widget00; stockId: cstring; size: int32; + detail: cstring): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_widget_render_icon", libprag.} + +proc renderIcon*(self: Widget; stockId: string; size: int; detail: string): gdkpixbuf.Pixbuf = + let gobj = gtk_widget_render_icon(cast[ptr Widget00](self.impl), cstring(stockId), int32(size), cstring(detail)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_render_icon_pixbuf*(self: ptr Widget00; stockId: cstring; size: int32): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_widget_render_icon_pixbuf", libprag.} + +proc renderIconPixbuf*(self: Widget; stockId: string; size: int): gdkpixbuf.Pixbuf = + let gobj = gtk_widget_render_icon_pixbuf(cast[ptr Widget00](self.impl), cstring(stockId), int32(size)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_reparent*(self: ptr Widget00; newParent: ptr Widget00) {. + importc: "gtk_widget_reparent", libprag.} + +proc reparent*(self: Widget; newParent: Widget) = + gtk_widget_reparent(cast[ptr Widget00](self.impl), cast[ptr Widget00](newParent.impl)) + +proc gtk_widget_reset_rc_styles*(self: ptr Widget00) {. + importc: "gtk_widget_reset_rc_styles", libprag.} + +proc resetRcStyles*(self: Widget) = + gtk_widget_reset_rc_styles(cast[ptr Widget00](self.impl)) + +proc gtk_widget_reset_style*(self: ptr Widget00) {. + importc: "gtk_widget_reset_style", libprag.} + +proc resetStyle*(self: Widget) = + gtk_widget_reset_style(cast[ptr Widget00](self.impl)) + +proc gtk_widget_send_expose*(self: ptr Widget00; event: ptr gdk.Event00): int32 {. + importc: "gtk_widget_send_expose", libprag.} + +proc sendExpose*(self: Widget; event: gdk.Event): int = + int(gtk_widget_send_expose(cast[ptr Widget00](self.impl), cast[ptr gdk.Event00](event.impl))) + +proc gtk_widget_send_focus_change*(self: ptr Widget00; event: ptr gdk.Event00): gboolean {. + importc: "gtk_widget_send_focus_change", libprag.} + +proc sendFocusChange*(self: Widget; event: gdk.Event): bool = + toBool(gtk_widget_send_focus_change(cast[ptr Widget00](self.impl), cast[ptr gdk.Event00](event.impl))) + +proc gtk_widget_set_allocation*(self: ptr Widget00; allocation: ptr gdk.Rectangle00) {. + importc: "gtk_widget_set_allocation", libprag.} + +proc setAllocation*(self: Widget; allocation: gdk.Rectangle) = + gtk_widget_set_allocation(cast[ptr Widget00](self.impl), cast[ptr gdk.Rectangle00](allocation.impl)) + +proc `allocation=`*(self: Widget; allocation: gdk.Rectangle) = + gtk_widget_set_allocation(cast[ptr Widget00](self.impl), cast[ptr gdk.Rectangle00](allocation.impl)) + +proc gtk_widget_set_app_paintable*(self: ptr Widget00; appPaintable: gboolean) {. + importc: "gtk_widget_set_app_paintable", libprag.} + +proc setAppPaintable*(self: Widget; appPaintable: bool) = + gtk_widget_set_app_paintable(cast[ptr Widget00](self.impl), gboolean(appPaintable)) + +proc `appPaintable=`*(self: Widget; appPaintable: bool) = + gtk_widget_set_app_paintable(cast[ptr Widget00](self.impl), gboolean(appPaintable)) + +proc gtk_widget_set_can_default*(self: ptr Widget00; canDefault: gboolean) {. + importc: "gtk_widget_set_can_default", libprag.} + +proc setCanDefault*(self: Widget; canDefault: bool) = + gtk_widget_set_can_default(cast[ptr Widget00](self.impl), gboolean(canDefault)) + +proc `canDefault=`*(self: Widget; canDefault: bool) = + gtk_widget_set_can_default(cast[ptr Widget00](self.impl), gboolean(canDefault)) + +proc gtk_widget_set_can_focus*(self: ptr Widget00; canFocus: gboolean) {. + importc: "gtk_widget_set_can_focus", libprag.} + +proc setCanFocus*(self: Widget; canFocus: bool) = + gtk_widget_set_can_focus(cast[ptr Widget00](self.impl), gboolean(canFocus)) + +proc `canFocus=`*(self: Widget; canFocus: bool) = + gtk_widget_set_can_focus(cast[ptr Widget00](self.impl), gboolean(canFocus)) + +proc gtk_widget_set_child_visible*(self: ptr Widget00; isVisible: gboolean) {. + importc: "gtk_widget_set_child_visible", libprag.} + +proc setChildVisible*(self: Widget; isVisible: bool) = + gtk_widget_set_child_visible(cast[ptr Widget00](self.impl), gboolean(isVisible)) + +proc `childVisible=`*(self: Widget; isVisible: bool) = + gtk_widget_set_child_visible(cast[ptr Widget00](self.impl), gboolean(isVisible)) + +proc gtk_widget_set_clip*(self: ptr Widget00; clip: ptr gdk.Rectangle00) {. + importc: "gtk_widget_set_clip", libprag.} + +proc setClip*(self: Widget; clip: gdk.Rectangle) = + gtk_widget_set_clip(cast[ptr Widget00](self.impl), cast[ptr gdk.Rectangle00](clip.impl)) + +proc `clip=`*(self: Widget; clip: gdk.Rectangle) = + gtk_widget_set_clip(cast[ptr Widget00](self.impl), cast[ptr gdk.Rectangle00](clip.impl)) + +proc gtk_widget_set_composite_name*(self: ptr Widget00; name: cstring) {. + importc: "gtk_widget_set_composite_name", libprag.} + +proc setCompositeName*(self: Widget; name: string) = + gtk_widget_set_composite_name(cast[ptr Widget00](self.impl), cstring(name)) + +proc `compositeName=`*(self: Widget; name: string) = + gtk_widget_set_composite_name(cast[ptr Widget00](self.impl), cstring(name)) + +proc gtk_widget_set_device_enabled*(self: ptr Widget00; device: ptr gdk.Device00; enabled: gboolean) {. + importc: "gtk_widget_set_device_enabled", libprag.} + +proc setDeviceEnabled*(self: Widget; device: gdk.Device; enabled: bool) = + gtk_widget_set_device_enabled(cast[ptr Widget00](self.impl), cast[ptr gdk.Device00](device.impl), gboolean(enabled)) + +proc gtk_widget_set_device_events*(self: ptr Widget00; device: ptr gdk.Device00; events: gdk.EventMask) {. + importc: "gtk_widget_set_device_events", libprag.} + +proc setDeviceEvents*(self: Widget; device: gdk.Device; events: gdk.EventMask) = + gtk_widget_set_device_events(cast[ptr Widget00](self.impl), cast[ptr gdk.Device00](device.impl), events) + +proc gtk_widget_set_direction*(self: ptr Widget00; dir: TextDirection) {. + importc: "gtk_widget_set_direction", libprag.} + +proc setDirection*(self: Widget; dir: TextDirection) = + gtk_widget_set_direction(cast[ptr Widget00](self.impl), dir) + +proc `direction=`*(self: Widget; dir: TextDirection) = + gtk_widget_set_direction(cast[ptr Widget00](self.impl), dir) + +proc gtk_widget_set_double_buffered*(self: ptr Widget00; doubleBuffered: gboolean) {. + importc: "gtk_widget_set_double_buffered", libprag.} + +proc setDoubleBuffered*(self: Widget; doubleBuffered: bool) = + gtk_widget_set_double_buffered(cast[ptr Widget00](self.impl), gboolean(doubleBuffered)) + +proc `doubleBuffered=`*(self: Widget; doubleBuffered: bool) = + gtk_widget_set_double_buffered(cast[ptr Widget00](self.impl), gboolean(doubleBuffered)) + +proc gtk_widget_set_events*(self: ptr Widget00; events: int32) {. + importc: "gtk_widget_set_events", libprag.} + +proc setEvents*(self: Widget; events: int) = + gtk_widget_set_events(cast[ptr Widget00](self.impl), int32(events)) + +proc `events=`*(self: Widget; events: int) = + gtk_widget_set_events(cast[ptr Widget00](self.impl), int32(events)) + +proc gtk_widget_set_focus_on_click*(self: ptr Widget00; focusOnClick: gboolean) {. + importc: "gtk_widget_set_focus_on_click", libprag.} + +proc setFocusOnClick*(self: Widget; focusOnClick: bool) = + gtk_widget_set_focus_on_click(cast[ptr Widget00](self.impl), gboolean(focusOnClick)) + +proc `focusOnClick=`*(self: Widget; focusOnClick: bool) = + gtk_widget_set_focus_on_click(cast[ptr Widget00](self.impl), gboolean(focusOnClick)) + +proc gtk_widget_set_font_map*(self: ptr Widget00; fontMap: ptr pango.FontMap00) {. + importc: "gtk_widget_set_font_map", libprag.} + +proc setFontMap*(self: Widget; fontMap: pango.FontMap) = + gtk_widget_set_font_map(cast[ptr Widget00](self.impl), cast[ptr pango.FontMap00](fontMap.impl)) + +proc `fontMap=`*(self: Widget; fontMap: pango.FontMap) = + gtk_widget_set_font_map(cast[ptr Widget00](self.impl), cast[ptr pango.FontMap00](fontMap.impl)) + +proc gtk_widget_set_font_options*(self: ptr Widget00; options: ptr cairo.FontOptions00) {. + importc: "gtk_widget_set_font_options", libprag.} + +proc setFontOptions*(self: Widget; options: cairo.FontOptions) = + gtk_widget_set_font_options(cast[ptr Widget00](self.impl), cast[ptr cairo.FontOptions00](options.impl)) + +proc `fontOptions=`*(self: Widget; options: cairo.FontOptions) = + gtk_widget_set_font_options(cast[ptr Widget00](self.impl), cast[ptr cairo.FontOptions00](options.impl)) + +proc gtk_widget_set_has_tooltip*(self: ptr Widget00; hasTooltip: gboolean) {. + importc: "gtk_widget_set_has_tooltip", libprag.} + +proc setHasTooltip*(self: Widget; hasTooltip: bool) = + gtk_widget_set_has_tooltip(cast[ptr Widget00](self.impl), gboolean(hasTooltip)) + +proc `hasTooltip=`*(self: Widget; hasTooltip: bool) = + gtk_widget_set_has_tooltip(cast[ptr Widget00](self.impl), gboolean(hasTooltip)) + +proc gtk_widget_set_has_window*(self: ptr Widget00; hasWindow: gboolean) {. + importc: "gtk_widget_set_has_window", libprag.} + +proc setHasWindow*(self: Widget; hasWindow: bool) = + gtk_widget_set_has_window(cast[ptr Widget00](self.impl), gboolean(hasWindow)) + +proc `hasWindow=`*(self: Widget; hasWindow: bool) = + gtk_widget_set_has_window(cast[ptr Widget00](self.impl), gboolean(hasWindow)) + +proc gtk_widget_set_hexpand*(self: ptr Widget00; expand: gboolean) {. + importc: "gtk_widget_set_hexpand", libprag.} + +proc setHexpand*(self: Widget; expand: bool) = + gtk_widget_set_hexpand(cast[ptr Widget00](self.impl), gboolean(expand)) + +proc `hexpand=`*(self: Widget; expand: bool) = + gtk_widget_set_hexpand(cast[ptr Widget00](self.impl), gboolean(expand)) + +proc gtk_widget_set_hexpand_set*(self: ptr Widget00; set: gboolean) {. + importc: "gtk_widget_set_hexpand_set", libprag.} + +proc setHexpandSet*(self: Widget; set: bool) = + gtk_widget_set_hexpand_set(cast[ptr Widget00](self.impl), gboolean(set)) + +proc `hexpandSet=`*(self: Widget; set: bool) = + gtk_widget_set_hexpand_set(cast[ptr Widget00](self.impl), gboolean(set)) + +proc gtk_widget_set_mapped*(self: ptr Widget00; mapped: gboolean) {. + importc: "gtk_widget_set_mapped", libprag.} + +proc setMapped*(self: Widget; mapped: bool) = + gtk_widget_set_mapped(cast[ptr Widget00](self.impl), gboolean(mapped)) + +proc `mapped=`*(self: Widget; mapped: bool) = + gtk_widget_set_mapped(cast[ptr Widget00](self.impl), gboolean(mapped)) + +proc gtk_widget_set_margin_bottom*(self: ptr Widget00; margin: int32) {. + importc: "gtk_widget_set_margin_bottom", libprag.} + +proc setMarginBottom*(self: Widget; margin: int) = + gtk_widget_set_margin_bottom(cast[ptr Widget00](self.impl), int32(margin)) + +proc `marginBottom=`*(self: Widget; margin: int) = + gtk_widget_set_margin_bottom(cast[ptr Widget00](self.impl), int32(margin)) + +proc gtk_widget_set_margin_end*(self: ptr Widget00; margin: int32) {. + importc: "gtk_widget_set_margin_end", libprag.} + +proc setMarginEnd*(self: Widget; margin: int) = + gtk_widget_set_margin_end(cast[ptr Widget00](self.impl), int32(margin)) + +proc `marginEnd=`*(self: Widget; margin: int) = + gtk_widget_set_margin_end(cast[ptr Widget00](self.impl), int32(margin)) + +proc gtk_widget_set_margin_left*(self: ptr Widget00; margin: int32) {. + importc: "gtk_widget_set_margin_left", libprag.} + +proc setMarginLeft*(self: Widget; margin: int) = + gtk_widget_set_margin_left(cast[ptr Widget00](self.impl), int32(margin)) + +proc `marginLeft=`*(self: Widget; margin: int) = + gtk_widget_set_margin_left(cast[ptr Widget00](self.impl), int32(margin)) + +proc gtk_widget_set_margin_right*(self: ptr Widget00; margin: int32) {. + importc: "gtk_widget_set_margin_right", libprag.} + +proc setMarginRight*(self: Widget; margin: int) = + gtk_widget_set_margin_right(cast[ptr Widget00](self.impl), int32(margin)) + +proc `marginRight=`*(self: Widget; margin: int) = + gtk_widget_set_margin_right(cast[ptr Widget00](self.impl), int32(margin)) + +proc gtk_widget_set_margin_start*(self: ptr Widget00; margin: int32) {. + importc: "gtk_widget_set_margin_start", libprag.} + +proc setMarginStart*(self: Widget; margin: int) = + gtk_widget_set_margin_start(cast[ptr Widget00](self.impl), int32(margin)) + +proc `marginStart=`*(self: Widget; margin: int) = + gtk_widget_set_margin_start(cast[ptr Widget00](self.impl), int32(margin)) + +proc gtk_widget_set_margin_top*(self: ptr Widget00; margin: int32) {. + importc: "gtk_widget_set_margin_top", libprag.} + +proc setMarginTop*(self: Widget; margin: int) = + gtk_widget_set_margin_top(cast[ptr Widget00](self.impl), int32(margin)) + +proc `marginTop=`*(self: Widget; margin: int) = + gtk_widget_set_margin_top(cast[ptr Widget00](self.impl), int32(margin)) + +proc gtk_widget_set_name*(self: ptr Widget00; name: cstring) {. + importc: "gtk_widget_set_name", libprag.} + +proc setName*(self: Widget; name: string) = + gtk_widget_set_name(cast[ptr Widget00](self.impl), cstring(name)) + +proc `name=`*(self: Widget; name: string) = + gtk_widget_set_name(cast[ptr Widget00](self.impl), cstring(name)) + +proc gtk_widget_set_no_show_all*(self: ptr Widget00; noShowAll: gboolean) {. + importc: "gtk_widget_set_no_show_all", libprag.} + +proc setNoShowAll*(self: Widget; noShowAll: bool) = + gtk_widget_set_no_show_all(cast[ptr Widget00](self.impl), gboolean(noShowAll)) + +proc `noShowAll=`*(self: Widget; noShowAll: bool) = + gtk_widget_set_no_show_all(cast[ptr Widget00](self.impl), gboolean(noShowAll)) + +proc gtk_widget_set_opacity*(self: ptr Widget00; opacity: cdouble) {. + importc: "gtk_widget_set_opacity", libprag.} + +proc setOpacity*(self: Widget; opacity: cdouble) = + gtk_widget_set_opacity(cast[ptr Widget00](self.impl), opacity) + +proc `opacity=`*(self: Widget; opacity: cdouble) = + gtk_widget_set_opacity(cast[ptr Widget00](self.impl), opacity) + +proc gtk_widget_set_parent*(self: ptr Widget00; parent: ptr Widget00) {. + importc: "gtk_widget_set_parent", libprag.} + +proc setParent*(self: Widget; parent: Widget) = + gtk_widget_set_parent(cast[ptr Widget00](self.impl), cast[ptr Widget00](parent.impl)) + +proc `parent=`*(self: Widget; parent: Widget) = + gtk_widget_set_parent(cast[ptr Widget00](self.impl), cast[ptr Widget00](parent.impl)) + +proc gtk_widget_set_parent_window*(self: ptr Widget00; parentWindow: ptr gdk.Window00) {. + importc: "gtk_widget_set_parent_window", libprag.} + +proc setParentWindow*(self: Widget; parentWindow: gdk.Window) = + gtk_widget_set_parent_window(cast[ptr Widget00](self.impl), cast[ptr gdk.Window00](parentWindow.impl)) + +proc `parentWindow=`*(self: Widget; parentWindow: gdk.Window) = + gtk_widget_set_parent_window(cast[ptr Widget00](self.impl), cast[ptr gdk.Window00](parentWindow.impl)) + +proc gtk_widget_set_realized*(self: ptr Widget00; realized: gboolean) {. + importc: "gtk_widget_set_realized", libprag.} + +proc setRealized*(self: Widget; realized: bool) = + gtk_widget_set_realized(cast[ptr Widget00](self.impl), gboolean(realized)) + +proc `realized=`*(self: Widget; realized: bool) = + gtk_widget_set_realized(cast[ptr Widget00](self.impl), gboolean(realized)) + +proc gtk_widget_set_receives_default*(self: ptr Widget00; receivesDefault: gboolean) {. + importc: "gtk_widget_set_receives_default", libprag.} + +proc setReceivesDefault*(self: Widget; receivesDefault: bool) = + gtk_widget_set_receives_default(cast[ptr Widget00](self.impl), gboolean(receivesDefault)) + +proc `receivesDefault=`*(self: Widget; receivesDefault: bool) = + gtk_widget_set_receives_default(cast[ptr Widget00](self.impl), gboolean(receivesDefault)) + +proc gtk_widget_set_redraw_on_allocate*(self: ptr Widget00; redrawOnAllocate: gboolean) {. + importc: "gtk_widget_set_redraw_on_allocate", libprag.} + +proc setRedrawOnAllocate*(self: Widget; redrawOnAllocate: bool) = + gtk_widget_set_redraw_on_allocate(cast[ptr Widget00](self.impl), gboolean(redrawOnAllocate)) + +proc `redrawOnAllocate=`*(self: Widget; redrawOnAllocate: bool) = + gtk_widget_set_redraw_on_allocate(cast[ptr Widget00](self.impl), gboolean(redrawOnAllocate)) + +proc gtk_widget_set_sensitive*(self: ptr Widget00; sensitive: gboolean) {. + importc: "gtk_widget_set_sensitive", libprag.} + +proc setSensitive*(self: Widget; sensitive: bool) = + gtk_widget_set_sensitive(cast[ptr Widget00](self.impl), gboolean(sensitive)) + +proc `sensitive=`*(self: Widget; sensitive: bool) = + gtk_widget_set_sensitive(cast[ptr Widget00](self.impl), gboolean(sensitive)) + +proc gtk_widget_set_size_request*(self: ptr Widget00; width: int32; height: int32) {. + importc: "gtk_widget_set_size_request", libprag.} + +proc setSizeRequest*(self: Widget; width: int; height: int) = + gtk_widget_set_size_request(cast[ptr Widget00](self.impl), int32(width), int32(height)) + +proc gtk_widget_set_state*(self: ptr Widget00; state: StateType) {. + importc: "gtk_widget_set_state", libprag.} + +proc setState*(self: Widget; state: StateType) = + gtk_widget_set_state(cast[ptr Widget00](self.impl), state) + +proc `state=`*(self: Widget; state: StateType) = + gtk_widget_set_state(cast[ptr Widget00](self.impl), state) + +proc gtk_widget_set_state_flags*(self: ptr Widget00; flags: StateFlags; clear: gboolean) {. + importc: "gtk_widget_set_state_flags", libprag.} + +proc setStateFlags*(self: Widget; flags: StateFlags; clear: bool) = + gtk_widget_set_state_flags(cast[ptr Widget00](self.impl), flags, gboolean(clear)) + +proc gtk_widget_set_style*(self: ptr Widget00; style: ptr Style00) {. + importc: "gtk_widget_set_style", libprag.} + +proc setStyle*(self: Widget; style: Style) = + gtk_widget_set_style(cast[ptr Widget00](self.impl), cast[ptr Style00](style.impl)) + +proc `style=`*(self: Widget; style: Style) = + gtk_widget_set_style(cast[ptr Widget00](self.impl), cast[ptr Style00](style.impl)) + +proc gtk_widget_set_support_multidevice*(self: ptr Widget00; supportMultidevice: gboolean) {. + importc: "gtk_widget_set_support_multidevice", libprag.} + +proc setSupportMultidevice*(self: Widget; supportMultidevice: bool) = + gtk_widget_set_support_multidevice(cast[ptr Widget00](self.impl), gboolean(supportMultidevice)) + +proc `supportMultidevice=`*(self: Widget; supportMultidevice: bool) = + gtk_widget_set_support_multidevice(cast[ptr Widget00](self.impl), gboolean(supportMultidevice)) + +proc gtk_widget_set_tooltip_markup*(self: ptr Widget00; markup: cstring) {. + importc: "gtk_widget_set_tooltip_markup", libprag.} + +proc setTooltipMarkup*(self: Widget; markup: string) = + gtk_widget_set_tooltip_markup(cast[ptr Widget00](self.impl), cstring(markup)) + +proc `tooltipMarkup=`*(self: Widget; markup: string) = + gtk_widget_set_tooltip_markup(cast[ptr Widget00](self.impl), cstring(markup)) + +proc gtk_widget_set_tooltip_text*(self: ptr Widget00; text: cstring) {. + importc: "gtk_widget_set_tooltip_text", libprag.} + +proc setTooltipText*(self: Widget; text: string) = + gtk_widget_set_tooltip_text(cast[ptr Widget00](self.impl), cstring(text)) + +proc `tooltipText=`*(self: Widget; text: string) = + gtk_widget_set_tooltip_text(cast[ptr Widget00](self.impl), cstring(text)) + +proc gtk_widget_set_vexpand*(self: ptr Widget00; expand: gboolean) {. + importc: "gtk_widget_set_vexpand", libprag.} + +proc setVexpand*(self: Widget; expand: bool) = + gtk_widget_set_vexpand(cast[ptr Widget00](self.impl), gboolean(expand)) + +proc `vexpand=`*(self: Widget; expand: bool) = + gtk_widget_set_vexpand(cast[ptr Widget00](self.impl), gboolean(expand)) + +proc gtk_widget_set_vexpand_set*(self: ptr Widget00; set: gboolean) {. + importc: "gtk_widget_set_vexpand_set", libprag.} + +proc setVexpandSet*(self: Widget; set: bool) = + gtk_widget_set_vexpand_set(cast[ptr Widget00](self.impl), gboolean(set)) + +proc `vexpandSet=`*(self: Widget; set: bool) = + gtk_widget_set_vexpand_set(cast[ptr Widget00](self.impl), gboolean(set)) + +proc gtk_widget_set_visible*(self: ptr Widget00; visible: gboolean) {. + importc: "gtk_widget_set_visible", libprag.} + +proc setVisible*(self: Widget; visible: bool) = + gtk_widget_set_visible(cast[ptr Widget00](self.impl), gboolean(visible)) + +proc `visible=`*(self: Widget; visible: bool) = + gtk_widget_set_visible(cast[ptr Widget00](self.impl), gboolean(visible)) + +proc gtk_widget_set_visual*(self: ptr Widget00; visual: ptr gdk.Visual00) {. + importc: "gtk_widget_set_visual", libprag.} + +proc setVisual*(self: Widget; visual: gdk.Visual) = + gtk_widget_set_visual(cast[ptr Widget00](self.impl), cast[ptr gdk.Visual00](visual.impl)) + +proc `visual=`*(self: Widget; visual: gdk.Visual) = + gtk_widget_set_visual(cast[ptr Widget00](self.impl), cast[ptr gdk.Visual00](visual.impl)) + +proc gtk_widget_set_window*(self: ptr Widget00; window: ptr gdk.Window00) {. + importc: "gtk_widget_set_window", libprag.} + +proc setWindow*(self: Widget; window: gdk.Window) = + gtk_widget_set_window(cast[ptr Widget00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc `window=`*(self: Widget; window: gdk.Window) = + gtk_widget_set_window(cast[ptr Widget00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc gtk_widget_shape_combine_region*(self: ptr Widget00; region: ptr cairo.Region00) {. + importc: "gtk_widget_shape_combine_region", libprag.} + +proc shapeCombineRegion*(self: Widget; region: cairo.Region) = + gtk_widget_shape_combine_region(cast[ptr Widget00](self.impl), cast[ptr cairo.Region00](region.impl)) + +proc gtk_widget_show*(self: ptr Widget00) {. + importc: "gtk_widget_show", libprag.} + +proc show*(self: Widget) = + gtk_widget_show(cast[ptr Widget00](self.impl)) + +proc gtk_widget_show_all*(self: ptr Widget00) {. + importc: "gtk_widget_show_all", libprag.} + +proc showAll*(self: Widget) = + gtk_widget_show_all(cast[ptr Widget00](self.impl)) + +proc gtk_widget_show_now*(self: ptr Widget00) {. + importc: "gtk_widget_show_now", libprag.} + +proc showNow*(self: Widget) = + gtk_widget_show_now(cast[ptr Widget00](self.impl)) + +proc gtk_widget_size_allocate*(self: ptr Widget00; allocation: ptr gdk.Rectangle00) {. + importc: "gtk_widget_size_allocate", libprag.} + +proc sizeAllocate*(self: Widget; allocation: gdk.Rectangle) = + gtk_widget_size_allocate(cast[ptr Widget00](self.impl), cast[ptr gdk.Rectangle00](allocation.impl)) + +proc gtk_widget_size_allocate_with_baseline*(self: ptr Widget00; allocation: ptr gdk.Rectangle00; + baseline: int32) {. + importc: "gtk_widget_size_allocate_with_baseline", libprag.} + +proc sizeAllocateWithBaseline*(self: Widget; allocation: gdk.Rectangle; baseline: int) = + gtk_widget_size_allocate_with_baseline(cast[ptr Widget00](self.impl), cast[ptr gdk.Rectangle00](allocation.impl), int32(baseline)) + +proc gtk_widget_style_attach*(self: ptr Widget00) {. + importc: "gtk_widget_style_attach", libprag.} + +proc styleAttach*(self: Widget) = + gtk_widget_style_attach(cast[ptr Widget00](self.impl)) + +proc gtk_widget_style_get_property*(self: ptr Widget00; propertyName: cstring; value: ptr gobject.Value00) {. + importc: "gtk_widget_style_get_property", libprag.} + +proc styleGetProperty*(self: Widget; propertyName: string; value: gobject.Value) = + gtk_widget_style_get_property(cast[ptr Widget00](self.impl), cstring(propertyName), cast[ptr gobject.Value00](value.impl)) + +proc gtk_widget_thaw_child_notify*(self: ptr Widget00) {. + importc: "gtk_widget_thaw_child_notify", libprag.} + +proc thawChildNotify*(self: Widget) = + gtk_widget_thaw_child_notify(cast[ptr Widget00](self.impl)) + +proc gtk_widget_translate_coordinates*(self: ptr Widget00; destWidget: ptr Widget00; srcX: int32; + srcY: int32; destX: var int32; destY: var int32): gboolean {. + importc: "gtk_widget_translate_coordinates", libprag.} + +proc translateCoordinates*(self: Widget; destWidget: Widget; srcX: int; srcY: int; + destX: var int; destY: var int): bool = + var destY_00 = int32(destY) + var destX_00 = int32(destX) + result = toBool(gtk_widget_translate_coordinates(cast[ptr Widget00](self.impl), cast[ptr Widget00](destWidget.impl), int32(srcX), int32(srcY), destX_00, destY_00)) + destY = int(destY_00) + destX = int(destX_00) + +proc gtk_widget_trigger_tooltip_query*(self: ptr Widget00) {. + importc: "gtk_widget_trigger_tooltip_query", libprag.} + +proc triggerTooltipQuery*(self: Widget) = + gtk_widget_trigger_tooltip_query(cast[ptr Widget00](self.impl)) + +proc gtk_widget_unmap*(self: ptr Widget00) {. + importc: "gtk_widget_unmap", libprag.} + +proc unmap*(self: Widget) = + gtk_widget_unmap(cast[ptr Widget00](self.impl)) + +proc gtk_widget_unparent*(self: ptr Widget00) {. + importc: "gtk_widget_unparent", libprag.} + +proc unparent*(self: Widget) = + gtk_widget_unparent(cast[ptr Widget00](self.impl)) + +proc gtk_widget_unrealize*(self: ptr Widget00) {. + importc: "gtk_widget_unrealize", libprag.} + +proc unrealize*(self: Widget) = + gtk_widget_unrealize(cast[ptr Widget00](self.impl)) + +proc gtk_widget_unregister_window*(self: ptr Widget00; window: ptr gdk.Window00) {. + importc: "gtk_widget_unregister_window", libprag.} + +proc unregisterWindow*(self: Widget; window: gdk.Window) = + gtk_widget_unregister_window(cast[ptr Widget00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc gtk_widget_unset_state_flags*(self: ptr Widget00; flags: StateFlags) {. + importc: "gtk_widget_unset_state_flags", libprag.} + +proc unsetStateFlags*(self: Widget; flags: StateFlags) = + gtk_widget_unset_state_flags(cast[ptr Widget00](self.impl), flags) + +proc gtk_tooltip_set_custom*(self: ptr Tooltip00; customWidget: ptr Widget00) {. + importc: "gtk_tooltip_set_custom", libprag.} + +proc setCustom*(self: Tooltip; customWidget: Widget) = + gtk_tooltip_set_custom(cast[ptr Tooltip00](self.impl), cast[ptr Widget00](customWidget.impl)) + +proc `custom=`*(self: Tooltip; customWidget: Widget) = + gtk_tooltip_set_custom(cast[ptr Tooltip00](self.impl), cast[ptr Widget00](customWidget.impl)) + +type + ContainerPrivate00* {.pure.} = object + ContainerPrivate* = ref object + impl*: ptr ContainerPrivate00 + +type + Container* = ref object of Widget + Container00* = object of Widget00 + priv2: ptr ContainerPrivate00 + +proc scAdd*(self: Container; p: proc (self: ptr gobject.Object00; `object`: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "add", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCheckResize*(self: Container; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "check-resize", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRemove*(self: Container; p: proc (self: ptr gobject.Object00; `object`: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "remove", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSetFocusChild*(self: Container; p: proc (self: ptr gobject.Object00; `object`: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "set-focus-child", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_container_add*(self: ptr Container00; widget: ptr Widget00) {. + importc: "gtk_container_add", libprag.} + +proc add*(self: Container; widget: Widget) = + gtk_container_add(cast[ptr Container00](self.impl), cast[ptr Widget00](widget.impl)) + +proc gtk_container_check_resize*(self: ptr Container00) {. + importc: "gtk_container_check_resize", libprag.} + +proc checkResize*(self: Container) = + gtk_container_check_resize(cast[ptr Container00](self.impl)) + +proc gtk_container_child_get_property*(self: ptr Container00; child: ptr Widget00; propertyName: cstring; + value: ptr gobject.Value00) {. + importc: "gtk_container_child_get_property", libprag.} + +proc childGetProperty*(self: Container; child: Widget; propertyName: string; + value: gobject.Value) = + gtk_container_child_get_property(cast[ptr Container00](self.impl), cast[ptr Widget00](child.impl), cstring(propertyName), cast[ptr gobject.Value00](value.impl)) + +proc gtk_container_child_notify*(self: ptr Container00; child: ptr Widget00; childProperty: cstring) {. + importc: "gtk_container_child_notify", libprag.} + +proc childNotify*(self: Container; child: Widget; childProperty: string) = + gtk_container_child_notify(cast[ptr Container00](self.impl), cast[ptr Widget00](child.impl), cstring(childProperty)) + +proc gtk_container_child_notify_by_pspec*(self: ptr Container00; child: ptr Widget00; pspec: ptr gobject.ParamSpec00) {. + importc: "gtk_container_child_notify_by_pspec", libprag.} + +proc childNotifyByPspec*(self: Container; child: Widget; pspec: gobject.ParamSpec) = + gtk_container_child_notify_by_pspec(cast[ptr Container00](self.impl), cast[ptr Widget00](child.impl), cast[ptr gobject.ParamSpec00](pspec.impl)) + +proc gtk_container_child_set_property*(self: ptr Container00; child: ptr Widget00; propertyName: cstring; + value: ptr gobject.Value00) {. + importc: "gtk_container_child_set_property", libprag.} + +proc childSetProperty*(self: Container; child: Widget; propertyName: string; + value: gobject.Value) = + gtk_container_child_set_property(cast[ptr Container00](self.impl), cast[ptr Widget00](child.impl), cstring(propertyName), cast[ptr gobject.Value00](value.impl)) + +proc gtk_container_child_type*(self: ptr Container00): GType {. + importc: "gtk_container_child_type", libprag.} + +proc childType*(self: Container): GType = + gtk_container_child_type(cast[ptr Container00](self.impl)) + +proc gtk_container_get_border_width*(self: ptr Container00): uint32 {. + importc: "gtk_container_get_border_width", libprag.} + +proc getBorderWidth*(self: Container): int = + int(gtk_container_get_border_width(cast[ptr Container00](self.impl))) + +proc borderWidth*(self: Container): int = + int(gtk_container_get_border_width(cast[ptr Container00](self.impl))) + +proc gtk_container_get_children*(self: ptr Container00): ptr pointer {. + importc: "gtk_container_get_children", libprag.} + +proc getChildren*(self: Container): ptr pointer = + gtk_container_get_children(cast[ptr Container00](self.impl)) + +proc children*(self: Container): ptr pointer = + gtk_container_get_children(cast[ptr Container00](self.impl)) + +proc gtk_container_get_focus_chain*(self: ptr Container00; focusableWidgets: var ptr pointer): gboolean {. + importc: "gtk_container_get_focus_chain", libprag.} + +proc getFocusChain*(self: Container; focusableWidgets: var ptr pointer): bool = + toBool(gtk_container_get_focus_chain(cast[ptr Container00](self.impl), focusableWidgets)) + +proc focusChain*(self: Container; focusableWidgets: var ptr pointer): bool = + toBool(gtk_container_get_focus_chain(cast[ptr Container00](self.impl), focusableWidgets)) + +proc gtk_container_get_focus_child*(self: ptr Container00): ptr Widget00 {. + importc: "gtk_container_get_focus_child", libprag.} + +proc getFocusChild*(self: Container): Widget = + let gobj = gtk_container_get_focus_child(cast[ptr Container00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc focusChild*(self: Container): Widget = + let gobj = gtk_container_get_focus_child(cast[ptr Container00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_container_propagate_draw*(self: ptr Container00; child: ptr Widget00; cr: ptr cairo.Context00) {. + importc: "gtk_container_propagate_draw", libprag.} + +proc propagateDraw*(self: Container; child: Widget; cr: cairo.Context) = + gtk_container_propagate_draw(cast[ptr Container00](self.impl), cast[ptr Widget00](child.impl), cast[ptr cairo.Context00](cr.impl)) + +proc gtk_container_remove*(self: ptr Container00; widget: ptr Widget00) {. + importc: "gtk_container_remove", libprag.} + +proc remove*(self: Container; widget: Widget) = + gtk_container_remove(cast[ptr Container00](self.impl), cast[ptr Widget00](widget.impl)) + +proc gtk_container_resize_children*(self: ptr Container00) {. + importc: "gtk_container_resize_children", libprag.} + +proc resizeChildren*(self: Container) = + gtk_container_resize_children(cast[ptr Container00](self.impl)) + +proc gtk_container_set_border_width*(self: ptr Container00; borderWidth: uint32) {. + importc: "gtk_container_set_border_width", libprag.} + +proc setBorderWidth*(self: Container; borderWidth: int) = + gtk_container_set_border_width(cast[ptr Container00](self.impl), uint32(borderWidth)) + +proc `borderWidth=`*(self: Container; borderWidth: int) = + gtk_container_set_border_width(cast[ptr Container00](self.impl), uint32(borderWidth)) + +proc gtk_container_set_focus_chain*(self: ptr Container00; focusableWidgets: ptr pointer) {. + importc: "gtk_container_set_focus_chain", libprag.} + +proc setFocusChain*(self: Container; focusableWidgets: ptr pointer) = + gtk_container_set_focus_chain(cast[ptr Container00](self.impl), focusableWidgets) + +proc `focusChain=`*(self: Container; focusableWidgets: ptr pointer) = + gtk_container_set_focus_chain(cast[ptr Container00](self.impl), focusableWidgets) + +proc gtk_container_set_focus_child*(self: ptr Container00; child: ptr Widget00) {. + importc: "gtk_container_set_focus_child", libprag.} + +proc setFocusChild*(self: Container; child: Widget) = + gtk_container_set_focus_child(cast[ptr Container00](self.impl), cast[ptr Widget00](child.impl)) + +proc `focusChild=`*(self: Container; child: Widget) = + gtk_container_set_focus_child(cast[ptr Container00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_container_set_reallocate_redraws*(self: ptr Container00; needsRedraws: gboolean) {. + importc: "gtk_container_set_reallocate_redraws", libprag.} + +proc setReallocateRedraws*(self: Container; needsRedraws: bool) = + gtk_container_set_reallocate_redraws(cast[ptr Container00](self.impl), gboolean(needsRedraws)) + +proc `reallocateRedraws=`*(self: Container; needsRedraws: bool) = + gtk_container_set_reallocate_redraws(cast[ptr Container00](self.impl), gboolean(needsRedraws)) + +proc gtk_container_unset_focus_chain*(self: ptr Container00) {. + importc: "gtk_container_unset_focus_chain", libprag.} + +proc unsetFocusChain*(self: Container) = + gtk_container_unset_focus_chain(cast[ptr Container00](self.impl)) + +type + BinPrivate00* {.pure.} = object + BinPrivate* = ref object + impl*: ptr BinPrivate00 + +type + Bin* = ref object of Container + Bin00* = object of Container00 + priv3: ptr BinPrivate00 + +proc gtk_bin_get_child*(self: ptr Bin00): ptr Widget00 {. + importc: "gtk_bin_get_child", libprag.} + +proc getChild*(self: Bin): Widget = + let gobj = gtk_bin_get_child(cast[ptr Bin00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc child*(self: Bin): Widget = + let gobj = gtk_bin_get_child(cast[ptr Bin00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + WindowPrivate00* {.pure.} = object + WindowPrivate* = ref object + impl*: ptr WindowPrivate00 + +type + Window* = ref object of Bin + Window00* = object of Bin00 + priv4: ptr WindowPrivate00 + +proc scActivateDefault*(self: Window; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-default", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scActivateFocus*(self: Window; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-focus", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEnableDebugging*(self: Window; p: proc (self: ptr gobject.Object00; toggle: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "enable-debugging", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scKeysChanged*(self: Window; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "keys-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSetFocus*(self: Window; p: proc (self: ptr gobject.Object00; `object`: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "set-focus", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_window_get_default_icon_list*(): ptr pointer {. + importc: "gtk_window_get_default_icon_list", libprag.} + +proc getDefaultIconList*(): ptr pointer {. + importc: "gtk_window_get_default_icon_list", libprag.} + +proc defaultIconList*(): ptr pointer {. + importc: "gtk_window_get_default_icon_list", libprag.} + +proc gtk_window_get_default_icon_name*(): cstring {. + importc: "gtk_window_get_default_icon_name", libprag.} + +proc getDefaultIconName*(): string = + let resul0 = gtk_window_get_default_icon_name() + result = $resul0 + +proc defaultIconName*(): string = + let resul0 = gtk_window_get_default_icon_name() + result = $resul0 + +proc gtk_window_list_toplevels*(): ptr pointer {. + importc: "gtk_window_list_toplevels", libprag.} + +proc listToplevels*(): ptr pointer {. + importc: "gtk_window_list_toplevels", libprag.} + +proc gtk_window_set_auto_startup_notification*(setting: gboolean) {. + importc: "gtk_window_set_auto_startup_notification", libprag.} + +proc setAutoStartupNotification*(setting: gboolean) {. + importc: "gtk_window_set_auto_startup_notification", libprag.} + +proc `autoStartupNotification=`*(setting: gboolean) {. + importc: "gtk_window_set_auto_startup_notification", libprag.} + +proc gtk_window_set_default_icon*(icon: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_window_set_default_icon", libprag.} + +proc setDefaultIcon*(icon: gdkpixbuf.Pixbuf) = + gtk_window_set_default_icon(cast[ptr gdkpixbuf.Pixbuf00](icon.impl)) + +proc `defaultIcon=`*(icon: gdkpixbuf.Pixbuf) = + gtk_window_set_default_icon(cast[ptr gdkpixbuf.Pixbuf00](icon.impl)) + +proc gtk_window_set_default_icon_from_file*(filename: ucstring): gboolean {. + importc: "gtk_window_set_default_icon_from_file", libprag.} + +proc setDefaultIconFromFile*(filename: ucstring): gboolean {. + importc: "gtk_window_set_default_icon_from_file", libprag.} + +proc `defaultIconFromFile=`*(filename: ucstring): gboolean {. + importc: "gtk_window_set_default_icon_from_file", libprag.} + +proc gtk_window_set_default_icon_list*(list: ptr pointer) {. + importc: "gtk_window_set_default_icon_list", libprag.} + +proc setDefaultIconList*(list: ptr pointer) {. + importc: "gtk_window_set_default_icon_list", libprag.} + +proc `defaultIconList=`*(list: ptr pointer) {. + importc: "gtk_window_set_default_icon_list", libprag.} + +proc gtk_window_set_default_icon_name*(name: cstring) {. + importc: "gtk_window_set_default_icon_name", libprag.} + +proc setDefaultIconName*(name: cstring) {. + importc: "gtk_window_set_default_icon_name", libprag.} + +proc `defaultIconName=`*(name: cstring) {. + importc: "gtk_window_set_default_icon_name", libprag.} + +proc gtk_window_set_interactive_debugging*(enable: gboolean) {. + importc: "gtk_window_set_interactive_debugging", libprag.} + +proc setInteractiveDebugging*(enable: gboolean) {. + importc: "gtk_window_set_interactive_debugging", libprag.} + +proc `interactiveDebugging=`*(enable: gboolean) {. + importc: "gtk_window_set_interactive_debugging", libprag.} + +proc gtk_window_activate_default*(self: ptr Window00): gboolean {. + importc: "gtk_window_activate_default", libprag.} + +proc activateDefault*(self: Window): bool = + toBool(gtk_window_activate_default(cast[ptr Window00](self.impl))) + +proc gtk_window_activate_focus*(self: ptr Window00): gboolean {. + importc: "gtk_window_activate_focus", libprag.} + +proc activateFocus*(self: Window): bool = + toBool(gtk_window_activate_focus(cast[ptr Window00](self.impl))) + +proc gtk_window_activate_key*(self: ptr Window00; event: ptr gdk.EventKey00): gboolean {. + importc: "gtk_window_activate_key", libprag.} + +proc activateKey*(self: Window; event: gdk.EventKey): bool = + toBool(gtk_window_activate_key(cast[ptr Window00](self.impl), cast[ptr gdk.EventKey00](event.impl))) + +proc gtk_window_add_mnemonic*(self: ptr Window00; keyval: uint32; target: ptr Widget00) {. + importc: "gtk_window_add_mnemonic", libprag.} + +proc addMnemonic*(self: Window; keyval: int; target: Widget) = + gtk_window_add_mnemonic(cast[ptr Window00](self.impl), uint32(keyval), cast[ptr Widget00](target.impl)) + +proc gtk_window_begin_move_drag*(self: ptr Window00; button: int32; rootX: int32; rootY: int32; + timestamp: uint32) {. + importc: "gtk_window_begin_move_drag", libprag.} + +proc beginMoveDrag*(self: Window; button: int; rootX: int; rootY: int; + timestamp: int) = + gtk_window_begin_move_drag(cast[ptr Window00](self.impl), int32(button), int32(rootX), int32(rootY), uint32(timestamp)) + +proc gtk_window_begin_resize_drag*(self: ptr Window00; edge: gdk.WindowEdge; button: int32; + rootX: int32; rootY: int32; timestamp: uint32) {. + importc: "gtk_window_begin_resize_drag", libprag.} + +proc beginResizeDrag*(self: Window; edge: gdk.WindowEdge; button: int; rootX: int; + rootY: int; timestamp: int) = + gtk_window_begin_resize_drag(cast[ptr Window00](self.impl), edge, int32(button), int32(rootX), int32(rootY), uint32(timestamp)) + +proc gtk_window_close*(self: ptr Window00) {. + importc: "gtk_window_close", libprag.} + +proc close*(self: Window) = + gtk_window_close(cast[ptr Window00](self.impl)) + +proc gtk_window_deiconify*(self: ptr Window00) {. + importc: "gtk_window_deiconify", libprag.} + +proc deiconify*(self: Window) = + gtk_window_deiconify(cast[ptr Window00](self.impl)) + +proc gtk_window_fullscreen*(self: ptr Window00) {. + importc: "gtk_window_fullscreen", libprag.} + +proc fullscreen*(self: Window) = + gtk_window_fullscreen(cast[ptr Window00](self.impl)) + +proc gtk_window_fullscreen_on_monitor*(self: ptr Window00; screen: ptr gdk.Screen00; monitor: int32) {. + importc: "gtk_window_fullscreen_on_monitor", libprag.} + +proc fullscreenOnMonitor*(self: Window; screen: gdk.Screen; monitor: int) = + gtk_window_fullscreen_on_monitor(cast[ptr Window00](self.impl), cast[ptr gdk.Screen00](screen.impl), int32(monitor)) + +proc gtk_window_get_accept_focus*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_accept_focus", libprag.} + +proc getAcceptFocus*(self: Window): bool = + toBool(gtk_window_get_accept_focus(cast[ptr Window00](self.impl))) + +proc acceptFocus*(self: Window): bool = + toBool(gtk_window_get_accept_focus(cast[ptr Window00](self.impl))) + +proc gtk_window_get_attached_to*(self: ptr Window00): ptr Widget00 {. + importc: "gtk_window_get_attached_to", libprag.} + +proc getAttachedTo*(self: Window): Widget = + let gobj = gtk_window_get_attached_to(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc attachedTo*(self: Window): Widget = + let gobj = gtk_window_get_attached_to(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_get_decorated*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_decorated", libprag.} + +proc getDecorated*(self: Window): bool = + toBool(gtk_window_get_decorated(cast[ptr Window00](self.impl))) + +proc decorated*(self: Window): bool = + toBool(gtk_window_get_decorated(cast[ptr Window00](self.impl))) + +proc gtk_window_get_default_size*(self: ptr Window00; width: var int32; height: var int32) {. + importc: "gtk_window_get_default_size", libprag.} + +proc getDefaultSize*(self: Window; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_window_get_default_size(cast[ptr Window00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc defaultSize*(self: Window; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_window_get_default_size(cast[ptr Window00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc gtk_window_get_default_widget*(self: ptr Window00): ptr Widget00 {. + importc: "gtk_window_get_default_widget", libprag.} + +proc getDefaultWidget*(self: Window): Widget = + let gobj = gtk_window_get_default_widget(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultWidget*(self: Window): Widget = + let gobj = gtk_window_get_default_widget(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_get_deletable*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_deletable", libprag.} + +proc getDeletable*(self: Window): bool = + toBool(gtk_window_get_deletable(cast[ptr Window00](self.impl))) + +proc deletable*(self: Window): bool = + toBool(gtk_window_get_deletable(cast[ptr Window00](self.impl))) + +proc gtk_window_get_destroy_with_parent*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_destroy_with_parent", libprag.} + +proc getDestroyWithParent*(self: Window): bool = + toBool(gtk_window_get_destroy_with_parent(cast[ptr Window00](self.impl))) + +proc destroyWithParent*(self: Window): bool = + toBool(gtk_window_get_destroy_with_parent(cast[ptr Window00](self.impl))) + +proc gtk_window_get_focus*(self: ptr Window00): ptr Widget00 {. + importc: "gtk_window_get_focus", libprag.} + +proc getFocus*(self: Window): Widget = + let gobj = gtk_window_get_focus(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc focus*(self: Window): Widget = + let gobj = gtk_window_get_focus(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_get_focus_on_map*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_focus_on_map", libprag.} + +proc getFocusOnMap*(self: Window): bool = + toBool(gtk_window_get_focus_on_map(cast[ptr Window00](self.impl))) + +proc focusOnMap*(self: Window): bool = + toBool(gtk_window_get_focus_on_map(cast[ptr Window00](self.impl))) + +proc gtk_window_get_focus_visible*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_focus_visible", libprag.} + +proc getFocusVisible*(self: Window): bool = + toBool(gtk_window_get_focus_visible(cast[ptr Window00](self.impl))) + +proc focusVisible*(self: Window): bool = + toBool(gtk_window_get_focus_visible(cast[ptr Window00](self.impl))) + +proc gtk_window_get_gravity*(self: ptr Window00): gdk.Gravity {. + importc: "gtk_window_get_gravity", libprag.} + +proc getGravity*(self: Window): gdk.Gravity = + gtk_window_get_gravity(cast[ptr Window00](self.impl)) + +proc gravity*(self: Window): gdk.Gravity = + gtk_window_get_gravity(cast[ptr Window00](self.impl)) + +proc gtk_window_get_has_resize_grip*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_has_resize_grip", libprag.} + +proc getHasResizeGrip*(self: Window): bool = + toBool(gtk_window_get_has_resize_grip(cast[ptr Window00](self.impl))) + +proc hasResizeGrip*(self: Window): bool = + toBool(gtk_window_get_has_resize_grip(cast[ptr Window00](self.impl))) + +proc gtk_window_get_hide_titlebar_when_maximized*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_hide_titlebar_when_maximized", libprag.} + +proc getHideTitlebarWhenMaximized*(self: Window): bool = + toBool(gtk_window_get_hide_titlebar_when_maximized(cast[ptr Window00](self.impl))) + +proc hideTitlebarWhenMaximized*(self: Window): bool = + toBool(gtk_window_get_hide_titlebar_when_maximized(cast[ptr Window00](self.impl))) + +proc gtk_window_get_icon*(self: ptr Window00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_window_get_icon", libprag.} + +proc getIcon*(self: Window): gdkpixbuf.Pixbuf = + let gobj = gtk_window_get_icon(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc icon*(self: Window): gdkpixbuf.Pixbuf = + let gobj = gtk_window_get_icon(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_get_icon_list*(self: ptr Window00): ptr pointer {. + importc: "gtk_window_get_icon_list", libprag.} + +proc getIconList*(self: Window): ptr pointer = + gtk_window_get_icon_list(cast[ptr Window00](self.impl)) + +proc iconList*(self: Window): ptr pointer = + gtk_window_get_icon_list(cast[ptr Window00](self.impl)) + +proc gtk_window_get_icon_name*(self: ptr Window00): cstring {. + importc: "gtk_window_get_icon_name", libprag.} + +proc getIconName*(self: Window): string = + let resul0 = gtk_window_get_icon_name(cast[ptr Window00](self.impl)) + result = $resul0 + +proc iconName*(self: Window): string = + let resul0 = gtk_window_get_icon_name(cast[ptr Window00](self.impl)) + result = $resul0 + +proc gtk_window_get_mnemonic_modifier*(self: ptr Window00): gdk.ModifierType {. + importc: "gtk_window_get_mnemonic_modifier", libprag.} + +proc getMnemonicModifier*(self: Window): gdk.ModifierType = + gtk_window_get_mnemonic_modifier(cast[ptr Window00](self.impl)) + +proc mnemonicModifier*(self: Window): gdk.ModifierType = + gtk_window_get_mnemonic_modifier(cast[ptr Window00](self.impl)) + +proc gtk_window_get_mnemonics_visible*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_mnemonics_visible", libprag.} + +proc getMnemonicsVisible*(self: Window): bool = + toBool(gtk_window_get_mnemonics_visible(cast[ptr Window00](self.impl))) + +proc mnemonicsVisible*(self: Window): bool = + toBool(gtk_window_get_mnemonics_visible(cast[ptr Window00](self.impl))) + +proc gtk_window_get_modal*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_modal", libprag.} + +proc getModal*(self: Window): bool = + toBool(gtk_window_get_modal(cast[ptr Window00](self.impl))) + +proc modal*(self: Window): bool = + toBool(gtk_window_get_modal(cast[ptr Window00](self.impl))) + +proc gtk_window_get_opacity*(self: ptr Window00): cdouble {. + importc: "gtk_window_get_opacity", libprag.} + +proc getOpacity*(self: Window): cdouble = + gtk_window_get_opacity(cast[ptr Window00](self.impl)) + +proc opacity*(self: Window): cdouble = + gtk_window_get_opacity(cast[ptr Window00](self.impl)) + +proc gtk_window_get_position*(self: ptr Window00; rootX: var int32; rootY: var int32) {. + importc: "gtk_window_get_position", libprag.} + +proc getPosition*(self: Window; rootX: var int; rootY: var int) = + var rootY_00 = int32(rootY) + var rootX_00 = int32(rootX) + gtk_window_get_position(cast[ptr Window00](self.impl), rootX_00, rootY_00) + rootY = int(rootY_00) + rootX = int(rootX_00) + +proc position*(self: Window; rootX: var int; rootY: var int) = + var rootY_00 = int32(rootY) + var rootX_00 = int32(rootX) + gtk_window_get_position(cast[ptr Window00](self.impl), rootX_00, rootY_00) + rootY = int(rootY_00) + rootX = int(rootX_00) + +proc gtk_window_get_resizable*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_resizable", libprag.} + +proc getResizable*(self: Window): bool = + toBool(gtk_window_get_resizable(cast[ptr Window00](self.impl))) + +proc resizable*(self: Window): bool = + toBool(gtk_window_get_resizable(cast[ptr Window00](self.impl))) + +proc gtk_window_get_resize_grip_area*(self: ptr Window00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_window_get_resize_grip_area", libprag.} + +proc getResizeGripArea*(self: ptr Window00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_window_get_resize_grip_area", libprag.} + +proc resizeGripArea*(self: ptr Window00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_window_get_resize_grip_area", libprag.} + +proc gtk_window_get_role*(self: ptr Window00): cstring {. + importc: "gtk_window_get_role", libprag.} + +proc getRole*(self: Window): string = + let resul0 = gtk_window_get_role(cast[ptr Window00](self.impl)) + result = $resul0 + +proc role*(self: Window): string = + let resul0 = gtk_window_get_role(cast[ptr Window00](self.impl)) + result = $resul0 + +proc gtk_window_get_screen*(self: ptr Window00): ptr gdk.Screen00 {. + importc: "gtk_window_get_screen", libprag.} + +proc getScreen*(self: Window): gdk.Screen = + let gobj = gtk_window_get_screen(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: Window): gdk.Screen = + let gobj = gtk_window_get_screen(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_get_size*(self: ptr Window00; width: var int32; height: var int32) {. + importc: "gtk_window_get_size", libprag.} + +proc getSize*(self: Window; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_window_get_size(cast[ptr Window00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc size*(self: Window; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_window_get_size(cast[ptr Window00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc gtk_window_get_skip_pager_hint*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_skip_pager_hint", libprag.} + +proc getSkipPagerHint*(self: Window): bool = + toBool(gtk_window_get_skip_pager_hint(cast[ptr Window00](self.impl))) + +proc skipPagerHint*(self: Window): bool = + toBool(gtk_window_get_skip_pager_hint(cast[ptr Window00](self.impl))) + +proc gtk_window_get_skip_taskbar_hint*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_skip_taskbar_hint", libprag.} + +proc getSkipTaskbarHint*(self: Window): bool = + toBool(gtk_window_get_skip_taskbar_hint(cast[ptr Window00](self.impl))) + +proc skipTaskbarHint*(self: Window): bool = + toBool(gtk_window_get_skip_taskbar_hint(cast[ptr Window00](self.impl))) + +proc gtk_window_get_title*(self: ptr Window00): cstring {. + importc: "gtk_window_get_title", libprag.} + +proc getTitle*(self: Window): string = + let resul0 = gtk_window_get_title(cast[ptr Window00](self.impl)) + result = $resul0 + +proc title*(self: Window): string = + let resul0 = gtk_window_get_title(cast[ptr Window00](self.impl)) + result = $resul0 + +proc gtk_window_get_titlebar*(self: ptr Window00): ptr Widget00 {. + importc: "gtk_window_get_titlebar", libprag.} + +proc getTitlebar*(self: Window): Widget = + let gobj = gtk_window_get_titlebar(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc titlebar*(self: Window): Widget = + let gobj = gtk_window_get_titlebar(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_get_transient_for*(self: ptr Window00): ptr Window00 {. + importc: "gtk_window_get_transient_for", libprag.} + +proc getTransientFor*(self: Window): Window = + let gobj = gtk_window_get_transient_for(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc transientFor*(self: Window): Window = + let gobj = gtk_window_get_transient_for(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_get_type_hint*(self: ptr Window00): gdk.WindowTypeHint {. + importc: "gtk_window_get_type_hint", libprag.} + +proc getTypeHint*(self: Window): gdk.WindowTypeHint = + gtk_window_get_type_hint(cast[ptr Window00](self.impl)) + +proc typeHint*(self: Window): gdk.WindowTypeHint = + gtk_window_get_type_hint(cast[ptr Window00](self.impl)) + +proc gtk_window_get_urgency_hint*(self: ptr Window00): gboolean {. + importc: "gtk_window_get_urgency_hint", libprag.} + +proc getUrgencyHint*(self: Window): bool = + toBool(gtk_window_get_urgency_hint(cast[ptr Window00](self.impl))) + +proc urgencyHint*(self: Window): bool = + toBool(gtk_window_get_urgency_hint(cast[ptr Window00](self.impl))) + +proc gtk_window_has_group*(self: ptr Window00): gboolean {. + importc: "gtk_window_has_group", libprag.} + +proc hasGroup*(self: Window): bool = + toBool(gtk_window_has_group(cast[ptr Window00](self.impl))) + +proc gtk_window_has_toplevel_focus*(self: ptr Window00): gboolean {. + importc: "gtk_window_has_toplevel_focus", libprag.} + +proc hasToplevelFocus*(self: Window): bool = + toBool(gtk_window_has_toplevel_focus(cast[ptr Window00](self.impl))) + +proc gtk_window_iconify*(self: ptr Window00) {. + importc: "gtk_window_iconify", libprag.} + +proc iconify*(self: Window) = + gtk_window_iconify(cast[ptr Window00](self.impl)) + +proc gtk_window_is_active*(self: ptr Window00): gboolean {. + importc: "gtk_window_is_active", libprag.} + +proc isActive*(self: Window): bool = + toBool(gtk_window_is_active(cast[ptr Window00](self.impl))) + +proc gtk_window_is_maximized*(self: ptr Window00): gboolean {. + importc: "gtk_window_is_maximized", libprag.} + +proc isMaximized*(self: Window): bool = + toBool(gtk_window_is_maximized(cast[ptr Window00](self.impl))) + +proc gtk_window_maximize*(self: ptr Window00) {. + importc: "gtk_window_maximize", libprag.} + +proc maximize*(self: Window) = + gtk_window_maximize(cast[ptr Window00](self.impl)) + +proc gtk_window_mnemonic_activate*(self: ptr Window00; keyval: uint32; modifier: gdk.ModifierType): gboolean {. + importc: "gtk_window_mnemonic_activate", libprag.} + +proc mnemonicActivate*(self: Window; keyval: int; modifier: gdk.ModifierType): bool = + toBool(gtk_window_mnemonic_activate(cast[ptr Window00](self.impl), uint32(keyval), modifier)) + +proc gtk_window_move*(self: ptr Window00; x: int32; y: int32) {. + importc: "gtk_window_move", libprag.} + +proc move*(self: Window; x: int; y: int) = + gtk_window_move(cast[ptr Window00](self.impl), int32(x), int32(y)) + +proc gtk_window_parse_geometry*(self: ptr Window00; geometry: cstring): gboolean {. + importc: "gtk_window_parse_geometry", libprag.} + +proc parseGeometry*(self: Window; geometry: string): bool = + toBool(gtk_window_parse_geometry(cast[ptr Window00](self.impl), cstring(geometry))) + +proc gtk_window_present*(self: ptr Window00) {. + importc: "gtk_window_present", libprag.} + +proc present*(self: Window) = + gtk_window_present(cast[ptr Window00](self.impl)) + +proc gtk_window_present_with_time*(self: ptr Window00; timestamp: uint32) {. + importc: "gtk_window_present_with_time", libprag.} + +proc presentWithTime*(self: Window; timestamp: int) = + gtk_window_present_with_time(cast[ptr Window00](self.impl), uint32(timestamp)) + +proc gtk_window_propagate_key_event*(self: ptr Window00; event: ptr gdk.EventKey00): gboolean {. + importc: "gtk_window_propagate_key_event", libprag.} + +proc propagateKeyEvent*(self: Window; event: gdk.EventKey): bool = + toBool(gtk_window_propagate_key_event(cast[ptr Window00](self.impl), cast[ptr gdk.EventKey00](event.impl))) + +proc gtk_window_remove_mnemonic*(self: ptr Window00; keyval: uint32; target: ptr Widget00) {. + importc: "gtk_window_remove_mnemonic", libprag.} + +proc removeMnemonic*(self: Window; keyval: int; target: Widget) = + gtk_window_remove_mnemonic(cast[ptr Window00](self.impl), uint32(keyval), cast[ptr Widget00](target.impl)) + +proc gtk_window_reshow_with_initial_size*(self: ptr Window00) {. + importc: "gtk_window_reshow_with_initial_size", libprag.} + +proc reshowWithInitialSize*(self: Window) = + gtk_window_reshow_with_initial_size(cast[ptr Window00](self.impl)) + +proc gtk_window_resize*(self: ptr Window00; width: int32; height: int32) {. + importc: "gtk_window_resize", libprag.} + +proc resize*(self: Window; width: int; height: int) = + gtk_window_resize(cast[ptr Window00](self.impl), int32(width), int32(height)) + +proc gtk_window_resize_grip_is_visible*(self: ptr Window00): gboolean {. + importc: "gtk_window_resize_grip_is_visible", libprag.} + +proc resizeGripIsVisible*(self: Window): bool = + toBool(gtk_window_resize_grip_is_visible(cast[ptr Window00](self.impl))) + +proc gtk_window_resize_to_geometry*(self: ptr Window00; width: int32; height: int32) {. + importc: "gtk_window_resize_to_geometry", libprag.} + +proc resizeToGeometry*(self: Window; width: int; height: int) = + gtk_window_resize_to_geometry(cast[ptr Window00](self.impl), int32(width), int32(height)) + +proc gtk_window_set_accept_focus*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_accept_focus", libprag.} + +proc setAcceptFocus*(self: Window; setting: bool) = + gtk_window_set_accept_focus(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `acceptFocus=`*(self: Window; setting: bool) = + gtk_window_set_accept_focus(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_attached_to*(self: ptr Window00; attachWidget: ptr Widget00) {. + importc: "gtk_window_set_attached_to", libprag.} + +proc setAttachedTo*(self: Window; attachWidget: Widget) = + gtk_window_set_attached_to(cast[ptr Window00](self.impl), cast[ptr Widget00](attachWidget.impl)) + +proc `attachedTo=`*(self: Window; attachWidget: Widget) = + gtk_window_set_attached_to(cast[ptr Window00](self.impl), cast[ptr Widget00](attachWidget.impl)) + +proc gtk_window_set_decorated*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_decorated", libprag.} + +proc setDecorated*(self: Window; setting: bool) = + gtk_window_set_decorated(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `decorated=`*(self: Window; setting: bool) = + gtk_window_set_decorated(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_default*(self: ptr Window00; defaultWidget: ptr Widget00) {. + importc: "gtk_window_set_default", libprag.} + +proc setDefault*(self: Window; defaultWidget: Widget) = + gtk_window_set_default(cast[ptr Window00](self.impl), cast[ptr Widget00](defaultWidget.impl)) + +proc `default=`*(self: Window; defaultWidget: Widget) = + gtk_window_set_default(cast[ptr Window00](self.impl), cast[ptr Widget00](defaultWidget.impl)) + +proc gtk_window_set_default_geometry*(self: ptr Window00; width: int32; height: int32) {. + importc: "gtk_window_set_default_geometry", libprag.} + +proc setDefaultGeometry*(self: Window; width: int; height: int) = + gtk_window_set_default_geometry(cast[ptr Window00](self.impl), int32(width), int32(height)) + +proc gtk_window_set_default_size*(self: ptr Window00; width: int32; height: int32) {. + importc: "gtk_window_set_default_size", libprag.} + +proc setDefaultSize*(self: Window; width: int; height: int) = + gtk_window_set_default_size(cast[ptr Window00](self.impl), int32(width), int32(height)) + +proc `defaultSize=`*(self: Window; dim: tuple[width: int; height: int]) = + gtk_window_set_default_size(cast[ptr Window00](self.impl), int32(dim[0]), int32(dim[1])) + +proc gtk_window_set_deletable*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_deletable", libprag.} + +proc setDeletable*(self: Window; setting: bool) = + gtk_window_set_deletable(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `deletable=`*(self: Window; setting: bool) = + gtk_window_set_deletable(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_destroy_with_parent*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_destroy_with_parent", libprag.} + +proc setDestroyWithParent*(self: Window; setting: bool) = + gtk_window_set_destroy_with_parent(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `destroyWithParent=`*(self: Window; setting: bool) = + gtk_window_set_destroy_with_parent(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_focus*(self: ptr Window00; focus: ptr Widget00) {. + importc: "gtk_window_set_focus", libprag.} + +proc setFocus*(self: Window; focus: Widget) = + gtk_window_set_focus(cast[ptr Window00](self.impl), cast[ptr Widget00](focus.impl)) + +proc `focus=`*(self: Window; focus: Widget) = + gtk_window_set_focus(cast[ptr Window00](self.impl), cast[ptr Widget00](focus.impl)) + +proc gtk_window_set_focus_on_map*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_focus_on_map", libprag.} + +proc setFocusOnMap*(self: Window; setting: bool) = + gtk_window_set_focus_on_map(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `focusOnMap=`*(self: Window; setting: bool) = + gtk_window_set_focus_on_map(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_focus_visible*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_focus_visible", libprag.} + +proc setFocusVisible*(self: Window; setting: bool) = + gtk_window_set_focus_visible(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `focusVisible=`*(self: Window; setting: bool) = + gtk_window_set_focus_visible(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_geometry_hints*(self: ptr Window00; geometryWidget: ptr Widget00; + geometry: ptr gdk.Geometry00; geomMask: gdk.WindowHints) {. + importc: "gtk_window_set_geometry_hints", libprag.} + +proc setGeometryHints*(self: Window; geometryWidget: Widget; geometry: gdk.Geometry; + geomMask: gdk.WindowHints) = + gtk_window_set_geometry_hints(cast[ptr Window00](self.impl), cast[ptr Widget00](geometryWidget.impl), cast[ptr gdk.Geometry00](geometry.impl), geomMask) + +proc gtk_window_set_gravity*(self: ptr Window00; gravity: gdk.Gravity) {. + importc: "gtk_window_set_gravity", libprag.} + +proc setGravity*(self: Window; gravity: gdk.Gravity) = + gtk_window_set_gravity(cast[ptr Window00](self.impl), gravity) + +proc `gravity=`*(self: Window; gravity: gdk.Gravity) = + gtk_window_set_gravity(cast[ptr Window00](self.impl), gravity) + +proc gtk_window_set_has_resize_grip*(self: ptr Window00; value: gboolean) {. + importc: "gtk_window_set_has_resize_grip", libprag.} + +proc setHasResizeGrip*(self: Window; value: bool) = + gtk_window_set_has_resize_grip(cast[ptr Window00](self.impl), gboolean(value)) + +proc `hasResizeGrip=`*(self: Window; value: bool) = + gtk_window_set_has_resize_grip(cast[ptr Window00](self.impl), gboolean(value)) + +proc gtk_window_set_has_user_ref_count*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_has_user_ref_count", libprag.} + +proc setHasUserRefCount*(self: Window; setting: bool) = + gtk_window_set_has_user_ref_count(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `hasUserRefCount=`*(self: Window; setting: bool) = + gtk_window_set_has_user_ref_count(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_hide_titlebar_when_maximized*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_hide_titlebar_when_maximized", libprag.} + +proc setHideTitlebarWhenMaximized*(self: Window; setting: bool) = + gtk_window_set_hide_titlebar_when_maximized(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `hideTitlebarWhenMaximized=`*(self: Window; setting: bool) = + gtk_window_set_hide_titlebar_when_maximized(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_icon*(self: ptr Window00; icon: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_window_set_icon", libprag.} + +proc setIcon*(self: Window; icon: gdkpixbuf.Pixbuf) = + gtk_window_set_icon(cast[ptr Window00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](icon.impl)) + +proc `icon=`*(self: Window; icon: gdkpixbuf.Pixbuf) = + gtk_window_set_icon(cast[ptr Window00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](icon.impl)) + +proc gtk_window_set_icon_from_file*(self: ptr Window00; filename: ucstring): gboolean {. + importc: "gtk_window_set_icon_from_file", libprag.} + +proc setIconFromFile*(self: Window; filename: ucstring): bool = + toBool(gtk_window_set_icon_from_file(cast[ptr Window00](self.impl), filename)) + +proc `iconFromFile=`*(self: Window; filename: ucstring): bool = + toBool(gtk_window_set_icon_from_file(cast[ptr Window00](self.impl), filename)) + +proc gtk_window_set_icon_list*(self: ptr Window00; list: ptr pointer) {. + importc: "gtk_window_set_icon_list", libprag.} + +proc setIconList*(self: Window; list: ptr pointer) = + gtk_window_set_icon_list(cast[ptr Window00](self.impl), list) + +proc `iconList=`*(self: Window; list: ptr pointer) = + gtk_window_set_icon_list(cast[ptr Window00](self.impl), list) + +proc gtk_window_set_icon_name*(self: ptr Window00; name: cstring) {. + importc: "gtk_window_set_icon_name", libprag.} + +proc setIconName*(self: Window; name: string) = + gtk_window_set_icon_name(cast[ptr Window00](self.impl), cstring(name)) + +proc `iconName=`*(self: Window; name: string) = + gtk_window_set_icon_name(cast[ptr Window00](self.impl), cstring(name)) + +proc gtk_window_set_keep_above*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_keep_above", libprag.} + +proc setKeepAbove*(self: Window; setting: bool) = + gtk_window_set_keep_above(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `keepAbove=`*(self: Window; setting: bool) = + gtk_window_set_keep_above(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_keep_below*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_keep_below", libprag.} + +proc setKeepBelow*(self: Window; setting: bool) = + gtk_window_set_keep_below(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `keepBelow=`*(self: Window; setting: bool) = + gtk_window_set_keep_below(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_mnemonic_modifier*(self: ptr Window00; modifier: gdk.ModifierType) {. + importc: "gtk_window_set_mnemonic_modifier", libprag.} + +proc setMnemonicModifier*(self: Window; modifier: gdk.ModifierType) = + gtk_window_set_mnemonic_modifier(cast[ptr Window00](self.impl), modifier) + +proc `mnemonicModifier=`*(self: Window; modifier: gdk.ModifierType) = + gtk_window_set_mnemonic_modifier(cast[ptr Window00](self.impl), modifier) + +proc gtk_window_set_mnemonics_visible*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_mnemonics_visible", libprag.} + +proc setMnemonicsVisible*(self: Window; setting: bool) = + gtk_window_set_mnemonics_visible(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `mnemonicsVisible=`*(self: Window; setting: bool) = + gtk_window_set_mnemonics_visible(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_modal*(self: ptr Window00; modal: gboolean) {. + importc: "gtk_window_set_modal", libprag.} + +proc setModal*(self: Window; modal: bool) = + gtk_window_set_modal(cast[ptr Window00](self.impl), gboolean(modal)) + +proc `modal=`*(self: Window; modal: bool) = + gtk_window_set_modal(cast[ptr Window00](self.impl), gboolean(modal)) + +proc gtk_window_set_opacity*(self: ptr Window00; opacity: cdouble) {. + importc: "gtk_window_set_opacity", libprag.} + +proc setOpacity*(self: Window; opacity: cdouble) = + gtk_window_set_opacity(cast[ptr Window00](self.impl), opacity) + +proc `opacity=`*(self: Window; opacity: cdouble) = + gtk_window_set_opacity(cast[ptr Window00](self.impl), opacity) + +proc gtk_window_set_resizable*(self: ptr Window00; resizable: gboolean) {. + importc: "gtk_window_set_resizable", libprag.} + +proc setResizable*(self: Window; resizable: bool) = + gtk_window_set_resizable(cast[ptr Window00](self.impl), gboolean(resizable)) + +proc `resizable=`*(self: Window; resizable: bool) = + gtk_window_set_resizable(cast[ptr Window00](self.impl), gboolean(resizable)) + +proc gtk_window_set_role*(self: ptr Window00; role: cstring) {. + importc: "gtk_window_set_role", libprag.} + +proc setRole*(self: Window; role: string) = + gtk_window_set_role(cast[ptr Window00](self.impl), cstring(role)) + +proc `role=`*(self: Window; role: string) = + gtk_window_set_role(cast[ptr Window00](self.impl), cstring(role)) + +proc gtk_window_set_screen*(self: ptr Window00; screen: ptr gdk.Screen00) {. + importc: "gtk_window_set_screen", libprag.} + +proc setScreen*(self: Window; screen: gdk.Screen) = + gtk_window_set_screen(cast[ptr Window00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc `screen=`*(self: Window; screen: gdk.Screen) = + gtk_window_set_screen(cast[ptr Window00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc gtk_window_set_skip_pager_hint*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_skip_pager_hint", libprag.} + +proc setSkipPagerHint*(self: Window; setting: bool) = + gtk_window_set_skip_pager_hint(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `skipPagerHint=`*(self: Window; setting: bool) = + gtk_window_set_skip_pager_hint(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_skip_taskbar_hint*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_skip_taskbar_hint", libprag.} + +proc setSkipTaskbarHint*(self: Window; setting: bool) = + gtk_window_set_skip_taskbar_hint(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `skipTaskbarHint=`*(self: Window; setting: bool) = + gtk_window_set_skip_taskbar_hint(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_startup_id*(self: ptr Window00; startupId: cstring) {. + importc: "gtk_window_set_startup_id", libprag.} + +proc setStartupId*(self: Window; startupId: string) = + gtk_window_set_startup_id(cast[ptr Window00](self.impl), cstring(startupId)) + +proc `startupId=`*(self: Window; startupId: string) = + gtk_window_set_startup_id(cast[ptr Window00](self.impl), cstring(startupId)) + +proc gtk_window_set_title*(self: ptr Window00; title: cstring) {. + importc: "gtk_window_set_title", libprag.} + +proc setTitle*(self: Window; title: string) = + gtk_window_set_title(cast[ptr Window00](self.impl), cstring(title)) + +proc `title=`*(self: Window; title: string) = + gtk_window_set_title(cast[ptr Window00](self.impl), cstring(title)) + +proc gtk_window_set_titlebar*(self: ptr Window00; titlebar: ptr Widget00) {. + importc: "gtk_window_set_titlebar", libprag.} + +proc setTitlebar*(self: Window; titlebar: Widget) = + gtk_window_set_titlebar(cast[ptr Window00](self.impl), cast[ptr Widget00](titlebar.impl)) + +proc `titlebar=`*(self: Window; titlebar: Widget) = + gtk_window_set_titlebar(cast[ptr Window00](self.impl), cast[ptr Widget00](titlebar.impl)) + +proc gtk_window_set_transient_for*(self: ptr Window00; parent: ptr Window00) {. + importc: "gtk_window_set_transient_for", libprag.} + +proc setTransientFor*(self: Window; parent: Window) = + gtk_window_set_transient_for(cast[ptr Window00](self.impl), cast[ptr Window00](parent.impl)) + +proc `transientFor=`*(self: Window; parent: Window) = + gtk_window_set_transient_for(cast[ptr Window00](self.impl), cast[ptr Window00](parent.impl)) + +proc gtk_window_set_type_hint*(self: ptr Window00; hint: gdk.WindowTypeHint) {. + importc: "gtk_window_set_type_hint", libprag.} + +proc setTypeHint*(self: Window; hint: gdk.WindowTypeHint) = + gtk_window_set_type_hint(cast[ptr Window00](self.impl), hint) + +proc `typeHint=`*(self: Window; hint: gdk.WindowTypeHint) = + gtk_window_set_type_hint(cast[ptr Window00](self.impl), hint) + +proc gtk_window_set_urgency_hint*(self: ptr Window00; setting: gboolean) {. + importc: "gtk_window_set_urgency_hint", libprag.} + +proc setUrgencyHint*(self: Window; setting: bool) = + gtk_window_set_urgency_hint(cast[ptr Window00](self.impl), gboolean(setting)) + +proc `urgencyHint=`*(self: Window; setting: bool) = + gtk_window_set_urgency_hint(cast[ptr Window00](self.impl), gboolean(setting)) + +proc gtk_window_set_wmclass*(self: ptr Window00; wmclassName: cstring; wmclassClass: cstring) {. + importc: "gtk_window_set_wmclass", libprag.} + +proc setWmclass*(self: Window; wmclassName: string; wmclassClass: string) = + gtk_window_set_wmclass(cast[ptr Window00](self.impl), cstring(wmclassName), cstring(wmclassClass)) + +proc gtk_window_stick*(self: ptr Window00) {. + importc: "gtk_window_stick", libprag.} + +proc stick*(self: Window) = + gtk_window_stick(cast[ptr Window00](self.impl)) + +proc gtk_window_unfullscreen*(self: ptr Window00) {. + importc: "gtk_window_unfullscreen", libprag.} + +proc unfullscreen*(self: Window) = + gtk_window_unfullscreen(cast[ptr Window00](self.impl)) + +proc gtk_window_unmaximize*(self: ptr Window00) {. + importc: "gtk_window_unmaximize", libprag.} + +proc unmaximize*(self: Window) = + gtk_window_unmaximize(cast[ptr Window00](self.impl)) + +proc gtk_window_unstick*(self: ptr Window00) {. + importc: "gtk_window_unstick", libprag.} + +proc unstick*(self: Window) = + gtk_window_unstick(cast[ptr Window00](self.impl)) + +proc gtk_widget_get_tooltip_window*(self: ptr Widget00): ptr Window00 {. + importc: "gtk_widget_get_tooltip_window", libprag.} + +proc getTooltipWindow*(self: Widget): Window = + let gobj = gtk_widget_get_tooltip_window(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc tooltipWindow*(self: Widget): Window = + let gobj = gtk_widget_get_tooltip_window(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_widget_set_tooltip_window*(self: ptr Widget00; customWindow: ptr Window00) {. + importc: "gtk_widget_set_tooltip_window", libprag.} + +proc setTooltipWindow*(self: Widget; customWindow: Window) = + gtk_widget_set_tooltip_window(cast[ptr Widget00](self.impl), cast[ptr Window00](customWindow.impl)) + +proc `tooltipWindow=`*(self: Widget; customWindow: Window) = + gtk_widget_set_tooltip_window(cast[ptr Widget00](self.impl), cast[ptr Window00](customWindow.impl)) + +type + DialogPrivate00* {.pure.} = object + DialogPrivate* = ref object + impl*: ptr DialogPrivate00 + +type + Dialog* = ref object of Window + Dialog00* = object of Window00 + priv5: ptr DialogPrivate00 + +proc scClose*(self: Dialog; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "close", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scResponse*(self: Dialog; p: proc (self: ptr gobject.Object00; responseId: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "response", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_dialog_new*(): ptr Dialog00 {. + importc: "gtk_dialog_new", libprag.} + +proc newDialog*(): Dialog = + new(result, finalizeGObject) + result.impl = gtk_dialog_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDialog*[T](result: var T) = + assert(result is Dialog) + new(result, finalizeGObject) + result.impl = gtk_dialog_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_dialog_add_action_widget*(self: ptr Dialog00; child: ptr Widget00; responseId: int32) {. + importc: "gtk_dialog_add_action_widget", libprag.} + +proc addActionWidget*(self: Dialog; child: Widget; responseId: int) = + gtk_dialog_add_action_widget(cast[ptr Dialog00](self.impl), cast[ptr Widget00](child.impl), int32(responseId)) + +proc gtk_dialog_add_button*(self: ptr Dialog00; buttonText: cstring; responseId: int32): ptr Widget00 {. + importc: "gtk_dialog_add_button", libprag.} + +proc addButton*(self: Dialog; buttonText: string; responseId: int): Widget = + let gobj = gtk_dialog_add_button(cast[ptr Dialog00](self.impl), cstring(buttonText), int32(responseId)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_dialog_get_action_area*(self: ptr Dialog00): ptr Widget00 {. + importc: "gtk_dialog_get_action_area", libprag.} + +proc getActionArea*(self: Dialog): Widget = + let gobj = gtk_dialog_get_action_area(cast[ptr Dialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc actionArea*(self: Dialog): Widget = + let gobj = gtk_dialog_get_action_area(cast[ptr Dialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_dialog_get_header_bar*(self: ptr Dialog00): ptr Widget00 {. + importc: "gtk_dialog_get_header_bar", libprag.} + +proc getHeaderBar*(self: Dialog): Widget = + let gobj = gtk_dialog_get_header_bar(cast[ptr Dialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc headerBar*(self: Dialog): Widget = + let gobj = gtk_dialog_get_header_bar(cast[ptr Dialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_dialog_get_response_for_widget*(self: ptr Dialog00; widget: ptr Widget00): int32 {. + importc: "gtk_dialog_get_response_for_widget", libprag.} + +proc getResponseForWidget*(self: Dialog; widget: Widget): int = + int(gtk_dialog_get_response_for_widget(cast[ptr Dialog00](self.impl), cast[ptr Widget00](widget.impl))) + +proc responseForWidget*(self: Dialog; widget: Widget): int = + int(gtk_dialog_get_response_for_widget(cast[ptr Dialog00](self.impl), cast[ptr Widget00](widget.impl))) + +proc gtk_dialog_get_widget_for_response*(self: ptr Dialog00; responseId: int32): ptr Widget00 {. + importc: "gtk_dialog_get_widget_for_response", libprag.} + +proc getWidgetForResponse*(self: Dialog; responseId: int): Widget = + let gobj = gtk_dialog_get_widget_for_response(cast[ptr Dialog00](self.impl), int32(responseId)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc widgetForResponse*(self: Dialog; responseId: int): Widget = + let gobj = gtk_dialog_get_widget_for_response(cast[ptr Dialog00](self.impl), int32(responseId)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_dialog_response*(self: ptr Dialog00; responseId: int32) {. + importc: "gtk_dialog_response", libprag.} + +proc response*(self: Dialog; responseId: int) = + gtk_dialog_response(cast[ptr Dialog00](self.impl), int32(responseId)) + +proc gtk_dialog_run*(self: ptr Dialog00): int32 {. + importc: "gtk_dialog_run", libprag.} + +proc run*(self: Dialog): int = + int(gtk_dialog_run(cast[ptr Dialog00](self.impl))) + +proc gtk_dialog_set_alternative_button_order_from_array*(self: ptr Dialog00; nParams: int32; newOrder: int32Array) {. + importc: "gtk_dialog_set_alternative_button_order_from_array", libprag.} + +proc setAlternativeButtonOrderFromArray*(self: Dialog; nParams: int; newOrder: int32Array) = + gtk_dialog_set_alternative_button_order_from_array(cast[ptr Dialog00](self.impl), int32(nParams), newOrder) + +proc gtk_dialog_set_default_response*(self: ptr Dialog00; responseId: int32) {. + importc: "gtk_dialog_set_default_response", libprag.} + +proc setDefaultResponse*(self: Dialog; responseId: int) = + gtk_dialog_set_default_response(cast[ptr Dialog00](self.impl), int32(responseId)) + +proc `defaultResponse=`*(self: Dialog; responseId: int) = + gtk_dialog_set_default_response(cast[ptr Dialog00](self.impl), int32(responseId)) + +proc gtk_dialog_set_response_sensitive*(self: ptr Dialog00; responseId: int32; setting: gboolean) {. + importc: "gtk_dialog_set_response_sensitive", libprag.} + +proc setResponseSensitive*(self: Dialog; responseId: int; setting: bool) = + gtk_dialog_set_response_sensitive(cast[ptr Dialog00](self.impl), int32(responseId), gboolean(setting)) + +type + AboutDialogPrivate00* {.pure.} = object + AboutDialogPrivate* = ref object + impl*: ptr AboutDialogPrivate00 + +type + AboutDialog* = ref object of Dialog + AboutDialog00* = object of Dialog00 + priv6: ptr AboutDialogPrivate00 + +proc scActivateLink*(self: AboutDialog; p: proc (self: ptr gobject.Object00; uri: cstring; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-link", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_about_dialog_new*(): ptr AboutDialog00 {. + importc: "gtk_about_dialog_new", libprag.} + +proc newAboutDialog*(): AboutDialog = + new(result, finalizeGObject) + result.impl = gtk_about_dialog_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAboutDialog*[T](result: var T) = + assert(result is AboutDialog) + new(result, finalizeGObject) + result.impl = gtk_about_dialog_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_about_dialog_add_credit_section*(self: ptr AboutDialog00; sectionName: cstring; people: cstringArray) {. + importc: "gtk_about_dialog_add_credit_section", libprag.} + +proc addCreditSection*(self: AboutDialog; sectionName: string; people: cstringArray) = + gtk_about_dialog_add_credit_section(cast[ptr AboutDialog00](self.impl), cstring(sectionName), people) + +proc gtk_about_dialog_get_artists*(self: ptr AboutDialog00): cstringArray {. + importc: "gtk_about_dialog_get_artists", libprag.} + +proc getArtists*(self: AboutDialog): cstringArray = + gtk_about_dialog_get_artists(cast[ptr AboutDialog00](self.impl)) + +proc artists*(self: AboutDialog): cstringArray = + gtk_about_dialog_get_artists(cast[ptr AboutDialog00](self.impl)) + +proc gtk_about_dialog_get_authors*(self: ptr AboutDialog00): cstringArray {. + importc: "gtk_about_dialog_get_authors", libprag.} + +proc getAuthors*(self: AboutDialog): cstringArray = + gtk_about_dialog_get_authors(cast[ptr AboutDialog00](self.impl)) + +proc authors*(self: AboutDialog): cstringArray = + gtk_about_dialog_get_authors(cast[ptr AboutDialog00](self.impl)) + +proc gtk_about_dialog_get_comments*(self: ptr AboutDialog00): cstring {. + importc: "gtk_about_dialog_get_comments", libprag.} + +proc getComments*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_comments(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc comments*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_comments(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc gtk_about_dialog_get_copyright*(self: ptr AboutDialog00): cstring {. + importc: "gtk_about_dialog_get_copyright", libprag.} + +proc getCopyright*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_copyright(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc copyright*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_copyright(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc gtk_about_dialog_get_documenters*(self: ptr AboutDialog00): cstringArray {. + importc: "gtk_about_dialog_get_documenters", libprag.} + +proc getDocumenters*(self: AboutDialog): cstringArray = + gtk_about_dialog_get_documenters(cast[ptr AboutDialog00](self.impl)) + +proc documenters*(self: AboutDialog): cstringArray = + gtk_about_dialog_get_documenters(cast[ptr AboutDialog00](self.impl)) + +proc gtk_about_dialog_get_license*(self: ptr AboutDialog00): cstring {. + importc: "gtk_about_dialog_get_license", libprag.} + +proc getLicense*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_license(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc license*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_license(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc gtk_about_dialog_get_logo*(self: ptr AboutDialog00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_about_dialog_get_logo", libprag.} + +proc getLogo*(self: AboutDialog): gdkpixbuf.Pixbuf = + let gobj = gtk_about_dialog_get_logo(cast[ptr AboutDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc logo*(self: AboutDialog): gdkpixbuf.Pixbuf = + let gobj = gtk_about_dialog_get_logo(cast[ptr AboutDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_about_dialog_get_logo_icon_name*(self: ptr AboutDialog00): cstring {. + importc: "gtk_about_dialog_get_logo_icon_name", libprag.} + +proc getLogoIconName*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_logo_icon_name(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc logoIconName*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_logo_icon_name(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc gtk_about_dialog_get_program_name*(self: ptr AboutDialog00): cstring {. + importc: "gtk_about_dialog_get_program_name", libprag.} + +proc getProgramName*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_program_name(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc programName*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_program_name(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc gtk_about_dialog_get_translator_credits*(self: ptr AboutDialog00): cstring {. + importc: "gtk_about_dialog_get_translator_credits", libprag.} + +proc getTranslatorCredits*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_translator_credits(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc translatorCredits*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_translator_credits(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc gtk_about_dialog_get_version*(self: ptr AboutDialog00): cstring {. + importc: "gtk_about_dialog_get_version", libprag.} + +proc getVersion*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_version(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc version*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_version(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc gtk_about_dialog_get_website*(self: ptr AboutDialog00): cstring {. + importc: "gtk_about_dialog_get_website", libprag.} + +proc getWebsite*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_website(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc website*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_website(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc gtk_about_dialog_get_website_label*(self: ptr AboutDialog00): cstring {. + importc: "gtk_about_dialog_get_website_label", libprag.} + +proc getWebsiteLabel*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_website_label(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc websiteLabel*(self: AboutDialog): string = + let resul0 = gtk_about_dialog_get_website_label(cast[ptr AboutDialog00](self.impl)) + result = $resul0 + +proc gtk_about_dialog_get_wrap_license*(self: ptr AboutDialog00): gboolean {. + importc: "gtk_about_dialog_get_wrap_license", libprag.} + +proc getWrapLicense*(self: AboutDialog): bool = + toBool(gtk_about_dialog_get_wrap_license(cast[ptr AboutDialog00](self.impl))) + +proc wrapLicense*(self: AboutDialog): bool = + toBool(gtk_about_dialog_get_wrap_license(cast[ptr AboutDialog00](self.impl))) + +proc gtk_about_dialog_set_artists*(self: ptr AboutDialog00; artists: cstringArray) {. + importc: "gtk_about_dialog_set_artists", libprag.} + +proc setArtists*(self: AboutDialog; artists: cstringArray) = + gtk_about_dialog_set_artists(cast[ptr AboutDialog00](self.impl), artists) + +proc `artists=`*(self: AboutDialog; artists: cstringArray) = + gtk_about_dialog_set_artists(cast[ptr AboutDialog00](self.impl), artists) + +proc gtk_about_dialog_set_authors*(self: ptr AboutDialog00; authors: cstringArray) {. + importc: "gtk_about_dialog_set_authors", libprag.} + +proc setAuthors*(self: AboutDialog; authors: cstringArray) = + gtk_about_dialog_set_authors(cast[ptr AboutDialog00](self.impl), authors) + +proc `authors=`*(self: AboutDialog; authors: cstringArray) = + gtk_about_dialog_set_authors(cast[ptr AboutDialog00](self.impl), authors) + +proc gtk_about_dialog_set_comments*(self: ptr AboutDialog00; comments: cstring) {. + importc: "gtk_about_dialog_set_comments", libprag.} + +proc setComments*(self: AboutDialog; comments: string) = + gtk_about_dialog_set_comments(cast[ptr AboutDialog00](self.impl), cstring(comments)) + +proc `comments=`*(self: AboutDialog; comments: string) = + gtk_about_dialog_set_comments(cast[ptr AboutDialog00](self.impl), cstring(comments)) + +proc gtk_about_dialog_set_copyright*(self: ptr AboutDialog00; copyright: cstring) {. + importc: "gtk_about_dialog_set_copyright", libprag.} + +proc setCopyright*(self: AboutDialog; copyright: string) = + gtk_about_dialog_set_copyright(cast[ptr AboutDialog00](self.impl), cstring(copyright)) + +proc `copyright=`*(self: AboutDialog; copyright: string) = + gtk_about_dialog_set_copyright(cast[ptr AboutDialog00](self.impl), cstring(copyright)) + +proc gtk_about_dialog_set_documenters*(self: ptr AboutDialog00; documenters: cstringArray) {. + importc: "gtk_about_dialog_set_documenters", libprag.} + +proc setDocumenters*(self: AboutDialog; documenters: cstringArray) = + gtk_about_dialog_set_documenters(cast[ptr AboutDialog00](self.impl), documenters) + +proc `documenters=`*(self: AboutDialog; documenters: cstringArray) = + gtk_about_dialog_set_documenters(cast[ptr AboutDialog00](self.impl), documenters) + +proc gtk_about_dialog_set_license*(self: ptr AboutDialog00; license: cstring) {. + importc: "gtk_about_dialog_set_license", libprag.} + +proc setLicense*(self: AboutDialog; license: string) = + gtk_about_dialog_set_license(cast[ptr AboutDialog00](self.impl), cstring(license)) + +proc `license=`*(self: AboutDialog; license: string) = + gtk_about_dialog_set_license(cast[ptr AboutDialog00](self.impl), cstring(license)) + +proc gtk_about_dialog_set_logo*(self: ptr AboutDialog00; logo: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_about_dialog_set_logo", libprag.} + +proc setLogo*(self: AboutDialog; logo: gdkpixbuf.Pixbuf) = + gtk_about_dialog_set_logo(cast[ptr AboutDialog00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](logo.impl)) + +proc `logo=`*(self: AboutDialog; logo: gdkpixbuf.Pixbuf) = + gtk_about_dialog_set_logo(cast[ptr AboutDialog00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](logo.impl)) + +proc gtk_about_dialog_set_logo_icon_name*(self: ptr AboutDialog00; iconName: cstring) {. + importc: "gtk_about_dialog_set_logo_icon_name", libprag.} + +proc setLogoIconName*(self: AboutDialog; iconName: string) = + gtk_about_dialog_set_logo_icon_name(cast[ptr AboutDialog00](self.impl), cstring(iconName)) + +proc `logoIconName=`*(self: AboutDialog; iconName: string) = + gtk_about_dialog_set_logo_icon_name(cast[ptr AboutDialog00](self.impl), cstring(iconName)) + +proc gtk_about_dialog_set_program_name*(self: ptr AboutDialog00; name: cstring) {. + importc: "gtk_about_dialog_set_program_name", libprag.} + +proc setProgramName*(self: AboutDialog; name: string) = + gtk_about_dialog_set_program_name(cast[ptr AboutDialog00](self.impl), cstring(name)) + +proc `programName=`*(self: AboutDialog; name: string) = + gtk_about_dialog_set_program_name(cast[ptr AboutDialog00](self.impl), cstring(name)) + +proc gtk_about_dialog_set_translator_credits*(self: ptr AboutDialog00; translatorCredits: cstring) {. + importc: "gtk_about_dialog_set_translator_credits", libprag.} + +proc setTranslatorCredits*(self: AboutDialog; translatorCredits: string) = + gtk_about_dialog_set_translator_credits(cast[ptr AboutDialog00](self.impl), cstring(translatorCredits)) + +proc `translatorCredits=`*(self: AboutDialog; translatorCredits: string) = + gtk_about_dialog_set_translator_credits(cast[ptr AboutDialog00](self.impl), cstring(translatorCredits)) + +proc gtk_about_dialog_set_version*(self: ptr AboutDialog00; version: cstring) {. + importc: "gtk_about_dialog_set_version", libprag.} + +proc setVersion*(self: AboutDialog; version: string) = + gtk_about_dialog_set_version(cast[ptr AboutDialog00](self.impl), cstring(version)) + +proc `version=`*(self: AboutDialog; version: string) = + gtk_about_dialog_set_version(cast[ptr AboutDialog00](self.impl), cstring(version)) + +proc gtk_about_dialog_set_website*(self: ptr AboutDialog00; website: cstring) {. + importc: "gtk_about_dialog_set_website", libprag.} + +proc setWebsite*(self: AboutDialog; website: string) = + gtk_about_dialog_set_website(cast[ptr AboutDialog00](self.impl), cstring(website)) + +proc `website=`*(self: AboutDialog; website: string) = + gtk_about_dialog_set_website(cast[ptr AboutDialog00](self.impl), cstring(website)) + +proc gtk_about_dialog_set_website_label*(self: ptr AboutDialog00; websiteLabel: cstring) {. + importc: "gtk_about_dialog_set_website_label", libprag.} + +proc setWebsiteLabel*(self: AboutDialog; websiteLabel: string) = + gtk_about_dialog_set_website_label(cast[ptr AboutDialog00](self.impl), cstring(websiteLabel)) + +proc `websiteLabel=`*(self: AboutDialog; websiteLabel: string) = + gtk_about_dialog_set_website_label(cast[ptr AboutDialog00](self.impl), cstring(websiteLabel)) + +proc gtk_about_dialog_set_wrap_license*(self: ptr AboutDialog00; wrapLicense: gboolean) {. + importc: "gtk_about_dialog_set_wrap_license", libprag.} + +proc setWrapLicense*(self: AboutDialog; wrapLicense: bool) = + gtk_about_dialog_set_wrap_license(cast[ptr AboutDialog00](self.impl), gboolean(wrapLicense)) + +proc `wrapLicense=`*(self: AboutDialog; wrapLicense: bool) = + gtk_about_dialog_set_wrap_license(cast[ptr AboutDialog00](self.impl), gboolean(wrapLicense)) + +type + License* {.size: sizeof(cint), pure.} = enum + unknown = 0 + custom = 1 + gpl_2_0 = 2 + gpl_3_0 = 3 + lgpl_2_1 = 4 + lgpl_3_0 = 5 + bsd = 6 + mitX11 = 7 + artistic = 8 + gpl_2_0Only = 9 + gpl_3_0Only = 10 + lgpl_2_1Only = 11 + lgpl_3_0Only = 12 + agpl_3_0 = 13 + +proc gtk_about_dialog_get_license_type*(self: ptr AboutDialog00): License {. + importc: "gtk_about_dialog_get_license_type", libprag.} + +proc getLicenseType*(self: AboutDialog): License = + gtk_about_dialog_get_license_type(cast[ptr AboutDialog00](self.impl)) + +proc licenseType*(self: AboutDialog): License = + gtk_about_dialog_get_license_type(cast[ptr AboutDialog00](self.impl)) + +proc gtk_about_dialog_set_license_type*(self: ptr AboutDialog00; licenseType: License) {. + importc: "gtk_about_dialog_set_license_type", libprag.} + +proc setLicenseType*(self: AboutDialog; licenseType: License) = + gtk_about_dialog_set_license_type(cast[ptr AboutDialog00](self.impl), licenseType) + +proc `licenseType=`*(self: AboutDialog; licenseType: License) = + gtk_about_dialog_set_license_type(cast[ptr AboutDialog00](self.impl), licenseType) + +type + BoxPrivate00* {.pure.} = object + BoxPrivate* = ref object + impl*: ptr BoxPrivate00 + +type + Box* = ref object of Container + Box00* = object of Container00 + priv3: ptr BoxPrivate00 + +proc gtk_box_get_center_widget*(self: ptr Box00): ptr Widget00 {. + importc: "gtk_box_get_center_widget", libprag.} + +proc getCenterWidget*(self: Box): Widget = + let gobj = gtk_box_get_center_widget(cast[ptr Box00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc centerWidget*(self: Box): Widget = + let gobj = gtk_box_get_center_widget(cast[ptr Box00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_box_get_homogeneous*(self: ptr Box00): gboolean {. + importc: "gtk_box_get_homogeneous", libprag.} + +proc getHomogeneous*(self: Box): bool = + toBool(gtk_box_get_homogeneous(cast[ptr Box00](self.impl))) + +proc homogeneous*(self: Box): bool = + toBool(gtk_box_get_homogeneous(cast[ptr Box00](self.impl))) + +proc gtk_box_get_spacing*(self: ptr Box00): int32 {. + importc: "gtk_box_get_spacing", libprag.} + +proc getSpacing*(self: Box): int = + int(gtk_box_get_spacing(cast[ptr Box00](self.impl))) + +proc spacing*(self: Box): int = + int(gtk_box_get_spacing(cast[ptr Box00](self.impl))) + +proc gtk_box_pack_end*(self: ptr Box00; child: ptr Widget00; expand: gboolean; + fill: gboolean; padding: uint32) {. + importc: "gtk_box_pack_end", libprag.} + +proc packEnd*(self: Box; child: Widget; expand: bool; fill: bool; + padding: int) = + gtk_box_pack_end(cast[ptr Box00](self.impl), cast[ptr Widget00](child.impl), gboolean(expand), gboolean(fill), uint32(padding)) + +proc gtk_box_pack_start*(self: ptr Box00; child: ptr Widget00; expand: gboolean; + fill: gboolean; padding: uint32) {. + importc: "gtk_box_pack_start", libprag.} + +proc packStart*(self: Box; child: Widget; expand: bool; fill: bool; + padding: int) = + gtk_box_pack_start(cast[ptr Box00](self.impl), cast[ptr Widget00](child.impl), gboolean(expand), gboolean(fill), uint32(padding)) + +proc gtk_box_reorder_child*(self: ptr Box00; child: ptr Widget00; position: int32) {. + importc: "gtk_box_reorder_child", libprag.} + +proc reorderChild*(self: Box; child: Widget; position: int) = + gtk_box_reorder_child(cast[ptr Box00](self.impl), cast[ptr Widget00](child.impl), int32(position)) + +proc gtk_box_set_center_widget*(self: ptr Box00; widget: ptr Widget00) {. + importc: "gtk_box_set_center_widget", libprag.} + +proc setCenterWidget*(self: Box; widget: Widget) = + gtk_box_set_center_widget(cast[ptr Box00](self.impl), cast[ptr Widget00](widget.impl)) + +proc `centerWidget=`*(self: Box; widget: Widget) = + gtk_box_set_center_widget(cast[ptr Box00](self.impl), cast[ptr Widget00](widget.impl)) + +proc gtk_box_set_homogeneous*(self: ptr Box00; homogeneous: gboolean) {. + importc: "gtk_box_set_homogeneous", libprag.} + +proc setHomogeneous*(self: Box; homogeneous: bool) = + gtk_box_set_homogeneous(cast[ptr Box00](self.impl), gboolean(homogeneous)) + +proc `homogeneous=`*(self: Box; homogeneous: bool) = + gtk_box_set_homogeneous(cast[ptr Box00](self.impl), gboolean(homogeneous)) + +proc gtk_box_set_spacing*(self: ptr Box00; spacing: int32) {. + importc: "gtk_box_set_spacing", libprag.} + +proc setSpacing*(self: Box; spacing: int) = + gtk_box_set_spacing(cast[ptr Box00](self.impl), int32(spacing)) + +proc `spacing=`*(self: Box; spacing: int) = + gtk_box_set_spacing(cast[ptr Box00](self.impl), int32(spacing)) + +proc gtk_dialog_get_content_area*(self: ptr Dialog00): ptr Box00 {. + importc: "gtk_dialog_get_content_area", libprag.} + +proc getContentArea*(self: Dialog): Box = + let gobj = gtk_dialog_get_content_area(cast[ptr Dialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Box](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc contentArea*(self: Dialog): Box = + let gobj = gtk_dialog_get_content_area(cast[ptr Dialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Box](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + BaselinePosition* {.size: sizeof(cint), pure.} = enum + top = 0 + center = 1 + bottom = 2 + +proc gtk_box_get_baseline_position*(self: ptr Box00): BaselinePosition {. + importc: "gtk_box_get_baseline_position", libprag.} + +proc getBaselinePosition*(self: Box): BaselinePosition = + gtk_box_get_baseline_position(cast[ptr Box00](self.impl)) + +proc baselinePosition*(self: Box): BaselinePosition = + gtk_box_get_baseline_position(cast[ptr Box00](self.impl)) + +proc gtk_box_set_baseline_position*(self: ptr Box00; position: BaselinePosition) {. + importc: "gtk_box_set_baseline_position", libprag.} + +proc setBaselinePosition*(self: Box; position: BaselinePosition) = + gtk_box_set_baseline_position(cast[ptr Box00](self.impl), position) + +proc `baselinePosition=`*(self: Box; position: BaselinePosition) = + gtk_box_set_baseline_position(cast[ptr Box00](self.impl), position) + +type + PackType* {.size: sizeof(cint), pure.} = enum + start = 0 + `end` = 1 + +proc gtk_box_query_child_packing*(self: ptr Box00; child: ptr Widget00; expand: var gboolean; + fill: var gboolean; padding: var uint32; packType: var PackType) {. + importc: "gtk_box_query_child_packing", libprag.} + +proc queryChildPacking*(self: Box; child: Widget; expand: var bool; fill: var bool; + padding: var int; packType: var PackType) = + var padding_00 = uint32(padding) + var fill_00 = gboolean(fill) + var expand_00 = gboolean(expand) + gtk_box_query_child_packing(cast[ptr Box00](self.impl), cast[ptr Widget00](child.impl), expand_00, fill_00, padding_00, packType) + padding = int(padding_00) + fill = toBool(fill_00) + expand = toBool(expand_00) + +proc gtk_box_set_child_packing*(self: ptr Box00; child: ptr Widget00; expand: gboolean; + fill: gboolean; padding: uint32; packType: PackType) {. + importc: "gtk_box_set_child_packing", libprag.} + +proc setChildPacking*(self: Box; child: Widget; expand: bool; fill: bool; + padding: int; packType: PackType) = + gtk_box_set_child_packing(cast[ptr Box00](self.impl), cast[ptr Widget00](child.impl), gboolean(expand), gboolean(fill), uint32(padding), packType) + +type + WindowGroupPrivate00* {.pure.} = object + WindowGroupPrivate* = ref object + impl*: ptr WindowGroupPrivate00 + +type + WindowGroup* = ref object of gobject.Object + WindowGroup00* = object of gobject.Object00 + priv1: ptr WindowGroupPrivate00 + +proc gtk_window_group_new*(): ptr WindowGroup00 {. + importc: "gtk_window_group_new", libprag.} + +proc newWindowGroup*(): WindowGroup = + new(result, finalizeGObject) + result.impl = gtk_window_group_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initWindowGroup*[T](result: var T) = + assert(result is WindowGroup) + new(result, finalizeGObject) + result.impl = gtk_window_group_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_group_add_window*(self: ptr WindowGroup00; window: ptr Window00) {. + importc: "gtk_window_group_add_window", libprag.} + +proc addWindow*(self: WindowGroup; window: Window) = + gtk_window_group_add_window(cast[ptr WindowGroup00](self.impl), cast[ptr Window00](window.impl)) + +proc gtk_window_group_get_current_device_grab*(self: ptr WindowGroup00; device: ptr gdk.Device00): ptr Widget00 {. + importc: "gtk_window_group_get_current_device_grab", libprag.} + +proc getCurrentDeviceGrab*(self: WindowGroup; device: gdk.Device): Widget = + let gobj = gtk_window_group_get_current_device_grab(cast[ptr WindowGroup00](self.impl), cast[ptr gdk.Device00](device.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc currentDeviceGrab*(self: WindowGroup; device: gdk.Device): Widget = + let gobj = gtk_window_group_get_current_device_grab(cast[ptr WindowGroup00](self.impl), cast[ptr gdk.Device00](device.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_group_get_current_grab*(self: ptr WindowGroup00): ptr Widget00 {. + importc: "gtk_window_group_get_current_grab", libprag.} + +proc getCurrentGrab*(self: WindowGroup): Widget = + let gobj = gtk_window_group_get_current_grab(cast[ptr WindowGroup00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc currentGrab*(self: WindowGroup): Widget = + let gobj = gtk_window_group_get_current_grab(cast[ptr WindowGroup00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_group_list_windows*(self: ptr WindowGroup00): ptr pointer {. + importc: "gtk_window_group_list_windows", libprag.} + +proc listWindows*(self: WindowGroup): ptr pointer = + gtk_window_group_list_windows(cast[ptr WindowGroup00](self.impl)) + +proc gtk_window_group_remove_window*(self: ptr WindowGroup00; window: ptr Window00) {. + importc: "gtk_window_group_remove_window", libprag.} + +proc removeWindow*(self: WindowGroup; window: Window) = + gtk_window_group_remove_window(cast[ptr WindowGroup00](self.impl), cast[ptr Window00](window.impl)) + +proc gtk_window_get_group*(self: ptr Window00): ptr WindowGroup00 {. + importc: "gtk_window_get_group", libprag.} + +proc getGroup*(self: Window): WindowGroup = + let gobj = gtk_window_get_group(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[WindowGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc group*(self: Window): WindowGroup = + let gobj = gtk_window_get_group(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[WindowGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + WindowType* {.size: sizeof(cint), pure.} = enum + toplevel = 0 + popup = 1 + +proc gtk_window_new*(`type`: WindowType): ptr Window00 {. + importc: "gtk_window_new", libprag.} + +proc newWindow*(`type`: WindowType = WindowType.toplevel): Window = + new(result, finalizeGObject) + result.impl = gtk_window_new(`type`) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initWindow*[T](result: var T; `type`: WindowType = WindowType.toplevel) = + assert(result is Window) + new(result, finalizeGObject) + result.impl = gtk_window_new(`type`) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_get_window_type*(self: ptr Window00): WindowType {. + importc: "gtk_window_get_window_type", libprag.} + +proc getWindowType*(self: Window): WindowType = + gtk_window_get_window_type(cast[ptr Window00](self.impl)) + +proc windowType*(self: Window): WindowType = + gtk_window_get_window_type(cast[ptr Window00](self.impl)) + +type + ApplicationPrivate00* {.pure.} = object + ApplicationPrivate* = ref object + impl*: ptr ApplicationPrivate00 + +type + Application* = ref object of gio.Application + Application00* = object of gio.Application00 + priv9: ptr ApplicationPrivate00 + +proc scWindowAdded*(self: Application; p: proc (self: ptr gobject.Object00; window: Window00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "window-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scWindowRemoved*(self: Application; p: proc (self: ptr gobject.Object00; window: Window00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "window-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_application_new*(applicationId: cstring; flags: gio.ApplicationFlags): ptr Application00 {. + importc: "gtk_application_new", libprag.} + +proc newApplication*(applicationId: string; flags: gio.ApplicationFlags = {}): Application = + new(result, finalizeGObject) + result.impl = gtk_application_new(cstring(applicationId), flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initApplication*[T](result: var T; applicationId: string; flags: gio.ApplicationFlags = {}) = + assert(result is Application) + new(result, finalizeGObject) + result.impl = gtk_application_new(cstring(applicationId), flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_application_add_accelerator*(self: ptr Application00; accelerator: cstring; actionName: cstring; + parameter: ptr glib.Variant00) {. + importc: "gtk_application_add_accelerator", libprag.} + +proc addAccelerator*(self: Application; accelerator: string; actionName: string; + parameter: glib.Variant) = + gtk_application_add_accelerator(cast[ptr Application00](self.impl), cstring(accelerator), cstring(actionName), cast[ptr glib.Variant00](parameter.impl)) + +proc gtk_application_add_window*(self: ptr Application00; window: ptr Window00) {. + importc: "gtk_application_add_window", libprag.} + +proc addWindow*(self: Application; window: Window) = + gtk_application_add_window(cast[ptr Application00](self.impl), cast[ptr Window00](window.impl)) + +proc gtk_application_get_accels_for_action*(self: ptr Application00; detailedActionName: cstring): cstringArray {. + importc: "gtk_application_get_accels_for_action", libprag.} + +proc getAccelsForAction*(self: Application; detailedActionName: string): cstringArray = + gtk_application_get_accels_for_action(cast[ptr Application00](self.impl), cstring(detailedActionName)) + +proc accelsForAction*(self: Application; detailedActionName: string): cstringArray = + gtk_application_get_accels_for_action(cast[ptr Application00](self.impl), cstring(detailedActionName)) + +proc gtk_application_get_actions_for_accel*(self: ptr Application00; accel: cstring): cstringArray {. + importc: "gtk_application_get_actions_for_accel", libprag.} + +proc getActionsForAccel*(self: Application; accel: string): cstringArray = + gtk_application_get_actions_for_accel(cast[ptr Application00](self.impl), cstring(accel)) + +proc actionsForAccel*(self: Application; accel: string): cstringArray = + gtk_application_get_actions_for_accel(cast[ptr Application00](self.impl), cstring(accel)) + +proc gtk_application_get_active_window*(self: ptr Application00): ptr Window00 {. + importc: "gtk_application_get_active_window", libprag.} + +proc getActiveWindow*(self: Application): Window = + let gobj = gtk_application_get_active_window(cast[ptr Application00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc activeWindow*(self: Application): Window = + let gobj = gtk_application_get_active_window(cast[ptr Application00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_application_get_app_menu*(self: ptr Application00): ptr gio.MenuModel00 {. + importc: "gtk_application_get_app_menu", libprag.} + +proc getAppMenu*(self: Application): gio.MenuModel = + let gobj = gtk_application_get_app_menu(cast[ptr Application00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc appMenu*(self: Application): gio.MenuModel = + let gobj = gtk_application_get_app_menu(cast[ptr Application00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_application_get_menu_by_id*(self: ptr Application00; id: cstring): ptr gio.Menu00 {. + importc: "gtk_application_get_menu_by_id", libprag.} + +proc getMenuById*(self: Application; id: string): gio.Menu = + let gobj = gtk_application_get_menu_by_id(cast[ptr Application00](self.impl), cstring(id)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.Menu](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc menuById*(self: Application; id: string): gio.Menu = + let gobj = gtk_application_get_menu_by_id(cast[ptr Application00](self.impl), cstring(id)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.Menu](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_application_get_menubar*(self: ptr Application00): ptr gio.MenuModel00 {. + importc: "gtk_application_get_menubar", libprag.} + +proc getMenubar*(self: Application): gio.MenuModel = + let gobj = gtk_application_get_menubar(cast[ptr Application00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc menubar*(self: Application): gio.MenuModel = + let gobj = gtk_application_get_menubar(cast[ptr Application00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_application_get_window_by_id*(self: ptr Application00; id: uint32): ptr Window00 {. + importc: "gtk_application_get_window_by_id", libprag.} + +proc getWindowById*(self: Application; id: int): Window = + let gobj = gtk_application_get_window_by_id(cast[ptr Application00](self.impl), uint32(id)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc windowById*(self: Application; id: int): Window = + let gobj = gtk_application_get_window_by_id(cast[ptr Application00](self.impl), uint32(id)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_application_get_windows*(self: ptr Application00): ptr pointer {. + importc: "gtk_application_get_windows", libprag.} + +proc getWindows*(self: Application): ptr pointer = + gtk_application_get_windows(cast[ptr Application00](self.impl)) + +proc windows*(self: Application): ptr pointer = + gtk_application_get_windows(cast[ptr Application00](self.impl)) + +proc gtk_application_list_action_descriptions*(self: ptr Application00): cstringArray {. + importc: "gtk_application_list_action_descriptions", libprag.} + +proc listActionDescriptions*(self: Application): cstringArray = + gtk_application_list_action_descriptions(cast[ptr Application00](self.impl)) + +proc gtk_application_prefers_app_menu*(self: ptr Application00): gboolean {. + importc: "gtk_application_prefers_app_menu", libprag.} + +proc prefersAppMenu*(self: Application): bool = + toBool(gtk_application_prefers_app_menu(cast[ptr Application00](self.impl))) + +proc gtk_application_remove_accelerator*(self: ptr Application00; actionName: cstring; parameter: ptr glib.Variant00) {. + importc: "gtk_application_remove_accelerator", libprag.} + +proc removeAccelerator*(self: Application; actionName: string; parameter: glib.Variant) = + gtk_application_remove_accelerator(cast[ptr Application00](self.impl), cstring(actionName), cast[ptr glib.Variant00](parameter.impl)) + +proc gtk_application_remove_window*(self: ptr Application00; window: ptr Window00) {. + importc: "gtk_application_remove_window", libprag.} + +proc removeWindow*(self: Application; window: Window) = + gtk_application_remove_window(cast[ptr Application00](self.impl), cast[ptr Window00](window.impl)) + +proc gtk_application_set_accels_for_action*(self: ptr Application00; detailedActionName: cstring; + accels: cstringArray) {. + importc: "gtk_application_set_accels_for_action", libprag.} + +proc setAccelsForAction*(self: Application; detailedActionName: string; accels: cstringArray) = + gtk_application_set_accels_for_action(cast[ptr Application00](self.impl), cstring(detailedActionName), accels) + +proc gtk_application_set_app_menu*(self: ptr Application00; appMenu: ptr gio.MenuModel00) {. + importc: "gtk_application_set_app_menu", libprag.} + +proc setAppMenu*(self: Application; appMenu: gio.MenuModel) = + gtk_application_set_app_menu(cast[ptr Application00](self.impl), cast[ptr gio.MenuModel00](appMenu.impl)) + +proc `appMenu=`*(self: Application; appMenu: gio.MenuModel) = + gtk_application_set_app_menu(cast[ptr Application00](self.impl), cast[ptr gio.MenuModel00](appMenu.impl)) + +proc gtk_application_set_menubar*(self: ptr Application00; menubar: ptr gio.MenuModel00) {. + importc: "gtk_application_set_menubar", libprag.} + +proc setMenubar*(self: Application; menubar: gio.MenuModel) = + gtk_application_set_menubar(cast[ptr Application00](self.impl), cast[ptr gio.MenuModel00](menubar.impl)) + +proc `menubar=`*(self: Application; menubar: gio.MenuModel) = + gtk_application_set_menubar(cast[ptr Application00](self.impl), cast[ptr gio.MenuModel00](menubar.impl)) + +proc gtk_application_uninhibit*(self: ptr Application00; cookie: uint32) {. + importc: "gtk_application_uninhibit", libprag.} + +proc uninhibit*(self: Application; cookie: int) = + gtk_application_uninhibit(cast[ptr Application00](self.impl), uint32(cookie)) + +proc gtk_window_get_application*(self: ptr Window00): ptr Application00 {. + importc: "gtk_window_get_application", libprag.} + +proc getApplication*(self: Window): Application = + let gobj = gtk_window_get_application(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Application](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc application*(self: Window): Application = + let gobj = gtk_window_get_application(cast[ptr Window00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Application](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_window_set_application*(self: ptr Window00; application: ptr Application00) {. + importc: "gtk_window_set_application", libprag.} + +proc setApplication*(self: Window; application: Application) = + gtk_window_set_application(cast[ptr Window00](self.impl), cast[ptr Application00](application.impl)) + +proc `application=`*(self: Window; application: Application) = + gtk_window_set_application(cast[ptr Window00](self.impl), cast[ptr Application00](application.impl)) + +type + ApplicationInhibitFlag* {.size: sizeof(cint), pure.} = enum + logout = 1 + switch = 2 + suspend = 3 + idle = 4 + + ApplicationInhibitFlags* {.size: sizeof(cint).} = set[ApplicationInhibitFlag] + +proc gtk_application_inhibit*(self: ptr Application00; window: ptr Window00; flags: ApplicationInhibitFlags; + reason: cstring): uint32 {. + importc: "gtk_application_inhibit", libprag.} + +proc inhibit*(self: Application; window: Window; flags: ApplicationInhibitFlags; + reason: string): int = + int(gtk_application_inhibit(cast[ptr Application00](self.impl), cast[ptr Window00](window.impl), flags, cstring(reason))) + +proc gtk_application_is_inhibited*(self: ptr Application00; flags: ApplicationInhibitFlags): gboolean {. + importc: "gtk_application_is_inhibited", libprag.} + +proc isInhibited*(self: Application; flags: ApplicationInhibitFlags): bool = + toBool(gtk_application_is_inhibited(cast[ptr Application00](self.impl), flags)) + +type + WindowPosition* {.size: sizeof(cint), pure.} = enum + none = 0 + center = 1 + mouse = 2 + centerAlways = 3 + centerOnParent = 4 + +proc gtk_window_set_position*(self: ptr Window00; position: WindowPosition) {. + importc: "gtk_window_set_position", libprag.} + +proc setPosition*(self: Window; position: WindowPosition) = + gtk_window_set_position(cast[ptr Window00](self.impl), position) + +proc `position=`*(self: Window; position: WindowPosition) = + gtk_window_set_position(cast[ptr Window00](self.impl), position) + +type + AdjustmentPrivate00* {.pure.} = object + AdjustmentPrivate* = ref object + impl*: ptr AdjustmentPrivate00 + +type + Adjustment* = ref object of gobject.InitiallyUnowned + Adjustment00* = object of gobject.InitiallyUnowned00 + priv1: ptr AdjustmentPrivate00 + +proc scChanged*(self: Adjustment; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scValueChanged*(self: Adjustment; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "value-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_adjustment_new*(value: cdouble; lower: cdouble; upper: cdouble; stepIncrement: cdouble; + pageIncrement: cdouble; pageSize: cdouble): ptr Adjustment00 {. + importc: "gtk_adjustment_new", libprag.} + +proc newAdjustment*(value: cdouble; lower: cdouble; upper: cdouble; stepIncrement: cdouble; + pageIncrement: cdouble; pageSize: cdouble): Adjustment = + new(result, finalizeGObject) + result.impl = gtk_adjustment_new(value, lower, upper, stepIncrement, pageIncrement, pageSize) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAdjustment*[T](result: var T; value: cdouble; lower: cdouble; upper: cdouble; stepIncrement: cdouble; + pageIncrement: cdouble; pageSize: cdouble) = + assert(result is Adjustment) + new(result, finalizeGObject) + result.impl = gtk_adjustment_new(value, lower, upper, stepIncrement, pageIncrement, pageSize) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_adjustment_changed*(self: ptr Adjustment00) {. + importc: "gtk_adjustment_changed", libprag.} + +proc changed*(self: Adjustment) = + gtk_adjustment_changed(cast[ptr Adjustment00](self.impl)) + +proc gtk_adjustment_clamp_page*(self: ptr Adjustment00; lower: cdouble; upper: cdouble) {. + importc: "gtk_adjustment_clamp_page", libprag.} + +proc clampPage*(self: Adjustment; lower: cdouble; upper: cdouble) = + gtk_adjustment_clamp_page(cast[ptr Adjustment00](self.impl), lower, upper) + +proc gtk_adjustment_configure*(self: ptr Adjustment00; value: cdouble; lower: cdouble; + upper: cdouble; stepIncrement: cdouble; pageIncrement: cdouble; pageSize: cdouble) {. + importc: "gtk_adjustment_configure", libprag.} + +proc configure*(self: Adjustment; value: cdouble; lower: cdouble; + upper: cdouble; stepIncrement: cdouble; pageIncrement: cdouble; pageSize: cdouble) = + gtk_adjustment_configure(cast[ptr Adjustment00](self.impl), value, lower, upper, stepIncrement, pageIncrement, pageSize) + +proc gtk_adjustment_get_lower*(self: ptr Adjustment00): cdouble {. + importc: "gtk_adjustment_get_lower", libprag.} + +proc getLower*(self: Adjustment): cdouble = + gtk_adjustment_get_lower(cast[ptr Adjustment00](self.impl)) + +proc lower*(self: Adjustment): cdouble = + gtk_adjustment_get_lower(cast[ptr Adjustment00](self.impl)) + +proc gtk_adjustment_get_minimum_increment*(self: ptr Adjustment00): cdouble {. + importc: "gtk_adjustment_get_minimum_increment", libprag.} + +proc getMinimumIncrement*(self: Adjustment): cdouble = + gtk_adjustment_get_minimum_increment(cast[ptr Adjustment00](self.impl)) + +proc minimumIncrement*(self: Adjustment): cdouble = + gtk_adjustment_get_minimum_increment(cast[ptr Adjustment00](self.impl)) + +proc gtk_adjustment_get_page_increment*(self: ptr Adjustment00): cdouble {. + importc: "gtk_adjustment_get_page_increment", libprag.} + +proc getPageIncrement*(self: Adjustment): cdouble = + gtk_adjustment_get_page_increment(cast[ptr Adjustment00](self.impl)) + +proc pageIncrement*(self: Adjustment): cdouble = + gtk_adjustment_get_page_increment(cast[ptr Adjustment00](self.impl)) + +proc gtk_adjustment_get_page_size*(self: ptr Adjustment00): cdouble {. + importc: "gtk_adjustment_get_page_size", libprag.} + +proc getPageSize*(self: Adjustment): cdouble = + gtk_adjustment_get_page_size(cast[ptr Adjustment00](self.impl)) + +proc pageSize*(self: Adjustment): cdouble = + gtk_adjustment_get_page_size(cast[ptr Adjustment00](self.impl)) + +proc gtk_adjustment_get_step_increment*(self: ptr Adjustment00): cdouble {. + importc: "gtk_adjustment_get_step_increment", libprag.} + +proc getStepIncrement*(self: Adjustment): cdouble = + gtk_adjustment_get_step_increment(cast[ptr Adjustment00](self.impl)) + +proc stepIncrement*(self: Adjustment): cdouble = + gtk_adjustment_get_step_increment(cast[ptr Adjustment00](self.impl)) + +proc gtk_adjustment_get_upper*(self: ptr Adjustment00): cdouble {. + importc: "gtk_adjustment_get_upper", libprag.} + +proc getUpper*(self: Adjustment): cdouble = + gtk_adjustment_get_upper(cast[ptr Adjustment00](self.impl)) + +proc upper*(self: Adjustment): cdouble = + gtk_adjustment_get_upper(cast[ptr Adjustment00](self.impl)) + +proc gtk_adjustment_get_value*(self: ptr Adjustment00): cdouble {. + importc: "gtk_adjustment_get_value", libprag.} + +proc getValue*(self: Adjustment): cdouble = + gtk_adjustment_get_value(cast[ptr Adjustment00](self.impl)) + +proc value*(self: Adjustment): cdouble = + gtk_adjustment_get_value(cast[ptr Adjustment00](self.impl)) + +proc gtk_adjustment_set_lower*(self: ptr Adjustment00; lower: cdouble) {. + importc: "gtk_adjustment_set_lower", libprag.} + +proc setLower*(self: Adjustment; lower: cdouble) = + gtk_adjustment_set_lower(cast[ptr Adjustment00](self.impl), lower) + +proc `lower=`*(self: Adjustment; lower: cdouble) = + gtk_adjustment_set_lower(cast[ptr Adjustment00](self.impl), lower) + +proc gtk_adjustment_set_page_increment*(self: ptr Adjustment00; pageIncrement: cdouble) {. + importc: "gtk_adjustment_set_page_increment", libprag.} + +proc setPageIncrement*(self: Adjustment; pageIncrement: cdouble) = + gtk_adjustment_set_page_increment(cast[ptr Adjustment00](self.impl), pageIncrement) + +proc `pageIncrement=`*(self: Adjustment; pageIncrement: cdouble) = + gtk_adjustment_set_page_increment(cast[ptr Adjustment00](self.impl), pageIncrement) + +proc gtk_adjustment_set_page_size*(self: ptr Adjustment00; pageSize: cdouble) {. + importc: "gtk_adjustment_set_page_size", libprag.} + +proc setPageSize*(self: Adjustment; pageSize: cdouble) = + gtk_adjustment_set_page_size(cast[ptr Adjustment00](self.impl), pageSize) + +proc `pageSize=`*(self: Adjustment; pageSize: cdouble) = + gtk_adjustment_set_page_size(cast[ptr Adjustment00](self.impl), pageSize) + +proc gtk_adjustment_set_step_increment*(self: ptr Adjustment00; stepIncrement: cdouble) {. + importc: "gtk_adjustment_set_step_increment", libprag.} + +proc setStepIncrement*(self: Adjustment; stepIncrement: cdouble) = + gtk_adjustment_set_step_increment(cast[ptr Adjustment00](self.impl), stepIncrement) + +proc `stepIncrement=`*(self: Adjustment; stepIncrement: cdouble) = + gtk_adjustment_set_step_increment(cast[ptr Adjustment00](self.impl), stepIncrement) + +proc gtk_adjustment_set_upper*(self: ptr Adjustment00; upper: cdouble) {. + importc: "gtk_adjustment_set_upper", libprag.} + +proc setUpper*(self: Adjustment; upper: cdouble) = + gtk_adjustment_set_upper(cast[ptr Adjustment00](self.impl), upper) + +proc `upper=`*(self: Adjustment; upper: cdouble) = + gtk_adjustment_set_upper(cast[ptr Adjustment00](self.impl), upper) + +proc gtk_adjustment_set_value*(self: ptr Adjustment00; value: cdouble) {. + importc: "gtk_adjustment_set_value", libprag.} + +proc setValue*(self: Adjustment; value: cdouble) = + gtk_adjustment_set_value(cast[ptr Adjustment00](self.impl), value) + +proc `value=`*(self: Adjustment; value: cdouble) = + gtk_adjustment_set_value(cast[ptr Adjustment00](self.impl), value) + +proc gtk_adjustment_value_changed*(self: ptr Adjustment00) {. + importc: "gtk_adjustment_value_changed", libprag.} + +proc valueChanged*(self: Adjustment) = + gtk_adjustment_value_changed(cast[ptr Adjustment00](self.impl)) + +proc gtk_container_get_focus_hadjustment*(self: ptr Container00): ptr Adjustment00 {. + importc: "gtk_container_get_focus_hadjustment", libprag.} + +proc getFocusHadjustment*(self: Container): Adjustment = + let gobj = gtk_container_get_focus_hadjustment(cast[ptr Container00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc focusHadjustment*(self: Container): Adjustment = + let gobj = gtk_container_get_focus_hadjustment(cast[ptr Container00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_container_get_focus_vadjustment*(self: ptr Container00): ptr Adjustment00 {. + importc: "gtk_container_get_focus_vadjustment", libprag.} + +proc getFocusVadjustment*(self: Container): Adjustment = + let gobj = gtk_container_get_focus_vadjustment(cast[ptr Container00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc focusVadjustment*(self: Container): Adjustment = + let gobj = gtk_container_get_focus_vadjustment(cast[ptr Container00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_container_set_focus_hadjustment*(self: ptr Container00; adjustment: ptr Adjustment00) {. + importc: "gtk_container_set_focus_hadjustment", libprag.} + +proc setFocusHadjustment*(self: Container; adjustment: Adjustment) = + gtk_container_set_focus_hadjustment(cast[ptr Container00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `focusHadjustment=`*(self: Container; adjustment: Adjustment) = + gtk_container_set_focus_hadjustment(cast[ptr Container00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_container_set_focus_vadjustment*(self: ptr Container00; adjustment: ptr Adjustment00) {. + importc: "gtk_container_set_focus_vadjustment", libprag.} + +proc setFocusVadjustment*(self: Container; adjustment: Adjustment) = + gtk_container_set_focus_vadjustment(cast[ptr Container00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `focusVadjustment=`*(self: Container; adjustment: Adjustment) = + gtk_container_set_focus_vadjustment(cast[ptr Container00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +type + ResizeMode* {.size: sizeof(cint), pure.} = enum + parent = 0 + queue = 1 + immediate = 2 + +proc gtk_container_get_resize_mode*(self: ptr Container00): ResizeMode {. + importc: "gtk_container_get_resize_mode", libprag.} + +proc getResizeMode*(self: Container): ResizeMode = + gtk_container_get_resize_mode(cast[ptr Container00](self.impl)) + +proc resizeMode*(self: Container): ResizeMode = + gtk_container_get_resize_mode(cast[ptr Container00](self.impl)) + +proc gtk_container_set_resize_mode*(self: ptr Container00; resizeMode: ResizeMode) {. + importc: "gtk_container_set_resize_mode", libprag.} + +proc setResizeMode*(self: Container; resizeMode: ResizeMode) = + gtk_container_set_resize_mode(cast[ptr Container00](self.impl), resizeMode) + +proc `resizeMode=`*(self: Container; resizeMode: ResizeMode) = + gtk_container_set_resize_mode(cast[ptr Container00](self.impl), resizeMode) + +type + IconSet00* {.pure.} = object + IconSet* = ref object + impl*: ptr IconSet00 + +proc gtk_icon_set_new*(): ptr IconSet00 {. + importc: "gtk_icon_set_new", libprag.} + +proc newIconSet*(): IconSet = + new(result) + result.impl = gtk_icon_set_new() + +proc initIconSet*[T](result: var T) = + assert(result is IconSet) + new(result) + result.impl = gtk_icon_set_new() + +proc gtk_icon_set_new_from_pixbuf*(pixbuf: ptr gdkpixbuf.Pixbuf00): ptr IconSet00 {. + importc: "gtk_icon_set_new_from_pixbuf", libprag.} + +proc newIconSetFromPixbuf*(pixbuf: gdkpixbuf.Pixbuf): IconSet = + new(result) + result.impl = gtk_icon_set_new_from_pixbuf(cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc initIconSetFromPixbuf*[T](result: var T; pixbuf: gdkpixbuf.Pixbuf) = + assert(result is IconSet) + new(result) + result.impl = gtk_icon_set_new_from_pixbuf(cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_icon_set_copy*(self: ptr IconSet00): ptr IconSet00 {. + importc: "gtk_icon_set_copy", libprag.} + +proc copy*(self: IconSet): IconSet = + new(result) + result.impl = gtk_icon_set_copy(cast[ptr IconSet00](self.impl)) + +proc gtk_icon_set_get_sizes*(self: ptr IconSet00; sizes: var int32Array; nSizes: var int32) {. + importc: "gtk_icon_set_get_sizes", libprag.} + +proc getSizes*(self: IconSet; sizes: var int32Array; nSizes: var int) = + var nSizes_00 = int32(nSizes) + gtk_icon_set_get_sizes(cast[ptr IconSet00](self.impl), sizes, nSizes_00) + nSizes = int(nSizes_00) + +proc sizes*(self: IconSet; sizes: var int32Array; nSizes: var int) = + var nSizes_00 = int32(nSizes) + gtk_icon_set_get_sizes(cast[ptr IconSet00](self.impl), sizes, nSizes_00) + nSizes = int(nSizes_00) + +proc gtk_icon_set_ref*(self: ptr IconSet00): ptr IconSet00 {. + importc: "gtk_icon_set_ref", libprag.} + +proc `ref`*(self: IconSet): IconSet = + new(result) + result.impl = gtk_icon_set_ref(cast[ptr IconSet00](self.impl)) + +proc gtk_icon_set_render_icon*(self: ptr IconSet00; style: ptr Style00; direction: TextDirection; + state: StateType; size: int32; widget: ptr Widget00; detail: cstring): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_set_render_icon", libprag.} + +proc renderIcon*(self: IconSet; style: Style; direction: TextDirection; + state: StateType; size: int; widget: Widget; detail: string): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_set_render_icon(cast[ptr IconSet00](self.impl), cast[ptr Style00](style.impl), direction, state, int32(size), cast[ptr Widget00](widget.impl), cstring(detail)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_set_unref*(self: ptr IconSet00) {. + importc: "gtk_icon_set_unref", libprag.} + +proc unref*(self: IconSet) = + gtk_icon_set_unref(cast[ptr IconSet00](self.impl)) + +proc gtk_style_lookup_icon_set*(self: ptr Style00; stockId: cstring): ptr IconSet00 {. + importc: "gtk_style_lookup_icon_set", libprag.} + +proc lookupIconSet*(self: Style; stockId: string): IconSet = + new(result) + result.impl = gtk_style_lookup_icon_set(cast[ptr Style00](self.impl), cstring(stockId)) + +type + IconSource00* {.pure.} = object + IconSource* = ref object + impl*: ptr IconSource00 + +proc gtk_icon_source_new*(): ptr IconSource00 {. + importc: "gtk_icon_source_new", libprag.} + +proc newIconSource*(): IconSource = + new(result) + result.impl = gtk_icon_source_new() + +proc initIconSource*[T](result: var T) = + assert(result is IconSource) + new(result) + result.impl = gtk_icon_source_new() + +proc gtk_icon_source_copy*(self: ptr IconSource00): ptr IconSource00 {. + importc: "gtk_icon_source_copy", libprag.} + +proc copy*(self: IconSource): IconSource = + new(result) + result.impl = gtk_icon_source_copy(cast[ptr IconSource00](self.impl)) + +proc gtk_icon_source_free*(self: ptr IconSource00) {. + importc: "gtk_icon_source_free", libprag.} + +proc free*(self: IconSource) = + gtk_icon_source_free(cast[ptr IconSource00](self.impl)) + +proc gtk_icon_source_get_direction*(self: ptr IconSource00): TextDirection {. + importc: "gtk_icon_source_get_direction", libprag.} + +proc getDirection*(self: IconSource): TextDirection = + gtk_icon_source_get_direction(cast[ptr IconSource00](self.impl)) + +proc direction*(self: IconSource): TextDirection = + gtk_icon_source_get_direction(cast[ptr IconSource00](self.impl)) + +proc gtk_icon_source_get_direction_wildcarded*(self: ptr IconSource00): gboolean {. + importc: "gtk_icon_source_get_direction_wildcarded", libprag.} + +proc getDirectionWildcarded*(self: IconSource): bool = + toBool(gtk_icon_source_get_direction_wildcarded(cast[ptr IconSource00](self.impl))) + +proc directionWildcarded*(self: IconSource): bool = + toBool(gtk_icon_source_get_direction_wildcarded(cast[ptr IconSource00](self.impl))) + +proc gtk_icon_source_get_filename*(self: ptr IconSource00): ucstring {. + importc: "gtk_icon_source_get_filename", libprag.} + +proc getFilename*(self: IconSource): ucstring = + gtk_icon_source_get_filename(cast[ptr IconSource00](self.impl)) + +proc filename*(self: IconSource): ucstring = + gtk_icon_source_get_filename(cast[ptr IconSource00](self.impl)) + +proc gtk_icon_source_get_icon_name*(self: ptr IconSource00): cstring {. + importc: "gtk_icon_source_get_icon_name", libprag.} + +proc getIconName*(self: IconSource): string = + let resul0 = gtk_icon_source_get_icon_name(cast[ptr IconSource00](self.impl)) + result = $resul0 + +proc iconName*(self: IconSource): string = + let resul0 = gtk_icon_source_get_icon_name(cast[ptr IconSource00](self.impl)) + result = $resul0 + +proc gtk_icon_source_get_pixbuf*(self: ptr IconSource00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_source_get_pixbuf", libprag.} + +proc getPixbuf*(self: IconSource): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_source_get_pixbuf(cast[ptr IconSource00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbuf*(self: IconSource): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_source_get_pixbuf(cast[ptr IconSource00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_source_get_size*(self: ptr IconSource00): int32 {. + importc: "gtk_icon_source_get_size", libprag.} + +proc getSize*(self: IconSource): int = + int(gtk_icon_source_get_size(cast[ptr IconSource00](self.impl))) + +proc size*(self: IconSource): int = + int(gtk_icon_source_get_size(cast[ptr IconSource00](self.impl))) + +proc gtk_icon_source_get_size_wildcarded*(self: ptr IconSource00): gboolean {. + importc: "gtk_icon_source_get_size_wildcarded", libprag.} + +proc getSizeWildcarded*(self: IconSource): bool = + toBool(gtk_icon_source_get_size_wildcarded(cast[ptr IconSource00](self.impl))) + +proc sizeWildcarded*(self: IconSource): bool = + toBool(gtk_icon_source_get_size_wildcarded(cast[ptr IconSource00](self.impl))) + +proc gtk_icon_source_get_state*(self: ptr IconSource00): StateType {. + importc: "gtk_icon_source_get_state", libprag.} + +proc getState*(self: IconSource): StateType = + gtk_icon_source_get_state(cast[ptr IconSource00](self.impl)) + +proc state*(self: IconSource): StateType = + gtk_icon_source_get_state(cast[ptr IconSource00](self.impl)) + +proc gtk_icon_source_get_state_wildcarded*(self: ptr IconSource00): gboolean {. + importc: "gtk_icon_source_get_state_wildcarded", libprag.} + +proc getStateWildcarded*(self: IconSource): bool = + toBool(gtk_icon_source_get_state_wildcarded(cast[ptr IconSource00](self.impl))) + +proc stateWildcarded*(self: IconSource): bool = + toBool(gtk_icon_source_get_state_wildcarded(cast[ptr IconSource00](self.impl))) + +proc gtk_icon_source_set_direction*(self: ptr IconSource00; direction: TextDirection) {. + importc: "gtk_icon_source_set_direction", libprag.} + +proc setDirection*(self: IconSource; direction: TextDirection) = + gtk_icon_source_set_direction(cast[ptr IconSource00](self.impl), direction) + +proc `direction=`*(self: IconSource; direction: TextDirection) = + gtk_icon_source_set_direction(cast[ptr IconSource00](self.impl), direction) + +proc gtk_icon_source_set_direction_wildcarded*(self: ptr IconSource00; setting: gboolean) {. + importc: "gtk_icon_source_set_direction_wildcarded", libprag.} + +proc setDirectionWildcarded*(self: IconSource; setting: bool) = + gtk_icon_source_set_direction_wildcarded(cast[ptr IconSource00](self.impl), gboolean(setting)) + +proc `directionWildcarded=`*(self: IconSource; setting: bool) = + gtk_icon_source_set_direction_wildcarded(cast[ptr IconSource00](self.impl), gboolean(setting)) + +proc gtk_icon_source_set_filename*(self: ptr IconSource00; filename: ucstring) {. + importc: "gtk_icon_source_set_filename", libprag.} + +proc setFilename*(self: IconSource; filename: ucstring) = + gtk_icon_source_set_filename(cast[ptr IconSource00](self.impl), filename) + +proc `filename=`*(self: IconSource; filename: ucstring) = + gtk_icon_source_set_filename(cast[ptr IconSource00](self.impl), filename) + +proc gtk_icon_source_set_icon_name*(self: ptr IconSource00; iconName: cstring) {. + importc: "gtk_icon_source_set_icon_name", libprag.} + +proc setIconName*(self: IconSource; iconName: string) = + gtk_icon_source_set_icon_name(cast[ptr IconSource00](self.impl), cstring(iconName)) + +proc `iconName=`*(self: IconSource; iconName: string) = + gtk_icon_source_set_icon_name(cast[ptr IconSource00](self.impl), cstring(iconName)) + +proc gtk_icon_source_set_pixbuf*(self: ptr IconSource00; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_icon_source_set_pixbuf", libprag.} + +proc setPixbuf*(self: IconSource; pixbuf: gdkpixbuf.Pixbuf) = + gtk_icon_source_set_pixbuf(cast[ptr IconSource00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc `pixbuf=`*(self: IconSource; pixbuf: gdkpixbuf.Pixbuf) = + gtk_icon_source_set_pixbuf(cast[ptr IconSource00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_icon_source_set_size*(self: ptr IconSource00; size: int32) {. + importc: "gtk_icon_source_set_size", libprag.} + +proc setSize*(self: IconSource; size: int) = + gtk_icon_source_set_size(cast[ptr IconSource00](self.impl), int32(size)) + +proc `size=`*(self: IconSource; size: int) = + gtk_icon_source_set_size(cast[ptr IconSource00](self.impl), int32(size)) + +proc gtk_icon_source_set_size_wildcarded*(self: ptr IconSource00; setting: gboolean) {. + importc: "gtk_icon_source_set_size_wildcarded", libprag.} + +proc setSizeWildcarded*(self: IconSource; setting: bool) = + gtk_icon_source_set_size_wildcarded(cast[ptr IconSource00](self.impl), gboolean(setting)) + +proc `sizeWildcarded=`*(self: IconSource; setting: bool) = + gtk_icon_source_set_size_wildcarded(cast[ptr IconSource00](self.impl), gboolean(setting)) + +proc gtk_icon_source_set_state*(self: ptr IconSource00; state: StateType) {. + importc: "gtk_icon_source_set_state", libprag.} + +proc setState*(self: IconSource; state: StateType) = + gtk_icon_source_set_state(cast[ptr IconSource00](self.impl), state) + +proc `state=`*(self: IconSource; state: StateType) = + gtk_icon_source_set_state(cast[ptr IconSource00](self.impl), state) + +proc gtk_icon_source_set_state_wildcarded*(self: ptr IconSource00; setting: gboolean) {. + importc: "gtk_icon_source_set_state_wildcarded", libprag.} + +proc setStateWildcarded*(self: IconSource; setting: bool) = + gtk_icon_source_set_state_wildcarded(cast[ptr IconSource00](self.impl), gboolean(setting)) + +proc `stateWildcarded=`*(self: IconSource; setting: bool) = + gtk_icon_source_set_state_wildcarded(cast[ptr IconSource00](self.impl), gboolean(setting)) + +proc gtk_style_render_icon*(self: ptr Style00; source: ptr IconSource00; direction: TextDirection; + state: StateType; size: int32; widget: ptr Widget00; detail: cstring): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_style_render_icon", libprag.} + +proc renderIcon*(self: Style; source: IconSource; direction: TextDirection; + state: StateType; size: int; widget: Widget; detail: string): gdkpixbuf.Pixbuf = + let gobj = gtk_style_render_icon(cast[ptr Style00](self.impl), cast[ptr IconSource00](source.impl), direction, state, int32(size), cast[ptr Widget00](widget.impl), cstring(detail)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_set_add_source*(self: ptr IconSet00; source: ptr IconSource00) {. + importc: "gtk_icon_set_add_source", libprag.} + +proc addSource*(self: IconSet; source: IconSource) = + gtk_icon_set_add_source(cast[ptr IconSet00](self.impl), cast[ptr IconSource00](source.impl)) + +type + Orientation* {.size: sizeof(cint), pure.} = enum + horizontal = 0 + vertical = 1 + +proc gtk_widget_compute_expand*(self: ptr Widget00; orientation: Orientation): gboolean {. + importc: "gtk_widget_compute_expand", libprag.} + +proc computeExpand*(self: Widget; orientation: Orientation): bool = + toBool(gtk_widget_compute_expand(cast[ptr Widget00](self.impl), orientation)) + +proc gtk_box_new*(orientation: Orientation; spacing: int32): ptr Box00 {. + importc: "gtk_box_new", libprag.} + +proc newBox*(orientation: Orientation; spacing: int): Box = + new(result, finalizeGObject) + result.impl = gtk_box_new(orientation, int32(spacing)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBox*[T](result: var T; orientation: Orientation; spacing: int) = + assert(result is Box) + new(result, finalizeGObject) + result.impl = gtk_box_new(orientation, int32(spacing)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DestDefaults* {.size: sizeof(cint), pure.} = enum + motion = 1 + highlight = 2 + drop = 4 + all = 7 + +type + TargetEntry00* {.pure.} = object + target*: cstring + flags*: uint32 + info*: uint32 + TargetEntry* = ref object + impl*: ptr TargetEntry00 + +proc gtk_target_entry_new*(target: cstring; flags: uint32; info: uint32): ptr TargetEntry00 {. + importc: "gtk_target_entry_new", libprag.} + +proc newTargetEntry*(target: string; flags: int; info: int): TargetEntry = + new(result) + result.impl = gtk_target_entry_new(cstring(target), uint32(flags), uint32(info)) + +proc initTargetEntry*[T](result: var T; target: string; flags: int; info: int) = + assert(result is TargetEntry) + new(result) + result.impl = gtk_target_entry_new(cstring(target), uint32(flags), uint32(info)) + +proc gtk_target_entry_copy*(self: ptr TargetEntry00): ptr TargetEntry00 {. + importc: "gtk_target_entry_copy", libprag.} + +proc copy*(self: TargetEntry): TargetEntry = + new(result) + result.impl = gtk_target_entry_copy(cast[ptr TargetEntry00](self.impl)) + +proc gtk_target_entry_free*(self: ptr TargetEntry00) {. + importc: "gtk_target_entry_free", libprag.} + +proc free*(self: TargetEntry) = + gtk_target_entry_free(cast[ptr TargetEntry00](self.impl)) + +proc gtk_drag_dest_set*(self: ptr Widget00; flags: DestDefaults; targets: TargetEntry00Array; + nTargets: int32; actions: gdk.DragAction) {. + importc: "gtk_drag_dest_set", libprag.} + +proc dragDestSet*(self: Widget; flags: DestDefaults; targets: TargetEntry00Array; + nTargets: int; actions: gdk.DragAction) = + gtk_drag_dest_set(cast[ptr Widget00](self.impl), flags, targets, int32(nTargets), actions) + +proc gtk_drag_source_set*(self: ptr Widget00; startButtonMask: gdk.ModifierType; + targets: TargetEntry00Array; nTargets: int32; actions: gdk.DragAction) {. + importc: "gtk_drag_source_set", libprag.} + +proc dragSourceSet*(self: Widget; startButtonMask: gdk.ModifierType; targets: TargetEntry00Array; + nTargets: int; actions: gdk.DragAction) = + gtk_drag_source_set(cast[ptr Widget00](self.impl), startButtonMask, targets, int32(nTargets), actions) + +type + TargetList00* {.pure.} = object + TargetList* = ref object + impl*: ptr TargetList00 + +proc gtk_target_list_new*(targets: TargetEntry00Array; ntargets: uint32): ptr TargetList00 {. + importc: "gtk_target_list_new", libprag.} + +proc newTargetList*(targets: TargetEntry00Array; ntargets: int): TargetList = + new(result) + result.impl = gtk_target_list_new(targets, uint32(ntargets)) + +proc initTargetList*[T](result: var T; targets: TargetEntry00Array; ntargets: int) = + assert(result is TargetList) + new(result) + result.impl = gtk_target_list_new(targets, uint32(ntargets)) + +proc gtk_target_list_add*(self: ptr TargetList00; target: ptr gdk.Atom00; flags: uint32; + info: uint32) {. + importc: "gtk_target_list_add", libprag.} + +proc add*(self: TargetList; target: gdk.Atom; flags: int; info: int) = + gtk_target_list_add(cast[ptr TargetList00](self.impl), cast[ptr gdk.Atom00](target.impl), uint32(flags), uint32(info)) + +proc gtk_target_list_add_image_targets*(self: ptr TargetList00; info: uint32; writable: gboolean) {. + importc: "gtk_target_list_add_image_targets", libprag.} + +proc addImageTargets*(self: TargetList; info: int; writable: bool) = + gtk_target_list_add_image_targets(cast[ptr TargetList00](self.impl), uint32(info), gboolean(writable)) + +proc gtk_target_list_add_table*(self: ptr TargetList00; targets: TargetEntry00Array; + ntargets: uint32) {. + importc: "gtk_target_list_add_table", libprag.} + +proc addTable*(self: TargetList; targets: TargetEntry00Array; ntargets: int) = + gtk_target_list_add_table(cast[ptr TargetList00](self.impl), targets, uint32(ntargets)) + +proc gtk_target_list_add_text_targets*(self: ptr TargetList00; info: uint32) {. + importc: "gtk_target_list_add_text_targets", libprag.} + +proc addTextTargets*(self: TargetList; info: int) = + gtk_target_list_add_text_targets(cast[ptr TargetList00](self.impl), uint32(info)) + +proc gtk_target_list_add_uri_targets*(self: ptr TargetList00; info: uint32) {. + importc: "gtk_target_list_add_uri_targets", libprag.} + +proc addUriTargets*(self: TargetList; info: int) = + gtk_target_list_add_uri_targets(cast[ptr TargetList00](self.impl), uint32(info)) + +proc gtk_target_list_find*(self: ptr TargetList00; target: ptr gdk.Atom00; info: var uint32): gboolean {. + importc: "gtk_target_list_find", libprag.} + +proc find*(self: TargetList; target: gdk.Atom; info: var int): bool = + var info_00 = uint32(info) + result = toBool(gtk_target_list_find(cast[ptr TargetList00](self.impl), cast[ptr gdk.Atom00](target.impl), info_00)) + info = int(info_00) + +proc gtk_target_list_ref*(self: ptr TargetList00): ptr TargetList00 {. + importc: "gtk_target_list_ref", libprag.} + +proc `ref`*(self: TargetList): TargetList = + new(result) + result.impl = gtk_target_list_ref(cast[ptr TargetList00](self.impl)) + +proc gtk_target_list_remove*(self: ptr TargetList00; target: ptr gdk.Atom00) {. + importc: "gtk_target_list_remove", libprag.} + +proc remove*(self: TargetList; target: gdk.Atom) = + gtk_target_list_remove(cast[ptr TargetList00](self.impl), cast[ptr gdk.Atom00](target.impl)) + +proc gtk_target_list_unref*(self: ptr TargetList00) {. + importc: "gtk_target_list_unref", libprag.} + +proc unref*(self: TargetList) = + gtk_target_list_unref(cast[ptr TargetList00](self.impl)) + +proc gtk_drag_begin*(self: ptr Widget00; targets: ptr TargetList00; actions: gdk.DragAction; + button: int32; event: ptr gdk.Event00): ptr gdk.DragContext00 {. + importc: "gtk_drag_begin", libprag.} + +proc dragBegin*(self: Widget; targets: TargetList; actions: gdk.DragAction; + button: int; event: gdk.Event): gdk.DragContext = + let gobj = gtk_drag_begin(cast[ptr Widget00](self.impl), cast[ptr TargetList00](targets.impl), actions, int32(button), cast[ptr gdk.Event00](event.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.DragContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_drag_begin_with_coordinates*(self: ptr Widget00; targets: ptr TargetList00; actions: gdk.DragAction; + button: int32; event: ptr gdk.Event00; x: int32; y: int32): ptr gdk.DragContext00 {. + importc: "gtk_drag_begin_with_coordinates", libprag.} + +proc dragBeginWithCoordinates*(self: Widget; targets: TargetList; actions: gdk.DragAction; + button: int; event: gdk.Event; x: int; y: int): gdk.DragContext = + let gobj = gtk_drag_begin_with_coordinates(cast[ptr Widget00](self.impl), cast[ptr TargetList00](targets.impl), actions, int32(button), cast[ptr gdk.Event00](event.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.DragContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_drag_dest_find_target*(self: ptr Widget00; context: ptr gdk.DragContext00; + targetList: ptr TargetList00): ptr gdk.Atom00 {. + importc: "gtk_drag_dest_find_target", libprag.} + +proc dragDestFindTarget*(self: Widget; context: gdk.DragContext; targetList: TargetList): gdk.Atom = + new(result) + result.impl = gtk_drag_dest_find_target(cast[ptr Widget00](self.impl), cast[ptr gdk.DragContext00](context.impl), cast[ptr TargetList00](targetList.impl)) + +proc gtk_drag_dest_get_target_list*(self: ptr Widget00): ptr TargetList00 {. + importc: "gtk_drag_dest_get_target_list", libprag.} + +proc dragDestGetTargetList*(self: Widget): TargetList = + new(result) + result.impl = gtk_drag_dest_get_target_list(cast[ptr Widget00](self.impl)) + +proc gtk_drag_dest_set_target_list*(self: ptr Widget00; targetList: ptr TargetList00) {. + importc: "gtk_drag_dest_set_target_list", libprag.} + +proc dragDestSetTargetList*(self: Widget; targetList: TargetList) = + gtk_drag_dest_set_target_list(cast[ptr Widget00](self.impl), cast[ptr TargetList00](targetList.impl)) + +proc gtk_drag_source_get_target_list*(self: ptr Widget00): ptr TargetList00 {. + importc: "gtk_drag_source_get_target_list", libprag.} + +proc dragSourceGetTargetList*(self: Widget): TargetList = + new(result) + result.impl = gtk_drag_source_get_target_list(cast[ptr Widget00](self.impl)) + +proc gtk_drag_source_set_target_list*(self: ptr Widget00; targetList: ptr TargetList00) {. + importc: "gtk_drag_source_set_target_list", libprag.} + +proc dragSourceSetTargetList*(self: Widget; targetList: TargetList) = + gtk_drag_source_set_target_list(cast[ptr Widget00](self.impl), cast[ptr TargetList00](targetList.impl)) + +type + Clipboard* = ref object of gobject.Object + Clipboard00* = object of gobject.Object00 + +proc scOwnerChange*(self: Clipboard; p: proc (self: ptr gobject.Object00; event: gdk.EventOwnerChange00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "owner-change", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_clipboard_get*(selection: ptr gdk.Atom00): ptr Clipboard00 {. + importc: "gtk_clipboard_get", libprag.} + +proc get*(selection: gdk.Atom): Clipboard = + let gobj = gtk_clipboard_get(cast[ptr gdk.Atom00](selection.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Clipboard](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_clipboard_get_default*(display: ptr gdk.Display00): ptr Clipboard00 {. + importc: "gtk_clipboard_get_default", libprag.} + +proc getDefault*(display: gdk.Display): Clipboard = + let gobj = gtk_clipboard_get_default(cast[ptr gdk.Display00](display.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Clipboard](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(display: gdk.Display): Clipboard = + let gobj = gtk_clipboard_get_default(cast[ptr gdk.Display00](display.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Clipboard](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_clipboard_get_for_display*(display: ptr gdk.Display00; selection: ptr gdk.Atom00): ptr Clipboard00 {. + importc: "gtk_clipboard_get_for_display", libprag.} + +proc getForDisplay*(display: gdk.Display; selection: gdk.Atom): Clipboard = + let gobj = gtk_clipboard_get_for_display(cast[ptr gdk.Display00](display.impl), cast[ptr gdk.Atom00](selection.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Clipboard](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc forDisplay*(display: gdk.Display; selection: gdk.Atom): Clipboard = + let gobj = gtk_clipboard_get_for_display(cast[ptr gdk.Display00](display.impl), cast[ptr gdk.Atom00](selection.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Clipboard](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_clipboard_clear*(self: ptr Clipboard00) {. + importc: "gtk_clipboard_clear", libprag.} + +proc clear*(self: Clipboard) = + gtk_clipboard_clear(cast[ptr Clipboard00](self.impl)) + +proc gtk_clipboard_get_display*(self: ptr Clipboard00): ptr gdk.Display00 {. + importc: "gtk_clipboard_get_display", libprag.} + +proc getDisplay*(self: Clipboard): gdk.Display = + let gobj = gtk_clipboard_get_display(cast[ptr Clipboard00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc display*(self: Clipboard): gdk.Display = + let gobj = gtk_clipboard_get_display(cast[ptr Clipboard00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Display](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_clipboard_get_owner*(self: ptr Clipboard00): ptr gobject.Object00 {. + importc: "gtk_clipboard_get_owner", libprag.} + +proc getOwner*(self: Clipboard): gobject.Object = + let gobj = gtk_clipboard_get_owner(cast[ptr Clipboard00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc owner*(self: Clipboard): gobject.Object = + let gobj = gtk_clipboard_get_owner(cast[ptr Clipboard00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_clipboard_set_can_store*(self: ptr Clipboard00; targets: TargetEntry00Array; + nTargets: int32) {. + importc: "gtk_clipboard_set_can_store", libprag.} + +proc setCanStore*(self: Clipboard; targets: TargetEntry00Array; nTargets: int) = + gtk_clipboard_set_can_store(cast[ptr Clipboard00](self.impl), targets, int32(nTargets)) + +proc gtk_clipboard_set_image*(self: ptr Clipboard00; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_clipboard_set_image", libprag.} + +proc setImage*(self: Clipboard; pixbuf: gdkpixbuf.Pixbuf) = + gtk_clipboard_set_image(cast[ptr Clipboard00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc `image=`*(self: Clipboard; pixbuf: gdkpixbuf.Pixbuf) = + gtk_clipboard_set_image(cast[ptr Clipboard00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_clipboard_set_text*(self: ptr Clipboard00; text: cstring; len: int32) {. + importc: "gtk_clipboard_set_text", libprag.} + +proc setText*(self: Clipboard; text: string; len: int) = + gtk_clipboard_set_text(cast[ptr Clipboard00](self.impl), cstring(text), int32(len)) + +proc gtk_clipboard_store*(self: ptr Clipboard00) {. + importc: "gtk_clipboard_store", libprag.} + +proc store*(self: Clipboard) = + gtk_clipboard_store(cast[ptr Clipboard00](self.impl)) + +proc gtk_clipboard_wait_for_contents*(self: ptr Clipboard00; target: ptr gdk.Atom00): ptr SelectionData00 {. + importc: "gtk_clipboard_wait_for_contents", libprag.} + +proc waitForContents*(self: Clipboard; target: gdk.Atom): SelectionData = + new(result) + result.impl = gtk_clipboard_wait_for_contents(cast[ptr Clipboard00](self.impl), cast[ptr gdk.Atom00](target.impl)) + +proc gtk_clipboard_wait_for_image*(self: ptr Clipboard00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_clipboard_wait_for_image", libprag.} + +proc waitForImage*(self: Clipboard): gdkpixbuf.Pixbuf = + let gobj = gtk_clipboard_wait_for_image(cast[ptr Clipboard00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_clipboard_wait_for_targets*(self: ptr Clipboard00; targets: var ptr gdk.Atom00Array; + nTargets: var int32): gboolean {. + importc: "gtk_clipboard_wait_for_targets", libprag.} + +proc waitForTargets*(self: Clipboard; targets: var ptr gdk.Atom00Array; + nTargets: var int): bool = + var nTargets_00 = int32(nTargets) + result = toBool(gtk_clipboard_wait_for_targets(cast[ptr Clipboard00](self.impl), targets, nTargets_00)) + nTargets = int(nTargets_00) + +proc gtk_clipboard_wait_for_text*(self: ptr Clipboard00): cstring {. + importc: "gtk_clipboard_wait_for_text", libprag.} + +proc waitForText*(self: Clipboard): string = + let resul0 = gtk_clipboard_wait_for_text(cast[ptr Clipboard00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_clipboard_wait_for_uris*(self: ptr Clipboard00): cstringArray {. + importc: "gtk_clipboard_wait_for_uris", libprag.} + +proc waitForUris*(self: Clipboard): cstringArray = + gtk_clipboard_wait_for_uris(cast[ptr Clipboard00](self.impl)) + +proc gtk_clipboard_wait_is_image_available*(self: ptr Clipboard00): gboolean {. + importc: "gtk_clipboard_wait_is_image_available", libprag.} + +proc waitIsImageAvailable*(self: Clipboard): bool = + toBool(gtk_clipboard_wait_is_image_available(cast[ptr Clipboard00](self.impl))) + +proc gtk_clipboard_wait_is_target_available*(self: ptr Clipboard00; target: ptr gdk.Atom00): gboolean {. + importc: "gtk_clipboard_wait_is_target_available", libprag.} + +proc waitIsTargetAvailable*(self: Clipboard; target: gdk.Atom): bool = + toBool(gtk_clipboard_wait_is_target_available(cast[ptr Clipboard00](self.impl), cast[ptr gdk.Atom00](target.impl))) + +proc gtk_clipboard_wait_is_text_available*(self: ptr Clipboard00): gboolean {. + importc: "gtk_clipboard_wait_is_text_available", libprag.} + +proc waitIsTextAvailable*(self: Clipboard): bool = + toBool(gtk_clipboard_wait_is_text_available(cast[ptr Clipboard00](self.impl))) + +proc gtk_clipboard_wait_is_uris_available*(self: ptr Clipboard00): gboolean {. + importc: "gtk_clipboard_wait_is_uris_available", libprag.} + +proc waitIsUrisAvailable*(self: Clipboard): bool = + toBool(gtk_clipboard_wait_is_uris_available(cast[ptr Clipboard00](self.impl))) + +proc gtk_widget_get_clipboard*(self: ptr Widget00; selection: ptr gdk.Atom00): ptr Clipboard00 {. + importc: "gtk_widget_get_clipboard", libprag.} + +proc getClipboard*(self: Widget; selection: gdk.Atom): Clipboard = + let gobj = gtk_widget_get_clipboard(cast[ptr Widget00](self.impl), cast[ptr gdk.Atom00](selection.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Clipboard](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc clipboard*(self: Widget; selection: gdk.Atom): Clipboard = + let gobj = gtk_widget_get_clipboard(cast[ptr Widget00](self.impl), cast[ptr gdk.Atom00](selection.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Clipboard](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + WidgetPath00* {.pure.} = object + WidgetPath* = ref object + impl*: ptr WidgetPath00 + +proc gtk_widget_path_new*(): ptr WidgetPath00 {. + importc: "gtk_widget_path_new", libprag.} + +proc newWidgetPath*(): WidgetPath = + new(result) + result.impl = gtk_widget_path_new() + +proc initWidgetPath*[T](result: var T) = + assert(result is WidgetPath) + new(result) + result.impl = gtk_widget_path_new() + +proc gtk_widget_path_append_for_widget*(self: ptr WidgetPath00; widget: ptr Widget00): int32 {. + importc: "gtk_widget_path_append_for_widget", libprag.} + +proc appendForWidget*(self: WidgetPath; widget: Widget): int = + int(gtk_widget_path_append_for_widget(cast[ptr WidgetPath00](self.impl), cast[ptr Widget00](widget.impl))) + +proc gtk_widget_path_append_type*(self: ptr WidgetPath00; `type`: GType): int32 {. + importc: "gtk_widget_path_append_type", libprag.} + +proc appendType*(self: WidgetPath; `type`: GType): int = + int(gtk_widget_path_append_type(cast[ptr WidgetPath00](self.impl), `type`)) + +proc gtk_widget_path_append_with_siblings*(self: ptr WidgetPath00; siblings: ptr WidgetPath00; + siblingIndex: uint32): int32 {. + importc: "gtk_widget_path_append_with_siblings", libprag.} + +proc appendWithSiblings*(self: WidgetPath; siblings: WidgetPath; siblingIndex: int): int = + int(gtk_widget_path_append_with_siblings(cast[ptr WidgetPath00](self.impl), cast[ptr WidgetPath00](siblings.impl), uint32(siblingIndex))) + +proc gtk_widget_path_copy*(self: ptr WidgetPath00): ptr WidgetPath00 {. + importc: "gtk_widget_path_copy", libprag.} + +proc copy*(self: WidgetPath): WidgetPath = + new(result) + result.impl = gtk_widget_path_copy(cast[ptr WidgetPath00](self.impl)) + +proc gtk_widget_path_free*(self: ptr WidgetPath00) {. + importc: "gtk_widget_path_free", libprag.} + +proc free*(self: WidgetPath) = + gtk_widget_path_free(cast[ptr WidgetPath00](self.impl)) + +proc gtk_widget_path_get_object_type*(self: ptr WidgetPath00): GType {. + importc: "gtk_widget_path_get_object_type", libprag.} + +proc getObjectType*(self: WidgetPath): GType = + gtk_widget_path_get_object_type(cast[ptr WidgetPath00](self.impl)) + +proc objectType*(self: WidgetPath): GType = + gtk_widget_path_get_object_type(cast[ptr WidgetPath00](self.impl)) + +proc gtk_widget_path_has_parent*(self: ptr WidgetPath00; `type`: GType): gboolean {. + importc: "gtk_widget_path_has_parent", libprag.} + +proc hasParent*(self: WidgetPath; `type`: GType): bool = + toBool(gtk_widget_path_has_parent(cast[ptr WidgetPath00](self.impl), `type`)) + +proc gtk_widget_path_is_type*(self: ptr WidgetPath00; `type`: GType): gboolean {. + importc: "gtk_widget_path_is_type", libprag.} + +proc isType*(self: WidgetPath; `type`: GType): bool = + toBool(gtk_widget_path_is_type(cast[ptr WidgetPath00](self.impl), `type`)) + +proc gtk_widget_path_iter_add_class*(self: ptr WidgetPath00; pos: int32; name: cstring) {. + importc: "gtk_widget_path_iter_add_class", libprag.} + +proc iterAddClass*(self: WidgetPath; pos: int; name: string) = + gtk_widget_path_iter_add_class(cast[ptr WidgetPath00](self.impl), int32(pos), cstring(name)) + +proc gtk_widget_path_iter_clear_classes*(self: ptr WidgetPath00; pos: int32) {. + importc: "gtk_widget_path_iter_clear_classes", libprag.} + +proc iterClearClasses*(self: WidgetPath; pos: int) = + gtk_widget_path_iter_clear_classes(cast[ptr WidgetPath00](self.impl), int32(pos)) + +proc gtk_widget_path_iter_clear_regions*(self: ptr WidgetPath00; pos: int32) {. + importc: "gtk_widget_path_iter_clear_regions", libprag.} + +proc iterClearRegions*(self: WidgetPath; pos: int) = + gtk_widget_path_iter_clear_regions(cast[ptr WidgetPath00](self.impl), int32(pos)) + +proc gtk_widget_path_iter_get_name*(self: ptr WidgetPath00; pos: int32): cstring {. + importc: "gtk_widget_path_iter_get_name", libprag.} + +proc iterGetName*(self: WidgetPath; pos: int): string = + let resul0 = gtk_widget_path_iter_get_name(cast[ptr WidgetPath00](self.impl), int32(pos)) + result = $resul0 + +proc gtk_widget_path_iter_get_object_name*(self: ptr WidgetPath00; pos: int32): cstring {. + importc: "gtk_widget_path_iter_get_object_name", libprag.} + +proc iterGetObjectName*(self: WidgetPath; pos: int): string = + let resul0 = gtk_widget_path_iter_get_object_name(cast[ptr WidgetPath00](self.impl), int32(pos)) + result = $resul0 + +proc gtk_widget_path_iter_get_object_type*(self: ptr WidgetPath00; pos: int32): GType {. + importc: "gtk_widget_path_iter_get_object_type", libprag.} + +proc iterGetObjectType*(self: WidgetPath; pos: int): GType = + gtk_widget_path_iter_get_object_type(cast[ptr WidgetPath00](self.impl), int32(pos)) + +proc gtk_widget_path_iter_get_sibling_index*(self: ptr WidgetPath00; pos: int32): uint32 {. + importc: "gtk_widget_path_iter_get_sibling_index", libprag.} + +proc iterGetSiblingIndex*(self: WidgetPath; pos: int): int = + int(gtk_widget_path_iter_get_sibling_index(cast[ptr WidgetPath00](self.impl), int32(pos))) + +proc gtk_widget_path_iter_get_siblings*(self: ptr WidgetPath00; pos: int32): ptr WidgetPath00 {. + importc: "gtk_widget_path_iter_get_siblings", libprag.} + +proc iterGetSiblings*(self: WidgetPath; pos: int): WidgetPath = + new(result) + result.impl = gtk_widget_path_iter_get_siblings(cast[ptr WidgetPath00](self.impl), int32(pos)) + +proc gtk_widget_path_iter_get_state*(self: ptr WidgetPath00; pos: int32): StateFlags {. + importc: "gtk_widget_path_iter_get_state", libprag.} + +proc iterGetState*(self: WidgetPath; pos: int): StateFlags = + gtk_widget_path_iter_get_state(cast[ptr WidgetPath00](self.impl), int32(pos)) + +proc gtk_widget_path_iter_has_class*(self: ptr WidgetPath00; pos: int32; name: cstring): gboolean {. + importc: "gtk_widget_path_iter_has_class", libprag.} + +proc iterHasClass*(self: WidgetPath; pos: int; name: string): bool = + toBool(gtk_widget_path_iter_has_class(cast[ptr WidgetPath00](self.impl), int32(pos), cstring(name))) + +proc gtk_widget_path_iter_has_name*(self: ptr WidgetPath00; pos: int32; name: cstring): gboolean {. + importc: "gtk_widget_path_iter_has_name", libprag.} + +proc iterHasName*(self: WidgetPath; pos: int; name: string): bool = + toBool(gtk_widget_path_iter_has_name(cast[ptr WidgetPath00](self.impl), int32(pos), cstring(name))) + +proc gtk_widget_path_iter_has_qclass*(self: ptr WidgetPath00; pos: int32; qname: uint32): gboolean {. + importc: "gtk_widget_path_iter_has_qclass", libprag.} + +proc iterHasQclass*(self: WidgetPath; pos: int; qname: int): bool = + toBool(gtk_widget_path_iter_has_qclass(cast[ptr WidgetPath00](self.impl), int32(pos), uint32(qname))) + +proc gtk_widget_path_iter_has_qname*(self: ptr WidgetPath00; pos: int32; qname: uint32): gboolean {. + importc: "gtk_widget_path_iter_has_qname", libprag.} + +proc iterHasQname*(self: WidgetPath; pos: int; qname: int): bool = + toBool(gtk_widget_path_iter_has_qname(cast[ptr WidgetPath00](self.impl), int32(pos), uint32(qname))) + +proc gtk_widget_path_iter_list_classes*(self: ptr WidgetPath00; pos: int32): ptr pointer {. + importc: "gtk_widget_path_iter_list_classes", libprag.} + +proc iterListClasses*(self: WidgetPath; pos: int): ptr pointer = + gtk_widget_path_iter_list_classes(cast[ptr WidgetPath00](self.impl), int32(pos)) + +proc gtk_widget_path_iter_list_regions*(self: ptr WidgetPath00; pos: int32): ptr pointer {. + importc: "gtk_widget_path_iter_list_regions", libprag.} + +proc iterListRegions*(self: WidgetPath; pos: int): ptr pointer = + gtk_widget_path_iter_list_regions(cast[ptr WidgetPath00](self.impl), int32(pos)) + +proc gtk_widget_path_iter_remove_class*(self: ptr WidgetPath00; pos: int32; name: cstring) {. + importc: "gtk_widget_path_iter_remove_class", libprag.} + +proc iterRemoveClass*(self: WidgetPath; pos: int; name: string) = + gtk_widget_path_iter_remove_class(cast[ptr WidgetPath00](self.impl), int32(pos), cstring(name)) + +proc gtk_widget_path_iter_remove_region*(self: ptr WidgetPath00; pos: int32; name: cstring) {. + importc: "gtk_widget_path_iter_remove_region", libprag.} + +proc iterRemoveRegion*(self: WidgetPath; pos: int; name: string) = + gtk_widget_path_iter_remove_region(cast[ptr WidgetPath00](self.impl), int32(pos), cstring(name)) + +proc gtk_widget_path_iter_set_name*(self: ptr WidgetPath00; pos: int32; name: cstring) {. + importc: "gtk_widget_path_iter_set_name", libprag.} + +proc iterSetName*(self: WidgetPath; pos: int; name: string) = + gtk_widget_path_iter_set_name(cast[ptr WidgetPath00](self.impl), int32(pos), cstring(name)) + +proc gtk_widget_path_iter_set_object_name*(self: ptr WidgetPath00; pos: int32; name: cstring) {. + importc: "gtk_widget_path_iter_set_object_name", libprag.} + +proc iterSetObjectName*(self: WidgetPath; pos: int; name: string) = + gtk_widget_path_iter_set_object_name(cast[ptr WidgetPath00](self.impl), int32(pos), cstring(name)) + +proc gtk_widget_path_iter_set_object_type*(self: ptr WidgetPath00; pos: int32; `type`: GType) {. + importc: "gtk_widget_path_iter_set_object_type", libprag.} + +proc iterSetObjectType*(self: WidgetPath; pos: int; `type`: GType) = + gtk_widget_path_iter_set_object_type(cast[ptr WidgetPath00](self.impl), int32(pos), `type`) + +proc gtk_widget_path_iter_set_state*(self: ptr WidgetPath00; pos: int32; state: StateFlags) {. + importc: "gtk_widget_path_iter_set_state", libprag.} + +proc iterSetState*(self: WidgetPath; pos: int; state: StateFlags) = + gtk_widget_path_iter_set_state(cast[ptr WidgetPath00](self.impl), int32(pos), state) + +proc gtk_widget_path_length*(self: ptr WidgetPath00): int32 {. + importc: "gtk_widget_path_length", libprag.} + +proc length*(self: WidgetPath): int = + int(gtk_widget_path_length(cast[ptr WidgetPath00](self.impl))) + +proc gtk_widget_path_prepend_type*(self: ptr WidgetPath00; `type`: GType) {. + importc: "gtk_widget_path_prepend_type", libprag.} + +proc prependType*(self: WidgetPath; `type`: GType) = + gtk_widget_path_prepend_type(cast[ptr WidgetPath00](self.impl), `type`) + +proc gtk_widget_path_ref*(self: ptr WidgetPath00): ptr WidgetPath00 {. + importc: "gtk_widget_path_ref", libprag.} + +proc `ref`*(self: WidgetPath): WidgetPath = + new(result) + result.impl = gtk_widget_path_ref(cast[ptr WidgetPath00](self.impl)) + +proc gtk_widget_path_to_string*(self: ptr WidgetPath00): cstring {. + importc: "gtk_widget_path_to_string", libprag.} + +proc toString*(self: WidgetPath): string = + let resul0 = gtk_widget_path_to_string(cast[ptr WidgetPath00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_widget_path_unref*(self: ptr WidgetPath00) {. + importc: "gtk_widget_path_unref", libprag.} + +proc unref*(self: WidgetPath) = + gtk_widget_path_unref(cast[ptr WidgetPath00](self.impl)) + +proc gtk_widget_get_path*(self: ptr Widget00): ptr WidgetPath00 {. + importc: "gtk_widget_get_path", libprag.} + +proc getPath*(self: Widget): WidgetPath = + new(result) + result.impl = gtk_widget_get_path(cast[ptr Widget00](self.impl)) + +proc path*(self: Widget): WidgetPath = + new(result) + result.impl = gtk_widget_get_path(cast[ptr Widget00](self.impl)) + +proc gtk_container_get_path_for_child*(self: ptr Container00; child: ptr Widget00): ptr WidgetPath00 {. + importc: "gtk_container_get_path_for_child", libprag.} + +proc getPathForChild*(self: Container; child: Widget): WidgetPath = + new(result) + result.impl = gtk_container_get_path_for_child(cast[ptr Container00](self.impl), cast[ptr Widget00](child.impl)) + +proc pathForChild*(self: Container; child: Widget): WidgetPath = + new(result) + result.impl = gtk_container_get_path_for_child(cast[ptr Container00](self.impl), cast[ptr Widget00](child.impl)) + +type + RegionFlag* {.size: sizeof(cint), pure.} = enum + even = 1 + odd = 2 + first = 3 + last = 4 + only = 5 + sorted = 6 + + RegionFlags* {.size: sizeof(cint).} = set[RegionFlag] + +proc gtk_widget_path_iter_add_region*(self: ptr WidgetPath00; pos: int32; name: cstring; + flags: RegionFlags) {. + importc: "gtk_widget_path_iter_add_region", libprag.} + +proc iterAddRegion*(self: WidgetPath; pos: int; name: string; flags: RegionFlags) = + gtk_widget_path_iter_add_region(cast[ptr WidgetPath00](self.impl), int32(pos), cstring(name), flags) + +proc gtk_widget_path_iter_has_qregion*(self: ptr WidgetPath00; pos: int32; qname: uint32; + flags: var RegionFlags): gboolean {. + importc: "gtk_widget_path_iter_has_qregion", libprag.} + +proc iterHasQregion*(self: WidgetPath; pos: int; qname: int; flags: var RegionFlags): bool = + toBool(gtk_widget_path_iter_has_qregion(cast[ptr WidgetPath00](self.impl), int32(pos), uint32(qname), flags)) + +proc gtk_widget_path_iter_has_region*(self: ptr WidgetPath00; pos: int32; name: cstring; + flags: var RegionFlags): gboolean {. + importc: "gtk_widget_path_iter_has_region", libprag.} + +proc iterHasRegion*(self: WidgetPath; pos: int; name: string; flags: var RegionFlags): bool = + toBool(gtk_widget_path_iter_has_region(cast[ptr WidgetPath00](self.impl), int32(pos), cstring(name), flags)) + +type + SizeRequestMode* {.size: sizeof(cint), pure.} = enum + heightForWidth = 0 + widthForHeight = 1 + constantSize = 2 + +proc gtk_widget_get_request_mode*(self: ptr Widget00): SizeRequestMode {. + importc: "gtk_widget_get_request_mode", libprag.} + +proc getRequestMode*(self: Widget): SizeRequestMode = + gtk_widget_get_request_mode(cast[ptr Widget00](self.impl)) + +proc requestMode*(self: Widget): SizeRequestMode = + gtk_widget_get_request_mode(cast[ptr Widget00](self.impl)) + +type + SettingsPrivate00* {.pure.} = object + SettingsPrivate* = ref object + impl*: ptr SettingsPrivate00 + +type + Settings* = ref object of gobject.Object + Settings00* = object of gobject.Object00 + priv1: ptr SettingsPrivate00 + +proc gtk_settings_get_default*(): ptr Settings00 {. + importc: "gtk_settings_get_default", libprag.} + +proc getDefault*(): Settings = + let gobj = gtk_settings_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Settings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): Settings = + let gobj = gtk_settings_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Settings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_settings_get_for_screen*(screen: ptr gdk.Screen00): ptr Settings00 {. + importc: "gtk_settings_get_for_screen", libprag.} + +proc getForScreen*(screen: gdk.Screen): Settings = + let gobj = gtk_settings_get_for_screen(cast[ptr gdk.Screen00](screen.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Settings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc forScreen*(screen: gdk.Screen): Settings = + let gobj = gtk_settings_get_for_screen(cast[ptr gdk.Screen00](screen.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Settings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_settings_install_property*(pspec: ptr gobject.ParamSpec00) {. + importc: "gtk_settings_install_property", libprag.} + +proc installProperty*(pspec: gobject.ParamSpec) = + gtk_settings_install_property(cast[ptr gobject.ParamSpec00](pspec.impl)) + +proc gtk_settings_reset_property*(self: ptr Settings00; name: cstring) {. + importc: "gtk_settings_reset_property", libprag.} + +proc resetProperty*(self: Settings; name: string) = + gtk_settings_reset_property(cast[ptr Settings00](self.impl), cstring(name)) + +proc gtk_settings_set_double_property*(self: ptr Settings00; name: cstring; vDouble: cdouble; + origin: cstring) {. + importc: "gtk_settings_set_double_property", libprag.} + +proc setDoubleProperty*(self: Settings; name: string; vDouble: cdouble; origin: string) = + gtk_settings_set_double_property(cast[ptr Settings00](self.impl), cstring(name), vDouble, cstring(origin)) + +proc gtk_settings_set_long_property*(self: ptr Settings00; name: cstring; vLong: int64; + origin: cstring) {. + importc: "gtk_settings_set_long_property", libprag.} + +proc setLongProperty*(self: Settings; name: string; vLong: int64; origin: string) = + gtk_settings_set_long_property(cast[ptr Settings00](self.impl), cstring(name), vLong, cstring(origin)) + +proc gtk_settings_set_string_property*(self: ptr Settings00; name: cstring; vString: cstring; + origin: cstring) {. + importc: "gtk_settings_set_string_property", libprag.} + +proc setStringProperty*(self: Settings; name: string; vString: string; origin: string) = + gtk_settings_set_string_property(cast[ptr Settings00](self.impl), cstring(name), cstring(vString), cstring(origin)) + +proc gtk_widget_get_settings*(self: ptr Widget00): ptr Settings00 {. + importc: "gtk_widget_get_settings", libprag.} + +proc getSettings*(self: Widget): Settings = + let gobj = gtk_widget_get_settings(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Settings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc `tings=`*(self: Widget): Settings = + let gobj = gtk_widget_get_settings(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Settings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SettingsValue00* {.pure.} = object + origin*: cstring + value*: gobject.Value00 + SettingsValue* = ref object + impl*: ptr SettingsValue00 + +proc gtk_settings_set_property_value*(self: ptr Settings00; name: cstring; svalue: ptr SettingsValue00) {. + importc: "gtk_settings_set_property_value", libprag.} + +proc setPropertyValue*(self: Settings; name: string; svalue: SettingsValue) = + gtk_settings_set_property_value(cast[ptr Settings00](self.impl), cstring(name), cast[ptr SettingsValue00](svalue.impl)) + +type + StyleContextPrivate00* {.pure.} = object + StyleContextPrivate* = ref object + impl*: ptr StyleContextPrivate00 + +type + StyleContext* = ref object of gobject.Object + StyleContext00* = object of gobject.Object00 + priv1: ptr StyleContextPrivate00 + +proc scChanged*(self: StyleContext; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_style_context_new*(): ptr StyleContext00 {. + importc: "gtk_style_context_new", libprag.} + +proc newStyleContext*(): StyleContext = + new(result, finalizeGObject) + result.impl = gtk_style_context_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStyleContext*[T](result: var T) = + assert(result is StyleContext) + new(result, finalizeGObject) + result.impl = gtk_style_context_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_style_context_reset_widgets*(screen: ptr gdk.Screen00) {. + importc: "gtk_style_context_reset_widgets", libprag.} + +proc resetWidgets*(screen: gdk.Screen) = + gtk_style_context_reset_widgets(cast[ptr gdk.Screen00](screen.impl)) + +proc gtk_style_context_add_class*(self: ptr StyleContext00; className: cstring) {. + importc: "gtk_style_context_add_class", libprag.} + +proc addClass*(self: StyleContext; className: string) = + gtk_style_context_add_class(cast[ptr StyleContext00](self.impl), cstring(className)) + +proc gtk_style_context_add_region*(self: ptr StyleContext00; regionName: cstring; flags: RegionFlags) {. + importc: "gtk_style_context_add_region", libprag.} + +proc addRegion*(self: StyleContext; regionName: string; flags: RegionFlags) = + gtk_style_context_add_region(cast[ptr StyleContext00](self.impl), cstring(regionName), flags) + +proc gtk_style_context_cancel_animations*(self: ptr StyleContext00; regionId: pointer) {. + importc: "gtk_style_context_cancel_animations", libprag.} + +proc cancelAnimations*(self: StyleContext; regionId: pointer) = + gtk_style_context_cancel_animations(cast[ptr StyleContext00](self.impl), regionId) + +proc gtk_style_context_get_background_color*(self: ptr StyleContext00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_style_context_get_background_color", libprag.} + +proc getBackgroundColor*(self: ptr StyleContext00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_style_context_get_background_color", libprag.} + +proc backgroundColor*(self: ptr StyleContext00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_style_context_get_background_color", libprag.} + +proc gtk_style_context_get_border_color*(self: ptr StyleContext00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_style_context_get_border_color", libprag.} + +proc getBorderColor*(self: ptr StyleContext00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_style_context_get_border_color", libprag.} + +proc borderColor*(self: ptr StyleContext00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_style_context_get_border_color", libprag.} + +proc gtk_style_context_get_color*(self: ptr StyleContext00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_style_context_get_color", libprag.} + +proc getColor*(self: ptr StyleContext00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_style_context_get_color", libprag.} + +proc color*(self: ptr StyleContext00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_style_context_get_color", libprag.} + +proc gtk_style_context_get_direction*(self: ptr StyleContext00): TextDirection {. + importc: "gtk_style_context_get_direction", libprag.} + +proc getDirection*(self: StyleContext): TextDirection = + gtk_style_context_get_direction(cast[ptr StyleContext00](self.impl)) + +proc direction*(self: StyleContext): TextDirection = + gtk_style_context_get_direction(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_get_font*(self: ptr StyleContext00; state: StateFlags): ptr pango.FontDescription00 {. + importc: "gtk_style_context_get_font", libprag.} + +proc getFont*(self: StyleContext; state: StateFlags): pango.FontDescription = + new(result) + result.impl = gtk_style_context_get_font(cast[ptr StyleContext00](self.impl), state) + +proc font*(self: StyleContext; state: StateFlags): pango.FontDescription = + new(result) + result.impl = gtk_style_context_get_font(cast[ptr StyleContext00](self.impl), state) + +proc gtk_style_context_get_frame_clock*(self: ptr StyleContext00): ptr gdk.FrameClock00 {. + importc: "gtk_style_context_get_frame_clock", libprag.} + +proc getFrameClock*(self: StyleContext): gdk.FrameClock = + let gobj = gtk_style_context_get_frame_clock(cast[ptr StyleContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.FrameClock](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc frameClock*(self: StyleContext): gdk.FrameClock = + let gobj = gtk_style_context_get_frame_clock(cast[ptr StyleContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.FrameClock](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_style_context_get_parent*(self: ptr StyleContext00): ptr StyleContext00 {. + importc: "gtk_style_context_get_parent", libprag.} + +proc getParent*(self: StyleContext): StyleContext = + let gobj = gtk_style_context_get_parent(cast[ptr StyleContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StyleContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc parent*(self: StyleContext): StyleContext = + let gobj = gtk_style_context_get_parent(cast[ptr StyleContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StyleContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_style_context_get_path*(self: ptr StyleContext00): ptr WidgetPath00 {. + importc: "gtk_style_context_get_path", libprag.} + +proc getPath*(self: StyleContext): WidgetPath = + new(result) + result.impl = gtk_style_context_get_path(cast[ptr StyleContext00](self.impl)) + +proc path*(self: StyleContext): WidgetPath = + new(result) + result.impl = gtk_style_context_get_path(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_get_property*(self: ptr StyleContext00; property: cstring; state: StateFlags; + value: var gobject.Value00) {. + importc: "gtk_style_context_get_property", libprag.} + +proc getProperty*(self: ptr StyleContext00; property: cstring; state: StateFlags; + value: var gobject.Value00) {. + importc: "gtk_style_context_get_property", libprag.} + +proc property*(self: ptr StyleContext00; property: cstring; state: StateFlags; + value: var gobject.Value00) {. + importc: "gtk_style_context_get_property", libprag.} + +proc gtk_style_context_get_scale*(self: ptr StyleContext00): int32 {. + importc: "gtk_style_context_get_scale", libprag.} + +proc getScale*(self: StyleContext): int = + int(gtk_style_context_get_scale(cast[ptr StyleContext00](self.impl))) + +proc scale*(self: StyleContext): int = + int(gtk_style_context_get_scale(cast[ptr StyleContext00](self.impl))) + +proc gtk_style_context_get_screen*(self: ptr StyleContext00): ptr gdk.Screen00 {. + importc: "gtk_style_context_get_screen", libprag.} + +proc getScreen*(self: StyleContext): gdk.Screen = + let gobj = gtk_style_context_get_screen(cast[ptr StyleContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: StyleContext): gdk.Screen = + let gobj = gtk_style_context_get_screen(cast[ptr StyleContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_style_context_get_state*(self: ptr StyleContext00): StateFlags {. + importc: "gtk_style_context_get_state", libprag.} + +proc getState*(self: StyleContext): StateFlags = + gtk_style_context_get_state(cast[ptr StyleContext00](self.impl)) + +proc state*(self: StyleContext): StateFlags = + gtk_style_context_get_state(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_get_style_property*(self: ptr StyleContext00; propertyName: cstring; value: ptr gobject.Value00) {. + importc: "gtk_style_context_get_style_property", libprag.} + +proc getStyleProperty*(self: StyleContext; propertyName: string; value: gobject.Value) = + gtk_style_context_get_style_property(cast[ptr StyleContext00](self.impl), cstring(propertyName), cast[ptr gobject.Value00](value.impl)) + +proc styleProperty*(self: StyleContext; propertyName: string; value: gobject.Value) = + gtk_style_context_get_style_property(cast[ptr StyleContext00](self.impl), cstring(propertyName), cast[ptr gobject.Value00](value.impl)) + +proc gtk_style_context_has_class*(self: ptr StyleContext00; className: cstring): gboolean {. + importc: "gtk_style_context_has_class", libprag.} + +proc hasClass*(self: StyleContext; className: string): bool = + toBool(gtk_style_context_has_class(cast[ptr StyleContext00](self.impl), cstring(className))) + +proc gtk_style_context_has_region*(self: ptr StyleContext00; regionName: cstring; flagsReturn: var RegionFlags): gboolean {. + importc: "gtk_style_context_has_region", libprag.} + +proc hasRegion*(self: StyleContext; regionName: string; flagsReturn: var RegionFlags): bool = + toBool(gtk_style_context_has_region(cast[ptr StyleContext00](self.impl), cstring(regionName), flagsReturn)) + +proc gtk_style_context_invalidate*(self: ptr StyleContext00) {. + importc: "gtk_style_context_invalidate", libprag.} + +proc invalidate*(self: StyleContext) = + gtk_style_context_invalidate(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_list_classes*(self: ptr StyleContext00): ptr pointer {. + importc: "gtk_style_context_list_classes", libprag.} + +proc listClasses*(self: StyleContext): ptr pointer = + gtk_style_context_list_classes(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_list_regions*(self: ptr StyleContext00): ptr pointer {. + importc: "gtk_style_context_list_regions", libprag.} + +proc listRegions*(self: StyleContext): ptr pointer = + gtk_style_context_list_regions(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_lookup_color*(self: ptr StyleContext00; colorName: cstring; color: var gdk.RGBA00): gboolean {. + importc: "gtk_style_context_lookup_color", libprag.} + +proc lookupColor*(self: ptr StyleContext00; colorName: cstring; color: var gdk.RGBA00): gboolean {. + importc: "gtk_style_context_lookup_color", libprag.} + +proc gtk_style_context_lookup_icon_set*(self: ptr StyleContext00; stockId: cstring): ptr IconSet00 {. + importc: "gtk_style_context_lookup_icon_set", libprag.} + +proc lookupIconSet*(self: StyleContext; stockId: string): IconSet = + new(result) + result.impl = gtk_style_context_lookup_icon_set(cast[ptr StyleContext00](self.impl), cstring(stockId)) + +proc gtk_style_context_notify_state_change*(self: ptr StyleContext00; window: ptr gdk.Window00; + regionId: pointer; state: StateType; stateValue: gboolean) {. + importc: "gtk_style_context_notify_state_change", libprag.} + +proc notifyStateChange*(self: StyleContext; window: gdk.Window; regionId: pointer; + state: StateType; stateValue: bool) = + gtk_style_context_notify_state_change(cast[ptr StyleContext00](self.impl), cast[ptr gdk.Window00](window.impl), regionId, state, gboolean(stateValue)) + +proc gtk_style_context_pop_animatable_region*(self: ptr StyleContext00) {. + importc: "gtk_style_context_pop_animatable_region", libprag.} + +proc popAnimatableRegion*(self: StyleContext) = + gtk_style_context_pop_animatable_region(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_push_animatable_region*(self: ptr StyleContext00; regionId: pointer) {. + importc: "gtk_style_context_push_animatable_region", libprag.} + +proc pushAnimatableRegion*(self: StyleContext; regionId: pointer) = + gtk_style_context_push_animatable_region(cast[ptr StyleContext00](self.impl), regionId) + +proc gtk_style_context_remove_class*(self: ptr StyleContext00; className: cstring) {. + importc: "gtk_style_context_remove_class", libprag.} + +proc removeClass*(self: StyleContext; className: string) = + gtk_style_context_remove_class(cast[ptr StyleContext00](self.impl), cstring(className)) + +proc gtk_style_context_remove_region*(self: ptr StyleContext00; regionName: cstring) {. + importc: "gtk_style_context_remove_region", libprag.} + +proc removeRegion*(self: StyleContext; regionName: string) = + gtk_style_context_remove_region(cast[ptr StyleContext00](self.impl), cstring(regionName)) + +proc gtk_style_context_restore*(self: ptr StyleContext00) {. + importc: "gtk_style_context_restore", libprag.} + +proc restore*(self: StyleContext) = + gtk_style_context_restore(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_save*(self: ptr StyleContext00) {. + importc: "gtk_style_context_save", libprag.} + +proc save*(self: StyleContext) = + gtk_style_context_save(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_scroll_animations*(self: ptr StyleContext00; window: ptr gdk.Window00; + dx: int32; dy: int32) {. + importc: "gtk_style_context_scroll_animations", libprag.} + +proc scrollAnimations*(self: StyleContext; window: gdk.Window; dx: int; dy: int) = + gtk_style_context_scroll_animations(cast[ptr StyleContext00](self.impl), cast[ptr gdk.Window00](window.impl), int32(dx), int32(dy)) + +proc gtk_style_context_set_background*(self: ptr StyleContext00; window: ptr gdk.Window00) {. + importc: "gtk_style_context_set_background", libprag.} + +proc setBackground*(self: StyleContext; window: gdk.Window) = + gtk_style_context_set_background(cast[ptr StyleContext00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc `background=`*(self: StyleContext; window: gdk.Window) = + gtk_style_context_set_background(cast[ptr StyleContext00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc gtk_style_context_set_direction*(self: ptr StyleContext00; direction: TextDirection) {. + importc: "gtk_style_context_set_direction", libprag.} + +proc setDirection*(self: StyleContext; direction: TextDirection) = + gtk_style_context_set_direction(cast[ptr StyleContext00](self.impl), direction) + +proc `direction=`*(self: StyleContext; direction: TextDirection) = + gtk_style_context_set_direction(cast[ptr StyleContext00](self.impl), direction) + +proc gtk_style_context_set_frame_clock*(self: ptr StyleContext00; frameClock: ptr gdk.FrameClock00) {. + importc: "gtk_style_context_set_frame_clock", libprag.} + +proc setFrameClock*(self: StyleContext; frameClock: gdk.FrameClock) = + gtk_style_context_set_frame_clock(cast[ptr StyleContext00](self.impl), cast[ptr gdk.FrameClock00](frameClock.impl)) + +proc `frameClock=`*(self: StyleContext; frameClock: gdk.FrameClock) = + gtk_style_context_set_frame_clock(cast[ptr StyleContext00](self.impl), cast[ptr gdk.FrameClock00](frameClock.impl)) + +proc gtk_style_context_set_parent*(self: ptr StyleContext00; parent: ptr StyleContext00) {. + importc: "gtk_style_context_set_parent", libprag.} + +proc setParent*(self: StyleContext; parent: StyleContext) = + gtk_style_context_set_parent(cast[ptr StyleContext00](self.impl), cast[ptr StyleContext00](parent.impl)) + +proc `parent=`*(self: StyleContext; parent: StyleContext) = + gtk_style_context_set_parent(cast[ptr StyleContext00](self.impl), cast[ptr StyleContext00](parent.impl)) + +proc gtk_style_context_set_path*(self: ptr StyleContext00; path: ptr WidgetPath00) {. + importc: "gtk_style_context_set_path", libprag.} + +proc setPath*(self: StyleContext; path: WidgetPath) = + gtk_style_context_set_path(cast[ptr StyleContext00](self.impl), cast[ptr WidgetPath00](path.impl)) + +proc `path=`*(self: StyleContext; path: WidgetPath) = + gtk_style_context_set_path(cast[ptr StyleContext00](self.impl), cast[ptr WidgetPath00](path.impl)) + +proc gtk_style_context_set_scale*(self: ptr StyleContext00; scale: int32) {. + importc: "gtk_style_context_set_scale", libprag.} + +proc setScale*(self: StyleContext; scale: int) = + gtk_style_context_set_scale(cast[ptr StyleContext00](self.impl), int32(scale)) + +proc `scale=`*(self: StyleContext; scale: int) = + gtk_style_context_set_scale(cast[ptr StyleContext00](self.impl), int32(scale)) + +proc gtk_style_context_set_screen*(self: ptr StyleContext00; screen: ptr gdk.Screen00) {. + importc: "gtk_style_context_set_screen", libprag.} + +proc setScreen*(self: StyleContext; screen: gdk.Screen) = + gtk_style_context_set_screen(cast[ptr StyleContext00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc `screen=`*(self: StyleContext; screen: gdk.Screen) = + gtk_style_context_set_screen(cast[ptr StyleContext00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc gtk_style_context_set_state*(self: ptr StyleContext00; flags: StateFlags) {. + importc: "gtk_style_context_set_state", libprag.} + +proc setState*(self: StyleContext; flags: StateFlags) = + gtk_style_context_set_state(cast[ptr StyleContext00](self.impl), flags) + +proc `state=`*(self: StyleContext; flags: StateFlags) = + gtk_style_context_set_state(cast[ptr StyleContext00](self.impl), flags) + +proc gtk_style_context_state_is_running*(self: ptr StyleContext00; state: StateType; progress: var cdouble): gboolean {. + importc: "gtk_style_context_state_is_running", libprag.} + +proc stateIsRunning*(self: StyleContext; state: StateType; progress: var cdouble): bool = + toBool(gtk_style_context_state_is_running(cast[ptr StyleContext00](self.impl), state, progress)) + +proc gtk_widget_get_style_context*(self: ptr Widget00): ptr StyleContext00 {. + importc: "gtk_widget_get_style_context", libprag.} + +proc getStyleContext*(self: Widget): StyleContext = + let gobj = gtk_widget_get_style_context(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StyleContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc styleContext*(self: Widget): StyleContext = + let gobj = gtk_widget_get_style_context(cast[ptr Widget00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StyleContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_set_render_icon_pixbuf*(self: ptr IconSet00; context: ptr StyleContext00; + size: int32): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_set_render_icon_pixbuf", libprag.} + +proc renderIconPixbuf*(self: IconSet; context: StyleContext; size: int): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_set_render_icon_pixbuf(cast[ptr IconSet00](self.impl), cast[ptr StyleContext00](context.impl), int32(size)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_set_render_icon_surface*(self: ptr IconSet00; context: ptr StyleContext00; + size: int32; scale: int32; forWindow: ptr gdk.Window00): ptr cairo.Surface00 {. + importc: "gtk_icon_set_render_icon_surface", libprag.} + +proc renderIconSurface*(self: IconSet; context: StyleContext; size: int; scale: int; + forWindow: gdk.Window): cairo.Surface = + new(result) + result.impl = gtk_icon_set_render_icon_surface(cast[ptr IconSet00](self.impl), cast[ptr StyleContext00](context.impl), int32(size), int32(scale), cast[ptr gdk.Window00](forWindow.impl)) + +type + Border00* {.pure.} = object + left*: int16 + right*: int16 + top*: int16 + bottom*: int16 + Border* = ref object + impl*: ptr Border00 + +proc gtk_border_new*(): ptr Border00 {. + importc: "gtk_border_new", libprag.} + +proc newBorder*(): Border = + new(result) + result.impl = gtk_border_new() + +proc initBorder*[T](result: var T) = + assert(result is Border) + new(result) + result.impl = gtk_border_new() + +proc gtk_border_copy*(self: ptr Border00): ptr Border00 {. + importc: "gtk_border_copy", libprag.} + +proc copy*(self: Border): Border = + new(result) + result.impl = gtk_border_copy(cast[ptr Border00](self.impl)) + +proc gtk_border_free*(self: ptr Border00) {. + importc: "gtk_border_free", libprag.} + +proc free*(self: Border) = + gtk_border_free(cast[ptr Border00](self.impl)) + +proc gtk_style_context_get_border*(self: ptr StyleContext00; state: StateFlags; border: var Border00) {. + importc: "gtk_style_context_get_border", libprag.} + +proc getBorder*(self: ptr StyleContext00; state: StateFlags; border: var Border00) {. + importc: "gtk_style_context_get_border", libprag.} + +proc border*(self: ptr StyleContext00; state: StateFlags; border: var Border00) {. + importc: "gtk_style_context_get_border", libprag.} + +proc gtk_style_context_get_margin*(self: ptr StyleContext00; state: StateFlags; margin: var Border00) {. + importc: "gtk_style_context_get_margin", libprag.} + +proc getMargin*(self: ptr StyleContext00; state: StateFlags; margin: var Border00) {. + importc: "gtk_style_context_get_margin", libprag.} + +proc margin*(self: ptr StyleContext00; state: StateFlags; margin: var Border00) {. + importc: "gtk_style_context_get_margin", libprag.} + +proc gtk_style_context_get_padding*(self: ptr StyleContext00; state: StateFlags; padding: var Border00) {. + importc: "gtk_style_context_get_padding", libprag.} + +proc getPadding*(self: ptr StyleContext00; state: StateFlags; padding: var Border00) {. + importc: "gtk_style_context_get_padding", libprag.} + +proc padding*(self: ptr StyleContext00; state: StateFlags; padding: var Border00) {. + importc: "gtk_style_context_get_padding", libprag.} + +type + CssSection00* {.pure.} = object + CssSection* = ref object + impl*: ptr CssSection00 + +proc gtk_css_section_get_end_line*(self: ptr CssSection00): uint32 {. + importc: "gtk_css_section_get_end_line", libprag.} + +proc getEndLine*(self: CssSection): int = + int(gtk_css_section_get_end_line(cast[ptr CssSection00](self.impl))) + +proc endLine*(self: CssSection): int = + int(gtk_css_section_get_end_line(cast[ptr CssSection00](self.impl))) + +proc gtk_css_section_get_end_position*(self: ptr CssSection00): uint32 {. + importc: "gtk_css_section_get_end_position", libprag.} + +proc getEndPosition*(self: CssSection): int = + int(gtk_css_section_get_end_position(cast[ptr CssSection00](self.impl))) + +proc endPosition*(self: CssSection): int = + int(gtk_css_section_get_end_position(cast[ptr CssSection00](self.impl))) + +proc gtk_css_section_get_file*(self: ptr CssSection00): ptr gio.File00 {. + importc: "gtk_css_section_get_file", libprag.} + +proc getFile*(self: CssSection): gio.File = + new(result) + result.impl = gtk_css_section_get_file(cast[ptr CssSection00](self.impl)) + +proc file*(self: CssSection): gio.File = + new(result) + result.impl = gtk_css_section_get_file(cast[ptr CssSection00](self.impl)) + +proc gtk_css_section_get_parent*(self: ptr CssSection00): ptr CssSection00 {. + importc: "gtk_css_section_get_parent", libprag.} + +proc getParent*(self: CssSection): CssSection = + new(result) + result.impl = gtk_css_section_get_parent(cast[ptr CssSection00](self.impl)) + +proc parent*(self: CssSection): CssSection = + new(result) + result.impl = gtk_css_section_get_parent(cast[ptr CssSection00](self.impl)) + +proc gtk_css_section_get_start_line*(self: ptr CssSection00): uint32 {. + importc: "gtk_css_section_get_start_line", libprag.} + +proc getStartLine*(self: CssSection): int = + int(gtk_css_section_get_start_line(cast[ptr CssSection00](self.impl))) + +proc startLine*(self: CssSection): int = + int(gtk_css_section_get_start_line(cast[ptr CssSection00](self.impl))) + +proc gtk_css_section_get_start_position*(self: ptr CssSection00): uint32 {. + importc: "gtk_css_section_get_start_position", libprag.} + +proc getStartPosition*(self: CssSection): int = + int(gtk_css_section_get_start_position(cast[ptr CssSection00](self.impl))) + +proc startPosition*(self: CssSection): int = + int(gtk_css_section_get_start_position(cast[ptr CssSection00](self.impl))) + +proc gtk_css_section_ref*(self: ptr CssSection00): ptr CssSection00 {. + importc: "gtk_css_section_ref", libprag.} + +proc `ref`*(self: CssSection): CssSection = + new(result) + result.impl = gtk_css_section_ref(cast[ptr CssSection00](self.impl)) + +proc gtk_css_section_unref*(self: ptr CssSection00) {. + importc: "gtk_css_section_unref", libprag.} + +proc unref*(self: CssSection) = + gtk_css_section_unref(cast[ptr CssSection00](self.impl)) + +proc gtk_style_context_get_section*(self: ptr StyleContext00; property: cstring): ptr CssSection00 {. + importc: "gtk_style_context_get_section", libprag.} + +proc getSection*(self: StyleContext; property: string): CssSection = + new(result) + result.impl = gtk_style_context_get_section(cast[ptr StyleContext00](self.impl), cstring(property)) + +proc section*(self: StyleContext; property: string): CssSection = + new(result) + result.impl = gtk_style_context_get_section(cast[ptr StyleContext00](self.impl), cstring(property)) + +type + CssSectionType* {.size: sizeof(cint), pure.} = enum + document = 0 + `import` = 1 + colorDefinition = 2 + bindingSet = 3 + ruleset = 4 + selector = 5 + declaration = 6 + value = 7 + keyframes = 8 + +proc gtk_css_section_get_section_type*(self: ptr CssSection00): CssSectionType {. + importc: "gtk_css_section_get_section_type", libprag.} + +proc getSectionType*(self: CssSection): CssSectionType = + gtk_css_section_get_section_type(cast[ptr CssSection00](self.impl)) + +proc sectionType*(self: CssSection): CssSectionType = + gtk_css_section_get_section_type(cast[ptr CssSection00](self.impl)) + +type + StyleProvider00* {.pure.} = object + StyleProvider* = ref object + impl*: ptr StyleProvider00 + +proc gtk_style_provider_get_style_property*(self: ptr StyleProvider00; path: ptr WidgetPath00; + state: StateFlags; pspec: ptr gobject.ParamSpec00; value: var gobject.Value00): gboolean {. + importc: "gtk_style_provider_get_style_property", libprag.} + +proc getStyleProperty*(self: ptr StyleProvider00; path: ptr WidgetPath00; + state: StateFlags; pspec: ptr gobject.ParamSpec00; value: var gobject.Value00): gboolean {. + importc: "gtk_style_provider_get_style_property", libprag.} + +proc styleProperty*(self: ptr StyleProvider00; path: ptr WidgetPath00; + state: StateFlags; pspec: ptr gobject.ParamSpec00; value: var gobject.Value00): gboolean {. + importc: "gtk_style_provider_get_style_property", libprag.} + +proc gtk_style_context_add_provider_for_screen*(screen: ptr gdk.Screen00; provider: ptr StyleProvider00; + priority: uint32) {. + importc: "gtk_style_context_add_provider_for_screen", libprag.} + +proc addProviderForScreen*(screen: gdk.Screen; provider: StyleProvider; priority: int) = + gtk_style_context_add_provider_for_screen(cast[ptr gdk.Screen00](screen.impl), cast[ptr StyleProvider00](provider.impl), uint32(priority)) + +proc gtk_style_context_remove_provider_for_screen*(screen: ptr gdk.Screen00; provider: ptr StyleProvider00) {. + importc: "gtk_style_context_remove_provider_for_screen", libprag.} + +proc removeProviderForScreen*(screen: gdk.Screen; provider: StyleProvider) = + gtk_style_context_remove_provider_for_screen(cast[ptr gdk.Screen00](screen.impl), cast[ptr StyleProvider00](provider.impl)) + +proc gtk_style_context_add_provider*(self: ptr StyleContext00; provider: ptr StyleProvider00; + priority: uint32) {. + importc: "gtk_style_context_add_provider", libprag.} + +proc addProvider*(self: StyleContext; provider: StyleProvider; priority: int) = + gtk_style_context_add_provider(cast[ptr StyleContext00](self.impl), cast[ptr StyleProvider00](provider.impl), uint32(priority)) + +proc gtk_style_context_remove_provider*(self: ptr StyleContext00; provider: ptr StyleProvider00) {. + importc: "gtk_style_context_remove_provider", libprag.} + +proc removeProvider*(self: StyleContext; provider: StyleProvider) = + gtk_style_context_remove_provider(cast[ptr StyleContext00](self.impl), cast[ptr StyleProvider00](provider.impl)) + +type + IconFactoryPrivate00* {.pure.} = object + IconFactoryPrivate* = ref object + impl*: ptr IconFactoryPrivate00 + +type + IconFactory* = ref object of gobject.Object + IconFactory00* = object of gobject.Object00 + priv1: ptr IconFactoryPrivate00 + +proc gtk_icon_factory_new*(): ptr IconFactory00 {. + importc: "gtk_icon_factory_new", libprag.} + +proc newIconFactory*(): IconFactory = + new(result, finalizeGObject) + result.impl = gtk_icon_factory_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initIconFactory*[T](result: var T) = + assert(result is IconFactory) + new(result, finalizeGObject) + result.impl = gtk_icon_factory_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_factory_lookup_default*(stockId: cstring): ptr IconSet00 {. + importc: "gtk_icon_factory_lookup_default", libprag.} + +proc lookupDefault*(stockId: string): IconSet = + new(result) + result.impl = gtk_icon_factory_lookup_default(cstring(stockId)) + +proc gtk_icon_factory_add*(self: ptr IconFactory00; stockId: cstring; iconSet: ptr IconSet00) {. + importc: "gtk_icon_factory_add", libprag.} + +proc add*(self: IconFactory; stockId: string; iconSet: IconSet) = + gtk_icon_factory_add(cast[ptr IconFactory00](self.impl), cstring(stockId), cast[ptr IconSet00](iconSet.impl)) + +proc gtk_icon_factory_add_default*(self: ptr IconFactory00) {. + importc: "gtk_icon_factory_add_default", libprag.} + +proc addDefault*(self: IconFactory) = + gtk_icon_factory_add_default(cast[ptr IconFactory00](self.impl)) + +proc gtk_icon_factory_lookup*(self: ptr IconFactory00; stockId: cstring): ptr IconSet00 {. + importc: "gtk_icon_factory_lookup", libprag.} + +proc lookup*(self: IconFactory; stockId: string): IconSet = + new(result) + result.impl = gtk_icon_factory_lookup(cast[ptr IconFactory00](self.impl), cstring(stockId)) + +proc gtk_icon_factory_remove_default*(self: ptr IconFactory00) {. + importc: "gtk_icon_factory_remove_default", libprag.} + +proc removeDefault*(self: IconFactory) = + gtk_icon_factory_remove_default(cast[ptr IconFactory00](self.impl)) + +proc gtk_style_provider_get_icon_factory*(self: ptr StyleProvider00; path: ptr WidgetPath00): ptr IconFactory00 {. + importc: "gtk_style_provider_get_icon_factory", libprag.} + +proc getIconFactory*(self: StyleProvider; path: WidgetPath): IconFactory = + let gobj = gtk_style_provider_get_icon_factory(cast[ptr StyleProvider00](self.impl), cast[ptr WidgetPath00](path.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconFactory](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc iconFactory*(self: StyleProvider; path: WidgetPath): IconFactory = + let gobj = gtk_style_provider_get_icon_factory(cast[ptr StyleProvider00](self.impl), cast[ptr WidgetPath00](path.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconFactory](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + StylePropertiesPrivate00* {.pure.} = object + StylePropertiesPrivate* = ref object + impl*: ptr StylePropertiesPrivate00 + +type + StyleProperties* = ref object of gobject.Object + StyleProperties00* = object of gobject.Object00 + priv1: ptr StylePropertiesPrivate00 + +proc gtk_style_properties_new*(): ptr StyleProperties00 {. + importc: "gtk_style_properties_new", libprag.} + +proc newStyleProperties*(): StyleProperties = + new(result, finalizeGObject) + result.impl = gtk_style_properties_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStyleProperties*[T](result: var T) = + assert(result is StyleProperties) + new(result, finalizeGObject) + result.impl = gtk_style_properties_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_style_properties_clear*(self: ptr StyleProperties00) {. + importc: "gtk_style_properties_clear", libprag.} + +proc clear*(self: StyleProperties) = + gtk_style_properties_clear(cast[ptr StyleProperties00](self.impl)) + +proc gtk_style_properties_get_property*(self: ptr StyleProperties00; property: cstring; state: StateFlags; + value: var gobject.Value00): gboolean {. + importc: "gtk_style_properties_get_property", libprag.} + +proc getProperty*(self: ptr StyleProperties00; property: cstring; state: StateFlags; + value: var gobject.Value00): gboolean {. + importc: "gtk_style_properties_get_property", libprag.} + +proc property*(self: ptr StyleProperties00; property: cstring; state: StateFlags; + value: var gobject.Value00): gboolean {. + importc: "gtk_style_properties_get_property", libprag.} + +proc gtk_style_properties_merge*(self: ptr StyleProperties00; propsToMerge: ptr StyleProperties00; + replace: gboolean) {. + importc: "gtk_style_properties_merge", libprag.} + +proc merge*(self: StyleProperties; propsToMerge: StyleProperties; + replace: bool) = + gtk_style_properties_merge(cast[ptr StyleProperties00](self.impl), cast[ptr StyleProperties00](propsToMerge.impl), gboolean(replace)) + +proc gtk_style_properties_set_property*(self: ptr StyleProperties00; property: cstring; state: StateFlags; + value: ptr gobject.Value00) {. + importc: "gtk_style_properties_set_property", libprag.} + +proc setProperty*(self: StyleProperties; property: string; state: StateFlags; + value: gobject.Value) = + gtk_style_properties_set_property(cast[ptr StyleProperties00](self.impl), cstring(property), state, cast[ptr gobject.Value00](value.impl)) + +proc gtk_style_properties_unset_property*(self: ptr StyleProperties00; property: cstring; state: StateFlags) {. + importc: "gtk_style_properties_unset_property", libprag.} + +proc unsetProperty*(self: StyleProperties; property: string; state: StateFlags) = + gtk_style_properties_unset_property(cast[ptr StyleProperties00](self.impl), cstring(property), state) + +proc gtk_style_provider_get_style*(self: ptr StyleProvider00; path: ptr WidgetPath00): ptr StyleProperties00 {. + importc: "gtk_style_provider_get_style", libprag.} + +proc getStyle*(self: StyleProvider; path: WidgetPath): StyleProperties = + let gobj = gtk_style_provider_get_style(cast[ptr StyleProvider00](self.impl), cast[ptr WidgetPath00](path.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StyleProperties](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc style*(self: StyleProvider; path: WidgetPath): StyleProperties = + let gobj = gtk_style_provider_get_style(cast[ptr StyleProvider00](self.impl), cast[ptr WidgetPath00](path.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StyleProperties](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SymbolicColor00* {.pure.} = object + SymbolicColor* = ref object + impl*: ptr SymbolicColor00 + +proc gtk_symbolic_color_new_alpha*(color: ptr SymbolicColor00; factor: cdouble): ptr SymbolicColor00 {. + importc: "gtk_symbolic_color_new_alpha", libprag.} + +proc newSymbolicColorAlpha*(color: SymbolicColor; factor: cdouble): SymbolicColor = + new(result) + result.impl = gtk_symbolic_color_new_alpha(cast[ptr SymbolicColor00](color.impl), factor) + +proc initSymbolicColorAlpha*[T](result: var T; color: SymbolicColor; factor: cdouble) = + assert(result is SymbolicColor) + new(result) + result.impl = gtk_symbolic_color_new_alpha(cast[ptr SymbolicColor00](color.impl), factor) + +proc gtk_symbolic_color_new_literal*(color: ptr gdk.RGBA00): ptr SymbolicColor00 {. + importc: "gtk_symbolic_color_new_literal", libprag.} + +proc newSymbolicColorLiteral*(color: gdk.RGBA): SymbolicColor = + new(result) + result.impl = gtk_symbolic_color_new_literal(cast[ptr gdk.RGBA00](color.impl)) + +proc initSymbolicColorLiteral*[T](result: var T; color: gdk.RGBA) = + assert(result is SymbolicColor) + new(result) + result.impl = gtk_symbolic_color_new_literal(cast[ptr gdk.RGBA00](color.impl)) + +proc gtk_symbolic_color_new_mix*(color1: ptr SymbolicColor00; color2: ptr SymbolicColor00; + factor: cdouble): ptr SymbolicColor00 {. + importc: "gtk_symbolic_color_new_mix", libprag.} + +proc newSymbolicColorMix*(color1: SymbolicColor; color2: SymbolicColor; factor: cdouble): SymbolicColor = + new(result) + result.impl = gtk_symbolic_color_new_mix(cast[ptr SymbolicColor00](color1.impl), cast[ptr SymbolicColor00](color2.impl), factor) + +proc initSymbolicColorMix*[T](result: var T; color1: SymbolicColor; color2: SymbolicColor; factor: cdouble) = + assert(result is SymbolicColor) + new(result) + result.impl = gtk_symbolic_color_new_mix(cast[ptr SymbolicColor00](color1.impl), cast[ptr SymbolicColor00](color2.impl), factor) + +proc gtk_symbolic_color_new_name*(name: cstring): ptr SymbolicColor00 {. + importc: "gtk_symbolic_color_new_name", libprag.} + +proc newSymbolicColorName*(name: string): SymbolicColor = + new(result) + result.impl = gtk_symbolic_color_new_name(cstring(name)) + +proc initSymbolicColorName*[T](result: var T; name: string) = + assert(result is SymbolicColor) + new(result) + result.impl = gtk_symbolic_color_new_name(cstring(name)) + +proc gtk_symbolic_color_new_shade*(color: ptr SymbolicColor00; factor: cdouble): ptr SymbolicColor00 {. + importc: "gtk_symbolic_color_new_shade", libprag.} + +proc newSymbolicColorShade*(color: SymbolicColor; factor: cdouble): SymbolicColor = + new(result) + result.impl = gtk_symbolic_color_new_shade(cast[ptr SymbolicColor00](color.impl), factor) + +proc initSymbolicColorShade*[T](result: var T; color: SymbolicColor; factor: cdouble) = + assert(result is SymbolicColor) + new(result) + result.impl = gtk_symbolic_color_new_shade(cast[ptr SymbolicColor00](color.impl), factor) + +proc gtk_symbolic_color_new_win32*(themeClass: cstring; id: int32): ptr SymbolicColor00 {. + importc: "gtk_symbolic_color_new_win32", libprag.} + +proc newSymbolicColorWin32*(themeClass: string; id: int): SymbolicColor = + new(result) + result.impl = gtk_symbolic_color_new_win32(cstring(themeClass), int32(id)) + +proc initSymbolicColorWin32*[T](result: var T; themeClass: string; id: int) = + assert(result is SymbolicColor) + new(result) + result.impl = gtk_symbolic_color_new_win32(cstring(themeClass), int32(id)) + +proc gtk_symbolic_color_ref*(self: ptr SymbolicColor00): ptr SymbolicColor00 {. + importc: "gtk_symbolic_color_ref", libprag.} + +proc `ref`*(self: SymbolicColor): SymbolicColor = + new(result) + result.impl = gtk_symbolic_color_ref(cast[ptr SymbolicColor00](self.impl)) + +proc gtk_symbolic_color_resolve*(self: ptr SymbolicColor00; props: ptr StyleProperties00; + resolvedColor: var gdk.RGBA00): gboolean {. + importc: "gtk_symbolic_color_resolve", libprag.} + +proc resolve*(self: ptr SymbolicColor00; props: ptr StyleProperties00; + resolvedColor: var gdk.RGBA00): gboolean {. + importc: "gtk_symbolic_color_resolve", libprag.} + +proc gtk_symbolic_color_to_string*(self: ptr SymbolicColor00): cstring {. + importc: "gtk_symbolic_color_to_string", libprag.} + +proc toString*(self: SymbolicColor): string = + let resul0 = gtk_symbolic_color_to_string(cast[ptr SymbolicColor00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_symbolic_color_unref*(self: ptr SymbolicColor00) {. + importc: "gtk_symbolic_color_unref", libprag.} + +proc unref*(self: SymbolicColor) = + gtk_symbolic_color_unref(cast[ptr SymbolicColor00](self.impl)) + +proc gtk_style_properties_lookup_color*(self: ptr StyleProperties00; name: cstring): ptr SymbolicColor00 {. + importc: "gtk_style_properties_lookup_color", libprag.} + +proc lookupColor*(self: StyleProperties; name: string): SymbolicColor = + new(result) + result.impl = gtk_style_properties_lookup_color(cast[ptr StyleProperties00](self.impl), cstring(name)) + +proc gtk_style_properties_map_color*(self: ptr StyleProperties00; name: cstring; color: ptr SymbolicColor00) {. + importc: "gtk_style_properties_map_color", libprag.} + +proc mapColor*(self: StyleProperties; name: string; color: SymbolicColor) = + gtk_style_properties_map_color(cast[ptr StyleProperties00](self.impl), cstring(name), cast[ptr SymbolicColor00](color.impl)) + +type + JunctionSides* {.size: sizeof(cint), pure.} = enum + none = 0 + cornerTopleft = 1 + cornerTopright = 2 + top = 3 + cornerBottomleft = 4 + left = 5 + cornerBottomright = 8 + right = 10 + bottom = 12 + +proc gtk_style_context_get_junction_sides*(self: ptr StyleContext00): JunctionSides {. + importc: "gtk_style_context_get_junction_sides", libprag.} + +proc getJunctionSides*(self: StyleContext): JunctionSides = + gtk_style_context_get_junction_sides(cast[ptr StyleContext00](self.impl)) + +proc junctionSides*(self: StyleContext): JunctionSides = + gtk_style_context_get_junction_sides(cast[ptr StyleContext00](self.impl)) + +proc gtk_style_context_set_junction_sides*(self: ptr StyleContext00; sides: JunctionSides) {. + importc: "gtk_style_context_set_junction_sides", libprag.} + +proc setJunctionSides*(self: StyleContext; sides: JunctionSides) = + gtk_style_context_set_junction_sides(cast[ptr StyleContext00](self.impl), sides) + +proc `junctionSides=`*(self: StyleContext; sides: JunctionSides) = + gtk_style_context_set_junction_sides(cast[ptr StyleContext00](self.impl), sides) + +type + StyleContextPrintFlag* {.size: sizeof(cint), pure.} = enum + recurse = 1 + showStyle = 2 + + StyleContextPrintFlags* {.size: sizeof(cint).} = set[StyleContextPrintFlag] + +proc gtk_style_context_to_string*(self: ptr StyleContext00; flags: StyleContextPrintFlags): cstring {. + importc: "gtk_style_context_to_string", libprag.} + +proc toString*(self: StyleContext; flags: StyleContextPrintFlags): string = + let resul0 = gtk_style_context_to_string(cast[ptr StyleContext00](self.impl), flags) + result = $resul0 + cogfree(resul0) + +type + AccelGroupPrivate00* {.pure.} = object + AccelGroupPrivate* = ref object + impl*: ptr AccelGroupPrivate00 + +type + AccelGroup* = ref object of gobject.Object + AccelGroup00* = object of gobject.Object00 + priv1: ptr AccelGroupPrivate00 + +proc scAccelActivate*(self: AccelGroup; p: proc (self: ptr gobject.Object00; acceleratable: gobject.Object00; keyval: uint32; modifier: gdk.ModifierType; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "accel-activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scAccelChanged*(self: AccelGroup; p: proc (self: ptr gobject.Object00; keyval: uint32; modifier: gdk.ModifierType; accelClosure: gobject.Closure00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "accel-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_accel_group_new*(): ptr AccelGroup00 {. + importc: "gtk_accel_group_new", libprag.} + +proc newAccelGroup*(): AccelGroup = + new(result, finalizeGObject) + result.impl = gtk_accel_group_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAccelGroup*[T](result: var T) = + assert(result is AccelGroup) + new(result, finalizeGObject) + result.impl = gtk_accel_group_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_accel_group_from_accel_closure*(closure: ptr gobject.Closure00): ptr AccelGroup00 {. + importc: "gtk_accel_group_from_accel_closure", libprag.} + +proc fromAccelClosure*(closure: gobject.Closure): AccelGroup = + let gobj = gtk_accel_group_from_accel_closure(cast[ptr gobject.Closure00](closure.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AccelGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_accel_group_activate*(self: ptr AccelGroup00; accelQuark: uint32; acceleratable: ptr gobject.Object00; + accelKey: uint32; accelMods: gdk.ModifierType): gboolean {. + importc: "gtk_accel_group_activate", libprag.} + +proc activate*(self: AccelGroup; accelQuark: int; acceleratable: gobject.Object; + accelKey: int; accelMods: gdk.ModifierType): bool = + toBool(gtk_accel_group_activate(cast[ptr AccelGroup00](self.impl), uint32(accelQuark), cast[ptr gobject.Object00](acceleratable.impl), uint32(accelKey), accelMods)) + +proc gtk_accel_group_connect_by_path*(self: ptr AccelGroup00; accelPath: cstring; closure: ptr gobject.Closure00) {. + importc: "gtk_accel_group_connect_by_path", libprag.} + +proc connectByPath*(self: AccelGroup; accelPath: string; closure: gobject.Closure) = + gtk_accel_group_connect_by_path(cast[ptr AccelGroup00](self.impl), cstring(accelPath), cast[ptr gobject.Closure00](closure.impl)) + +proc gtk_accel_group_disconnect*(self: ptr AccelGroup00; closure: ptr gobject.Closure00): gboolean {. + importc: "gtk_accel_group_disconnect", libprag.} + +proc disconnect*(self: AccelGroup; closure: gobject.Closure): bool = + toBool(gtk_accel_group_disconnect(cast[ptr AccelGroup00](self.impl), cast[ptr gobject.Closure00](closure.impl))) + +proc gtk_accel_group_disconnect_key*(self: ptr AccelGroup00; accelKey: uint32; accelMods: gdk.ModifierType): gboolean {. + importc: "gtk_accel_group_disconnect_key", libprag.} + +proc disconnectKey*(self: AccelGroup; accelKey: int; accelMods: gdk.ModifierType): bool = + toBool(gtk_accel_group_disconnect_key(cast[ptr AccelGroup00](self.impl), uint32(accelKey), accelMods)) + +proc gtk_accel_group_get_is_locked*(self: ptr AccelGroup00): gboolean {. + importc: "gtk_accel_group_get_is_locked", libprag.} + +proc getIsLocked*(self: AccelGroup): bool = + toBool(gtk_accel_group_get_is_locked(cast[ptr AccelGroup00](self.impl))) + +proc isLocked*(self: AccelGroup): bool = + toBool(gtk_accel_group_get_is_locked(cast[ptr AccelGroup00](self.impl))) + +proc gtk_accel_group_get_modifier_mask*(self: ptr AccelGroup00): gdk.ModifierType {. + importc: "gtk_accel_group_get_modifier_mask", libprag.} + +proc getModifierMask*(self: AccelGroup): gdk.ModifierType = + gtk_accel_group_get_modifier_mask(cast[ptr AccelGroup00](self.impl)) + +proc modifierMask*(self: AccelGroup): gdk.ModifierType = + gtk_accel_group_get_modifier_mask(cast[ptr AccelGroup00](self.impl)) + +proc gtk_accel_group_lock*(self: ptr AccelGroup00) {. + importc: "gtk_accel_group_lock", libprag.} + +proc lock*(self: AccelGroup) = + gtk_accel_group_lock(cast[ptr AccelGroup00](self.impl)) + +proc gtk_accel_group_unlock*(self: ptr AccelGroup00) {. + importc: "gtk_accel_group_unlock", libprag.} + +proc unlock*(self: AccelGroup) = + gtk_accel_group_unlock(cast[ptr AccelGroup00](self.impl)) + +proc gtk_widget_remove_accelerator*(self: ptr Widget00; accelGroup: ptr AccelGroup00; + accelKey: uint32; accelMods: gdk.ModifierType): gboolean {. + importc: "gtk_widget_remove_accelerator", libprag.} + +proc removeAccelerator*(self: Widget; accelGroup: AccelGroup; accelKey: int; + accelMods: gdk.ModifierType): bool = + toBool(gtk_widget_remove_accelerator(cast[ptr Widget00](self.impl), cast[ptr AccelGroup00](accelGroup.impl), uint32(accelKey), accelMods)) + +proc gtk_widget_set_accel_path*(self: ptr Widget00; accelPath: cstring; accelGroup: ptr AccelGroup00) {. + importc: "gtk_widget_set_accel_path", libprag.} + +proc setAccelPath*(self: Widget; accelPath: string; accelGroup: AccelGroup) = + gtk_widget_set_accel_path(cast[ptr Widget00](self.impl), cstring(accelPath), cast[ptr AccelGroup00](accelGroup.impl)) + +proc gtk_window_add_accel_group*(self: ptr Window00; accelGroup: ptr AccelGroup00) {. + importc: "gtk_window_add_accel_group", libprag.} + +proc addAccelGroup*(self: Window; accelGroup: AccelGroup) = + gtk_window_add_accel_group(cast[ptr Window00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +proc gtk_window_remove_accel_group*(self: ptr Window00; accelGroup: ptr AccelGroup00) {. + importc: "gtk_window_remove_accel_group", libprag.} + +proc removeAccelGroup*(self: Window; accelGroup: AccelGroup) = + gtk_window_remove_accel_group(cast[ptr Window00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +type + AccelFlags* {.size: sizeof(cint), pure.} = enum + visible = 1 + locked = 2 + mask = 7 + +proc gtk_widget_add_accelerator*(self: ptr Widget00; accelSignal: cstring; accelGroup: ptr AccelGroup00; + accelKey: uint32; accelMods: gdk.ModifierType; accelFlags: AccelFlags) {. + importc: "gtk_widget_add_accelerator", libprag.} + +proc addAccelerator*(self: Widget; accelSignal: string; accelGroup: AccelGroup; + accelKey: int; accelMods: gdk.ModifierType; accelFlags: AccelFlags) = + gtk_widget_add_accelerator(cast[ptr Widget00](self.impl), cstring(accelSignal), cast[ptr AccelGroup00](accelGroup.impl), uint32(accelKey), accelMods, accelFlags) + +proc gtk_accel_group_connect*(self: ptr AccelGroup00; accelKey: uint32; accelMods: gdk.ModifierType; + accelFlags: AccelFlags; closure: ptr gobject.Closure00) {. + importc: "gtk_accel_group_connect", libprag.} + +proc connect*(self: AccelGroup; accelKey: int; accelMods: gdk.ModifierType; + accelFlags: AccelFlags; closure: gobject.Closure) = + gtk_accel_group_connect(cast[ptr AccelGroup00](self.impl), uint32(accelKey), accelMods, accelFlags, cast[ptr gobject.Closure00](closure.impl)) + +type + AccelKey00* {.pure.} = object + accelKey*: uint32 + accelMods*: gdk.ModifierType + accelFlags*: uint32 + AccelKey* = ref object + impl*: ptr AccelKey00 + +type + AccelGroupEntry00* {.pure.} = object + key*: AccelKey00 + closure*: ptr gobject.Closure00 + accelPathQuark*: uint32 + AccelGroupEntry* = ref object + impl*: ptr AccelGroupEntry00 + +proc gtk_accel_group_query*(self: ptr AccelGroup00; accelKey: uint32; accelMods: gdk.ModifierType; + nEntries: var uint32): AccelGroupEntry00Array {. + importc: "gtk_accel_group_query", libprag.} + +proc query*(self: AccelGroup; accelKey: int; accelMods: gdk.ModifierType; + nEntries: var int): AccelGroupEntry00Array = + var nEntries_00 = uint32(nEntries) + result = gtk_accel_group_query(cast[ptr AccelGroup00](self.impl), uint32(accelKey), accelMods, nEntries_00) + nEntries = int(nEntries_00) + +type + Align* {.size: sizeof(cint), pure.} = enum + fill = 0 + start = 1 + `end` = 2 + center = 3 + baseline = 4 + +proc gtk_widget_get_halign*(self: ptr Widget00): Align {. + importc: "gtk_widget_get_halign", libprag.} + +proc getHalign*(self: Widget): Align = + gtk_widget_get_halign(cast[ptr Widget00](self.impl)) + +proc halign*(self: Widget): Align = + gtk_widget_get_halign(cast[ptr Widget00](self.impl)) + +proc gtk_widget_get_valign*(self: ptr Widget00): Align {. + importc: "gtk_widget_get_valign", libprag.} + +proc getValign*(self: Widget): Align = + gtk_widget_get_valign(cast[ptr Widget00](self.impl)) + +proc valign*(self: Widget): Align = + gtk_widget_get_valign(cast[ptr Widget00](self.impl)) + +proc gtk_widget_get_valign_with_baseline*(self: ptr Widget00): Align {. + importc: "gtk_widget_get_valign_with_baseline", libprag.} + +proc getValignWithBaseline*(self: Widget): Align = + gtk_widget_get_valign_with_baseline(cast[ptr Widget00](self.impl)) + +proc valignWithBaseline*(self: Widget): Align = + gtk_widget_get_valign_with_baseline(cast[ptr Widget00](self.impl)) + +proc gtk_widget_set_halign*(self: ptr Widget00; align: Align) {. + importc: "gtk_widget_set_halign", libprag.} + +proc setHalign*(self: Widget; align: Align) = + gtk_widget_set_halign(cast[ptr Widget00](self.impl), align) + +proc `halign=`*(self: Widget; align: Align) = + gtk_widget_set_halign(cast[ptr Widget00](self.impl), align) + +proc gtk_widget_set_valign*(self: ptr Widget00; align: Align) {. + importc: "gtk_widget_set_valign", libprag.} + +proc setValign*(self: Widget; align: Align) = + gtk_widget_set_valign(cast[ptr Widget00](self.impl), align) + +proc `valign=`*(self: Widget; align: Align) = + gtk_widget_set_valign(cast[ptr Widget00](self.impl), align) + +type + Requisition00* {.pure.} = object + width*: int32 + height*: int32 + Requisition* = ref object + impl*: ptr Requisition00 + +proc gtk_requisition_new*(): ptr Requisition00 {. + importc: "gtk_requisition_new", libprag.} + +proc newRequisition*(): Requisition = + new(result) + result.impl = gtk_requisition_new() + +proc initRequisition*[T](result: var T) = + assert(result is Requisition) + new(result) + result.impl = gtk_requisition_new() + +proc gtk_requisition_copy*(self: ptr Requisition00): ptr Requisition00 {. + importc: "gtk_requisition_copy", libprag.} + +proc copy*(self: Requisition): Requisition = + new(result) + result.impl = gtk_requisition_copy(cast[ptr Requisition00](self.impl)) + +proc gtk_requisition_free*(self: ptr Requisition00) {. + importc: "gtk_requisition_free", libprag.} + +proc free*(self: Requisition) = + gtk_requisition_free(cast[ptr Requisition00](self.impl)) + +proc gtk_widget_get_child_requisition*(self: ptr Widget00; requisition: var Requisition00) {. + importc: "gtk_widget_get_child_requisition", libprag.} + +proc getChildRequisition*(self: ptr Widget00; requisition: var Requisition00) {. + importc: "gtk_widget_get_child_requisition", libprag.} + +proc childRequisition*(self: ptr Widget00; requisition: var Requisition00) {. + importc: "gtk_widget_get_child_requisition", libprag.} + +proc gtk_widget_get_preferred_size*(self: ptr Widget00; minimumSize: var Requisition00; + naturalSize: var Requisition00) {. + importc: "gtk_widget_get_preferred_size", libprag.} + +proc getPreferredSize*(self: ptr Widget00; minimumSize: var Requisition00; + naturalSize: var Requisition00) {. + importc: "gtk_widget_get_preferred_size", libprag.} + +proc preferredSize*(self: ptr Widget00; minimumSize: var Requisition00; + naturalSize: var Requisition00) {. + importc: "gtk_widget_get_preferred_size", libprag.} + +proc gtk_widget_get_requisition*(self: ptr Widget00; requisition: var Requisition00) {. + importc: "gtk_widget_get_requisition", libprag.} + +proc getRequisition*(self: ptr Widget00; requisition: var Requisition00) {. + importc: "gtk_widget_get_requisition", libprag.} + +proc requisition*(self: ptr Widget00; requisition: var Requisition00) {. + importc: "gtk_widget_get_requisition", libprag.} + +proc gtk_widget_size_request*(self: ptr Widget00; requisition: var Requisition00) {. + importc: "gtk_widget_size_request", libprag.} + +proc sizeRequest*(self: ptr Widget00; requisition: var Requisition00) {. + importc: "gtk_widget_size_request", libprag.} + +type + TextBufferPrivate00* {.pure.} = object + TextBufferPrivate* = ref object + impl*: ptr TextBufferPrivate00 + +type + TextTagPrivate00* {.pure.} = object + TextTagPrivate* = ref object + impl*: ptr TextTagPrivate00 + +type + TextIter00* {.pure.} = object + dummy1*: pointer + dummy2*: pointer + dummy3*: int32 + dummy4*: int32 + dummy5*: int32 + dummy6*: int32 + dummy7*: int32 + dummy8*: int32 + dummy9*: pointer + dummy10*: pointer + dummy11*: int32 + dummy12*: int32 + dummy13*: int32 + dummy14*: pointer + TextIter* = ref object + impl*: ptr TextIter00 + +proc gtk_text_iter_assign*(self: ptr TextIter00; other: ptr TextIter00) {. + importc: "gtk_text_iter_assign", libprag.} + +proc assign*(self: TextIter; other: TextIter) = + gtk_text_iter_assign(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](other.impl)) + +proc gtk_text_iter_backward_char*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_char", libprag.} + +proc backwardChar*(self: TextIter): bool = + toBool(gtk_text_iter_backward_char(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_backward_chars*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_backward_chars", libprag.} + +proc backwardChars*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_backward_chars(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_backward_cursor_position*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_cursor_position", libprag.} + +proc backwardCursorPosition*(self: TextIter): bool = + toBool(gtk_text_iter_backward_cursor_position(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_backward_cursor_positions*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_backward_cursor_positions", libprag.} + +proc backwardCursorPositions*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_backward_cursor_positions(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_backward_line*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_line", libprag.} + +proc backwardLine*(self: TextIter): bool = + toBool(gtk_text_iter_backward_line(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_backward_lines*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_backward_lines", libprag.} + +proc backwardLines*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_backward_lines(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_backward_sentence_start*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_sentence_start", libprag.} + +proc backwardSentenceStart*(self: TextIter): bool = + toBool(gtk_text_iter_backward_sentence_start(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_backward_sentence_starts*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_backward_sentence_starts", libprag.} + +proc backwardSentenceStarts*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_backward_sentence_starts(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_backward_visible_cursor_position*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_visible_cursor_position", libprag.} + +proc backwardVisibleCursorPosition*(self: TextIter): bool = + toBool(gtk_text_iter_backward_visible_cursor_position(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_backward_visible_cursor_positions*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_backward_visible_cursor_positions", libprag.} + +proc backwardVisibleCursorPositions*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_backward_visible_cursor_positions(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_backward_visible_line*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_visible_line", libprag.} + +proc backwardVisibleLine*(self: TextIter): bool = + toBool(gtk_text_iter_backward_visible_line(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_backward_visible_lines*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_backward_visible_lines", libprag.} + +proc backwardVisibleLines*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_backward_visible_lines(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_backward_visible_word_start*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_visible_word_start", libprag.} + +proc backwardVisibleWordStart*(self: TextIter): bool = + toBool(gtk_text_iter_backward_visible_word_start(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_backward_visible_word_starts*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_backward_visible_word_starts", libprag.} + +proc backwardVisibleWordStarts*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_backward_visible_word_starts(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_backward_word_start*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_word_start", libprag.} + +proc backwardWordStart*(self: TextIter): bool = + toBool(gtk_text_iter_backward_word_start(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_backward_word_starts*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_backward_word_starts", libprag.} + +proc backwardWordStarts*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_backward_word_starts(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_can_insert*(self: ptr TextIter00; defaultEditability: gboolean): gboolean {. + importc: "gtk_text_iter_can_insert", libprag.} + +proc canInsert*(self: TextIter; defaultEditability: bool): bool = + toBool(gtk_text_iter_can_insert(cast[ptr TextIter00](self.impl), gboolean(defaultEditability))) + +proc gtk_text_iter_compare*(self: ptr TextIter00; rhs: ptr TextIter00): int32 {. + importc: "gtk_text_iter_compare", libprag.} + +proc compare*(self: TextIter; rhs: TextIter): int = + int(gtk_text_iter_compare(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](rhs.impl))) + +proc gtk_text_iter_copy*(self: ptr TextIter00): ptr TextIter00 {. + importc: "gtk_text_iter_copy", libprag.} + +proc copy*(self: TextIter): TextIter = + new(result) + result.impl = gtk_text_iter_copy(cast[ptr TextIter00](self.impl)) + +proc gtk_text_iter_editable*(self: ptr TextIter00; defaultSetting: gboolean): gboolean {. + importc: "gtk_text_iter_editable", libprag.} + +proc editable*(self: TextIter; defaultSetting: bool): bool = + toBool(gtk_text_iter_editable(cast[ptr TextIter00](self.impl), gboolean(defaultSetting))) + +proc gtk_text_iter_ends_line*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_ends_line", libprag.} + +proc endsLine*(self: TextIter): bool = + toBool(gtk_text_iter_ends_line(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_ends_sentence*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_ends_sentence", libprag.} + +proc endsSentence*(self: TextIter): bool = + toBool(gtk_text_iter_ends_sentence(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_ends_word*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_ends_word", libprag.} + +proc endsWord*(self: TextIter): bool = + toBool(gtk_text_iter_ends_word(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_equal*(self: ptr TextIter00; rhs: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_equal", libprag.} + +proc equal*(self: TextIter; rhs: TextIter): bool = + toBool(gtk_text_iter_equal(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](rhs.impl))) + +proc gtk_text_iter_forward_char*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_char", libprag.} + +proc forwardChar*(self: TextIter): bool = + toBool(gtk_text_iter_forward_char(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_forward_chars*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_forward_chars", libprag.} + +proc forwardChars*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_forward_chars(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_forward_cursor_position*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_cursor_position", libprag.} + +proc forwardCursorPosition*(self: TextIter): bool = + toBool(gtk_text_iter_forward_cursor_position(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_forward_cursor_positions*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_forward_cursor_positions", libprag.} + +proc forwardCursorPositions*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_forward_cursor_positions(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_forward_line*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_line", libprag.} + +proc forwardLine*(self: TextIter): bool = + toBool(gtk_text_iter_forward_line(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_forward_lines*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_forward_lines", libprag.} + +proc forwardLines*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_forward_lines(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_forward_sentence_end*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_sentence_end", libprag.} + +proc forwardSentenceEnd*(self: TextIter): bool = + toBool(gtk_text_iter_forward_sentence_end(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_forward_sentence_ends*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_forward_sentence_ends", libprag.} + +proc forwardSentenceEnds*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_forward_sentence_ends(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_forward_to_end*(self: ptr TextIter00) {. + importc: "gtk_text_iter_forward_to_end", libprag.} + +proc forwardToEnd*(self: TextIter) = + gtk_text_iter_forward_to_end(cast[ptr TextIter00](self.impl)) + +proc gtk_text_iter_forward_to_line_end*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_to_line_end", libprag.} + +proc forwardToLineEnd*(self: TextIter): bool = + toBool(gtk_text_iter_forward_to_line_end(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_forward_visible_cursor_position*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_visible_cursor_position", libprag.} + +proc forwardVisibleCursorPosition*(self: TextIter): bool = + toBool(gtk_text_iter_forward_visible_cursor_position(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_forward_visible_cursor_positions*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_forward_visible_cursor_positions", libprag.} + +proc forwardVisibleCursorPositions*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_forward_visible_cursor_positions(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_forward_visible_line*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_visible_line", libprag.} + +proc forwardVisibleLine*(self: TextIter): bool = + toBool(gtk_text_iter_forward_visible_line(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_forward_visible_lines*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_forward_visible_lines", libprag.} + +proc forwardVisibleLines*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_forward_visible_lines(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_forward_visible_word_end*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_visible_word_end", libprag.} + +proc forwardVisibleWordEnd*(self: TextIter): bool = + toBool(gtk_text_iter_forward_visible_word_end(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_forward_visible_word_ends*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_forward_visible_word_ends", libprag.} + +proc forwardVisibleWordEnds*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_forward_visible_word_ends(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_forward_word_end*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_word_end", libprag.} + +proc forwardWordEnd*(self: TextIter): bool = + toBool(gtk_text_iter_forward_word_end(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_forward_word_ends*(self: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_iter_forward_word_ends", libprag.} + +proc forwardWordEnds*(self: TextIter; count: int): bool = + toBool(gtk_text_iter_forward_word_ends(cast[ptr TextIter00](self.impl), int32(count))) + +proc gtk_text_iter_free*(self: ptr TextIter00) {. + importc: "gtk_text_iter_free", libprag.} + +proc free*(self: TextIter) = + gtk_text_iter_free(cast[ptr TextIter00](self.impl)) + +proc gtk_text_iter_get_bytes_in_line*(self: ptr TextIter00): int32 {. + importc: "gtk_text_iter_get_bytes_in_line", libprag.} + +proc getBytesInLine*(self: TextIter): int = + int(gtk_text_iter_get_bytes_in_line(cast[ptr TextIter00](self.impl))) + +proc bytesInLine*(self: TextIter): int = + int(gtk_text_iter_get_bytes_in_line(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_get_char*(self: ptr TextIter00): gunichar {. + importc: "gtk_text_iter_get_char", libprag.} + +proc getChar*(self: TextIter): gunichar = + gtk_text_iter_get_char(cast[ptr TextIter00](self.impl)) + +proc char*(self: TextIter): gunichar = + gtk_text_iter_get_char(cast[ptr TextIter00](self.impl)) + +proc gtk_text_iter_get_chars_in_line*(self: ptr TextIter00): int32 {. + importc: "gtk_text_iter_get_chars_in_line", libprag.} + +proc getCharsInLine*(self: TextIter): int = + int(gtk_text_iter_get_chars_in_line(cast[ptr TextIter00](self.impl))) + +proc charsInLine*(self: TextIter): int = + int(gtk_text_iter_get_chars_in_line(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_get_language*(self: ptr TextIter00): ptr pango.Language00 {. + importc: "gtk_text_iter_get_language", libprag.} + +proc getLanguage*(self: TextIter): pango.Language = + new(result) + result.impl = gtk_text_iter_get_language(cast[ptr TextIter00](self.impl)) + +proc language*(self: TextIter): pango.Language = + new(result) + result.impl = gtk_text_iter_get_language(cast[ptr TextIter00](self.impl)) + +proc gtk_text_iter_get_line*(self: ptr TextIter00): int32 {. + importc: "gtk_text_iter_get_line", libprag.} + +proc getLine*(self: TextIter): int = + int(gtk_text_iter_get_line(cast[ptr TextIter00](self.impl))) + +proc line*(self: TextIter): int = + int(gtk_text_iter_get_line(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_get_line_index*(self: ptr TextIter00): int32 {. + importc: "gtk_text_iter_get_line_index", libprag.} + +proc getLineIndex*(self: TextIter): int = + int(gtk_text_iter_get_line_index(cast[ptr TextIter00](self.impl))) + +proc lineIndex*(self: TextIter): int = + int(gtk_text_iter_get_line_index(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_get_line_offset*(self: ptr TextIter00): int32 {. + importc: "gtk_text_iter_get_line_offset", libprag.} + +proc getLineOffset*(self: TextIter): int = + int(gtk_text_iter_get_line_offset(cast[ptr TextIter00](self.impl))) + +proc lineOffset*(self: TextIter): int = + int(gtk_text_iter_get_line_offset(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_get_marks*(self: ptr TextIter00): ptr pointer {. + importc: "gtk_text_iter_get_marks", libprag.} + +proc getMarks*(self: TextIter): ptr pointer = + gtk_text_iter_get_marks(cast[ptr TextIter00](self.impl)) + +proc marks*(self: TextIter): ptr pointer = + gtk_text_iter_get_marks(cast[ptr TextIter00](self.impl)) + +proc gtk_text_iter_get_offset*(self: ptr TextIter00): int32 {. + importc: "gtk_text_iter_get_offset", libprag.} + +proc getOffset*(self: TextIter): int = + int(gtk_text_iter_get_offset(cast[ptr TextIter00](self.impl))) + +proc offset*(self: TextIter): int = + int(gtk_text_iter_get_offset(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_get_pixbuf*(self: ptr TextIter00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_text_iter_get_pixbuf", libprag.} + +proc getPixbuf*(self: TextIter): gdkpixbuf.Pixbuf = + let gobj = gtk_text_iter_get_pixbuf(cast[ptr TextIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbuf*(self: TextIter): gdkpixbuf.Pixbuf = + let gobj = gtk_text_iter_get_pixbuf(cast[ptr TextIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_iter_get_slice*(self: ptr TextIter00; `end`: ptr TextIter00): cstring {. + importc: "gtk_text_iter_get_slice", libprag.} + +proc getSlice*(self: TextIter; `end`: TextIter): string = + let resul0 = gtk_text_iter_get_slice(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](`end`.impl)) + result = $resul0 + cogfree(resul0) + +proc slice*(self: TextIter; `end`: TextIter): string = + let resul0 = gtk_text_iter_get_slice(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](`end`.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_text_iter_get_tags*(self: ptr TextIter00): ptr pointer {. + importc: "gtk_text_iter_get_tags", libprag.} + +proc getTags*(self: TextIter): ptr pointer = + gtk_text_iter_get_tags(cast[ptr TextIter00](self.impl)) + +proc tags*(self: TextIter): ptr pointer = + gtk_text_iter_get_tags(cast[ptr TextIter00](self.impl)) + +proc gtk_text_iter_get_text*(self: ptr TextIter00; `end`: ptr TextIter00): cstring {. + importc: "gtk_text_iter_get_text", libprag.} + +proc getText*(self: TextIter; `end`: TextIter): string = + let resul0 = gtk_text_iter_get_text(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](`end`.impl)) + result = $resul0 + cogfree(resul0) + +proc text*(self: TextIter; `end`: TextIter): string = + let resul0 = gtk_text_iter_get_text(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](`end`.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_text_iter_get_toggled_tags*(self: ptr TextIter00; toggledOn: gboolean): ptr pointer {. + importc: "gtk_text_iter_get_toggled_tags", libprag.} + +proc getToggledTags*(self: TextIter; toggledOn: bool): ptr pointer = + gtk_text_iter_get_toggled_tags(cast[ptr TextIter00](self.impl), gboolean(toggledOn)) + +proc toggledTags*(self: TextIter; toggledOn: bool): ptr pointer = + gtk_text_iter_get_toggled_tags(cast[ptr TextIter00](self.impl), gboolean(toggledOn)) + +proc gtk_text_iter_get_visible_line_index*(self: ptr TextIter00): int32 {. + importc: "gtk_text_iter_get_visible_line_index", libprag.} + +proc getVisibleLineIndex*(self: TextIter): int = + int(gtk_text_iter_get_visible_line_index(cast[ptr TextIter00](self.impl))) + +proc visibleLineIndex*(self: TextIter): int = + int(gtk_text_iter_get_visible_line_index(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_get_visible_line_offset*(self: ptr TextIter00): int32 {. + importc: "gtk_text_iter_get_visible_line_offset", libprag.} + +proc getVisibleLineOffset*(self: TextIter): int = + int(gtk_text_iter_get_visible_line_offset(cast[ptr TextIter00](self.impl))) + +proc visibleLineOffset*(self: TextIter): int = + int(gtk_text_iter_get_visible_line_offset(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_get_visible_slice*(self: ptr TextIter00; `end`: ptr TextIter00): cstring {. + importc: "gtk_text_iter_get_visible_slice", libprag.} + +proc getVisibleSlice*(self: TextIter; `end`: TextIter): string = + let resul0 = gtk_text_iter_get_visible_slice(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](`end`.impl)) + result = $resul0 + cogfree(resul0) + +proc visibleSlice*(self: TextIter; `end`: TextIter): string = + let resul0 = gtk_text_iter_get_visible_slice(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](`end`.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_text_iter_get_visible_text*(self: ptr TextIter00; `end`: ptr TextIter00): cstring {. + importc: "gtk_text_iter_get_visible_text", libprag.} + +proc getVisibleText*(self: TextIter; `end`: TextIter): string = + let resul0 = gtk_text_iter_get_visible_text(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](`end`.impl)) + result = $resul0 + cogfree(resul0) + +proc visibleText*(self: TextIter; `end`: TextIter): string = + let resul0 = gtk_text_iter_get_visible_text(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](`end`.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_text_iter_in_range*(self: ptr TextIter00; start: ptr TextIter00; `end`: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_in_range", libprag.} + +proc inRange*(self: TextIter; start: TextIter; `end`: TextIter): bool = + toBool(gtk_text_iter_in_range(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl))) + +proc gtk_text_iter_inside_sentence*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_inside_sentence", libprag.} + +proc insideSentence*(self: TextIter): bool = + toBool(gtk_text_iter_inside_sentence(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_inside_word*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_inside_word", libprag.} + +proc insideWord*(self: TextIter): bool = + toBool(gtk_text_iter_inside_word(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_is_cursor_position*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_is_cursor_position", libprag.} + +proc isCursorPosition*(self: TextIter): bool = + toBool(gtk_text_iter_is_cursor_position(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_is_end*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_is_end", libprag.} + +proc isEnd*(self: TextIter): bool = + toBool(gtk_text_iter_is_end(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_is_start*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_is_start", libprag.} + +proc isStart*(self: TextIter): bool = + toBool(gtk_text_iter_is_start(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_order*(self: ptr TextIter00; second: ptr TextIter00) {. + importc: "gtk_text_iter_order", libprag.} + +proc order*(self: TextIter; second: TextIter) = + gtk_text_iter_order(cast[ptr TextIter00](self.impl), cast[ptr TextIter00](second.impl)) + +proc gtk_text_iter_set_line*(self: ptr TextIter00; lineNumber: int32) {. + importc: "gtk_text_iter_set_line", libprag.} + +proc setLine*(self: TextIter; lineNumber: int) = + gtk_text_iter_set_line(cast[ptr TextIter00](self.impl), int32(lineNumber)) + +proc `line=`*(self: TextIter; lineNumber: int) = + gtk_text_iter_set_line(cast[ptr TextIter00](self.impl), int32(lineNumber)) + +proc gtk_text_iter_set_line_index*(self: ptr TextIter00; byteOnLine: int32) {. + importc: "gtk_text_iter_set_line_index", libprag.} + +proc setLineIndex*(self: TextIter; byteOnLine: int) = + gtk_text_iter_set_line_index(cast[ptr TextIter00](self.impl), int32(byteOnLine)) + +proc `lineIndex=`*(self: TextIter; byteOnLine: int) = + gtk_text_iter_set_line_index(cast[ptr TextIter00](self.impl), int32(byteOnLine)) + +proc gtk_text_iter_set_line_offset*(self: ptr TextIter00; charOnLine: int32) {. + importc: "gtk_text_iter_set_line_offset", libprag.} + +proc setLineOffset*(self: TextIter; charOnLine: int) = + gtk_text_iter_set_line_offset(cast[ptr TextIter00](self.impl), int32(charOnLine)) + +proc `lineOffset=`*(self: TextIter; charOnLine: int) = + gtk_text_iter_set_line_offset(cast[ptr TextIter00](self.impl), int32(charOnLine)) + +proc gtk_text_iter_set_offset*(self: ptr TextIter00; charOffset: int32) {. + importc: "gtk_text_iter_set_offset", libprag.} + +proc setOffset*(self: TextIter; charOffset: int) = + gtk_text_iter_set_offset(cast[ptr TextIter00](self.impl), int32(charOffset)) + +proc `offset=`*(self: TextIter; charOffset: int) = + gtk_text_iter_set_offset(cast[ptr TextIter00](self.impl), int32(charOffset)) + +proc gtk_text_iter_set_visible_line_index*(self: ptr TextIter00; byteOnLine: int32) {. + importc: "gtk_text_iter_set_visible_line_index", libprag.} + +proc setVisibleLineIndex*(self: TextIter; byteOnLine: int) = + gtk_text_iter_set_visible_line_index(cast[ptr TextIter00](self.impl), int32(byteOnLine)) + +proc `visibleLineIndex=`*(self: TextIter; byteOnLine: int) = + gtk_text_iter_set_visible_line_index(cast[ptr TextIter00](self.impl), int32(byteOnLine)) + +proc gtk_text_iter_set_visible_line_offset*(self: ptr TextIter00; charOnLine: int32) {. + importc: "gtk_text_iter_set_visible_line_offset", libprag.} + +proc setVisibleLineOffset*(self: TextIter; charOnLine: int) = + gtk_text_iter_set_visible_line_offset(cast[ptr TextIter00](self.impl), int32(charOnLine)) + +proc `visibleLineOffset=`*(self: TextIter; charOnLine: int) = + gtk_text_iter_set_visible_line_offset(cast[ptr TextIter00](self.impl), int32(charOnLine)) + +proc gtk_text_iter_starts_line*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_starts_line", libprag.} + +proc startsLine*(self: TextIter): bool = + toBool(gtk_text_iter_starts_line(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_starts_sentence*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_starts_sentence", libprag.} + +proc startsSentence*(self: TextIter): bool = + toBool(gtk_text_iter_starts_sentence(cast[ptr TextIter00](self.impl))) + +proc gtk_text_iter_starts_word*(self: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_starts_word", libprag.} + +proc startsWord*(self: TextIter): bool = + toBool(gtk_text_iter_starts_word(cast[ptr TextIter00](self.impl))) + +type + TextTag* = ref object of gobject.Object + TextTag00* = object of gobject.Object00 + priv1: ptr TextTagPrivate00 + +proc scEvent*(self: TextTag; p: proc (self: ptr gobject.Object00; `object`: gobject.Object00; event: gdk.Event00; iter: TextIter00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_text_tag_new*(name: cstring): ptr TextTag00 {. + importc: "gtk_text_tag_new", libprag.} + +proc newTextTag*(name: string): TextTag = + new(result, finalizeGObject) + result.impl = gtk_text_tag_new(cstring(name)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTextTag*[T](result: var T; name: string) = + assert(result is TextTag) + new(result, finalizeGObject) + result.impl = gtk_text_tag_new(cstring(name)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_tag_changed*(self: ptr TextTag00; sizeChanged: gboolean) {. + importc: "gtk_text_tag_changed", libprag.} + +proc changed*(self: TextTag; sizeChanged: bool) = + gtk_text_tag_changed(cast[ptr TextTag00](self.impl), gboolean(sizeChanged)) + +proc gtk_text_tag_event*(self: ptr TextTag00; eventObject: ptr gobject.Object00; + event: ptr gdk.Event00; iter: ptr TextIter00): gboolean {. + importc: "gtk_text_tag_event", libprag.} + +proc event*(self: TextTag; eventObject: gobject.Object; event: gdk.Event; + iter: TextIter): bool = + toBool(gtk_text_tag_event(cast[ptr TextTag00](self.impl), cast[ptr gobject.Object00](eventObject.impl), cast[ptr gdk.Event00](event.impl), cast[ptr TextIter00](iter.impl))) + +proc gtk_text_tag_get_priority*(self: ptr TextTag00): int32 {. + importc: "gtk_text_tag_get_priority", libprag.} + +proc getPriority*(self: TextTag): int = + int(gtk_text_tag_get_priority(cast[ptr TextTag00](self.impl))) + +proc priority*(self: TextTag): int = + int(gtk_text_tag_get_priority(cast[ptr TextTag00](self.impl))) + +proc gtk_text_tag_set_priority*(self: ptr TextTag00; priority: int32) {. + importc: "gtk_text_tag_set_priority", libprag.} + +proc setPriority*(self: TextTag; priority: int) = + gtk_text_tag_set_priority(cast[ptr TextTag00](self.impl), int32(priority)) + +proc `priority=`*(self: TextTag; priority: int) = + gtk_text_tag_set_priority(cast[ptr TextTag00](self.impl), int32(priority)) + +proc gtk_text_iter_backward_to_tag_toggle*(self: ptr TextIter00; tag: ptr TextTag00): gboolean {. + importc: "gtk_text_iter_backward_to_tag_toggle", libprag.} + +proc backwardToTagToggle*(self: TextIter; tag: TextTag): bool = + toBool(gtk_text_iter_backward_to_tag_toggle(cast[ptr TextIter00](self.impl), cast[ptr TextTag00](tag.impl))) + +proc gtk_text_iter_begins_tag*(self: ptr TextIter00; tag: ptr TextTag00): gboolean {. + importc: "gtk_text_iter_begins_tag", libprag.} + +proc beginsTag*(self: TextIter; tag: TextTag): bool = + toBool(gtk_text_iter_begins_tag(cast[ptr TextIter00](self.impl), cast[ptr TextTag00](tag.impl))) + +proc gtk_text_iter_ends_tag*(self: ptr TextIter00; tag: ptr TextTag00): gboolean {. + importc: "gtk_text_iter_ends_tag", libprag.} + +proc endsTag*(self: TextIter; tag: TextTag): bool = + toBool(gtk_text_iter_ends_tag(cast[ptr TextIter00](self.impl), cast[ptr TextTag00](tag.impl))) + +proc gtk_text_iter_forward_to_tag_toggle*(self: ptr TextIter00; tag: ptr TextTag00): gboolean {. + importc: "gtk_text_iter_forward_to_tag_toggle", libprag.} + +proc forwardToTagToggle*(self: TextIter; tag: TextTag): bool = + toBool(gtk_text_iter_forward_to_tag_toggle(cast[ptr TextIter00](self.impl), cast[ptr TextTag00](tag.impl))) + +proc gtk_text_iter_has_tag*(self: ptr TextIter00; tag: ptr TextTag00): gboolean {. + importc: "gtk_text_iter_has_tag", libprag.} + +proc hasTag*(self: TextIter; tag: TextTag): bool = + toBool(gtk_text_iter_has_tag(cast[ptr TextIter00](self.impl), cast[ptr TextTag00](tag.impl))) + +proc gtk_text_iter_starts_tag*(self: ptr TextIter00; tag: ptr TextTag00): gboolean {. + importc: "gtk_text_iter_starts_tag", libprag.} + +proc startsTag*(self: TextIter; tag: TextTag): bool = + toBool(gtk_text_iter_starts_tag(cast[ptr TextIter00](self.impl), cast[ptr TextTag00](tag.impl))) + +proc gtk_text_iter_toggles_tag*(self: ptr TextIter00; tag: ptr TextTag00): gboolean {. + importc: "gtk_text_iter_toggles_tag", libprag.} + +proc togglesTag*(self: TextIter; tag: TextTag): bool = + toBool(gtk_text_iter_toggles_tag(cast[ptr TextIter00](self.impl), cast[ptr TextTag00](tag.impl))) + +type + TextSearchFlag* {.size: sizeof(cint), pure.} = enum + visibleOnly = 1 + textOnly = 2 + caseInsensitive = 3 + + TextSearchFlags* {.size: sizeof(cint).} = set[TextSearchFlag] + +proc gtk_text_iter_backward_search*(self: ptr TextIter00; str: cstring; flags: TextSearchFlags; + matchStart: var TextIter00; matchEnd: var TextIter00; limit: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_search", libprag.} + +proc backwardSearch*(self: ptr TextIter00; str: cstring; flags: TextSearchFlags; + matchStart: var TextIter00; matchEnd: var TextIter00; limit: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_search", libprag.} + +proc gtk_text_iter_forward_search*(self: ptr TextIter00; str: cstring; flags: TextSearchFlags; + matchStart: var TextIter00; matchEnd: var TextIter00; limit: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_search", libprag.} + +proc forwardSearch*(self: ptr TextIter00; str: cstring; flags: TextSearchFlags; + matchStart: var TextIter00; matchEnd: var TextIter00; limit: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_search", libprag.} + +type + TextAppearance00* {.pure.} = object + bgColor*: gdk.Color00 + fgColor*: gdk.Color00 + rise*: int32 + underline*: uint32 + strikethrough*: uint32 + drawBg*: uint32 + insideSelection*: uint32 + isText*: uint32 + TextAppearance* = ref object + impl*: ptr TextAppearance00 + +type + Justification* {.size: sizeof(cint), pure.} = enum + left = 0 + right = 1 + center = 2 + fill = 3 + +type + WrapMode* {.size: sizeof(cint), pure.} = enum + none = 0 + char = 1 + word = 2 + wordChar = 3 + +type + TextAttributes00* {.pure.} = object + refcount*: uint32 + appearance*: TextAppearance00 + justification*: Justification + direction*: TextDirection + font*: ptr pango.FontDescription00 + fontScale*: cdouble + leftMargin*: int32 + rightMargin*: int32 + indent*: int32 + pixelsAboveLines*: int32 + pixelsBelowLines*: int32 + pixelsInsideWrap*: int32 + tabs*: ptr pango.TabArray00 + wrapMode*: WrapMode + language*: ptr pango.Language00 + pgBgColor*: ptr gdk.Color00 + invisible*: uint32 + bgFullHeight*: uint32 + editable*: uint32 + noFallback*: uint32 + pgBgRgba*: ptr gdk.RGBA00 + letterSpacing*: int32 + TextAttributes* = ref object + impl*: ptr TextAttributes00 + +proc gtk_text_attributes_new*(): ptr TextAttributes00 {. + importc: "gtk_text_attributes_new", libprag.} + +proc newTextAttributes*(): TextAttributes = + new(result) + result.impl = gtk_text_attributes_new() + +proc initTextAttributes*[T](result: var T) = + assert(result is TextAttributes) + new(result) + result.impl = gtk_text_attributes_new() + +proc gtk_text_attributes_copy*(self: ptr TextAttributes00): ptr TextAttributes00 {. + importc: "gtk_text_attributes_copy", libprag.} + +proc copy*(self: TextAttributes): TextAttributes = + new(result) + result.impl = gtk_text_attributes_copy(cast[ptr TextAttributes00](self.impl)) + +proc gtk_text_attributes_copy_values*(self: ptr TextAttributes00; dest: ptr TextAttributes00) {. + importc: "gtk_text_attributes_copy_values", libprag.} + +proc copyValues*(self: TextAttributes; dest: TextAttributes) = + gtk_text_attributes_copy_values(cast[ptr TextAttributes00](self.impl), cast[ptr TextAttributes00](dest.impl)) + +proc gtk_text_attributes_ref*(self: ptr TextAttributes00): ptr TextAttributes00 {. + importc: "gtk_text_attributes_ref", libprag.} + +proc `ref`*(self: TextAttributes): TextAttributes = + new(result) + result.impl = gtk_text_attributes_ref(cast[ptr TextAttributes00](self.impl)) + +proc gtk_text_attributes_unref*(self: ptr TextAttributes00) {. + importc: "gtk_text_attributes_unref", libprag.} + +proc unref*(self: TextAttributes) = + gtk_text_attributes_unref(cast[ptr TextAttributes00](self.impl)) + +proc gtk_text_iter_get_attributes*(self: ptr TextIter00; values: var TextAttributes00): gboolean {. + importc: "gtk_text_iter_get_attributes", libprag.} + +proc getAttributes*(self: ptr TextIter00; values: var TextAttributes00): gboolean {. + importc: "gtk_text_iter_get_attributes", libprag.} + +proc attributes*(self: ptr TextIter00; values: var TextAttributes00): gboolean {. + importc: "gtk_text_iter_get_attributes", libprag.} + +type + TextChildAnchor* = ref object of gobject.Object + TextChildAnchor00* = object of gobject.Object00 + segment*: pointer + +proc gtk_text_child_anchor_new*(): ptr TextChildAnchor00 {. + importc: "gtk_text_child_anchor_new", libprag.} + +proc newTextChildAnchor*(): TextChildAnchor = + new(result, finalizeGObject) + result.impl = gtk_text_child_anchor_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTextChildAnchor*[T](result: var T) = + assert(result is TextChildAnchor) + new(result, finalizeGObject) + result.impl = gtk_text_child_anchor_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_child_anchor_get_deleted*(self: ptr TextChildAnchor00): gboolean {. + importc: "gtk_text_child_anchor_get_deleted", libprag.} + +proc getDeleted*(self: TextChildAnchor): bool = + toBool(gtk_text_child_anchor_get_deleted(cast[ptr TextChildAnchor00](self.impl))) + +proc deleted*(self: TextChildAnchor): bool = + toBool(gtk_text_child_anchor_get_deleted(cast[ptr TextChildAnchor00](self.impl))) + +proc gtk_text_child_anchor_get_widgets*(self: ptr TextChildAnchor00): ptr pointer {. + importc: "gtk_text_child_anchor_get_widgets", libprag.} + +proc getWidgets*(self: TextChildAnchor): ptr pointer = + gtk_text_child_anchor_get_widgets(cast[ptr TextChildAnchor00](self.impl)) + +proc widgets*(self: TextChildAnchor): ptr pointer = + gtk_text_child_anchor_get_widgets(cast[ptr TextChildAnchor00](self.impl)) + +proc gtk_text_iter_get_child_anchor*(self: ptr TextIter00): ptr TextChildAnchor00 {. + importc: "gtk_text_iter_get_child_anchor", libprag.} + +proc getChildAnchor*(self: TextIter): TextChildAnchor = + let gobj = gtk_text_iter_get_child_anchor(cast[ptr TextIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextChildAnchor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc childAnchor*(self: TextIter): TextChildAnchor = + let gobj = gtk_text_iter_get_child_anchor(cast[ptr TextIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextChildAnchor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + TextMark* = ref object of gobject.Object + TextMark00* = object of gobject.Object00 + segment*: pointer + +proc gtk_text_mark_new*(name: cstring; leftGravity: gboolean): ptr TextMark00 {. + importc: "gtk_text_mark_new", libprag.} + +proc newTextMark*(name: string; leftGravity: bool): TextMark = + new(result, finalizeGObject) + result.impl = gtk_text_mark_new(cstring(name), gboolean(leftGravity)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTextMark*[T](result: var T; name: string; leftGravity: bool) = + assert(result is TextMark) + new(result, finalizeGObject) + result.impl = gtk_text_mark_new(cstring(name), gboolean(leftGravity)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_mark_get_deleted*(self: ptr TextMark00): gboolean {. + importc: "gtk_text_mark_get_deleted", libprag.} + +proc getDeleted*(self: TextMark): bool = + toBool(gtk_text_mark_get_deleted(cast[ptr TextMark00](self.impl))) + +proc deleted*(self: TextMark): bool = + toBool(gtk_text_mark_get_deleted(cast[ptr TextMark00](self.impl))) + +proc gtk_text_mark_get_left_gravity*(self: ptr TextMark00): gboolean {. + importc: "gtk_text_mark_get_left_gravity", libprag.} + +proc getLeftGravity*(self: TextMark): bool = + toBool(gtk_text_mark_get_left_gravity(cast[ptr TextMark00](self.impl))) + +proc leftGravity*(self: TextMark): bool = + toBool(gtk_text_mark_get_left_gravity(cast[ptr TextMark00](self.impl))) + +proc gtk_text_mark_get_name*(self: ptr TextMark00): cstring {. + importc: "gtk_text_mark_get_name", libprag.} + +proc getName*(self: TextMark): string = + let resul0 = gtk_text_mark_get_name(cast[ptr TextMark00](self.impl)) + result = $resul0 + +proc name*(self: TextMark): string = + let resul0 = gtk_text_mark_get_name(cast[ptr TextMark00](self.impl)) + result = $resul0 + +proc gtk_text_mark_get_visible*(self: ptr TextMark00): gboolean {. + importc: "gtk_text_mark_get_visible", libprag.} + +proc getVisible*(self: TextMark): bool = + toBool(gtk_text_mark_get_visible(cast[ptr TextMark00](self.impl))) + +proc visible*(self: TextMark): bool = + toBool(gtk_text_mark_get_visible(cast[ptr TextMark00](self.impl))) + +proc gtk_text_mark_set_visible*(self: ptr TextMark00; setting: gboolean) {. + importc: "gtk_text_mark_set_visible", libprag.} + +proc setVisible*(self: TextMark; setting: bool) = + gtk_text_mark_set_visible(cast[ptr TextMark00](self.impl), gboolean(setting)) + +proc `visible=`*(self: TextMark; setting: bool) = + gtk_text_mark_set_visible(cast[ptr TextMark00](self.impl), gboolean(setting)) + +type + TextBuffer* = ref object of gobject.Object + TextBuffer00* = object of gobject.Object00 + priv1: ptr TextBufferPrivate00 + +proc scApplyTag*(self: TextBuffer; p: proc (self: ptr gobject.Object00; tag: TextTag00; start: TextIter00; `end`: TextIter00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "apply-tag", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scBeginUserAction*(self: TextBuffer; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "begin-user-action", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scChanged*(self: TextBuffer; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeleteRange*(self: TextBuffer; p: proc (self: ptr gobject.Object00; start: TextIter00; `end`: TextIter00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "delete-range", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEndUserAction*(self: TextBuffer; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "end-user-action", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInsertChildAnchor*(self: TextBuffer; p: proc (self: ptr gobject.Object00; location: TextIter00; anchor: TextChildAnchor00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "insert-child-anchor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInsertPixbuf*(self: TextBuffer; p: proc (self: ptr gobject.Object00; location: TextIter00; pixbuf: gdkpixbuf.Pixbuf00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "insert-pixbuf", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInsertText*(self: TextBuffer; p: proc (self: ptr gobject.Object00; location: TextIter00; text: cstring; len: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "insert-text", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMarkDeleted*(self: TextBuffer; p: proc (self: ptr gobject.Object00; mark: TextMark00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mark-deleted", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMarkSet*(self: TextBuffer; p: proc (self: ptr gobject.Object00; location: TextIter00; mark: TextMark00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mark-set", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scModifiedChanged*(self: TextBuffer; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "modified-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPasteDone*(self: TextBuffer; p: proc (self: ptr gobject.Object00; clipboard: Clipboard00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "paste-done", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRemoveTag*(self: TextBuffer; p: proc (self: ptr gobject.Object00; tag: TextTag00; start: TextIter00; `end`: TextIter00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "remove-tag", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_text_buffer_add_mark*(self: ptr TextBuffer00; mark: ptr TextMark00; where: ptr TextIter00) {. + importc: "gtk_text_buffer_add_mark", libprag.} + +proc addMark*(self: TextBuffer; mark: TextMark; where: TextIter) = + gtk_text_buffer_add_mark(cast[ptr TextBuffer00](self.impl), cast[ptr TextMark00](mark.impl), cast[ptr TextIter00](where.impl)) + +proc gtk_text_buffer_add_selection_clipboard*(self: ptr TextBuffer00; clipboard: ptr Clipboard00) {. + importc: "gtk_text_buffer_add_selection_clipboard", libprag.} + +proc addSelectionClipboard*(self: TextBuffer; clipboard: Clipboard) = + gtk_text_buffer_add_selection_clipboard(cast[ptr TextBuffer00](self.impl), cast[ptr Clipboard00](clipboard.impl)) + +proc gtk_text_buffer_apply_tag*(self: ptr TextBuffer00; tag: ptr TextTag00; start: ptr TextIter00; + `end`: ptr TextIter00) {. + importc: "gtk_text_buffer_apply_tag", libprag.} + +proc applyTag*(self: TextBuffer; tag: TextTag; start: TextIter; `end`: TextIter) = + gtk_text_buffer_apply_tag(cast[ptr TextBuffer00](self.impl), cast[ptr TextTag00](tag.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl)) + +proc gtk_text_buffer_apply_tag_by_name*(self: ptr TextBuffer00; name: cstring; start: ptr TextIter00; + `end`: ptr TextIter00) {. + importc: "gtk_text_buffer_apply_tag_by_name", libprag.} + +proc applyTagByName*(self: TextBuffer; name: string; start: TextIter; `end`: TextIter) = + gtk_text_buffer_apply_tag_by_name(cast[ptr TextBuffer00](self.impl), cstring(name), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl)) + +proc gtk_text_buffer_backspace*(self: ptr TextBuffer00; iter: ptr TextIter00; interactive: gboolean; + defaultEditable: gboolean): gboolean {. + importc: "gtk_text_buffer_backspace", libprag.} + +proc backspace*(self: TextBuffer; iter: TextIter; interactive: bool; + defaultEditable: bool): bool = + toBool(gtk_text_buffer_backspace(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](iter.impl), gboolean(interactive), gboolean(defaultEditable))) + +proc gtk_text_buffer_begin_user_action*(self: ptr TextBuffer00) {. + importc: "gtk_text_buffer_begin_user_action", libprag.} + +proc beginUserAction*(self: TextBuffer) = + gtk_text_buffer_begin_user_action(cast[ptr TextBuffer00](self.impl)) + +proc gtk_text_buffer_copy_clipboard*(self: ptr TextBuffer00; clipboard: ptr Clipboard00) {. + importc: "gtk_text_buffer_copy_clipboard", libprag.} + +proc copyClipboard*(self: TextBuffer; clipboard: Clipboard) = + gtk_text_buffer_copy_clipboard(cast[ptr TextBuffer00](self.impl), cast[ptr Clipboard00](clipboard.impl)) + +proc gtk_text_buffer_create_child_anchor*(self: ptr TextBuffer00; iter: ptr TextIter00): ptr TextChildAnchor00 {. + importc: "gtk_text_buffer_create_child_anchor", libprag.} + +proc createChildAnchor*(self: TextBuffer; iter: TextIter): TextChildAnchor = + let gobj = gtk_text_buffer_create_child_anchor(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](iter.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextChildAnchor](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_buffer_create_mark*(self: ptr TextBuffer00; markName: cstring; where: ptr TextIter00; + leftGravity: gboolean): ptr TextMark00 {. + importc: "gtk_text_buffer_create_mark", libprag.} + +proc createMark*(self: TextBuffer; markName: string; where: TextIter; + leftGravity: bool): TextMark = + let gobj = gtk_text_buffer_create_mark(cast[ptr TextBuffer00](self.impl), cstring(markName), cast[ptr TextIter00](where.impl), gboolean(leftGravity)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextMark](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_buffer_cut_clipboard*(self: ptr TextBuffer00; clipboard: ptr Clipboard00; + defaultEditable: gboolean) {. + importc: "gtk_text_buffer_cut_clipboard", libprag.} + +proc cutClipboard*(self: TextBuffer; clipboard: Clipboard; defaultEditable: bool) = + gtk_text_buffer_cut_clipboard(cast[ptr TextBuffer00](self.impl), cast[ptr Clipboard00](clipboard.impl), gboolean(defaultEditable)) + +proc gtk_text_buffer_delete*(self: ptr TextBuffer00; start: ptr TextIter00; `end`: ptr TextIter00) {. + importc: "gtk_text_buffer_delete", libprag.} + +proc delete*(self: TextBuffer; start: TextIter; `end`: TextIter) = + gtk_text_buffer_delete(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl)) + +proc gtk_text_buffer_delete_interactive*(self: ptr TextBuffer00; startIter: ptr TextIter00; + endIter: ptr TextIter00; defaultEditable: gboolean): gboolean {. + importc: "gtk_text_buffer_delete_interactive", libprag.} + +proc deleteInteractive*(self: TextBuffer; startIter: TextIter; endIter: TextIter; + defaultEditable: bool): bool = + toBool(gtk_text_buffer_delete_interactive(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](startIter.impl), cast[ptr TextIter00](endIter.impl), gboolean(defaultEditable))) + +proc gtk_text_buffer_delete_mark*(self: ptr TextBuffer00; mark: ptr TextMark00) {. + importc: "gtk_text_buffer_delete_mark", libprag.} + +proc deleteMark*(self: TextBuffer; mark: TextMark) = + gtk_text_buffer_delete_mark(cast[ptr TextBuffer00](self.impl), cast[ptr TextMark00](mark.impl)) + +proc gtk_text_buffer_delete_mark_by_name*(self: ptr TextBuffer00; name: cstring) {. + importc: "gtk_text_buffer_delete_mark_by_name", libprag.} + +proc deleteMarkByName*(self: TextBuffer; name: string) = + gtk_text_buffer_delete_mark_by_name(cast[ptr TextBuffer00](self.impl), cstring(name)) + +proc gtk_text_buffer_delete_selection*(self: ptr TextBuffer00; interactive: gboolean; defaultEditable: gboolean): gboolean {. + importc: "gtk_text_buffer_delete_selection", libprag.} + +proc deleteSelection*(self: TextBuffer; interactive: bool; defaultEditable: bool): bool = + toBool(gtk_text_buffer_delete_selection(cast[ptr TextBuffer00](self.impl), gboolean(interactive), gboolean(defaultEditable))) + +proc gtk_text_buffer_deserialize*(self: ptr TextBuffer00; contentBuffer: ptr TextBuffer00; + format: ptr gdk.Atom00; iter: ptr TextIter00; data: uint8Array; length: uint64): gboolean {. + importc: "gtk_text_buffer_deserialize", libprag.} + +proc deserialize*(self: TextBuffer; contentBuffer: TextBuffer; format: gdk.Atom; + iter: TextIter; data: uint8Array; length: uint64): bool = + toBool(gtk_text_buffer_deserialize(cast[ptr TextBuffer00](self.impl), cast[ptr TextBuffer00](contentBuffer.impl), cast[ptr gdk.Atom00](format.impl), cast[ptr TextIter00](iter.impl), data, length)) + +proc gtk_text_buffer_deserialize_get_can_create_tags*(self: ptr TextBuffer00; format: ptr gdk.Atom00): gboolean {. + importc: "gtk_text_buffer_deserialize_get_can_create_tags", libprag.} + +proc deserializeGetCanCreateTags*(self: TextBuffer; format: gdk.Atom): bool = + toBool(gtk_text_buffer_deserialize_get_can_create_tags(cast[ptr TextBuffer00](self.impl), cast[ptr gdk.Atom00](format.impl))) + +proc gtk_text_buffer_deserialize_set_can_create_tags*(self: ptr TextBuffer00; format: ptr gdk.Atom00; canCreateTags: gboolean) {. + importc: "gtk_text_buffer_deserialize_set_can_create_tags", libprag.} + +proc deserializeSetCanCreateTags*(self: TextBuffer; format: gdk.Atom; canCreateTags: bool) = + gtk_text_buffer_deserialize_set_can_create_tags(cast[ptr TextBuffer00](self.impl), cast[ptr gdk.Atom00](format.impl), gboolean(canCreateTags)) + +proc gtk_text_buffer_end_user_action*(self: ptr TextBuffer00) {. + importc: "gtk_text_buffer_end_user_action", libprag.} + +proc endUserAction*(self: TextBuffer) = + gtk_text_buffer_end_user_action(cast[ptr TextBuffer00](self.impl)) + +proc gtk_text_buffer_get_bounds*(self: ptr TextBuffer00; start: var TextIter00; `end`: var TextIter00) {. + importc: "gtk_text_buffer_get_bounds", libprag.} + +proc getBounds*(self: ptr TextBuffer00; start: var TextIter00; `end`: var TextIter00) {. + importc: "gtk_text_buffer_get_bounds", libprag.} + +proc bounds*(self: ptr TextBuffer00; start: var TextIter00; `end`: var TextIter00) {. + importc: "gtk_text_buffer_get_bounds", libprag.} + +proc gtk_text_buffer_get_char_count*(self: ptr TextBuffer00): int32 {. + importc: "gtk_text_buffer_get_char_count", libprag.} + +proc getCharCount*(self: TextBuffer): int = + int(gtk_text_buffer_get_char_count(cast[ptr TextBuffer00](self.impl))) + +proc charCount*(self: TextBuffer): int = + int(gtk_text_buffer_get_char_count(cast[ptr TextBuffer00](self.impl))) + +proc gtk_text_buffer_get_copy_target_list*(self: ptr TextBuffer00): ptr TargetList00 {. + importc: "gtk_text_buffer_get_copy_target_list", libprag.} + +proc getCopyTargetList*(self: TextBuffer): TargetList = + new(result) + result.impl = gtk_text_buffer_get_copy_target_list(cast[ptr TextBuffer00](self.impl)) + +proc copyTargetList*(self: TextBuffer): TargetList = + new(result) + result.impl = gtk_text_buffer_get_copy_target_list(cast[ptr TextBuffer00](self.impl)) + +proc gtk_text_buffer_get_deserialize_formats*(self: ptr TextBuffer00; nFormats: var int32): ptr gdk.Atom00Array {. + importc: "gtk_text_buffer_get_deserialize_formats", libprag.} + +proc getDeserializeFormats*(self: TextBuffer; nFormats: var int): ptr gdk.Atom00Array = + var nFormats_00 = int32(nFormats) + result = gtk_text_buffer_get_deserialize_formats(cast[ptr TextBuffer00](self.impl), nFormats_00) + nFormats = int(nFormats_00) + +proc deserializeFormats*(self: TextBuffer; nFormats: var int): ptr gdk.Atom00Array = + var nFormats_00 = int32(nFormats) + result = gtk_text_buffer_get_deserialize_formats(cast[ptr TextBuffer00](self.impl), nFormats_00) + nFormats = int(nFormats_00) + +proc gtk_text_buffer_get_end_iter*(self: ptr TextBuffer00; iter: var TextIter00) {. + importc: "gtk_text_buffer_get_end_iter", libprag.} + +proc getEndIter*(self: ptr TextBuffer00; iter: var TextIter00) {. + importc: "gtk_text_buffer_get_end_iter", libprag.} + +proc endIter*(self: ptr TextBuffer00; iter: var TextIter00) {. + importc: "gtk_text_buffer_get_end_iter", libprag.} + +proc gtk_text_buffer_get_has_selection*(self: ptr TextBuffer00): gboolean {. + importc: "gtk_text_buffer_get_has_selection", libprag.} + +proc getHasSelection*(self: TextBuffer): bool = + toBool(gtk_text_buffer_get_has_selection(cast[ptr TextBuffer00](self.impl))) + +proc hasSelection*(self: TextBuffer): bool = + toBool(gtk_text_buffer_get_has_selection(cast[ptr TextBuffer00](self.impl))) + +proc gtk_text_buffer_get_insert*(self: ptr TextBuffer00): ptr TextMark00 {. + importc: "gtk_text_buffer_get_insert", libprag.} + +proc getInsert*(self: TextBuffer): TextMark = + let gobj = gtk_text_buffer_get_insert(cast[ptr TextBuffer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextMark](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc insert*(self: TextBuffer): TextMark = + let gobj = gtk_text_buffer_get_insert(cast[ptr TextBuffer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextMark](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_buffer_get_iter_at_child_anchor*(self: ptr TextBuffer00; iter: var TextIter00; anchor: ptr TextChildAnchor00) {. + importc: "gtk_text_buffer_get_iter_at_child_anchor", libprag.} + +proc getIterAtChildAnchor*(self: ptr TextBuffer00; iter: var TextIter00; anchor: ptr TextChildAnchor00) {. + importc: "gtk_text_buffer_get_iter_at_child_anchor", libprag.} + +proc iterAtChildAnchor*(self: ptr TextBuffer00; iter: var TextIter00; anchor: ptr TextChildAnchor00) {. + importc: "gtk_text_buffer_get_iter_at_child_anchor", libprag.} + +proc gtk_text_buffer_get_iter_at_line*(self: ptr TextBuffer00; iter: var TextIter00; lineNumber: int32) {. + importc: "gtk_text_buffer_get_iter_at_line", libprag.} + +proc getIterAtLine*(self: ptr TextBuffer00; iter: var TextIter00; lineNumber: int32) {. + importc: "gtk_text_buffer_get_iter_at_line", libprag.} + +proc iterAtLine*(self: ptr TextBuffer00; iter: var TextIter00; lineNumber: int32) {. + importc: "gtk_text_buffer_get_iter_at_line", libprag.} + +proc gtk_text_buffer_get_iter_at_line_index*(self: ptr TextBuffer00; iter: var TextIter00; lineNumber: int32; + byteIndex: int32) {. + importc: "gtk_text_buffer_get_iter_at_line_index", libprag.} + +proc getIterAtLineIndex*(self: ptr TextBuffer00; iter: var TextIter00; lineNumber: int32; + byteIndex: int32) {. + importc: "gtk_text_buffer_get_iter_at_line_index", libprag.} + +proc iterAtLineIndex*(self: ptr TextBuffer00; iter: var TextIter00; lineNumber: int32; + byteIndex: int32) {. + importc: "gtk_text_buffer_get_iter_at_line_index", libprag.} + +proc gtk_text_buffer_get_iter_at_line_offset*(self: ptr TextBuffer00; iter: var TextIter00; lineNumber: int32; + charOffset: int32) {. + importc: "gtk_text_buffer_get_iter_at_line_offset", libprag.} + +proc getIterAtLineOffset*(self: ptr TextBuffer00; iter: var TextIter00; lineNumber: int32; + charOffset: int32) {. + importc: "gtk_text_buffer_get_iter_at_line_offset", libprag.} + +proc iterAtLineOffset*(self: ptr TextBuffer00; iter: var TextIter00; lineNumber: int32; + charOffset: int32) {. + importc: "gtk_text_buffer_get_iter_at_line_offset", libprag.} + +proc gtk_text_buffer_get_iter_at_mark*(self: ptr TextBuffer00; iter: var TextIter00; mark: ptr TextMark00) {. + importc: "gtk_text_buffer_get_iter_at_mark", libprag.} + +proc getIterAtMark*(self: ptr TextBuffer00; iter: var TextIter00; mark: ptr TextMark00) {. + importc: "gtk_text_buffer_get_iter_at_mark", libprag.} + +proc iterAtMark*(self: ptr TextBuffer00; iter: var TextIter00; mark: ptr TextMark00) {. + importc: "gtk_text_buffer_get_iter_at_mark", libprag.} + +proc gtk_text_buffer_get_iter_at_offset*(self: ptr TextBuffer00; iter: var TextIter00; charOffset: int32) {. + importc: "gtk_text_buffer_get_iter_at_offset", libprag.} + +proc getIterAtOffset*(self: ptr TextBuffer00; iter: var TextIter00; charOffset: int32) {. + importc: "gtk_text_buffer_get_iter_at_offset", libprag.} + +proc iterAtOffset*(self: ptr TextBuffer00; iter: var TextIter00; charOffset: int32) {. + importc: "gtk_text_buffer_get_iter_at_offset", libprag.} + +proc gtk_text_buffer_get_line_count*(self: ptr TextBuffer00): int32 {. + importc: "gtk_text_buffer_get_line_count", libprag.} + +proc getLineCount*(self: TextBuffer): int = + int(gtk_text_buffer_get_line_count(cast[ptr TextBuffer00](self.impl))) + +proc lineCount*(self: TextBuffer): int = + int(gtk_text_buffer_get_line_count(cast[ptr TextBuffer00](self.impl))) + +proc gtk_text_buffer_get_mark*(self: ptr TextBuffer00; name: cstring): ptr TextMark00 {. + importc: "gtk_text_buffer_get_mark", libprag.} + +proc getMark*(self: TextBuffer; name: string): TextMark = + let gobj = gtk_text_buffer_get_mark(cast[ptr TextBuffer00](self.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextMark](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc mark*(self: TextBuffer; name: string): TextMark = + let gobj = gtk_text_buffer_get_mark(cast[ptr TextBuffer00](self.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextMark](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_buffer_get_modified*(self: ptr TextBuffer00): gboolean {. + importc: "gtk_text_buffer_get_modified", libprag.} + +proc getModified*(self: TextBuffer): bool = + toBool(gtk_text_buffer_get_modified(cast[ptr TextBuffer00](self.impl))) + +proc modified*(self: TextBuffer): bool = + toBool(gtk_text_buffer_get_modified(cast[ptr TextBuffer00](self.impl))) + +proc gtk_text_buffer_get_paste_target_list*(self: ptr TextBuffer00): ptr TargetList00 {. + importc: "gtk_text_buffer_get_paste_target_list", libprag.} + +proc getPasteTargetList*(self: TextBuffer): TargetList = + new(result) + result.impl = gtk_text_buffer_get_paste_target_list(cast[ptr TextBuffer00](self.impl)) + +proc pasteTargetList*(self: TextBuffer): TargetList = + new(result) + result.impl = gtk_text_buffer_get_paste_target_list(cast[ptr TextBuffer00](self.impl)) + +proc gtk_text_buffer_get_selection_bound*(self: ptr TextBuffer00): ptr TextMark00 {. + importc: "gtk_text_buffer_get_selection_bound", libprag.} + +proc getSelectionBound*(self: TextBuffer): TextMark = + let gobj = gtk_text_buffer_get_selection_bound(cast[ptr TextBuffer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextMark](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc selectionBound*(self: TextBuffer): TextMark = + let gobj = gtk_text_buffer_get_selection_bound(cast[ptr TextBuffer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextMark](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_buffer_get_selection_bounds*(self: ptr TextBuffer00; start: var TextIter00; `end`: var TextIter00): gboolean {. + importc: "gtk_text_buffer_get_selection_bounds", libprag.} + +proc getSelectionBounds*(self: ptr TextBuffer00; start: var TextIter00; `end`: var TextIter00): gboolean {. + importc: "gtk_text_buffer_get_selection_bounds", libprag.} + +proc selectionBounds*(self: ptr TextBuffer00; start: var TextIter00; `end`: var TextIter00): gboolean {. + importc: "gtk_text_buffer_get_selection_bounds", libprag.} + +proc gtk_text_buffer_get_serialize_formats*(self: ptr TextBuffer00; nFormats: var int32): ptr gdk.Atom00Array {. + importc: "gtk_text_buffer_get_serialize_formats", libprag.} + +proc getSerializeFormats*(self: TextBuffer; nFormats: var int): ptr gdk.Atom00Array = + var nFormats_00 = int32(nFormats) + result = gtk_text_buffer_get_serialize_formats(cast[ptr TextBuffer00](self.impl), nFormats_00) + nFormats = int(nFormats_00) + +proc serializeFormats*(self: TextBuffer; nFormats: var int): ptr gdk.Atom00Array = + var nFormats_00 = int32(nFormats) + result = gtk_text_buffer_get_serialize_formats(cast[ptr TextBuffer00](self.impl), nFormats_00) + nFormats = int(nFormats_00) + +proc gtk_text_buffer_get_slice*(self: ptr TextBuffer00; start: ptr TextIter00; `end`: ptr TextIter00; + includeHiddenChars: gboolean): cstring {. + importc: "gtk_text_buffer_get_slice", libprag.} + +proc getSlice*(self: TextBuffer; start: TextIter; `end`: TextIter; + includeHiddenChars: bool): string = + let resul0 = gtk_text_buffer_get_slice(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl), gboolean(includeHiddenChars)) + result = $resul0 + cogfree(resul0) + +proc slice*(self: TextBuffer; start: TextIter; `end`: TextIter; + includeHiddenChars: bool): string = + let resul0 = gtk_text_buffer_get_slice(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl), gboolean(includeHiddenChars)) + result = $resul0 + cogfree(resul0) + +proc gtk_text_buffer_get_start_iter*(self: ptr TextBuffer00; iter: var TextIter00) {. + importc: "gtk_text_buffer_get_start_iter", libprag.} + +proc getStartIter*(self: ptr TextBuffer00; iter: var TextIter00) {. + importc: "gtk_text_buffer_get_start_iter", libprag.} + +proc startIter*(self: ptr TextBuffer00; iter: var TextIter00) {. + importc: "gtk_text_buffer_get_start_iter", libprag.} + +proc gtk_text_buffer_get_text*(self: ptr TextBuffer00; start: ptr TextIter00; `end`: ptr TextIter00; + includeHiddenChars: gboolean): cstring {. + importc: "gtk_text_buffer_get_text", libprag.} + +proc getText*(self: TextBuffer; start: TextIter; `end`: TextIter; + includeHiddenChars: bool): string = + let resul0 = gtk_text_buffer_get_text(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl), gboolean(includeHiddenChars)) + result = $resul0 + cogfree(resul0) + +proc text*(self: TextBuffer; start: TextIter; `end`: TextIter; + includeHiddenChars: bool): string = + let resul0 = gtk_text_buffer_get_text(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl), gboolean(includeHiddenChars)) + result = $resul0 + cogfree(resul0) + +proc gtk_text_buffer_insert*(self: ptr TextBuffer00; iter: ptr TextIter00; text: cstring; + len: int32) {. + importc: "gtk_text_buffer_insert", libprag.} + +proc insert*(self: TextBuffer; iter: TextIter; text: string; len: int) = + gtk_text_buffer_insert(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](iter.impl), cstring(text), int32(len)) + +proc gtk_text_buffer_insert_at_cursor*(self: ptr TextBuffer00; text: cstring; len: int32) {. + importc: "gtk_text_buffer_insert_at_cursor", libprag.} + +proc insertAtCursor*(self: TextBuffer; text: string; len: int) = + gtk_text_buffer_insert_at_cursor(cast[ptr TextBuffer00](self.impl), cstring(text), int32(len)) + +proc gtk_text_buffer_insert_child_anchor*(self: ptr TextBuffer00; iter: ptr TextIter00; anchor: ptr TextChildAnchor00) {. + importc: "gtk_text_buffer_insert_child_anchor", libprag.} + +proc insertChildAnchor*(self: TextBuffer; iter: TextIter; anchor: TextChildAnchor) = + gtk_text_buffer_insert_child_anchor(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](iter.impl), cast[ptr TextChildAnchor00](anchor.impl)) + +proc gtk_text_buffer_insert_interactive*(self: ptr TextBuffer00; iter: ptr TextIter00; text: cstring; + len: int32; defaultEditable: gboolean): gboolean {. + importc: "gtk_text_buffer_insert_interactive", libprag.} + +proc insertInteractive*(self: TextBuffer; iter: TextIter; text: string; len: int; + defaultEditable: bool): bool = + toBool(gtk_text_buffer_insert_interactive(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](iter.impl), cstring(text), int32(len), gboolean(defaultEditable))) + +proc gtk_text_buffer_insert_interactive_at_cursor*(self: ptr TextBuffer00; text: cstring; len: int32; + defaultEditable: gboolean): gboolean {. + importc: "gtk_text_buffer_insert_interactive_at_cursor", libprag.} + +proc insertInteractiveAtCursor*(self: TextBuffer; text: string; len: int; defaultEditable: bool): bool = + toBool(gtk_text_buffer_insert_interactive_at_cursor(cast[ptr TextBuffer00](self.impl), cstring(text), int32(len), gboolean(defaultEditable))) + +proc gtk_text_buffer_insert_markup*(self: ptr TextBuffer00; iter: ptr TextIter00; markup: cstring; + len: int32) {. + importc: "gtk_text_buffer_insert_markup", libprag.} + +proc insertMarkup*(self: TextBuffer; iter: TextIter; markup: string; + len: int) = + gtk_text_buffer_insert_markup(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](iter.impl), cstring(markup), int32(len)) + +proc gtk_text_buffer_insert_pixbuf*(self: ptr TextBuffer00; iter: ptr TextIter00; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_text_buffer_insert_pixbuf", libprag.} + +proc insertPixbuf*(self: TextBuffer; iter: TextIter; pixbuf: gdkpixbuf.Pixbuf) = + gtk_text_buffer_insert_pixbuf(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](iter.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_text_buffer_insert_range*(self: ptr TextBuffer00; iter: ptr TextIter00; start: ptr TextIter00; + `end`: ptr TextIter00) {. + importc: "gtk_text_buffer_insert_range", libprag.} + +proc insertRange*(self: TextBuffer; iter: TextIter; start: TextIter; + `end`: TextIter) = + gtk_text_buffer_insert_range(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](iter.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl)) + +proc gtk_text_buffer_insert_range_interactive*(self: ptr TextBuffer00; iter: ptr TextIter00; start: ptr TextIter00; + `end`: ptr TextIter00; defaultEditable: gboolean): gboolean {. + importc: "gtk_text_buffer_insert_range_interactive", libprag.} + +proc insertRangeInteractive*(self: TextBuffer; iter: TextIter; start: TextIter; + `end`: TextIter; defaultEditable: bool): bool = + toBool(gtk_text_buffer_insert_range_interactive(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](iter.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl), gboolean(defaultEditable))) + +proc gtk_text_buffer_move_mark*(self: ptr TextBuffer00; mark: ptr TextMark00; where: ptr TextIter00) {. + importc: "gtk_text_buffer_move_mark", libprag.} + +proc moveMark*(self: TextBuffer; mark: TextMark; where: TextIter) = + gtk_text_buffer_move_mark(cast[ptr TextBuffer00](self.impl), cast[ptr TextMark00](mark.impl), cast[ptr TextIter00](where.impl)) + +proc gtk_text_buffer_move_mark_by_name*(self: ptr TextBuffer00; name: cstring; where: ptr TextIter00) {. + importc: "gtk_text_buffer_move_mark_by_name", libprag.} + +proc moveMarkByName*(self: TextBuffer; name: string; where: TextIter) = + gtk_text_buffer_move_mark_by_name(cast[ptr TextBuffer00](self.impl), cstring(name), cast[ptr TextIter00](where.impl)) + +proc gtk_text_buffer_paste_clipboard*(self: ptr TextBuffer00; clipboard: ptr Clipboard00; + overrideLocation: ptr TextIter00; defaultEditable: gboolean) {. + importc: "gtk_text_buffer_paste_clipboard", libprag.} + +proc pasteClipboard*(self: TextBuffer; clipboard: Clipboard; overrideLocation: TextIter; + defaultEditable: bool) = + gtk_text_buffer_paste_clipboard(cast[ptr TextBuffer00](self.impl), cast[ptr Clipboard00](clipboard.impl), cast[ptr TextIter00](overrideLocation.impl), gboolean(defaultEditable)) + +proc gtk_text_buffer_place_cursor*(self: ptr TextBuffer00; where: ptr TextIter00) {. + importc: "gtk_text_buffer_place_cursor", libprag.} + +proc placeCursor*(self: TextBuffer; where: TextIter) = + gtk_text_buffer_place_cursor(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](where.impl)) + +proc gtk_text_buffer_register_deserialize_tagset*(self: ptr TextBuffer00; tagsetName: cstring): ptr gdk.Atom00 {. + importc: "gtk_text_buffer_register_deserialize_tagset", libprag.} + +proc registerDeserializeTagset*(self: TextBuffer; tagsetName: string): gdk.Atom = + new(result) + result.impl = gtk_text_buffer_register_deserialize_tagset(cast[ptr TextBuffer00](self.impl), cstring(tagsetName)) + +proc gtk_text_buffer_register_serialize_tagset*(self: ptr TextBuffer00; tagsetName: cstring): ptr gdk.Atom00 {. + importc: "gtk_text_buffer_register_serialize_tagset", libprag.} + +proc registerSerializeTagset*(self: TextBuffer; tagsetName: string): gdk.Atom = + new(result) + result.impl = gtk_text_buffer_register_serialize_tagset(cast[ptr TextBuffer00](self.impl), cstring(tagsetName)) + +proc gtk_text_buffer_remove_all_tags*(self: ptr TextBuffer00; start: ptr TextIter00; `end`: ptr TextIter00) {. + importc: "gtk_text_buffer_remove_all_tags", libprag.} + +proc removeAllTags*(self: TextBuffer; start: TextIter; `end`: TextIter) = + gtk_text_buffer_remove_all_tags(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl)) + +proc gtk_text_buffer_remove_selection_clipboard*(self: ptr TextBuffer00; clipboard: ptr Clipboard00) {. + importc: "gtk_text_buffer_remove_selection_clipboard", libprag.} + +proc removeSelectionClipboard*(self: TextBuffer; clipboard: Clipboard) = + gtk_text_buffer_remove_selection_clipboard(cast[ptr TextBuffer00](self.impl), cast[ptr Clipboard00](clipboard.impl)) + +proc gtk_text_buffer_remove_tag*(self: ptr TextBuffer00; tag: ptr TextTag00; start: ptr TextIter00; + `end`: ptr TextIter00) {. + importc: "gtk_text_buffer_remove_tag", libprag.} + +proc removeTag*(self: TextBuffer; tag: TextTag; start: TextIter; `end`: TextIter) = + gtk_text_buffer_remove_tag(cast[ptr TextBuffer00](self.impl), cast[ptr TextTag00](tag.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl)) + +proc gtk_text_buffer_remove_tag_by_name*(self: ptr TextBuffer00; name: cstring; start: ptr TextIter00; + `end`: ptr TextIter00) {. + importc: "gtk_text_buffer_remove_tag_by_name", libprag.} + +proc removeTagByName*(self: TextBuffer; name: string; start: TextIter; `end`: TextIter) = + gtk_text_buffer_remove_tag_by_name(cast[ptr TextBuffer00](self.impl), cstring(name), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl)) + +proc gtk_text_buffer_select_range*(self: ptr TextBuffer00; ins: ptr TextIter00; bound: ptr TextIter00) {. + importc: "gtk_text_buffer_select_range", libprag.} + +proc selectRange*(self: TextBuffer; ins: TextIter; bound: TextIter) = + gtk_text_buffer_select_range(cast[ptr TextBuffer00](self.impl), cast[ptr TextIter00](ins.impl), cast[ptr TextIter00](bound.impl)) + +proc gtk_text_buffer_serialize*(self: ptr TextBuffer00; contentBuffer: ptr TextBuffer00; + format: ptr gdk.Atom00; start: ptr TextIter00; `end`: ptr TextIter00; length: var uint64): uint8Array {. + importc: "gtk_text_buffer_serialize", libprag.} + +proc serialize*(self: TextBuffer; contentBuffer: TextBuffer; format: gdk.Atom; + start: TextIter; `end`: TextIter; length: var uint64): uint8Array = + gtk_text_buffer_serialize(cast[ptr TextBuffer00](self.impl), cast[ptr TextBuffer00](contentBuffer.impl), cast[ptr gdk.Atom00](format.impl), cast[ptr TextIter00](start.impl), cast[ptr TextIter00](`end`.impl), length) + +proc gtk_text_buffer_set_modified*(self: ptr TextBuffer00; setting: gboolean) {. + importc: "gtk_text_buffer_set_modified", libprag.} + +proc setModified*(self: TextBuffer; setting: bool) = + gtk_text_buffer_set_modified(cast[ptr TextBuffer00](self.impl), gboolean(setting)) + +proc `modified=`*(self: TextBuffer; setting: bool) = + gtk_text_buffer_set_modified(cast[ptr TextBuffer00](self.impl), gboolean(setting)) + +proc gtk_text_buffer_set_text*(self: ptr TextBuffer00; text: cstring; len: int32) {. + importc: "gtk_text_buffer_set_text", libprag.} + +proc setText*(self: TextBuffer; text: string; len: int) = + gtk_text_buffer_set_text(cast[ptr TextBuffer00](self.impl), cstring(text), int32(len)) + +proc gtk_text_buffer_unregister_deserialize_format*(self: ptr TextBuffer00; format: ptr gdk.Atom00) {. + importc: "gtk_text_buffer_unregister_deserialize_format", libprag.} + +proc unregisterDeserializeFormat*(self: TextBuffer; format: gdk.Atom) = + gtk_text_buffer_unregister_deserialize_format(cast[ptr TextBuffer00](self.impl), cast[ptr gdk.Atom00](format.impl)) + +proc gtk_text_buffer_unregister_serialize_format*(self: ptr TextBuffer00; format: ptr gdk.Atom00) {. + importc: "gtk_text_buffer_unregister_serialize_format", libprag.} + +proc unregisterSerializeFormat*(self: TextBuffer; format: gdk.Atom) = + gtk_text_buffer_unregister_serialize_format(cast[ptr TextBuffer00](self.impl), cast[ptr gdk.Atom00](format.impl)) + +proc gtk_selection_data_targets_include_rich_text*(self: ptr SelectionData00; buffer: ptr TextBuffer00): gboolean {. + importc: "gtk_selection_data_targets_include_rich_text", libprag.} + +proc targetsIncludeRichText*(self: SelectionData; buffer: TextBuffer): bool = + toBool(gtk_selection_data_targets_include_rich_text(cast[ptr SelectionData00](self.impl), cast[ptr TextBuffer00](buffer.impl))) + +proc gtk_target_list_add_rich_text_targets*(self: ptr TargetList00; info: uint32; deserializable: gboolean; + buffer: ptr TextBuffer00) {. + importc: "gtk_target_list_add_rich_text_targets", libprag.} + +proc addRichTextTargets*(self: TargetList; info: int; deserializable: bool; + buffer: TextBuffer) = + gtk_target_list_add_rich_text_targets(cast[ptr TargetList00](self.impl), uint32(info), gboolean(deserializable), cast[ptr TextBuffer00](buffer.impl)) + +proc gtk_clipboard_wait_for_rich_text*(self: ptr Clipboard00; buffer: ptr TextBuffer00; format: var ptr gdk.Atom00; + length: var uint64): uint8Array {. + importc: "gtk_clipboard_wait_for_rich_text", libprag.} + +proc waitForRichText*(self: ptr Clipboard00; buffer: ptr TextBuffer00; format: var ptr gdk.Atom00; + length: var uint64): uint8Array {. + importc: "gtk_clipboard_wait_for_rich_text", libprag.} + +proc gtk_clipboard_wait_is_rich_text_available*(self: ptr Clipboard00; buffer: ptr TextBuffer00): gboolean {. + importc: "gtk_clipboard_wait_is_rich_text_available", libprag.} + +proc waitIsRichTextAvailable*(self: Clipboard; buffer: TextBuffer): bool = + toBool(gtk_clipboard_wait_is_rich_text_available(cast[ptr Clipboard00](self.impl), cast[ptr TextBuffer00](buffer.impl))) + +proc gtk_text_iter_get_buffer*(self: ptr TextIter00): ptr TextBuffer00 {. + importc: "gtk_text_iter_get_buffer", libprag.} + +proc getBuffer*(self: TextIter): TextBuffer = + let gobj = gtk_text_iter_get_buffer(cast[ptr TextIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextBuffer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc buffer*(self: TextIter): TextBuffer = + let gobj = gtk_text_iter_get_buffer(cast[ptr TextIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextBuffer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_mark_get_buffer*(self: ptr TextMark00): ptr TextBuffer00 {. + importc: "gtk_text_mark_get_buffer", libprag.} + +proc getBuffer*(self: TextMark): TextBuffer = + let gobj = gtk_text_mark_get_buffer(cast[ptr TextMark00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextBuffer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc buffer*(self: TextMark): TextBuffer = + let gobj = gtk_text_mark_get_buffer(cast[ptr TextMark00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextBuffer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + TextTagTablePrivate00* {.pure.} = object + TextTagTablePrivate* = ref object + impl*: ptr TextTagTablePrivate00 + +type + TextTagTable* = ref object of gobject.Object + TextTagTable00* = object of gobject.Object00 + priv1: ptr TextTagTablePrivate00 + +proc scTagAdded*(self: TextTagTable; p: proc (self: ptr gobject.Object00; tag: TextTag00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "tag-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scTagChanged*(self: TextTagTable; p: proc (self: ptr gobject.Object00; tag: TextTag00; sizeChanged: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "tag-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scTagRemoved*(self: TextTagTable; p: proc (self: ptr gobject.Object00; tag: TextTag00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "tag-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_text_tag_table_new*(): ptr TextTagTable00 {. + importc: "gtk_text_tag_table_new", libprag.} + +proc newTextTagTable*(): TextTagTable = + new(result, finalizeGObject) + result.impl = gtk_text_tag_table_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTextTagTable*[T](result: var T) = + assert(result is TextTagTable) + new(result, finalizeGObject) + result.impl = gtk_text_tag_table_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_tag_table_add*(self: ptr TextTagTable00; tag: ptr TextTag00): gboolean {. + importc: "gtk_text_tag_table_add", libprag.} + +proc add*(self: TextTagTable; tag: TextTag): bool = + toBool(gtk_text_tag_table_add(cast[ptr TextTagTable00](self.impl), cast[ptr TextTag00](tag.impl))) + +proc gtk_text_tag_table_get_size*(self: ptr TextTagTable00): int32 {. + importc: "gtk_text_tag_table_get_size", libprag.} + +proc getSize*(self: TextTagTable): int = + int(gtk_text_tag_table_get_size(cast[ptr TextTagTable00](self.impl))) + +proc size*(self: TextTagTable): int = + int(gtk_text_tag_table_get_size(cast[ptr TextTagTable00](self.impl))) + +proc gtk_text_tag_table_lookup*(self: ptr TextTagTable00; name: cstring): ptr TextTag00 {. + importc: "gtk_text_tag_table_lookup", libprag.} + +proc lookup*(self: TextTagTable; name: string): TextTag = + let gobj = gtk_text_tag_table_lookup(cast[ptr TextTagTable00](self.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextTag](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_tag_table_remove*(self: ptr TextTagTable00; tag: ptr TextTag00) {. + importc: "gtk_text_tag_table_remove", libprag.} + +proc remove*(self: TextTagTable; tag: TextTag) = + gtk_text_tag_table_remove(cast[ptr TextTagTable00](self.impl), cast[ptr TextTag00](tag.impl)) + +proc gtk_text_buffer_new*(table: ptr TextTagTable00): ptr TextBuffer00 {. + importc: "gtk_text_buffer_new", libprag.} + +proc newTextBuffer*(table: TextTagTable): TextBuffer = + new(result, finalizeGObject) + result.impl = gtk_text_buffer_new(cast[ptr TextTagTable00](table.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTextBuffer*[T](result: var T; table: TextTagTable) = + assert(result is TextBuffer) + new(result, finalizeGObject) + result.impl = gtk_text_buffer_new(cast[ptr TextTagTable00](table.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_buffer_get_tag_table*(self: ptr TextBuffer00): ptr TextTagTable00 {. + importc: "gtk_text_buffer_get_tag_table", libprag.} + +proc getTagTable*(self: TextBuffer): TextTagTable = + let gobj = gtk_text_buffer_get_tag_table(cast[ptr TextBuffer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextTagTable](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc tagTable*(self: TextBuffer): TextTagTable = + let gobj = gtk_text_buffer_get_tag_table(cast[ptr TextBuffer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextTagTable](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + WidgetClassPrivate00* {.pure.} = object + WidgetClassPrivate* = ref object + impl*: ptr WidgetClassPrivate00 + +type + WidgetClass00* {.pure.} = object + parentClass*: gobject.InitiallyUnownedClass00 + activateSignal*: uint32 + dispatchChildPropertiesChanged*: proc(widget: ptr Widget00; nPspecs: uint32; pspecs: ptr gobject.ParamSpec00) {.cdecl.} + destroy*: proc(widget: ptr Widget00) {.cdecl.} + show*: proc(widget: ptr Widget00) {.cdecl.} + showAll*: proc(widget: ptr Widget00) {.cdecl.} + hide*: proc(widget: ptr Widget00) {.cdecl.} + map*: proc(widget: ptr Widget00) {.cdecl.} + unmap*: proc(widget: ptr Widget00) {.cdecl.} + realize*: proc(widget: ptr Widget00) {.cdecl.} + unrealize*: proc(widget: ptr Widget00) {.cdecl.} + sizeAllocate*: proc(widget: ptr Widget00; allocation: ptr gdk.Rectangle00) {.cdecl.} + stateChanged*: proc(widget: ptr Widget00; previousState: StateType) {.cdecl.} + stateFlagsChanged*: proc(widget: ptr Widget00; previousStateFlags: StateFlags) {.cdecl.} + parentSet*: proc(widget: ptr Widget00; previousParent: ptr Widget00) {.cdecl.} + hierarchyChanged*: proc(widget: ptr Widget00; previousToplevel: ptr Widget00) {.cdecl.} + styleSet*: proc(widget: ptr Widget00; previousStyle: ptr Style00) {.cdecl.} + directionChanged*: proc(widget: ptr Widget00; previousDirection: TextDirection) {.cdecl.} + grabNotify*: proc(widget: ptr Widget00; wasGrabbed: gboolean) {.cdecl.} + childNotify*: proc(widget: ptr Widget00; childProperty: ptr gobject.ParamSpec00) {.cdecl.} + draw*: proc(widget: ptr Widget00; cr: ptr cairo.Context00): gboolean {.cdecl.} + getRequestMode*: proc(widget: ptr Widget00): SizeRequestMode {.cdecl.} + getPreferredHeight*: proc(widget: ptr Widget00; minimumHeight: var int32; naturalHeight: var int32) {.cdecl.} + getPreferredWidthForHeight*: proc(widget: ptr Widget00; height: int32; minimumWidth: var int32; + naturalWidth: var int32) {.cdecl.} + getPreferredWidth*: proc(widget: ptr Widget00; minimumWidth: var int32; naturalWidth: var int32) {.cdecl.} + getPreferredHeightForWidth*: proc(widget: ptr Widget00; width: int32; minimumHeight: var int32; + naturalHeight: var int32) {.cdecl.} + mnemonicActivate*: proc(widget: ptr Widget00; groupCycling: gboolean): gboolean {.cdecl.} + grabFocus*: proc(widget: ptr Widget00) {.cdecl.} + focus*: proc(widget: ptr Widget00; direction: DirectionType): gboolean {.cdecl.} + moveFocus*: proc(widget: ptr Widget00; direction: DirectionType) {.cdecl.} + keynavFailed*: proc(widget: ptr Widget00; direction: DirectionType): gboolean {.cdecl.} + event*: proc(widget: ptr Widget00; event: ptr gdk.Event00): gboolean {.cdecl.} + buttonPressEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventButton00): gboolean {.cdecl.} + buttonReleaseEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventButton00): gboolean {.cdecl.} + scrollEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventScroll00): gboolean {.cdecl.} + motionNotifyEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventMotion00): gboolean {.cdecl.} + deleteEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventAny00): gboolean {.cdecl.} + destroyEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventAny00): gboolean {.cdecl.} + keyPressEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventKey00): gboolean {.cdecl.} + keyReleaseEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventKey00): gboolean {.cdecl.} + enterNotifyEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventCrossing00): gboolean {.cdecl.} + leaveNotifyEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventCrossing00): gboolean {.cdecl.} + configureEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventConfigure00): gboolean {.cdecl.} + focusInEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventFocus00): gboolean {.cdecl.} + focusOutEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventFocus00): gboolean {.cdecl.} + mapEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventAny00): gboolean {.cdecl.} + unmapEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventAny00): gboolean {.cdecl.} + propertyNotifyEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventProperty00): gboolean {.cdecl.} + selectionClearEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventSelection00): gboolean {.cdecl.} + selectionRequestEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventSelection00): gboolean {.cdecl.} + selectionNotifyEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventSelection00): gboolean {.cdecl.} + proximityInEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventProximity00): gboolean {.cdecl.} + proximityOutEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventProximity00): gboolean {.cdecl.} + visibilityNotifyEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventVisibility00): gboolean {.cdecl.} + windowStateEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventWindowState00): gboolean {.cdecl.} + damageEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventExpose00): gboolean {.cdecl.} + grabBrokenEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventGrabBroken00): gboolean {.cdecl.} + selectionGet*: proc(widget: ptr Widget00; selectionData: ptr SelectionData00; + info: uint32; time: uint32) {.cdecl.} + selectionReceived*: proc(widget: ptr Widget00; selectionData: ptr SelectionData00; + time: uint32) {.cdecl.} + dragBegin*: proc(widget: ptr Widget00; context: ptr gdk.DragContext00) {.cdecl.} + dragEnd*: proc(widget: ptr Widget00; context: ptr gdk.DragContext00) {.cdecl.} + dragDataGet*: proc(widget: ptr Widget00; context: ptr gdk.DragContext00; + selectionData: ptr SelectionData00; info: uint32; time: uint32) {.cdecl.} + dragDataDelete*: proc(widget: ptr Widget00; context: ptr gdk.DragContext00) {.cdecl.} + dragLeave*: proc(widget: ptr Widget00; context: ptr gdk.DragContext00; + time: uint32) {.cdecl.} + dragMotion*: proc(widget: ptr Widget00; context: ptr gdk.DragContext00; + x: int32; y: int32; time: uint32): gboolean {.cdecl.} + dragDrop*: proc(widget: ptr Widget00; context: ptr gdk.DragContext00; + x: int32; y: int32; time: uint32): gboolean {.cdecl.} + dragDataReceived*: proc(widget: ptr Widget00; context: ptr gdk.DragContext00; + x: int32; y: int32; selectionData: ptr SelectionData00; info: uint32; time: uint32) {.cdecl.} + dragFailed*: proc(widget: ptr Widget00; context: ptr gdk.DragContext00; + resu: DragResult): gboolean {.cdecl.} + popupMenu*: proc(widget: ptr Widget00): gboolean {.cdecl.} + showHelp*: proc(widget: ptr Widget00; helpType: WidgetHelpType): gboolean {.cdecl.} + getAccessible*: proc(widget: ptr Widget00): ptr atk.Object00 {.cdecl.} + screenChanged*: proc(widget: ptr Widget00; previousScreen: ptr gdk.Screen00) {.cdecl.} + canActivateAccel*: proc(widget: ptr Widget00; signalId: uint32): gboolean {.cdecl.} + compositedChanged*: proc(widget: ptr Widget00) {.cdecl.} + queryTooltip*: proc(widget: ptr Widget00; x: int32; y: int32; keyboardTooltip: gboolean; + tooltip: ptr Tooltip00): gboolean {.cdecl.} + computeExpand*: proc(widget: ptr Widget00; hexpandP: ptr gboolean; vexpandP: ptr gboolean) {.cdecl.} + adjustSizeRequest*: proc(widget: ptr Widget00; orientation: Orientation; minimumSize: ptr int32; + naturalSize: ptr int32) {.cdecl.} + adjustSizeAllocation*: proc(widget: ptr Widget00; orientation: Orientation; minimumSize: ptr int32; + naturalSize: ptr int32; allocatedPos: ptr int32; allocatedSize: ptr int32) {.cdecl.} + styleUpdated*: proc(widget: ptr Widget00) {.cdecl.} + touchEvent*: proc(widget: ptr Widget00; event: ptr gdk.EventTouch00): gboolean {.cdecl.} + getPreferredHeightAndBaselineForWidth*: proc(widget: ptr Widget00; width: int32; minimumHeight: var int32; + naturalHeight: var int32; minimumBaseline: var int32; naturalBaseline: var int32) {.cdecl.} + adjustBaselineRequest*: proc(widget: ptr Widget00; minimumBaseline: ptr int32; + naturalBaseline: ptr int32) {.cdecl.} + adjustBaselineAllocation*: proc(widget: ptr Widget00; baseline: ptr int32) {.cdecl.} + queueDrawRegion*: proc(widget: ptr Widget00; region: ptr cairo.Region00) {.cdecl.} + priv*: ptr WidgetClassPrivate00 + gtkReserved6*: pointer + gtkReserved7*: pointer + WidgetClass* = ref object + impl*: ptr WidgetClass00 + +proc gtk_widget_class_bind_template_child_full*(self: ptr WidgetClass00; name: cstring; internalChild: gboolean; + structOffset: int64) {. + importc: "gtk_widget_class_bind_template_child_full", libprag.} + +proc bindTemplateChildFull*(self: WidgetClass; name: string; internalChild: bool; + structOffset: int64) = + gtk_widget_class_bind_template_child_full(cast[ptr WidgetClass00](self.impl), cstring(name), gboolean(internalChild), structOffset) + +proc gtk_widget_class_find_style_property*(self: ptr WidgetClass00; propertyName: cstring): ptr gobject.ParamSpec00 {. + importc: "gtk_widget_class_find_style_property", libprag.} + +proc gtk_widget_class_get_css_name*(self: ptr WidgetClass00): cstring {. + importc: "gtk_widget_class_get_css_name", libprag.} + +proc getCssName*(self: WidgetClass): string = + let resul0 = gtk_widget_class_get_css_name(cast[ptr WidgetClass00](self.impl)) + result = $resul0 + +proc cssName*(self: WidgetClass): string = + let resul0 = gtk_widget_class_get_css_name(cast[ptr WidgetClass00](self.impl)) + result = $resul0 + +proc gtk_widget_class_install_style_property*(self: ptr WidgetClass00; pspec: ptr gobject.ParamSpec00) {. + importc: "gtk_widget_class_install_style_property", libprag.} + +proc installStyleProperty*(self: WidgetClass; pspec: gobject.ParamSpec) = + gtk_widget_class_install_style_property(cast[ptr WidgetClass00](self.impl), cast[ptr gobject.ParamSpec00](pspec.impl)) + +proc gtk_widget_class_list_style_properties*(self: ptr WidgetClass00; nProperties: var uint32): ptr gobject.ParamSpec00Array {. + importc: "gtk_widget_class_list_style_properties", libprag.} + +proc listStyleProperties*(self: WidgetClass; nProperties: var int): ptr gobject.ParamSpec00Array = + var nProperties_00 = uint32(nProperties) + result = gtk_widget_class_list_style_properties(cast[ptr WidgetClass00](self.impl), nProperties_00) + nProperties = int(nProperties_00) + +proc gtk_widget_class_set_accessible_role*(self: ptr WidgetClass00; role: atk.Role) {. + importc: "gtk_widget_class_set_accessible_role", libprag.} + +proc setAccessibleRole*(self: WidgetClass; role: atk.Role) = + gtk_widget_class_set_accessible_role(cast[ptr WidgetClass00](self.impl), role) + +proc `accessibleRole=`*(self: WidgetClass; role: atk.Role) = + gtk_widget_class_set_accessible_role(cast[ptr WidgetClass00](self.impl), role) + +proc gtk_widget_class_set_accessible_type*(self: ptr WidgetClass00; `type`: GType) {. + importc: "gtk_widget_class_set_accessible_type", libprag.} + +proc setAccessibleType*(self: WidgetClass; `type`: GType) = + gtk_widget_class_set_accessible_type(cast[ptr WidgetClass00](self.impl), `type`) + +proc `accessibleType=`*(self: WidgetClass; `type`: GType) = + gtk_widget_class_set_accessible_type(cast[ptr WidgetClass00](self.impl), `type`) + +proc gtk_widget_class_set_css_name*(self: ptr WidgetClass00; name: cstring) {. + importc: "gtk_widget_class_set_css_name", libprag.} + +proc setCssName*(self: WidgetClass; name: string) = + gtk_widget_class_set_css_name(cast[ptr WidgetClass00](self.impl), cstring(name)) + +proc `cssName=`*(self: WidgetClass; name: string) = + gtk_widget_class_set_css_name(cast[ptr WidgetClass00](self.impl), cstring(name)) + +proc gtk_widget_class_set_template*(self: ptr WidgetClass00; templateBytes: ptr glib.Bytes00) {. + importc: "gtk_widget_class_set_template", libprag.} + +proc setTemplate*(self: WidgetClass; templateBytes: glib.Bytes) = + gtk_widget_class_set_template(cast[ptr WidgetClass00](self.impl), cast[ptr glib.Bytes00](templateBytes.impl)) + +proc `template=`*(self: WidgetClass; templateBytes: glib.Bytes) = + gtk_widget_class_set_template(cast[ptr WidgetClass00](self.impl), cast[ptr glib.Bytes00](templateBytes.impl)) + +proc gtk_widget_class_set_template_from_resource*(self: ptr WidgetClass00; resourceName: cstring) {. + importc: "gtk_widget_class_set_template_from_resource", libprag.} + +proc setTemplateFromResource*(self: WidgetClass; resourceName: string) = + gtk_widget_class_set_template_from_resource(cast[ptr WidgetClass00](self.impl), cstring(resourceName)) + +proc `templateFromResource=`*(self: WidgetClass; resourceName: string) = + gtk_widget_class_set_template_from_resource(cast[ptr WidgetClass00](self.impl), cstring(resourceName)) + +type + AccelGroupActivate* = proc (accelGroup: ptr AccelGroup00; acceleratable: ptr gobject.Object00; + keyval: uint32; modifier: gdk.ModifierType): gboolean {.cdecl.} + +type + AccelGroupClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + accelChanged*: proc(accelGroup: ptr AccelGroup00; keyval: uint32; modifier: gdk.ModifierType; + accelClosure: ptr gobject.Closure00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + AccelGroupClass* = ref object + impl*: ptr AccelGroupClass00 + +type + AccelGroupFindFunc* = proc (key: ptr AccelKey00; closure: ptr gobject.Closure00; + data: pointer): gboolean {.cdecl.} + +proc gtk_accel_group_find*(self: ptr AccelGroup00; findFunc: AccelGroupFindFunc; + data: pointer): ptr AccelKey00 {. + importc: "gtk_accel_group_find", libprag.} + +proc find*(self: AccelGroup; findFunc: AccelGroupFindFunc; data: pointer): AccelKey = + new(result) + result.impl = gtk_accel_group_find(cast[ptr AccelGroup00](self.impl), findFunc, data) + +type + MiscPrivate00* {.pure.} = object + MiscPrivate* = ref object + impl*: ptr MiscPrivate00 + +type + Misc* = ref object of Widget + Misc00* = object of Widget00 + priv2: ptr MiscPrivate00 + +proc gtk_misc_get_alignment*(self: ptr Misc00; xalign: var cfloat; yalign: var cfloat) {. + importc: "gtk_misc_get_alignment", libprag.} + +proc getAlignment*(self: Misc; xalign: var cfloat; yalign: var cfloat) = + gtk_misc_get_alignment(cast[ptr Misc00](self.impl), xalign, yalign) + +proc alignment*(self: Misc; xalign: var cfloat; yalign: var cfloat) = + gtk_misc_get_alignment(cast[ptr Misc00](self.impl), xalign, yalign) + +proc gtk_misc_get_padding*(self: ptr Misc00; xpad: var int32; ypad: var int32) {. + importc: "gtk_misc_get_padding", libprag.} + +proc getPadding*(self: Misc; xpad: var int; ypad: var int) = + var xpad_00 = int32(xpad) + var ypad_00 = int32(ypad) + gtk_misc_get_padding(cast[ptr Misc00](self.impl), xpad_00, ypad_00) + xpad = int(xpad_00) + ypad = int(ypad_00) + +proc padding*(self: Misc; xpad: var int; ypad: var int) = + var xpad_00 = int32(xpad) + var ypad_00 = int32(ypad) + gtk_misc_get_padding(cast[ptr Misc00](self.impl), xpad_00, ypad_00) + xpad = int(xpad_00) + ypad = int(ypad_00) + +proc gtk_misc_set_alignment*(self: ptr Misc00; xalign: cfloat; yalign: cfloat) {. + importc: "gtk_misc_set_alignment", libprag.} + +proc setAlignment*(self: Misc; xalign: cfloat; yalign: cfloat) = + gtk_misc_set_alignment(cast[ptr Misc00](self.impl), xalign, yalign) + +proc gtk_misc_set_padding*(self: ptr Misc00; xpad: int32; ypad: int32) {. + importc: "gtk_misc_set_padding", libprag.} + +proc setPadding*(self: Misc; xpad: int; ypad: int) = + gtk_misc_set_padding(cast[ptr Misc00](self.impl), int32(xpad), int32(ypad)) + +type + LabelPrivate00* {.pure.} = object + LabelPrivate* = ref object + impl*: ptr LabelPrivate00 + +type + MovementStep* {.size: sizeof(cint), pure.} = enum + logicalPositions = 0 + visualPositions = 1 + words = 2 + displayLines = 3 + displayLineEnds = 4 + paragraphs = 5 + paragraphEnds = 6 + pages = 7 + bufferEnds = 8 + horizontalPages = 9 + +type + MenuShellPrivate00* {.pure.} = object + MenuShellPrivate* = ref object + impl*: ptr MenuShellPrivate00 + +type + MenuDirectionType* {.size: sizeof(cint), pure.} = enum + parent = 0 + child = 1 + next = 2 + prev = 3 + +type + MenuShell* = ref object of Container + MenuShell00* = object of Container00 + priv3: ptr MenuShellPrivate00 + +proc scActivateCurrent*(self: MenuShell; p: proc (self: ptr gobject.Object00; forceHide: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-current", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCancel*(self: MenuShell; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cancel", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCycleFocus*(self: MenuShell; p: proc (self: ptr gobject.Object00; direction: DirectionType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cycle-focus", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeactivate*(self: MenuShell; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "deactivate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInsert*(self: MenuShell; p: proc (self: ptr gobject.Object00; child: Widget00; position: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "insert", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveCurrent*(self: MenuShell; p: proc (self: ptr gobject.Object00; direction: MenuDirectionType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-current", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveSelected*(self: MenuShell; p: proc (self: ptr gobject.Object00; distance: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-selected", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectionDone*(self: MenuShell; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "selection-done", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_menu_shell_activate_item*(self: ptr MenuShell00; menuItem: ptr Widget00; forceDeactivate: gboolean) {. + importc: "gtk_menu_shell_activate_item", libprag.} + +proc activateItem*(self: MenuShell; menuItem: Widget; forceDeactivate: bool) = + gtk_menu_shell_activate_item(cast[ptr MenuShell00](self.impl), cast[ptr Widget00](menuItem.impl), gboolean(forceDeactivate)) + +proc gtk_menu_shell_bind_model*(self: ptr MenuShell00; model: ptr gio.MenuModel00; + actionNamespace: cstring; withSeparators: gboolean) {. + importc: "gtk_menu_shell_bind_model", libprag.} + +proc bindModel*(self: MenuShell; model: gio.MenuModel; actionNamespace: string; + withSeparators: bool) = + gtk_menu_shell_bind_model(cast[ptr MenuShell00](self.impl), cast[ptr gio.MenuModel00](model.impl), cstring(actionNamespace), gboolean(withSeparators)) + +proc gtk_menu_shell_cancel*(self: ptr MenuShell00) {. + importc: "gtk_menu_shell_cancel", libprag.} + +proc cancel*(self: MenuShell) = + gtk_menu_shell_cancel(cast[ptr MenuShell00](self.impl)) + +proc gtk_menu_shell_deactivate*(self: ptr MenuShell00) {. + importc: "gtk_menu_shell_deactivate", libprag.} + +proc deactivate*(self: MenuShell) = + gtk_menu_shell_deactivate(cast[ptr MenuShell00](self.impl)) + +proc gtk_menu_shell_deselect*(self: ptr MenuShell00) {. + importc: "gtk_menu_shell_deselect", libprag.} + +proc deselect*(self: MenuShell) = + gtk_menu_shell_deselect(cast[ptr MenuShell00](self.impl)) + +proc gtk_menu_shell_get_parent_shell*(self: ptr MenuShell00): ptr Widget00 {. + importc: "gtk_menu_shell_get_parent_shell", libprag.} + +proc getParentShell*(self: MenuShell): Widget = + let gobj = gtk_menu_shell_get_parent_shell(cast[ptr MenuShell00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc parentShell*(self: MenuShell): Widget = + let gobj = gtk_menu_shell_get_parent_shell(cast[ptr MenuShell00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_shell_get_selected_item*(self: ptr MenuShell00): ptr Widget00 {. + importc: "gtk_menu_shell_get_selected_item", libprag.} + +proc getSelectedItem*(self: MenuShell): Widget = + let gobj = gtk_menu_shell_get_selected_item(cast[ptr MenuShell00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc selectedItem*(self: MenuShell): Widget = + let gobj = gtk_menu_shell_get_selected_item(cast[ptr MenuShell00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_shell_get_take_focus*(self: ptr MenuShell00): gboolean {. + importc: "gtk_menu_shell_get_take_focus", libprag.} + +proc getTakeFocus*(self: MenuShell): bool = + toBool(gtk_menu_shell_get_take_focus(cast[ptr MenuShell00](self.impl))) + +proc takeFocus*(self: MenuShell): bool = + toBool(gtk_menu_shell_get_take_focus(cast[ptr MenuShell00](self.impl))) + +proc gtk_menu_shell_insert*(self: ptr MenuShell00; child: ptr Widget00; position: int32) {. + importc: "gtk_menu_shell_insert", libprag.} + +proc insert*(self: MenuShell; child: Widget; position: int) = + gtk_menu_shell_insert(cast[ptr MenuShell00](self.impl), cast[ptr Widget00](child.impl), int32(position)) + +proc gtk_menu_shell_prepend*(self: ptr MenuShell00; child: ptr Widget00) {. + importc: "gtk_menu_shell_prepend", libprag.} + +proc prepend*(self: MenuShell; child: Widget) = + gtk_menu_shell_prepend(cast[ptr MenuShell00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_menu_shell_select_first*(self: ptr MenuShell00; searchSensitive: gboolean) {. + importc: "gtk_menu_shell_select_first", libprag.} + +proc selectFirst*(self: MenuShell; searchSensitive: bool) = + gtk_menu_shell_select_first(cast[ptr MenuShell00](self.impl), gboolean(searchSensitive)) + +proc gtk_menu_shell_select_item*(self: ptr MenuShell00; menuItem: ptr Widget00) {. + importc: "gtk_menu_shell_select_item", libprag.} + +proc selectItem*(self: MenuShell; menuItem: Widget) = + gtk_menu_shell_select_item(cast[ptr MenuShell00](self.impl), cast[ptr Widget00](menuItem.impl)) + +proc gtk_menu_shell_set_take_focus*(self: ptr MenuShell00; takeFocus: gboolean) {. + importc: "gtk_menu_shell_set_take_focus", libprag.} + +proc setTakeFocus*(self: MenuShell; takeFocus: bool) = + gtk_menu_shell_set_take_focus(cast[ptr MenuShell00](self.impl), gboolean(takeFocus)) + +proc `takeFocus=`*(self: MenuShell; takeFocus: bool) = + gtk_menu_shell_set_take_focus(cast[ptr MenuShell00](self.impl), gboolean(takeFocus)) + +type + MenuPrivate00* {.pure.} = object + MenuPrivate* = ref object + impl*: ptr MenuPrivate00 + +type + ScrollType* {.size: sizeof(cint), pure.} = enum + none = 0 + jump = 1 + stepBackward = 2 + stepForward = 3 + pageBackward = 4 + pageForward = 5 + stepUp = 6 + stepDown = 7 + pageUp = 8 + pageDown = 9 + stepLeft = 10 + stepRight = 11 + pageLeft = 12 + pageRight = 13 + start = 14 + `end` = 15 + +type + Menu* = ref object of MenuShell + Menu00* = object of MenuShell00 + priv4: ptr MenuPrivate00 + +proc scMoveScroll*(self: Menu; p: proc (self: ptr gobject.Object00; scrollType: ScrollType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-scroll", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPoppedUp*(self: Menu; p: proc (self: ptr gobject.Object00; flippedRect: pointer; finalRect: pointer; flippedX: gboolean; + flippedY: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "popped-up", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_menu_new*(): ptr Menu00 {. + importc: "gtk_menu_new", libprag.} + +proc newMenu*(): Menu = + new(result, finalizeGObject) + result.impl = gtk_menu_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenu*[T](result: var T) = + assert(result is Menu) + new(result, finalizeGObject) + result.impl = gtk_menu_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_new_from_model*(model: ptr gio.MenuModel00): ptr Menu00 {. + importc: "gtk_menu_new_from_model", libprag.} + +proc newMenuFromModel*(model: gio.MenuModel): Menu = + new(result, finalizeGObject) + result.impl = gtk_menu_new_from_model(cast[ptr gio.MenuModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuFromModel*[T](result: var T; model: gio.MenuModel) = + assert(result is Menu) + new(result, finalizeGObject) + result.impl = gtk_menu_new_from_model(cast[ptr gio.MenuModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_get_for_attach_widget*(widget: ptr Widget00): ptr pointer {. + importc: "gtk_menu_get_for_attach_widget", libprag.} + +proc getForAttachWidget*(widget: Widget): ptr pointer = + gtk_menu_get_for_attach_widget(cast[ptr Widget00](widget.impl)) + +proc forAttachWidget*(widget: Widget): ptr pointer = + gtk_menu_get_for_attach_widget(cast[ptr Widget00](widget.impl)) + +proc gtk_menu_attach*(self: ptr Menu00; child: ptr Widget00; leftAttach: uint32; + rightAttach: uint32; topAttach: uint32; bottomAttach: uint32) {. + importc: "gtk_menu_attach", libprag.} + +proc attach*(self: Menu; child: Widget; leftAttach: int; rightAttach: int; + topAttach: int; bottomAttach: int) = + gtk_menu_attach(cast[ptr Menu00](self.impl), cast[ptr Widget00](child.impl), uint32(leftAttach), uint32(rightAttach), uint32(topAttach), uint32(bottomAttach)) + +proc gtk_menu_detach*(self: ptr Menu00) {. + importc: "gtk_menu_detach", libprag.} + +proc detach*(self: Menu) = + gtk_menu_detach(cast[ptr Menu00](self.impl)) + +proc gtk_menu_get_accel_group*(self: ptr Menu00): ptr AccelGroup00 {. + importc: "gtk_menu_get_accel_group", libprag.} + +proc getAccelGroup*(self: Menu): AccelGroup = + let gobj = gtk_menu_get_accel_group(cast[ptr Menu00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AccelGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc accelGroup*(self: Menu): AccelGroup = + let gobj = gtk_menu_get_accel_group(cast[ptr Menu00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AccelGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_get_accel_path*(self: ptr Menu00): cstring {. + importc: "gtk_menu_get_accel_path", libprag.} + +proc getAccelPath*(self: Menu): string = + let resul0 = gtk_menu_get_accel_path(cast[ptr Menu00](self.impl)) + result = $resul0 + +proc accelPath*(self: Menu): string = + let resul0 = gtk_menu_get_accel_path(cast[ptr Menu00](self.impl)) + result = $resul0 + +proc gtk_menu_get_active*(self: ptr Menu00): ptr Widget00 {. + importc: "gtk_menu_get_active", libprag.} + +proc getActive*(self: Menu): Widget = + let gobj = gtk_menu_get_active(cast[ptr Menu00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc active*(self: Menu): Widget = + let gobj = gtk_menu_get_active(cast[ptr Menu00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_get_attach_widget*(self: ptr Menu00): ptr Widget00 {. + importc: "gtk_menu_get_attach_widget", libprag.} + +proc getAttachWidget*(self: Menu): Widget = + let gobj = gtk_menu_get_attach_widget(cast[ptr Menu00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc attachWidget*(self: Menu): Widget = + let gobj = gtk_menu_get_attach_widget(cast[ptr Menu00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_get_monitor*(self: ptr Menu00): int32 {. + importc: "gtk_menu_get_monitor", libprag.} + +proc getMonitor*(self: Menu): int = + int(gtk_menu_get_monitor(cast[ptr Menu00](self.impl))) + +proc monitor*(self: Menu): int = + int(gtk_menu_get_monitor(cast[ptr Menu00](self.impl))) + +proc gtk_menu_get_reserve_toggle_size*(self: ptr Menu00): gboolean {. + importc: "gtk_menu_get_reserve_toggle_size", libprag.} + +proc getReserveToggleSize*(self: Menu): bool = + toBool(gtk_menu_get_reserve_toggle_size(cast[ptr Menu00](self.impl))) + +proc reserveToggleSize*(self: Menu): bool = + toBool(gtk_menu_get_reserve_toggle_size(cast[ptr Menu00](self.impl))) + +proc gtk_menu_get_tearoff_state*(self: ptr Menu00): gboolean {. + importc: "gtk_menu_get_tearoff_state", libprag.} + +proc getTearoffState*(self: Menu): bool = + toBool(gtk_menu_get_tearoff_state(cast[ptr Menu00](self.impl))) + +proc tearoffState*(self: Menu): bool = + toBool(gtk_menu_get_tearoff_state(cast[ptr Menu00](self.impl))) + +proc gtk_menu_get_title*(self: ptr Menu00): cstring {. + importc: "gtk_menu_get_title", libprag.} + +proc getTitle*(self: Menu): string = + let resul0 = gtk_menu_get_title(cast[ptr Menu00](self.impl)) + result = $resul0 + +proc title*(self: Menu): string = + let resul0 = gtk_menu_get_title(cast[ptr Menu00](self.impl)) + result = $resul0 + +proc gtk_menu_place_on_monitor*(self: ptr Menu00; monitor: ptr gdk.Monitor00) {. + importc: "gtk_menu_place_on_monitor", libprag.} + +proc placeOnMonitor*(self: Menu; monitor: gdk.Monitor) = + gtk_menu_place_on_monitor(cast[ptr Menu00](self.impl), cast[ptr gdk.Monitor00](monitor.impl)) + +proc gtk_menu_popdown*(self: ptr Menu00) {. + importc: "gtk_menu_popdown", libprag.} + +proc popdown*(self: Menu) = + gtk_menu_popdown(cast[ptr Menu00](self.impl)) + +proc gtk_menu_popup_at_pointer*(self: ptr Menu00; triggerEvent: ptr gdk.Event00) {. + importc: "gtk_menu_popup_at_pointer", libprag.} + +proc popupAtPointer*(self: Menu; triggerEvent: gdk.Event) = + gtk_menu_popup_at_pointer(cast[ptr Menu00](self.impl), cast[ptr gdk.Event00](triggerEvent.impl)) + +proc gtk_menu_popup_at_rect*(self: ptr Menu00; rectWindow: ptr gdk.Window00; rect: ptr gdk.Rectangle00; + rectAnchor: gdk.Gravity; menuAnchor: gdk.Gravity; triggerEvent: ptr gdk.Event00) {. + importc: "gtk_menu_popup_at_rect", libprag.} + +proc popupAtRect*(self: Menu; rectWindow: gdk.Window; rect: gdk.Rectangle; + rectAnchor: gdk.Gravity; menuAnchor: gdk.Gravity; triggerEvent: gdk.Event) = + gtk_menu_popup_at_rect(cast[ptr Menu00](self.impl), cast[ptr gdk.Window00](rectWindow.impl), cast[ptr gdk.Rectangle00](rect.impl), rectAnchor, menuAnchor, cast[ptr gdk.Event00](triggerEvent.impl)) + +proc gtk_menu_popup_at_widget*(self: ptr Menu00; widget: ptr Widget00; widgetAnchor: gdk.Gravity; + menuAnchor: gdk.Gravity; triggerEvent: ptr gdk.Event00) {. + importc: "gtk_menu_popup_at_widget", libprag.} + +proc popupAtWidget*(self: Menu; widget: Widget; widgetAnchor: gdk.Gravity; + menuAnchor: gdk.Gravity; triggerEvent: gdk.Event) = + gtk_menu_popup_at_widget(cast[ptr Menu00](self.impl), cast[ptr Widget00](widget.impl), widgetAnchor, menuAnchor, cast[ptr gdk.Event00](triggerEvent.impl)) + +proc gtk_menu_reorder_child*(self: ptr Menu00; child: ptr Widget00; position: int32) {. + importc: "gtk_menu_reorder_child", libprag.} + +proc reorderChild*(self: Menu; child: Widget; position: int) = + gtk_menu_reorder_child(cast[ptr Menu00](self.impl), cast[ptr Widget00](child.impl), int32(position)) + +proc gtk_menu_reposition*(self: ptr Menu00) {. + importc: "gtk_menu_reposition", libprag.} + +proc reposition*(self: Menu) = + gtk_menu_reposition(cast[ptr Menu00](self.impl)) + +proc gtk_menu_set_accel_group*(self: ptr Menu00; accelGroup: ptr AccelGroup00) {. + importc: "gtk_menu_set_accel_group", libprag.} + +proc setAccelGroup*(self: Menu; accelGroup: AccelGroup) = + gtk_menu_set_accel_group(cast[ptr Menu00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +proc `accelGroup=`*(self: Menu; accelGroup: AccelGroup) = + gtk_menu_set_accel_group(cast[ptr Menu00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +proc gtk_menu_set_accel_path*(self: ptr Menu00; accelPath: cstring) {. + importc: "gtk_menu_set_accel_path", libprag.} + +proc setAccelPath*(self: Menu; accelPath: string) = + gtk_menu_set_accel_path(cast[ptr Menu00](self.impl), cstring(accelPath)) + +proc `accelPath=`*(self: Menu; accelPath: string) = + gtk_menu_set_accel_path(cast[ptr Menu00](self.impl), cstring(accelPath)) + +proc gtk_menu_set_active*(self: ptr Menu00; index: uint32) {. + importc: "gtk_menu_set_active", libprag.} + +proc setActive*(self: Menu; index: int) = + gtk_menu_set_active(cast[ptr Menu00](self.impl), uint32(index)) + +proc `active=`*(self: Menu; index: int) = + gtk_menu_set_active(cast[ptr Menu00](self.impl), uint32(index)) + +proc gtk_menu_set_monitor*(self: ptr Menu00; monitorNum: int32) {. + importc: "gtk_menu_set_monitor", libprag.} + +proc setMonitor*(self: Menu; monitorNum: int) = + gtk_menu_set_monitor(cast[ptr Menu00](self.impl), int32(monitorNum)) + +proc `monitor=`*(self: Menu; monitorNum: int) = + gtk_menu_set_monitor(cast[ptr Menu00](self.impl), int32(monitorNum)) + +proc gtk_menu_set_reserve_toggle_size*(self: ptr Menu00; reserveToggleSize: gboolean) {. + importc: "gtk_menu_set_reserve_toggle_size", libprag.} + +proc setReserveToggleSize*(self: Menu; reserveToggleSize: bool) = + gtk_menu_set_reserve_toggle_size(cast[ptr Menu00](self.impl), gboolean(reserveToggleSize)) + +proc `reserveToggleSize=`*(self: Menu; reserveToggleSize: bool) = + gtk_menu_set_reserve_toggle_size(cast[ptr Menu00](self.impl), gboolean(reserveToggleSize)) + +proc gtk_menu_set_screen*(self: ptr Menu00; screen: ptr gdk.Screen00) {. + importc: "gtk_menu_set_screen", libprag.} + +proc setScreen*(self: Menu; screen: gdk.Screen) = + gtk_menu_set_screen(cast[ptr Menu00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc `screen=`*(self: Menu; screen: gdk.Screen) = + gtk_menu_set_screen(cast[ptr Menu00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc gtk_menu_set_tearoff_state*(self: ptr Menu00; tornOff: gboolean) {. + importc: "gtk_menu_set_tearoff_state", libprag.} + +proc setTearoffState*(self: Menu; tornOff: bool) = + gtk_menu_set_tearoff_state(cast[ptr Menu00](self.impl), gboolean(tornOff)) + +proc `tearoffState=`*(self: Menu; tornOff: bool) = + gtk_menu_set_tearoff_state(cast[ptr Menu00](self.impl), gboolean(tornOff)) + +proc gtk_menu_set_title*(self: ptr Menu00; title: cstring) {. + importc: "gtk_menu_set_title", libprag.} + +proc setTitle*(self: Menu; title: string) = + gtk_menu_set_title(cast[ptr Menu00](self.impl), cstring(title)) + +proc `title=`*(self: Menu; title: string) = + gtk_menu_set_title(cast[ptr Menu00](self.impl), cstring(title)) + +type + Label* = ref object of Misc + Label00* = object of Misc00 + priv3: ptr LabelPrivate00 + +proc scActivateCurrentLink*(self: Label; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-current-link", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scActivateLink*(self: Label; p: proc (self: ptr gobject.Object00; uri: cstring; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-link", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCopyClipboard*(self: Label; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "copy-clipboard", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveCursor*(self: Label; p: proc (self: ptr gobject.Object00; step: MovementStep; count: int32; extendSelection: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopulatePopup*(self: Label; p: proc (self: ptr gobject.Object00; menu: Menu00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "populate-popup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_label_new*(str: cstring): ptr Label00 {. + importc: "gtk_label_new", libprag.} + +proc newLabel*(str: string): Label = + new(result, finalizeGObject) + result.impl = gtk_label_new(cstring(str)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initLabel*[T](result: var T; str: string) = + assert(result is Label) + new(result, finalizeGObject) + result.impl = gtk_label_new(cstring(str)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_label_new_with_mnemonic*(str: cstring): ptr Label00 {. + importc: "gtk_label_new_with_mnemonic", libprag.} + +proc newLabelWithMnemonic*(str: string): Label = + new(result, finalizeGObject) + result.impl = gtk_label_new_with_mnemonic(cstring(str)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initLabelWithMnemonic*[T](result: var T; str: string) = + assert(result is Label) + new(result, finalizeGObject) + result.impl = gtk_label_new_with_mnemonic(cstring(str)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_label_get_angle*(self: ptr Label00): cdouble {. + importc: "gtk_label_get_angle", libprag.} + +proc getAngle*(self: Label): cdouble = + gtk_label_get_angle(cast[ptr Label00](self.impl)) + +proc angle*(self: Label): cdouble = + gtk_label_get_angle(cast[ptr Label00](self.impl)) + +proc gtk_label_get_attributes*(self: ptr Label00): ptr pango.AttrList00 {. + importc: "gtk_label_get_attributes", libprag.} + +proc getAttributes*(self: Label): pango.AttrList = + new(result) + result.impl = gtk_label_get_attributes(cast[ptr Label00](self.impl)) + +proc attributes*(self: Label): pango.AttrList = + new(result) + result.impl = gtk_label_get_attributes(cast[ptr Label00](self.impl)) + +proc gtk_label_get_current_uri*(self: ptr Label00): cstring {. + importc: "gtk_label_get_current_uri", libprag.} + +proc getCurrentUri*(self: Label): string = + let resul0 = gtk_label_get_current_uri(cast[ptr Label00](self.impl)) + result = $resul0 + +proc currentUri*(self: Label): string = + let resul0 = gtk_label_get_current_uri(cast[ptr Label00](self.impl)) + result = $resul0 + +proc gtk_label_get_ellipsize*(self: ptr Label00): pango.EllipsizeMode {. + importc: "gtk_label_get_ellipsize", libprag.} + +proc getEllipsize*(self: Label): pango.EllipsizeMode = + gtk_label_get_ellipsize(cast[ptr Label00](self.impl)) + +proc ellipsize*(self: Label): pango.EllipsizeMode = + gtk_label_get_ellipsize(cast[ptr Label00](self.impl)) + +proc gtk_label_get_justify*(self: ptr Label00): Justification {. + importc: "gtk_label_get_justify", libprag.} + +proc getJustify*(self: Label): Justification = + gtk_label_get_justify(cast[ptr Label00](self.impl)) + +proc justify*(self: Label): Justification = + gtk_label_get_justify(cast[ptr Label00](self.impl)) + +proc gtk_label_get_label*(self: ptr Label00): cstring {. + importc: "gtk_label_get_label", libprag.} + +proc getLabel*(self: Label): string = + let resul0 = gtk_label_get_label(cast[ptr Label00](self.impl)) + result = $resul0 + +proc label*(self: Label): string = + let resul0 = gtk_label_get_label(cast[ptr Label00](self.impl)) + result = $resul0 + +proc gtk_label_get_layout*(self: ptr Label00): ptr pango.Layout00 {. + importc: "gtk_label_get_layout", libprag.} + +proc getLayout*(self: Label): pango.Layout = + let gobj = gtk_label_get_layout(cast[ptr Label00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc layout*(self: Label): pango.Layout = + let gobj = gtk_label_get_layout(cast[ptr Label00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_label_get_layout_offsets*(self: ptr Label00; x: var int32; y: var int32) {. + importc: "gtk_label_get_layout_offsets", libprag.} + +proc getLayoutOffsets*(self: Label; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gtk_label_get_layout_offsets(cast[ptr Label00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc layoutOffsets*(self: Label; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gtk_label_get_layout_offsets(cast[ptr Label00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc gtk_label_get_line_wrap*(self: ptr Label00): gboolean {. + importc: "gtk_label_get_line_wrap", libprag.} + +proc getLineWrap*(self: Label): bool = + toBool(gtk_label_get_line_wrap(cast[ptr Label00](self.impl))) + +proc lineWrap*(self: Label): bool = + toBool(gtk_label_get_line_wrap(cast[ptr Label00](self.impl))) + +proc gtk_label_get_line_wrap_mode*(self: ptr Label00): pango.WrapMode {. + importc: "gtk_label_get_line_wrap_mode", libprag.} + +proc getLineWrapMode*(self: Label): pango.WrapMode = + gtk_label_get_line_wrap_mode(cast[ptr Label00](self.impl)) + +proc lineWrapMode*(self: Label): pango.WrapMode = + gtk_label_get_line_wrap_mode(cast[ptr Label00](self.impl)) + +proc gtk_label_get_lines*(self: ptr Label00): int32 {. + importc: "gtk_label_get_lines", libprag.} + +proc getLines*(self: Label): int = + int(gtk_label_get_lines(cast[ptr Label00](self.impl))) + +proc lines*(self: Label): int = + int(gtk_label_get_lines(cast[ptr Label00](self.impl))) + +proc gtk_label_get_max_width_chars*(self: ptr Label00): int32 {. + importc: "gtk_label_get_max_width_chars", libprag.} + +proc getMaxWidthChars*(self: Label): int = + int(gtk_label_get_max_width_chars(cast[ptr Label00](self.impl))) + +proc maxWidthChars*(self: Label): int = + int(gtk_label_get_max_width_chars(cast[ptr Label00](self.impl))) + +proc gtk_label_get_mnemonic_keyval*(self: ptr Label00): uint32 {. + importc: "gtk_label_get_mnemonic_keyval", libprag.} + +proc getMnemonicKeyval*(self: Label): int = + int(gtk_label_get_mnemonic_keyval(cast[ptr Label00](self.impl))) + +proc mnemonicKeyval*(self: Label): int = + int(gtk_label_get_mnemonic_keyval(cast[ptr Label00](self.impl))) + +proc gtk_label_get_mnemonic_widget*(self: ptr Label00): ptr Widget00 {. + importc: "gtk_label_get_mnemonic_widget", libprag.} + +proc getMnemonicWidget*(self: Label): Widget = + let gobj = gtk_label_get_mnemonic_widget(cast[ptr Label00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc mnemonicWidget*(self: Label): Widget = + let gobj = gtk_label_get_mnemonic_widget(cast[ptr Label00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_label_get_selectable*(self: ptr Label00): gboolean {. + importc: "gtk_label_get_selectable", libprag.} + +proc getSelectable*(self: Label): bool = + toBool(gtk_label_get_selectable(cast[ptr Label00](self.impl))) + +proc selectable*(self: Label): bool = + toBool(gtk_label_get_selectable(cast[ptr Label00](self.impl))) + +proc gtk_label_get_selection_bounds*(self: ptr Label00; start: var int32; `end`: var int32): gboolean {. + importc: "gtk_label_get_selection_bounds", libprag.} + +proc getSelectionBounds*(self: Label; start: var int; `end`: var int): bool = + var end_00 = int32(`end`) + var start_00 = int32(start) + result = toBool(gtk_label_get_selection_bounds(cast[ptr Label00](self.impl), start_00, end_00)) + `end` = int(end_00) + start = int(start_00) + +proc selectionBounds*(self: Label; start: var int; `end`: var int): bool = + var end_00 = int32(`end`) + var start_00 = int32(start) + result = toBool(gtk_label_get_selection_bounds(cast[ptr Label00](self.impl), start_00, end_00)) + `end` = int(end_00) + start = int(start_00) + +proc gtk_label_get_single_line_mode*(self: ptr Label00): gboolean {. + importc: "gtk_label_get_single_line_mode", libprag.} + +proc getSingleLineMode*(self: Label): bool = + toBool(gtk_label_get_single_line_mode(cast[ptr Label00](self.impl))) + +proc singleLineMode*(self: Label): bool = + toBool(gtk_label_get_single_line_mode(cast[ptr Label00](self.impl))) + +proc gtk_label_get_text*(self: ptr Label00): cstring {. + importc: "gtk_label_get_text", libprag.} + +proc getText*(self: Label): string = + let resul0 = gtk_label_get_text(cast[ptr Label00](self.impl)) + result = $resul0 + +proc text*(self: Label): string = + let resul0 = gtk_label_get_text(cast[ptr Label00](self.impl)) + result = $resul0 + +proc gtk_label_get_track_visited_links*(self: ptr Label00): gboolean {. + importc: "gtk_label_get_track_visited_links", libprag.} + +proc getTrackVisitedLinks*(self: Label): bool = + toBool(gtk_label_get_track_visited_links(cast[ptr Label00](self.impl))) + +proc trackVisitedLinks*(self: Label): bool = + toBool(gtk_label_get_track_visited_links(cast[ptr Label00](self.impl))) + +proc gtk_label_get_use_markup*(self: ptr Label00): gboolean {. + importc: "gtk_label_get_use_markup", libprag.} + +proc getUseMarkup*(self: Label): bool = + toBool(gtk_label_get_use_markup(cast[ptr Label00](self.impl))) + +proc useMarkup*(self: Label): bool = + toBool(gtk_label_get_use_markup(cast[ptr Label00](self.impl))) + +proc gtk_label_get_use_underline*(self: ptr Label00): gboolean {. + importc: "gtk_label_get_use_underline", libprag.} + +proc getUseUnderline*(self: Label): bool = + toBool(gtk_label_get_use_underline(cast[ptr Label00](self.impl))) + +proc useUnderline*(self: Label): bool = + toBool(gtk_label_get_use_underline(cast[ptr Label00](self.impl))) + +proc gtk_label_get_width_chars*(self: ptr Label00): int32 {. + importc: "gtk_label_get_width_chars", libprag.} + +proc getWidthChars*(self: Label): int = + int(gtk_label_get_width_chars(cast[ptr Label00](self.impl))) + +proc widthChars*(self: Label): int = + int(gtk_label_get_width_chars(cast[ptr Label00](self.impl))) + +proc gtk_label_get_xalign*(self: ptr Label00): cfloat {. + importc: "gtk_label_get_xalign", libprag.} + +proc getXalign*(self: Label): cfloat = + gtk_label_get_xalign(cast[ptr Label00](self.impl)) + +proc xalign*(self: Label): cfloat = + gtk_label_get_xalign(cast[ptr Label00](self.impl)) + +proc gtk_label_get_yalign*(self: ptr Label00): cfloat {. + importc: "gtk_label_get_yalign", libprag.} + +proc getYalign*(self: Label): cfloat = + gtk_label_get_yalign(cast[ptr Label00](self.impl)) + +proc yalign*(self: Label): cfloat = + gtk_label_get_yalign(cast[ptr Label00](self.impl)) + +proc gtk_label_select_region*(self: ptr Label00; startOffset: int32; endOffset: int32) {. + importc: "gtk_label_select_region", libprag.} + +proc selectRegion*(self: Label; startOffset: int; endOffset: int) = + gtk_label_select_region(cast[ptr Label00](self.impl), int32(startOffset), int32(endOffset)) + +proc gtk_label_set_angle*(self: ptr Label00; angle: cdouble) {. + importc: "gtk_label_set_angle", libprag.} + +proc setAngle*(self: Label; angle: cdouble) = + gtk_label_set_angle(cast[ptr Label00](self.impl), angle) + +proc `angle=`*(self: Label; angle: cdouble) = + gtk_label_set_angle(cast[ptr Label00](self.impl), angle) + +proc gtk_label_set_attributes*(self: ptr Label00; attrs: ptr pango.AttrList00) {. + importc: "gtk_label_set_attributes", libprag.} + +proc setAttributes*(self: Label; attrs: pango.AttrList) = + gtk_label_set_attributes(cast[ptr Label00](self.impl), cast[ptr pango.AttrList00](attrs.impl)) + +proc `attributes=`*(self: Label; attrs: pango.AttrList) = + gtk_label_set_attributes(cast[ptr Label00](self.impl), cast[ptr pango.AttrList00](attrs.impl)) + +proc gtk_label_set_ellipsize*(self: ptr Label00; mode: pango.EllipsizeMode) {. + importc: "gtk_label_set_ellipsize", libprag.} + +proc setEllipsize*(self: Label; mode: pango.EllipsizeMode) = + gtk_label_set_ellipsize(cast[ptr Label00](self.impl), mode) + +proc `ellipsize=`*(self: Label; mode: pango.EllipsizeMode) = + gtk_label_set_ellipsize(cast[ptr Label00](self.impl), mode) + +proc gtk_label_set_justify*(self: ptr Label00; jtype: Justification) {. + importc: "gtk_label_set_justify", libprag.} + +proc setJustify*(self: Label; jtype: Justification) = + gtk_label_set_justify(cast[ptr Label00](self.impl), jtype) + +proc `justify=`*(self: Label; jtype: Justification) = + gtk_label_set_justify(cast[ptr Label00](self.impl), jtype) + +proc gtk_label_set_label*(self: ptr Label00; str: cstring) {. + importc: "gtk_label_set_label", libprag.} + +proc setLabel*(self: Label; str: string) = + gtk_label_set_label(cast[ptr Label00](self.impl), cstring(str)) + +proc `label=`*(self: Label; str: string) = + gtk_label_set_label(cast[ptr Label00](self.impl), cstring(str)) + +proc gtk_label_set_line_wrap*(self: ptr Label00; wrap: gboolean) {. + importc: "gtk_label_set_line_wrap", libprag.} + +proc setLineWrap*(self: Label; wrap: bool) = + gtk_label_set_line_wrap(cast[ptr Label00](self.impl), gboolean(wrap)) + +proc `lineWrap=`*(self: Label; wrap: bool) = + gtk_label_set_line_wrap(cast[ptr Label00](self.impl), gboolean(wrap)) + +proc gtk_label_set_line_wrap_mode*(self: ptr Label00; wrapMode: pango.WrapMode) {. + importc: "gtk_label_set_line_wrap_mode", libprag.} + +proc setLineWrapMode*(self: Label; wrapMode: pango.WrapMode) = + gtk_label_set_line_wrap_mode(cast[ptr Label00](self.impl), wrapMode) + +proc `lineWrapMode=`*(self: Label; wrapMode: pango.WrapMode) = + gtk_label_set_line_wrap_mode(cast[ptr Label00](self.impl), wrapMode) + +proc gtk_label_set_lines*(self: ptr Label00; lines: int32) {. + importc: "gtk_label_set_lines", libprag.} + +proc setLines*(self: Label; lines: int) = + gtk_label_set_lines(cast[ptr Label00](self.impl), int32(lines)) + +proc `lines=`*(self: Label; lines: int) = + gtk_label_set_lines(cast[ptr Label00](self.impl), int32(lines)) + +proc gtk_label_set_markup*(self: ptr Label00; str: cstring) {. + importc: "gtk_label_set_markup", libprag.} + +proc setMarkup*(self: Label; str: string) = + gtk_label_set_markup(cast[ptr Label00](self.impl), cstring(str)) + +proc `markup=`*(self: Label; str: string) = + gtk_label_set_markup(cast[ptr Label00](self.impl), cstring(str)) + +proc gtk_label_set_markup_with_mnemonic*(self: ptr Label00; str: cstring) {. + importc: "gtk_label_set_markup_with_mnemonic", libprag.} + +proc setMarkupWithMnemonic*(self: Label; str: string) = + gtk_label_set_markup_with_mnemonic(cast[ptr Label00](self.impl), cstring(str)) + +proc `markupWithMnemonic=`*(self: Label; str: string) = + gtk_label_set_markup_with_mnemonic(cast[ptr Label00](self.impl), cstring(str)) + +proc gtk_label_set_max_width_chars*(self: ptr Label00; nChars: int32) {. + importc: "gtk_label_set_max_width_chars", libprag.} + +proc setMaxWidthChars*(self: Label; nChars: int) = + gtk_label_set_max_width_chars(cast[ptr Label00](self.impl), int32(nChars)) + +proc `maxWidthChars=`*(self: Label; nChars: int) = + gtk_label_set_max_width_chars(cast[ptr Label00](self.impl), int32(nChars)) + +proc gtk_label_set_mnemonic_widget*(self: ptr Label00; widget: ptr Widget00) {. + importc: "gtk_label_set_mnemonic_widget", libprag.} + +proc setMnemonicWidget*(self: Label; widget: Widget) = + gtk_label_set_mnemonic_widget(cast[ptr Label00](self.impl), cast[ptr Widget00](widget.impl)) + +proc `mnemonicWidget=`*(self: Label; widget: Widget) = + gtk_label_set_mnemonic_widget(cast[ptr Label00](self.impl), cast[ptr Widget00](widget.impl)) + +proc gtk_label_set_pattern*(self: ptr Label00; pattern: cstring) {. + importc: "gtk_label_set_pattern", libprag.} + +proc setPattern*(self: Label; pattern: string) = + gtk_label_set_pattern(cast[ptr Label00](self.impl), cstring(pattern)) + +proc `pattern=`*(self: Label; pattern: string) = + gtk_label_set_pattern(cast[ptr Label00](self.impl), cstring(pattern)) + +proc gtk_label_set_selectable*(self: ptr Label00; setting: gboolean) {. + importc: "gtk_label_set_selectable", libprag.} + +proc setSelectable*(self: Label; setting: bool) = + gtk_label_set_selectable(cast[ptr Label00](self.impl), gboolean(setting)) + +proc `selectable=`*(self: Label; setting: bool) = + gtk_label_set_selectable(cast[ptr Label00](self.impl), gboolean(setting)) + +proc gtk_label_set_single_line_mode*(self: ptr Label00; singleLineMode: gboolean) {. + importc: "gtk_label_set_single_line_mode", libprag.} + +proc setSingleLineMode*(self: Label; singleLineMode: bool) = + gtk_label_set_single_line_mode(cast[ptr Label00](self.impl), gboolean(singleLineMode)) + +proc `singleLineMode=`*(self: Label; singleLineMode: bool) = + gtk_label_set_single_line_mode(cast[ptr Label00](self.impl), gboolean(singleLineMode)) + +proc gtk_label_set_text*(self: ptr Label00; str: cstring) {. + importc: "gtk_label_set_text", libprag.} + +proc setText*(self: Label; str: string) = + gtk_label_set_text(cast[ptr Label00](self.impl), cstring(str)) + +proc `text=`*(self: Label; str: string) = + gtk_label_set_text(cast[ptr Label00](self.impl), cstring(str)) + +proc gtk_label_set_text_with_mnemonic*(self: ptr Label00; str: cstring) {. + importc: "gtk_label_set_text_with_mnemonic", libprag.} + +proc setTextWithMnemonic*(self: Label; str: string) = + gtk_label_set_text_with_mnemonic(cast[ptr Label00](self.impl), cstring(str)) + +proc `textWithMnemonic=`*(self: Label; str: string) = + gtk_label_set_text_with_mnemonic(cast[ptr Label00](self.impl), cstring(str)) + +proc gtk_label_set_track_visited_links*(self: ptr Label00; trackLinks: gboolean) {. + importc: "gtk_label_set_track_visited_links", libprag.} + +proc setTrackVisitedLinks*(self: Label; trackLinks: bool) = + gtk_label_set_track_visited_links(cast[ptr Label00](self.impl), gboolean(trackLinks)) + +proc `trackVisitedLinks=`*(self: Label; trackLinks: bool) = + gtk_label_set_track_visited_links(cast[ptr Label00](self.impl), gboolean(trackLinks)) + +proc gtk_label_set_use_markup*(self: ptr Label00; setting: gboolean) {. + importc: "gtk_label_set_use_markup", libprag.} + +proc setUseMarkup*(self: Label; setting: bool) = + gtk_label_set_use_markup(cast[ptr Label00](self.impl), gboolean(setting)) + +proc `useMarkup=`*(self: Label; setting: bool) = + gtk_label_set_use_markup(cast[ptr Label00](self.impl), gboolean(setting)) + +proc gtk_label_set_use_underline*(self: ptr Label00; setting: gboolean) {. + importc: "gtk_label_set_use_underline", libprag.} + +proc setUseUnderline*(self: Label; setting: bool) = + gtk_label_set_use_underline(cast[ptr Label00](self.impl), gboolean(setting)) + +proc `useUnderline=`*(self: Label; setting: bool) = + gtk_label_set_use_underline(cast[ptr Label00](self.impl), gboolean(setting)) + +proc gtk_label_set_width_chars*(self: ptr Label00; nChars: int32) {. + importc: "gtk_label_set_width_chars", libprag.} + +proc setWidthChars*(self: Label; nChars: int) = + gtk_label_set_width_chars(cast[ptr Label00](self.impl), int32(nChars)) + +proc `widthChars=`*(self: Label; nChars: int) = + gtk_label_set_width_chars(cast[ptr Label00](self.impl), int32(nChars)) + +proc gtk_label_set_xalign*(self: ptr Label00; xalign: cfloat) {. + importc: "gtk_label_set_xalign", libprag.} + +proc setXalign*(self: Label; xalign: cfloat) = + gtk_label_set_xalign(cast[ptr Label00](self.impl), xalign) + +proc `xalign=`*(self: Label; xalign: cfloat) = + gtk_label_set_xalign(cast[ptr Label00](self.impl), xalign) + +proc gtk_label_set_yalign*(self: ptr Label00; yalign: cfloat) {. + importc: "gtk_label_set_yalign", libprag.} + +proc setYalign*(self: Label; yalign: cfloat) = + gtk_label_set_yalign(cast[ptr Label00](self.impl), yalign) + +proc `yalign=`*(self: Label; yalign: cfloat) = + gtk_label_set_yalign(cast[ptr Label00](self.impl), yalign) + +type + AccelLabelPrivate00* {.pure.} = object + AccelLabelPrivate* = ref object + impl*: ptr AccelLabelPrivate00 + +type + AccelLabel* = ref object of Label + AccelLabel00* = object of Label00 + priv4: ptr AccelLabelPrivate00 + +proc gtk_accel_label_new*(string: cstring): ptr AccelLabel00 {. + importc: "gtk_accel_label_new", libprag.} + +proc newAccelLabel*(string: string): AccelLabel = + new(result, finalizeGObject) + result.impl = gtk_accel_label_new(cstring(string)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAccelLabel*[T](result: var T; string: string) = + assert(result is AccelLabel) + new(result, finalizeGObject) + result.impl = gtk_accel_label_new(cstring(string)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_accel_label_get_accel*(self: ptr AccelLabel00; acceleratorKey: var uint32; + acceleratorMods: var gdk.ModifierType) {. + importc: "gtk_accel_label_get_accel", libprag.} + +proc getAccel*(self: AccelLabel; acceleratorKey: var int; acceleratorMods: var gdk.ModifierType) = + var acceleratorKey_00 = uint32(acceleratorKey) + gtk_accel_label_get_accel(cast[ptr AccelLabel00](self.impl), acceleratorKey_00, acceleratorMods) + acceleratorKey = int(acceleratorKey_00) + +proc accel*(self: AccelLabel; acceleratorKey: var int; acceleratorMods: var gdk.ModifierType) = + var acceleratorKey_00 = uint32(acceleratorKey) + gtk_accel_label_get_accel(cast[ptr AccelLabel00](self.impl), acceleratorKey_00, acceleratorMods) + acceleratorKey = int(acceleratorKey_00) + +proc gtk_accel_label_get_accel_widget*(self: ptr AccelLabel00): ptr Widget00 {. + importc: "gtk_accel_label_get_accel_widget", libprag.} + +proc getAccelWidget*(self: AccelLabel): Widget = + let gobj = gtk_accel_label_get_accel_widget(cast[ptr AccelLabel00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc accelWidget*(self: AccelLabel): Widget = + let gobj = gtk_accel_label_get_accel_widget(cast[ptr AccelLabel00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_accel_label_get_accel_width*(self: ptr AccelLabel00): uint32 {. + importc: "gtk_accel_label_get_accel_width", libprag.} + +proc getAccelWidth*(self: AccelLabel): int = + int(gtk_accel_label_get_accel_width(cast[ptr AccelLabel00](self.impl))) + +proc accelWidth*(self: AccelLabel): int = + int(gtk_accel_label_get_accel_width(cast[ptr AccelLabel00](self.impl))) + +proc gtk_accel_label_refetch*(self: ptr AccelLabel00): gboolean {. + importc: "gtk_accel_label_refetch", libprag.} + +proc refetch*(self: AccelLabel): bool = + toBool(gtk_accel_label_refetch(cast[ptr AccelLabel00](self.impl))) + +proc gtk_accel_label_set_accel*(self: ptr AccelLabel00; acceleratorKey: uint32; acceleratorMods: gdk.ModifierType) {. + importc: "gtk_accel_label_set_accel", libprag.} + +proc setAccel*(self: AccelLabel; acceleratorKey: int; acceleratorMods: gdk.ModifierType) = + gtk_accel_label_set_accel(cast[ptr AccelLabel00](self.impl), uint32(acceleratorKey), acceleratorMods) + +proc gtk_accel_label_set_accel_closure*(self: ptr AccelLabel00; accelClosure: ptr gobject.Closure00) {. + importc: "gtk_accel_label_set_accel_closure", libprag.} + +proc setAccelClosure*(self: AccelLabel; accelClosure: gobject.Closure) = + gtk_accel_label_set_accel_closure(cast[ptr AccelLabel00](self.impl), cast[ptr gobject.Closure00](accelClosure.impl)) + +proc `accelClosure=`*(self: AccelLabel; accelClosure: gobject.Closure) = + gtk_accel_label_set_accel_closure(cast[ptr AccelLabel00](self.impl), cast[ptr gobject.Closure00](accelClosure.impl)) + +proc gtk_accel_label_set_accel_widget*(self: ptr AccelLabel00; accelWidget: ptr Widget00) {. + importc: "gtk_accel_label_set_accel_widget", libprag.} + +proc setAccelWidget*(self: AccelLabel; accelWidget: Widget) = + gtk_accel_label_set_accel_widget(cast[ptr AccelLabel00](self.impl), cast[ptr Widget00](accelWidget.impl)) + +proc `accelWidget=`*(self: AccelLabel; accelWidget: Widget) = + gtk_accel_label_set_accel_widget(cast[ptr AccelLabel00](self.impl), cast[ptr Widget00](accelWidget.impl)) + +type + MenuItemPrivate00* {.pure.} = object + MenuItemPrivate* = ref object + impl*: ptr MenuItemPrivate00 + +type + MenuItem* = ref object of Bin + MenuItem00* = object of Bin00 + priv4: ptr MenuItemPrivate00 + +proc scActivate*(self: MenuItem; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scActivateItem*(self: MenuItem; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-item", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeselect*(self: MenuItem; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "deselect", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelect*(self: MenuItem; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleSizeAllocate*(self: MenuItem; p: proc (self: ptr gobject.Object00; `object`: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-size-allocate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleSizeRequest*(self: MenuItem; p: proc (self: ptr gobject.Object00; `object`: pointer; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-size-request", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_menu_item_new*(): ptr MenuItem00 {. + importc: "gtk_menu_item_new", libprag.} + +proc newMenuItem*(): MenuItem = + new(result, finalizeGObject) + result.impl = gtk_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuItem*[T](result: var T) = + assert(result is MenuItem) + new(result, finalizeGObject) + result.impl = gtk_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_item_new_with_label*(label: cstring): ptr MenuItem00 {. + importc: "gtk_menu_item_new_with_label", libprag.} + +proc newMenuItemWithLabel*(label: string): MenuItem = + new(result, finalizeGObject) + result.impl = gtk_menu_item_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuItemWithLabel*[T](result: var T; label: string) = + assert(result is MenuItem) + new(result, finalizeGObject) + result.impl = gtk_menu_item_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_item_new_with_mnemonic*(label: cstring): ptr MenuItem00 {. + importc: "gtk_menu_item_new_with_mnemonic", libprag.} + +proc newMenuItemWithMnemonic*(label: string): MenuItem = + new(result, finalizeGObject) + result.impl = gtk_menu_item_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuItemWithMnemonic*[T](result: var T; label: string) = + assert(result is MenuItem) + new(result, finalizeGObject) + result.impl = gtk_menu_item_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_item_activate*(self: ptr MenuItem00) {. + importc: "gtk_menu_item_activate", libprag.} + +proc activate*(self: MenuItem) = + gtk_menu_item_activate(cast[ptr MenuItem00](self.impl)) + +proc gtk_menu_item_deselect*(self: ptr MenuItem00) {. + importc: "gtk_menu_item_deselect", libprag.} + +proc deselect*(self: MenuItem) = + gtk_menu_item_deselect(cast[ptr MenuItem00](self.impl)) + +proc gtk_menu_item_get_accel_path*(self: ptr MenuItem00): cstring {. + importc: "gtk_menu_item_get_accel_path", libprag.} + +proc getAccelPath*(self: MenuItem): string = + let resul0 = gtk_menu_item_get_accel_path(cast[ptr MenuItem00](self.impl)) + result = $resul0 + +proc accelPath*(self: MenuItem): string = + let resul0 = gtk_menu_item_get_accel_path(cast[ptr MenuItem00](self.impl)) + result = $resul0 + +proc gtk_menu_item_get_label*(self: ptr MenuItem00): cstring {. + importc: "gtk_menu_item_get_label", libprag.} + +proc getLabel*(self: MenuItem): string = + let resul0 = gtk_menu_item_get_label(cast[ptr MenuItem00](self.impl)) + result = $resul0 + +proc label*(self: MenuItem): string = + let resul0 = gtk_menu_item_get_label(cast[ptr MenuItem00](self.impl)) + result = $resul0 + +proc gtk_menu_item_get_reserve_indicator*(self: ptr MenuItem00): gboolean {. + importc: "gtk_menu_item_get_reserve_indicator", libprag.} + +proc getReserveIndicator*(self: MenuItem): bool = + toBool(gtk_menu_item_get_reserve_indicator(cast[ptr MenuItem00](self.impl))) + +proc reserveIndicator*(self: MenuItem): bool = + toBool(gtk_menu_item_get_reserve_indicator(cast[ptr MenuItem00](self.impl))) + +proc gtk_menu_item_get_right_justified*(self: ptr MenuItem00): gboolean {. + importc: "gtk_menu_item_get_right_justified", libprag.} + +proc getRightJustified*(self: MenuItem): bool = + toBool(gtk_menu_item_get_right_justified(cast[ptr MenuItem00](self.impl))) + +proc rightJustified*(self: MenuItem): bool = + toBool(gtk_menu_item_get_right_justified(cast[ptr MenuItem00](self.impl))) + +proc gtk_menu_item_get_submenu*(self: ptr MenuItem00): ptr Widget00 {. + importc: "gtk_menu_item_get_submenu", libprag.} + +proc getSubmenu*(self: MenuItem): Widget = + let gobj = gtk_menu_item_get_submenu(cast[ptr MenuItem00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc submenu*(self: MenuItem): Widget = + let gobj = gtk_menu_item_get_submenu(cast[ptr MenuItem00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_item_get_use_underline*(self: ptr MenuItem00): gboolean {. + importc: "gtk_menu_item_get_use_underline", libprag.} + +proc getUseUnderline*(self: MenuItem): bool = + toBool(gtk_menu_item_get_use_underline(cast[ptr MenuItem00](self.impl))) + +proc useUnderline*(self: MenuItem): bool = + toBool(gtk_menu_item_get_use_underline(cast[ptr MenuItem00](self.impl))) + +proc gtk_menu_item_select*(self: ptr MenuItem00) {. + importc: "gtk_menu_item_select", libprag.} + +proc select*(self: MenuItem) = + gtk_menu_item_select(cast[ptr MenuItem00](self.impl)) + +proc gtk_menu_item_set_accel_path*(self: ptr MenuItem00; accelPath: cstring) {. + importc: "gtk_menu_item_set_accel_path", libprag.} + +proc setAccelPath*(self: MenuItem; accelPath: string) = + gtk_menu_item_set_accel_path(cast[ptr MenuItem00](self.impl), cstring(accelPath)) + +proc `accelPath=`*(self: MenuItem; accelPath: string) = + gtk_menu_item_set_accel_path(cast[ptr MenuItem00](self.impl), cstring(accelPath)) + +proc gtk_menu_item_set_label*(self: ptr MenuItem00; label: cstring) {. + importc: "gtk_menu_item_set_label", libprag.} + +proc setLabel*(self: MenuItem; label: string) = + gtk_menu_item_set_label(cast[ptr MenuItem00](self.impl), cstring(label)) + +proc `label=`*(self: MenuItem; label: string) = + gtk_menu_item_set_label(cast[ptr MenuItem00](self.impl), cstring(label)) + +proc gtk_menu_item_set_reserve_indicator*(self: ptr MenuItem00; reserve: gboolean) {. + importc: "gtk_menu_item_set_reserve_indicator", libprag.} + +proc setReserveIndicator*(self: MenuItem; reserve: bool) = + gtk_menu_item_set_reserve_indicator(cast[ptr MenuItem00](self.impl), gboolean(reserve)) + +proc `reserveIndicator=`*(self: MenuItem; reserve: bool) = + gtk_menu_item_set_reserve_indicator(cast[ptr MenuItem00](self.impl), gboolean(reserve)) + +proc gtk_menu_item_set_right_justified*(self: ptr MenuItem00; rightJustified: gboolean) {. + importc: "gtk_menu_item_set_right_justified", libprag.} + +proc setRightJustified*(self: MenuItem; rightJustified: bool) = + gtk_menu_item_set_right_justified(cast[ptr MenuItem00](self.impl), gboolean(rightJustified)) + +proc `rightJustified=`*(self: MenuItem; rightJustified: bool) = + gtk_menu_item_set_right_justified(cast[ptr MenuItem00](self.impl), gboolean(rightJustified)) + +proc gtk_menu_item_set_submenu*(self: ptr MenuItem00; submenu: ptr Menu00) {. + importc: "gtk_menu_item_set_submenu", libprag.} + +proc setSubmenu*(self: MenuItem; submenu: Menu) = + gtk_menu_item_set_submenu(cast[ptr MenuItem00](self.impl), cast[ptr Menu00](submenu.impl)) + +proc `submenu=`*(self: MenuItem; submenu: Menu) = + gtk_menu_item_set_submenu(cast[ptr MenuItem00](self.impl), cast[ptr Menu00](submenu.impl)) + +proc gtk_menu_item_set_use_underline*(self: ptr MenuItem00; setting: gboolean) {. + importc: "gtk_menu_item_set_use_underline", libprag.} + +proc setUseUnderline*(self: MenuItem; setting: bool) = + gtk_menu_item_set_use_underline(cast[ptr MenuItem00](self.impl), gboolean(setting)) + +proc `useUnderline=`*(self: MenuItem; setting: bool) = + gtk_menu_item_set_use_underline(cast[ptr MenuItem00](self.impl), gboolean(setting)) + +proc gtk_menu_item_toggle_size_allocate*(self: ptr MenuItem00; allocation: int32) {. + importc: "gtk_menu_item_toggle_size_allocate", libprag.} + +proc toggleSizeAllocate*(self: MenuItem; allocation: int) = + gtk_menu_item_toggle_size_allocate(cast[ptr MenuItem00](self.impl), int32(allocation)) + +proc gtk_menu_item_toggle_size_request*(self: ptr MenuItem00; requisition: int32) {. + importc: "gtk_menu_item_toggle_size_request", libprag.} + +proc toggleSizeRequest*(self: MenuItem; requisition: int) = + gtk_menu_item_toggle_size_request(cast[ptr MenuItem00](self.impl), int32(requisition)) + +proc gtk_menu_shell_append*(self: ptr MenuShell00; child: ptr MenuItem00) {. + importc: "gtk_menu_shell_append", libprag.} + +proc append*(self: MenuShell; child: MenuItem) = + gtk_menu_shell_append(cast[ptr MenuShell00](self.impl), cast[ptr MenuItem00](child.impl)) + +type + MiscClass00* {.pure.} = object + parentClass*: WidgetClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + MiscClass* = ref object + impl*: ptr MiscClass00 + +type + LabelClass00* {.pure.} = object + parentClass*: MiscClass00 + moveCursor*: proc(label: ptr Label00; step: MovementStep; count: int32; + extendSelection: gboolean) {.cdecl.} + copyClipboard*: proc(label: ptr Label00) {.cdecl.} + populatePopup*: proc(label: ptr Label00; menu: ptr Menu00) {.cdecl.} + activateLink*: proc(label: ptr Label00; uri: cstring): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + LabelClass* = ref object + impl*: ptr LabelClass00 + +type + AccelLabelClass00* {.pure.} = object + parentClass*: LabelClass00 + signalQuote1*: cstring + signalQuote2*: cstring + modNameShift*: cstring + modNameControl*: cstring + modNameAlt*: cstring + modSeparator*: cstring + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + AccelLabelClass* = ref object + impl*: ptr AccelLabelClass00 + +type + AccelMap* = ref object of gobject.Object + AccelMap00* = object of gobject.Object00 + +proc scChanged*(self: AccelMap; p: proc (self: ptr gobject.Object00; accelPath: cstring; accelKey: uint32; accelMods: gdk.ModifierType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_accel_map_add_entry*(accelPath: cstring; accelKey: uint32; accelMods: gdk.ModifierType) {. + importc: "gtk_accel_map_add_entry", libprag.} + +proc addEntry*(accelPath: cstring; accelKey: uint32; accelMods: gdk.ModifierType) {. + importc: "gtk_accel_map_add_entry", libprag.} + +proc gtk_accel_map_add_filter*(filterPattern: cstring) {. + importc: "gtk_accel_map_add_filter", libprag.} + +proc addFilter*(filterPattern: cstring) {. + importc: "gtk_accel_map_add_filter", libprag.} + +proc gtk_accel_map_change_entry*(accelPath: cstring; accelKey: uint32; accelMods: gdk.ModifierType; + replace: gboolean): gboolean {. + importc: "gtk_accel_map_change_entry", libprag.} + +proc changeEntry*(accelPath: cstring; accelKey: uint32; accelMods: gdk.ModifierType; + replace: gboolean): gboolean {. + importc: "gtk_accel_map_change_entry", libprag.} + +proc gtk_accel_map_get*(): ptr AccelMap00 {. + importc: "gtk_accel_map_get", libprag.} + +proc get*(): AccelMap = + let gobj = gtk_accel_map_get() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AccelMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_accel_map_load*(fileName: ucstring) {. + importc: "gtk_accel_map_load", libprag.} + +proc load*(fileName: ucstring) {. + importc: "gtk_accel_map_load", libprag.} + +proc gtk_accel_map_load_fd*(fd: int32) {. + importc: "gtk_accel_map_load_fd", libprag.} + +proc loadFd*(fd: int32) {. + importc: "gtk_accel_map_load_fd", libprag.} + +proc gtk_accel_map_load_scanner*(scanner: ptr glib.Scanner00) {. + importc: "gtk_accel_map_load_scanner", libprag.} + +proc loadScanner*(scanner: glib.Scanner) = + gtk_accel_map_load_scanner(cast[ptr glib.Scanner00](scanner.impl)) + +proc gtk_accel_map_lock_path*(accelPath: cstring) {. + importc: "gtk_accel_map_lock_path", libprag.} + +proc lockPath*(accelPath: cstring) {. + importc: "gtk_accel_map_lock_path", libprag.} + +proc gtk_accel_map_lookup_entry*(accelPath: cstring; key: var AccelKey00): gboolean {. + importc: "gtk_accel_map_lookup_entry", libprag.} + +proc lookupEntry*(accelPath: cstring; key: var AccelKey00): gboolean {. + importc: "gtk_accel_map_lookup_entry", libprag.} + +proc gtk_accel_map_save*(fileName: ucstring) {. + importc: "gtk_accel_map_save", libprag.} + +proc save*(fileName: ucstring) {. + importc: "gtk_accel_map_save", libprag.} + +proc gtk_accel_map_save_fd*(fd: int32) {. + importc: "gtk_accel_map_save_fd", libprag.} + +proc saveFd*(fd: int32) {. + importc: "gtk_accel_map_save_fd", libprag.} + +proc gtk_accel_map_unlock_path*(accelPath: cstring) {. + importc: "gtk_accel_map_unlock_path", libprag.} + +proc unlockPath*(accelPath: cstring) {. + importc: "gtk_accel_map_unlock_path", libprag.} + +type + AccelMapClass00* {.pure.} = object + AccelMapClass* = ref object + impl*: ptr AccelMapClass00 + +type + AccelMapForeach* = proc (data: pointer; accelPath: cstring; accelKey: uint32; + accelMods: gdk.ModifierType; changed: gboolean) {.cdecl.} + +proc gtk_accel_map_foreach*(data: pointer; foreachFunc: AccelMapForeach) {. + importc: "gtk_accel_map_foreach", libprag.} + +proc foreach*(data: pointer; foreachFunc: AccelMapForeach) {. + importc: "gtk_accel_map_foreach", libprag.} + +proc gtk_accel_map_foreach_unfiltered*(data: pointer; foreachFunc: AccelMapForeach) {. + importc: "gtk_accel_map_foreach_unfiltered", libprag.} + +proc foreachUnfiltered*(data: pointer; foreachFunc: AccelMapForeach) {. + importc: "gtk_accel_map_foreach_unfiltered", libprag.} + +type + AccessiblePrivate00* {.pure.} = object + AccessiblePrivate* = ref object + impl*: ptr AccessiblePrivate00 + +type + Accessible* = ref object of atk.Object + Accessible00* = object of atk.Object00 + priv1: ptr AccessiblePrivate00 + +proc gtk_accessible_connect_widget_destroyed*(self: ptr Accessible00) {. + importc: "gtk_accessible_connect_widget_destroyed", libprag.} + +proc connectWidgetDestroyed*(self: Accessible) = + gtk_accessible_connect_widget_destroyed(cast[ptr Accessible00](self.impl)) + +proc gtk_accessible_get_widget*(self: ptr Accessible00): ptr Widget00 {. + importc: "gtk_accessible_get_widget", libprag.} + +proc getWidget*(self: Accessible): Widget = + let gobj = gtk_accessible_get_widget(cast[ptr Accessible00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc widget*(self: Accessible): Widget = + let gobj = gtk_accessible_get_widget(cast[ptr Accessible00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_accessible_set_widget*(self: ptr Accessible00; widget: ptr Widget00) {. + importc: "gtk_accessible_set_widget", libprag.} + +proc setWidget*(self: Accessible; widget: Widget) = + gtk_accessible_set_widget(cast[ptr Accessible00](self.impl), cast[ptr Widget00](widget.impl)) + +proc `widget=`*(self: Accessible; widget: Widget) = + gtk_accessible_set_widget(cast[ptr Accessible00](self.impl), cast[ptr Widget00](widget.impl)) + +type + AccessibleClass00* {.pure.} = object + parentClass*: atk.ObjectClass00 + connectWidgetDestroyed*: proc(accessible: ptr Accessible00) {.cdecl.} + widgetSet*: proc(accessible: ptr Accessible00) {.cdecl.} + widgetUnset*: proc(accessible: ptr Accessible00) {.cdecl.} + gtkReserved3*: pointer + gtkReserved4*: pointer + AccessibleClass* = ref object + impl*: ptr AccessibleClass00 + +type + ActionPrivate00* {.pure.} = object + ActionPrivate* = ref object + impl*: ptr ActionPrivate00 + +type + Action* = ref object of gobject.Object + Action00* = object of gobject.Object00 + privateData1: ptr ActionPrivate00 + +proc scActivate*(self: Action; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_action_new*(name: cstring; label: cstring; tooltip: cstring; stockId: cstring): ptr Action00 {. + importc: "gtk_action_new", libprag.} + +proc newAction*(name: string; label: string; tooltip: string; stockId: string): Action = + new(result, finalizeGObject) + result.impl = gtk_action_new(cstring(name), cstring(label), cstring(tooltip), cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAction*[T](result: var T; name: string; label: string; tooltip: string; stockId: string) = + assert(result is Action) + new(result, finalizeGObject) + result.impl = gtk_action_new(cstring(name), cstring(label), cstring(tooltip), cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_activate*(self: ptr Action00) {. + importc: "gtk_action_activate", libprag.} + +proc activate*(self: Action) = + gtk_action_activate(cast[ptr Action00](self.impl)) + +proc gtk_action_block_activate*(self: ptr Action00) {. + importc: "gtk_action_block_activate", libprag.} + +proc blockActivate*(self: Action) = + gtk_action_block_activate(cast[ptr Action00](self.impl)) + +proc gtk_action_connect_accelerator*(self: ptr Action00) {. + importc: "gtk_action_connect_accelerator", libprag.} + +proc connectAccelerator*(self: Action) = + gtk_action_connect_accelerator(cast[ptr Action00](self.impl)) + +proc gtk_action_create_icon*(self: ptr Action00; iconSize: int32): ptr Widget00 {. + importc: "gtk_action_create_icon", libprag.} + +proc createIcon*(self: Action; iconSize: int): Widget = + let gobj = gtk_action_create_icon(cast[ptr Action00](self.impl), int32(iconSize)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_create_menu*(self: ptr Action00): ptr Widget00 {. + importc: "gtk_action_create_menu", libprag.} + +proc createMenu*(self: Action): Widget = + let gobj = gtk_action_create_menu(cast[ptr Action00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_create_menu_item*(self: ptr Action00): ptr Widget00 {. + importc: "gtk_action_create_menu_item", libprag.} + +proc createMenuItem*(self: Action): Widget = + let gobj = gtk_action_create_menu_item(cast[ptr Action00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_create_tool_item*(self: ptr Action00): ptr Widget00 {. + importc: "gtk_action_create_tool_item", libprag.} + +proc createToolItem*(self: Action): Widget = + let gobj = gtk_action_create_tool_item(cast[ptr Action00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_disconnect_accelerator*(self: ptr Action00) {. + importc: "gtk_action_disconnect_accelerator", libprag.} + +proc disconnectAccelerator*(self: Action) = + gtk_action_disconnect_accelerator(cast[ptr Action00](self.impl)) + +proc gtk_action_get_accel_closure*(self: ptr Action00): ptr gobject.Closure00 {. + importc: "gtk_action_get_accel_closure", libprag.} + +proc getAccelClosure*(self: Action): gobject.Closure = + new(result) + result.impl = gtk_action_get_accel_closure(cast[ptr Action00](self.impl)) + +proc accelClosure*(self: Action): gobject.Closure = + new(result) + result.impl = gtk_action_get_accel_closure(cast[ptr Action00](self.impl)) + +proc gtk_action_get_accel_path*(self: ptr Action00): cstring {. + importc: "gtk_action_get_accel_path", libprag.} + +proc getAccelPath*(self: Action): string = + let resul0 = gtk_action_get_accel_path(cast[ptr Action00](self.impl)) + result = $resul0 + +proc accelPath*(self: Action): string = + let resul0 = gtk_action_get_accel_path(cast[ptr Action00](self.impl)) + result = $resul0 + +proc gtk_action_get_always_show_image*(self: ptr Action00): gboolean {. + importc: "gtk_action_get_always_show_image", libprag.} + +proc getAlwaysShowImage*(self: Action): bool = + toBool(gtk_action_get_always_show_image(cast[ptr Action00](self.impl))) + +proc alwaysShowImage*(self: Action): bool = + toBool(gtk_action_get_always_show_image(cast[ptr Action00](self.impl))) + +proc gtk_action_get_gicon*(self: ptr Action00): ptr gio.Icon00 {. + importc: "gtk_action_get_gicon", libprag.} + +proc getGicon*(self: Action): gio.Icon = + new(result) + result.impl = gtk_action_get_gicon(cast[ptr Action00](self.impl)) + +proc gicon*(self: Action): gio.Icon = + new(result) + result.impl = gtk_action_get_gicon(cast[ptr Action00](self.impl)) + +proc gtk_action_get_icon_name*(self: ptr Action00): cstring {. + importc: "gtk_action_get_icon_name", libprag.} + +proc getIconName*(self: Action): string = + let resul0 = gtk_action_get_icon_name(cast[ptr Action00](self.impl)) + result = $resul0 + +proc iconName*(self: Action): string = + let resul0 = gtk_action_get_icon_name(cast[ptr Action00](self.impl)) + result = $resul0 + +proc gtk_action_get_is_important*(self: ptr Action00): gboolean {. + importc: "gtk_action_get_is_important", libprag.} + +proc getIsImportant*(self: Action): bool = + toBool(gtk_action_get_is_important(cast[ptr Action00](self.impl))) + +proc isImportant*(self: Action): bool = + toBool(gtk_action_get_is_important(cast[ptr Action00](self.impl))) + +proc gtk_action_get_label*(self: ptr Action00): cstring {. + importc: "gtk_action_get_label", libprag.} + +proc getLabel*(self: Action): string = + let resul0 = gtk_action_get_label(cast[ptr Action00](self.impl)) + result = $resul0 + +proc label*(self: Action): string = + let resul0 = gtk_action_get_label(cast[ptr Action00](self.impl)) + result = $resul0 + +proc gtk_action_get_name*(self: ptr Action00): cstring {. + importc: "gtk_action_get_name", libprag.} + +proc getName*(self: Action): string = + let resul0 = gtk_action_get_name(cast[ptr Action00](self.impl)) + result = $resul0 + +proc name*(self: Action): string = + let resul0 = gtk_action_get_name(cast[ptr Action00](self.impl)) + result = $resul0 + +proc gtk_action_get_proxies*(self: ptr Action00): ptr pointer {. + importc: "gtk_action_get_proxies", libprag.} + +proc getProxies*(self: Action): ptr pointer = + gtk_action_get_proxies(cast[ptr Action00](self.impl)) + +proc proxies*(self: Action): ptr pointer = + gtk_action_get_proxies(cast[ptr Action00](self.impl)) + +proc gtk_action_get_sensitive*(self: ptr Action00): gboolean {. + importc: "gtk_action_get_sensitive", libprag.} + +proc getSensitive*(self: Action): bool = + toBool(gtk_action_get_sensitive(cast[ptr Action00](self.impl))) + +proc sensitive*(self: Action): bool = + toBool(gtk_action_get_sensitive(cast[ptr Action00](self.impl))) + +proc gtk_action_get_short_label*(self: ptr Action00): cstring {. + importc: "gtk_action_get_short_label", libprag.} + +proc getShortLabel*(self: Action): string = + let resul0 = gtk_action_get_short_label(cast[ptr Action00](self.impl)) + result = $resul0 + +proc shortLabel*(self: Action): string = + let resul0 = gtk_action_get_short_label(cast[ptr Action00](self.impl)) + result = $resul0 + +proc gtk_action_get_stock_id*(self: ptr Action00): cstring {. + importc: "gtk_action_get_stock_id", libprag.} + +proc getStockId*(self: Action): string = + let resul0 = gtk_action_get_stock_id(cast[ptr Action00](self.impl)) + result = $resul0 + +proc stockId*(self: Action): string = + let resul0 = gtk_action_get_stock_id(cast[ptr Action00](self.impl)) + result = $resul0 + +proc gtk_action_get_tooltip*(self: ptr Action00): cstring {. + importc: "gtk_action_get_tooltip", libprag.} + +proc getTooltip*(self: Action): string = + let resul0 = gtk_action_get_tooltip(cast[ptr Action00](self.impl)) + result = $resul0 + +proc tooltip*(self: Action): string = + let resul0 = gtk_action_get_tooltip(cast[ptr Action00](self.impl)) + result = $resul0 + +proc gtk_action_get_visible*(self: ptr Action00): gboolean {. + importc: "gtk_action_get_visible", libprag.} + +proc getVisible*(self: Action): bool = + toBool(gtk_action_get_visible(cast[ptr Action00](self.impl))) + +proc visible*(self: Action): bool = + toBool(gtk_action_get_visible(cast[ptr Action00](self.impl))) + +proc gtk_action_get_visible_horizontal*(self: ptr Action00): gboolean {. + importc: "gtk_action_get_visible_horizontal", libprag.} + +proc getVisibleHorizontal*(self: Action): bool = + toBool(gtk_action_get_visible_horizontal(cast[ptr Action00](self.impl))) + +proc visibleHorizontal*(self: Action): bool = + toBool(gtk_action_get_visible_horizontal(cast[ptr Action00](self.impl))) + +proc gtk_action_get_visible_vertical*(self: ptr Action00): gboolean {. + importc: "gtk_action_get_visible_vertical", libprag.} + +proc getVisibleVertical*(self: Action): bool = + toBool(gtk_action_get_visible_vertical(cast[ptr Action00](self.impl))) + +proc visibleVertical*(self: Action): bool = + toBool(gtk_action_get_visible_vertical(cast[ptr Action00](self.impl))) + +proc gtk_action_is_sensitive*(self: ptr Action00): gboolean {. + importc: "gtk_action_is_sensitive", libprag.} + +proc isSensitive*(self: Action): bool = + toBool(gtk_action_is_sensitive(cast[ptr Action00](self.impl))) + +proc gtk_action_is_visible*(self: ptr Action00): gboolean {. + importc: "gtk_action_is_visible", libprag.} + +proc isVisible*(self: Action): bool = + toBool(gtk_action_is_visible(cast[ptr Action00](self.impl))) + +proc gtk_action_set_accel_group*(self: ptr Action00; accelGroup: ptr AccelGroup00) {. + importc: "gtk_action_set_accel_group", libprag.} + +proc setAccelGroup*(self: Action; accelGroup: AccelGroup) = + gtk_action_set_accel_group(cast[ptr Action00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +proc `accelGroup=`*(self: Action; accelGroup: AccelGroup) = + gtk_action_set_accel_group(cast[ptr Action00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +proc gtk_action_set_accel_path*(self: ptr Action00; accelPath: cstring) {. + importc: "gtk_action_set_accel_path", libprag.} + +proc setAccelPath*(self: Action; accelPath: string) = + gtk_action_set_accel_path(cast[ptr Action00](self.impl), cstring(accelPath)) + +proc `accelPath=`*(self: Action; accelPath: string) = + gtk_action_set_accel_path(cast[ptr Action00](self.impl), cstring(accelPath)) + +proc gtk_action_set_always_show_image*(self: ptr Action00; alwaysShow: gboolean) {. + importc: "gtk_action_set_always_show_image", libprag.} + +proc setAlwaysShowImage*(self: Action; alwaysShow: bool) = + gtk_action_set_always_show_image(cast[ptr Action00](self.impl), gboolean(alwaysShow)) + +proc `alwaysShowImage=`*(self: Action; alwaysShow: bool) = + gtk_action_set_always_show_image(cast[ptr Action00](self.impl), gboolean(alwaysShow)) + +proc gtk_action_set_gicon*(self: ptr Action00; icon: ptr gio.Icon00) {. + importc: "gtk_action_set_gicon", libprag.} + +proc setGicon*(self: Action; icon: gio.Icon) = + gtk_action_set_gicon(cast[ptr Action00](self.impl), cast[ptr gio.Icon00](icon.impl)) + +proc `gicon=`*(self: Action; icon: gio.Icon) = + gtk_action_set_gicon(cast[ptr Action00](self.impl), cast[ptr gio.Icon00](icon.impl)) + +proc gtk_action_set_icon_name*(self: ptr Action00; iconName: cstring) {. + importc: "gtk_action_set_icon_name", libprag.} + +proc setIconName*(self: Action; iconName: string) = + gtk_action_set_icon_name(cast[ptr Action00](self.impl), cstring(iconName)) + +proc `iconName=`*(self: Action; iconName: string) = + gtk_action_set_icon_name(cast[ptr Action00](self.impl), cstring(iconName)) + +proc gtk_action_set_is_important*(self: ptr Action00; isImportant: gboolean) {. + importc: "gtk_action_set_is_important", libprag.} + +proc setIsImportant*(self: Action; isImportant: bool) = + gtk_action_set_is_important(cast[ptr Action00](self.impl), gboolean(isImportant)) + +proc `isImportant=`*(self: Action; isImportant: bool) = + gtk_action_set_is_important(cast[ptr Action00](self.impl), gboolean(isImportant)) + +proc gtk_action_set_label*(self: ptr Action00; label: cstring) {. + importc: "gtk_action_set_label", libprag.} + +proc setLabel*(self: Action; label: string) = + gtk_action_set_label(cast[ptr Action00](self.impl), cstring(label)) + +proc `label=`*(self: Action; label: string) = + gtk_action_set_label(cast[ptr Action00](self.impl), cstring(label)) + +proc gtk_action_set_sensitive*(self: ptr Action00; sensitive: gboolean) {. + importc: "gtk_action_set_sensitive", libprag.} + +proc setSensitive*(self: Action; sensitive: bool) = + gtk_action_set_sensitive(cast[ptr Action00](self.impl), gboolean(sensitive)) + +proc `sensitive=`*(self: Action; sensitive: bool) = + gtk_action_set_sensitive(cast[ptr Action00](self.impl), gboolean(sensitive)) + +proc gtk_action_set_short_label*(self: ptr Action00; shortLabel: cstring) {. + importc: "gtk_action_set_short_label", libprag.} + +proc setShortLabel*(self: Action; shortLabel: string) = + gtk_action_set_short_label(cast[ptr Action00](self.impl), cstring(shortLabel)) + +proc `shortLabel=`*(self: Action; shortLabel: string) = + gtk_action_set_short_label(cast[ptr Action00](self.impl), cstring(shortLabel)) + +proc gtk_action_set_stock_id*(self: ptr Action00; stockId: cstring) {. + importc: "gtk_action_set_stock_id", libprag.} + +proc setStockId*(self: Action; stockId: string) = + gtk_action_set_stock_id(cast[ptr Action00](self.impl), cstring(stockId)) + +proc `stockId=`*(self: Action; stockId: string) = + gtk_action_set_stock_id(cast[ptr Action00](self.impl), cstring(stockId)) + +proc gtk_action_set_tooltip*(self: ptr Action00; tooltip: cstring) {. + importc: "gtk_action_set_tooltip", libprag.} + +proc setTooltip*(self: Action; tooltip: string) = + gtk_action_set_tooltip(cast[ptr Action00](self.impl), cstring(tooltip)) + +proc `tooltip=`*(self: Action; tooltip: string) = + gtk_action_set_tooltip(cast[ptr Action00](self.impl), cstring(tooltip)) + +proc gtk_action_set_visible*(self: ptr Action00; visible: gboolean) {. + importc: "gtk_action_set_visible", libprag.} + +proc setVisible*(self: Action; visible: bool) = + gtk_action_set_visible(cast[ptr Action00](self.impl), gboolean(visible)) + +proc `visible=`*(self: Action; visible: bool) = + gtk_action_set_visible(cast[ptr Action00](self.impl), gboolean(visible)) + +proc gtk_action_set_visible_horizontal*(self: ptr Action00; visibleHorizontal: gboolean) {. + importc: "gtk_action_set_visible_horizontal", libprag.} + +proc setVisibleHorizontal*(self: Action; visibleHorizontal: bool) = + gtk_action_set_visible_horizontal(cast[ptr Action00](self.impl), gboolean(visibleHorizontal)) + +proc `visibleHorizontal=`*(self: Action; visibleHorizontal: bool) = + gtk_action_set_visible_horizontal(cast[ptr Action00](self.impl), gboolean(visibleHorizontal)) + +proc gtk_action_set_visible_vertical*(self: ptr Action00; visibleVertical: gboolean) {. + importc: "gtk_action_set_visible_vertical", libprag.} + +proc setVisibleVertical*(self: Action; visibleVertical: bool) = + gtk_action_set_visible_vertical(cast[ptr Action00](self.impl), gboolean(visibleVertical)) + +proc `visibleVertical=`*(self: Action; visibleVertical: bool) = + gtk_action_set_visible_vertical(cast[ptr Action00](self.impl), gboolean(visibleVertical)) + +proc gtk_action_unblock_activate*(self: ptr Action00) {. + importc: "gtk_action_unblock_activate", libprag.} + +proc unblockActivate*(self: Action) = + gtk_action_unblock_activate(cast[ptr Action00](self.impl)) + +type + ActionBar* = ref object of Bin + ActionBar00* = object of Bin00 + +proc gtk_action_bar_new*(): ptr ActionBar00 {. + importc: "gtk_action_bar_new", libprag.} + +proc newActionBar*(): ActionBar = + new(result, finalizeGObject) + result.impl = gtk_action_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initActionBar*[T](result: var T) = + assert(result is ActionBar) + new(result, finalizeGObject) + result.impl = gtk_action_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_bar_get_center_widget*(self: ptr ActionBar00): ptr Widget00 {. + importc: "gtk_action_bar_get_center_widget", libprag.} + +proc getCenterWidget*(self: ActionBar): Widget = + let gobj = gtk_action_bar_get_center_widget(cast[ptr ActionBar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc centerWidget*(self: ActionBar): Widget = + let gobj = gtk_action_bar_get_center_widget(cast[ptr ActionBar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_bar_pack_end*(self: ptr ActionBar00; child: ptr Widget00) {. + importc: "gtk_action_bar_pack_end", libprag.} + +proc packEnd*(self: ActionBar; child: Widget) = + gtk_action_bar_pack_end(cast[ptr ActionBar00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_action_bar_pack_start*(self: ptr ActionBar00; child: ptr Widget00) {. + importc: "gtk_action_bar_pack_start", libprag.} + +proc packStart*(self: ActionBar; child: Widget) = + gtk_action_bar_pack_start(cast[ptr ActionBar00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_action_bar_set_center_widget*(self: ptr ActionBar00; centerWidget: ptr Widget00) {. + importc: "gtk_action_bar_set_center_widget", libprag.} + +proc setCenterWidget*(self: ActionBar; centerWidget: Widget) = + gtk_action_bar_set_center_widget(cast[ptr ActionBar00](self.impl), cast[ptr Widget00](centerWidget.impl)) + +proc `centerWidget=`*(self: ActionBar; centerWidget: Widget) = + gtk_action_bar_set_center_widget(cast[ptr ActionBar00](self.impl), cast[ptr Widget00](centerWidget.impl)) + +type + ActionBarPrivate00* {.pure.} = object + ActionBarPrivate* = ref object + impl*: ptr ActionBarPrivate00 + +type + ActionClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + activate*: proc(action: ptr Action00) {.cdecl.} + menuItemType*: GType + toolbarItemType*: GType + createMenuItem*: proc(action: ptr Action00): ptr Widget00 {.cdecl.} + createToolItem*: proc(action: ptr Action00): ptr Widget00 {.cdecl.} + connectProxy*: proc(action: ptr Action00; proxy: ptr Widget00) {.cdecl.} + disconnectProxy*: proc(action: ptr Action00; proxy: ptr Widget00) {.cdecl.} + createMenu*: proc(action: ptr Action00): ptr Widget00 {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ActionClass* = ref object + impl*: ptr ActionClass00 + +type + ActionGroupPrivate00* {.pure.} = object + ActionGroupPrivate* = ref object + impl*: ptr ActionGroupPrivate00 + +type + ActionGroup* = ref object of gobject.Object + ActionGroup00* = object of gobject.Object00 + priv1: ptr ActionGroupPrivate00 + +proc scConnectProxy*(self: ActionGroup; p: proc (self: ptr gobject.Object00; action: Action00; proxy: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "connect-proxy", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDisconnectProxy*(self: ActionGroup; p: proc (self: ptr gobject.Object00; action: Action00; proxy: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "disconnect-proxy", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPostActivate*(self: ActionGroup; p: proc (self: ptr gobject.Object00; action: Action00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "post-activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPreActivate*(self: ActionGroup; p: proc (self: ptr gobject.Object00; action: Action00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "pre-activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_action_group_new*(name: cstring): ptr ActionGroup00 {. + importc: "gtk_action_group_new", libprag.} + +proc newActionGroup*(name: string): ActionGroup = + new(result, finalizeGObject) + result.impl = gtk_action_group_new(cstring(name)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initActionGroup*[T](result: var T; name: string) = + assert(result is ActionGroup) + new(result, finalizeGObject) + result.impl = gtk_action_group_new(cstring(name)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_group_add_action*(self: ptr ActionGroup00; action: ptr Action00) {. + importc: "gtk_action_group_add_action", libprag.} + +proc addAction*(self: ActionGroup; action: Action) = + gtk_action_group_add_action(cast[ptr ActionGroup00](self.impl), cast[ptr Action00](action.impl)) + +proc gtk_action_group_add_action_with_accel*(self: ptr ActionGroup00; action: ptr Action00; accelerator: cstring) {. + importc: "gtk_action_group_add_action_with_accel", libprag.} + +proc addActionWithAccel*(self: ActionGroup; action: Action; accelerator: string) = + gtk_action_group_add_action_with_accel(cast[ptr ActionGroup00](self.impl), cast[ptr Action00](action.impl), cstring(accelerator)) + +proc gtk_action_group_get_accel_group*(self: ptr ActionGroup00): ptr AccelGroup00 {. + importc: "gtk_action_group_get_accel_group", libprag.} + +proc getAccelGroup*(self: ActionGroup): AccelGroup = + let gobj = gtk_action_group_get_accel_group(cast[ptr ActionGroup00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AccelGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc accelGroup*(self: ActionGroup): AccelGroup = + let gobj = gtk_action_group_get_accel_group(cast[ptr ActionGroup00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AccelGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_group_get_action*(self: ptr ActionGroup00; actionName: cstring): ptr Action00 {. + importc: "gtk_action_group_get_action", libprag.} + +proc getAction*(self: ActionGroup; actionName: string): Action = + let gobj = gtk_action_group_get_action(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Action](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc action*(self: ActionGroup; actionName: string): Action = + let gobj = gtk_action_group_get_action(cast[ptr ActionGroup00](self.impl), cstring(actionName)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Action](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_action_group_get_name*(self: ptr ActionGroup00): cstring {. + importc: "gtk_action_group_get_name", libprag.} + +proc getName*(self: ActionGroup): string = + let resul0 = gtk_action_group_get_name(cast[ptr ActionGroup00](self.impl)) + result = $resul0 + +proc name*(self: ActionGroup): string = + let resul0 = gtk_action_group_get_name(cast[ptr ActionGroup00](self.impl)) + result = $resul0 + +proc gtk_action_group_get_sensitive*(self: ptr ActionGroup00): gboolean {. + importc: "gtk_action_group_get_sensitive", libprag.} + +proc getSensitive*(self: ActionGroup): bool = + toBool(gtk_action_group_get_sensitive(cast[ptr ActionGroup00](self.impl))) + +proc sensitive*(self: ActionGroup): bool = + toBool(gtk_action_group_get_sensitive(cast[ptr ActionGroup00](self.impl))) + +proc gtk_action_group_get_visible*(self: ptr ActionGroup00): gboolean {. + importc: "gtk_action_group_get_visible", libprag.} + +proc getVisible*(self: ActionGroup): bool = + toBool(gtk_action_group_get_visible(cast[ptr ActionGroup00](self.impl))) + +proc visible*(self: ActionGroup): bool = + toBool(gtk_action_group_get_visible(cast[ptr ActionGroup00](self.impl))) + +proc gtk_action_group_list_actions*(self: ptr ActionGroup00): ptr pointer {. + importc: "gtk_action_group_list_actions", libprag.} + +proc listActions*(self: ActionGroup): ptr pointer = + gtk_action_group_list_actions(cast[ptr ActionGroup00](self.impl)) + +proc gtk_action_group_remove_action*(self: ptr ActionGroup00; action: ptr Action00) {. + importc: "gtk_action_group_remove_action", libprag.} + +proc removeAction*(self: ActionGroup; action: Action) = + gtk_action_group_remove_action(cast[ptr ActionGroup00](self.impl), cast[ptr Action00](action.impl)) + +proc gtk_action_group_set_accel_group*(self: ptr ActionGroup00; accelGroup: ptr AccelGroup00) {. + importc: "gtk_action_group_set_accel_group", libprag.} + +proc setAccelGroup*(self: ActionGroup; accelGroup: AccelGroup) = + gtk_action_group_set_accel_group(cast[ptr ActionGroup00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +proc `accelGroup=`*(self: ActionGroup; accelGroup: AccelGroup) = + gtk_action_group_set_accel_group(cast[ptr ActionGroup00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +proc gtk_action_group_set_sensitive*(self: ptr ActionGroup00; sensitive: gboolean) {. + importc: "gtk_action_group_set_sensitive", libprag.} + +proc setSensitive*(self: ActionGroup; sensitive: bool) = + gtk_action_group_set_sensitive(cast[ptr ActionGroup00](self.impl), gboolean(sensitive)) + +proc `sensitive=`*(self: ActionGroup; sensitive: bool) = + gtk_action_group_set_sensitive(cast[ptr ActionGroup00](self.impl), gboolean(sensitive)) + +proc gtk_action_group_set_translation_domain*(self: ptr ActionGroup00; domain: cstring) {. + importc: "gtk_action_group_set_translation_domain", libprag.} + +proc setTranslationDomain*(self: ActionGroup; domain: string) = + gtk_action_group_set_translation_domain(cast[ptr ActionGroup00](self.impl), cstring(domain)) + +proc `translationDomain=`*(self: ActionGroup; domain: string) = + gtk_action_group_set_translation_domain(cast[ptr ActionGroup00](self.impl), cstring(domain)) + +proc gtk_action_group_set_visible*(self: ptr ActionGroup00; visible: gboolean) {. + importc: "gtk_action_group_set_visible", libprag.} + +proc setVisible*(self: ActionGroup; visible: bool) = + gtk_action_group_set_visible(cast[ptr ActionGroup00](self.impl), gboolean(visible)) + +proc `visible=`*(self: ActionGroup; visible: bool) = + gtk_action_group_set_visible(cast[ptr ActionGroup00](self.impl), gboolean(visible)) + +proc gtk_action_group_translate_string*(self: ptr ActionGroup00; string: cstring): cstring {. + importc: "gtk_action_group_translate_string", libprag.} + +proc translateString*(self: ActionGroup; string: string): string = + let resul0 = gtk_action_group_translate_string(cast[ptr ActionGroup00](self.impl), cstring(string)) + result = $resul0 + +type + ActionGroupClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getAction*: proc(actionGroup: ptr ActionGroup00; actionName: cstring): ptr Action00 {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ActionGroupClass* = ref object + impl*: ptr ActionGroupClass00 + +type + Actionable00* {.pure.} = object + Actionable* = ref object + impl*: ptr Actionable00 + +proc gtk_actionable_get_action_name*(self: ptr Actionable00): cstring {. + importc: "gtk_actionable_get_action_name", libprag.} + +proc getActionName*(self: Actionable): string = + let resul0 = gtk_actionable_get_action_name(cast[ptr Actionable00](self.impl)) + result = $resul0 + +proc actionName*(self: Actionable): string = + let resul0 = gtk_actionable_get_action_name(cast[ptr Actionable00](self.impl)) + result = $resul0 + +proc gtk_actionable_get_action_target_value*(self: ptr Actionable00): ptr glib.Variant00 {. + importc: "gtk_actionable_get_action_target_value", libprag.} + +proc getActionTargetValue*(self: Actionable): glib.Variant = + new(result) + result.impl = gtk_actionable_get_action_target_value(cast[ptr Actionable00](self.impl)) + +proc actionTargetValue*(self: Actionable): glib.Variant = + new(result) + result.impl = gtk_actionable_get_action_target_value(cast[ptr Actionable00](self.impl)) + +proc gtk_actionable_set_action_name*(self: ptr Actionable00; actionName: cstring) {. + importc: "gtk_actionable_set_action_name", libprag.} + +proc setActionName*(self: Actionable; actionName: string) = + gtk_actionable_set_action_name(cast[ptr Actionable00](self.impl), cstring(actionName)) + +proc `actionName=`*(self: Actionable; actionName: string) = + gtk_actionable_set_action_name(cast[ptr Actionable00](self.impl), cstring(actionName)) + +proc gtk_actionable_set_action_target_value*(self: ptr Actionable00; targetValue: ptr glib.Variant00) {. + importc: "gtk_actionable_set_action_target_value", libprag.} + +proc setActionTargetValue*(self: Actionable; targetValue: glib.Variant) = + gtk_actionable_set_action_target_value(cast[ptr Actionable00](self.impl), cast[ptr glib.Variant00](targetValue.impl)) + +proc `actionTargetValue=`*(self: Actionable; targetValue: glib.Variant) = + gtk_actionable_set_action_target_value(cast[ptr Actionable00](self.impl), cast[ptr glib.Variant00](targetValue.impl)) + +proc gtk_actionable_set_detailed_action_name*(self: ptr Actionable00; detailedActionName: cstring) {. + importc: "gtk_actionable_set_detailed_action_name", libprag.} + +proc setDetailedActionName*(self: Actionable; detailedActionName: string) = + gtk_actionable_set_detailed_action_name(cast[ptr Actionable00](self.impl), cstring(detailedActionName)) + +proc `detailedActionName=`*(self: Actionable; detailedActionName: string) = + gtk_actionable_set_detailed_action_name(cast[ptr Actionable00](self.impl), cstring(detailedActionName)) + +type + ActionableInterface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + getActionName*: proc(actionable: ptr Actionable00): cstring {.cdecl.} + setActionName*: proc(actionable: ptr Actionable00; actionName: cstring) {.cdecl.} + getActionTargetValue*: proc(actionable: ptr Actionable00): ptr glib.Variant00 {.cdecl.} + setActionTargetValue*: proc(actionable: ptr Actionable00; targetValue: ptr glib.Variant00) {.cdecl.} + ActionableInterface* = ref object + impl*: ptr ActionableInterface00 + +type + Activatable00* {.pure.} = object + Activatable* = ref object + impl*: ptr Activatable00 + +proc gtk_activatable_do_set_related_action*(self: ptr Activatable00; action: ptr Action00) {. + importc: "gtk_activatable_do_set_related_action", libprag.} + +proc doSetRelatedAction*(self: Activatable; action: Action) = + gtk_activatable_do_set_related_action(cast[ptr Activatable00](self.impl), cast[ptr Action00](action.impl)) + +proc gtk_activatable_get_related_action*(self: ptr Activatable00): ptr Action00 {. + importc: "gtk_activatable_get_related_action", libprag.} + +proc getRelatedAction*(self: Activatable): Action = + let gobj = gtk_activatable_get_related_action(cast[ptr Activatable00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Action](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc relatedAction*(self: Activatable): Action = + let gobj = gtk_activatable_get_related_action(cast[ptr Activatable00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Action](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_activatable_get_use_action_appearance*(self: ptr Activatable00): gboolean {. + importc: "gtk_activatable_get_use_action_appearance", libprag.} + +proc getUseActionAppearance*(self: Activatable): bool = + toBool(gtk_activatable_get_use_action_appearance(cast[ptr Activatable00](self.impl))) + +proc useActionAppearance*(self: Activatable): bool = + toBool(gtk_activatable_get_use_action_appearance(cast[ptr Activatable00](self.impl))) + +proc gtk_activatable_set_related_action*(self: ptr Activatable00; action: ptr Action00) {. + importc: "gtk_activatable_set_related_action", libprag.} + +proc setRelatedAction*(self: Activatable; action: Action) = + gtk_activatable_set_related_action(cast[ptr Activatable00](self.impl), cast[ptr Action00](action.impl)) + +proc `relatedAction=`*(self: Activatable; action: Action) = + gtk_activatable_set_related_action(cast[ptr Activatable00](self.impl), cast[ptr Action00](action.impl)) + +proc gtk_activatable_set_use_action_appearance*(self: ptr Activatable00; useAppearance: gboolean) {. + importc: "gtk_activatable_set_use_action_appearance", libprag.} + +proc setUseActionAppearance*(self: Activatable; useAppearance: bool) = + gtk_activatable_set_use_action_appearance(cast[ptr Activatable00](self.impl), gboolean(useAppearance)) + +proc `useActionAppearance=`*(self: Activatable; useAppearance: bool) = + gtk_activatable_set_use_action_appearance(cast[ptr Activatable00](self.impl), gboolean(useAppearance)) + +proc gtk_activatable_sync_action_properties*(self: ptr Activatable00; action: ptr Action00) {. + importc: "gtk_activatable_sync_action_properties", libprag.} + +proc syncActionProperties*(self: Activatable; action: Action) = + gtk_activatable_sync_action_properties(cast[ptr Activatable00](self.impl), cast[ptr Action00](action.impl)) + +type + ActivatableIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + update*: proc(activatable: ptr Activatable00; action: ptr Action00; + propertyName: cstring) {.cdecl.} + syncActionProperties*: proc(activatable: ptr Activatable00; action: ptr Action00) {.cdecl.} + ActivatableIface* = ref object + impl*: ptr ActivatableIface00 + +type + AdjustmentClass00* {.pure.} = object + parentClass*: gobject.InitiallyUnownedClass00 + changed*: proc(adjustment: ptr Adjustment00) {.cdecl.} + valueChanged*: proc(adjustment: ptr Adjustment00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + AdjustmentClass* = ref object + impl*: ptr AdjustmentClass00 + +type + AlignmentPrivate00* {.pure.} = object + AlignmentPrivate* = ref object + impl*: ptr AlignmentPrivate00 + +type + Alignment* = ref object of Bin + Alignment00* = object of Bin00 + priv4: ptr AlignmentPrivate00 + +proc gtk_alignment_new*(xalign: cfloat; yalign: cfloat; xscale: cfloat; yscale: cfloat): ptr Alignment00 {. + importc: "gtk_alignment_new", libprag.} + +proc newAlignment*(xalign: cfloat; yalign: cfloat; xscale: cfloat; yscale: cfloat): Alignment = + new(result, finalizeGObject) + result.impl = gtk_alignment_new(xalign, yalign, xscale, yscale) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAlignment*[T](result: var T; xalign: cfloat; yalign: cfloat; xscale: cfloat; yscale: cfloat) = + assert(result is Alignment) + new(result, finalizeGObject) + result.impl = gtk_alignment_new(xalign, yalign, xscale, yscale) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_alignment_get_padding*(self: ptr Alignment00; paddingTop: var uint32; paddingBottom: var uint32; + paddingLeft: var uint32; paddingRight: var uint32) {. + importc: "gtk_alignment_get_padding", libprag.} + +proc getPadding*(self: Alignment; paddingTop: var int; paddingBottom: var int; + paddingLeft: var int; paddingRight: var int) = + var paddingRight_00 = uint32(paddingRight) + var paddingBottom_00 = uint32(paddingBottom) + var paddingTop_00 = uint32(paddingTop) + var paddingLeft_00 = uint32(paddingLeft) + gtk_alignment_get_padding(cast[ptr Alignment00](self.impl), paddingTop_00, paddingBottom_00, paddingLeft_00, paddingRight_00) + paddingRight = int(paddingRight_00) + paddingBottom = int(paddingBottom_00) + paddingTop = int(paddingTop_00) + paddingLeft = int(paddingLeft_00) + +proc padding*(self: Alignment; paddingTop: var int; paddingBottom: var int; + paddingLeft: var int; paddingRight: var int) = + var paddingRight_00 = uint32(paddingRight) + var paddingBottom_00 = uint32(paddingBottom) + var paddingTop_00 = uint32(paddingTop) + var paddingLeft_00 = uint32(paddingLeft) + gtk_alignment_get_padding(cast[ptr Alignment00](self.impl), paddingTop_00, paddingBottom_00, paddingLeft_00, paddingRight_00) + paddingRight = int(paddingRight_00) + paddingBottom = int(paddingBottom_00) + paddingTop = int(paddingTop_00) + paddingLeft = int(paddingLeft_00) + +proc gtk_alignment_set*(self: ptr Alignment00; xalign: cfloat; yalign: cfloat; + xscale: cfloat; yscale: cfloat) {. + importc: "gtk_alignment_set", libprag.} + +proc set*(self: Alignment; xalign: cfloat; yalign: cfloat; xscale: cfloat; + yscale: cfloat) = + gtk_alignment_set(cast[ptr Alignment00](self.impl), xalign, yalign, xscale, yscale) + +proc gtk_alignment_set_padding*(self: ptr Alignment00; paddingTop: uint32; paddingBottom: uint32; + paddingLeft: uint32; paddingRight: uint32) {. + importc: "gtk_alignment_set_padding", libprag.} + +proc setPadding*(self: Alignment; paddingTop: int; paddingBottom: int; + paddingLeft: int; paddingRight: int) = + gtk_alignment_set_padding(cast[ptr Alignment00](self.impl), uint32(paddingTop), uint32(paddingBottom), uint32(paddingLeft), uint32(paddingRight)) + + +type + ComboBoxPrivate00* {.pure.} = object + ComboBoxPrivate* = ref object + impl*: ptr ComboBoxPrivate00 + +type + ComboBox* = ref object of Bin + ComboBox00* = object of Bin00 + priv4: ptr ComboBoxPrivate00 + +proc scChanged*(self: ComboBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scFormatEntryText*(self: ComboBox; p: proc (self: ptr gobject.Object00; path: cstring; xdata: pointer): cstring {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "format-entry-text", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveActive*(self: ComboBox; p: proc (self: ptr gobject.Object00; scrollType: ScrollType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-active", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopdown*(self: ComboBox; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "popdown", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopup*(self: ComboBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "popup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_combo_box_new*(): ptr ComboBox00 {. + importc: "gtk_combo_box_new", libprag.} + +proc newComboBox*(): ComboBox = + new(result, finalizeGObject) + result.impl = gtk_combo_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initComboBox*[T](result: var T) = + assert(result is ComboBox) + new(result, finalizeGObject) + result.impl = gtk_combo_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_combo_box_new_with_entry*(): ptr ComboBox00 {. + importc: "gtk_combo_box_new_with_entry", libprag.} + +proc newComboBoxWithEntry*(): ComboBox = + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_entry() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initComboBoxWithEntry*[T](result: var T) = + assert(result is ComboBox) + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_entry() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_combo_box_get_active*(self: ptr ComboBox00): int32 {. + importc: "gtk_combo_box_get_active", libprag.} + +proc getActive*(self: ComboBox): int = + int(gtk_combo_box_get_active(cast[ptr ComboBox00](self.impl))) + +proc active*(self: ComboBox): int = + int(gtk_combo_box_get_active(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_get_active_id*(self: ptr ComboBox00): cstring {. + importc: "gtk_combo_box_get_active_id", libprag.} + +proc getActiveId*(self: ComboBox): string = + let resul0 = gtk_combo_box_get_active_id(cast[ptr ComboBox00](self.impl)) + result = $resul0 + +proc activeId*(self: ComboBox): string = + let resul0 = gtk_combo_box_get_active_id(cast[ptr ComboBox00](self.impl)) + result = $resul0 + +proc gtk_combo_box_get_add_tearoffs*(self: ptr ComboBox00): gboolean {. + importc: "gtk_combo_box_get_add_tearoffs", libprag.} + +proc getAddTearoffs*(self: ComboBox): bool = + toBool(gtk_combo_box_get_add_tearoffs(cast[ptr ComboBox00](self.impl))) + +proc addTearoffs*(self: ComboBox): bool = + toBool(gtk_combo_box_get_add_tearoffs(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_get_column_span_column*(self: ptr ComboBox00): int32 {. + importc: "gtk_combo_box_get_column_span_column", libprag.} + +proc getColumnSpanColumn*(self: ComboBox): int = + int(gtk_combo_box_get_column_span_column(cast[ptr ComboBox00](self.impl))) + +proc columnSpanColumn*(self: ComboBox): int = + int(gtk_combo_box_get_column_span_column(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_get_entry_text_column*(self: ptr ComboBox00): int32 {. + importc: "gtk_combo_box_get_entry_text_column", libprag.} + +proc getEntryTextColumn*(self: ComboBox): int = + int(gtk_combo_box_get_entry_text_column(cast[ptr ComboBox00](self.impl))) + +proc entryTextColumn*(self: ComboBox): int = + int(gtk_combo_box_get_entry_text_column(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_get_focus_on_click*(self: ptr ComboBox00): gboolean {. + importc: "gtk_combo_box_get_focus_on_click", libprag.} + +proc getFocusOnClick*(self: ComboBox): bool = + toBool(gtk_combo_box_get_focus_on_click(cast[ptr ComboBox00](self.impl))) + +proc focusOnClick*(self: ComboBox): bool = + toBool(gtk_combo_box_get_focus_on_click(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_get_has_entry*(self: ptr ComboBox00): gboolean {. + importc: "gtk_combo_box_get_has_entry", libprag.} + +proc getHasEntry*(self: ComboBox): bool = + toBool(gtk_combo_box_get_has_entry(cast[ptr ComboBox00](self.impl))) + +proc hasEntry*(self: ComboBox): bool = + toBool(gtk_combo_box_get_has_entry(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_get_id_column*(self: ptr ComboBox00): int32 {. + importc: "gtk_combo_box_get_id_column", libprag.} + +proc getIdColumn*(self: ComboBox): int = + int(gtk_combo_box_get_id_column(cast[ptr ComboBox00](self.impl))) + +proc idColumn*(self: ComboBox): int = + int(gtk_combo_box_get_id_column(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_get_popup_accessible*(self: ptr ComboBox00): ptr atk.Object00 {. + importc: "gtk_combo_box_get_popup_accessible", libprag.} + +proc getPopupAccessible*(self: ComboBox): atk.Object = + let gobj = gtk_combo_box_get_popup_accessible(cast[ptr ComboBox00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[atk.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc popupAccessible*(self: ComboBox): atk.Object = + let gobj = gtk_combo_box_get_popup_accessible(cast[ptr ComboBox00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[atk.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_combo_box_get_popup_fixed_width*(self: ptr ComboBox00): gboolean {. + importc: "gtk_combo_box_get_popup_fixed_width", libprag.} + +proc getPopupFixedWidth*(self: ComboBox): bool = + toBool(gtk_combo_box_get_popup_fixed_width(cast[ptr ComboBox00](self.impl))) + +proc popupFixedWidth*(self: ComboBox): bool = + toBool(gtk_combo_box_get_popup_fixed_width(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_get_row_span_column*(self: ptr ComboBox00): int32 {. + importc: "gtk_combo_box_get_row_span_column", libprag.} + +proc getRowSpanColumn*(self: ComboBox): int = + int(gtk_combo_box_get_row_span_column(cast[ptr ComboBox00](self.impl))) + +proc rowSpanColumn*(self: ComboBox): int = + int(gtk_combo_box_get_row_span_column(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_get_title*(self: ptr ComboBox00): cstring {. + importc: "gtk_combo_box_get_title", libprag.} + +proc getTitle*(self: ComboBox): string = + let resul0 = gtk_combo_box_get_title(cast[ptr ComboBox00](self.impl)) + result = $resul0 + +proc title*(self: ComboBox): string = + let resul0 = gtk_combo_box_get_title(cast[ptr ComboBox00](self.impl)) + result = $resul0 + +proc gtk_combo_box_get_wrap_width*(self: ptr ComboBox00): int32 {. + importc: "gtk_combo_box_get_wrap_width", libprag.} + +proc getWrapWidth*(self: ComboBox): int = + int(gtk_combo_box_get_wrap_width(cast[ptr ComboBox00](self.impl))) + +proc wrapWidth*(self: ComboBox): int = + int(gtk_combo_box_get_wrap_width(cast[ptr ComboBox00](self.impl))) + +proc gtk_combo_box_popdown*(self: ptr ComboBox00) {. + importc: "gtk_combo_box_popdown", libprag.} + +proc popdown*(self: ComboBox) = + gtk_combo_box_popdown(cast[ptr ComboBox00](self.impl)) + +proc gtk_combo_box_popup*(self: ptr ComboBox00) {. + importc: "gtk_combo_box_popup", libprag.} + +proc popup*(self: ComboBox) = + gtk_combo_box_popup(cast[ptr ComboBox00](self.impl)) + +proc gtk_combo_box_popup_for_device*(self: ptr ComboBox00; device: ptr gdk.Device00) {. + importc: "gtk_combo_box_popup_for_device", libprag.} + +proc popupForDevice*(self: ComboBox; device: gdk.Device) = + gtk_combo_box_popup_for_device(cast[ptr ComboBox00](self.impl), cast[ptr gdk.Device00](device.impl)) + +proc gtk_combo_box_set_active*(self: ptr ComboBox00; index: int32) {. + importc: "gtk_combo_box_set_active", libprag.} + +proc setActive*(self: ComboBox; index: int) = + gtk_combo_box_set_active(cast[ptr ComboBox00](self.impl), int32(index)) + +proc `active=`*(self: ComboBox; index: int) = + gtk_combo_box_set_active(cast[ptr ComboBox00](self.impl), int32(index)) + +proc gtk_combo_box_set_active_id*(self: ptr ComboBox00; activeId: cstring): gboolean {. + importc: "gtk_combo_box_set_active_id", libprag.} + +proc setActiveId*(self: ComboBox; activeId: string): bool = + toBool(gtk_combo_box_set_active_id(cast[ptr ComboBox00](self.impl), cstring(activeId))) + +proc `activeId=`*(self: ComboBox; activeId: string): bool = + toBool(gtk_combo_box_set_active_id(cast[ptr ComboBox00](self.impl), cstring(activeId))) + +proc gtk_combo_box_set_add_tearoffs*(self: ptr ComboBox00; addTearoffs: gboolean) {. + importc: "gtk_combo_box_set_add_tearoffs", libprag.} + +proc setAddTearoffs*(self: ComboBox; addTearoffs: bool) = + gtk_combo_box_set_add_tearoffs(cast[ptr ComboBox00](self.impl), gboolean(addTearoffs)) + +proc `addTearoffs=`*(self: ComboBox; addTearoffs: bool) = + gtk_combo_box_set_add_tearoffs(cast[ptr ComboBox00](self.impl), gboolean(addTearoffs)) + +proc gtk_combo_box_set_column_span_column*(self: ptr ComboBox00; columnSpan: int32) {. + importc: "gtk_combo_box_set_column_span_column", libprag.} + +proc setColumnSpanColumn*(self: ComboBox; columnSpan: int) = + gtk_combo_box_set_column_span_column(cast[ptr ComboBox00](self.impl), int32(columnSpan)) + +proc `columnSpanColumn=`*(self: ComboBox; columnSpan: int) = + gtk_combo_box_set_column_span_column(cast[ptr ComboBox00](self.impl), int32(columnSpan)) + +proc gtk_combo_box_set_entry_text_column*(self: ptr ComboBox00; textColumn: int32) {. + importc: "gtk_combo_box_set_entry_text_column", libprag.} + +proc setEntryTextColumn*(self: ComboBox; textColumn: int) = + gtk_combo_box_set_entry_text_column(cast[ptr ComboBox00](self.impl), int32(textColumn)) + +proc `entryTextColumn=`*(self: ComboBox; textColumn: int) = + gtk_combo_box_set_entry_text_column(cast[ptr ComboBox00](self.impl), int32(textColumn)) + +proc gtk_combo_box_set_focus_on_click*(self: ptr ComboBox00; focusOnClick: gboolean) {. + importc: "gtk_combo_box_set_focus_on_click", libprag.} + +proc setFocusOnClick*(self: ComboBox; focusOnClick: bool) = + gtk_combo_box_set_focus_on_click(cast[ptr ComboBox00](self.impl), gboolean(focusOnClick)) + +proc `focusOnClick=`*(self: ComboBox; focusOnClick: bool) = + gtk_combo_box_set_focus_on_click(cast[ptr ComboBox00](self.impl), gboolean(focusOnClick)) + +proc gtk_combo_box_set_id_column*(self: ptr ComboBox00; idColumn: int32) {. + importc: "gtk_combo_box_set_id_column", libprag.} + +proc setIdColumn*(self: ComboBox; idColumn: int) = + gtk_combo_box_set_id_column(cast[ptr ComboBox00](self.impl), int32(idColumn)) + +proc `idColumn=`*(self: ComboBox; idColumn: int) = + gtk_combo_box_set_id_column(cast[ptr ComboBox00](self.impl), int32(idColumn)) + +proc gtk_combo_box_set_popup_fixed_width*(self: ptr ComboBox00; fixed: gboolean) {. + importc: "gtk_combo_box_set_popup_fixed_width", libprag.} + +proc setPopupFixedWidth*(self: ComboBox; fixed: bool) = + gtk_combo_box_set_popup_fixed_width(cast[ptr ComboBox00](self.impl), gboolean(fixed)) + +proc `popupFixedWidth=`*(self: ComboBox; fixed: bool) = + gtk_combo_box_set_popup_fixed_width(cast[ptr ComboBox00](self.impl), gboolean(fixed)) + +proc gtk_combo_box_set_row_span_column*(self: ptr ComboBox00; rowSpan: int32) {. + importc: "gtk_combo_box_set_row_span_column", libprag.} + +proc setRowSpanColumn*(self: ComboBox; rowSpan: int) = + gtk_combo_box_set_row_span_column(cast[ptr ComboBox00](self.impl), int32(rowSpan)) + +proc `rowSpanColumn=`*(self: ComboBox; rowSpan: int) = + gtk_combo_box_set_row_span_column(cast[ptr ComboBox00](self.impl), int32(rowSpan)) + +proc gtk_combo_box_set_title*(self: ptr ComboBox00; title: cstring) {. + importc: "gtk_combo_box_set_title", libprag.} + +proc setTitle*(self: ComboBox; title: string) = + gtk_combo_box_set_title(cast[ptr ComboBox00](self.impl), cstring(title)) + +proc `title=`*(self: ComboBox; title: string) = + gtk_combo_box_set_title(cast[ptr ComboBox00](self.impl), cstring(title)) + +proc gtk_combo_box_set_wrap_width*(self: ptr ComboBox00; width: int32) {. + importc: "gtk_combo_box_set_wrap_width", libprag.} + +proc setWrapWidth*(self: ComboBox; width: int) = + gtk_combo_box_set_wrap_width(cast[ptr ComboBox00](self.impl), int32(width)) + +proc `wrapWidth=`*(self: ComboBox; width: int) = + gtk_combo_box_set_wrap_width(cast[ptr ComboBox00](self.impl), int32(width)) + +type + AppChooserButtonPrivate00* {.pure.} = object + AppChooserButtonPrivate* = ref object + impl*: ptr AppChooserButtonPrivate00 + +type + AppChooserButton* = ref object of ComboBox + AppChooserButton00* = object of ComboBox00 + priv5: ptr AppChooserButtonPrivate00 + +proc scCustomItemActivated*(self: AppChooserButton; p: proc (self: ptr gobject.Object00; itemName: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "custom-item-activated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_app_chooser_button_new*(contentType: cstring): ptr AppChooserButton00 {. + importc: "gtk_app_chooser_button_new", libprag.} + +proc newAppChooserButton*(contentType: string): AppChooserButton = + new(result, finalizeGObject) + result.impl = gtk_app_chooser_button_new(cstring(contentType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAppChooserButton*[T](result: var T; contentType: string) = + assert(result is AppChooserButton) + new(result, finalizeGObject) + result.impl = gtk_app_chooser_button_new(cstring(contentType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_app_chooser_button_append_custom_item*(self: ptr AppChooserButton00; name: cstring; label: cstring; + icon: ptr gio.Icon00) {. + importc: "gtk_app_chooser_button_append_custom_item", libprag.} + +proc appendCustomItem*(self: AppChooserButton; name: string; label: string; + icon: gio.Icon) = + gtk_app_chooser_button_append_custom_item(cast[ptr AppChooserButton00](self.impl), cstring(name), cstring(label), cast[ptr gio.Icon00](icon.impl)) + +proc gtk_app_chooser_button_append_separator*(self: ptr AppChooserButton00) {. + importc: "gtk_app_chooser_button_append_separator", libprag.} + +proc appendSeparator*(self: AppChooserButton) = + gtk_app_chooser_button_append_separator(cast[ptr AppChooserButton00](self.impl)) + +proc gtk_app_chooser_button_get_heading*(self: ptr AppChooserButton00): cstring {. + importc: "gtk_app_chooser_button_get_heading", libprag.} + +proc getHeading*(self: AppChooserButton): string = + let resul0 = gtk_app_chooser_button_get_heading(cast[ptr AppChooserButton00](self.impl)) + result = $resul0 + +proc heading*(self: AppChooserButton): string = + let resul0 = gtk_app_chooser_button_get_heading(cast[ptr AppChooserButton00](self.impl)) + result = $resul0 + +proc gtk_app_chooser_button_get_show_default_item*(self: ptr AppChooserButton00): gboolean {. + importc: "gtk_app_chooser_button_get_show_default_item", libprag.} + +proc getShowDefaultItem*(self: AppChooserButton): bool = + toBool(gtk_app_chooser_button_get_show_default_item(cast[ptr AppChooserButton00](self.impl))) + +proc showDefaultItem*(self: AppChooserButton): bool = + toBool(gtk_app_chooser_button_get_show_default_item(cast[ptr AppChooserButton00](self.impl))) + +proc gtk_app_chooser_button_get_show_dialog_item*(self: ptr AppChooserButton00): gboolean {. + importc: "gtk_app_chooser_button_get_show_dialog_item", libprag.} + +proc getShowDialogItem*(self: AppChooserButton): bool = + toBool(gtk_app_chooser_button_get_show_dialog_item(cast[ptr AppChooserButton00](self.impl))) + +proc showDialogItem*(self: AppChooserButton): bool = + toBool(gtk_app_chooser_button_get_show_dialog_item(cast[ptr AppChooserButton00](self.impl))) + +proc gtk_app_chooser_button_set_active_custom_item*(self: ptr AppChooserButton00; name: cstring) {. + importc: "gtk_app_chooser_button_set_active_custom_item", libprag.} + +proc setActiveCustomItem*(self: AppChooserButton; name: string) = + gtk_app_chooser_button_set_active_custom_item(cast[ptr AppChooserButton00](self.impl), cstring(name)) + +proc `activeCustomItem=`*(self: AppChooserButton; name: string) = + gtk_app_chooser_button_set_active_custom_item(cast[ptr AppChooserButton00](self.impl), cstring(name)) + +proc gtk_app_chooser_button_set_heading*(self: ptr AppChooserButton00; heading: cstring) {. + importc: "gtk_app_chooser_button_set_heading", libprag.} + +proc setHeading*(self: AppChooserButton; heading: string) = + gtk_app_chooser_button_set_heading(cast[ptr AppChooserButton00](self.impl), cstring(heading)) + +proc `heading=`*(self: AppChooserButton; heading: string) = + gtk_app_chooser_button_set_heading(cast[ptr AppChooserButton00](self.impl), cstring(heading)) + +proc gtk_app_chooser_button_set_show_default_item*(self: ptr AppChooserButton00; setting: gboolean) {. + importc: "gtk_app_chooser_button_set_show_default_item", libprag.} + +proc setShowDefaultItem*(self: AppChooserButton; setting: bool) = + gtk_app_chooser_button_set_show_default_item(cast[ptr AppChooserButton00](self.impl), gboolean(setting)) + +proc `showDefaultItem=`*(self: AppChooserButton; setting: bool) = + gtk_app_chooser_button_set_show_default_item(cast[ptr AppChooserButton00](self.impl), gboolean(setting)) + +proc gtk_app_chooser_button_set_show_dialog_item*(self: ptr AppChooserButton00; setting: gboolean) {. + importc: "gtk_app_chooser_button_set_show_dialog_item", libprag.} + +proc setShowDialogItem*(self: AppChooserButton; setting: bool) = + gtk_app_chooser_button_set_show_dialog_item(cast[ptr AppChooserButton00](self.impl), gboolean(setting)) + +proc `showDialogItem=`*(self: AppChooserButton; setting: bool) = + gtk_app_chooser_button_set_show_dialog_item(cast[ptr AppChooserButton00](self.impl), gboolean(setting)) + +type + CellAreaPrivate00* {.pure.} = object + CellAreaPrivate* = ref object + impl*: ptr CellAreaPrivate00 + +type + CellRendererPrivate00* {.pure.} = object + CellRendererPrivate* = ref object + impl*: ptr CellRendererPrivate00 + +type + CellEditable00* {.pure.} = object + CellEditable* = ref object + impl*: ptr CellEditable00 + +proc gtk_cell_editable_editing_done*(self: ptr CellEditable00) {. + importc: "gtk_cell_editable_editing_done", libprag.} + +proc editingDone*(self: CellEditable) = + gtk_cell_editable_editing_done(cast[ptr CellEditable00](self.impl)) + +proc gtk_cell_editable_remove_widget*(self: ptr CellEditable00) {. + importc: "gtk_cell_editable_remove_widget", libprag.} + +proc removeWidget*(self: CellEditable) = + gtk_cell_editable_remove_widget(cast[ptr CellEditable00](self.impl)) + +proc gtk_cell_editable_start_editing*(self: ptr CellEditable00; event: ptr gdk.Event00) {. + importc: "gtk_cell_editable_start_editing", libprag.} + +proc startEditing*(self: CellEditable; event: gdk.Event) = + gtk_cell_editable_start_editing(cast[ptr CellEditable00](self.impl), cast[ptr gdk.Event00](event.impl)) + +type + CellRenderer* = ref object of gobject.InitiallyUnowned + CellRenderer00* = object of gobject.InitiallyUnowned00 + priv1: ptr CellRendererPrivate00 + +proc scEditingCanceled*(self: CellRenderer; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "editing-canceled", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEditingStarted*(self: CellRenderer; p: proc (self: ptr gobject.Object00; editable: CellEditable00; path: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "editing-started", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_cell_renderer_get_alignment*(self: ptr CellRenderer00; xalign: var cfloat; yalign: var cfloat) {. + importc: "gtk_cell_renderer_get_alignment", libprag.} + +proc getAlignment*(self: CellRenderer; xalign: var cfloat; yalign: var cfloat) = + gtk_cell_renderer_get_alignment(cast[ptr CellRenderer00](self.impl), xalign, yalign) + +proc alignment*(self: CellRenderer; xalign: var cfloat; yalign: var cfloat) = + gtk_cell_renderer_get_alignment(cast[ptr CellRenderer00](self.impl), xalign, yalign) + +proc gtk_cell_renderer_get_fixed_size*(self: ptr CellRenderer00; width: var int32; height: var int32) {. + importc: "gtk_cell_renderer_get_fixed_size", libprag.} + +proc getFixedSize*(self: CellRenderer; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_cell_renderer_get_fixed_size(cast[ptr CellRenderer00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc fixedSize*(self: CellRenderer; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_cell_renderer_get_fixed_size(cast[ptr CellRenderer00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc gtk_cell_renderer_get_padding*(self: ptr CellRenderer00; xpad: var int32; ypad: var int32) {. + importc: "gtk_cell_renderer_get_padding", libprag.} + +proc getPadding*(self: CellRenderer; xpad: var int; ypad: var int) = + var xpad_00 = int32(xpad) + var ypad_00 = int32(ypad) + gtk_cell_renderer_get_padding(cast[ptr CellRenderer00](self.impl), xpad_00, ypad_00) + xpad = int(xpad_00) + ypad = int(ypad_00) + +proc padding*(self: CellRenderer; xpad: var int; ypad: var int) = + var xpad_00 = int32(xpad) + var ypad_00 = int32(ypad) + gtk_cell_renderer_get_padding(cast[ptr CellRenderer00](self.impl), xpad_00, ypad_00) + xpad = int(xpad_00) + ypad = int(ypad_00) + +proc gtk_cell_renderer_get_preferred_height*(self: ptr CellRenderer00; widget: ptr Widget00; minimumSize: var int32; + naturalSize: var int32) {. + importc: "gtk_cell_renderer_get_preferred_height", libprag.} + +proc getPreferredHeight*(self: CellRenderer; widget: Widget; minimumSize: var int; + naturalSize: var int) = + var minimumSize_00 = int32(minimumSize) + var naturalSize_00 = int32(naturalSize) + gtk_cell_renderer_get_preferred_height(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), minimumSize_00, naturalSize_00) + minimumSize = int(minimumSize_00) + naturalSize = int(naturalSize_00) + +proc preferredHeight*(self: CellRenderer; widget: Widget; minimumSize: var int; + naturalSize: var int) = + var minimumSize_00 = int32(minimumSize) + var naturalSize_00 = int32(naturalSize) + gtk_cell_renderer_get_preferred_height(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), minimumSize_00, naturalSize_00) + minimumSize = int(minimumSize_00) + naturalSize = int(naturalSize_00) + +proc gtk_cell_renderer_get_preferred_height_for_width*(self: ptr CellRenderer00; widget: ptr Widget00; width: int32; + minimumHeight: var int32; naturalHeight: var int32) {. + importc: "gtk_cell_renderer_get_preferred_height_for_width", libprag.} + +proc getPreferredHeightForWidth*(self: CellRenderer; widget: Widget; width: int; minimumHeight: var int; + naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_renderer_get_preferred_height_for_width(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), int32(width), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc preferredHeightForWidth*(self: CellRenderer; widget: Widget; width: int; minimumHeight: var int; + naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_renderer_get_preferred_height_for_width(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), int32(width), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc gtk_cell_renderer_get_preferred_size*(self: ptr CellRenderer00; widget: ptr Widget00; minimumSize: var Requisition00; + naturalSize: var Requisition00) {. + importc: "gtk_cell_renderer_get_preferred_size", libprag.} + +proc getPreferredSize*(self: ptr CellRenderer00; widget: ptr Widget00; minimumSize: var Requisition00; + naturalSize: var Requisition00) {. + importc: "gtk_cell_renderer_get_preferred_size", libprag.} + +proc preferredSize*(self: ptr CellRenderer00; widget: ptr Widget00; minimumSize: var Requisition00; + naturalSize: var Requisition00) {. + importc: "gtk_cell_renderer_get_preferred_size", libprag.} + +proc gtk_cell_renderer_get_preferred_width*(self: ptr CellRenderer00; widget: ptr Widget00; minimumSize: var int32; + naturalSize: var int32) {. + importc: "gtk_cell_renderer_get_preferred_width", libprag.} + +proc getPreferredWidth*(self: CellRenderer; widget: Widget; minimumSize: var int; + naturalSize: var int) = + var minimumSize_00 = int32(minimumSize) + var naturalSize_00 = int32(naturalSize) + gtk_cell_renderer_get_preferred_width(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), minimumSize_00, naturalSize_00) + minimumSize = int(minimumSize_00) + naturalSize = int(naturalSize_00) + +proc preferredWidth*(self: CellRenderer; widget: Widget; minimumSize: var int; + naturalSize: var int) = + var minimumSize_00 = int32(minimumSize) + var naturalSize_00 = int32(naturalSize) + gtk_cell_renderer_get_preferred_width(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), minimumSize_00, naturalSize_00) + minimumSize = int(minimumSize_00) + naturalSize = int(naturalSize_00) + +proc gtk_cell_renderer_get_preferred_width_for_height*(self: ptr CellRenderer00; widget: ptr Widget00; height: int32; + minimumWidth: var int32; naturalWidth: var int32) {. + importc: "gtk_cell_renderer_get_preferred_width_for_height", libprag.} + +proc getPreferredWidthForHeight*(self: CellRenderer; widget: Widget; height: int; minimumWidth: var int; + naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_renderer_get_preferred_width_for_height(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), int32(height), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc preferredWidthForHeight*(self: CellRenderer; widget: Widget; height: int; minimumWidth: var int; + naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_renderer_get_preferred_width_for_height(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), int32(height), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc gtk_cell_renderer_get_request_mode*(self: ptr CellRenderer00): SizeRequestMode {. + importc: "gtk_cell_renderer_get_request_mode", libprag.} + +proc getRequestMode*(self: CellRenderer): SizeRequestMode = + gtk_cell_renderer_get_request_mode(cast[ptr CellRenderer00](self.impl)) + +proc requestMode*(self: CellRenderer): SizeRequestMode = + gtk_cell_renderer_get_request_mode(cast[ptr CellRenderer00](self.impl)) + +proc gtk_cell_renderer_get_sensitive*(self: ptr CellRenderer00): gboolean {. + importc: "gtk_cell_renderer_get_sensitive", libprag.} + +proc getSensitive*(self: CellRenderer): bool = + toBool(gtk_cell_renderer_get_sensitive(cast[ptr CellRenderer00](self.impl))) + +proc sensitive*(self: CellRenderer): bool = + toBool(gtk_cell_renderer_get_sensitive(cast[ptr CellRenderer00](self.impl))) + +proc gtk_cell_renderer_get_size*(self: ptr CellRenderer00; widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; + xOffset: var int32; yOffset: var int32; width: var int32; height: var int32) {. + importc: "gtk_cell_renderer_get_size", libprag.} + +proc getSize*(self: CellRenderer; widget: Widget; cellArea: gdk.Rectangle; + xOffset: var int; yOffset: var int; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + var yOffset_00 = int32(yOffset) + var xOffset_00 = int32(xOffset) + gtk_cell_renderer_get_size(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), cast[ptr gdk.Rectangle00](cellArea.impl), xOffset_00, yOffset_00, width_00, height_00) + height = int(height_00) + width = int(width_00) + yOffset = int(yOffset_00) + xOffset = int(xOffset_00) + +proc size*(self: CellRenderer; widget: Widget; cellArea: gdk.Rectangle; + xOffset: var int; yOffset: var int; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + var yOffset_00 = int32(yOffset) + var xOffset_00 = int32(xOffset) + gtk_cell_renderer_get_size(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), cast[ptr gdk.Rectangle00](cellArea.impl), xOffset_00, yOffset_00, width_00, height_00) + height = int(height_00) + width = int(width_00) + yOffset = int(yOffset_00) + xOffset = int(xOffset_00) + +proc gtk_cell_renderer_get_visible*(self: ptr CellRenderer00): gboolean {. + importc: "gtk_cell_renderer_get_visible", libprag.} + +proc getVisible*(self: CellRenderer): bool = + toBool(gtk_cell_renderer_get_visible(cast[ptr CellRenderer00](self.impl))) + +proc visible*(self: CellRenderer): bool = + toBool(gtk_cell_renderer_get_visible(cast[ptr CellRenderer00](self.impl))) + +proc gtk_cell_renderer_is_activatable*(self: ptr CellRenderer00): gboolean {. + importc: "gtk_cell_renderer_is_activatable", libprag.} + +proc isActivatable*(self: CellRenderer): bool = + toBool(gtk_cell_renderer_is_activatable(cast[ptr CellRenderer00](self.impl))) + +proc gtk_cell_renderer_set_alignment*(self: ptr CellRenderer00; xalign: cfloat; yalign: cfloat) {. + importc: "gtk_cell_renderer_set_alignment", libprag.} + +proc setAlignment*(self: CellRenderer; xalign: cfloat; yalign: cfloat) = + gtk_cell_renderer_set_alignment(cast[ptr CellRenderer00](self.impl), xalign, yalign) + +proc gtk_cell_renderer_set_fixed_size*(self: ptr CellRenderer00; width: int32; height: int32) {. + importc: "gtk_cell_renderer_set_fixed_size", libprag.} + +proc setFixedSize*(self: CellRenderer; width: int; height: int) = + gtk_cell_renderer_set_fixed_size(cast[ptr CellRenderer00](self.impl), int32(width), int32(height)) + +proc gtk_cell_renderer_set_padding*(self: ptr CellRenderer00; xpad: int32; ypad: int32) {. + importc: "gtk_cell_renderer_set_padding", libprag.} + +proc setPadding*(self: CellRenderer; xpad: int; ypad: int) = + gtk_cell_renderer_set_padding(cast[ptr CellRenderer00](self.impl), int32(xpad), int32(ypad)) + +proc gtk_cell_renderer_set_sensitive*(self: ptr CellRenderer00; sensitive: gboolean) {. + importc: "gtk_cell_renderer_set_sensitive", libprag.} + +proc setSensitive*(self: CellRenderer; sensitive: bool) = + gtk_cell_renderer_set_sensitive(cast[ptr CellRenderer00](self.impl), gboolean(sensitive)) + +proc `sensitive=`*(self: CellRenderer; sensitive: bool) = + gtk_cell_renderer_set_sensitive(cast[ptr CellRenderer00](self.impl), gboolean(sensitive)) + +proc gtk_cell_renderer_set_visible*(self: ptr CellRenderer00; visible: gboolean) {. + importc: "gtk_cell_renderer_set_visible", libprag.} + +proc setVisible*(self: CellRenderer; visible: bool) = + gtk_cell_renderer_set_visible(cast[ptr CellRenderer00](self.impl), gboolean(visible)) + +proc `visible=`*(self: CellRenderer; visible: bool) = + gtk_cell_renderer_set_visible(cast[ptr CellRenderer00](self.impl), gboolean(visible)) + +proc gtk_cell_renderer_stop_editing*(self: ptr CellRenderer00; canceled: gboolean) {. + importc: "gtk_cell_renderer_stop_editing", libprag.} + +proc stopEditing*(self: CellRenderer; canceled: bool) = + gtk_cell_renderer_stop_editing(cast[ptr CellRenderer00](self.impl), gboolean(canceled)) + +type + CellRendererState* {.size: sizeof(cint), pure.} = enum + selected = 1 + prelit = 2 + insensitive = 4 + sorted = 8 + focused = 16 + expandable = 32 + expanded = 64 + +proc gtk_cell_renderer_activate*(self: ptr CellRenderer00; event: ptr gdk.Event00; + widget: ptr Widget00; path: cstring; backgroundArea: ptr gdk.Rectangle00; cellArea: ptr gdk.Rectangle00; + flags: CellRendererState): gboolean {. + importc: "gtk_cell_renderer_activate", libprag.} + +proc activate*(self: CellRenderer; event: gdk.Event; widget: Widget; + path: string; backgroundArea: gdk.Rectangle; cellArea: gdk.Rectangle; flags: CellRendererState): bool = + toBool(gtk_cell_renderer_activate(cast[ptr CellRenderer00](self.impl), cast[ptr gdk.Event00](event.impl), cast[ptr Widget00](widget.impl), cstring(path), cast[ptr gdk.Rectangle00](backgroundArea.impl), cast[ptr gdk.Rectangle00](cellArea.impl), flags)) + +proc gtk_cell_renderer_get_aligned_area*(self: ptr CellRenderer00; widget: ptr Widget00; flags: CellRendererState; + cellArea: ptr gdk.Rectangle00; alignedArea: var gdk.Rectangle00) {. + importc: "gtk_cell_renderer_get_aligned_area", libprag.} + +proc getAlignedArea*(self: ptr CellRenderer00; widget: ptr Widget00; flags: CellRendererState; + cellArea: ptr gdk.Rectangle00; alignedArea: var gdk.Rectangle00) {. + importc: "gtk_cell_renderer_get_aligned_area", libprag.} + +proc alignedArea*(self: ptr CellRenderer00; widget: ptr Widget00; flags: CellRendererState; + cellArea: ptr gdk.Rectangle00; alignedArea: var gdk.Rectangle00) {. + importc: "gtk_cell_renderer_get_aligned_area", libprag.} + +proc gtk_cell_renderer_get_state*(self: ptr CellRenderer00; widget: ptr Widget00; cellState: CellRendererState): StateFlags {. + importc: "gtk_cell_renderer_get_state", libprag.} + +proc getState*(self: CellRenderer; widget: Widget; cellState: CellRendererState): StateFlags = + gtk_cell_renderer_get_state(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), cellState) + +proc state*(self: CellRenderer; widget: Widget; cellState: CellRendererState): StateFlags = + gtk_cell_renderer_get_state(cast[ptr CellRenderer00](self.impl), cast[ptr Widget00](widget.impl), cellState) + +proc gtk_cell_renderer_render*(self: ptr CellRenderer00; cr: ptr cairo.Context00; + widget: ptr Widget00; backgroundArea: ptr gdk.Rectangle00; cellArea: ptr gdk.Rectangle00; flags: CellRendererState) {. + importc: "gtk_cell_renderer_render", libprag.} + +proc render*(self: CellRenderer; cr: cairo.Context; widget: Widget; + backgroundArea: gdk.Rectangle; cellArea: gdk.Rectangle; flags: CellRendererState) = + gtk_cell_renderer_render(cast[ptr CellRenderer00](self.impl), cast[ptr cairo.Context00](cr.impl), cast[ptr Widget00](widget.impl), cast[ptr gdk.Rectangle00](backgroundArea.impl), cast[ptr gdk.Rectangle00](cellArea.impl), flags) + +proc gtk_cell_renderer_start_editing*(self: ptr CellRenderer00; event: ptr gdk.Event00; + widget: ptr Widget00; path: cstring; backgroundArea: ptr gdk.Rectangle00; cellArea: ptr gdk.Rectangle00; + flags: CellRendererState): ptr CellEditable00 {. + importc: "gtk_cell_renderer_start_editing", libprag.} + +proc startEditing*(self: CellRenderer; event: gdk.Event; widget: Widget; + path: string; backgroundArea: gdk.Rectangle; cellArea: gdk.Rectangle; flags: CellRendererState): CellEditable = + new(result) + result.impl = gtk_cell_renderer_start_editing(cast[ptr CellRenderer00](self.impl), cast[ptr gdk.Event00](event.impl), cast[ptr Widget00](widget.impl), cstring(path), cast[ptr gdk.Rectangle00](backgroundArea.impl), cast[ptr gdk.Rectangle00](cellArea.impl), flags) + +type + TreeIter00* {.pure.} = object + stamp*: int32 + userData*: pointer + userData2*: pointer + userData3*: pointer + TreeIter* = ref object + impl*: ptr TreeIter00 + +proc gtk_tree_iter_copy*(self: ptr TreeIter00): ptr TreeIter00 {. + importc: "gtk_tree_iter_copy", libprag.} + +proc copy*(self: TreeIter): TreeIter = + new(result) + result.impl = gtk_tree_iter_copy(cast[ptr TreeIter00](self.impl)) + +proc gtk_tree_iter_free*(self: ptr TreeIter00) {. + importc: "gtk_tree_iter_free", libprag.} + +proc free*(self: TreeIter) = + gtk_tree_iter_free(cast[ptr TreeIter00](self.impl)) + +proc gtk_combo_box_get_active_iter*(self: ptr ComboBox00; iter: var TreeIter00): gboolean {. + importc: "gtk_combo_box_get_active_iter", libprag.} + +proc getActiveIter*(self: ptr ComboBox00; iter: var TreeIter00): gboolean {. + importc: "gtk_combo_box_get_active_iter", libprag.} + +proc activeIter*(self: ptr ComboBox00; iter: var TreeIter00): gboolean {. + importc: "gtk_combo_box_get_active_iter", libprag.} + +proc gtk_combo_box_set_active_iter*(self: ptr ComboBox00; iter: ptr TreeIter00) {. + importc: "gtk_combo_box_set_active_iter", libprag.} + +proc setActiveIter*(self: ComboBox; iter: TreeIter) = + gtk_combo_box_set_active_iter(cast[ptr ComboBox00](self.impl), cast[ptr TreeIter00](iter.impl)) + +proc `activeIter=`*(self: ComboBox; iter: TreeIter) = + gtk_combo_box_set_active_iter(cast[ptr ComboBox00](self.impl), cast[ptr TreeIter00](iter.impl)) + +type + SensitivityType* {.size: sizeof(cint), pure.} = enum + auto = 0 + on = 1 + off = 2 + +proc gtk_combo_box_get_button_sensitivity*(self: ptr ComboBox00): SensitivityType {. + importc: "gtk_combo_box_get_button_sensitivity", libprag.} + +proc getButtonSensitivity*(self: ComboBox): SensitivityType = + gtk_combo_box_get_button_sensitivity(cast[ptr ComboBox00](self.impl)) + +proc buttonSensitivity*(self: ComboBox): SensitivityType = + gtk_combo_box_get_button_sensitivity(cast[ptr ComboBox00](self.impl)) + +proc gtk_combo_box_set_button_sensitivity*(self: ptr ComboBox00; sensitivity: SensitivityType) {. + importc: "gtk_combo_box_set_button_sensitivity", libprag.} + +proc setButtonSensitivity*(self: ComboBox; sensitivity: SensitivityType) = + gtk_combo_box_set_button_sensitivity(cast[ptr ComboBox00](self.impl), sensitivity) + +proc `buttonSensitivity=`*(self: ComboBox; sensitivity: SensitivityType) = + gtk_combo_box_set_button_sensitivity(cast[ptr ComboBox00](self.impl), sensitivity) + +type + TreeModel00* {.pure.} = object + TreeModel* = ref object + impl*: ptr TreeModel00 + +proc gtk_tree_model_get_column_type*(self: ptr TreeModel00; index: int32): GType {. + importc: "gtk_tree_model_get_column_type", libprag.} + +proc getColumnType*(self: TreeModel; index: int): GType = + gtk_tree_model_get_column_type(cast[ptr TreeModel00](self.impl), int32(index)) + +proc columnType*(self: TreeModel; index: int): GType = + gtk_tree_model_get_column_type(cast[ptr TreeModel00](self.impl), int32(index)) + +proc gtk_tree_model_get_iter_first*(self: ptr TreeModel00; iter: var TreeIter00): gboolean {. + importc: "gtk_tree_model_get_iter_first", libprag.} + +proc getIterFirst*(self: ptr TreeModel00; iter: var TreeIter00): gboolean {. + importc: "gtk_tree_model_get_iter_first", libprag.} + +proc iterFirst*(self: ptr TreeModel00; iter: var TreeIter00): gboolean {. + importc: "gtk_tree_model_get_iter_first", libprag.} + +proc gtk_tree_model_get_iter_from_string*(self: ptr TreeModel00; iter: var TreeIter00; pathString: cstring): gboolean {. + importc: "gtk_tree_model_get_iter_from_string", libprag.} + +proc getIterFromString*(self: ptr TreeModel00; iter: var TreeIter00; pathString: cstring): gboolean {. + importc: "gtk_tree_model_get_iter_from_string", libprag.} + +proc iterFromString*(self: ptr TreeModel00; iter: var TreeIter00; pathString: cstring): gboolean {. + importc: "gtk_tree_model_get_iter_from_string", libprag.} + +proc gtk_tree_model_get_n_columns*(self: ptr TreeModel00): int32 {. + importc: "gtk_tree_model_get_n_columns", libprag.} + +proc getNColumns*(self: TreeModel): int = + int(gtk_tree_model_get_n_columns(cast[ptr TreeModel00](self.impl))) + +proc nColumns*(self: TreeModel): int = + int(gtk_tree_model_get_n_columns(cast[ptr TreeModel00](self.impl))) + +proc gtk_tree_model_get_string_from_iter*(self: ptr TreeModel00; iter: ptr TreeIter00): cstring {. + importc: "gtk_tree_model_get_string_from_iter", libprag.} + +proc getStringFromIter*(self: TreeModel; iter: TreeIter): string = + let resul0 = gtk_tree_model_get_string_from_iter(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl)) + result = $resul0 + cogfree(resul0) + +proc stringFromIter*(self: TreeModel; iter: TreeIter): string = + let resul0 = gtk_tree_model_get_string_from_iter(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_tree_model_get_value*(self: ptr TreeModel00; iter: ptr TreeIter00; column: int32; + value: var gobject.Value00) {. + importc: "gtk_tree_model_get_value", libprag.} + +proc getValue*(self: ptr TreeModel00; iter: ptr TreeIter00; column: int32; + value: var gobject.Value00) {. + importc: "gtk_tree_model_get_value", libprag.} + +proc value*(self: ptr TreeModel00; iter: ptr TreeIter00; column: int32; + value: var gobject.Value00) {. + importc: "gtk_tree_model_get_value", libprag.} + +proc gtk_tree_model_iter_children*(self: ptr TreeModel00; iter: var TreeIter00; parent: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_iter_children", libprag.} + +proc iterChildren*(self: ptr TreeModel00; iter: var TreeIter00; parent: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_iter_children", libprag.} + +proc gtk_tree_model_iter_has_child*(self: ptr TreeModel00; iter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_iter_has_child", libprag.} + +proc iterHasChild*(self: TreeModel; iter: TreeIter): bool = + toBool(gtk_tree_model_iter_has_child(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_tree_model_iter_n_children*(self: ptr TreeModel00; iter: ptr TreeIter00): int32 {. + importc: "gtk_tree_model_iter_n_children", libprag.} + +proc iterNChildren*(self: TreeModel; iter: TreeIter): int = + int(gtk_tree_model_iter_n_children(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_tree_model_iter_next*(self: ptr TreeModel00; iter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_iter_next", libprag.} + +proc iterNext*(self: TreeModel; iter: TreeIter): bool = + toBool(gtk_tree_model_iter_next(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_tree_model_iter_nth_child*(self: ptr TreeModel00; iter: var TreeIter00; parent: ptr TreeIter00; + n: int32): gboolean {. + importc: "gtk_tree_model_iter_nth_child", libprag.} + +proc iterNthChild*(self: ptr TreeModel00; iter: var TreeIter00; parent: ptr TreeIter00; + n: int32): gboolean {. + importc: "gtk_tree_model_iter_nth_child", libprag.} + +proc gtk_tree_model_iter_parent*(self: ptr TreeModel00; iter: var TreeIter00; child: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_iter_parent", libprag.} + +proc iterParent*(self: ptr TreeModel00; iter: var TreeIter00; child: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_iter_parent", libprag.} + +proc gtk_tree_model_iter_previous*(self: ptr TreeModel00; iter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_iter_previous", libprag.} + +proc iterPrevious*(self: TreeModel; iter: TreeIter): bool = + toBool(gtk_tree_model_iter_previous(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_tree_model_ref_node*(self: ptr TreeModel00; iter: ptr TreeIter00) {. + importc: "gtk_tree_model_ref_node", libprag.} + +proc refNode*(self: TreeModel; iter: TreeIter) = + gtk_tree_model_ref_node(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl)) + +proc gtk_tree_model_sort_new_with_model*(self: ptr TreeModel00): ptr TreeModel00 {. + importc: "gtk_tree_model_sort_new_with_model", libprag.} + +proc sortNewWithModel*(self: TreeModel): TreeModel = + new(result) + result.impl = gtk_tree_model_sort_new_with_model(cast[ptr TreeModel00](self.impl)) + +proc gtk_tree_model_unref_node*(self: ptr TreeModel00; iter: ptr TreeIter00) {. + importc: "gtk_tree_model_unref_node", libprag.} + +proc unrefNode*(self: TreeModel; iter: TreeIter) = + gtk_tree_model_unref_node(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl)) + +type + CellArea* = ref object of gobject.InitiallyUnowned + CellArea00* = object of gobject.InitiallyUnowned00 + priv1: ptr CellAreaPrivate00 + +proc scAddEditable*(self: CellArea; p: proc (self: ptr gobject.Object00; renderer: CellRenderer00; editable: CellEditable00; + cellArea: gdk.Rectangle00; path: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "add-editable", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scApplyAttributes*(self: CellArea; p: proc (self: ptr gobject.Object00; model: TreeModel00; iter: TreeIter00; isExpander: gboolean; + isExpanded: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "apply-attributes", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scFocusChanged*(self: CellArea; p: proc (self: ptr gobject.Object00; renderer: CellRenderer00; path: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "focus-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRemoveEditable*(self: CellArea; p: proc (self: ptr gobject.Object00; renderer: CellRenderer00; editable: CellEditable00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "remove-editable", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_cell_area_activate_cell*(self: ptr CellArea00; widget: ptr Widget00; renderer: ptr CellRenderer00; + event: ptr gdk.Event00; cellArea: ptr gdk.Rectangle00; flags: CellRendererState): gboolean {. + importc: "gtk_cell_area_activate_cell", libprag.} + +proc activateCell*(self: CellArea; widget: Widget; renderer: CellRenderer; + event: gdk.Event; cellArea: gdk.Rectangle; flags: CellRendererState): bool = + toBool(gtk_cell_area_activate_cell(cast[ptr CellArea00](self.impl), cast[ptr Widget00](widget.impl), cast[ptr CellRenderer00](renderer.impl), cast[ptr gdk.Event00](event.impl), cast[ptr gdk.Rectangle00](cellArea.impl), flags)) + +proc gtk_cell_area_add*(self: ptr CellArea00; renderer: ptr CellRenderer00) {. + importc: "gtk_cell_area_add", libprag.} + +proc add*(self: CellArea; renderer: CellRenderer) = + gtk_cell_area_add(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl)) + +proc gtk_cell_area_add_focus_sibling*(self: ptr CellArea00; renderer: ptr CellRenderer00; + sibling: ptr CellRenderer00) {. + importc: "gtk_cell_area_add_focus_sibling", libprag.} + +proc addFocusSibling*(self: CellArea; renderer: CellRenderer; sibling: CellRenderer) = + gtk_cell_area_add_focus_sibling(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl), cast[ptr CellRenderer00](sibling.impl)) + +proc gtk_cell_area_apply_attributes*(self: ptr CellArea00; treeModel: ptr TreeModel00; + iter: ptr TreeIter00; isExpander: gboolean; isExpanded: gboolean) {. + importc: "gtk_cell_area_apply_attributes", libprag.} + +proc applyAttributes*(self: CellArea; treeModel: TreeModel; iter: TreeIter; + isExpander: bool; isExpanded: bool) = + gtk_cell_area_apply_attributes(cast[ptr CellArea00](self.impl), cast[ptr TreeModel00](treeModel.impl), cast[ptr TreeIter00](iter.impl), gboolean(isExpander), gboolean(isExpanded)) + +proc gtk_cell_area_attribute_connect*(self: ptr CellArea00; renderer: ptr CellRenderer00; + attribute: cstring; column: int32) {. + importc: "gtk_cell_area_attribute_connect", libprag.} + +proc attributeConnect*(self: CellArea; renderer: CellRenderer; attribute: string; + column: int) = + gtk_cell_area_attribute_connect(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl), cstring(attribute), int32(column)) + +proc gtk_cell_area_attribute_disconnect*(self: ptr CellArea00; renderer: ptr CellRenderer00; + attribute: cstring) {. + importc: "gtk_cell_area_attribute_disconnect", libprag.} + +proc attributeDisconnect*(self: CellArea; renderer: CellRenderer; attribute: string) = + gtk_cell_area_attribute_disconnect(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl), cstring(attribute)) + +proc gtk_cell_area_attribute_get_column*(self: ptr CellArea00; renderer: ptr CellRenderer00; + attribute: cstring): int32 {. + importc: "gtk_cell_area_attribute_get_column", libprag.} + +proc attributeGetColumn*(self: CellArea; renderer: CellRenderer; attribute: string): int = + int(gtk_cell_area_attribute_get_column(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl), cstring(attribute))) + +proc gtk_cell_area_cell_get_property*(self: ptr CellArea00; renderer: ptr CellRenderer00; + propertyName: cstring; value: ptr gobject.Value00) {. + importc: "gtk_cell_area_cell_get_property", libprag.} + +proc cellGetProperty*(self: CellArea; renderer: CellRenderer; propertyName: string; + value: gobject.Value) = + gtk_cell_area_cell_get_property(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl), cstring(propertyName), cast[ptr gobject.Value00](value.impl)) + +proc gtk_cell_area_cell_set_property*(self: ptr CellArea00; renderer: ptr CellRenderer00; + propertyName: cstring; value: ptr gobject.Value00) {. + importc: "gtk_cell_area_cell_set_property", libprag.} + +proc cellSetProperty*(self: CellArea; renderer: CellRenderer; propertyName: string; + value: gobject.Value) = + gtk_cell_area_cell_set_property(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl), cstring(propertyName), cast[ptr gobject.Value00](value.impl)) + +proc gtk_cell_area_focus*(self: ptr CellArea00; direction: DirectionType): gboolean {. + importc: "gtk_cell_area_focus", libprag.} + +proc focus*(self: CellArea; direction: DirectionType): bool = + toBool(gtk_cell_area_focus(cast[ptr CellArea00](self.impl), direction)) + +proc gtk_cell_area_get_current_path_string*(self: ptr CellArea00): cstring {. + importc: "gtk_cell_area_get_current_path_string", libprag.} + +proc getCurrentPathString*(self: CellArea): string = + let resul0 = gtk_cell_area_get_current_path_string(cast[ptr CellArea00](self.impl)) + result = $resul0 + +proc currentPathString*(self: CellArea): string = + let resul0 = gtk_cell_area_get_current_path_string(cast[ptr CellArea00](self.impl)) + result = $resul0 + +proc gtk_cell_area_get_edit_widget*(self: ptr CellArea00): ptr CellEditable00 {. + importc: "gtk_cell_area_get_edit_widget", libprag.} + +proc getEditWidget*(self: CellArea): CellEditable = + new(result) + result.impl = gtk_cell_area_get_edit_widget(cast[ptr CellArea00](self.impl)) + +proc editWidget*(self: CellArea): CellEditable = + new(result) + result.impl = gtk_cell_area_get_edit_widget(cast[ptr CellArea00](self.impl)) + +proc gtk_cell_area_get_edited_cell*(self: ptr CellArea00): ptr CellRenderer00 {. + importc: "gtk_cell_area_get_edited_cell", libprag.} + +proc getEditedCell*(self: CellArea): CellRenderer = + let gobj = gtk_cell_area_get_edited_cell(cast[ptr CellArea00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellRenderer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc editedCell*(self: CellArea): CellRenderer = + let gobj = gtk_cell_area_get_edited_cell(cast[ptr CellArea00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellRenderer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_area_get_focus_cell*(self: ptr CellArea00): ptr CellRenderer00 {. + importc: "gtk_cell_area_get_focus_cell", libprag.} + +proc getFocusCell*(self: CellArea): CellRenderer = + let gobj = gtk_cell_area_get_focus_cell(cast[ptr CellArea00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellRenderer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc focusCell*(self: CellArea): CellRenderer = + let gobj = gtk_cell_area_get_focus_cell(cast[ptr CellArea00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellRenderer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_area_get_focus_from_sibling*(self: ptr CellArea00; renderer: ptr CellRenderer00): ptr CellRenderer00 {. + importc: "gtk_cell_area_get_focus_from_sibling", libprag.} + +proc getFocusFromSibling*(self: CellArea; renderer: CellRenderer): CellRenderer = + let gobj = gtk_cell_area_get_focus_from_sibling(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellRenderer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc focusFromSibling*(self: CellArea; renderer: CellRenderer): CellRenderer = + let gobj = gtk_cell_area_get_focus_from_sibling(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellRenderer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_area_get_focus_siblings*(self: ptr CellArea00; renderer: ptr CellRenderer00): ptr pointer {. + importc: "gtk_cell_area_get_focus_siblings", libprag.} + +proc getFocusSiblings*(self: CellArea; renderer: CellRenderer): ptr pointer = + gtk_cell_area_get_focus_siblings(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl)) + +proc focusSiblings*(self: CellArea; renderer: CellRenderer): ptr pointer = + gtk_cell_area_get_focus_siblings(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl)) + +proc gtk_cell_area_get_request_mode*(self: ptr CellArea00): SizeRequestMode {. + importc: "gtk_cell_area_get_request_mode", libprag.} + +proc getRequestMode*(self: CellArea): SizeRequestMode = + gtk_cell_area_get_request_mode(cast[ptr CellArea00](self.impl)) + +proc requestMode*(self: CellArea): SizeRequestMode = + gtk_cell_area_get_request_mode(cast[ptr CellArea00](self.impl)) + +proc gtk_cell_area_has_renderer*(self: ptr CellArea00; renderer: ptr CellRenderer00): gboolean {. + importc: "gtk_cell_area_has_renderer", libprag.} + +proc hasRenderer*(self: CellArea; renderer: CellRenderer): bool = + toBool(gtk_cell_area_has_renderer(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl))) + +proc gtk_cell_area_inner_cell_area*(self: ptr CellArea00; widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; + innerArea: var gdk.Rectangle00) {. + importc: "gtk_cell_area_inner_cell_area", libprag.} + +proc innerCellArea*(self: ptr CellArea00; widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; + innerArea: var gdk.Rectangle00) {. + importc: "gtk_cell_area_inner_cell_area", libprag.} + +proc gtk_cell_area_is_activatable*(self: ptr CellArea00): gboolean {. + importc: "gtk_cell_area_is_activatable", libprag.} + +proc isActivatable*(self: CellArea): bool = + toBool(gtk_cell_area_is_activatable(cast[ptr CellArea00](self.impl))) + +proc gtk_cell_area_is_focus_sibling*(self: ptr CellArea00; renderer: ptr CellRenderer00; + sibling: ptr CellRenderer00): gboolean {. + importc: "gtk_cell_area_is_focus_sibling", libprag.} + +proc isFocusSibling*(self: CellArea; renderer: CellRenderer; sibling: CellRenderer): bool = + toBool(gtk_cell_area_is_focus_sibling(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl), cast[ptr CellRenderer00](sibling.impl))) + +proc gtk_cell_area_remove*(self: ptr CellArea00; renderer: ptr CellRenderer00) {. + importc: "gtk_cell_area_remove", libprag.} + +proc remove*(self: CellArea; renderer: CellRenderer) = + gtk_cell_area_remove(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl)) + +proc gtk_cell_area_remove_focus_sibling*(self: ptr CellArea00; renderer: ptr CellRenderer00; + sibling: ptr CellRenderer00) {. + importc: "gtk_cell_area_remove_focus_sibling", libprag.} + +proc removeFocusSibling*(self: CellArea; renderer: CellRenderer; sibling: CellRenderer) = + gtk_cell_area_remove_focus_sibling(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl), cast[ptr CellRenderer00](sibling.impl)) + +proc gtk_cell_area_request_renderer*(self: ptr CellArea00; renderer: ptr CellRenderer00; + orientation: Orientation; widget: ptr Widget00; forSize: int32; minimumSize: var int32; naturalSize: var int32) {. + importc: "gtk_cell_area_request_renderer", libprag.} + +proc requestRenderer*(self: CellArea; renderer: CellRenderer; orientation: Orientation; + widget: Widget; forSize: int; minimumSize: var int; naturalSize: var int) = + var minimumSize_00 = int32(minimumSize) + var naturalSize_00 = int32(naturalSize) + gtk_cell_area_request_renderer(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl), orientation, cast[ptr Widget00](widget.impl), int32(forSize), minimumSize_00, naturalSize_00) + minimumSize = int(minimumSize_00) + naturalSize = int(naturalSize_00) + +proc gtk_cell_area_set_focus_cell*(self: ptr CellArea00; renderer: ptr CellRenderer00) {. + importc: "gtk_cell_area_set_focus_cell", libprag.} + +proc setFocusCell*(self: CellArea; renderer: CellRenderer) = + gtk_cell_area_set_focus_cell(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl)) + +proc `focusCell=`*(self: CellArea; renderer: CellRenderer) = + gtk_cell_area_set_focus_cell(cast[ptr CellArea00](self.impl), cast[ptr CellRenderer00](renderer.impl)) + +proc gtk_cell_area_stop_editing*(self: ptr CellArea00; canceled: gboolean) {. + importc: "gtk_cell_area_stop_editing", libprag.} + +proc stopEditing*(self: CellArea; canceled: bool) = + gtk_cell_area_stop_editing(cast[ptr CellArea00](self.impl), gboolean(canceled)) + +proc gtk_combo_box_new_with_area*(area: ptr CellArea00): ptr ComboBox00 {. + importc: "gtk_combo_box_new_with_area", libprag.} + +proc newComboBoxWithArea*(area: CellArea): ComboBox = + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_area(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initComboBoxWithArea*[T](result: var T; area: CellArea) = + assert(result is ComboBox) + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_area(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_combo_box_new_with_area_and_entry*(area: ptr CellArea00): ptr ComboBox00 {. + importc: "gtk_combo_box_new_with_area_and_entry", libprag.} + +proc newComboBoxWithAreaAndEntry*(area: CellArea): ComboBox = + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_area_and_entry(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initComboBoxWithAreaAndEntry*[T](result: var T; area: CellArea) = + assert(result is ComboBox) + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_area_and_entry(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_combo_box_new_with_model*(model: ptr TreeModel00): ptr ComboBox00 {. + importc: "gtk_combo_box_new_with_model", libprag.} + +proc newComboBoxWithModel*(model: TreeModel): ComboBox = + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_model(cast[ptr TreeModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initComboBoxWithModel*[T](result: var T; model: TreeModel) = + assert(result is ComboBox) + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_model(cast[ptr TreeModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_combo_box_new_with_model_and_entry*(model: ptr TreeModel00): ptr ComboBox00 {. + importc: "gtk_combo_box_new_with_model_and_entry", libprag.} + +proc newComboBoxWithModelAndEntry*(model: TreeModel): ComboBox = + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_model_and_entry(cast[ptr TreeModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initComboBoxWithModelAndEntry*[T](result: var T; model: TreeModel) = + assert(result is ComboBox) + new(result, finalizeGObject) + result.impl = gtk_combo_box_new_with_model_and_entry(cast[ptr TreeModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_combo_box_get_model*(self: ptr ComboBox00): ptr TreeModel00 {. + importc: "gtk_combo_box_get_model", libprag.} + +proc getModel*(self: ComboBox): TreeModel = + new(result) + result.impl = gtk_combo_box_get_model(cast[ptr ComboBox00](self.impl)) + +proc model*(self: ComboBox): TreeModel = + new(result) + result.impl = gtk_combo_box_get_model(cast[ptr ComboBox00](self.impl)) + +proc gtk_combo_box_set_model*(self: ptr ComboBox00; model: ptr TreeModel00) {. + importc: "gtk_combo_box_set_model", libprag.} + +proc setModel*(self: ComboBox; model: TreeModel) = + gtk_combo_box_set_model(cast[ptr ComboBox00](self.impl), cast[ptr TreeModel00](model.impl)) + +proc `model=`*(self: ComboBox; model: TreeModel) = + gtk_combo_box_set_model(cast[ptr ComboBox00](self.impl), cast[ptr TreeModel00](model.impl)) + +type + TreeModelFlag* {.size: sizeof(cint), pure.} = enum + itersPersist = 1 + listOnly = 2 + + TreeModelFlags* {.size: sizeof(cint).} = set[TreeModelFlag] + +proc gtk_tree_model_get_flags*(self: ptr TreeModel00): TreeModelFlags {. + importc: "gtk_tree_model_get_flags", libprag.} + +proc getFlags*(self: TreeModel): TreeModelFlags = + gtk_tree_model_get_flags(cast[ptr TreeModel00](self.impl)) + +proc flags*(self: TreeModel): TreeModelFlags = + gtk_tree_model_get_flags(cast[ptr TreeModel00](self.impl)) + +type + TreePath00* {.pure.} = object + TreePath* = ref object + impl*: ptr TreePath00 + +proc gtk_tree_path_new*(): ptr TreePath00 {. + importc: "gtk_tree_path_new", libprag.} + +proc newTreePath*(): TreePath = + new(result) + result.impl = gtk_tree_path_new() + +proc initTreePath*[T](result: var T) = + assert(result is TreePath) + new(result) + result.impl = gtk_tree_path_new() + +proc gtk_tree_path_new_first*(): ptr TreePath00 {. + importc: "gtk_tree_path_new_first", libprag.} + +proc newTreePathFirst*(): TreePath = + new(result) + result.impl = gtk_tree_path_new_first() + +proc initTreePathFirst*[T](result: var T) = + assert(result is TreePath) + new(result) + result.impl = gtk_tree_path_new_first() + +proc gtk_tree_path_new_from_indicesv*(indices: int32Array; length: uint64): ptr TreePath00 {. + importc: "gtk_tree_path_new_from_indicesv", libprag.} + +proc newTreePathFromIndices*(indices: int32Array; length: uint64): TreePath = + new(result) + result.impl = gtk_tree_path_new_from_indicesv(indices, length) + +proc initTreePathFromIndices*[T](result: var T; indices: int32Array; length: uint64) = + assert(result is TreePath) + new(result) + result.impl = gtk_tree_path_new_from_indicesv(indices, length) + +proc gtk_tree_path_new_from_string*(path: cstring): ptr TreePath00 {. + importc: "gtk_tree_path_new_from_string", libprag.} + +proc newTreePathFromString*(path: string): TreePath = + new(result) + result.impl = gtk_tree_path_new_from_string(cstring(path)) + +proc initTreePathFromString*[T](result: var T; path: string) = + assert(result is TreePath) + new(result) + result.impl = gtk_tree_path_new_from_string(cstring(path)) + +proc gtk_tree_path_append_index*(self: ptr TreePath00; index: int32) {. + importc: "gtk_tree_path_append_index", libprag.} + +proc appendIndex*(self: TreePath; index: int) = + gtk_tree_path_append_index(cast[ptr TreePath00](self.impl), int32(index)) + +proc gtk_tree_path_compare*(self: ptr TreePath00; b: ptr TreePath00): int32 {. + importc: "gtk_tree_path_compare", libprag.} + +proc compare*(self: TreePath; b: TreePath): int = + int(gtk_tree_path_compare(cast[ptr TreePath00](self.impl), cast[ptr TreePath00](b.impl))) + +proc gtk_tree_path_copy*(self: ptr TreePath00): ptr TreePath00 {. + importc: "gtk_tree_path_copy", libprag.} + +proc copy*(self: TreePath): TreePath = + new(result) + result.impl = gtk_tree_path_copy(cast[ptr TreePath00](self.impl)) + +proc gtk_tree_path_down*(self: ptr TreePath00) {. + importc: "gtk_tree_path_down", libprag.} + +proc down*(self: TreePath) = + gtk_tree_path_down(cast[ptr TreePath00](self.impl)) + +proc gtk_tree_path_free*(self: ptr TreePath00) {. + importc: "gtk_tree_path_free", libprag.} + +proc free*(self: TreePath) = + gtk_tree_path_free(cast[ptr TreePath00](self.impl)) + +proc gtk_tree_path_get_depth*(self: ptr TreePath00): int32 {. + importc: "gtk_tree_path_get_depth", libprag.} + +proc getDepth*(self: TreePath): int = + int(gtk_tree_path_get_depth(cast[ptr TreePath00](self.impl))) + +proc depth*(self: TreePath): int = + int(gtk_tree_path_get_depth(cast[ptr TreePath00](self.impl))) + +proc gtk_tree_path_get_indices_with_depth*(self: ptr TreePath00; depth: var int32): int32Array {. + importc: "gtk_tree_path_get_indices_with_depth", libprag.} + +proc getIndices*(self: TreePath; depth: var int): int32Array = + var depth_00 = int32(depth) + result = gtk_tree_path_get_indices_with_depth(cast[ptr TreePath00](self.impl), depth_00) + depth = int(depth_00) + +proc indices*(self: TreePath; depth: var int): int32Array = + var depth_00 = int32(depth) + result = gtk_tree_path_get_indices_with_depth(cast[ptr TreePath00](self.impl), depth_00) + depth = int(depth_00) + +proc gtk_tree_path_is_ancestor*(self: ptr TreePath00; descendant: ptr TreePath00): gboolean {. + importc: "gtk_tree_path_is_ancestor", libprag.} + +proc isAncestor*(self: TreePath; descendant: TreePath): bool = + toBool(gtk_tree_path_is_ancestor(cast[ptr TreePath00](self.impl), cast[ptr TreePath00](descendant.impl))) + +proc gtk_tree_path_is_descendant*(self: ptr TreePath00; ancestor: ptr TreePath00): gboolean {. + importc: "gtk_tree_path_is_descendant", libprag.} + +proc isDescendant*(self: TreePath; ancestor: TreePath): bool = + toBool(gtk_tree_path_is_descendant(cast[ptr TreePath00](self.impl), cast[ptr TreePath00](ancestor.impl))) + +proc gtk_tree_path_next*(self: ptr TreePath00) {. + importc: "gtk_tree_path_next", libprag.} + +proc next*(self: TreePath) = + gtk_tree_path_next(cast[ptr TreePath00](self.impl)) + +proc gtk_tree_path_prepend_index*(self: ptr TreePath00; index: int32) {. + importc: "gtk_tree_path_prepend_index", libprag.} + +proc prependIndex*(self: TreePath; index: int) = + gtk_tree_path_prepend_index(cast[ptr TreePath00](self.impl), int32(index)) + +proc gtk_tree_path_prev*(self: ptr TreePath00): gboolean {. + importc: "gtk_tree_path_prev", libprag.} + +proc prev*(self: TreePath): bool = + toBool(gtk_tree_path_prev(cast[ptr TreePath00](self.impl))) + +proc gtk_tree_path_to_string*(self: ptr TreePath00): cstring {. + importc: "gtk_tree_path_to_string", libprag.} + +proc toString*(self: TreePath): string = + let resul0 = gtk_tree_path_to_string(cast[ptr TreePath00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_tree_path_up*(self: ptr TreePath00): gboolean {. + importc: "gtk_tree_path_up", libprag.} + +proc up*(self: TreePath): bool = + toBool(gtk_tree_path_up(cast[ptr TreePath00](self.impl))) + +proc gtk_tree_model_filter_new*(self: ptr TreeModel00; root: ptr TreePath00): ptr TreeModel00 {. + importc: "gtk_tree_model_filter_new", libprag.} + +proc filterNew*(self: TreeModel; root: TreePath): TreeModel = + new(result) + result.impl = gtk_tree_model_filter_new(cast[ptr TreeModel00](self.impl), cast[ptr TreePath00](root.impl)) + +proc gtk_tree_model_get_iter*(self: ptr TreeModel00; iter: var TreeIter00; path: ptr TreePath00): gboolean {. + importc: "gtk_tree_model_get_iter", libprag.} + +proc getIter*(self: ptr TreeModel00; iter: var TreeIter00; path: ptr TreePath00): gboolean {. + importc: "gtk_tree_model_get_iter", libprag.} + +proc iter*(self: ptr TreeModel00; iter: var TreeIter00; path: ptr TreePath00): gboolean {. + importc: "gtk_tree_model_get_iter", libprag.} + +proc gtk_tree_model_get_path*(self: ptr TreeModel00; iter: ptr TreeIter00): ptr TreePath00 {. + importc: "gtk_tree_model_get_path", libprag.} + +proc getPath*(self: TreeModel; iter: TreeIter): TreePath = + new(result) + result.impl = gtk_tree_model_get_path(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl)) + +proc path*(self: TreeModel; iter: TreeIter): TreePath = + new(result) + result.impl = gtk_tree_model_get_path(cast[ptr TreeModel00](self.impl), cast[ptr TreeIter00](iter.impl)) + +proc gtk_tree_model_row_changed*(self: ptr TreeModel00; path: ptr TreePath00; iter: ptr TreeIter00) {. + importc: "gtk_tree_model_row_changed", libprag.} + +proc rowChanged*(self: TreeModel; path: TreePath; iter: TreeIter) = + gtk_tree_model_row_changed(cast[ptr TreeModel00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr TreeIter00](iter.impl)) + +proc gtk_tree_model_row_deleted*(self: ptr TreeModel00; path: ptr TreePath00) {. + importc: "gtk_tree_model_row_deleted", libprag.} + +proc rowDeleted*(self: TreeModel; path: TreePath) = + gtk_tree_model_row_deleted(cast[ptr TreeModel00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_tree_model_row_has_child_toggled*(self: ptr TreeModel00; path: ptr TreePath00; iter: ptr TreeIter00) {. + importc: "gtk_tree_model_row_has_child_toggled", libprag.} + +proc rowHasChildToggled*(self: TreeModel; path: TreePath; iter: TreeIter) = + gtk_tree_model_row_has_child_toggled(cast[ptr TreeModel00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr TreeIter00](iter.impl)) + +proc gtk_tree_model_row_inserted*(self: ptr TreeModel00; path: ptr TreePath00; iter: ptr TreeIter00) {. + importc: "gtk_tree_model_row_inserted", libprag.} + +proc rowInserted*(self: TreeModel; path: TreePath; iter: TreeIter) = + gtk_tree_model_row_inserted(cast[ptr TreeModel00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr TreeIter00](iter.impl)) + +proc gtk_tree_model_rows_reordered_with_length*(self: ptr TreeModel00; path: ptr TreePath00; iter: ptr TreeIter00; + newOrder: int32Array; length: int32) {. + importc: "gtk_tree_model_rows_reordered_with_length", libprag.} + +proc rowsReordered*(self: TreeModel; path: TreePath; iter: TreeIter; newOrder: int32Array; + length: int) = + gtk_tree_model_rows_reordered_with_length(cast[ptr TreeModel00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr TreeIter00](iter.impl), newOrder, int32(length)) + +type + CellAreaContextPrivate00* {.pure.} = object + CellAreaContextPrivate* = ref object + impl*: ptr CellAreaContextPrivate00 + +type + CellAreaContext* = ref object of gobject.Object + CellAreaContext00* = object of gobject.Object00 + priv1: ptr CellAreaContextPrivate00 + +proc gtk_cell_area_context_allocate*(self: ptr CellAreaContext00; width: int32; height: int32) {. + importc: "gtk_cell_area_context_allocate", libprag.} + +proc allocate*(self: CellAreaContext; width: int; height: int) = + gtk_cell_area_context_allocate(cast[ptr CellAreaContext00](self.impl), int32(width), int32(height)) + +proc gtk_cell_area_context_get_allocation*(self: ptr CellAreaContext00; width: var int32; height: var int32) {. + importc: "gtk_cell_area_context_get_allocation", libprag.} + +proc getAllocation*(self: CellAreaContext; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_cell_area_context_get_allocation(cast[ptr CellAreaContext00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc allocation*(self: CellAreaContext; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + gtk_cell_area_context_get_allocation(cast[ptr CellAreaContext00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc gtk_cell_area_context_get_area*(self: ptr CellAreaContext00): ptr CellArea00 {. + importc: "gtk_cell_area_context_get_area", libprag.} + +proc getArea*(self: CellAreaContext): CellArea = + let gobj = gtk_cell_area_context_get_area(cast[ptr CellAreaContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellArea](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc area*(self: CellAreaContext): CellArea = + let gobj = gtk_cell_area_context_get_area(cast[ptr CellAreaContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellArea](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_area_context_get_preferred_height*(self: ptr CellAreaContext00; minimumHeight: var int32; + naturalHeight: var int32) {. + importc: "gtk_cell_area_context_get_preferred_height", libprag.} + +proc getPreferredHeight*(self: CellAreaContext; minimumHeight: var int; naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_area_context_get_preferred_height(cast[ptr CellAreaContext00](self.impl), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc preferredHeight*(self: CellAreaContext; minimumHeight: var int; naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_area_context_get_preferred_height(cast[ptr CellAreaContext00](self.impl), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc gtk_cell_area_context_get_preferred_height_for_width*(self: ptr CellAreaContext00; width: int32; minimumHeight: var int32; + naturalHeight: var int32) {. + importc: "gtk_cell_area_context_get_preferred_height_for_width", libprag.} + +proc getPreferredHeightForWidth*(self: CellAreaContext; width: int; minimumHeight: var int; + naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_area_context_get_preferred_height_for_width(cast[ptr CellAreaContext00](self.impl), int32(width), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc preferredHeightForWidth*(self: CellAreaContext; width: int; minimumHeight: var int; + naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_area_context_get_preferred_height_for_width(cast[ptr CellAreaContext00](self.impl), int32(width), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc gtk_cell_area_context_get_preferred_width*(self: ptr CellAreaContext00; minimumWidth: var int32; + naturalWidth: var int32) {. + importc: "gtk_cell_area_context_get_preferred_width", libprag.} + +proc getPreferredWidth*(self: CellAreaContext; minimumWidth: var int; naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_area_context_get_preferred_width(cast[ptr CellAreaContext00](self.impl), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc preferredWidth*(self: CellAreaContext; minimumWidth: var int; naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_area_context_get_preferred_width(cast[ptr CellAreaContext00](self.impl), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc gtk_cell_area_context_get_preferred_width_for_height*(self: ptr CellAreaContext00; height: int32; minimumWidth: var int32; + naturalWidth: var int32) {. + importc: "gtk_cell_area_context_get_preferred_width_for_height", libprag.} + +proc getPreferredWidthForHeight*(self: CellAreaContext; height: int; minimumWidth: var int; + naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_area_context_get_preferred_width_for_height(cast[ptr CellAreaContext00](self.impl), int32(height), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc preferredWidthForHeight*(self: CellAreaContext; height: int; minimumWidth: var int; + naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_area_context_get_preferred_width_for_height(cast[ptr CellAreaContext00](self.impl), int32(height), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc gtk_cell_area_context_push_preferred_height*(self: ptr CellAreaContext00; minimumHeight: int32; + naturalHeight: int32) {. + importc: "gtk_cell_area_context_push_preferred_height", libprag.} + +proc pushPreferredHeight*(self: CellAreaContext; minimumHeight: int; naturalHeight: int) = + gtk_cell_area_context_push_preferred_height(cast[ptr CellAreaContext00](self.impl), int32(minimumHeight), int32(naturalHeight)) + +proc gtk_cell_area_context_push_preferred_width*(self: ptr CellAreaContext00; minimumWidth: int32; + naturalWidth: int32) {. + importc: "gtk_cell_area_context_push_preferred_width", libprag.} + +proc pushPreferredWidth*(self: CellAreaContext; minimumWidth: int; naturalWidth: int) = + gtk_cell_area_context_push_preferred_width(cast[ptr CellAreaContext00](self.impl), int32(minimumWidth), int32(naturalWidth)) + +proc gtk_cell_area_context_reset*(self: ptr CellAreaContext00) {. + importc: "gtk_cell_area_context_reset", libprag.} + +proc reset*(self: CellAreaContext) = + gtk_cell_area_context_reset(cast[ptr CellAreaContext00](self.impl)) + +proc gtk_cell_area_activate*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; flags: CellRendererState; editOnly: gboolean): gboolean {. + importc: "gtk_cell_area_activate", libprag.} + +proc activate*(self: CellArea; context: CellAreaContext; widget: Widget; + cellArea: gdk.Rectangle; flags: CellRendererState; editOnly: bool): bool = + toBool(gtk_cell_area_activate(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), cast[ptr gdk.Rectangle00](cellArea.impl), flags, gboolean(editOnly))) + +proc gtk_cell_area_copy_context*(self: ptr CellArea00; context: ptr CellAreaContext00): ptr CellAreaContext00 {. + importc: "gtk_cell_area_copy_context", libprag.} + +proc copyContext*(self: CellArea; context: CellAreaContext): CellAreaContext = + let gobj = gtk_cell_area_copy_context(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellAreaContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_area_create_context*(self: ptr CellArea00): ptr CellAreaContext00 {. + importc: "gtk_cell_area_create_context", libprag.} + +proc createContext*(self: CellArea): CellAreaContext = + let gobj = gtk_cell_area_create_context(cast[ptr CellArea00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellAreaContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_area_event*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; event: ptr gdk.Event00; cellArea: ptr gdk.Rectangle00; flags: CellRendererState): int32 {. + importc: "gtk_cell_area_event", libprag.} + +proc event*(self: CellArea; context: CellAreaContext; widget: Widget; + event: gdk.Event; cellArea: gdk.Rectangle; flags: CellRendererState): int = + int(gtk_cell_area_event(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), cast[ptr gdk.Event00](event.impl), cast[ptr gdk.Rectangle00](cellArea.impl), flags)) + +proc gtk_cell_area_get_cell_allocation*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; renderer: ptr CellRenderer00; cellArea: ptr gdk.Rectangle00; allocation: var gdk.Rectangle00) {. + importc: "gtk_cell_area_get_cell_allocation", libprag.} + +proc getCellAllocation*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; renderer: ptr CellRenderer00; cellArea: ptr gdk.Rectangle00; allocation: var gdk.Rectangle00) {. + importc: "gtk_cell_area_get_cell_allocation", libprag.} + +proc cellAllocation*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; renderer: ptr CellRenderer00; cellArea: ptr gdk.Rectangle00; allocation: var gdk.Rectangle00) {. + importc: "gtk_cell_area_get_cell_allocation", libprag.} + +proc gtk_cell_area_get_cell_at_position*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; x: int32; y: int32; allocArea: var gdk.Rectangle00): ptr CellRenderer00 {. + importc: "gtk_cell_area_get_cell_at_position", libprag.} + +proc getCellAtPosition*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; x: int32; y: int32; allocArea: var gdk.Rectangle00): ptr CellRenderer00 {. + importc: "gtk_cell_area_get_cell_at_position", libprag.} + +proc cellAtPosition*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; x: int32; y: int32; allocArea: var gdk.Rectangle00): ptr CellRenderer00 {. + importc: "gtk_cell_area_get_cell_at_position", libprag.} + +proc gtk_cell_area_get_preferred_height*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; minimumHeight: var int32; naturalHeight: var int32) {. + importc: "gtk_cell_area_get_preferred_height", libprag.} + +proc getPreferredHeight*(self: CellArea; context: CellAreaContext; widget: Widget; + minimumHeight: var int; naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_area_get_preferred_height(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc preferredHeight*(self: CellArea; context: CellAreaContext; widget: Widget; + minimumHeight: var int; naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_area_get_preferred_height(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc gtk_cell_area_get_preferred_height_for_width*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; width: int32; minimumHeight: var int32; naturalHeight: var int32) {. + importc: "gtk_cell_area_get_preferred_height_for_width", libprag.} + +proc getPreferredHeightForWidth*(self: CellArea; context: CellAreaContext; widget: Widget; + width: int; minimumHeight: var int; naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_area_get_preferred_height_for_width(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), int32(width), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc preferredHeightForWidth*(self: CellArea; context: CellAreaContext; widget: Widget; + width: int; minimumHeight: var int; naturalHeight: var int) = + var naturalHeight_00 = int32(naturalHeight) + var minimumHeight_00 = int32(minimumHeight) + gtk_cell_area_get_preferred_height_for_width(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), int32(width), minimumHeight_00, naturalHeight_00) + naturalHeight = int(naturalHeight_00) + minimumHeight = int(minimumHeight_00) + +proc gtk_cell_area_get_preferred_width*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; minimumWidth: var int32; naturalWidth: var int32) {. + importc: "gtk_cell_area_get_preferred_width", libprag.} + +proc getPreferredWidth*(self: CellArea; context: CellAreaContext; widget: Widget; + minimumWidth: var int; naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_area_get_preferred_width(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc preferredWidth*(self: CellArea; context: CellAreaContext; widget: Widget; + minimumWidth: var int; naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_area_get_preferred_width(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc gtk_cell_area_get_preferred_width_for_height*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; height: int32; minimumWidth: var int32; naturalWidth: var int32) {. + importc: "gtk_cell_area_get_preferred_width_for_height", libprag.} + +proc getPreferredWidthForHeight*(self: CellArea; context: CellAreaContext; widget: Widget; + height: int; minimumWidth: var int; naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_area_get_preferred_width_for_height(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), int32(height), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc preferredWidthForHeight*(self: CellArea; context: CellAreaContext; widget: Widget; + height: int; minimumWidth: var int; naturalWidth: var int) = + var minimumWidth_00 = int32(minimumWidth) + var naturalWidth_00 = int32(naturalWidth) + gtk_cell_area_get_preferred_width_for_height(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), int32(height), minimumWidth_00, naturalWidth_00) + minimumWidth = int(minimumWidth_00) + naturalWidth = int(naturalWidth_00) + +proc gtk_cell_area_render*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; cr: ptr cairo.Context00; backgroundArea: ptr gdk.Rectangle00; cellArea: ptr gdk.Rectangle00; + flags: CellRendererState; paintFocus: gboolean) {. + importc: "gtk_cell_area_render", libprag.} + +proc render*(self: CellArea; context: CellAreaContext; widget: Widget; + cr: cairo.Context; backgroundArea: gdk.Rectangle; cellArea: gdk.Rectangle; flags: CellRendererState; + paintFocus: bool) = + gtk_cell_area_render(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), cast[ptr cairo.Context00](cr.impl), cast[ptr gdk.Rectangle00](backgroundArea.impl), cast[ptr gdk.Rectangle00](cellArea.impl), flags, gboolean(paintFocus)) + +type + AppChooserDialogPrivate00* {.pure.} = object + AppChooserDialogPrivate* = ref object + impl*: ptr AppChooserDialogPrivate00 + +type + AppChooserDialog* = ref object of Dialog + AppChooserDialog00* = object of Dialog00 + priv6: ptr AppChooserDialogPrivate00 + +proc gtk_app_chooser_dialog_get_heading*(self: ptr AppChooserDialog00): cstring {. + importc: "gtk_app_chooser_dialog_get_heading", libprag.} + +proc getHeading*(self: AppChooserDialog): string = + let resul0 = gtk_app_chooser_dialog_get_heading(cast[ptr AppChooserDialog00](self.impl)) + result = $resul0 + +proc heading*(self: AppChooserDialog): string = + let resul0 = gtk_app_chooser_dialog_get_heading(cast[ptr AppChooserDialog00](self.impl)) + result = $resul0 + +proc gtk_app_chooser_dialog_get_widget*(self: ptr AppChooserDialog00): ptr Widget00 {. + importc: "gtk_app_chooser_dialog_get_widget", libprag.} + +proc getWidget*(self: AppChooserDialog): Widget = + let gobj = gtk_app_chooser_dialog_get_widget(cast[ptr AppChooserDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc widget*(self: AppChooserDialog): Widget = + let gobj = gtk_app_chooser_dialog_get_widget(cast[ptr AppChooserDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_app_chooser_dialog_set_heading*(self: ptr AppChooserDialog00; heading: cstring) {. + importc: "gtk_app_chooser_dialog_set_heading", libprag.} + +proc setHeading*(self: AppChooserDialog; heading: string) = + gtk_app_chooser_dialog_set_heading(cast[ptr AppChooserDialog00](self.impl), cstring(heading)) + +proc `heading=`*(self: AppChooserDialog; heading: string) = + gtk_app_chooser_dialog_set_heading(cast[ptr AppChooserDialog00](self.impl), cstring(heading)) + +type + DialogFlag* {.size: sizeof(cint), pure.} = enum + modal = 1 + destroyWithParent = 2 + useHeaderBar = 3 + + DialogFlags* {.size: sizeof(cint).} = set[DialogFlag] + +proc gtk_app_chooser_dialog_new*(parent: ptr Window00; flags: DialogFlags; file: ptr gio.File00): ptr AppChooserDialog00 {. + importc: "gtk_app_chooser_dialog_new", libprag.} + +proc newAppChooserDialog*(parent: Window; flags: DialogFlags; file: gio.File): AppChooserDialog = + new(result, finalizeGObject) + result.impl = gtk_app_chooser_dialog_new(cast[ptr Window00](parent.impl), flags, cast[ptr gio.File00](file.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAppChooserDialog*[T](result: var T; parent: Window; flags: DialogFlags; file: gio.File) = + assert(result is AppChooserDialog) + new(result, finalizeGObject) + result.impl = gtk_app_chooser_dialog_new(cast[ptr Window00](parent.impl), flags, cast[ptr gio.File00](file.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_app_chooser_dialog_new_for_content_type*(parent: ptr Window00; flags: DialogFlags; contentType: cstring): ptr AppChooserDialog00 {. + importc: "gtk_app_chooser_dialog_new_for_content_type", libprag.} + +proc newAppChooserDialogForContentType*(parent: Window; flags: DialogFlags; contentType: string): AppChooserDialog = + new(result, finalizeGObject) + result.impl = gtk_app_chooser_dialog_new_for_content_type(cast[ptr Window00](parent.impl), flags, cstring(contentType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAppChooserDialogForContentType*[T](result: var T; parent: Window; flags: DialogFlags; contentType: string) = + assert(result is AppChooserDialog) + new(result, finalizeGObject) + result.impl = gtk_app_chooser_dialog_new_for_content_type(cast[ptr Window00](parent.impl), flags, cstring(contentType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + AppChooserWidgetPrivate00* {.pure.} = object + AppChooserWidgetPrivate* = ref object + impl*: ptr AppChooserWidgetPrivate00 + +type + AppChooserWidget* = ref object of Box + AppChooserWidget00* = object of Box00 + priv4: ptr AppChooserWidgetPrivate00 + +proc scApplicationActivated*(self: AppChooserWidget; p: proc (self: ptr gobject.Object00; application: gio.AppInfo00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "application-activated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scApplicationSelected*(self: AppChooserWidget; p: proc (self: ptr gobject.Object00; application: gio.AppInfo00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "application-selected", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopulatePopup*(self: AppChooserWidget; p: proc (self: ptr gobject.Object00; menu: Menu00; application: gio.AppInfo00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "populate-popup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_app_chooser_widget_new*(contentType: cstring): ptr AppChooserWidget00 {. + importc: "gtk_app_chooser_widget_new", libprag.} + +proc newAppChooserWidget*(contentType: string): AppChooserWidget = + new(result, finalizeGObject) + result.impl = gtk_app_chooser_widget_new(cstring(contentType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAppChooserWidget*[T](result: var T; contentType: string) = + assert(result is AppChooserWidget) + new(result, finalizeGObject) + result.impl = gtk_app_chooser_widget_new(cstring(contentType)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_app_chooser_widget_get_default_text*(self: ptr AppChooserWidget00): cstring {. + importc: "gtk_app_chooser_widget_get_default_text", libprag.} + +proc getDefaultText*(self: AppChooserWidget): string = + let resul0 = gtk_app_chooser_widget_get_default_text(cast[ptr AppChooserWidget00](self.impl)) + result = $resul0 + +proc defaultText*(self: AppChooserWidget): string = + let resul0 = gtk_app_chooser_widget_get_default_text(cast[ptr AppChooserWidget00](self.impl)) + result = $resul0 + +proc gtk_app_chooser_widget_get_show_all*(self: ptr AppChooserWidget00): gboolean {. + importc: "gtk_app_chooser_widget_get_show_all", libprag.} + +proc getShowAll*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_all(cast[ptr AppChooserWidget00](self.impl))) + +proc showAll*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_all(cast[ptr AppChooserWidget00](self.impl))) + +proc gtk_app_chooser_widget_get_show_default*(self: ptr AppChooserWidget00): gboolean {. + importc: "gtk_app_chooser_widget_get_show_default", libprag.} + +proc getShowDefault*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_default(cast[ptr AppChooserWidget00](self.impl))) + +proc showDefault*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_default(cast[ptr AppChooserWidget00](self.impl))) + +proc gtk_app_chooser_widget_get_show_fallback*(self: ptr AppChooserWidget00): gboolean {. + importc: "gtk_app_chooser_widget_get_show_fallback", libprag.} + +proc getShowFallback*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_fallback(cast[ptr AppChooserWidget00](self.impl))) + +proc showFallback*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_fallback(cast[ptr AppChooserWidget00](self.impl))) + +proc gtk_app_chooser_widget_get_show_other*(self: ptr AppChooserWidget00): gboolean {. + importc: "gtk_app_chooser_widget_get_show_other", libprag.} + +proc getShowOther*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_other(cast[ptr AppChooserWidget00](self.impl))) + +proc showOther*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_other(cast[ptr AppChooserWidget00](self.impl))) + +proc gtk_app_chooser_widget_get_show_recommended*(self: ptr AppChooserWidget00): gboolean {. + importc: "gtk_app_chooser_widget_get_show_recommended", libprag.} + +proc getShowRecommended*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_recommended(cast[ptr AppChooserWidget00](self.impl))) + +proc showRecommended*(self: AppChooserWidget): bool = + toBool(gtk_app_chooser_widget_get_show_recommended(cast[ptr AppChooserWidget00](self.impl))) + +proc gtk_app_chooser_widget_set_default_text*(self: ptr AppChooserWidget00; text: cstring) {. + importc: "gtk_app_chooser_widget_set_default_text", libprag.} + +proc setDefaultText*(self: AppChooserWidget; text: string) = + gtk_app_chooser_widget_set_default_text(cast[ptr AppChooserWidget00](self.impl), cstring(text)) + +proc `defaultText=`*(self: AppChooserWidget; text: string) = + gtk_app_chooser_widget_set_default_text(cast[ptr AppChooserWidget00](self.impl), cstring(text)) + +proc gtk_app_chooser_widget_set_show_all*(self: ptr AppChooserWidget00; setting: gboolean) {. + importc: "gtk_app_chooser_widget_set_show_all", libprag.} + +proc setShowAll*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_all(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +proc `showAll=`*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_all(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +proc gtk_app_chooser_widget_set_show_default*(self: ptr AppChooserWidget00; setting: gboolean) {. + importc: "gtk_app_chooser_widget_set_show_default", libprag.} + +proc setShowDefault*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_default(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +proc `showDefault=`*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_default(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +proc gtk_app_chooser_widget_set_show_fallback*(self: ptr AppChooserWidget00; setting: gboolean) {. + importc: "gtk_app_chooser_widget_set_show_fallback", libprag.} + +proc setShowFallback*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_fallback(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +proc `showFallback=`*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_fallback(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +proc gtk_app_chooser_widget_set_show_other*(self: ptr AppChooserWidget00; setting: gboolean) {. + importc: "gtk_app_chooser_widget_set_show_other", libprag.} + +proc setShowOther*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_other(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +proc `showOther=`*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_other(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +proc gtk_app_chooser_widget_set_show_recommended*(self: ptr AppChooserWidget00; setting: gboolean) {. + importc: "gtk_app_chooser_widget_set_show_recommended", libprag.} + +proc setShowRecommended*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_recommended(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +proc `showRecommended=`*(self: AppChooserWidget; setting: bool) = + gtk_app_chooser_widget_set_show_recommended(cast[ptr AppChooserWidget00](self.impl), gboolean(setting)) + +type + ApplicationClass00* {.pure.} = object + parentClass*: gio.ApplicationClass00 + windowAdded*: proc(application: ptr Application00; window: ptr Window00) {.cdecl.} + windowRemoved*: proc(application: ptr Application00; window: ptr Window00) {.cdecl.} + padding*: array[12, pointer] + ApplicationClass* = ref object + impl*: ptr ApplicationClass00 + +type + ApplicationWindowPrivate00* {.pure.} = object + ApplicationWindowPrivate* = ref object + impl*: ptr ApplicationWindowPrivate00 + +type + ApplicationWindow* = ref object of Window + ApplicationWindow00* = object of Window00 + priv5: ptr ApplicationWindowPrivate00 + +proc gtk_application_window_new*(application: ptr Application00): ptr ApplicationWindow00 {. + importc: "gtk_application_window_new", libprag.} + +proc newApplicationWindow*(application: Application): ApplicationWindow = + new(result, finalizeGObject) + result.impl = gtk_application_window_new(cast[ptr Application00](application.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initApplicationWindow*[T](result: var T; application: Application) = + assert(result is ApplicationWindow) + new(result, finalizeGObject) + result.impl = gtk_application_window_new(cast[ptr Application00](application.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_application_window_get_id*(self: ptr ApplicationWindow00): uint32 {. + importc: "gtk_application_window_get_id", libprag.} + +proc getId*(self: ApplicationWindow): int = + int(gtk_application_window_get_id(cast[ptr ApplicationWindow00](self.impl))) + +proc id*(self: ApplicationWindow): int = + int(gtk_application_window_get_id(cast[ptr ApplicationWindow00](self.impl))) + +proc gtk_application_window_get_show_menubar*(self: ptr ApplicationWindow00): gboolean {. + importc: "gtk_application_window_get_show_menubar", libprag.} + +proc getShowMenubar*(self: ApplicationWindow): bool = + toBool(gtk_application_window_get_show_menubar(cast[ptr ApplicationWindow00](self.impl))) + +proc showMenubar*(self: ApplicationWindow): bool = + toBool(gtk_application_window_get_show_menubar(cast[ptr ApplicationWindow00](self.impl))) + +proc gtk_application_window_set_show_menubar*(self: ptr ApplicationWindow00; showMenubar: gboolean) {. + importc: "gtk_application_window_set_show_menubar", libprag.} + +proc setShowMenubar*(self: ApplicationWindow; showMenubar: bool) = + gtk_application_window_set_show_menubar(cast[ptr ApplicationWindow00](self.impl), gboolean(showMenubar)) + +proc `showMenubar=`*(self: ApplicationWindow; showMenubar: bool) = + gtk_application_window_set_show_menubar(cast[ptr ApplicationWindow00](self.impl), gboolean(showMenubar)) + +type + ShortcutsWindow* = ref object of Window + ShortcutsWindow00* = object of Window00 + +proc scClose*(self: ShortcutsWindow; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "close", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSearch*(self: ShortcutsWindow; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "search", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_application_window_get_help_overlay*(self: ptr ApplicationWindow00): ptr ShortcutsWindow00 {. + importc: "gtk_application_window_get_help_overlay", libprag.} + +proc getHelpOverlay*(self: ApplicationWindow): ShortcutsWindow = + let gobj = gtk_application_window_get_help_overlay(cast[ptr ApplicationWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ShortcutsWindow](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc helpOverlay*(self: ApplicationWindow): ShortcutsWindow = + let gobj = gtk_application_window_get_help_overlay(cast[ptr ApplicationWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ShortcutsWindow](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_application_window_set_help_overlay*(self: ptr ApplicationWindow00; helpOverlay: ptr ShortcutsWindow00) {. + importc: "gtk_application_window_set_help_overlay", libprag.} + +proc setHelpOverlay*(self: ApplicationWindow; helpOverlay: ShortcutsWindow) = + gtk_application_window_set_help_overlay(cast[ptr ApplicationWindow00](self.impl), cast[ptr ShortcutsWindow00](helpOverlay.impl)) + +proc `helpOverlay=`*(self: ApplicationWindow; helpOverlay: ShortcutsWindow) = + gtk_application_window_set_help_overlay(cast[ptr ApplicationWindow00](self.impl), cast[ptr ShortcutsWindow00](helpOverlay.impl)) + +type + ArrowPrivate00* {.pure.} = object + ArrowPrivate* = ref object + impl*: ptr ArrowPrivate00 + +type + Arrow* = ref object of Misc + Arrow00* = object of Misc00 + priv3: ptr ArrowPrivate00 + +type + ArrowType* {.size: sizeof(cint), pure.} = enum + up = 0 + down = 1 + left = 2 + right = 3 + none = 4 + +type + ShadowType* {.size: sizeof(cint), pure.} = enum + none = 0 + `in` = 1 + `out` = 2 + etchedIn = 3 + etchedOut = 4 + +proc gtk_arrow_new*(arrowType: ArrowType; shadowType: ShadowType): ptr Arrow00 {. + importc: "gtk_arrow_new", libprag.} + +proc newArrow*(arrowType: ArrowType; shadowType: ShadowType): Arrow = + new(result, finalizeGObject) + result.impl = gtk_arrow_new(arrowType, shadowType) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initArrow*[T](result: var T; arrowType: ArrowType; shadowType: ShadowType) = + assert(result is Arrow) + new(result, finalizeGObject) + result.impl = gtk_arrow_new(arrowType, shadowType) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_arrow_set*(self: ptr Arrow00; arrowType: ArrowType; shadowType: ShadowType) {. + importc: "gtk_arrow_set", libprag.} + +proc set*(self: Arrow; arrowType: ArrowType; shadowType: ShadowType) = + gtk_arrow_set(cast[ptr Arrow00](self.impl), arrowType, shadowType) + +type + WidgetAccessiblePrivate00* {.pure.} = object + WidgetAccessiblePrivate* = ref object + impl*: ptr WidgetAccessiblePrivate00 + +type + WidgetAccessible* = ref object of Accessible + WidgetAccessible00* = object of Accessible00 + priv2: ptr WidgetAccessiblePrivate00 + +type + ArrowAccessiblePrivate00* {.pure.} = object + ArrowAccessiblePrivate* = ref object + impl*: ptr ArrowAccessiblePrivate00 + +type + ArrowAccessible* = ref object of WidgetAccessible + ArrowAccessible00* = object of WidgetAccessible00 + priv3: ptr ArrowAccessiblePrivate00 + +type + WidgetAccessibleClass00* {.pure.} = object + parentClass*: AccessibleClass00 + notifyGtk*: proc(`object`: ptr gobject.Object00; pspec: ptr gobject.ParamSpec00) {.cdecl.} + WidgetAccessibleClass* = ref object + impl*: ptr WidgetAccessibleClass00 + +type + ArrowAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + ArrowAccessibleClass* = ref object + impl*: ptr ArrowAccessibleClass00 + +type + ArrowClass00* {.pure.} = object + parentClass*: MiscClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ArrowClass* = ref object + impl*: ptr ArrowClass00 + +type + ArrowPlacement* {.size: sizeof(cint), pure.} = enum + both = 0 + start = 1 + `end` = 2 + +type + FramePrivate00* {.pure.} = object + FramePrivate* = ref object + impl*: ptr FramePrivate00 + +type + Frame* = ref object of Bin + Frame00* = object of Bin00 + priv4: ptr FramePrivate00 + +proc gtk_frame_new*(label: cstring): ptr Frame00 {. + importc: "gtk_frame_new", libprag.} + +proc newFrame*(label: string): Frame = + new(result, finalizeGObject) + result.impl = gtk_frame_new(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFrame*[T](result: var T; label: string) = + assert(result is Frame) + new(result, finalizeGObject) + result.impl = gtk_frame_new(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_frame_get_label*(self: ptr Frame00): cstring {. + importc: "gtk_frame_get_label", libprag.} + +proc getLabel*(self: Frame): string = + let resul0 = gtk_frame_get_label(cast[ptr Frame00](self.impl)) + result = $resul0 + +proc label*(self: Frame): string = + let resul0 = gtk_frame_get_label(cast[ptr Frame00](self.impl)) + result = $resul0 + +proc gtk_frame_get_label_align*(self: ptr Frame00; xalign: var cfloat; yalign: var cfloat) {. + importc: "gtk_frame_get_label_align", libprag.} + +proc getLabelAlign*(self: Frame; xalign: var cfloat; yalign: var cfloat) = + gtk_frame_get_label_align(cast[ptr Frame00](self.impl), xalign, yalign) + +proc labelAlign*(self: Frame; xalign: var cfloat; yalign: var cfloat) = + gtk_frame_get_label_align(cast[ptr Frame00](self.impl), xalign, yalign) + +proc gtk_frame_get_label_widget*(self: ptr Frame00): ptr Widget00 {. + importc: "gtk_frame_get_label_widget", libprag.} + +proc getLabelWidget*(self: Frame): Widget = + let gobj = gtk_frame_get_label_widget(cast[ptr Frame00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc labelWidget*(self: Frame): Widget = + let gobj = gtk_frame_get_label_widget(cast[ptr Frame00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_frame_get_shadow_type*(self: ptr Frame00): ShadowType {. + importc: "gtk_frame_get_shadow_type", libprag.} + +proc getShadowType*(self: Frame): ShadowType = + gtk_frame_get_shadow_type(cast[ptr Frame00](self.impl)) + +proc shadowType*(self: Frame): ShadowType = + gtk_frame_get_shadow_type(cast[ptr Frame00](self.impl)) + +proc gtk_frame_set_label*(self: ptr Frame00; label: cstring) {. + importc: "gtk_frame_set_label", libprag.} + +proc setLabel*(self: Frame; label: string) = + gtk_frame_set_label(cast[ptr Frame00](self.impl), cstring(label)) + +proc `label=`*(self: Frame; label: string) = + gtk_frame_set_label(cast[ptr Frame00](self.impl), cstring(label)) + +proc gtk_frame_set_label_align*(self: ptr Frame00; xalign: cfloat; yalign: cfloat) {. + importc: "gtk_frame_set_label_align", libprag.} + +proc setLabelAlign*(self: Frame; xalign: cfloat; yalign: cfloat) = + gtk_frame_set_label_align(cast[ptr Frame00](self.impl), xalign, yalign) + +proc gtk_frame_set_label_widget*(self: ptr Frame00; labelWidget: ptr Widget00) {. + importc: "gtk_frame_set_label_widget", libprag.} + +proc setLabelWidget*(self: Frame; labelWidget: Widget) = + gtk_frame_set_label_widget(cast[ptr Frame00](self.impl), cast[ptr Widget00](labelWidget.impl)) + +proc `labelWidget=`*(self: Frame; labelWidget: Widget) = + gtk_frame_set_label_widget(cast[ptr Frame00](self.impl), cast[ptr Widget00](labelWidget.impl)) + +proc gtk_frame_set_shadow_type*(self: ptr Frame00; `type`: ShadowType) {. + importc: "gtk_frame_set_shadow_type", libprag.} + +proc setShadowType*(self: Frame; `type`: ShadowType) = + gtk_frame_set_shadow_type(cast[ptr Frame00](self.impl), `type`) + +proc `shadowType=`*(self: Frame; `type`: ShadowType) = + gtk_frame_set_shadow_type(cast[ptr Frame00](self.impl), `type`) + +type + AspectFramePrivate00* {.pure.} = object + AspectFramePrivate* = ref object + impl*: ptr AspectFramePrivate00 + +type + AspectFrame* = ref object of Frame + AspectFrame00* = object of Frame00 + priv5: ptr AspectFramePrivate00 + +proc gtk_aspect_frame_new*(label: cstring; xalign: cfloat; yalign: cfloat; ratio: cfloat; + obeyChild: gboolean): ptr AspectFrame00 {. + importc: "gtk_aspect_frame_new", libprag.} + +proc newAspectFrame*(label: string; xalign: cfloat; yalign: cfloat; ratio: cfloat; + obeyChild: bool): AspectFrame = + new(result, finalizeGObject) + result.impl = gtk_aspect_frame_new(cstring(label), xalign, yalign, ratio, gboolean(obeyChild)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAspectFrame*[T](result: var T; label: string; xalign: cfloat; yalign: cfloat; ratio: cfloat; + obeyChild: bool) = + assert(result is AspectFrame) + new(result, finalizeGObject) + result.impl = gtk_aspect_frame_new(cstring(label), xalign, yalign, ratio, gboolean(obeyChild)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_aspect_frame_set*(self: ptr AspectFrame00; xalign: cfloat; yalign: cfloat; + ratio: cfloat; obeyChild: gboolean) {. + importc: "gtk_aspect_frame_set", libprag.} + +proc set*(self: AspectFrame; xalign: cfloat; yalign: cfloat; + ratio: cfloat; obeyChild: bool) = + gtk_aspect_frame_set(cast[ptr AspectFrame00](self.impl), xalign, yalign, ratio, gboolean(obeyChild)) + +type + AssistantPrivate00* {.pure.} = object + AssistantPrivate* = ref object + impl*: ptr AssistantPrivate00 + +type + Assistant* = ref object of Window + Assistant00* = object of Window00 + priv5: ptr AssistantPrivate00 + +proc scApply*(self: Assistant; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "apply", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCancel*(self: Assistant; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cancel", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scClose*(self: Assistant; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "close", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEscape*(self: Assistant; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "escape", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPrepare*(self: Assistant; p: proc (self: ptr gobject.Object00; page: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "prepare", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_assistant_new*(): ptr Assistant00 {. + importc: "gtk_assistant_new", libprag.} + +proc newAssistant*(): Assistant = + new(result, finalizeGObject) + result.impl = gtk_assistant_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initAssistant*[T](result: var T) = + assert(result is Assistant) + new(result, finalizeGObject) + result.impl = gtk_assistant_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_assistant_add_action_widget*(self: ptr Assistant00; child: ptr Widget00) {. + importc: "gtk_assistant_add_action_widget", libprag.} + +proc addActionWidget*(self: Assistant; child: Widget) = + gtk_assistant_add_action_widget(cast[ptr Assistant00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_assistant_append_page*(self: ptr Assistant00; page: ptr Widget00): int32 {. + importc: "gtk_assistant_append_page", libprag.} + +proc appendPage*(self: Assistant; page: Widget): int = + int(gtk_assistant_append_page(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl))) + +proc gtk_assistant_commit*(self: ptr Assistant00) {. + importc: "gtk_assistant_commit", libprag.} + +proc commit*(self: Assistant) = + gtk_assistant_commit(cast[ptr Assistant00](self.impl)) + +proc gtk_assistant_get_current_page*(self: ptr Assistant00): int32 {. + importc: "gtk_assistant_get_current_page", libprag.} + +proc getCurrentPage*(self: Assistant): int = + int(gtk_assistant_get_current_page(cast[ptr Assistant00](self.impl))) + +proc currentPage*(self: Assistant): int = + int(gtk_assistant_get_current_page(cast[ptr Assistant00](self.impl))) + +proc gtk_assistant_get_n_pages*(self: ptr Assistant00): int32 {. + importc: "gtk_assistant_get_n_pages", libprag.} + +proc getNPages*(self: Assistant): int = + int(gtk_assistant_get_n_pages(cast[ptr Assistant00](self.impl))) + +proc nPages*(self: Assistant): int = + int(gtk_assistant_get_n_pages(cast[ptr Assistant00](self.impl))) + +proc gtk_assistant_get_nth_page*(self: ptr Assistant00; pageNum: int32): ptr Widget00 {. + importc: "gtk_assistant_get_nth_page", libprag.} + +proc getNthPage*(self: Assistant; pageNum: int): Widget = + let gobj = gtk_assistant_get_nth_page(cast[ptr Assistant00](self.impl), int32(pageNum)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc nthPage*(self: Assistant; pageNum: int): Widget = + let gobj = gtk_assistant_get_nth_page(cast[ptr Assistant00](self.impl), int32(pageNum)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_assistant_get_page_complete*(self: ptr Assistant00; page: ptr Widget00): gboolean {. + importc: "gtk_assistant_get_page_complete", libprag.} + +proc getPageComplete*(self: Assistant; page: Widget): bool = + toBool(gtk_assistant_get_page_complete(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl))) + +proc pageComplete*(self: Assistant; page: Widget): bool = + toBool(gtk_assistant_get_page_complete(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl))) + +proc gtk_assistant_get_page_has_padding*(self: ptr Assistant00; page: ptr Widget00): gboolean {. + importc: "gtk_assistant_get_page_has_padding", libprag.} + +proc getPageHasPadding*(self: Assistant; page: Widget): bool = + toBool(gtk_assistant_get_page_has_padding(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl))) + +proc pageHasPadding*(self: Assistant; page: Widget): bool = + toBool(gtk_assistant_get_page_has_padding(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl))) + +proc gtk_assistant_get_page_header_image*(self: ptr Assistant00; page: ptr Widget00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_assistant_get_page_header_image", libprag.} + +proc getPageHeaderImage*(self: Assistant; page: Widget): gdkpixbuf.Pixbuf = + let gobj = gtk_assistant_get_page_header_image(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pageHeaderImage*(self: Assistant; page: Widget): gdkpixbuf.Pixbuf = + let gobj = gtk_assistant_get_page_header_image(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_assistant_get_page_side_image*(self: ptr Assistant00; page: ptr Widget00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_assistant_get_page_side_image", libprag.} + +proc getPageSideImage*(self: Assistant; page: Widget): gdkpixbuf.Pixbuf = + let gobj = gtk_assistant_get_page_side_image(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pageSideImage*(self: Assistant; page: Widget): gdkpixbuf.Pixbuf = + let gobj = gtk_assistant_get_page_side_image(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_assistant_get_page_title*(self: ptr Assistant00; page: ptr Widget00): cstring {. + importc: "gtk_assistant_get_page_title", libprag.} + +proc getPageTitle*(self: Assistant; page: Widget): string = + let resul0 = gtk_assistant_get_page_title(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl)) + result = $resul0 + +proc pageTitle*(self: Assistant; page: Widget): string = + let resul0 = gtk_assistant_get_page_title(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl)) + result = $resul0 + +proc gtk_assistant_insert_page*(self: ptr Assistant00; page: ptr Widget00; position: int32): int32 {. + importc: "gtk_assistant_insert_page", libprag.} + +proc insertPage*(self: Assistant; page: Widget; position: int): int = + int(gtk_assistant_insert_page(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl), int32(position))) + +proc gtk_assistant_next_page*(self: ptr Assistant00) {. + importc: "gtk_assistant_next_page", libprag.} + +proc nextPage*(self: Assistant) = + gtk_assistant_next_page(cast[ptr Assistant00](self.impl)) + +proc gtk_assistant_prepend_page*(self: ptr Assistant00; page: ptr Widget00): int32 {. + importc: "gtk_assistant_prepend_page", libprag.} + +proc prependPage*(self: Assistant; page: Widget): int = + int(gtk_assistant_prepend_page(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl))) + +proc gtk_assistant_previous_page*(self: ptr Assistant00) {. + importc: "gtk_assistant_previous_page", libprag.} + +proc previousPage*(self: Assistant) = + gtk_assistant_previous_page(cast[ptr Assistant00](self.impl)) + +proc gtk_assistant_remove_action_widget*(self: ptr Assistant00; child: ptr Widget00) {. + importc: "gtk_assistant_remove_action_widget", libprag.} + +proc removeActionWidget*(self: Assistant; child: Widget) = + gtk_assistant_remove_action_widget(cast[ptr Assistant00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_assistant_remove_page*(self: ptr Assistant00; pageNum: int32) {. + importc: "gtk_assistant_remove_page", libprag.} + +proc removePage*(self: Assistant; pageNum: int) = + gtk_assistant_remove_page(cast[ptr Assistant00](self.impl), int32(pageNum)) + +proc gtk_assistant_set_current_page*(self: ptr Assistant00; pageNum: int32) {. + importc: "gtk_assistant_set_current_page", libprag.} + +proc setCurrentPage*(self: Assistant; pageNum: int) = + gtk_assistant_set_current_page(cast[ptr Assistant00](self.impl), int32(pageNum)) + +proc `currentPage=`*(self: Assistant; pageNum: int) = + gtk_assistant_set_current_page(cast[ptr Assistant00](self.impl), int32(pageNum)) + +proc gtk_assistant_set_page_complete*(self: ptr Assistant00; page: ptr Widget00; complete: gboolean) {. + importc: "gtk_assistant_set_page_complete", libprag.} + +proc setPageComplete*(self: Assistant; page: Widget; complete: bool) = + gtk_assistant_set_page_complete(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl), gboolean(complete)) + +proc gtk_assistant_set_page_has_padding*(self: ptr Assistant00; page: ptr Widget00; hasPadding: gboolean) {. + importc: "gtk_assistant_set_page_has_padding", libprag.} + +proc setPageHasPadding*(self: Assistant; page: Widget; hasPadding: bool) = + gtk_assistant_set_page_has_padding(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl), gboolean(hasPadding)) + +proc gtk_assistant_set_page_header_image*(self: ptr Assistant00; page: ptr Widget00; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_assistant_set_page_header_image", libprag.} + +proc setPageHeaderImage*(self: Assistant; page: Widget; pixbuf: gdkpixbuf.Pixbuf) = + gtk_assistant_set_page_header_image(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_assistant_set_page_side_image*(self: ptr Assistant00; page: ptr Widget00; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_assistant_set_page_side_image", libprag.} + +proc setPageSideImage*(self: Assistant; page: Widget; pixbuf: gdkpixbuf.Pixbuf) = + gtk_assistant_set_page_side_image(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_assistant_set_page_title*(self: ptr Assistant00; page: ptr Widget00; title: cstring) {. + importc: "gtk_assistant_set_page_title", libprag.} + +proc setPageTitle*(self: Assistant; page: Widget; title: string) = + gtk_assistant_set_page_title(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl), cstring(title)) + +proc gtk_assistant_update_buttons_state*(self: ptr Assistant00) {. + importc: "gtk_assistant_update_buttons_state", libprag.} + +proc updateButtonsState*(self: Assistant) = + gtk_assistant_update_buttons_state(cast[ptr Assistant00](self.impl)) + +type + AssistantPageType* {.size: sizeof(cint), pure.} = enum + content = 0 + intro = 1 + confirm = 2 + summary = 3 + progress = 4 + custom = 5 + +proc gtk_assistant_get_page_type*(self: ptr Assistant00; page: ptr Widget00): AssistantPageType {. + importc: "gtk_assistant_get_page_type", libprag.} + +proc getPageType*(self: Assistant; page: Widget): AssistantPageType = + gtk_assistant_get_page_type(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl)) + +proc pageType*(self: Assistant; page: Widget): AssistantPageType = + gtk_assistant_get_page_type(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl)) + +proc gtk_assistant_set_page_type*(self: ptr Assistant00; page: ptr Widget00; `type`: AssistantPageType) {. + importc: "gtk_assistant_set_page_type", libprag.} + +proc setPageType*(self: Assistant; page: Widget; `type`: AssistantPageType) = + gtk_assistant_set_page_type(cast[ptr Assistant00](self.impl), cast[ptr Widget00](page.impl), `type`) + +type + AssistantPageFunc* = proc (currentPage: int32; data: pointer): int32 {.cdecl.} + +proc gtk_assistant_set_forward_page_func*(self: ptr Assistant00; pageFunc: AssistantPageFunc; + data: pointer; destroy: DestroyNotify) {. + importc: "gtk_assistant_set_forward_page_func", libprag.} + +proc setForwardPageFunc*(self: Assistant; pageFunc: AssistantPageFunc; data: pointer; + destroy: DestroyNotify) = + gtk_assistant_set_forward_page_func(cast[ptr Assistant00](self.impl), pageFunc, data, destroy) + +type + AttachOptions* {.size: sizeof(cint), pure.} = enum + expand = 1 + shrink = 2 + fill = 4 + +const BINARY_AGE* = 2215'i32 + +type + BindingArg00* {.pure.} = object + argType*: GType + BindingArg* = ref object + impl*: ptr BindingArg00 + +type + PathType* {.size: sizeof(cint), pure.} = enum + widget = 0 + widgetClass = 1 + class = 2 + +type + PathPriorityType* {.size: sizeof(cint), pure.} = enum + lowest = 0 + gtk = 4 + application = 8 + theme = 10 + rc = 12 + highest = 15 + +type + BindingSignal00* {.pure.} = object + next*: ptr BindingSignal00 + signalName*: cstring + nArgs*: uint32 + args*: BindingArg00Array + BindingSignal* = ref object + impl*: ptr BindingSignal00 +type + + BindingSet00* {.pure.} = object + setName*: cstring + priority*: int32 + widgetPathPspecs*: ptr pointer + widgetClassPspecs*: ptr pointer + classBranchPspecs*: ptr pointer + entries*: ptr BindingEntry00 + current*: ptr BindingEntry00 + parsed*: uint32 + BindingSet* = ref object + impl*: ptr BindingSet00 + + BindingEntry00* {.pure.} = object + keyval*: uint32 + modifiers*: gdk.ModifierType + bindingSet*: ptr BindingSet00 + destroyed*: uint32 + inEmission*: uint32 + marksUnbound*: uint32 + setNext*: ptr BindingEntry00 + hashNext*: ptr BindingEntry00 + signals*: ptr BindingSignal00 + BindingEntry* = ref object + impl*: ptr BindingEntry00 + +proc gtk_binding_entry_add_signal_from_string*(bindingSet: ptr BindingSet00; signalDesc: cstring): glib.TokenType {. + importc: "gtk_binding_entry_add_signal_from_string", libprag.} + +proc addSignalFromString*(bindingSet: BindingSet; signalDesc: string): glib.TokenType = + gtk_binding_entry_add_signal_from_string(cast[ptr BindingSet00](bindingSet.impl), cstring(signalDesc)) + +proc gtk_binding_entry_add_signall*(bindingSet: ptr BindingSet00; keyval: uint32; modifiers: gdk.ModifierType; + signalName: cstring; bindingArgs: ptr pointer) {. + importc: "gtk_binding_entry_add_signall", libprag.} + +proc addSignall*(bindingSet: BindingSet; keyval: int; modifiers: gdk.ModifierType; + signalName: string; bindingArgs: ptr pointer) = + gtk_binding_entry_add_signall(cast[ptr BindingSet00](bindingSet.impl), uint32(keyval), modifiers, cstring(signalName), bindingArgs) + +proc gtk_binding_entry_remove*(bindingSet: ptr BindingSet00; keyval: uint32; modifiers: gdk.ModifierType) {. + importc: "gtk_binding_entry_remove", libprag.} + +proc remove*(bindingSet: BindingSet; keyval: int; modifiers: gdk.ModifierType) = + gtk_binding_entry_remove(cast[ptr BindingSet00](bindingSet.impl), uint32(keyval), modifiers) + +proc gtk_binding_entry_skip*(bindingSet: ptr BindingSet00; keyval: uint32; modifiers: gdk.ModifierType) {. + importc: "gtk_binding_entry_skip", libprag.} + +proc skip*(bindingSet: BindingSet; keyval: int; modifiers: gdk.ModifierType) = + gtk_binding_entry_skip(cast[ptr BindingSet00](bindingSet.impl), uint32(keyval), modifiers) + +type + CellAccessiblePrivate00* {.pure.} = object + CellAccessiblePrivate* = ref object + impl*: ptr CellAccessiblePrivate00 + +type + CellAccessible* = ref object of Accessible + CellAccessible00* = object of Accessible00 + priv2: ptr CellAccessiblePrivate00 + +type + RendererCellAccessiblePrivate00* {.pure.} = object + RendererCellAccessiblePrivate* = ref object + impl*: ptr RendererCellAccessiblePrivate00 + +type + RendererCellAccessible* = ref object of CellAccessible + RendererCellAccessible00* = object of CellAccessible00 + priv3: ptr RendererCellAccessiblePrivate00 + +proc gtk_renderer_cell_accessible_new*(renderer: ptr CellRenderer00): ptr RendererCellAccessible00 {. + importc: "gtk_renderer_cell_accessible_new", libprag.} + +proc newRendererCellAccessible*(renderer: CellRenderer): RendererCellAccessible = + new(result, finalizeGObject) + result.impl = gtk_renderer_cell_accessible_new(cast[ptr CellRenderer00](renderer.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRendererCellAccessible*[T](result: var T; renderer: CellRenderer) = + assert(result is RendererCellAccessible) + new(result, finalizeGObject) + result.impl = gtk_renderer_cell_accessible_new(cast[ptr CellRenderer00](renderer.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + BooleanCellAccessiblePrivate00* {.pure.} = object + BooleanCellAccessiblePrivate* = ref object + impl*: ptr BooleanCellAccessiblePrivate00 + +type + BooleanCellAccessible* = ref object of RendererCellAccessible + BooleanCellAccessible00* = object of RendererCellAccessible00 + priv4: ptr BooleanCellAccessiblePrivate00 + +type + CellAccessibleClass00* {.pure.} = object + parentClass*: AccessibleClass00 + updateCache*: proc(cell: ptr CellAccessible00; emitSignal: gboolean) {.cdecl.} + CellAccessibleClass* = ref object + impl*: ptr CellAccessibleClass00 + +type + RendererCellAccessibleClass00* {.pure.} = object + parentClass*: CellAccessibleClass00 + RendererCellAccessibleClass* = ref object + impl*: ptr RendererCellAccessibleClass00 + +type + BooleanCellAccessibleClass00* {.pure.} = object + parentClass*: RendererCellAccessibleClass00 + BooleanCellAccessibleClass* = ref object + impl*: ptr BooleanCellAccessibleClass00 + +type + BorderStyle* {.size: sizeof(cint), pure.} = enum + none = 0 + solid = 1 + inset = 2 + outset = 3 + hidden = 4 + dotted = 5 + dashed = 6 + double = 7 + groove = 8 + ridge = 9 + +type + Buildable00* {.pure.} = object + Buildable* = ref object + impl*: ptr Buildable00 + +proc gtk_buildable_get_name*(self: ptr Buildable00): cstring {. + importc: "gtk_buildable_get_name", libprag.} + +proc getName*(self: Buildable): string = + let resul0 = gtk_buildable_get_name(cast[ptr Buildable00](self.impl)) + result = $resul0 + +proc name*(self: Buildable): string = + let resul0 = gtk_buildable_get_name(cast[ptr Buildable00](self.impl)) + result = $resul0 + +proc gtk_buildable_set_name*(self: ptr Buildable00; name: cstring) {. + importc: "gtk_buildable_set_name", libprag.} + +proc setName*(self: Buildable; name: string) = + gtk_buildable_set_name(cast[ptr Buildable00](self.impl), cstring(name)) + +proc `name=`*(self: Buildable; name: string) = + gtk_buildable_set_name(cast[ptr Buildable00](self.impl), cstring(name)) + +type + BuilderPrivate00* {.pure.} = object + BuilderPrivate* = ref object + impl*: ptr BuilderPrivate00 + +type + Builder* = ref object of gobject.Object + Builder00* = object of gobject.Object00 + priv1: ptr BuilderPrivate00 + +proc gtk_builder_new*(): ptr Builder00 {. + importc: "gtk_builder_new", libprag.} + +proc newBuilder*(): Builder = + new(result, finalizeGObject) + result.impl = gtk_builder_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBuilder*[T](result: var T) = + assert(result is Builder) + new(result, finalizeGObject) + result.impl = gtk_builder_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_builder_new_from_file*(filename: cstring): ptr Builder00 {. + importc: "gtk_builder_new_from_file", libprag.} + +proc newBuilderFromFile*(filename: string): Builder = + new(result, finalizeGObject) + result.impl = gtk_builder_new_from_file(cstring(filename)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBuilderFromFile*[T](result: var T; filename: string) = + assert(result is Builder) + new(result, finalizeGObject) + result.impl = gtk_builder_new_from_file(cstring(filename)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_builder_new_from_resource*(resourcePath: cstring): ptr Builder00 {. + importc: "gtk_builder_new_from_resource", libprag.} + +proc newBuilderFromResource*(resourcePath: string): Builder = + new(result, finalizeGObject) + result.impl = gtk_builder_new_from_resource(cstring(resourcePath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBuilderFromResource*[T](result: var T; resourcePath: string) = + assert(result is Builder) + new(result, finalizeGObject) + result.impl = gtk_builder_new_from_resource(cstring(resourcePath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_builder_new_from_string*(string: cstring; length: int64): ptr Builder00 {. + importc: "gtk_builder_new_from_string", libprag.} + +proc newBuilderFromString*(string: string; length: int64): Builder = + new(result, finalizeGObject) + result.impl = gtk_builder_new_from_string(cstring(string), length) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initBuilderFromString*[T](result: var T; string: string; length: int64) = + assert(result is Builder) + new(result, finalizeGObject) + result.impl = gtk_builder_new_from_string(cstring(string), length) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_builder_add_from_file*(self: ptr Builder00; filename: cstring): uint32 {. + importc: "gtk_builder_add_from_file", libprag.} + +proc addFromFile*(self: Builder; filename: string): int = + int(gtk_builder_add_from_file(cast[ptr Builder00](self.impl), cstring(filename))) + +proc gtk_builder_add_from_resource*(self: ptr Builder00; resourcePath: cstring): uint32 {. + importc: "gtk_builder_add_from_resource", libprag.} + +proc addFromResource*(self: Builder; resourcePath: string): int = + int(gtk_builder_add_from_resource(cast[ptr Builder00](self.impl), cstring(resourcePath))) + +proc gtk_builder_add_from_string*(self: ptr Builder00; buffer: cstring; length: uint64): uint32 {. + importc: "gtk_builder_add_from_string", libprag.} + +proc addFromString*(self: Builder; buffer: string; length: uint64): int = + int(gtk_builder_add_from_string(cast[ptr Builder00](self.impl), cstring(buffer), length)) + +proc gtk_builder_add_objects_from_file*(self: ptr Builder00; filename: cstring; objectIds: cstringArray): uint32 {. + importc: "gtk_builder_add_objects_from_file", libprag.} + +proc addObjectsFromFile*(self: Builder; filename: string; objectIds: cstringArray): int = + int(gtk_builder_add_objects_from_file(cast[ptr Builder00](self.impl), cstring(filename), objectIds)) + +proc gtk_builder_add_objects_from_resource*(self: ptr Builder00; resourcePath: cstring; objectIds: cstringArray): uint32 {. + importc: "gtk_builder_add_objects_from_resource", libprag.} + +proc addObjectsFromResource*(self: Builder; resourcePath: string; objectIds: cstringArray): int = + int(gtk_builder_add_objects_from_resource(cast[ptr Builder00](self.impl), cstring(resourcePath), objectIds)) + +proc gtk_builder_add_objects_from_string*(self: ptr Builder00; buffer: cstring; length: uint64; + objectIds: cstringArray): uint32 {. + importc: "gtk_builder_add_objects_from_string", libprag.} + +proc addObjectsFromString*(self: Builder; buffer: string; length: uint64; objectIds: cstringArray): int = + int(gtk_builder_add_objects_from_string(cast[ptr Builder00](self.impl), cstring(buffer), length, objectIds)) + +proc gtk_builder_connect_signals*(self: ptr Builder00; userData: pointer) {. + importc: "gtk_builder_connect_signals", libprag.} + +proc connectSignals*(self: Builder; userData: pointer) = + gtk_builder_connect_signals(cast[ptr Builder00](self.impl), userData) + +proc gtk_builder_expose_object*(self: ptr Builder00; name: cstring; `object`: ptr gobject.Object00) {. + importc: "gtk_builder_expose_object", libprag.} + +proc exposeObject*(self: Builder; name: string; `object`: gobject.Object) = + gtk_builder_expose_object(cast[ptr Builder00](self.impl), cstring(name), cast[ptr gobject.Object00](`object`.impl)) + +proc gtk_builder_extend_with_template*(self: ptr Builder00; widget: ptr Widget00; templateType: GType; + buffer: cstring; length: uint64): uint32 {. + importc: "gtk_builder_extend_with_template", libprag.} + +proc extendWithTemplate*(self: Builder; widget: Widget; templateType: GType; + buffer: string; length: uint64): int = + int(gtk_builder_extend_with_template(cast[ptr Builder00](self.impl), cast[ptr Widget00](widget.impl), templateType, cstring(buffer), length)) + +proc gtk_builder_get_application*(self: ptr Builder00): ptr Application00 {. + importc: "gtk_builder_get_application", libprag.} + +proc getApplication*(self: Builder): Application = + let gobj = gtk_builder_get_application(cast[ptr Builder00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Application](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc application*(self: Builder): Application = + let gobj = gtk_builder_get_application(cast[ptr Builder00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Application](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_builder_get_object*(self: ptr Builder00; name: cstring): ptr gobject.Object00 {. + importc: "gtk_builder_get_object", libprag.} + +proc getObject*(self: Builder; name: string): gobject.Object = + let gobj = gtk_builder_get_object(cast[ptr Builder00](self.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_builder_get_objects*(self: ptr Builder00): ptr pointer {. + importc: "gtk_builder_get_objects", libprag.} + +proc getObjects*(self: Builder): ptr pointer = + gtk_builder_get_objects(cast[ptr Builder00](self.impl)) + +proc objects*(self: Builder): ptr pointer = + gtk_builder_get_objects(cast[ptr Builder00](self.impl)) + +proc gtk_builder_get_translation_domain*(self: ptr Builder00): cstring {. + importc: "gtk_builder_get_translation_domain", libprag.} + +proc getTranslationDomain*(self: Builder): string = + let resul0 = gtk_builder_get_translation_domain(cast[ptr Builder00](self.impl)) + result = $resul0 + +proc translationDomain*(self: Builder): string = + let resul0 = gtk_builder_get_translation_domain(cast[ptr Builder00](self.impl)) + result = $resul0 + +proc gtk_builder_get_type_from_name*(self: ptr Builder00; typeName: cstring): GType {. + importc: "gtk_builder_get_type_from_name", libprag.} + +proc getTypeFromName*(self: Builder; typeName: string): GType = + gtk_builder_get_type_from_name(cast[ptr Builder00](self.impl), cstring(typeName)) + +proc typeFromName*(self: Builder; typeName: string): GType = + gtk_builder_get_type_from_name(cast[ptr Builder00](self.impl), cstring(typeName)) + +proc gtk_builder_set_application*(self: ptr Builder00; application: ptr Application00) {. + importc: "gtk_builder_set_application", libprag.} + +proc setApplication*(self: Builder; application: Application) = + gtk_builder_set_application(cast[ptr Builder00](self.impl), cast[ptr Application00](application.impl)) + +proc `application=`*(self: Builder; application: Application) = + gtk_builder_set_application(cast[ptr Builder00](self.impl), cast[ptr Application00](application.impl)) + +proc gtk_builder_set_translation_domain*(self: ptr Builder00; domain: cstring) {. + importc: "gtk_builder_set_translation_domain", libprag.} + +proc setTranslationDomain*(self: Builder; domain: string) = + gtk_builder_set_translation_domain(cast[ptr Builder00](self.impl), cstring(domain)) + +proc `translationDomain=`*(self: Builder; domain: string) = + gtk_builder_set_translation_domain(cast[ptr Builder00](self.impl), cstring(domain)) + +proc gtk_builder_value_from_string*(self: ptr Builder00; pspec: ptr gobject.ParamSpec00; + string: cstring; value: var gobject.Value00): gboolean {. + importc: "gtk_builder_value_from_string", libprag.} + +proc valueFromString*(self: ptr Builder00; pspec: ptr gobject.ParamSpec00; + string: cstring; value: var gobject.Value00): gboolean {. + importc: "gtk_builder_value_from_string", libprag.} + +proc gtk_builder_value_from_string_type*(self: ptr Builder00; `type`: GType; string: cstring; + value: var gobject.Value00): gboolean {. + importc: "gtk_builder_value_from_string_type", libprag.} + +proc valueFromStringType*(self: ptr Builder00; `type`: GType; string: cstring; + value: var gobject.Value00): gboolean {. + importc: "gtk_builder_value_from_string_type", libprag.} + +proc gtk_buildable_add_child*(self: ptr Buildable00; builder: ptr Builder00; child: ptr gobject.Object00; + `type`: cstring) {. + importc: "gtk_buildable_add_child", libprag.} + +proc addChild*(self: Buildable; builder: Builder; child: gobject.Object; + `type`: string) = + gtk_buildable_add_child(cast[ptr Buildable00](self.impl), cast[ptr Builder00](builder.impl), cast[ptr gobject.Object00](child.impl), cstring(`type`)) + +proc gtk_buildable_construct_child*(self: ptr Buildable00; builder: ptr Builder00; name: cstring): ptr gobject.Object00 {. + importc: "gtk_buildable_construct_child", libprag.} + +proc constructChild*(self: Buildable; builder: Builder; name: string): gobject.Object = + let gobj = gtk_buildable_construct_child(cast[ptr Buildable00](self.impl), cast[ptr Builder00](builder.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_buildable_custom_finished*(self: ptr Buildable00; builder: ptr Builder00; child: ptr gobject.Object00; + tagname: cstring; data: pointer) {. + importc: "gtk_buildable_custom_finished", libprag.} + +proc customFinished*(self: Buildable; builder: Builder; child: gobject.Object; + tagname: string; data: pointer) = + gtk_buildable_custom_finished(cast[ptr Buildable00](self.impl), cast[ptr Builder00](builder.impl), cast[ptr gobject.Object00](child.impl), cstring(tagname), data) + +proc gtk_buildable_custom_tag_end*(self: ptr Buildable00; builder: ptr Builder00; child: ptr gobject.Object00; + tagname: cstring; data: pointer) {. + importc: "gtk_buildable_custom_tag_end", libprag.} + +proc customTagEnd*(self: Buildable; builder: Builder; child: gobject.Object; + tagname: string; data: pointer) = + gtk_buildable_custom_tag_end(cast[ptr Buildable00](self.impl), cast[ptr Builder00](builder.impl), cast[ptr gobject.Object00](child.impl), cstring(tagname), data) + +proc gtk_buildable_custom_tag_start*(self: ptr Buildable00; builder: ptr Builder00; child: ptr gobject.Object00; + tagname: cstring; parser: var glib.MarkupParser00; data: var pointer): gboolean {. + importc: "gtk_buildable_custom_tag_start", libprag.} + +proc customTagStart*(self: ptr Buildable00; builder: ptr Builder00; child: ptr gobject.Object00; + tagname: cstring; parser: var glib.MarkupParser00; data: var pointer): gboolean {. + importc: "gtk_buildable_custom_tag_start", libprag.} + +proc gtk_buildable_get_internal_child*(self: ptr Buildable00; builder: ptr Builder00; childname: cstring): ptr gobject.Object00 {. + importc: "gtk_buildable_get_internal_child", libprag.} + +proc getInternalChild*(self: Buildable; builder: Builder; childname: string): gobject.Object = + let gobj = gtk_buildable_get_internal_child(cast[ptr Buildable00](self.impl), cast[ptr Builder00](builder.impl), cstring(childname)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc internalChild*(self: Buildable; builder: Builder; childname: string): gobject.Object = + let gobj = gtk_buildable_get_internal_child(cast[ptr Buildable00](self.impl), cast[ptr Builder00](builder.impl), cstring(childname)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gobject.Object](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_buildable_parser_finished*(self: ptr Buildable00; builder: ptr Builder00) {. + importc: "gtk_buildable_parser_finished", libprag.} + +proc parserFinished*(self: Buildable; builder: Builder) = + gtk_buildable_parser_finished(cast[ptr Buildable00](self.impl), cast[ptr Builder00](builder.impl)) + +proc gtk_buildable_set_buildable_property*(self: ptr Buildable00; builder: ptr Builder00; name: cstring; + value: ptr gobject.Value00) {. + importc: "gtk_buildable_set_buildable_property", libprag.} + +proc setBuildableProperty*(self: Buildable; builder: Builder; name: string; value: gobject.Value) = + gtk_buildable_set_buildable_property(cast[ptr Buildable00](self.impl), cast[ptr Builder00](builder.impl), cstring(name), cast[ptr gobject.Value00](value.impl)) + +type + BuildableIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + setName*: proc(buildable: ptr Buildable00; name: cstring) {.cdecl.} + getName*: proc(buildable: ptr Buildable00): cstring {.cdecl.} + addChild*: proc(buildable: ptr Buildable00; builder: ptr Builder00; + child: ptr gobject.Object00; `type`: cstring) {.cdecl.} + setBuildableProperty*: proc(buildable: ptr Buildable00; builder: ptr Builder00; + name: cstring; value: ptr gobject.Value00) {.cdecl.} + constructChild*: proc(buildable: ptr Buildable00; builder: ptr Builder00; + name: cstring): ptr gobject.Object00 {.cdecl.} + customTagStart*: proc(buildable: ptr Buildable00; builder: ptr Builder00; + child: ptr gobject.Object00; tagname: cstring; parser: var glib.MarkupParser00; data: var pointer): gboolean {.cdecl.} + customTagEnd*: proc(buildable: ptr Buildable00; builder: ptr Builder00; + child: ptr gobject.Object00; tagname: cstring; data: pointer) {.cdecl.} + customFinished*: proc(buildable: ptr Buildable00; builder: ptr Builder00; + child: ptr gobject.Object00; tagname: cstring; data: pointer) {.cdecl.} + parserFinished*: proc(buildable: ptr Buildable00; builder: ptr Builder00) {.cdecl.} + getInternalChild*: proc(buildable: ptr Buildable00; builder: ptr Builder00; + childname: cstring): ptr gobject.Object00 {.cdecl.} + BuildableIface* = ref object + impl*: ptr BuildableIface00 + +type + BuilderClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getTypeFromName*: proc(builder: ptr Builder00; typeName: cstring): GType {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + BuilderClass* = ref object + impl*: ptr BuilderClass00 + +type + BuilderConnectFunc* = proc (builder: ptr Builder00; `object`: ptr gobject.Object00; + signalName: cstring; handlerName: cstring; connectObject: ptr gobject.Object00; flags: gobject.ConnectFlags; + userData: pointer) {.cdecl.} + +proc gtk_widget_class_set_connect_func*(self: ptr WidgetClass00; connectFunc: BuilderConnectFunc; + connectData: pointer; connectDataDestroy: DestroyNotify) {. + importc: "gtk_widget_class_set_connect_func", libprag.} + +proc setConnectFunc*(self: WidgetClass; connectFunc: BuilderConnectFunc; + connectData: pointer; connectDataDestroy: DestroyNotify) = + gtk_widget_class_set_connect_func(cast[ptr WidgetClass00](self.impl), connectFunc, connectData, connectDataDestroy) + +proc gtk_builder_connect_signals_full*(self: ptr Builder00; `func`: BuilderConnectFunc; userData: pointer) {. + importc: "gtk_builder_connect_signals_full", libprag.} + +proc connectSignalsFull*(self: Builder; `func`: BuilderConnectFunc; userData: pointer) = + gtk_builder_connect_signals_full(cast[ptr Builder00](self.impl), `func`, userData) + +type + BuilderError* {.size: sizeof(cint), pure.} = enum + invalidTypeFunction = 0 + unhandledTag = 1 + missingAttribute = 2 + invalidAttribute = 3 + invalidTag = 4 + missingPropertyValue = 5 + invalidValue = 6 + versionMismatch = 7 + duplicateId = 8 + objectTypeRefused = 9 + templateMismatch = 10 + invalidProperty = 11 + invalidSignal = 12 + invalidId = 13 + +proc gtk_builder_error_quark*(): uint32 {. + importc: "gtk_builder_error_quark", libprag.} + +type + ButtonPrivate00* {.pure.} = object + ButtonPrivate* = ref object + impl*: ptr ButtonPrivate00 + +type + Button* = ref object of Bin + Button00* = object of Bin00 + priv4: ptr ButtonPrivate00 + +proc scActivate*(self: Button; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scClicked*(self: Button; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "clicked", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEnter*(self: Button; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "enter", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scLeave*(self: Button; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "leave", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPressed*(self: Button; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "pressed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scReleased*(self: Button; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "released", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_button_new*(): ptr Button00 {. + importc: "gtk_button_new", libprag.} + +proc newButton*(): Button = + new(result, finalizeGObject) + result.impl = gtk_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initButton*[T](result: var T) = + assert(result is Button) + new(result, finalizeGObject) + result.impl = gtk_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_button_new_from_icon_name*(iconName: cstring; size: int32): ptr Button00 {. + importc: "gtk_button_new_from_icon_name", libprag.} + +proc newButtonFromIconName*(iconName: string; size: int): Button = + new(result, finalizeGObject) + result.impl = gtk_button_new_from_icon_name(cstring(iconName), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initButtonFromIconName*[T](result: var T; iconName: string; size: int) = + assert(result is Button) + new(result, finalizeGObject) + result.impl = gtk_button_new_from_icon_name(cstring(iconName), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_button_new_from_stock*(stockId: cstring): ptr Button00 {. + importc: "gtk_button_new_from_stock", libprag.} + +proc newButtonFromStock*(stockId: string): Button = + new(result, finalizeGObject) + result.impl = gtk_button_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initButtonFromStock*[T](result: var T; stockId: string) = + assert(result is Button) + new(result, finalizeGObject) + result.impl = gtk_button_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_button_new_with_label*(label: cstring): ptr Button00 {. + importc: "gtk_button_new_with_label", libprag.} + +proc newButton*(label: string): Button = + new(result, finalizeGObject) + result.impl = gtk_button_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initButton*[T](result: var T; label: string) = + assert(result is Button) + new(result, finalizeGObject) + result.impl = gtk_button_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_button_new_with_mnemonic*(label: cstring): ptr Button00 {. + importc: "gtk_button_new_with_mnemonic", libprag.} + +proc newButtonWithMnemonic*(label: string): Button = + new(result, finalizeGObject) + result.impl = gtk_button_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initButtonWithMnemonic*[T](result: var T; label: string) = + assert(result is Button) + new(result, finalizeGObject) + result.impl = gtk_button_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_button_clicked*(self: ptr Button00) {. + importc: "gtk_button_clicked", libprag.} + +proc clicked*(self: Button) = + gtk_button_clicked(cast[ptr Button00](self.impl)) + +proc gtk_button_enter*(self: ptr Button00) {. + importc: "gtk_button_enter", libprag.} + +proc enter*(self: Button) = + gtk_button_enter(cast[ptr Button00](self.impl)) + +proc gtk_button_get_alignment*(self: ptr Button00; xalign: var cfloat; yalign: var cfloat) {. + importc: "gtk_button_get_alignment", libprag.} + +proc getAlignment*(self: Button; xalign: var cfloat; yalign: var cfloat) = + gtk_button_get_alignment(cast[ptr Button00](self.impl), xalign, yalign) + +proc alignment*(self: Button; xalign: var cfloat; yalign: var cfloat) = + gtk_button_get_alignment(cast[ptr Button00](self.impl), xalign, yalign) + +proc gtk_button_get_always_show_image*(self: ptr Button00): gboolean {. + importc: "gtk_button_get_always_show_image", libprag.} + +proc getAlwaysShowImage*(self: Button): bool = + toBool(gtk_button_get_always_show_image(cast[ptr Button00](self.impl))) + +proc alwaysShowImage*(self: Button): bool = + toBool(gtk_button_get_always_show_image(cast[ptr Button00](self.impl))) + +proc gtk_button_get_event_window*(self: ptr Button00): ptr gdk.Window00 {. + importc: "gtk_button_get_event_window", libprag.} + +proc getEventWindow*(self: Button): gdk.Window = + let gobj = gtk_button_get_event_window(cast[ptr Button00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc eventWindow*(self: Button): gdk.Window = + let gobj = gtk_button_get_event_window(cast[ptr Button00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_button_get_focus_on_click*(self: ptr Button00): gboolean {. + importc: "gtk_button_get_focus_on_click", libprag.} + +proc getFocusOnClick*(self: Button): bool = + toBool(gtk_button_get_focus_on_click(cast[ptr Button00](self.impl))) + +proc focusOnClick*(self: Button): bool = + toBool(gtk_button_get_focus_on_click(cast[ptr Button00](self.impl))) + +proc gtk_button_get_image*(self: ptr Button00): ptr Widget00 {. + importc: "gtk_button_get_image", libprag.} + +proc getImage*(self: Button): Widget = + let gobj = gtk_button_get_image(cast[ptr Button00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc image*(self: Button): Widget = + let gobj = gtk_button_get_image(cast[ptr Button00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_button_get_label*(self: ptr Button00): cstring {. + importc: "gtk_button_get_label", libprag.} + +proc getLabel*(self: Button): string = + let resul0 = gtk_button_get_label(cast[ptr Button00](self.impl)) + result = $resul0 + +proc label*(self: Button): string = + let resul0 = gtk_button_get_label(cast[ptr Button00](self.impl)) + result = $resul0 + +proc gtk_button_get_use_stock*(self: ptr Button00): gboolean {. + importc: "gtk_button_get_use_stock", libprag.} + +proc getUseStock*(self: Button): bool = + toBool(gtk_button_get_use_stock(cast[ptr Button00](self.impl))) + +proc useStock*(self: Button): bool = + toBool(gtk_button_get_use_stock(cast[ptr Button00](self.impl))) + +proc gtk_button_get_use_underline*(self: ptr Button00): gboolean {. + importc: "gtk_button_get_use_underline", libprag.} + +proc getUseUnderline*(self: Button): bool = + toBool(gtk_button_get_use_underline(cast[ptr Button00](self.impl))) + +proc useUnderline*(self: Button): bool = + toBool(gtk_button_get_use_underline(cast[ptr Button00](self.impl))) + +proc gtk_button_leave*(self: ptr Button00) {. + importc: "gtk_button_leave", libprag.} + +proc leave*(self: Button) = + gtk_button_leave(cast[ptr Button00](self.impl)) + +proc gtk_button_pressed*(self: ptr Button00) {. + importc: "gtk_button_pressed", libprag.} + +proc pressed*(self: Button) = + gtk_button_pressed(cast[ptr Button00](self.impl)) + +proc gtk_button_released*(self: ptr Button00) {. + importc: "gtk_button_released", libprag.} + +proc released*(self: Button) = + gtk_button_released(cast[ptr Button00](self.impl)) + +proc gtk_button_set_alignment*(self: ptr Button00; xalign: cfloat; yalign: cfloat) {. + importc: "gtk_button_set_alignment", libprag.} + +proc setAlignment*(self: Button; xalign: cfloat; yalign: cfloat) = + gtk_button_set_alignment(cast[ptr Button00](self.impl), xalign, yalign) + +proc gtk_button_set_always_show_image*(self: ptr Button00; alwaysShow: gboolean) {. + importc: "gtk_button_set_always_show_image", libprag.} + +proc setAlwaysShowImage*(self: Button; alwaysShow: bool) = + gtk_button_set_always_show_image(cast[ptr Button00](self.impl), gboolean(alwaysShow)) + +proc `alwaysShowImage=`*(self: Button; alwaysShow: bool) = + gtk_button_set_always_show_image(cast[ptr Button00](self.impl), gboolean(alwaysShow)) + +proc gtk_button_set_focus_on_click*(self: ptr Button00; focusOnClick: gboolean) {. + importc: "gtk_button_set_focus_on_click", libprag.} + +proc setFocusOnClick*(self: Button; focusOnClick: bool) = + gtk_button_set_focus_on_click(cast[ptr Button00](self.impl), gboolean(focusOnClick)) + +proc `focusOnClick=`*(self: Button; focusOnClick: bool) = + gtk_button_set_focus_on_click(cast[ptr Button00](self.impl), gboolean(focusOnClick)) + +proc gtk_button_set_image*(self: ptr Button00; image: ptr Widget00) {. + importc: "gtk_button_set_image", libprag.} + +proc setImage*(self: Button; image: Widget) = + gtk_button_set_image(cast[ptr Button00](self.impl), cast[ptr Widget00](image.impl)) + +proc `image=`*(self: Button; image: Widget) = + gtk_button_set_image(cast[ptr Button00](self.impl), cast[ptr Widget00](image.impl)) + +proc gtk_button_set_label*(self: ptr Button00; label: cstring) {. + importc: "gtk_button_set_label", libprag.} + +proc setLabel*(self: Button; label: string) = + gtk_button_set_label(cast[ptr Button00](self.impl), cstring(label)) + +proc `label=`*(self: Button; label: string) = + gtk_button_set_label(cast[ptr Button00](self.impl), cstring(label)) + +proc gtk_button_set_use_stock*(self: ptr Button00; useStock: gboolean) {. + importc: "gtk_button_set_use_stock", libprag.} + +proc setUseStock*(self: Button; useStock: bool) = + gtk_button_set_use_stock(cast[ptr Button00](self.impl), gboolean(useStock)) + +proc `useStock=`*(self: Button; useStock: bool) = + gtk_button_set_use_stock(cast[ptr Button00](self.impl), gboolean(useStock)) + +proc gtk_button_set_use_underline*(self: ptr Button00; useUnderline: gboolean) {. + importc: "gtk_button_set_use_underline", libprag.} + +proc setUseUnderline*(self: Button; useUnderline: bool) = + gtk_button_set_use_underline(cast[ptr Button00](self.impl), gboolean(useUnderline)) + +proc `useUnderline=`*(self: Button; useUnderline: bool) = + gtk_button_set_use_underline(cast[ptr Button00](self.impl), gboolean(useUnderline)) + +type + PositionType* {.size: sizeof(cint), pure.} = enum + left = 0 + right = 1 + top = 2 + bottom = 3 + +proc gtk_button_get_image_position*(self: ptr Button00): PositionType {. + importc: "gtk_button_get_image_position", libprag.} + +proc getImagePosition*(self: Button): PositionType = + gtk_button_get_image_position(cast[ptr Button00](self.impl)) + +proc imagePosition*(self: Button): PositionType = + gtk_button_get_image_position(cast[ptr Button00](self.impl)) + +proc gtk_button_set_image_position*(self: ptr Button00; position: PositionType) {. + importc: "gtk_button_set_image_position", libprag.} + +proc setImagePosition*(self: Button; position: PositionType) = + gtk_button_set_image_position(cast[ptr Button00](self.impl), position) + +proc `imagePosition=`*(self: Button; position: PositionType) = + gtk_button_set_image_position(cast[ptr Button00](self.impl), position) + +type + ReliefStyle* {.size: sizeof(cint), pure.} = enum + normal = 0 + half = 1 + none = 2 + +proc gtk_button_get_relief*(self: ptr Button00): ReliefStyle {. + importc: "gtk_button_get_relief", libprag.} + +proc getRelief*(self: Button): ReliefStyle = + gtk_button_get_relief(cast[ptr Button00](self.impl)) + +proc relief*(self: Button): ReliefStyle = + gtk_button_get_relief(cast[ptr Button00](self.impl)) + +proc gtk_button_set_relief*(self: ptr Button00; relief: ReliefStyle) {. + importc: "gtk_button_set_relief", libprag.} + +proc setRelief*(self: Button; relief: ReliefStyle) = + gtk_button_set_relief(cast[ptr Button00](self.impl), relief) + +proc `relief=`*(self: Button; relief: ReliefStyle) = + gtk_button_set_relief(cast[ptr Button00](self.impl), relief) + +type + ContainerAccessiblePrivate00* {.pure.} = object + ContainerAccessiblePrivate* = ref object + impl*: ptr ContainerAccessiblePrivate00 + +type + ContainerAccessible* = ref object of WidgetAccessible + ContainerAccessible00* = object of WidgetAccessible00 + priv3: ptr ContainerAccessiblePrivate00 + +type + ButtonAccessiblePrivate00* {.pure.} = object + ButtonAccessiblePrivate* = ref object + impl*: ptr ButtonAccessiblePrivate00 + +type + ButtonAccessible* = ref object of ContainerAccessible + ButtonAccessible00* = object of ContainerAccessible00 + priv4: ptr ButtonAccessiblePrivate00 + +type + ContainerAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + addGtk*: proc(container: ptr Container00; widget: ptr Widget00; + data: pointer): int32 {.cdecl.} + removeGtk*: proc(container: ptr Container00; widget: ptr Widget00; + data: pointer): int32 {.cdecl.} + ContainerAccessibleClass* = ref object + impl*: ptr ContainerAccessibleClass00 + +type + ButtonAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + ButtonAccessibleClass* = ref object + impl*: ptr ButtonAccessibleClass00 + +type + ButtonBoxPrivate00* {.pure.} = object + ButtonBoxPrivate* = ref object + impl*: ptr ButtonBoxPrivate00 + +type + ButtonBox* = ref object of Box + ButtonBox00* = object of Box00 + priv4: ptr ButtonBoxPrivate00 + +proc gtk_button_box_new*(orientation: Orientation): ptr ButtonBox00 {. + importc: "gtk_button_box_new", libprag.} + +proc newButtonBox*(orientation: Orientation): ButtonBox = + new(result, finalizeGObject) + result.impl = gtk_button_box_new(orientation) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initButtonBox*[T](result: var T; orientation: Orientation) = + assert(result is ButtonBox) + new(result, finalizeGObject) + result.impl = gtk_button_box_new(orientation) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_button_box_get_child_non_homogeneous*(self: ptr ButtonBox00; child: ptr Widget00): gboolean {. + importc: "gtk_button_box_get_child_non_homogeneous", libprag.} + +proc getChildNonHomogeneous*(self: ButtonBox; child: Widget): bool = + toBool(gtk_button_box_get_child_non_homogeneous(cast[ptr ButtonBox00](self.impl), cast[ptr Widget00](child.impl))) + +proc childNonHomogeneous*(self: ButtonBox; child: Widget): bool = + toBool(gtk_button_box_get_child_non_homogeneous(cast[ptr ButtonBox00](self.impl), cast[ptr Widget00](child.impl))) + +proc gtk_button_box_get_child_secondary*(self: ptr ButtonBox00; child: ptr Widget00): gboolean {. + importc: "gtk_button_box_get_child_secondary", libprag.} + +proc getChildSecondary*(self: ButtonBox; child: Widget): bool = + toBool(gtk_button_box_get_child_secondary(cast[ptr ButtonBox00](self.impl), cast[ptr Widget00](child.impl))) + +proc childSecondary*(self: ButtonBox; child: Widget): bool = + toBool(gtk_button_box_get_child_secondary(cast[ptr ButtonBox00](self.impl), cast[ptr Widget00](child.impl))) + +proc gtk_button_box_set_child_non_homogeneous*(self: ptr ButtonBox00; child: ptr Widget00; nonHomogeneous: gboolean) {. + importc: "gtk_button_box_set_child_non_homogeneous", libprag.} + +proc setChildNonHomogeneous*(self: ButtonBox; child: Widget; nonHomogeneous: bool) = + gtk_button_box_set_child_non_homogeneous(cast[ptr ButtonBox00](self.impl), cast[ptr Widget00](child.impl), gboolean(nonHomogeneous)) + +proc gtk_button_box_set_child_secondary*(self: ptr ButtonBox00; child: ptr Widget00; isSecondary: gboolean) {. + importc: "gtk_button_box_set_child_secondary", libprag.} + +proc setChildSecondary*(self: ButtonBox; child: Widget; isSecondary: bool) = + gtk_button_box_set_child_secondary(cast[ptr ButtonBox00](self.impl), cast[ptr Widget00](child.impl), gboolean(isSecondary)) + +type + ButtonBoxStyle* {.size: sizeof(cint), pure.} = enum + spread = 1 + edge = 2 + start = 3 + `end` = 4 + center = 5 + expand = 6 + +proc gtk_button_box_get_layout*(self: ptr ButtonBox00): ButtonBoxStyle {. + importc: "gtk_button_box_get_layout", libprag.} + +proc getLayout*(self: ButtonBox): ButtonBoxStyle = + gtk_button_box_get_layout(cast[ptr ButtonBox00](self.impl)) + +proc layout*(self: ButtonBox): ButtonBoxStyle = + gtk_button_box_get_layout(cast[ptr ButtonBox00](self.impl)) + +proc gtk_button_box_set_layout*(self: ptr ButtonBox00; layoutStyle: ButtonBoxStyle) {. + importc: "gtk_button_box_set_layout", libprag.} + +proc setLayout*(self: ButtonBox; layoutStyle: ButtonBoxStyle) = + gtk_button_box_set_layout(cast[ptr ButtonBox00](self.impl), layoutStyle) + +proc `layout=`*(self: ButtonBox; layoutStyle: ButtonBoxStyle) = + gtk_button_box_set_layout(cast[ptr ButtonBox00](self.impl), layoutStyle) + +type + ButtonRole* {.size: sizeof(cint), pure.} = enum + normal = 0 + check = 1 + radio = 2 + +type + ButtonsType* {.size: sizeof(cint), pure.} = enum + none = 0 + ok = 1 + close = 2 + cancel = 3 + yesNo = 4 + okCancel = 5 + +type + CalendarPrivate00* {.pure.} = object + CalendarPrivate* = ref object + impl*: ptr CalendarPrivate00 + +type + Calendar* = ref object of Widget + Calendar00* = object of Widget00 + priv2: ptr CalendarPrivate00 + +proc scDaySelected*(self: Calendar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "day-selected", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDaySelectedDoubleClick*(self: Calendar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "day-selected-double-click", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMonthChanged*(self: Calendar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "month-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scNextMonth*(self: Calendar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "next-month", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scNextYear*(self: Calendar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "next-year", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPrevMonth*(self: Calendar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "prev-month", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPrevYear*(self: Calendar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "prev-year", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_calendar_new*(): ptr Calendar00 {. + importc: "gtk_calendar_new", libprag.} + +proc newCalendar*(): Calendar = + new(result, finalizeGObject) + result.impl = gtk_calendar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCalendar*[T](result: var T) = + assert(result is Calendar) + new(result, finalizeGObject) + result.impl = gtk_calendar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_calendar_clear_marks*(self: ptr Calendar00) {. + importc: "gtk_calendar_clear_marks", libprag.} + +proc clearMarks*(self: Calendar) = + gtk_calendar_clear_marks(cast[ptr Calendar00](self.impl)) + +proc gtk_calendar_get_date*(self: ptr Calendar00; year: var uint32; month: var uint32; + day: var uint32) {. + importc: "gtk_calendar_get_date", libprag.} + +proc getDate*(self: Calendar; year: var int; month: var int; day: var int) = + var day_00 = uint32(day) + var month_00 = uint32(month) + var year_00 = uint32(year) + gtk_calendar_get_date(cast[ptr Calendar00](self.impl), year_00, month_00, day_00) + day = int(day_00) + month = int(month_00) + year = int(year_00) + +proc date*(self: Calendar; year: var int; month: var int; day: var int) = + var day_00 = uint32(day) + var month_00 = uint32(month) + var year_00 = uint32(year) + gtk_calendar_get_date(cast[ptr Calendar00](self.impl), year_00, month_00, day_00) + day = int(day_00) + month = int(month_00) + year = int(year_00) + +proc gtk_calendar_get_day_is_marked*(self: ptr Calendar00; day: uint32): gboolean {. + importc: "gtk_calendar_get_day_is_marked", libprag.} + +proc getDayIsMarked*(self: Calendar; day: int): bool = + toBool(gtk_calendar_get_day_is_marked(cast[ptr Calendar00](self.impl), uint32(day))) + +proc dayIsMarked*(self: Calendar; day: int): bool = + toBool(gtk_calendar_get_day_is_marked(cast[ptr Calendar00](self.impl), uint32(day))) + +proc gtk_calendar_get_detail_height_rows*(self: ptr Calendar00): int32 {. + importc: "gtk_calendar_get_detail_height_rows", libprag.} + +proc getDetailHeightRows*(self: Calendar): int = + int(gtk_calendar_get_detail_height_rows(cast[ptr Calendar00](self.impl))) + +proc detailHeightRows*(self: Calendar): int = + int(gtk_calendar_get_detail_height_rows(cast[ptr Calendar00](self.impl))) + +proc gtk_calendar_get_detail_width_chars*(self: ptr Calendar00): int32 {. + importc: "gtk_calendar_get_detail_width_chars", libprag.} + +proc getDetailWidthChars*(self: Calendar): int = + int(gtk_calendar_get_detail_width_chars(cast[ptr Calendar00](self.impl))) + +proc detailWidthChars*(self: Calendar): int = + int(gtk_calendar_get_detail_width_chars(cast[ptr Calendar00](self.impl))) + +proc gtk_calendar_mark_day*(self: ptr Calendar00; day: uint32) {. + importc: "gtk_calendar_mark_day", libprag.} + +proc markDay*(self: Calendar; day: int) = + gtk_calendar_mark_day(cast[ptr Calendar00](self.impl), uint32(day)) + +proc gtk_calendar_select_day*(self: ptr Calendar00; day: uint32) {. + importc: "gtk_calendar_select_day", libprag.} + +proc selectDay*(self: Calendar; day: int) = + gtk_calendar_select_day(cast[ptr Calendar00](self.impl), uint32(day)) + +proc gtk_calendar_select_month*(self: ptr Calendar00; month: uint32; year: uint32) {. + importc: "gtk_calendar_select_month", libprag.} + +proc selectMonth*(self: Calendar; month: int; year: int) = + gtk_calendar_select_month(cast[ptr Calendar00](self.impl), uint32(month), uint32(year)) + +proc gtk_calendar_set_detail_height_rows*(self: ptr Calendar00; rows: int32) {. + importc: "gtk_calendar_set_detail_height_rows", libprag.} + +proc setDetailHeightRows*(self: Calendar; rows: int) = + gtk_calendar_set_detail_height_rows(cast[ptr Calendar00](self.impl), int32(rows)) + +proc `detailHeightRows=`*(self: Calendar; rows: int) = + gtk_calendar_set_detail_height_rows(cast[ptr Calendar00](self.impl), int32(rows)) + +proc gtk_calendar_set_detail_width_chars*(self: ptr Calendar00; chars: int32) {. + importc: "gtk_calendar_set_detail_width_chars", libprag.} + +proc setDetailWidthChars*(self: Calendar; chars: int) = + gtk_calendar_set_detail_width_chars(cast[ptr Calendar00](self.impl), int32(chars)) + +proc `detailWidthChars=`*(self: Calendar; chars: int) = + gtk_calendar_set_detail_width_chars(cast[ptr Calendar00](self.impl), int32(chars)) + +proc gtk_calendar_unmark_day*(self: ptr Calendar00; day: uint32) {. + importc: "gtk_calendar_unmark_day", libprag.} + +proc unmarkDay*(self: Calendar; day: int) = + gtk_calendar_unmark_day(cast[ptr Calendar00](self.impl), uint32(day)) + +type + CalendarDisplayOptions* {.size: sizeof(cint), pure.} = enum + showHeading = 1 + showDayNames = 2 + noMonthChange = 4 + showWeekNumbers = 8 + showDetails = 32 + +proc gtk_calendar_get_display_options*(self: ptr Calendar00): CalendarDisplayOptions {. + importc: "gtk_calendar_get_display_options", libprag.} + +proc getDisplayOptions*(self: Calendar): CalendarDisplayOptions = + gtk_calendar_get_display_options(cast[ptr Calendar00](self.impl)) + +proc displayOptions*(self: Calendar): CalendarDisplayOptions = + gtk_calendar_get_display_options(cast[ptr Calendar00](self.impl)) + +proc gtk_calendar_set_display_options*(self: ptr Calendar00; flags: CalendarDisplayOptions) {. + importc: "gtk_calendar_set_display_options", libprag.} + +proc setDisplayOptions*(self: Calendar; flags: CalendarDisplayOptions) = + gtk_calendar_set_display_options(cast[ptr Calendar00](self.impl), flags) + +proc `displayOptions=`*(self: Calendar; flags: CalendarDisplayOptions) = + gtk_calendar_set_display_options(cast[ptr Calendar00](self.impl), flags) + +type + CalendarClass00* {.pure.} = object + parentClass*: WidgetClass00 + monthChanged*: proc(calendar: ptr Calendar00) {.cdecl.} + daySelected*: proc(calendar: ptr Calendar00) {.cdecl.} + daySelectedDoubleClick*: proc(calendar: ptr Calendar00) {.cdecl.} + prevMonth*: proc(calendar: ptr Calendar00) {.cdecl.} + nextMonth*: proc(calendar: ptr Calendar00) {.cdecl.} + prevYear*: proc(calendar: ptr Calendar00) {.cdecl.} + nextYear*: proc(calendar: ptr Calendar00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CalendarClass* = ref object + impl*: ptr CalendarClass00 + +type + CalendarDetailFunc* = proc (calendar: ptr Calendar00; year: uint32; month: uint32; + day: uint32; userData: pointer): cstring {.cdecl.} + +proc gtk_calendar_set_detail_func*(self: ptr Calendar00; `func`: CalendarDetailFunc; + data: pointer; destroy: DestroyNotify) {. + importc: "gtk_calendar_set_detail_func", libprag.} + +proc setDetailFunc*(self: Calendar; `func`: CalendarDetailFunc; data: pointer; + destroy: DestroyNotify) = + gtk_calendar_set_detail_func(cast[ptr Calendar00](self.impl), `func`, data, destroy) + +type + Callback* = proc (widget: ptr Widget00; data: pointer) {.cdecl.} + +type + ActionEntry00* {.pure.} = object + name*: cstring + stockId*: cstring + label*: cstring + accelerator*: cstring + tooltip*: cstring + callback*: Callback + ActionEntry* = ref object + impl*: ptr ActionEntry00 + +type + ContainerClass00* {.pure.} = object + parentClass*: WidgetClass00 + add*: proc(container: ptr Container00; widget: ptr Widget00) {.cdecl.} + remove*: proc(container: ptr Container00; widget: ptr Widget00) {.cdecl.} + checkResize*: proc(container: ptr Container00) {.cdecl.} + forall*: proc(container: ptr Container00; includeInternals: gboolean; + callback: Callback; callbackData: pointer) {.cdecl.} + setFocusChild*: proc(container: ptr Container00; child: ptr Widget00) {.cdecl.} + childType*: proc(container: ptr Container00): GType {.cdecl.} + compositeName*: proc(container: ptr Container00; child: ptr Widget00): cstring {.cdecl.} + setChildProperty*: proc(container: ptr Container00; child: ptr Widget00; propertyId: uint32; + value: ptr gobject.Value00; pspec: ptr gobject.ParamSpec00) {.cdecl.} + getChildProperty*: proc(container: ptr Container00; child: ptr Widget00; propertyId: uint32; + value: ptr gobject.Value00; pspec: ptr gobject.ParamSpec00) {.cdecl.} + getPathForChild*: proc(container: ptr Container00; child: ptr Widget00): ptr WidgetPath00 {.cdecl.} + handleBorderWidth*: uint32 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + ContainerClass* = ref object + impl*: ptr ContainerClass00 + +proc gtk_container_class_find_child_property*(self: ptr ContainerClass00; propertyName: cstring): ptr gobject.ParamSpec00 {. + importc: "gtk_container_class_find_child_property", libprag.} + +proc gtk_container_class_handle_border_width*(self: ptr ContainerClass00) {. + importc: "gtk_container_class_handle_border_width", libprag.} + +proc handleBorderWidth*(self: ContainerClass) = + gtk_container_class_handle_border_width(cast[ptr ContainerClass00](self.impl)) + +proc gtk_container_class_install_child_properties*(self: ptr ContainerClass00; nPspecs: uint32; pspecs: ptr gobject.ParamSpec00Array) {. + importc: "gtk_container_class_install_child_properties", libprag.} + +proc installChildProperties*(self: ContainerClass; nPspecs: int; pspecs: ptr gobject.ParamSpec00Array) = + gtk_container_class_install_child_properties(cast[ptr ContainerClass00](self.impl), uint32(nPspecs), pspecs) + +proc gtk_container_class_install_child_property*(self: ptr ContainerClass00; propertyId: uint32; pspec: ptr gobject.ParamSpec00) {. + importc: "gtk_container_class_install_child_property", libprag.} + +proc installChildProperty*(self: ContainerClass; propertyId: int; pspec: gobject.ParamSpec) = + gtk_container_class_install_child_property(cast[ptr ContainerClass00](self.impl), uint32(propertyId), cast[ptr gobject.ParamSpec00](pspec.impl)) + +proc gtk_container_class_list_child_properties*(self: ptr ContainerClass00; nProperties: var uint32): ptr gobject.ParamSpec00Array {. + importc: "gtk_container_class_list_child_properties", libprag.} + +proc listChildProperties*(self: ContainerClass; nProperties: var int): ptr gobject.ParamSpec00Array = + var nProperties_00 = uint32(nProperties) + result = gtk_container_class_list_child_properties(cast[ptr ContainerClass00](self.impl), nProperties_00) + nProperties = int(nProperties_00) + +type + BinClass00* {.pure.} = object + parentClass*: ContainerClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + BinClass* = ref object + impl*: ptr BinClass00 + +type + WindowClass00* {.pure.} = object + parentClass*: BinClass00 + setFocus*: proc(window: ptr Window00; focus: ptr Widget00) {.cdecl.} + activateFocus*: proc(window: ptr Window00) {.cdecl.} + activateDefault*: proc(window: ptr Window00) {.cdecl.} + keysChanged*: proc(window: ptr Window00) {.cdecl.} + enableDebugging*: proc(window: ptr Window00; toggle: gboolean): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + WindowClass* = ref object + impl*: ptr WindowClass00 + +type + DialogClass00* {.pure.} = object + parentClass*: WindowClass00 + response*: proc(dialog: ptr Dialog00; responseId: int32) {.cdecl.} + close*: proc(dialog: ptr Dialog00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + DialogClass* = ref object + impl*: ptr DialogClass00 + +type + AboutDialogClass00* {.pure.} = object + parentClass*: DialogClass00 + activateLink*: proc(dialog: ptr AboutDialog00; uri: cstring): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + AboutDialogClass* = ref object + impl*: ptr AboutDialogClass00 +type + + ButtonClass00* {.pure.} = object + parentClass*: BinClass00 + pressed*: proc(button: ptr Button00) {.cdecl.} + released*: proc(button: ptr Button00) {.cdecl.} + clicked*: proc(button: ptr Button00) {.cdecl.} + enter*: proc(button: ptr Button00) {.cdecl.} + leave*: proc(button: ptr Button00) {.cdecl.} + activate*: proc(button: ptr Button00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ButtonClass* = ref object + impl*: ptr ButtonClass00 + + AssistantClass00* {.pure.} = object + parentClass*: WindowClass00 + prepare*: proc(assistant: ptr Assistant00; page: ptr Widget00) {.cdecl.} + apply*: proc(assistant: ptr Assistant00) {.cdecl.} + close*: proc(assistant: ptr Assistant00) {.cdecl.} + cancel*: proc(assistant: ptr Assistant00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + AssistantClass* = ref object + impl*: ptr AssistantClass00 + +proc gtk_container_forall*(self: ptr Container00; callback: Callback; callbackData: pointer) {. + importc: "gtk_container_forall", libprag.} + +proc forall*(self: Container; callback: Callback; callbackData: pointer) = + gtk_container_forall(cast[ptr Container00](self.impl), callback, callbackData) + +proc gtk_container_foreach*(self: ptr Container00; callback: Callback; callbackData: pointer) {. + importc: "gtk_container_foreach", libprag.} + +proc foreach*(self: Container; callback: Callback; callbackData: pointer) = + gtk_container_foreach(cast[ptr Container00](self.impl), callback, callbackData) + +proc gtk_widget_class_bind_template_callback_full*(self: ptr WidgetClass00; callbackName: cstring; callbackSymbol: Callback) {. + importc: "gtk_widget_class_bind_template_callback_full", libprag.} + +proc bindTemplateCallbackFull*(self: WidgetClass; callbackName: string; callbackSymbol: Callback) = + gtk_widget_class_bind_template_callback_full(cast[ptr WidgetClass00](self.impl), cstring(callbackName), callbackSymbol) + +proc gtk_builder_add_callback_symbol*(self: ptr Builder00; callbackName: cstring; callbackSymbol: Callback) {. + importc: "gtk_builder_add_callback_symbol", libprag.} + +proc addCallbackSymbol*(self: Builder; callbackName: string; callbackSymbol: Callback) = + gtk_builder_add_callback_symbol(cast[ptr Builder00](self.impl), cstring(callbackName), callbackSymbol) + +type + CellAccessibleParent00* {.pure.} = object + CellAccessibleParent* = ref object + impl*: ptr CellAccessibleParent00 + +proc gtk_cell_accessible_parent_activate*(self: ptr CellAccessibleParent00; cell: ptr CellAccessible00) {. + importc: "gtk_cell_accessible_parent_activate", libprag.} + +proc activate*(self: CellAccessibleParent; cell: CellAccessible) = + gtk_cell_accessible_parent_activate(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl)) + +proc gtk_cell_accessible_parent_edit*(self: ptr CellAccessibleParent00; cell: ptr CellAccessible00) {. + importc: "gtk_cell_accessible_parent_edit", libprag.} + +proc edit*(self: CellAccessibleParent; cell: CellAccessible) = + gtk_cell_accessible_parent_edit(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl)) + +proc gtk_cell_accessible_parent_expand_collapse*(self: ptr CellAccessibleParent00; cell: ptr CellAccessible00) {. + importc: "gtk_cell_accessible_parent_expand_collapse", libprag.} + +proc expandCollapse*(self: CellAccessibleParent; cell: CellAccessible) = + gtk_cell_accessible_parent_expand_collapse(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl)) + +proc gtk_cell_accessible_parent_get_cell_area*(self: ptr CellAccessibleParent00; cell: ptr CellAccessible00; + cellRect: ptr gdk.Rectangle00) {. + importc: "gtk_cell_accessible_parent_get_cell_area", libprag.} + +proc getCellArea*(self: CellAccessibleParent; cell: CellAccessible; + cellRect: gdk.Rectangle) = + gtk_cell_accessible_parent_get_cell_area(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl), cast[ptr gdk.Rectangle00](cellRect.impl)) + +proc cellArea*(self: CellAccessibleParent; cell: CellAccessible; + cellRect: gdk.Rectangle) = + gtk_cell_accessible_parent_get_cell_area(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl), cast[ptr gdk.Rectangle00](cellRect.impl)) + +proc gtk_cell_accessible_parent_get_cell_extents*(self: ptr CellAccessibleParent00; cell: ptr CellAccessible00; + x: ptr int32; y: ptr int32; width: ptr int32; height: ptr int32; coordType: atk.CoordType) {. + importc: "gtk_cell_accessible_parent_get_cell_extents", libprag.} + +proc getCellExtents*(self: CellAccessibleParent; cell: CellAccessible; + x: ptr int32; y: ptr int32; width: ptr int32; height: ptr int32; coordType: atk.CoordType) = + gtk_cell_accessible_parent_get_cell_extents(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl), x, y, width, height, coordType) + +proc cellExtents*(self: CellAccessibleParent; cell: CellAccessible; + x: ptr int32; y: ptr int32; width: ptr int32; height: ptr int32; coordType: atk.CoordType) = + gtk_cell_accessible_parent_get_cell_extents(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl), x, y, width, height, coordType) + +proc gtk_cell_accessible_parent_get_child_index*(self: ptr CellAccessibleParent00; cell: ptr CellAccessible00): int32 {. + importc: "gtk_cell_accessible_parent_get_child_index", libprag.} + +proc getChildIndex*(self: CellAccessibleParent; cell: CellAccessible): int = + int(gtk_cell_accessible_parent_get_child_index(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl))) + +proc childIndex*(self: CellAccessibleParent; cell: CellAccessible): int = + int(gtk_cell_accessible_parent_get_child_index(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl))) + +proc gtk_cell_accessible_parent_get_renderer_state*(self: ptr CellAccessibleParent00; cell: ptr CellAccessible00): CellRendererState {. + importc: "gtk_cell_accessible_parent_get_renderer_state", libprag.} + +proc getRendererState*(self: CellAccessibleParent; cell: CellAccessible): CellRendererState = + gtk_cell_accessible_parent_get_renderer_state(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl)) + +proc rendererState*(self: CellAccessibleParent; cell: CellAccessible): CellRendererState = + gtk_cell_accessible_parent_get_renderer_state(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl)) + +proc gtk_cell_accessible_parent_grab_focus*(self: ptr CellAccessibleParent00; cell: ptr CellAccessible00): gboolean {. + importc: "gtk_cell_accessible_parent_grab_focus", libprag.} + +proc grabFocus*(self: CellAccessibleParent; cell: CellAccessible): bool = + toBool(gtk_cell_accessible_parent_grab_focus(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl))) + +proc gtk_cell_accessible_parent_update_relationset*(self: ptr CellAccessibleParent00; cell: ptr CellAccessible00; + relationset: ptr atk.RelationSet00) {. + importc: "gtk_cell_accessible_parent_update_relationset", libprag.} + +proc updateRelationset*(self: CellAccessibleParent; cell: CellAccessible; + relationset: atk.RelationSet) = + gtk_cell_accessible_parent_update_relationset(cast[ptr CellAccessibleParent00](self.impl), cast[ptr CellAccessible00](cell.impl), cast[ptr atk.RelationSet00](relationset.impl)) + +type + FrameClass00* {.pure.} = object + parentClass*: BinClass00 + computeChildAllocation*: proc(frame: ptr Frame00; allocation: ptr gdk.Rectangle00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + FrameClass* = ref object + impl*: ptr FrameClass00 + +type + AspectFrameClass00* {.pure.} = object + parentClass*: FrameClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + AspectFrameClass* = ref object + impl*: ptr AspectFrameClass00 + +type + ApplicationWindowClass00* {.pure.} = object + parentClass*: WindowClass00 + padding*: array[14, pointer] + ApplicationWindowClass* = ref object + impl*: ptr ApplicationWindowClass00 + +type + BoxClass00* {.pure.} = object + parentClass*: ContainerClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + BoxClass* = ref object + impl*: ptr BoxClass00 + +type + AppChooserWidgetClass00* {.pure.} = object + parentClass*: BoxClass00 + applicationSelected*: proc(self: ptr AppChooserWidget00; appInfo: ptr gio.AppInfo00) {.cdecl.} + applicationActivated*: proc(self: ptr AppChooserWidget00; appInfo: ptr gio.AppInfo00) {.cdecl.} + populatePopup*: proc(self: ptr AppChooserWidget00; menu: ptr Menu00; appInfo: ptr gio.AppInfo00) {.cdecl.} + padding*: array[16, pointer] + AppChooserWidgetClass* = ref object + impl*: ptr AppChooserWidgetClass00 + +type + AppChooserDialogClass00* {.pure.} = object + parentClass*: DialogClass00 + padding*: array[16, pointer] + AppChooserDialogClass* = ref object + impl*: ptr AppChooserDialogClass00 + +type + ComboBoxClass00* {.pure.} = object + parentClass*: BinClass00 + changed*: proc(comboBox: ptr ComboBox00) {.cdecl.} + formatEntryText*: proc(comboBox: ptr ComboBox00; path: cstring): cstring {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + ComboBoxClass* = ref object + impl*: ptr ComboBoxClass00 + +type + AppChooserButtonClass00* {.pure.} = object + parentClass*: ComboBoxClass00 + customItemActivated*: proc(self: ptr AppChooserButton00; itemName: cstring) {.cdecl.} + padding*: array[16, pointer] + AppChooserButtonClass* = ref object + impl*: ptr AppChooserButtonClass00 + +type + AlignmentClass00* {.pure.} = object + parentClass*: BinClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + AlignmentClass* = ref object + impl*: ptr AlignmentClass00 + +type + ActionBarClass00* {.pure.} = object + parentClass*: BinClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ActionBarClass* = ref object + impl*: ptr ActionBarClass00 + +type + CellAccessibleParentIface00* {.pure.} = object + parent*: gobject.TypeInterface00 + getCellExtents*: proc(parent: ptr CellAccessibleParent00; cell: ptr CellAccessible00; + x: ptr int32; y: ptr int32; width: ptr int32; height: ptr int32; coordType: atk.CoordType) {.cdecl.} + getCellArea*: proc(parent: ptr CellAccessibleParent00; cell: ptr CellAccessible00; + cellRect: ptr gdk.Rectangle00) {.cdecl.} + grabFocus*: proc(parent: ptr CellAccessibleParent00; cell: ptr CellAccessible00): gboolean {.cdecl.} + getChildIndex*: proc(parent: ptr CellAccessibleParent00; cell: ptr CellAccessible00): int32 {.cdecl.} + getRendererState*: proc(parent: ptr CellAccessibleParent00; cell: ptr CellAccessible00): CellRendererState {.cdecl.} + expandCollapse*: proc(parent: ptr CellAccessibleParent00; cell: ptr CellAccessible00) {.cdecl.} + activate*: proc(parent: ptr CellAccessibleParent00; cell: ptr CellAccessible00) {.cdecl.} + edit*: proc(parent: ptr CellAccessibleParent00; cell: ptr CellAccessible00) {.cdecl.} + updateRelationset*: proc(parent: ptr CellAccessibleParent00; cell: ptr CellAccessible00; + relationset: ptr atk.RelationSet00) {.cdecl.} + CellAccessibleParentIface* = ref object + impl*: ptr CellAccessibleParentIface00 + +type + ButtonBoxClass00* {.pure.} = object + parentClass*: BoxClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ButtonBoxClass* = ref object + impl*: ptr ButtonBoxClass00 + +type + CellAllocCallback* = proc (renderer: ptr CellRenderer00; cellArea: ptr gdk.Rectangle00; + cellBackground: ptr gdk.Rectangle00; data: pointer): gboolean {.cdecl.} + +proc gtk_cell_area_foreach_alloc*(self: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; backgroundArea: ptr gdk.Rectangle00; callback: CellAllocCallback; + callbackData: pointer) {. + importc: "gtk_cell_area_foreach_alloc", libprag.} + +proc foreachAlloc*(self: CellArea; context: CellAreaContext; widget: Widget; + cellArea: gdk.Rectangle; backgroundArea: gdk.Rectangle; callback: CellAllocCallback; callbackData: pointer) = + gtk_cell_area_foreach_alloc(cast[ptr CellArea00](self.impl), cast[ptr CellAreaContext00](context.impl), cast[ptr Widget00](widget.impl), cast[ptr gdk.Rectangle00](cellArea.impl), cast[ptr gdk.Rectangle00](backgroundArea.impl), callback, callbackData) + +type + CellAreaBoxPrivate00* {.pure.} = object + CellAreaBoxPrivate* = ref object + impl*: ptr CellAreaBoxPrivate00 + +type + CellAreaBox* = ref object of CellArea + CellAreaBox00* = object of CellArea00 + priv2: ptr CellAreaBoxPrivate00 + +proc gtk_cell_area_box_new*(): ptr CellAreaBox00 {. + importc: "gtk_cell_area_box_new", libprag.} + +proc newCellAreaBox*(): CellAreaBox = + new(result, finalizeGObject) + result.impl = gtk_cell_area_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellAreaBox*[T](result: var T) = + assert(result is CellAreaBox) + new(result, finalizeGObject) + result.impl = gtk_cell_area_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_area_box_get_spacing*(self: ptr CellAreaBox00): int32 {. + importc: "gtk_cell_area_box_get_spacing", libprag.} + +proc getSpacing*(self: CellAreaBox): int = + int(gtk_cell_area_box_get_spacing(cast[ptr CellAreaBox00](self.impl))) + +proc spacing*(self: CellAreaBox): int = + int(gtk_cell_area_box_get_spacing(cast[ptr CellAreaBox00](self.impl))) + +proc gtk_cell_area_box_pack_end*(self: ptr CellAreaBox00; renderer: ptr CellRenderer00; + expand: gboolean; align: gboolean; fixed: gboolean) {. + importc: "gtk_cell_area_box_pack_end", libprag.} + +proc packEnd*(self: CellAreaBox; renderer: CellRenderer; expand: bool; + align: bool; fixed: bool) = + gtk_cell_area_box_pack_end(cast[ptr CellAreaBox00](self.impl), cast[ptr CellRenderer00](renderer.impl), gboolean(expand), gboolean(align), gboolean(fixed)) + +proc gtk_cell_area_box_pack_start*(self: ptr CellAreaBox00; renderer: ptr CellRenderer00; + expand: gboolean; align: gboolean; fixed: gboolean) {. + importc: "gtk_cell_area_box_pack_start", libprag.} + +proc packStart*(self: CellAreaBox; renderer: CellRenderer; expand: bool; + align: bool; fixed: bool) = + gtk_cell_area_box_pack_start(cast[ptr CellAreaBox00](self.impl), cast[ptr CellRenderer00](renderer.impl), gboolean(expand), gboolean(align), gboolean(fixed)) + +proc gtk_cell_area_box_set_spacing*(self: ptr CellAreaBox00; spacing: int32) {. + importc: "gtk_cell_area_box_set_spacing", libprag.} + +proc setSpacing*(self: CellAreaBox; spacing: int) = + gtk_cell_area_box_set_spacing(cast[ptr CellAreaBox00](self.impl), int32(spacing)) + +proc `spacing=`*(self: CellAreaBox; spacing: int) = + gtk_cell_area_box_set_spacing(cast[ptr CellAreaBox00](self.impl), int32(spacing)) + +type + CellAreaContextClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + allocate*: proc(context: ptr CellAreaContext00; width: int32; height: int32) {.cdecl.} + reset*: proc(context: ptr CellAreaContext00) {.cdecl.} + getPreferredHeightForWidth*: proc(context: ptr CellAreaContext00; width: int32; minimumHeight: var int32; + naturalHeight: var int32) {.cdecl.} + getPreferredWidthForHeight*: proc(context: ptr CellAreaContext00; height: int32; minimumWidth: var int32; + naturalWidth: var int32) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + CellAreaContextClass* = ref object + impl*: ptr CellAreaContextClass00 + +type + CellCallback* = proc (renderer: ptr CellRenderer00; data: pointer): gboolean {.cdecl.} + +type + CellAreaClass00* {.pure.} = object + parentClass*: gobject.InitiallyUnownedClass00 + add*: proc(area: ptr CellArea00; renderer: ptr CellRenderer00) {.cdecl.} + remove*: proc(area: ptr CellArea00; renderer: ptr CellRenderer00) {.cdecl.} + foreach*: proc(area: ptr CellArea00; callback: CellCallback; callbackData: pointer) {.cdecl.} + foreachAlloc*: proc(area: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; backgroundArea: ptr gdk.Rectangle00; callback: CellAllocCallback; + callbackData: pointer) {.cdecl.} + event*: proc(area: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; event: ptr gdk.Event00; cellArea: ptr gdk.Rectangle00; flags: CellRendererState): int32 {.cdecl.} + render*: proc(area: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; cr: ptr cairo.Context00; backgroundArea: ptr gdk.Rectangle00; cellArea: ptr gdk.Rectangle00; + flags: CellRendererState; paintFocus: gboolean) {.cdecl.} + applyAttributes*: proc(area: ptr CellArea00; treeModel: ptr TreeModel00; + iter: ptr TreeIter00; isExpander: gboolean; isExpanded: gboolean) {.cdecl.} + createContext*: proc(area: ptr CellArea00): ptr CellAreaContext00 {.cdecl.} + copyContext*: proc(area: ptr CellArea00; context: ptr CellAreaContext00): ptr CellAreaContext00 {.cdecl.} + getRequestMode*: proc(area: ptr CellArea00): SizeRequestMode {.cdecl.} + getPreferredWidth*: proc(area: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; minimumWidth: var int32; naturalWidth: var int32) {.cdecl.} + getPreferredHeightForWidth*: proc(area: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; width: int32; minimumHeight: var int32; naturalHeight: var int32) {.cdecl.} + getPreferredHeight*: proc(area: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; minimumHeight: var int32; naturalHeight: var int32) {.cdecl.} + getPreferredWidthForHeight*: proc(area: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; height: int32; minimumWidth: var int32; naturalWidth: var int32) {.cdecl.} + setCellProperty*: proc(area: ptr CellArea00; renderer: ptr CellRenderer00; + propertyId: uint32; value: ptr gobject.Value00; pspec: ptr gobject.ParamSpec00) {.cdecl.} + getCellProperty*: proc(area: ptr CellArea00; renderer: ptr CellRenderer00; + propertyId: uint32; value: ptr gobject.Value00; pspec: ptr gobject.ParamSpec00) {.cdecl.} + focus*: proc(area: ptr CellArea00; direction: DirectionType): gboolean {.cdecl.} + isActivatable*: proc(area: ptr CellArea00): gboolean {.cdecl.} + activate*: proc(area: ptr CellArea00; context: ptr CellAreaContext00; + widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; flags: CellRendererState; editOnly: gboolean): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + CellAreaClass* = ref object + impl*: ptr CellAreaClass00 + +proc gtk_cell_area_class_find_cell_property*(self: ptr CellAreaClass00; propertyName: cstring): ptr gobject.ParamSpec00 {. + importc: "gtk_cell_area_class_find_cell_property", libprag.} + +proc gtk_cell_area_class_install_cell_property*(self: ptr CellAreaClass00; propertyId: uint32; pspec: ptr gobject.ParamSpec00) {. + importc: "gtk_cell_area_class_install_cell_property", libprag.} + +proc installCellProperty*(self: CellAreaClass; propertyId: int; pspec: gobject.ParamSpec) = + gtk_cell_area_class_install_cell_property(cast[ptr CellAreaClass00](self.impl), uint32(propertyId), cast[ptr gobject.ParamSpec00](pspec.impl)) + +proc gtk_cell_area_class_list_cell_properties*(self: ptr CellAreaClass00; nProperties: var uint32): ptr gobject.ParamSpec00Array {. + importc: "gtk_cell_area_class_list_cell_properties", libprag.} + +proc listCellProperties*(self: CellAreaClass; nProperties: var int): ptr gobject.ParamSpec00Array = + var nProperties_00 = uint32(nProperties) + result = gtk_cell_area_class_list_cell_properties(cast[ptr CellAreaClass00](self.impl), nProperties_00) + nProperties = int(nProperties_00) + +type + CellAreaBoxClass00* {.pure.} = object + parentClass*: CellAreaClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellAreaBoxClass* = ref object + impl*: ptr CellAreaBoxClass00 + +proc gtk_cell_area_foreach*(self: ptr CellArea00; callback: CellCallback; callbackData: pointer) {. + importc: "gtk_cell_area_foreach", libprag.} + +proc foreach*(self: CellArea; callback: CellCallback; callbackData: pointer) = + gtk_cell_area_foreach(cast[ptr CellArea00](self.impl), callback, callbackData) + +type + CellEditableIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + editingDone*: proc(cellEditable: ptr CellEditable00) {.cdecl.} + removeWidget*: proc(cellEditable: ptr CellEditable00) {.cdecl.} + startEditing*: proc(cellEditable: ptr CellEditable00; event: ptr gdk.Event00) {.cdecl.} + CellEditableIface* = ref object + impl*: ptr CellEditableIface00 + +type + CellLayout00* {.pure.} = object + CellLayout* = ref object + impl*: ptr CellLayout00 + +proc gtk_cell_layout_add_attribute*(self: ptr CellLayout00; cell: ptr CellRenderer00; + attribute: cstring; column: int32) {. + importc: "gtk_cell_layout_add_attribute", libprag.} + +proc addAttribute*(self: CellLayout; cell: CellRenderer; attribute: string; + column: int) = + gtk_cell_layout_add_attribute(cast[ptr CellLayout00](self.impl), cast[ptr CellRenderer00](cell.impl), cstring(attribute), int32(column)) + +proc gtk_cell_layout_clear*(self: ptr CellLayout00) {. + importc: "gtk_cell_layout_clear", libprag.} + +proc clear*(self: CellLayout) = + gtk_cell_layout_clear(cast[ptr CellLayout00](self.impl)) + +proc gtk_cell_layout_clear_attributes*(self: ptr CellLayout00; cell: ptr CellRenderer00) {. + importc: "gtk_cell_layout_clear_attributes", libprag.} + +proc clearAttributes*(self: CellLayout; cell: CellRenderer) = + gtk_cell_layout_clear_attributes(cast[ptr CellLayout00](self.impl), cast[ptr CellRenderer00](cell.impl)) + +proc gtk_cell_layout_get_area*(self: ptr CellLayout00): ptr CellArea00 {. + importc: "gtk_cell_layout_get_area", libprag.} + +proc getArea*(self: CellLayout): CellArea = + let gobj = gtk_cell_layout_get_area(cast[ptr CellLayout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellArea](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc area*(self: CellLayout): CellArea = + let gobj = gtk_cell_layout_get_area(cast[ptr CellLayout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CellArea](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_layout_get_cells*(self: ptr CellLayout00): ptr pointer {. + importc: "gtk_cell_layout_get_cells", libprag.} + +proc getCells*(self: CellLayout): ptr pointer = + gtk_cell_layout_get_cells(cast[ptr CellLayout00](self.impl)) + +proc cells*(self: CellLayout): ptr pointer = + gtk_cell_layout_get_cells(cast[ptr CellLayout00](self.impl)) + +proc gtk_cell_layout_pack_end*(self: ptr CellLayout00; cell: ptr CellRenderer00; + expand: gboolean) {. + importc: "gtk_cell_layout_pack_end", libprag.} + +proc packEnd*(self: CellLayout; cell: CellRenderer; expand: bool) = + gtk_cell_layout_pack_end(cast[ptr CellLayout00](self.impl), cast[ptr CellRenderer00](cell.impl), gboolean(expand)) + +proc gtk_cell_layout_pack_start*(self: ptr CellLayout00; cell: ptr CellRenderer00; + expand: gboolean) {. + importc: "gtk_cell_layout_pack_start", libprag.} + +proc packStart*(self: CellLayout; cell: CellRenderer; expand: bool) = + gtk_cell_layout_pack_start(cast[ptr CellLayout00](self.impl), cast[ptr CellRenderer00](cell.impl), gboolean(expand)) + +proc gtk_cell_layout_reorder*(self: ptr CellLayout00; cell: ptr CellRenderer00; + position: int32) {. + importc: "gtk_cell_layout_reorder", libprag.} + +proc reorder*(self: CellLayout; cell: CellRenderer; position: int) = + gtk_cell_layout_reorder(cast[ptr CellLayout00](self.impl), cast[ptr CellRenderer00](cell.impl), int32(position)) + +type + CellLayoutDataFunc* = proc (cellLayout: ptr CellLayout00; cell: ptr CellRenderer00; + treeModel: ptr TreeModel00; iter: ptr TreeIter00; data: pointer) {.cdecl.} + +proc gtk_cell_layout_set_cell_data_func*(self: ptr CellLayout00; cell: ptr CellRenderer00; + `func`: CellLayoutDataFunc; funcData: pointer; destroy: DestroyNotify) {. + importc: "gtk_cell_layout_set_cell_data_func", libprag.} + +proc setCellDataFunc*(self: CellLayout; cell: CellRenderer; `func`: CellLayoutDataFunc; + funcData: pointer; destroy: DestroyNotify) = + gtk_cell_layout_set_cell_data_func(cast[ptr CellLayout00](self.impl), cast[ptr CellRenderer00](cell.impl), `func`, funcData, destroy) + +type + CellLayoutIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + packStart*: proc(cellLayout: ptr CellLayout00; cell: ptr CellRenderer00; + expand: gboolean) {.cdecl.} + packEnd*: proc(cellLayout: ptr CellLayout00; cell: ptr CellRenderer00; + expand: gboolean) {.cdecl.} + clear*: proc(cellLayout: ptr CellLayout00) {.cdecl.} + addAttribute*: proc(cellLayout: ptr CellLayout00; cell: ptr CellRenderer00; + attribute: cstring; column: int32) {.cdecl.} + setCellDataFunc*: proc(cellLayout: ptr CellLayout00; cell: ptr CellRenderer00; + `func`: CellLayoutDataFunc; funcData: pointer; destroy: DestroyNotify) {.cdecl.} + clearAttributes*: proc(cellLayout: ptr CellLayout00; cell: ptr CellRenderer00) {.cdecl.} + reorder*: proc(cellLayout: ptr CellLayout00; cell: ptr CellRenderer00; + position: int32) {.cdecl.} + getCells*: proc(cellLayout: ptr CellLayout00): ptr pointer {.cdecl.} + getArea*: proc(cellLayout: ptr CellLayout00): ptr CellArea00 {.cdecl.} + CellLayoutIface* = ref object + impl*: ptr CellLayoutIface00 + +type + CellRendererTextPrivate00* {.pure.} = object + CellRendererTextPrivate* = ref object + impl*: ptr CellRendererTextPrivate00 + +type + CellRendererText* = ref object of CellRenderer + CellRendererText00* = object of CellRenderer00 + priv2: ptr CellRendererTextPrivate00 + +proc scEdited*(self: CellRendererText; p: proc (self: ptr gobject.Object00; path: cstring; newText: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "edited", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_cell_renderer_text_new*(): ptr CellRendererText00 {. + importc: "gtk_cell_renderer_text_new", libprag.} + +proc newCellRendererText*(): CellRendererText = + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_text_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellRendererText*[T](result: var T) = + assert(result is CellRendererText) + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_text_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_renderer_text_set_fixed_height_from_font*(self: ptr CellRendererText00; numberOfRows: int32) {. + importc: "gtk_cell_renderer_text_set_fixed_height_from_font", libprag.} + +proc setFixedHeightFromFont*(self: CellRendererText; numberOfRows: int) = + gtk_cell_renderer_text_set_fixed_height_from_font(cast[ptr CellRendererText00](self.impl), int32(numberOfRows)) + +proc `fixedHeightFromFont=`*(self: CellRendererText; numberOfRows: int) = + gtk_cell_renderer_text_set_fixed_height_from_font(cast[ptr CellRendererText00](self.impl), int32(numberOfRows)) + +type + CellRendererAccelPrivate00* {.pure.} = object + CellRendererAccelPrivate* = ref object + impl*: ptr CellRendererAccelPrivate00 + +type + CellRendererAccel* = ref object of CellRendererText + CellRendererAccel00* = object of CellRendererText00 + priv3: ptr CellRendererAccelPrivate00 + +proc scAccelCleared*(self: CellRendererAccel; p: proc (self: ptr gobject.Object00; pathString: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "accel-cleared", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scAccelEdited*(self: CellRendererAccel; p: proc (self: ptr gobject.Object00; pathString: cstring; accelKey: uint32; accelMods: gdk.ModifierType; + hardwareKeycode: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "accel-edited", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_cell_renderer_accel_new*(): ptr CellRendererAccel00 {. + importc: "gtk_cell_renderer_accel_new", libprag.} + +proc newCellRendererAccel*(): CellRendererAccel = + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_accel_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellRendererAccel*[T](result: var T) = + assert(result is CellRendererAccel) + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_accel_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + CellRendererClassPrivate00* {.pure.} = object + CellRendererClassPrivate* = ref object + impl*: ptr CellRendererClassPrivate00 + +type + CellRendererClass00* {.pure.} = object + parentClass*: gobject.InitiallyUnownedClass00 + getRequestMode*: proc(cell: ptr CellRenderer00): SizeRequestMode {.cdecl.} + getPreferredWidth*: proc(cell: ptr CellRenderer00; widget: ptr Widget00; minimumSize: var int32; + naturalSize: var int32) {.cdecl.} + getPreferredHeightForWidth*: proc(cell: ptr CellRenderer00; widget: ptr Widget00; width: int32; + minimumHeight: var int32; naturalHeight: var int32) {.cdecl.} + getPreferredHeight*: proc(cell: ptr CellRenderer00; widget: ptr Widget00; minimumSize: var int32; + naturalSize: var int32) {.cdecl.} + getPreferredWidthForHeight*: proc(cell: ptr CellRenderer00; widget: ptr Widget00; height: int32; + minimumWidth: var int32; naturalWidth: var int32) {.cdecl.} + getAlignedArea*: proc(cell: ptr CellRenderer00; widget: ptr Widget00; flags: CellRendererState; + cellArea: ptr gdk.Rectangle00; alignedArea: var gdk.Rectangle00) {.cdecl.} + getSize*: proc(cell: ptr CellRenderer00; widget: ptr Widget00; cellArea: ptr gdk.Rectangle00; + xOffset: var int32; yOffset: var int32; width: var int32; height: var int32) {.cdecl.} + render*: proc(cell: ptr CellRenderer00; cr: ptr cairo.Context00; + widget: ptr Widget00; backgroundArea: ptr gdk.Rectangle00; cellArea: ptr gdk.Rectangle00; flags: CellRendererState) {.cdecl.} + activate*: proc(cell: ptr CellRenderer00; event: ptr gdk.Event00; + widget: ptr Widget00; path: cstring; backgroundArea: ptr gdk.Rectangle00; cellArea: ptr gdk.Rectangle00; + flags: CellRendererState): gboolean {.cdecl.} + startEditing*: proc(cell: ptr CellRenderer00; event: ptr gdk.Event00; + widget: ptr Widget00; path: cstring; backgroundArea: ptr gdk.Rectangle00; cellArea: ptr gdk.Rectangle00; + flags: CellRendererState): ptr CellEditable00 {.cdecl.} + editingCanceled*: proc(cell: ptr CellRenderer00) {.cdecl.} + editingStarted*: proc(cell: ptr CellRenderer00; editable: ptr CellEditable00; + path: cstring) {.cdecl.} + priv*: ptr CellRendererClassPrivate00 + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellRendererClass* = ref object + impl*: ptr CellRendererClass00 + +proc gtk_cell_renderer_class_set_accessible_type*(self: ptr CellRendererClass00; `type`: GType) {. + importc: "gtk_cell_renderer_class_set_accessible_type", libprag.} + +proc setAccessibleType*(self: CellRendererClass; `type`: GType) = + gtk_cell_renderer_class_set_accessible_type(cast[ptr CellRendererClass00](self.impl), `type`) + +proc `accessibleType=`*(self: CellRendererClass; `type`: GType) = + gtk_cell_renderer_class_set_accessible_type(cast[ptr CellRendererClass00](self.impl), `type`) + +type + CellRendererTextClass00* {.pure.} = object + parentClass*: CellRendererClass00 + edited*: proc(cellRendererText: ptr CellRendererText00; path: cstring; + newText: cstring) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellRendererTextClass* = ref object + impl*: ptr CellRendererTextClass00 + +type + CellRendererAccelClass00* {.pure.} = object + parentClass*: CellRendererTextClass00 + accelEdited*: proc(accel: ptr CellRendererAccel00; pathString: cstring; + accelKey: uint32; accelMods: gdk.ModifierType; hardwareKeycode: uint32) {.cdecl.} + accelCleared*: proc(accel: ptr CellRendererAccel00; pathString: cstring) {.cdecl.} + gtkReserved0*: pointer + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellRendererAccelClass* = ref object + impl*: ptr CellRendererAccelClass00 + +type + CellRendererAccelMode* {.size: sizeof(cint), pure.} = enum + gtk = 0 + other = 1 + +type + CellRendererComboPrivate00* {.pure.} = object + CellRendererComboPrivate* = ref object + impl*: ptr CellRendererComboPrivate00 + +type + CellRendererCombo* = ref object of CellRendererText + CellRendererCombo00* = object of CellRendererText00 + priv3: ptr CellRendererComboPrivate00 + +proc scChanged*(self: CellRendererCombo; p: proc (self: ptr gobject.Object00; pathString: cstring; newIter: TreeIter00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_cell_renderer_combo_new*(): ptr CellRendererCombo00 {. + importc: "gtk_cell_renderer_combo_new", libprag.} + +proc newCellRendererCombo*(): CellRendererCombo = + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_combo_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellRendererCombo*[T](result: var T) = + assert(result is CellRendererCombo) + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_combo_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + CellRendererComboClass00* {.pure.} = object + parent*: CellRendererTextClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellRendererComboClass* = ref object + impl*: ptr CellRendererComboClass00 + +type + CellRendererMode* {.size: sizeof(cint), pure.} = enum + inert = 0 + activatable = 1 + editable = 2 + +type + CellRendererPixbufPrivate00* {.pure.} = object + CellRendererPixbufPrivate* = ref object + impl*: ptr CellRendererPixbufPrivate00 + +type + CellRendererPixbuf* = ref object of CellRenderer + CellRendererPixbuf00* = object of CellRenderer00 + priv2: ptr CellRendererPixbufPrivate00 + +proc gtk_cell_renderer_pixbuf_new*(): ptr CellRendererPixbuf00 {. + importc: "gtk_cell_renderer_pixbuf_new", libprag.} + +proc newCellRendererPixbuf*(): CellRendererPixbuf = + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_pixbuf_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellRendererPixbuf*[T](result: var T) = + assert(result is CellRendererPixbuf) + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_pixbuf_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + CellRendererPixbufClass00* {.pure.} = object + parentClass*: CellRendererClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellRendererPixbufClass* = ref object + impl*: ptr CellRendererPixbufClass00 + +type + CellRendererProgressPrivate00* {.pure.} = object + CellRendererProgressPrivate* = ref object + impl*: ptr CellRendererProgressPrivate00 + +type + CellRendererProgress* = ref object of CellRenderer + CellRendererProgress00* = object of CellRenderer00 + priv2: ptr CellRendererProgressPrivate00 + +proc gtk_cell_renderer_progress_new*(): ptr CellRendererProgress00 {. + importc: "gtk_cell_renderer_progress_new", libprag.} + +proc newCellRendererProgress*(): CellRendererProgress = + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_progress_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellRendererProgress*[T](result: var T) = + assert(result is CellRendererProgress) + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_progress_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + CellRendererProgressClass00* {.pure.} = object + parentClass*: CellRendererClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellRendererProgressClass* = ref object + impl*: ptr CellRendererProgressClass00 + +type + CellRendererSpinPrivate00* {.pure.} = object + CellRendererSpinPrivate* = ref object + impl*: ptr CellRendererSpinPrivate00 + +type + CellRendererSpin* = ref object of CellRendererText + CellRendererSpin00* = object of CellRendererText00 + priv3: ptr CellRendererSpinPrivate00 + +proc gtk_cell_renderer_spin_new*(): ptr CellRendererSpin00 {. + importc: "gtk_cell_renderer_spin_new", libprag.} + +proc newCellRendererSpin*(): CellRendererSpin = + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_spin_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellRendererSpin*[T](result: var T) = + assert(result is CellRendererSpin) + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_spin_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + CellRendererSpinClass00* {.pure.} = object + parent*: CellRendererTextClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellRendererSpinClass* = ref object + impl*: ptr CellRendererSpinClass00 + +type + CellRendererSpinnerPrivate00* {.pure.} = object + CellRendererSpinnerPrivate* = ref object + impl*: ptr CellRendererSpinnerPrivate00 + +type + CellRendererSpinner* = ref object of CellRenderer + CellRendererSpinner00* = object of CellRenderer00 + priv2: ptr CellRendererSpinnerPrivate00 + +proc gtk_cell_renderer_spinner_new*(): ptr CellRendererSpinner00 {. + importc: "gtk_cell_renderer_spinner_new", libprag.} + +proc newCellRendererSpinner*(): CellRendererSpinner = + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_spinner_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellRendererSpinner*[T](result: var T) = + assert(result is CellRendererSpinner) + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_spinner_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + CellRendererSpinnerClass00* {.pure.} = object + parentClass*: CellRendererClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellRendererSpinnerClass* = ref object + impl*: ptr CellRendererSpinnerClass00 + +type + CellRendererTogglePrivate00* {.pure.} = object + CellRendererTogglePrivate* = ref object + impl*: ptr CellRendererTogglePrivate00 + +type + CellRendererToggle* = ref object of CellRenderer + CellRendererToggle00* = object of CellRenderer00 + priv2: ptr CellRendererTogglePrivate00 + +proc scToggled*(self: CellRendererToggle; p: proc (self: ptr gobject.Object00; path: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggled", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_cell_renderer_toggle_new*(): ptr CellRendererToggle00 {. + importc: "gtk_cell_renderer_toggle_new", libprag.} + +proc newCellRendererToggle*(): CellRendererToggle = + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_toggle_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellRendererToggle*[T](result: var T) = + assert(result is CellRendererToggle) + new(result, finalizeGObject) + result.impl = gtk_cell_renderer_toggle_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_renderer_toggle_get_activatable*(self: ptr CellRendererToggle00): gboolean {. + importc: "gtk_cell_renderer_toggle_get_activatable", libprag.} + +proc getActivatable*(self: CellRendererToggle): bool = + toBool(gtk_cell_renderer_toggle_get_activatable(cast[ptr CellRendererToggle00](self.impl))) + +proc activatable*(self: CellRendererToggle): bool = + toBool(gtk_cell_renderer_toggle_get_activatable(cast[ptr CellRendererToggle00](self.impl))) + +proc gtk_cell_renderer_toggle_get_active*(self: ptr CellRendererToggle00): gboolean {. + importc: "gtk_cell_renderer_toggle_get_active", libprag.} + +proc getActive*(self: CellRendererToggle): bool = + toBool(gtk_cell_renderer_toggle_get_active(cast[ptr CellRendererToggle00](self.impl))) + +proc active*(self: CellRendererToggle): bool = + toBool(gtk_cell_renderer_toggle_get_active(cast[ptr CellRendererToggle00](self.impl))) + +proc gtk_cell_renderer_toggle_get_radio*(self: ptr CellRendererToggle00): gboolean {. + importc: "gtk_cell_renderer_toggle_get_radio", libprag.} + +proc getRadio*(self: CellRendererToggle): bool = + toBool(gtk_cell_renderer_toggle_get_radio(cast[ptr CellRendererToggle00](self.impl))) + +proc radio*(self: CellRendererToggle): bool = + toBool(gtk_cell_renderer_toggle_get_radio(cast[ptr CellRendererToggle00](self.impl))) + +proc gtk_cell_renderer_toggle_set_activatable*(self: ptr CellRendererToggle00; setting: gboolean) {. + importc: "gtk_cell_renderer_toggle_set_activatable", libprag.} + +proc setActivatable*(self: CellRendererToggle; setting: bool) = + gtk_cell_renderer_toggle_set_activatable(cast[ptr CellRendererToggle00](self.impl), gboolean(setting)) + +proc `activatable=`*(self: CellRendererToggle; setting: bool) = + gtk_cell_renderer_toggle_set_activatable(cast[ptr CellRendererToggle00](self.impl), gboolean(setting)) + +proc gtk_cell_renderer_toggle_set_active*(self: ptr CellRendererToggle00; setting: gboolean) {. + importc: "gtk_cell_renderer_toggle_set_active", libprag.} + +proc setActive*(self: CellRendererToggle; setting: bool) = + gtk_cell_renderer_toggle_set_active(cast[ptr CellRendererToggle00](self.impl), gboolean(setting)) + +proc `active=`*(self: CellRendererToggle; setting: bool) = + gtk_cell_renderer_toggle_set_active(cast[ptr CellRendererToggle00](self.impl), gboolean(setting)) + +proc gtk_cell_renderer_toggle_set_radio*(self: ptr CellRendererToggle00; radio: gboolean) {. + importc: "gtk_cell_renderer_toggle_set_radio", libprag.} + +proc setRadio*(self: CellRendererToggle; radio: bool) = + gtk_cell_renderer_toggle_set_radio(cast[ptr CellRendererToggle00](self.impl), gboolean(radio)) + +proc `radio=`*(self: CellRendererToggle; radio: bool) = + gtk_cell_renderer_toggle_set_radio(cast[ptr CellRendererToggle00](self.impl), gboolean(radio)) + +type + CellRendererToggleClass00* {.pure.} = object + parentClass*: CellRendererClass00 + toggled*: proc(cellRendererToggle: ptr CellRendererToggle00; path: cstring) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellRendererToggleClass* = ref object + impl*: ptr CellRendererToggleClass00 + +type + CellViewPrivate00* {.pure.} = object + CellViewPrivate* = ref object + impl*: ptr CellViewPrivate00 + +type + CellView* = ref object of Widget + CellView00* = object of Widget00 + priv2: ptr CellViewPrivate00 + +proc gtk_cell_view_new*(): ptr CellView00 {. + importc: "gtk_cell_view_new", libprag.} + +proc newCellView*(): CellView = + new(result, finalizeGObject) + result.impl = gtk_cell_view_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellView*[T](result: var T) = + assert(result is CellView) + new(result, finalizeGObject) + result.impl = gtk_cell_view_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_view_new_with_context*(area: ptr CellArea00; context: ptr CellAreaContext00): ptr CellView00 {. + importc: "gtk_cell_view_new_with_context", libprag.} + +proc newCellViewWithContext*(area: CellArea; context: CellAreaContext): CellView = + new(result, finalizeGObject) + result.impl = gtk_cell_view_new_with_context(cast[ptr CellArea00](area.impl), cast[ptr CellAreaContext00](context.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellViewWithContext*[T](result: var T; area: CellArea; context: CellAreaContext) = + assert(result is CellView) + new(result, finalizeGObject) + result.impl = gtk_cell_view_new_with_context(cast[ptr CellArea00](area.impl), cast[ptr CellAreaContext00](context.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_view_new_with_markup*(markup: cstring): ptr CellView00 {. + importc: "gtk_cell_view_new_with_markup", libprag.} + +proc newCellViewWithMarkup*(markup: string): CellView = + new(result, finalizeGObject) + result.impl = gtk_cell_view_new_with_markup(cstring(markup)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellViewWithMarkup*[T](result: var T; markup: string) = + assert(result is CellView) + new(result, finalizeGObject) + result.impl = gtk_cell_view_new_with_markup(cstring(markup)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_view_new_with_pixbuf*(pixbuf: ptr gdkpixbuf.Pixbuf00): ptr CellView00 {. + importc: "gtk_cell_view_new_with_pixbuf", libprag.} + +proc newCellViewWithPixbuf*(pixbuf: gdkpixbuf.Pixbuf): CellView = + new(result, finalizeGObject) + result.impl = gtk_cell_view_new_with_pixbuf(cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellViewWithPixbuf*[T](result: var T; pixbuf: gdkpixbuf.Pixbuf) = + assert(result is CellView) + new(result, finalizeGObject) + result.impl = gtk_cell_view_new_with_pixbuf(cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_view_new_with_text*(text: cstring): ptr CellView00 {. + importc: "gtk_cell_view_new_with_text", libprag.} + +proc newCellViewWithText*(text: string): CellView = + new(result, finalizeGObject) + result.impl = gtk_cell_view_new_with_text(cstring(text)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCellViewWithText*[T](result: var T; text: string) = + assert(result is CellView) + new(result, finalizeGObject) + result.impl = gtk_cell_view_new_with_text(cstring(text)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_cell_view_get_displayed_row*(self: ptr CellView00): ptr TreePath00 {. + importc: "gtk_cell_view_get_displayed_row", libprag.} + +proc getDisplayedRow*(self: CellView): TreePath = + new(result) + result.impl = gtk_cell_view_get_displayed_row(cast[ptr CellView00](self.impl)) + +proc displayedRow*(self: CellView): TreePath = + new(result) + result.impl = gtk_cell_view_get_displayed_row(cast[ptr CellView00](self.impl)) + +proc gtk_cell_view_get_draw_sensitive*(self: ptr CellView00): gboolean {. + importc: "gtk_cell_view_get_draw_sensitive", libprag.} + +proc getDrawSensitive*(self: CellView): bool = + toBool(gtk_cell_view_get_draw_sensitive(cast[ptr CellView00](self.impl))) + +proc drawSensitive*(self: CellView): bool = + toBool(gtk_cell_view_get_draw_sensitive(cast[ptr CellView00](self.impl))) + +proc gtk_cell_view_get_fit_model*(self: ptr CellView00): gboolean {. + importc: "gtk_cell_view_get_fit_model", libprag.} + +proc getFitModel*(self: CellView): bool = + toBool(gtk_cell_view_get_fit_model(cast[ptr CellView00](self.impl))) + +proc fitModel*(self: CellView): bool = + toBool(gtk_cell_view_get_fit_model(cast[ptr CellView00](self.impl))) + +proc gtk_cell_view_get_model*(self: ptr CellView00): ptr TreeModel00 {. + importc: "gtk_cell_view_get_model", libprag.} + +proc getModel*(self: CellView): TreeModel = + new(result) + result.impl = gtk_cell_view_get_model(cast[ptr CellView00](self.impl)) + +proc model*(self: CellView): TreeModel = + new(result) + result.impl = gtk_cell_view_get_model(cast[ptr CellView00](self.impl)) + +proc gtk_cell_view_get_size_of_row*(self: ptr CellView00; path: ptr TreePath00; requisition: var Requisition00): gboolean {. + importc: "gtk_cell_view_get_size_of_row", libprag.} + +proc getSizeOfRow*(self: ptr CellView00; path: ptr TreePath00; requisition: var Requisition00): gboolean {. + importc: "gtk_cell_view_get_size_of_row", libprag.} + +proc sizeOfRow*(self: ptr CellView00; path: ptr TreePath00; requisition: var Requisition00): gboolean {. + importc: "gtk_cell_view_get_size_of_row", libprag.} + +proc gtk_cell_view_set_background_color*(self: ptr CellView00; color: ptr gdk.Color00) {. + importc: "gtk_cell_view_set_background_color", libprag.} + +proc setBackgroundColor*(self: CellView; color: gdk.Color) = + gtk_cell_view_set_background_color(cast[ptr CellView00](self.impl), cast[ptr gdk.Color00](color.impl)) + +proc `backgroundColor=`*(self: CellView; color: gdk.Color) = + gtk_cell_view_set_background_color(cast[ptr CellView00](self.impl), cast[ptr gdk.Color00](color.impl)) + +proc gtk_cell_view_set_background_rgba*(self: ptr CellView00; rgba: ptr gdk.RGBA00) {. + importc: "gtk_cell_view_set_background_rgba", libprag.} + +proc setBackgroundRgba*(self: CellView; rgba: gdk.RGBA) = + gtk_cell_view_set_background_rgba(cast[ptr CellView00](self.impl), cast[ptr gdk.RGBA00](rgba.impl)) + +proc `backgroundRgba=`*(self: CellView; rgba: gdk.RGBA) = + gtk_cell_view_set_background_rgba(cast[ptr CellView00](self.impl), cast[ptr gdk.RGBA00](rgba.impl)) + +proc gtk_cell_view_set_displayed_row*(self: ptr CellView00; path: ptr TreePath00) {. + importc: "gtk_cell_view_set_displayed_row", libprag.} + +proc setDisplayedRow*(self: CellView; path: TreePath) = + gtk_cell_view_set_displayed_row(cast[ptr CellView00](self.impl), cast[ptr TreePath00](path.impl)) + +proc `displayedRow=`*(self: CellView; path: TreePath) = + gtk_cell_view_set_displayed_row(cast[ptr CellView00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_cell_view_set_draw_sensitive*(self: ptr CellView00; drawSensitive: gboolean) {. + importc: "gtk_cell_view_set_draw_sensitive", libprag.} + +proc setDrawSensitive*(self: CellView; drawSensitive: bool) = + gtk_cell_view_set_draw_sensitive(cast[ptr CellView00](self.impl), gboolean(drawSensitive)) + +proc `drawSensitive=`*(self: CellView; drawSensitive: bool) = + gtk_cell_view_set_draw_sensitive(cast[ptr CellView00](self.impl), gboolean(drawSensitive)) + +proc gtk_cell_view_set_fit_model*(self: ptr CellView00; fitModel: gboolean) {. + importc: "gtk_cell_view_set_fit_model", libprag.} + +proc setFitModel*(self: CellView; fitModel: bool) = + gtk_cell_view_set_fit_model(cast[ptr CellView00](self.impl), gboolean(fitModel)) + +proc `fitModel=`*(self: CellView; fitModel: bool) = + gtk_cell_view_set_fit_model(cast[ptr CellView00](self.impl), gboolean(fitModel)) + +proc gtk_cell_view_set_model*(self: ptr CellView00; model: ptr TreeModel00) {. + importc: "gtk_cell_view_set_model", libprag.} + +proc setModel*(self: CellView; model: TreeModel) = + gtk_cell_view_set_model(cast[ptr CellView00](self.impl), cast[ptr TreeModel00](model.impl)) + +proc `model=`*(self: CellView; model: TreeModel) = + gtk_cell_view_set_model(cast[ptr CellView00](self.impl), cast[ptr TreeModel00](model.impl)) + +type + CellViewClass00* {.pure.} = object + parentClass*: WidgetClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CellViewClass* = ref object + impl*: ptr CellViewClass00 + +type + ToggleButtonPrivate00* {.pure.} = object + ToggleButtonPrivate* = ref object + impl*: ptr ToggleButtonPrivate00 + +type + ToggleButton* = ref object of Button + ToggleButton00* = object of Button00 + priv5: ptr ToggleButtonPrivate00 + +proc scToggled*(self: ToggleButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggled", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_toggle_button_new*(): ptr ToggleButton00 {. + importc: "gtk_toggle_button_new", libprag.} + +proc newToggleButton*(): ToggleButton = + new(result, finalizeGObject) + result.impl = gtk_toggle_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToggleButton*[T](result: var T) = + assert(result is ToggleButton) + new(result, finalizeGObject) + result.impl = gtk_toggle_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_toggle_button_new_with_label*(label: cstring): ptr ToggleButton00 {. + importc: "gtk_toggle_button_new_with_label", libprag.} + +proc newToggleButtonWithLabel*(label: string): ToggleButton = + new(result, finalizeGObject) + result.impl = gtk_toggle_button_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToggleButtonWithLabel*[T](result: var T; label: string) = + assert(result is ToggleButton) + new(result, finalizeGObject) + result.impl = gtk_toggle_button_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_toggle_button_new_with_mnemonic*(label: cstring): ptr ToggleButton00 {. + importc: "gtk_toggle_button_new_with_mnemonic", libprag.} + +proc newToggleButtonWithMnemonic*(label: string): ToggleButton = + new(result, finalizeGObject) + result.impl = gtk_toggle_button_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToggleButtonWithMnemonic*[T](result: var T; label: string) = + assert(result is ToggleButton) + new(result, finalizeGObject) + result.impl = gtk_toggle_button_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_toggle_button_get_active*(self: ptr ToggleButton00): gboolean {. + importc: "gtk_toggle_button_get_active", libprag.} + +proc getActive*(self: ToggleButton): bool = + toBool(gtk_toggle_button_get_active(cast[ptr ToggleButton00](self.impl))) + +proc active*(self: ToggleButton): bool = + toBool(gtk_toggle_button_get_active(cast[ptr ToggleButton00](self.impl))) + +proc gtk_toggle_button_get_inconsistent*(self: ptr ToggleButton00): gboolean {. + importc: "gtk_toggle_button_get_inconsistent", libprag.} + +proc getInconsistent*(self: ToggleButton): bool = + toBool(gtk_toggle_button_get_inconsistent(cast[ptr ToggleButton00](self.impl))) + +proc inconsistent*(self: ToggleButton): bool = + toBool(gtk_toggle_button_get_inconsistent(cast[ptr ToggleButton00](self.impl))) + +proc gtk_toggle_button_get_mode*(self: ptr ToggleButton00): gboolean {. + importc: "gtk_toggle_button_get_mode", libprag.} + +proc getMode*(self: ToggleButton): bool = + toBool(gtk_toggle_button_get_mode(cast[ptr ToggleButton00](self.impl))) + +proc mode*(self: ToggleButton): bool = + toBool(gtk_toggle_button_get_mode(cast[ptr ToggleButton00](self.impl))) + +proc gtk_toggle_button_set_active*(self: ptr ToggleButton00; isActive: gboolean) {. + importc: "gtk_toggle_button_set_active", libprag.} + +proc setActive*(self: ToggleButton; isActive: bool) = + gtk_toggle_button_set_active(cast[ptr ToggleButton00](self.impl), gboolean(isActive)) + +proc `active=`*(self: ToggleButton; isActive: bool) = + gtk_toggle_button_set_active(cast[ptr ToggleButton00](self.impl), gboolean(isActive)) + +proc gtk_toggle_button_set_inconsistent*(self: ptr ToggleButton00; setting: gboolean) {. + importc: "gtk_toggle_button_set_inconsistent", libprag.} + +proc setInconsistent*(self: ToggleButton; setting: bool) = + gtk_toggle_button_set_inconsistent(cast[ptr ToggleButton00](self.impl), gboolean(setting)) + +proc `inconsistent=`*(self: ToggleButton; setting: bool) = + gtk_toggle_button_set_inconsistent(cast[ptr ToggleButton00](self.impl), gboolean(setting)) + +proc gtk_toggle_button_set_mode*(self: ptr ToggleButton00; drawIndicator: gboolean) {. + importc: "gtk_toggle_button_set_mode", libprag.} + +proc setMode*(self: ToggleButton; drawIndicator: bool) = + gtk_toggle_button_set_mode(cast[ptr ToggleButton00](self.impl), gboolean(drawIndicator)) + +proc `mode=`*(self: ToggleButton; drawIndicator: bool) = + gtk_toggle_button_set_mode(cast[ptr ToggleButton00](self.impl), gboolean(drawIndicator)) + +proc gtk_toggle_button_toggled*(self: ptr ToggleButton00) {. + importc: "gtk_toggle_button_toggled", libprag.} + +proc toggled*(self: ToggleButton) = + gtk_toggle_button_toggled(cast[ptr ToggleButton00](self.impl)) + +type + CheckButton* = ref object of ToggleButton + CheckButton00* = object of ToggleButton00 + +proc gtk_check_button_new*(): ptr CheckButton00 {. + importc: "gtk_check_button_new", libprag.} + +proc newCheckButton*(): CheckButton = + new(result, finalizeGObject) + result.impl = gtk_check_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCheckButton*[T](result: var T) = + assert(result is CheckButton) + new(result, finalizeGObject) + result.impl = gtk_check_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_check_button_new_with_label*(label: cstring): ptr CheckButton00 {. + importc: "gtk_check_button_new_with_label", libprag.} + +proc newCheckButtonWithLabel*(label: string): CheckButton = + new(result, finalizeGObject) + result.impl = gtk_check_button_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCheckButtonWithLabel*[T](result: var T; label: string) = + assert(result is CheckButton) + new(result, finalizeGObject) + result.impl = gtk_check_button_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_check_button_new_with_mnemonic*(label: cstring): ptr CheckButton00 {. + importc: "gtk_check_button_new_with_mnemonic", libprag.} + +proc newCheckButtonWithMnemonic*(label: string): CheckButton = + new(result, finalizeGObject) + result.impl = gtk_check_button_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCheckButtonWithMnemonic*[T](result: var T; label: string) = + assert(result is CheckButton) + new(result, finalizeGObject) + result.impl = gtk_check_button_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ToggleButtonClass00* {.pure.} = object + parentClass*: ButtonClass00 + toggled*: proc(toggleButton: ptr ToggleButton00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ToggleButtonClass* = ref object + impl*: ptr ToggleButtonClass00 + +type + CheckButtonClass00* {.pure.} = object + parentClass*: ToggleButtonClass00 + drawIndicator*: proc(checkButton: ptr CheckButton00; cr: ptr cairo.Context00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CheckButtonClass* = ref object + impl*: ptr CheckButtonClass00 + +type + CheckMenuItemPrivate00* {.pure.} = object + CheckMenuItemPrivate* = ref object + impl*: ptr CheckMenuItemPrivate00 + +type + CheckMenuItem* = ref object of MenuItem + CheckMenuItem00* = object of MenuItem00 + priv5: ptr CheckMenuItemPrivate00 + +proc scToggled*(self: CheckMenuItem; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggled", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_check_menu_item_new*(): ptr CheckMenuItem00 {. + importc: "gtk_check_menu_item_new", libprag.} + +proc newCheckMenuItem*(): CheckMenuItem = + new(result, finalizeGObject) + result.impl = gtk_check_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCheckMenuItem*[T](result: var T) = + assert(result is CheckMenuItem) + new(result, finalizeGObject) + result.impl = gtk_check_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_check_menu_item_new_with_label*(label: cstring): ptr CheckMenuItem00 {. + importc: "gtk_check_menu_item_new_with_label", libprag.} + +proc newCheckMenuItemWithLabel*(label: string): CheckMenuItem = + new(result, finalizeGObject) + result.impl = gtk_check_menu_item_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCheckMenuItemWithLabel*[T](result: var T; label: string) = + assert(result is CheckMenuItem) + new(result, finalizeGObject) + result.impl = gtk_check_menu_item_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_check_menu_item_new_with_mnemonic*(label: cstring): ptr CheckMenuItem00 {. + importc: "gtk_check_menu_item_new_with_mnemonic", libprag.} + +proc newCheckMenuItemWithMnemonic*(label: string): CheckMenuItem = + new(result, finalizeGObject) + result.impl = gtk_check_menu_item_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCheckMenuItemWithMnemonic*[T](result: var T; label: string) = + assert(result is CheckMenuItem) + new(result, finalizeGObject) + result.impl = gtk_check_menu_item_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_check_menu_item_get_active*(self: ptr CheckMenuItem00): gboolean {. + importc: "gtk_check_menu_item_get_active", libprag.} + +proc getActive*(self: CheckMenuItem): bool = + toBool(gtk_check_menu_item_get_active(cast[ptr CheckMenuItem00](self.impl))) + +proc active*(self: CheckMenuItem): bool = + toBool(gtk_check_menu_item_get_active(cast[ptr CheckMenuItem00](self.impl))) + +proc gtk_check_menu_item_get_draw_as_radio*(self: ptr CheckMenuItem00): gboolean {. + importc: "gtk_check_menu_item_get_draw_as_radio", libprag.} + +proc getDrawAsRadio*(self: CheckMenuItem): bool = + toBool(gtk_check_menu_item_get_draw_as_radio(cast[ptr CheckMenuItem00](self.impl))) + +proc drawAsRadio*(self: CheckMenuItem): bool = + toBool(gtk_check_menu_item_get_draw_as_radio(cast[ptr CheckMenuItem00](self.impl))) + +proc gtk_check_menu_item_get_inconsistent*(self: ptr CheckMenuItem00): gboolean {. + importc: "gtk_check_menu_item_get_inconsistent", libprag.} + +proc getInconsistent*(self: CheckMenuItem): bool = + toBool(gtk_check_menu_item_get_inconsistent(cast[ptr CheckMenuItem00](self.impl))) + +proc inconsistent*(self: CheckMenuItem): bool = + toBool(gtk_check_menu_item_get_inconsistent(cast[ptr CheckMenuItem00](self.impl))) + +proc gtk_check_menu_item_set_active*(self: ptr CheckMenuItem00; isActive: gboolean) {. + importc: "gtk_check_menu_item_set_active", libprag.} + +proc setActive*(self: CheckMenuItem; isActive: bool) = + gtk_check_menu_item_set_active(cast[ptr CheckMenuItem00](self.impl), gboolean(isActive)) + +proc `active=`*(self: CheckMenuItem; isActive: bool) = + gtk_check_menu_item_set_active(cast[ptr CheckMenuItem00](self.impl), gboolean(isActive)) + +proc gtk_check_menu_item_set_draw_as_radio*(self: ptr CheckMenuItem00; drawAsRadio: gboolean) {. + importc: "gtk_check_menu_item_set_draw_as_radio", libprag.} + +proc setDrawAsRadio*(self: CheckMenuItem; drawAsRadio: bool) = + gtk_check_menu_item_set_draw_as_radio(cast[ptr CheckMenuItem00](self.impl), gboolean(drawAsRadio)) + +proc `drawAsRadio=`*(self: CheckMenuItem; drawAsRadio: bool) = + gtk_check_menu_item_set_draw_as_radio(cast[ptr CheckMenuItem00](self.impl), gboolean(drawAsRadio)) + +proc gtk_check_menu_item_set_inconsistent*(self: ptr CheckMenuItem00; setting: gboolean) {. + importc: "gtk_check_menu_item_set_inconsistent", libprag.} + +proc setInconsistent*(self: CheckMenuItem; setting: bool) = + gtk_check_menu_item_set_inconsistent(cast[ptr CheckMenuItem00](self.impl), gboolean(setting)) + +proc `inconsistent=`*(self: CheckMenuItem; setting: bool) = + gtk_check_menu_item_set_inconsistent(cast[ptr CheckMenuItem00](self.impl), gboolean(setting)) + +proc gtk_check_menu_item_toggled*(self: ptr CheckMenuItem00) {. + importc: "gtk_check_menu_item_toggled", libprag.} + +proc toggled*(self: CheckMenuItem) = + gtk_check_menu_item_toggled(cast[ptr CheckMenuItem00](self.impl)) + +type + MenuItemAccessiblePrivate00* {.pure.} = object + MenuItemAccessiblePrivate* = ref object + impl*: ptr MenuItemAccessiblePrivate00 + +type + MenuItemAccessible* = ref object of ContainerAccessible + MenuItemAccessible00* = object of ContainerAccessible00 + priv4: ptr MenuItemAccessiblePrivate00 + +type + CheckMenuItemAccessiblePrivate00* {.pure.} = object + CheckMenuItemAccessiblePrivate* = ref object + impl*: ptr CheckMenuItemAccessiblePrivate00 + +type + CheckMenuItemAccessible* = ref object of MenuItemAccessible + CheckMenuItemAccessible00* = object of MenuItemAccessible00 + priv5: ptr CheckMenuItemAccessiblePrivate00 + +type + MenuItemAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + MenuItemAccessibleClass* = ref object + impl*: ptr MenuItemAccessibleClass00 + +type + CheckMenuItemAccessibleClass00* {.pure.} = object + parentClass*: MenuItemAccessibleClass00 + CheckMenuItemAccessibleClass* = ref object + impl*: ptr CheckMenuItemAccessibleClass00 + +type + MenuItemClass00* {.pure.} = object + parentClass*: BinClass00 + hideOnActivate*: uint32 + activate*: proc(menuItem: ptr MenuItem00) {.cdecl.} + activateItem*: proc(menuItem: ptr MenuItem00) {.cdecl.} + toggleSizeRequest*: proc(menuItem: ptr MenuItem00; requisition: int32) {.cdecl.} + toggleSizeAllocate*: proc(menuItem: ptr MenuItem00; allocation: int32) {.cdecl.} + setLabel*: proc(menuItem: ptr MenuItem00; label: cstring) {.cdecl.} + getLabel*: proc(menuItem: ptr MenuItem00): cstring {.cdecl.} + select*: proc(menuItem: ptr MenuItem00) {.cdecl.} + deselect*: proc(menuItem: ptr MenuItem00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + MenuItemClass* = ref object + impl*: ptr MenuItemClass00 + +type + CheckMenuItemClass00* {.pure.} = object + parentClass*: MenuItemClass00 + toggled*: proc(checkMenuItem: ptr CheckMenuItem00) {.cdecl.} + drawIndicator*: proc(checkMenuItem: ptr CheckMenuItem00; cr: ptr cairo.Context00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CheckMenuItemClass* = ref object + impl*: ptr CheckMenuItemClass00 + +type + ClipboardClearFunc* = proc (clipboard: ptr Clipboard00; userDataOrOwner: pointer) {.cdecl.} + +type + ClipboardGetFunc* = proc (clipboard: ptr Clipboard00; selectionData: ptr SelectionData00; + info: uint32; userDataOrOwner: pointer) {.cdecl.} + +type + ClipboardImageReceivedFunc* = proc (clipboard: ptr Clipboard00; pixbuf: ptr gdkpixbuf.Pixbuf00; + data: pointer) {.cdecl.} + +proc gtk_clipboard_request_image*(self: ptr Clipboard00; callback: ClipboardImageReceivedFunc; + userData: pointer) {. + importc: "gtk_clipboard_request_image", libprag.} + +proc requestImage*(self: Clipboard; callback: ClipboardImageReceivedFunc; + userData: pointer) = + gtk_clipboard_request_image(cast[ptr Clipboard00](self.impl), callback, userData) + +type + ClipboardReceivedFunc* = proc (clipboard: ptr Clipboard00; selectionData: ptr SelectionData00; + data: pointer) {.cdecl.} + +proc gtk_clipboard_request_contents*(self: ptr Clipboard00; target: ptr gdk.Atom00; callback: ClipboardReceivedFunc; + userData: pointer) {. + importc: "gtk_clipboard_request_contents", libprag.} + +proc requestContents*(self: Clipboard; target: gdk.Atom; callback: ClipboardReceivedFunc; + userData: pointer) = + gtk_clipboard_request_contents(cast[ptr Clipboard00](self.impl), cast[ptr gdk.Atom00](target.impl), callback, userData) + +type + ClipboardRichTextReceivedFunc* = proc (clipboard: ptr Clipboard00; format: ptr gdk.Atom00; + text: cstring; length: uint64; data: pointer) {.cdecl.} + +proc gtk_clipboard_request_rich_text*(self: ptr Clipboard00; buffer: ptr TextBuffer00; callback: ClipboardRichTextReceivedFunc; + userData: pointer) {. + importc: "gtk_clipboard_request_rich_text", libprag.} + +proc requestRichText*(self: Clipboard; buffer: TextBuffer; callback: ClipboardRichTextReceivedFunc; + userData: pointer) = + gtk_clipboard_request_rich_text(cast[ptr Clipboard00](self.impl), cast[ptr TextBuffer00](buffer.impl), callback, userData) + +type + ClipboardTargetsReceivedFunc* = proc (clipboard: ptr Clipboard00; atoms: ptr gdk.Atom00Array; + nAtoms: int32; data: pointer) {.cdecl.} + +proc gtk_clipboard_request_targets*(self: ptr Clipboard00; callback: ClipboardTargetsReceivedFunc; + userData: pointer) {. + importc: "gtk_clipboard_request_targets", libprag.} + +proc requestTargets*(self: Clipboard; callback: ClipboardTargetsReceivedFunc; + userData: pointer) = + gtk_clipboard_request_targets(cast[ptr Clipboard00](self.impl), callback, userData) + +type + ClipboardTextReceivedFunc* = proc (clipboard: ptr Clipboard00; text: cstring; data: pointer) {.cdecl.} + +proc gtk_clipboard_request_text*(self: ptr Clipboard00; callback: ClipboardTextReceivedFunc; + userData: pointer) {. + importc: "gtk_clipboard_request_text", libprag.} + +proc requestText*(self: Clipboard; callback: ClipboardTextReceivedFunc; + userData: pointer) = + gtk_clipboard_request_text(cast[ptr Clipboard00](self.impl), callback, userData) + +type + ClipboardURIReceivedFunc* = proc (clipboard: ptr Clipboard00; uris: cstringArray; data: pointer) {.cdecl.} + +proc gtk_clipboard_request_uris*(self: ptr Clipboard00; callback: ClipboardURIReceivedFunc; + userData: pointer) {. + importc: "gtk_clipboard_request_uris", libprag.} + +proc requestUris*(self: Clipboard; callback: ClipboardURIReceivedFunc; + userData: pointer) = + gtk_clipboard_request_uris(cast[ptr Clipboard00](self.impl), callback, userData) + +type + ColorButtonPrivate00* {.pure.} = object + ColorButtonPrivate* = ref object + impl*: ptr ColorButtonPrivate00 + +type + ColorButton* = ref object of Button + ColorButton00* = object of Button00 + priv5: ptr ColorButtonPrivate00 + +proc scColorSet*(self: ColorButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "color-set", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_color_button_new*(): ptr ColorButton00 {. + importc: "gtk_color_button_new", libprag.} + +proc newColorButton*(): ColorButton = + new(result, finalizeGObject) + result.impl = gtk_color_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initColorButton*[T](result: var T) = + assert(result is ColorButton) + new(result, finalizeGObject) + result.impl = gtk_color_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_color_button_new_with_color*(color: ptr gdk.Color00): ptr ColorButton00 {. + importc: "gtk_color_button_new_with_color", libprag.} + +proc newColorButtonWithColor*(color: gdk.Color): ColorButton = + new(result, finalizeGObject) + result.impl = gtk_color_button_new_with_color(cast[ptr gdk.Color00](color.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initColorButtonWithColor*[T](result: var T; color: gdk.Color) = + assert(result is ColorButton) + new(result, finalizeGObject) + result.impl = gtk_color_button_new_with_color(cast[ptr gdk.Color00](color.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_color_button_new_with_rgba*(rgba: ptr gdk.RGBA00): ptr ColorButton00 {. + importc: "gtk_color_button_new_with_rgba", libprag.} + +proc newColorButtonWithRgba*(rgba: gdk.RGBA): ColorButton = + new(result, finalizeGObject) + result.impl = gtk_color_button_new_with_rgba(cast[ptr gdk.RGBA00](rgba.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initColorButtonWithRgba*[T](result: var T; rgba: gdk.RGBA) = + assert(result is ColorButton) + new(result, finalizeGObject) + result.impl = gtk_color_button_new_with_rgba(cast[ptr gdk.RGBA00](rgba.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_color_button_get_alpha*(self: ptr ColorButton00): uint16 {. + importc: "gtk_color_button_get_alpha", libprag.} + +proc getAlpha*(self: ColorButton): uint16 = + gtk_color_button_get_alpha(cast[ptr ColorButton00](self.impl)) + +proc alpha*(self: ColorButton): uint16 = + gtk_color_button_get_alpha(cast[ptr ColorButton00](self.impl)) + +proc gtk_color_button_get_color*(self: ptr ColorButton00; color: var gdk.Color00) {. + importc: "gtk_color_button_get_color", libprag.} + +proc getColor*(self: ptr ColorButton00; color: var gdk.Color00) {. + importc: "gtk_color_button_get_color", libprag.} + +proc color*(self: ptr ColorButton00; color: var gdk.Color00) {. + importc: "gtk_color_button_get_color", libprag.} + +proc gtk_color_button_get_title*(self: ptr ColorButton00): cstring {. + importc: "gtk_color_button_get_title", libprag.} + +proc getTitle*(self: ColorButton): string = + let resul0 = gtk_color_button_get_title(cast[ptr ColorButton00](self.impl)) + result = $resul0 + +proc title*(self: ColorButton): string = + let resul0 = gtk_color_button_get_title(cast[ptr ColorButton00](self.impl)) + result = $resul0 + +proc gtk_color_button_get_use_alpha*(self: ptr ColorButton00): gboolean {. + importc: "gtk_color_button_get_use_alpha", libprag.} + +proc getUseAlpha*(self: ColorButton): bool = + toBool(gtk_color_button_get_use_alpha(cast[ptr ColorButton00](self.impl))) + +proc useAlpha*(self: ColorButton): bool = + toBool(gtk_color_button_get_use_alpha(cast[ptr ColorButton00](self.impl))) + +proc gtk_color_button_set_alpha*(self: ptr ColorButton00; alpha: uint16) {. + importc: "gtk_color_button_set_alpha", libprag.} + +proc setAlpha*(self: ColorButton; alpha: uint16) = + gtk_color_button_set_alpha(cast[ptr ColorButton00](self.impl), alpha) + +proc `alpha=`*(self: ColorButton; alpha: uint16) = + gtk_color_button_set_alpha(cast[ptr ColorButton00](self.impl), alpha) + +proc gtk_color_button_set_color*(self: ptr ColorButton00; color: ptr gdk.Color00) {. + importc: "gtk_color_button_set_color", libprag.} + +proc setColor*(self: ColorButton; color: gdk.Color) = + gtk_color_button_set_color(cast[ptr ColorButton00](self.impl), cast[ptr gdk.Color00](color.impl)) + +proc `color=`*(self: ColorButton; color: gdk.Color) = + gtk_color_button_set_color(cast[ptr ColorButton00](self.impl), cast[ptr gdk.Color00](color.impl)) + +proc gtk_color_button_set_title*(self: ptr ColorButton00; title: cstring) {. + importc: "gtk_color_button_set_title", libprag.} + +proc setTitle*(self: ColorButton; title: string) = + gtk_color_button_set_title(cast[ptr ColorButton00](self.impl), cstring(title)) + +proc `title=`*(self: ColorButton; title: string) = + gtk_color_button_set_title(cast[ptr ColorButton00](self.impl), cstring(title)) + +proc gtk_color_button_set_use_alpha*(self: ptr ColorButton00; useAlpha: gboolean) {. + importc: "gtk_color_button_set_use_alpha", libprag.} + +proc setUseAlpha*(self: ColorButton; useAlpha: bool) = + gtk_color_button_set_use_alpha(cast[ptr ColorButton00](self.impl), gboolean(useAlpha)) + +proc `useAlpha=`*(self: ColorButton; useAlpha: bool) = + gtk_color_button_set_use_alpha(cast[ptr ColorButton00](self.impl), gboolean(useAlpha)) + +type + ColorButtonClass00* {.pure.} = object + parentClass*: ButtonClass00 + colorSet*: proc(cp: ptr ColorButton00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ColorButtonClass* = ref object + impl*: ptr ColorButtonClass00 + +type + ColorChooser00* {.pure.} = object + ColorChooser* = ref object + impl*: ptr ColorChooser00 + +proc gtk_color_chooser_add_palette*(self: ptr ColorChooser00; orientation: Orientation; + colorsPerLine: int32; nColors: int32; colors: gdk.RGBA00Array) {. + importc: "gtk_color_chooser_add_palette", libprag.} + +proc addPalette*(self: ColorChooser; orientation: Orientation; colorsPerLine: int; + nColors: int; colors: gdk.RGBA00Array) = + gtk_color_chooser_add_palette(cast[ptr ColorChooser00](self.impl), orientation, int32(colorsPerLine), int32(nColors), colors) + +proc gtk_color_chooser_get_rgba*(self: ptr ColorChooser00; color: var gdk.RGBA00) {. + importc: "gtk_color_chooser_get_rgba", libprag.} + +proc getRgba*(self: ptr ColorChooser00; color: var gdk.RGBA00) {. + importc: "gtk_color_chooser_get_rgba", libprag.} + +proc rgba*(self: ptr ColorChooser00; color: var gdk.RGBA00) {. + importc: "gtk_color_chooser_get_rgba", libprag.} + +proc gtk_color_chooser_get_use_alpha*(self: ptr ColorChooser00): gboolean {. + importc: "gtk_color_chooser_get_use_alpha", libprag.} + +proc getUseAlpha*(self: ColorChooser): bool = + toBool(gtk_color_chooser_get_use_alpha(cast[ptr ColorChooser00](self.impl))) + +proc useAlpha*(self: ColorChooser): bool = + toBool(gtk_color_chooser_get_use_alpha(cast[ptr ColorChooser00](self.impl))) + +proc gtk_color_chooser_set_rgba*(self: ptr ColorChooser00; color: ptr gdk.RGBA00) {. + importc: "gtk_color_chooser_set_rgba", libprag.} + +proc setRgba*(self: ColorChooser; color: gdk.RGBA) = + gtk_color_chooser_set_rgba(cast[ptr ColorChooser00](self.impl), cast[ptr gdk.RGBA00](color.impl)) + +proc `rgba=`*(self: ColorChooser; color: gdk.RGBA) = + gtk_color_chooser_set_rgba(cast[ptr ColorChooser00](self.impl), cast[ptr gdk.RGBA00](color.impl)) + +proc gtk_color_chooser_set_use_alpha*(self: ptr ColorChooser00; useAlpha: gboolean) {. + importc: "gtk_color_chooser_set_use_alpha", libprag.} + +proc setUseAlpha*(self: ColorChooser; useAlpha: bool) = + gtk_color_chooser_set_use_alpha(cast[ptr ColorChooser00](self.impl), gboolean(useAlpha)) + +proc `useAlpha=`*(self: ColorChooser; useAlpha: bool) = + gtk_color_chooser_set_use_alpha(cast[ptr ColorChooser00](self.impl), gboolean(useAlpha)) + +type + ColorChooserDialogPrivate00* {.pure.} = object + ColorChooserDialogPrivate* = ref object + impl*: ptr ColorChooserDialogPrivate00 + +type + ColorChooserDialog* = ref object of Dialog + ColorChooserDialog00* = object of Dialog00 + priv6: ptr ColorChooserDialogPrivate00 + +proc gtk_color_chooser_dialog_new*(title: cstring; parent: ptr Window00): ptr ColorChooserDialog00 {. + importc: "gtk_color_chooser_dialog_new", libprag.} + +proc newColorChooserDialog*(title: string; parent: Window): ColorChooserDialog = + new(result, finalizeGObject) + result.impl = gtk_color_chooser_dialog_new(cstring(title), cast[ptr Window00](parent.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initColorChooserDialog*[T](result: var T; title: string; parent: Window) = + assert(result is ColorChooserDialog) + new(result, finalizeGObject) + result.impl = gtk_color_chooser_dialog_new(cstring(title), cast[ptr Window00](parent.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ColorChooserDialogClass00* {.pure.} = object + parentClass*: DialogClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ColorChooserDialogClass* = ref object + impl*: ptr ColorChooserDialogClass00 + +type + ColorChooserInterface00* {.pure.} = object + baseInterface*: gobject.TypeInterface00 + getRgba*: proc(chooser: ptr ColorChooser00; color: var gdk.RGBA00) {.cdecl.} + setRgba*: proc(chooser: ptr ColorChooser00; color: ptr gdk.RGBA00) {.cdecl.} + addPalette*: proc(chooser: ptr ColorChooser00; orientation: Orientation; + colorsPerLine: int32; nColors: int32; colors: gdk.RGBA00Array) {.cdecl.} + colorActivated*: proc(chooser: ptr ColorChooser00; color: ptr gdk.RGBA00) {.cdecl.} + padding*: array[12, pointer] + ColorChooserInterface* = ref object + impl*: ptr ColorChooserInterface00 + +type + ColorChooserWidgetPrivate00* {.pure.} = object + ColorChooserWidgetPrivate* = ref object + impl*: ptr ColorChooserWidgetPrivate00 + +type + ColorChooserWidget* = ref object of Box + ColorChooserWidget00* = object of Box00 + priv4: ptr ColorChooserWidgetPrivate00 + +proc gtk_color_chooser_widget_new*(): ptr ColorChooserWidget00 {. + importc: "gtk_color_chooser_widget_new", libprag.} + +proc newColorChooserWidget*(): ColorChooserWidget = + new(result, finalizeGObject) + result.impl = gtk_color_chooser_widget_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initColorChooserWidget*[T](result: var T) = + assert(result is ColorChooserWidget) + new(result, finalizeGObject) + result.impl = gtk_color_chooser_widget_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ColorChooserWidgetClass00* {.pure.} = object + parentClass*: BoxClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + ColorChooserWidgetClass* = ref object + impl*: ptr ColorChooserWidgetClass00 + +type + ColorSelectionPrivate00* {.pure.} = object + ColorSelectionPrivate* = ref object + impl*: ptr ColorSelectionPrivate00 + +type + ColorSelection* = ref object of Box + ColorSelection00* = object of Box00 + privateData4: ptr ColorSelectionPrivate00 + +proc scColorChanged*(self: ColorSelection; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "color-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_color_selection_new*(): ptr ColorSelection00 {. + importc: "gtk_color_selection_new", libprag.} + +proc newColorSelection*(): ColorSelection = + new(result, finalizeGObject) + result.impl = gtk_color_selection_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initColorSelection*[T](result: var T) = + assert(result is ColorSelection) + new(result, finalizeGObject) + result.impl = gtk_color_selection_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_color_selection_palette_from_string*(str: cstring; colors: var gdk.Color00Array; nColors: var int32): gboolean {. + importc: "gtk_color_selection_palette_from_string", libprag.} + +proc paletteFromString*(str: cstring; colors: var gdk.Color00Array; nColors: var int32): gboolean {. + importc: "gtk_color_selection_palette_from_string", libprag.} + +proc gtk_color_selection_palette_to_string*(colors: gdk.Color00Array; nColors: int32): cstring {. + importc: "gtk_color_selection_palette_to_string", libprag.} + +proc paletteToString*(colors: gdk.Color00Array; nColors: int): string = + let resul0 = gtk_color_selection_palette_to_string(colors, int32(nColors)) + result = $resul0 + cogfree(resul0) + +proc gtk_color_selection_get_current_alpha*(self: ptr ColorSelection00): uint16 {. + importc: "gtk_color_selection_get_current_alpha", libprag.} + +proc getCurrentAlpha*(self: ColorSelection): uint16 = + gtk_color_selection_get_current_alpha(cast[ptr ColorSelection00](self.impl)) + +proc currentAlpha*(self: ColorSelection): uint16 = + gtk_color_selection_get_current_alpha(cast[ptr ColorSelection00](self.impl)) + +proc gtk_color_selection_get_current_color*(self: ptr ColorSelection00; color: var gdk.Color00) {. + importc: "gtk_color_selection_get_current_color", libprag.} + +proc getCurrentColor*(self: ptr ColorSelection00; color: var gdk.Color00) {. + importc: "gtk_color_selection_get_current_color", libprag.} + +proc currentColor*(self: ptr ColorSelection00; color: var gdk.Color00) {. + importc: "gtk_color_selection_get_current_color", libprag.} + +proc gtk_color_selection_get_current_rgba*(self: ptr ColorSelection00; rgba: var gdk.RGBA00) {. + importc: "gtk_color_selection_get_current_rgba", libprag.} + +proc getCurrentRgba*(self: ptr ColorSelection00; rgba: var gdk.RGBA00) {. + importc: "gtk_color_selection_get_current_rgba", libprag.} + +proc currentRgba*(self: ptr ColorSelection00; rgba: var gdk.RGBA00) {. + importc: "gtk_color_selection_get_current_rgba", libprag.} + +proc gtk_color_selection_get_has_opacity_control*(self: ptr ColorSelection00): gboolean {. + importc: "gtk_color_selection_get_has_opacity_control", libprag.} + +proc getHasOpacityControl*(self: ColorSelection): bool = + toBool(gtk_color_selection_get_has_opacity_control(cast[ptr ColorSelection00](self.impl))) + +proc hasOpacityControl*(self: ColorSelection): bool = + toBool(gtk_color_selection_get_has_opacity_control(cast[ptr ColorSelection00](self.impl))) + +proc gtk_color_selection_get_has_palette*(self: ptr ColorSelection00): gboolean {. + importc: "gtk_color_selection_get_has_palette", libprag.} + +proc getHasPalette*(self: ColorSelection): bool = + toBool(gtk_color_selection_get_has_palette(cast[ptr ColorSelection00](self.impl))) + +proc hasPalette*(self: ColorSelection): bool = + toBool(gtk_color_selection_get_has_palette(cast[ptr ColorSelection00](self.impl))) + +proc gtk_color_selection_get_previous_alpha*(self: ptr ColorSelection00): uint16 {. + importc: "gtk_color_selection_get_previous_alpha", libprag.} + +proc getPreviousAlpha*(self: ColorSelection): uint16 = + gtk_color_selection_get_previous_alpha(cast[ptr ColorSelection00](self.impl)) + +proc previousAlpha*(self: ColorSelection): uint16 = + gtk_color_selection_get_previous_alpha(cast[ptr ColorSelection00](self.impl)) + +proc gtk_color_selection_get_previous_color*(self: ptr ColorSelection00; color: var gdk.Color00) {. + importc: "gtk_color_selection_get_previous_color", libprag.} + +proc getPreviousColor*(self: ptr ColorSelection00; color: var gdk.Color00) {. + importc: "gtk_color_selection_get_previous_color", libprag.} + +proc previousColor*(self: ptr ColorSelection00; color: var gdk.Color00) {. + importc: "gtk_color_selection_get_previous_color", libprag.} + +proc gtk_color_selection_get_previous_rgba*(self: ptr ColorSelection00; rgba: var gdk.RGBA00) {. + importc: "gtk_color_selection_get_previous_rgba", libprag.} + +proc getPreviousRgba*(self: ptr ColorSelection00; rgba: var gdk.RGBA00) {. + importc: "gtk_color_selection_get_previous_rgba", libprag.} + +proc previousRgba*(self: ptr ColorSelection00; rgba: var gdk.RGBA00) {. + importc: "gtk_color_selection_get_previous_rgba", libprag.} + +proc gtk_color_selection_is_adjusting*(self: ptr ColorSelection00): gboolean {. + importc: "gtk_color_selection_is_adjusting", libprag.} + +proc isAdjusting*(self: ColorSelection): bool = + toBool(gtk_color_selection_is_adjusting(cast[ptr ColorSelection00](self.impl))) + +proc gtk_color_selection_set_current_alpha*(self: ptr ColorSelection00; alpha: uint16) {. + importc: "gtk_color_selection_set_current_alpha", libprag.} + +proc setCurrentAlpha*(self: ColorSelection; alpha: uint16) = + gtk_color_selection_set_current_alpha(cast[ptr ColorSelection00](self.impl), alpha) + +proc `currentAlpha=`*(self: ColorSelection; alpha: uint16) = + gtk_color_selection_set_current_alpha(cast[ptr ColorSelection00](self.impl), alpha) + +proc gtk_color_selection_set_current_color*(self: ptr ColorSelection00; color: ptr gdk.Color00) {. + importc: "gtk_color_selection_set_current_color", libprag.} + +proc setCurrentColor*(self: ColorSelection; color: gdk.Color) = + gtk_color_selection_set_current_color(cast[ptr ColorSelection00](self.impl), cast[ptr gdk.Color00](color.impl)) + +proc `currentColor=`*(self: ColorSelection; color: gdk.Color) = + gtk_color_selection_set_current_color(cast[ptr ColorSelection00](self.impl), cast[ptr gdk.Color00](color.impl)) + +proc gtk_color_selection_set_current_rgba*(self: ptr ColorSelection00; rgba: ptr gdk.RGBA00) {. + importc: "gtk_color_selection_set_current_rgba", libprag.} + +proc setCurrentRgba*(self: ColorSelection; rgba: gdk.RGBA) = + gtk_color_selection_set_current_rgba(cast[ptr ColorSelection00](self.impl), cast[ptr gdk.RGBA00](rgba.impl)) + +proc `currentRgba=`*(self: ColorSelection; rgba: gdk.RGBA) = + gtk_color_selection_set_current_rgba(cast[ptr ColorSelection00](self.impl), cast[ptr gdk.RGBA00](rgba.impl)) + +proc gtk_color_selection_set_has_opacity_control*(self: ptr ColorSelection00; hasOpacity: gboolean) {. + importc: "gtk_color_selection_set_has_opacity_control", libprag.} + +proc setHasOpacityControl*(self: ColorSelection; hasOpacity: bool) = + gtk_color_selection_set_has_opacity_control(cast[ptr ColorSelection00](self.impl), gboolean(hasOpacity)) + +proc `hasOpacityControl=`*(self: ColorSelection; hasOpacity: bool) = + gtk_color_selection_set_has_opacity_control(cast[ptr ColorSelection00](self.impl), gboolean(hasOpacity)) + +proc gtk_color_selection_set_has_palette*(self: ptr ColorSelection00; hasPalette: gboolean) {. + importc: "gtk_color_selection_set_has_palette", libprag.} + +proc setHasPalette*(self: ColorSelection; hasPalette: bool) = + gtk_color_selection_set_has_palette(cast[ptr ColorSelection00](self.impl), gboolean(hasPalette)) + +proc `hasPalette=`*(self: ColorSelection; hasPalette: bool) = + gtk_color_selection_set_has_palette(cast[ptr ColorSelection00](self.impl), gboolean(hasPalette)) + +proc gtk_color_selection_set_previous_alpha*(self: ptr ColorSelection00; alpha: uint16) {. + importc: "gtk_color_selection_set_previous_alpha", libprag.} + +proc setPreviousAlpha*(self: ColorSelection; alpha: uint16) = + gtk_color_selection_set_previous_alpha(cast[ptr ColorSelection00](self.impl), alpha) + +proc `previousAlpha=`*(self: ColorSelection; alpha: uint16) = + gtk_color_selection_set_previous_alpha(cast[ptr ColorSelection00](self.impl), alpha) + +proc gtk_color_selection_set_previous_color*(self: ptr ColorSelection00; color: ptr gdk.Color00) {. + importc: "gtk_color_selection_set_previous_color", libprag.} + +proc setPreviousColor*(self: ColorSelection; color: gdk.Color) = + gtk_color_selection_set_previous_color(cast[ptr ColorSelection00](self.impl), cast[ptr gdk.Color00](color.impl)) + +proc `previousColor=`*(self: ColorSelection; color: gdk.Color) = + gtk_color_selection_set_previous_color(cast[ptr ColorSelection00](self.impl), cast[ptr gdk.Color00](color.impl)) + +proc gtk_color_selection_set_previous_rgba*(self: ptr ColorSelection00; rgba: ptr gdk.RGBA00) {. + importc: "gtk_color_selection_set_previous_rgba", libprag.} + +proc setPreviousRgba*(self: ColorSelection; rgba: gdk.RGBA) = + gtk_color_selection_set_previous_rgba(cast[ptr ColorSelection00](self.impl), cast[ptr gdk.RGBA00](rgba.impl)) + +proc `previousRgba=`*(self: ColorSelection; rgba: gdk.RGBA) = + gtk_color_selection_set_previous_rgba(cast[ptr ColorSelection00](self.impl), cast[ptr gdk.RGBA00](rgba.impl)) + +type + ColorSelectionChangePaletteFunc* = proc (colors: gdk.Color00Array; nColors: int32) {.cdecl.} + +type + ColorSelectionChangePaletteWithScreenFunc* = proc (screen: ptr gdk.Screen00; colors: gdk.Color00Array; + nColors: int32) {.cdecl.} + +type + ColorSelectionClass00* {.pure.} = object + parentClass*: BoxClass00 + colorChanged*: proc(colorSelection: ptr ColorSelection00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ColorSelectionClass* = ref object + impl*: ptr ColorSelectionClass00 + +type + ColorSelectionDialogPrivate00* {.pure.} = object + ColorSelectionDialogPrivate* = ref object + impl*: ptr ColorSelectionDialogPrivate00 + +type + ColorSelectionDialog* = ref object of Dialog + ColorSelectionDialog00* = object of Dialog00 + priv6: ptr ColorSelectionDialogPrivate00 + +proc gtk_color_selection_dialog_new*(title: cstring): ptr ColorSelectionDialog00 {. + importc: "gtk_color_selection_dialog_new", libprag.} + +proc newColorSelectionDialog*(title: string): ColorSelectionDialog = + new(result, finalizeGObject) + result.impl = gtk_color_selection_dialog_new(cstring(title)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initColorSelectionDialog*[T](result: var T; title: string) = + assert(result is ColorSelectionDialog) + new(result, finalizeGObject) + result.impl = gtk_color_selection_dialog_new(cstring(title)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_color_selection_dialog_get_color_selection*(self: ptr ColorSelectionDialog00): ptr Widget00 {. + importc: "gtk_color_selection_dialog_get_color_selection", libprag.} + +proc getColorSelection*(self: ColorSelectionDialog): Widget = + let gobj = gtk_color_selection_dialog_get_color_selection(cast[ptr ColorSelectionDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc colorSelection*(self: ColorSelectionDialog): Widget = + let gobj = gtk_color_selection_dialog_get_color_selection(cast[ptr ColorSelectionDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ColorSelectionDialogClass00* {.pure.} = object + parentClass*: DialogClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ColorSelectionDialogClass* = ref object + impl*: ptr ColorSelectionDialogClass00 + +type + ComboBoxAccessiblePrivate00* {.pure.} = object + ComboBoxAccessiblePrivate* = ref object + impl*: ptr ComboBoxAccessiblePrivate00 + +type + ComboBoxAccessible* = ref object of ContainerAccessible + ComboBoxAccessible00* = object of ContainerAccessible00 + priv4: ptr ComboBoxAccessiblePrivate00 + +type + ComboBoxAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + ComboBoxAccessibleClass* = ref object + impl*: ptr ComboBoxAccessibleClass00 + +type + ComboBoxTextPrivate00* {.pure.} = object + ComboBoxTextPrivate* = ref object + impl*: ptr ComboBoxTextPrivate00 + +type + ComboBoxText* = ref object of ComboBox + ComboBoxText00* = object of ComboBox00 + priv5: ptr ComboBoxTextPrivate00 + +proc gtk_combo_box_text_new*(): ptr ComboBoxText00 {. + importc: "gtk_combo_box_text_new", libprag.} + +proc newComboBoxText*(): ComboBoxText = + new(result, finalizeGObject) + result.impl = gtk_combo_box_text_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initComboBoxText*[T](result: var T) = + assert(result is ComboBoxText) + new(result, finalizeGObject) + result.impl = gtk_combo_box_text_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_combo_box_text_new_with_entry*(): ptr ComboBoxText00 {. + importc: "gtk_combo_box_text_new_with_entry", libprag.} + +proc newComboBoxTextWithEntry*(): ComboBoxText = + new(result, finalizeGObject) + result.impl = gtk_combo_box_text_new_with_entry() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initComboBoxTextWithEntry*[T](result: var T) = + assert(result is ComboBoxText) + new(result, finalizeGObject) + result.impl = gtk_combo_box_text_new_with_entry() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_combo_box_text_append*(self: ptr ComboBoxText00; id: cstring; text: cstring) {. + importc: "gtk_combo_box_text_append", libprag.} + +proc append*(self: ComboBoxText; id: string; text: string) = + gtk_combo_box_text_append(cast[ptr ComboBoxText00](self.impl), cstring(id), cstring(text)) + +proc gtk_combo_box_text_append_text*(self: ptr ComboBoxText00; text: cstring) {. + importc: "gtk_combo_box_text_append_text", libprag.} + +proc appendText*(self: ComboBoxText; text: string) = + gtk_combo_box_text_append_text(cast[ptr ComboBoxText00](self.impl), cstring(text)) + +proc gtk_combo_box_text_get_active_text*(self: ptr ComboBoxText00): cstring {. + importc: "gtk_combo_box_text_get_active_text", libprag.} + +proc getActiveText*(self: ComboBoxText): string = + let resul0 = gtk_combo_box_text_get_active_text(cast[ptr ComboBoxText00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc activeText*(self: ComboBoxText): string = + let resul0 = gtk_combo_box_text_get_active_text(cast[ptr ComboBoxText00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_combo_box_text_insert*(self: ptr ComboBoxText00; position: int32; id: cstring; + text: cstring) {. + importc: "gtk_combo_box_text_insert", libprag.} + +proc insert*(self: ComboBoxText; position: int; id: string; text: string) = + gtk_combo_box_text_insert(cast[ptr ComboBoxText00](self.impl), int32(position), cstring(id), cstring(text)) + +proc gtk_combo_box_text_insert_text*(self: ptr ComboBoxText00; position: int32; text: cstring) {. + importc: "gtk_combo_box_text_insert_text", libprag.} + +proc insertText*(self: ComboBoxText; position: int; text: string) = + gtk_combo_box_text_insert_text(cast[ptr ComboBoxText00](self.impl), int32(position), cstring(text)) + +proc gtk_combo_box_text_prepend*(self: ptr ComboBoxText00; id: cstring; text: cstring) {. + importc: "gtk_combo_box_text_prepend", libprag.} + +proc prepend*(self: ComboBoxText; id: string; text: string) = + gtk_combo_box_text_prepend(cast[ptr ComboBoxText00](self.impl), cstring(id), cstring(text)) + +proc gtk_combo_box_text_prepend_text*(self: ptr ComboBoxText00; text: cstring) {. + importc: "gtk_combo_box_text_prepend_text", libprag.} + +proc prependText*(self: ComboBoxText; text: string) = + gtk_combo_box_text_prepend_text(cast[ptr ComboBoxText00](self.impl), cstring(text)) + +proc gtk_combo_box_text_remove*(self: ptr ComboBoxText00; position: int32) {. + importc: "gtk_combo_box_text_remove", libprag.} + +proc remove*(self: ComboBoxText; position: int) = + gtk_combo_box_text_remove(cast[ptr ComboBoxText00](self.impl), int32(position)) + +proc gtk_combo_box_text_remove_all*(self: ptr ComboBoxText00) {. + importc: "gtk_combo_box_text_remove_all", libprag.} + +proc removeAll*(self: ComboBoxText) = + gtk_combo_box_text_remove_all(cast[ptr ComboBoxText00](self.impl)) + +type + ComboBoxTextClass00* {.pure.} = object + parentClass*: ComboBoxClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ComboBoxTextClass* = ref object + impl*: ptr ComboBoxTextClass00 + +type + ContainerCellAccessiblePrivate00* {.pure.} = object + ContainerCellAccessiblePrivate* = ref object + impl*: ptr ContainerCellAccessiblePrivate00 + +type + ContainerCellAccessible* = ref object of CellAccessible + ContainerCellAccessible00* = object of CellAccessible00 + priv3: ptr ContainerCellAccessiblePrivate00 + +proc gtk_container_cell_accessible_new*(): ptr ContainerCellAccessible00 {. + importc: "gtk_container_cell_accessible_new", libprag.} + +proc newContainerCellAccessible*(): ContainerCellAccessible = + new(result, finalizeGObject) + result.impl = gtk_container_cell_accessible_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initContainerCellAccessible*[T](result: var T) = + assert(result is ContainerCellAccessible) + new(result, finalizeGObject) + result.impl = gtk_container_cell_accessible_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_container_cell_accessible_add_child*(self: ptr ContainerCellAccessible00; child: ptr CellAccessible00) {. + importc: "gtk_container_cell_accessible_add_child", libprag.} + +proc addChild*(self: ContainerCellAccessible; child: CellAccessible) = + gtk_container_cell_accessible_add_child(cast[ptr ContainerCellAccessible00](self.impl), cast[ptr CellAccessible00](child.impl)) + +proc gtk_container_cell_accessible_get_children*(self: ptr ContainerCellAccessible00): ptr pointer {. + importc: "gtk_container_cell_accessible_get_children", libprag.} + +proc getChildren*(self: ContainerCellAccessible): ptr pointer = + gtk_container_cell_accessible_get_children(cast[ptr ContainerCellAccessible00](self.impl)) + +proc children*(self: ContainerCellAccessible): ptr pointer = + gtk_container_cell_accessible_get_children(cast[ptr ContainerCellAccessible00](self.impl)) + +proc gtk_container_cell_accessible_remove_child*(self: ptr ContainerCellAccessible00; child: ptr CellAccessible00) {. + importc: "gtk_container_cell_accessible_remove_child", libprag.} + +proc removeChild*(self: ContainerCellAccessible; child: CellAccessible) = + gtk_container_cell_accessible_remove_child(cast[ptr ContainerCellAccessible00](self.impl), cast[ptr CellAccessible00](child.impl)) + +type + ContainerCellAccessibleClass00* {.pure.} = object + parentClass*: CellAccessibleClass00 + ContainerCellAccessibleClass* = ref object + impl*: ptr ContainerCellAccessibleClass00 + +type + CornerType* {.size: sizeof(cint), pure.} = enum + topLeft = 0 + bottomLeft = 1 + topRight = 2 + bottomRight = 3 + +type + CssProviderPrivate00* {.pure.} = object + CssProviderPrivate* = ref object + impl*: ptr CssProviderPrivate00 + +type + CssProvider* = ref object of gobject.Object + CssProvider00* = object of gobject.Object00 + priv1: ptr CssProviderPrivate00 + +proc scParsingError*(self: CssProvider; p: proc (self: ptr gobject.Object00; section: CssSection00; error: ptr Error00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "parsing-error", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_css_provider_new*(): ptr CssProvider00 {. + importc: "gtk_css_provider_new", libprag.} + +proc newCssProvider*(): CssProvider = + new(result, finalizeGObject) + result.impl = gtk_css_provider_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initCssProvider*[T](result: var T) = + assert(result is CssProvider) + new(result, finalizeGObject) + result.impl = gtk_css_provider_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_css_provider_get_default*(): ptr CssProvider00 {. + importc: "gtk_css_provider_get_default", libprag.} + +proc getDefault*(): CssProvider = + let gobj = gtk_css_provider_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CssProvider](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): CssProvider = + let gobj = gtk_css_provider_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CssProvider](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_css_provider_get_named*(name: cstring; variant: cstring): ptr CssProvider00 {. + importc: "gtk_css_provider_get_named", libprag.} + +proc getNamed*(name: string; variant: string): CssProvider = + let gobj = gtk_css_provider_get_named(cstring(name), cstring(variant)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CssProvider](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc named*(name: string; variant: string): CssProvider = + let gobj = gtk_css_provider_get_named(cstring(name), cstring(variant)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[CssProvider](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_css_provider_load_from_data*(self: ptr CssProvider00; data: uint8Array; length: int64): gboolean {. + importc: "gtk_css_provider_load_from_data", libprag.} + +proc loadFromData*(self: CssProvider; data: uint8Array; length: int64): bool = + toBool(gtk_css_provider_load_from_data(cast[ptr CssProvider00](self.impl), data, length)) + +proc gtk_css_provider_load_from_file*(self: ptr CssProvider00; file: ptr gio.File00): gboolean {. + importc: "gtk_css_provider_load_from_file", libprag.} + +proc loadFromFile*(self: CssProvider; file: gio.File): bool = + toBool(gtk_css_provider_load_from_file(cast[ptr CssProvider00](self.impl), cast[ptr gio.File00](file.impl))) + +proc gtk_css_provider_load_from_path*(self: ptr CssProvider00; path: cstring): gboolean {. + importc: "gtk_css_provider_load_from_path", libprag.} + +proc loadFromPath*(self: CssProvider; path: string): bool = + toBool(gtk_css_provider_load_from_path(cast[ptr CssProvider00](self.impl), cstring(path))) + +proc gtk_css_provider_load_from_resource*(self: ptr CssProvider00; resourcePath: cstring) {. + importc: "gtk_css_provider_load_from_resource", libprag.} + +proc loadFromResource*(self: CssProvider; resourcePath: string) = + gtk_css_provider_load_from_resource(cast[ptr CssProvider00](self.impl), cstring(resourcePath)) + +proc gtk_css_provider_to_string*(self: ptr CssProvider00): cstring {. + importc: "gtk_css_provider_to_string", libprag.} + +proc toString*(self: CssProvider): string = + let resul0 = gtk_css_provider_to_string(cast[ptr CssProvider00](self.impl)) + result = $resul0 + cogfree(resul0) + +type + CssProviderClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + parsingError*: proc(provider: ptr CssProvider00; section: ptr CssSection00; + error: ptr Error00) {.cdecl.} + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + CssProviderClass* = ref object + impl*: ptr CssProviderClass00 + +type + CssProviderError* {.size: sizeof(cint), pure.} = enum + failed = 0 + syntax = 1 + `import` = 2 + name = 3 + deprecated = 4 + unknownValue = 5 + +proc gtk_css_provider_error_quark*(): uint32 {. + importc: "gtk_css_provider_error_quark", libprag.} + +type + DebugFlag* {.size: sizeof(cint), pure.} = enum + misc = 1 + plugsocket = 2 + text = 4 + tree = 8 + updates = 16 + keybindings = 32 + multihead = 64 + modules = 128 + geometry = 256 + icontheme = 512 + printing = 1024 + builder = 2048 + sizeRequest = 4096 + noCssCache = 8192 + baselines = 16384 + pixelCache = 32768 + noPixelCache = 65536 + interactive = 131072 + touchscreen = 262144 + actions = 524288 + resize = 1048576 + layout = 2097152 + +type + DeleteType* {.size: sizeof(cint), pure.} = enum + chars = 0 + wordEnds = 1 + words = 2 + displayLines = 3 + displayLineEnds = 4 + paragraphEnds = 5 + paragraphs = 6 + whitespace = 7 + +type + DrawingArea* = ref object of Widget + DrawingArea00* = object of Widget00 + dummy*: pointer + +proc gtk_drawing_area_new*(): ptr DrawingArea00 {. + importc: "gtk_drawing_area_new", libprag.} + +proc newDrawingArea*(): DrawingArea = + new(result, finalizeGObject) + result.impl = gtk_drawing_area_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initDrawingArea*[T](result: var T) = + assert(result is DrawingArea) + new(result, finalizeGObject) + result.impl = gtk_drawing_area_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + DrawingAreaClass00* {.pure.} = object + parentClass*: WidgetClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + DrawingAreaClass* = ref object + impl*: ptr DrawingAreaClass00 + +type + Editable00* {.pure.} = object + Editable* = ref object + impl*: ptr Editable00 + +proc gtk_editable_copy_clipboard*(self: ptr Editable00) {. + importc: "gtk_editable_copy_clipboard", libprag.} + +proc copyClipboard*(self: Editable) = + gtk_editable_copy_clipboard(cast[ptr Editable00](self.impl)) + +proc gtk_editable_cut_clipboard*(self: ptr Editable00) {. + importc: "gtk_editable_cut_clipboard", libprag.} + +proc cutClipboard*(self: Editable) = + gtk_editable_cut_clipboard(cast[ptr Editable00](self.impl)) + +proc gtk_editable_delete_selection*(self: ptr Editable00) {. + importc: "gtk_editable_delete_selection", libprag.} + +proc deleteSelection*(self: Editable) = + gtk_editable_delete_selection(cast[ptr Editable00](self.impl)) + +proc gtk_editable_delete_text*(self: ptr Editable00; startPos: int32; endPos: int32) {. + importc: "gtk_editable_delete_text", libprag.} + +proc deleteText*(self: Editable; startPos: int; endPos: int) = + gtk_editable_delete_text(cast[ptr Editable00](self.impl), int32(startPos), int32(endPos)) + +proc gtk_editable_get_chars*(self: ptr Editable00; startPos: int32; endPos: int32): cstring {. + importc: "gtk_editable_get_chars", libprag.} + +proc getChars*(self: Editable; startPos: int; endPos: int): string = + let resul0 = gtk_editable_get_chars(cast[ptr Editable00](self.impl), int32(startPos), int32(endPos)) + result = $resul0 + cogfree(resul0) + +proc chars*(self: Editable; startPos: int; endPos: int): string = + let resul0 = gtk_editable_get_chars(cast[ptr Editable00](self.impl), int32(startPos), int32(endPos)) + result = $resul0 + cogfree(resul0) + +proc gtk_editable_get_editable*(self: ptr Editable00): gboolean {. + importc: "gtk_editable_get_editable", libprag.} + +proc getEditable*(self: Editable): bool = + toBool(gtk_editable_get_editable(cast[ptr Editable00](self.impl))) + +proc editable*(self: Editable): bool = + toBool(gtk_editable_get_editable(cast[ptr Editable00](self.impl))) + +proc gtk_editable_get_position*(self: ptr Editable00): int32 {. + importc: "gtk_editable_get_position", libprag.} + +proc getPosition*(self: Editable): int = + int(gtk_editable_get_position(cast[ptr Editable00](self.impl))) + +proc position*(self: Editable): int = + int(gtk_editable_get_position(cast[ptr Editable00](self.impl))) + +proc gtk_editable_get_selection_bounds*(self: ptr Editable00; startPos: var int32; endPos: var int32): gboolean {. + importc: "gtk_editable_get_selection_bounds", libprag.} + +proc getSelectionBounds*(self: Editable; startPos: var int; endPos: var int): bool = + var startPos_00 = int32(startPos) + var endPos_00 = int32(endPos) + result = toBool(gtk_editable_get_selection_bounds(cast[ptr Editable00](self.impl), startPos_00, endPos_00)) + startPos = int(startPos_00) + endPos = int(endPos_00) + +proc selectionBounds*(self: Editable; startPos: var int; endPos: var int): bool = + var startPos_00 = int32(startPos) + var endPos_00 = int32(endPos) + result = toBool(gtk_editable_get_selection_bounds(cast[ptr Editable00](self.impl), startPos_00, endPos_00)) + startPos = int(startPos_00) + endPos = int(endPos_00) + +proc gtk_editable_insert_text*(self: ptr Editable00; newText: cstring; newTextLength: int32; + position: int32) {. + importc: "gtk_editable_insert_text", libprag.} + +proc insertText*(self: Editable; newText: string; newTextLength: int; + position: int) = + gtk_editable_insert_text(cast[ptr Editable00](self.impl), cstring(newText), int32(newTextLength), int32(position)) + +proc gtk_editable_paste_clipboard*(self: ptr Editable00) {. + importc: "gtk_editable_paste_clipboard", libprag.} + +proc pasteClipboard*(self: Editable) = + gtk_editable_paste_clipboard(cast[ptr Editable00](self.impl)) + +proc gtk_editable_select_region*(self: ptr Editable00; startPos: int32; endPos: int32) {. + importc: "gtk_editable_select_region", libprag.} + +proc selectRegion*(self: Editable; startPos: int; endPos: int) = + gtk_editable_select_region(cast[ptr Editable00](self.impl), int32(startPos), int32(endPos)) + +proc gtk_editable_set_editable*(self: ptr Editable00; isEditable: gboolean) {. + importc: "gtk_editable_set_editable", libprag.} + +proc setEditable*(self: Editable; isEditable: bool) = + gtk_editable_set_editable(cast[ptr Editable00](self.impl), gboolean(isEditable)) + +proc `editable=`*(self: Editable; isEditable: bool) = + gtk_editable_set_editable(cast[ptr Editable00](self.impl), gboolean(isEditable)) + +proc gtk_editable_set_position*(self: ptr Editable00; position: int32) {. + importc: "gtk_editable_set_position", libprag.} + +proc setPosition*(self: Editable; position: int) = + gtk_editable_set_position(cast[ptr Editable00](self.impl), int32(position)) + +proc `position=`*(self: Editable; position: int) = + gtk_editable_set_position(cast[ptr Editable00](self.impl), int32(position)) + +type + EditableInterface00* {.pure.} = object + baseIface*: gobject.TypeInterface00 + insertText*: proc(editable: ptr Editable00; newText: cstring; newTextLength: int32; + position: int32) {.cdecl.} + deleteText*: proc(editable: ptr Editable00; startPos: int32; endPos: int32) {.cdecl.} + changed*: proc(editable: ptr Editable00) {.cdecl.} + doInsertText*: proc(editable: ptr Editable00; newText: cstring; newTextLength: int32; + position: int32) {.cdecl.} + doDeleteText*: proc(editable: ptr Editable00; startPos: int32; endPos: int32) {.cdecl.} + getChars*: proc(editable: ptr Editable00; startPos: int32; endPos: int32): cstring {.cdecl.} + setSelectionBounds*: proc(editable: ptr Editable00; startPos: int32; endPos: int32) {.cdecl.} + getSelectionBounds*: proc(editable: ptr Editable00; startPos: var int32; endPos: var int32): gboolean {.cdecl.} + setPosition*: proc(editable: ptr Editable00; position: int32) {.cdecl.} + getPosition*: proc(editable: ptr Editable00): int32 {.cdecl.} + EditableInterface* = ref object + impl*: ptr EditableInterface00 + +type + EntryPrivate00* {.pure.} = object + EntryPrivate* = ref object + impl*: ptr EntryPrivate00 + +type + EntryIconPosition* {.size: sizeof(cint), pure.} = enum + primary = 0 + secondary = 1 + +type + Entry* = ref object of Widget + Entry00* = object of Widget00 + priv2: ptr EntryPrivate00 + +proc scActivate*(self: Entry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scBackspace*(self: Entry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "backspace", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCopyClipboard*(self: Entry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "copy-clipboard", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCutClipboard*(self: Entry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cut-clipboard", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeleteFromCursor*(self: Entry; p: proc (self: ptr gobject.Object00; `type`: DeleteType; count: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "delete-from-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scIconPress*(self: Entry; p: proc (self: ptr gobject.Object00; iconPos: EntryIconPosition; event: gdk.EventButton00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "icon-press", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scIconRelease*(self: Entry; p: proc (self: ptr gobject.Object00; iconPos: EntryIconPosition; event: gdk.EventButton00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "icon-release", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInsertAtCursor*(self: Entry; p: proc (self: ptr gobject.Object00; string: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "insert-at-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveCursor*(self: Entry; p: proc (self: ptr gobject.Object00; step: MovementStep; count: int32; extendSelection: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPasteClipboard*(self: Entry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "paste-clipboard", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopulatePopup*(self: Entry; p: proc (self: ptr gobject.Object00; widget: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "populate-popup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPreeditChanged*(self: Entry; p: proc (self: ptr gobject.Object00; preedit: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "preedit-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleOverwrite*(self: Entry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-overwrite", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_entry_new*(): ptr Entry00 {. + importc: "gtk_entry_new", libprag.} + +proc newEntry*(): Entry = + new(result, finalizeGObject) + result.impl = gtk_entry_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initEntry*[T](result: var T) = + assert(result is Entry) + new(result, finalizeGObject) + result.impl = gtk_entry_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_get_activates_default*(self: ptr Entry00): gboolean {. + importc: "gtk_entry_get_activates_default", libprag.} + +proc getActivatesDefault*(self: Entry): bool = + toBool(gtk_entry_get_activates_default(cast[ptr Entry00](self.impl))) + +proc activatesDefault*(self: Entry): bool = + toBool(gtk_entry_get_activates_default(cast[ptr Entry00](self.impl))) + +proc gtk_entry_get_alignment*(self: ptr Entry00): cfloat {. + importc: "gtk_entry_get_alignment", libprag.} + +proc getAlignment*(self: Entry): cfloat = + gtk_entry_get_alignment(cast[ptr Entry00](self.impl)) + +proc alignment*(self: Entry): cfloat = + gtk_entry_get_alignment(cast[ptr Entry00](self.impl)) + +proc gtk_entry_get_attributes*(self: ptr Entry00): ptr pango.AttrList00 {. + importc: "gtk_entry_get_attributes", libprag.} + +proc getAttributes*(self: Entry): pango.AttrList = + new(result) + result.impl = gtk_entry_get_attributes(cast[ptr Entry00](self.impl)) + +proc attributes*(self: Entry): pango.AttrList = + new(result) + result.impl = gtk_entry_get_attributes(cast[ptr Entry00](self.impl)) + +proc gtk_entry_get_current_icon_drag_source*(self: ptr Entry00): int32 {. + importc: "gtk_entry_get_current_icon_drag_source", libprag.} + +proc getCurrentIconDragSource*(self: Entry): int = + int(gtk_entry_get_current_icon_drag_source(cast[ptr Entry00](self.impl))) + +proc currentIconDragSource*(self: Entry): int = + int(gtk_entry_get_current_icon_drag_source(cast[ptr Entry00](self.impl))) + +proc gtk_entry_get_cursor_hadjustment*(self: ptr Entry00): ptr Adjustment00 {. + importc: "gtk_entry_get_cursor_hadjustment", libprag.} + +proc getCursorHadjustment*(self: Entry): Adjustment = + let gobj = gtk_entry_get_cursor_hadjustment(cast[ptr Entry00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc cursorHadjustment*(self: Entry): Adjustment = + let gobj = gtk_entry_get_cursor_hadjustment(cast[ptr Entry00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_get_has_frame*(self: ptr Entry00): gboolean {. + importc: "gtk_entry_get_has_frame", libprag.} + +proc getHasFrame*(self: Entry): bool = + toBool(gtk_entry_get_has_frame(cast[ptr Entry00](self.impl))) + +proc hasFrame*(self: Entry): bool = + toBool(gtk_entry_get_has_frame(cast[ptr Entry00](self.impl))) + +proc gtk_entry_get_icon_activatable*(self: ptr Entry00; iconPos: EntryIconPosition): gboolean {. + importc: "gtk_entry_get_icon_activatable", libprag.} + +proc getIconActivatable*(self: Entry; iconPos: EntryIconPosition): bool = + toBool(gtk_entry_get_icon_activatable(cast[ptr Entry00](self.impl), iconPos)) + +proc iconActivatable*(self: Entry; iconPos: EntryIconPosition): bool = + toBool(gtk_entry_get_icon_activatable(cast[ptr Entry00](self.impl), iconPos)) + +proc gtk_entry_get_icon_area*(self: ptr Entry00; iconPos: EntryIconPosition; iconArea: var gdk.Rectangle00) {. + importc: "gtk_entry_get_icon_area", libprag.} + +proc getIconArea*(self: ptr Entry00; iconPos: EntryIconPosition; iconArea: var gdk.Rectangle00) {. + importc: "gtk_entry_get_icon_area", libprag.} + +proc iconArea*(self: ptr Entry00; iconPos: EntryIconPosition; iconArea: var gdk.Rectangle00) {. + importc: "gtk_entry_get_icon_area", libprag.} + +proc gtk_entry_get_icon_at_pos*(self: ptr Entry00; x: int32; y: int32): int32 {. + importc: "gtk_entry_get_icon_at_pos", libprag.} + +proc getIconAtPos*(self: Entry; x: int; y: int): int = + int(gtk_entry_get_icon_at_pos(cast[ptr Entry00](self.impl), int32(x), int32(y))) + +proc iconAtPos*(self: Entry; x: int; y: int): int = + int(gtk_entry_get_icon_at_pos(cast[ptr Entry00](self.impl), int32(x), int32(y))) + +proc gtk_entry_get_icon_gicon*(self: ptr Entry00; iconPos: EntryIconPosition): ptr gio.Icon00 {. + importc: "gtk_entry_get_icon_gicon", libprag.} + +proc getIconGicon*(self: Entry; iconPos: EntryIconPosition): gio.Icon = + new(result) + result.impl = gtk_entry_get_icon_gicon(cast[ptr Entry00](self.impl), iconPos) + +proc iconGicon*(self: Entry; iconPos: EntryIconPosition): gio.Icon = + new(result) + result.impl = gtk_entry_get_icon_gicon(cast[ptr Entry00](self.impl), iconPos) + +proc gtk_entry_get_icon_name*(self: ptr Entry00; iconPos: EntryIconPosition): cstring {. + importc: "gtk_entry_get_icon_name", libprag.} + +proc getIconName*(self: Entry; iconPos: EntryIconPosition): string = + let resul0 = gtk_entry_get_icon_name(cast[ptr Entry00](self.impl), iconPos) + result = $resul0 + +proc iconName*(self: Entry; iconPos: EntryIconPosition): string = + let resul0 = gtk_entry_get_icon_name(cast[ptr Entry00](self.impl), iconPos) + result = $resul0 + +proc gtk_entry_get_icon_pixbuf*(self: ptr Entry00; iconPos: EntryIconPosition): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_entry_get_icon_pixbuf", libprag.} + +proc getIconPixbuf*(self: Entry; iconPos: EntryIconPosition): gdkpixbuf.Pixbuf = + let gobj = gtk_entry_get_icon_pixbuf(cast[ptr Entry00](self.impl), iconPos) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc iconPixbuf*(self: Entry; iconPos: EntryIconPosition): gdkpixbuf.Pixbuf = + let gobj = gtk_entry_get_icon_pixbuf(cast[ptr Entry00](self.impl), iconPos) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_get_icon_sensitive*(self: ptr Entry00; iconPos: EntryIconPosition): gboolean {. + importc: "gtk_entry_get_icon_sensitive", libprag.} + +proc getIconSensitive*(self: Entry; iconPos: EntryIconPosition): bool = + toBool(gtk_entry_get_icon_sensitive(cast[ptr Entry00](self.impl), iconPos)) + +proc iconSensitive*(self: Entry; iconPos: EntryIconPosition): bool = + toBool(gtk_entry_get_icon_sensitive(cast[ptr Entry00](self.impl), iconPos)) + +proc gtk_entry_get_icon_stock*(self: ptr Entry00; iconPos: EntryIconPosition): cstring {. + importc: "gtk_entry_get_icon_stock", libprag.} + +proc getIconStock*(self: Entry; iconPos: EntryIconPosition): string = + let resul0 = gtk_entry_get_icon_stock(cast[ptr Entry00](self.impl), iconPos) + result = $resul0 + +proc iconStock*(self: Entry; iconPos: EntryIconPosition): string = + let resul0 = gtk_entry_get_icon_stock(cast[ptr Entry00](self.impl), iconPos) + result = $resul0 + +proc gtk_entry_get_icon_tooltip_markup*(self: ptr Entry00; iconPos: EntryIconPosition): cstring {. + importc: "gtk_entry_get_icon_tooltip_markup", libprag.} + +proc getIconTooltipMarkup*(self: Entry; iconPos: EntryIconPosition): string = + let resul0 = gtk_entry_get_icon_tooltip_markup(cast[ptr Entry00](self.impl), iconPos) + result = $resul0 + cogfree(resul0) + +proc iconTooltipMarkup*(self: Entry; iconPos: EntryIconPosition): string = + let resul0 = gtk_entry_get_icon_tooltip_markup(cast[ptr Entry00](self.impl), iconPos) + result = $resul0 + cogfree(resul0) + +proc gtk_entry_get_icon_tooltip_text*(self: ptr Entry00; iconPos: EntryIconPosition): cstring {. + importc: "gtk_entry_get_icon_tooltip_text", libprag.} + +proc getIconTooltipText*(self: Entry; iconPos: EntryIconPosition): string = + let resul0 = gtk_entry_get_icon_tooltip_text(cast[ptr Entry00](self.impl), iconPos) + result = $resul0 + cogfree(resul0) + +proc iconTooltipText*(self: Entry; iconPos: EntryIconPosition): string = + let resul0 = gtk_entry_get_icon_tooltip_text(cast[ptr Entry00](self.impl), iconPos) + result = $resul0 + cogfree(resul0) + +proc gtk_entry_get_inner_border*(self: ptr Entry00): ptr Border00 {. + importc: "gtk_entry_get_inner_border", libprag.} + +proc getInnerBorder*(self: Entry): Border = + new(result) + result.impl = gtk_entry_get_inner_border(cast[ptr Entry00](self.impl)) + +proc innerBorder*(self: Entry): Border = + new(result) + result.impl = gtk_entry_get_inner_border(cast[ptr Entry00](self.impl)) + +proc gtk_entry_get_invisible_char*(self: ptr Entry00): gunichar {. + importc: "gtk_entry_get_invisible_char", libprag.} + +proc getInvisibleChar*(self: Entry): gunichar = + gtk_entry_get_invisible_char(cast[ptr Entry00](self.impl)) + +proc invisibleChar*(self: Entry): gunichar = + gtk_entry_get_invisible_char(cast[ptr Entry00](self.impl)) + +proc gtk_entry_get_layout*(self: ptr Entry00): ptr pango.Layout00 {. + importc: "gtk_entry_get_layout", libprag.} + +proc getLayout*(self: Entry): pango.Layout = + let gobj = gtk_entry_get_layout(cast[ptr Entry00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc layout*(self: Entry): pango.Layout = + let gobj = gtk_entry_get_layout(cast[ptr Entry00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_get_layout_offsets*(self: ptr Entry00; x: var int32; y: var int32) {. + importc: "gtk_entry_get_layout_offsets", libprag.} + +proc getLayoutOffsets*(self: Entry; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gtk_entry_get_layout_offsets(cast[ptr Entry00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc layoutOffsets*(self: Entry; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gtk_entry_get_layout_offsets(cast[ptr Entry00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc gtk_entry_get_max_length*(self: ptr Entry00): int32 {. + importc: "gtk_entry_get_max_length", libprag.} + +proc getMaxLength*(self: Entry): int = + int(gtk_entry_get_max_length(cast[ptr Entry00](self.impl))) + +proc maxLength*(self: Entry): int = + int(gtk_entry_get_max_length(cast[ptr Entry00](self.impl))) + +proc gtk_entry_get_max_width_chars*(self: ptr Entry00): int32 {. + importc: "gtk_entry_get_max_width_chars", libprag.} + +proc getMaxWidthChars*(self: Entry): int = + int(gtk_entry_get_max_width_chars(cast[ptr Entry00](self.impl))) + +proc maxWidthChars*(self: Entry): int = + int(gtk_entry_get_max_width_chars(cast[ptr Entry00](self.impl))) + +proc gtk_entry_get_overwrite_mode*(self: ptr Entry00): gboolean {. + importc: "gtk_entry_get_overwrite_mode", libprag.} + +proc getOverwriteMode*(self: Entry): bool = + toBool(gtk_entry_get_overwrite_mode(cast[ptr Entry00](self.impl))) + +proc overwriteMode*(self: Entry): bool = + toBool(gtk_entry_get_overwrite_mode(cast[ptr Entry00](self.impl))) + +proc gtk_entry_get_placeholder_text*(self: ptr Entry00): cstring {. + importc: "gtk_entry_get_placeholder_text", libprag.} + +proc getPlaceholderText*(self: Entry): string = + let resul0 = gtk_entry_get_placeholder_text(cast[ptr Entry00](self.impl)) + result = $resul0 + +proc placeholderText*(self: Entry): string = + let resul0 = gtk_entry_get_placeholder_text(cast[ptr Entry00](self.impl)) + result = $resul0 + +proc gtk_entry_get_progress_fraction*(self: ptr Entry00): cdouble {. + importc: "gtk_entry_get_progress_fraction", libprag.} + +proc getProgressFraction*(self: Entry): cdouble = + gtk_entry_get_progress_fraction(cast[ptr Entry00](self.impl)) + +proc progressFraction*(self: Entry): cdouble = + gtk_entry_get_progress_fraction(cast[ptr Entry00](self.impl)) + +proc gtk_entry_get_progress_pulse_step*(self: ptr Entry00): cdouble {. + importc: "gtk_entry_get_progress_pulse_step", libprag.} + +proc getProgressPulseStep*(self: Entry): cdouble = + gtk_entry_get_progress_pulse_step(cast[ptr Entry00](self.impl)) + +proc progressPulseStep*(self: Entry): cdouble = + gtk_entry_get_progress_pulse_step(cast[ptr Entry00](self.impl)) + +proc gtk_entry_get_tabs*(self: ptr Entry00): ptr pango.TabArray00 {. + importc: "gtk_entry_get_tabs", libprag.} + +proc getTabs*(self: Entry): pango.TabArray = + new(result) + result.impl = gtk_entry_get_tabs(cast[ptr Entry00](self.impl)) + +proc tabs*(self: Entry): pango.TabArray = + new(result) + result.impl = gtk_entry_get_tabs(cast[ptr Entry00](self.impl)) + +proc gtk_entry_get_text*(self: ptr Entry00): cstring {. + importc: "gtk_entry_get_text", libprag.} + +proc getText*(self: Entry): string = + let resul0 = gtk_entry_get_text(cast[ptr Entry00](self.impl)) + result = $resul0 + +proc text*(self: Entry): string = + let resul0 = gtk_entry_get_text(cast[ptr Entry00](self.impl)) + result = $resul0 + +proc gtk_entry_get_text_area*(self: ptr Entry00; textArea: var gdk.Rectangle00) {. + importc: "gtk_entry_get_text_area", libprag.} + +proc getTextArea*(self: ptr Entry00; textArea: var gdk.Rectangle00) {. + importc: "gtk_entry_get_text_area", libprag.} + +proc textArea*(self: ptr Entry00; textArea: var gdk.Rectangle00) {. + importc: "gtk_entry_get_text_area", libprag.} + +proc gtk_entry_get_text_length*(self: ptr Entry00): uint16 {. + importc: "gtk_entry_get_text_length", libprag.} + +proc getTextLength*(self: Entry): uint16 = + gtk_entry_get_text_length(cast[ptr Entry00](self.impl)) + +proc textLength*(self: Entry): uint16 = + gtk_entry_get_text_length(cast[ptr Entry00](self.impl)) + +proc gtk_entry_get_visibility*(self: ptr Entry00): gboolean {. + importc: "gtk_entry_get_visibility", libprag.} + +proc getVisibility*(self: Entry): bool = + toBool(gtk_entry_get_visibility(cast[ptr Entry00](self.impl))) + +proc visibility*(self: Entry): bool = + toBool(gtk_entry_get_visibility(cast[ptr Entry00](self.impl))) + +proc gtk_entry_get_width_chars*(self: ptr Entry00): int32 {. + importc: "gtk_entry_get_width_chars", libprag.} + +proc getWidthChars*(self: Entry): int = + int(gtk_entry_get_width_chars(cast[ptr Entry00](self.impl))) + +proc widthChars*(self: Entry): int = + int(gtk_entry_get_width_chars(cast[ptr Entry00](self.impl))) + +proc gtk_entry_grab_focus_without_selecting*(self: ptr Entry00) {. + importc: "gtk_entry_grab_focus_without_selecting", libprag.} + +proc grabFocusWithoutSelecting*(self: Entry) = + gtk_entry_grab_focus_without_selecting(cast[ptr Entry00](self.impl)) + +proc gtk_entry_im_context_filter_keypress*(self: ptr Entry00; event: ptr gdk.EventKey00): gboolean {. + importc: "gtk_entry_im_context_filter_keypress", libprag.} + +proc imContextFilterKeypress*(self: Entry; event: gdk.EventKey): bool = + toBool(gtk_entry_im_context_filter_keypress(cast[ptr Entry00](self.impl), cast[ptr gdk.EventKey00](event.impl))) + +proc gtk_entry_layout_index_to_text_index*(self: ptr Entry00; layoutIndex: int32): int32 {. + importc: "gtk_entry_layout_index_to_text_index", libprag.} + +proc layoutIndexToTextIndex*(self: Entry; layoutIndex: int): int = + int(gtk_entry_layout_index_to_text_index(cast[ptr Entry00](self.impl), int32(layoutIndex))) + +proc gtk_entry_progress_pulse*(self: ptr Entry00) {. + importc: "gtk_entry_progress_pulse", libprag.} + +proc progressPulse*(self: Entry) = + gtk_entry_progress_pulse(cast[ptr Entry00](self.impl)) + +proc gtk_entry_reset_im_context*(self: ptr Entry00) {. + importc: "gtk_entry_reset_im_context", libprag.} + +proc resetImContext*(self: Entry) = + gtk_entry_reset_im_context(cast[ptr Entry00](self.impl)) + +proc gtk_entry_set_activates_default*(self: ptr Entry00; setting: gboolean) {. + importc: "gtk_entry_set_activates_default", libprag.} + +proc setActivatesDefault*(self: Entry; setting: bool) = + gtk_entry_set_activates_default(cast[ptr Entry00](self.impl), gboolean(setting)) + +proc `activatesDefault=`*(self: Entry; setting: bool) = + gtk_entry_set_activates_default(cast[ptr Entry00](self.impl), gboolean(setting)) + +proc gtk_entry_set_alignment*(self: ptr Entry00; xalign: cfloat) {. + importc: "gtk_entry_set_alignment", libprag.} + +proc setAlignment*(self: Entry; xalign: cfloat) = + gtk_entry_set_alignment(cast[ptr Entry00](self.impl), xalign) + +proc `alignment=`*(self: Entry; xalign: cfloat) = + gtk_entry_set_alignment(cast[ptr Entry00](self.impl), xalign) + +proc gtk_entry_set_attributes*(self: ptr Entry00; attrs: ptr pango.AttrList00) {. + importc: "gtk_entry_set_attributes", libprag.} + +proc setAttributes*(self: Entry; attrs: pango.AttrList) = + gtk_entry_set_attributes(cast[ptr Entry00](self.impl), cast[ptr pango.AttrList00](attrs.impl)) + +proc `attributes=`*(self: Entry; attrs: pango.AttrList) = + gtk_entry_set_attributes(cast[ptr Entry00](self.impl), cast[ptr pango.AttrList00](attrs.impl)) + +proc gtk_entry_set_cursor_hadjustment*(self: ptr Entry00; adjustment: ptr Adjustment00) {. + importc: "gtk_entry_set_cursor_hadjustment", libprag.} + +proc setCursorHadjustment*(self: Entry; adjustment: Adjustment) = + gtk_entry_set_cursor_hadjustment(cast[ptr Entry00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `cursorHadjustment=`*(self: Entry; adjustment: Adjustment) = + gtk_entry_set_cursor_hadjustment(cast[ptr Entry00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_entry_set_has_frame*(self: ptr Entry00; setting: gboolean) {. + importc: "gtk_entry_set_has_frame", libprag.} + +proc setHasFrame*(self: Entry; setting: bool) = + gtk_entry_set_has_frame(cast[ptr Entry00](self.impl), gboolean(setting)) + +proc `hasFrame=`*(self: Entry; setting: bool) = + gtk_entry_set_has_frame(cast[ptr Entry00](self.impl), gboolean(setting)) + +proc gtk_entry_set_icon_activatable*(self: ptr Entry00; iconPos: EntryIconPosition; activatable: gboolean) {. + importc: "gtk_entry_set_icon_activatable", libprag.} + +proc setIconActivatable*(self: Entry; iconPos: EntryIconPosition; activatable: bool) = + gtk_entry_set_icon_activatable(cast[ptr Entry00](self.impl), iconPos, gboolean(activatable)) + +proc gtk_entry_set_icon_drag_source*(self: ptr Entry00; iconPos: EntryIconPosition; targetList: ptr TargetList00; + actions: gdk.DragAction) {. + importc: "gtk_entry_set_icon_drag_source", libprag.} + +proc setIconDragSource*(self: Entry; iconPos: EntryIconPosition; targetList: TargetList; + actions: gdk.DragAction) = + gtk_entry_set_icon_drag_source(cast[ptr Entry00](self.impl), iconPos, cast[ptr TargetList00](targetList.impl), actions) + +proc gtk_entry_set_icon_from_gicon*(self: ptr Entry00; iconPos: EntryIconPosition; icon: ptr gio.Icon00) {. + importc: "gtk_entry_set_icon_from_gicon", libprag.} + +proc setIconFromGicon*(self: Entry; iconPos: EntryIconPosition; icon: gio.Icon) = + gtk_entry_set_icon_from_gicon(cast[ptr Entry00](self.impl), iconPos, cast[ptr gio.Icon00](icon.impl)) + +proc gtk_entry_set_icon_from_icon_name*(self: ptr Entry00; iconPos: EntryIconPosition; iconName: cstring) {. + importc: "gtk_entry_set_icon_from_icon_name", libprag.} + +proc setIconFromIconName*(self: Entry; iconPos: EntryIconPosition; iconName: string) = + gtk_entry_set_icon_from_icon_name(cast[ptr Entry00](self.impl), iconPos, cstring(iconName)) + +proc gtk_entry_set_icon_from_pixbuf*(self: ptr Entry00; iconPos: EntryIconPosition; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_entry_set_icon_from_pixbuf", libprag.} + +proc setIconFromPixbuf*(self: Entry; iconPos: EntryIconPosition; pixbuf: gdkpixbuf.Pixbuf) = + gtk_entry_set_icon_from_pixbuf(cast[ptr Entry00](self.impl), iconPos, cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_entry_set_icon_from_stock*(self: ptr Entry00; iconPos: EntryIconPosition; stockId: cstring) {. + importc: "gtk_entry_set_icon_from_stock", libprag.} + +proc setIconFromStock*(self: Entry; iconPos: EntryIconPosition; stockId: string) = + gtk_entry_set_icon_from_stock(cast[ptr Entry00](self.impl), iconPos, cstring(stockId)) + +proc gtk_entry_set_icon_sensitive*(self: ptr Entry00; iconPos: EntryIconPosition; sensitive: gboolean) {. + importc: "gtk_entry_set_icon_sensitive", libprag.} + +proc setIconSensitive*(self: Entry; iconPos: EntryIconPosition; sensitive: bool) = + gtk_entry_set_icon_sensitive(cast[ptr Entry00](self.impl), iconPos, gboolean(sensitive)) + +proc gtk_entry_set_icon_tooltip_markup*(self: ptr Entry00; iconPos: EntryIconPosition; tooltip: cstring) {. + importc: "gtk_entry_set_icon_tooltip_markup", libprag.} + +proc setIconTooltipMarkup*(self: Entry; iconPos: EntryIconPosition; tooltip: string) = + gtk_entry_set_icon_tooltip_markup(cast[ptr Entry00](self.impl), iconPos, cstring(tooltip)) + +proc gtk_entry_set_icon_tooltip_text*(self: ptr Entry00; iconPos: EntryIconPosition; tooltip: cstring) {. + importc: "gtk_entry_set_icon_tooltip_text", libprag.} + +proc setIconTooltipText*(self: Entry; iconPos: EntryIconPosition; tooltip: string) = + gtk_entry_set_icon_tooltip_text(cast[ptr Entry00](self.impl), iconPos, cstring(tooltip)) + +proc gtk_entry_set_inner_border*(self: ptr Entry00; border: ptr Border00) {. + importc: "gtk_entry_set_inner_border", libprag.} + +proc setInnerBorder*(self: Entry; border: Border) = + gtk_entry_set_inner_border(cast[ptr Entry00](self.impl), cast[ptr Border00](border.impl)) + +proc `innerBorder=`*(self: Entry; border: Border) = + gtk_entry_set_inner_border(cast[ptr Entry00](self.impl), cast[ptr Border00](border.impl)) + +proc gtk_entry_set_invisible_char*(self: ptr Entry00; ch: gunichar) {. + importc: "gtk_entry_set_invisible_char", libprag.} + +proc setInvisibleChar*(self: Entry; ch: gunichar) = + gtk_entry_set_invisible_char(cast[ptr Entry00](self.impl), ch) + +proc `invisibleChar=`*(self: Entry; ch: gunichar) = + gtk_entry_set_invisible_char(cast[ptr Entry00](self.impl), ch) + +proc gtk_entry_set_max_length*(self: ptr Entry00; max: int32) {. + importc: "gtk_entry_set_max_length", libprag.} + +proc setMaxLength*(self: Entry; max: int) = + gtk_entry_set_max_length(cast[ptr Entry00](self.impl), int32(max)) + +proc `maxLength=`*(self: Entry; max: int) = + gtk_entry_set_max_length(cast[ptr Entry00](self.impl), int32(max)) + +proc gtk_entry_set_max_width_chars*(self: ptr Entry00; nChars: int32) {. + importc: "gtk_entry_set_max_width_chars", libprag.} + +proc setMaxWidthChars*(self: Entry; nChars: int) = + gtk_entry_set_max_width_chars(cast[ptr Entry00](self.impl), int32(nChars)) + +proc `maxWidthChars=`*(self: Entry; nChars: int) = + gtk_entry_set_max_width_chars(cast[ptr Entry00](self.impl), int32(nChars)) + +proc gtk_entry_set_overwrite_mode*(self: ptr Entry00; overwrite: gboolean) {. + importc: "gtk_entry_set_overwrite_mode", libprag.} + +proc setOverwriteMode*(self: Entry; overwrite: bool) = + gtk_entry_set_overwrite_mode(cast[ptr Entry00](self.impl), gboolean(overwrite)) + +proc `overwriteMode=`*(self: Entry; overwrite: bool) = + gtk_entry_set_overwrite_mode(cast[ptr Entry00](self.impl), gboolean(overwrite)) + +proc gtk_entry_set_placeholder_text*(self: ptr Entry00; text: cstring) {. + importc: "gtk_entry_set_placeholder_text", libprag.} + +proc setPlaceholderText*(self: Entry; text: string) = + gtk_entry_set_placeholder_text(cast[ptr Entry00](self.impl), cstring(text)) + +proc `placeholderText=`*(self: Entry; text: string) = + gtk_entry_set_placeholder_text(cast[ptr Entry00](self.impl), cstring(text)) + +proc gtk_entry_set_progress_fraction*(self: ptr Entry00; fraction: cdouble) {. + importc: "gtk_entry_set_progress_fraction", libprag.} + +proc setProgressFraction*(self: Entry; fraction: cdouble) = + gtk_entry_set_progress_fraction(cast[ptr Entry00](self.impl), fraction) + +proc `progressFraction=`*(self: Entry; fraction: cdouble) = + gtk_entry_set_progress_fraction(cast[ptr Entry00](self.impl), fraction) + +proc gtk_entry_set_progress_pulse_step*(self: ptr Entry00; fraction: cdouble) {. + importc: "gtk_entry_set_progress_pulse_step", libprag.} + +proc setProgressPulseStep*(self: Entry; fraction: cdouble) = + gtk_entry_set_progress_pulse_step(cast[ptr Entry00](self.impl), fraction) + +proc `progressPulseStep=`*(self: Entry; fraction: cdouble) = + gtk_entry_set_progress_pulse_step(cast[ptr Entry00](self.impl), fraction) + +proc gtk_entry_set_tabs*(self: ptr Entry00; tabs: ptr pango.TabArray00) {. + importc: "gtk_entry_set_tabs", libprag.} + +proc setTabs*(self: Entry; tabs: pango.TabArray) = + gtk_entry_set_tabs(cast[ptr Entry00](self.impl), cast[ptr pango.TabArray00](tabs.impl)) + +proc `tabs=`*(self: Entry; tabs: pango.TabArray) = + gtk_entry_set_tabs(cast[ptr Entry00](self.impl), cast[ptr pango.TabArray00](tabs.impl)) + +proc gtk_entry_set_text*(self: ptr Entry00; text: cstring) {. + importc: "gtk_entry_set_text", libprag.} + +proc setText*(self: Entry; text: string) = + gtk_entry_set_text(cast[ptr Entry00](self.impl), cstring(text)) + +proc `text=`*(self: Entry; text: string) = + gtk_entry_set_text(cast[ptr Entry00](self.impl), cstring(text)) + +proc gtk_entry_set_visibility*(self: ptr Entry00; visible: gboolean) {. + importc: "gtk_entry_set_visibility", libprag.} + +proc setVisibility*(self: Entry; visible: bool) = + gtk_entry_set_visibility(cast[ptr Entry00](self.impl), gboolean(visible)) + +proc `visibility=`*(self: Entry; visible: bool) = + gtk_entry_set_visibility(cast[ptr Entry00](self.impl), gboolean(visible)) + +proc gtk_entry_set_width_chars*(self: ptr Entry00; nChars: int32) {. + importc: "gtk_entry_set_width_chars", libprag.} + +proc setWidthChars*(self: Entry; nChars: int) = + gtk_entry_set_width_chars(cast[ptr Entry00](self.impl), int32(nChars)) + +proc `widthChars=`*(self: Entry; nChars: int) = + gtk_entry_set_width_chars(cast[ptr Entry00](self.impl), int32(nChars)) + +proc gtk_entry_text_index_to_layout_index*(self: ptr Entry00; textIndex: int32): int32 {. + importc: "gtk_entry_text_index_to_layout_index", libprag.} + +proc textIndexToLayoutIndex*(self: Entry; textIndex: int): int = + int(gtk_entry_text_index_to_layout_index(cast[ptr Entry00](self.impl), int32(textIndex))) + +proc gtk_entry_unset_invisible_char*(self: ptr Entry00) {. + importc: "gtk_entry_unset_invisible_char", libprag.} + +proc unsetInvisibleChar*(self: Entry) = + gtk_entry_unset_invisible_char(cast[ptr Entry00](self.impl)) + +type + ImageType* {.size: sizeof(cint), pure.} = enum + empty = 0 + pixbuf = 1 + stock = 2 + iconSet = 3 + animation = 4 + iconName = 5 + gicon = 6 + surface = 7 + +proc gtk_entry_get_icon_storage_type*(self: ptr Entry00; iconPos: EntryIconPosition): ImageType {. + importc: "gtk_entry_get_icon_storage_type", libprag.} + +proc getIconStorageType*(self: Entry; iconPos: EntryIconPosition): ImageType = + gtk_entry_get_icon_storage_type(cast[ptr Entry00](self.impl), iconPos) + +proc iconStorageType*(self: Entry; iconPos: EntryIconPosition): ImageType = + gtk_entry_get_icon_storage_type(cast[ptr Entry00](self.impl), iconPos) + +type + EntryBufferPrivate00* {.pure.} = object + EntryBufferPrivate* = ref object + impl*: ptr EntryBufferPrivate00 + +type + EntryBuffer* = ref object of gobject.Object + EntryBuffer00* = object of gobject.Object00 + priv1: ptr EntryBufferPrivate00 + +proc scDeletedText*(self: EntryBuffer; p: proc (self: ptr gobject.Object00; position: uint32; nChars: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "deleted-text", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInsertedText*(self: EntryBuffer; p: proc (self: ptr gobject.Object00; position: uint32; chars: cstring; nChars: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "inserted-text", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_entry_buffer_new*(initialChars: cstring; nInitialChars: int32): ptr EntryBuffer00 {. + importc: "gtk_entry_buffer_new", libprag.} + +proc newEntryBuffer*(initialChars: string; nInitialChars: int): EntryBuffer = + new(result, finalizeGObject) + result.impl = gtk_entry_buffer_new(cstring(initialChars), int32(nInitialChars)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initEntryBuffer*[T](result: var T; initialChars: string; nInitialChars: int) = + assert(result is EntryBuffer) + new(result, finalizeGObject) + result.impl = gtk_entry_buffer_new(cstring(initialChars), int32(nInitialChars)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_buffer_delete_text*(self: ptr EntryBuffer00; position: uint32; nChars: int32): uint32 {. + importc: "gtk_entry_buffer_delete_text", libprag.} + +proc deleteText*(self: EntryBuffer; position: int; nChars: int): int = + int(gtk_entry_buffer_delete_text(cast[ptr EntryBuffer00](self.impl), uint32(position), int32(nChars))) + +proc gtk_entry_buffer_emit_deleted_text*(self: ptr EntryBuffer00; position: uint32; nChars: uint32) {. + importc: "gtk_entry_buffer_emit_deleted_text", libprag.} + +proc emitDeletedText*(self: EntryBuffer; position: int; nChars: int) = + gtk_entry_buffer_emit_deleted_text(cast[ptr EntryBuffer00](self.impl), uint32(position), uint32(nChars)) + +proc gtk_entry_buffer_emit_inserted_text*(self: ptr EntryBuffer00; position: uint32; chars: cstring; + nChars: uint32) {. + importc: "gtk_entry_buffer_emit_inserted_text", libprag.} + +proc emitInsertedText*(self: EntryBuffer; position: int; chars: string; nChars: int) = + gtk_entry_buffer_emit_inserted_text(cast[ptr EntryBuffer00](self.impl), uint32(position), cstring(chars), uint32(nChars)) + +proc gtk_entry_buffer_get_bytes*(self: ptr EntryBuffer00): uint64 {. + importc: "gtk_entry_buffer_get_bytes", libprag.} + +proc getBytes*(self: EntryBuffer): uint64 = + gtk_entry_buffer_get_bytes(cast[ptr EntryBuffer00](self.impl)) + +proc bytes*(self: EntryBuffer): uint64 = + gtk_entry_buffer_get_bytes(cast[ptr EntryBuffer00](self.impl)) + +proc gtk_entry_buffer_get_length*(self: ptr EntryBuffer00): uint32 {. + importc: "gtk_entry_buffer_get_length", libprag.} + +proc getLength*(self: EntryBuffer): int = + int(gtk_entry_buffer_get_length(cast[ptr EntryBuffer00](self.impl))) + +proc length*(self: EntryBuffer): int = + int(gtk_entry_buffer_get_length(cast[ptr EntryBuffer00](self.impl))) + +proc gtk_entry_buffer_get_max_length*(self: ptr EntryBuffer00): int32 {. + importc: "gtk_entry_buffer_get_max_length", libprag.} + +proc getMaxLength*(self: EntryBuffer): int = + int(gtk_entry_buffer_get_max_length(cast[ptr EntryBuffer00](self.impl))) + +proc maxLength*(self: EntryBuffer): int = + int(gtk_entry_buffer_get_max_length(cast[ptr EntryBuffer00](self.impl))) + +proc gtk_entry_buffer_get_text*(self: ptr EntryBuffer00): cstring {. + importc: "gtk_entry_buffer_get_text", libprag.} + +proc getText*(self: EntryBuffer): string = + let resul0 = gtk_entry_buffer_get_text(cast[ptr EntryBuffer00](self.impl)) + result = $resul0 + +proc text*(self: EntryBuffer): string = + let resul0 = gtk_entry_buffer_get_text(cast[ptr EntryBuffer00](self.impl)) + result = $resul0 + +proc gtk_entry_buffer_insert_text*(self: ptr EntryBuffer00; position: uint32; chars: cstring; + nChars: int32): uint32 {. + importc: "gtk_entry_buffer_insert_text", libprag.} + +proc insertText*(self: EntryBuffer; position: int; chars: string; nChars: int): int = + int(gtk_entry_buffer_insert_text(cast[ptr EntryBuffer00](self.impl), uint32(position), cstring(chars), int32(nChars))) + +proc gtk_entry_buffer_set_max_length*(self: ptr EntryBuffer00; maxLength: int32) {. + importc: "gtk_entry_buffer_set_max_length", libprag.} + +proc setMaxLength*(self: EntryBuffer; maxLength: int) = + gtk_entry_buffer_set_max_length(cast[ptr EntryBuffer00](self.impl), int32(maxLength)) + +proc `maxLength=`*(self: EntryBuffer; maxLength: int) = + gtk_entry_buffer_set_max_length(cast[ptr EntryBuffer00](self.impl), int32(maxLength)) + +proc gtk_entry_buffer_set_text*(self: ptr EntryBuffer00; chars: cstring; nChars: int32) {. + importc: "gtk_entry_buffer_set_text", libprag.} + +proc setText*(self: EntryBuffer; chars: string; nChars: int) = + gtk_entry_buffer_set_text(cast[ptr EntryBuffer00](self.impl), cstring(chars), int32(nChars)) + +proc gtk_entry_new_with_buffer*(buffer: ptr EntryBuffer00): ptr Entry00 {. + importc: "gtk_entry_new_with_buffer", libprag.} + +proc newEntryWithBuffer*(buffer: EntryBuffer): Entry = + new(result, finalizeGObject) + result.impl = gtk_entry_new_with_buffer(cast[ptr EntryBuffer00](buffer.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initEntryWithBuffer*[T](result: var T; buffer: EntryBuffer) = + assert(result is Entry) + new(result, finalizeGObject) + result.impl = gtk_entry_new_with_buffer(cast[ptr EntryBuffer00](buffer.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_get_buffer*(self: ptr Entry00): ptr EntryBuffer00 {. + importc: "gtk_entry_get_buffer", libprag.} + +proc getBuffer*(self: Entry): EntryBuffer = + let gobj = gtk_entry_get_buffer(cast[ptr Entry00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[EntryBuffer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc buffer*(self: Entry): EntryBuffer = + let gobj = gtk_entry_get_buffer(cast[ptr Entry00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[EntryBuffer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_set_buffer*(self: ptr Entry00; buffer: ptr EntryBuffer00) {. + importc: "gtk_entry_set_buffer", libprag.} + +proc setBuffer*(self: Entry; buffer: EntryBuffer) = + gtk_entry_set_buffer(cast[ptr Entry00](self.impl), cast[ptr EntryBuffer00](buffer.impl)) + +proc `buffer=`*(self: Entry; buffer: EntryBuffer) = + gtk_entry_set_buffer(cast[ptr Entry00](self.impl), cast[ptr EntryBuffer00](buffer.impl)) + +type + EntryCompletionPrivate00* {.pure.} = object + EntryCompletionPrivate* = ref object + impl*: ptr EntryCompletionPrivate00 + +type + EntryCompletion* = ref object of gobject.Object + EntryCompletion00* = object of gobject.Object00 + priv1: ptr EntryCompletionPrivate00 + +proc scActionActivated*(self: EntryCompletion; p: proc (self: ptr gobject.Object00; index: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "action-activated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCursorOnMatch*(self: EntryCompletion; p: proc (self: ptr gobject.Object00; model: TreeModel00; iter: TreeIter00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cursor-on-match", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInsertPrefix*(self: EntryCompletion; p: proc (self: ptr gobject.Object00; prefix: cstring; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "insert-prefix", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMatchSelected*(self: EntryCompletion; p: proc (self: ptr gobject.Object00; model: TreeModel00; iter: TreeIter00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "match-selected", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scNoMatches*(self: EntryCompletion; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "no-matches", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_entry_completion_new*(): ptr EntryCompletion00 {. + importc: "gtk_entry_completion_new", libprag.} + +proc newEntryCompletion*(): EntryCompletion = + new(result, finalizeGObject) + result.impl = gtk_entry_completion_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initEntryCompletion*[T](result: var T) = + assert(result is EntryCompletion) + new(result, finalizeGObject) + result.impl = gtk_entry_completion_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_completion_new_with_area*(area: ptr CellArea00): ptr EntryCompletion00 {. + importc: "gtk_entry_completion_new_with_area", libprag.} + +proc newEntryCompletionWithArea*(area: CellArea): EntryCompletion = + new(result, finalizeGObject) + result.impl = gtk_entry_completion_new_with_area(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initEntryCompletionWithArea*[T](result: var T; area: CellArea) = + assert(result is EntryCompletion) + new(result, finalizeGObject) + result.impl = gtk_entry_completion_new_with_area(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_completion_complete*(self: ptr EntryCompletion00) {. + importc: "gtk_entry_completion_complete", libprag.} + +proc complete*(self: EntryCompletion) = + gtk_entry_completion_complete(cast[ptr EntryCompletion00](self.impl)) + +proc gtk_entry_completion_compute_prefix*(self: ptr EntryCompletion00; key: cstring): cstring {. + importc: "gtk_entry_completion_compute_prefix", libprag.} + +proc computePrefix*(self: EntryCompletion; key: string): string = + let resul0 = gtk_entry_completion_compute_prefix(cast[ptr EntryCompletion00](self.impl), cstring(key)) + result = $resul0 + cogfree(resul0) + +proc gtk_entry_completion_delete_action*(self: ptr EntryCompletion00; index: int32) {. + importc: "gtk_entry_completion_delete_action", libprag.} + +proc deleteAction*(self: EntryCompletion; index: int) = + gtk_entry_completion_delete_action(cast[ptr EntryCompletion00](self.impl), int32(index)) + +proc gtk_entry_completion_get_completion_prefix*(self: ptr EntryCompletion00): cstring {. + importc: "gtk_entry_completion_get_completion_prefix", libprag.} + +proc getCompletionPrefix*(self: EntryCompletion): string = + let resul0 = gtk_entry_completion_get_completion_prefix(cast[ptr EntryCompletion00](self.impl)) + result = $resul0 + +proc completionPrefix*(self: EntryCompletion): string = + let resul0 = gtk_entry_completion_get_completion_prefix(cast[ptr EntryCompletion00](self.impl)) + result = $resul0 + +proc gtk_entry_completion_get_entry*(self: ptr EntryCompletion00): ptr Widget00 {. + importc: "gtk_entry_completion_get_entry", libprag.} + +proc getEntry*(self: EntryCompletion): Widget = + let gobj = gtk_entry_completion_get_entry(cast[ptr EntryCompletion00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc entry*(self: EntryCompletion): Widget = + let gobj = gtk_entry_completion_get_entry(cast[ptr EntryCompletion00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_completion_get_inline_completion*(self: ptr EntryCompletion00): gboolean {. + importc: "gtk_entry_completion_get_inline_completion", libprag.} + +proc getInlineCompletion*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_inline_completion(cast[ptr EntryCompletion00](self.impl))) + +proc inlineCompletion*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_inline_completion(cast[ptr EntryCompletion00](self.impl))) + +proc gtk_entry_completion_get_inline_selection*(self: ptr EntryCompletion00): gboolean {. + importc: "gtk_entry_completion_get_inline_selection", libprag.} + +proc getInlineSelection*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_inline_selection(cast[ptr EntryCompletion00](self.impl))) + +proc inlineSelection*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_inline_selection(cast[ptr EntryCompletion00](self.impl))) + +proc gtk_entry_completion_get_minimum_key_length*(self: ptr EntryCompletion00): int32 {. + importc: "gtk_entry_completion_get_minimum_key_length", libprag.} + +proc getMinimumKeyLength*(self: EntryCompletion): int = + int(gtk_entry_completion_get_minimum_key_length(cast[ptr EntryCompletion00](self.impl))) + +proc minimumKeyLength*(self: EntryCompletion): int = + int(gtk_entry_completion_get_minimum_key_length(cast[ptr EntryCompletion00](self.impl))) + +proc gtk_entry_completion_get_model*(self: ptr EntryCompletion00): ptr TreeModel00 {. + importc: "gtk_entry_completion_get_model", libprag.} + +proc getModel*(self: EntryCompletion): TreeModel = + new(result) + result.impl = gtk_entry_completion_get_model(cast[ptr EntryCompletion00](self.impl)) + +proc model*(self: EntryCompletion): TreeModel = + new(result) + result.impl = gtk_entry_completion_get_model(cast[ptr EntryCompletion00](self.impl)) + +proc gtk_entry_completion_get_popup_completion*(self: ptr EntryCompletion00): gboolean {. + importc: "gtk_entry_completion_get_popup_completion", libprag.} + +proc getPopupCompletion*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_popup_completion(cast[ptr EntryCompletion00](self.impl))) + +proc popupCompletion*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_popup_completion(cast[ptr EntryCompletion00](self.impl))) + +proc gtk_entry_completion_get_popup_set_width*(self: ptr EntryCompletion00): gboolean {. + importc: "gtk_entry_completion_get_popup_set_width", libprag.} + +proc getPopupSetWidth*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_popup_set_width(cast[ptr EntryCompletion00](self.impl))) + +proc popupSetWidth*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_popup_set_width(cast[ptr EntryCompletion00](self.impl))) + +proc gtk_entry_completion_get_popup_single_match*(self: ptr EntryCompletion00): gboolean {. + importc: "gtk_entry_completion_get_popup_single_match", libprag.} + +proc getPopupSingleMatch*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_popup_single_match(cast[ptr EntryCompletion00](self.impl))) + +proc popupSingleMatch*(self: EntryCompletion): bool = + toBool(gtk_entry_completion_get_popup_single_match(cast[ptr EntryCompletion00](self.impl))) + +proc gtk_entry_completion_get_text_column*(self: ptr EntryCompletion00): int32 {. + importc: "gtk_entry_completion_get_text_column", libprag.} + +proc getTextColumn*(self: EntryCompletion): int = + int(gtk_entry_completion_get_text_column(cast[ptr EntryCompletion00](self.impl))) + +proc textColumn*(self: EntryCompletion): int = + int(gtk_entry_completion_get_text_column(cast[ptr EntryCompletion00](self.impl))) + +proc gtk_entry_completion_insert_action_markup*(self: ptr EntryCompletion00; index: int32; markup: cstring) {. + importc: "gtk_entry_completion_insert_action_markup", libprag.} + +proc insertActionMarkup*(self: EntryCompletion; index: int; markup: string) = + gtk_entry_completion_insert_action_markup(cast[ptr EntryCompletion00](self.impl), int32(index), cstring(markup)) + +proc gtk_entry_completion_insert_action_text*(self: ptr EntryCompletion00; index: int32; text: cstring) {. + importc: "gtk_entry_completion_insert_action_text", libprag.} + +proc insertActionText*(self: EntryCompletion; index: int; text: string) = + gtk_entry_completion_insert_action_text(cast[ptr EntryCompletion00](self.impl), int32(index), cstring(text)) + +proc gtk_entry_completion_insert_prefix*(self: ptr EntryCompletion00) {. + importc: "gtk_entry_completion_insert_prefix", libprag.} + +proc insertPrefix*(self: EntryCompletion) = + gtk_entry_completion_insert_prefix(cast[ptr EntryCompletion00](self.impl)) + +proc gtk_entry_completion_set_inline_completion*(self: ptr EntryCompletion00; inlineCompletion: gboolean) {. + importc: "gtk_entry_completion_set_inline_completion", libprag.} + +proc setInlineCompletion*(self: EntryCompletion; inlineCompletion: bool) = + gtk_entry_completion_set_inline_completion(cast[ptr EntryCompletion00](self.impl), gboolean(inlineCompletion)) + +proc `inlineCompletion=`*(self: EntryCompletion; inlineCompletion: bool) = + gtk_entry_completion_set_inline_completion(cast[ptr EntryCompletion00](self.impl), gboolean(inlineCompletion)) + +proc gtk_entry_completion_set_inline_selection*(self: ptr EntryCompletion00; inlineSelection: gboolean) {. + importc: "gtk_entry_completion_set_inline_selection", libprag.} + +proc setInlineSelection*(self: EntryCompletion; inlineSelection: bool) = + gtk_entry_completion_set_inline_selection(cast[ptr EntryCompletion00](self.impl), gboolean(inlineSelection)) + +proc `inlineSelection=`*(self: EntryCompletion; inlineSelection: bool) = + gtk_entry_completion_set_inline_selection(cast[ptr EntryCompletion00](self.impl), gboolean(inlineSelection)) + +proc gtk_entry_completion_set_minimum_key_length*(self: ptr EntryCompletion00; length: int32) {. + importc: "gtk_entry_completion_set_minimum_key_length", libprag.} + +proc setMinimumKeyLength*(self: EntryCompletion; length: int) = + gtk_entry_completion_set_minimum_key_length(cast[ptr EntryCompletion00](self.impl), int32(length)) + +proc `minimumKeyLength=`*(self: EntryCompletion; length: int) = + gtk_entry_completion_set_minimum_key_length(cast[ptr EntryCompletion00](self.impl), int32(length)) + +proc gtk_entry_completion_set_model*(self: ptr EntryCompletion00; model: ptr TreeModel00) {. + importc: "gtk_entry_completion_set_model", libprag.} + +proc setModel*(self: EntryCompletion; model: TreeModel) = + gtk_entry_completion_set_model(cast[ptr EntryCompletion00](self.impl), cast[ptr TreeModel00](model.impl)) + +proc `model=`*(self: EntryCompletion; model: TreeModel) = + gtk_entry_completion_set_model(cast[ptr EntryCompletion00](self.impl), cast[ptr TreeModel00](model.impl)) + +proc gtk_entry_completion_set_popup_completion*(self: ptr EntryCompletion00; popupCompletion: gboolean) {. + importc: "gtk_entry_completion_set_popup_completion", libprag.} + +proc setPopupCompletion*(self: EntryCompletion; popupCompletion: bool) = + gtk_entry_completion_set_popup_completion(cast[ptr EntryCompletion00](self.impl), gboolean(popupCompletion)) + +proc `popupCompletion=`*(self: EntryCompletion; popupCompletion: bool) = + gtk_entry_completion_set_popup_completion(cast[ptr EntryCompletion00](self.impl), gboolean(popupCompletion)) + +proc gtk_entry_completion_set_popup_set_width*(self: ptr EntryCompletion00; popupSetWidth: gboolean) {. + importc: "gtk_entry_completion_set_popup_set_width", libprag.} + +proc setPopupSetWidth*(self: EntryCompletion; popupSetWidth: bool) = + gtk_entry_completion_set_popup_set_width(cast[ptr EntryCompletion00](self.impl), gboolean(popupSetWidth)) + +proc `popupSetWidth=`*(self: EntryCompletion; popupSetWidth: bool) = + gtk_entry_completion_set_popup_set_width(cast[ptr EntryCompletion00](self.impl), gboolean(popupSetWidth)) + +proc gtk_entry_completion_set_popup_single_match*(self: ptr EntryCompletion00; popupSingleMatch: gboolean) {. + importc: "gtk_entry_completion_set_popup_single_match", libprag.} + +proc setPopupSingleMatch*(self: EntryCompletion; popupSingleMatch: bool) = + gtk_entry_completion_set_popup_single_match(cast[ptr EntryCompletion00](self.impl), gboolean(popupSingleMatch)) + +proc `popupSingleMatch=`*(self: EntryCompletion; popupSingleMatch: bool) = + gtk_entry_completion_set_popup_single_match(cast[ptr EntryCompletion00](self.impl), gboolean(popupSingleMatch)) + +proc gtk_entry_completion_set_text_column*(self: ptr EntryCompletion00; column: int32) {. + importc: "gtk_entry_completion_set_text_column", libprag.} + +proc setTextColumn*(self: EntryCompletion; column: int) = + gtk_entry_completion_set_text_column(cast[ptr EntryCompletion00](self.impl), int32(column)) + +proc `textColumn=`*(self: EntryCompletion; column: int) = + gtk_entry_completion_set_text_column(cast[ptr EntryCompletion00](self.impl), int32(column)) + +proc gtk_entry_get_completion*(self: ptr Entry00): ptr EntryCompletion00 {. + importc: "gtk_entry_get_completion", libprag.} + +proc getCompletion*(self: Entry): EntryCompletion = + let gobj = gtk_entry_get_completion(cast[ptr Entry00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[EntryCompletion](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc completion*(self: Entry): EntryCompletion = + let gobj = gtk_entry_get_completion(cast[ptr Entry00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[EntryCompletion](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_entry_set_completion*(self: ptr Entry00; completion: ptr EntryCompletion00) {. + importc: "gtk_entry_set_completion", libprag.} + +proc setCompletion*(self: Entry; completion: EntryCompletion) = + gtk_entry_set_completion(cast[ptr Entry00](self.impl), cast[ptr EntryCompletion00](completion.impl)) + +proc `completion=`*(self: Entry; completion: EntryCompletion) = + gtk_entry_set_completion(cast[ptr Entry00](self.impl), cast[ptr EntryCompletion00](completion.impl)) + +type + InputHints* {.size: sizeof(cint), pure.} = enum + none = 0 + spellcheck = 1 + noSpellcheck = 2 + wordCompletion = 4 + lowercase = 8 + uppercaseChars = 16 + uppercaseWords = 32 + uppercaseSentences = 64 + inhibitOsk = 128 + verticalWriting = 256 + +proc gtk_entry_get_input_hints*(self: ptr Entry00): InputHints {. + importc: "gtk_entry_get_input_hints", libprag.} + +proc getInputHints*(self: Entry): InputHints = + gtk_entry_get_input_hints(cast[ptr Entry00](self.impl)) + +proc inputHints*(self: Entry): InputHints = + gtk_entry_get_input_hints(cast[ptr Entry00](self.impl)) + +proc gtk_entry_set_input_hints*(self: ptr Entry00; hints: InputHints) {. + importc: "gtk_entry_set_input_hints", libprag.} + +proc setInputHints*(self: Entry; hints: InputHints) = + gtk_entry_set_input_hints(cast[ptr Entry00](self.impl), hints) + +proc `inputHints=`*(self: Entry; hints: InputHints) = + gtk_entry_set_input_hints(cast[ptr Entry00](self.impl), hints) + +type + InputPurpose* {.size: sizeof(cint), pure.} = enum + freeForm = 0 + alpha = 1 + digits = 2 + number = 3 + phone = 4 + url = 5 + email = 6 + name = 7 + password = 8 + pin = 9 + +proc gtk_entry_get_input_purpose*(self: ptr Entry00): InputPurpose {. + importc: "gtk_entry_get_input_purpose", libprag.} + +proc getInputPurpose*(self: Entry): InputPurpose = + gtk_entry_get_input_purpose(cast[ptr Entry00](self.impl)) + +proc inputPurpose*(self: Entry): InputPurpose = + gtk_entry_get_input_purpose(cast[ptr Entry00](self.impl)) + +proc gtk_entry_set_input_purpose*(self: ptr Entry00; purpose: InputPurpose) {. + importc: "gtk_entry_set_input_purpose", libprag.} + +proc setInputPurpose*(self: Entry; purpose: InputPurpose) = + gtk_entry_set_input_purpose(cast[ptr Entry00](self.impl), purpose) + +proc `inputPurpose=`*(self: Entry; purpose: InputPurpose) = + gtk_entry_set_input_purpose(cast[ptr Entry00](self.impl), purpose) + +type + EntryAccessiblePrivate00* {.pure.} = object + EntryAccessiblePrivate* = ref object + impl*: ptr EntryAccessiblePrivate00 + +type + EntryAccessible* = ref object of WidgetAccessible + EntryAccessible00* = object of WidgetAccessible00 + priv3: ptr EntryAccessiblePrivate00 + +type + EntryAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + EntryAccessibleClass* = ref object + impl*: ptr EntryAccessibleClass00 + +type + EntryBufferClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + insertedText*: proc(buffer: ptr EntryBuffer00; position: uint32; chars: cstring; + nChars: uint32) {.cdecl.} + deletedText*: proc(buffer: ptr EntryBuffer00; position: uint32; nChars: uint32) {.cdecl.} + getText*: proc(buffer: ptr EntryBuffer00; nBytes: ptr uint64): cstring {.cdecl.} + getLength*: proc(buffer: ptr EntryBuffer00): uint32 {.cdecl.} + insertText*: proc(buffer: ptr EntryBuffer00; position: uint32; chars: cstring; + nChars: uint32): uint32 {.cdecl.} + deleteText*: proc(buffer: ptr EntryBuffer00; position: uint32; nChars: uint32): uint32 {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + EntryBufferClass* = ref object + impl*: ptr EntryBufferClass00 + +type + EntryClass00* {.pure.} = object + parentClass*: WidgetClass00 + populatePopup*: proc(entry: ptr Entry00; popup: ptr Widget00) {.cdecl.} + activate*: proc(entry: ptr Entry00) {.cdecl.} + moveCursor*: proc(entry: ptr Entry00; step: MovementStep; count: int32; + extendSelection: gboolean) {.cdecl.} + insertAtCursor*: proc(entry: ptr Entry00; str: cstring) {.cdecl.} + deleteFromCursor*: proc(entry: ptr Entry00; `type`: DeleteType; count: int32) {.cdecl.} + backspace*: proc(entry: ptr Entry00) {.cdecl.} + cutClipboard*: proc(entry: ptr Entry00) {.cdecl.} + copyClipboard*: proc(entry: ptr Entry00) {.cdecl.} + pasteClipboard*: proc(entry: ptr Entry00) {.cdecl.} + toggleOverwrite*: proc(entry: ptr Entry00) {.cdecl.} + getTextAreaSize*: proc(entry: ptr Entry00; x: ptr int32; y: ptr int32; width: ptr int32; + height: ptr int32) {.cdecl.} + getFrameSize*: proc(entry: ptr Entry00; x: ptr int32; y: ptr int32; width: ptr int32; + height: ptr int32) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + EntryClass* = ref object + impl*: ptr EntryClass00 + +type + EntryCompletionClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + matchSelected*: proc(completion: ptr EntryCompletion00; model: ptr TreeModel00; + iter: ptr TreeIter00): gboolean {.cdecl.} + actionActivated*: proc(completion: ptr EntryCompletion00; index: int32) {.cdecl.} + insertPrefix*: proc(completion: ptr EntryCompletion00; prefix: cstring): gboolean {.cdecl.} + cursorOnMatch*: proc(completion: ptr EntryCompletion00; model: ptr TreeModel00; + iter: ptr TreeIter00): gboolean {.cdecl.} + noMatches*: proc(completion: ptr EntryCompletion00) {.cdecl.} + gtkReserved0*: pointer + gtkReserved1*: pointer + gtkReserved2*: pointer + EntryCompletionClass* = ref object + impl*: ptr EntryCompletionClass00 + +type + EntryCompletionMatchFunc* = proc (completion: ptr EntryCompletion00; key: cstring; iter: ptr TreeIter00; + userData: pointer): gboolean {.cdecl.} + +proc gtk_entry_completion_set_match_func*(self: ptr EntryCompletion00; `func`: EntryCompletionMatchFunc; + funcData: pointer; funcNotify: DestroyNotify) {. + importc: "gtk_entry_completion_set_match_func", libprag.} + +proc setMatchFunc*(self: EntryCompletion; `func`: EntryCompletionMatchFunc; + funcData: pointer; funcNotify: DestroyNotify) = + gtk_entry_completion_set_match_func(cast[ptr EntryCompletion00](self.impl), `func`, funcData, funcNotify) + +type + EntryIconAccessible* = ref object of atk.Object + EntryIconAccessible00* = object of atk.Object00 + +type + EventBoxPrivate00* {.pure.} = object + EventBoxPrivate* = ref object + impl*: ptr EventBoxPrivate00 + +type + EventBox* = ref object of Bin + EventBox00* = object of Bin00 + priv4: ptr EventBoxPrivate00 + +proc gtk_event_box_new*(): ptr EventBox00 {. + importc: "gtk_event_box_new", libprag.} + +proc newEventBox*(): EventBox = + new(result, finalizeGObject) + result.impl = gtk_event_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initEventBox*[T](result: var T) = + assert(result is EventBox) + new(result, finalizeGObject) + result.impl = gtk_event_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_event_box_get_above_child*(self: ptr EventBox00): gboolean {. + importc: "gtk_event_box_get_above_child", libprag.} + +proc getAboveChild*(self: EventBox): bool = + toBool(gtk_event_box_get_above_child(cast[ptr EventBox00](self.impl))) + +proc aboveChild*(self: EventBox): bool = + toBool(gtk_event_box_get_above_child(cast[ptr EventBox00](self.impl))) + +proc gtk_event_box_get_visible_window*(self: ptr EventBox00): gboolean {. + importc: "gtk_event_box_get_visible_window", libprag.} + +proc getVisibleWindow*(self: EventBox): bool = + toBool(gtk_event_box_get_visible_window(cast[ptr EventBox00](self.impl))) + +proc visibleWindow*(self: EventBox): bool = + toBool(gtk_event_box_get_visible_window(cast[ptr EventBox00](self.impl))) + +proc gtk_event_box_set_above_child*(self: ptr EventBox00; aboveChild: gboolean) {. + importc: "gtk_event_box_set_above_child", libprag.} + +proc setAboveChild*(self: EventBox; aboveChild: bool) = + gtk_event_box_set_above_child(cast[ptr EventBox00](self.impl), gboolean(aboveChild)) + +proc `aboveChild=`*(self: EventBox; aboveChild: bool) = + gtk_event_box_set_above_child(cast[ptr EventBox00](self.impl), gboolean(aboveChild)) + +proc gtk_event_box_set_visible_window*(self: ptr EventBox00; visibleWindow: gboolean) {. + importc: "gtk_event_box_set_visible_window", libprag.} + +proc setVisibleWindow*(self: EventBox; visibleWindow: bool) = + gtk_event_box_set_visible_window(cast[ptr EventBox00](self.impl), gboolean(visibleWindow)) + +proc `visibleWindow=`*(self: EventBox; visibleWindow: bool) = + gtk_event_box_set_visible_window(cast[ptr EventBox00](self.impl), gboolean(visibleWindow)) + +type + EventBoxClass00* {.pure.} = object + parentClass*: BinClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + EventBoxClass* = ref object + impl*: ptr EventBoxClass00 + +type + EventController* = ref object of gobject.Object + EventController00* = object of gobject.Object00 + +proc gtk_event_controller_get_widget*(self: ptr EventController00): ptr Widget00 {. + importc: "gtk_event_controller_get_widget", libprag.} + +proc getWidget*(self: EventController): Widget = + let gobj = gtk_event_controller_get_widget(cast[ptr EventController00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc widget*(self: EventController): Widget = + let gobj = gtk_event_controller_get_widget(cast[ptr EventController00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_event_controller_handle_event*(self: ptr EventController00; event: ptr gdk.Event00): gboolean {. + importc: "gtk_event_controller_handle_event", libprag.} + +proc handleEvent*(self: EventController; event: gdk.Event): bool = + toBool(gtk_event_controller_handle_event(cast[ptr EventController00](self.impl), cast[ptr gdk.Event00](event.impl))) + +proc gtk_event_controller_reset*(self: ptr EventController00) {. + importc: "gtk_event_controller_reset", libprag.} + +proc reset*(self: EventController) = + gtk_event_controller_reset(cast[ptr EventController00](self.impl)) + +type + PropagationPhase* {.size: sizeof(cint), pure.} = enum + none = 0 + capture = 1 + bubble = 2 + target = 3 + +proc gtk_event_controller_get_propagation_phase*(self: ptr EventController00): PropagationPhase {. + importc: "gtk_event_controller_get_propagation_phase", libprag.} + +proc getPropagationPhase*(self: EventController): PropagationPhase = + gtk_event_controller_get_propagation_phase(cast[ptr EventController00](self.impl)) + +proc propagationPhase*(self: EventController): PropagationPhase = + gtk_event_controller_get_propagation_phase(cast[ptr EventController00](self.impl)) + +proc gtk_event_controller_set_propagation_phase*(self: ptr EventController00; phase: PropagationPhase) {. + importc: "gtk_event_controller_set_propagation_phase", libprag.} + +proc setPropagationPhase*(self: EventController; phase: PropagationPhase) = + gtk_event_controller_set_propagation_phase(cast[ptr EventController00](self.impl), phase) + +proc `propagationPhase=`*(self: EventController; phase: PropagationPhase) = + gtk_event_controller_set_propagation_phase(cast[ptr EventController00](self.impl), phase) + +type + EventControllerClass00* {.pure.} = object + EventControllerClass* = ref object + impl*: ptr EventControllerClass00 + +type + EventSequenceState* {.size: sizeof(cint), pure.} = enum + none = 0 + claimed = 1 + denied = 2 + +type + ExpanderPrivate00* {.pure.} = object + ExpanderPrivate* = ref object + impl*: ptr ExpanderPrivate00 + +type + Expander* = ref object of Bin + Expander00* = object of Bin00 + priv4: ptr ExpanderPrivate00 + +proc scActivate*(self: Expander; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_expander_new*(label: cstring): ptr Expander00 {. + importc: "gtk_expander_new", libprag.} + +proc newExpander*(label: string): Expander = + new(result, finalizeGObject) + result.impl = gtk_expander_new(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initExpander*[T](result: var T; label: string) = + assert(result is Expander) + new(result, finalizeGObject) + result.impl = gtk_expander_new(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_expander_new_with_mnemonic*(label: cstring): ptr Expander00 {. + importc: "gtk_expander_new_with_mnemonic", libprag.} + +proc newExpanderWithMnemonic*(label: string): Expander = + new(result, finalizeGObject) + result.impl = gtk_expander_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initExpanderWithMnemonic*[T](result: var T; label: string) = + assert(result is Expander) + new(result, finalizeGObject) + result.impl = gtk_expander_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_expander_get_expanded*(self: ptr Expander00): gboolean {. + importc: "gtk_expander_get_expanded", libprag.} + +proc getExpanded*(self: Expander): bool = + toBool(gtk_expander_get_expanded(cast[ptr Expander00](self.impl))) + +proc expanded*(self: Expander): bool = + toBool(gtk_expander_get_expanded(cast[ptr Expander00](self.impl))) + +proc gtk_expander_get_label*(self: ptr Expander00): cstring {. + importc: "gtk_expander_get_label", libprag.} + +proc getLabel*(self: Expander): string = + let resul0 = gtk_expander_get_label(cast[ptr Expander00](self.impl)) + result = $resul0 + +proc label*(self: Expander): string = + let resul0 = gtk_expander_get_label(cast[ptr Expander00](self.impl)) + result = $resul0 + +proc gtk_expander_get_label_fill*(self: ptr Expander00): gboolean {. + importc: "gtk_expander_get_label_fill", libprag.} + +proc getLabelFill*(self: Expander): bool = + toBool(gtk_expander_get_label_fill(cast[ptr Expander00](self.impl))) + +proc labelFill*(self: Expander): bool = + toBool(gtk_expander_get_label_fill(cast[ptr Expander00](self.impl))) + +proc gtk_expander_get_label_widget*(self: ptr Expander00): ptr Widget00 {. + importc: "gtk_expander_get_label_widget", libprag.} + +proc getLabelWidget*(self: Expander): Widget = + let gobj = gtk_expander_get_label_widget(cast[ptr Expander00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc labelWidget*(self: Expander): Widget = + let gobj = gtk_expander_get_label_widget(cast[ptr Expander00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_expander_get_resize_toplevel*(self: ptr Expander00): gboolean {. + importc: "gtk_expander_get_resize_toplevel", libprag.} + +proc getResizeToplevel*(self: Expander): bool = + toBool(gtk_expander_get_resize_toplevel(cast[ptr Expander00](self.impl))) + +proc resizeToplevel*(self: Expander): bool = + toBool(gtk_expander_get_resize_toplevel(cast[ptr Expander00](self.impl))) + +proc gtk_expander_get_spacing*(self: ptr Expander00): int32 {. + importc: "gtk_expander_get_spacing", libprag.} + +proc getSpacing*(self: Expander): int = + int(gtk_expander_get_spacing(cast[ptr Expander00](self.impl))) + +proc spacing*(self: Expander): int = + int(gtk_expander_get_spacing(cast[ptr Expander00](self.impl))) + +proc gtk_expander_get_use_markup*(self: ptr Expander00): gboolean {. + importc: "gtk_expander_get_use_markup", libprag.} + +proc getUseMarkup*(self: Expander): bool = + toBool(gtk_expander_get_use_markup(cast[ptr Expander00](self.impl))) + +proc useMarkup*(self: Expander): bool = + toBool(gtk_expander_get_use_markup(cast[ptr Expander00](self.impl))) + +proc gtk_expander_get_use_underline*(self: ptr Expander00): gboolean {. + importc: "gtk_expander_get_use_underline", libprag.} + +proc getUseUnderline*(self: Expander): bool = + toBool(gtk_expander_get_use_underline(cast[ptr Expander00](self.impl))) + +proc useUnderline*(self: Expander): bool = + toBool(gtk_expander_get_use_underline(cast[ptr Expander00](self.impl))) + +proc gtk_expander_set_expanded*(self: ptr Expander00; expanded: gboolean) {. + importc: "gtk_expander_set_expanded", libprag.} + +proc setExpanded*(self: Expander; expanded: bool) = + gtk_expander_set_expanded(cast[ptr Expander00](self.impl), gboolean(expanded)) + +proc `expanded=`*(self: Expander; expanded: bool) = + gtk_expander_set_expanded(cast[ptr Expander00](self.impl), gboolean(expanded)) + +proc gtk_expander_set_label*(self: ptr Expander00; label: cstring) {. + importc: "gtk_expander_set_label", libprag.} + +proc setLabel*(self: Expander; label: string) = + gtk_expander_set_label(cast[ptr Expander00](self.impl), cstring(label)) + +proc `label=`*(self: Expander; label: string) = + gtk_expander_set_label(cast[ptr Expander00](self.impl), cstring(label)) + +proc gtk_expander_set_label_fill*(self: ptr Expander00; labelFill: gboolean) {. + importc: "gtk_expander_set_label_fill", libprag.} + +proc setLabelFill*(self: Expander; labelFill: bool) = + gtk_expander_set_label_fill(cast[ptr Expander00](self.impl), gboolean(labelFill)) + +proc `labelFill=`*(self: Expander; labelFill: bool) = + gtk_expander_set_label_fill(cast[ptr Expander00](self.impl), gboolean(labelFill)) + +proc gtk_expander_set_label_widget*(self: ptr Expander00; labelWidget: ptr Widget00) {. + importc: "gtk_expander_set_label_widget", libprag.} + +proc setLabelWidget*(self: Expander; labelWidget: Widget) = + gtk_expander_set_label_widget(cast[ptr Expander00](self.impl), cast[ptr Widget00](labelWidget.impl)) + +proc `labelWidget=`*(self: Expander; labelWidget: Widget) = + gtk_expander_set_label_widget(cast[ptr Expander00](self.impl), cast[ptr Widget00](labelWidget.impl)) + +proc gtk_expander_set_resize_toplevel*(self: ptr Expander00; resizeToplevel: gboolean) {. + importc: "gtk_expander_set_resize_toplevel", libprag.} + +proc setResizeToplevel*(self: Expander; resizeToplevel: bool) = + gtk_expander_set_resize_toplevel(cast[ptr Expander00](self.impl), gboolean(resizeToplevel)) + +proc `resizeToplevel=`*(self: Expander; resizeToplevel: bool) = + gtk_expander_set_resize_toplevel(cast[ptr Expander00](self.impl), gboolean(resizeToplevel)) + +proc gtk_expander_set_spacing*(self: ptr Expander00; spacing: int32) {. + importc: "gtk_expander_set_spacing", libprag.} + +proc setSpacing*(self: Expander; spacing: int) = + gtk_expander_set_spacing(cast[ptr Expander00](self.impl), int32(spacing)) + +proc `spacing=`*(self: Expander; spacing: int) = + gtk_expander_set_spacing(cast[ptr Expander00](self.impl), int32(spacing)) + +proc gtk_expander_set_use_markup*(self: ptr Expander00; useMarkup: gboolean) {. + importc: "gtk_expander_set_use_markup", libprag.} + +proc setUseMarkup*(self: Expander; useMarkup: bool) = + gtk_expander_set_use_markup(cast[ptr Expander00](self.impl), gboolean(useMarkup)) + +proc `useMarkup=`*(self: Expander; useMarkup: bool) = + gtk_expander_set_use_markup(cast[ptr Expander00](self.impl), gboolean(useMarkup)) + +proc gtk_expander_set_use_underline*(self: ptr Expander00; useUnderline: gboolean) {. + importc: "gtk_expander_set_use_underline", libprag.} + +proc setUseUnderline*(self: Expander; useUnderline: bool) = + gtk_expander_set_use_underline(cast[ptr Expander00](self.impl), gboolean(useUnderline)) + +proc `useUnderline=`*(self: Expander; useUnderline: bool) = + gtk_expander_set_use_underline(cast[ptr Expander00](self.impl), gboolean(useUnderline)) + +type + ExpanderAccessiblePrivate00* {.pure.} = object + ExpanderAccessiblePrivate* = ref object + impl*: ptr ExpanderAccessiblePrivate00 + +type + ExpanderAccessible* = ref object of ContainerAccessible + ExpanderAccessible00* = object of ContainerAccessible00 + priv4: ptr ExpanderAccessiblePrivate00 + +type + ExpanderAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + ExpanderAccessibleClass* = ref object + impl*: ptr ExpanderAccessibleClass00 + +type + ExpanderClass00* {.pure.} = object + parentClass*: BinClass00 + activate*: proc(expander: ptr Expander00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ExpanderClass* = ref object + impl*: ptr ExpanderClass00 + +type + ExpanderStyle* {.size: sizeof(cint), pure.} = enum + collapsed = 0 + semiCollapsed = 1 + semiExpanded = 2 + expanded = 3 + + +type + FileChooserAction* {.size: sizeof(cint), pure.} = enum + open = 0 + save = 1 + selectFolder = 2 + createFolder = 3 + +type + FileChooserButtonPrivate00* {.pure.} = object + FileChooserButtonPrivate* = ref object + impl*: ptr FileChooserButtonPrivate00 + +type + FileChooserButton* = ref object of Box + FileChooserButton00* = object of Box00 + priv4: ptr FileChooserButtonPrivate00 + +proc scFileSet*(self: FileChooserButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "file-set", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_file_chooser_button_new*(title: cstring; action: FileChooserAction): ptr FileChooserButton00 {. + importc: "gtk_file_chooser_button_new", libprag.} + +proc newFileChooserButton*(title: string; action: FileChooserAction): FileChooserButton = + new(result, finalizeGObject) + result.impl = gtk_file_chooser_button_new(cstring(title), action) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFileChooserButton*[T](result: var T; title: string; action: FileChooserAction) = + assert(result is FileChooserButton) + new(result, finalizeGObject) + result.impl = gtk_file_chooser_button_new(cstring(title), action) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_file_chooser_button_new_with_dialog*(dialog: ptr Dialog00): ptr FileChooserButton00 {. + importc: "gtk_file_chooser_button_new_with_dialog", libprag.} + +proc newFileChooserButtonWithDialog*(dialog: Dialog): FileChooserButton = + new(result, finalizeGObject) + result.impl = gtk_file_chooser_button_new_with_dialog(cast[ptr Dialog00](dialog.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFileChooserButtonWithDialog*[T](result: var T; dialog: Dialog) = + assert(result is FileChooserButton) + new(result, finalizeGObject) + result.impl = gtk_file_chooser_button_new_with_dialog(cast[ptr Dialog00](dialog.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_file_chooser_button_get_focus_on_click*(self: ptr FileChooserButton00): gboolean {. + importc: "gtk_file_chooser_button_get_focus_on_click", libprag.} + +proc getFocusOnClick*(self: FileChooserButton): bool = + toBool(gtk_file_chooser_button_get_focus_on_click(cast[ptr FileChooserButton00](self.impl))) + +proc focusOnClick*(self: FileChooserButton): bool = + toBool(gtk_file_chooser_button_get_focus_on_click(cast[ptr FileChooserButton00](self.impl))) + +proc gtk_file_chooser_button_get_title*(self: ptr FileChooserButton00): cstring {. + importc: "gtk_file_chooser_button_get_title", libprag.} + +proc getTitle*(self: FileChooserButton): string = + let resul0 = gtk_file_chooser_button_get_title(cast[ptr FileChooserButton00](self.impl)) + result = $resul0 + +proc title*(self: FileChooserButton): string = + let resul0 = gtk_file_chooser_button_get_title(cast[ptr FileChooserButton00](self.impl)) + result = $resul0 + +proc gtk_file_chooser_button_get_width_chars*(self: ptr FileChooserButton00): int32 {. + importc: "gtk_file_chooser_button_get_width_chars", libprag.} + +proc getWidthChars*(self: FileChooserButton): int = + int(gtk_file_chooser_button_get_width_chars(cast[ptr FileChooserButton00](self.impl))) + +proc widthChars*(self: FileChooserButton): int = + int(gtk_file_chooser_button_get_width_chars(cast[ptr FileChooserButton00](self.impl))) + +proc gtk_file_chooser_button_set_focus_on_click*(self: ptr FileChooserButton00; focusOnClick: gboolean) {. + importc: "gtk_file_chooser_button_set_focus_on_click", libprag.} + +proc setFocusOnClick*(self: FileChooserButton; focusOnClick: bool) = + gtk_file_chooser_button_set_focus_on_click(cast[ptr FileChooserButton00](self.impl), gboolean(focusOnClick)) + +proc `focusOnClick=`*(self: FileChooserButton; focusOnClick: bool) = + gtk_file_chooser_button_set_focus_on_click(cast[ptr FileChooserButton00](self.impl), gboolean(focusOnClick)) + +proc gtk_file_chooser_button_set_title*(self: ptr FileChooserButton00; title: cstring) {. + importc: "gtk_file_chooser_button_set_title", libprag.} + +proc setTitle*(self: FileChooserButton; title: string) = + gtk_file_chooser_button_set_title(cast[ptr FileChooserButton00](self.impl), cstring(title)) + +proc `title=`*(self: FileChooserButton; title: string) = + gtk_file_chooser_button_set_title(cast[ptr FileChooserButton00](self.impl), cstring(title)) + +proc gtk_file_chooser_button_set_width_chars*(self: ptr FileChooserButton00; nChars: int32) {. + importc: "gtk_file_chooser_button_set_width_chars", libprag.} + +proc setWidthChars*(self: FileChooserButton; nChars: int) = + gtk_file_chooser_button_set_width_chars(cast[ptr FileChooserButton00](self.impl), int32(nChars)) + +proc `widthChars=`*(self: FileChooserButton; nChars: int) = + gtk_file_chooser_button_set_width_chars(cast[ptr FileChooserButton00](self.impl), int32(nChars)) + +type + FileChooserButtonClass00* {.pure.} = object + parentClass*: BoxClass00 + fileSet*: proc(fc: ptr FileChooserButton00) {.cdecl.} + GtkReserved1*: pointer + GtkReserved2*: pointer + GtkReserved3*: pointer + GtkReserved4*: pointer + FileChooserButtonClass* = ref object + impl*: ptr FileChooserButtonClass00 + +type + FileChooserConfirmation* {.size: sizeof(cint), pure.} = enum + confirm = 0 + acceptFilename = 1 + selectAgain = 2 + +type + FileChooserDialogPrivate00* {.pure.} = object + FileChooserDialogPrivate* = ref object + impl*: ptr FileChooserDialogPrivate00 + +type + FileChooserDialog* = ref object of Dialog + FileChooserDialog00* = object of Dialog00 + priv6: ptr FileChooserDialogPrivate00 + +type + FileChooserDialogClass00* {.pure.} = object + parentClass*: DialogClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + FileChooserDialogClass* = ref object + impl*: ptr FileChooserDialogClass00 + +type + FileChooserError* {.size: sizeof(cint), pure.} = enum + nonexistent = 0 + badFilename = 1 + alreadyExists = 2 + incompleteHostname = 3 + +proc gtk_file_chooser_error_quark*(): uint32 {. + importc: "gtk_file_chooser_error_quark", libprag.} + +type + NativeDialog* = ref object of gobject.Object + NativeDialog00* = object of gobject.Object00 + +proc scResponse*(self: NativeDialog; p: proc (self: ptr gobject.Object00; responseId: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "response", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_native_dialog_destroy*(self: ptr NativeDialog00) {. + importc: "gtk_native_dialog_destroy", libprag.} + +proc destroy*(self: NativeDialog) = + gtk_native_dialog_destroy(cast[ptr NativeDialog00](self.impl)) + +proc gtk_native_dialog_get_modal*(self: ptr NativeDialog00): gboolean {. + importc: "gtk_native_dialog_get_modal", libprag.} + +proc getModal*(self: NativeDialog): bool = + toBool(gtk_native_dialog_get_modal(cast[ptr NativeDialog00](self.impl))) + +proc modal*(self: NativeDialog): bool = + toBool(gtk_native_dialog_get_modal(cast[ptr NativeDialog00](self.impl))) + +proc gtk_native_dialog_get_title*(self: ptr NativeDialog00): cstring {. + importc: "gtk_native_dialog_get_title", libprag.} + +proc getTitle*(self: NativeDialog): string = + let resul0 = gtk_native_dialog_get_title(cast[ptr NativeDialog00](self.impl)) + result = $resul0 + +proc title*(self: NativeDialog): string = + let resul0 = gtk_native_dialog_get_title(cast[ptr NativeDialog00](self.impl)) + result = $resul0 + +proc gtk_native_dialog_get_transient_for*(self: ptr NativeDialog00): ptr Window00 {. + importc: "gtk_native_dialog_get_transient_for", libprag.} + +proc getTransientFor*(self: NativeDialog): Window = + let gobj = gtk_native_dialog_get_transient_for(cast[ptr NativeDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc transientFor*(self: NativeDialog): Window = + let gobj = gtk_native_dialog_get_transient_for(cast[ptr NativeDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_native_dialog_get_visible*(self: ptr NativeDialog00): gboolean {. + importc: "gtk_native_dialog_get_visible", libprag.} + +proc getVisible*(self: NativeDialog): bool = + toBool(gtk_native_dialog_get_visible(cast[ptr NativeDialog00](self.impl))) + +proc visible*(self: NativeDialog): bool = + toBool(gtk_native_dialog_get_visible(cast[ptr NativeDialog00](self.impl))) + +proc gtk_native_dialog_hide*(self: ptr NativeDialog00) {. + importc: "gtk_native_dialog_hide", libprag.} + +proc hide*(self: NativeDialog) = + gtk_native_dialog_hide(cast[ptr NativeDialog00](self.impl)) + +proc gtk_native_dialog_run*(self: ptr NativeDialog00): int32 {. + importc: "gtk_native_dialog_run", libprag.} + +proc run*(self: NativeDialog): int = + int(gtk_native_dialog_run(cast[ptr NativeDialog00](self.impl))) + +proc gtk_native_dialog_set_modal*(self: ptr NativeDialog00; modal: gboolean) {. + importc: "gtk_native_dialog_set_modal", libprag.} + +proc setModal*(self: NativeDialog; modal: bool) = + gtk_native_dialog_set_modal(cast[ptr NativeDialog00](self.impl), gboolean(modal)) + +proc `modal=`*(self: NativeDialog; modal: bool) = + gtk_native_dialog_set_modal(cast[ptr NativeDialog00](self.impl), gboolean(modal)) + +proc gtk_native_dialog_set_title*(self: ptr NativeDialog00; title: cstring) {. + importc: "gtk_native_dialog_set_title", libprag.} + +proc setTitle*(self: NativeDialog; title: string) = + gtk_native_dialog_set_title(cast[ptr NativeDialog00](self.impl), cstring(title)) + +proc `title=`*(self: NativeDialog; title: string) = + gtk_native_dialog_set_title(cast[ptr NativeDialog00](self.impl), cstring(title)) + +proc gtk_native_dialog_set_transient_for*(self: ptr NativeDialog00; parent: ptr Window00) {. + importc: "gtk_native_dialog_set_transient_for", libprag.} + +proc setTransientFor*(self: NativeDialog; parent: Window) = + gtk_native_dialog_set_transient_for(cast[ptr NativeDialog00](self.impl), cast[ptr Window00](parent.impl)) + +proc `transientFor=`*(self: NativeDialog; parent: Window) = + gtk_native_dialog_set_transient_for(cast[ptr NativeDialog00](self.impl), cast[ptr Window00](parent.impl)) + +proc gtk_native_dialog_show*(self: ptr NativeDialog00) {. + importc: "gtk_native_dialog_show", libprag.} + +proc show*(self: NativeDialog) = + gtk_native_dialog_show(cast[ptr NativeDialog00](self.impl)) + +type + FileChooserNative* = ref object of NativeDialog + FileChooserNative00* = object of NativeDialog00 + +proc gtk_file_chooser_native_new*(title: cstring; parent: ptr Window00; action: FileChooserAction; + acceptLabel: cstring; cancelLabel: cstring): ptr FileChooserNative00 {. + importc: "gtk_file_chooser_native_new", libprag.} + +proc newFileChooserNative*(title: string; parent: Window; action: FileChooserAction; + acceptLabel: string; cancelLabel: string): FileChooserNative = + new(result, finalizeGObject) + result.impl = gtk_file_chooser_native_new(cstring(title), cast[ptr Window00](parent.impl), action, cstring(acceptLabel), cstring(cancelLabel)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFileChooserNative*[T](result: var T; title: string; parent: Window; action: FileChooserAction; + acceptLabel: string; cancelLabel: string) = + assert(result is FileChooserNative) + new(result, finalizeGObject) + result.impl = gtk_file_chooser_native_new(cstring(title), cast[ptr Window00](parent.impl), action, cstring(acceptLabel), cstring(cancelLabel)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_file_chooser_native_get_accept_label*(self: ptr FileChooserNative00): cstring {. + importc: "gtk_file_chooser_native_get_accept_label", libprag.} + +proc getAcceptLabel*(self: FileChooserNative): string = + let resul0 = gtk_file_chooser_native_get_accept_label(cast[ptr FileChooserNative00](self.impl)) + result = $resul0 + +proc acceptLabel*(self: FileChooserNative): string = + let resul0 = gtk_file_chooser_native_get_accept_label(cast[ptr FileChooserNative00](self.impl)) + result = $resul0 + +proc gtk_file_chooser_native_get_cancel_label*(self: ptr FileChooserNative00): cstring {. + importc: "gtk_file_chooser_native_get_cancel_label", libprag.} + +proc getCancelLabel*(self: FileChooserNative): string = + let resul0 = gtk_file_chooser_native_get_cancel_label(cast[ptr FileChooserNative00](self.impl)) + result = $resul0 + +proc cancelLabel*(self: FileChooserNative): string = + let resul0 = gtk_file_chooser_native_get_cancel_label(cast[ptr FileChooserNative00](self.impl)) + result = $resul0 + +proc gtk_file_chooser_native_set_accept_label*(self: ptr FileChooserNative00; acceptLabel: cstring) {. + importc: "gtk_file_chooser_native_set_accept_label", libprag.} + +proc setAcceptLabel*(self: FileChooserNative; acceptLabel: string) = + gtk_file_chooser_native_set_accept_label(cast[ptr FileChooserNative00](self.impl), cstring(acceptLabel)) + +proc `acceptLabel=`*(self: FileChooserNative; acceptLabel: string) = + gtk_file_chooser_native_set_accept_label(cast[ptr FileChooserNative00](self.impl), cstring(acceptLabel)) + +proc gtk_file_chooser_native_set_cancel_label*(self: ptr FileChooserNative00; cancelLabel: cstring) {. + importc: "gtk_file_chooser_native_set_cancel_label", libprag.} + +proc setCancelLabel*(self: FileChooserNative; cancelLabel: string) = + gtk_file_chooser_native_set_cancel_label(cast[ptr FileChooserNative00](self.impl), cstring(cancelLabel)) + +proc `cancelLabel=`*(self: FileChooserNative; cancelLabel: string) = + gtk_file_chooser_native_set_cancel_label(cast[ptr FileChooserNative00](self.impl), cstring(cancelLabel)) + +type + NativeDialogClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + response*: proc(self: ptr NativeDialog00; responseId: int32) {.cdecl.} + show*: proc(self: ptr NativeDialog00) {.cdecl.} + hide*: proc(self: ptr NativeDialog00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + NativeDialogClass* = ref object + impl*: ptr NativeDialogClass00 + +type + FileChooserNativeClass00* {.pure.} = object + parentClass*: NativeDialogClass00 + FileChooserNativeClass* = ref object + impl*: ptr FileChooserNativeClass00 + +type + FileChooserWidgetPrivate00* {.pure.} = object + FileChooserWidgetPrivate* = ref object + impl*: ptr FileChooserWidgetPrivate00 + +type + FileChooserWidget* = ref object of Box + FileChooserWidget00* = object of Box00 + priv4: ptr FileChooserWidgetPrivate00 + +proc scDesktopFolder*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "desktop-folder", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDownFolder*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "down-folder", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scHomeFolder*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "home-folder", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scLocationPopup*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; path: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "location-popup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scLocationPopupOnPaste*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "location-popup-on-paste", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scLocationTogglePopup*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "location-toggle-popup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPlacesShortcut*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "places-shortcut", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scQuickBookmark*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; bookmarkIndex: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "quick-bookmark", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRecentShortcut*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "recent-shortcut", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSearchShortcut*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "search-shortcut", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShowHidden*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-hidden", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUpFolder*(self: FileChooserWidget; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "up-folder", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_file_chooser_widget_new*(action: FileChooserAction): ptr FileChooserWidget00 {. + importc: "gtk_file_chooser_widget_new", libprag.} + +proc newFileChooserWidget*(action: FileChooserAction): FileChooserWidget = + new(result, finalizeGObject) + result.impl = gtk_file_chooser_widget_new(action) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFileChooserWidget*[T](result: var T; action: FileChooserAction) = + assert(result is FileChooserWidget) + new(result, finalizeGObject) + result.impl = gtk_file_chooser_widget_new(action) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + FileChooserWidgetClass00* {.pure.} = object + parentClass*: BoxClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + FileChooserWidgetClass* = ref object + impl*: ptr FileChooserWidgetClass00 + +type + FileFilter* = ref object of gobject.InitiallyUnowned + FileFilter00* = object of gobject.InitiallyUnowned00 + +proc gtk_file_filter_new*(): ptr FileFilter00 {. + importc: "gtk_file_filter_new", libprag.} + +proc newFileFilter*(): FileFilter = + new(result, finalizeGObject) + result.impl = gtk_file_filter_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFileFilter*[T](result: var T) = + assert(result is FileFilter) + new(result, finalizeGObject) + result.impl = gtk_file_filter_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_file_filter_new_from_gvariant*(variant: ptr glib.Variant00): ptr FileFilter00 {. + importc: "gtk_file_filter_new_from_gvariant", libprag.} + +proc newFileFilterFromGvariant*(variant: glib.Variant): FileFilter = + new(result, finalizeGObject) + result.impl = gtk_file_filter_new_from_gvariant(cast[ptr glib.Variant00](variant.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFileFilterFromGvariant*[T](result: var T; variant: glib.Variant) = + assert(result is FileFilter) + new(result, finalizeGObject) + result.impl = gtk_file_filter_new_from_gvariant(cast[ptr glib.Variant00](variant.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_file_filter_add_mime_type*(self: ptr FileFilter00; mimeType: cstring) {. + importc: "gtk_file_filter_add_mime_type", libprag.} + +proc addMimeType*(self: FileFilter; mimeType: string) = + gtk_file_filter_add_mime_type(cast[ptr FileFilter00](self.impl), cstring(mimeType)) + +proc gtk_file_filter_add_pattern*(self: ptr FileFilter00; pattern: cstring) {. + importc: "gtk_file_filter_add_pattern", libprag.} + +proc addPattern*(self: FileFilter; pattern: string) = + gtk_file_filter_add_pattern(cast[ptr FileFilter00](self.impl), cstring(pattern)) + +proc gtk_file_filter_add_pixbuf_formats*(self: ptr FileFilter00) {. + importc: "gtk_file_filter_add_pixbuf_formats", libprag.} + +proc addPixbufFormats*(self: FileFilter) = + gtk_file_filter_add_pixbuf_formats(cast[ptr FileFilter00](self.impl)) + +proc gtk_file_filter_get_name*(self: ptr FileFilter00): cstring {. + importc: "gtk_file_filter_get_name", libprag.} + +proc getName*(self: FileFilter): string = + let resul0 = gtk_file_filter_get_name(cast[ptr FileFilter00](self.impl)) + result = $resul0 + +proc name*(self: FileFilter): string = + let resul0 = gtk_file_filter_get_name(cast[ptr FileFilter00](self.impl)) + result = $resul0 + +proc gtk_file_filter_set_name*(self: ptr FileFilter00; name: cstring) {. + importc: "gtk_file_filter_set_name", libprag.} + +proc setName*(self: FileFilter; name: string) = + gtk_file_filter_set_name(cast[ptr FileFilter00](self.impl), cstring(name)) + +proc `name=`*(self: FileFilter; name: string) = + gtk_file_filter_set_name(cast[ptr FileFilter00](self.impl), cstring(name)) + +proc gtk_file_filter_to_gvariant*(self: ptr FileFilter00): ptr glib.Variant00 {. + importc: "gtk_file_filter_to_gvariant", libprag.} + +proc toGvariant*(self: FileFilter): glib.Variant = + new(result) + result.impl = gtk_file_filter_to_gvariant(cast[ptr FileFilter00](self.impl)) + +type + FileFilterFlag* {.size: sizeof(cint), pure.} = enum + filename = 1 + uri = 2 + displayName = 3 + mimeType = 4 + + FileFilterFlags* {.size: sizeof(cint).} = set[FileFilterFlag] + +type + FileFilterInfo00* {.pure.} = object + contains*: FileFilterFlags + filename*: cstring + uri*: cstring + displayName*: cstring + mimeType*: cstring + FileFilterInfo* = ref object + impl*: ptr FileFilterInfo00 + +proc gtk_file_filter_filter*(self: ptr FileFilter00; filterInfo: ptr FileFilterInfo00): gboolean {. + importc: "gtk_file_filter_filter", libprag.} + +proc filter*(self: FileFilter; filterInfo: FileFilterInfo): bool = + toBool(gtk_file_filter_filter(cast[ptr FileFilter00](self.impl), cast[ptr FileFilterInfo00](filterInfo.impl))) + +proc gtk_file_filter_get_needed*(self: ptr FileFilter00): FileFilterFlags {. + importc: "gtk_file_filter_get_needed", libprag.} + +proc getNeeded*(self: FileFilter): FileFilterFlags = + gtk_file_filter_get_needed(cast[ptr FileFilter00](self.impl)) + +proc needed*(self: FileFilter): FileFilterFlags = + gtk_file_filter_get_needed(cast[ptr FileFilter00](self.impl)) + +type + FileFilterFunc* = proc (filterInfo: ptr FileFilterInfo00; data: pointer): gboolean {.cdecl.} + +proc gtk_file_filter_add_custom*(self: ptr FileFilter00; needed: FileFilterFlags; `func`: FileFilterFunc; + data: pointer; notify: DestroyNotify) {. + importc: "gtk_file_filter_add_custom", libprag.} + +proc addCustom*(self: FileFilter; needed: FileFilterFlags; `func`: FileFilterFunc; + data: pointer; notify: DestroyNotify) = + gtk_file_filter_add_custom(cast[ptr FileFilter00](self.impl), needed, `func`, data, notify) + +type + FixedPrivate00* {.pure.} = object + FixedPrivate* = ref object + impl*: ptr FixedPrivate00 + +type + Fixed* = ref object of Container + Fixed00* = object of Container00 + priv3: ptr FixedPrivate00 + +proc gtk_fixed_new*(): ptr Fixed00 {. + importc: "gtk_fixed_new", libprag.} + +proc newFixed*(): Fixed = + new(result, finalizeGObject) + result.impl = gtk_fixed_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFixed*[T](result: var T) = + assert(result is Fixed) + new(result, finalizeGObject) + result.impl = gtk_fixed_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_fixed_move*(self: ptr Fixed00; widget: ptr Widget00; x: int32; + y: int32) {. + importc: "gtk_fixed_move", libprag.} + +proc move*(self: Fixed; widget: Widget; x: int; y: int) = + gtk_fixed_move(cast[ptr Fixed00](self.impl), cast[ptr Widget00](widget.impl), int32(x), int32(y)) + +proc gtk_fixed_put*(self: ptr Fixed00; widget: ptr Widget00; x: int32; + y: int32) {. + importc: "gtk_fixed_put", libprag.} + +proc put*(self: Fixed; widget: Widget; x: int; y: int) = + gtk_fixed_put(cast[ptr Fixed00](self.impl), cast[ptr Widget00](widget.impl), int32(x), int32(y)) + +type + FixedChild00* {.pure.} = object + widget*: ptr Widget00 + x*: int32 + y*: int32 + FixedChild* = ref object + impl*: ptr FixedChild00 + +type + FixedClass00* {.pure.} = object + parentClass*: ContainerClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + FixedClass* = ref object + impl*: ptr FixedClass00 + +type + FlowBoxChild* = ref object of Bin + FlowBoxChild00* = object of Bin00 + +proc scActivate*(self: FlowBoxChild; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_flow_box_child_new*(): ptr FlowBoxChild00 {. + importc: "gtk_flow_box_child_new", libprag.} + +proc newFlowBoxChild*(): FlowBoxChild = + new(result, finalizeGObject) + result.impl = gtk_flow_box_child_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFlowBoxChild*[T](result: var T) = + assert(result is FlowBoxChild) + new(result, finalizeGObject) + result.impl = gtk_flow_box_child_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_flow_box_child_changed*(self: ptr FlowBoxChild00) {. + importc: "gtk_flow_box_child_changed", libprag.} + +proc changed*(self: FlowBoxChild) = + gtk_flow_box_child_changed(cast[ptr FlowBoxChild00](self.impl)) + +proc gtk_flow_box_child_get_index*(self: ptr FlowBoxChild00): int32 {. + importc: "gtk_flow_box_child_get_index", libprag.} + +proc getIndex*(self: FlowBoxChild): int = + int(gtk_flow_box_child_get_index(cast[ptr FlowBoxChild00](self.impl))) + +proc index*(self: FlowBoxChild): int = + int(gtk_flow_box_child_get_index(cast[ptr FlowBoxChild00](self.impl))) + +proc gtk_flow_box_child_is_selected*(self: ptr FlowBoxChild00): gboolean {. + importc: "gtk_flow_box_child_is_selected", libprag.} + +proc isSelected*(self: FlowBoxChild): bool = + toBool(gtk_flow_box_child_is_selected(cast[ptr FlowBoxChild00](self.impl))) + +type + FlowBox* = ref object of Container + FlowBox00* = object of Container00 + +proc scActivateCursorChild*(self: FlowBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-cursor-child", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scChildActivated*(self: FlowBox; p: proc (self: ptr gobject.Object00; child: FlowBoxChild00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "child-activated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveCursor*(self: FlowBox; p: proc (self: ptr gobject.Object00; step: MovementStep; count: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectAll*(self: FlowBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select-all", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectedChildrenChanged*(self: FlowBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "selected-children-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleCursorChild*(self: FlowBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-cursor-child", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUnselectAll*(self: FlowBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "unselect-all", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_flow_box_new*(): ptr FlowBox00 {. + importc: "gtk_flow_box_new", libprag.} + +proc newFlowBox*(): FlowBox = + new(result, finalizeGObject) + result.impl = gtk_flow_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFlowBox*[T](result: var T) = + assert(result is FlowBox) + new(result, finalizeGObject) + result.impl = gtk_flow_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_flow_box_get_activate_on_single_click*(self: ptr FlowBox00): gboolean {. + importc: "gtk_flow_box_get_activate_on_single_click", libprag.} + +proc getActivateOnSingleClick*(self: FlowBox): bool = + toBool(gtk_flow_box_get_activate_on_single_click(cast[ptr FlowBox00](self.impl))) + +proc activateOnSingleClick*(self: FlowBox): bool = + toBool(gtk_flow_box_get_activate_on_single_click(cast[ptr FlowBox00](self.impl))) + +proc gtk_flow_box_get_child_at_index*(self: ptr FlowBox00; idx: int32): ptr FlowBoxChild00 {. + importc: "gtk_flow_box_get_child_at_index", libprag.} + +proc getChildAtIndex*(self: FlowBox; idx: int): FlowBoxChild = + let gobj = gtk_flow_box_get_child_at_index(cast[ptr FlowBox00](self.impl), int32(idx)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FlowBoxChild](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc childAtIndex*(self: FlowBox; idx: int): FlowBoxChild = + let gobj = gtk_flow_box_get_child_at_index(cast[ptr FlowBox00](self.impl), int32(idx)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FlowBoxChild](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_flow_box_get_child_at_pos*(self: ptr FlowBox00; x: int32; y: int32): ptr FlowBoxChild00 {. + importc: "gtk_flow_box_get_child_at_pos", libprag.} + +proc getChildAtPos*(self: FlowBox; x: int; y: int): FlowBoxChild = + let gobj = gtk_flow_box_get_child_at_pos(cast[ptr FlowBox00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FlowBoxChild](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc childAtPos*(self: FlowBox; x: int; y: int): FlowBoxChild = + let gobj = gtk_flow_box_get_child_at_pos(cast[ptr FlowBox00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FlowBoxChild](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_flow_box_get_column_spacing*(self: ptr FlowBox00): uint32 {. + importc: "gtk_flow_box_get_column_spacing", libprag.} + +proc getColumnSpacing*(self: FlowBox): int = + int(gtk_flow_box_get_column_spacing(cast[ptr FlowBox00](self.impl))) + +proc columnSpacing*(self: FlowBox): int = + int(gtk_flow_box_get_column_spacing(cast[ptr FlowBox00](self.impl))) + +proc gtk_flow_box_get_homogeneous*(self: ptr FlowBox00): gboolean {. + importc: "gtk_flow_box_get_homogeneous", libprag.} + +proc getHomogeneous*(self: FlowBox): bool = + toBool(gtk_flow_box_get_homogeneous(cast[ptr FlowBox00](self.impl))) + +proc homogeneous*(self: FlowBox): bool = + toBool(gtk_flow_box_get_homogeneous(cast[ptr FlowBox00](self.impl))) + +proc gtk_flow_box_get_max_children_per_line*(self: ptr FlowBox00): uint32 {. + importc: "gtk_flow_box_get_max_children_per_line", libprag.} + +proc getMaxChildrenPerLine*(self: FlowBox): int = + int(gtk_flow_box_get_max_children_per_line(cast[ptr FlowBox00](self.impl))) + +proc maxChildrenPerLine*(self: FlowBox): int = + int(gtk_flow_box_get_max_children_per_line(cast[ptr FlowBox00](self.impl))) + +proc gtk_flow_box_get_min_children_per_line*(self: ptr FlowBox00): uint32 {. + importc: "gtk_flow_box_get_min_children_per_line", libprag.} + +proc getMinChildrenPerLine*(self: FlowBox): int = + int(gtk_flow_box_get_min_children_per_line(cast[ptr FlowBox00](self.impl))) + +proc minChildrenPerLine*(self: FlowBox): int = + int(gtk_flow_box_get_min_children_per_line(cast[ptr FlowBox00](self.impl))) + +proc gtk_flow_box_get_row_spacing*(self: ptr FlowBox00): uint32 {. + importc: "gtk_flow_box_get_row_spacing", libprag.} + +proc getRowSpacing*(self: FlowBox): int = + int(gtk_flow_box_get_row_spacing(cast[ptr FlowBox00](self.impl))) + +proc rowSpacing*(self: FlowBox): int = + int(gtk_flow_box_get_row_spacing(cast[ptr FlowBox00](self.impl))) + +proc gtk_flow_box_get_selected_children*(self: ptr FlowBox00): ptr pointer {. + importc: "gtk_flow_box_get_selected_children", libprag.} + +proc getSelectedChildren*(self: FlowBox): ptr pointer = + gtk_flow_box_get_selected_children(cast[ptr FlowBox00](self.impl)) + +proc selectedChildren*(self: FlowBox): ptr pointer = + gtk_flow_box_get_selected_children(cast[ptr FlowBox00](self.impl)) + +proc gtk_flow_box_insert*(self: ptr FlowBox00; widget: ptr Widget00; position: int32) {. + importc: "gtk_flow_box_insert", libprag.} + +proc insert*(self: FlowBox; widget: Widget; position: int) = + gtk_flow_box_insert(cast[ptr FlowBox00](self.impl), cast[ptr Widget00](widget.impl), int32(position)) + +proc gtk_flow_box_invalidate_filter*(self: ptr FlowBox00) {. + importc: "gtk_flow_box_invalidate_filter", libprag.} + +proc invalidateFilter*(self: FlowBox) = + gtk_flow_box_invalidate_filter(cast[ptr FlowBox00](self.impl)) + +proc gtk_flow_box_invalidate_sort*(self: ptr FlowBox00) {. + importc: "gtk_flow_box_invalidate_sort", libprag.} + +proc invalidateSort*(self: FlowBox) = + gtk_flow_box_invalidate_sort(cast[ptr FlowBox00](self.impl)) + +proc gtk_flow_box_select_all*(self: ptr FlowBox00) {. + importc: "gtk_flow_box_select_all", libprag.} + +proc selectAll*(self: FlowBox) = + gtk_flow_box_select_all(cast[ptr FlowBox00](self.impl)) + +proc gtk_flow_box_select_child*(self: ptr FlowBox00; child: ptr FlowBoxChild00) {. + importc: "gtk_flow_box_select_child", libprag.} + +proc selectChild*(self: FlowBox; child: FlowBoxChild) = + gtk_flow_box_select_child(cast[ptr FlowBox00](self.impl), cast[ptr FlowBoxChild00](child.impl)) + +proc gtk_flow_box_set_activate_on_single_click*(self: ptr FlowBox00; single: gboolean) {. + importc: "gtk_flow_box_set_activate_on_single_click", libprag.} + +proc setActivateOnSingleClick*(self: FlowBox; single: bool) = + gtk_flow_box_set_activate_on_single_click(cast[ptr FlowBox00](self.impl), gboolean(single)) + +proc `activateOnSingleClick=`*(self: FlowBox; single: bool) = + gtk_flow_box_set_activate_on_single_click(cast[ptr FlowBox00](self.impl), gboolean(single)) + +proc gtk_flow_box_set_column_spacing*(self: ptr FlowBox00; spacing: uint32) {. + importc: "gtk_flow_box_set_column_spacing", libprag.} + +proc setColumnSpacing*(self: FlowBox; spacing: int) = + gtk_flow_box_set_column_spacing(cast[ptr FlowBox00](self.impl), uint32(spacing)) + +proc `columnSpacing=`*(self: FlowBox; spacing: int) = + gtk_flow_box_set_column_spacing(cast[ptr FlowBox00](self.impl), uint32(spacing)) + +proc gtk_flow_box_set_hadjustment*(self: ptr FlowBox00; adjustment: ptr Adjustment00) {. + importc: "gtk_flow_box_set_hadjustment", libprag.} + +proc setHadjustment*(self: FlowBox; adjustment: Adjustment) = + gtk_flow_box_set_hadjustment(cast[ptr FlowBox00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `hadjustment=`*(self: FlowBox; adjustment: Adjustment) = + gtk_flow_box_set_hadjustment(cast[ptr FlowBox00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_flow_box_set_homogeneous*(self: ptr FlowBox00; homogeneous: gboolean) {. + importc: "gtk_flow_box_set_homogeneous", libprag.} + +proc setHomogeneous*(self: FlowBox; homogeneous: bool) = + gtk_flow_box_set_homogeneous(cast[ptr FlowBox00](self.impl), gboolean(homogeneous)) + +proc `homogeneous=`*(self: FlowBox; homogeneous: bool) = + gtk_flow_box_set_homogeneous(cast[ptr FlowBox00](self.impl), gboolean(homogeneous)) + +proc gtk_flow_box_set_max_children_per_line*(self: ptr FlowBox00; nChildren: uint32) {. + importc: "gtk_flow_box_set_max_children_per_line", libprag.} + +proc setMaxChildrenPerLine*(self: FlowBox; nChildren: int) = + gtk_flow_box_set_max_children_per_line(cast[ptr FlowBox00](self.impl), uint32(nChildren)) + +proc `maxChildrenPerLine=`*(self: FlowBox; nChildren: int) = + gtk_flow_box_set_max_children_per_line(cast[ptr FlowBox00](self.impl), uint32(nChildren)) + +proc gtk_flow_box_set_min_children_per_line*(self: ptr FlowBox00; nChildren: uint32) {. + importc: "gtk_flow_box_set_min_children_per_line", libprag.} + +proc setMinChildrenPerLine*(self: FlowBox; nChildren: int) = + gtk_flow_box_set_min_children_per_line(cast[ptr FlowBox00](self.impl), uint32(nChildren)) + +proc `minChildrenPerLine=`*(self: FlowBox; nChildren: int) = + gtk_flow_box_set_min_children_per_line(cast[ptr FlowBox00](self.impl), uint32(nChildren)) + +proc gtk_flow_box_set_row_spacing*(self: ptr FlowBox00; spacing: uint32) {. + importc: "gtk_flow_box_set_row_spacing", libprag.} + +proc setRowSpacing*(self: FlowBox; spacing: int) = + gtk_flow_box_set_row_spacing(cast[ptr FlowBox00](self.impl), uint32(spacing)) + +proc `rowSpacing=`*(self: FlowBox; spacing: int) = + gtk_flow_box_set_row_spacing(cast[ptr FlowBox00](self.impl), uint32(spacing)) + +proc gtk_flow_box_set_vadjustment*(self: ptr FlowBox00; adjustment: ptr Adjustment00) {. + importc: "gtk_flow_box_set_vadjustment", libprag.} + +proc setVadjustment*(self: FlowBox; adjustment: Adjustment) = + gtk_flow_box_set_vadjustment(cast[ptr FlowBox00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `vadjustment=`*(self: FlowBox; adjustment: Adjustment) = + gtk_flow_box_set_vadjustment(cast[ptr FlowBox00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_flow_box_unselect_all*(self: ptr FlowBox00) {. + importc: "gtk_flow_box_unselect_all", libprag.} + +proc unselectAll*(self: FlowBox) = + gtk_flow_box_unselect_all(cast[ptr FlowBox00](self.impl)) + +proc gtk_flow_box_unselect_child*(self: ptr FlowBox00; child: ptr FlowBoxChild00) {. + importc: "gtk_flow_box_unselect_child", libprag.} + +proc unselectChild*(self: FlowBox; child: FlowBoxChild) = + gtk_flow_box_unselect_child(cast[ptr FlowBox00](self.impl), cast[ptr FlowBoxChild00](child.impl)) + +type + SelectionMode* {.size: sizeof(cint), pure.} = enum + none = 0 + single = 1 + browse = 2 + multiple = 3 + +proc gtk_flow_box_get_selection_mode*(self: ptr FlowBox00): SelectionMode {. + importc: "gtk_flow_box_get_selection_mode", libprag.} + +proc getSelectionMode*(self: FlowBox): SelectionMode = + gtk_flow_box_get_selection_mode(cast[ptr FlowBox00](self.impl)) + +proc selectionMode*(self: FlowBox): SelectionMode = + gtk_flow_box_get_selection_mode(cast[ptr FlowBox00](self.impl)) + +proc gtk_flow_box_set_selection_mode*(self: ptr FlowBox00; mode: SelectionMode) {. + importc: "gtk_flow_box_set_selection_mode", libprag.} + +proc setSelectionMode*(self: FlowBox; mode: SelectionMode) = + gtk_flow_box_set_selection_mode(cast[ptr FlowBox00](self.impl), mode) + +proc `selectionMode=`*(self: FlowBox; mode: SelectionMode) = + gtk_flow_box_set_selection_mode(cast[ptr FlowBox00](self.impl), mode) + +type + FlowBoxAccessiblePrivate00* {.pure.} = object + FlowBoxAccessiblePrivate* = ref object + impl*: ptr FlowBoxAccessiblePrivate00 + +type + FlowBoxAccessible* = ref object of ContainerAccessible + FlowBoxAccessible00* = object of ContainerAccessible00 + priv4: ptr FlowBoxAccessiblePrivate00 + +type + FlowBoxAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + FlowBoxAccessibleClass* = ref object + impl*: ptr FlowBoxAccessibleClass00 + +type + FlowBoxChildAccessible* = ref object of ContainerAccessible + FlowBoxChildAccessible00* = object of ContainerAccessible00 + +type + FlowBoxChildAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + FlowBoxChildAccessibleClass* = ref object + impl*: ptr FlowBoxChildAccessibleClass00 + +type + FlowBoxChildClass00* {.pure.} = object + parentClass*: BinClass00 + activate*: proc(child: ptr FlowBoxChild00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + FlowBoxChildClass* = ref object + impl*: ptr FlowBoxChildClass00 + +type + FlowBoxClass00* {.pure.} = object + parentClass*: ContainerClass00 + childActivated*: proc(box: ptr FlowBox00; child: ptr FlowBoxChild00) {.cdecl.} + selectedChildrenChanged*: proc(box: ptr FlowBox00) {.cdecl.} + activateCursorChild*: proc(box: ptr FlowBox00) {.cdecl.} + toggleCursorChild*: proc(box: ptr FlowBox00) {.cdecl.} + moveCursor*: proc(box: ptr FlowBox00; step: MovementStep; count: int32): gboolean {.cdecl.} + selectAll*: proc(box: ptr FlowBox00) {.cdecl.} + unselectAll*: proc(box: ptr FlowBox00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + FlowBoxClass* = ref object + impl*: ptr FlowBoxClass00 + +type + FlowBoxCreateWidgetFunc* = proc (item: pointer; userData: pointer): ptr Widget00 {.cdecl.} + +proc gtk_flow_box_bind_model*(self: ptr FlowBox00; model: ptr gio.ListModel00; createWidgetFunc: FlowBoxCreateWidgetFunc; + userData: pointer; userDataFreeFunc: DestroyNotify) {. + importc: "gtk_flow_box_bind_model", libprag.} + +proc bindModel*(self: FlowBox; model: gio.ListModel; createWidgetFunc: FlowBoxCreateWidgetFunc; + userData: pointer; userDataFreeFunc: DestroyNotify) = + gtk_flow_box_bind_model(cast[ptr FlowBox00](self.impl), cast[ptr gio.ListModel00](model.impl), createWidgetFunc, userData, userDataFreeFunc) + +type + FlowBoxFilterFunc* = proc (child: ptr FlowBoxChild00; userData: pointer): gboolean {.cdecl.} + +proc gtk_flow_box_set_filter_func*(self: ptr FlowBox00; filterFunc: FlowBoxFilterFunc; + userData: pointer; destroy: DestroyNotify) {. + importc: "gtk_flow_box_set_filter_func", libprag.} + +proc setFilterFunc*(self: FlowBox; filterFunc: FlowBoxFilterFunc; userData: pointer; + destroy: DestroyNotify) = + gtk_flow_box_set_filter_func(cast[ptr FlowBox00](self.impl), filterFunc, userData, destroy) + +type + FlowBoxForeachFunc* = proc (box: ptr FlowBox00; child: ptr FlowBoxChild00; userData: pointer) {.cdecl.} + +proc gtk_flow_box_selected_foreach*(self: ptr FlowBox00; `func`: FlowBoxForeachFunc; data: pointer) {. + importc: "gtk_flow_box_selected_foreach", libprag.} + +proc selectedForeach*(self: FlowBox; `func`: FlowBoxForeachFunc; data: pointer) = + gtk_flow_box_selected_foreach(cast[ptr FlowBox00](self.impl), `func`, data) + +type + FlowBoxSortFunc* = proc (child1: ptr FlowBoxChild00; child2: ptr FlowBoxChild00; + userData: pointer): int32 {.cdecl.} + +proc gtk_flow_box_set_sort_func*(self: ptr FlowBox00; sortFunc: FlowBoxSortFunc; userData: pointer; + destroy: DestroyNotify) {. + importc: "gtk_flow_box_set_sort_func", libprag.} + +proc setSortFunc*(self: FlowBox; sortFunc: FlowBoxSortFunc; userData: pointer; + destroy: DestroyNotify) = + gtk_flow_box_set_sort_func(cast[ptr FlowBox00](self.impl), sortFunc, userData, destroy) + +type + FontButtonPrivate00* {.pure.} = object + FontButtonPrivate* = ref object + impl*: ptr FontButtonPrivate00 + +type + FontButton* = ref object of Button + FontButton00* = object of Button00 + priv5: ptr FontButtonPrivate00 + +proc scFontSet*(self: FontButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "font-set", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_font_button_new*(): ptr FontButton00 {. + importc: "gtk_font_button_new", libprag.} + +proc newFontButton*(): FontButton = + new(result, finalizeGObject) + result.impl = gtk_font_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFontButton*[T](result: var T) = + assert(result is FontButton) + new(result, finalizeGObject) + result.impl = gtk_font_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_button_new_with_font*(fontname: cstring): ptr FontButton00 {. + importc: "gtk_font_button_new_with_font", libprag.} + +proc newFontButtonWithFont*(fontname: string): FontButton = + new(result, finalizeGObject) + result.impl = gtk_font_button_new_with_font(cstring(fontname)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFontButtonWithFont*[T](result: var T; fontname: string) = + assert(result is FontButton) + new(result, finalizeGObject) + result.impl = gtk_font_button_new_with_font(cstring(fontname)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_button_get_font_name*(self: ptr FontButton00): cstring {. + importc: "gtk_font_button_get_font_name", libprag.} + +proc getFontName*(self: FontButton): string = + let resul0 = gtk_font_button_get_font_name(cast[ptr FontButton00](self.impl)) + result = $resul0 + +proc fontName*(self: FontButton): string = + let resul0 = gtk_font_button_get_font_name(cast[ptr FontButton00](self.impl)) + result = $resul0 + +proc gtk_font_button_get_show_size*(self: ptr FontButton00): gboolean {. + importc: "gtk_font_button_get_show_size", libprag.} + +proc getShowSize*(self: FontButton): bool = + toBool(gtk_font_button_get_show_size(cast[ptr FontButton00](self.impl))) + +proc showSize*(self: FontButton): bool = + toBool(gtk_font_button_get_show_size(cast[ptr FontButton00](self.impl))) + +proc gtk_font_button_get_show_style*(self: ptr FontButton00): gboolean {. + importc: "gtk_font_button_get_show_style", libprag.} + +proc getShowStyle*(self: FontButton): bool = + toBool(gtk_font_button_get_show_style(cast[ptr FontButton00](self.impl))) + +proc showStyle*(self: FontButton): bool = + toBool(gtk_font_button_get_show_style(cast[ptr FontButton00](self.impl))) + +proc gtk_font_button_get_title*(self: ptr FontButton00): cstring {. + importc: "gtk_font_button_get_title", libprag.} + +proc getTitle*(self: FontButton): string = + let resul0 = gtk_font_button_get_title(cast[ptr FontButton00](self.impl)) + result = $resul0 + +proc title*(self: FontButton): string = + let resul0 = gtk_font_button_get_title(cast[ptr FontButton00](self.impl)) + result = $resul0 + +proc gtk_font_button_get_use_font*(self: ptr FontButton00): gboolean {. + importc: "gtk_font_button_get_use_font", libprag.} + +proc getUseFont*(self: FontButton): bool = + toBool(gtk_font_button_get_use_font(cast[ptr FontButton00](self.impl))) + +proc useFont*(self: FontButton): bool = + toBool(gtk_font_button_get_use_font(cast[ptr FontButton00](self.impl))) + +proc gtk_font_button_get_use_size*(self: ptr FontButton00): gboolean {. + importc: "gtk_font_button_get_use_size", libprag.} + +proc getUseSize*(self: FontButton): bool = + toBool(gtk_font_button_get_use_size(cast[ptr FontButton00](self.impl))) + +proc useSize*(self: FontButton): bool = + toBool(gtk_font_button_get_use_size(cast[ptr FontButton00](self.impl))) + +proc gtk_font_button_set_font_name*(self: ptr FontButton00; fontname: cstring): gboolean {. + importc: "gtk_font_button_set_font_name", libprag.} + +proc setFontName*(self: FontButton; fontname: string): bool = + toBool(gtk_font_button_set_font_name(cast[ptr FontButton00](self.impl), cstring(fontname))) + +proc `fontName=`*(self: FontButton; fontname: string): bool = + toBool(gtk_font_button_set_font_name(cast[ptr FontButton00](self.impl), cstring(fontname))) + +proc gtk_font_button_set_show_size*(self: ptr FontButton00; showSize: gboolean) {. + importc: "gtk_font_button_set_show_size", libprag.} + +proc setShowSize*(self: FontButton; showSize: bool) = + gtk_font_button_set_show_size(cast[ptr FontButton00](self.impl), gboolean(showSize)) + +proc `showSize=`*(self: FontButton; showSize: bool) = + gtk_font_button_set_show_size(cast[ptr FontButton00](self.impl), gboolean(showSize)) + +proc gtk_font_button_set_show_style*(self: ptr FontButton00; showStyle: gboolean) {. + importc: "gtk_font_button_set_show_style", libprag.} + +proc setShowStyle*(self: FontButton; showStyle: bool) = + gtk_font_button_set_show_style(cast[ptr FontButton00](self.impl), gboolean(showStyle)) + +proc `showStyle=`*(self: FontButton; showStyle: bool) = + gtk_font_button_set_show_style(cast[ptr FontButton00](self.impl), gboolean(showStyle)) + +proc gtk_font_button_set_title*(self: ptr FontButton00; title: cstring) {. + importc: "gtk_font_button_set_title", libprag.} + +proc setTitle*(self: FontButton; title: string) = + gtk_font_button_set_title(cast[ptr FontButton00](self.impl), cstring(title)) + +proc `title=`*(self: FontButton; title: string) = + gtk_font_button_set_title(cast[ptr FontButton00](self.impl), cstring(title)) + +proc gtk_font_button_set_use_font*(self: ptr FontButton00; useFont: gboolean) {. + importc: "gtk_font_button_set_use_font", libprag.} + +proc setUseFont*(self: FontButton; useFont: bool) = + gtk_font_button_set_use_font(cast[ptr FontButton00](self.impl), gboolean(useFont)) + +proc `useFont=`*(self: FontButton; useFont: bool) = + gtk_font_button_set_use_font(cast[ptr FontButton00](self.impl), gboolean(useFont)) + +proc gtk_font_button_set_use_size*(self: ptr FontButton00; useSize: gboolean) {. + importc: "gtk_font_button_set_use_size", libprag.} + +proc setUseSize*(self: FontButton; useSize: bool) = + gtk_font_button_set_use_size(cast[ptr FontButton00](self.impl), gboolean(useSize)) + +proc `useSize=`*(self: FontButton; useSize: bool) = + gtk_font_button_set_use_size(cast[ptr FontButton00](self.impl), gboolean(useSize)) + +type + FontButtonClass00* {.pure.} = object + parentClass*: ButtonClass00 + fontSet*: proc(gfp: ptr FontButton00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + FontButtonClass* = ref object + impl*: ptr FontButtonClass00 + +type + FontChooser00* {.pure.} = object + FontChooser* = ref object + impl*: ptr FontChooser00 + +proc gtk_font_chooser_get_font*(self: ptr FontChooser00): cstring {. + importc: "gtk_font_chooser_get_font", libprag.} + +proc getFont*(self: FontChooser): string = + let resul0 = gtk_font_chooser_get_font(cast[ptr FontChooser00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc font*(self: FontChooser): string = + let resul0 = gtk_font_chooser_get_font(cast[ptr FontChooser00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_font_chooser_get_font_desc*(self: ptr FontChooser00): ptr pango.FontDescription00 {. + importc: "gtk_font_chooser_get_font_desc", libprag.} + +proc getFontDesc*(self: FontChooser): pango.FontDescription = + new(result) + result.impl = gtk_font_chooser_get_font_desc(cast[ptr FontChooser00](self.impl)) + +proc fontDesc*(self: FontChooser): pango.FontDescription = + new(result) + result.impl = gtk_font_chooser_get_font_desc(cast[ptr FontChooser00](self.impl)) + +proc gtk_font_chooser_get_font_face*(self: ptr FontChooser00): ptr pango.FontFace00 {. + importc: "gtk_font_chooser_get_font_face", libprag.} + +proc getFontFace*(self: FontChooser): pango.FontFace = + let gobj = gtk_font_chooser_get_font_face(cast[ptr FontChooser00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontFace](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fontFace*(self: FontChooser): pango.FontFace = + let gobj = gtk_font_chooser_get_font_face(cast[ptr FontChooser00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontFace](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_chooser_get_font_family*(self: ptr FontChooser00): ptr pango.FontFamily00 {. + importc: "gtk_font_chooser_get_font_family", libprag.} + +proc getFontFamily*(self: FontChooser): pango.FontFamily = + let gobj = gtk_font_chooser_get_font_family(cast[ptr FontChooser00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontFamily](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fontFamily*(self: FontChooser): pango.FontFamily = + let gobj = gtk_font_chooser_get_font_family(cast[ptr FontChooser00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontFamily](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_chooser_get_font_map*(self: ptr FontChooser00): ptr pango.FontMap00 {. + importc: "gtk_font_chooser_get_font_map", libprag.} + +proc getFontMap*(self: FontChooser): pango.FontMap = + let gobj = gtk_font_chooser_get_font_map(cast[ptr FontChooser00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fontMap*(self: FontChooser): pango.FontMap = + let gobj = gtk_font_chooser_get_font_map(cast[ptr FontChooser00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_chooser_get_font_size*(self: ptr FontChooser00): int32 {. + importc: "gtk_font_chooser_get_font_size", libprag.} + +proc getFontSize*(self: FontChooser): int = + int(gtk_font_chooser_get_font_size(cast[ptr FontChooser00](self.impl))) + +proc fontSize*(self: FontChooser): int = + int(gtk_font_chooser_get_font_size(cast[ptr FontChooser00](self.impl))) + +proc gtk_font_chooser_get_preview_text*(self: ptr FontChooser00): cstring {. + importc: "gtk_font_chooser_get_preview_text", libprag.} + +proc getPreviewText*(self: FontChooser): string = + let resul0 = gtk_font_chooser_get_preview_text(cast[ptr FontChooser00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc previewText*(self: FontChooser): string = + let resul0 = gtk_font_chooser_get_preview_text(cast[ptr FontChooser00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_font_chooser_get_show_preview_entry*(self: ptr FontChooser00): gboolean {. + importc: "gtk_font_chooser_get_show_preview_entry", libprag.} + +proc getShowPreviewEntry*(self: FontChooser): bool = + toBool(gtk_font_chooser_get_show_preview_entry(cast[ptr FontChooser00](self.impl))) + +proc showPreviewEntry*(self: FontChooser): bool = + toBool(gtk_font_chooser_get_show_preview_entry(cast[ptr FontChooser00](self.impl))) + +proc gtk_font_chooser_set_font*(self: ptr FontChooser00; fontname: cstring) {. + importc: "gtk_font_chooser_set_font", libprag.} + +proc setFont*(self: FontChooser; fontname: string) = + gtk_font_chooser_set_font(cast[ptr FontChooser00](self.impl), cstring(fontname)) + +proc `font=`*(self: FontChooser; fontname: string) = + gtk_font_chooser_set_font(cast[ptr FontChooser00](self.impl), cstring(fontname)) + +proc gtk_font_chooser_set_font_desc*(self: ptr FontChooser00; fontDesc: ptr pango.FontDescription00) {. + importc: "gtk_font_chooser_set_font_desc", libprag.} + +proc setFontDesc*(self: FontChooser; fontDesc: pango.FontDescription) = + gtk_font_chooser_set_font_desc(cast[ptr FontChooser00](self.impl), cast[ptr pango.FontDescription00](fontDesc.impl)) + +proc `fontDesc=`*(self: FontChooser; fontDesc: pango.FontDescription) = + gtk_font_chooser_set_font_desc(cast[ptr FontChooser00](self.impl), cast[ptr pango.FontDescription00](fontDesc.impl)) + +proc gtk_font_chooser_set_font_map*(self: ptr FontChooser00; fontmap: ptr pango.FontMap00) {. + importc: "gtk_font_chooser_set_font_map", libprag.} + +proc setFontMap*(self: FontChooser; fontmap: pango.FontMap) = + gtk_font_chooser_set_font_map(cast[ptr FontChooser00](self.impl), cast[ptr pango.FontMap00](fontmap.impl)) + +proc `fontMap=`*(self: FontChooser; fontmap: pango.FontMap) = + gtk_font_chooser_set_font_map(cast[ptr FontChooser00](self.impl), cast[ptr pango.FontMap00](fontmap.impl)) + +proc gtk_font_chooser_set_preview_text*(self: ptr FontChooser00; text: cstring) {. + importc: "gtk_font_chooser_set_preview_text", libprag.} + +proc setPreviewText*(self: FontChooser; text: string) = + gtk_font_chooser_set_preview_text(cast[ptr FontChooser00](self.impl), cstring(text)) + +proc `previewText=`*(self: FontChooser; text: string) = + gtk_font_chooser_set_preview_text(cast[ptr FontChooser00](self.impl), cstring(text)) + +proc gtk_font_chooser_set_show_preview_entry*(self: ptr FontChooser00; showPreviewEntry: gboolean) {. + importc: "gtk_font_chooser_set_show_preview_entry", libprag.} + +proc setShowPreviewEntry*(self: FontChooser; showPreviewEntry: bool) = + gtk_font_chooser_set_show_preview_entry(cast[ptr FontChooser00](self.impl), gboolean(showPreviewEntry)) + +proc `showPreviewEntry=`*(self: FontChooser; showPreviewEntry: bool) = + gtk_font_chooser_set_show_preview_entry(cast[ptr FontChooser00](self.impl), gboolean(showPreviewEntry)) + +type + FontChooserDialogPrivate00* {.pure.} = object + FontChooserDialogPrivate* = ref object + impl*: ptr FontChooserDialogPrivate00 + +type + FontChooserDialog* = ref object of Dialog + FontChooserDialog00* = object of Dialog00 + priv6: ptr FontChooserDialogPrivate00 + +proc gtk_font_chooser_dialog_new*(title: cstring; parent: ptr Window00): ptr FontChooserDialog00 {. + importc: "gtk_font_chooser_dialog_new", libprag.} + +proc newFontChooserDialog*(title: string; parent: Window): FontChooserDialog = + new(result, finalizeGObject) + result.impl = gtk_font_chooser_dialog_new(cstring(title), cast[ptr Window00](parent.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFontChooserDialog*[T](result: var T; title: string; parent: Window) = + assert(result is FontChooserDialog) + new(result, finalizeGObject) + result.impl = gtk_font_chooser_dialog_new(cstring(title), cast[ptr Window00](parent.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + FontChooserDialogClass00* {.pure.} = object + parentClass*: DialogClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + FontChooserDialogClass* = ref object + impl*: ptr FontChooserDialogClass00 + +type + FontChooserWidgetPrivate00* {.pure.} = object + FontChooserWidgetPrivate* = ref object + impl*: ptr FontChooserWidgetPrivate00 + +type + FontChooserWidget* = ref object of Box + FontChooserWidget00* = object of Box00 + priv4: ptr FontChooserWidgetPrivate00 + +proc gtk_font_chooser_widget_new*(): ptr FontChooserWidget00 {. + importc: "gtk_font_chooser_widget_new", libprag.} + +proc newFontChooserWidget*(): FontChooserWidget = + new(result, finalizeGObject) + result.impl = gtk_font_chooser_widget_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFontChooserWidget*[T](result: var T) = + assert(result is FontChooserWidget) + new(result, finalizeGObject) + result.impl = gtk_font_chooser_widget_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + FontChooserWidgetClass00* {.pure.} = object + parentClass*: BoxClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + FontChooserWidgetClass* = ref object + impl*: ptr FontChooserWidgetClass00 + +type + FontFilterFunc* = proc (family: ptr pango.FontFamily00; face: ptr pango.FontFace00; + data: pointer): gboolean {.cdecl.} + +type + FontChooserIface00* {.pure.} = object + baseIface*: gobject.TypeInterface00 + getFontFamily*: proc(fontchooser: ptr FontChooser00): ptr pango.FontFamily00 {.cdecl.} + getFontFace*: proc(fontchooser: ptr FontChooser00): ptr pango.FontFace00 {.cdecl.} + getFontSize*: proc(fontchooser: ptr FontChooser00): int32 {.cdecl.} + setFilterFunc*: proc(fontchooser: ptr FontChooser00; filter: FontFilterFunc; + userData: pointer; destroy: DestroyNotify) {.cdecl.} + fontActivated*: proc(chooser: ptr FontChooser00; fontname: cstring) {.cdecl.} + setFontMap*: proc(fontchooser: ptr FontChooser00; fontmap: ptr pango.FontMap00) {.cdecl.} + getFontMap*: proc(fontchooser: ptr FontChooser00): ptr pango.FontMap00 {.cdecl.} + padding*: array[10, pointer] + FontChooserIface* = ref object + impl*: ptr FontChooserIface00 + +proc gtk_font_chooser_set_filter_func*(self: ptr FontChooser00; filter: FontFilterFunc; userData: pointer; + destroy: DestroyNotify) {. + importc: "gtk_font_chooser_set_filter_func", libprag.} + +proc setFilterFunc*(self: FontChooser; filter: FontFilterFunc; userData: pointer; + destroy: DestroyNotify) = + gtk_font_chooser_set_filter_func(cast[ptr FontChooser00](self.impl), filter, userData, destroy) + +type + FontSelectionPrivate00* {.pure.} = object + FontSelectionPrivate* = ref object + impl*: ptr FontSelectionPrivate00 + +type + FontSelection* = ref object of Box + FontSelection00* = object of Box00 + priv4: ptr FontSelectionPrivate00 + +proc gtk_font_selection_new*(): ptr FontSelection00 {. + importc: "gtk_font_selection_new", libprag.} + +proc newFontSelection*(): FontSelection = + new(result, finalizeGObject) + result.impl = gtk_font_selection_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFontSelection*[T](result: var T) = + assert(result is FontSelection) + new(result, finalizeGObject) + result.impl = gtk_font_selection_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_get_face*(self: ptr FontSelection00): ptr pango.FontFace00 {. + importc: "gtk_font_selection_get_face", libprag.} + +proc getFace*(self: FontSelection): pango.FontFace = + let gobj = gtk_font_selection_get_face(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontFace](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc face*(self: FontSelection): pango.FontFace = + let gobj = gtk_font_selection_get_face(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontFace](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_get_face_list*(self: ptr FontSelection00): ptr Widget00 {. + importc: "gtk_font_selection_get_face_list", libprag.} + +proc getFaceList*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_face_list(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc faceList*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_face_list(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_get_family*(self: ptr FontSelection00): ptr pango.FontFamily00 {. + importc: "gtk_font_selection_get_family", libprag.} + +proc getFamily*(self: FontSelection): pango.FontFamily = + let gobj = gtk_font_selection_get_family(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontFamily](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc family*(self: FontSelection): pango.FontFamily = + let gobj = gtk_font_selection_get_family(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontFamily](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_get_family_list*(self: ptr FontSelection00): ptr Widget00 {. + importc: "gtk_font_selection_get_family_list", libprag.} + +proc getFamilyList*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_family_list(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc familyList*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_family_list(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_get_font_name*(self: ptr FontSelection00): cstring {. + importc: "gtk_font_selection_get_font_name", libprag.} + +proc getFontName*(self: FontSelection): string = + let resul0 = gtk_font_selection_get_font_name(cast[ptr FontSelection00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc fontName*(self: FontSelection): string = + let resul0 = gtk_font_selection_get_font_name(cast[ptr FontSelection00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_font_selection_get_preview_entry*(self: ptr FontSelection00): ptr Widget00 {. + importc: "gtk_font_selection_get_preview_entry", libprag.} + +proc getPreviewEntry*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_preview_entry(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc previewEntry*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_preview_entry(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_get_preview_text*(self: ptr FontSelection00): cstring {. + importc: "gtk_font_selection_get_preview_text", libprag.} + +proc getPreviewText*(self: FontSelection): string = + let resul0 = gtk_font_selection_get_preview_text(cast[ptr FontSelection00](self.impl)) + result = $resul0 + +proc previewText*(self: FontSelection): string = + let resul0 = gtk_font_selection_get_preview_text(cast[ptr FontSelection00](self.impl)) + result = $resul0 + +proc gtk_font_selection_get_size*(self: ptr FontSelection00): int32 {. + importc: "gtk_font_selection_get_size", libprag.} + +proc getSize*(self: FontSelection): int = + int(gtk_font_selection_get_size(cast[ptr FontSelection00](self.impl))) + +proc size*(self: FontSelection): int = + int(gtk_font_selection_get_size(cast[ptr FontSelection00](self.impl))) + +proc gtk_font_selection_get_size_entry*(self: ptr FontSelection00): ptr Widget00 {. + importc: "gtk_font_selection_get_size_entry", libprag.} + +proc getSizeEntry*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_size_entry(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc sizeEntry*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_size_entry(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_get_size_list*(self: ptr FontSelection00): ptr Widget00 {. + importc: "gtk_font_selection_get_size_list", libprag.} + +proc getSizeList*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_size_list(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc sizeList*(self: FontSelection): Widget = + let gobj = gtk_font_selection_get_size_list(cast[ptr FontSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_set_font_name*(self: ptr FontSelection00; fontname: cstring): gboolean {. + importc: "gtk_font_selection_set_font_name", libprag.} + +proc setFontName*(self: FontSelection; fontname: string): bool = + toBool(gtk_font_selection_set_font_name(cast[ptr FontSelection00](self.impl), cstring(fontname))) + +proc `fontName=`*(self: FontSelection; fontname: string): bool = + toBool(gtk_font_selection_set_font_name(cast[ptr FontSelection00](self.impl), cstring(fontname))) + +proc gtk_font_selection_set_preview_text*(self: ptr FontSelection00; text: cstring) {. + importc: "gtk_font_selection_set_preview_text", libprag.} + +proc setPreviewText*(self: FontSelection; text: string) = + gtk_font_selection_set_preview_text(cast[ptr FontSelection00](self.impl), cstring(text)) + +proc `previewText=`*(self: FontSelection; text: string) = + gtk_font_selection_set_preview_text(cast[ptr FontSelection00](self.impl), cstring(text)) + +type + FontSelectionClass00* {.pure.} = object + parentClass*: BoxClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + FontSelectionClass* = ref object + impl*: ptr FontSelectionClass00 + +type + FontSelectionDialogPrivate00* {.pure.} = object + FontSelectionDialogPrivate* = ref object + impl*: ptr FontSelectionDialogPrivate00 + +type + FontSelectionDialog* = ref object of Dialog + FontSelectionDialog00* = object of Dialog00 + priv6: ptr FontSelectionDialogPrivate00 + +proc gtk_font_selection_dialog_new*(title: cstring): ptr FontSelectionDialog00 {. + importc: "gtk_font_selection_dialog_new", libprag.} + +proc newFontSelectionDialog*(title: string): FontSelectionDialog = + new(result, finalizeGObject) + result.impl = gtk_font_selection_dialog_new(cstring(title)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFontSelectionDialog*[T](result: var T; title: string) = + assert(result is FontSelectionDialog) + new(result, finalizeGObject) + result.impl = gtk_font_selection_dialog_new(cstring(title)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_dialog_get_cancel_button*(self: ptr FontSelectionDialog00): ptr Widget00 {. + importc: "gtk_font_selection_dialog_get_cancel_button", libprag.} + +proc getCancelButton*(self: FontSelectionDialog): Widget = + let gobj = gtk_font_selection_dialog_get_cancel_button(cast[ptr FontSelectionDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc cancelButton*(self: FontSelectionDialog): Widget = + let gobj = gtk_font_selection_dialog_get_cancel_button(cast[ptr FontSelectionDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_dialog_get_font_name*(self: ptr FontSelectionDialog00): cstring {. + importc: "gtk_font_selection_dialog_get_font_name", libprag.} + +proc getFontName*(self: FontSelectionDialog): string = + let resul0 = gtk_font_selection_dialog_get_font_name(cast[ptr FontSelectionDialog00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc fontName*(self: FontSelectionDialog): string = + let resul0 = gtk_font_selection_dialog_get_font_name(cast[ptr FontSelectionDialog00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_font_selection_dialog_get_font_selection*(self: ptr FontSelectionDialog00): ptr Widget00 {. + importc: "gtk_font_selection_dialog_get_font_selection", libprag.} + +proc getFontSelection*(self: FontSelectionDialog): Widget = + let gobj = gtk_font_selection_dialog_get_font_selection(cast[ptr FontSelectionDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fontSelection*(self: FontSelectionDialog): Widget = + let gobj = gtk_font_selection_dialog_get_font_selection(cast[ptr FontSelectionDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_dialog_get_ok_button*(self: ptr FontSelectionDialog00): ptr Widget00 {. + importc: "gtk_font_selection_dialog_get_ok_button", libprag.} + +proc getOkButton*(self: FontSelectionDialog): Widget = + let gobj = gtk_font_selection_dialog_get_ok_button(cast[ptr FontSelectionDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc okButton*(self: FontSelectionDialog): Widget = + let gobj = gtk_font_selection_dialog_get_ok_button(cast[ptr FontSelectionDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_font_selection_dialog_get_preview_text*(self: ptr FontSelectionDialog00): cstring {. + importc: "gtk_font_selection_dialog_get_preview_text", libprag.} + +proc getPreviewText*(self: FontSelectionDialog): string = + let resul0 = gtk_font_selection_dialog_get_preview_text(cast[ptr FontSelectionDialog00](self.impl)) + result = $resul0 + +proc previewText*(self: FontSelectionDialog): string = + let resul0 = gtk_font_selection_dialog_get_preview_text(cast[ptr FontSelectionDialog00](self.impl)) + result = $resul0 + +proc gtk_font_selection_dialog_set_font_name*(self: ptr FontSelectionDialog00; fontname: cstring): gboolean {. + importc: "gtk_font_selection_dialog_set_font_name", libprag.} + +proc setFontName*(self: FontSelectionDialog; fontname: string): bool = + toBool(gtk_font_selection_dialog_set_font_name(cast[ptr FontSelectionDialog00](self.impl), cstring(fontname))) + +proc `fontName=`*(self: FontSelectionDialog; fontname: string): bool = + toBool(gtk_font_selection_dialog_set_font_name(cast[ptr FontSelectionDialog00](self.impl), cstring(fontname))) + +proc gtk_font_selection_dialog_set_preview_text*(self: ptr FontSelectionDialog00; text: cstring) {. + importc: "gtk_font_selection_dialog_set_preview_text", libprag.} + +proc setPreviewText*(self: FontSelectionDialog; text: string) = + gtk_font_selection_dialog_set_preview_text(cast[ptr FontSelectionDialog00](self.impl), cstring(text)) + +proc `previewText=`*(self: FontSelectionDialog; text: string) = + gtk_font_selection_dialog_set_preview_text(cast[ptr FontSelectionDialog00](self.impl), cstring(text)) + +type + FontSelectionDialogClass00* {.pure.} = object + parentClass*: DialogClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + FontSelectionDialogClass* = ref object + impl*: ptr FontSelectionDialogClass00 + +type + FrameAccessiblePrivate00* {.pure.} = object + FrameAccessiblePrivate* = ref object + impl*: ptr FrameAccessiblePrivate00 + +type + FrameAccessible* = ref object of ContainerAccessible + FrameAccessible00* = object of ContainerAccessible00 + priv4: ptr FrameAccessiblePrivate00 + +type + FrameAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + FrameAccessibleClass* = ref object + impl*: ptr FrameAccessibleClass00 + +type + GLArea* = ref object of Widget + GLArea00* = object of Widget00 + +proc scCreateContext*(self: GLArea; p: proc (self: ptr gobject.Object00; xdata: pointer): gdk.GLContext00 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "create-context", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRender*(self: GLArea; p: proc (self: ptr gobject.Object00; context: gdk.GLContext00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "render", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scResize*(self: GLArea; p: proc (self: ptr gobject.Object00; width: int32; height: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "resize", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_gl_area_new*(): ptr GLArea00 {. + importc: "gtk_gl_area_new", libprag.} + +proc newGLArea*(): GLArea = + new(result, finalizeGObject) + result.impl = gtk_gl_area_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initGLArea*[T](result: var T) = + assert(result is GLArea) + new(result, finalizeGObject) + result.impl = gtk_gl_area_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gl_area_attach_buffers*(self: ptr GLArea00) {. + importc: "gtk_gl_area_attach_buffers", libprag.} + +proc attachBuffers*(self: GLArea) = + gtk_gl_area_attach_buffers(cast[ptr GLArea00](self.impl)) + +proc gtk_gl_area_get_auto_render*(self: ptr GLArea00): gboolean {. + importc: "gtk_gl_area_get_auto_render", libprag.} + +proc getAutoRender*(self: GLArea): bool = + toBool(gtk_gl_area_get_auto_render(cast[ptr GLArea00](self.impl))) + +proc autoRender*(self: GLArea): bool = + toBool(gtk_gl_area_get_auto_render(cast[ptr GLArea00](self.impl))) + +proc gtk_gl_area_get_context*(self: ptr GLArea00): ptr gdk.GLContext00 {. + importc: "gtk_gl_area_get_context", libprag.} + +proc getContext*(self: GLArea): gdk.GLContext = + let gobj = gtk_gl_area_get_context(cast[ptr GLArea00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.GLContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc context*(self: GLArea): gdk.GLContext = + let gobj = gtk_gl_area_get_context(cast[ptr GLArea00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.GLContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gl_area_get_error*(self: ptr GLArea00): ptr Error00 {. + importc: "gtk_gl_area_get_error", libprag.} + +proc getError*(self: GLArea): ptr Error00 = + gtk_gl_area_get_error(cast[ptr GLArea00](self.impl)) + +proc error*(self: GLArea): ptr Error00 = + gtk_gl_area_get_error(cast[ptr GLArea00](self.impl)) + +proc gtk_gl_area_get_has_alpha*(self: ptr GLArea00): gboolean {. + importc: "gtk_gl_area_get_has_alpha", libprag.} + +proc getHasAlpha*(self: GLArea): bool = + toBool(gtk_gl_area_get_has_alpha(cast[ptr GLArea00](self.impl))) + +proc hasAlpha*(self: GLArea): bool = + toBool(gtk_gl_area_get_has_alpha(cast[ptr GLArea00](self.impl))) + +proc gtk_gl_area_get_has_depth_buffer*(self: ptr GLArea00): gboolean {. + importc: "gtk_gl_area_get_has_depth_buffer", libprag.} + +proc getHasDepthBuffer*(self: GLArea): bool = + toBool(gtk_gl_area_get_has_depth_buffer(cast[ptr GLArea00](self.impl))) + +proc hasDepthBuffer*(self: GLArea): bool = + toBool(gtk_gl_area_get_has_depth_buffer(cast[ptr GLArea00](self.impl))) + +proc gtk_gl_area_get_has_stencil_buffer*(self: ptr GLArea00): gboolean {. + importc: "gtk_gl_area_get_has_stencil_buffer", libprag.} + +proc getHasStencilBuffer*(self: GLArea): bool = + toBool(gtk_gl_area_get_has_stencil_buffer(cast[ptr GLArea00](self.impl))) + +proc hasStencilBuffer*(self: GLArea): bool = + toBool(gtk_gl_area_get_has_stencil_buffer(cast[ptr GLArea00](self.impl))) + +proc gtk_gl_area_get_required_version*(self: ptr GLArea00; major: var int32; minor: var int32) {. + importc: "gtk_gl_area_get_required_version", libprag.} + +proc getRequiredVersion*(self: GLArea; major: var int; minor: var int) = + var minor_00 = int32(minor) + var major_00 = int32(major) + gtk_gl_area_get_required_version(cast[ptr GLArea00](self.impl), major_00, minor_00) + minor = int(minor_00) + major = int(major_00) + +proc requiredVersion*(self: GLArea; major: var int; minor: var int) = + var minor_00 = int32(minor) + var major_00 = int32(major) + gtk_gl_area_get_required_version(cast[ptr GLArea00](self.impl), major_00, minor_00) + minor = int(minor_00) + major = int(major_00) + +proc gtk_gl_area_get_use_es*(self: ptr GLArea00): gboolean {. + importc: "gtk_gl_area_get_use_es", libprag.} + +proc getUseEs*(self: GLArea): bool = + toBool(gtk_gl_area_get_use_es(cast[ptr GLArea00](self.impl))) + +proc useEs*(self: GLArea): bool = + toBool(gtk_gl_area_get_use_es(cast[ptr GLArea00](self.impl))) + +proc gtk_gl_area_make_current*(self: ptr GLArea00) {. + importc: "gtk_gl_area_make_current", libprag.} + +proc makeCurrent*(self: GLArea) = + gtk_gl_area_make_current(cast[ptr GLArea00](self.impl)) + +proc gtk_gl_area_queue_render*(self: ptr GLArea00) {. + importc: "gtk_gl_area_queue_render", libprag.} + +proc queueRender*(self: GLArea) = + gtk_gl_area_queue_render(cast[ptr GLArea00](self.impl)) + +proc gtk_gl_area_set_auto_render*(self: ptr GLArea00; autoRender: gboolean) {. + importc: "gtk_gl_area_set_auto_render", libprag.} + +proc setAutoRender*(self: GLArea; autoRender: bool) = + gtk_gl_area_set_auto_render(cast[ptr GLArea00](self.impl), gboolean(autoRender)) + +proc `autoRender=`*(self: GLArea; autoRender: bool) = + gtk_gl_area_set_auto_render(cast[ptr GLArea00](self.impl), gboolean(autoRender)) + +proc gtk_gl_area_set_error*(self: ptr GLArea00; error: ptr Error00) {. + importc: "gtk_gl_area_set_error", libprag.} + +proc setError*(self: GLArea; error: ptr Error00) = + gtk_gl_area_set_error(cast[ptr GLArea00](self.impl), error) + +proc `error=`*(self: GLArea; error: ptr Error00) = + gtk_gl_area_set_error(cast[ptr GLArea00](self.impl), error) + +proc gtk_gl_area_set_has_alpha*(self: ptr GLArea00; hasAlpha: gboolean) {. + importc: "gtk_gl_area_set_has_alpha", libprag.} + +proc setHasAlpha*(self: GLArea; hasAlpha: bool) = + gtk_gl_area_set_has_alpha(cast[ptr GLArea00](self.impl), gboolean(hasAlpha)) + +proc `hasAlpha=`*(self: GLArea; hasAlpha: bool) = + gtk_gl_area_set_has_alpha(cast[ptr GLArea00](self.impl), gboolean(hasAlpha)) + +proc gtk_gl_area_set_has_depth_buffer*(self: ptr GLArea00; hasDepthBuffer: gboolean) {. + importc: "gtk_gl_area_set_has_depth_buffer", libprag.} + +proc setHasDepthBuffer*(self: GLArea; hasDepthBuffer: bool) = + gtk_gl_area_set_has_depth_buffer(cast[ptr GLArea00](self.impl), gboolean(hasDepthBuffer)) + +proc `hasDepthBuffer=`*(self: GLArea; hasDepthBuffer: bool) = + gtk_gl_area_set_has_depth_buffer(cast[ptr GLArea00](self.impl), gboolean(hasDepthBuffer)) + +proc gtk_gl_area_set_has_stencil_buffer*(self: ptr GLArea00; hasStencilBuffer: gboolean) {. + importc: "gtk_gl_area_set_has_stencil_buffer", libprag.} + +proc setHasStencilBuffer*(self: GLArea; hasStencilBuffer: bool) = + gtk_gl_area_set_has_stencil_buffer(cast[ptr GLArea00](self.impl), gboolean(hasStencilBuffer)) + +proc `hasStencilBuffer=`*(self: GLArea; hasStencilBuffer: bool) = + gtk_gl_area_set_has_stencil_buffer(cast[ptr GLArea00](self.impl), gboolean(hasStencilBuffer)) + +proc gtk_gl_area_set_required_version*(self: ptr GLArea00; major: int32; minor: int32) {. + importc: "gtk_gl_area_set_required_version", libprag.} + +proc setRequiredVersion*(self: GLArea; major: int; minor: int) = + gtk_gl_area_set_required_version(cast[ptr GLArea00](self.impl), int32(major), int32(minor)) + +proc gtk_gl_area_set_use_es*(self: ptr GLArea00; useEs: gboolean) {. + importc: "gtk_gl_area_set_use_es", libprag.} + +proc setUseEs*(self: GLArea; useEs: bool) = + gtk_gl_area_set_use_es(cast[ptr GLArea00](self.impl), gboolean(useEs)) + +proc `useEs=`*(self: GLArea; useEs: bool) = + gtk_gl_area_set_use_es(cast[ptr GLArea00](self.impl), gboolean(useEs)) + +type + GLAreaClass00* {.pure.} = object + parentClass*: WidgetClass00 + render*: proc(area: ptr GLArea00; context: ptr gdk.GLContext00): gboolean {.cdecl.} + resize*: proc(area: ptr GLArea00; width: int32; height: int32) {.cdecl.} + createContext*: pointer + padding*: array[6, pointer] + GLAreaClass* = ref object + impl*: ptr GLAreaClass00 + +type + Gesture* = ref object of EventController + Gesture00* = object of EventController00 + +proc scBegin*(self: Gesture; p: proc (self: ptr gobject.Object00; sequence: gdk.EventSequence00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "begin", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCancel*(self: Gesture; p: proc (self: ptr gobject.Object00; sequence: gdk.EventSequence00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cancel", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEnd*(self: Gesture; p: proc (self: ptr gobject.Object00; sequence: gdk.EventSequence00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "end", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSequenceStateChanged*(self: Gesture; p: proc (self: ptr gobject.Object00; sequence: gdk.EventSequence00; state: EventSequenceState; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "sequence-state-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUpdate*(self: Gesture; p: proc (self: ptr gobject.Object00; sequence: gdk.EventSequence00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "update", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_gesture_get_bounding_box*(self: ptr Gesture00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_gesture_get_bounding_box", libprag.} + +proc getBoundingBox*(self: ptr Gesture00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_gesture_get_bounding_box", libprag.} + +proc boundingBox*(self: ptr Gesture00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_gesture_get_bounding_box", libprag.} + +proc gtk_gesture_get_bounding_box_center*(self: ptr Gesture00; x: var cdouble; y: var cdouble): gboolean {. + importc: "gtk_gesture_get_bounding_box_center", libprag.} + +proc getBoundingBoxCenter*(self: Gesture; x: var cdouble; y: var cdouble): bool = + toBool(gtk_gesture_get_bounding_box_center(cast[ptr Gesture00](self.impl), x, y)) + +proc boundingBoxCenter*(self: Gesture; x: var cdouble; y: var cdouble): bool = + toBool(gtk_gesture_get_bounding_box_center(cast[ptr Gesture00](self.impl), x, y)) + +proc gtk_gesture_get_device*(self: ptr Gesture00): ptr gdk.Device00 {. + importc: "gtk_gesture_get_device", libprag.} + +proc getDevice*(self: Gesture): gdk.Device = + let gobj = gtk_gesture_get_device(cast[ptr Gesture00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc device*(self: Gesture): gdk.Device = + let gobj = gtk_gesture_get_device(cast[ptr Gesture00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gesture_get_group*(self: ptr Gesture00): ptr pointer {. + importc: "gtk_gesture_get_group", libprag.} + +proc getGroup*(self: Gesture): ptr pointer = + gtk_gesture_get_group(cast[ptr Gesture00](self.impl)) + +proc group*(self: Gesture): ptr pointer = + gtk_gesture_get_group(cast[ptr Gesture00](self.impl)) + +proc gtk_gesture_get_last_event*(self: ptr Gesture00; sequence: ptr gdk.EventSequence00): ptr gdk.Event00 {. + importc: "gtk_gesture_get_last_event", libprag.} + +proc getLastEvent*(self: Gesture; sequence: gdk.EventSequence): gdk.Event = + new(result) + result.impl = gtk_gesture_get_last_event(cast[ptr Gesture00](self.impl), cast[ptr gdk.EventSequence00](sequence.impl)) + +proc lastEvent*(self: Gesture; sequence: gdk.EventSequence): gdk.Event = + new(result) + result.impl = gtk_gesture_get_last_event(cast[ptr Gesture00](self.impl), cast[ptr gdk.EventSequence00](sequence.impl)) + +proc gtk_gesture_get_last_updated_sequence*(self: ptr Gesture00): ptr gdk.EventSequence00 {. + importc: "gtk_gesture_get_last_updated_sequence", libprag.} + +proc getLastUpdatedSequence*(self: Gesture): gdk.EventSequence = + new(result) + result.impl = gtk_gesture_get_last_updated_sequence(cast[ptr Gesture00](self.impl)) + +proc lastUpdatedSequence*(self: Gesture): gdk.EventSequence = + new(result) + result.impl = gtk_gesture_get_last_updated_sequence(cast[ptr Gesture00](self.impl)) + +proc gtk_gesture_get_point*(self: ptr Gesture00; sequence: ptr gdk.EventSequence00; + x: var cdouble; y: var cdouble): gboolean {. + importc: "gtk_gesture_get_point", libprag.} + +proc getPoint*(self: Gesture; sequence: gdk.EventSequence; x: var cdouble; + y: var cdouble): bool = + toBool(gtk_gesture_get_point(cast[ptr Gesture00](self.impl), cast[ptr gdk.EventSequence00](sequence.impl), x, y)) + +proc point*(self: Gesture; sequence: gdk.EventSequence; x: var cdouble; + y: var cdouble): bool = + toBool(gtk_gesture_get_point(cast[ptr Gesture00](self.impl), cast[ptr gdk.EventSequence00](sequence.impl), x, y)) + +proc gtk_gesture_get_sequence_state*(self: ptr Gesture00; sequence: ptr gdk.EventSequence00): EventSequenceState {. + importc: "gtk_gesture_get_sequence_state", libprag.} + +proc getSequenceState*(self: Gesture; sequence: gdk.EventSequence): EventSequenceState = + gtk_gesture_get_sequence_state(cast[ptr Gesture00](self.impl), cast[ptr gdk.EventSequence00](sequence.impl)) + +proc sequenceState*(self: Gesture; sequence: gdk.EventSequence): EventSequenceState = + gtk_gesture_get_sequence_state(cast[ptr Gesture00](self.impl), cast[ptr gdk.EventSequence00](sequence.impl)) + +proc gtk_gesture_get_sequences*(self: ptr Gesture00): ptr pointer {. + importc: "gtk_gesture_get_sequences", libprag.} + +proc getSequences*(self: Gesture): ptr pointer = + gtk_gesture_get_sequences(cast[ptr Gesture00](self.impl)) + +proc sequences*(self: Gesture): ptr pointer = + gtk_gesture_get_sequences(cast[ptr Gesture00](self.impl)) + +proc gtk_gesture_get_window*(self: ptr Gesture00): ptr gdk.Window00 {. + importc: "gtk_gesture_get_window", libprag.} + +proc getWindow*(self: Gesture): gdk.Window = + let gobj = gtk_gesture_get_window(cast[ptr Gesture00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc window*(self: Gesture): gdk.Window = + let gobj = gtk_gesture_get_window(cast[ptr Gesture00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gesture_group*(self: ptr Gesture00; gesture: ptr Gesture00) {. + importc: "gtk_gesture_group", libprag.} + +proc group*(self: Gesture; gesture: Gesture) = + gtk_gesture_group(cast[ptr Gesture00](self.impl), cast[ptr Gesture00](gesture.impl)) + +proc gtk_gesture_handles_sequence*(self: ptr Gesture00; sequence: ptr gdk.EventSequence00): gboolean {. + importc: "gtk_gesture_handles_sequence", libprag.} + +proc handlesSequence*(self: Gesture; sequence: gdk.EventSequence): bool = + toBool(gtk_gesture_handles_sequence(cast[ptr Gesture00](self.impl), cast[ptr gdk.EventSequence00](sequence.impl))) + +proc gtk_gesture_is_active*(self: ptr Gesture00): gboolean {. + importc: "gtk_gesture_is_active", libprag.} + +proc isActive*(self: Gesture): bool = + toBool(gtk_gesture_is_active(cast[ptr Gesture00](self.impl))) + +proc gtk_gesture_is_grouped_with*(self: ptr Gesture00; other: ptr Gesture00): gboolean {. + importc: "gtk_gesture_is_grouped_with", libprag.} + +proc isGroupedWith*(self: Gesture; other: Gesture): bool = + toBool(gtk_gesture_is_grouped_with(cast[ptr Gesture00](self.impl), cast[ptr Gesture00](other.impl))) + +proc gtk_gesture_is_recognized*(self: ptr Gesture00): gboolean {. + importc: "gtk_gesture_is_recognized", libprag.} + +proc isRecognized*(self: Gesture): bool = + toBool(gtk_gesture_is_recognized(cast[ptr Gesture00](self.impl))) + +proc gtk_gesture_set_sequence_state*(self: ptr Gesture00; sequence: ptr gdk.EventSequence00; + state: EventSequenceState): gboolean {. + importc: "gtk_gesture_set_sequence_state", libprag.} + +proc setSequenceState*(self: Gesture; sequence: gdk.EventSequence; state: EventSequenceState): bool = + toBool(gtk_gesture_set_sequence_state(cast[ptr Gesture00](self.impl), cast[ptr gdk.EventSequence00](sequence.impl), state)) + +proc gtk_gesture_set_state*(self: ptr Gesture00; state: EventSequenceState): gboolean {. + importc: "gtk_gesture_set_state", libprag.} + +proc setState*(self: Gesture; state: EventSequenceState): bool = + toBool(gtk_gesture_set_state(cast[ptr Gesture00](self.impl), state)) + +proc `state=`*(self: Gesture; state: EventSequenceState): bool = + toBool(gtk_gesture_set_state(cast[ptr Gesture00](self.impl), state)) + +proc gtk_gesture_set_window*(self: ptr Gesture00; window: ptr gdk.Window00) {. + importc: "gtk_gesture_set_window", libprag.} + +proc setWindow*(self: Gesture; window: gdk.Window) = + gtk_gesture_set_window(cast[ptr Gesture00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc `window=`*(self: Gesture; window: gdk.Window) = + gtk_gesture_set_window(cast[ptr Gesture00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc gtk_gesture_ungroup*(self: ptr Gesture00) {. + importc: "gtk_gesture_ungroup", libprag.} + +proc ungroup*(self: Gesture) = + gtk_gesture_ungroup(cast[ptr Gesture00](self.impl)) + +type + GestureClass00* {.pure.} = object + GestureClass* = ref object + impl*: ptr GestureClass00 + +type + GestureSingle* = ref object of Gesture + GestureSingle00* = object of Gesture00 + +proc gtk_gesture_single_get_button*(self: ptr GestureSingle00): uint32 {. + importc: "gtk_gesture_single_get_button", libprag.} + +proc getButton*(self: GestureSingle): int = + int(gtk_gesture_single_get_button(cast[ptr GestureSingle00](self.impl))) + +proc button*(self: GestureSingle): int = + int(gtk_gesture_single_get_button(cast[ptr GestureSingle00](self.impl))) + +proc gtk_gesture_single_get_current_button*(self: ptr GestureSingle00): uint32 {. + importc: "gtk_gesture_single_get_current_button", libprag.} + +proc getCurrentButton*(self: GestureSingle): int = + int(gtk_gesture_single_get_current_button(cast[ptr GestureSingle00](self.impl))) + +proc currentButton*(self: GestureSingle): int = + int(gtk_gesture_single_get_current_button(cast[ptr GestureSingle00](self.impl))) + +proc gtk_gesture_single_get_current_sequence*(self: ptr GestureSingle00): ptr gdk.EventSequence00 {. + importc: "gtk_gesture_single_get_current_sequence", libprag.} + +proc getCurrentSequence*(self: GestureSingle): gdk.EventSequence = + new(result) + result.impl = gtk_gesture_single_get_current_sequence(cast[ptr GestureSingle00](self.impl)) + +proc currentSequence*(self: GestureSingle): gdk.EventSequence = + new(result) + result.impl = gtk_gesture_single_get_current_sequence(cast[ptr GestureSingle00](self.impl)) + +proc gtk_gesture_single_get_exclusive*(self: ptr GestureSingle00): gboolean {. + importc: "gtk_gesture_single_get_exclusive", libprag.} + +proc getExclusive*(self: GestureSingle): bool = + toBool(gtk_gesture_single_get_exclusive(cast[ptr GestureSingle00](self.impl))) + +proc exclusive*(self: GestureSingle): bool = + toBool(gtk_gesture_single_get_exclusive(cast[ptr GestureSingle00](self.impl))) + +proc gtk_gesture_single_get_touch_only*(self: ptr GestureSingle00): gboolean {. + importc: "gtk_gesture_single_get_touch_only", libprag.} + +proc getTouchOnly*(self: GestureSingle): bool = + toBool(gtk_gesture_single_get_touch_only(cast[ptr GestureSingle00](self.impl))) + +proc touchOnly*(self: GestureSingle): bool = + toBool(gtk_gesture_single_get_touch_only(cast[ptr GestureSingle00](self.impl))) + +proc gtk_gesture_single_set_button*(self: ptr GestureSingle00; button: uint32) {. + importc: "gtk_gesture_single_set_button", libprag.} + +proc setButton*(self: GestureSingle; button: int) = + gtk_gesture_single_set_button(cast[ptr GestureSingle00](self.impl), uint32(button)) + +proc `button=`*(self: GestureSingle; button: int) = + gtk_gesture_single_set_button(cast[ptr GestureSingle00](self.impl), uint32(button)) + +proc gtk_gesture_single_set_exclusive*(self: ptr GestureSingle00; exclusive: gboolean) {. + importc: "gtk_gesture_single_set_exclusive", libprag.} + +proc setExclusive*(self: GestureSingle; exclusive: bool) = + gtk_gesture_single_set_exclusive(cast[ptr GestureSingle00](self.impl), gboolean(exclusive)) + +proc `exclusive=`*(self: GestureSingle; exclusive: bool) = + gtk_gesture_single_set_exclusive(cast[ptr GestureSingle00](self.impl), gboolean(exclusive)) + +proc gtk_gesture_single_set_touch_only*(self: ptr GestureSingle00; touchOnly: gboolean) {. + importc: "gtk_gesture_single_set_touch_only", libprag.} + +proc setTouchOnly*(self: GestureSingle; touchOnly: bool) = + gtk_gesture_single_set_touch_only(cast[ptr GestureSingle00](self.impl), gboolean(touchOnly)) + +proc `touchOnly=`*(self: GestureSingle; touchOnly: bool) = + gtk_gesture_single_set_touch_only(cast[ptr GestureSingle00](self.impl), gboolean(touchOnly)) + +type + GestureDrag* = ref object of GestureSingle + GestureDrag00* = object of GestureSingle00 + +proc scDragBegin*(self: GestureDrag; p: proc (self: ptr gobject.Object00; startX: cdouble; startY: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-begin", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragEnd*(self: GestureDrag; p: proc (self: ptr gobject.Object00; offsetX: cdouble; offsetY: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-end", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragUpdate*(self: GestureDrag; p: proc (self: ptr gobject.Object00; offsetX: cdouble; offsetY: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-update", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_gesture_drag_new*(widget: ptr Widget00): ptr GestureDrag00 {. + importc: "gtk_gesture_drag_new", libprag.} + +proc newGestureDrag*(widget: Widget): GestureDrag = + new(result, finalizeGObject) + result.impl = gtk_gesture_drag_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initGestureDrag*[T](result: var T; widget: Widget) = + assert(result is GestureDrag) + new(result, finalizeGObject) + result.impl = gtk_gesture_drag_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gesture_drag_get_offset*(self: ptr GestureDrag00; x: var cdouble; y: var cdouble): gboolean {. + importc: "gtk_gesture_drag_get_offset", libprag.} + +proc getOffset*(self: GestureDrag; x: var cdouble; y: var cdouble): bool = + toBool(gtk_gesture_drag_get_offset(cast[ptr GestureDrag00](self.impl), x, y)) + +proc offset*(self: GestureDrag; x: var cdouble; y: var cdouble): bool = + toBool(gtk_gesture_drag_get_offset(cast[ptr GestureDrag00](self.impl), x, y)) + +proc gtk_gesture_drag_get_start_point*(self: ptr GestureDrag00; x: var cdouble; y: var cdouble): gboolean {. + importc: "gtk_gesture_drag_get_start_point", libprag.} + +proc getStartPoint*(self: GestureDrag; x: var cdouble; y: var cdouble): bool = + toBool(gtk_gesture_drag_get_start_point(cast[ptr GestureDrag00](self.impl), x, y)) + +proc startPoint*(self: GestureDrag; x: var cdouble; y: var cdouble): bool = + toBool(gtk_gesture_drag_get_start_point(cast[ptr GestureDrag00](self.impl), x, y)) + +type + GestureDragClass00* {.pure.} = object + GestureDragClass* = ref object + impl*: ptr GestureDragClass00 + +type + GestureLongPress* = ref object of GestureSingle + GestureLongPress00* = object of GestureSingle00 + +proc scCancelled*(self: GestureLongPress; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cancelled", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPressed*(self: GestureLongPress; p: proc (self: ptr gobject.Object00; x: cdouble; y: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "pressed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_gesture_long_press_new*(widget: ptr Widget00): ptr GestureLongPress00 {. + importc: "gtk_gesture_long_press_new", libprag.} + +proc newGestureLongPress*(widget: Widget): GestureLongPress = + new(result, finalizeGObject) + result.impl = gtk_gesture_long_press_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initGestureLongPress*[T](result: var T; widget: Widget) = + assert(result is GestureLongPress) + new(result, finalizeGObject) + result.impl = gtk_gesture_long_press_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + GestureLongPressClass00* {.pure.} = object + GestureLongPressClass* = ref object + impl*: ptr GestureLongPressClass00 + +type + GestureMultiPress* = ref object of GestureSingle + GestureMultiPress00* = object of GestureSingle00 + +proc scPressed*(self: GestureMultiPress; p: proc (self: ptr gobject.Object00; nPress: int32; x: cdouble; y: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "pressed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scReleased*(self: GestureMultiPress; p: proc (self: ptr gobject.Object00; nPress: int32; x: cdouble; y: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "released", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStopped*(self: GestureMultiPress; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "stopped", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_gesture_multi_press_new*(widget: ptr Widget00): ptr GestureMultiPress00 {. + importc: "gtk_gesture_multi_press_new", libprag.} + +proc newGestureMultiPress*(widget: Widget): GestureMultiPress = + new(result, finalizeGObject) + result.impl = gtk_gesture_multi_press_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initGestureMultiPress*[T](result: var T; widget: Widget) = + assert(result is GestureMultiPress) + new(result, finalizeGObject) + result.impl = gtk_gesture_multi_press_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gesture_multi_press_get_area*(self: ptr GestureMultiPress00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_gesture_multi_press_get_area", libprag.} + +proc getArea*(self: ptr GestureMultiPress00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_gesture_multi_press_get_area", libprag.} + +proc area*(self: ptr GestureMultiPress00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_gesture_multi_press_get_area", libprag.} + +proc gtk_gesture_multi_press_set_area*(self: ptr GestureMultiPress00; rect: ptr gdk.Rectangle00) {. + importc: "gtk_gesture_multi_press_set_area", libprag.} + +proc setArea*(self: GestureMultiPress; rect: gdk.Rectangle) = + gtk_gesture_multi_press_set_area(cast[ptr GestureMultiPress00](self.impl), cast[ptr gdk.Rectangle00](rect.impl)) + +proc `area=`*(self: GestureMultiPress; rect: gdk.Rectangle) = + gtk_gesture_multi_press_set_area(cast[ptr GestureMultiPress00](self.impl), cast[ptr gdk.Rectangle00](rect.impl)) + +type + GestureMultiPressClass00* {.pure.} = object + GestureMultiPressClass* = ref object + impl*: ptr GestureMultiPressClass00 + +type + PanDirection* {.size: sizeof(cint), pure.} = enum + left = 0 + right = 1 + up = 2 + down = 3 + +type + GesturePan* = ref object of GestureDrag + GesturePan00* = object of GestureDrag00 + +proc scPan*(self: GesturePan; p: proc (self: ptr gobject.Object00; direction: PanDirection; offset: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "pan", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_gesture_pan_new*(widget: ptr Widget00; orientation: Orientation): ptr GesturePan00 {. + importc: "gtk_gesture_pan_new", libprag.} + +proc newGesturePan*(widget: Widget; orientation: Orientation): GesturePan = + new(result, finalizeGObject) + result.impl = gtk_gesture_pan_new(cast[ptr Widget00](widget.impl), orientation) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initGesturePan*[T](result: var T; widget: Widget; orientation: Orientation) = + assert(result is GesturePan) + new(result, finalizeGObject) + result.impl = gtk_gesture_pan_new(cast[ptr Widget00](widget.impl), orientation) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gesture_pan_get_orientation*(self: ptr GesturePan00): Orientation {. + importc: "gtk_gesture_pan_get_orientation", libprag.} + +proc getOrientation*(self: GesturePan): Orientation = + gtk_gesture_pan_get_orientation(cast[ptr GesturePan00](self.impl)) + +proc orientation*(self: GesturePan): Orientation = + gtk_gesture_pan_get_orientation(cast[ptr GesturePan00](self.impl)) + +proc gtk_gesture_pan_set_orientation*(self: ptr GesturePan00; orientation: Orientation) {. + importc: "gtk_gesture_pan_set_orientation", libprag.} + +proc setOrientation*(self: GesturePan; orientation: Orientation) = + gtk_gesture_pan_set_orientation(cast[ptr GesturePan00](self.impl), orientation) + +proc `orientation=`*(self: GesturePan; orientation: Orientation) = + gtk_gesture_pan_set_orientation(cast[ptr GesturePan00](self.impl), orientation) + +type + GesturePanClass00* {.pure.} = object + GesturePanClass* = ref object + impl*: ptr GesturePanClass00 + +type + GestureRotate* = ref object of Gesture + GestureRotate00* = object of Gesture00 + +proc scAngleChanged*(self: GestureRotate; p: proc (self: ptr gobject.Object00; angle: cdouble; angleDelta: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "angle-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_gesture_rotate_new*(widget: ptr Widget00): ptr GestureRotate00 {. + importc: "gtk_gesture_rotate_new", libprag.} + +proc newGestureRotate*(widget: Widget): GestureRotate = + new(result, finalizeGObject) + result.impl = gtk_gesture_rotate_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initGestureRotate*[T](result: var T; widget: Widget) = + assert(result is GestureRotate) + new(result, finalizeGObject) + result.impl = gtk_gesture_rotate_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gesture_rotate_get_angle_delta*(self: ptr GestureRotate00): cdouble {. + importc: "gtk_gesture_rotate_get_angle_delta", libprag.} + +proc getAngleDelta*(self: GestureRotate): cdouble = + gtk_gesture_rotate_get_angle_delta(cast[ptr GestureRotate00](self.impl)) + +proc angleDelta*(self: GestureRotate): cdouble = + gtk_gesture_rotate_get_angle_delta(cast[ptr GestureRotate00](self.impl)) + +type + GestureRotateClass00* {.pure.} = object + GestureRotateClass* = ref object + impl*: ptr GestureRotateClass00 + +type + GestureSingleClass00* {.pure.} = object + GestureSingleClass* = ref object + impl*: ptr GestureSingleClass00 + +type + GestureSwipe* = ref object of GestureSingle + GestureSwipe00* = object of GestureSingle00 + +proc scSwipe*(self: GestureSwipe; p: proc (self: ptr gobject.Object00; velocityX: cdouble; velocityY: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "swipe", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_gesture_swipe_new*(widget: ptr Widget00): ptr GestureSwipe00 {. + importc: "gtk_gesture_swipe_new", libprag.} + +proc newGestureSwipe*(widget: Widget): GestureSwipe = + new(result, finalizeGObject) + result.impl = gtk_gesture_swipe_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initGestureSwipe*[T](result: var T; widget: Widget) = + assert(result is GestureSwipe) + new(result, finalizeGObject) + result.impl = gtk_gesture_swipe_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gesture_swipe_get_velocity*(self: ptr GestureSwipe00; velocityX: var cdouble; + velocityY: var cdouble): gboolean {. + importc: "gtk_gesture_swipe_get_velocity", libprag.} + +proc getVelocity*(self: GestureSwipe; velocityX: var cdouble; velocityY: var cdouble): bool = + toBool(gtk_gesture_swipe_get_velocity(cast[ptr GestureSwipe00](self.impl), velocityX, velocityY)) + +proc velocity*(self: GestureSwipe; velocityX: var cdouble; velocityY: var cdouble): bool = + toBool(gtk_gesture_swipe_get_velocity(cast[ptr GestureSwipe00](self.impl), velocityX, velocityY)) + +type + GestureSwipeClass00* {.pure.} = object + GestureSwipeClass* = ref object + impl*: ptr GestureSwipeClass00 + +type + GestureZoom* = ref object of Gesture + GestureZoom00* = object of Gesture00 + +proc scScaleChanged*(self: GestureZoom; p: proc (self: ptr gobject.Object00; scale: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "scale-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_gesture_zoom_new*(widget: ptr Widget00): ptr GestureZoom00 {. + importc: "gtk_gesture_zoom_new", libprag.} + +proc newGestureZoom*(widget: Widget): GestureZoom = + new(result, finalizeGObject) + result.impl = gtk_gesture_zoom_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initGestureZoom*[T](result: var T; widget: Widget) = + assert(result is GestureZoom) + new(result, finalizeGObject) + result.impl = gtk_gesture_zoom_new(cast[ptr Widget00](widget.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_gesture_zoom_get_scale_delta*(self: ptr GestureZoom00): cdouble {. + importc: "gtk_gesture_zoom_get_scale_delta", libprag.} + +proc getScaleDelta*(self: GestureZoom): cdouble = + gtk_gesture_zoom_get_scale_delta(cast[ptr GestureZoom00](self.impl)) + +proc scaleDelta*(self: GestureZoom): cdouble = + gtk_gesture_zoom_get_scale_delta(cast[ptr GestureZoom00](self.impl)) + +type + GestureZoomClass00* {.pure.} = object + GestureZoomClass* = ref object + impl*: ptr GestureZoomClass00 + +type + Gradient00* {.pure.} = object + Gradient* = ref object + impl*: ptr Gradient00 + +proc gtk_gradient_new_linear*(x0: cdouble; y0: cdouble; x1: cdouble; y1: cdouble): ptr Gradient00 {. + importc: "gtk_gradient_new_linear", libprag.} + +proc newGradientLinear*(x0: cdouble; y0: cdouble; x1: cdouble; y1: cdouble): Gradient = + new(result) + result.impl = gtk_gradient_new_linear(x0, y0, x1, y1) + +proc initGradientLinear*[T](result: var T; x0: cdouble; y0: cdouble; x1: cdouble; y1: cdouble) = + assert(result is Gradient) + new(result) + result.impl = gtk_gradient_new_linear(x0, y0, x1, y1) + +proc gtk_gradient_new_radial*(x0: cdouble; y0: cdouble; radius0: cdouble; x1: cdouble; + y1: cdouble; radius1: cdouble): ptr Gradient00 {. + importc: "gtk_gradient_new_radial", libprag.} + +proc newGradientRadial*(x0: cdouble; y0: cdouble; radius0: cdouble; x1: cdouble; + y1: cdouble; radius1: cdouble): Gradient = + new(result) + result.impl = gtk_gradient_new_radial(x0, y0, radius0, x1, y1, radius1) + +proc initGradientRadial*[T](result: var T; x0: cdouble; y0: cdouble; radius0: cdouble; x1: cdouble; + y1: cdouble; radius1: cdouble) = + assert(result is Gradient) + new(result) + result.impl = gtk_gradient_new_radial(x0, y0, radius0, x1, y1, radius1) + +proc gtk_gradient_add_color_stop*(self: ptr Gradient00; offset: cdouble; color: ptr SymbolicColor00) {. + importc: "gtk_gradient_add_color_stop", libprag.} + +proc addColorStop*(self: Gradient; offset: cdouble; color: SymbolicColor) = + gtk_gradient_add_color_stop(cast[ptr Gradient00](self.impl), offset, cast[ptr SymbolicColor00](color.impl)) + +proc gtk_gradient_ref*(self: ptr Gradient00): ptr Gradient00 {. + importc: "gtk_gradient_ref", libprag.} + +proc `ref`*(self: Gradient): Gradient = + new(result) + result.impl = gtk_gradient_ref(cast[ptr Gradient00](self.impl)) + +proc gtk_gradient_resolve*(self: ptr Gradient00; props: ptr StyleProperties00; + resolvedGradient: var ptr cairo.Pattern00): gboolean {. + importc: "gtk_gradient_resolve", libprag.} + +proc resolve*(self: ptr Gradient00; props: ptr StyleProperties00; + resolvedGradient: var ptr cairo.Pattern00): gboolean {. + importc: "gtk_gradient_resolve", libprag.} + +proc gtk_gradient_resolve_for_context*(self: ptr Gradient00; context: ptr StyleContext00): ptr cairo.Pattern00 {. + importc: "gtk_gradient_resolve_for_context", libprag.} + +proc resolveForContext*(self: Gradient; context: StyleContext): cairo.Pattern = + new(result) + result.impl = gtk_gradient_resolve_for_context(cast[ptr Gradient00](self.impl), cast[ptr StyleContext00](context.impl)) + +proc gtk_gradient_to_string*(self: ptr Gradient00): cstring {. + importc: "gtk_gradient_to_string", libprag.} + +proc toString*(self: Gradient): string = + let resul0 = gtk_gradient_to_string(cast[ptr Gradient00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_gradient_unref*(self: ptr Gradient00) {. + importc: "gtk_gradient_unref", libprag.} + +proc unref*(self: Gradient) = + gtk_gradient_unref(cast[ptr Gradient00](self.impl)) + +type + GridPrivate00* {.pure.} = object + GridPrivate* = ref object + impl*: ptr GridPrivate00 + +type + Grid* = ref object of Container + Grid00* = object of Container00 + priv3: ptr GridPrivate00 + +proc gtk_grid_new*(): ptr Grid00 {. + importc: "gtk_grid_new", libprag.} + +proc newGrid*(): Grid = + new(result, finalizeGObject) + result.impl = gtk_grid_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initGrid*[T](result: var T) = + assert(result is Grid) + new(result, finalizeGObject) + result.impl = gtk_grid_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_grid_attach*(self: ptr Grid00; child: ptr Widget00; left: int32; + top: int32; width: int32; height: int32) {. + importc: "gtk_grid_attach", libprag.} + +proc attach*(self: Grid; child: Widget; left: int; top: int; width: int; + height: int) = + gtk_grid_attach(cast[ptr Grid00](self.impl), cast[ptr Widget00](child.impl), int32(left), int32(top), int32(width), int32(height)) + +proc gtk_grid_attach_next_to*(self: ptr Grid00; child: ptr Widget00; sibling: ptr Widget00; + side: PositionType; width: int32; height: int32) {. + importc: "gtk_grid_attach_next_to", libprag.} + +proc attachNextTo*(self: Grid; child: Widget; sibling: Widget; side: PositionType; + width: int; height: int) = + gtk_grid_attach_next_to(cast[ptr Grid00](self.impl), cast[ptr Widget00](child.impl), cast[ptr Widget00](sibling.impl), side, int32(width), int32(height)) + +proc gtk_grid_get_baseline_row*(self: ptr Grid00): int32 {. + importc: "gtk_grid_get_baseline_row", libprag.} + +proc getBaselineRow*(self: Grid): int = + int(gtk_grid_get_baseline_row(cast[ptr Grid00](self.impl))) + +proc baselineRow*(self: Grid): int = + int(gtk_grid_get_baseline_row(cast[ptr Grid00](self.impl))) + +proc gtk_grid_get_child_at*(self: ptr Grid00; left: int32; top: int32): ptr Widget00 {. + importc: "gtk_grid_get_child_at", libprag.} + +proc getChildAt*(self: Grid; left: int; top: int): Widget = + let gobj = gtk_grid_get_child_at(cast[ptr Grid00](self.impl), int32(left), int32(top)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc childAt*(self: Grid; left: int; top: int): Widget = + let gobj = gtk_grid_get_child_at(cast[ptr Grid00](self.impl), int32(left), int32(top)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_grid_get_column_homogeneous*(self: ptr Grid00): gboolean {. + importc: "gtk_grid_get_column_homogeneous", libprag.} + +proc getColumnHomogeneous*(self: Grid): bool = + toBool(gtk_grid_get_column_homogeneous(cast[ptr Grid00](self.impl))) + +proc columnHomogeneous*(self: Grid): bool = + toBool(gtk_grid_get_column_homogeneous(cast[ptr Grid00](self.impl))) + +proc gtk_grid_get_column_spacing*(self: ptr Grid00): uint32 {. + importc: "gtk_grid_get_column_spacing", libprag.} + +proc getColumnSpacing*(self: Grid): int = + int(gtk_grid_get_column_spacing(cast[ptr Grid00](self.impl))) + +proc columnSpacing*(self: Grid): int = + int(gtk_grid_get_column_spacing(cast[ptr Grid00](self.impl))) + +proc gtk_grid_get_row_baseline_position*(self: ptr Grid00; row: int32): BaselinePosition {. + importc: "gtk_grid_get_row_baseline_position", libprag.} + +proc getRowBaselinePosition*(self: Grid; row: int): BaselinePosition = + gtk_grid_get_row_baseline_position(cast[ptr Grid00](self.impl), int32(row)) + +proc rowBaselinePosition*(self: Grid; row: int): BaselinePosition = + gtk_grid_get_row_baseline_position(cast[ptr Grid00](self.impl), int32(row)) + +proc gtk_grid_get_row_homogeneous*(self: ptr Grid00): gboolean {. + importc: "gtk_grid_get_row_homogeneous", libprag.} + +proc getRowHomogeneous*(self: Grid): bool = + toBool(gtk_grid_get_row_homogeneous(cast[ptr Grid00](self.impl))) + +proc rowHomogeneous*(self: Grid): bool = + toBool(gtk_grid_get_row_homogeneous(cast[ptr Grid00](self.impl))) + +proc gtk_grid_get_row_spacing*(self: ptr Grid00): uint32 {. + importc: "gtk_grid_get_row_spacing", libprag.} + +proc getRowSpacing*(self: Grid): int = + int(gtk_grid_get_row_spacing(cast[ptr Grid00](self.impl))) + +proc rowSpacing*(self: Grid): int = + int(gtk_grid_get_row_spacing(cast[ptr Grid00](self.impl))) + +proc gtk_grid_insert_column*(self: ptr Grid00; position: int32) {. + importc: "gtk_grid_insert_column", libprag.} + +proc insertColumn*(self: Grid; position: int) = + gtk_grid_insert_column(cast[ptr Grid00](self.impl), int32(position)) + +proc gtk_grid_insert_next_to*(self: ptr Grid00; sibling: ptr Widget00; side: PositionType) {. + importc: "gtk_grid_insert_next_to", libprag.} + +proc insertNextTo*(self: Grid; sibling: Widget; side: PositionType) = + gtk_grid_insert_next_to(cast[ptr Grid00](self.impl), cast[ptr Widget00](sibling.impl), side) + +proc gtk_grid_insert_row*(self: ptr Grid00; position: int32) {. + importc: "gtk_grid_insert_row", libprag.} + +proc insertRow*(self: Grid; position: int) = + gtk_grid_insert_row(cast[ptr Grid00](self.impl), int32(position)) + +proc gtk_grid_remove_column*(self: ptr Grid00; position: int32) {. + importc: "gtk_grid_remove_column", libprag.} + +proc removeColumn*(self: Grid; position: int) = + gtk_grid_remove_column(cast[ptr Grid00](self.impl), int32(position)) + +proc gtk_grid_remove_row*(self: ptr Grid00; position: int32) {. + importc: "gtk_grid_remove_row", libprag.} + +proc removeRow*(self: Grid; position: int) = + gtk_grid_remove_row(cast[ptr Grid00](self.impl), int32(position)) + +proc gtk_grid_set_baseline_row*(self: ptr Grid00; row: int32) {. + importc: "gtk_grid_set_baseline_row", libprag.} + +proc setBaselineRow*(self: Grid; row: int) = + gtk_grid_set_baseline_row(cast[ptr Grid00](self.impl), int32(row)) + +proc `baselineRow=`*(self: Grid; row: int) = + gtk_grid_set_baseline_row(cast[ptr Grid00](self.impl), int32(row)) + +proc gtk_grid_set_column_homogeneous*(self: ptr Grid00; homogeneous: gboolean) {. + importc: "gtk_grid_set_column_homogeneous", libprag.} + +proc setColumnHomogeneous*(self: Grid; homogeneous: bool) = + gtk_grid_set_column_homogeneous(cast[ptr Grid00](self.impl), gboolean(homogeneous)) + +proc `columnHomogeneous=`*(self: Grid; homogeneous: bool) = + gtk_grid_set_column_homogeneous(cast[ptr Grid00](self.impl), gboolean(homogeneous)) + +proc gtk_grid_set_column_spacing*(self: ptr Grid00; spacing: uint32) {. + importc: "gtk_grid_set_column_spacing", libprag.} + +proc setColumnSpacing*(self: Grid; spacing: int) = + gtk_grid_set_column_spacing(cast[ptr Grid00](self.impl), uint32(spacing)) + +proc `columnSpacing=`*(self: Grid; spacing: int) = + gtk_grid_set_column_spacing(cast[ptr Grid00](self.impl), uint32(spacing)) + +proc gtk_grid_set_row_baseline_position*(self: ptr Grid00; row: int32; pos: BaselinePosition) {. + importc: "gtk_grid_set_row_baseline_position", libprag.} + +proc setRowBaselinePosition*(self: Grid; row: int; pos: BaselinePosition) = + gtk_grid_set_row_baseline_position(cast[ptr Grid00](self.impl), int32(row), pos) + +proc gtk_grid_set_row_homogeneous*(self: ptr Grid00; homogeneous: gboolean) {. + importc: "gtk_grid_set_row_homogeneous", libprag.} + +proc setRowHomogeneous*(self: Grid; homogeneous: bool) = + gtk_grid_set_row_homogeneous(cast[ptr Grid00](self.impl), gboolean(homogeneous)) + +proc `rowHomogeneous=`*(self: Grid; homogeneous: bool) = + gtk_grid_set_row_homogeneous(cast[ptr Grid00](self.impl), gboolean(homogeneous)) + +proc gtk_grid_set_row_spacing*(self: ptr Grid00; spacing: uint32) {. + importc: "gtk_grid_set_row_spacing", libprag.} + +proc setRowSpacing*(self: Grid; spacing: int) = + gtk_grid_set_row_spacing(cast[ptr Grid00](self.impl), uint32(spacing)) + +proc `rowSpacing=`*(self: Grid; spacing: int) = + gtk_grid_set_row_spacing(cast[ptr Grid00](self.impl), uint32(spacing)) + +type + GridClass00* {.pure.} = object + parentClass*: ContainerClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + GridClass* = ref object + impl*: ptr GridClass00 + +type + HBox* = ref object of Box + HBox00* = object of Box00 + +proc gtk_hbox_new*(homogeneous: gboolean; spacing: int32): ptr HBox00 {. + importc: "gtk_hbox_new", libprag.} + +proc newHBox*(homogeneous: bool; spacing: int): HBox = + new(result, finalizeGObject) + result.impl = gtk_hbox_new(gboolean(homogeneous), int32(spacing)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHBox*[T](result: var T; homogeneous: bool; spacing: int) = + assert(result is HBox) + new(result, finalizeGObject) + result.impl = gtk_hbox_new(gboolean(homogeneous), int32(spacing)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + HBoxClass00* {.pure.} = object + parentClass*: BoxClass00 + HBoxClass* = ref object + impl*: ptr HBoxClass00 + +type + HButtonBox* = ref object of ButtonBox + HButtonBox00* = object of ButtonBox00 + +proc gtk_hbutton_box_new*(): ptr HButtonBox00 {. + importc: "gtk_hbutton_box_new", libprag.} + +proc newHButtonBox*(): HButtonBox = + new(result, finalizeGObject) + result.impl = gtk_hbutton_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHButtonBox*[T](result: var T) = + assert(result is HButtonBox) + new(result, finalizeGObject) + result.impl = gtk_hbutton_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + HButtonBoxClass00* {.pure.} = object + parentClass*: ButtonBoxClass00 + HButtonBoxClass* = ref object + impl*: ptr HButtonBoxClass00 + +type + PanedPrivate00* {.pure.} = object + PanedPrivate* = ref object + impl*: ptr PanedPrivate00 + +type + Paned* = ref object of Container + Paned00* = object of Container00 + priv3: ptr PanedPrivate00 + +proc scAcceptPosition*(self: Paned; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "accept-position", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCancelPosition*(self: Paned; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cancel-position", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCycleChildFocus*(self: Paned; p: proc (self: ptr gobject.Object00; reversed: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cycle-child-focus", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCycleHandleFocus*(self: Paned; p: proc (self: ptr gobject.Object00; reversed: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cycle-handle-focus", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveHandle*(self: Paned; p: proc (self: ptr gobject.Object00; scrollType: ScrollType; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-handle", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleHandleFocus*(self: Paned; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-handle-focus", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_paned_new*(orientation: Orientation): ptr Paned00 {. + importc: "gtk_paned_new", libprag.} + +proc newPaned*(orientation: Orientation): Paned = + new(result, finalizeGObject) + result.impl = gtk_paned_new(orientation) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPaned*[T](result: var T; orientation: Orientation) = + assert(result is Paned) + new(result, finalizeGObject) + result.impl = gtk_paned_new(orientation) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_paned_add1*(self: ptr Paned00; child: ptr Widget00) {. + importc: "gtk_paned_add1", libprag.} + +proc add1*(self: Paned; child: Widget) = + gtk_paned_add1(cast[ptr Paned00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_paned_add2*(self: ptr Paned00; child: ptr Widget00) {. + importc: "gtk_paned_add2", libprag.} + +proc add2*(self: Paned; child: Widget) = + gtk_paned_add2(cast[ptr Paned00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_paned_get_child1*(self: ptr Paned00): ptr Widget00 {. + importc: "gtk_paned_get_child1", libprag.} + +proc getChild1*(self: Paned): Widget = + let gobj = gtk_paned_get_child1(cast[ptr Paned00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc child1*(self: Paned): Widget = + let gobj = gtk_paned_get_child1(cast[ptr Paned00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_paned_get_child2*(self: ptr Paned00): ptr Widget00 {. + importc: "gtk_paned_get_child2", libprag.} + +proc getChild2*(self: Paned): Widget = + let gobj = gtk_paned_get_child2(cast[ptr Paned00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc child2*(self: Paned): Widget = + let gobj = gtk_paned_get_child2(cast[ptr Paned00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_paned_get_handle_window*(self: ptr Paned00): ptr gdk.Window00 {. + importc: "gtk_paned_get_handle_window", libprag.} + +proc getHandleWindow*(self: Paned): gdk.Window = + let gobj = gtk_paned_get_handle_window(cast[ptr Paned00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc handleWindow*(self: Paned): gdk.Window = + let gobj = gtk_paned_get_handle_window(cast[ptr Paned00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_paned_get_position*(self: ptr Paned00): int32 {. + importc: "gtk_paned_get_position", libprag.} + +proc getPosition*(self: Paned): int = + int(gtk_paned_get_position(cast[ptr Paned00](self.impl))) + +proc position*(self: Paned): int = + int(gtk_paned_get_position(cast[ptr Paned00](self.impl))) + +proc gtk_paned_get_wide_handle*(self: ptr Paned00): gboolean {. + importc: "gtk_paned_get_wide_handle", libprag.} + +proc getWideHandle*(self: Paned): bool = + toBool(gtk_paned_get_wide_handle(cast[ptr Paned00](self.impl))) + +proc wideHandle*(self: Paned): bool = + toBool(gtk_paned_get_wide_handle(cast[ptr Paned00](self.impl))) + +proc gtk_paned_pack1*(self: ptr Paned00; child: ptr Widget00; resize: gboolean; + shrink: gboolean) {. + importc: "gtk_paned_pack1", libprag.} + +proc pack1*(self: Paned; child: Widget; resize: bool; shrink: bool) = + gtk_paned_pack1(cast[ptr Paned00](self.impl), cast[ptr Widget00](child.impl), gboolean(resize), gboolean(shrink)) + +proc gtk_paned_pack2*(self: ptr Paned00; child: ptr Widget00; resize: gboolean; + shrink: gboolean) {. + importc: "gtk_paned_pack2", libprag.} + +proc pack2*(self: Paned; child: Widget; resize: bool; shrink: bool) = + gtk_paned_pack2(cast[ptr Paned00](self.impl), cast[ptr Widget00](child.impl), gboolean(resize), gboolean(shrink)) + +proc gtk_paned_set_position*(self: ptr Paned00; position: int32) {. + importc: "gtk_paned_set_position", libprag.} + +proc setPosition*(self: Paned; position: int) = + gtk_paned_set_position(cast[ptr Paned00](self.impl), int32(position)) + +proc `position=`*(self: Paned; position: int) = + gtk_paned_set_position(cast[ptr Paned00](self.impl), int32(position)) + +proc gtk_paned_set_wide_handle*(self: ptr Paned00; wide: gboolean) {. + importc: "gtk_paned_set_wide_handle", libprag.} + +proc setWideHandle*(self: Paned; wide: bool) = + gtk_paned_set_wide_handle(cast[ptr Paned00](self.impl), gboolean(wide)) + +proc `wideHandle=`*(self: Paned; wide: bool) = + gtk_paned_set_wide_handle(cast[ptr Paned00](self.impl), gboolean(wide)) + +type + HPaned* = ref object of Paned + HPaned00* = object of Paned00 + +proc gtk_hpaned_new*(): ptr HPaned00 {. + importc: "gtk_hpaned_new", libprag.} + +proc newHPaned*(): HPaned = + new(result, finalizeGObject) + result.impl = gtk_hpaned_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHPaned*[T](result: var T) = + assert(result is HPaned) + new(result, finalizeGObject) + result.impl = gtk_hpaned_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PanedClass00* {.pure.} = object + parentClass*: ContainerClass00 + cycleChildFocus*: proc(paned: ptr Paned00; reverse: gboolean): gboolean {.cdecl.} + toggleHandleFocus*: proc(paned: ptr Paned00): gboolean {.cdecl.} + moveHandle*: proc(paned: ptr Paned00; scroll: ScrollType): gboolean {.cdecl.} + cycleHandleFocus*: proc(paned: ptr Paned00; reverse: gboolean): gboolean {.cdecl.} + acceptPosition*: proc(paned: ptr Paned00): gboolean {.cdecl.} + cancelPosition*: proc(paned: ptr Paned00): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + PanedClass* = ref object + impl*: ptr PanedClass00 + +type + HPanedClass00* {.pure.} = object + parentClass*: PanedClass00 + HPanedClass* = ref object + impl*: ptr HPanedClass00 + +type + HSVPrivate00* {.pure.} = object + HSVPrivate* = ref object + impl*: ptr HSVPrivate00 + +type + HSV* = ref object of Widget + HSV00* = object of Widget00 + priv2: ptr HSVPrivate00 + +proc scChanged*(self: HSV; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMove*(self: HSV; p: proc (self: ptr gobject.Object00; `object`: DirectionType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_hsv_new*(): ptr HSV00 {. + importc: "gtk_hsv_new", libprag.} + +proc newHSV*(): HSV = + new(result, finalizeGObject) + result.impl = gtk_hsv_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHSV*[T](result: var T) = + assert(result is HSV) + new(result, finalizeGObject) + result.impl = gtk_hsv_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_hsv_to_rgb*(h: cdouble; s: cdouble; v: cdouble; r: var cdouble; + g: var cdouble; b: var cdouble) {. + importc: "gtk_hsv_to_rgb", libprag.} + +proc toRgb*(h: cdouble; s: cdouble; v: cdouble; r: var cdouble; + g: var cdouble; b: var cdouble) {. + importc: "gtk_hsv_to_rgb", libprag.} + +proc gtk_hsv_get_color*(self: ptr HSV00; h: var cdouble; s: var cdouble; v: var cdouble) {. + importc: "gtk_hsv_get_color", libprag.} + +proc getColor*(self: HSV; h: var cdouble; s: var cdouble; v: var cdouble) = + gtk_hsv_get_color(cast[ptr HSV00](self.impl), h, s, v) + +proc color*(self: HSV; h: var cdouble; s: var cdouble; v: var cdouble) = + gtk_hsv_get_color(cast[ptr HSV00](self.impl), h, s, v) + +proc gtk_hsv_get_metrics*(self: ptr HSV00; size: var int32; ringWidth: var int32) {. + importc: "gtk_hsv_get_metrics", libprag.} + +proc getMetrics*(self: HSV; size: var int; ringWidth: var int) = + var ringWidth_00 = int32(ringWidth) + var size_00 = int32(size) + gtk_hsv_get_metrics(cast[ptr HSV00](self.impl), size_00, ringWidth_00) + ringWidth = int(ringWidth_00) + size = int(size_00) + +proc metrics*(self: HSV; size: var int; ringWidth: var int) = + var ringWidth_00 = int32(ringWidth) + var size_00 = int32(size) + gtk_hsv_get_metrics(cast[ptr HSV00](self.impl), size_00, ringWidth_00) + ringWidth = int(ringWidth_00) + size = int(size_00) + +proc gtk_hsv_is_adjusting*(self: ptr HSV00): gboolean {. + importc: "gtk_hsv_is_adjusting", libprag.} + +proc isAdjusting*(self: HSV): bool = + toBool(gtk_hsv_is_adjusting(cast[ptr HSV00](self.impl))) + +proc gtk_hsv_set_color*(self: ptr HSV00; h: cdouble; s: cdouble; v: cdouble) {. + importc: "gtk_hsv_set_color", libprag.} + +proc setColor*(self: HSV; h: cdouble; s: cdouble; v: cdouble) = + gtk_hsv_set_color(cast[ptr HSV00](self.impl), h, s, v) + +proc gtk_hsv_set_metrics*(self: ptr HSV00; size: int32; ringWidth: int32) {. + importc: "gtk_hsv_set_metrics", libprag.} + +proc setMetrics*(self: HSV; size: int; ringWidth: int) = + gtk_hsv_set_metrics(cast[ptr HSV00](self.impl), int32(size), int32(ringWidth)) + +type + HSVClass00* {.pure.} = object + parentClass*: WidgetClass00 + changed*: proc(hsv: ptr HSV00) {.cdecl.} + move*: proc(hsv: ptr HSV00; `type`: DirectionType) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + HSVClass* = ref object + impl*: ptr HSVClass00 + +type + RangePrivate00* {.pure.} = object + RangePrivate* = ref object + impl*: ptr RangePrivate00 + +type + Range* = ref object of Widget + Range00* = object of Widget00 + priv2: ptr RangePrivate00 + +proc scAdjustBounds*(self: Range; p: proc (self: ptr gobject.Object00; value: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "adjust-bounds", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scChangeValue*(self: Range; p: proc (self: ptr gobject.Object00; scroll: ScrollType; value: cdouble; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "change-value", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveSlider*(self: Range; p: proc (self: ptr gobject.Object00; step: ScrollType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-slider", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scValueChanged*(self: Range; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "value-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_range_get_adjustment*(self: ptr Range00): ptr Adjustment00 {. + importc: "gtk_range_get_adjustment", libprag.} + +proc getAdjustment*(self: Range): Adjustment = + let gobj = gtk_range_get_adjustment(cast[ptr Range00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc adjustment*(self: Range): Adjustment = + let gobj = gtk_range_get_adjustment(cast[ptr Range00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_range_get_fill_level*(self: ptr Range00): cdouble {. + importc: "gtk_range_get_fill_level", libprag.} + +proc getFillLevel*(self: Range): cdouble = + gtk_range_get_fill_level(cast[ptr Range00](self.impl)) + +proc fillLevel*(self: Range): cdouble = + gtk_range_get_fill_level(cast[ptr Range00](self.impl)) + +proc gtk_range_get_flippable*(self: ptr Range00): gboolean {. + importc: "gtk_range_get_flippable", libprag.} + +proc getFlippable*(self: Range): bool = + toBool(gtk_range_get_flippable(cast[ptr Range00](self.impl))) + +proc flippable*(self: Range): bool = + toBool(gtk_range_get_flippable(cast[ptr Range00](self.impl))) + +proc gtk_range_get_inverted*(self: ptr Range00): gboolean {. + importc: "gtk_range_get_inverted", libprag.} + +proc getInverted*(self: Range): bool = + toBool(gtk_range_get_inverted(cast[ptr Range00](self.impl))) + +proc inverted*(self: Range): bool = + toBool(gtk_range_get_inverted(cast[ptr Range00](self.impl))) + +proc gtk_range_get_lower_stepper_sensitivity*(self: ptr Range00): SensitivityType {. + importc: "gtk_range_get_lower_stepper_sensitivity", libprag.} + +proc getLowerStepperSensitivity*(self: Range): SensitivityType = + gtk_range_get_lower_stepper_sensitivity(cast[ptr Range00](self.impl)) + +proc lowerStepperSensitivity*(self: Range): SensitivityType = + gtk_range_get_lower_stepper_sensitivity(cast[ptr Range00](self.impl)) + +proc gtk_range_get_min_slider_size*(self: ptr Range00): int32 {. + importc: "gtk_range_get_min_slider_size", libprag.} + +proc getMinSliderSize*(self: Range): int = + int(gtk_range_get_min_slider_size(cast[ptr Range00](self.impl))) + +proc minSliderSize*(self: Range): int = + int(gtk_range_get_min_slider_size(cast[ptr Range00](self.impl))) + +proc gtk_range_get_range_rect*(self: ptr Range00; rangeRect: var gdk.Rectangle00) {. + importc: "gtk_range_get_range_rect", libprag.} + +proc getRangeRect*(self: ptr Range00; rangeRect: var gdk.Rectangle00) {. + importc: "gtk_range_get_range_rect", libprag.} + +proc rangeRect*(self: ptr Range00; rangeRect: var gdk.Rectangle00) {. + importc: "gtk_range_get_range_rect", libprag.} + +proc gtk_range_get_restrict_to_fill_level*(self: ptr Range00): gboolean {. + importc: "gtk_range_get_restrict_to_fill_level", libprag.} + +proc getRestrictToFillLevel*(self: Range): bool = + toBool(gtk_range_get_restrict_to_fill_level(cast[ptr Range00](self.impl))) + +proc restrictToFillLevel*(self: Range): bool = + toBool(gtk_range_get_restrict_to_fill_level(cast[ptr Range00](self.impl))) + +proc gtk_range_get_round_digits*(self: ptr Range00): int32 {. + importc: "gtk_range_get_round_digits", libprag.} + +proc getRoundDigits*(self: Range): int = + int(gtk_range_get_round_digits(cast[ptr Range00](self.impl))) + +proc roundDigits*(self: Range): int = + int(gtk_range_get_round_digits(cast[ptr Range00](self.impl))) + +proc gtk_range_get_show_fill_level*(self: ptr Range00): gboolean {. + importc: "gtk_range_get_show_fill_level", libprag.} + +proc getShowFillLevel*(self: Range): bool = + toBool(gtk_range_get_show_fill_level(cast[ptr Range00](self.impl))) + +proc showFillLevel*(self: Range): bool = + toBool(gtk_range_get_show_fill_level(cast[ptr Range00](self.impl))) + +proc gtk_range_get_slider_range*(self: ptr Range00; sliderStart: var int32; sliderEnd: var int32) {. + importc: "gtk_range_get_slider_range", libprag.} + +proc getSliderRange*(self: Range; sliderStart: var int; sliderEnd: var int) = + var sliderEnd_00 = int32(sliderEnd) + var sliderStart_00 = int32(sliderStart) + gtk_range_get_slider_range(cast[ptr Range00](self.impl), sliderStart_00, sliderEnd_00) + sliderEnd = int(sliderEnd_00) + sliderStart = int(sliderStart_00) + +proc sliderRange*(self: Range; sliderStart: var int; sliderEnd: var int) = + var sliderEnd_00 = int32(sliderEnd) + var sliderStart_00 = int32(sliderStart) + gtk_range_get_slider_range(cast[ptr Range00](self.impl), sliderStart_00, sliderEnd_00) + sliderEnd = int(sliderEnd_00) + sliderStart = int(sliderStart_00) + +proc gtk_range_get_slider_size_fixed*(self: ptr Range00): gboolean {. + importc: "gtk_range_get_slider_size_fixed", libprag.} + +proc getSliderSizeFixed*(self: Range): bool = + toBool(gtk_range_get_slider_size_fixed(cast[ptr Range00](self.impl))) + +proc sliderSizeFixed*(self: Range): bool = + toBool(gtk_range_get_slider_size_fixed(cast[ptr Range00](self.impl))) + +proc gtk_range_get_upper_stepper_sensitivity*(self: ptr Range00): SensitivityType {. + importc: "gtk_range_get_upper_stepper_sensitivity", libprag.} + +proc getUpperStepperSensitivity*(self: Range): SensitivityType = + gtk_range_get_upper_stepper_sensitivity(cast[ptr Range00](self.impl)) + +proc upperStepperSensitivity*(self: Range): SensitivityType = + gtk_range_get_upper_stepper_sensitivity(cast[ptr Range00](self.impl)) + +proc gtk_range_get_value*(self: ptr Range00): cdouble {. + importc: "gtk_range_get_value", libprag.} + +proc getValue*(self: Range): cdouble = + gtk_range_get_value(cast[ptr Range00](self.impl)) + +proc value*(self: Range): cdouble = + gtk_range_get_value(cast[ptr Range00](self.impl)) + +proc gtk_range_set_adjustment*(self: ptr Range00; adjustment: ptr Adjustment00) {. + importc: "gtk_range_set_adjustment", libprag.} + +proc setAdjustment*(self: Range; adjustment: Adjustment) = + gtk_range_set_adjustment(cast[ptr Range00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `adjustment=`*(self: Range; adjustment: Adjustment) = + gtk_range_set_adjustment(cast[ptr Range00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_range_set_fill_level*(self: ptr Range00; fillLevel: cdouble) {. + importc: "gtk_range_set_fill_level", libprag.} + +proc setFillLevel*(self: Range; fillLevel: cdouble) = + gtk_range_set_fill_level(cast[ptr Range00](self.impl), fillLevel) + +proc `fillLevel=`*(self: Range; fillLevel: cdouble) = + gtk_range_set_fill_level(cast[ptr Range00](self.impl), fillLevel) + +proc gtk_range_set_flippable*(self: ptr Range00; flippable: gboolean) {. + importc: "gtk_range_set_flippable", libprag.} + +proc setFlippable*(self: Range; flippable: bool) = + gtk_range_set_flippable(cast[ptr Range00](self.impl), gboolean(flippable)) + +proc `flippable=`*(self: Range; flippable: bool) = + gtk_range_set_flippable(cast[ptr Range00](self.impl), gboolean(flippable)) + +proc gtk_range_set_increments*(self: ptr Range00; step: cdouble; page: cdouble) {. + importc: "gtk_range_set_increments", libprag.} + +proc setIncrements*(self: Range; step: cdouble; page: cdouble) = + gtk_range_set_increments(cast[ptr Range00](self.impl), step, page) + +proc gtk_range_set_inverted*(self: ptr Range00; setting: gboolean) {. + importc: "gtk_range_set_inverted", libprag.} + +proc setInverted*(self: Range; setting: bool) = + gtk_range_set_inverted(cast[ptr Range00](self.impl), gboolean(setting)) + +proc `inverted=`*(self: Range; setting: bool) = + gtk_range_set_inverted(cast[ptr Range00](self.impl), gboolean(setting)) + +proc gtk_range_set_lower_stepper_sensitivity*(self: ptr Range00; sensitivity: SensitivityType) {. + importc: "gtk_range_set_lower_stepper_sensitivity", libprag.} + +proc setLowerStepperSensitivity*(self: Range; sensitivity: SensitivityType) = + gtk_range_set_lower_stepper_sensitivity(cast[ptr Range00](self.impl), sensitivity) + +proc `lowerStepperSensitivity=`*(self: Range; sensitivity: SensitivityType) = + gtk_range_set_lower_stepper_sensitivity(cast[ptr Range00](self.impl), sensitivity) + +proc gtk_range_set_min_slider_size*(self: ptr Range00; minSize: int32) {. + importc: "gtk_range_set_min_slider_size", libprag.} + +proc setMinSliderSize*(self: Range; minSize: int) = + gtk_range_set_min_slider_size(cast[ptr Range00](self.impl), int32(minSize)) + +proc `minSliderSize=`*(self: Range; minSize: int) = + gtk_range_set_min_slider_size(cast[ptr Range00](self.impl), int32(minSize)) + +proc gtk_range_set_range*(self: ptr Range00; min: cdouble; max: cdouble) {. + importc: "gtk_range_set_range", libprag.} + +proc setRange*(self: Range; min: cdouble; max: cdouble) = + gtk_range_set_range(cast[ptr Range00](self.impl), min, max) + +proc gtk_range_set_restrict_to_fill_level*(self: ptr Range00; restrictToFillLevel: gboolean) {. + importc: "gtk_range_set_restrict_to_fill_level", libprag.} + +proc setRestrictToFillLevel*(self: Range; restrictToFillLevel: bool) = + gtk_range_set_restrict_to_fill_level(cast[ptr Range00](self.impl), gboolean(restrictToFillLevel)) + +proc `restrictToFillLevel=`*(self: Range; restrictToFillLevel: bool) = + gtk_range_set_restrict_to_fill_level(cast[ptr Range00](self.impl), gboolean(restrictToFillLevel)) + +proc gtk_range_set_round_digits*(self: ptr Range00; roundDigits: int32) {. + importc: "gtk_range_set_round_digits", libprag.} + +proc setRoundDigits*(self: Range; roundDigits: int) = + gtk_range_set_round_digits(cast[ptr Range00](self.impl), int32(roundDigits)) + +proc `roundDigits=`*(self: Range; roundDigits: int) = + gtk_range_set_round_digits(cast[ptr Range00](self.impl), int32(roundDigits)) + +proc gtk_range_set_show_fill_level*(self: ptr Range00; showFillLevel: gboolean) {. + importc: "gtk_range_set_show_fill_level", libprag.} + +proc setShowFillLevel*(self: Range; showFillLevel: bool) = + gtk_range_set_show_fill_level(cast[ptr Range00](self.impl), gboolean(showFillLevel)) + +proc `showFillLevel=`*(self: Range; showFillLevel: bool) = + gtk_range_set_show_fill_level(cast[ptr Range00](self.impl), gboolean(showFillLevel)) + +proc gtk_range_set_slider_size_fixed*(self: ptr Range00; sizeFixed: gboolean) {. + importc: "gtk_range_set_slider_size_fixed", libprag.} + +proc setSliderSizeFixed*(self: Range; sizeFixed: bool) = + gtk_range_set_slider_size_fixed(cast[ptr Range00](self.impl), gboolean(sizeFixed)) + +proc `sliderSizeFixed=`*(self: Range; sizeFixed: bool) = + gtk_range_set_slider_size_fixed(cast[ptr Range00](self.impl), gboolean(sizeFixed)) + +proc gtk_range_set_upper_stepper_sensitivity*(self: ptr Range00; sensitivity: SensitivityType) {. + importc: "gtk_range_set_upper_stepper_sensitivity", libprag.} + +proc setUpperStepperSensitivity*(self: Range; sensitivity: SensitivityType) = + gtk_range_set_upper_stepper_sensitivity(cast[ptr Range00](self.impl), sensitivity) + +proc `upperStepperSensitivity=`*(self: Range; sensitivity: SensitivityType) = + gtk_range_set_upper_stepper_sensitivity(cast[ptr Range00](self.impl), sensitivity) + +proc gtk_range_set_value*(self: ptr Range00; value: cdouble) {. + importc: "gtk_range_set_value", libprag.} + +proc setValue*(self: Range; value: cdouble) = + gtk_range_set_value(cast[ptr Range00](self.impl), value) + +proc `value=`*(self: Range; value: cdouble) = + gtk_range_set_value(cast[ptr Range00](self.impl), value) + +type + ScalePrivate00* {.pure.} = object + ScalePrivate* = ref object + impl*: ptr ScalePrivate00 + +type + Scale* = ref object of Range + Scale00* = object of Range00 + priv3: ptr ScalePrivate00 + +proc scFormatValue*(self: Scale; p: proc (self: ptr gobject.Object00; value: cdouble; xdata: pointer): cstring {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "format-value", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_scale_new*(orientation: Orientation; adjustment: ptr Adjustment00): ptr Scale00 {. + importc: "gtk_scale_new", libprag.} + +proc newScale*(orientation: Orientation; adjustment: Adjustment): Scale = + new(result, finalizeGObject) + result.impl = gtk_scale_new(orientation, cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initScale*[T](result: var T; orientation: Orientation; adjustment: Adjustment) = + assert(result is Scale) + new(result, finalizeGObject) + result.impl = gtk_scale_new(orientation, cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scale_new_with_range*(orientation: Orientation; min: cdouble; max: cdouble; + step: cdouble): ptr Scale00 {. + importc: "gtk_scale_new_with_range", libprag.} + +proc newScaleWithRange*(orientation: Orientation; min: cdouble; max: cdouble; + step: cdouble): Scale = + new(result, finalizeGObject) + result.impl = gtk_scale_new_with_range(orientation, min, max, step) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initScaleWithRange*[T](result: var T; orientation: Orientation; min: cdouble; max: cdouble; + step: cdouble) = + assert(result is Scale) + new(result, finalizeGObject) + result.impl = gtk_scale_new_with_range(orientation, min, max, step) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scale_add_mark*(self: ptr Scale00; value: cdouble; position: PositionType; + markup: cstring) {. + importc: "gtk_scale_add_mark", libprag.} + +proc addMark*(self: Scale; value: cdouble; position: PositionType; + markup: string) = + gtk_scale_add_mark(cast[ptr Scale00](self.impl), value, position, cstring(markup)) + +proc gtk_scale_clear_marks*(self: ptr Scale00) {. + importc: "gtk_scale_clear_marks", libprag.} + +proc clearMarks*(self: Scale) = + gtk_scale_clear_marks(cast[ptr Scale00](self.impl)) + +proc gtk_scale_get_digits*(self: ptr Scale00): int32 {. + importc: "gtk_scale_get_digits", libprag.} + +proc getDigits*(self: Scale): int = + int(gtk_scale_get_digits(cast[ptr Scale00](self.impl))) + +proc digits*(self: Scale): int = + int(gtk_scale_get_digits(cast[ptr Scale00](self.impl))) + +proc gtk_scale_get_draw_value*(self: ptr Scale00): gboolean {. + importc: "gtk_scale_get_draw_value", libprag.} + +proc getDrawValue*(self: Scale): bool = + toBool(gtk_scale_get_draw_value(cast[ptr Scale00](self.impl))) + +proc drawValue*(self: Scale): bool = + toBool(gtk_scale_get_draw_value(cast[ptr Scale00](self.impl))) + +proc gtk_scale_get_has_origin*(self: ptr Scale00): gboolean {. + importc: "gtk_scale_get_has_origin", libprag.} + +proc getHasOrigin*(self: Scale): bool = + toBool(gtk_scale_get_has_origin(cast[ptr Scale00](self.impl))) + +proc hasOrigin*(self: Scale): bool = + toBool(gtk_scale_get_has_origin(cast[ptr Scale00](self.impl))) + +proc gtk_scale_get_layout*(self: ptr Scale00): ptr pango.Layout00 {. + importc: "gtk_scale_get_layout", libprag.} + +proc getLayout*(self: Scale): pango.Layout = + let gobj = gtk_scale_get_layout(cast[ptr Scale00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc layout*(self: Scale): pango.Layout = + let gobj = gtk_scale_get_layout(cast[ptr Scale00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scale_get_layout_offsets*(self: ptr Scale00; x: var int32; y: var int32) {. + importc: "gtk_scale_get_layout_offsets", libprag.} + +proc getLayoutOffsets*(self: Scale; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gtk_scale_get_layout_offsets(cast[ptr Scale00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc layoutOffsets*(self: Scale; x: var int; y: var int) = + var y_00 = int32(y) + var x_00 = int32(x) + gtk_scale_get_layout_offsets(cast[ptr Scale00](self.impl), x_00, y_00) + y = int(y_00) + x = int(x_00) + +proc gtk_scale_get_value_pos*(self: ptr Scale00): PositionType {. + importc: "gtk_scale_get_value_pos", libprag.} + +proc getValuePos*(self: Scale): PositionType = + gtk_scale_get_value_pos(cast[ptr Scale00](self.impl)) + +proc valuePos*(self: Scale): PositionType = + gtk_scale_get_value_pos(cast[ptr Scale00](self.impl)) + +proc gtk_scale_set_digits*(self: ptr Scale00; digits: int32) {. + importc: "gtk_scale_set_digits", libprag.} + +proc setDigits*(self: Scale; digits: int) = + gtk_scale_set_digits(cast[ptr Scale00](self.impl), int32(digits)) + +proc `digits=`*(self: Scale; digits: int) = + gtk_scale_set_digits(cast[ptr Scale00](self.impl), int32(digits)) + +proc gtk_scale_set_draw_value*(self: ptr Scale00; drawValue: gboolean) {. + importc: "gtk_scale_set_draw_value", libprag.} + +proc setDrawValue*(self: Scale; drawValue: bool) = + gtk_scale_set_draw_value(cast[ptr Scale00](self.impl), gboolean(drawValue)) + +proc `drawValue=`*(self: Scale; drawValue: bool) = + gtk_scale_set_draw_value(cast[ptr Scale00](self.impl), gboolean(drawValue)) + +proc gtk_scale_set_has_origin*(self: ptr Scale00; hasOrigin: gboolean) {. + importc: "gtk_scale_set_has_origin", libprag.} + +proc setHasOrigin*(self: Scale; hasOrigin: bool) = + gtk_scale_set_has_origin(cast[ptr Scale00](self.impl), gboolean(hasOrigin)) + +proc `hasOrigin=`*(self: Scale; hasOrigin: bool) = + gtk_scale_set_has_origin(cast[ptr Scale00](self.impl), gboolean(hasOrigin)) + +proc gtk_scale_set_value_pos*(self: ptr Scale00; pos: PositionType) {. + importc: "gtk_scale_set_value_pos", libprag.} + +proc setValuePos*(self: Scale; pos: PositionType) = + gtk_scale_set_value_pos(cast[ptr Scale00](self.impl), pos) + +proc `valuePos=`*(self: Scale; pos: PositionType) = + gtk_scale_set_value_pos(cast[ptr Scale00](self.impl), pos) + +type + HScale* = ref object of Scale + HScale00* = object of Scale00 + +proc gtk_hscale_new*(adjustment: ptr Adjustment00): ptr HScale00 {. + importc: "gtk_hscale_new", libprag.} + +proc newHScale*(adjustment: Adjustment): HScale = + new(result, finalizeGObject) + result.impl = gtk_hscale_new(cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHScale*[T](result: var T; adjustment: Adjustment) = + assert(result is HScale) + new(result, finalizeGObject) + result.impl = gtk_hscale_new(cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_hscale_new_with_range*(min: cdouble; max: cdouble; step: cdouble): ptr HScale00 {. + importc: "gtk_hscale_new_with_range", libprag.} + +proc newHScaleWithRange*(min: cdouble; max: cdouble; step: cdouble): HScale = + new(result, finalizeGObject) + result.impl = gtk_hscale_new_with_range(min, max, step) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHScaleWithRange*[T](result: var T; min: cdouble; max: cdouble; step: cdouble) = + assert(result is HScale) + new(result, finalizeGObject) + result.impl = gtk_hscale_new_with_range(min, max, step) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + RangeClass00* {.pure.} = object + parentClass*: WidgetClass00 + sliderDetail*: cstring + stepperDetail*: cstring + valueChanged*: proc(range: ptr Range00) {.cdecl.} + adjustBounds*: proc(range: ptr Range00; newValue: cdouble) {.cdecl.} + moveSlider*: proc(range: ptr Range00; scroll: ScrollType) {.cdecl.} + getRangeBorder*: proc(range: ptr Range00; border: ptr Border00) {.cdecl.} + changeValue*: proc(range: ptr Range00; scroll: ScrollType; newValue: cdouble): gboolean {.cdecl.} + getRangeSizeRequest*: proc(range: ptr Range00; orientation: Orientation; minimum: ptr int32; + natural: ptr int32) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + RangeClass* = ref object + impl*: ptr RangeClass00 + +type + ScaleClass00* {.pure.} = object + parentClass*: RangeClass00 + formatValue*: proc(scale: ptr Scale00; value: cdouble): cstring {.cdecl.} + drawValue*: proc(scale: ptr Scale00) {.cdecl.} + getLayoutOffsets*: proc(scale: ptr Scale00; x: var int32; y: var int32) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ScaleClass* = ref object + impl*: ptr ScaleClass00 + +type + HScaleClass00* {.pure.} = object + parentClass*: ScaleClass00 + HScaleClass* = ref object + impl*: ptr HScaleClass00 + +type + Scrollbar* = ref object of Range + Scrollbar00* = object of Range00 + +proc gtk_scrollbar_new*(orientation: Orientation; adjustment: ptr Adjustment00): ptr Scrollbar00 {. + importc: "gtk_scrollbar_new", libprag.} + +proc newScrollbar*(orientation: Orientation; adjustment: Adjustment): Scrollbar = + new(result, finalizeGObject) + result.impl = gtk_scrollbar_new(orientation, cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initScrollbar*[T](result: var T; orientation: Orientation; adjustment: Adjustment) = + assert(result is Scrollbar) + new(result, finalizeGObject) + result.impl = gtk_scrollbar_new(orientation, cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + HScrollbar* = ref object of Scrollbar + HScrollbar00* = object of Scrollbar00 + +proc gtk_hscrollbar_new*(adjustment: ptr Adjustment00): ptr HScrollbar00 {. + importc: "gtk_hscrollbar_new", libprag.} + +proc newHScrollbar*(adjustment: Adjustment): HScrollbar = + new(result, finalizeGObject) + result.impl = gtk_hscrollbar_new(cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHScrollbar*[T](result: var T; adjustment: Adjustment) = + assert(result is HScrollbar) + new(result, finalizeGObject) + result.impl = gtk_hscrollbar_new(cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ScrollbarClass00* {.pure.} = object + parentClass*: RangeClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ScrollbarClass* = ref object + impl*: ptr ScrollbarClass00 + +type + HScrollbarClass00* {.pure.} = object + parentClass*: ScrollbarClass00 + HScrollbarClass* = ref object + impl*: ptr HScrollbarClass00 + +type + SeparatorPrivate00* {.pure.} = object + SeparatorPrivate* = ref object + impl*: ptr SeparatorPrivate00 + +type + Separator* = ref object of Widget + Separator00* = object of Widget00 + priv2: ptr SeparatorPrivate00 + +proc gtk_separator_new*(orientation: Orientation): ptr Separator00 {. + importc: "gtk_separator_new", libprag.} + +proc newSeparator*(orientation: Orientation): Separator = + new(result, finalizeGObject) + result.impl = gtk_separator_new(orientation) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSeparator*[T](result: var T; orientation: Orientation) = + assert(result is Separator) + new(result, finalizeGObject) + result.impl = gtk_separator_new(orientation) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + HSeparator* = ref object of Separator + HSeparator00* = object of Separator00 + +proc gtk_hseparator_new*(): ptr HSeparator00 {. + importc: "gtk_hseparator_new", libprag.} + +proc newHSeparator*(): HSeparator = + new(result, finalizeGObject) + result.impl = gtk_hseparator_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHSeparator*[T](result: var T) = + assert(result is HSeparator) + new(result, finalizeGObject) + result.impl = gtk_hseparator_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SeparatorClass00* {.pure.} = object + parentClass*: WidgetClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + SeparatorClass* = ref object + impl*: ptr SeparatorClass00 + +type + HSeparatorClass00* {.pure.} = object + parentClass*: SeparatorClass00 + HSeparatorClass* = ref object + impl*: ptr HSeparatorClass00 + +type + HandleBoxPrivate00* {.pure.} = object + HandleBoxPrivate* = ref object + impl*: ptr HandleBoxPrivate00 + +type + HandleBox* = ref object of Bin + HandleBox00* = object of Bin00 + priv4: ptr HandleBoxPrivate00 + +proc scChildAttached*(self: HandleBox; p: proc (self: ptr gobject.Object00; widget: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "child-attached", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scChildDetached*(self: HandleBox; p: proc (self: ptr gobject.Object00; widget: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "child-detached", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_handle_box_new*(): ptr HandleBox00 {. + importc: "gtk_handle_box_new", libprag.} + +proc newHandleBox*(): HandleBox = + new(result, finalizeGObject) + result.impl = gtk_handle_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHandleBox*[T](result: var T) = + assert(result is HandleBox) + new(result, finalizeGObject) + result.impl = gtk_handle_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_handle_box_get_child_detached*(self: ptr HandleBox00): gboolean {. + importc: "gtk_handle_box_get_child_detached", libprag.} + +proc getChildDetached*(self: HandleBox): bool = + toBool(gtk_handle_box_get_child_detached(cast[ptr HandleBox00](self.impl))) + +proc childDetached*(self: HandleBox): bool = + toBool(gtk_handle_box_get_child_detached(cast[ptr HandleBox00](self.impl))) + +proc gtk_handle_box_get_handle_position*(self: ptr HandleBox00): PositionType {. + importc: "gtk_handle_box_get_handle_position", libprag.} + +proc getHandlePosition*(self: HandleBox): PositionType = + gtk_handle_box_get_handle_position(cast[ptr HandleBox00](self.impl)) + +proc handlePosition*(self: HandleBox): PositionType = + gtk_handle_box_get_handle_position(cast[ptr HandleBox00](self.impl)) + +proc gtk_handle_box_get_shadow_type*(self: ptr HandleBox00): ShadowType {. + importc: "gtk_handle_box_get_shadow_type", libprag.} + +proc getShadowType*(self: HandleBox): ShadowType = + gtk_handle_box_get_shadow_type(cast[ptr HandleBox00](self.impl)) + +proc shadowType*(self: HandleBox): ShadowType = + gtk_handle_box_get_shadow_type(cast[ptr HandleBox00](self.impl)) + +proc gtk_handle_box_get_snap_edge*(self: ptr HandleBox00): PositionType {. + importc: "gtk_handle_box_get_snap_edge", libprag.} + +proc getSnapEdge*(self: HandleBox): PositionType = + gtk_handle_box_get_snap_edge(cast[ptr HandleBox00](self.impl)) + +proc snapEdge*(self: HandleBox): PositionType = + gtk_handle_box_get_snap_edge(cast[ptr HandleBox00](self.impl)) + +proc gtk_handle_box_set_handle_position*(self: ptr HandleBox00; position: PositionType) {. + importc: "gtk_handle_box_set_handle_position", libprag.} + +proc setHandlePosition*(self: HandleBox; position: PositionType) = + gtk_handle_box_set_handle_position(cast[ptr HandleBox00](self.impl), position) + +proc `handlePosition=`*(self: HandleBox; position: PositionType) = + gtk_handle_box_set_handle_position(cast[ptr HandleBox00](self.impl), position) + +proc gtk_handle_box_set_shadow_type*(self: ptr HandleBox00; `type`: ShadowType) {. + importc: "gtk_handle_box_set_shadow_type", libprag.} + +proc setShadowType*(self: HandleBox; `type`: ShadowType) = + gtk_handle_box_set_shadow_type(cast[ptr HandleBox00](self.impl), `type`) + +proc `shadowType=`*(self: HandleBox; `type`: ShadowType) = + gtk_handle_box_set_shadow_type(cast[ptr HandleBox00](self.impl), `type`) + +proc gtk_handle_box_set_snap_edge*(self: ptr HandleBox00; edge: PositionType) {. + importc: "gtk_handle_box_set_snap_edge", libprag.} + +proc setSnapEdge*(self: HandleBox; edge: PositionType) = + gtk_handle_box_set_snap_edge(cast[ptr HandleBox00](self.impl), edge) + +proc `snapEdge=`*(self: HandleBox; edge: PositionType) = + gtk_handle_box_set_snap_edge(cast[ptr HandleBox00](self.impl), edge) + +type + HandleBoxClass00* {.pure.} = object + parentClass*: BinClass00 + childAttached*: proc(handleBox: ptr HandleBox00; child: ptr Widget00) {.cdecl.} + childDetached*: proc(handleBox: ptr HandleBox00; child: ptr Widget00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + HandleBoxClass* = ref object + impl*: ptr HandleBoxClass00 + +type + HeaderBar* = ref object of Container + HeaderBar00* = object of Container00 + +proc gtk_header_bar_new*(): ptr HeaderBar00 {. + importc: "gtk_header_bar_new", libprag.} + +proc newHeaderBar*(): HeaderBar = + new(result, finalizeGObject) + result.impl = gtk_header_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHeaderBar*[T](result: var T) = + assert(result is HeaderBar) + new(result, finalizeGObject) + result.impl = gtk_header_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_header_bar_get_custom_title*(self: ptr HeaderBar00): ptr Widget00 {. + importc: "gtk_header_bar_get_custom_title", libprag.} + +proc getCustomTitle*(self: HeaderBar): Widget = + let gobj = gtk_header_bar_get_custom_title(cast[ptr HeaderBar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc customTitle*(self: HeaderBar): Widget = + let gobj = gtk_header_bar_get_custom_title(cast[ptr HeaderBar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_header_bar_get_decoration_layout*(self: ptr HeaderBar00): cstring {. + importc: "gtk_header_bar_get_decoration_layout", libprag.} + +proc getDecorationLayout*(self: HeaderBar): string = + let resul0 = gtk_header_bar_get_decoration_layout(cast[ptr HeaderBar00](self.impl)) + result = $resul0 + +proc decorationLayout*(self: HeaderBar): string = + let resul0 = gtk_header_bar_get_decoration_layout(cast[ptr HeaderBar00](self.impl)) + result = $resul0 + +proc gtk_header_bar_get_has_subtitle*(self: ptr HeaderBar00): gboolean {. + importc: "gtk_header_bar_get_has_subtitle", libprag.} + +proc getHasSubtitle*(self: HeaderBar): bool = + toBool(gtk_header_bar_get_has_subtitle(cast[ptr HeaderBar00](self.impl))) + +proc hasSubtitle*(self: HeaderBar): bool = + toBool(gtk_header_bar_get_has_subtitle(cast[ptr HeaderBar00](self.impl))) + +proc gtk_header_bar_get_show_close_button*(self: ptr HeaderBar00): gboolean {. + importc: "gtk_header_bar_get_show_close_button", libprag.} + +proc getShowCloseButton*(self: HeaderBar): bool = + toBool(gtk_header_bar_get_show_close_button(cast[ptr HeaderBar00](self.impl))) + +proc showCloseButton*(self: HeaderBar): bool = + toBool(gtk_header_bar_get_show_close_button(cast[ptr HeaderBar00](self.impl))) + +proc gtk_header_bar_get_subtitle*(self: ptr HeaderBar00): cstring {. + importc: "gtk_header_bar_get_subtitle", libprag.} + +proc getSubtitle*(self: HeaderBar): string = + let resul0 = gtk_header_bar_get_subtitle(cast[ptr HeaderBar00](self.impl)) + result = $resul0 + +proc subtitle*(self: HeaderBar): string = + let resul0 = gtk_header_bar_get_subtitle(cast[ptr HeaderBar00](self.impl)) + result = $resul0 + +proc gtk_header_bar_get_title*(self: ptr HeaderBar00): cstring {. + importc: "gtk_header_bar_get_title", libprag.} + +proc getTitle*(self: HeaderBar): string = + let resul0 = gtk_header_bar_get_title(cast[ptr HeaderBar00](self.impl)) + result = $resul0 + +proc title*(self: HeaderBar): string = + let resul0 = gtk_header_bar_get_title(cast[ptr HeaderBar00](self.impl)) + result = $resul0 + +proc gtk_header_bar_pack_end*(self: ptr HeaderBar00; child: ptr Widget00) {. + importc: "gtk_header_bar_pack_end", libprag.} + +proc packEnd*(self: HeaderBar; child: Widget) = + gtk_header_bar_pack_end(cast[ptr HeaderBar00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_header_bar_pack_start*(self: ptr HeaderBar00; child: ptr Widget00) {. + importc: "gtk_header_bar_pack_start", libprag.} + +proc packStart*(self: HeaderBar; child: Widget) = + gtk_header_bar_pack_start(cast[ptr HeaderBar00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_header_bar_set_custom_title*(self: ptr HeaderBar00; titleWidget: ptr Widget00) {. + importc: "gtk_header_bar_set_custom_title", libprag.} + +proc setCustomTitle*(self: HeaderBar; titleWidget: Widget) = + gtk_header_bar_set_custom_title(cast[ptr HeaderBar00](self.impl), cast[ptr Widget00](titleWidget.impl)) + +proc `customTitle=`*(self: HeaderBar; titleWidget: Widget) = + gtk_header_bar_set_custom_title(cast[ptr HeaderBar00](self.impl), cast[ptr Widget00](titleWidget.impl)) + +proc gtk_header_bar_set_decoration_layout*(self: ptr HeaderBar00; layout: cstring) {. + importc: "gtk_header_bar_set_decoration_layout", libprag.} + +proc setDecorationLayout*(self: HeaderBar; layout: string) = + gtk_header_bar_set_decoration_layout(cast[ptr HeaderBar00](self.impl), cstring(layout)) + +proc `decorationLayout=`*(self: HeaderBar; layout: string) = + gtk_header_bar_set_decoration_layout(cast[ptr HeaderBar00](self.impl), cstring(layout)) + +proc gtk_header_bar_set_has_subtitle*(self: ptr HeaderBar00; setting: gboolean) {. + importc: "gtk_header_bar_set_has_subtitle", libprag.} + +proc setHasSubtitle*(self: HeaderBar; setting: bool) = + gtk_header_bar_set_has_subtitle(cast[ptr HeaderBar00](self.impl), gboolean(setting)) + +proc `hasSubtitle=`*(self: HeaderBar; setting: bool) = + gtk_header_bar_set_has_subtitle(cast[ptr HeaderBar00](self.impl), gboolean(setting)) + +proc gtk_header_bar_set_show_close_button*(self: ptr HeaderBar00; setting: gboolean) {. + importc: "gtk_header_bar_set_show_close_button", libprag.} + +proc setShowCloseButton*(self: HeaderBar; setting: bool) = + gtk_header_bar_set_show_close_button(cast[ptr HeaderBar00](self.impl), gboolean(setting)) + +proc `showCloseButton=`*(self: HeaderBar; setting: bool) = + gtk_header_bar_set_show_close_button(cast[ptr HeaderBar00](self.impl), gboolean(setting)) + +proc gtk_header_bar_set_subtitle*(self: ptr HeaderBar00; subtitle: cstring) {. + importc: "gtk_header_bar_set_subtitle", libprag.} + +proc setSubtitle*(self: HeaderBar; subtitle: string) = + gtk_header_bar_set_subtitle(cast[ptr HeaderBar00](self.impl), cstring(subtitle)) + +proc `subtitle=`*(self: HeaderBar; subtitle: string) = + gtk_header_bar_set_subtitle(cast[ptr HeaderBar00](self.impl), cstring(subtitle)) + +proc gtk_header_bar_set_title*(self: ptr HeaderBar00; title: cstring) {. + importc: "gtk_header_bar_set_title", libprag.} + +proc setTitle*(self: HeaderBar; title: string) = + gtk_header_bar_set_title(cast[ptr HeaderBar00](self.impl), cstring(title)) + +proc `title=`*(self: HeaderBar; title: string) = + gtk_header_bar_set_title(cast[ptr HeaderBar00](self.impl), cstring(title)) + +type + HeaderBarClass00* {.pure.} = object + parentClass*: ContainerClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + HeaderBarClass* = ref object + impl*: ptr HeaderBarClass00 + +type + HeaderBarPrivate00* {.pure.} = object + HeaderBarPrivate* = ref object + impl*: ptr HeaderBarPrivate00 + +type + IMContext* = ref object of gobject.Object + IMContext00* = object of gobject.Object00 + +proc scCommit*(self: IMContext; p: proc (self: ptr gobject.Object00; str: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "commit", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeleteSurrounding*(self: IMContext; p: proc (self: ptr gobject.Object00; offset: int32; nChars: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "delete-surrounding", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPreeditChanged*(self: IMContext; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "preedit-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPreeditEnd*(self: IMContext; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "preedit-end", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPreeditStart*(self: IMContext; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "preedit-start", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRetrieveSurrounding*(self: IMContext; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "retrieve-surrounding", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_im_context_delete_surrounding*(self: ptr IMContext00; offset: int32; nChars: int32): gboolean {. + importc: "gtk_im_context_delete_surrounding", libprag.} + +proc deleteSurrounding*(self: IMContext; offset: int; nChars: int): bool = + toBool(gtk_im_context_delete_surrounding(cast[ptr IMContext00](self.impl), int32(offset), int32(nChars))) + +proc gtk_im_context_filter_keypress*(self: ptr IMContext00; event: ptr gdk.EventKey00): gboolean {. + importc: "gtk_im_context_filter_keypress", libprag.} + +proc filterKeypress*(self: IMContext; event: gdk.EventKey): bool = + toBool(gtk_im_context_filter_keypress(cast[ptr IMContext00](self.impl), cast[ptr gdk.EventKey00](event.impl))) + +proc gtk_im_context_focus_in*(self: ptr IMContext00) {. + importc: "gtk_im_context_focus_in", libprag.} + +proc focusIn*(self: IMContext) = + gtk_im_context_focus_in(cast[ptr IMContext00](self.impl)) + +proc gtk_im_context_focus_out*(self: ptr IMContext00) {. + importc: "gtk_im_context_focus_out", libprag.} + +proc focusOut*(self: IMContext) = + gtk_im_context_focus_out(cast[ptr IMContext00](self.impl)) + +proc gtk_im_context_get_preedit_string*(self: ptr IMContext00; str: var cstring; attrs: var ptr pango.AttrList00; + cursorPos: var int32) {. + importc: "gtk_im_context_get_preedit_string", libprag.} + +proc getPreeditString*(self: ptr IMContext00; str: var cstring; attrs: var ptr pango.AttrList00; + cursorPos: var int32) {. + importc: "gtk_im_context_get_preedit_string", libprag.} + +proc preeditString*(self: ptr IMContext00; str: var cstring; attrs: var ptr pango.AttrList00; + cursorPos: var int32) {. + importc: "gtk_im_context_get_preedit_string", libprag.} + +proc gtk_im_context_get_surrounding*(self: ptr IMContext00; text: var cstring; cursorIndex: var int32): gboolean {. + importc: "gtk_im_context_get_surrounding", libprag.} + +proc getSurrounding*(self: IMContext; text: var string; cursorIndex: var int): bool = + var cursorIndex_00 = int32(cursorIndex) + var text_00 = cstring(text) + result = toBool(gtk_im_context_get_surrounding(cast[ptr IMContext00](self.impl), text_00, cursorIndex_00)) + cursorIndex = int(cursorIndex_00) + text = $(text_00) + +proc surrounding*(self: IMContext; text: var string; cursorIndex: var int): bool = + var cursorIndex_00 = int32(cursorIndex) + var text_00 = cstring(text) + result = toBool(gtk_im_context_get_surrounding(cast[ptr IMContext00](self.impl), text_00, cursorIndex_00)) + cursorIndex = int(cursorIndex_00) + text = $(text_00) + +proc gtk_im_context_reset*(self: ptr IMContext00) {. + importc: "gtk_im_context_reset", libprag.} + +proc reset*(self: IMContext) = + gtk_im_context_reset(cast[ptr IMContext00](self.impl)) + +proc gtk_im_context_set_client_window*(self: ptr IMContext00; window: ptr gdk.Window00) {. + importc: "gtk_im_context_set_client_window", libprag.} + +proc setClientWindow*(self: IMContext; window: gdk.Window) = + gtk_im_context_set_client_window(cast[ptr IMContext00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc `clientWindow=`*(self: IMContext; window: gdk.Window) = + gtk_im_context_set_client_window(cast[ptr IMContext00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc gtk_im_context_set_cursor_location*(self: ptr IMContext00; area: ptr gdk.Rectangle00) {. + importc: "gtk_im_context_set_cursor_location", libprag.} + +proc setCursorLocation*(self: IMContext; area: gdk.Rectangle) = + gtk_im_context_set_cursor_location(cast[ptr IMContext00](self.impl), cast[ptr gdk.Rectangle00](area.impl)) + +proc `cursorLocation=`*(self: IMContext; area: gdk.Rectangle) = + gtk_im_context_set_cursor_location(cast[ptr IMContext00](self.impl), cast[ptr gdk.Rectangle00](area.impl)) + +proc gtk_im_context_set_surrounding*(self: ptr IMContext00; text: cstring; len: int32; + cursorIndex: int32) {. + importc: "gtk_im_context_set_surrounding", libprag.} + +proc setSurrounding*(self: IMContext; text: string; len: int; cursorIndex: int) = + gtk_im_context_set_surrounding(cast[ptr IMContext00](self.impl), cstring(text), int32(len), int32(cursorIndex)) + +proc gtk_im_context_set_use_preedit*(self: ptr IMContext00; usePreedit: gboolean) {. + importc: "gtk_im_context_set_use_preedit", libprag.} + +proc setUsePreedit*(self: IMContext; usePreedit: bool) = + gtk_im_context_set_use_preedit(cast[ptr IMContext00](self.impl), gboolean(usePreedit)) + +proc `usePreedit=`*(self: IMContext; usePreedit: bool) = + gtk_im_context_set_use_preedit(cast[ptr IMContext00](self.impl), gboolean(usePreedit)) + +type + IMContextClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + preeditStart*: proc(context: ptr IMContext00) {.cdecl.} + preeditEnd*: proc(context: ptr IMContext00) {.cdecl.} + preeditChanged*: proc(context: ptr IMContext00) {.cdecl.} + commit*: proc(context: ptr IMContext00; str: cstring) {.cdecl.} + retrieveSurrounding*: proc(context: ptr IMContext00): gboolean {.cdecl.} + deleteSurrounding*: proc(context: ptr IMContext00; offset: int32; nChars: int32): gboolean {.cdecl.} + setClientWindow*: proc(context: ptr IMContext00; window: ptr gdk.Window00) {.cdecl.} + getPreeditString*: proc(context: ptr IMContext00; str: var cstring; attrs: var ptr pango.AttrList00; + cursorPos: var int32) {.cdecl.} + filterKeypress*: proc(context: ptr IMContext00; event: ptr gdk.EventKey00): gboolean {.cdecl.} + focusIn*: proc(context: ptr IMContext00) {.cdecl.} + focusOut*: proc(context: ptr IMContext00) {.cdecl.} + reset*: proc(context: ptr IMContext00) {.cdecl.} + setCursorLocation*: proc(context: ptr IMContext00; area: ptr gdk.Rectangle00) {.cdecl.} + setUsePreedit*: proc(context: ptr IMContext00; usePreedit: gboolean) {.cdecl.} + setSurrounding*: proc(context: ptr IMContext00; text: cstring; len: int32; + cursorIndex: int32) {.cdecl.} + getSurrounding*: proc(context: ptr IMContext00; text: var cstring; cursorIndex: var int32): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + IMContextClass* = ref object + impl*: ptr IMContextClass00 + +type + IMContextInfo00* {.pure.} = object + contextId*: cstring + contextName*: cstring + domain*: cstring + domainDirname*: cstring + defaultLocales*: cstring + IMContextInfo* = ref object + impl*: ptr IMContextInfo00 + +type + IMContextSimplePrivate00* {.pure.} = object + IMContextSimplePrivate* = ref object + impl*: ptr IMContextSimplePrivate00 + +type + IMContextSimple* = ref object of IMContext + IMContextSimple00* = object of IMContext00 + priv2: ptr IMContextSimplePrivate00 + +proc gtk_im_context_simple_new*(): ptr IMContextSimple00 {. + importc: "gtk_im_context_simple_new", libprag.} + +proc newIMContextSimple*(): IMContextSimple = + new(result, finalizeGObject) + result.impl = gtk_im_context_simple_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initIMContextSimple*[T](result: var T) = + assert(result is IMContextSimple) + new(result, finalizeGObject) + result.impl = gtk_im_context_simple_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_im_context_simple_add_compose_file*(self: ptr IMContextSimple00; composeFile: cstring) {. + importc: "gtk_im_context_simple_add_compose_file", libprag.} + +proc addComposeFile*(self: IMContextSimple; composeFile: string) = + gtk_im_context_simple_add_compose_file(cast[ptr IMContextSimple00](self.impl), cstring(composeFile)) + +type + IMContextSimpleClass00* {.pure.} = object + parentClass*: IMContextClass00 + IMContextSimpleClass* = ref object + impl*: ptr IMContextSimpleClass00 + +type + IMMulticontextPrivate00* {.pure.} = object + IMMulticontextPrivate* = ref object + impl*: ptr IMMulticontextPrivate00 + +type + IMMulticontext* = ref object of IMContext + IMMulticontext00* = object of IMContext00 + priv2: ptr IMMulticontextPrivate00 + +proc gtk_im_multicontext_new*(): ptr IMMulticontext00 {. + importc: "gtk_im_multicontext_new", libprag.} + +proc newIMMulticontext*(): IMMulticontext = + new(result, finalizeGObject) + result.impl = gtk_im_multicontext_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initIMMulticontext*[T](result: var T) = + assert(result is IMMulticontext) + new(result, finalizeGObject) + result.impl = gtk_im_multicontext_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_im_multicontext_append_menuitems*(self: ptr IMMulticontext00; menushell: ptr MenuShell00) {. + importc: "gtk_im_multicontext_append_menuitems", libprag.} + +proc appendMenuitems*(self: IMMulticontext; menushell: MenuShell) = + gtk_im_multicontext_append_menuitems(cast[ptr IMMulticontext00](self.impl), cast[ptr MenuShell00](menushell.impl)) + +proc gtk_im_multicontext_get_context_id*(self: ptr IMMulticontext00): cstring {. + importc: "gtk_im_multicontext_get_context_id", libprag.} + +proc getContextId*(self: IMMulticontext): string = + let resul0 = gtk_im_multicontext_get_context_id(cast[ptr IMMulticontext00](self.impl)) + result = $resul0 + +proc contextId*(self: IMMulticontext): string = + let resul0 = gtk_im_multicontext_get_context_id(cast[ptr IMMulticontext00](self.impl)) + result = $resul0 + +proc gtk_im_multicontext_set_context_id*(self: ptr IMMulticontext00; contextId: cstring) {. + importc: "gtk_im_multicontext_set_context_id", libprag.} + +proc setContextId*(self: IMMulticontext; contextId: string) = + gtk_im_multicontext_set_context_id(cast[ptr IMMulticontext00](self.impl), cstring(contextId)) + +proc `contextId=`*(self: IMMulticontext; contextId: string) = + gtk_im_multicontext_set_context_id(cast[ptr IMMulticontext00](self.impl), cstring(contextId)) + +type + IMMulticontextClass00* {.pure.} = object + parentClass*: IMContextClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + IMMulticontextClass* = ref object + impl*: ptr IMMulticontextClass00 + +type + IMPreeditStyle* {.size: sizeof(cint), pure.} = enum + nothing = 0 + callback = 1 + none = 2 + +type + IMStatusStyle* {.size: sizeof(cint), pure.} = enum + nothing = 0 + callback = 1 + none = 2 + +const INPUT_ERROR* = -1'i32 + +const INTERFACE_AGE* = 15'i32 + +type + IconFactoryClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + IconFactoryClass* = ref object + impl*: ptr IconFactoryClass00 + +type + IconInfo* = ref object of gobject.Object + IconInfo00* = object of gobject.Object00 + +proc gtk_icon_info_get_attach_points*(self: ptr IconInfo00; points: var gdk.Point00Array; + nPoints: var int32): gboolean {. + importc: "gtk_icon_info_get_attach_points", libprag.} + +proc getAttachPoints*(self: IconInfo; points: var gdk.Point00Array; nPoints: var int): bool = + var nPoints_00 = int32(nPoints) + result = toBool(gtk_icon_info_get_attach_points(cast[ptr IconInfo00](self.impl), points, nPoints_00)) + nPoints = int(nPoints_00) + +proc attachPoints*(self: IconInfo; points: var gdk.Point00Array; nPoints: var int): bool = + var nPoints_00 = int32(nPoints) + result = toBool(gtk_icon_info_get_attach_points(cast[ptr IconInfo00](self.impl), points, nPoints_00)) + nPoints = int(nPoints_00) + +proc gtk_icon_info_get_base_scale*(self: ptr IconInfo00): int32 {. + importc: "gtk_icon_info_get_base_scale", libprag.} + +proc getBaseScale*(self: IconInfo): int = + int(gtk_icon_info_get_base_scale(cast[ptr IconInfo00](self.impl))) + +proc baseScale*(self: IconInfo): int = + int(gtk_icon_info_get_base_scale(cast[ptr IconInfo00](self.impl))) + +proc gtk_icon_info_get_base_size*(self: ptr IconInfo00): int32 {. + importc: "gtk_icon_info_get_base_size", libprag.} + +proc getBaseSize*(self: IconInfo): int = + int(gtk_icon_info_get_base_size(cast[ptr IconInfo00](self.impl))) + +proc baseSize*(self: IconInfo): int = + int(gtk_icon_info_get_base_size(cast[ptr IconInfo00](self.impl))) + +proc gtk_icon_info_get_builtin_pixbuf*(self: ptr IconInfo00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_info_get_builtin_pixbuf", libprag.} + +proc getBuiltinPixbuf*(self: IconInfo): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_info_get_builtin_pixbuf(cast[ptr IconInfo00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc builtinPixbuf*(self: IconInfo): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_info_get_builtin_pixbuf(cast[ptr IconInfo00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_info_get_display_name*(self: ptr IconInfo00): cstring {. + importc: "gtk_icon_info_get_display_name", libprag.} + +proc getDisplayName*(self: IconInfo): string = + let resul0 = gtk_icon_info_get_display_name(cast[ptr IconInfo00](self.impl)) + result = $resul0 + +proc displayName*(self: IconInfo): string = + let resul0 = gtk_icon_info_get_display_name(cast[ptr IconInfo00](self.impl)) + result = $resul0 + +proc gtk_icon_info_get_embedded_rect*(self: ptr IconInfo00; rectangle: var gdk.Rectangle00): gboolean {. + importc: "gtk_icon_info_get_embedded_rect", libprag.} + +proc getEmbeddedRect*(self: ptr IconInfo00; rectangle: var gdk.Rectangle00): gboolean {. + importc: "gtk_icon_info_get_embedded_rect", libprag.} + +proc embeddedRect*(self: ptr IconInfo00; rectangle: var gdk.Rectangle00): gboolean {. + importc: "gtk_icon_info_get_embedded_rect", libprag.} + +proc gtk_icon_info_get_filename*(self: ptr IconInfo00): ucstring {. + importc: "gtk_icon_info_get_filename", libprag.} + +proc getFilename*(self: IconInfo): ucstring = + gtk_icon_info_get_filename(cast[ptr IconInfo00](self.impl)) + +proc filename*(self: IconInfo): ucstring = + gtk_icon_info_get_filename(cast[ptr IconInfo00](self.impl)) + +proc gtk_icon_info_is_symbolic*(self: ptr IconInfo00): gboolean {. + importc: "gtk_icon_info_is_symbolic", libprag.} + +proc isSymbolic*(self: IconInfo): bool = + toBool(gtk_icon_info_is_symbolic(cast[ptr IconInfo00](self.impl))) + +proc gtk_icon_info_load_icon*(self: ptr IconInfo00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_info_load_icon", libprag.} + +proc loadIcon*(self: IconInfo): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_info_load_icon(cast[ptr IconInfo00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_info_load_icon_async*(self: ptr IconInfo00; cancellable: ptr gio.Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "gtk_icon_info_load_icon_async", libprag.} + +proc loadIconAsync*(self: IconInfo; cancellable: gio.Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + gtk_icon_info_load_icon_async(cast[ptr IconInfo00](self.impl), cast[ptr gio.Cancellable00](cancellable.impl), callback, userData) + +proc gtk_icon_info_load_icon_finish*(self: ptr IconInfo00; res: ptr gio.AsyncResult00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_info_load_icon_finish", libprag.} + +proc loadIconFinish*(self: IconInfo; res: gio.AsyncResult): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_info_load_icon_finish(cast[ptr IconInfo00](self.impl), cast[ptr gio.AsyncResult00](res.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_info_load_surface*(self: ptr IconInfo00; forWindow: ptr gdk.Window00): ptr cairo.Surface00 {. + importc: "gtk_icon_info_load_surface", libprag.} + +proc loadSurface*(self: IconInfo; forWindow: gdk.Window): cairo.Surface = + new(result) + result.impl = gtk_icon_info_load_surface(cast[ptr IconInfo00](self.impl), cast[ptr gdk.Window00](forWindow.impl)) + +proc gtk_icon_info_load_symbolic*(self: ptr IconInfo00; fg: ptr gdk.RGBA00; successColor: ptr gdk.RGBA00; + warningColor: ptr gdk.RGBA00; errorColor: ptr gdk.RGBA00; wasSymbolic: var gboolean): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_info_load_symbolic", libprag.} + +proc loadSymbolic*(self: IconInfo; fg: gdk.RGBA; successColor: gdk.RGBA; + warningColor: gdk.RGBA; errorColor: gdk.RGBA; wasSymbolic: var bool): gdkpixbuf.Pixbuf = + var wasSymbolic_00 = gboolean(wasSymbolic) + let gobj = gtk_icon_info_load_symbolic(cast[ptr IconInfo00](self.impl), cast[ptr gdk.RGBA00](fg.impl), cast[ptr gdk.RGBA00](successColor.impl), cast[ptr gdk.RGBA00](warningColor.impl), cast[ptr gdk.RGBA00](errorColor.impl), wasSymbolic_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + wasSymbolic = toBool(wasSymbolic_00) + +proc gtk_icon_info_load_symbolic_async*(self: ptr IconInfo00; fg: ptr gdk.RGBA00; successColor: ptr gdk.RGBA00; + warningColor: ptr gdk.RGBA00; errorColor: ptr gdk.RGBA00; cancellable: ptr gio.Cancellable00; + callback: AsyncReadyCallback; userData: pointer) {. + importc: "gtk_icon_info_load_symbolic_async", libprag.} + +proc loadSymbolicAsync*(self: IconInfo; fg: gdk.RGBA; successColor: gdk.RGBA; + warningColor: gdk.RGBA; errorColor: gdk.RGBA; cancellable: gio.Cancellable; callback: AsyncReadyCallback; + userData: pointer) = + gtk_icon_info_load_symbolic_async(cast[ptr IconInfo00](self.impl), cast[ptr gdk.RGBA00](fg.impl), cast[ptr gdk.RGBA00](successColor.impl), cast[ptr gdk.RGBA00](warningColor.impl), cast[ptr gdk.RGBA00](errorColor.impl), cast[ptr gio.Cancellable00](cancellable.impl), callback, userData) + +proc gtk_icon_info_load_symbolic_finish*(self: ptr IconInfo00; res: ptr gio.AsyncResult00; + wasSymbolic: var gboolean): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_info_load_symbolic_finish", libprag.} + +proc loadSymbolicFinish*(self: IconInfo; res: gio.AsyncResult; wasSymbolic: var bool): gdkpixbuf.Pixbuf = + var wasSymbolic_00 = gboolean(wasSymbolic) + let gobj = gtk_icon_info_load_symbolic_finish(cast[ptr IconInfo00](self.impl), cast[ptr gio.AsyncResult00](res.impl), wasSymbolic_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + wasSymbolic = toBool(wasSymbolic_00) + +proc gtk_icon_info_load_symbolic_for_context*(self: ptr IconInfo00; context: ptr StyleContext00; + wasSymbolic: var gboolean): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_info_load_symbolic_for_context", libprag.} + +proc loadSymbolicForContext*(self: IconInfo; context: StyleContext; wasSymbolic: var bool): gdkpixbuf.Pixbuf = + var wasSymbolic_00 = gboolean(wasSymbolic) + let gobj = gtk_icon_info_load_symbolic_for_context(cast[ptr IconInfo00](self.impl), cast[ptr StyleContext00](context.impl), wasSymbolic_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + wasSymbolic = toBool(wasSymbolic_00) + +proc gtk_icon_info_load_symbolic_for_context_async*(self: ptr IconInfo00; context: ptr StyleContext00; + cancellable: ptr gio.Cancellable00; callback: AsyncReadyCallback; userData: pointer) {. + importc: "gtk_icon_info_load_symbolic_for_context_async", libprag.} + +proc loadSymbolicForContextAsync*(self: IconInfo; context: StyleContext; cancellable: gio.Cancellable; + callback: AsyncReadyCallback; userData: pointer) = + gtk_icon_info_load_symbolic_for_context_async(cast[ptr IconInfo00](self.impl), cast[ptr StyleContext00](context.impl), cast[ptr gio.Cancellable00](cancellable.impl), callback, userData) + +proc gtk_icon_info_load_symbolic_for_context_finish*(self: ptr IconInfo00; res: ptr gio.AsyncResult00; + wasSymbolic: var gboolean): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_info_load_symbolic_for_context_finish", libprag.} + +proc loadSymbolicForContextFinish*(self: IconInfo; res: gio.AsyncResult; wasSymbolic: var bool): gdkpixbuf.Pixbuf = + var wasSymbolic_00 = gboolean(wasSymbolic) + let gobj = gtk_icon_info_load_symbolic_for_context_finish(cast[ptr IconInfo00](self.impl), cast[ptr gio.AsyncResult00](res.impl), wasSymbolic_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + wasSymbolic = toBool(wasSymbolic_00) + +proc gtk_icon_info_load_symbolic_for_style*(self: ptr IconInfo00; style: ptr Style00; state: StateType; + wasSymbolic: var gboolean): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_info_load_symbolic_for_style", libprag.} + +proc loadSymbolicForStyle*(self: IconInfo; style: Style; state: StateType; wasSymbolic: var bool): gdkpixbuf.Pixbuf = + var wasSymbolic_00 = gboolean(wasSymbolic) + let gobj = gtk_icon_info_load_symbolic_for_style(cast[ptr IconInfo00](self.impl), cast[ptr Style00](style.impl), state, wasSymbolic_00) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + wasSymbolic = toBool(wasSymbolic_00) + +proc gtk_icon_info_set_raw_coordinates*(self: ptr IconInfo00; rawCoordinates: gboolean) {. + importc: "gtk_icon_info_set_raw_coordinates", libprag.} + +proc setRawCoordinates*(self: IconInfo; rawCoordinates: bool) = + gtk_icon_info_set_raw_coordinates(cast[ptr IconInfo00](self.impl), gboolean(rawCoordinates)) + +proc `rawCoordinates=`*(self: IconInfo; rawCoordinates: bool) = + gtk_icon_info_set_raw_coordinates(cast[ptr IconInfo00](self.impl), gboolean(rawCoordinates)) + +type + IconThemePrivate00* {.pure.} = object + IconThemePrivate* = ref object + impl*: ptr IconThemePrivate00 + +type + IconTheme* = ref object of gobject.Object + IconTheme00* = object of gobject.Object00 + priv1: ptr IconThemePrivate00 + +proc scChanged*(self: IconTheme; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_icon_theme_new*(): ptr IconTheme00 {. + importc: "gtk_icon_theme_new", libprag.} + +proc newIconTheme*(): IconTheme = + new(result, finalizeGObject) + result.impl = gtk_icon_theme_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initIconTheme*[T](result: var T) = + assert(result is IconTheme) + new(result, finalizeGObject) + result.impl = gtk_icon_theme_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_add_builtin_icon*(iconName: cstring; size: int32; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_icon_theme_add_builtin_icon", libprag.} + +proc addBuiltinIcon*(iconName: string; size: int; pixbuf: gdkpixbuf.Pixbuf) = + gtk_icon_theme_add_builtin_icon(cstring(iconName), int32(size), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_icon_theme_get_default*(): ptr IconTheme00 {. + importc: "gtk_icon_theme_get_default", libprag.} + +proc getDefault*(): IconTheme = + let gobj = gtk_icon_theme_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconTheme](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): IconTheme = + let gobj = gtk_icon_theme_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconTheme](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_get_for_screen*(screen: ptr gdk.Screen00): ptr IconTheme00 {. + importc: "gtk_icon_theme_get_for_screen", libprag.} + +proc getForScreen*(screen: gdk.Screen): IconTheme = + let gobj = gtk_icon_theme_get_for_screen(cast[ptr gdk.Screen00](screen.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconTheme](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc forScreen*(screen: gdk.Screen): IconTheme = + let gobj = gtk_icon_theme_get_for_screen(cast[ptr gdk.Screen00](screen.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconTheme](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_add_resource_path*(self: ptr IconTheme00; path: cstring) {. + importc: "gtk_icon_theme_add_resource_path", libprag.} + +proc addResourcePath*(self: IconTheme; path: string) = + gtk_icon_theme_add_resource_path(cast[ptr IconTheme00](self.impl), cstring(path)) + +proc gtk_icon_theme_append_search_path*(self: ptr IconTheme00; path: ucstring) {. + importc: "gtk_icon_theme_append_search_path", libprag.} + +proc appendSearchPath*(self: IconTheme; path: ucstring) = + gtk_icon_theme_append_search_path(cast[ptr IconTheme00](self.impl), path) + +proc gtk_icon_theme_get_example_icon_name*(self: ptr IconTheme00): cstring {. + importc: "gtk_icon_theme_get_example_icon_name", libprag.} + +proc getExampleIconName*(self: IconTheme): string = + let resul0 = gtk_icon_theme_get_example_icon_name(cast[ptr IconTheme00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc exampleIconName*(self: IconTheme): string = + let resul0 = gtk_icon_theme_get_example_icon_name(cast[ptr IconTheme00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_icon_theme_get_icon_sizes*(self: ptr IconTheme00; iconName: cstring): int32Array {. + importc: "gtk_icon_theme_get_icon_sizes", libprag.} + +proc getIconSizes*(self: IconTheme; iconName: string): int32Array = + gtk_icon_theme_get_icon_sizes(cast[ptr IconTheme00](self.impl), cstring(iconName)) + +proc iconSizes*(self: IconTheme; iconName: string): int32Array = + gtk_icon_theme_get_icon_sizes(cast[ptr IconTheme00](self.impl), cstring(iconName)) + +proc gtk_icon_theme_get_search_path*(self: ptr IconTheme00; path: var ucstringArray; nElements: var int32) {. + importc: "gtk_icon_theme_get_search_path", libprag.} + +proc getSearchPath*(self: IconTheme; path: var ucstringArray; nElements: var int) = + var nElements_00 = int32(nElements) + gtk_icon_theme_get_search_path(cast[ptr IconTheme00](self.impl), path, nElements_00) + nElements = int(nElements_00) + +proc searchPath*(self: IconTheme; path: var ucstringArray; nElements: var int) = + var nElements_00 = int32(nElements) + gtk_icon_theme_get_search_path(cast[ptr IconTheme00](self.impl), path, nElements_00) + nElements = int(nElements_00) + +proc gtk_icon_theme_has_icon*(self: ptr IconTheme00; iconName: cstring): gboolean {. + importc: "gtk_icon_theme_has_icon", libprag.} + +proc hasIcon*(self: IconTheme; iconName: string): bool = + toBool(gtk_icon_theme_has_icon(cast[ptr IconTheme00](self.impl), cstring(iconName))) + +proc gtk_icon_theme_list_contexts*(self: ptr IconTheme00): ptr pointer {. + importc: "gtk_icon_theme_list_contexts", libprag.} + +proc listContexts*(self: IconTheme): ptr pointer = + gtk_icon_theme_list_contexts(cast[ptr IconTheme00](self.impl)) + +proc gtk_icon_theme_list_icons*(self: ptr IconTheme00; context: cstring): ptr pointer {. + importc: "gtk_icon_theme_list_icons", libprag.} + +proc listIcons*(self: IconTheme; context: string): ptr pointer = + gtk_icon_theme_list_icons(cast[ptr IconTheme00](self.impl), cstring(context)) + +proc gtk_icon_theme_prepend_search_path*(self: ptr IconTheme00; path: ucstring) {. + importc: "gtk_icon_theme_prepend_search_path", libprag.} + +proc prependSearchPath*(self: IconTheme; path: ucstring) = + gtk_icon_theme_prepend_search_path(cast[ptr IconTheme00](self.impl), path) + +proc gtk_icon_theme_rescan_if_needed*(self: ptr IconTheme00): gboolean {. + importc: "gtk_icon_theme_rescan_if_needed", libprag.} + +proc rescanIfNeeded*(self: IconTheme): bool = + toBool(gtk_icon_theme_rescan_if_needed(cast[ptr IconTheme00](self.impl))) + +proc gtk_icon_theme_set_custom_theme*(self: ptr IconTheme00; themeName: cstring) {. + importc: "gtk_icon_theme_set_custom_theme", libprag.} + +proc setCustomTheme*(self: IconTheme; themeName: string) = + gtk_icon_theme_set_custom_theme(cast[ptr IconTheme00](self.impl), cstring(themeName)) + +proc `customTheme=`*(self: IconTheme; themeName: string) = + gtk_icon_theme_set_custom_theme(cast[ptr IconTheme00](self.impl), cstring(themeName)) + +proc gtk_icon_theme_set_screen*(self: ptr IconTheme00; screen: ptr gdk.Screen00) {. + importc: "gtk_icon_theme_set_screen", libprag.} + +proc setScreen*(self: IconTheme; screen: gdk.Screen) = + gtk_icon_theme_set_screen(cast[ptr IconTheme00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc `screen=`*(self: IconTheme; screen: gdk.Screen) = + gtk_icon_theme_set_screen(cast[ptr IconTheme00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc gtk_icon_theme_set_search_path*(self: ptr IconTheme00; path: ucstringArray; nElements: int32) {. + importc: "gtk_icon_theme_set_search_path", libprag.} + +proc setSearchPath*(self: IconTheme; path: ucstringArray; nElements: int) = + gtk_icon_theme_set_search_path(cast[ptr IconTheme00](self.impl), path, int32(nElements)) + +proc gtk_icon_info_new_for_pixbuf*(iconTheme: ptr IconTheme00; pixbuf: ptr gdkpixbuf.Pixbuf00): ptr IconInfo00 {. + importc: "gtk_icon_info_new_for_pixbuf", libprag.} + +proc newIconInfoForPixbuf*(iconTheme: IconTheme; pixbuf: gdkpixbuf.Pixbuf): IconInfo = + new(result, finalizeGObject) + result.impl = gtk_icon_info_new_for_pixbuf(cast[ptr IconTheme00](iconTheme.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initIconInfoForPixbuf*[T](result: var T; iconTheme: IconTheme; pixbuf: gdkpixbuf.Pixbuf) = + assert(result is IconInfo) + new(result, finalizeGObject) + result.impl = gtk_icon_info_new_for_pixbuf(cast[ptr IconTheme00](iconTheme.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + IconLookupFlag* {.size: sizeof(cint), pure.} = enum + noSvg = 1 + forceSvg = 2 + useBuiltin = 3 + genericFallback = 4 + forceSize = 5 + forceRegular = 6 + forceSymbolic = 7 + dirLtr = 8 + dirRtl = 9 + + IconLookupFlags* {.size: sizeof(cint).} = set[IconLookupFlag] + +proc gtk_icon_theme_choose_icon*(self: ptr IconTheme00; iconNames: cstringArray; size: int32; + flags: IconLookupFlags): ptr IconInfo00 {. + importc: "gtk_icon_theme_choose_icon", libprag.} + +proc chooseIcon*(self: IconTheme; iconNames: cstringArray; size: int; + flags: IconLookupFlags): IconInfo = + let gobj = gtk_icon_theme_choose_icon(cast[ptr IconTheme00](self.impl), iconNames, int32(size), flags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_choose_icon_for_scale*(self: ptr IconTheme00; iconNames: cstringArray; size: int32; + scale: int32; flags: IconLookupFlags): ptr IconInfo00 {. + importc: "gtk_icon_theme_choose_icon_for_scale", libprag.} + +proc chooseIconForScale*(self: IconTheme; iconNames: cstringArray; size: int; + scale: int; flags: IconLookupFlags): IconInfo = + let gobj = gtk_icon_theme_choose_icon_for_scale(cast[ptr IconTheme00](self.impl), iconNames, int32(size), int32(scale), flags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_load_icon*(self: ptr IconTheme00; iconName: cstring; size: int32; + flags: IconLookupFlags): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_theme_load_icon", libprag.} + +proc loadIcon*(self: IconTheme; iconName: string; size: int; flags: IconLookupFlags): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_theme_load_icon(cast[ptr IconTheme00](self.impl), cstring(iconName), int32(size), flags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_load_icon_for_scale*(self: ptr IconTheme00; iconName: cstring; size: int32; + scale: int32; flags: IconLookupFlags): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_icon_theme_load_icon_for_scale", libprag.} + +proc loadIconForScale*(self: IconTheme; iconName: string; size: int; scale: int; + flags: IconLookupFlags): gdkpixbuf.Pixbuf = + let gobj = gtk_icon_theme_load_icon_for_scale(cast[ptr IconTheme00](self.impl), cstring(iconName), int32(size), int32(scale), flags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_load_surface*(self: ptr IconTheme00; iconName: cstring; size: int32; + scale: int32; forWindow: ptr gdk.Window00; flags: IconLookupFlags): ptr cairo.Surface00 {. + importc: "gtk_icon_theme_load_surface", libprag.} + +proc loadSurface*(self: IconTheme; iconName: string; size: int; scale: int; + forWindow: gdk.Window; flags: IconLookupFlags): cairo.Surface = + new(result) + result.impl = gtk_icon_theme_load_surface(cast[ptr IconTheme00](self.impl), cstring(iconName), int32(size), int32(scale), cast[ptr gdk.Window00](forWindow.impl), flags) + +proc gtk_icon_theme_lookup_by_gicon*(self: ptr IconTheme00; icon: ptr gio.Icon00; size: int32; + flags: IconLookupFlags): ptr IconInfo00 {. + importc: "gtk_icon_theme_lookup_by_gicon", libprag.} + +proc lookupByGicon*(self: IconTheme; icon: gio.Icon; size: int; flags: IconLookupFlags): IconInfo = + let gobj = gtk_icon_theme_lookup_by_gicon(cast[ptr IconTheme00](self.impl), cast[ptr gio.Icon00](icon.impl), int32(size), flags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_lookup_by_gicon_for_scale*(self: ptr IconTheme00; icon: ptr gio.Icon00; size: int32; + scale: int32; flags: IconLookupFlags): ptr IconInfo00 {. + importc: "gtk_icon_theme_lookup_by_gicon_for_scale", libprag.} + +proc lookupByGiconForScale*(self: IconTheme; icon: gio.Icon; size: int; scale: int; + flags: IconLookupFlags): IconInfo = + let gobj = gtk_icon_theme_lookup_by_gicon_for_scale(cast[ptr IconTheme00](self.impl), cast[ptr gio.Icon00](icon.impl), int32(size), int32(scale), flags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_lookup_icon*(self: ptr IconTheme00; iconName: cstring; size: int32; + flags: IconLookupFlags): ptr IconInfo00 {. + importc: "gtk_icon_theme_lookup_icon", libprag.} + +proc lookupIcon*(self: IconTheme; iconName: string; size: int; flags: IconLookupFlags): IconInfo = + let gobj = gtk_icon_theme_lookup_icon(cast[ptr IconTheme00](self.impl), cstring(iconName), int32(size), flags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_theme_lookup_icon_for_scale*(self: ptr IconTheme00; iconName: cstring; size: int32; + scale: int32; flags: IconLookupFlags): ptr IconInfo00 {. + importc: "gtk_icon_theme_lookup_icon_for_scale", libprag.} + +proc lookupIconForScale*(self: IconTheme; iconName: string; size: int; scale: int; + flags: IconLookupFlags): IconInfo = + let gobj = gtk_icon_theme_lookup_icon_for_scale(cast[ptr IconTheme00](self.impl), cstring(iconName), int32(size), int32(scale), flags) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[IconInfo](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + IconInfoClass00* {.pure.} = object + IconInfoClass* = ref object + impl*: ptr IconInfoClass00 + +type + IconSize* {.size: sizeof(cint), pure.} = enum + invalid = 0 + menu = 1 + smallToolbar = 2 + largeToolbar = 3 + button = 4 + dnd = 5 + dialog = 6 + +proc gtk_icon_size_from_name*(name: cstring): int32 {. + importc: "gtk_icon_size_from_name", libprag.} + +proc fromName*(name: cstring): int32 {. + importc: "gtk_icon_size_from_name", libprag.} + +proc gtk_icon_size_get_name*(size: int32): cstring {. + importc: "gtk_icon_size_get_name", libprag.} + +proc getName*(size: int): string = + let resul0 = gtk_icon_size_get_name(int32(size)) + result = $resul0 + +proc name*(size: int): string = + let resul0 = gtk_icon_size_get_name(int32(size)) + result = $resul0 + +proc gtk_icon_size_lookup*(size: int32; width: var int32; height: var int32): gboolean {. + importc: "gtk_icon_size_lookup", libprag.} + +proc lookup*(size: int32; width: var int32; height: var int32): gboolean {. + importc: "gtk_icon_size_lookup", libprag.} + +proc gtk_icon_size_lookup_for_settings*(settings: ptr Settings00; size: int32; width: var int32; + height: var int32): gboolean {. + importc: "gtk_icon_size_lookup_for_settings", libprag.} + +proc lookupForSettings*(settings: Settings; size: int; width: var int; height: var int): bool = + var height_00 = int32(height) + var width_00 = int32(width) + result = toBool(gtk_icon_size_lookup_for_settings(cast[ptr Settings00](settings.impl), int32(size), width_00, height_00)) + height = int(height_00) + width = int(width_00) + +proc gtk_icon_size_register*(name: cstring; width: int32; height: int32): int32 {. + importc: "gtk_icon_size_register", libprag.} + +proc register*(name: cstring; width: int32; height: int32): int32 {. + importc: "gtk_icon_size_register", libprag.} + +proc gtk_icon_size_register_alias*(alias: cstring; target: int32) {. + importc: "gtk_icon_size_register_alias", libprag.} + +proc registerAlias*(alias: cstring; target: int32) {. + importc: "gtk_icon_size_register_alias", libprag.} + +type + IconThemeClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + changed*: proc(iconTheme: ptr IconTheme00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + IconThemeClass* = ref object + impl*: ptr IconThemeClass00 + +type + IconThemeError* {.size: sizeof(cint), pure.} = enum + notFound = 0 + failed = 1 + +proc gtk_icon_theme_error_quark*(): uint32 {. + importc: "gtk_icon_theme_error_quark", libprag.} + +type + IconViewPrivate00* {.pure.} = object + IconViewPrivate* = ref object + impl*: ptr IconViewPrivate00 + +type + IconView* = ref object of Container + IconView00* = object of Container00 + priv3: ptr IconViewPrivate00 + +proc scActivateCursorItem*(self: IconView; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-cursor-item", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scItemActivated*(self: IconView; p: proc (self: ptr gobject.Object00; path: TreePath00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "item-activated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveCursor*(self: IconView; p: proc (self: ptr gobject.Object00; step: MovementStep; count: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectAll*(self: IconView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select-all", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectCursorItem*(self: IconView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select-cursor-item", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectionChanged*(self: IconView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "selection-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleCursorItem*(self: IconView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-cursor-item", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUnselectAll*(self: IconView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "unselect-all", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_icon_view_new*(): ptr IconView00 {. + importc: "gtk_icon_view_new", libprag.} + +proc newIconView*(): IconView = + new(result, finalizeGObject) + result.impl = gtk_icon_view_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initIconView*[T](result: var T) = + assert(result is IconView) + new(result, finalizeGObject) + result.impl = gtk_icon_view_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_view_new_with_area*(area: ptr CellArea00): ptr IconView00 {. + importc: "gtk_icon_view_new_with_area", libprag.} + +proc newIconViewWithArea*(area: CellArea): IconView = + new(result, finalizeGObject) + result.impl = gtk_icon_view_new_with_area(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initIconViewWithArea*[T](result: var T; area: CellArea) = + assert(result is IconView) + new(result, finalizeGObject) + result.impl = gtk_icon_view_new_with_area(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_view_new_with_model*(model: ptr TreeModel00): ptr IconView00 {. + importc: "gtk_icon_view_new_with_model", libprag.} + +proc newIconViewWithModel*(model: TreeModel): IconView = + new(result, finalizeGObject) + result.impl = gtk_icon_view_new_with_model(cast[ptr TreeModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initIconViewWithModel*[T](result: var T; model: TreeModel) = + assert(result is IconView) + new(result, finalizeGObject) + result.impl = gtk_icon_view_new_with_model(cast[ptr TreeModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_icon_view_convert_widget_to_bin_window_coords*(self: ptr IconView00; wx: int32; wy: int32; bx: var int32; + by: var int32) {. + importc: "gtk_icon_view_convert_widget_to_bin_window_coords", libprag.} + +proc convertWidgetToBinWindowCoords*(self: IconView; wx: int; wy: int; bx: var int; by: var int) = + var bx_00 = int32(bx) + var by_00 = int32(by) + gtk_icon_view_convert_widget_to_bin_window_coords(cast[ptr IconView00](self.impl), int32(wx), int32(wy), bx_00, by_00) + bx = int(bx_00) + by = int(by_00) + +proc gtk_icon_view_create_drag_icon*(self: ptr IconView00; path: ptr TreePath00): ptr cairo.Surface00 {. + importc: "gtk_icon_view_create_drag_icon", libprag.} + +proc createDragIcon*(self: IconView; path: TreePath): cairo.Surface = + new(result) + result.impl = gtk_icon_view_create_drag_icon(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_icon_view_enable_model_drag_dest*(self: ptr IconView00; targets: TargetEntry00Array; + nTargets: int32; actions: gdk.DragAction) {. + importc: "gtk_icon_view_enable_model_drag_dest", libprag.} + +proc enableModelDragDest*(self: IconView; targets: TargetEntry00Array; nTargets: int; + actions: gdk.DragAction) = + gtk_icon_view_enable_model_drag_dest(cast[ptr IconView00](self.impl), targets, int32(nTargets), actions) + +proc gtk_icon_view_enable_model_drag_source*(self: ptr IconView00; startButtonMask: gdk.ModifierType; + targets: TargetEntry00Array; nTargets: int32; actions: gdk.DragAction) {. + importc: "gtk_icon_view_enable_model_drag_source", libprag.} + +proc enableModelDragSource*(self: IconView; startButtonMask: gdk.ModifierType; + targets: TargetEntry00Array; nTargets: int; actions: gdk.DragAction) = + gtk_icon_view_enable_model_drag_source(cast[ptr IconView00](self.impl), startButtonMask, targets, int32(nTargets), actions) + +proc gtk_icon_view_get_activate_on_single_click*(self: ptr IconView00): gboolean {. + importc: "gtk_icon_view_get_activate_on_single_click", libprag.} + +proc getActivateOnSingleClick*(self: IconView): bool = + toBool(gtk_icon_view_get_activate_on_single_click(cast[ptr IconView00](self.impl))) + +proc activateOnSingleClick*(self: IconView): bool = + toBool(gtk_icon_view_get_activate_on_single_click(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_cell_rect*(self: ptr IconView00; path: ptr TreePath00; cell: ptr CellRenderer00; + rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_icon_view_get_cell_rect", libprag.} + +proc getCellRect*(self: ptr IconView00; path: ptr TreePath00; cell: ptr CellRenderer00; + rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_icon_view_get_cell_rect", libprag.} + +proc cellRect*(self: ptr IconView00; path: ptr TreePath00; cell: ptr CellRenderer00; + rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_icon_view_get_cell_rect", libprag.} + +proc gtk_icon_view_get_column_spacing*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_column_spacing", libprag.} + +proc getColumnSpacing*(self: IconView): int = + int(gtk_icon_view_get_column_spacing(cast[ptr IconView00](self.impl))) + +proc columnSpacing*(self: IconView): int = + int(gtk_icon_view_get_column_spacing(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_columns*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_columns", libprag.} + +proc getColumns*(self: IconView): int = + int(gtk_icon_view_get_columns(cast[ptr IconView00](self.impl))) + +proc columns*(self: IconView): int = + int(gtk_icon_view_get_columns(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_cursor*(self: ptr IconView00; path: var ptr TreePath00; cell: var ptr CellRenderer00): gboolean {. + importc: "gtk_icon_view_get_cursor", libprag.} + +proc getCursor*(self: ptr IconView00; path: var ptr TreePath00; cell: var ptr CellRenderer00): gboolean {. + importc: "gtk_icon_view_get_cursor", libprag.} + +proc cursor*(self: ptr IconView00; path: var ptr TreePath00; cell: var ptr CellRenderer00): gboolean {. + importc: "gtk_icon_view_get_cursor", libprag.} + +proc gtk_icon_view_get_item_at_pos*(self: ptr IconView00; x: int32; y: int32; path: var ptr TreePath00; + cell: var ptr CellRenderer00): gboolean {. + importc: "gtk_icon_view_get_item_at_pos", libprag.} + +proc getItemAtPos*(self: ptr IconView00; x: int32; y: int32; path: var ptr TreePath00; + cell: var ptr CellRenderer00): gboolean {. + importc: "gtk_icon_view_get_item_at_pos", libprag.} + +proc itemAtPos*(self: ptr IconView00; x: int32; y: int32; path: var ptr TreePath00; + cell: var ptr CellRenderer00): gboolean {. + importc: "gtk_icon_view_get_item_at_pos", libprag.} + +proc gtk_icon_view_get_item_column*(self: ptr IconView00; path: ptr TreePath00): int32 {. + importc: "gtk_icon_view_get_item_column", libprag.} + +proc getItemColumn*(self: IconView; path: TreePath): int = + int(gtk_icon_view_get_item_column(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl))) + +proc itemColumn*(self: IconView; path: TreePath): int = + int(gtk_icon_view_get_item_column(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl))) + +proc gtk_icon_view_get_item_orientation*(self: ptr IconView00): Orientation {. + importc: "gtk_icon_view_get_item_orientation", libprag.} + +proc getItemOrientation*(self: IconView): Orientation = + gtk_icon_view_get_item_orientation(cast[ptr IconView00](self.impl)) + +proc itemOrientation*(self: IconView): Orientation = + gtk_icon_view_get_item_orientation(cast[ptr IconView00](self.impl)) + +proc gtk_icon_view_get_item_padding*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_item_padding", libprag.} + +proc getItemPadding*(self: IconView): int = + int(gtk_icon_view_get_item_padding(cast[ptr IconView00](self.impl))) + +proc itemPadding*(self: IconView): int = + int(gtk_icon_view_get_item_padding(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_item_row*(self: ptr IconView00; path: ptr TreePath00): int32 {. + importc: "gtk_icon_view_get_item_row", libprag.} + +proc getItemRow*(self: IconView; path: TreePath): int = + int(gtk_icon_view_get_item_row(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl))) + +proc itemRow*(self: IconView; path: TreePath): int = + int(gtk_icon_view_get_item_row(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl))) + +proc gtk_icon_view_get_item_width*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_item_width", libprag.} + +proc getItemWidth*(self: IconView): int = + int(gtk_icon_view_get_item_width(cast[ptr IconView00](self.impl))) + +proc itemWidth*(self: IconView): int = + int(gtk_icon_view_get_item_width(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_margin*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_margin", libprag.} + +proc getMargin*(self: IconView): int = + int(gtk_icon_view_get_margin(cast[ptr IconView00](self.impl))) + +proc margin*(self: IconView): int = + int(gtk_icon_view_get_margin(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_markup_column*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_markup_column", libprag.} + +proc getMarkupColumn*(self: IconView): int = + int(gtk_icon_view_get_markup_column(cast[ptr IconView00](self.impl))) + +proc markupColumn*(self: IconView): int = + int(gtk_icon_view_get_markup_column(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_model*(self: ptr IconView00): ptr TreeModel00 {. + importc: "gtk_icon_view_get_model", libprag.} + +proc getModel*(self: IconView): TreeModel = + new(result) + result.impl = gtk_icon_view_get_model(cast[ptr IconView00](self.impl)) + +proc model*(self: IconView): TreeModel = + new(result) + result.impl = gtk_icon_view_get_model(cast[ptr IconView00](self.impl)) + +proc gtk_icon_view_get_path_at_pos*(self: ptr IconView00; x: int32; y: int32): ptr TreePath00 {. + importc: "gtk_icon_view_get_path_at_pos", libprag.} + +proc getPathAtPos*(self: IconView; x: int; y: int): TreePath = + new(result) + result.impl = gtk_icon_view_get_path_at_pos(cast[ptr IconView00](self.impl), int32(x), int32(y)) + +proc pathAtPos*(self: IconView; x: int; y: int): TreePath = + new(result) + result.impl = gtk_icon_view_get_path_at_pos(cast[ptr IconView00](self.impl), int32(x), int32(y)) + +proc gtk_icon_view_get_pixbuf_column*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_pixbuf_column", libprag.} + +proc getPixbufColumn*(self: IconView): int = + int(gtk_icon_view_get_pixbuf_column(cast[ptr IconView00](self.impl))) + +proc pixbufColumn*(self: IconView): int = + int(gtk_icon_view_get_pixbuf_column(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_reorderable*(self: ptr IconView00): gboolean {. + importc: "gtk_icon_view_get_reorderable", libprag.} + +proc getReorderable*(self: IconView): bool = + toBool(gtk_icon_view_get_reorderable(cast[ptr IconView00](self.impl))) + +proc reorderable*(self: IconView): bool = + toBool(gtk_icon_view_get_reorderable(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_row_spacing*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_row_spacing", libprag.} + +proc getRowSpacing*(self: IconView): int = + int(gtk_icon_view_get_row_spacing(cast[ptr IconView00](self.impl))) + +proc rowSpacing*(self: IconView): int = + int(gtk_icon_view_get_row_spacing(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_selected_items*(self: ptr IconView00): ptr pointer {. + importc: "gtk_icon_view_get_selected_items", libprag.} + +proc getSelectedItems*(self: IconView): ptr pointer = + gtk_icon_view_get_selected_items(cast[ptr IconView00](self.impl)) + +proc selectedItems*(self: IconView): ptr pointer = + gtk_icon_view_get_selected_items(cast[ptr IconView00](self.impl)) + +proc gtk_icon_view_get_selection_mode*(self: ptr IconView00): SelectionMode {. + importc: "gtk_icon_view_get_selection_mode", libprag.} + +proc getSelectionMode*(self: IconView): SelectionMode = + gtk_icon_view_get_selection_mode(cast[ptr IconView00](self.impl)) + +proc selectionMode*(self: IconView): SelectionMode = + gtk_icon_view_get_selection_mode(cast[ptr IconView00](self.impl)) + +proc gtk_icon_view_get_spacing*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_spacing", libprag.} + +proc getSpacing*(self: IconView): int = + int(gtk_icon_view_get_spacing(cast[ptr IconView00](self.impl))) + +proc spacing*(self: IconView): int = + int(gtk_icon_view_get_spacing(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_text_column*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_text_column", libprag.} + +proc getTextColumn*(self: IconView): int = + int(gtk_icon_view_get_text_column(cast[ptr IconView00](self.impl))) + +proc textColumn*(self: IconView): int = + int(gtk_icon_view_get_text_column(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_tooltip_column*(self: ptr IconView00): int32 {. + importc: "gtk_icon_view_get_tooltip_column", libprag.} + +proc getTooltipColumn*(self: IconView): int = + int(gtk_icon_view_get_tooltip_column(cast[ptr IconView00](self.impl))) + +proc tooltipColumn*(self: IconView): int = + int(gtk_icon_view_get_tooltip_column(cast[ptr IconView00](self.impl))) + +proc gtk_icon_view_get_tooltip_context*(self: ptr IconView00; x: int32; y: int32; keyboardTip: gboolean; + model: var ptr TreeModel00; path: var ptr TreePath00; iter: var TreeIter00): gboolean {. + importc: "gtk_icon_view_get_tooltip_context", libprag.} + +proc getTooltipContext*(self: ptr IconView00; x: int32; y: int32; keyboardTip: gboolean; + model: var ptr TreeModel00; path: var ptr TreePath00; iter: var TreeIter00): gboolean {. + importc: "gtk_icon_view_get_tooltip_context", libprag.} + +proc tooltipContext*(self: ptr IconView00; x: int32; y: int32; keyboardTip: gboolean; + model: var ptr TreeModel00; path: var ptr TreePath00; iter: var TreeIter00): gboolean {. + importc: "gtk_icon_view_get_tooltip_context", libprag.} + +proc gtk_icon_view_get_visible_range*(self: ptr IconView00; startPath: var ptr TreePath00; + endPath: var ptr TreePath00): gboolean {. + importc: "gtk_icon_view_get_visible_range", libprag.} + +proc getVisibleRange*(self: ptr IconView00; startPath: var ptr TreePath00; + endPath: var ptr TreePath00): gboolean {. + importc: "gtk_icon_view_get_visible_range", libprag.} + +proc visibleRange*(self: ptr IconView00; startPath: var ptr TreePath00; + endPath: var ptr TreePath00): gboolean {. + importc: "gtk_icon_view_get_visible_range", libprag.} + +proc gtk_icon_view_item_activated*(self: ptr IconView00; path: ptr TreePath00) {. + importc: "gtk_icon_view_item_activated", libprag.} + +proc itemActivated*(self: IconView; path: TreePath) = + gtk_icon_view_item_activated(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_icon_view_path_is_selected*(self: ptr IconView00; path: ptr TreePath00): gboolean {. + importc: "gtk_icon_view_path_is_selected", libprag.} + +proc pathIsSelected*(self: IconView; path: TreePath): bool = + toBool(gtk_icon_view_path_is_selected(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl))) + +proc gtk_icon_view_scroll_to_path*(self: ptr IconView00; path: ptr TreePath00; useAlign: gboolean; + rowAlign: cfloat; colAlign: cfloat) {. + importc: "gtk_icon_view_scroll_to_path", libprag.} + +proc scrollToPath*(self: IconView; path: TreePath; useAlign: bool; rowAlign: cfloat; + colAlign: cfloat) = + gtk_icon_view_scroll_to_path(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl), gboolean(useAlign), rowAlign, colAlign) + +proc gtk_icon_view_select_all*(self: ptr IconView00) {. + importc: "gtk_icon_view_select_all", libprag.} + +proc selectAll*(self: IconView) = + gtk_icon_view_select_all(cast[ptr IconView00](self.impl)) + +proc gtk_icon_view_select_path*(self: ptr IconView00; path: ptr TreePath00) {. + importc: "gtk_icon_view_select_path", libprag.} + +proc selectPath*(self: IconView; path: TreePath) = + gtk_icon_view_select_path(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_icon_view_set_activate_on_single_click*(self: ptr IconView00; single: gboolean) {. + importc: "gtk_icon_view_set_activate_on_single_click", libprag.} + +proc setActivateOnSingleClick*(self: IconView; single: bool) = + gtk_icon_view_set_activate_on_single_click(cast[ptr IconView00](self.impl), gboolean(single)) + +proc `activateOnSingleClick=`*(self: IconView; single: bool) = + gtk_icon_view_set_activate_on_single_click(cast[ptr IconView00](self.impl), gboolean(single)) + +proc gtk_icon_view_set_column_spacing*(self: ptr IconView00; columnSpacing: int32) {. + importc: "gtk_icon_view_set_column_spacing", libprag.} + +proc setColumnSpacing*(self: IconView; columnSpacing: int) = + gtk_icon_view_set_column_spacing(cast[ptr IconView00](self.impl), int32(columnSpacing)) + +proc `columnSpacing=`*(self: IconView; columnSpacing: int) = + gtk_icon_view_set_column_spacing(cast[ptr IconView00](self.impl), int32(columnSpacing)) + +proc gtk_icon_view_set_columns*(self: ptr IconView00; columns: int32) {. + importc: "gtk_icon_view_set_columns", libprag.} + +proc setColumns*(self: IconView; columns: int) = + gtk_icon_view_set_columns(cast[ptr IconView00](self.impl), int32(columns)) + +proc `columns=`*(self: IconView; columns: int) = + gtk_icon_view_set_columns(cast[ptr IconView00](self.impl), int32(columns)) + +proc gtk_icon_view_set_cursor*(self: ptr IconView00; path: ptr TreePath00; cell: ptr CellRenderer00; + startEditing: gboolean) {. + importc: "gtk_icon_view_set_cursor", libprag.} + +proc setCursor*(self: IconView; path: TreePath; cell: CellRenderer; + startEditing: bool) = + gtk_icon_view_set_cursor(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr CellRenderer00](cell.impl), gboolean(startEditing)) + +proc gtk_icon_view_set_item_orientation*(self: ptr IconView00; orientation: Orientation) {. + importc: "gtk_icon_view_set_item_orientation", libprag.} + +proc setItemOrientation*(self: IconView; orientation: Orientation) = + gtk_icon_view_set_item_orientation(cast[ptr IconView00](self.impl), orientation) + +proc `itemOrientation=`*(self: IconView; orientation: Orientation) = + gtk_icon_view_set_item_orientation(cast[ptr IconView00](self.impl), orientation) + +proc gtk_icon_view_set_item_padding*(self: ptr IconView00; itemPadding: int32) {. + importc: "gtk_icon_view_set_item_padding", libprag.} + +proc setItemPadding*(self: IconView; itemPadding: int) = + gtk_icon_view_set_item_padding(cast[ptr IconView00](self.impl), int32(itemPadding)) + +proc `itemPadding=`*(self: IconView; itemPadding: int) = + gtk_icon_view_set_item_padding(cast[ptr IconView00](self.impl), int32(itemPadding)) + +proc gtk_icon_view_set_item_width*(self: ptr IconView00; itemWidth: int32) {. + importc: "gtk_icon_view_set_item_width", libprag.} + +proc setItemWidth*(self: IconView; itemWidth: int) = + gtk_icon_view_set_item_width(cast[ptr IconView00](self.impl), int32(itemWidth)) + +proc `itemWidth=`*(self: IconView; itemWidth: int) = + gtk_icon_view_set_item_width(cast[ptr IconView00](self.impl), int32(itemWidth)) + +proc gtk_icon_view_set_margin*(self: ptr IconView00; margin: int32) {. + importc: "gtk_icon_view_set_margin", libprag.} + +proc setMargin*(self: IconView; margin: int) = + gtk_icon_view_set_margin(cast[ptr IconView00](self.impl), int32(margin)) + +proc `margin=`*(self: IconView; margin: int) = + gtk_icon_view_set_margin(cast[ptr IconView00](self.impl), int32(margin)) + +proc gtk_icon_view_set_markup_column*(self: ptr IconView00; column: int32) {. + importc: "gtk_icon_view_set_markup_column", libprag.} + +proc setMarkupColumn*(self: IconView; column: int) = + gtk_icon_view_set_markup_column(cast[ptr IconView00](self.impl), int32(column)) + +proc `markupColumn=`*(self: IconView; column: int) = + gtk_icon_view_set_markup_column(cast[ptr IconView00](self.impl), int32(column)) + +proc gtk_icon_view_set_model*(self: ptr IconView00; model: ptr TreeModel00) {. + importc: "gtk_icon_view_set_model", libprag.} + +proc setModel*(self: IconView; model: TreeModel) = + gtk_icon_view_set_model(cast[ptr IconView00](self.impl), cast[ptr TreeModel00](model.impl)) + +proc `model=`*(self: IconView; model: TreeModel) = + gtk_icon_view_set_model(cast[ptr IconView00](self.impl), cast[ptr TreeModel00](model.impl)) + +proc gtk_icon_view_set_pixbuf_column*(self: ptr IconView00; column: int32) {. + importc: "gtk_icon_view_set_pixbuf_column", libprag.} + +proc setPixbufColumn*(self: IconView; column: int) = + gtk_icon_view_set_pixbuf_column(cast[ptr IconView00](self.impl), int32(column)) + +proc `pixbufColumn=`*(self: IconView; column: int) = + gtk_icon_view_set_pixbuf_column(cast[ptr IconView00](self.impl), int32(column)) + +proc gtk_icon_view_set_reorderable*(self: ptr IconView00; reorderable: gboolean) {. + importc: "gtk_icon_view_set_reorderable", libprag.} + +proc setReorderable*(self: IconView; reorderable: bool) = + gtk_icon_view_set_reorderable(cast[ptr IconView00](self.impl), gboolean(reorderable)) + +proc `reorderable=`*(self: IconView; reorderable: bool) = + gtk_icon_view_set_reorderable(cast[ptr IconView00](self.impl), gboolean(reorderable)) + +proc gtk_icon_view_set_row_spacing*(self: ptr IconView00; rowSpacing: int32) {. + importc: "gtk_icon_view_set_row_spacing", libprag.} + +proc setRowSpacing*(self: IconView; rowSpacing: int) = + gtk_icon_view_set_row_spacing(cast[ptr IconView00](self.impl), int32(rowSpacing)) + +proc `rowSpacing=`*(self: IconView; rowSpacing: int) = + gtk_icon_view_set_row_spacing(cast[ptr IconView00](self.impl), int32(rowSpacing)) + +proc gtk_icon_view_set_selection_mode*(self: ptr IconView00; mode: SelectionMode) {. + importc: "gtk_icon_view_set_selection_mode", libprag.} + +proc setSelectionMode*(self: IconView; mode: SelectionMode) = + gtk_icon_view_set_selection_mode(cast[ptr IconView00](self.impl), mode) + +proc `selectionMode=`*(self: IconView; mode: SelectionMode) = + gtk_icon_view_set_selection_mode(cast[ptr IconView00](self.impl), mode) + +proc gtk_icon_view_set_spacing*(self: ptr IconView00; spacing: int32) {. + importc: "gtk_icon_view_set_spacing", libprag.} + +proc setSpacing*(self: IconView; spacing: int) = + gtk_icon_view_set_spacing(cast[ptr IconView00](self.impl), int32(spacing)) + +proc `spacing=`*(self: IconView; spacing: int) = + gtk_icon_view_set_spacing(cast[ptr IconView00](self.impl), int32(spacing)) + +proc gtk_icon_view_set_text_column*(self: ptr IconView00; column: int32) {. + importc: "gtk_icon_view_set_text_column", libprag.} + +proc setTextColumn*(self: IconView; column: int) = + gtk_icon_view_set_text_column(cast[ptr IconView00](self.impl), int32(column)) + +proc `textColumn=`*(self: IconView; column: int) = + gtk_icon_view_set_text_column(cast[ptr IconView00](self.impl), int32(column)) + +proc gtk_icon_view_set_tooltip_cell*(self: ptr IconView00; tooltip: ptr Tooltip00; path: ptr TreePath00; + cell: ptr CellRenderer00) {. + importc: "gtk_icon_view_set_tooltip_cell", libprag.} + +proc setTooltipCell*(self: IconView; tooltip: Tooltip; path: TreePath; + cell: CellRenderer) = + gtk_icon_view_set_tooltip_cell(cast[ptr IconView00](self.impl), cast[ptr Tooltip00](tooltip.impl), cast[ptr TreePath00](path.impl), cast[ptr CellRenderer00](cell.impl)) + +proc gtk_icon_view_set_tooltip_column*(self: ptr IconView00; column: int32) {. + importc: "gtk_icon_view_set_tooltip_column", libprag.} + +proc setTooltipColumn*(self: IconView; column: int) = + gtk_icon_view_set_tooltip_column(cast[ptr IconView00](self.impl), int32(column)) + +proc `tooltipColumn=`*(self: IconView; column: int) = + gtk_icon_view_set_tooltip_column(cast[ptr IconView00](self.impl), int32(column)) + +proc gtk_icon_view_set_tooltip_item*(self: ptr IconView00; tooltip: ptr Tooltip00; path: ptr TreePath00) {. + importc: "gtk_icon_view_set_tooltip_item", libprag.} + +proc setTooltipItem*(self: IconView; tooltip: Tooltip; path: TreePath) = + gtk_icon_view_set_tooltip_item(cast[ptr IconView00](self.impl), cast[ptr Tooltip00](tooltip.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_icon_view_unselect_all*(self: ptr IconView00) {. + importc: "gtk_icon_view_unselect_all", libprag.} + +proc unselectAll*(self: IconView) = + gtk_icon_view_unselect_all(cast[ptr IconView00](self.impl)) + +proc gtk_icon_view_unselect_path*(self: ptr IconView00; path: ptr TreePath00) {. + importc: "gtk_icon_view_unselect_path", libprag.} + +proc unselectPath*(self: IconView; path: TreePath) = + gtk_icon_view_unselect_path(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_icon_view_unset_model_drag_dest*(self: ptr IconView00) {. + importc: "gtk_icon_view_unset_model_drag_dest", libprag.} + +proc unsetModelDragDest*(self: IconView) = + gtk_icon_view_unset_model_drag_dest(cast[ptr IconView00](self.impl)) + +proc gtk_icon_view_unset_model_drag_source*(self: ptr IconView00) {. + importc: "gtk_icon_view_unset_model_drag_source", libprag.} + +proc unsetModelDragSource*(self: IconView) = + gtk_icon_view_unset_model_drag_source(cast[ptr IconView00](self.impl)) + +type + IconViewDropPosition* {.size: sizeof(cint), pure.} = enum + noDrop = 0 + dropInto = 1 + dropLeft = 2 + dropRight = 3 + dropAbove = 4 + dropBelow = 5 + +proc gtk_icon_view_get_dest_item_at_pos*(self: ptr IconView00; dragX: int32; dragY: int32; + path: var ptr TreePath00; pos: var IconViewDropPosition): gboolean {. + importc: "gtk_icon_view_get_dest_item_at_pos", libprag.} + +proc getDestItemAtPos*(self: ptr IconView00; dragX: int32; dragY: int32; + path: var ptr TreePath00; pos: var IconViewDropPosition): gboolean {. + importc: "gtk_icon_view_get_dest_item_at_pos", libprag.} + +proc destItemAtPos*(self: ptr IconView00; dragX: int32; dragY: int32; + path: var ptr TreePath00; pos: var IconViewDropPosition): gboolean {. + importc: "gtk_icon_view_get_dest_item_at_pos", libprag.} + +proc gtk_icon_view_get_drag_dest_item*(self: ptr IconView00; path: var ptr TreePath00; pos: var IconViewDropPosition) {. + importc: "gtk_icon_view_get_drag_dest_item", libprag.} + +proc getDragDestItem*(self: ptr IconView00; path: var ptr TreePath00; pos: var IconViewDropPosition) {. + importc: "gtk_icon_view_get_drag_dest_item", libprag.} + +proc dragDestItem*(self: ptr IconView00; path: var ptr TreePath00; pos: var IconViewDropPosition) {. + importc: "gtk_icon_view_get_drag_dest_item", libprag.} + +proc gtk_icon_view_set_drag_dest_item*(self: ptr IconView00; path: ptr TreePath00; pos: IconViewDropPosition) {. + importc: "gtk_icon_view_set_drag_dest_item", libprag.} + +proc setDragDestItem*(self: IconView; path: TreePath; pos: IconViewDropPosition) = + gtk_icon_view_set_drag_dest_item(cast[ptr IconView00](self.impl), cast[ptr TreePath00](path.impl), pos) + +type + IconViewAccessiblePrivate00* {.pure.} = object + IconViewAccessiblePrivate* = ref object + impl*: ptr IconViewAccessiblePrivate00 + +type + IconViewAccessible* = ref object of ContainerAccessible + IconViewAccessible00* = object of ContainerAccessible00 + priv4: ptr IconViewAccessiblePrivate00 + +type + IconViewAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + IconViewAccessibleClass* = ref object + impl*: ptr IconViewAccessibleClass00 + +type + IconViewClass00* {.pure.} = object + parentClass*: ContainerClass00 + itemActivated*: proc(iconView: ptr IconView00; path: ptr TreePath00) {.cdecl.} + selectionChanged*: proc(iconView: ptr IconView00) {.cdecl.} + selectAll*: proc(iconView: ptr IconView00) {.cdecl.} + unselectAll*: proc(iconView: ptr IconView00) {.cdecl.} + selectCursorItem*: proc(iconView: ptr IconView00) {.cdecl.} + toggleCursorItem*: proc(iconView: ptr IconView00) {.cdecl.} + moveCursor*: proc(iconView: ptr IconView00; step: MovementStep; count: int32): gboolean {.cdecl.} + activateCursorItem*: proc(iconView: ptr IconView00): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + IconViewClass* = ref object + impl*: ptr IconViewClass00 + +type + IconViewForeachFunc* = proc (iconView: ptr IconView00; path: ptr TreePath00; data: pointer) {.cdecl.} + +proc gtk_icon_view_selected_foreach*(self: ptr IconView00; `func`: IconViewForeachFunc; + data: pointer) {. + importc: "gtk_icon_view_selected_foreach", libprag.} + +proc selectedForeach*(self: IconView; `func`: IconViewForeachFunc; data: pointer) = + gtk_icon_view_selected_foreach(cast[ptr IconView00](self.impl), `func`, data) + +type + ImagePrivate00* {.pure.} = object + ImagePrivate* = ref object + impl*: ptr ImagePrivate00 + +type + Image* = ref object of Misc + Image00* = object of Misc00 + priv3: ptr ImagePrivate00 + +proc gtk_image_new*(): ptr Image00 {. + importc: "gtk_image_new", libprag.} + +proc newImage*(): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImage*[T](result: var T) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_new_from_animation*(animation: ptr gdkpixbuf.PixbufAnimation00): ptr Image00 {. + importc: "gtk_image_new_from_animation", libprag.} + +proc newImageFromAnimation*(animation: gdkpixbuf.PixbufAnimation): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new_from_animation(cast[ptr gdkpixbuf.PixbufAnimation00](animation.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageFromAnimation*[T](result: var T; animation: gdkpixbuf.PixbufAnimation) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new_from_animation(cast[ptr gdkpixbuf.PixbufAnimation00](animation.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_new_from_file*(filename: ucstring): ptr Image00 {. + importc: "gtk_image_new_from_file", libprag.} + +proc newImageFromFile*(filename: ucstring): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new_from_file(filename) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageFromFile*[T](result: var T; filename: ucstring) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new_from_file(filename) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_new_from_gicon*(icon: ptr gio.Icon00; size: int32): ptr Image00 {. + importc: "gtk_image_new_from_gicon", libprag.} + +proc newImageFromGicon*(icon: gio.Icon; size: int): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new_from_gicon(cast[ptr gio.Icon00](icon.impl), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageFromGicon*[T](result: var T; icon: gio.Icon; size: int) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new_from_gicon(cast[ptr gio.Icon00](icon.impl), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_new_from_icon_name*(iconName: cstring; size: int32): ptr Image00 {. + importc: "gtk_image_new_from_icon_name", libprag.} + +proc newImageFromIconName*(iconName: string; size: int): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new_from_icon_name(cstring(iconName), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageFromIconName*[T](result: var T; iconName: string; size: int) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new_from_icon_name(cstring(iconName), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_new_from_icon_set*(iconSet: ptr IconSet00; size: int32): ptr Image00 {. + importc: "gtk_image_new_from_icon_set", libprag.} + +proc newImageFromIconSet*(iconSet: IconSet; size: int): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new_from_icon_set(cast[ptr IconSet00](iconSet.impl), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageFromIconSet*[T](result: var T; iconSet: IconSet; size: int) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new_from_icon_set(cast[ptr IconSet00](iconSet.impl), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_new_from_pixbuf*(pixbuf: ptr gdkpixbuf.Pixbuf00): ptr Image00 {. + importc: "gtk_image_new_from_pixbuf", libprag.} + +proc newImageFromPixbuf*(pixbuf: gdkpixbuf.Pixbuf): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new_from_pixbuf(cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageFromPixbuf*[T](result: var T; pixbuf: gdkpixbuf.Pixbuf) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new_from_pixbuf(cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_new_from_resource*(resourcePath: cstring): ptr Image00 {. + importc: "gtk_image_new_from_resource", libprag.} + +proc newImageFromResource*(resourcePath: string): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new_from_resource(cstring(resourcePath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageFromResource*[T](result: var T; resourcePath: string) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new_from_resource(cstring(resourcePath)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_new_from_stock*(stockId: cstring; size: int32): ptr Image00 {. + importc: "gtk_image_new_from_stock", libprag.} + +proc newImageFromStock*(stockId: string; size: int): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new_from_stock(cstring(stockId), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageFromStock*[T](result: var T; stockId: string; size: int) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new_from_stock(cstring(stockId), int32(size)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_new_from_surface*(surface: ptr cairo.Surface00): ptr Image00 {. + importc: "gtk_image_new_from_surface", libprag.} + +proc newImageFromSurface*(surface: cairo.Surface): Image = + new(result, finalizeGObject) + result.impl = gtk_image_new_from_surface(cast[ptr cairo.Surface00](surface.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageFromSurface*[T](result: var T; surface: cairo.Surface) = + assert(result is Image) + new(result, finalizeGObject) + result.impl = gtk_image_new_from_surface(cast[ptr cairo.Surface00](surface.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_clear*(self: ptr Image00) {. + importc: "gtk_image_clear", libprag.} + +proc clear*(self: Image) = + gtk_image_clear(cast[ptr Image00](self.impl)) + +proc gtk_image_get_animation*(self: ptr Image00): ptr gdkpixbuf.PixbufAnimation00 {. + importc: "gtk_image_get_animation", libprag.} + +proc getAnimation*(self: Image): gdkpixbuf.PixbufAnimation = + let gobj = gtk_image_get_animation(cast[ptr Image00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.PixbufAnimation](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc animation*(self: Image): gdkpixbuf.PixbufAnimation = + let gobj = gtk_image_get_animation(cast[ptr Image00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.PixbufAnimation](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_get_gicon*(self: ptr Image00; gicon: var ptr gio.Icon00; size: var int32) {. + importc: "gtk_image_get_gicon", libprag.} + +proc getGicon*(self: ptr Image00; gicon: var ptr gio.Icon00; size: var int32) {. + importc: "gtk_image_get_gicon", libprag.} + +proc gicon*(self: ptr Image00; gicon: var ptr gio.Icon00; size: var int32) {. + importc: "gtk_image_get_gicon", libprag.} + +proc gtk_image_get_icon_name*(self: ptr Image00; iconName: var cstring; size: var int32) {. + importc: "gtk_image_get_icon_name", libprag.} + +proc getIconName*(self: Image; iconName: var string; size: var int) = + var iconName_00 = cstring(iconName) + var size_00 = int32(size) + gtk_image_get_icon_name(cast[ptr Image00](self.impl), iconName_00, size_00) + iconName = $(iconName_00) + size = int(size_00) + +proc iconName*(self: Image; iconName: var string; size: var int) = + var iconName_00 = cstring(iconName) + var size_00 = int32(size) + gtk_image_get_icon_name(cast[ptr Image00](self.impl), iconName_00, size_00) + iconName = $(iconName_00) + size = int(size_00) + +proc gtk_image_get_icon_set*(self: ptr Image00; iconSet: var ptr IconSet00; size: var int32) {. + importc: "gtk_image_get_icon_set", libprag.} + +proc getIconSet*(self: ptr Image00; iconSet: var ptr IconSet00; size: var int32) {. + importc: "gtk_image_get_icon_set", libprag.} + +proc iconSet*(self: ptr Image00; iconSet: var ptr IconSet00; size: var int32) {. + importc: "gtk_image_get_icon_set", libprag.} + +proc gtk_image_get_pixbuf*(self: ptr Image00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_image_get_pixbuf", libprag.} + +proc getPixbuf*(self: Image): gdkpixbuf.Pixbuf = + let gobj = gtk_image_get_pixbuf(cast[ptr Image00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbuf*(self: Image): gdkpixbuf.Pixbuf = + let gobj = gtk_image_get_pixbuf(cast[ptr Image00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_get_pixel_size*(self: ptr Image00): int32 {. + importc: "gtk_image_get_pixel_size", libprag.} + +proc getPixelSize*(self: Image): int = + int(gtk_image_get_pixel_size(cast[ptr Image00](self.impl))) + +proc pixelSize*(self: Image): int = + int(gtk_image_get_pixel_size(cast[ptr Image00](self.impl))) + +proc gtk_image_get_stock*(self: ptr Image00; stockId: var cstring; size: var int32) {. + importc: "gtk_image_get_stock", libprag.} + +proc getStock*(self: Image; stockId: var string; size: var int) = + var stockId_00 = cstring(stockId) + var size_00 = int32(size) + gtk_image_get_stock(cast[ptr Image00](self.impl), stockId_00, size_00) + stockId = $(stockId_00) + size = int(size_00) + +proc stock*(self: Image; stockId: var string; size: var int) = + var stockId_00 = cstring(stockId) + var size_00 = int32(size) + gtk_image_get_stock(cast[ptr Image00](self.impl), stockId_00, size_00) + stockId = $(stockId_00) + size = int(size_00) + +proc gtk_image_get_storage_type*(self: ptr Image00): ImageType {. + importc: "gtk_image_get_storage_type", libprag.} + +proc getStorageType*(self: Image): ImageType = + gtk_image_get_storage_type(cast[ptr Image00](self.impl)) + +proc storageType*(self: Image): ImageType = + gtk_image_get_storage_type(cast[ptr Image00](self.impl)) + +proc gtk_image_set_from_animation*(self: ptr Image00; animation: ptr gdkpixbuf.PixbufAnimation00) {. + importc: "gtk_image_set_from_animation", libprag.} + +proc setFromAnimation*(self: Image; animation: gdkpixbuf.PixbufAnimation) = + gtk_image_set_from_animation(cast[ptr Image00](self.impl), cast[ptr gdkpixbuf.PixbufAnimation00](animation.impl)) + +proc `fromAnimation=`*(self: Image; animation: gdkpixbuf.PixbufAnimation) = + gtk_image_set_from_animation(cast[ptr Image00](self.impl), cast[ptr gdkpixbuf.PixbufAnimation00](animation.impl)) + +proc gtk_image_set_from_file*(self: ptr Image00; filename: ucstring) {. + importc: "gtk_image_set_from_file", libprag.} + +proc setFromFile*(self: Image; filename: ucstring) = + gtk_image_set_from_file(cast[ptr Image00](self.impl), filename) + +proc `fromFile=`*(self: Image; filename: ucstring) = + gtk_image_set_from_file(cast[ptr Image00](self.impl), filename) + +proc gtk_image_set_from_gicon*(self: ptr Image00; icon: ptr gio.Icon00; size: int32) {. + importc: "gtk_image_set_from_gicon", libprag.} + +proc setFromGicon*(self: Image; icon: gio.Icon; size: int) = + gtk_image_set_from_gicon(cast[ptr Image00](self.impl), cast[ptr gio.Icon00](icon.impl), int32(size)) + +proc gtk_image_set_from_icon_name*(self: ptr Image00; iconName: cstring; size: int32) {. + importc: "gtk_image_set_from_icon_name", libprag.} + +proc setFromIconName*(self: Image; iconName: string; size: int) = + gtk_image_set_from_icon_name(cast[ptr Image00](self.impl), cstring(iconName), int32(size)) + +proc gtk_image_set_from_icon_set*(self: ptr Image00; iconSet: ptr IconSet00; size: int32) {. + importc: "gtk_image_set_from_icon_set", libprag.} + +proc setFromIconSet*(self: Image; iconSet: IconSet; size: int) = + gtk_image_set_from_icon_set(cast[ptr Image00](self.impl), cast[ptr IconSet00](iconSet.impl), int32(size)) + +proc gtk_image_set_from_pixbuf*(self: ptr Image00; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_image_set_from_pixbuf", libprag.} + +proc setFromPixbuf*(self: Image; pixbuf: gdkpixbuf.Pixbuf) = + gtk_image_set_from_pixbuf(cast[ptr Image00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc `fromPixbuf=`*(self: Image; pixbuf: gdkpixbuf.Pixbuf) = + gtk_image_set_from_pixbuf(cast[ptr Image00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_image_set_from_resource*(self: ptr Image00; resourcePath: cstring) {. + importc: "gtk_image_set_from_resource", libprag.} + +proc setFromResource*(self: Image; resourcePath: string) = + gtk_image_set_from_resource(cast[ptr Image00](self.impl), cstring(resourcePath)) + +proc `fromResource=`*(self: Image; resourcePath: string) = + gtk_image_set_from_resource(cast[ptr Image00](self.impl), cstring(resourcePath)) + +proc gtk_image_set_from_stock*(self: ptr Image00; stockId: cstring; size: int32) {. + importc: "gtk_image_set_from_stock", libprag.} + +proc setFromStock*(self: Image; stockId: string; size: int) = + gtk_image_set_from_stock(cast[ptr Image00](self.impl), cstring(stockId), int32(size)) + +proc gtk_image_set_from_surface*(self: ptr Image00; surface: ptr cairo.Surface00) {. + importc: "gtk_image_set_from_surface", libprag.} + +proc setFromSurface*(self: Image; surface: cairo.Surface) = + gtk_image_set_from_surface(cast[ptr Image00](self.impl), cast[ptr cairo.Surface00](surface.impl)) + +proc `fromSurface=`*(self: Image; surface: cairo.Surface) = + gtk_image_set_from_surface(cast[ptr Image00](self.impl), cast[ptr cairo.Surface00](surface.impl)) + +proc gtk_image_set_pixel_size*(self: ptr Image00; pixelSize: int32) {. + importc: "gtk_image_set_pixel_size", libprag.} + +proc setPixelSize*(self: Image; pixelSize: int) = + gtk_image_set_pixel_size(cast[ptr Image00](self.impl), int32(pixelSize)) + +proc `pixelSize=`*(self: Image; pixelSize: int) = + gtk_image_set_pixel_size(cast[ptr Image00](self.impl), int32(pixelSize)) + +type + ImageAccessiblePrivate00* {.pure.} = object + ImageAccessiblePrivate* = ref object + impl*: ptr ImageAccessiblePrivate00 + +type + ImageAccessible* = ref object of WidgetAccessible + ImageAccessible00* = object of WidgetAccessible00 + priv3: ptr ImageAccessiblePrivate00 + +type + ImageAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + ImageAccessibleClass* = ref object + impl*: ptr ImageAccessibleClass00 + +type + ImageCellAccessiblePrivate00* {.pure.} = object + ImageCellAccessiblePrivate* = ref object + impl*: ptr ImageCellAccessiblePrivate00 + +type + ImageCellAccessible* = ref object of RendererCellAccessible + ImageCellAccessible00* = object of RendererCellAccessible00 + priv4: ptr ImageCellAccessiblePrivate00 + +type + ImageCellAccessibleClass00* {.pure.} = object + parentClass*: RendererCellAccessibleClass00 + ImageCellAccessibleClass* = ref object + impl*: ptr ImageCellAccessibleClass00 + +type + ImageClass00* {.pure.} = object + parentClass*: MiscClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ImageClass* = ref object + impl*: ptr ImageClass00 + +type + ImageMenuItemPrivate00* {.pure.} = object + ImageMenuItemPrivate* = ref object + impl*: ptr ImageMenuItemPrivate00 + +type + ImageMenuItem* = ref object of MenuItem + ImageMenuItem00* = object of MenuItem00 + priv5: ptr ImageMenuItemPrivate00 + +proc gtk_image_menu_item_new*(): ptr ImageMenuItem00 {. + importc: "gtk_image_menu_item_new", libprag.} + +proc newImageMenuItem*(): ImageMenuItem = + new(result, finalizeGObject) + result.impl = gtk_image_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageMenuItem*[T](result: var T) = + assert(result is ImageMenuItem) + new(result, finalizeGObject) + result.impl = gtk_image_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_menu_item_new_from_stock*(stockId: cstring; accelGroup: ptr AccelGroup00): ptr ImageMenuItem00 {. + importc: "gtk_image_menu_item_new_from_stock", libprag.} + +proc newImageMenuItemFromStock*(stockId: string; accelGroup: AccelGroup): ImageMenuItem = + new(result, finalizeGObject) + result.impl = gtk_image_menu_item_new_from_stock(cstring(stockId), cast[ptr AccelGroup00](accelGroup.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageMenuItemFromStock*[T](result: var T; stockId: string; accelGroup: AccelGroup) = + assert(result is ImageMenuItem) + new(result, finalizeGObject) + result.impl = gtk_image_menu_item_new_from_stock(cstring(stockId), cast[ptr AccelGroup00](accelGroup.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_menu_item_new_with_label*(label: cstring): ptr ImageMenuItem00 {. + importc: "gtk_image_menu_item_new_with_label", libprag.} + +proc newImageMenuItemWithLabel*(label: string): ImageMenuItem = + new(result, finalizeGObject) + result.impl = gtk_image_menu_item_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageMenuItemWithLabel*[T](result: var T; label: string) = + assert(result is ImageMenuItem) + new(result, finalizeGObject) + result.impl = gtk_image_menu_item_new_with_label(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_menu_item_new_with_mnemonic*(label: cstring): ptr ImageMenuItem00 {. + importc: "gtk_image_menu_item_new_with_mnemonic", libprag.} + +proc newImageMenuItemWithMnemonic*(label: string): ImageMenuItem = + new(result, finalizeGObject) + result.impl = gtk_image_menu_item_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initImageMenuItemWithMnemonic*[T](result: var T; label: string) = + assert(result is ImageMenuItem) + new(result, finalizeGObject) + result.impl = gtk_image_menu_item_new_with_mnemonic(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_menu_item_get_always_show_image*(self: ptr ImageMenuItem00): gboolean {. + importc: "gtk_image_menu_item_get_always_show_image", libprag.} + +proc getAlwaysShowImage*(self: ImageMenuItem): bool = + toBool(gtk_image_menu_item_get_always_show_image(cast[ptr ImageMenuItem00](self.impl))) + +proc alwaysShowImage*(self: ImageMenuItem): bool = + toBool(gtk_image_menu_item_get_always_show_image(cast[ptr ImageMenuItem00](self.impl))) + +proc gtk_image_menu_item_get_image*(self: ptr ImageMenuItem00): ptr Widget00 {. + importc: "gtk_image_menu_item_get_image", libprag.} + +proc getImage*(self: ImageMenuItem): Widget = + let gobj = gtk_image_menu_item_get_image(cast[ptr ImageMenuItem00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc image*(self: ImageMenuItem): Widget = + let gobj = gtk_image_menu_item_get_image(cast[ptr ImageMenuItem00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_image_menu_item_get_use_stock*(self: ptr ImageMenuItem00): gboolean {. + importc: "gtk_image_menu_item_get_use_stock", libprag.} + +proc getUseStock*(self: ImageMenuItem): bool = + toBool(gtk_image_menu_item_get_use_stock(cast[ptr ImageMenuItem00](self.impl))) + +proc useStock*(self: ImageMenuItem): bool = + toBool(gtk_image_menu_item_get_use_stock(cast[ptr ImageMenuItem00](self.impl))) + +proc gtk_image_menu_item_set_accel_group*(self: ptr ImageMenuItem00; accelGroup: ptr AccelGroup00) {. + importc: "gtk_image_menu_item_set_accel_group", libprag.} + +proc setAccelGroup*(self: ImageMenuItem; accelGroup: AccelGroup) = + gtk_image_menu_item_set_accel_group(cast[ptr ImageMenuItem00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +proc `accelGroup=`*(self: ImageMenuItem; accelGroup: AccelGroup) = + gtk_image_menu_item_set_accel_group(cast[ptr ImageMenuItem00](self.impl), cast[ptr AccelGroup00](accelGroup.impl)) + +proc gtk_image_menu_item_set_always_show_image*(self: ptr ImageMenuItem00; alwaysShow: gboolean) {. + importc: "gtk_image_menu_item_set_always_show_image", libprag.} + +proc setAlwaysShowImage*(self: ImageMenuItem; alwaysShow: bool) = + gtk_image_menu_item_set_always_show_image(cast[ptr ImageMenuItem00](self.impl), gboolean(alwaysShow)) + +proc `alwaysShowImage=`*(self: ImageMenuItem; alwaysShow: bool) = + gtk_image_menu_item_set_always_show_image(cast[ptr ImageMenuItem00](self.impl), gboolean(alwaysShow)) + +proc gtk_image_menu_item_set_image*(self: ptr ImageMenuItem00; image: ptr Widget00) {. + importc: "gtk_image_menu_item_set_image", libprag.} + +proc setImage*(self: ImageMenuItem; image: Widget) = + gtk_image_menu_item_set_image(cast[ptr ImageMenuItem00](self.impl), cast[ptr Widget00](image.impl)) + +proc `image=`*(self: ImageMenuItem; image: Widget) = + gtk_image_menu_item_set_image(cast[ptr ImageMenuItem00](self.impl), cast[ptr Widget00](image.impl)) + +proc gtk_image_menu_item_set_use_stock*(self: ptr ImageMenuItem00; useStock: gboolean) {. + importc: "gtk_image_menu_item_set_use_stock", libprag.} + +proc setUseStock*(self: ImageMenuItem; useStock: bool) = + gtk_image_menu_item_set_use_stock(cast[ptr ImageMenuItem00](self.impl), gboolean(useStock)) + +proc `useStock=`*(self: ImageMenuItem; useStock: bool) = + gtk_image_menu_item_set_use_stock(cast[ptr ImageMenuItem00](self.impl), gboolean(useStock)) + +type + ImageMenuItemClass00* {.pure.} = object + parentClass*: MenuItemClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ImageMenuItemClass* = ref object + impl*: ptr ImageMenuItemClass00 + +type + InfoBarPrivate00* {.pure.} = object + InfoBarPrivate* = ref object + impl*: ptr InfoBarPrivate00 + +type + InfoBar* = ref object of Box + InfoBar00* = object of Box00 + priv4: ptr InfoBarPrivate00 + +proc scClose*(self: InfoBar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "close", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scResponse*(self: InfoBar; p: proc (self: ptr gobject.Object00; responseId: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "response", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_info_bar_new*(): ptr InfoBar00 {. + importc: "gtk_info_bar_new", libprag.} + +proc newInfoBar*(): InfoBar = + new(result, finalizeGObject) + result.impl = gtk_info_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInfoBar*[T](result: var T) = + assert(result is InfoBar) + new(result, finalizeGObject) + result.impl = gtk_info_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_info_bar_add_action_widget*(self: ptr InfoBar00; child: ptr Widget00; responseId: int32) {. + importc: "gtk_info_bar_add_action_widget", libprag.} + +proc addActionWidget*(self: InfoBar; child: Widget; responseId: int) = + gtk_info_bar_add_action_widget(cast[ptr InfoBar00](self.impl), cast[ptr Widget00](child.impl), int32(responseId)) + +proc gtk_info_bar_add_button*(self: ptr InfoBar00; buttonText: cstring; responseId: int32): ptr Button00 {. + importc: "gtk_info_bar_add_button", libprag.} + +proc addButton*(self: InfoBar; buttonText: string; responseId: int): Button = + let gobj = gtk_info_bar_add_button(cast[ptr InfoBar00](self.impl), cstring(buttonText), int32(responseId)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Button](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_info_bar_get_action_area*(self: ptr InfoBar00): ptr Widget00 {. + importc: "gtk_info_bar_get_action_area", libprag.} + +proc getActionArea*(self: InfoBar): Widget = + let gobj = gtk_info_bar_get_action_area(cast[ptr InfoBar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc actionArea*(self: InfoBar): Widget = + let gobj = gtk_info_bar_get_action_area(cast[ptr InfoBar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_info_bar_get_content_area*(self: ptr InfoBar00): ptr Widget00 {. + importc: "gtk_info_bar_get_content_area", libprag.} + +proc getContentArea*(self: InfoBar): Widget = + let gobj = gtk_info_bar_get_content_area(cast[ptr InfoBar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc contentArea*(self: InfoBar): Widget = + let gobj = gtk_info_bar_get_content_area(cast[ptr InfoBar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_info_bar_get_show_close_button*(self: ptr InfoBar00): gboolean {. + importc: "gtk_info_bar_get_show_close_button", libprag.} + +proc getShowCloseButton*(self: InfoBar): bool = + toBool(gtk_info_bar_get_show_close_button(cast[ptr InfoBar00](self.impl))) + +proc showCloseButton*(self: InfoBar): bool = + toBool(gtk_info_bar_get_show_close_button(cast[ptr InfoBar00](self.impl))) + +proc gtk_info_bar_response*(self: ptr InfoBar00; responseId: int32) {. + importc: "gtk_info_bar_response", libprag.} + +proc response*(self: InfoBar; responseId: int) = + gtk_info_bar_response(cast[ptr InfoBar00](self.impl), int32(responseId)) + +proc gtk_info_bar_set_default_response*(self: ptr InfoBar00; responseId: int32) {. + importc: "gtk_info_bar_set_default_response", libprag.} + +proc setDefaultResponse*(self: InfoBar; responseId: int) = + gtk_info_bar_set_default_response(cast[ptr InfoBar00](self.impl), int32(responseId)) + +proc `defaultResponse=`*(self: InfoBar; responseId: int) = + gtk_info_bar_set_default_response(cast[ptr InfoBar00](self.impl), int32(responseId)) + +proc gtk_info_bar_set_response_sensitive*(self: ptr InfoBar00; responseId: int32; setting: gboolean) {. + importc: "gtk_info_bar_set_response_sensitive", libprag.} + +proc setResponseSensitive*(self: InfoBar; responseId: int; setting: bool) = + gtk_info_bar_set_response_sensitive(cast[ptr InfoBar00](self.impl), int32(responseId), gboolean(setting)) + +proc gtk_info_bar_set_show_close_button*(self: ptr InfoBar00; setting: gboolean) {. + importc: "gtk_info_bar_set_show_close_button", libprag.} + +proc setShowCloseButton*(self: InfoBar; setting: bool) = + gtk_info_bar_set_show_close_button(cast[ptr InfoBar00](self.impl), gboolean(setting)) + +proc `showCloseButton=`*(self: InfoBar; setting: bool) = + gtk_info_bar_set_show_close_button(cast[ptr InfoBar00](self.impl), gboolean(setting)) + +type + MessageType* {.size: sizeof(cint), pure.} = enum + info = 0 + warning = 1 + question = 2 + error = 3 + other = 4 + +proc gtk_info_bar_get_message_type*(self: ptr InfoBar00): MessageType {. + importc: "gtk_info_bar_get_message_type", libprag.} + +proc getMessageType*(self: InfoBar): MessageType = + gtk_info_bar_get_message_type(cast[ptr InfoBar00](self.impl)) + +proc messageType*(self: InfoBar): MessageType = + gtk_info_bar_get_message_type(cast[ptr InfoBar00](self.impl)) + +proc gtk_info_bar_set_message_type*(self: ptr InfoBar00; messageType: MessageType) {. + importc: "gtk_info_bar_set_message_type", libprag.} + +proc setMessageType*(self: InfoBar; messageType: MessageType) = + gtk_info_bar_set_message_type(cast[ptr InfoBar00](self.impl), messageType) + +proc `messageType=`*(self: InfoBar; messageType: MessageType) = + gtk_info_bar_set_message_type(cast[ptr InfoBar00](self.impl), messageType) + +type + InfoBarClass00* {.pure.} = object + parentClass*: BoxClass00 + response*: proc(infoBar: ptr InfoBar00; responseId: int32) {.cdecl.} + close*: proc(infoBar: ptr InfoBar00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + InfoBarClass* = ref object + impl*: ptr InfoBarClass00 + +type + InvisiblePrivate00* {.pure.} = object + InvisiblePrivate* = ref object + impl*: ptr InvisiblePrivate00 + +type + Invisible* = ref object of Widget + Invisible00* = object of Widget00 + priv2: ptr InvisiblePrivate00 + +proc gtk_invisible_new*(): ptr Invisible00 {. + importc: "gtk_invisible_new", libprag.} + +proc newInvisible*(): Invisible = + new(result, finalizeGObject) + result.impl = gtk_invisible_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInvisible*[T](result: var T) = + assert(result is Invisible) + new(result, finalizeGObject) + result.impl = gtk_invisible_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_invisible_new_for_screen*(screen: ptr gdk.Screen00): ptr Invisible00 {. + importc: "gtk_invisible_new_for_screen", libprag.} + +proc newInvisibleForScreen*(screen: gdk.Screen): Invisible = + new(result, finalizeGObject) + result.impl = gtk_invisible_new_for_screen(cast[ptr gdk.Screen00](screen.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initInvisibleForScreen*[T](result: var T; screen: gdk.Screen) = + assert(result is Invisible) + new(result, finalizeGObject) + result.impl = gtk_invisible_new_for_screen(cast[ptr gdk.Screen00](screen.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_invisible_get_screen*(self: ptr Invisible00): ptr gdk.Screen00 {. + importc: "gtk_invisible_get_screen", libprag.} + +proc getScreen*(self: Invisible): gdk.Screen = + let gobj = gtk_invisible_get_screen(cast[ptr Invisible00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: Invisible): gdk.Screen = + let gobj = gtk_invisible_get_screen(cast[ptr Invisible00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_invisible_set_screen*(self: ptr Invisible00; screen: ptr gdk.Screen00) {. + importc: "gtk_invisible_set_screen", libprag.} + +proc setScreen*(self: Invisible; screen: gdk.Screen) = + gtk_invisible_set_screen(cast[ptr Invisible00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc `screen=`*(self: Invisible; screen: gdk.Screen) = + gtk_invisible_set_screen(cast[ptr Invisible00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +type + InvisibleClass00* {.pure.} = object + parentClass*: WidgetClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + InvisibleClass* = ref object + impl*: ptr InvisibleClass00 + +type + KeySnoopFunc* = proc (grabWidget: ptr Widget00; event: ptr gdk.EventKey00; + funcData: pointer): int32 {.cdecl.} + +const LEVEL_BAR_OFFSET_FULL* = "full" + +const LEVEL_BAR_OFFSET_HIGH* = "high" + +const LEVEL_BAR_OFFSET_LOW* = "low" + +type + LabelAccessiblePrivate00* {.pure.} = object + LabelAccessiblePrivate* = ref object + impl*: ptr LabelAccessiblePrivate00 + +type + LabelAccessible* = ref object of WidgetAccessible + LabelAccessible00* = object of WidgetAccessible00 + priv3: ptr LabelAccessiblePrivate00 + +type + LabelAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + LabelAccessibleClass* = ref object + impl*: ptr LabelAccessibleClass00 + +type + LabelSelectionInfo00* {.pure.} = object + LabelSelectionInfo* = ref object + impl*: ptr LabelSelectionInfo00 + +type + LayoutPrivate00* {.pure.} = object + LayoutPrivate* = ref object + impl*: ptr LayoutPrivate00 + +type + Layout* = ref object of Container + Layout00* = object of Container00 + priv3: ptr LayoutPrivate00 + +proc gtk_layout_new*(hadjustment: ptr Adjustment00; vadjustment: ptr Adjustment00): ptr Layout00 {. + importc: "gtk_layout_new", libprag.} + +proc newLayout*(hadjustment: Adjustment; vadjustment: Adjustment): Layout = + new(result, finalizeGObject) + result.impl = gtk_layout_new(cast[ptr Adjustment00](hadjustment.impl), cast[ptr Adjustment00](vadjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initLayout*[T](result: var T; hadjustment: Adjustment; vadjustment: Adjustment) = + assert(result is Layout) + new(result, finalizeGObject) + result.impl = gtk_layout_new(cast[ptr Adjustment00](hadjustment.impl), cast[ptr Adjustment00](vadjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_layout_get_bin_window*(self: ptr Layout00): ptr gdk.Window00 {. + importc: "gtk_layout_get_bin_window", libprag.} + +proc getBinWindow*(self: Layout): gdk.Window = + let gobj = gtk_layout_get_bin_window(cast[ptr Layout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc binWindow*(self: Layout): gdk.Window = + let gobj = gtk_layout_get_bin_window(cast[ptr Layout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_layout_get_hadjustment*(self: ptr Layout00): ptr Adjustment00 {. + importc: "gtk_layout_get_hadjustment", libprag.} + +proc getHadjustment*(self: Layout): Adjustment = + let gobj = gtk_layout_get_hadjustment(cast[ptr Layout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc hadjustment*(self: Layout): Adjustment = + let gobj = gtk_layout_get_hadjustment(cast[ptr Layout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_layout_get_size*(self: ptr Layout00; width: var uint32; height: var uint32) {. + importc: "gtk_layout_get_size", libprag.} + +proc getSize*(self: Layout; width: var int; height: var int) = + var height_00 = uint32(height) + var width_00 = uint32(width) + gtk_layout_get_size(cast[ptr Layout00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc size*(self: Layout; width: var int; height: var int) = + var height_00 = uint32(height) + var width_00 = uint32(width) + gtk_layout_get_size(cast[ptr Layout00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc gtk_layout_get_vadjustment*(self: ptr Layout00): ptr Adjustment00 {. + importc: "gtk_layout_get_vadjustment", libprag.} + +proc getVadjustment*(self: Layout): Adjustment = + let gobj = gtk_layout_get_vadjustment(cast[ptr Layout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc vadjustment*(self: Layout): Adjustment = + let gobj = gtk_layout_get_vadjustment(cast[ptr Layout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_layout_move*(self: ptr Layout00; childWidget: ptr Widget00; x: int32; + y: int32) {. + importc: "gtk_layout_move", libprag.} + +proc move*(self: Layout; childWidget: Widget; x: int; y: int) = + gtk_layout_move(cast[ptr Layout00](self.impl), cast[ptr Widget00](childWidget.impl), int32(x), int32(y)) + +proc gtk_layout_put*(self: ptr Layout00; childWidget: ptr Widget00; x: int32; + y: int32) {. + importc: "gtk_layout_put", libprag.} + +proc put*(self: Layout; childWidget: Widget; x: int; y: int) = + gtk_layout_put(cast[ptr Layout00](self.impl), cast[ptr Widget00](childWidget.impl), int32(x), int32(y)) + +proc gtk_layout_set_hadjustment*(self: ptr Layout00; adjustment: ptr Adjustment00) {. + importc: "gtk_layout_set_hadjustment", libprag.} + +proc setHadjustment*(self: Layout; adjustment: Adjustment) = + gtk_layout_set_hadjustment(cast[ptr Layout00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `hadjustment=`*(self: Layout; adjustment: Adjustment) = + gtk_layout_set_hadjustment(cast[ptr Layout00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_layout_set_size*(self: ptr Layout00; width: uint32; height: uint32) {. + importc: "gtk_layout_set_size", libprag.} + +proc setSize*(self: Layout; width: int; height: int) = + gtk_layout_set_size(cast[ptr Layout00](self.impl), uint32(width), uint32(height)) + +proc gtk_layout_set_vadjustment*(self: ptr Layout00; adjustment: ptr Adjustment00) {. + importc: "gtk_layout_set_vadjustment", libprag.} + +proc setVadjustment*(self: Layout; adjustment: Adjustment) = + gtk_layout_set_vadjustment(cast[ptr Layout00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `vadjustment=`*(self: Layout; adjustment: Adjustment) = + gtk_layout_set_vadjustment(cast[ptr Layout00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +type + LayoutClass00* {.pure.} = object + parentClass*: ContainerClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + LayoutClass* = ref object + impl*: ptr LayoutClass00 + +type + LevelBarPrivate00* {.pure.} = object + LevelBarPrivate* = ref object + impl*: ptr LevelBarPrivate00 + +type + LevelBar* = ref object of Widget + LevelBar00* = object of Widget00 + priv2: ptr LevelBarPrivate00 + +proc scOffsetChanged*(self: LevelBar; p: proc (self: ptr gobject.Object00; name: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "offset-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_level_bar_new*(): ptr LevelBar00 {. + importc: "gtk_level_bar_new", libprag.} + +proc newLevelBar*(): LevelBar = + new(result, finalizeGObject) + result.impl = gtk_level_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initLevelBar*[T](result: var T) = + assert(result is LevelBar) + new(result, finalizeGObject) + result.impl = gtk_level_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_level_bar_new_for_interval*(minValue: cdouble; maxValue: cdouble): ptr LevelBar00 {. + importc: "gtk_level_bar_new_for_interval", libprag.} + +proc newLevelBarForInterval*(minValue: cdouble; maxValue: cdouble): LevelBar = + new(result, finalizeGObject) + result.impl = gtk_level_bar_new_for_interval(minValue, maxValue) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initLevelBarForInterval*[T](result: var T; minValue: cdouble; maxValue: cdouble) = + assert(result is LevelBar) + new(result, finalizeGObject) + result.impl = gtk_level_bar_new_for_interval(minValue, maxValue) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_level_bar_add_offset_value*(self: ptr LevelBar00; name: cstring; value: cdouble) {. + importc: "gtk_level_bar_add_offset_value", libprag.} + +proc addOffsetValue*(self: LevelBar; name: string; value: cdouble) = + gtk_level_bar_add_offset_value(cast[ptr LevelBar00](self.impl), cstring(name), value) + +proc gtk_level_bar_get_inverted*(self: ptr LevelBar00): gboolean {. + importc: "gtk_level_bar_get_inverted", libprag.} + +proc getInverted*(self: LevelBar): bool = + toBool(gtk_level_bar_get_inverted(cast[ptr LevelBar00](self.impl))) + +proc inverted*(self: LevelBar): bool = + toBool(gtk_level_bar_get_inverted(cast[ptr LevelBar00](self.impl))) + +proc gtk_level_bar_get_max_value*(self: ptr LevelBar00): cdouble {. + importc: "gtk_level_bar_get_max_value", libprag.} + +proc getMaxValue*(self: LevelBar): cdouble = + gtk_level_bar_get_max_value(cast[ptr LevelBar00](self.impl)) + +proc maxValue*(self: LevelBar): cdouble = + gtk_level_bar_get_max_value(cast[ptr LevelBar00](self.impl)) + +proc gtk_level_bar_get_min_value*(self: ptr LevelBar00): cdouble {. + importc: "gtk_level_bar_get_min_value", libprag.} + +proc getMinValue*(self: LevelBar): cdouble = + gtk_level_bar_get_min_value(cast[ptr LevelBar00](self.impl)) + +proc minValue*(self: LevelBar): cdouble = + gtk_level_bar_get_min_value(cast[ptr LevelBar00](self.impl)) + +proc gtk_level_bar_get_offset_value*(self: ptr LevelBar00; name: cstring; value: var cdouble): gboolean {. + importc: "gtk_level_bar_get_offset_value", libprag.} + +proc getOffsetValue*(self: LevelBar; name: string; value: var cdouble): bool = + toBool(gtk_level_bar_get_offset_value(cast[ptr LevelBar00](self.impl), cstring(name), value)) + +proc offsetValue*(self: LevelBar; name: string; value: var cdouble): bool = + toBool(gtk_level_bar_get_offset_value(cast[ptr LevelBar00](self.impl), cstring(name), value)) + +proc gtk_level_bar_get_value*(self: ptr LevelBar00): cdouble {. + importc: "gtk_level_bar_get_value", libprag.} + +proc getValue*(self: LevelBar): cdouble = + gtk_level_bar_get_value(cast[ptr LevelBar00](self.impl)) + +proc value*(self: LevelBar): cdouble = + gtk_level_bar_get_value(cast[ptr LevelBar00](self.impl)) + +proc gtk_level_bar_remove_offset_value*(self: ptr LevelBar00; name: cstring) {. + importc: "gtk_level_bar_remove_offset_value", libprag.} + +proc removeOffsetValue*(self: LevelBar; name: string) = + gtk_level_bar_remove_offset_value(cast[ptr LevelBar00](self.impl), cstring(name)) + +proc gtk_level_bar_set_inverted*(self: ptr LevelBar00; inverted: gboolean) {. + importc: "gtk_level_bar_set_inverted", libprag.} + +proc setInverted*(self: LevelBar; inverted: bool) = + gtk_level_bar_set_inverted(cast[ptr LevelBar00](self.impl), gboolean(inverted)) + +proc `inverted=`*(self: LevelBar; inverted: bool) = + gtk_level_bar_set_inverted(cast[ptr LevelBar00](self.impl), gboolean(inverted)) + +proc gtk_level_bar_set_max_value*(self: ptr LevelBar00; value: cdouble) {. + importc: "gtk_level_bar_set_max_value", libprag.} + +proc setMaxValue*(self: LevelBar; value: cdouble) = + gtk_level_bar_set_max_value(cast[ptr LevelBar00](self.impl), value) + +proc `maxValue=`*(self: LevelBar; value: cdouble) = + gtk_level_bar_set_max_value(cast[ptr LevelBar00](self.impl), value) + +proc gtk_level_bar_set_min_value*(self: ptr LevelBar00; value: cdouble) {. + importc: "gtk_level_bar_set_min_value", libprag.} + +proc setMinValue*(self: LevelBar; value: cdouble) = + gtk_level_bar_set_min_value(cast[ptr LevelBar00](self.impl), value) + +proc `minValue=`*(self: LevelBar; value: cdouble) = + gtk_level_bar_set_min_value(cast[ptr LevelBar00](self.impl), value) + +proc gtk_level_bar_set_value*(self: ptr LevelBar00; value: cdouble) {. + importc: "gtk_level_bar_set_value", libprag.} + +proc setValue*(self: LevelBar; value: cdouble) = + gtk_level_bar_set_value(cast[ptr LevelBar00](self.impl), value) + +proc `value=`*(self: LevelBar; value: cdouble) = + gtk_level_bar_set_value(cast[ptr LevelBar00](self.impl), value) + +type + LevelBarMode* {.size: sizeof(cint), pure.} = enum + continuous = 0 + discrete = 1 + +proc gtk_level_bar_get_mode*(self: ptr LevelBar00): LevelBarMode {. + importc: "gtk_level_bar_get_mode", libprag.} + +proc getMode*(self: LevelBar): LevelBarMode = + gtk_level_bar_get_mode(cast[ptr LevelBar00](self.impl)) + +proc mode*(self: LevelBar): LevelBarMode = + gtk_level_bar_get_mode(cast[ptr LevelBar00](self.impl)) + +proc gtk_level_bar_set_mode*(self: ptr LevelBar00; mode: LevelBarMode) {. + importc: "gtk_level_bar_set_mode", libprag.} + +proc setMode*(self: LevelBar; mode: LevelBarMode) = + gtk_level_bar_set_mode(cast[ptr LevelBar00](self.impl), mode) + +proc `mode=`*(self: LevelBar; mode: LevelBarMode) = + gtk_level_bar_set_mode(cast[ptr LevelBar00](self.impl), mode) + +type + LevelBarAccessiblePrivate00* {.pure.} = object + LevelBarAccessiblePrivate* = ref object + impl*: ptr LevelBarAccessiblePrivate00 + +type + LevelBarAccessible* = ref object of WidgetAccessible + LevelBarAccessible00* = object of WidgetAccessible00 + priv3: ptr LevelBarAccessiblePrivate00 + +type + LevelBarAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + LevelBarAccessibleClass* = ref object + impl*: ptr LevelBarAccessibleClass00 + +type + LevelBarClass00* {.pure.} = object + parentClass*: WidgetClass00 + offsetChanged*: proc(self: ptr LevelBar00; name: cstring) {.cdecl.} + padding*: array[16, pointer] + LevelBarClass* = ref object + impl*: ptr LevelBarClass00 + +type + LinkButtonPrivate00* {.pure.} = object + LinkButtonPrivate* = ref object + impl*: ptr LinkButtonPrivate00 + +type + LinkButton* = ref object of Button + LinkButton00* = object of Button00 + priv5: ptr LinkButtonPrivate00 + +proc scActivateLink*(self: LinkButton; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-link", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_link_button_new*(uri: cstring): ptr LinkButton00 {. + importc: "gtk_link_button_new", libprag.} + +proc newLinkButton*(uri: string): LinkButton = + new(result, finalizeGObject) + result.impl = gtk_link_button_new(cstring(uri)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initLinkButton*[T](result: var T; uri: string) = + assert(result is LinkButton) + new(result, finalizeGObject) + result.impl = gtk_link_button_new(cstring(uri)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_link_button_new_with_label*(uri: cstring; label: cstring): ptr LinkButton00 {. + importc: "gtk_link_button_new_with_label", libprag.} + +proc newLinkButtonWithLabel*(uri: string; label: string): LinkButton = + new(result, finalizeGObject) + result.impl = gtk_link_button_new_with_label(cstring(uri), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initLinkButtonWithLabel*[T](result: var T; uri: string; label: string) = + assert(result is LinkButton) + new(result, finalizeGObject) + result.impl = gtk_link_button_new_with_label(cstring(uri), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_link_button_get_uri*(self: ptr LinkButton00): cstring {. + importc: "gtk_link_button_get_uri", libprag.} + +proc getUri*(self: LinkButton): string = + let resul0 = gtk_link_button_get_uri(cast[ptr LinkButton00](self.impl)) + result = $resul0 + +proc uri*(self: LinkButton): string = + let resul0 = gtk_link_button_get_uri(cast[ptr LinkButton00](self.impl)) + result = $resul0 + +proc gtk_link_button_get_visited*(self: ptr LinkButton00): gboolean {. + importc: "gtk_link_button_get_visited", libprag.} + +proc getVisited*(self: LinkButton): bool = + toBool(gtk_link_button_get_visited(cast[ptr LinkButton00](self.impl))) + +proc visited*(self: LinkButton): bool = + toBool(gtk_link_button_get_visited(cast[ptr LinkButton00](self.impl))) + +proc gtk_link_button_set_uri*(self: ptr LinkButton00; uri: cstring) {. + importc: "gtk_link_button_set_uri", libprag.} + +proc setUri*(self: LinkButton; uri: string) = + gtk_link_button_set_uri(cast[ptr LinkButton00](self.impl), cstring(uri)) + +proc `uri=`*(self: LinkButton; uri: string) = + gtk_link_button_set_uri(cast[ptr LinkButton00](self.impl), cstring(uri)) + +proc gtk_link_button_set_visited*(self: ptr LinkButton00; visited: gboolean) {. + importc: "gtk_link_button_set_visited", libprag.} + +proc setVisited*(self: LinkButton; visited: bool) = + gtk_link_button_set_visited(cast[ptr LinkButton00](self.impl), gboolean(visited)) + +proc `visited=`*(self: LinkButton; visited: bool) = + gtk_link_button_set_visited(cast[ptr LinkButton00](self.impl), gboolean(visited)) + +type + LinkButtonAccessiblePrivate00* {.pure.} = object + LinkButtonAccessiblePrivate* = ref object + impl*: ptr LinkButtonAccessiblePrivate00 + +type + LinkButtonAccessible* = ref object of ButtonAccessible + LinkButtonAccessible00* = object of ButtonAccessible00 + priv5: ptr LinkButtonAccessiblePrivate00 + +type + LinkButtonAccessibleClass00* {.pure.} = object + parentClass*: ButtonAccessibleClass00 + LinkButtonAccessibleClass* = ref object + impl*: ptr LinkButtonAccessibleClass00 + +type + LinkButtonClass00* {.pure.} = object + parentClass*: ButtonClass00 + activateLink*: proc(button: ptr LinkButton00): gboolean {.cdecl.} + gtkPadding1*: pointer + gtkPadding2*: pointer + gtkPadding3*: pointer + gtkPadding4*: pointer + LinkButtonClass* = ref object + impl*: ptr LinkButtonClass00 + +type + ListBoxRow* = ref object of Bin + ListBoxRow00* = object of Bin00 + +proc scActivate*(self: ListBoxRow; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_list_box_row_new*(): ptr ListBoxRow00 {. + importc: "gtk_list_box_row_new", libprag.} + +proc newListBoxRow*(): ListBoxRow = + new(result, finalizeGObject) + result.impl = gtk_list_box_row_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initListBoxRow*[T](result: var T) = + assert(result is ListBoxRow) + new(result, finalizeGObject) + result.impl = gtk_list_box_row_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_list_box_row_changed*(self: ptr ListBoxRow00) {. + importc: "gtk_list_box_row_changed", libprag.} + +proc changed*(self: ListBoxRow) = + gtk_list_box_row_changed(cast[ptr ListBoxRow00](self.impl)) + +proc gtk_list_box_row_get_activatable*(self: ptr ListBoxRow00): gboolean {. + importc: "gtk_list_box_row_get_activatable", libprag.} + +proc getActivatable*(self: ListBoxRow): bool = + toBool(gtk_list_box_row_get_activatable(cast[ptr ListBoxRow00](self.impl))) + +proc activatable*(self: ListBoxRow): bool = + toBool(gtk_list_box_row_get_activatable(cast[ptr ListBoxRow00](self.impl))) + +proc gtk_list_box_row_get_header*(self: ptr ListBoxRow00): ptr Widget00 {. + importc: "gtk_list_box_row_get_header", libprag.} + +proc getHeader*(self: ListBoxRow): Widget = + let gobj = gtk_list_box_row_get_header(cast[ptr ListBoxRow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc header*(self: ListBoxRow): Widget = + let gobj = gtk_list_box_row_get_header(cast[ptr ListBoxRow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_list_box_row_get_index*(self: ptr ListBoxRow00): int32 {. + importc: "gtk_list_box_row_get_index", libprag.} + +proc getIndex*(self: ListBoxRow): int = + int(gtk_list_box_row_get_index(cast[ptr ListBoxRow00](self.impl))) + +proc index*(self: ListBoxRow): int = + int(gtk_list_box_row_get_index(cast[ptr ListBoxRow00](self.impl))) + +proc gtk_list_box_row_get_selectable*(self: ptr ListBoxRow00): gboolean {. + importc: "gtk_list_box_row_get_selectable", libprag.} + +proc getSelectable*(self: ListBoxRow): bool = + toBool(gtk_list_box_row_get_selectable(cast[ptr ListBoxRow00](self.impl))) + +proc selectable*(self: ListBoxRow): bool = + toBool(gtk_list_box_row_get_selectable(cast[ptr ListBoxRow00](self.impl))) + +proc gtk_list_box_row_is_selected*(self: ptr ListBoxRow00): gboolean {. + importc: "gtk_list_box_row_is_selected", libprag.} + +proc isSelected*(self: ListBoxRow): bool = + toBool(gtk_list_box_row_is_selected(cast[ptr ListBoxRow00](self.impl))) + +proc gtk_list_box_row_set_activatable*(self: ptr ListBoxRow00; activatable: gboolean) {. + importc: "gtk_list_box_row_set_activatable", libprag.} + +proc setActivatable*(self: ListBoxRow; activatable: bool) = + gtk_list_box_row_set_activatable(cast[ptr ListBoxRow00](self.impl), gboolean(activatable)) + +proc `activatable=`*(self: ListBoxRow; activatable: bool) = + gtk_list_box_row_set_activatable(cast[ptr ListBoxRow00](self.impl), gboolean(activatable)) + +proc gtk_list_box_row_set_header*(self: ptr ListBoxRow00; header: ptr Widget00) {. + importc: "gtk_list_box_row_set_header", libprag.} + +proc setHeader*(self: ListBoxRow; header: Widget) = + gtk_list_box_row_set_header(cast[ptr ListBoxRow00](self.impl), cast[ptr Widget00](header.impl)) + +proc `header=`*(self: ListBoxRow; header: Widget) = + gtk_list_box_row_set_header(cast[ptr ListBoxRow00](self.impl), cast[ptr Widget00](header.impl)) + +proc gtk_list_box_row_set_selectable*(self: ptr ListBoxRow00; selectable: gboolean) {. + importc: "gtk_list_box_row_set_selectable", libprag.} + +proc setSelectable*(self: ListBoxRow; selectable: bool) = + gtk_list_box_row_set_selectable(cast[ptr ListBoxRow00](self.impl), gboolean(selectable)) + +proc `selectable=`*(self: ListBoxRow; selectable: bool) = + gtk_list_box_row_set_selectable(cast[ptr ListBoxRow00](self.impl), gboolean(selectable)) + +type + ListBox* = ref object of Container + ListBox00* = object of Container00 + +proc scActivateCursorRow*(self: ListBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate-cursor-row", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveCursor*(self: ListBox; p: proc (self: ptr gobject.Object00; `object`: MovementStep; p0: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRowActivated*(self: ListBox; p: proc (self: ptr gobject.Object00; row: ListBoxRow00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "row-activated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRowSelected*(self: ListBox; p: proc (self: ptr gobject.Object00; row: ListBoxRow00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "row-selected", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectAll*(self: ListBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select-all", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectedRowsChanged*(self: ListBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "selected-rows-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleCursorRow*(self: ListBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-cursor-row", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUnselectAll*(self: ListBox; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "unselect-all", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_list_box_new*(): ptr ListBox00 {. + importc: "gtk_list_box_new", libprag.} + +proc newListBox*(): ListBox = + new(result, finalizeGObject) + result.impl = gtk_list_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initListBox*[T](result: var T) = + assert(result is ListBox) + new(result, finalizeGObject) + result.impl = gtk_list_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_list_box_drag_highlight_row*(self: ptr ListBox00; row: ptr ListBoxRow00) {. + importc: "gtk_list_box_drag_highlight_row", libprag.} + +proc dragHighlightRow*(self: ListBox; row: ListBoxRow) = + gtk_list_box_drag_highlight_row(cast[ptr ListBox00](self.impl), cast[ptr ListBoxRow00](row.impl)) + +proc gtk_list_box_drag_unhighlight_row*(self: ptr ListBox00) {. + importc: "gtk_list_box_drag_unhighlight_row", libprag.} + +proc dragUnhighlightRow*(self: ListBox) = + gtk_list_box_drag_unhighlight_row(cast[ptr ListBox00](self.impl)) + +proc gtk_list_box_get_activate_on_single_click*(self: ptr ListBox00): gboolean {. + importc: "gtk_list_box_get_activate_on_single_click", libprag.} + +proc getActivateOnSingleClick*(self: ListBox): bool = + toBool(gtk_list_box_get_activate_on_single_click(cast[ptr ListBox00](self.impl))) + +proc activateOnSingleClick*(self: ListBox): bool = + toBool(gtk_list_box_get_activate_on_single_click(cast[ptr ListBox00](self.impl))) + +proc gtk_list_box_get_adjustment*(self: ptr ListBox00): ptr Adjustment00 {. + importc: "gtk_list_box_get_adjustment", libprag.} + +proc getAdjustment*(self: ListBox): Adjustment = + let gobj = gtk_list_box_get_adjustment(cast[ptr ListBox00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc adjustment*(self: ListBox): Adjustment = + let gobj = gtk_list_box_get_adjustment(cast[ptr ListBox00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_list_box_get_row_at_index*(self: ptr ListBox00; index: int32): ptr ListBoxRow00 {. + importc: "gtk_list_box_get_row_at_index", libprag.} + +proc getRowAtIndex*(self: ListBox; index: int): ListBoxRow = + let gobj = gtk_list_box_get_row_at_index(cast[ptr ListBox00](self.impl), int32(index)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ListBoxRow](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rowAtIndex*(self: ListBox; index: int): ListBoxRow = + let gobj = gtk_list_box_get_row_at_index(cast[ptr ListBox00](self.impl), int32(index)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ListBoxRow](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_list_box_get_row_at_y*(self: ptr ListBox00; y: int32): ptr ListBoxRow00 {. + importc: "gtk_list_box_get_row_at_y", libprag.} + +proc getRowAtY*(self: ListBox; y: int): ListBoxRow = + let gobj = gtk_list_box_get_row_at_y(cast[ptr ListBox00](self.impl), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ListBoxRow](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rowAtY*(self: ListBox; y: int): ListBoxRow = + let gobj = gtk_list_box_get_row_at_y(cast[ptr ListBox00](self.impl), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ListBoxRow](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_list_box_get_selected_row*(self: ptr ListBox00): ptr ListBoxRow00 {. + importc: "gtk_list_box_get_selected_row", libprag.} + +proc getSelectedRow*(self: ListBox): ListBoxRow = + let gobj = gtk_list_box_get_selected_row(cast[ptr ListBox00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ListBoxRow](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc selectedRow*(self: ListBox): ListBoxRow = + let gobj = gtk_list_box_get_selected_row(cast[ptr ListBox00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ListBoxRow](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_list_box_get_selected_rows*(self: ptr ListBox00): ptr pointer {. + importc: "gtk_list_box_get_selected_rows", libprag.} + +proc getSelectedRows*(self: ListBox): ptr pointer = + gtk_list_box_get_selected_rows(cast[ptr ListBox00](self.impl)) + +proc selectedRows*(self: ListBox): ptr pointer = + gtk_list_box_get_selected_rows(cast[ptr ListBox00](self.impl)) + +proc gtk_list_box_get_selection_mode*(self: ptr ListBox00): SelectionMode {. + importc: "gtk_list_box_get_selection_mode", libprag.} + +proc getSelectionMode*(self: ListBox): SelectionMode = + gtk_list_box_get_selection_mode(cast[ptr ListBox00](self.impl)) + +proc selectionMode*(self: ListBox): SelectionMode = + gtk_list_box_get_selection_mode(cast[ptr ListBox00](self.impl)) + +proc gtk_list_box_insert*(self: ptr ListBox00; child: ptr Widget00; position: int32) {. + importc: "gtk_list_box_insert", libprag.} + +proc insert*(self: ListBox; child: Widget; position: int) = + gtk_list_box_insert(cast[ptr ListBox00](self.impl), cast[ptr Widget00](child.impl), int32(position)) + +proc gtk_list_box_invalidate_filter*(self: ptr ListBox00) {. + importc: "gtk_list_box_invalidate_filter", libprag.} + +proc invalidateFilter*(self: ListBox) = + gtk_list_box_invalidate_filter(cast[ptr ListBox00](self.impl)) + +proc gtk_list_box_invalidate_headers*(self: ptr ListBox00) {. + importc: "gtk_list_box_invalidate_headers", libprag.} + +proc invalidateHeaders*(self: ListBox) = + gtk_list_box_invalidate_headers(cast[ptr ListBox00](self.impl)) + +proc gtk_list_box_invalidate_sort*(self: ptr ListBox00) {. + importc: "gtk_list_box_invalidate_sort", libprag.} + +proc invalidateSort*(self: ListBox) = + gtk_list_box_invalidate_sort(cast[ptr ListBox00](self.impl)) + +proc gtk_list_box_prepend*(self: ptr ListBox00; child: ptr Widget00) {. + importc: "gtk_list_box_prepend", libprag.} + +proc prepend*(self: ListBox; child: Widget) = + gtk_list_box_prepend(cast[ptr ListBox00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_list_box_select_all*(self: ptr ListBox00) {. + importc: "gtk_list_box_select_all", libprag.} + +proc selectAll*(self: ListBox) = + gtk_list_box_select_all(cast[ptr ListBox00](self.impl)) + +proc gtk_list_box_select_row*(self: ptr ListBox00; row: ptr ListBoxRow00) {. + importc: "gtk_list_box_select_row", libprag.} + +proc selectRow*(self: ListBox; row: ListBoxRow) = + gtk_list_box_select_row(cast[ptr ListBox00](self.impl), cast[ptr ListBoxRow00](row.impl)) + +proc gtk_list_box_set_activate_on_single_click*(self: ptr ListBox00; single: gboolean) {. + importc: "gtk_list_box_set_activate_on_single_click", libprag.} + +proc setActivateOnSingleClick*(self: ListBox; single: bool) = + gtk_list_box_set_activate_on_single_click(cast[ptr ListBox00](self.impl), gboolean(single)) + +proc `activateOnSingleClick=`*(self: ListBox; single: bool) = + gtk_list_box_set_activate_on_single_click(cast[ptr ListBox00](self.impl), gboolean(single)) + +proc gtk_list_box_set_adjustment*(self: ptr ListBox00; adjustment: ptr Adjustment00) {. + importc: "gtk_list_box_set_adjustment", libprag.} + +proc setAdjustment*(self: ListBox; adjustment: Adjustment) = + gtk_list_box_set_adjustment(cast[ptr ListBox00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `adjustment=`*(self: ListBox; adjustment: Adjustment) = + gtk_list_box_set_adjustment(cast[ptr ListBox00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_list_box_set_placeholder*(self: ptr ListBox00; placeholder: ptr Widget00) {. + importc: "gtk_list_box_set_placeholder", libprag.} + +proc setPlaceholder*(self: ListBox; placeholder: Widget) = + gtk_list_box_set_placeholder(cast[ptr ListBox00](self.impl), cast[ptr Widget00](placeholder.impl)) + +proc `placeholder=`*(self: ListBox; placeholder: Widget) = + gtk_list_box_set_placeholder(cast[ptr ListBox00](self.impl), cast[ptr Widget00](placeholder.impl)) + +proc gtk_list_box_set_selection_mode*(self: ptr ListBox00; mode: SelectionMode) {. + importc: "gtk_list_box_set_selection_mode", libprag.} + +proc setSelectionMode*(self: ListBox; mode: SelectionMode) = + gtk_list_box_set_selection_mode(cast[ptr ListBox00](self.impl), mode) + +proc `selectionMode=`*(self: ListBox; mode: SelectionMode) = + gtk_list_box_set_selection_mode(cast[ptr ListBox00](self.impl), mode) + +proc gtk_list_box_unselect_all*(self: ptr ListBox00) {. + importc: "gtk_list_box_unselect_all", libprag.} + +proc unselectAll*(self: ListBox) = + gtk_list_box_unselect_all(cast[ptr ListBox00](self.impl)) + +proc gtk_list_box_unselect_row*(self: ptr ListBox00; row: ptr ListBoxRow00) {. + importc: "gtk_list_box_unselect_row", libprag.} + +proc unselectRow*(self: ListBox; row: ListBoxRow) = + gtk_list_box_unselect_row(cast[ptr ListBox00](self.impl), cast[ptr ListBoxRow00](row.impl)) + +type + ListBoxAccessiblePrivate00* {.pure.} = object + ListBoxAccessiblePrivate* = ref object + impl*: ptr ListBoxAccessiblePrivate00 + +type + ListBoxAccessible* = ref object of ContainerAccessible + ListBoxAccessible00* = object of ContainerAccessible00 + priv4: ptr ListBoxAccessiblePrivate00 + +type + ListBoxAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + ListBoxAccessibleClass* = ref object + impl*: ptr ListBoxAccessibleClass00 + +type + ListBoxClass00* {.pure.} = object + parentClass*: ContainerClass00 + rowSelected*: proc(box: ptr ListBox00; row: ptr ListBoxRow00) {.cdecl.} + rowActivated*: proc(box: ptr ListBox00; row: ptr ListBoxRow00) {.cdecl.} + activateCursorRow*: proc(box: ptr ListBox00) {.cdecl.} + toggleCursorRow*: proc(box: ptr ListBox00) {.cdecl.} + moveCursor*: proc(box: ptr ListBox00; step: MovementStep; count: int32) {.cdecl.} + selectedRowsChanged*: proc(box: ptr ListBox00) {.cdecl.} + selectAll*: proc(box: ptr ListBox00) {.cdecl.} + unselectAll*: proc(box: ptr ListBox00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + ListBoxClass* = ref object + impl*: ptr ListBoxClass00 + +type + ListBoxCreateWidgetFunc* = proc (item: ptr gobject.Object00; userData: pointer): ptr Widget00 {.cdecl.} + +proc gtk_list_box_bind_model*(self: ptr ListBox00; model: ptr gio.ListModel00; createWidgetFunc: ListBoxCreateWidgetFunc; + userData: pointer; userDataFreeFunc: DestroyNotify) {. + importc: "gtk_list_box_bind_model", libprag.} + +proc bindModel*(self: ListBox; model: gio.ListModel; createWidgetFunc: ListBoxCreateWidgetFunc; + userData: pointer; userDataFreeFunc: DestroyNotify) = + gtk_list_box_bind_model(cast[ptr ListBox00](self.impl), cast[ptr gio.ListModel00](model.impl), createWidgetFunc, userData, userDataFreeFunc) + +type + ListBoxFilterFunc* = proc (row: ptr ListBoxRow00; userData: pointer): gboolean {.cdecl.} + +proc gtk_list_box_set_filter_func*(self: ptr ListBox00; filterFunc: ListBoxFilterFunc; + userData: pointer; destroy: DestroyNotify) {. + importc: "gtk_list_box_set_filter_func", libprag.} + +proc setFilterFunc*(self: ListBox; filterFunc: ListBoxFilterFunc; userData: pointer; + destroy: DestroyNotify) = + gtk_list_box_set_filter_func(cast[ptr ListBox00](self.impl), filterFunc, userData, destroy) + +type + ListBoxForeachFunc* = proc (box: ptr ListBox00; row: ptr ListBoxRow00; userData: pointer) {.cdecl.} + +proc gtk_list_box_selected_foreach*(self: ptr ListBox00; `func`: ListBoxForeachFunc; data: pointer) {. + importc: "gtk_list_box_selected_foreach", libprag.} + +proc selectedForeach*(self: ListBox; `func`: ListBoxForeachFunc; data: pointer) = + gtk_list_box_selected_foreach(cast[ptr ListBox00](self.impl), `func`, data) + +type + ListBoxRowAccessible* = ref object of ContainerAccessible + ListBoxRowAccessible00* = object of ContainerAccessible00 + +type + ListBoxRowAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + ListBoxRowAccessibleClass* = ref object + impl*: ptr ListBoxRowAccessibleClass00 + +type + ListBoxRowClass00* {.pure.} = object + parentClass*: BinClass00 + activate*: proc(row: ptr ListBoxRow00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + ListBoxRowClass* = ref object + impl*: ptr ListBoxRowClass00 + +type + ListBoxSortFunc* = proc (row1: ptr ListBoxRow00; row2: ptr ListBoxRow00; userData: pointer): int32 {.cdecl.} + +proc gtk_list_box_set_sort_func*(self: ptr ListBox00; sortFunc: ListBoxSortFunc; userData: pointer; + destroy: DestroyNotify) {. + importc: "gtk_list_box_set_sort_func", libprag.} + +proc setSortFunc*(self: ListBox; sortFunc: ListBoxSortFunc; userData: pointer; + destroy: DestroyNotify) = + gtk_list_box_set_sort_func(cast[ptr ListBox00](self.impl), sortFunc, userData, destroy) + +type + ListBoxUpdateHeaderFunc* = proc (row: ptr ListBoxRow00; before: ptr ListBoxRow00; userData: pointer) {.cdecl.} + +proc gtk_list_box_set_header_func*(self: ptr ListBox00; updateHeader: ListBoxUpdateHeaderFunc; + userData: pointer; destroy: DestroyNotify) {. + importc: "gtk_list_box_set_header_func", libprag.} + +proc setHeaderFunc*(self: ListBox; updateHeader: ListBoxUpdateHeaderFunc; + userData: pointer; destroy: DestroyNotify) = + gtk_list_box_set_header_func(cast[ptr ListBox00](self.impl), updateHeader, userData, destroy) + +type + ListStorePrivate00* {.pure.} = object + ListStorePrivate* = ref object + impl*: ptr ListStorePrivate00 + +type + ListStore* = ref object of gobject.Object + ListStore00* = object of gobject.Object00 + priv1: ptr ListStorePrivate00 + +proc gtk_list_store_newv*(nColumns: int32; types: GTypeArray): ptr ListStore00 {. + importc: "gtk_list_store_newv", libprag.} + +proc newListStore*(nColumns: int; types: GTypeArray): ListStore = + new(result, finalizeGObject) + result.impl = gtk_list_store_newv(int32(nColumns), types) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initListStore*[T](result: var T; nColumns: int; types: GTypeArray) = + assert(result is ListStore) + new(result, finalizeGObject) + result.impl = gtk_list_store_newv(int32(nColumns), types) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_list_store_append*(self: ptr ListStore00; iter: var TreeIter00) {. + importc: "gtk_list_store_append", libprag.} + +proc append*(self: ptr ListStore00; iter: var TreeIter00) {. + importc: "gtk_list_store_append", libprag.} + +proc gtk_list_store_clear*(self: ptr ListStore00) {. + importc: "gtk_list_store_clear", libprag.} + +proc clear*(self: ListStore) = + gtk_list_store_clear(cast[ptr ListStore00](self.impl)) + +proc gtk_list_store_insert*(self: ptr ListStore00; iter: var TreeIter00; position: int32) {. + importc: "gtk_list_store_insert", libprag.} + +proc insert*(self: ptr ListStore00; iter: var TreeIter00; position: int32) {. + importc: "gtk_list_store_insert", libprag.} + +proc gtk_list_store_insert_after*(self: ptr ListStore00; iter: var TreeIter00; sibling: ptr TreeIter00) {. + importc: "gtk_list_store_insert_after", libprag.} + +proc insertAfter*(self: ptr ListStore00; iter: var TreeIter00; sibling: ptr TreeIter00) {. + importc: "gtk_list_store_insert_after", libprag.} + +proc gtk_list_store_insert_before*(self: ptr ListStore00; iter: var TreeIter00; sibling: ptr TreeIter00) {. + importc: "gtk_list_store_insert_before", libprag.} + +proc insertBefore*(self: ptr ListStore00; iter: var TreeIter00; sibling: ptr TreeIter00) {. + importc: "gtk_list_store_insert_before", libprag.} + +proc gtk_list_store_insert_with_valuesv*(self: ptr ListStore00; iter: var TreeIter00; position: int32; + columns: int32Array; values: gobject.Value00Array; nValues: int32) {. + importc: "gtk_list_store_insert_with_valuesv", libprag.} + +proc insertWithValuesv*(self: ptr ListStore00; iter: var TreeIter00; position: int32; + columns: int32Array; values: gobject.Value00Array; nValues: int32) {. + importc: "gtk_list_store_insert_with_valuesv", libprag.} + +proc gtk_list_store_iter_is_valid*(self: ptr ListStore00; iter: ptr TreeIter00): gboolean {. + importc: "gtk_list_store_iter_is_valid", libprag.} + +proc iterIsValid*(self: ListStore; iter: TreeIter): bool = + toBool(gtk_list_store_iter_is_valid(cast[ptr ListStore00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_list_store_move_after*(self: ptr ListStore00; iter: ptr TreeIter00; position: ptr TreeIter00) {. + importc: "gtk_list_store_move_after", libprag.} + +proc moveAfter*(self: ListStore; iter: TreeIter; position: TreeIter) = + gtk_list_store_move_after(cast[ptr ListStore00](self.impl), cast[ptr TreeIter00](iter.impl), cast[ptr TreeIter00](position.impl)) + +proc gtk_list_store_move_before*(self: ptr ListStore00; iter: ptr TreeIter00; position: ptr TreeIter00) {. + importc: "gtk_list_store_move_before", libprag.} + +proc moveBefore*(self: ListStore; iter: TreeIter; position: TreeIter) = + gtk_list_store_move_before(cast[ptr ListStore00](self.impl), cast[ptr TreeIter00](iter.impl), cast[ptr TreeIter00](position.impl)) + +proc gtk_list_store_prepend*(self: ptr ListStore00; iter: var TreeIter00) {. + importc: "gtk_list_store_prepend", libprag.} + +proc prepend*(self: ptr ListStore00; iter: var TreeIter00) {. + importc: "gtk_list_store_prepend", libprag.} + +proc gtk_list_store_remove*(self: ptr ListStore00; iter: ptr TreeIter00): gboolean {. + importc: "gtk_list_store_remove", libprag.} + +proc remove*(self: ListStore; iter: TreeIter): bool = + toBool(gtk_list_store_remove(cast[ptr ListStore00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_list_store_reorder*(self: ptr ListStore00; newOrder: int32Array) {. + importc: "gtk_list_store_reorder", libprag.} + +proc reorder*(self: ListStore; newOrder: int32Array) = + gtk_list_store_reorder(cast[ptr ListStore00](self.impl), newOrder) + +proc gtk_list_store_set_column_types*(self: ptr ListStore00; nColumns: int32; types: GTypeArray) {. + importc: "gtk_list_store_set_column_types", libprag.} + +proc setColumnTypes*(self: ListStore; nColumns: int; types: GTypeArray) = + gtk_list_store_set_column_types(cast[ptr ListStore00](self.impl), int32(nColumns), types) + +proc gtk_list_store_set_value*(self: ptr ListStore00; iter: ptr TreeIter00; column: int32; + value: ptr gobject.Value00) {. + importc: "gtk_list_store_set_value", libprag.} + +proc setValue*(self: ListStore; iter: TreeIter; column: int; value: gobject.Value) = + gtk_list_store_set_value(cast[ptr ListStore00](self.impl), cast[ptr TreeIter00](iter.impl), int32(column), cast[ptr gobject.Value00](value.impl)) + +proc gtk_list_store_set_valuesv*(self: ptr ListStore00; iter: ptr TreeIter00; columns: int32Array; + values: gobject.Value00Array; nValues: int32) {. + importc: "gtk_list_store_set_valuesv", libprag.} + +proc set*(self: ListStore; iter: TreeIter; columns: int32Array; + values: gobject.Value00Array; nValues: int) = + gtk_list_store_set_valuesv(cast[ptr ListStore00](self.impl), cast[ptr TreeIter00](iter.impl), columns, values, int32(nValues)) + +proc gtk_list_store_swap*(self: ptr ListStore00; a: ptr TreeIter00; b: ptr TreeIter00) {. + importc: "gtk_list_store_swap", libprag.} + +proc swap*(self: ListStore; a: TreeIter; b: TreeIter) = + gtk_list_store_swap(cast[ptr ListStore00](self.impl), cast[ptr TreeIter00](a.impl), cast[ptr TreeIter00](b.impl)) + +type + ListStoreClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ListStoreClass* = ref object + impl*: ptr ListStoreClass00 + +type + LockButtonPrivate00* {.pure.} = object + LockButtonPrivate* = ref object + impl*: ptr LockButtonPrivate00 + +type + LockButton* = ref object of Button + LockButton00* = object of Button00 + priv5: ptr LockButtonPrivate00 + +proc gtk_lock_button_new*(permission: ptr gio.Permission00): ptr LockButton00 {. + importc: "gtk_lock_button_new", libprag.} + +proc newLockButton*(permission: gio.Permission): LockButton = + new(result, finalizeGObject) + result.impl = gtk_lock_button_new(cast[ptr gio.Permission00](permission.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initLockButton*[T](result: var T; permission: gio.Permission) = + assert(result is LockButton) + new(result, finalizeGObject) + result.impl = gtk_lock_button_new(cast[ptr gio.Permission00](permission.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_lock_button_get_permission*(self: ptr LockButton00): ptr gio.Permission00 {. + importc: "gtk_lock_button_get_permission", libprag.} + +proc getPermission*(self: LockButton): gio.Permission = + let gobj = gtk_lock_button_get_permission(cast[ptr LockButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.Permission](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc permission*(self: LockButton): gio.Permission = + let gobj = gtk_lock_button_get_permission(cast[ptr LockButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.Permission](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_lock_button_set_permission*(self: ptr LockButton00; permission: ptr gio.Permission00) {. + importc: "gtk_lock_button_set_permission", libprag.} + +proc setPermission*(self: LockButton; permission: gio.Permission) = + gtk_lock_button_set_permission(cast[ptr LockButton00](self.impl), cast[ptr gio.Permission00](permission.impl)) + +proc `permission=`*(self: LockButton; permission: gio.Permission) = + gtk_lock_button_set_permission(cast[ptr LockButton00](self.impl), cast[ptr gio.Permission00](permission.impl)) + +type + LockButtonAccessiblePrivate00* {.pure.} = object + LockButtonAccessiblePrivate* = ref object + impl*: ptr LockButtonAccessiblePrivate00 + +type + LockButtonAccessible* = ref object of ButtonAccessible + LockButtonAccessible00* = object of ButtonAccessible00 + priv5: ptr LockButtonAccessiblePrivate00 + +type + LockButtonAccessibleClass00* {.pure.} = object + parentClass*: ButtonAccessibleClass00 + LockButtonAccessibleClass* = ref object + impl*: ptr LockButtonAccessibleClass00 + +type + LockButtonClass00* {.pure.} = object + parentClass*: ButtonClass00 + reserved0*: proc() {.cdecl.} + reserved1*: proc() {.cdecl.} + reserved2*: proc() {.cdecl.} + reserved3*: proc() {.cdecl.} + reserved4*: proc() {.cdecl.} + reserved5*: proc() {.cdecl.} + reserved6*: proc() {.cdecl.} + reserved7*: proc() {.cdecl.} + LockButtonClass* = ref object + impl*: ptr LockButtonClass00 + +const MAJOR_VERSION* = 3'i32 + +const MAX_COMPOSE_LEN* = 7'i32 + +const MICRO_VERSION* = 15'i32 + +const MINOR_VERSION* = 22'i32 + +type + MenuShellAccessiblePrivate00* {.pure.} = object + MenuShellAccessiblePrivate* = ref object + impl*: ptr MenuShellAccessiblePrivate00 + +type + MenuShellAccessible* = ref object of ContainerAccessible + MenuShellAccessible00* = object of ContainerAccessible00 + priv4: ptr MenuShellAccessiblePrivate00 + +type + MenuAccessiblePrivate00* {.pure.} = object + MenuAccessiblePrivate* = ref object + impl*: ptr MenuAccessiblePrivate00 + +type + MenuAccessible* = ref object of MenuShellAccessible + MenuAccessible00* = object of MenuShellAccessible00 + priv5: ptr MenuAccessiblePrivate00 + +type + MenuShellAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + MenuShellAccessibleClass* = ref object + impl*: ptr MenuShellAccessibleClass00 + +type + MenuAccessibleClass00* {.pure.} = object + parentClass*: MenuShellAccessibleClass00 + MenuAccessibleClass* = ref object + impl*: ptr MenuAccessibleClass00 + +type + MenuBarPrivate00* {.pure.} = object + MenuBarPrivate* = ref object + impl*: ptr MenuBarPrivate00 + +type + MenuBar* = ref object of MenuShell + MenuBar00* = object of MenuShell00 + priv4: ptr MenuBarPrivate00 + +proc gtk_menu_bar_new*(): ptr MenuBar00 {. + importc: "gtk_menu_bar_new", libprag.} + +proc newMenuBar*(): MenuBar = + new(result, finalizeGObject) + result.impl = gtk_menu_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuBar*[T](result: var T) = + assert(result is MenuBar) + new(result, finalizeGObject) + result.impl = gtk_menu_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_bar_new_from_model*(model: ptr gio.MenuModel00): ptr MenuBar00 {. + importc: "gtk_menu_bar_new_from_model", libprag.} + +proc newMenuBarFromModel*(model: gio.MenuModel): MenuBar = + new(result, finalizeGObject) + result.impl = gtk_menu_bar_new_from_model(cast[ptr gio.MenuModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuBarFromModel*[T](result: var T; model: gio.MenuModel) = + assert(result is MenuBar) + new(result, finalizeGObject) + result.impl = gtk_menu_bar_new_from_model(cast[ptr gio.MenuModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PackDirection* {.size: sizeof(cint), pure.} = enum + ltr = 0 + rtl = 1 + ttb = 2 + btt = 3 + +proc gtk_menu_bar_get_child_pack_direction*(self: ptr MenuBar00): PackDirection {. + importc: "gtk_menu_bar_get_child_pack_direction", libprag.} + +proc getChildPackDirection*(self: MenuBar): PackDirection = + gtk_menu_bar_get_child_pack_direction(cast[ptr MenuBar00](self.impl)) + +proc childPackDirection*(self: MenuBar): PackDirection = + gtk_menu_bar_get_child_pack_direction(cast[ptr MenuBar00](self.impl)) + +proc gtk_menu_bar_get_pack_direction*(self: ptr MenuBar00): PackDirection {. + importc: "gtk_menu_bar_get_pack_direction", libprag.} + +proc getPackDirection*(self: MenuBar): PackDirection = + gtk_menu_bar_get_pack_direction(cast[ptr MenuBar00](self.impl)) + +proc packDirection*(self: MenuBar): PackDirection = + gtk_menu_bar_get_pack_direction(cast[ptr MenuBar00](self.impl)) + +proc gtk_menu_bar_set_child_pack_direction*(self: ptr MenuBar00; childPackDir: PackDirection) {. + importc: "gtk_menu_bar_set_child_pack_direction", libprag.} + +proc setChildPackDirection*(self: MenuBar; childPackDir: PackDirection) = + gtk_menu_bar_set_child_pack_direction(cast[ptr MenuBar00](self.impl), childPackDir) + +proc `childPackDirection=`*(self: MenuBar; childPackDir: PackDirection) = + gtk_menu_bar_set_child_pack_direction(cast[ptr MenuBar00](self.impl), childPackDir) + +proc gtk_menu_bar_set_pack_direction*(self: ptr MenuBar00; packDir: PackDirection) {. + importc: "gtk_menu_bar_set_pack_direction", libprag.} + +proc setPackDirection*(self: MenuBar; packDir: PackDirection) = + gtk_menu_bar_set_pack_direction(cast[ptr MenuBar00](self.impl), packDir) + +proc `packDirection=`*(self: MenuBar; packDir: PackDirection) = + gtk_menu_bar_set_pack_direction(cast[ptr MenuBar00](self.impl), packDir) + +type + MenuShellClass00* {.pure.} = object + parentClass*: ContainerClass00 + submenuPlacement*: uint32 + deactivate*: proc(menuShell: ptr MenuShell00) {.cdecl.} + selectionDone*: proc(menuShell: ptr MenuShell00) {.cdecl.} + moveCurrent*: proc(menuShell: ptr MenuShell00; direction: MenuDirectionType) {.cdecl.} + activateCurrent*: proc(menuShell: ptr MenuShell00; forceHide: gboolean) {.cdecl.} + cancel*: proc(menuShell: ptr MenuShell00) {.cdecl.} + selectItem*: proc(menuShell: ptr MenuShell00; menuItem: ptr Widget00) {.cdecl.} + insert*: proc(menuShell: ptr MenuShell00; child: ptr Widget00; position: int32) {.cdecl.} + getPopupDelay*: proc(menuShell: ptr MenuShell00): int32 {.cdecl.} + moveSelected*: proc(menuShell: ptr MenuShell00; distance: int32): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + MenuShellClass* = ref object + impl*: ptr MenuShellClass00 + +type + MenuBarClass00* {.pure.} = object + parentClass*: MenuShellClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + MenuBarClass* = ref object + impl*: ptr MenuBarClass00 + +type + MenuButtonPrivate00* {.pure.} = object + MenuButtonPrivate* = ref object + impl*: ptr MenuButtonPrivate00 + +type + MenuButton* = ref object of ToggleButton + MenuButton00* = object of ToggleButton00 + priv6: ptr MenuButtonPrivate00 + +proc gtk_menu_button_new*(): ptr MenuButton00 {. + importc: "gtk_menu_button_new", libprag.} + +proc newMenuButton*(): MenuButton = + new(result, finalizeGObject) + result.impl = gtk_menu_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuButton*[T](result: var T) = + assert(result is MenuButton) + new(result, finalizeGObject) + result.impl = gtk_menu_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_button_get_align_widget*(self: ptr MenuButton00): ptr Widget00 {. + importc: "gtk_menu_button_get_align_widget", libprag.} + +proc getAlignWidget*(self: MenuButton): Widget = + let gobj = gtk_menu_button_get_align_widget(cast[ptr MenuButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc alignWidget*(self: MenuButton): Widget = + let gobj = gtk_menu_button_get_align_widget(cast[ptr MenuButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_button_get_direction*(self: ptr MenuButton00): ArrowType {. + importc: "gtk_menu_button_get_direction", libprag.} + +proc getDirection*(self: MenuButton): ArrowType = + gtk_menu_button_get_direction(cast[ptr MenuButton00](self.impl)) + +proc direction*(self: MenuButton): ArrowType = + gtk_menu_button_get_direction(cast[ptr MenuButton00](self.impl)) + +proc gtk_menu_button_get_menu_model*(self: ptr MenuButton00): ptr gio.MenuModel00 {. + importc: "gtk_menu_button_get_menu_model", libprag.} + +proc getMenuModel*(self: MenuButton): gio.MenuModel = + let gobj = gtk_menu_button_get_menu_model(cast[ptr MenuButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc menuModel*(self: MenuButton): gio.MenuModel = + let gobj = gtk_menu_button_get_menu_model(cast[ptr MenuButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gio.MenuModel](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_button_get_popup*(self: ptr MenuButton00): ptr Menu00 {. + importc: "gtk_menu_button_get_popup", libprag.} + +proc getPopup*(self: MenuButton): Menu = + let gobj = gtk_menu_button_get_popup(cast[ptr MenuButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Menu](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc popup*(self: MenuButton): Menu = + let gobj = gtk_menu_button_get_popup(cast[ptr MenuButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Menu](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_button_get_use_popover*(self: ptr MenuButton00): gboolean {. + importc: "gtk_menu_button_get_use_popover", libprag.} + +proc getUsePopover*(self: MenuButton): bool = + toBool(gtk_menu_button_get_use_popover(cast[ptr MenuButton00](self.impl))) + +proc usePopover*(self: MenuButton): bool = + toBool(gtk_menu_button_get_use_popover(cast[ptr MenuButton00](self.impl))) + +proc gtk_menu_button_set_align_widget*(self: ptr MenuButton00; alignWidget: ptr Widget00) {. + importc: "gtk_menu_button_set_align_widget", libprag.} + +proc setAlignWidget*(self: MenuButton; alignWidget: Widget) = + gtk_menu_button_set_align_widget(cast[ptr MenuButton00](self.impl), cast[ptr Widget00](alignWidget.impl)) + +proc `alignWidget=`*(self: MenuButton; alignWidget: Widget) = + gtk_menu_button_set_align_widget(cast[ptr MenuButton00](self.impl), cast[ptr Widget00](alignWidget.impl)) + +proc gtk_menu_button_set_direction*(self: ptr MenuButton00; direction: ArrowType) {. + importc: "gtk_menu_button_set_direction", libprag.} + +proc setDirection*(self: MenuButton; direction: ArrowType) = + gtk_menu_button_set_direction(cast[ptr MenuButton00](self.impl), direction) + +proc `direction=`*(self: MenuButton; direction: ArrowType) = + gtk_menu_button_set_direction(cast[ptr MenuButton00](self.impl), direction) + +proc gtk_menu_button_set_menu_model*(self: ptr MenuButton00; menuModel: ptr gio.MenuModel00) {. + importc: "gtk_menu_button_set_menu_model", libprag.} + +proc setMenuModel*(self: MenuButton; menuModel: gio.MenuModel) = + gtk_menu_button_set_menu_model(cast[ptr MenuButton00](self.impl), cast[ptr gio.MenuModel00](menuModel.impl)) + +proc `menuModel=`*(self: MenuButton; menuModel: gio.MenuModel) = + gtk_menu_button_set_menu_model(cast[ptr MenuButton00](self.impl), cast[ptr gio.MenuModel00](menuModel.impl)) + +proc gtk_menu_button_set_popover*(self: ptr MenuButton00; popover: ptr Widget00) {. + importc: "gtk_menu_button_set_popover", libprag.} + +proc setPopover*(self: MenuButton; popover: Widget) = + gtk_menu_button_set_popover(cast[ptr MenuButton00](self.impl), cast[ptr Widget00](popover.impl)) + +proc `popover=`*(self: MenuButton; popover: Widget) = + gtk_menu_button_set_popover(cast[ptr MenuButton00](self.impl), cast[ptr Widget00](popover.impl)) + +proc gtk_menu_button_set_popup*(self: ptr MenuButton00; menu: ptr Widget00) {. + importc: "gtk_menu_button_set_popup", libprag.} + +proc setPopup*(self: MenuButton; menu: Widget) = + gtk_menu_button_set_popup(cast[ptr MenuButton00](self.impl), cast[ptr Widget00](menu.impl)) + +proc `popup=`*(self: MenuButton; menu: Widget) = + gtk_menu_button_set_popup(cast[ptr MenuButton00](self.impl), cast[ptr Widget00](menu.impl)) + +proc gtk_menu_button_set_use_popover*(self: ptr MenuButton00; usePopover: gboolean) {. + importc: "gtk_menu_button_set_use_popover", libprag.} + +proc setUsePopover*(self: MenuButton; usePopover: bool) = + gtk_menu_button_set_use_popover(cast[ptr MenuButton00](self.impl), gboolean(usePopover)) + +proc `usePopover=`*(self: MenuButton; usePopover: bool) = + gtk_menu_button_set_use_popover(cast[ptr MenuButton00](self.impl), gboolean(usePopover)) + +type + PopoverPrivate00* {.pure.} = object + PopoverPrivate* = ref object + impl*: ptr PopoverPrivate00 + +type + Popover* = ref object of Bin + Popover00* = object of Bin00 + priv4: ptr PopoverPrivate00 + +proc scClosed*(self: Popover; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "closed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_popover_new*(relativeTo: ptr Widget00): ptr Popover00 {. + importc: "gtk_popover_new", libprag.} + +proc newPopover*(relativeTo: Widget): Popover = + new(result, finalizeGObject) + result.impl = gtk_popover_new(cast[ptr Widget00](relativeTo.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPopover*[T](result: var T; relativeTo: Widget) = + assert(result is Popover) + new(result, finalizeGObject) + result.impl = gtk_popover_new(cast[ptr Widget00](relativeTo.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_popover_new_from_model*(relativeTo: ptr Widget00; model: ptr gio.MenuModel00): ptr Popover00 {. + importc: "gtk_popover_new_from_model", libprag.} + +proc newPopoverFromModel*(relativeTo: Widget; model: gio.MenuModel): Popover = + new(result, finalizeGObject) + result.impl = gtk_popover_new_from_model(cast[ptr Widget00](relativeTo.impl), cast[ptr gio.MenuModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPopoverFromModel*[T](result: var T; relativeTo: Widget; model: gio.MenuModel) = + assert(result is Popover) + new(result, finalizeGObject) + result.impl = gtk_popover_new_from_model(cast[ptr Widget00](relativeTo.impl), cast[ptr gio.MenuModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_popover_bind_model*(self: ptr Popover00; model: ptr gio.MenuModel00; actionNamespace: cstring) {. + importc: "gtk_popover_bind_model", libprag.} + +proc bindModel*(self: Popover; model: gio.MenuModel; actionNamespace: string) = + gtk_popover_bind_model(cast[ptr Popover00](self.impl), cast[ptr gio.MenuModel00](model.impl), cstring(actionNamespace)) + +proc gtk_popover_get_default_widget*(self: ptr Popover00): ptr Widget00 {. + importc: "gtk_popover_get_default_widget", libprag.} + +proc getDefaultWidget*(self: Popover): Widget = + let gobj = gtk_popover_get_default_widget(cast[ptr Popover00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultWidget*(self: Popover): Widget = + let gobj = gtk_popover_get_default_widget(cast[ptr Popover00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_popover_get_modal*(self: ptr Popover00): gboolean {. + importc: "gtk_popover_get_modal", libprag.} + +proc getModal*(self: Popover): bool = + toBool(gtk_popover_get_modal(cast[ptr Popover00](self.impl))) + +proc modal*(self: Popover): bool = + toBool(gtk_popover_get_modal(cast[ptr Popover00](self.impl))) + +proc gtk_popover_get_pointing_to*(self: ptr Popover00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_popover_get_pointing_to", libprag.} + +proc getPointingTo*(self: ptr Popover00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_popover_get_pointing_to", libprag.} + +proc pointingTo*(self: ptr Popover00; rect: var gdk.Rectangle00): gboolean {. + importc: "gtk_popover_get_pointing_to", libprag.} + +proc gtk_popover_get_position*(self: ptr Popover00): PositionType {. + importc: "gtk_popover_get_position", libprag.} + +proc getPosition*(self: Popover): PositionType = + gtk_popover_get_position(cast[ptr Popover00](self.impl)) + +proc position*(self: Popover): PositionType = + gtk_popover_get_position(cast[ptr Popover00](self.impl)) + +proc gtk_popover_get_relative_to*(self: ptr Popover00): ptr Widget00 {. + importc: "gtk_popover_get_relative_to", libprag.} + +proc getRelativeTo*(self: Popover): Widget = + let gobj = gtk_popover_get_relative_to(cast[ptr Popover00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc relativeTo*(self: Popover): Widget = + let gobj = gtk_popover_get_relative_to(cast[ptr Popover00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_popover_get_transitions_enabled*(self: ptr Popover00): gboolean {. + importc: "gtk_popover_get_transitions_enabled", libprag.} + +proc getTransitionsEnabled*(self: Popover): bool = + toBool(gtk_popover_get_transitions_enabled(cast[ptr Popover00](self.impl))) + +proc transitionsEnabled*(self: Popover): bool = + toBool(gtk_popover_get_transitions_enabled(cast[ptr Popover00](self.impl))) + +proc gtk_popover_popdown*(self: ptr Popover00) {. + importc: "gtk_popover_popdown", libprag.} + +proc popdown*(self: Popover) = + gtk_popover_popdown(cast[ptr Popover00](self.impl)) + +proc gtk_popover_popup*(self: ptr Popover00) {. + importc: "gtk_popover_popup", libprag.} + +proc popup*(self: Popover) = + gtk_popover_popup(cast[ptr Popover00](self.impl)) + +proc gtk_popover_set_default_widget*(self: ptr Popover00; widget: ptr Widget00) {. + importc: "gtk_popover_set_default_widget", libprag.} + +proc setDefaultWidget*(self: Popover; widget: Widget) = + gtk_popover_set_default_widget(cast[ptr Popover00](self.impl), cast[ptr Widget00](widget.impl)) + +proc `defaultWidget=`*(self: Popover; widget: Widget) = + gtk_popover_set_default_widget(cast[ptr Popover00](self.impl), cast[ptr Widget00](widget.impl)) + +proc gtk_popover_set_modal*(self: ptr Popover00; modal: gboolean) {. + importc: "gtk_popover_set_modal", libprag.} + +proc setModal*(self: Popover; modal: bool) = + gtk_popover_set_modal(cast[ptr Popover00](self.impl), gboolean(modal)) + +proc `modal=`*(self: Popover; modal: bool) = + gtk_popover_set_modal(cast[ptr Popover00](self.impl), gboolean(modal)) + +proc gtk_popover_set_pointing_to*(self: ptr Popover00; rect: ptr gdk.Rectangle00) {. + importc: "gtk_popover_set_pointing_to", libprag.} + +proc setPointingTo*(self: Popover; rect: gdk.Rectangle) = + gtk_popover_set_pointing_to(cast[ptr Popover00](self.impl), cast[ptr gdk.Rectangle00](rect.impl)) + +proc `pointingTo=`*(self: Popover; rect: gdk.Rectangle) = + gtk_popover_set_pointing_to(cast[ptr Popover00](self.impl), cast[ptr gdk.Rectangle00](rect.impl)) + +proc gtk_popover_set_position*(self: ptr Popover00; position: PositionType) {. + importc: "gtk_popover_set_position", libprag.} + +proc setPosition*(self: Popover; position: PositionType) = + gtk_popover_set_position(cast[ptr Popover00](self.impl), position) + +proc `position=`*(self: Popover; position: PositionType) = + gtk_popover_set_position(cast[ptr Popover00](self.impl), position) + +proc gtk_popover_set_relative_to*(self: ptr Popover00; relativeTo: ptr Widget00) {. + importc: "gtk_popover_set_relative_to", libprag.} + +proc setRelativeTo*(self: Popover; relativeTo: Widget) = + gtk_popover_set_relative_to(cast[ptr Popover00](self.impl), cast[ptr Widget00](relativeTo.impl)) + +proc `relativeTo=`*(self: Popover; relativeTo: Widget) = + gtk_popover_set_relative_to(cast[ptr Popover00](self.impl), cast[ptr Widget00](relativeTo.impl)) + +proc gtk_popover_set_transitions_enabled*(self: ptr Popover00; transitionsEnabled: gboolean) {. + importc: "gtk_popover_set_transitions_enabled", libprag.} + +proc setTransitionsEnabled*(self: Popover; transitionsEnabled: bool) = + gtk_popover_set_transitions_enabled(cast[ptr Popover00](self.impl), gboolean(transitionsEnabled)) + +proc `transitionsEnabled=`*(self: Popover; transitionsEnabled: bool) = + gtk_popover_set_transitions_enabled(cast[ptr Popover00](self.impl), gboolean(transitionsEnabled)) + +proc gtk_menu_button_get_popover*(self: ptr MenuButton00): ptr Popover00 {. + importc: "gtk_menu_button_get_popover", libprag.} + +proc getPopover*(self: MenuButton): Popover = + let gobj = gtk_menu_button_get_popover(cast[ptr MenuButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Popover](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc popover*(self: MenuButton): Popover = + let gobj = gtk_menu_button_get_popover(cast[ptr MenuButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Popover](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PopoverConstraint* {.size: sizeof(cint), pure.} = enum + none = 0 + window = 1 + +proc gtk_popover_get_constrain_to*(self: ptr Popover00): PopoverConstraint {. + importc: "gtk_popover_get_constrain_to", libprag.} + +proc getConstrainTo*(self: Popover): PopoverConstraint = + gtk_popover_get_constrain_to(cast[ptr Popover00](self.impl)) + +proc constrainTo*(self: Popover): PopoverConstraint = + gtk_popover_get_constrain_to(cast[ptr Popover00](self.impl)) + +proc gtk_popover_set_constrain_to*(self: ptr Popover00; constraint: PopoverConstraint) {. + importc: "gtk_popover_set_constrain_to", libprag.} + +proc setConstrainTo*(self: Popover; constraint: PopoverConstraint) = + gtk_popover_set_constrain_to(cast[ptr Popover00](self.impl), constraint) + +proc `constrainTo=`*(self: Popover; constraint: PopoverConstraint) = + gtk_popover_set_constrain_to(cast[ptr Popover00](self.impl), constraint) + +type + ToggleButtonAccessiblePrivate00* {.pure.} = object + ToggleButtonAccessiblePrivate* = ref object + impl*: ptr ToggleButtonAccessiblePrivate00 + +type + ToggleButtonAccessible* = ref object of ButtonAccessible + ToggleButtonAccessible00* = object of ButtonAccessible00 + priv5: ptr ToggleButtonAccessiblePrivate00 + +type + MenuButtonAccessiblePrivate00* {.pure.} = object + MenuButtonAccessiblePrivate* = ref object + impl*: ptr MenuButtonAccessiblePrivate00 + +type + MenuButtonAccessible* = ref object of ToggleButtonAccessible + MenuButtonAccessible00* = object of ToggleButtonAccessible00 + priv6: ptr MenuButtonAccessiblePrivate00 + +type + ToggleButtonAccessibleClass00* {.pure.} = object + parentClass*: ButtonAccessibleClass00 + ToggleButtonAccessibleClass* = ref object + impl*: ptr ToggleButtonAccessibleClass00 + +type + MenuButtonAccessibleClass00* {.pure.} = object + parentClass*: ToggleButtonAccessibleClass00 + MenuButtonAccessibleClass* = ref object + impl*: ptr MenuButtonAccessibleClass00 + +type + MenuButtonClass00* {.pure.} = object + parentClass*: ToggleButtonClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + MenuButtonClass* = ref object + impl*: ptr MenuButtonClass00 + +type + MenuClass00* {.pure.} = object + parentClass*: MenuShellClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + MenuClass* = ref object + impl*: ptr MenuClass00 + +type + MenuDetachFunc* = proc (attachWidget: ptr Widget00; menu: ptr Menu00) {.cdecl.} + +proc gtk_menu_attach_to_widget*(self: ptr Menu00; attachWidget: ptr Widget00; detacher: MenuDetachFunc) {. + importc: "gtk_menu_attach_to_widget", libprag.} + +proc attachToWidget*(self: Menu; attachWidget: Widget; detacher: MenuDetachFunc) = + gtk_menu_attach_to_widget(cast[ptr Menu00](self.impl), cast[ptr Widget00](attachWidget.impl), detacher) + +type + MenuPositionFunc* = proc (menu: ptr Menu00; x: int32; y: int32; pushIn: var gboolean; + userData: pointer) {.cdecl.} + +proc gtk_menu_popup*(self: ptr Menu00; parentMenuShell: ptr Widget00; parentMenuItem: ptr Widget00; + `func`: MenuPositionFunc; data: pointer; button: uint32; activateTime: uint32) {. + importc: "gtk_menu_popup", libprag.} + +proc popup*(self: Menu; parentMenuShell: Widget; parentMenuItem: Widget; + `func`: MenuPositionFunc; data: pointer; button: int; activateTime: int) = + gtk_menu_popup(cast[ptr Menu00](self.impl), cast[ptr Widget00](parentMenuShell.impl), cast[ptr Widget00](parentMenuItem.impl), `func`, data, uint32(button), uint32(activateTime)) + +proc gtk_menu_popup_for_device*(self: ptr Menu00; device: ptr gdk.Device00; parentMenuShell: ptr Widget00; + parentMenuItem: ptr Widget00; `func`: MenuPositionFunc; data: pointer; + destroy: DestroyNotify; button: uint32; activateTime: uint32) {. + importc: "gtk_menu_popup_for_device", libprag.} + +proc popupForDevice*(self: Menu; device: gdk.Device; parentMenuShell: Widget; + parentMenuItem: Widget; `func`: MenuPositionFunc; data: pointer; destroy: DestroyNotify; + button: int; activateTime: int) = + gtk_menu_popup_for_device(cast[ptr Menu00](self.impl), cast[ptr gdk.Device00](device.impl), cast[ptr Widget00](parentMenuShell.impl), cast[ptr Widget00](parentMenuItem.impl), `func`, data, destroy, uint32(button), uint32(activateTime)) + +type + ToolItemPrivate00* {.pure.} = object + ToolItemPrivate* = ref object + impl*: ptr ToolItemPrivate00 + +type + ToolItem* = ref object of Bin + ToolItem00* = object of Bin00 + priv4: ptr ToolItemPrivate00 + +proc scCreateMenuProxy*(self: ToolItem; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "create-menu-proxy", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToolbarReconfigured*(self: ToolItem; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toolbar-reconfigured", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_tool_item_new*(): ptr ToolItem00 {. + importc: "gtk_tool_item_new", libprag.} + +proc newToolItem*(): ToolItem = + new(result, finalizeGObject) + result.impl = gtk_tool_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToolItem*[T](result: var T) = + assert(result is ToolItem) + new(result, finalizeGObject) + result.impl = gtk_tool_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_item_get_ellipsize_mode*(self: ptr ToolItem00): pango.EllipsizeMode {. + importc: "gtk_tool_item_get_ellipsize_mode", libprag.} + +proc getEllipsizeMode*(self: ToolItem): pango.EllipsizeMode = + gtk_tool_item_get_ellipsize_mode(cast[ptr ToolItem00](self.impl)) + +proc ellipsizeMode*(self: ToolItem): pango.EllipsizeMode = + gtk_tool_item_get_ellipsize_mode(cast[ptr ToolItem00](self.impl)) + +proc gtk_tool_item_get_expand*(self: ptr ToolItem00): gboolean {. + importc: "gtk_tool_item_get_expand", libprag.} + +proc getExpand*(self: ToolItem): bool = + toBool(gtk_tool_item_get_expand(cast[ptr ToolItem00](self.impl))) + +proc expand*(self: ToolItem): bool = + toBool(gtk_tool_item_get_expand(cast[ptr ToolItem00](self.impl))) + +proc gtk_tool_item_get_homogeneous*(self: ptr ToolItem00): gboolean {. + importc: "gtk_tool_item_get_homogeneous", libprag.} + +proc getHomogeneous*(self: ToolItem): bool = + toBool(gtk_tool_item_get_homogeneous(cast[ptr ToolItem00](self.impl))) + +proc homogeneous*(self: ToolItem): bool = + toBool(gtk_tool_item_get_homogeneous(cast[ptr ToolItem00](self.impl))) + +proc gtk_tool_item_get_icon_size*(self: ptr ToolItem00): int32 {. + importc: "gtk_tool_item_get_icon_size", libprag.} + +proc getIconSize*(self: ToolItem): int = + int(gtk_tool_item_get_icon_size(cast[ptr ToolItem00](self.impl))) + +proc iconSize*(self: ToolItem): int = + int(gtk_tool_item_get_icon_size(cast[ptr ToolItem00](self.impl))) + +proc gtk_tool_item_get_is_important*(self: ptr ToolItem00): gboolean {. + importc: "gtk_tool_item_get_is_important", libprag.} + +proc getIsImportant*(self: ToolItem): bool = + toBool(gtk_tool_item_get_is_important(cast[ptr ToolItem00](self.impl))) + +proc isImportant*(self: ToolItem): bool = + toBool(gtk_tool_item_get_is_important(cast[ptr ToolItem00](self.impl))) + +proc gtk_tool_item_get_orientation*(self: ptr ToolItem00): Orientation {. + importc: "gtk_tool_item_get_orientation", libprag.} + +proc getOrientation*(self: ToolItem): Orientation = + gtk_tool_item_get_orientation(cast[ptr ToolItem00](self.impl)) + +proc orientation*(self: ToolItem): Orientation = + gtk_tool_item_get_orientation(cast[ptr ToolItem00](self.impl)) + +proc gtk_tool_item_get_proxy_menu_item*(self: ptr ToolItem00; menuItemId: cstring): ptr Widget00 {. + importc: "gtk_tool_item_get_proxy_menu_item", libprag.} + +proc getProxyMenuItem*(self: ToolItem; menuItemId: string): Widget = + let gobj = gtk_tool_item_get_proxy_menu_item(cast[ptr ToolItem00](self.impl), cstring(menuItemId)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc proxyMenuItem*(self: ToolItem; menuItemId: string): Widget = + let gobj = gtk_tool_item_get_proxy_menu_item(cast[ptr ToolItem00](self.impl), cstring(menuItemId)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_item_get_relief_style*(self: ptr ToolItem00): ReliefStyle {. + importc: "gtk_tool_item_get_relief_style", libprag.} + +proc getReliefStyle*(self: ToolItem): ReliefStyle = + gtk_tool_item_get_relief_style(cast[ptr ToolItem00](self.impl)) + +proc reliefStyle*(self: ToolItem): ReliefStyle = + gtk_tool_item_get_relief_style(cast[ptr ToolItem00](self.impl)) + +proc gtk_tool_item_get_text_alignment*(self: ptr ToolItem00): cfloat {. + importc: "gtk_tool_item_get_text_alignment", libprag.} + +proc getTextAlignment*(self: ToolItem): cfloat = + gtk_tool_item_get_text_alignment(cast[ptr ToolItem00](self.impl)) + +proc textAlignment*(self: ToolItem): cfloat = + gtk_tool_item_get_text_alignment(cast[ptr ToolItem00](self.impl)) + +proc gtk_tool_item_get_text_orientation*(self: ptr ToolItem00): Orientation {. + importc: "gtk_tool_item_get_text_orientation", libprag.} + +proc getTextOrientation*(self: ToolItem): Orientation = + gtk_tool_item_get_text_orientation(cast[ptr ToolItem00](self.impl)) + +proc textOrientation*(self: ToolItem): Orientation = + gtk_tool_item_get_text_orientation(cast[ptr ToolItem00](self.impl)) + +proc gtk_tool_item_get_use_drag_window*(self: ptr ToolItem00): gboolean {. + importc: "gtk_tool_item_get_use_drag_window", libprag.} + +proc getUseDragWindow*(self: ToolItem): bool = + toBool(gtk_tool_item_get_use_drag_window(cast[ptr ToolItem00](self.impl))) + +proc useDragWindow*(self: ToolItem): bool = + toBool(gtk_tool_item_get_use_drag_window(cast[ptr ToolItem00](self.impl))) + +proc gtk_tool_item_get_visible_horizontal*(self: ptr ToolItem00): gboolean {. + importc: "gtk_tool_item_get_visible_horizontal", libprag.} + +proc getVisibleHorizontal*(self: ToolItem): bool = + toBool(gtk_tool_item_get_visible_horizontal(cast[ptr ToolItem00](self.impl))) + +proc visibleHorizontal*(self: ToolItem): bool = + toBool(gtk_tool_item_get_visible_horizontal(cast[ptr ToolItem00](self.impl))) + +proc gtk_tool_item_get_visible_vertical*(self: ptr ToolItem00): gboolean {. + importc: "gtk_tool_item_get_visible_vertical", libprag.} + +proc getVisibleVertical*(self: ToolItem): bool = + toBool(gtk_tool_item_get_visible_vertical(cast[ptr ToolItem00](self.impl))) + +proc visibleVertical*(self: ToolItem): bool = + toBool(gtk_tool_item_get_visible_vertical(cast[ptr ToolItem00](self.impl))) + +proc gtk_tool_item_rebuild_menu*(self: ptr ToolItem00) {. + importc: "gtk_tool_item_rebuild_menu", libprag.} + +proc rebuildMenu*(self: ToolItem) = + gtk_tool_item_rebuild_menu(cast[ptr ToolItem00](self.impl)) + +proc gtk_tool_item_retrieve_proxy_menu_item*(self: ptr ToolItem00): ptr Widget00 {. + importc: "gtk_tool_item_retrieve_proxy_menu_item", libprag.} + +proc retrieveProxyMenuItem*(self: ToolItem): Widget = + let gobj = gtk_tool_item_retrieve_proxy_menu_item(cast[ptr ToolItem00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_item_set_expand*(self: ptr ToolItem00; expand: gboolean) {. + importc: "gtk_tool_item_set_expand", libprag.} + +proc setExpand*(self: ToolItem; expand: bool) = + gtk_tool_item_set_expand(cast[ptr ToolItem00](self.impl), gboolean(expand)) + +proc `expand=`*(self: ToolItem; expand: bool) = + gtk_tool_item_set_expand(cast[ptr ToolItem00](self.impl), gboolean(expand)) + +proc gtk_tool_item_set_homogeneous*(self: ptr ToolItem00; homogeneous: gboolean) {. + importc: "gtk_tool_item_set_homogeneous", libprag.} + +proc setHomogeneous*(self: ToolItem; homogeneous: bool) = + gtk_tool_item_set_homogeneous(cast[ptr ToolItem00](self.impl), gboolean(homogeneous)) + +proc `homogeneous=`*(self: ToolItem; homogeneous: bool) = + gtk_tool_item_set_homogeneous(cast[ptr ToolItem00](self.impl), gboolean(homogeneous)) + +proc gtk_tool_item_set_is_important*(self: ptr ToolItem00; isImportant: gboolean) {. + importc: "gtk_tool_item_set_is_important", libprag.} + +proc setIsImportant*(self: ToolItem; isImportant: bool) = + gtk_tool_item_set_is_important(cast[ptr ToolItem00](self.impl), gboolean(isImportant)) + +proc `isImportant=`*(self: ToolItem; isImportant: bool) = + gtk_tool_item_set_is_important(cast[ptr ToolItem00](self.impl), gboolean(isImportant)) + +proc gtk_tool_item_set_proxy_menu_item*(self: ptr ToolItem00; menuItemId: cstring; menuItem: ptr Widget00) {. + importc: "gtk_tool_item_set_proxy_menu_item", libprag.} + +proc setProxyMenuItem*(self: ToolItem; menuItemId: string; menuItem: Widget) = + gtk_tool_item_set_proxy_menu_item(cast[ptr ToolItem00](self.impl), cstring(menuItemId), cast[ptr Widget00](menuItem.impl)) + +proc gtk_tool_item_set_tooltip_markup*(self: ptr ToolItem00; markup: cstring) {. + importc: "gtk_tool_item_set_tooltip_markup", libprag.} + +proc setTooltipMarkup*(self: ToolItem; markup: string) = + gtk_tool_item_set_tooltip_markup(cast[ptr ToolItem00](self.impl), cstring(markup)) + +proc `tooltipMarkup=`*(self: ToolItem; markup: string) = + gtk_tool_item_set_tooltip_markup(cast[ptr ToolItem00](self.impl), cstring(markup)) + +proc gtk_tool_item_set_tooltip_text*(self: ptr ToolItem00; text: cstring) {. + importc: "gtk_tool_item_set_tooltip_text", libprag.} + +proc setTooltipText*(self: ToolItem; text: string) = + gtk_tool_item_set_tooltip_text(cast[ptr ToolItem00](self.impl), cstring(text)) + +proc `tooltipText=`*(self: ToolItem; text: string) = + gtk_tool_item_set_tooltip_text(cast[ptr ToolItem00](self.impl), cstring(text)) + +proc gtk_tool_item_set_use_drag_window*(self: ptr ToolItem00; useDragWindow: gboolean) {. + importc: "gtk_tool_item_set_use_drag_window", libprag.} + +proc setUseDragWindow*(self: ToolItem; useDragWindow: bool) = + gtk_tool_item_set_use_drag_window(cast[ptr ToolItem00](self.impl), gboolean(useDragWindow)) + +proc `useDragWindow=`*(self: ToolItem; useDragWindow: bool) = + gtk_tool_item_set_use_drag_window(cast[ptr ToolItem00](self.impl), gboolean(useDragWindow)) + +proc gtk_tool_item_set_visible_horizontal*(self: ptr ToolItem00; visibleHorizontal: gboolean) {. + importc: "gtk_tool_item_set_visible_horizontal", libprag.} + +proc setVisibleHorizontal*(self: ToolItem; visibleHorizontal: bool) = + gtk_tool_item_set_visible_horizontal(cast[ptr ToolItem00](self.impl), gboolean(visibleHorizontal)) + +proc `visibleHorizontal=`*(self: ToolItem; visibleHorizontal: bool) = + gtk_tool_item_set_visible_horizontal(cast[ptr ToolItem00](self.impl), gboolean(visibleHorizontal)) + +proc gtk_tool_item_set_visible_vertical*(self: ptr ToolItem00; visibleVertical: gboolean) {. + importc: "gtk_tool_item_set_visible_vertical", libprag.} + +proc setVisibleVertical*(self: ToolItem; visibleVertical: bool) = + gtk_tool_item_set_visible_vertical(cast[ptr ToolItem00](self.impl), gboolean(visibleVertical)) + +proc `visibleVertical=`*(self: ToolItem; visibleVertical: bool) = + gtk_tool_item_set_visible_vertical(cast[ptr ToolItem00](self.impl), gboolean(visibleVertical)) + +proc gtk_tool_item_toolbar_reconfigured*(self: ptr ToolItem00) {. + importc: "gtk_tool_item_toolbar_reconfigured", libprag.} + +proc toolbarReconfigured*(self: ToolItem) = + gtk_tool_item_toolbar_reconfigured(cast[ptr ToolItem00](self.impl)) + +type + ToolButtonPrivate00* {.pure.} = object + ToolButtonPrivate* = ref object + impl*: ptr ToolButtonPrivate00 + +type + ToolButton* = ref object of ToolItem + ToolButton00* = object of ToolItem00 + priv5: ptr ToolButtonPrivate00 + +proc scClicked*(self: ToolButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "clicked", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_tool_button_new*(iconWidget: ptr Widget00; label: cstring): ptr ToolButton00 {. + importc: "gtk_tool_button_new", libprag.} + +proc newToolButton*(iconWidget: Widget; label: string): ToolButton = + new(result, finalizeGObject) + result.impl = gtk_tool_button_new(cast[ptr Widget00](iconWidget.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToolButton*[T](result: var T; iconWidget: Widget; label: string) = + assert(result is ToolButton) + new(result, finalizeGObject) + result.impl = gtk_tool_button_new(cast[ptr Widget00](iconWidget.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_button_new_from_stock*(stockId: cstring): ptr ToolButton00 {. + importc: "gtk_tool_button_new_from_stock", libprag.} + +proc newToolButtonFromStock*(stockId: string): ToolButton = + new(result, finalizeGObject) + result.impl = gtk_tool_button_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToolButtonFromStock*[T](result: var T; stockId: string) = + assert(result is ToolButton) + new(result, finalizeGObject) + result.impl = gtk_tool_button_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_button_get_icon_name*(self: ptr ToolButton00): cstring {. + importc: "gtk_tool_button_get_icon_name", libprag.} + +proc getIconName*(self: ToolButton): string = + let resul0 = gtk_tool_button_get_icon_name(cast[ptr ToolButton00](self.impl)) + result = $resul0 + +proc iconName*(self: ToolButton): string = + let resul0 = gtk_tool_button_get_icon_name(cast[ptr ToolButton00](self.impl)) + result = $resul0 + +proc gtk_tool_button_get_icon_widget*(self: ptr ToolButton00): ptr Widget00 {. + importc: "gtk_tool_button_get_icon_widget", libprag.} + +proc getIconWidget*(self: ToolButton): Widget = + let gobj = gtk_tool_button_get_icon_widget(cast[ptr ToolButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc iconWidget*(self: ToolButton): Widget = + let gobj = gtk_tool_button_get_icon_widget(cast[ptr ToolButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_button_get_label*(self: ptr ToolButton00): cstring {. + importc: "gtk_tool_button_get_label", libprag.} + +proc getLabel*(self: ToolButton): string = + let resul0 = gtk_tool_button_get_label(cast[ptr ToolButton00](self.impl)) + result = $resul0 + +proc label*(self: ToolButton): string = + let resul0 = gtk_tool_button_get_label(cast[ptr ToolButton00](self.impl)) + result = $resul0 + +proc gtk_tool_button_get_label_widget*(self: ptr ToolButton00): ptr Widget00 {. + importc: "gtk_tool_button_get_label_widget", libprag.} + +proc getLabelWidget*(self: ToolButton): Widget = + let gobj = gtk_tool_button_get_label_widget(cast[ptr ToolButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc labelWidget*(self: ToolButton): Widget = + let gobj = gtk_tool_button_get_label_widget(cast[ptr ToolButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_button_get_stock_id*(self: ptr ToolButton00): cstring {. + importc: "gtk_tool_button_get_stock_id", libprag.} + +proc getStockId*(self: ToolButton): string = + let resul0 = gtk_tool_button_get_stock_id(cast[ptr ToolButton00](self.impl)) + result = $resul0 + +proc stockId*(self: ToolButton): string = + let resul0 = gtk_tool_button_get_stock_id(cast[ptr ToolButton00](self.impl)) + result = $resul0 + +proc gtk_tool_button_get_use_underline*(self: ptr ToolButton00): gboolean {. + importc: "gtk_tool_button_get_use_underline", libprag.} + +proc getUseUnderline*(self: ToolButton): bool = + toBool(gtk_tool_button_get_use_underline(cast[ptr ToolButton00](self.impl))) + +proc useUnderline*(self: ToolButton): bool = + toBool(gtk_tool_button_get_use_underline(cast[ptr ToolButton00](self.impl))) + +proc gtk_tool_button_set_icon_name*(self: ptr ToolButton00; iconName: cstring) {. + importc: "gtk_tool_button_set_icon_name", libprag.} + +proc setIconName*(self: ToolButton; iconName: string) = + gtk_tool_button_set_icon_name(cast[ptr ToolButton00](self.impl), cstring(iconName)) + +proc `iconName=`*(self: ToolButton; iconName: string) = + gtk_tool_button_set_icon_name(cast[ptr ToolButton00](self.impl), cstring(iconName)) + +proc gtk_tool_button_set_icon_widget*(self: ptr ToolButton00; iconWidget: ptr Widget00) {. + importc: "gtk_tool_button_set_icon_widget", libprag.} + +proc setIconWidget*(self: ToolButton; iconWidget: Widget) = + gtk_tool_button_set_icon_widget(cast[ptr ToolButton00](self.impl), cast[ptr Widget00](iconWidget.impl)) + +proc `iconWidget=`*(self: ToolButton; iconWidget: Widget) = + gtk_tool_button_set_icon_widget(cast[ptr ToolButton00](self.impl), cast[ptr Widget00](iconWidget.impl)) + +proc gtk_tool_button_set_label*(self: ptr ToolButton00; label: cstring) {. + importc: "gtk_tool_button_set_label", libprag.} + +proc setLabel*(self: ToolButton; label: string) = + gtk_tool_button_set_label(cast[ptr ToolButton00](self.impl), cstring(label)) + +proc `label=`*(self: ToolButton; label: string) = + gtk_tool_button_set_label(cast[ptr ToolButton00](self.impl), cstring(label)) + +proc gtk_tool_button_set_label_widget*(self: ptr ToolButton00; labelWidget: ptr Widget00) {. + importc: "gtk_tool_button_set_label_widget", libprag.} + +proc setLabelWidget*(self: ToolButton; labelWidget: Widget) = + gtk_tool_button_set_label_widget(cast[ptr ToolButton00](self.impl), cast[ptr Widget00](labelWidget.impl)) + +proc `labelWidget=`*(self: ToolButton; labelWidget: Widget) = + gtk_tool_button_set_label_widget(cast[ptr ToolButton00](self.impl), cast[ptr Widget00](labelWidget.impl)) + +proc gtk_tool_button_set_stock_id*(self: ptr ToolButton00; stockId: cstring) {. + importc: "gtk_tool_button_set_stock_id", libprag.} + +proc setStockId*(self: ToolButton; stockId: string) = + gtk_tool_button_set_stock_id(cast[ptr ToolButton00](self.impl), cstring(stockId)) + +proc `stockId=`*(self: ToolButton; stockId: string) = + gtk_tool_button_set_stock_id(cast[ptr ToolButton00](self.impl), cstring(stockId)) + +proc gtk_tool_button_set_use_underline*(self: ptr ToolButton00; useUnderline: gboolean) {. + importc: "gtk_tool_button_set_use_underline", libprag.} + +proc setUseUnderline*(self: ToolButton; useUnderline: bool) = + gtk_tool_button_set_use_underline(cast[ptr ToolButton00](self.impl), gboolean(useUnderline)) + +proc `useUnderline=`*(self: ToolButton; useUnderline: bool) = + gtk_tool_button_set_use_underline(cast[ptr ToolButton00](self.impl), gboolean(useUnderline)) + +type + MenuToolButtonPrivate00* {.pure.} = object + MenuToolButtonPrivate* = ref object + impl*: ptr MenuToolButtonPrivate00 + +type + MenuToolButton* = ref object of ToolButton + MenuToolButton00* = object of ToolButton00 + priv6: ptr MenuToolButtonPrivate00 + +proc scShowMenu*(self: MenuToolButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-menu", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_menu_tool_button_new*(iconWidget: ptr Widget00; label: cstring): ptr MenuToolButton00 {. + importc: "gtk_menu_tool_button_new", libprag.} + +proc newMenuToolButton*(iconWidget: Widget; label: string): MenuToolButton = + new(result, finalizeGObject) + result.impl = gtk_menu_tool_button_new(cast[ptr Widget00](iconWidget.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuToolButton*[T](result: var T; iconWidget: Widget; label: string) = + assert(result is MenuToolButton) + new(result, finalizeGObject) + result.impl = gtk_menu_tool_button_new(cast[ptr Widget00](iconWidget.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_tool_button_new_from_stock*(stockId: cstring): ptr MenuToolButton00 {. + importc: "gtk_menu_tool_button_new_from_stock", libprag.} + +proc newMenuToolButtonFromStock*(stockId: string): MenuToolButton = + new(result, finalizeGObject) + result.impl = gtk_menu_tool_button_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMenuToolButtonFromStock*[T](result: var T; stockId: string) = + assert(result is MenuToolButton) + new(result, finalizeGObject) + result.impl = gtk_menu_tool_button_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_tool_button_get_menu*(self: ptr MenuToolButton00): ptr Widget00 {. + importc: "gtk_menu_tool_button_get_menu", libprag.} + +proc getMenu*(self: MenuToolButton): Widget = + let gobj = gtk_menu_tool_button_get_menu(cast[ptr MenuToolButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc menu*(self: MenuToolButton): Widget = + let gobj = gtk_menu_tool_button_get_menu(cast[ptr MenuToolButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_menu_tool_button_set_arrow_tooltip_markup*(self: ptr MenuToolButton00; markup: cstring) {. + importc: "gtk_menu_tool_button_set_arrow_tooltip_markup", libprag.} + +proc setArrowTooltipMarkup*(self: MenuToolButton; markup: string) = + gtk_menu_tool_button_set_arrow_tooltip_markup(cast[ptr MenuToolButton00](self.impl), cstring(markup)) + +proc `arrowTooltipMarkup=`*(self: MenuToolButton; markup: string) = + gtk_menu_tool_button_set_arrow_tooltip_markup(cast[ptr MenuToolButton00](self.impl), cstring(markup)) + +proc gtk_menu_tool_button_set_arrow_tooltip_text*(self: ptr MenuToolButton00; text: cstring) {. + importc: "gtk_menu_tool_button_set_arrow_tooltip_text", libprag.} + +proc setArrowTooltipText*(self: MenuToolButton; text: string) = + gtk_menu_tool_button_set_arrow_tooltip_text(cast[ptr MenuToolButton00](self.impl), cstring(text)) + +proc `arrowTooltipText=`*(self: MenuToolButton; text: string) = + gtk_menu_tool_button_set_arrow_tooltip_text(cast[ptr MenuToolButton00](self.impl), cstring(text)) + +proc gtk_menu_tool_button_set_menu*(self: ptr MenuToolButton00; menu: ptr Widget00) {. + importc: "gtk_menu_tool_button_set_menu", libprag.} + +proc setMenu*(self: MenuToolButton; menu: Widget) = + gtk_menu_tool_button_set_menu(cast[ptr MenuToolButton00](self.impl), cast[ptr Widget00](menu.impl)) + +proc `menu=`*(self: MenuToolButton; menu: Widget) = + gtk_menu_tool_button_set_menu(cast[ptr MenuToolButton00](self.impl), cast[ptr Widget00](menu.impl)) + +type + SizeGroupPrivate00* {.pure.} = object + SizeGroupPrivate* = ref object + impl*: ptr SizeGroupPrivate00 + +type + SizeGroup* = ref object of gobject.Object + SizeGroup00* = object of gobject.Object00 + priv1: ptr SizeGroupPrivate00 + +proc gtk_size_group_add_widget*(self: ptr SizeGroup00; widget: ptr Widget00) {. + importc: "gtk_size_group_add_widget", libprag.} + +proc addWidget*(self: SizeGroup; widget: Widget) = + gtk_size_group_add_widget(cast[ptr SizeGroup00](self.impl), cast[ptr Widget00](widget.impl)) + +proc gtk_size_group_get_ignore_hidden*(self: ptr SizeGroup00): gboolean {. + importc: "gtk_size_group_get_ignore_hidden", libprag.} + +proc getIgnoreHidden*(self: SizeGroup): bool = + toBool(gtk_size_group_get_ignore_hidden(cast[ptr SizeGroup00](self.impl))) + +proc ignoreHidden*(self: SizeGroup): bool = + toBool(gtk_size_group_get_ignore_hidden(cast[ptr SizeGroup00](self.impl))) + +proc gtk_size_group_get_widgets*(self: ptr SizeGroup00): ptr pointer {. + importc: "gtk_size_group_get_widgets", libprag.} + +proc getWidgets*(self: SizeGroup): ptr pointer = + gtk_size_group_get_widgets(cast[ptr SizeGroup00](self.impl)) + +proc widgets*(self: SizeGroup): ptr pointer = + gtk_size_group_get_widgets(cast[ptr SizeGroup00](self.impl)) + +proc gtk_size_group_remove_widget*(self: ptr SizeGroup00; widget: ptr Widget00) {. + importc: "gtk_size_group_remove_widget", libprag.} + +proc removeWidget*(self: SizeGroup; widget: Widget) = + gtk_size_group_remove_widget(cast[ptr SizeGroup00](self.impl), cast[ptr Widget00](widget.impl)) + +proc gtk_size_group_set_ignore_hidden*(self: ptr SizeGroup00; ignoreHidden: gboolean) {. + importc: "gtk_size_group_set_ignore_hidden", libprag.} + +proc setIgnoreHidden*(self: SizeGroup; ignoreHidden: bool) = + gtk_size_group_set_ignore_hidden(cast[ptr SizeGroup00](self.impl), gboolean(ignoreHidden)) + +proc `ignoreHidden=`*(self: SizeGroup; ignoreHidden: bool) = + gtk_size_group_set_ignore_hidden(cast[ptr SizeGroup00](self.impl), gboolean(ignoreHidden)) + +proc gtk_tool_item_get_text_size_group*(self: ptr ToolItem00): ptr SizeGroup00 {. + importc: "gtk_tool_item_get_text_size_group", libprag.} + +proc getTextSizeGroup*(self: ToolItem): SizeGroup = + let gobj = gtk_tool_item_get_text_size_group(cast[ptr ToolItem00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SizeGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc textSizeGroup*(self: ToolItem): SizeGroup = + let gobj = gtk_tool_item_get_text_size_group(cast[ptr ToolItem00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SizeGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SizeGroupMode* {.size: sizeof(cint), pure.} = enum + none = 0 + horizontal = 1 + vertical = 2 + both = 3 + +proc gtk_size_group_new*(mode: SizeGroupMode): ptr SizeGroup00 {. + importc: "gtk_size_group_new", libprag.} + +proc newSizeGroup*(mode: SizeGroupMode): SizeGroup = + new(result, finalizeGObject) + result.impl = gtk_size_group_new(mode) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSizeGroup*[T](result: var T; mode: SizeGroupMode) = + assert(result is SizeGroup) + new(result, finalizeGObject) + result.impl = gtk_size_group_new(mode) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_size_group_get_mode*(self: ptr SizeGroup00): SizeGroupMode {. + importc: "gtk_size_group_get_mode", libprag.} + +proc getMode*(self: SizeGroup): SizeGroupMode = + gtk_size_group_get_mode(cast[ptr SizeGroup00](self.impl)) + +proc mode*(self: SizeGroup): SizeGroupMode = + gtk_size_group_get_mode(cast[ptr SizeGroup00](self.impl)) + +proc gtk_size_group_set_mode*(self: ptr SizeGroup00; mode: SizeGroupMode) {. + importc: "gtk_size_group_set_mode", libprag.} + +proc setMode*(self: SizeGroup; mode: SizeGroupMode) = + gtk_size_group_set_mode(cast[ptr SizeGroup00](self.impl), mode) + +proc `mode=`*(self: SizeGroup; mode: SizeGroupMode) = + gtk_size_group_set_mode(cast[ptr SizeGroup00](self.impl), mode) + +type + ToolbarStyle* {.size: sizeof(cint), pure.} = enum + icons = 0 + text = 1 + both = 2 + bothHoriz = 3 + +proc gtk_tool_item_get_toolbar_style*(self: ptr ToolItem00): ToolbarStyle {. + importc: "gtk_tool_item_get_toolbar_style", libprag.} + +proc getToolbarStyle*(self: ToolItem): ToolbarStyle = + gtk_tool_item_get_toolbar_style(cast[ptr ToolItem00](self.impl)) + +proc toolbarStyle*(self: ToolItem): ToolbarStyle = + gtk_tool_item_get_toolbar_style(cast[ptr ToolItem00](self.impl)) + +type + ToolItemClass00* {.pure.} = object + parentClass*: BinClass00 + createMenuProxy*: proc(toolItem: ptr ToolItem00): gboolean {.cdecl.} + toolbarReconfigured*: proc(toolItem: ptr ToolItem00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ToolItemClass* = ref object + impl*: ptr ToolItemClass00 + +type + ToolButtonClass00* {.pure.} = object + parentClass*: ToolItemClass00 + buttonType*: GType + clicked*: proc(toolItem: ptr ToolButton00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ToolButtonClass* = ref object + impl*: ptr ToolButtonClass00 + +type + MenuToolButtonClass00* {.pure.} = object + parentClass*: ToolButtonClass00 + showMenu*: proc(button: ptr MenuToolButton00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + MenuToolButtonClass* = ref object + impl*: ptr MenuToolButtonClass00 + +type + MessageDialogPrivate00* {.pure.} = object + MessageDialogPrivate* = ref object + impl*: ptr MessageDialogPrivate00 + +type + MessageDialog* = ref object of Dialog + MessageDialog00* = object of Dialog00 + priv6: ptr MessageDialogPrivate00 + +proc gtk_message_dialog_get_image*(self: ptr MessageDialog00): ptr Widget00 {. + importc: "gtk_message_dialog_get_image", libprag.} + +proc getImage*(self: MessageDialog): Widget = + let gobj = gtk_message_dialog_get_image(cast[ptr MessageDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc image*(self: MessageDialog): Widget = + let gobj = gtk_message_dialog_get_image(cast[ptr MessageDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_message_dialog_get_message_area*(self: ptr MessageDialog00): ptr Widget00 {. + importc: "gtk_message_dialog_get_message_area", libprag.} + +proc getMessageArea*(self: MessageDialog): Widget = + let gobj = gtk_message_dialog_get_message_area(cast[ptr MessageDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc messageArea*(self: MessageDialog): Widget = + let gobj = gtk_message_dialog_get_message_area(cast[ptr MessageDialog00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_message_dialog_set_image*(self: ptr MessageDialog00; image: ptr Widget00) {. + importc: "gtk_message_dialog_set_image", libprag.} + +proc setImage*(self: MessageDialog; image: Widget) = + gtk_message_dialog_set_image(cast[ptr MessageDialog00](self.impl), cast[ptr Widget00](image.impl)) + +proc `image=`*(self: MessageDialog; image: Widget) = + gtk_message_dialog_set_image(cast[ptr MessageDialog00](self.impl), cast[ptr Widget00](image.impl)) + +proc gtk_message_dialog_set_markup*(self: ptr MessageDialog00; str: cstring) {. + importc: "gtk_message_dialog_set_markup", libprag.} + +proc setMarkup*(self: MessageDialog; str: string) = + gtk_message_dialog_set_markup(cast[ptr MessageDialog00](self.impl), cstring(str)) + +proc `markup=`*(self: MessageDialog; str: string) = + gtk_message_dialog_set_markup(cast[ptr MessageDialog00](self.impl), cstring(str)) + +type + MessageDialogClass00* {.pure.} = object + parentClass*: DialogClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + MessageDialogClass* = ref object + impl*: ptr MessageDialogClass00 + +type + ModelButton* = ref object of Button + ModelButton00* = object of Button00 + +proc gtk_model_button_new*(): ptr ModelButton00 {. + importc: "gtk_model_button_new", libprag.} + +proc newModelButton*(): ModelButton = + new(result, finalizeGObject) + result.impl = gtk_model_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initModelButton*[T](result: var T) = + assert(result is ModelButton) + new(result, finalizeGObject) + result.impl = gtk_model_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + ModuleDisplayInitFunc* = proc (display: ptr gdk.Display00) {.cdecl.} + +type + ModuleInitFunc* = proc (argc: ptr int32; argv: cstringArray) {.cdecl.} + +type + MountOperationPrivate00* {.pure.} = object + MountOperationPrivate* = ref object + impl*: ptr MountOperationPrivate00 + +type + MountOperation* = ref object of gio.MountOperation + MountOperation00* = object of gio.MountOperation00 + priv9: ptr MountOperationPrivate00 + +proc gtk_mount_operation_new*(parent: ptr Window00): ptr MountOperation00 {. + importc: "gtk_mount_operation_new", libprag.} + +proc newMountOperation*(parent: Window): MountOperation = + new(result, finalizeGObject) + result.impl = gtk_mount_operation_new(cast[ptr Window00](parent.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initMountOperation*[T](result: var T; parent: Window) = + assert(result is MountOperation) + new(result, finalizeGObject) + result.impl = gtk_mount_operation_new(cast[ptr Window00](parent.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_mount_operation_get_parent*(self: ptr MountOperation00): ptr Window00 {. + importc: "gtk_mount_operation_get_parent", libprag.} + +proc getParent*(self: MountOperation): Window = + let gobj = gtk_mount_operation_get_parent(cast[ptr MountOperation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc parent*(self: MountOperation): Window = + let gobj = gtk_mount_operation_get_parent(cast[ptr MountOperation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_mount_operation_get_screen*(self: ptr MountOperation00): ptr gdk.Screen00 {. + importc: "gtk_mount_operation_get_screen", libprag.} + +proc getScreen*(self: MountOperation): gdk.Screen = + let gobj = gtk_mount_operation_get_screen(cast[ptr MountOperation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: MountOperation): gdk.Screen = + let gobj = gtk_mount_operation_get_screen(cast[ptr MountOperation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_mount_operation_is_showing*(self: ptr MountOperation00): gboolean {. + importc: "gtk_mount_operation_is_showing", libprag.} + +proc isShowing*(self: MountOperation): bool = + toBool(gtk_mount_operation_is_showing(cast[ptr MountOperation00](self.impl))) + +proc gtk_mount_operation_set_parent*(self: ptr MountOperation00; parent: ptr Window00) {. + importc: "gtk_mount_operation_set_parent", libprag.} + +proc setParent*(self: MountOperation; parent: Window) = + gtk_mount_operation_set_parent(cast[ptr MountOperation00](self.impl), cast[ptr Window00](parent.impl)) + +proc `parent=`*(self: MountOperation; parent: Window) = + gtk_mount_operation_set_parent(cast[ptr MountOperation00](self.impl), cast[ptr Window00](parent.impl)) + +proc gtk_mount_operation_set_screen*(self: ptr MountOperation00; screen: ptr gdk.Screen00) {. + importc: "gtk_mount_operation_set_screen", libprag.} + +proc setScreen*(self: MountOperation; screen: gdk.Screen) = + gtk_mount_operation_set_screen(cast[ptr MountOperation00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc `screen=`*(self: MountOperation; screen: gdk.Screen) = + gtk_mount_operation_set_screen(cast[ptr MountOperation00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +type + MountOperationClass00* {.pure.} = object + parentClass*: gio.MountOperationClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + MountOperationClass* = ref object + impl*: ptr MountOperationClass00 + +type + NotebookPrivate00* {.pure.} = object + NotebookPrivate* = ref object + impl*: ptr NotebookPrivate00 + +type + NotebookTab* {.size: sizeof(cint), pure.} = enum + first = 0 + last = 1 + +type + Notebook* = ref object of Container + Notebook00* = object of Container00 + priv3: ptr NotebookPrivate00 + +proc scChangeCurrentPage*(self: Notebook; p: proc (self: ptr gobject.Object00; `object`: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "change-current-page", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCreateWindow*(self: Notebook; p: proc (self: ptr gobject.Object00; page: Widget00; x: int32; y: int32; xdata: pointer): Notebook00 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "create-window", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scFocusTab*(self: Notebook; p: proc (self: ptr gobject.Object00; `object`: NotebookTab; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "focus-tab", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveFocusOut*(self: Notebook; p: proc (self: ptr gobject.Object00; `object`: DirectionType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-focus-out", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPageAdded*(self: Notebook; p: proc (self: ptr gobject.Object00; child: Widget00; pageNum: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "page-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPageRemoved*(self: Notebook; p: proc (self: ptr gobject.Object00; child: Widget00; pageNum: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "page-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPageReordered*(self: Notebook; p: proc (self: ptr gobject.Object00; child: Widget00; pageNum: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "page-reordered", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scReorderTab*(self: Notebook; p: proc (self: ptr gobject.Object00; `object`: DirectionType; p0: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "reorder-tab", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectPage*(self: Notebook; p: proc (self: ptr gobject.Object00; `object`: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select-page", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSwitchPage*(self: Notebook; p: proc (self: ptr gobject.Object00; page: Widget00; pageNum: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "switch-page", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_notebook_new*(): ptr Notebook00 {. + importc: "gtk_notebook_new", libprag.} + +proc newNotebook*(): Notebook = + new(result, finalizeGObject) + result.impl = gtk_notebook_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initNotebook*[T](result: var T) = + assert(result is Notebook) + new(result, finalizeGObject) + result.impl = gtk_notebook_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_notebook_append_page*(self: ptr Notebook00; child: ptr Widget00; tabLabel: ptr Widget00): int32 {. + importc: "gtk_notebook_append_page", libprag.} + +proc appendPage*(self: Notebook; child: Widget; tabLabel: Widget): int = + int(gtk_notebook_append_page(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cast[ptr Widget00](tabLabel.impl))) + +proc gtk_notebook_append_page_menu*(self: ptr Notebook00; child: ptr Widget00; tabLabel: ptr Widget00; + menuLabel: ptr Widget00): int32 {. + importc: "gtk_notebook_append_page_menu", libprag.} + +proc appendPageMenu*(self: Notebook; child: Widget; tabLabel: Widget; menuLabel: Widget): int = + int(gtk_notebook_append_page_menu(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cast[ptr Widget00](tabLabel.impl), cast[ptr Widget00](menuLabel.impl))) + +proc gtk_notebook_detach_tab*(self: ptr Notebook00; child: ptr Widget00) {. + importc: "gtk_notebook_detach_tab", libprag.} + +proc detachTab*(self: Notebook; child: Widget) = + gtk_notebook_detach_tab(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_notebook_get_action_widget*(self: ptr Notebook00; packType: PackType): ptr Widget00 {. + importc: "gtk_notebook_get_action_widget", libprag.} + +proc getActionWidget*(self: Notebook; packType: PackType): Widget = + let gobj = gtk_notebook_get_action_widget(cast[ptr Notebook00](self.impl), packType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc actionWidget*(self: Notebook; packType: PackType): Widget = + let gobj = gtk_notebook_get_action_widget(cast[ptr Notebook00](self.impl), packType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_notebook_get_current_page*(self: ptr Notebook00): int32 {. + importc: "gtk_notebook_get_current_page", libprag.} + +proc getCurrentPage*(self: Notebook): int = + int(gtk_notebook_get_current_page(cast[ptr Notebook00](self.impl))) + +proc currentPage*(self: Notebook): int = + int(gtk_notebook_get_current_page(cast[ptr Notebook00](self.impl))) + +proc gtk_notebook_get_group_name*(self: ptr Notebook00): cstring {. + importc: "gtk_notebook_get_group_name", libprag.} + +proc getGroupName*(self: Notebook): string = + let resul0 = gtk_notebook_get_group_name(cast[ptr Notebook00](self.impl)) + result = $resul0 + +proc groupName*(self: Notebook): string = + let resul0 = gtk_notebook_get_group_name(cast[ptr Notebook00](self.impl)) + result = $resul0 + +proc gtk_notebook_get_menu_label*(self: ptr Notebook00; child: ptr Widget00): ptr Widget00 {. + importc: "gtk_notebook_get_menu_label", libprag.} + +proc getMenuLabel*(self: Notebook; child: Widget): Widget = + let gobj = gtk_notebook_get_menu_label(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc menuLabel*(self: Notebook; child: Widget): Widget = + let gobj = gtk_notebook_get_menu_label(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_notebook_get_menu_label_text*(self: ptr Notebook00; child: ptr Widget00): cstring {. + importc: "gtk_notebook_get_menu_label_text", libprag.} + +proc getMenuLabelText*(self: Notebook; child: Widget): string = + let resul0 = gtk_notebook_get_menu_label_text(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl)) + result = $resul0 + +proc menuLabelText*(self: Notebook; child: Widget): string = + let resul0 = gtk_notebook_get_menu_label_text(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl)) + result = $resul0 + +proc gtk_notebook_get_n_pages*(self: ptr Notebook00): int32 {. + importc: "gtk_notebook_get_n_pages", libprag.} + +proc getNPages*(self: Notebook): int = + int(gtk_notebook_get_n_pages(cast[ptr Notebook00](self.impl))) + +proc nPages*(self: Notebook): int = + int(gtk_notebook_get_n_pages(cast[ptr Notebook00](self.impl))) + +proc gtk_notebook_get_nth_page*(self: ptr Notebook00; pageNum: int32): ptr Widget00 {. + importc: "gtk_notebook_get_nth_page", libprag.} + +proc getNthPage*(self: Notebook; pageNum: int): Widget = + let gobj = gtk_notebook_get_nth_page(cast[ptr Notebook00](self.impl), int32(pageNum)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc nthPage*(self: Notebook; pageNum: int): Widget = + let gobj = gtk_notebook_get_nth_page(cast[ptr Notebook00](self.impl), int32(pageNum)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_notebook_get_scrollable*(self: ptr Notebook00): gboolean {. + importc: "gtk_notebook_get_scrollable", libprag.} + +proc getScrollable*(self: Notebook): bool = + toBool(gtk_notebook_get_scrollable(cast[ptr Notebook00](self.impl))) + +proc scrollable*(self: Notebook): bool = + toBool(gtk_notebook_get_scrollable(cast[ptr Notebook00](self.impl))) + +proc gtk_notebook_get_show_border*(self: ptr Notebook00): gboolean {. + importc: "gtk_notebook_get_show_border", libprag.} + +proc getShowBorder*(self: Notebook): bool = + toBool(gtk_notebook_get_show_border(cast[ptr Notebook00](self.impl))) + +proc showBorder*(self: Notebook): bool = + toBool(gtk_notebook_get_show_border(cast[ptr Notebook00](self.impl))) + +proc gtk_notebook_get_show_tabs*(self: ptr Notebook00): gboolean {. + importc: "gtk_notebook_get_show_tabs", libprag.} + +proc getShowTabs*(self: Notebook): bool = + toBool(gtk_notebook_get_show_tabs(cast[ptr Notebook00](self.impl))) + +proc showTabs*(self: Notebook): bool = + toBool(gtk_notebook_get_show_tabs(cast[ptr Notebook00](self.impl))) + +proc gtk_notebook_get_tab_detachable*(self: ptr Notebook00; child: ptr Widget00): gboolean {. + importc: "gtk_notebook_get_tab_detachable", libprag.} + +proc getTabDetachable*(self: Notebook; child: Widget): bool = + toBool(gtk_notebook_get_tab_detachable(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl))) + +proc tabDetachable*(self: Notebook; child: Widget): bool = + toBool(gtk_notebook_get_tab_detachable(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl))) + +proc gtk_notebook_get_tab_hborder*(self: ptr Notebook00): uint16 {. + importc: "gtk_notebook_get_tab_hborder", libprag.} + +proc getTabHborder*(self: Notebook): uint16 = + gtk_notebook_get_tab_hborder(cast[ptr Notebook00](self.impl)) + +proc tabHborder*(self: Notebook): uint16 = + gtk_notebook_get_tab_hborder(cast[ptr Notebook00](self.impl)) + +proc gtk_notebook_get_tab_label*(self: ptr Notebook00; child: ptr Widget00): ptr Widget00 {. + importc: "gtk_notebook_get_tab_label", libprag.} + +proc getTabLabel*(self: Notebook; child: Widget): Widget = + let gobj = gtk_notebook_get_tab_label(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc tabLabel*(self: Notebook; child: Widget): Widget = + let gobj = gtk_notebook_get_tab_label(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_notebook_get_tab_label_text*(self: ptr Notebook00; child: ptr Widget00): cstring {. + importc: "gtk_notebook_get_tab_label_text", libprag.} + +proc getTabLabelText*(self: Notebook; child: Widget): string = + let resul0 = gtk_notebook_get_tab_label_text(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl)) + result = $resul0 + +proc tabLabelText*(self: Notebook; child: Widget): string = + let resul0 = gtk_notebook_get_tab_label_text(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl)) + result = $resul0 + +proc gtk_notebook_get_tab_pos*(self: ptr Notebook00): PositionType {. + importc: "gtk_notebook_get_tab_pos", libprag.} + +proc getTabPos*(self: Notebook): PositionType = + gtk_notebook_get_tab_pos(cast[ptr Notebook00](self.impl)) + +proc tabPos*(self: Notebook): PositionType = + gtk_notebook_get_tab_pos(cast[ptr Notebook00](self.impl)) + +proc gtk_notebook_get_tab_reorderable*(self: ptr Notebook00; child: ptr Widget00): gboolean {. + importc: "gtk_notebook_get_tab_reorderable", libprag.} + +proc getTabReorderable*(self: Notebook; child: Widget): bool = + toBool(gtk_notebook_get_tab_reorderable(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl))) + +proc tabReorderable*(self: Notebook; child: Widget): bool = + toBool(gtk_notebook_get_tab_reorderable(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl))) + +proc gtk_notebook_get_tab_vborder*(self: ptr Notebook00): uint16 {. + importc: "gtk_notebook_get_tab_vborder", libprag.} + +proc getTabVborder*(self: Notebook): uint16 = + gtk_notebook_get_tab_vborder(cast[ptr Notebook00](self.impl)) + +proc tabVborder*(self: Notebook): uint16 = + gtk_notebook_get_tab_vborder(cast[ptr Notebook00](self.impl)) + +proc gtk_notebook_insert_page*(self: ptr Notebook00; child: ptr Widget00; tabLabel: ptr Widget00; + position: int32): int32 {. + importc: "gtk_notebook_insert_page", libprag.} + +proc insertPage*(self: Notebook; child: Widget; tabLabel: Widget; position: int): int = + int(gtk_notebook_insert_page(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cast[ptr Widget00](tabLabel.impl), int32(position))) + +proc gtk_notebook_insert_page_menu*(self: ptr Notebook00; child: ptr Widget00; tabLabel: ptr Widget00; + menuLabel: ptr Widget00; position: int32): int32 {. + importc: "gtk_notebook_insert_page_menu", libprag.} + +proc insertPageMenu*(self: Notebook; child: Widget; tabLabel: Widget; menuLabel: Widget; + position: int): int = + int(gtk_notebook_insert_page_menu(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cast[ptr Widget00](tabLabel.impl), cast[ptr Widget00](menuLabel.impl), int32(position))) + +proc gtk_notebook_next_page*(self: ptr Notebook00) {. + importc: "gtk_notebook_next_page", libprag.} + +proc nextPage*(self: Notebook) = + gtk_notebook_next_page(cast[ptr Notebook00](self.impl)) + +proc gtk_notebook_page_num*(self: ptr Notebook00; child: ptr Widget00): int32 {. + importc: "gtk_notebook_page_num", libprag.} + +proc pageNum*(self: Notebook; child: Widget): int = + int(gtk_notebook_page_num(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl))) + +proc gtk_notebook_popup_disable*(self: ptr Notebook00) {. + importc: "gtk_notebook_popup_disable", libprag.} + +proc popupDisable*(self: Notebook) = + gtk_notebook_popup_disable(cast[ptr Notebook00](self.impl)) + +proc gtk_notebook_popup_enable*(self: ptr Notebook00) {. + importc: "gtk_notebook_popup_enable", libprag.} + +proc popupEnable*(self: Notebook) = + gtk_notebook_popup_enable(cast[ptr Notebook00](self.impl)) + +proc gtk_notebook_prepend_page*(self: ptr Notebook00; child: ptr Widget00; tabLabel: ptr Widget00): int32 {. + importc: "gtk_notebook_prepend_page", libprag.} + +proc prependPage*(self: Notebook; child: Widget; tabLabel: Widget): int = + int(gtk_notebook_prepend_page(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cast[ptr Widget00](tabLabel.impl))) + +proc gtk_notebook_prepend_page_menu*(self: ptr Notebook00; child: ptr Widget00; tabLabel: ptr Widget00; + menuLabel: ptr Widget00): int32 {. + importc: "gtk_notebook_prepend_page_menu", libprag.} + +proc prependPageMenu*(self: Notebook; child: Widget; tabLabel: Widget; menuLabel: Widget): int = + int(gtk_notebook_prepend_page_menu(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cast[ptr Widget00](tabLabel.impl), cast[ptr Widget00](menuLabel.impl))) + +proc gtk_notebook_prev_page*(self: ptr Notebook00) {. + importc: "gtk_notebook_prev_page", libprag.} + +proc prevPage*(self: Notebook) = + gtk_notebook_prev_page(cast[ptr Notebook00](self.impl)) + +proc gtk_notebook_remove_page*(self: ptr Notebook00; pageNum: int32) {. + importc: "gtk_notebook_remove_page", libprag.} + +proc removePage*(self: Notebook; pageNum: int) = + gtk_notebook_remove_page(cast[ptr Notebook00](self.impl), int32(pageNum)) + +proc gtk_notebook_reorder_child*(self: ptr Notebook00; child: ptr Widget00; position: int32) {. + importc: "gtk_notebook_reorder_child", libprag.} + +proc reorderChild*(self: Notebook; child: Widget; position: int) = + gtk_notebook_reorder_child(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), int32(position)) + +proc gtk_notebook_set_action_widget*(self: ptr Notebook00; widget: ptr Widget00; packType: PackType) {. + importc: "gtk_notebook_set_action_widget", libprag.} + +proc setActionWidget*(self: Notebook; widget: Widget; packType: PackType) = + gtk_notebook_set_action_widget(cast[ptr Notebook00](self.impl), cast[ptr Widget00](widget.impl), packType) + +proc gtk_notebook_set_current_page*(self: ptr Notebook00; pageNum: int32) {. + importc: "gtk_notebook_set_current_page", libprag.} + +proc setCurrentPage*(self: Notebook; pageNum: int) = + gtk_notebook_set_current_page(cast[ptr Notebook00](self.impl), int32(pageNum)) + +proc `currentPage=`*(self: Notebook; pageNum: int) = + gtk_notebook_set_current_page(cast[ptr Notebook00](self.impl), int32(pageNum)) + +proc gtk_notebook_set_group_name*(self: ptr Notebook00; groupName: cstring) {. + importc: "gtk_notebook_set_group_name", libprag.} + +proc setGroupName*(self: Notebook; groupName: string) = + gtk_notebook_set_group_name(cast[ptr Notebook00](self.impl), cstring(groupName)) + +proc `groupName=`*(self: Notebook; groupName: string) = + gtk_notebook_set_group_name(cast[ptr Notebook00](self.impl), cstring(groupName)) + +proc gtk_notebook_set_menu_label*(self: ptr Notebook00; child: ptr Widget00; menuLabel: ptr Widget00) {. + importc: "gtk_notebook_set_menu_label", libprag.} + +proc setMenuLabel*(self: Notebook; child: Widget; menuLabel: Widget) = + gtk_notebook_set_menu_label(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cast[ptr Widget00](menuLabel.impl)) + +proc gtk_notebook_set_menu_label_text*(self: ptr Notebook00; child: ptr Widget00; menuText: cstring) {. + importc: "gtk_notebook_set_menu_label_text", libprag.} + +proc setMenuLabelText*(self: Notebook; child: Widget; menuText: string) = + gtk_notebook_set_menu_label_text(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cstring(menuText)) + +proc gtk_notebook_set_scrollable*(self: ptr Notebook00; scrollable: gboolean) {. + importc: "gtk_notebook_set_scrollable", libprag.} + +proc setScrollable*(self: Notebook; scrollable: bool) = + gtk_notebook_set_scrollable(cast[ptr Notebook00](self.impl), gboolean(scrollable)) + +proc `scrollable=`*(self: Notebook; scrollable: bool) = + gtk_notebook_set_scrollable(cast[ptr Notebook00](self.impl), gboolean(scrollable)) + +proc gtk_notebook_set_show_border*(self: ptr Notebook00; showBorder: gboolean) {. + importc: "gtk_notebook_set_show_border", libprag.} + +proc setShowBorder*(self: Notebook; showBorder: bool) = + gtk_notebook_set_show_border(cast[ptr Notebook00](self.impl), gboolean(showBorder)) + +proc `showBorder=`*(self: Notebook; showBorder: bool) = + gtk_notebook_set_show_border(cast[ptr Notebook00](self.impl), gboolean(showBorder)) + +proc gtk_notebook_set_show_tabs*(self: ptr Notebook00; showTabs: gboolean) {. + importc: "gtk_notebook_set_show_tabs", libprag.} + +proc setShowTabs*(self: Notebook; showTabs: bool) = + gtk_notebook_set_show_tabs(cast[ptr Notebook00](self.impl), gboolean(showTabs)) + +proc `showTabs=`*(self: Notebook; showTabs: bool) = + gtk_notebook_set_show_tabs(cast[ptr Notebook00](self.impl), gboolean(showTabs)) + +proc gtk_notebook_set_tab_detachable*(self: ptr Notebook00; child: ptr Widget00; detachable: gboolean) {. + importc: "gtk_notebook_set_tab_detachable", libprag.} + +proc setTabDetachable*(self: Notebook; child: Widget; detachable: bool) = + gtk_notebook_set_tab_detachable(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), gboolean(detachable)) + +proc gtk_notebook_set_tab_label*(self: ptr Notebook00; child: ptr Widget00; tabLabel: ptr Widget00) {. + importc: "gtk_notebook_set_tab_label", libprag.} + +proc setTabLabel*(self: Notebook; child: Widget; tabLabel: Widget) = + gtk_notebook_set_tab_label(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cast[ptr Widget00](tabLabel.impl)) + +proc gtk_notebook_set_tab_label_text*(self: ptr Notebook00; child: ptr Widget00; tabText: cstring) {. + importc: "gtk_notebook_set_tab_label_text", libprag.} + +proc setTabLabelText*(self: Notebook; child: Widget; tabText: string) = + gtk_notebook_set_tab_label_text(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), cstring(tabText)) + +proc gtk_notebook_set_tab_pos*(self: ptr Notebook00; pos: PositionType) {. + importc: "gtk_notebook_set_tab_pos", libprag.} + +proc setTabPos*(self: Notebook; pos: PositionType) = + gtk_notebook_set_tab_pos(cast[ptr Notebook00](self.impl), pos) + +proc `tabPos=`*(self: Notebook; pos: PositionType) = + gtk_notebook_set_tab_pos(cast[ptr Notebook00](self.impl), pos) + +proc gtk_notebook_set_tab_reorderable*(self: ptr Notebook00; child: ptr Widget00; reorderable: gboolean) {. + importc: "gtk_notebook_set_tab_reorderable", libprag.} + +proc setTabReorderable*(self: Notebook; child: Widget; reorderable: bool) = + gtk_notebook_set_tab_reorderable(cast[ptr Notebook00](self.impl), cast[ptr Widget00](child.impl), gboolean(reorderable)) + +type + NotebookAccessiblePrivate00* {.pure.} = object + NotebookAccessiblePrivate* = ref object + impl*: ptr NotebookAccessiblePrivate00 + +type + NotebookAccessible* = ref object of ContainerAccessible + NotebookAccessible00* = object of ContainerAccessible00 + priv4: ptr NotebookAccessiblePrivate00 + +type + NotebookAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + NotebookAccessibleClass* = ref object + impl*: ptr NotebookAccessibleClass00 + +type + NotebookClass00* {.pure.} = object + parentClass*: ContainerClass00 + switchPage*: proc(notebook: ptr Notebook00; page: ptr Widget00; pageNum: uint32) {.cdecl.} + selectPage*: proc(notebook: ptr Notebook00; moveFocus: gboolean): gboolean {.cdecl.} + focusTab*: proc(notebook: ptr Notebook00; `type`: NotebookTab): gboolean {.cdecl.} + changeCurrentPage*: proc(notebook: ptr Notebook00; offset: int32): gboolean {.cdecl.} + moveFocusOut*: proc(notebook: ptr Notebook00; direction: DirectionType) {.cdecl.} + reorderTab*: proc(notebook: ptr Notebook00; direction: DirectionType; + moveToLast: gboolean): gboolean {.cdecl.} + insertPage*: proc(notebook: ptr Notebook00; child: ptr Widget00; tabLabel: ptr Widget00; + menuLabel: ptr Widget00; position: int32): int32 {.cdecl.} + createWindow*: pointer + pageReordered*: proc(notebook: ptr Notebook00; child: ptr Widget00; pageNum: uint32) {.cdecl.} + pageRemoved*: proc(notebook: ptr Notebook00; child: ptr Widget00; pageNum: uint32) {.cdecl.} + pageAdded*: proc(notebook: ptr Notebook00; child: ptr Widget00; pageNum: uint32) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + NotebookClass* = ref object + impl*: ptr NotebookClass00 + +type + NotebookPageAccessiblePrivate00* {.pure.} = object + NotebookPageAccessiblePrivate* = ref object + impl*: ptr NotebookPageAccessiblePrivate00 + +type + NotebookPageAccessible* = ref object of atk.Object + NotebookPageAccessible00* = object of atk.Object00 + priv1: ptr NotebookPageAccessiblePrivate00 + +proc gtk_notebook_page_accessible_new*(notebook: ptr NotebookAccessible00; child: ptr Widget00): ptr NotebookPageAccessible00 {. + importc: "gtk_notebook_page_accessible_new", libprag.} + +proc newNotebookPageAccessible*(notebook: NotebookAccessible; child: Widget): NotebookPageAccessible = + new(result, finalizeGObject) + result.impl = gtk_notebook_page_accessible_new(cast[ptr NotebookAccessible00](notebook.impl), cast[ptr Widget00](child.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initNotebookPageAccessible*[T](result: var T; notebook: NotebookAccessible; child: Widget) = + assert(result is NotebookPageAccessible) + new(result, finalizeGObject) + result.impl = gtk_notebook_page_accessible_new(cast[ptr NotebookAccessible00](notebook.impl), cast[ptr Widget00](child.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_notebook_page_accessible_invalidate*(self: ptr NotebookPageAccessible00) {. + importc: "gtk_notebook_page_accessible_invalidate", libprag.} + +proc invalidate*(self: NotebookPageAccessible) = + gtk_notebook_page_accessible_invalidate(cast[ptr NotebookPageAccessible00](self.impl)) + +type + NotebookPageAccessibleClass00* {.pure.} = object + parentClass*: atk.ObjectClass00 + NotebookPageAccessibleClass* = ref object + impl*: ptr NotebookPageAccessibleClass00 + +type + NumberUpLayout* {.size: sizeof(cint), pure.} = enum + lrtb = 0 + lrbt = 1 + rltb = 2 + rlbt = 3 + tblr = 4 + tbrl = 5 + btlr = 6 + btrl = 7 + +type + NumerableIconPrivate00* {.pure.} = object + NumerableIconPrivate* = ref object + impl*: ptr NumerableIconPrivate00 + +type + NumerableIcon* = ref object of gio.EmblemedIcon + NumerableIcon00* = object of gio.EmblemedIcon00 + priv9: ptr NumerableIconPrivate00 + +proc gtk_numerable_icon_new*(baseIcon: ptr gio.Icon00): ptr gio.Icon00 {. + importc: "gtk_numerable_icon_new", libprag.} + +proc newNumerableIcon*(baseIcon: gio.Icon): gio.Icon = + new(result) + result.impl = gtk_numerable_icon_new(cast[ptr gio.Icon00](baseIcon.impl)) + +proc gtk_numerable_icon_new_with_style_context*(baseIcon: ptr gio.Icon00; context: ptr StyleContext00): ptr gio.Icon00 {. + importc: "gtk_numerable_icon_new_with_style_context", libprag.} + +proc newNumerableIconWithStyleContext*(baseIcon: gio.Icon; context: StyleContext): gio.Icon = + new(result) + result.impl = gtk_numerable_icon_new_with_style_context(cast[ptr gio.Icon00](baseIcon.impl), cast[ptr StyleContext00](context.impl)) + +proc gtk_numerable_icon_get_background_gicon*(self: ptr NumerableIcon00): ptr gio.Icon00 {. + importc: "gtk_numerable_icon_get_background_gicon", libprag.} + +proc getBackgroundGicon*(self: NumerableIcon): gio.Icon = + new(result) + result.impl = gtk_numerable_icon_get_background_gicon(cast[ptr NumerableIcon00](self.impl)) + +proc backgroundGicon*(self: NumerableIcon): gio.Icon = + new(result) + result.impl = gtk_numerable_icon_get_background_gicon(cast[ptr NumerableIcon00](self.impl)) + +proc gtk_numerable_icon_get_background_icon_name*(self: ptr NumerableIcon00): cstring {. + importc: "gtk_numerable_icon_get_background_icon_name", libprag.} + +proc getBackgroundIconName*(self: NumerableIcon): string = + let resul0 = gtk_numerable_icon_get_background_icon_name(cast[ptr NumerableIcon00](self.impl)) + result = $resul0 + +proc backgroundIconName*(self: NumerableIcon): string = + let resul0 = gtk_numerable_icon_get_background_icon_name(cast[ptr NumerableIcon00](self.impl)) + result = $resul0 + +proc gtk_numerable_icon_get_count*(self: ptr NumerableIcon00): int32 {. + importc: "gtk_numerable_icon_get_count", libprag.} + +proc getCount*(self: NumerableIcon): int = + int(gtk_numerable_icon_get_count(cast[ptr NumerableIcon00](self.impl))) + +proc count*(self: NumerableIcon): int = + int(gtk_numerable_icon_get_count(cast[ptr NumerableIcon00](self.impl))) + +proc gtk_numerable_icon_get_label*(self: ptr NumerableIcon00): cstring {. + importc: "gtk_numerable_icon_get_label", libprag.} + +proc getLabel*(self: NumerableIcon): string = + let resul0 = gtk_numerable_icon_get_label(cast[ptr NumerableIcon00](self.impl)) + result = $resul0 + +proc label*(self: NumerableIcon): string = + let resul0 = gtk_numerable_icon_get_label(cast[ptr NumerableIcon00](self.impl)) + result = $resul0 + +proc gtk_numerable_icon_get_style_context*(self: ptr NumerableIcon00): ptr StyleContext00 {. + importc: "gtk_numerable_icon_get_style_context", libprag.} + +proc getStyleContext*(self: NumerableIcon): StyleContext = + let gobj = gtk_numerable_icon_get_style_context(cast[ptr NumerableIcon00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StyleContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc styleContext*(self: NumerableIcon): StyleContext = + let gobj = gtk_numerable_icon_get_style_context(cast[ptr NumerableIcon00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[StyleContext](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_numerable_icon_set_background_gicon*(self: ptr NumerableIcon00; icon: ptr gio.Icon00) {. + importc: "gtk_numerable_icon_set_background_gicon", libprag.} + +proc setBackgroundGicon*(self: NumerableIcon; icon: gio.Icon) = + gtk_numerable_icon_set_background_gicon(cast[ptr NumerableIcon00](self.impl), cast[ptr gio.Icon00](icon.impl)) + +proc `backgroundGicon=`*(self: NumerableIcon; icon: gio.Icon) = + gtk_numerable_icon_set_background_gicon(cast[ptr NumerableIcon00](self.impl), cast[ptr gio.Icon00](icon.impl)) + +proc gtk_numerable_icon_set_background_icon_name*(self: ptr NumerableIcon00; iconName: cstring) {. + importc: "gtk_numerable_icon_set_background_icon_name", libprag.} + +proc setBackgroundIconName*(self: NumerableIcon; iconName: string) = + gtk_numerable_icon_set_background_icon_name(cast[ptr NumerableIcon00](self.impl), cstring(iconName)) + +proc `backgroundIconName=`*(self: NumerableIcon; iconName: string) = + gtk_numerable_icon_set_background_icon_name(cast[ptr NumerableIcon00](self.impl), cstring(iconName)) + +proc gtk_numerable_icon_set_count*(self: ptr NumerableIcon00; count: int32) {. + importc: "gtk_numerable_icon_set_count", libprag.} + +proc setCount*(self: NumerableIcon; count: int) = + gtk_numerable_icon_set_count(cast[ptr NumerableIcon00](self.impl), int32(count)) + +proc `count=`*(self: NumerableIcon; count: int) = + gtk_numerable_icon_set_count(cast[ptr NumerableIcon00](self.impl), int32(count)) + +proc gtk_numerable_icon_set_label*(self: ptr NumerableIcon00; label: cstring) {. + importc: "gtk_numerable_icon_set_label", libprag.} + +proc setLabel*(self: NumerableIcon; label: string) = + gtk_numerable_icon_set_label(cast[ptr NumerableIcon00](self.impl), cstring(label)) + +proc `label=`*(self: NumerableIcon; label: string) = + gtk_numerable_icon_set_label(cast[ptr NumerableIcon00](self.impl), cstring(label)) + +proc gtk_numerable_icon_set_style_context*(self: ptr NumerableIcon00; style: ptr StyleContext00) {. + importc: "gtk_numerable_icon_set_style_context", libprag.} + +proc setStyleContext*(self: NumerableIcon; style: StyleContext) = + gtk_numerable_icon_set_style_context(cast[ptr NumerableIcon00](self.impl), cast[ptr StyleContext00](style.impl)) + +proc `styleContext=`*(self: NumerableIcon; style: StyleContext) = + gtk_numerable_icon_set_style_context(cast[ptr NumerableIcon00](self.impl), cast[ptr StyleContext00](style.impl)) + +type + NumerableIconClass00* {.pure.} = object + parentClass*: gio.EmblemedIconClass00 + padding*: array[16, pointer] + NumerableIconClass* = ref object + impl*: ptr NumerableIconClass00 + +type + OffscreenWindow* = ref object of Window + OffscreenWindow00* = object of Window00 + +proc gtk_offscreen_window_new*(): ptr OffscreenWindow00 {. + importc: "gtk_offscreen_window_new", libprag.} + +proc newOffscreenWindow*(): OffscreenWindow = + new(result, finalizeGObject) + result.impl = gtk_offscreen_window_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initOffscreenWindow*[T](result: var T) = + assert(result is OffscreenWindow) + new(result, finalizeGObject) + result.impl = gtk_offscreen_window_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_offscreen_window_get_pixbuf*(self: ptr OffscreenWindow00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_offscreen_window_get_pixbuf", libprag.} + +proc getPixbuf*(self: OffscreenWindow): gdkpixbuf.Pixbuf = + let gobj = gtk_offscreen_window_get_pixbuf(cast[ptr OffscreenWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbuf*(self: OffscreenWindow): gdkpixbuf.Pixbuf = + let gobj = gtk_offscreen_window_get_pixbuf(cast[ptr OffscreenWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_offscreen_window_get_surface*(self: ptr OffscreenWindow00): ptr cairo.Surface00 {. + importc: "gtk_offscreen_window_get_surface", libprag.} + +proc getSurface*(self: OffscreenWindow): cairo.Surface = + new(result) + result.impl = gtk_offscreen_window_get_surface(cast[ptr OffscreenWindow00](self.impl)) + +proc surface*(self: OffscreenWindow): cairo.Surface = + new(result) + result.impl = gtk_offscreen_window_get_surface(cast[ptr OffscreenWindow00](self.impl)) + +type + OffscreenWindowClass00* {.pure.} = object + parentClass*: WindowClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + OffscreenWindowClass* = ref object + impl*: ptr OffscreenWindowClass00 + +type + Orientable00* {.pure.} = object + Orientable* = ref object + impl*: ptr Orientable00 + +proc gtk_orientable_get_orientation*(self: ptr Orientable00): Orientation {. + importc: "gtk_orientable_get_orientation", libprag.} + +proc getOrientation*(self: Orientable): Orientation = + gtk_orientable_get_orientation(cast[ptr Orientable00](self.impl)) + +proc orientation*(self: Orientable): Orientation = + gtk_orientable_get_orientation(cast[ptr Orientable00](self.impl)) + +proc gtk_orientable_set_orientation*(self: ptr Orientable00; orientation: Orientation) {. + importc: "gtk_orientable_set_orientation", libprag.} + +proc setOrientation*(self: Orientable; orientation: Orientation) = + gtk_orientable_set_orientation(cast[ptr Orientable00](self.impl), orientation) + +proc `orientation=`*(self: Orientable; orientation: Orientation) = + gtk_orientable_set_orientation(cast[ptr Orientable00](self.impl), orientation) + +type + OrientableIface00* {.pure.} = object + baseIface*: gobject.TypeInterface00 + OrientableIface* = ref object + impl*: ptr OrientableIface00 + +type + OverlayPrivate00* {.pure.} = object + OverlayPrivate* = ref object + impl*: ptr OverlayPrivate00 + +type + Overlay* = ref object of Bin + Overlay00* = object of Bin00 + priv4: ptr OverlayPrivate00 + +proc scGetChildPosition*(self: Overlay; p: proc (self: ptr gobject.Object00; widget: Widget00; allocation: var gdk.Rectangle00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "get-child-position", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_overlay_new*(): ptr Overlay00 {. + importc: "gtk_overlay_new", libprag.} + +proc newOverlay*(): Overlay = + new(result, finalizeGObject) + result.impl = gtk_overlay_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initOverlay*[T](result: var T) = + assert(result is Overlay) + new(result, finalizeGObject) + result.impl = gtk_overlay_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_overlay_add_overlay*(self: ptr Overlay00; widget: ptr Widget00) {. + importc: "gtk_overlay_add_overlay", libprag.} + +proc addOverlay*(self: Overlay; widget: Widget) = + gtk_overlay_add_overlay(cast[ptr Overlay00](self.impl), cast[ptr Widget00](widget.impl)) + +proc gtk_overlay_get_overlay_pass_through*(self: ptr Overlay00; widget: ptr Widget00): gboolean {. + importc: "gtk_overlay_get_overlay_pass_through", libprag.} + +proc getOverlayPassThrough*(self: Overlay; widget: Widget): bool = + toBool(gtk_overlay_get_overlay_pass_through(cast[ptr Overlay00](self.impl), cast[ptr Widget00](widget.impl))) + +proc overlayPassThrough*(self: Overlay; widget: Widget): bool = + toBool(gtk_overlay_get_overlay_pass_through(cast[ptr Overlay00](self.impl), cast[ptr Widget00](widget.impl))) + +proc gtk_overlay_reorder_overlay*(self: ptr Overlay00; child: ptr Widget00; position: int32) {. + importc: "gtk_overlay_reorder_overlay", libprag.} + +proc reorderOverlay*(self: Overlay; child: Widget; position: int) = + gtk_overlay_reorder_overlay(cast[ptr Overlay00](self.impl), cast[ptr Widget00](child.impl), int32(position)) + +proc gtk_overlay_set_overlay_pass_through*(self: ptr Overlay00; widget: ptr Widget00; passThrough: gboolean) {. + importc: "gtk_overlay_set_overlay_pass_through", libprag.} + +proc setOverlayPassThrough*(self: Overlay; widget: Widget; passThrough: bool) = + gtk_overlay_set_overlay_pass_through(cast[ptr Overlay00](self.impl), cast[ptr Widget00](widget.impl), gboolean(passThrough)) + +type + OverlayClass00* {.pure.} = object + parentClass*: BinClass00 + getChildPosition*: proc(overlay: ptr Overlay00; widget: ptr Widget00; allocation: ptr gdk.Rectangle00): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + OverlayClass* = ref object + impl*: ptr OverlayClass00 + +const PAPER_NAME_A3* = "iso_a3" + +const PAPER_NAME_A4* = "iso_a4" + +const PAPER_NAME_A5* = "iso_a5" + +const PAPER_NAME_B5* = "iso_b5" + +const PAPER_NAME_EXECUTIVE* = "na_executive" + +const PAPER_NAME_LEGAL* = "na_legal" + +const PAPER_NAME_LETTER* = "na_letter" + +const PATH_PRIO_MASK* = 15'i32 + +const PRINT_SETTINGS_COLLATE* = "collate" + +const PRINT_SETTINGS_DEFAULT_SOURCE* = "default-source" + +const PRINT_SETTINGS_DITHER* = "dither" + +const PRINT_SETTINGS_DUPLEX* = "duplex" + +const PRINT_SETTINGS_FINISHINGS* = "finishings" + +const PRINT_SETTINGS_MEDIA_TYPE* = "media-type" + +const PRINT_SETTINGS_NUMBER_UP* = "number-up" + +const PRINT_SETTINGS_NUMBER_UP_LAYOUT* = "number-up-layout" + +const PRINT_SETTINGS_N_COPIES* = "n-copies" + +const PRINT_SETTINGS_ORIENTATION* = "orientation" + +const PRINT_SETTINGS_OUTPUT_BASENAME* = "output-basename" + +const PRINT_SETTINGS_OUTPUT_BIN* = "output-bin" + +const PRINT_SETTINGS_OUTPUT_DIR* = "output-dir" + +const PRINT_SETTINGS_OUTPUT_FILE_FORMAT* = "output-file-format" + +const PRINT_SETTINGS_OUTPUT_URI* = "output-uri" + +const PRINT_SETTINGS_PAGE_RANGES* = "page-ranges" + +const PRINT_SETTINGS_PAGE_SET* = "page-set" + +const PRINT_SETTINGS_PAPER_FORMAT* = "paper-format" + +const PRINT_SETTINGS_PAPER_HEIGHT* = "paper-height" + +const PRINT_SETTINGS_PAPER_WIDTH* = "paper-width" + +const PRINT_SETTINGS_PRINTER* = "printer" + +const PRINT_SETTINGS_PRINTER_LPI* = "printer-lpi" + +const PRINT_SETTINGS_PRINT_PAGES* = "print-pages" + +const PRINT_SETTINGS_QUALITY* = "quality" + +const PRINT_SETTINGS_RESOLUTION* = "resolution" + +const PRINT_SETTINGS_RESOLUTION_X* = "resolution-x" + +const PRINT_SETTINGS_RESOLUTION_Y* = "resolution-y" + +const PRINT_SETTINGS_REVERSE* = "reverse" + +const PRINT_SETTINGS_SCALE* = "scale" + +const PRINT_SETTINGS_USE_COLOR* = "use-color" + +const PRINT_SETTINGS_WIN32_DRIVER_EXTRA* = "win32-driver-extra" + +const PRINT_SETTINGS_WIN32_DRIVER_VERSION* = "win32-driver-version" + +const PRIORITY_RESIZE* = 10'i32 + +type + PadActionType* {.size: sizeof(cint), pure.} = enum + button = 0 + ring = 1 + strip = 2 + +type + PadActionEntry00* {.pure.} = object + `type`*: PadActionType + index*: int32 + mode*: int32 + label*: cstring + actionName*: cstring + PadActionEntry* = ref object + impl*: ptr PadActionEntry00 + +type + PadController* = ref object of EventController + PadController00* = object of EventController00 + +proc gtk_pad_controller_new*(window: ptr Window00; group: ptr gio.ActionGroup00; + pad: ptr gdk.Device00): ptr PadController00 {. + importc: "gtk_pad_controller_new", libprag.} + +proc newPadController*(window: Window; group: gio.ActionGroup; pad: gdk.Device): PadController = + new(result, finalizeGObject) + result.impl = gtk_pad_controller_new(cast[ptr Window00](window.impl), cast[ptr gio.ActionGroup00](group.impl), cast[ptr gdk.Device00](pad.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPadController*[T](result: var T; window: Window; group: gio.ActionGroup; pad: gdk.Device) = + assert(result is PadController) + new(result, finalizeGObject) + result.impl = gtk_pad_controller_new(cast[ptr Window00](window.impl), cast[ptr gio.ActionGroup00](group.impl), cast[ptr gdk.Device00](pad.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_pad_controller_set_action*(self: ptr PadController00; `type`: PadActionType; + index: int32; mode: int32; label: cstring; actionName: cstring) {. + importc: "gtk_pad_controller_set_action", libprag.} + +proc setAction*(self: PadController; `type`: PadActionType; index: int; + mode: int; label: string; actionName: string) = + gtk_pad_controller_set_action(cast[ptr PadController00](self.impl), `type`, int32(index), int32(mode), cstring(label), cstring(actionName)) + +proc gtk_pad_controller_set_action_entries*(self: ptr PadController00; entries: PadActionEntry00Array; + nEntries: int32) {. + importc: "gtk_pad_controller_set_action_entries", libprag.} + +proc setActionEntries*(self: PadController; entries: PadActionEntry00Array; + nEntries: int) = + gtk_pad_controller_set_action_entries(cast[ptr PadController00](self.impl), entries, int32(nEntries)) + +type + PadControllerClass00* {.pure.} = object + PadControllerClass* = ref object + impl*: ptr PadControllerClass00 + +type + PageOrientation* {.size: sizeof(cint), pure.} = enum + portrait = 0 + landscape = 1 + reversePortrait = 2 + reverseLandscape = 3 + +type + PageRange00* {.pure.} = object + start*: int32 + `end`*: int32 + PageRange* = ref object + impl*: ptr PageRange00 + +type + PageSet* {.size: sizeof(cint), pure.} = enum + all = 0 + even = 1 + odd = 2 + +type + PageSetup* = ref object of gobject.Object + PageSetup00* = object of gobject.Object00 + +proc gtk_page_setup_new*(): ptr PageSetup00 {. + importc: "gtk_page_setup_new", libprag.} + +proc newPageSetup*(): PageSetup = + new(result, finalizeGObject) + result.impl = gtk_page_setup_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPageSetup*[T](result: var T) = + assert(result is PageSetup) + new(result, finalizeGObject) + result.impl = gtk_page_setup_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_page_setup_new_from_file*(fileName: ucstring): ptr PageSetup00 {. + importc: "gtk_page_setup_new_from_file", libprag.} + +proc newPageSetupFromFile*(fileName: ucstring): PageSetup = + new(result, finalizeGObject) + result.impl = gtk_page_setup_new_from_file(fileName) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPageSetupFromFile*[T](result: var T; fileName: ucstring) = + assert(result is PageSetup) + new(result, finalizeGObject) + result.impl = gtk_page_setup_new_from_file(fileName) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_page_setup_new_from_gvariant*(variant: ptr glib.Variant00): ptr PageSetup00 {. + importc: "gtk_page_setup_new_from_gvariant", libprag.} + +proc newPageSetupFromGvariant*(variant: glib.Variant): PageSetup = + new(result, finalizeGObject) + result.impl = gtk_page_setup_new_from_gvariant(cast[ptr glib.Variant00](variant.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPageSetupFromGvariant*[T](result: var T; variant: glib.Variant) = + assert(result is PageSetup) + new(result, finalizeGObject) + result.impl = gtk_page_setup_new_from_gvariant(cast[ptr glib.Variant00](variant.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_page_setup_new_from_key_file*(keyFile: ptr glib.KeyFile00; groupName: cstring): ptr PageSetup00 {. + importc: "gtk_page_setup_new_from_key_file", libprag.} + +proc newPageSetupFromKeyFile*(keyFile: glib.KeyFile; groupName: string): PageSetup = + new(result, finalizeGObject) + result.impl = gtk_page_setup_new_from_key_file(cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPageSetupFromKeyFile*[T](result: var T; keyFile: glib.KeyFile; groupName: string) = + assert(result is PageSetup) + new(result, finalizeGObject) + result.impl = gtk_page_setup_new_from_key_file(cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_page_setup_copy*(self: ptr PageSetup00): ptr PageSetup00 {. + importc: "gtk_page_setup_copy", libprag.} + +proc copy*(self: PageSetup): PageSetup = + let gobj = gtk_page_setup_copy(cast[ptr PageSetup00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PageSetup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_page_setup_get_orientation*(self: ptr PageSetup00): PageOrientation {. + importc: "gtk_page_setup_get_orientation", libprag.} + +proc getOrientation*(self: PageSetup): PageOrientation = + gtk_page_setup_get_orientation(cast[ptr PageSetup00](self.impl)) + +proc orientation*(self: PageSetup): PageOrientation = + gtk_page_setup_get_orientation(cast[ptr PageSetup00](self.impl)) + +proc gtk_page_setup_load_file*(self: ptr PageSetup00; fileName: ucstring): gboolean {. + importc: "gtk_page_setup_load_file", libprag.} + +proc loadFile*(self: PageSetup; fileName: ucstring): bool = + toBool(gtk_page_setup_load_file(cast[ptr PageSetup00](self.impl), fileName)) + +proc gtk_page_setup_load_key_file*(self: ptr PageSetup00; keyFile: ptr glib.KeyFile00; + groupName: cstring): gboolean {. + importc: "gtk_page_setup_load_key_file", libprag.} + +proc loadKeyFile*(self: PageSetup; keyFile: glib.KeyFile; groupName: string): bool = + toBool(gtk_page_setup_load_key_file(cast[ptr PageSetup00](self.impl), cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName))) + +proc gtk_page_setup_set_orientation*(self: ptr PageSetup00; orientation: PageOrientation) {. + importc: "gtk_page_setup_set_orientation", libprag.} + +proc setOrientation*(self: PageSetup; orientation: PageOrientation) = + gtk_page_setup_set_orientation(cast[ptr PageSetup00](self.impl), orientation) + +proc `orientation=`*(self: PageSetup; orientation: PageOrientation) = + gtk_page_setup_set_orientation(cast[ptr PageSetup00](self.impl), orientation) + +proc gtk_page_setup_to_file*(self: ptr PageSetup00; fileName: ucstring): gboolean {. + importc: "gtk_page_setup_to_file", libprag.} + +proc toFile*(self: PageSetup; fileName: ucstring): bool = + toBool(gtk_page_setup_to_file(cast[ptr PageSetup00](self.impl), fileName)) + +proc gtk_page_setup_to_gvariant*(self: ptr PageSetup00): ptr glib.Variant00 {. + importc: "gtk_page_setup_to_gvariant", libprag.} + +proc toGvariant*(self: PageSetup): glib.Variant = + new(result) + result.impl = gtk_page_setup_to_gvariant(cast[ptr PageSetup00](self.impl)) + +proc gtk_page_setup_to_key_file*(self: ptr PageSetup00; keyFile: ptr glib.KeyFile00; + groupName: cstring) {. + importc: "gtk_page_setup_to_key_file", libprag.} + +proc toKeyFile*(self: PageSetup; keyFile: glib.KeyFile; groupName: string) = + gtk_page_setup_to_key_file(cast[ptr PageSetup00](self.impl), cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName)) + +type + PaperSize00* {.pure.} = object + PaperSize* = ref object + impl*: ptr PaperSize00 + +proc gtk_paper_size_new*(name: cstring): ptr PaperSize00 {. + importc: "gtk_paper_size_new", libprag.} + +proc newPaperSize*(name: string): PaperSize = + new(result) + result.impl = gtk_paper_size_new(cstring(name)) + +proc initPaperSize*[T](result: var T; name: string) = + assert(result is PaperSize) + new(result) + result.impl = gtk_paper_size_new(cstring(name)) + +proc gtk_paper_size_new_from_gvariant*(variant: ptr glib.Variant00): ptr PaperSize00 {. + importc: "gtk_paper_size_new_from_gvariant", libprag.} + +proc newPaperSizeFromGvariant*(variant: glib.Variant): PaperSize = + new(result) + result.impl = gtk_paper_size_new_from_gvariant(cast[ptr glib.Variant00](variant.impl)) + +proc initPaperSizeFromGvariant*[T](result: var T; variant: glib.Variant) = + assert(result is PaperSize) + new(result) + result.impl = gtk_paper_size_new_from_gvariant(cast[ptr glib.Variant00](variant.impl)) + +proc gtk_paper_size_new_from_ipp*(ippName: cstring; width: cdouble; height: cdouble): ptr PaperSize00 {. + importc: "gtk_paper_size_new_from_ipp", libprag.} + +proc newPaperSizeFromIpp*(ippName: string; width: cdouble; height: cdouble): PaperSize = + new(result) + result.impl = gtk_paper_size_new_from_ipp(cstring(ippName), width, height) + +proc initPaperSizeFromIpp*[T](result: var T; ippName: string; width: cdouble; height: cdouble) = + assert(result is PaperSize) + new(result) + result.impl = gtk_paper_size_new_from_ipp(cstring(ippName), width, height) + +proc gtk_paper_size_new_from_key_file*(keyFile: ptr glib.KeyFile00; groupName: cstring): ptr PaperSize00 {. + importc: "gtk_paper_size_new_from_key_file", libprag.} + +proc newPaperSizeFromKeyFile*(keyFile: glib.KeyFile; groupName: string): PaperSize = + new(result) + result.impl = gtk_paper_size_new_from_key_file(cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName)) + +proc initPaperSizeFromKeyFile*[T](result: var T; keyFile: glib.KeyFile; groupName: string) = + assert(result is PaperSize) + new(result) + result.impl = gtk_paper_size_new_from_key_file(cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName)) + +proc gtk_paper_size_new_from_ppd*(ppdName: cstring; ppdDisplayName: cstring; width: cdouble; + height: cdouble): ptr PaperSize00 {. + importc: "gtk_paper_size_new_from_ppd", libprag.} + +proc newPaperSizeFromPpd*(ppdName: string; ppdDisplayName: string; width: cdouble; + height: cdouble): PaperSize = + new(result) + result.impl = gtk_paper_size_new_from_ppd(cstring(ppdName), cstring(ppdDisplayName), width, height) + +proc initPaperSizeFromPpd*[T](result: var T; ppdName: string; ppdDisplayName: string; width: cdouble; + height: cdouble) = + assert(result is PaperSize) + new(result) + result.impl = gtk_paper_size_new_from_ppd(cstring(ppdName), cstring(ppdDisplayName), width, height) + +proc gtk_paper_size_copy*(self: ptr PaperSize00): ptr PaperSize00 {. + importc: "gtk_paper_size_copy", libprag.} + +proc copy*(self: PaperSize): PaperSize = + new(result) + result.impl = gtk_paper_size_copy(cast[ptr PaperSize00](self.impl)) + +proc gtk_paper_size_free*(self: ptr PaperSize00) {. + importc: "gtk_paper_size_free", libprag.} + +proc free*(self: PaperSize) = + gtk_paper_size_free(cast[ptr PaperSize00](self.impl)) + +proc gtk_paper_size_get_display_name*(self: ptr PaperSize00): cstring {. + importc: "gtk_paper_size_get_display_name", libprag.} + +proc getDisplayName*(self: PaperSize): string = + let resul0 = gtk_paper_size_get_display_name(cast[ptr PaperSize00](self.impl)) + result = $resul0 + +proc displayName*(self: PaperSize): string = + let resul0 = gtk_paper_size_get_display_name(cast[ptr PaperSize00](self.impl)) + result = $resul0 + +proc gtk_paper_size_get_name*(self: ptr PaperSize00): cstring {. + importc: "gtk_paper_size_get_name", libprag.} + +proc getName*(self: PaperSize): string = + let resul0 = gtk_paper_size_get_name(cast[ptr PaperSize00](self.impl)) + result = $resul0 + +proc name*(self: PaperSize): string = + let resul0 = gtk_paper_size_get_name(cast[ptr PaperSize00](self.impl)) + result = $resul0 + +proc gtk_paper_size_get_ppd_name*(self: ptr PaperSize00): cstring {. + importc: "gtk_paper_size_get_ppd_name", libprag.} + +proc getPpdName*(self: PaperSize): string = + let resul0 = gtk_paper_size_get_ppd_name(cast[ptr PaperSize00](self.impl)) + result = $resul0 + +proc ppdName*(self: PaperSize): string = + let resul0 = gtk_paper_size_get_ppd_name(cast[ptr PaperSize00](self.impl)) + result = $resul0 + +proc gtk_paper_size_is_custom*(self: ptr PaperSize00): gboolean {. + importc: "gtk_paper_size_is_custom", libprag.} + +proc isCustom*(self: PaperSize): bool = + toBool(gtk_paper_size_is_custom(cast[ptr PaperSize00](self.impl))) + +proc gtk_paper_size_is_equal*(self: ptr PaperSize00; size2: ptr PaperSize00): gboolean {. + importc: "gtk_paper_size_is_equal", libprag.} + +proc isEqual*(self: PaperSize; size2: PaperSize): bool = + toBool(gtk_paper_size_is_equal(cast[ptr PaperSize00](self.impl), cast[ptr PaperSize00](size2.impl))) + +proc gtk_paper_size_is_ipp*(self: ptr PaperSize00): gboolean {. + importc: "gtk_paper_size_is_ipp", libprag.} + +proc isIpp*(self: PaperSize): bool = + toBool(gtk_paper_size_is_ipp(cast[ptr PaperSize00](self.impl))) + +proc gtk_paper_size_to_gvariant*(self: ptr PaperSize00): ptr glib.Variant00 {. + importc: "gtk_paper_size_to_gvariant", libprag.} + +proc toGvariant*(self: PaperSize): glib.Variant = + new(result) + result.impl = gtk_paper_size_to_gvariant(cast[ptr PaperSize00](self.impl)) + +proc gtk_paper_size_to_key_file*(self: ptr PaperSize00; keyFile: ptr glib.KeyFile00; + groupName: cstring) {. + importc: "gtk_paper_size_to_key_file", libprag.} + +proc toKeyFile*(self: PaperSize; keyFile: glib.KeyFile; groupName: string) = + gtk_paper_size_to_key_file(cast[ptr PaperSize00](self.impl), cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName)) + +proc gtk_paper_size_get_default*(): cstring {. + importc: "gtk_paper_size_get_default", libprag.} + +proc getDefault*(): string = + let resul0 = gtk_paper_size_get_default() + result = $resul0 + +proc default*(): string = + let resul0 = gtk_paper_size_get_default() + result = $resul0 + +proc gtk_paper_size_get_paper_sizes*(includeCustom: gboolean): ptr pointer {. + importc: "gtk_paper_size_get_paper_sizes", libprag.} + +proc getPaperSizes*(includeCustom: gboolean): ptr pointer {. + importc: "gtk_paper_size_get_paper_sizes", libprag.} + +proc paperSizes*(includeCustom: gboolean): ptr pointer {. + importc: "gtk_paper_size_get_paper_sizes", libprag.} + +proc gtk_page_setup_get_paper_size*(self: ptr PageSetup00): ptr PaperSize00 {. + importc: "gtk_page_setup_get_paper_size", libprag.} + +proc getPaperSize*(self: PageSetup): PaperSize = + new(result) + result.impl = gtk_page_setup_get_paper_size(cast[ptr PageSetup00](self.impl)) + +proc paperSize*(self: PageSetup): PaperSize = + new(result) + result.impl = gtk_page_setup_get_paper_size(cast[ptr PageSetup00](self.impl)) + +proc gtk_page_setup_set_paper_size*(self: ptr PageSetup00; size: ptr PaperSize00) {. + importc: "gtk_page_setup_set_paper_size", libprag.} + +proc setPaperSize*(self: PageSetup; size: PaperSize) = + gtk_page_setup_set_paper_size(cast[ptr PageSetup00](self.impl), cast[ptr PaperSize00](size.impl)) + +proc `paperSize=`*(self: PageSetup; size: PaperSize) = + gtk_page_setup_set_paper_size(cast[ptr PageSetup00](self.impl), cast[ptr PaperSize00](size.impl)) + +proc gtk_page_setup_set_paper_size_and_default_margins*(self: ptr PageSetup00; size: ptr PaperSize00) {. + importc: "gtk_page_setup_set_paper_size_and_default_margins", libprag.} + +proc setPaperSizeAndDefaultMargins*(self: PageSetup; size: PaperSize) = + gtk_page_setup_set_paper_size_and_default_margins(cast[ptr PageSetup00](self.impl), cast[ptr PaperSize00](size.impl)) + +proc `paperSizeAndDefaultMargins=`*(self: PageSetup; size: PaperSize) = + gtk_page_setup_set_paper_size_and_default_margins(cast[ptr PageSetup00](self.impl), cast[ptr PaperSize00](size.impl)) + +type + Unit* {.size: sizeof(cint), pure.} = enum + none = 0 + points = 1 + inch = 2 + mm = 3 + +proc gtk_page_setup_get_bottom_margin*(self: ptr PageSetup00; unit: Unit): cdouble {. + importc: "gtk_page_setup_get_bottom_margin", libprag.} + +proc getBottomMargin*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_bottom_margin(cast[ptr PageSetup00](self.impl), unit) + +proc bottomMargin*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_bottom_margin(cast[ptr PageSetup00](self.impl), unit) + +proc gtk_page_setup_get_left_margin*(self: ptr PageSetup00; unit: Unit): cdouble {. + importc: "gtk_page_setup_get_left_margin", libprag.} + +proc getLeftMargin*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_left_margin(cast[ptr PageSetup00](self.impl), unit) + +proc leftMargin*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_left_margin(cast[ptr PageSetup00](self.impl), unit) + +proc gtk_page_setup_get_page_height*(self: ptr PageSetup00; unit: Unit): cdouble {. + importc: "gtk_page_setup_get_page_height", libprag.} + +proc getPageHeight*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_page_height(cast[ptr PageSetup00](self.impl), unit) + +proc pageHeight*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_page_height(cast[ptr PageSetup00](self.impl), unit) + +proc gtk_page_setup_get_page_width*(self: ptr PageSetup00; unit: Unit): cdouble {. + importc: "gtk_page_setup_get_page_width", libprag.} + +proc getPageWidth*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_page_width(cast[ptr PageSetup00](self.impl), unit) + +proc pageWidth*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_page_width(cast[ptr PageSetup00](self.impl), unit) + +proc gtk_page_setup_get_paper_height*(self: ptr PageSetup00; unit: Unit): cdouble {. + importc: "gtk_page_setup_get_paper_height", libprag.} + +proc getPaperHeight*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_paper_height(cast[ptr PageSetup00](self.impl), unit) + +proc paperHeight*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_paper_height(cast[ptr PageSetup00](self.impl), unit) + +proc gtk_page_setup_get_paper_width*(self: ptr PageSetup00; unit: Unit): cdouble {. + importc: "gtk_page_setup_get_paper_width", libprag.} + +proc getPaperWidth*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_paper_width(cast[ptr PageSetup00](self.impl), unit) + +proc paperWidth*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_paper_width(cast[ptr PageSetup00](self.impl), unit) + +proc gtk_page_setup_get_right_margin*(self: ptr PageSetup00; unit: Unit): cdouble {. + importc: "gtk_page_setup_get_right_margin", libprag.} + +proc getRightMargin*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_right_margin(cast[ptr PageSetup00](self.impl), unit) + +proc rightMargin*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_right_margin(cast[ptr PageSetup00](self.impl), unit) + +proc gtk_page_setup_get_top_margin*(self: ptr PageSetup00; unit: Unit): cdouble {. + importc: "gtk_page_setup_get_top_margin", libprag.} + +proc getTopMargin*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_top_margin(cast[ptr PageSetup00](self.impl), unit) + +proc topMargin*(self: PageSetup; unit: Unit): cdouble = + gtk_page_setup_get_top_margin(cast[ptr PageSetup00](self.impl), unit) + +proc gtk_page_setup_set_bottom_margin*(self: ptr PageSetup00; margin: cdouble; unit: Unit) {. + importc: "gtk_page_setup_set_bottom_margin", libprag.} + +proc setBottomMargin*(self: PageSetup; margin: cdouble; unit: Unit) = + gtk_page_setup_set_bottom_margin(cast[ptr PageSetup00](self.impl), margin, unit) + +proc gtk_page_setup_set_left_margin*(self: ptr PageSetup00; margin: cdouble; unit: Unit) {. + importc: "gtk_page_setup_set_left_margin", libprag.} + +proc setLeftMargin*(self: PageSetup; margin: cdouble; unit: Unit) = + gtk_page_setup_set_left_margin(cast[ptr PageSetup00](self.impl), margin, unit) + +proc gtk_page_setup_set_right_margin*(self: ptr PageSetup00; margin: cdouble; unit: Unit) {. + importc: "gtk_page_setup_set_right_margin", libprag.} + +proc setRightMargin*(self: PageSetup; margin: cdouble; unit: Unit) = + gtk_page_setup_set_right_margin(cast[ptr PageSetup00](self.impl), margin, unit) + +proc gtk_page_setup_set_top_margin*(self: ptr PageSetup00; margin: cdouble; unit: Unit) {. + importc: "gtk_page_setup_set_top_margin", libprag.} + +proc setTopMargin*(self: PageSetup; margin: cdouble; unit: Unit) = + gtk_page_setup_set_top_margin(cast[ptr PageSetup00](self.impl), margin, unit) + +proc gtk_paper_size_new_custom*(name: cstring; displayName: cstring; width: cdouble; + height: cdouble; unit: Unit): ptr PaperSize00 {. + importc: "gtk_paper_size_new_custom", libprag.} + +proc newPaperSizeCustom*(name: string; displayName: string; width: cdouble; + height: cdouble; unit: Unit): PaperSize = + new(result) + result.impl = gtk_paper_size_new_custom(cstring(name), cstring(displayName), width, height, unit) + +proc initPaperSizeCustom*[T](result: var T; name: string; displayName: string; width: cdouble; + height: cdouble; unit: Unit) = + assert(result is PaperSize) + new(result) + result.impl = gtk_paper_size_new_custom(cstring(name), cstring(displayName), width, height, unit) + +proc gtk_paper_size_get_default_bottom_margin*(self: ptr PaperSize00; unit: Unit): cdouble {. + importc: "gtk_paper_size_get_default_bottom_margin", libprag.} + +proc getDefaultBottomMargin*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_default_bottom_margin(cast[ptr PaperSize00](self.impl), unit) + +proc defaultBottomMargin*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_default_bottom_margin(cast[ptr PaperSize00](self.impl), unit) + +proc gtk_paper_size_get_default_left_margin*(self: ptr PaperSize00; unit: Unit): cdouble {. + importc: "gtk_paper_size_get_default_left_margin", libprag.} + +proc getDefaultLeftMargin*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_default_left_margin(cast[ptr PaperSize00](self.impl), unit) + +proc defaultLeftMargin*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_default_left_margin(cast[ptr PaperSize00](self.impl), unit) + +proc gtk_paper_size_get_default_right_margin*(self: ptr PaperSize00; unit: Unit): cdouble {. + importc: "gtk_paper_size_get_default_right_margin", libprag.} + +proc getDefaultRightMargin*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_default_right_margin(cast[ptr PaperSize00](self.impl), unit) + +proc defaultRightMargin*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_default_right_margin(cast[ptr PaperSize00](self.impl), unit) + +proc gtk_paper_size_get_default_top_margin*(self: ptr PaperSize00; unit: Unit): cdouble {. + importc: "gtk_paper_size_get_default_top_margin", libprag.} + +proc getDefaultTopMargin*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_default_top_margin(cast[ptr PaperSize00](self.impl), unit) + +proc defaultTopMargin*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_default_top_margin(cast[ptr PaperSize00](self.impl), unit) + +proc gtk_paper_size_get_height*(self: ptr PaperSize00; unit: Unit): cdouble {. + importc: "gtk_paper_size_get_height", libprag.} + +proc getHeight*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_height(cast[ptr PaperSize00](self.impl), unit) + +proc height*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_height(cast[ptr PaperSize00](self.impl), unit) + +proc gtk_paper_size_get_width*(self: ptr PaperSize00; unit: Unit): cdouble {. + importc: "gtk_paper_size_get_width", libprag.} + +proc getWidth*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_width(cast[ptr PaperSize00](self.impl), unit) + +proc width*(self: PaperSize; unit: Unit): cdouble = + gtk_paper_size_get_width(cast[ptr PaperSize00](self.impl), unit) + +proc gtk_paper_size_set_size*(self: ptr PaperSize00; width: cdouble; height: cdouble; + unit: Unit) {. + importc: "gtk_paper_size_set_size", libprag.} + +proc setSize*(self: PaperSize; width: cdouble; height: cdouble; + unit: Unit) = + gtk_paper_size_set_size(cast[ptr PaperSize00](self.impl), width, height, unit) + +type + PageSetupDoneFunc* = proc (pageSetup: ptr PageSetup00; data: pointer) {.cdecl.} + +type + PanedAccessiblePrivate00* {.pure.} = object + PanedAccessiblePrivate* = ref object + impl*: ptr PanedAccessiblePrivate00 + +type + PanedAccessible* = ref object of ContainerAccessible + PanedAccessible00* = object of ContainerAccessible00 + priv4: ptr PanedAccessiblePrivate00 + +type + PanedAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + PanedAccessibleClass* = ref object + impl*: ptr PanedAccessibleClass00 + +type + PlacesOpenFlag* {.size: sizeof(cint), pure.} = enum + normal = 1 + newTab = 2 + newWindow = 3 + + PlacesOpenFlags* {.size: sizeof(cint).} = set[PlacesOpenFlag] + +type + ScrolledWindowPrivate00* {.pure.} = object + ScrolledWindowPrivate* = ref object + impl*: ptr ScrolledWindowPrivate00 + +type + ScrolledWindow* = ref object of Bin + ScrolledWindow00* = object of Bin00 + priv4: ptr ScrolledWindowPrivate00 + +proc scEdgeOvershot*(self: ScrolledWindow; p: proc (self: ptr gobject.Object00; pos: PositionType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "edge-overshot", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEdgeReached*(self: ScrolledWindow; p: proc (self: ptr gobject.Object00; pos: PositionType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "edge-reached", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveFocusOut*(self: ScrolledWindow; p: proc (self: ptr gobject.Object00; directionType: DirectionType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-focus-out", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scScrollChild*(self: ScrolledWindow; p: proc (self: ptr gobject.Object00; scroll: ScrollType; horizontal: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "scroll-child", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_scrolled_window_new*(hadjustment: ptr Adjustment00; vadjustment: ptr Adjustment00): ptr ScrolledWindow00 {. + importc: "gtk_scrolled_window_new", libprag.} + +proc newScrolledWindow*(hadjustment: Adjustment; vadjustment: Adjustment): ScrolledWindow = + new(result, finalizeGObject) + result.impl = gtk_scrolled_window_new(cast[ptr Adjustment00](hadjustment.impl), cast[ptr Adjustment00](vadjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initScrolledWindow*[T](result: var T; hadjustment: Adjustment; vadjustment: Adjustment) = + assert(result is ScrolledWindow) + new(result, finalizeGObject) + result.impl = gtk_scrolled_window_new(cast[ptr Adjustment00](hadjustment.impl), cast[ptr Adjustment00](vadjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scrolled_window_add_with_viewport*(self: ptr ScrolledWindow00; child: ptr Widget00) {. + importc: "gtk_scrolled_window_add_with_viewport", libprag.} + +proc addWithViewport*(self: ScrolledWindow; child: Widget) = + gtk_scrolled_window_add_with_viewport(cast[ptr ScrolledWindow00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_scrolled_window_get_capture_button_press*(self: ptr ScrolledWindow00): gboolean {. + importc: "gtk_scrolled_window_get_capture_button_press", libprag.} + +proc getCaptureButtonPress*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_capture_button_press(cast[ptr ScrolledWindow00](self.impl))) + +proc captureButtonPress*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_capture_button_press(cast[ptr ScrolledWindow00](self.impl))) + +proc gtk_scrolled_window_get_hadjustment*(self: ptr ScrolledWindow00): ptr Adjustment00 {. + importc: "gtk_scrolled_window_get_hadjustment", libprag.} + +proc getHadjustment*(self: ScrolledWindow): Adjustment = + let gobj = gtk_scrolled_window_get_hadjustment(cast[ptr ScrolledWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc hadjustment*(self: ScrolledWindow): Adjustment = + let gobj = gtk_scrolled_window_get_hadjustment(cast[ptr ScrolledWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scrolled_window_get_hscrollbar*(self: ptr ScrolledWindow00): ptr Widget00 {. + importc: "gtk_scrolled_window_get_hscrollbar", libprag.} + +proc getHscrollbar*(self: ScrolledWindow): Widget = + let gobj = gtk_scrolled_window_get_hscrollbar(cast[ptr ScrolledWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc hscrollbar*(self: ScrolledWindow): Widget = + let gobj = gtk_scrolled_window_get_hscrollbar(cast[ptr ScrolledWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scrolled_window_get_kinetic_scrolling*(self: ptr ScrolledWindow00): gboolean {. + importc: "gtk_scrolled_window_get_kinetic_scrolling", libprag.} + +proc getKineticScrolling*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_kinetic_scrolling(cast[ptr ScrolledWindow00](self.impl))) + +proc kineticScrolling*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_kinetic_scrolling(cast[ptr ScrolledWindow00](self.impl))) + +proc gtk_scrolled_window_get_max_content_height*(self: ptr ScrolledWindow00): int32 {. + importc: "gtk_scrolled_window_get_max_content_height", libprag.} + +proc getMaxContentHeight*(self: ScrolledWindow): int = + int(gtk_scrolled_window_get_max_content_height(cast[ptr ScrolledWindow00](self.impl))) + +proc maxContentHeight*(self: ScrolledWindow): int = + int(gtk_scrolled_window_get_max_content_height(cast[ptr ScrolledWindow00](self.impl))) + +proc gtk_scrolled_window_get_max_content_width*(self: ptr ScrolledWindow00): int32 {. + importc: "gtk_scrolled_window_get_max_content_width", libprag.} + +proc getMaxContentWidth*(self: ScrolledWindow): int = + int(gtk_scrolled_window_get_max_content_width(cast[ptr ScrolledWindow00](self.impl))) + +proc maxContentWidth*(self: ScrolledWindow): int = + int(gtk_scrolled_window_get_max_content_width(cast[ptr ScrolledWindow00](self.impl))) + +proc gtk_scrolled_window_get_min_content_height*(self: ptr ScrolledWindow00): int32 {. + importc: "gtk_scrolled_window_get_min_content_height", libprag.} + +proc getMinContentHeight*(self: ScrolledWindow): int = + int(gtk_scrolled_window_get_min_content_height(cast[ptr ScrolledWindow00](self.impl))) + +proc minContentHeight*(self: ScrolledWindow): int = + int(gtk_scrolled_window_get_min_content_height(cast[ptr ScrolledWindow00](self.impl))) + +proc gtk_scrolled_window_get_min_content_width*(self: ptr ScrolledWindow00): int32 {. + importc: "gtk_scrolled_window_get_min_content_width", libprag.} + +proc getMinContentWidth*(self: ScrolledWindow): int = + int(gtk_scrolled_window_get_min_content_width(cast[ptr ScrolledWindow00](self.impl))) + +proc minContentWidth*(self: ScrolledWindow): int = + int(gtk_scrolled_window_get_min_content_width(cast[ptr ScrolledWindow00](self.impl))) + +proc gtk_scrolled_window_get_overlay_scrolling*(self: ptr ScrolledWindow00): gboolean {. + importc: "gtk_scrolled_window_get_overlay_scrolling", libprag.} + +proc getOverlayScrolling*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_overlay_scrolling(cast[ptr ScrolledWindow00](self.impl))) + +proc overlayScrolling*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_overlay_scrolling(cast[ptr ScrolledWindow00](self.impl))) + +proc gtk_scrolled_window_get_placement*(self: ptr ScrolledWindow00): CornerType {. + importc: "gtk_scrolled_window_get_placement", libprag.} + +proc getPlacement*(self: ScrolledWindow): CornerType = + gtk_scrolled_window_get_placement(cast[ptr ScrolledWindow00](self.impl)) + +proc placement*(self: ScrolledWindow): CornerType = + gtk_scrolled_window_get_placement(cast[ptr ScrolledWindow00](self.impl)) + +proc gtk_scrolled_window_get_propagate_natural_height*(self: ptr ScrolledWindow00): gboolean {. + importc: "gtk_scrolled_window_get_propagate_natural_height", libprag.} + +proc getPropagateNaturalHeight*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_propagate_natural_height(cast[ptr ScrolledWindow00](self.impl))) + +proc propagateNaturalHeight*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_propagate_natural_height(cast[ptr ScrolledWindow00](self.impl))) + +proc gtk_scrolled_window_get_propagate_natural_width*(self: ptr ScrolledWindow00): gboolean {. + importc: "gtk_scrolled_window_get_propagate_natural_width", libprag.} + +proc getPropagateNaturalWidth*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_propagate_natural_width(cast[ptr ScrolledWindow00](self.impl))) + +proc propagateNaturalWidth*(self: ScrolledWindow): bool = + toBool(gtk_scrolled_window_get_propagate_natural_width(cast[ptr ScrolledWindow00](self.impl))) + +proc gtk_scrolled_window_get_shadow_type*(self: ptr ScrolledWindow00): ShadowType {. + importc: "gtk_scrolled_window_get_shadow_type", libprag.} + +proc getShadowType*(self: ScrolledWindow): ShadowType = + gtk_scrolled_window_get_shadow_type(cast[ptr ScrolledWindow00](self.impl)) + +proc shadowType*(self: ScrolledWindow): ShadowType = + gtk_scrolled_window_get_shadow_type(cast[ptr ScrolledWindow00](self.impl)) + +proc gtk_scrolled_window_get_vadjustment*(self: ptr ScrolledWindow00): ptr Adjustment00 {. + importc: "gtk_scrolled_window_get_vadjustment", libprag.} + +proc getVadjustment*(self: ScrolledWindow): Adjustment = + let gobj = gtk_scrolled_window_get_vadjustment(cast[ptr ScrolledWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc vadjustment*(self: ScrolledWindow): Adjustment = + let gobj = gtk_scrolled_window_get_vadjustment(cast[ptr ScrolledWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scrolled_window_get_vscrollbar*(self: ptr ScrolledWindow00): ptr Widget00 {. + importc: "gtk_scrolled_window_get_vscrollbar", libprag.} + +proc getVscrollbar*(self: ScrolledWindow): Widget = + let gobj = gtk_scrolled_window_get_vscrollbar(cast[ptr ScrolledWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc vscrollbar*(self: ScrolledWindow): Widget = + let gobj = gtk_scrolled_window_get_vscrollbar(cast[ptr ScrolledWindow00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scrolled_window_set_capture_button_press*(self: ptr ScrolledWindow00; captureButtonPress: gboolean) {. + importc: "gtk_scrolled_window_set_capture_button_press", libprag.} + +proc setCaptureButtonPress*(self: ScrolledWindow; captureButtonPress: bool) = + gtk_scrolled_window_set_capture_button_press(cast[ptr ScrolledWindow00](self.impl), gboolean(captureButtonPress)) + +proc `captureButtonPress=`*(self: ScrolledWindow; captureButtonPress: bool) = + gtk_scrolled_window_set_capture_button_press(cast[ptr ScrolledWindow00](self.impl), gboolean(captureButtonPress)) + +proc gtk_scrolled_window_set_hadjustment*(self: ptr ScrolledWindow00; hadjustment: ptr Adjustment00) {. + importc: "gtk_scrolled_window_set_hadjustment", libprag.} + +proc setHadjustment*(self: ScrolledWindow; hadjustment: Adjustment) = + gtk_scrolled_window_set_hadjustment(cast[ptr ScrolledWindow00](self.impl), cast[ptr Adjustment00](hadjustment.impl)) + +proc `hadjustment=`*(self: ScrolledWindow; hadjustment: Adjustment) = + gtk_scrolled_window_set_hadjustment(cast[ptr ScrolledWindow00](self.impl), cast[ptr Adjustment00](hadjustment.impl)) + +proc gtk_scrolled_window_set_kinetic_scrolling*(self: ptr ScrolledWindow00; kineticScrolling: gboolean) {. + importc: "gtk_scrolled_window_set_kinetic_scrolling", libprag.} + +proc setKineticScrolling*(self: ScrolledWindow; kineticScrolling: bool) = + gtk_scrolled_window_set_kinetic_scrolling(cast[ptr ScrolledWindow00](self.impl), gboolean(kineticScrolling)) + +proc `kineticScrolling=`*(self: ScrolledWindow; kineticScrolling: bool) = + gtk_scrolled_window_set_kinetic_scrolling(cast[ptr ScrolledWindow00](self.impl), gboolean(kineticScrolling)) + +proc gtk_scrolled_window_set_max_content_height*(self: ptr ScrolledWindow00; height: int32) {. + importc: "gtk_scrolled_window_set_max_content_height", libprag.} + +proc setMaxContentHeight*(self: ScrolledWindow; height: int) = + gtk_scrolled_window_set_max_content_height(cast[ptr ScrolledWindow00](self.impl), int32(height)) + +proc `maxContentHeight=`*(self: ScrolledWindow; height: int) = + gtk_scrolled_window_set_max_content_height(cast[ptr ScrolledWindow00](self.impl), int32(height)) + +proc gtk_scrolled_window_set_max_content_width*(self: ptr ScrolledWindow00; width: int32) {. + importc: "gtk_scrolled_window_set_max_content_width", libprag.} + +proc setMaxContentWidth*(self: ScrolledWindow; width: int) = + gtk_scrolled_window_set_max_content_width(cast[ptr ScrolledWindow00](self.impl), int32(width)) + +proc `maxContentWidth=`*(self: ScrolledWindow; width: int) = + gtk_scrolled_window_set_max_content_width(cast[ptr ScrolledWindow00](self.impl), int32(width)) + +proc gtk_scrolled_window_set_min_content_height*(self: ptr ScrolledWindow00; height: int32) {. + importc: "gtk_scrolled_window_set_min_content_height", libprag.} + +proc setMinContentHeight*(self: ScrolledWindow; height: int) = + gtk_scrolled_window_set_min_content_height(cast[ptr ScrolledWindow00](self.impl), int32(height)) + +proc `minContentHeight=`*(self: ScrolledWindow; height: int) = + gtk_scrolled_window_set_min_content_height(cast[ptr ScrolledWindow00](self.impl), int32(height)) + +proc gtk_scrolled_window_set_min_content_width*(self: ptr ScrolledWindow00; width: int32) {. + importc: "gtk_scrolled_window_set_min_content_width", libprag.} + +proc setMinContentWidth*(self: ScrolledWindow; width: int) = + gtk_scrolled_window_set_min_content_width(cast[ptr ScrolledWindow00](self.impl), int32(width)) + +proc `minContentWidth=`*(self: ScrolledWindow; width: int) = + gtk_scrolled_window_set_min_content_width(cast[ptr ScrolledWindow00](self.impl), int32(width)) + +proc gtk_scrolled_window_set_overlay_scrolling*(self: ptr ScrolledWindow00; overlayScrolling: gboolean) {. + importc: "gtk_scrolled_window_set_overlay_scrolling", libprag.} + +proc setOverlayScrolling*(self: ScrolledWindow; overlayScrolling: bool) = + gtk_scrolled_window_set_overlay_scrolling(cast[ptr ScrolledWindow00](self.impl), gboolean(overlayScrolling)) + +proc `overlayScrolling=`*(self: ScrolledWindow; overlayScrolling: bool) = + gtk_scrolled_window_set_overlay_scrolling(cast[ptr ScrolledWindow00](self.impl), gboolean(overlayScrolling)) + +proc gtk_scrolled_window_set_placement*(self: ptr ScrolledWindow00; windowPlacement: CornerType) {. + importc: "gtk_scrolled_window_set_placement", libprag.} + +proc setPlacement*(self: ScrolledWindow; windowPlacement: CornerType) = + gtk_scrolled_window_set_placement(cast[ptr ScrolledWindow00](self.impl), windowPlacement) + +proc `placement=`*(self: ScrolledWindow; windowPlacement: CornerType) = + gtk_scrolled_window_set_placement(cast[ptr ScrolledWindow00](self.impl), windowPlacement) + +proc gtk_scrolled_window_set_propagate_natural_height*(self: ptr ScrolledWindow00; propagate: gboolean) {. + importc: "gtk_scrolled_window_set_propagate_natural_height", libprag.} + +proc setPropagateNaturalHeight*(self: ScrolledWindow; propagate: bool) = + gtk_scrolled_window_set_propagate_natural_height(cast[ptr ScrolledWindow00](self.impl), gboolean(propagate)) + +proc `propagateNaturalHeight=`*(self: ScrolledWindow; propagate: bool) = + gtk_scrolled_window_set_propagate_natural_height(cast[ptr ScrolledWindow00](self.impl), gboolean(propagate)) + +proc gtk_scrolled_window_set_propagate_natural_width*(self: ptr ScrolledWindow00; propagate: gboolean) {. + importc: "gtk_scrolled_window_set_propagate_natural_width", libprag.} + +proc setPropagateNaturalWidth*(self: ScrolledWindow; propagate: bool) = + gtk_scrolled_window_set_propagate_natural_width(cast[ptr ScrolledWindow00](self.impl), gboolean(propagate)) + +proc `propagateNaturalWidth=`*(self: ScrolledWindow; propagate: bool) = + gtk_scrolled_window_set_propagate_natural_width(cast[ptr ScrolledWindow00](self.impl), gboolean(propagate)) + +proc gtk_scrolled_window_set_shadow_type*(self: ptr ScrolledWindow00; `type`: ShadowType) {. + importc: "gtk_scrolled_window_set_shadow_type", libprag.} + +proc setShadowType*(self: ScrolledWindow; `type`: ShadowType) = + gtk_scrolled_window_set_shadow_type(cast[ptr ScrolledWindow00](self.impl), `type`) + +proc `shadowType=`*(self: ScrolledWindow; `type`: ShadowType) = + gtk_scrolled_window_set_shadow_type(cast[ptr ScrolledWindow00](self.impl), `type`) + +proc gtk_scrolled_window_set_vadjustment*(self: ptr ScrolledWindow00; vadjustment: ptr Adjustment00) {. + importc: "gtk_scrolled_window_set_vadjustment", libprag.} + +proc setVadjustment*(self: ScrolledWindow; vadjustment: Adjustment) = + gtk_scrolled_window_set_vadjustment(cast[ptr ScrolledWindow00](self.impl), cast[ptr Adjustment00](vadjustment.impl)) + +proc `vadjustment=`*(self: ScrolledWindow; vadjustment: Adjustment) = + gtk_scrolled_window_set_vadjustment(cast[ptr ScrolledWindow00](self.impl), cast[ptr Adjustment00](vadjustment.impl)) + +proc gtk_scrolled_window_unset_placement*(self: ptr ScrolledWindow00) {. + importc: "gtk_scrolled_window_unset_placement", libprag.} + +proc unsetPlacement*(self: ScrolledWindow) = + gtk_scrolled_window_unset_placement(cast[ptr ScrolledWindow00](self.impl)) + +type + PlacesSidebar* = ref object of ScrolledWindow + PlacesSidebar00* = object of ScrolledWindow00 + +proc scDragActionAsk*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; actions: int32; xdata: pointer): int32 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-action-ask", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragActionRequested*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; context: gdk.DragContext00; destFile: gio.File00; + sourceFileList: ptr pointer; xdata: pointer): int32 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-action-requested", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDragPerformDrop*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; destFile: gio.File00; sourceFileList: ptr pointer; + action: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "drag-perform-drop", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMount*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; mountOperation: gio.MountOperation00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "mount", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scOpenLocation*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; location: gio.File00; openFlags: PlacesOpenFlags; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "open-location", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopulatePopup*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; container: Widget00; selectedItem: gio.File00; selectedVolume: gio.Volume00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "populate-popup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShowConnectToServer*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-connect-to-server", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShowEnterLocation*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-enter-location", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShowErrorMessage*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; primary: cstring; secondary: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-error-message", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShowOtherLocations*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-other-locations", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scShowOtherLocationsWithFlags*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; openFlags: PlacesOpenFlags; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "show-other-locations-with-flags", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUnmount*(self: PlacesSidebar; p: proc (self: ptr gobject.Object00; mountOperation: gio.MountOperation00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "unmount", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_places_sidebar_new*(): ptr PlacesSidebar00 {. + importc: "gtk_places_sidebar_new", libprag.} + +proc newPlacesSidebar*(): PlacesSidebar = + new(result, finalizeGObject) + result.impl = gtk_places_sidebar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPlacesSidebar*[T](result: var T) = + assert(result is PlacesSidebar) + new(result, finalizeGObject) + result.impl = gtk_places_sidebar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_places_sidebar_add_shortcut*(self: ptr PlacesSidebar00; location: ptr gio.File00) {. + importc: "gtk_places_sidebar_add_shortcut", libprag.} + +proc addShortcut*(self: PlacesSidebar; location: gio.File) = + gtk_places_sidebar_add_shortcut(cast[ptr PlacesSidebar00](self.impl), cast[ptr gio.File00](location.impl)) + +proc gtk_places_sidebar_get_local_only*(self: ptr PlacesSidebar00): gboolean {. + importc: "gtk_places_sidebar_get_local_only", libprag.} + +proc getLocalOnly*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_local_only(cast[ptr PlacesSidebar00](self.impl))) + +proc localOnly*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_local_only(cast[ptr PlacesSidebar00](self.impl))) + +proc gtk_places_sidebar_get_location*(self: ptr PlacesSidebar00): ptr gio.File00 {. + importc: "gtk_places_sidebar_get_location", libprag.} + +proc getLocation*(self: PlacesSidebar): gio.File = + new(result) + result.impl = gtk_places_sidebar_get_location(cast[ptr PlacesSidebar00](self.impl)) + +proc location*(self: PlacesSidebar): gio.File = + new(result) + result.impl = gtk_places_sidebar_get_location(cast[ptr PlacesSidebar00](self.impl)) + +proc gtk_places_sidebar_get_nth_bookmark*(self: ptr PlacesSidebar00; n: int32): ptr gio.File00 {. + importc: "gtk_places_sidebar_get_nth_bookmark", libprag.} + +proc getNthBookmark*(self: PlacesSidebar; n: int): gio.File = + new(result) + result.impl = gtk_places_sidebar_get_nth_bookmark(cast[ptr PlacesSidebar00](self.impl), int32(n)) + +proc nthBookmark*(self: PlacesSidebar; n: int): gio.File = + new(result) + result.impl = gtk_places_sidebar_get_nth_bookmark(cast[ptr PlacesSidebar00](self.impl), int32(n)) + +proc gtk_places_sidebar_get_open_flags*(self: ptr PlacesSidebar00): PlacesOpenFlags {. + importc: "gtk_places_sidebar_get_open_flags", libprag.} + +proc getOpenFlags*(self: PlacesSidebar): PlacesOpenFlags = + gtk_places_sidebar_get_open_flags(cast[ptr PlacesSidebar00](self.impl)) + +proc openFlags*(self: PlacesSidebar): PlacesOpenFlags = + gtk_places_sidebar_get_open_flags(cast[ptr PlacesSidebar00](self.impl)) + +proc gtk_places_sidebar_get_show_connect_to_server*(self: ptr PlacesSidebar00): gboolean {. + importc: "gtk_places_sidebar_get_show_connect_to_server", libprag.} + +proc getShowConnectToServer*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_connect_to_server(cast[ptr PlacesSidebar00](self.impl))) + +proc showConnectToServer*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_connect_to_server(cast[ptr PlacesSidebar00](self.impl))) + +proc gtk_places_sidebar_get_show_desktop*(self: ptr PlacesSidebar00): gboolean {. + importc: "gtk_places_sidebar_get_show_desktop", libprag.} + +proc getShowDesktop*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_desktop(cast[ptr PlacesSidebar00](self.impl))) + +proc showDesktop*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_desktop(cast[ptr PlacesSidebar00](self.impl))) + +proc gtk_places_sidebar_get_show_enter_location*(self: ptr PlacesSidebar00): gboolean {. + importc: "gtk_places_sidebar_get_show_enter_location", libprag.} + +proc getShowEnterLocation*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_enter_location(cast[ptr PlacesSidebar00](self.impl))) + +proc showEnterLocation*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_enter_location(cast[ptr PlacesSidebar00](self.impl))) + +proc gtk_places_sidebar_get_show_other_locations*(self: ptr PlacesSidebar00): gboolean {. + importc: "gtk_places_sidebar_get_show_other_locations", libprag.} + +proc getShowOtherLocations*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_other_locations(cast[ptr PlacesSidebar00](self.impl))) + +proc showOtherLocations*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_other_locations(cast[ptr PlacesSidebar00](self.impl))) + +proc gtk_places_sidebar_get_show_recent*(self: ptr PlacesSidebar00): gboolean {. + importc: "gtk_places_sidebar_get_show_recent", libprag.} + +proc getShowRecent*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_recent(cast[ptr PlacesSidebar00](self.impl))) + +proc showRecent*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_recent(cast[ptr PlacesSidebar00](self.impl))) + +proc gtk_places_sidebar_get_show_trash*(self: ptr PlacesSidebar00): gboolean {. + importc: "gtk_places_sidebar_get_show_trash", libprag.} + +proc getShowTrash*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_trash(cast[ptr PlacesSidebar00](self.impl))) + +proc showTrash*(self: PlacesSidebar): bool = + toBool(gtk_places_sidebar_get_show_trash(cast[ptr PlacesSidebar00](self.impl))) + +proc gtk_places_sidebar_list_shortcuts*(self: ptr PlacesSidebar00): ptr pointer {. + importc: "gtk_places_sidebar_list_shortcuts", libprag.} + +proc listShortcuts*(self: PlacesSidebar): ptr pointer = + gtk_places_sidebar_list_shortcuts(cast[ptr PlacesSidebar00](self.impl)) + +proc gtk_places_sidebar_remove_shortcut*(self: ptr PlacesSidebar00; location: ptr gio.File00) {. + importc: "gtk_places_sidebar_remove_shortcut", libprag.} + +proc removeShortcut*(self: PlacesSidebar; location: gio.File) = + gtk_places_sidebar_remove_shortcut(cast[ptr PlacesSidebar00](self.impl), cast[ptr gio.File00](location.impl)) + +proc gtk_places_sidebar_set_drop_targets_visible*(self: ptr PlacesSidebar00; visible: gboolean; context: ptr gdk.DragContext00) {. + importc: "gtk_places_sidebar_set_drop_targets_visible", libprag.} + +proc setDropTargetsVisible*(self: PlacesSidebar; visible: bool; context: gdk.DragContext) = + gtk_places_sidebar_set_drop_targets_visible(cast[ptr PlacesSidebar00](self.impl), gboolean(visible), cast[ptr gdk.DragContext00](context.impl)) + +proc gtk_places_sidebar_set_local_only*(self: ptr PlacesSidebar00; localOnly: gboolean) {. + importc: "gtk_places_sidebar_set_local_only", libprag.} + +proc setLocalOnly*(self: PlacesSidebar; localOnly: bool) = + gtk_places_sidebar_set_local_only(cast[ptr PlacesSidebar00](self.impl), gboolean(localOnly)) + +proc `localOnly=`*(self: PlacesSidebar; localOnly: bool) = + gtk_places_sidebar_set_local_only(cast[ptr PlacesSidebar00](self.impl), gboolean(localOnly)) + +proc gtk_places_sidebar_set_location*(self: ptr PlacesSidebar00; location: ptr gio.File00) {. + importc: "gtk_places_sidebar_set_location", libprag.} + +proc setLocation*(self: PlacesSidebar; location: gio.File) = + gtk_places_sidebar_set_location(cast[ptr PlacesSidebar00](self.impl), cast[ptr gio.File00](location.impl)) + +proc `location=`*(self: PlacesSidebar; location: gio.File) = + gtk_places_sidebar_set_location(cast[ptr PlacesSidebar00](self.impl), cast[ptr gio.File00](location.impl)) + +proc gtk_places_sidebar_set_open_flags*(self: ptr PlacesSidebar00; flags: PlacesOpenFlags) {. + importc: "gtk_places_sidebar_set_open_flags", libprag.} + +proc setOpenFlags*(self: PlacesSidebar; flags: PlacesOpenFlags) = + gtk_places_sidebar_set_open_flags(cast[ptr PlacesSidebar00](self.impl), flags) + +proc `openFlags=`*(self: PlacesSidebar; flags: PlacesOpenFlags) = + gtk_places_sidebar_set_open_flags(cast[ptr PlacesSidebar00](self.impl), flags) + +proc gtk_places_sidebar_set_show_connect_to_server*(self: ptr PlacesSidebar00; showConnectToServer: gboolean) {. + importc: "gtk_places_sidebar_set_show_connect_to_server", libprag.} + +proc setShowConnectToServer*(self: PlacesSidebar; showConnectToServer: bool) = + gtk_places_sidebar_set_show_connect_to_server(cast[ptr PlacesSidebar00](self.impl), gboolean(showConnectToServer)) + +proc `showConnectToServer=`*(self: PlacesSidebar; showConnectToServer: bool) = + gtk_places_sidebar_set_show_connect_to_server(cast[ptr PlacesSidebar00](self.impl), gboolean(showConnectToServer)) + +proc gtk_places_sidebar_set_show_desktop*(self: ptr PlacesSidebar00; showDesktop: gboolean) {. + importc: "gtk_places_sidebar_set_show_desktop", libprag.} + +proc setShowDesktop*(self: PlacesSidebar; showDesktop: bool) = + gtk_places_sidebar_set_show_desktop(cast[ptr PlacesSidebar00](self.impl), gboolean(showDesktop)) + +proc `showDesktop=`*(self: PlacesSidebar; showDesktop: bool) = + gtk_places_sidebar_set_show_desktop(cast[ptr PlacesSidebar00](self.impl), gboolean(showDesktop)) + +proc gtk_places_sidebar_set_show_enter_location*(self: ptr PlacesSidebar00; showEnterLocation: gboolean) {. + importc: "gtk_places_sidebar_set_show_enter_location", libprag.} + +proc setShowEnterLocation*(self: PlacesSidebar; showEnterLocation: bool) = + gtk_places_sidebar_set_show_enter_location(cast[ptr PlacesSidebar00](self.impl), gboolean(showEnterLocation)) + +proc `showEnterLocation=`*(self: PlacesSidebar; showEnterLocation: bool) = + gtk_places_sidebar_set_show_enter_location(cast[ptr PlacesSidebar00](self.impl), gboolean(showEnterLocation)) + +proc gtk_places_sidebar_set_show_other_locations*(self: ptr PlacesSidebar00; showOtherLocations: gboolean) {. + importc: "gtk_places_sidebar_set_show_other_locations", libprag.} + +proc setShowOtherLocations*(self: PlacesSidebar; showOtherLocations: bool) = + gtk_places_sidebar_set_show_other_locations(cast[ptr PlacesSidebar00](self.impl), gboolean(showOtherLocations)) + +proc `showOtherLocations=`*(self: PlacesSidebar; showOtherLocations: bool) = + gtk_places_sidebar_set_show_other_locations(cast[ptr PlacesSidebar00](self.impl), gboolean(showOtherLocations)) + +proc gtk_places_sidebar_set_show_recent*(self: ptr PlacesSidebar00; showRecent: gboolean) {. + importc: "gtk_places_sidebar_set_show_recent", libprag.} + +proc setShowRecent*(self: PlacesSidebar; showRecent: bool) = + gtk_places_sidebar_set_show_recent(cast[ptr PlacesSidebar00](self.impl), gboolean(showRecent)) + +proc `showRecent=`*(self: PlacesSidebar; showRecent: bool) = + gtk_places_sidebar_set_show_recent(cast[ptr PlacesSidebar00](self.impl), gboolean(showRecent)) + +proc gtk_places_sidebar_set_show_trash*(self: ptr PlacesSidebar00; showTrash: gboolean) {. + importc: "gtk_places_sidebar_set_show_trash", libprag.} + +proc setShowTrash*(self: PlacesSidebar; showTrash: bool) = + gtk_places_sidebar_set_show_trash(cast[ptr PlacesSidebar00](self.impl), gboolean(showTrash)) + +proc `showTrash=`*(self: PlacesSidebar; showTrash: bool) = + gtk_places_sidebar_set_show_trash(cast[ptr PlacesSidebar00](self.impl), gboolean(showTrash)) + +type + PolicyType* {.size: sizeof(cint), pure.} = enum + always = 0 + automatic = 1 + never = 2 + external = 3 + +proc gtk_scrolled_window_get_policy*(self: ptr ScrolledWindow00; hscrollbarPolicy: var PolicyType; + vscrollbarPolicy: var PolicyType) {. + importc: "gtk_scrolled_window_get_policy", libprag.} + +proc getPolicy*(self: ScrolledWindow; hscrollbarPolicy: var PolicyType; + vscrollbarPolicy: var PolicyType) = + gtk_scrolled_window_get_policy(cast[ptr ScrolledWindow00](self.impl), hscrollbarPolicy, vscrollbarPolicy) + +proc policy*(self: ScrolledWindow; hscrollbarPolicy: var PolicyType; + vscrollbarPolicy: var PolicyType) = + gtk_scrolled_window_get_policy(cast[ptr ScrolledWindow00](self.impl), hscrollbarPolicy, vscrollbarPolicy) + +proc gtk_scrolled_window_set_policy*(self: ptr ScrolledWindow00; hscrollbarPolicy: PolicyType; + vscrollbarPolicy: PolicyType) {. + importc: "gtk_scrolled_window_set_policy", libprag.} + +proc setPolicy*(self: ScrolledWindow; hscrollbarPolicy: PolicyType; + vscrollbarPolicy: PolicyType) = + gtk_scrolled_window_set_policy(cast[ptr ScrolledWindow00](self.impl), hscrollbarPolicy, vscrollbarPolicy) + +type + PlacesSidebarClass00* {.pure.} = object + PlacesSidebarClass* = ref object + impl*: ptr PlacesSidebarClass00 + +type + PlugPrivate00* {.pure.} = object + PlugPrivate* = ref object + impl*: ptr PlugPrivate00 + +type + Plug* = ref object of Window + Plug00* = object of Window00 + priv5: ptr PlugPrivate00 + +proc scEmbedded*(self: Plug; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "embedded", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_plug_new*(socketId: uint64): ptr Plug00 {. + importc: "gtk_plug_new", libprag.} + +proc newPlug*(socketId: uint64): Plug = + new(result, finalizeGObject) + result.impl = gtk_plug_new(socketId) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPlug*[T](result: var T; socketId: uint64) = + assert(result is Plug) + new(result, finalizeGObject) + result.impl = gtk_plug_new(socketId) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_plug_new_for_display*(display: ptr gdk.Display00; socketId: uint64): ptr Plug00 {. + importc: "gtk_plug_new_for_display", libprag.} + +proc newPlugForDisplay*(display: gdk.Display; socketId: uint64): Plug = + new(result, finalizeGObject) + result.impl = gtk_plug_new_for_display(cast[ptr gdk.Display00](display.impl), socketId) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPlugForDisplay*[T](result: var T; display: gdk.Display; socketId: uint64) = + assert(result is Plug) + new(result, finalizeGObject) + result.impl = gtk_plug_new_for_display(cast[ptr gdk.Display00](display.impl), socketId) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_plug_construct*(self: ptr Plug00; socketId: uint64) {. + importc: "gtk_plug_construct", libprag.} + +proc construct*(self: Plug; socketId: uint64) = + gtk_plug_construct(cast[ptr Plug00](self.impl), socketId) + +proc gtk_plug_construct_for_display*(self: ptr Plug00; display: ptr gdk.Display00; socketId: uint64) {. + importc: "gtk_plug_construct_for_display", libprag.} + +proc constructForDisplay*(self: Plug; display: gdk.Display; socketId: uint64) = + gtk_plug_construct_for_display(cast[ptr Plug00](self.impl), cast[ptr gdk.Display00](display.impl), socketId) + +proc gtk_plug_get_embedded*(self: ptr Plug00): gboolean {. + importc: "gtk_plug_get_embedded", libprag.} + +proc getEmbedded*(self: Plug): bool = + toBool(gtk_plug_get_embedded(cast[ptr Plug00](self.impl))) + +proc embedded*(self: Plug): bool = + toBool(gtk_plug_get_embedded(cast[ptr Plug00](self.impl))) + +proc gtk_plug_get_id*(self: ptr Plug00): uint64 {. + importc: "gtk_plug_get_id", libprag.} + +proc getId*(self: Plug): uint64 = + gtk_plug_get_id(cast[ptr Plug00](self.impl)) + +proc id*(self: Plug): uint64 = + gtk_plug_get_id(cast[ptr Plug00](self.impl)) + +proc gtk_plug_get_socket_window*(self: ptr Plug00): ptr gdk.Window00 {. + importc: "gtk_plug_get_socket_window", libprag.} + +proc getSocketWindow*(self: Plug): gdk.Window = + let gobj = gtk_plug_get_socket_window(cast[ptr Plug00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc socketWindow*(self: Plug): gdk.Window = + let gobj = gtk_plug_get_socket_window(cast[ptr Plug00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PlugClass00* {.pure.} = object + parentClass*: WindowClass00 + embedded*: proc(plug: ptr Plug00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + PlugClass* = ref object + impl*: ptr PlugClass00 + +type + PopoverAccessible* = ref object of ContainerAccessible + PopoverAccessible00* = object of ContainerAccessible00 + +type + PopoverAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + PopoverAccessibleClass* = ref object + impl*: ptr PopoverAccessibleClass00 + +type + PopoverClass00* {.pure.} = object + parentClass*: BinClass00 + closed*: proc(popover: ptr Popover00) {.cdecl.} + reserved*: array[10, pointer] + PopoverClass* = ref object + impl*: ptr PopoverClass00 + +type + PopoverMenu* = ref object of Popover + PopoverMenu00* = object of Popover00 + +proc gtk_popover_menu_new*(): ptr PopoverMenu00 {. + importc: "gtk_popover_menu_new", libprag.} + +proc newPopoverMenu*(): PopoverMenu = + new(result, finalizeGObject) + result.impl = gtk_popover_menu_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPopoverMenu*[T](result: var T) = + assert(result is PopoverMenu) + new(result, finalizeGObject) + result.impl = gtk_popover_menu_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_popover_menu_open_submenu*(self: ptr PopoverMenu00; name: cstring) {. + importc: "gtk_popover_menu_open_submenu", libprag.} + +proc openSubmenu*(self: PopoverMenu; name: string) = + gtk_popover_menu_open_submenu(cast[ptr PopoverMenu00](self.impl), cstring(name)) + +type + PopoverMenuClass00* {.pure.} = object + parentClass*: PopoverClass00 + reserved*: array[10, pointer] + PopoverMenuClass* = ref object + impl*: ptr PopoverMenuClass00 + +type + PrintContext* = ref object of gobject.Object + PrintContext00* = object of gobject.Object00 + +proc gtk_print_context_create_pango_context*(self: ptr PrintContext00): ptr pango.Context00 {. + importc: "gtk_print_context_create_pango_context", libprag.} + +proc createPangoContext*(self: PrintContext): pango.Context = + let gobj = gtk_print_context_create_pango_context(cast[ptr PrintContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_context_create_pango_layout*(self: ptr PrintContext00): ptr pango.Layout00 {. + importc: "gtk_print_context_create_pango_layout", libprag.} + +proc createPangoLayout*(self: PrintContext): pango.Layout = + let gobj = gtk_print_context_create_pango_layout(cast[ptr PrintContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_context_get_cairo_context*(self: ptr PrintContext00): ptr cairo.Context00 {. + importc: "gtk_print_context_get_cairo_context", libprag.} + +proc getCairoContext*(self: PrintContext): cairo.Context = + new(result) + result.impl = gtk_print_context_get_cairo_context(cast[ptr PrintContext00](self.impl)) + +proc cairoContext*(self: PrintContext): cairo.Context = + new(result) + result.impl = gtk_print_context_get_cairo_context(cast[ptr PrintContext00](self.impl)) + +proc gtk_print_context_get_dpi_x*(self: ptr PrintContext00): cdouble {. + importc: "gtk_print_context_get_dpi_x", libprag.} + +proc getDpiX*(self: PrintContext): cdouble = + gtk_print_context_get_dpi_x(cast[ptr PrintContext00](self.impl)) + +proc dpiX*(self: PrintContext): cdouble = + gtk_print_context_get_dpi_x(cast[ptr PrintContext00](self.impl)) + +proc gtk_print_context_get_dpi_y*(self: ptr PrintContext00): cdouble {. + importc: "gtk_print_context_get_dpi_y", libprag.} + +proc getDpiY*(self: PrintContext): cdouble = + gtk_print_context_get_dpi_y(cast[ptr PrintContext00](self.impl)) + +proc dpiY*(self: PrintContext): cdouble = + gtk_print_context_get_dpi_y(cast[ptr PrintContext00](self.impl)) + +proc gtk_print_context_get_hard_margins*(self: ptr PrintContext00; top: var cdouble; bottom: var cdouble; + left: var cdouble; right: var cdouble): gboolean {. + importc: "gtk_print_context_get_hard_margins", libprag.} + +proc getHardMargins*(self: PrintContext; top: var cdouble; bottom: var cdouble; + left: var cdouble; right: var cdouble): bool = + toBool(gtk_print_context_get_hard_margins(cast[ptr PrintContext00](self.impl), top, bottom, left, right)) + +proc hardMargins*(self: PrintContext; top: var cdouble; bottom: var cdouble; + left: var cdouble; right: var cdouble): bool = + toBool(gtk_print_context_get_hard_margins(cast[ptr PrintContext00](self.impl), top, bottom, left, right)) + +proc gtk_print_context_get_height*(self: ptr PrintContext00): cdouble {. + importc: "gtk_print_context_get_height", libprag.} + +proc getHeight*(self: PrintContext): cdouble = + gtk_print_context_get_height(cast[ptr PrintContext00](self.impl)) + +proc height*(self: PrintContext): cdouble = + gtk_print_context_get_height(cast[ptr PrintContext00](self.impl)) + +proc gtk_print_context_get_page_setup*(self: ptr PrintContext00): ptr PageSetup00 {. + importc: "gtk_print_context_get_page_setup", libprag.} + +proc getPageSetup*(self: PrintContext): PageSetup = + let gobj = gtk_print_context_get_page_setup(cast[ptr PrintContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PageSetup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pageSetup*(self: PrintContext): PageSetup = + let gobj = gtk_print_context_get_page_setup(cast[ptr PrintContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PageSetup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_context_get_pango_fontmap*(self: ptr PrintContext00): ptr pango.FontMap00 {. + importc: "gtk_print_context_get_pango_fontmap", libprag.} + +proc getPangoFontmap*(self: PrintContext): pango.FontMap = + let gobj = gtk_print_context_get_pango_fontmap(cast[ptr PrintContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pangoFontmap*(self: PrintContext): pango.FontMap = + let gobj = gtk_print_context_get_pango_fontmap(cast[ptr PrintContext00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[pango.FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_context_get_width*(self: ptr PrintContext00): cdouble {. + importc: "gtk_print_context_get_width", libprag.} + +proc getWidth*(self: PrintContext): cdouble = + gtk_print_context_get_width(cast[ptr PrintContext00](self.impl)) + +proc width*(self: PrintContext): cdouble = + gtk_print_context_get_width(cast[ptr PrintContext00](self.impl)) + +proc gtk_print_context_set_cairo_context*(self: ptr PrintContext00; cr: ptr cairo.Context00; + dpiX: cdouble; dpiY: cdouble) {. + importc: "gtk_print_context_set_cairo_context", libprag.} + +proc setCairoContext*(self: PrintContext; cr: cairo.Context; dpiX: cdouble; + dpiY: cdouble) = + gtk_print_context_set_cairo_context(cast[ptr PrintContext00](self.impl), cast[ptr cairo.Context00](cr.impl), dpiX, dpiY) + +type + PrintDuplex* {.size: sizeof(cint), pure.} = enum + simplex = 0 + horizontal = 1 + vertical = 2 + +type + PrintError* {.size: sizeof(cint), pure.} = enum + general = 0 + internalError = 1 + nomem = 2 + invalidFile = 3 + +proc gtk_print_error_quark*(): uint32 {. + importc: "gtk_print_error_quark", libprag.} + +type + PrintOperationPrivate00* {.pure.} = object + PrintOperationPrivate* = ref object + impl*: ptr PrintOperationPrivate00 + +type + PrintOperationResult* {.size: sizeof(cint), pure.} = enum + error = 0 + apply = 1 + cancel = 2 + inProgress = 3 + +type + PrintOperationPreview00* {.pure.} = object + PrintOperationPreview* = ref object + impl*: ptr PrintOperationPreview00 + +proc gtk_print_operation_preview_end_preview*(self: ptr PrintOperationPreview00) {. + importc: "gtk_print_operation_preview_end_preview", libprag.} + +proc endPreview*(self: PrintOperationPreview) = + gtk_print_operation_preview_end_preview(cast[ptr PrintOperationPreview00](self.impl)) + +proc gtk_print_operation_preview_is_selected*(self: ptr PrintOperationPreview00; pageNr: int32): gboolean {. + importc: "gtk_print_operation_preview_is_selected", libprag.} + +proc isSelected*(self: PrintOperationPreview; pageNr: int): bool = + toBool(gtk_print_operation_preview_is_selected(cast[ptr PrintOperationPreview00](self.impl), int32(pageNr))) + +proc gtk_print_operation_preview_render_page*(self: ptr PrintOperationPreview00; pageNr: int32) {. + importc: "gtk_print_operation_preview_render_page", libprag.} + +proc renderPage*(self: PrintOperationPreview; pageNr: int) = + gtk_print_operation_preview_render_page(cast[ptr PrintOperationPreview00](self.impl), int32(pageNr)) + +type + PrintSettings* = ref object of gobject.Object + PrintSettings00* = object of gobject.Object00 + +proc gtk_print_settings_new*(): ptr PrintSettings00 {. + importc: "gtk_print_settings_new", libprag.} + +proc newPrintSettings*(): PrintSettings = + new(result, finalizeGObject) + result.impl = gtk_print_settings_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPrintSettings*[T](result: var T) = + assert(result is PrintSettings) + new(result, finalizeGObject) + result.impl = gtk_print_settings_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_settings_new_from_file*(fileName: ucstring): ptr PrintSettings00 {. + importc: "gtk_print_settings_new_from_file", libprag.} + +proc newPrintSettingsFromFile*(fileName: ucstring): PrintSettings = + new(result, finalizeGObject) + result.impl = gtk_print_settings_new_from_file(fileName) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPrintSettingsFromFile*[T](result: var T; fileName: ucstring) = + assert(result is PrintSettings) + new(result, finalizeGObject) + result.impl = gtk_print_settings_new_from_file(fileName) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_settings_new_from_gvariant*(variant: ptr glib.Variant00): ptr PrintSettings00 {. + importc: "gtk_print_settings_new_from_gvariant", libprag.} + +proc newPrintSettingsFromGvariant*(variant: glib.Variant): PrintSettings = + new(result, finalizeGObject) + result.impl = gtk_print_settings_new_from_gvariant(cast[ptr glib.Variant00](variant.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPrintSettingsFromGvariant*[T](result: var T; variant: glib.Variant) = + assert(result is PrintSettings) + new(result, finalizeGObject) + result.impl = gtk_print_settings_new_from_gvariant(cast[ptr glib.Variant00](variant.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_settings_new_from_key_file*(keyFile: ptr glib.KeyFile00; groupName: cstring): ptr PrintSettings00 {. + importc: "gtk_print_settings_new_from_key_file", libprag.} + +proc newPrintSettingsFromKeyFile*(keyFile: glib.KeyFile; groupName: string): PrintSettings = + new(result, finalizeGObject) + result.impl = gtk_print_settings_new_from_key_file(cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPrintSettingsFromKeyFile*[T](result: var T; keyFile: glib.KeyFile; groupName: string) = + assert(result is PrintSettings) + new(result, finalizeGObject) + result.impl = gtk_print_settings_new_from_key_file(cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_settings_copy*(self: ptr PrintSettings00): ptr PrintSettings00 {. + importc: "gtk_print_settings_copy", libprag.} + +proc copy*(self: PrintSettings): PrintSettings = + let gobj = gtk_print_settings_copy(cast[ptr PrintSettings00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PrintSettings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_settings_get*(self: ptr PrintSettings00; key: cstring): cstring {. + importc: "gtk_print_settings_get", libprag.} + +proc get*(self: PrintSettings; key: string): string = + let resul0 = gtk_print_settings_get(cast[ptr PrintSettings00](self.impl), cstring(key)) + result = $resul0 + +proc gtk_print_settings_get_bool*(self: ptr PrintSettings00; key: cstring): gboolean {. + importc: "gtk_print_settings_get_bool", libprag.} + +proc getBool*(self: PrintSettings; key: string): bool = + toBool(gtk_print_settings_get_bool(cast[ptr PrintSettings00](self.impl), cstring(key))) + +proc bool*(self: PrintSettings; key: string): bool = + toBool(gtk_print_settings_get_bool(cast[ptr PrintSettings00](self.impl), cstring(key))) + +proc gtk_print_settings_get_collate*(self: ptr PrintSettings00): gboolean {. + importc: "gtk_print_settings_get_collate", libprag.} + +proc getCollate*(self: PrintSettings): bool = + toBool(gtk_print_settings_get_collate(cast[ptr PrintSettings00](self.impl))) + +proc collate*(self: PrintSettings): bool = + toBool(gtk_print_settings_get_collate(cast[ptr PrintSettings00](self.impl))) + +proc gtk_print_settings_get_default_source*(self: ptr PrintSettings00): cstring {. + importc: "gtk_print_settings_get_default_source", libprag.} + +proc getDefaultSource*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_default_source(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc defaultSource*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_default_source(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc gtk_print_settings_get_dither*(self: ptr PrintSettings00): cstring {. + importc: "gtk_print_settings_get_dither", libprag.} + +proc getDither*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_dither(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc dither*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_dither(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc gtk_print_settings_get_double*(self: ptr PrintSettings00; key: cstring): cdouble {. + importc: "gtk_print_settings_get_double", libprag.} + +proc getDouble*(self: PrintSettings; key: string): cdouble = + gtk_print_settings_get_double(cast[ptr PrintSettings00](self.impl), cstring(key)) + +proc double*(self: PrintSettings; key: string): cdouble = + gtk_print_settings_get_double(cast[ptr PrintSettings00](self.impl), cstring(key)) + +proc gtk_print_settings_get_double_with_default*(self: ptr PrintSettings00; key: cstring; def: cdouble): cdouble {. + importc: "gtk_print_settings_get_double_with_default", libprag.} + +proc getDoubleWithDefault*(self: PrintSettings; key: string; def: cdouble): cdouble = + gtk_print_settings_get_double_with_default(cast[ptr PrintSettings00](self.impl), cstring(key), def) + +proc doubleWithDefault*(self: PrintSettings; key: string; def: cdouble): cdouble = + gtk_print_settings_get_double_with_default(cast[ptr PrintSettings00](self.impl), cstring(key), def) + +proc gtk_print_settings_get_duplex*(self: ptr PrintSettings00): PrintDuplex {. + importc: "gtk_print_settings_get_duplex", libprag.} + +proc getDuplex*(self: PrintSettings): PrintDuplex = + gtk_print_settings_get_duplex(cast[ptr PrintSettings00](self.impl)) + +proc duplex*(self: PrintSettings): PrintDuplex = + gtk_print_settings_get_duplex(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_get_finishings*(self: ptr PrintSettings00): cstring {. + importc: "gtk_print_settings_get_finishings", libprag.} + +proc getFinishings*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_finishings(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc finishings*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_finishings(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc gtk_print_settings_get_int*(self: ptr PrintSettings00; key: cstring): int32 {. + importc: "gtk_print_settings_get_int", libprag.} + +proc getInt*(self: PrintSettings; key: string): int = + int(gtk_print_settings_get_int(cast[ptr PrintSettings00](self.impl), cstring(key))) + +proc gtk_print_settings_get_int_with_default*(self: ptr PrintSettings00; key: cstring; def: int32): int32 {. + importc: "gtk_print_settings_get_int_with_default", libprag.} + +proc getIntWithDefault*(self: PrintSettings; key: string; def: int): int = + int(gtk_print_settings_get_int_with_default(cast[ptr PrintSettings00](self.impl), cstring(key), int32(def))) + +proc intWithDefault*(self: PrintSettings; key: string; def: int): int = + int(gtk_print_settings_get_int_with_default(cast[ptr PrintSettings00](self.impl), cstring(key), int32(def))) + +proc gtk_print_settings_get_length*(self: ptr PrintSettings00; key: cstring; unit: Unit): cdouble {. + importc: "gtk_print_settings_get_length", libprag.} + +proc getLength*(self: PrintSettings; key: string; unit: Unit): cdouble = + gtk_print_settings_get_length(cast[ptr PrintSettings00](self.impl), cstring(key), unit) + +proc length*(self: PrintSettings; key: string; unit: Unit): cdouble = + gtk_print_settings_get_length(cast[ptr PrintSettings00](self.impl), cstring(key), unit) + +proc gtk_print_settings_get_media_type*(self: ptr PrintSettings00): cstring {. + importc: "gtk_print_settings_get_media_type", libprag.} + +proc getMediaType*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_media_type(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc mediaType*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_media_type(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc gtk_print_settings_get_n_copies*(self: ptr PrintSettings00): int32 {. + importc: "gtk_print_settings_get_n_copies", libprag.} + +proc getNCopies*(self: PrintSettings): int = + int(gtk_print_settings_get_n_copies(cast[ptr PrintSettings00](self.impl))) + +proc nCopies*(self: PrintSettings): int = + int(gtk_print_settings_get_n_copies(cast[ptr PrintSettings00](self.impl))) + +proc gtk_print_settings_get_number_up*(self: ptr PrintSettings00): int32 {. + importc: "gtk_print_settings_get_number_up", libprag.} + +proc getNumberUp*(self: PrintSettings): int = + int(gtk_print_settings_get_number_up(cast[ptr PrintSettings00](self.impl))) + +proc numberUp*(self: PrintSettings): int = + int(gtk_print_settings_get_number_up(cast[ptr PrintSettings00](self.impl))) + +proc gtk_print_settings_get_number_up_layout*(self: ptr PrintSettings00): NumberUpLayout {. + importc: "gtk_print_settings_get_number_up_layout", libprag.} + +proc getNumberUpLayout*(self: PrintSettings): NumberUpLayout = + gtk_print_settings_get_number_up_layout(cast[ptr PrintSettings00](self.impl)) + +proc numberUpLayout*(self: PrintSettings): NumberUpLayout = + gtk_print_settings_get_number_up_layout(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_get_orientation*(self: ptr PrintSettings00): PageOrientation {. + importc: "gtk_print_settings_get_orientation", libprag.} + +proc getOrientation*(self: PrintSettings): PageOrientation = + gtk_print_settings_get_orientation(cast[ptr PrintSettings00](self.impl)) + +proc orientation*(self: PrintSettings): PageOrientation = + gtk_print_settings_get_orientation(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_get_output_bin*(self: ptr PrintSettings00): cstring {. + importc: "gtk_print_settings_get_output_bin", libprag.} + +proc getOutputBin*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_output_bin(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc outputBin*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_output_bin(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc gtk_print_settings_get_page_ranges*(self: ptr PrintSettings00; numRanges: var int32): PageRange00Array {. + importc: "gtk_print_settings_get_page_ranges", libprag.} + +proc getPageRanges*(self: PrintSettings; numRanges: var int): PageRange00Array = + var numRanges_00 = int32(numRanges) + result = gtk_print_settings_get_page_ranges(cast[ptr PrintSettings00](self.impl), numRanges_00) + numRanges = int(numRanges_00) + +proc pageRanges*(self: PrintSettings; numRanges: var int): PageRange00Array = + var numRanges_00 = int32(numRanges) + result = gtk_print_settings_get_page_ranges(cast[ptr PrintSettings00](self.impl), numRanges_00) + numRanges = int(numRanges_00) + +proc gtk_print_settings_get_page_set*(self: ptr PrintSettings00): PageSet {. + importc: "gtk_print_settings_get_page_set", libprag.} + +proc getPageSet*(self: PrintSettings): PageSet = + gtk_print_settings_get_page_set(cast[ptr PrintSettings00](self.impl)) + +proc pageSet*(self: PrintSettings): PageSet = + gtk_print_settings_get_page_set(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_get_paper_height*(self: ptr PrintSettings00; unit: Unit): cdouble {. + importc: "gtk_print_settings_get_paper_height", libprag.} + +proc getPaperHeight*(self: PrintSettings; unit: Unit): cdouble = + gtk_print_settings_get_paper_height(cast[ptr PrintSettings00](self.impl), unit) + +proc paperHeight*(self: PrintSettings; unit: Unit): cdouble = + gtk_print_settings_get_paper_height(cast[ptr PrintSettings00](self.impl), unit) + +proc gtk_print_settings_get_paper_size*(self: ptr PrintSettings00): ptr PaperSize00 {. + importc: "gtk_print_settings_get_paper_size", libprag.} + +proc getPaperSize*(self: PrintSettings): PaperSize = + new(result) + result.impl = gtk_print_settings_get_paper_size(cast[ptr PrintSettings00](self.impl)) + +proc paperSize*(self: PrintSettings): PaperSize = + new(result) + result.impl = gtk_print_settings_get_paper_size(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_get_paper_width*(self: ptr PrintSettings00; unit: Unit): cdouble {. + importc: "gtk_print_settings_get_paper_width", libprag.} + +proc getPaperWidth*(self: PrintSettings; unit: Unit): cdouble = + gtk_print_settings_get_paper_width(cast[ptr PrintSettings00](self.impl), unit) + +proc paperWidth*(self: PrintSettings; unit: Unit): cdouble = + gtk_print_settings_get_paper_width(cast[ptr PrintSettings00](self.impl), unit) + +proc gtk_print_settings_get_printer*(self: ptr PrintSettings00): cstring {. + importc: "gtk_print_settings_get_printer", libprag.} + +proc getPrinter*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_printer(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc printer*(self: PrintSettings): string = + let resul0 = gtk_print_settings_get_printer(cast[ptr PrintSettings00](self.impl)) + result = $resul0 + +proc gtk_print_settings_get_printer_lpi*(self: ptr PrintSettings00): cdouble {. + importc: "gtk_print_settings_get_printer_lpi", libprag.} + +proc getPrinterLpi*(self: PrintSettings): cdouble = + gtk_print_settings_get_printer_lpi(cast[ptr PrintSettings00](self.impl)) + +proc printerLpi*(self: PrintSettings): cdouble = + gtk_print_settings_get_printer_lpi(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_get_resolution*(self: ptr PrintSettings00): int32 {. + importc: "gtk_print_settings_get_resolution", libprag.} + +proc getResolution*(self: PrintSettings): int = + int(gtk_print_settings_get_resolution(cast[ptr PrintSettings00](self.impl))) + +proc resolution*(self: PrintSettings): int = + int(gtk_print_settings_get_resolution(cast[ptr PrintSettings00](self.impl))) + +proc gtk_print_settings_get_resolution_x*(self: ptr PrintSettings00): int32 {. + importc: "gtk_print_settings_get_resolution_x", libprag.} + +proc getResolutionX*(self: PrintSettings): int = + int(gtk_print_settings_get_resolution_x(cast[ptr PrintSettings00](self.impl))) + +proc resolutionX*(self: PrintSettings): int = + int(gtk_print_settings_get_resolution_x(cast[ptr PrintSettings00](self.impl))) + +proc gtk_print_settings_get_resolution_y*(self: ptr PrintSettings00): int32 {. + importc: "gtk_print_settings_get_resolution_y", libprag.} + +proc getResolutionY*(self: PrintSettings): int = + int(gtk_print_settings_get_resolution_y(cast[ptr PrintSettings00](self.impl))) + +proc resolutionY*(self: PrintSettings): int = + int(gtk_print_settings_get_resolution_y(cast[ptr PrintSettings00](self.impl))) + +proc gtk_print_settings_get_reverse*(self: ptr PrintSettings00): gboolean {. + importc: "gtk_print_settings_get_reverse", libprag.} + +proc getReverse*(self: PrintSettings): bool = + toBool(gtk_print_settings_get_reverse(cast[ptr PrintSettings00](self.impl))) + +proc reverse*(self: PrintSettings): bool = + toBool(gtk_print_settings_get_reverse(cast[ptr PrintSettings00](self.impl))) + +proc gtk_print_settings_get_scale*(self: ptr PrintSettings00): cdouble {. + importc: "gtk_print_settings_get_scale", libprag.} + +proc getScale*(self: PrintSettings): cdouble = + gtk_print_settings_get_scale(cast[ptr PrintSettings00](self.impl)) + +proc scale*(self: PrintSettings): cdouble = + gtk_print_settings_get_scale(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_get_use_color*(self: ptr PrintSettings00): gboolean {. + importc: "gtk_print_settings_get_use_color", libprag.} + +proc getUseColor*(self: PrintSettings): bool = + toBool(gtk_print_settings_get_use_color(cast[ptr PrintSettings00](self.impl))) + +proc useColor*(self: PrintSettings): bool = + toBool(gtk_print_settings_get_use_color(cast[ptr PrintSettings00](self.impl))) + +proc gtk_print_settings_has_key*(self: ptr PrintSettings00; key: cstring): gboolean {. + importc: "gtk_print_settings_has_key", libprag.} + +proc hasKey*(self: PrintSettings; key: string): bool = + toBool(gtk_print_settings_has_key(cast[ptr PrintSettings00](self.impl), cstring(key))) + +proc gtk_print_settings_load_file*(self: ptr PrintSettings00; fileName: ucstring): gboolean {. + importc: "gtk_print_settings_load_file", libprag.} + +proc loadFile*(self: PrintSettings; fileName: ucstring): bool = + toBool(gtk_print_settings_load_file(cast[ptr PrintSettings00](self.impl), fileName)) + +proc gtk_print_settings_load_key_file*(self: ptr PrintSettings00; keyFile: ptr glib.KeyFile00; + groupName: cstring): gboolean {. + importc: "gtk_print_settings_load_key_file", libprag.} + +proc loadKeyFile*(self: PrintSettings; keyFile: glib.KeyFile; groupName: string): bool = + toBool(gtk_print_settings_load_key_file(cast[ptr PrintSettings00](self.impl), cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName))) + +proc gtk_print_settings_set*(self: ptr PrintSettings00; key: cstring; value: cstring) {. + importc: "gtk_print_settings_set", libprag.} + +proc set*(self: PrintSettings; key: string; value: string) = + gtk_print_settings_set(cast[ptr PrintSettings00](self.impl), cstring(key), cstring(value)) + +proc gtk_print_settings_set_bool*(self: ptr PrintSettings00; key: cstring; value: gboolean) {. + importc: "gtk_print_settings_set_bool", libprag.} + +proc setBool*(self: PrintSettings; key: string; value: bool) = + gtk_print_settings_set_bool(cast[ptr PrintSettings00](self.impl), cstring(key), gboolean(value)) + +proc gtk_print_settings_set_collate*(self: ptr PrintSettings00; collate: gboolean) {. + importc: "gtk_print_settings_set_collate", libprag.} + +proc setCollate*(self: PrintSettings; collate: bool) = + gtk_print_settings_set_collate(cast[ptr PrintSettings00](self.impl), gboolean(collate)) + +proc `collate=`*(self: PrintSettings; collate: bool) = + gtk_print_settings_set_collate(cast[ptr PrintSettings00](self.impl), gboolean(collate)) + +proc gtk_print_settings_set_default_source*(self: ptr PrintSettings00; defaultSource: cstring) {. + importc: "gtk_print_settings_set_default_source", libprag.} + +proc setDefaultSource*(self: PrintSettings; defaultSource: string) = + gtk_print_settings_set_default_source(cast[ptr PrintSettings00](self.impl), cstring(defaultSource)) + +proc `defaultSource=`*(self: PrintSettings; defaultSource: string) = + gtk_print_settings_set_default_source(cast[ptr PrintSettings00](self.impl), cstring(defaultSource)) + +proc gtk_print_settings_set_dither*(self: ptr PrintSettings00; dither: cstring) {. + importc: "gtk_print_settings_set_dither", libprag.} + +proc setDither*(self: PrintSettings; dither: string) = + gtk_print_settings_set_dither(cast[ptr PrintSettings00](self.impl), cstring(dither)) + +proc `dither=`*(self: PrintSettings; dither: string) = + gtk_print_settings_set_dither(cast[ptr PrintSettings00](self.impl), cstring(dither)) + +proc gtk_print_settings_set_double*(self: ptr PrintSettings00; key: cstring; value: cdouble) {. + importc: "gtk_print_settings_set_double", libprag.} + +proc setDouble*(self: PrintSettings; key: string; value: cdouble) = + gtk_print_settings_set_double(cast[ptr PrintSettings00](self.impl), cstring(key), value) + +proc gtk_print_settings_set_duplex*(self: ptr PrintSettings00; duplex: PrintDuplex) {. + importc: "gtk_print_settings_set_duplex", libprag.} + +proc setDuplex*(self: PrintSettings; duplex: PrintDuplex) = + gtk_print_settings_set_duplex(cast[ptr PrintSettings00](self.impl), duplex) + +proc `duplex=`*(self: PrintSettings; duplex: PrintDuplex) = + gtk_print_settings_set_duplex(cast[ptr PrintSettings00](self.impl), duplex) + +proc gtk_print_settings_set_finishings*(self: ptr PrintSettings00; finishings: cstring) {. + importc: "gtk_print_settings_set_finishings", libprag.} + +proc setFinishings*(self: PrintSettings; finishings: string) = + gtk_print_settings_set_finishings(cast[ptr PrintSettings00](self.impl), cstring(finishings)) + +proc `finishings=`*(self: PrintSettings; finishings: string) = + gtk_print_settings_set_finishings(cast[ptr PrintSettings00](self.impl), cstring(finishings)) + +proc gtk_print_settings_set_int*(self: ptr PrintSettings00; key: cstring; value: int32) {. + importc: "gtk_print_settings_set_int", libprag.} + +proc setInt*(self: PrintSettings; key: string; value: int) = + gtk_print_settings_set_int(cast[ptr PrintSettings00](self.impl), cstring(key), int32(value)) + +proc gtk_print_settings_set_length*(self: ptr PrintSettings00; key: cstring; value: cdouble; + unit: Unit) {. + importc: "gtk_print_settings_set_length", libprag.} + +proc setLength*(self: PrintSettings; key: string; value: cdouble; + unit: Unit) = + gtk_print_settings_set_length(cast[ptr PrintSettings00](self.impl), cstring(key), value, unit) + +proc gtk_print_settings_set_media_type*(self: ptr PrintSettings00; mediaType: cstring) {. + importc: "gtk_print_settings_set_media_type", libprag.} + +proc setMediaType*(self: PrintSettings; mediaType: string) = + gtk_print_settings_set_media_type(cast[ptr PrintSettings00](self.impl), cstring(mediaType)) + +proc `mediaType=`*(self: PrintSettings; mediaType: string) = + gtk_print_settings_set_media_type(cast[ptr PrintSettings00](self.impl), cstring(mediaType)) + +proc gtk_print_settings_set_n_copies*(self: ptr PrintSettings00; numCopies: int32) {. + importc: "gtk_print_settings_set_n_copies", libprag.} + +proc setNCopies*(self: PrintSettings; numCopies: int) = + gtk_print_settings_set_n_copies(cast[ptr PrintSettings00](self.impl), int32(numCopies)) + +proc `nCopies=`*(self: PrintSettings; numCopies: int) = + gtk_print_settings_set_n_copies(cast[ptr PrintSettings00](self.impl), int32(numCopies)) + +proc gtk_print_settings_set_number_up*(self: ptr PrintSettings00; numberUp: int32) {. + importc: "gtk_print_settings_set_number_up", libprag.} + +proc setNumberUp*(self: PrintSettings; numberUp: int) = + gtk_print_settings_set_number_up(cast[ptr PrintSettings00](self.impl), int32(numberUp)) + +proc `numberUp=`*(self: PrintSettings; numberUp: int) = + gtk_print_settings_set_number_up(cast[ptr PrintSettings00](self.impl), int32(numberUp)) + +proc gtk_print_settings_set_number_up_layout*(self: ptr PrintSettings00; numberUpLayout: NumberUpLayout) {. + importc: "gtk_print_settings_set_number_up_layout", libprag.} + +proc setNumberUpLayout*(self: PrintSettings; numberUpLayout: NumberUpLayout) = + gtk_print_settings_set_number_up_layout(cast[ptr PrintSettings00](self.impl), numberUpLayout) + +proc `numberUpLayout=`*(self: PrintSettings; numberUpLayout: NumberUpLayout) = + gtk_print_settings_set_number_up_layout(cast[ptr PrintSettings00](self.impl), numberUpLayout) + +proc gtk_print_settings_set_orientation*(self: ptr PrintSettings00; orientation: PageOrientation) {. + importc: "gtk_print_settings_set_orientation", libprag.} + +proc setOrientation*(self: PrintSettings; orientation: PageOrientation) = + gtk_print_settings_set_orientation(cast[ptr PrintSettings00](self.impl), orientation) + +proc `orientation=`*(self: PrintSettings; orientation: PageOrientation) = + gtk_print_settings_set_orientation(cast[ptr PrintSettings00](self.impl), orientation) + +proc gtk_print_settings_set_output_bin*(self: ptr PrintSettings00; outputBin: cstring) {. + importc: "gtk_print_settings_set_output_bin", libprag.} + +proc setOutputBin*(self: PrintSettings; outputBin: string) = + gtk_print_settings_set_output_bin(cast[ptr PrintSettings00](self.impl), cstring(outputBin)) + +proc `outputBin=`*(self: PrintSettings; outputBin: string) = + gtk_print_settings_set_output_bin(cast[ptr PrintSettings00](self.impl), cstring(outputBin)) + +proc gtk_print_settings_set_page_ranges*(self: ptr PrintSettings00; pageRanges: PageRange00Array; + numRanges: int32) {. + importc: "gtk_print_settings_set_page_ranges", libprag.} + +proc setPageRanges*(self: PrintSettings; pageRanges: PageRange00Array; + numRanges: int) = + gtk_print_settings_set_page_ranges(cast[ptr PrintSettings00](self.impl), pageRanges, int32(numRanges)) + +proc gtk_print_settings_set_page_set*(self: ptr PrintSettings00; pageSet: PageSet) {. + importc: "gtk_print_settings_set_page_set", libprag.} + +proc setPageSet*(self: PrintSettings; pageSet: PageSet) = + gtk_print_settings_set_page_set(cast[ptr PrintSettings00](self.impl), pageSet) + +proc `pageSet=`*(self: PrintSettings; pageSet: PageSet) = + gtk_print_settings_set_page_set(cast[ptr PrintSettings00](self.impl), pageSet) + +proc gtk_print_settings_set_paper_height*(self: ptr PrintSettings00; height: cdouble; unit: Unit) {. + importc: "gtk_print_settings_set_paper_height", libprag.} + +proc setPaperHeight*(self: PrintSettings; height: cdouble; unit: Unit) = + gtk_print_settings_set_paper_height(cast[ptr PrintSettings00](self.impl), height, unit) + +proc gtk_print_settings_set_paper_size*(self: ptr PrintSettings00; paperSize: ptr PaperSize00) {. + importc: "gtk_print_settings_set_paper_size", libprag.} + +proc setPaperSize*(self: PrintSettings; paperSize: PaperSize) = + gtk_print_settings_set_paper_size(cast[ptr PrintSettings00](self.impl), cast[ptr PaperSize00](paperSize.impl)) + +proc `paperSize=`*(self: PrintSettings; paperSize: PaperSize) = + gtk_print_settings_set_paper_size(cast[ptr PrintSettings00](self.impl), cast[ptr PaperSize00](paperSize.impl)) + +proc gtk_print_settings_set_paper_width*(self: ptr PrintSettings00; width: cdouble; unit: Unit) {. + importc: "gtk_print_settings_set_paper_width", libprag.} + +proc setPaperWidth*(self: PrintSettings; width: cdouble; unit: Unit) = + gtk_print_settings_set_paper_width(cast[ptr PrintSettings00](self.impl), width, unit) + +proc gtk_print_settings_set_printer*(self: ptr PrintSettings00; printer: cstring) {. + importc: "gtk_print_settings_set_printer", libprag.} + +proc setPrinter*(self: PrintSettings; printer: string) = + gtk_print_settings_set_printer(cast[ptr PrintSettings00](self.impl), cstring(printer)) + +proc `printer=`*(self: PrintSettings; printer: string) = + gtk_print_settings_set_printer(cast[ptr PrintSettings00](self.impl), cstring(printer)) + +proc gtk_print_settings_set_printer_lpi*(self: ptr PrintSettings00; lpi: cdouble) {. + importc: "gtk_print_settings_set_printer_lpi", libprag.} + +proc setPrinterLpi*(self: PrintSettings; lpi: cdouble) = + gtk_print_settings_set_printer_lpi(cast[ptr PrintSettings00](self.impl), lpi) + +proc `printerLpi=`*(self: PrintSettings; lpi: cdouble) = + gtk_print_settings_set_printer_lpi(cast[ptr PrintSettings00](self.impl), lpi) + +proc gtk_print_settings_set_resolution*(self: ptr PrintSettings00; resolution: int32) {. + importc: "gtk_print_settings_set_resolution", libprag.} + +proc setResolution*(self: PrintSettings; resolution: int) = + gtk_print_settings_set_resolution(cast[ptr PrintSettings00](self.impl), int32(resolution)) + +proc `resolution=`*(self: PrintSettings; resolution: int) = + gtk_print_settings_set_resolution(cast[ptr PrintSettings00](self.impl), int32(resolution)) + +proc gtk_print_settings_set_resolution_xy*(self: ptr PrintSettings00; resolutionX: int32; resolutionY: int32) {. + importc: "gtk_print_settings_set_resolution_xy", libprag.} + +proc setResolutionXy*(self: PrintSettings; resolutionX: int; resolutionY: int) = + gtk_print_settings_set_resolution_xy(cast[ptr PrintSettings00](self.impl), int32(resolutionX), int32(resolutionY)) + +proc gtk_print_settings_set_reverse*(self: ptr PrintSettings00; reverse: gboolean) {. + importc: "gtk_print_settings_set_reverse", libprag.} + +proc setReverse*(self: PrintSettings; reverse: bool) = + gtk_print_settings_set_reverse(cast[ptr PrintSettings00](self.impl), gboolean(reverse)) + +proc `reverse=`*(self: PrintSettings; reverse: bool) = + gtk_print_settings_set_reverse(cast[ptr PrintSettings00](self.impl), gboolean(reverse)) + +proc gtk_print_settings_set_scale*(self: ptr PrintSettings00; scale: cdouble) {. + importc: "gtk_print_settings_set_scale", libprag.} + +proc setScale*(self: PrintSettings; scale: cdouble) = + gtk_print_settings_set_scale(cast[ptr PrintSettings00](self.impl), scale) + +proc `scale=`*(self: PrintSettings; scale: cdouble) = + gtk_print_settings_set_scale(cast[ptr PrintSettings00](self.impl), scale) + +proc gtk_print_settings_set_use_color*(self: ptr PrintSettings00; useColor: gboolean) {. + importc: "gtk_print_settings_set_use_color", libprag.} + +proc setUseColor*(self: PrintSettings; useColor: bool) = + gtk_print_settings_set_use_color(cast[ptr PrintSettings00](self.impl), gboolean(useColor)) + +proc `useColor=`*(self: PrintSettings; useColor: bool) = + gtk_print_settings_set_use_color(cast[ptr PrintSettings00](self.impl), gboolean(useColor)) + +proc gtk_print_settings_to_file*(self: ptr PrintSettings00; fileName: ucstring): gboolean {. + importc: "gtk_print_settings_to_file", libprag.} + +proc toFile*(self: PrintSettings; fileName: ucstring): bool = + toBool(gtk_print_settings_to_file(cast[ptr PrintSettings00](self.impl), fileName)) + +proc gtk_print_settings_to_gvariant*(self: ptr PrintSettings00): ptr glib.Variant00 {. + importc: "gtk_print_settings_to_gvariant", libprag.} + +proc toGvariant*(self: PrintSettings): glib.Variant = + new(result) + result.impl = gtk_print_settings_to_gvariant(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_to_key_file*(self: ptr PrintSettings00; keyFile: ptr glib.KeyFile00; + groupName: cstring) {. + importc: "gtk_print_settings_to_key_file", libprag.} + +proc toKeyFile*(self: PrintSettings; keyFile: glib.KeyFile; groupName: string) = + gtk_print_settings_to_key_file(cast[ptr PrintSettings00](self.impl), cast[ptr glib.KeyFile00](keyFile.impl), cstring(groupName)) + +proc gtk_print_settings_unset*(self: ptr PrintSettings00; key: cstring) {. + importc: "gtk_print_settings_unset", libprag.} + +proc unset*(self: PrintSettings; key: string) = + gtk_print_settings_unset(cast[ptr PrintSettings00](self.impl), cstring(key)) + +type + PrintOperation* = ref object of gobject.Object + PrintOperation00* = object of gobject.Object00 + priv1: ptr PrintOperationPrivate00 + +proc scBeginPrint*(self: PrintOperation; p: proc (self: ptr gobject.Object00; context: PrintContext00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "begin-print", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCreateCustomWidget*(self: PrintOperation; p: proc (self: ptr gobject.Object00; xdata: pointer): gobject.Object00 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "create-custom-widget", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCustomWidgetApply*(self: PrintOperation; p: proc (self: ptr gobject.Object00; widget: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "custom-widget-apply", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDone*(self: PrintOperation; p: proc (self: ptr gobject.Object00; resu: PrintOperationResult; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "done", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDrawPage*(self: PrintOperation; p: proc (self: ptr gobject.Object00; context: PrintContext00; pageNr: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "draw-page", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scEndPrint*(self: PrintOperation; p: proc (self: ptr gobject.Object00; context: PrintContext00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "end-print", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPaginate*(self: PrintOperation; p: proc (self: ptr gobject.Object00; context: PrintContext00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "paginate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPreview*(self: PrintOperation; p: proc (self: ptr gobject.Object00; preview: PrintOperationPreview00; context: PrintContext00; + parent: Window00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "preview", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRequestPageSetup*(self: PrintOperation; p: proc (self: ptr gobject.Object00; context: PrintContext00; pageNr: int32; setup: PageSetup00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "request-page-setup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStatusChanged*(self: PrintOperation; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "status-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUpdateCustomWidget*(self: PrintOperation; p: proc (self: ptr gobject.Object00; widget: Widget00; setup: PageSetup00; settings: PrintSettings00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "update-custom-widget", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_print_operation_new*(): ptr PrintOperation00 {. + importc: "gtk_print_operation_new", libprag.} + +proc newPrintOperation*(): PrintOperation = + new(result, finalizeGObject) + result.impl = gtk_print_operation_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initPrintOperation*[T](result: var T) = + assert(result is PrintOperation) + new(result, finalizeGObject) + result.impl = gtk_print_operation_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_operation_cancel*(self: ptr PrintOperation00) {. + importc: "gtk_print_operation_cancel", libprag.} + +proc cancel*(self: PrintOperation) = + gtk_print_operation_cancel(cast[ptr PrintOperation00](self.impl)) + +proc gtk_print_operation_draw_page_finish*(self: ptr PrintOperation00) {. + importc: "gtk_print_operation_draw_page_finish", libprag.} + +proc drawPageFinish*(self: PrintOperation) = + gtk_print_operation_draw_page_finish(cast[ptr PrintOperation00](self.impl)) + +proc gtk_print_operation_get_default_page_setup*(self: ptr PrintOperation00): ptr PageSetup00 {. + importc: "gtk_print_operation_get_default_page_setup", libprag.} + +proc getDefaultPageSetup*(self: PrintOperation): PageSetup = + let gobj = gtk_print_operation_get_default_page_setup(cast[ptr PrintOperation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PageSetup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc defaultPageSetup*(self: PrintOperation): PageSetup = + let gobj = gtk_print_operation_get_default_page_setup(cast[ptr PrintOperation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PageSetup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_operation_get_embed_page_setup*(self: ptr PrintOperation00): gboolean {. + importc: "gtk_print_operation_get_embed_page_setup", libprag.} + +proc getEmbedPageSetup*(self: PrintOperation): bool = + toBool(gtk_print_operation_get_embed_page_setup(cast[ptr PrintOperation00](self.impl))) + +proc embedPageSetup*(self: PrintOperation): bool = + toBool(gtk_print_operation_get_embed_page_setup(cast[ptr PrintOperation00](self.impl))) + +proc gtk_print_operation_get_error*(self: ptr PrintOperation00) {. + importc: "gtk_print_operation_get_error", libprag.} + +proc getError*(self: PrintOperation) = + gtk_print_operation_get_error(cast[ptr PrintOperation00](self.impl)) + +proc error*(self: PrintOperation) = + gtk_print_operation_get_error(cast[ptr PrintOperation00](self.impl)) + +proc gtk_print_operation_get_has_selection*(self: ptr PrintOperation00): gboolean {. + importc: "gtk_print_operation_get_has_selection", libprag.} + +proc getHasSelection*(self: PrintOperation): bool = + toBool(gtk_print_operation_get_has_selection(cast[ptr PrintOperation00](self.impl))) + +proc hasSelection*(self: PrintOperation): bool = + toBool(gtk_print_operation_get_has_selection(cast[ptr PrintOperation00](self.impl))) + +proc gtk_print_operation_get_n_pages_to_print*(self: ptr PrintOperation00): int32 {. + importc: "gtk_print_operation_get_n_pages_to_print", libprag.} + +proc getNPagesToPrint*(self: PrintOperation): int = + int(gtk_print_operation_get_n_pages_to_print(cast[ptr PrintOperation00](self.impl))) + +proc nPagesToPrint*(self: PrintOperation): int = + int(gtk_print_operation_get_n_pages_to_print(cast[ptr PrintOperation00](self.impl))) + +proc gtk_print_operation_get_print_settings*(self: ptr PrintOperation00): ptr PrintSettings00 {. + importc: "gtk_print_operation_get_print_settings", libprag.} + +proc getPrintSettings*(self: PrintOperation): PrintSettings = + let gobj = gtk_print_operation_get_print_settings(cast[ptr PrintOperation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PrintSettings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc printSettings*(self: PrintOperation): PrintSettings = + let gobj = gtk_print_operation_get_print_settings(cast[ptr PrintOperation00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PrintSettings](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_operation_get_status_string*(self: ptr PrintOperation00): cstring {. + importc: "gtk_print_operation_get_status_string", libprag.} + +proc getStatusString*(self: PrintOperation): string = + let resul0 = gtk_print_operation_get_status_string(cast[ptr PrintOperation00](self.impl)) + result = $resul0 + +proc statusString*(self: PrintOperation): string = + let resul0 = gtk_print_operation_get_status_string(cast[ptr PrintOperation00](self.impl)) + result = $resul0 + +proc gtk_print_operation_get_support_selection*(self: ptr PrintOperation00): gboolean {. + importc: "gtk_print_operation_get_support_selection", libprag.} + +proc getSupportSelection*(self: PrintOperation): bool = + toBool(gtk_print_operation_get_support_selection(cast[ptr PrintOperation00](self.impl))) + +proc supportSelection*(self: PrintOperation): bool = + toBool(gtk_print_operation_get_support_selection(cast[ptr PrintOperation00](self.impl))) + +proc gtk_print_operation_is_finished*(self: ptr PrintOperation00): gboolean {. + importc: "gtk_print_operation_is_finished", libprag.} + +proc isFinished*(self: PrintOperation): bool = + toBool(gtk_print_operation_is_finished(cast[ptr PrintOperation00](self.impl))) + +proc gtk_print_operation_set_allow_async*(self: ptr PrintOperation00; allowAsync: gboolean) {. + importc: "gtk_print_operation_set_allow_async", libprag.} + +proc setAllowAsync*(self: PrintOperation; allowAsync: bool) = + gtk_print_operation_set_allow_async(cast[ptr PrintOperation00](self.impl), gboolean(allowAsync)) + +proc `allowAsync=`*(self: PrintOperation; allowAsync: bool) = + gtk_print_operation_set_allow_async(cast[ptr PrintOperation00](self.impl), gboolean(allowAsync)) + +proc gtk_print_operation_set_current_page*(self: ptr PrintOperation00; currentPage: int32) {. + importc: "gtk_print_operation_set_current_page", libprag.} + +proc setCurrentPage*(self: PrintOperation; currentPage: int) = + gtk_print_operation_set_current_page(cast[ptr PrintOperation00](self.impl), int32(currentPage)) + +proc `currentPage=`*(self: PrintOperation; currentPage: int) = + gtk_print_operation_set_current_page(cast[ptr PrintOperation00](self.impl), int32(currentPage)) + +proc gtk_print_operation_set_custom_tab_label*(self: ptr PrintOperation00; label: cstring) {. + importc: "gtk_print_operation_set_custom_tab_label", libprag.} + +proc setCustomTabLabel*(self: PrintOperation; label: string) = + gtk_print_operation_set_custom_tab_label(cast[ptr PrintOperation00](self.impl), cstring(label)) + +proc `customTabLabel=`*(self: PrintOperation; label: string) = + gtk_print_operation_set_custom_tab_label(cast[ptr PrintOperation00](self.impl), cstring(label)) + +proc gtk_print_operation_set_default_page_setup*(self: ptr PrintOperation00; defaultPageSetup: ptr PageSetup00) {. + importc: "gtk_print_operation_set_default_page_setup", libprag.} + +proc setDefaultPageSetup*(self: PrintOperation; defaultPageSetup: PageSetup) = + gtk_print_operation_set_default_page_setup(cast[ptr PrintOperation00](self.impl), cast[ptr PageSetup00](defaultPageSetup.impl)) + +proc `defaultPageSetup=`*(self: PrintOperation; defaultPageSetup: PageSetup) = + gtk_print_operation_set_default_page_setup(cast[ptr PrintOperation00](self.impl), cast[ptr PageSetup00](defaultPageSetup.impl)) + +proc gtk_print_operation_set_defer_drawing*(self: ptr PrintOperation00) {. + importc: "gtk_print_operation_set_defer_drawing", libprag.} + +proc setDeferDrawing*(self: PrintOperation) = + gtk_print_operation_set_defer_drawing(cast[ptr PrintOperation00](self.impl)) + +proc `deferDrawing=`*(self: PrintOperation) = + gtk_print_operation_set_defer_drawing(cast[ptr PrintOperation00](self.impl)) + +proc gtk_print_operation_set_embed_page_setup*(self: ptr PrintOperation00; embed: gboolean) {. + importc: "gtk_print_operation_set_embed_page_setup", libprag.} + +proc setEmbedPageSetup*(self: PrintOperation; embed: bool) = + gtk_print_operation_set_embed_page_setup(cast[ptr PrintOperation00](self.impl), gboolean(embed)) + +proc `embedPageSetup=`*(self: PrintOperation; embed: bool) = + gtk_print_operation_set_embed_page_setup(cast[ptr PrintOperation00](self.impl), gboolean(embed)) + +proc gtk_print_operation_set_export_filename*(self: ptr PrintOperation00; filename: ucstring) {. + importc: "gtk_print_operation_set_export_filename", libprag.} + +proc setExportFilename*(self: PrintOperation; filename: ucstring) = + gtk_print_operation_set_export_filename(cast[ptr PrintOperation00](self.impl), filename) + +proc `exportFilename=`*(self: PrintOperation; filename: ucstring) = + gtk_print_operation_set_export_filename(cast[ptr PrintOperation00](self.impl), filename) + +proc gtk_print_operation_set_has_selection*(self: ptr PrintOperation00; hasSelection: gboolean) {. + importc: "gtk_print_operation_set_has_selection", libprag.} + +proc setHasSelection*(self: PrintOperation; hasSelection: bool) = + gtk_print_operation_set_has_selection(cast[ptr PrintOperation00](self.impl), gboolean(hasSelection)) + +proc `hasSelection=`*(self: PrintOperation; hasSelection: bool) = + gtk_print_operation_set_has_selection(cast[ptr PrintOperation00](self.impl), gboolean(hasSelection)) + +proc gtk_print_operation_set_job_name*(self: ptr PrintOperation00; jobName: cstring) {. + importc: "gtk_print_operation_set_job_name", libprag.} + +proc setJobName*(self: PrintOperation; jobName: string) = + gtk_print_operation_set_job_name(cast[ptr PrintOperation00](self.impl), cstring(jobName)) + +proc `jobName=`*(self: PrintOperation; jobName: string) = + gtk_print_operation_set_job_name(cast[ptr PrintOperation00](self.impl), cstring(jobName)) + +proc gtk_print_operation_set_n_pages*(self: ptr PrintOperation00; nPages: int32) {. + importc: "gtk_print_operation_set_n_pages", libprag.} + +proc setNPages*(self: PrintOperation; nPages: int) = + gtk_print_operation_set_n_pages(cast[ptr PrintOperation00](self.impl), int32(nPages)) + +proc `nPages=`*(self: PrintOperation; nPages: int) = + gtk_print_operation_set_n_pages(cast[ptr PrintOperation00](self.impl), int32(nPages)) + +proc gtk_print_operation_set_print_settings*(self: ptr PrintOperation00; printSettings: ptr PrintSettings00) {. + importc: "gtk_print_operation_set_print_settings", libprag.} + +proc setPrintSettings*(self: PrintOperation; printSettings: PrintSettings) = + gtk_print_operation_set_print_settings(cast[ptr PrintOperation00](self.impl), cast[ptr PrintSettings00](printSettings.impl)) + +proc `printSettings=`*(self: PrintOperation; printSettings: PrintSettings) = + gtk_print_operation_set_print_settings(cast[ptr PrintOperation00](self.impl), cast[ptr PrintSettings00](printSettings.impl)) + +proc gtk_print_operation_set_show_progress*(self: ptr PrintOperation00; showProgress: gboolean) {. + importc: "gtk_print_operation_set_show_progress", libprag.} + +proc setShowProgress*(self: PrintOperation; showProgress: bool) = + gtk_print_operation_set_show_progress(cast[ptr PrintOperation00](self.impl), gboolean(showProgress)) + +proc `showProgress=`*(self: PrintOperation; showProgress: bool) = + gtk_print_operation_set_show_progress(cast[ptr PrintOperation00](self.impl), gboolean(showProgress)) + +proc gtk_print_operation_set_support_selection*(self: ptr PrintOperation00; supportSelection: gboolean) {. + importc: "gtk_print_operation_set_support_selection", libprag.} + +proc setSupportSelection*(self: PrintOperation; supportSelection: bool) = + gtk_print_operation_set_support_selection(cast[ptr PrintOperation00](self.impl), gboolean(supportSelection)) + +proc `supportSelection=`*(self: PrintOperation; supportSelection: bool) = + gtk_print_operation_set_support_selection(cast[ptr PrintOperation00](self.impl), gboolean(supportSelection)) + +proc gtk_print_operation_set_track_print_status*(self: ptr PrintOperation00; trackStatus: gboolean) {. + importc: "gtk_print_operation_set_track_print_status", libprag.} + +proc setTrackPrintStatus*(self: PrintOperation; trackStatus: bool) = + gtk_print_operation_set_track_print_status(cast[ptr PrintOperation00](self.impl), gboolean(trackStatus)) + +proc `trackPrintStatus=`*(self: PrintOperation; trackStatus: bool) = + gtk_print_operation_set_track_print_status(cast[ptr PrintOperation00](self.impl), gboolean(trackStatus)) + +proc gtk_print_operation_set_unit*(self: ptr PrintOperation00; unit: Unit) {. + importc: "gtk_print_operation_set_unit", libprag.} + +proc setUnit*(self: PrintOperation; unit: Unit) = + gtk_print_operation_set_unit(cast[ptr PrintOperation00](self.impl), unit) + +proc `unit=`*(self: PrintOperation; unit: Unit) = + gtk_print_operation_set_unit(cast[ptr PrintOperation00](self.impl), unit) + +proc gtk_print_operation_set_use_full_page*(self: ptr PrintOperation00; fullPage: gboolean) {. + importc: "gtk_print_operation_set_use_full_page", libprag.} + +proc setUseFullPage*(self: PrintOperation; fullPage: bool) = + gtk_print_operation_set_use_full_page(cast[ptr PrintOperation00](self.impl), gboolean(fullPage)) + +proc `useFullPage=`*(self: PrintOperation; fullPage: bool) = + gtk_print_operation_set_use_full_page(cast[ptr PrintOperation00](self.impl), gboolean(fullPage)) + +type + PrintPages* {.size: sizeof(cint), pure.} = enum + all = 0 + current = 1 + ranges = 2 + selection = 3 + +proc gtk_print_settings_get_print_pages*(self: ptr PrintSettings00): PrintPages {. + importc: "gtk_print_settings_get_print_pages", libprag.} + +proc getPrintPages*(self: PrintSettings): PrintPages = + gtk_print_settings_get_print_pages(cast[ptr PrintSettings00](self.impl)) + +proc printPages*(self: PrintSettings): PrintPages = + gtk_print_settings_get_print_pages(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_set_print_pages*(self: ptr PrintSettings00; pages: PrintPages) {. + importc: "gtk_print_settings_set_print_pages", libprag.} + +proc setPrintPages*(self: PrintSettings; pages: PrintPages) = + gtk_print_settings_set_print_pages(cast[ptr PrintSettings00](self.impl), pages) + +proc `printPages=`*(self: PrintSettings; pages: PrintPages) = + gtk_print_settings_set_print_pages(cast[ptr PrintSettings00](self.impl), pages) + +type + PrintQuality* {.size: sizeof(cint), pure.} = enum + low = 0 + normal = 1 + high = 2 + draft = 3 + +proc gtk_print_settings_get_quality*(self: ptr PrintSettings00): PrintQuality {. + importc: "gtk_print_settings_get_quality", libprag.} + +proc getQuality*(self: PrintSettings): PrintQuality = + gtk_print_settings_get_quality(cast[ptr PrintSettings00](self.impl)) + +proc quality*(self: PrintSettings): PrintQuality = + gtk_print_settings_get_quality(cast[ptr PrintSettings00](self.impl)) + +proc gtk_print_settings_set_quality*(self: ptr PrintSettings00; quality: PrintQuality) {. + importc: "gtk_print_settings_set_quality", libprag.} + +proc setQuality*(self: PrintSettings; quality: PrintQuality) = + gtk_print_settings_set_quality(cast[ptr PrintSettings00](self.impl), quality) + +proc `quality=`*(self: PrintSettings; quality: PrintQuality) = + gtk_print_settings_set_quality(cast[ptr PrintSettings00](self.impl), quality) + +type + PrintStatus* {.size: sizeof(cint), pure.} = enum + initial = 0 + preparing = 1 + generatingData = 2 + sendingData = 3 + pending = 4 + pendingIssue = 5 + printing = 6 + finished = 7 + finishedAborted = 8 + +proc gtk_print_operation_get_status*(self: ptr PrintOperation00): PrintStatus {. + importc: "gtk_print_operation_get_status", libprag.} + +proc getStatus*(self: PrintOperation): PrintStatus = + gtk_print_operation_get_status(cast[ptr PrintOperation00](self.impl)) + +proc status*(self: PrintOperation): PrintStatus = + gtk_print_operation_get_status(cast[ptr PrintOperation00](self.impl)) + +type + PrintOperationAction* {.size: sizeof(cint), pure.} = enum + printDialog = 0 + print = 1 + preview = 2 + `export` = 3 + +proc gtk_print_operation_run*(self: ptr PrintOperation00; action: PrintOperationAction; + parent: ptr Window00): PrintOperationResult {. + importc: "gtk_print_operation_run", libprag.} + +proc run*(self: PrintOperation; action: PrintOperationAction; + parent: Window): PrintOperationResult = + gtk_print_operation_run(cast[ptr PrintOperation00](self.impl), action, cast[ptr Window00](parent.impl)) + +type + PrintOperationClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + done*: proc(operation: ptr PrintOperation00; resu: PrintOperationResult) {.cdecl.} + beginPrint*: proc(operation: ptr PrintOperation00; context: ptr PrintContext00) {.cdecl.} + paginate*: proc(operation: ptr PrintOperation00; context: ptr PrintContext00): gboolean {.cdecl.} + requestPageSetup*: proc(operation: ptr PrintOperation00; context: ptr PrintContext00; + pageNr: int32; setup: ptr PageSetup00) {.cdecl.} + drawPage*: proc(operation: ptr PrintOperation00; context: ptr PrintContext00; + pageNr: int32) {.cdecl.} + endPrint*: proc(operation: ptr PrintOperation00; context: ptr PrintContext00) {.cdecl.} + statusChanged*: proc(operation: ptr PrintOperation00) {.cdecl.} + createCustomWidget*: pointer + customWidgetApply*: proc(operation: ptr PrintOperation00; widget: ptr Widget00) {.cdecl.} + preview*: proc(operation: ptr PrintOperation00; preview: ptr PrintOperationPreview00; + context: ptr PrintContext00; parent: ptr Window00): gboolean {.cdecl.} + updateCustomWidget*: proc(operation: ptr PrintOperation00; widget: ptr Widget00; + setup: ptr PageSetup00; settings: ptr PrintSettings00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + PrintOperationClass* = ref object + impl*: ptr PrintOperationClass00 + +type + PrintOperationPreviewIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + ready*: proc(preview: ptr PrintOperationPreview00; context: ptr PrintContext00) {.cdecl.} + gotPageSize*: proc(preview: ptr PrintOperationPreview00; context: ptr PrintContext00; + pageSetup: ptr PageSetup00) {.cdecl.} + renderPage*: proc(preview: ptr PrintOperationPreview00; pageNr: int32) {.cdecl.} + isSelected*: proc(preview: ptr PrintOperationPreview00; pageNr: int32): gboolean {.cdecl.} + endPreview*: proc(preview: ptr PrintOperationPreview00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + PrintOperationPreviewIface* = ref object + impl*: ptr PrintOperationPreviewIface00 + +type + PrintSettingsFunc* = proc (key: cstring; value: cstring; userData: pointer) {.cdecl.} + +proc gtk_print_settings_foreach*(self: ptr PrintSettings00; `func`: PrintSettingsFunc; + userData: pointer) {. + importc: "gtk_print_settings_foreach", libprag.} + +proc foreach*(self: PrintSettings; `func`: PrintSettingsFunc; userData: pointer) = + gtk_print_settings_foreach(cast[ptr PrintSettings00](self.impl), `func`, userData) + +type + ProgressBarPrivate00* {.pure.} = object + ProgressBarPrivate* = ref object + impl*: ptr ProgressBarPrivate00 + +type + ProgressBar* = ref object of Widget + ProgressBar00* = object of Widget00 + priv2: ptr ProgressBarPrivate00 + +proc gtk_progress_bar_new*(): ptr ProgressBar00 {. + importc: "gtk_progress_bar_new", libprag.} + +proc newProgressBar*(): ProgressBar = + new(result, finalizeGObject) + result.impl = gtk_progress_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initProgressBar*[T](result: var T) = + assert(result is ProgressBar) + new(result, finalizeGObject) + result.impl = gtk_progress_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_progress_bar_get_ellipsize*(self: ptr ProgressBar00): pango.EllipsizeMode {. + importc: "gtk_progress_bar_get_ellipsize", libprag.} + +proc getEllipsize*(self: ProgressBar): pango.EllipsizeMode = + gtk_progress_bar_get_ellipsize(cast[ptr ProgressBar00](self.impl)) + +proc ellipsize*(self: ProgressBar): pango.EllipsizeMode = + gtk_progress_bar_get_ellipsize(cast[ptr ProgressBar00](self.impl)) + +proc gtk_progress_bar_get_fraction*(self: ptr ProgressBar00): cdouble {. + importc: "gtk_progress_bar_get_fraction", libprag.} + +proc getFraction*(self: ProgressBar): cdouble = + gtk_progress_bar_get_fraction(cast[ptr ProgressBar00](self.impl)) + +proc fraction*(self: ProgressBar): cdouble = + gtk_progress_bar_get_fraction(cast[ptr ProgressBar00](self.impl)) + +proc gtk_progress_bar_get_inverted*(self: ptr ProgressBar00): gboolean {. + importc: "gtk_progress_bar_get_inverted", libprag.} + +proc getInverted*(self: ProgressBar): bool = + toBool(gtk_progress_bar_get_inverted(cast[ptr ProgressBar00](self.impl))) + +proc inverted*(self: ProgressBar): bool = + toBool(gtk_progress_bar_get_inverted(cast[ptr ProgressBar00](self.impl))) + +proc gtk_progress_bar_get_pulse_step*(self: ptr ProgressBar00): cdouble {. + importc: "gtk_progress_bar_get_pulse_step", libprag.} + +proc getPulseStep*(self: ProgressBar): cdouble = + gtk_progress_bar_get_pulse_step(cast[ptr ProgressBar00](self.impl)) + +proc pulseStep*(self: ProgressBar): cdouble = + gtk_progress_bar_get_pulse_step(cast[ptr ProgressBar00](self.impl)) + +proc gtk_progress_bar_get_show_text*(self: ptr ProgressBar00): gboolean {. + importc: "gtk_progress_bar_get_show_text", libprag.} + +proc getShowText*(self: ProgressBar): bool = + toBool(gtk_progress_bar_get_show_text(cast[ptr ProgressBar00](self.impl))) + +proc showText*(self: ProgressBar): bool = + toBool(gtk_progress_bar_get_show_text(cast[ptr ProgressBar00](self.impl))) + +proc gtk_progress_bar_get_text*(self: ptr ProgressBar00): cstring {. + importc: "gtk_progress_bar_get_text", libprag.} + +proc getText*(self: ProgressBar): string = + let resul0 = gtk_progress_bar_get_text(cast[ptr ProgressBar00](self.impl)) + result = $resul0 + +proc text*(self: ProgressBar): string = + let resul0 = gtk_progress_bar_get_text(cast[ptr ProgressBar00](self.impl)) + result = $resul0 + +proc gtk_progress_bar_pulse*(self: ptr ProgressBar00) {. + importc: "gtk_progress_bar_pulse", libprag.} + +proc pulse*(self: ProgressBar) = + gtk_progress_bar_pulse(cast[ptr ProgressBar00](self.impl)) + +proc gtk_progress_bar_set_ellipsize*(self: ptr ProgressBar00; mode: pango.EllipsizeMode) {. + importc: "gtk_progress_bar_set_ellipsize", libprag.} + +proc setEllipsize*(self: ProgressBar; mode: pango.EllipsizeMode) = + gtk_progress_bar_set_ellipsize(cast[ptr ProgressBar00](self.impl), mode) + +proc `ellipsize=`*(self: ProgressBar; mode: pango.EllipsizeMode) = + gtk_progress_bar_set_ellipsize(cast[ptr ProgressBar00](self.impl), mode) + +proc gtk_progress_bar_set_fraction*(self: ptr ProgressBar00; fraction: cdouble) {. + importc: "gtk_progress_bar_set_fraction", libprag.} + +proc setFraction*(self: ProgressBar; fraction: cdouble) = + gtk_progress_bar_set_fraction(cast[ptr ProgressBar00](self.impl), fraction) + +proc `fraction=`*(self: ProgressBar; fraction: cdouble) = + gtk_progress_bar_set_fraction(cast[ptr ProgressBar00](self.impl), fraction) + +proc gtk_progress_bar_set_inverted*(self: ptr ProgressBar00; inverted: gboolean) {. + importc: "gtk_progress_bar_set_inverted", libprag.} + +proc setInverted*(self: ProgressBar; inverted: bool) = + gtk_progress_bar_set_inverted(cast[ptr ProgressBar00](self.impl), gboolean(inverted)) + +proc `inverted=`*(self: ProgressBar; inverted: bool) = + gtk_progress_bar_set_inverted(cast[ptr ProgressBar00](self.impl), gboolean(inverted)) + +proc gtk_progress_bar_set_pulse_step*(self: ptr ProgressBar00; fraction: cdouble) {. + importc: "gtk_progress_bar_set_pulse_step", libprag.} + +proc setPulseStep*(self: ProgressBar; fraction: cdouble) = + gtk_progress_bar_set_pulse_step(cast[ptr ProgressBar00](self.impl), fraction) + +proc `pulseStep=`*(self: ProgressBar; fraction: cdouble) = + gtk_progress_bar_set_pulse_step(cast[ptr ProgressBar00](self.impl), fraction) + +proc gtk_progress_bar_set_show_text*(self: ptr ProgressBar00; showText: gboolean) {. + importc: "gtk_progress_bar_set_show_text", libprag.} + +proc setShowText*(self: ProgressBar; showText: bool) = + gtk_progress_bar_set_show_text(cast[ptr ProgressBar00](self.impl), gboolean(showText)) + +proc `showText=`*(self: ProgressBar; showText: bool) = + gtk_progress_bar_set_show_text(cast[ptr ProgressBar00](self.impl), gboolean(showText)) + +proc gtk_progress_bar_set_text*(self: ptr ProgressBar00; text: cstring) {. + importc: "gtk_progress_bar_set_text", libprag.} + +proc setText*(self: ProgressBar; text: string) = + gtk_progress_bar_set_text(cast[ptr ProgressBar00](self.impl), cstring(text)) + +proc `text=`*(self: ProgressBar; text: string) = + gtk_progress_bar_set_text(cast[ptr ProgressBar00](self.impl), cstring(text)) + +type + ProgressBarAccessiblePrivate00* {.pure.} = object + ProgressBarAccessiblePrivate* = ref object + impl*: ptr ProgressBarAccessiblePrivate00 + +type + ProgressBarAccessible* = ref object of WidgetAccessible + ProgressBarAccessible00* = object of WidgetAccessible00 + priv3: ptr ProgressBarAccessiblePrivate00 + +type + ProgressBarAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + ProgressBarAccessibleClass* = ref object + impl*: ptr ProgressBarAccessibleClass00 + +type + ProgressBarClass00* {.pure.} = object + parentClass*: WidgetClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ProgressBarClass* = ref object + impl*: ptr ProgressBarClass00 + +type + ToggleActionPrivate00* {.pure.} = object + ToggleActionPrivate* = ref object + impl*: ptr ToggleActionPrivate00 + +type + ToggleAction* = ref object of Action + ToggleAction00* = object of Action00 + privateData2: ptr ToggleActionPrivate00 + +proc scToggled*(self: ToggleAction; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggled", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_toggle_action_new*(name: cstring; label: cstring; tooltip: cstring; stockId: cstring): ptr ToggleAction00 {. + importc: "gtk_toggle_action_new", libprag.} + +proc newToggleAction*(name: string; label: string; tooltip: string; stockId: string): ToggleAction = + new(result, finalizeGObject) + result.impl = gtk_toggle_action_new(cstring(name), cstring(label), cstring(tooltip), cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToggleAction*[T](result: var T; name: string; label: string; tooltip: string; stockId: string) = + assert(result is ToggleAction) + new(result, finalizeGObject) + result.impl = gtk_toggle_action_new(cstring(name), cstring(label), cstring(tooltip), cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_toggle_action_get_active*(self: ptr ToggleAction00): gboolean {. + importc: "gtk_toggle_action_get_active", libprag.} + +proc getActive*(self: ToggleAction): bool = + toBool(gtk_toggle_action_get_active(cast[ptr ToggleAction00](self.impl))) + +proc active*(self: ToggleAction): bool = + toBool(gtk_toggle_action_get_active(cast[ptr ToggleAction00](self.impl))) + +proc gtk_toggle_action_get_draw_as_radio*(self: ptr ToggleAction00): gboolean {. + importc: "gtk_toggle_action_get_draw_as_radio", libprag.} + +proc getDrawAsRadio*(self: ToggleAction): bool = + toBool(gtk_toggle_action_get_draw_as_radio(cast[ptr ToggleAction00](self.impl))) + +proc drawAsRadio*(self: ToggleAction): bool = + toBool(gtk_toggle_action_get_draw_as_radio(cast[ptr ToggleAction00](self.impl))) + +proc gtk_toggle_action_set_active*(self: ptr ToggleAction00; isActive: gboolean) {. + importc: "gtk_toggle_action_set_active", libprag.} + +proc setActive*(self: ToggleAction; isActive: bool) = + gtk_toggle_action_set_active(cast[ptr ToggleAction00](self.impl), gboolean(isActive)) + +proc `active=`*(self: ToggleAction; isActive: bool) = + gtk_toggle_action_set_active(cast[ptr ToggleAction00](self.impl), gboolean(isActive)) + +proc gtk_toggle_action_set_draw_as_radio*(self: ptr ToggleAction00; drawAsRadio: gboolean) {. + importc: "gtk_toggle_action_set_draw_as_radio", libprag.} + +proc setDrawAsRadio*(self: ToggleAction; drawAsRadio: bool) = + gtk_toggle_action_set_draw_as_radio(cast[ptr ToggleAction00](self.impl), gboolean(drawAsRadio)) + +proc `drawAsRadio=`*(self: ToggleAction; drawAsRadio: bool) = + gtk_toggle_action_set_draw_as_radio(cast[ptr ToggleAction00](self.impl), gboolean(drawAsRadio)) + +proc gtk_toggle_action_toggled*(self: ptr ToggleAction00) {. + importc: "gtk_toggle_action_toggled", libprag.} + +proc toggled*(self: ToggleAction) = + gtk_toggle_action_toggled(cast[ptr ToggleAction00](self.impl)) + +type + RadioActionPrivate00* {.pure.} = object + RadioActionPrivate* = ref object + impl*: ptr RadioActionPrivate00 + +type + RadioAction* = ref object of ToggleAction + RadioAction00* = object of ToggleAction00 + privateData3: ptr RadioActionPrivate00 + +proc scChanged*(self: RadioAction; p: proc (self: ptr gobject.Object00; current: RadioAction00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_radio_action_new*(name: cstring; label: cstring; tooltip: cstring; stockId: cstring; + value: int32): ptr RadioAction00 {. + importc: "gtk_radio_action_new", libprag.} + +proc newRadioAction*(name: string; label: string; tooltip: string; stockId: string; + value: int): RadioAction = + new(result, finalizeGObject) + result.impl = gtk_radio_action_new(cstring(name), cstring(label), cstring(tooltip), cstring(stockId), int32(value)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioAction*[T](result: var T; name: string; label: string; tooltip: string; stockId: string; + value: int) = + assert(result is RadioAction) + new(result, finalizeGObject) + result.impl = gtk_radio_action_new(cstring(name), cstring(label), cstring(tooltip), cstring(stockId), int32(value)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_action_get_current_value*(self: ptr RadioAction00): int32 {. + importc: "gtk_radio_action_get_current_value", libprag.} + +proc getCurrentValue*(self: RadioAction): int = + int(gtk_radio_action_get_current_value(cast[ptr RadioAction00](self.impl))) + +proc currentValue*(self: RadioAction): int = + int(gtk_radio_action_get_current_value(cast[ptr RadioAction00](self.impl))) + +proc gtk_radio_action_get_group*(self: ptr RadioAction00): ptr pointer {. + importc: "gtk_radio_action_get_group", libprag.} + +proc getGroup*(self: RadioAction): ptr pointer = + gtk_radio_action_get_group(cast[ptr RadioAction00](self.impl)) + +proc group*(self: RadioAction): ptr pointer = + gtk_radio_action_get_group(cast[ptr RadioAction00](self.impl)) + +proc gtk_radio_action_join_group*(self: ptr RadioAction00; groupSource: ptr RadioAction00) {. + importc: "gtk_radio_action_join_group", libprag.} + +proc joinGroup*(self: RadioAction; groupSource: RadioAction) = + gtk_radio_action_join_group(cast[ptr RadioAction00](self.impl), cast[ptr RadioAction00](groupSource.impl)) + +proc gtk_radio_action_set_current_value*(self: ptr RadioAction00; currentValue: int32) {. + importc: "gtk_radio_action_set_current_value", libprag.} + +proc setCurrentValue*(self: RadioAction; currentValue: int) = + gtk_radio_action_set_current_value(cast[ptr RadioAction00](self.impl), int32(currentValue)) + +proc `currentValue=`*(self: RadioAction; currentValue: int) = + gtk_radio_action_set_current_value(cast[ptr RadioAction00](self.impl), int32(currentValue)) + +proc gtk_radio_action_set_group*(self: ptr RadioAction00; group: ptr pointer) {. + importc: "gtk_radio_action_set_group", libprag.} + +proc setGroup*(self: RadioAction; group: ptr pointer) = + gtk_radio_action_set_group(cast[ptr RadioAction00](self.impl), group) + +proc `group=`*(self: RadioAction; group: ptr pointer) = + gtk_radio_action_set_group(cast[ptr RadioAction00](self.impl), group) + +type + ToggleActionClass00* {.pure.} = object + parentClass*: ActionClass00 + toggled*: proc(action: ptr ToggleAction00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ToggleActionClass* = ref object + impl*: ptr ToggleActionClass00 + +type + RadioActionClass00* {.pure.} = object + parentClass*: ToggleActionClass00 + changed*: proc(action: ptr RadioAction00; current: ptr RadioAction00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + RadioActionClass* = ref object + impl*: ptr RadioActionClass00 + +type + RadioActionEntry00* {.pure.} = object + name*: cstring + stockId*: cstring + label*: cstring + accelerator*: cstring + tooltip*: cstring + value*: int32 + RadioActionEntry* = ref object + impl*: ptr RadioActionEntry00 + +type + RadioButtonPrivate00* {.pure.} = object + RadioButtonPrivate* = ref object + impl*: ptr RadioButtonPrivate00 + +type + RadioButton* = ref object of CheckButton + RadioButton00* = object of CheckButton00 + priv7: ptr RadioButtonPrivate00 + +proc scGroupChanged*(self: RadioButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "group-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_radio_button_new*(group: ptr pointer): ptr RadioButton00 {. + importc: "gtk_radio_button_new", libprag.} + +proc newRadioButton*(group: ptr pointer): RadioButton = + new(result, finalizeGObject) + result.impl = gtk_radio_button_new(group) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioButton*[T](result: var T; group: ptr pointer) = + assert(result is RadioButton) + new(result, finalizeGObject) + result.impl = gtk_radio_button_new(group) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_button_new_from_widget*(radioGroupMember: ptr RadioButton00): ptr RadioButton00 {. + importc: "gtk_radio_button_new_from_widget", libprag.} + +proc newRadioButtonFromWidget*(radioGroupMember: RadioButton): RadioButton = + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_from_widget(cast[ptr RadioButton00](radioGroupMember.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioButtonFromWidget*[T](result: var T; radioGroupMember: RadioButton) = + assert(result is RadioButton) + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_from_widget(cast[ptr RadioButton00](radioGroupMember.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_button_new_with_label*(group: ptr pointer; label: cstring): ptr RadioButton00 {. + importc: "gtk_radio_button_new_with_label", libprag.} + +proc newRadioButtonWithLabel*(group: ptr pointer; label: string): RadioButton = + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_with_label(group, cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioButtonWithLabel*[T](result: var T; group: ptr pointer; label: string) = + assert(result is RadioButton) + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_with_label(group, cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_button_new_with_label_from_widget*(radioGroupMember: ptr RadioButton00; label: cstring): ptr RadioButton00 {. + importc: "gtk_radio_button_new_with_label_from_widget", libprag.} + +proc newRadioButtonWithLabelFromWidget*(radioGroupMember: RadioButton; label: string): RadioButton = + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_with_label_from_widget(cast[ptr RadioButton00](radioGroupMember.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioButtonWithLabelFromWidget*[T](result: var T; radioGroupMember: RadioButton; label: string) = + assert(result is RadioButton) + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_with_label_from_widget(cast[ptr RadioButton00](radioGroupMember.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_button_new_with_mnemonic*(group: ptr pointer; label: cstring): ptr RadioButton00 {. + importc: "gtk_radio_button_new_with_mnemonic", libprag.} + +proc newRadioButtonWithMnemonic*(group: ptr pointer; label: string): RadioButton = + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_with_mnemonic(group, cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioButtonWithMnemonic*[T](result: var T; group: ptr pointer; label: string) = + assert(result is RadioButton) + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_with_mnemonic(group, cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_button_new_with_mnemonic_from_widget*(radioGroupMember: ptr RadioButton00; label: cstring): ptr RadioButton00 {. + importc: "gtk_radio_button_new_with_mnemonic_from_widget", libprag.} + +proc newRadioButtonWithMnemonicFromWidget*(radioGroupMember: RadioButton; label: string): RadioButton = + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_with_mnemonic_from_widget(cast[ptr RadioButton00](radioGroupMember.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioButtonWithMnemonicFromWidget*[T](result: var T; radioGroupMember: RadioButton; label: string) = + assert(result is RadioButton) + new(result, finalizeGObject) + result.impl = gtk_radio_button_new_with_mnemonic_from_widget(cast[ptr RadioButton00](radioGroupMember.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_button_get_group*(self: ptr RadioButton00): ptr pointer {. + importc: "gtk_radio_button_get_group", libprag.} + +proc getGroup*(self: RadioButton): ptr pointer = + gtk_radio_button_get_group(cast[ptr RadioButton00](self.impl)) + +proc group*(self: RadioButton): ptr pointer = + gtk_radio_button_get_group(cast[ptr RadioButton00](self.impl)) + +proc gtk_radio_button_join_group*(self: ptr RadioButton00; groupSource: ptr RadioButton00) {. + importc: "gtk_radio_button_join_group", libprag.} + +proc joinGroup*(self: RadioButton; groupSource: RadioButton) = + gtk_radio_button_join_group(cast[ptr RadioButton00](self.impl), cast[ptr RadioButton00](groupSource.impl)) + +proc gtk_radio_button_set_group*(self: ptr RadioButton00; group: ptr pointer) {. + importc: "gtk_radio_button_set_group", libprag.} + +proc setGroup*(self: RadioButton; group: ptr pointer) = + gtk_radio_button_set_group(cast[ptr RadioButton00](self.impl), group) + +proc `group=`*(self: RadioButton; group: ptr pointer) = + gtk_radio_button_set_group(cast[ptr RadioButton00](self.impl), group) + +type + RadioButtonAccessiblePrivate00* {.pure.} = object + RadioButtonAccessiblePrivate* = ref object + impl*: ptr RadioButtonAccessiblePrivate00 + +type + RadioButtonAccessible* = ref object of ToggleButtonAccessible + RadioButtonAccessible00* = object of ToggleButtonAccessible00 + priv6: ptr RadioButtonAccessiblePrivate00 + +type + RadioButtonAccessibleClass00* {.pure.} = object + parentClass*: ToggleButtonAccessibleClass00 + RadioButtonAccessibleClass* = ref object + impl*: ptr RadioButtonAccessibleClass00 + +type + RadioButtonClass00* {.pure.} = object + parentClass*: CheckButtonClass00 + groupChanged*: proc(radioButton: ptr RadioButton00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + RadioButtonClass* = ref object + impl*: ptr RadioButtonClass00 + +type + RadioMenuItemPrivate00* {.pure.} = object + RadioMenuItemPrivate* = ref object + impl*: ptr RadioMenuItemPrivate00 + +type + RadioMenuItem* = ref object of CheckMenuItem + RadioMenuItem00* = object of CheckMenuItem00 + priv6: ptr RadioMenuItemPrivate00 + +proc scGroupChanged*(self: RadioMenuItem; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "group-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_radio_menu_item_new*(group: ptr pointer): ptr RadioMenuItem00 {. + importc: "gtk_radio_menu_item_new", libprag.} + +proc newRadioMenuItem*(group: ptr pointer): RadioMenuItem = + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new(group) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioMenuItem*[T](result: var T; group: ptr pointer) = + assert(result is RadioMenuItem) + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new(group) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_menu_item_new_from_widget*(group: ptr RadioMenuItem00): ptr RadioMenuItem00 {. + importc: "gtk_radio_menu_item_new_from_widget", libprag.} + +proc newRadioMenuItemFromWidget*(group: RadioMenuItem): RadioMenuItem = + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_from_widget(cast[ptr RadioMenuItem00](group.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioMenuItemFromWidget*[T](result: var T; group: RadioMenuItem) = + assert(result is RadioMenuItem) + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_from_widget(cast[ptr RadioMenuItem00](group.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_menu_item_new_with_label*(group: ptr pointer; label: cstring): ptr RadioMenuItem00 {. + importc: "gtk_radio_menu_item_new_with_label", libprag.} + +proc newRadioMenuItemWithLabel*(group: ptr pointer; label: string): RadioMenuItem = + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_with_label(group, cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioMenuItemWithLabel*[T](result: var T; group: ptr pointer; label: string) = + assert(result is RadioMenuItem) + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_with_label(group, cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_menu_item_new_with_label_from_widget*(group: ptr RadioMenuItem00; label: cstring): ptr RadioMenuItem00 {. + importc: "gtk_radio_menu_item_new_with_label_from_widget", libprag.} + +proc newRadioMenuItemWithLabelFromWidget*(group: RadioMenuItem; label: string): RadioMenuItem = + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_with_label_from_widget(cast[ptr RadioMenuItem00](group.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioMenuItemWithLabelFromWidget*[T](result: var T; group: RadioMenuItem; label: string) = + assert(result is RadioMenuItem) + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_with_label_from_widget(cast[ptr RadioMenuItem00](group.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_menu_item_new_with_mnemonic*(group: ptr pointer; label: cstring): ptr RadioMenuItem00 {. + importc: "gtk_radio_menu_item_new_with_mnemonic", libprag.} + +proc newRadioMenuItemWithMnemonic*(group: ptr pointer; label: string): RadioMenuItem = + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_with_mnemonic(group, cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioMenuItemWithMnemonic*[T](result: var T; group: ptr pointer; label: string) = + assert(result is RadioMenuItem) + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_with_mnemonic(group, cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_menu_item_new_with_mnemonic_from_widget*(group: ptr RadioMenuItem00; label: cstring): ptr RadioMenuItem00 {. + importc: "gtk_radio_menu_item_new_with_mnemonic_from_widget", libprag.} + +proc newRadioMenuItemWithMnemonicFromWidget*(group: RadioMenuItem; label: string): RadioMenuItem = + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_with_mnemonic_from_widget(cast[ptr RadioMenuItem00](group.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioMenuItemWithMnemonicFromWidget*[T](result: var T; group: RadioMenuItem; label: string) = + assert(result is RadioMenuItem) + new(result, finalizeGObject) + result.impl = gtk_radio_menu_item_new_with_mnemonic_from_widget(cast[ptr RadioMenuItem00](group.impl), cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_menu_item_get_group*(self: ptr RadioMenuItem00): ptr pointer {. + importc: "gtk_radio_menu_item_get_group", libprag.} + +proc getGroup*(self: RadioMenuItem): ptr pointer = + gtk_radio_menu_item_get_group(cast[ptr RadioMenuItem00](self.impl)) + +proc group*(self: RadioMenuItem): ptr pointer = + gtk_radio_menu_item_get_group(cast[ptr RadioMenuItem00](self.impl)) + +proc gtk_radio_menu_item_join_group*(self: ptr RadioMenuItem00; groupSource: ptr RadioMenuItem00) {. + importc: "gtk_radio_menu_item_join_group", libprag.} + +proc joinGroup*(self: RadioMenuItem; groupSource: RadioMenuItem) = + gtk_radio_menu_item_join_group(cast[ptr RadioMenuItem00](self.impl), cast[ptr RadioMenuItem00](groupSource.impl)) + +proc gtk_radio_menu_item_set_group*(self: ptr RadioMenuItem00; group: ptr pointer) {. + importc: "gtk_radio_menu_item_set_group", libprag.} + +proc setGroup*(self: RadioMenuItem; group: ptr pointer) = + gtk_radio_menu_item_set_group(cast[ptr RadioMenuItem00](self.impl), group) + +proc `group=`*(self: RadioMenuItem; group: ptr pointer) = + gtk_radio_menu_item_set_group(cast[ptr RadioMenuItem00](self.impl), group) + +type + RadioMenuItemAccessiblePrivate00* {.pure.} = object + RadioMenuItemAccessiblePrivate* = ref object + impl*: ptr RadioMenuItemAccessiblePrivate00 + +type + RadioMenuItemAccessible* = ref object of CheckMenuItemAccessible + RadioMenuItemAccessible00* = object of CheckMenuItemAccessible00 + priv6: ptr RadioMenuItemAccessiblePrivate00 + +type + RadioMenuItemAccessibleClass00* {.pure.} = object + parentClass*: CheckMenuItemAccessibleClass00 + RadioMenuItemAccessibleClass* = ref object + impl*: ptr RadioMenuItemAccessibleClass00 + +type + RadioMenuItemClass00* {.pure.} = object + parentClass*: CheckMenuItemClass00 + groupChanged*: proc(radioMenuItem: ptr RadioMenuItem00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + RadioMenuItemClass* = ref object + impl*: ptr RadioMenuItemClass00 + +type + ToggleToolButtonPrivate00* {.pure.} = object + ToggleToolButtonPrivate* = ref object + impl*: ptr ToggleToolButtonPrivate00 + +type + ToggleToolButton* = ref object of ToolButton + ToggleToolButton00* = object of ToolButton00 + priv6: ptr ToggleToolButtonPrivate00 + +proc scToggled*(self: ToggleToolButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggled", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_toggle_tool_button_new*(): ptr ToggleToolButton00 {. + importc: "gtk_toggle_tool_button_new", libprag.} + +proc newToggleToolButton*(): ToggleToolButton = + new(result, finalizeGObject) + result.impl = gtk_toggle_tool_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToggleToolButton*[T](result: var T) = + assert(result is ToggleToolButton) + new(result, finalizeGObject) + result.impl = gtk_toggle_tool_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_toggle_tool_button_new_from_stock*(stockId: cstring): ptr ToggleToolButton00 {. + importc: "gtk_toggle_tool_button_new_from_stock", libprag.} + +proc newToggleToolButtonFromStock*(stockId: string): ToggleToolButton = + new(result, finalizeGObject) + result.impl = gtk_toggle_tool_button_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToggleToolButtonFromStock*[T](result: var T; stockId: string) = + assert(result is ToggleToolButton) + new(result, finalizeGObject) + result.impl = gtk_toggle_tool_button_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_toggle_tool_button_get_active*(self: ptr ToggleToolButton00): gboolean {. + importc: "gtk_toggle_tool_button_get_active", libprag.} + +proc getActive*(self: ToggleToolButton): bool = + toBool(gtk_toggle_tool_button_get_active(cast[ptr ToggleToolButton00](self.impl))) + +proc active*(self: ToggleToolButton): bool = + toBool(gtk_toggle_tool_button_get_active(cast[ptr ToggleToolButton00](self.impl))) + +proc gtk_toggle_tool_button_set_active*(self: ptr ToggleToolButton00; isActive: gboolean) {. + importc: "gtk_toggle_tool_button_set_active", libprag.} + +proc setActive*(self: ToggleToolButton; isActive: bool) = + gtk_toggle_tool_button_set_active(cast[ptr ToggleToolButton00](self.impl), gboolean(isActive)) + +proc `active=`*(self: ToggleToolButton; isActive: bool) = + gtk_toggle_tool_button_set_active(cast[ptr ToggleToolButton00](self.impl), gboolean(isActive)) + +type + RadioToolButton* = ref object of ToggleToolButton + RadioToolButton00* = object of ToggleToolButton00 + +proc gtk_radio_tool_button_new*(group: ptr pointer): ptr RadioToolButton00 {. + importc: "gtk_radio_tool_button_new", libprag.} + +proc newRadioToolButton*(group: ptr pointer): RadioToolButton = + new(result, finalizeGObject) + result.impl = gtk_radio_tool_button_new(group) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioToolButton*[T](result: var T; group: ptr pointer) = + assert(result is RadioToolButton) + new(result, finalizeGObject) + result.impl = gtk_radio_tool_button_new(group) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_tool_button_new_from_stock*(group: ptr pointer; stockId: cstring): ptr RadioToolButton00 {. + importc: "gtk_radio_tool_button_new_from_stock", libprag.} + +proc newRadioToolButtonFromStock*(group: ptr pointer; stockId: string): RadioToolButton = + new(result, finalizeGObject) + result.impl = gtk_radio_tool_button_new_from_stock(group, cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioToolButtonFromStock*[T](result: var T; group: ptr pointer; stockId: string) = + assert(result is RadioToolButton) + new(result, finalizeGObject) + result.impl = gtk_radio_tool_button_new_from_stock(group, cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_tool_button_new_from_widget*(group: ptr RadioToolButton00): ptr RadioToolButton00 {. + importc: "gtk_radio_tool_button_new_from_widget", libprag.} + +proc newRadioToolButtonFromWidget*(group: RadioToolButton): RadioToolButton = + new(result, finalizeGObject) + result.impl = gtk_radio_tool_button_new_from_widget(cast[ptr RadioToolButton00](group.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioToolButtonFromWidget*[T](result: var T; group: RadioToolButton) = + assert(result is RadioToolButton) + new(result, finalizeGObject) + result.impl = gtk_radio_tool_button_new_from_widget(cast[ptr RadioToolButton00](group.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_tool_button_new_with_stock_from_widget*(group: ptr RadioToolButton00; stockId: cstring): ptr RadioToolButton00 {. + importc: "gtk_radio_tool_button_new_with_stock_from_widget", libprag.} + +proc newRadioToolButtonWithStockFromWidget*(group: RadioToolButton; stockId: string): RadioToolButton = + new(result, finalizeGObject) + result.impl = gtk_radio_tool_button_new_with_stock_from_widget(cast[ptr RadioToolButton00](group.impl), cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRadioToolButtonWithStockFromWidget*[T](result: var T; group: RadioToolButton; stockId: string) = + assert(result is RadioToolButton) + new(result, finalizeGObject) + result.impl = gtk_radio_tool_button_new_with_stock_from_widget(cast[ptr RadioToolButton00](group.impl), cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_radio_tool_button_get_group*(self: ptr RadioToolButton00): ptr pointer {. + importc: "gtk_radio_tool_button_get_group", libprag.} + +proc getGroup*(self: RadioToolButton): ptr pointer = + gtk_radio_tool_button_get_group(cast[ptr RadioToolButton00](self.impl)) + +proc group*(self: RadioToolButton): ptr pointer = + gtk_radio_tool_button_get_group(cast[ptr RadioToolButton00](self.impl)) + +proc gtk_radio_tool_button_set_group*(self: ptr RadioToolButton00; group: ptr pointer) {. + importc: "gtk_radio_tool_button_set_group", libprag.} + +proc setGroup*(self: RadioToolButton; group: ptr pointer) = + gtk_radio_tool_button_set_group(cast[ptr RadioToolButton00](self.impl), group) + +proc `group=`*(self: RadioToolButton; group: ptr pointer) = + gtk_radio_tool_button_set_group(cast[ptr RadioToolButton00](self.impl), group) + +type + ToggleToolButtonClass00* {.pure.} = object + parentClass*: ToolButtonClass00 + toggled*: proc(button: ptr ToggleToolButton00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ToggleToolButtonClass* = ref object + impl*: ptr ToggleToolButtonClass00 + +type + RadioToolButtonClass00* {.pure.} = object + parentClass*: ToggleToolButtonClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + RadioToolButtonClass* = ref object + impl*: ptr RadioToolButtonClass00 + +type + RangeAccessiblePrivate00* {.pure.} = object + RangeAccessiblePrivate* = ref object + impl*: ptr RangeAccessiblePrivate00 + +type + RangeAccessible* = ref object of WidgetAccessible + RangeAccessible00* = object of WidgetAccessible00 + priv3: ptr RangeAccessiblePrivate00 + +type + RangeAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + RangeAccessibleClass* = ref object + impl*: ptr RangeAccessibleClass00 + +type + RcContext00* {.pure.} = object + RcContext* = ref object + impl*: ptr RcContext00 + +type + RcProperty00* {.pure.} = object + typeName*: uint32 + propertyName*: uint32 + origin*: cstring + value*: gobject.Value00 + RcProperty* = ref object + impl*: ptr RcProperty00 + +proc gtk_rc_property_parse_border*(pspec: ptr gobject.ParamSpec00; gstring: ptr glib.String00; + propertyValue: ptr gobject.Value00): gboolean {. + importc: "gtk_rc_property_parse_border", libprag.} + +proc parseBorder*(pspec: gobject.ParamSpec; gstring: glib.String; propertyValue: gobject.Value): bool = + toBool(gtk_rc_property_parse_border(cast[ptr gobject.ParamSpec00](pspec.impl), cast[ptr glib.String00](gstring.impl), cast[ptr gobject.Value00](propertyValue.impl))) + +proc gtk_rc_property_parse_color*(pspec: ptr gobject.ParamSpec00; gstring: ptr glib.String00; + propertyValue: ptr gobject.Value00): gboolean {. + importc: "gtk_rc_property_parse_color", libprag.} + +proc parseColor*(pspec: gobject.ParamSpec; gstring: glib.String; propertyValue: gobject.Value): bool = + toBool(gtk_rc_property_parse_color(cast[ptr gobject.ParamSpec00](pspec.impl), cast[ptr glib.String00](gstring.impl), cast[ptr gobject.Value00](propertyValue.impl))) + +proc gtk_rc_property_parse_enum*(pspec: ptr gobject.ParamSpec00; gstring: ptr glib.String00; + propertyValue: ptr gobject.Value00): gboolean {. + importc: "gtk_rc_property_parse_enum", libprag.} + +proc parseEnum*(pspec: gobject.ParamSpec; gstring: glib.String; propertyValue: gobject.Value): bool = + toBool(gtk_rc_property_parse_enum(cast[ptr gobject.ParamSpec00](pspec.impl), cast[ptr glib.String00](gstring.impl), cast[ptr gobject.Value00](propertyValue.impl))) + +proc gtk_rc_property_parse_flags*(pspec: ptr gobject.ParamSpec00; gstring: ptr glib.String00; + propertyValue: ptr gobject.Value00): gboolean {. + importc: "gtk_rc_property_parse_flags", libprag.} + +proc parseFlags*(pspec: gobject.ParamSpec; gstring: glib.String; propertyValue: gobject.Value): bool = + toBool(gtk_rc_property_parse_flags(cast[ptr gobject.ParamSpec00](pspec.impl), cast[ptr glib.String00](gstring.impl), cast[ptr gobject.Value00](propertyValue.impl))) + +proc gtk_rc_property_parse_requisition*(pspec: ptr gobject.ParamSpec00; gstring: ptr glib.String00; + propertyValue: ptr gobject.Value00): gboolean {. + importc: "gtk_rc_property_parse_requisition", libprag.} + +proc parseRequisition*(pspec: gobject.ParamSpec; gstring: glib.String; propertyValue: gobject.Value): bool = + toBool(gtk_rc_property_parse_requisition(cast[ptr gobject.ParamSpec00](pspec.impl), cast[ptr glib.String00](gstring.impl), cast[ptr gobject.Value00](propertyValue.impl))) + +type + RcPropertyParser* = proc (pspec: ptr gobject.ParamSpec00; rcString: ptr glib.String00; + propertyValue: ptr gobject.Value00): gboolean {.cdecl.} + +proc gtk_settings_install_property_parser*(pspec: ptr gobject.ParamSpec00; parser: RcPropertyParser) {. + importc: "gtk_settings_install_property_parser", libprag.} + +proc installPropertyParser*(pspec: gobject.ParamSpec; parser: RcPropertyParser) = + gtk_settings_install_property_parser(cast[ptr gobject.ParamSpec00](pspec.impl), parser) + +type + RcStyleClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + createRcStyle*: pointer + parse*: proc(rcStyle: ptr RcStyle00; settings: ptr Settings00; + scanner: ptr glib.Scanner00): uint32 {.cdecl.} + merge*: proc(dest: ptr RcStyle00; src: ptr RcStyle00) {.cdecl.} + createStyle*: pointer + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + RcStyleClass* = ref object + impl*: ptr RcStyleClass00 + +type + RcTokenType* {.size: sizeof(cint), pure.} = enum + invalid = 270 + `include` = 271 + normal = 272 + active = 273 + prelight = 274 + selected = 275 + insensitive = 276 + fg = 277 + bg = 278 + text = 279 + base = 280 + xthickness = 281 + ythickness = 282 + font = 283 + fontset = 284 + fontName = 285 + bgPixmap = 286 + pixmapPath = 287 + style = 288 + binding = 289 + `bind` = 290 + widget = 291 + widgetClass = 292 + class = 293 + lowest = 294 + gtk = 295 + application = 296 + theme = 297 + rc = 298 + highest = 299 + engine = 300 + modulePath = 301 + imModulePath = 302 + imModuleFile = 303 + stock = 304 + ltr = 305 + rtl = 306 + color = 307 + unbind = 308 + last = 309 + +type + RecentActionPrivate00* {.pure.} = object + RecentActionPrivate* = ref object + impl*: ptr RecentActionPrivate00 + +type + RecentAction* = ref object of Action + RecentAction00* = object of Action00 + priv2: ptr RecentActionPrivate00 + +proc gtk_recent_action_new*(name: cstring; label: cstring; tooltip: cstring; stockId: cstring): ptr RecentAction00 {. + importc: "gtk_recent_action_new", libprag.} + +proc newRecentAction*(name: string; label: string; tooltip: string; stockId: string): RecentAction = + new(result, finalizeGObject) + result.impl = gtk_recent_action_new(cstring(name), cstring(label), cstring(tooltip), cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRecentAction*[T](result: var T; name: string; label: string; tooltip: string; stockId: string) = + assert(result is RecentAction) + new(result, finalizeGObject) + result.impl = gtk_recent_action_new(cstring(name), cstring(label), cstring(tooltip), cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_recent_action_get_show_numbers*(self: ptr RecentAction00): gboolean {. + importc: "gtk_recent_action_get_show_numbers", libprag.} + +proc getShowNumbers*(self: RecentAction): bool = + toBool(gtk_recent_action_get_show_numbers(cast[ptr RecentAction00](self.impl))) + +proc showNumbers*(self: RecentAction): bool = + toBool(gtk_recent_action_get_show_numbers(cast[ptr RecentAction00](self.impl))) + +proc gtk_recent_action_set_show_numbers*(self: ptr RecentAction00; showNumbers: gboolean) {. + importc: "gtk_recent_action_set_show_numbers", libprag.} + +proc setShowNumbers*(self: RecentAction; showNumbers: bool) = + gtk_recent_action_set_show_numbers(cast[ptr RecentAction00](self.impl), gboolean(showNumbers)) + +proc `showNumbers=`*(self: RecentAction; showNumbers: bool) = + gtk_recent_action_set_show_numbers(cast[ptr RecentAction00](self.impl), gboolean(showNumbers)) + +type + RecentManagerPrivate00* {.pure.} = object + RecentManagerPrivate* = ref object + impl*: ptr RecentManagerPrivate00 + +type + RecentManager* = ref object of gobject.Object + RecentManager00* = object of gobject.Object00 + priv1: ptr RecentManagerPrivate00 + +proc scChanged*(self: RecentManager; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_recent_manager_new*(): ptr RecentManager00 {. + importc: "gtk_recent_manager_new", libprag.} + +proc newRecentManager*(): RecentManager = + new(result, finalizeGObject) + result.impl = gtk_recent_manager_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRecentManager*[T](result: var T) = + assert(result is RecentManager) + new(result, finalizeGObject) + result.impl = gtk_recent_manager_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_recent_manager_get_default*(): ptr RecentManager00 {. + importc: "gtk_recent_manager_get_default", libprag.} + +proc getDefault*(): RecentManager = + let gobj = gtk_recent_manager_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[RecentManager](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc default*(): RecentManager = + let gobj = gtk_recent_manager_get_default() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[RecentManager](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_recent_manager_add_item*(self: ptr RecentManager00; uri: cstring): gboolean {. + importc: "gtk_recent_manager_add_item", libprag.} + +proc addItem*(self: RecentManager; uri: string): bool = + toBool(gtk_recent_manager_add_item(cast[ptr RecentManager00](self.impl), cstring(uri))) + +proc gtk_recent_manager_get_items*(self: ptr RecentManager00): ptr pointer {. + importc: "gtk_recent_manager_get_items", libprag.} + +proc getItems*(self: RecentManager): ptr pointer = + gtk_recent_manager_get_items(cast[ptr RecentManager00](self.impl)) + +proc items*(self: RecentManager): ptr pointer = + gtk_recent_manager_get_items(cast[ptr RecentManager00](self.impl)) + +proc gtk_recent_manager_has_item*(self: ptr RecentManager00; uri: cstring): gboolean {. + importc: "gtk_recent_manager_has_item", libprag.} + +proc hasItem*(self: RecentManager; uri: string): bool = + toBool(gtk_recent_manager_has_item(cast[ptr RecentManager00](self.impl), cstring(uri))) + +proc gtk_recent_manager_move_item*(self: ptr RecentManager00; uri: cstring; newUri: cstring): gboolean {. + importc: "gtk_recent_manager_move_item", libprag.} + +proc moveItem*(self: RecentManager; uri: string; newUri: string): bool = + toBool(gtk_recent_manager_move_item(cast[ptr RecentManager00](self.impl), cstring(uri), cstring(newUri))) + +proc gtk_recent_manager_purge_items*(self: ptr RecentManager00): int32 {. + importc: "gtk_recent_manager_purge_items", libprag.} + +proc purgeItems*(self: RecentManager): int = + int(gtk_recent_manager_purge_items(cast[ptr RecentManager00](self.impl))) + +proc gtk_recent_manager_remove_item*(self: ptr RecentManager00; uri: cstring): gboolean {. + importc: "gtk_recent_manager_remove_item", libprag.} + +proc removeItem*(self: RecentManager; uri: string): bool = + toBool(gtk_recent_manager_remove_item(cast[ptr RecentManager00](self.impl), cstring(uri))) + +proc gtk_recent_action_new_for_manager*(name: cstring; label: cstring; tooltip: cstring; stockId: cstring; + manager: ptr RecentManager00): ptr RecentAction00 {. + importc: "gtk_recent_action_new_for_manager", libprag.} + +proc newRecentActionForManager*(name: string; label: string; tooltip: string; stockId: string; + manager: RecentManager): RecentAction = + new(result, finalizeGObject) + result.impl = gtk_recent_action_new_for_manager(cstring(name), cstring(label), cstring(tooltip), cstring(stockId), cast[ptr RecentManager00](manager.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRecentActionForManager*[T](result: var T; name: string; label: string; tooltip: string; stockId: string; + manager: RecentManager) = + assert(result is RecentAction) + new(result, finalizeGObject) + result.impl = gtk_recent_action_new_for_manager(cstring(name), cstring(label), cstring(tooltip), cstring(stockId), cast[ptr RecentManager00](manager.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + RecentData00* {.pure.} = object + displayName*: cstring + description*: cstring + mimeType*: cstring + appName*: cstring + appExec*: cstring + groups*: cstringArray + isPrivate*: gboolean + RecentData* = ref object + impl*: ptr RecentData00 + +proc gtk_recent_manager_add_full*(self: ptr RecentManager00; uri: cstring; recentData: ptr RecentData00): gboolean {. + importc: "gtk_recent_manager_add_full", libprag.} + +proc addFull*(self: RecentManager; uri: string; recentData: RecentData): bool = + toBool(gtk_recent_manager_add_full(cast[ptr RecentManager00](self.impl), cstring(uri), cast[ptr RecentData00](recentData.impl))) + +type + RecentInfo00* {.pure.} = object + RecentInfo* = ref object + impl*: ptr RecentInfo00 + +proc gtk_recent_info_create_app_info*(self: ptr RecentInfo00; appName: cstring): ptr gio.AppInfo00 {. + importc: "gtk_recent_info_create_app_info", libprag.} + +proc createAppInfo*(self: RecentInfo; appName: string): gio.AppInfo = + new(result) + result.impl = gtk_recent_info_create_app_info(cast[ptr RecentInfo00](self.impl), cstring(appName)) + +proc gtk_recent_info_exists*(self: ptr RecentInfo00): gboolean {. + importc: "gtk_recent_info_exists", libprag.} + +proc exists*(self: RecentInfo): bool = + toBool(gtk_recent_info_exists(cast[ptr RecentInfo00](self.impl))) + +proc gtk_recent_info_get_added*(self: ptr RecentInfo00): int64 {. + importc: "gtk_recent_info_get_added", libprag.} + +proc getAdded*(self: RecentInfo): int64 = + gtk_recent_info_get_added(cast[ptr RecentInfo00](self.impl)) + +proc added*(self: RecentInfo): int64 = + gtk_recent_info_get_added(cast[ptr RecentInfo00](self.impl)) + +proc gtk_recent_info_get_age*(self: ptr RecentInfo00): int32 {. + importc: "gtk_recent_info_get_age", libprag.} + +proc getAge*(self: RecentInfo): int = + int(gtk_recent_info_get_age(cast[ptr RecentInfo00](self.impl))) + +proc age*(self: RecentInfo): int = + int(gtk_recent_info_get_age(cast[ptr RecentInfo00](self.impl))) + +proc gtk_recent_info_get_application_info*(self: ptr RecentInfo00; appName: cstring; appExec: var cstring; + count: var uint32; time: var int64): gboolean {. + importc: "gtk_recent_info_get_application_info", libprag.} + +proc getApplicationInfo*(self: RecentInfo; appName: string; appExec: var string; + count: var int; time: var int64): bool = + var count_00 = uint32(count) + var appExec_00 = cstring(appExec) + result = toBool(gtk_recent_info_get_application_info(cast[ptr RecentInfo00](self.impl), cstring(appName), appExec_00, count_00, time)) + count = int(count_00) + appExec = $(appExec_00) + +proc applicationInfo*(self: RecentInfo; appName: string; appExec: var string; + count: var int; time: var int64): bool = + var count_00 = uint32(count) + var appExec_00 = cstring(appExec) + result = toBool(gtk_recent_info_get_application_info(cast[ptr RecentInfo00](self.impl), cstring(appName), appExec_00, count_00, time)) + count = int(count_00) + appExec = $(appExec_00) + +proc gtk_recent_info_get_applications*(self: ptr RecentInfo00; length: var uint64): cstringArray {. + importc: "gtk_recent_info_get_applications", libprag.} + +proc getApplications*(self: RecentInfo; length: var uint64): cstringArray = + gtk_recent_info_get_applications(cast[ptr RecentInfo00](self.impl), length) + +proc applications*(self: RecentInfo; length: var uint64): cstringArray = + gtk_recent_info_get_applications(cast[ptr RecentInfo00](self.impl), length) + +proc gtk_recent_info_get_description*(self: ptr RecentInfo00): cstring {. + importc: "gtk_recent_info_get_description", libprag.} + +proc getDescription*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_description(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + +proc description*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_description(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + +proc gtk_recent_info_get_display_name*(self: ptr RecentInfo00): cstring {. + importc: "gtk_recent_info_get_display_name", libprag.} + +proc getDisplayName*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_display_name(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + +proc displayName*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_display_name(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + +proc gtk_recent_info_get_gicon*(self: ptr RecentInfo00): ptr gio.Icon00 {. + importc: "gtk_recent_info_get_gicon", libprag.} + +proc getGicon*(self: RecentInfo): gio.Icon = + new(result) + result.impl = gtk_recent_info_get_gicon(cast[ptr RecentInfo00](self.impl)) + +proc gicon*(self: RecentInfo): gio.Icon = + new(result) + result.impl = gtk_recent_info_get_gicon(cast[ptr RecentInfo00](self.impl)) + +proc gtk_recent_info_get_groups*(self: ptr RecentInfo00; length: var uint64): cstringArray {. + importc: "gtk_recent_info_get_groups", libprag.} + +proc getGroups*(self: RecentInfo; length: var uint64): cstringArray = + gtk_recent_info_get_groups(cast[ptr RecentInfo00](self.impl), length) + +proc groups*(self: RecentInfo; length: var uint64): cstringArray = + gtk_recent_info_get_groups(cast[ptr RecentInfo00](self.impl), length) + +proc gtk_recent_info_get_icon*(self: ptr RecentInfo00; size: int32): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_recent_info_get_icon", libprag.} + +proc getIcon*(self: RecentInfo; size: int): gdkpixbuf.Pixbuf = + let gobj = gtk_recent_info_get_icon(cast[ptr RecentInfo00](self.impl), int32(size)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc icon*(self: RecentInfo; size: int): gdkpixbuf.Pixbuf = + let gobj = gtk_recent_info_get_icon(cast[ptr RecentInfo00](self.impl), int32(size)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_recent_info_get_mime_type*(self: ptr RecentInfo00): cstring {. + importc: "gtk_recent_info_get_mime_type", libprag.} + +proc getMimeType*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_mime_type(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + +proc mimeType*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_mime_type(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + +proc gtk_recent_info_get_modified*(self: ptr RecentInfo00): int64 {. + importc: "gtk_recent_info_get_modified", libprag.} + +proc getModified*(self: RecentInfo): int64 = + gtk_recent_info_get_modified(cast[ptr RecentInfo00](self.impl)) + +proc modified*(self: RecentInfo): int64 = + gtk_recent_info_get_modified(cast[ptr RecentInfo00](self.impl)) + +proc gtk_recent_info_get_private_hint*(self: ptr RecentInfo00): gboolean {. + importc: "gtk_recent_info_get_private_hint", libprag.} + +proc getPrivateHint*(self: RecentInfo): bool = + toBool(gtk_recent_info_get_private_hint(cast[ptr RecentInfo00](self.impl))) + +proc privateHint*(self: RecentInfo): bool = + toBool(gtk_recent_info_get_private_hint(cast[ptr RecentInfo00](self.impl))) + +proc gtk_recent_info_get_short_name*(self: ptr RecentInfo00): cstring {. + importc: "gtk_recent_info_get_short_name", libprag.} + +proc getShortName*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_short_name(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc shortName*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_short_name(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_recent_info_get_uri*(self: ptr RecentInfo00): cstring {. + importc: "gtk_recent_info_get_uri", libprag.} + +proc getUri*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_uri(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + +proc uri*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_uri(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + +proc gtk_recent_info_get_uri_display*(self: ptr RecentInfo00): cstring {. + importc: "gtk_recent_info_get_uri_display", libprag.} + +proc getUriDisplay*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_uri_display(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc uriDisplay*(self: RecentInfo): string = + let resul0 = gtk_recent_info_get_uri_display(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_recent_info_get_visited*(self: ptr RecentInfo00): int64 {. + importc: "gtk_recent_info_get_visited", libprag.} + +proc getVisited*(self: RecentInfo): int64 = + gtk_recent_info_get_visited(cast[ptr RecentInfo00](self.impl)) + +proc visited*(self: RecentInfo): int64 = + gtk_recent_info_get_visited(cast[ptr RecentInfo00](self.impl)) + +proc gtk_recent_info_has_application*(self: ptr RecentInfo00; appName: cstring): gboolean {. + importc: "gtk_recent_info_has_application", libprag.} + +proc hasApplication*(self: RecentInfo; appName: string): bool = + toBool(gtk_recent_info_has_application(cast[ptr RecentInfo00](self.impl), cstring(appName))) + +proc gtk_recent_info_has_group*(self: ptr RecentInfo00; groupName: cstring): gboolean {. + importc: "gtk_recent_info_has_group", libprag.} + +proc hasGroup*(self: RecentInfo; groupName: string): bool = + toBool(gtk_recent_info_has_group(cast[ptr RecentInfo00](self.impl), cstring(groupName))) + +proc gtk_recent_info_is_local*(self: ptr RecentInfo00): gboolean {. + importc: "gtk_recent_info_is_local", libprag.} + +proc isLocal*(self: RecentInfo): bool = + toBool(gtk_recent_info_is_local(cast[ptr RecentInfo00](self.impl))) + +proc gtk_recent_info_last_application*(self: ptr RecentInfo00): cstring {. + importc: "gtk_recent_info_last_application", libprag.} + +proc lastApplication*(self: RecentInfo): string = + let resul0 = gtk_recent_info_last_application(cast[ptr RecentInfo00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_recent_info_match*(self: ptr RecentInfo00; infoB: ptr RecentInfo00): gboolean {. + importc: "gtk_recent_info_match", libprag.} + +proc match*(self: RecentInfo; infoB: RecentInfo): bool = + toBool(gtk_recent_info_match(cast[ptr RecentInfo00](self.impl), cast[ptr RecentInfo00](infoB.impl))) + +proc gtk_recent_info_ref*(self: ptr RecentInfo00): ptr RecentInfo00 {. + importc: "gtk_recent_info_ref", libprag.} + +proc `ref`*(self: RecentInfo): RecentInfo = + new(result) + result.impl = gtk_recent_info_ref(cast[ptr RecentInfo00](self.impl)) + +proc gtk_recent_info_unref*(self: ptr RecentInfo00) {. + importc: "gtk_recent_info_unref", libprag.} + +proc unref*(self: RecentInfo) = + gtk_recent_info_unref(cast[ptr RecentInfo00](self.impl)) + +proc gtk_recent_manager_lookup_item*(self: ptr RecentManager00; uri: cstring): ptr RecentInfo00 {. + importc: "gtk_recent_manager_lookup_item", libprag.} + +proc lookupItem*(self: RecentManager; uri: string): RecentInfo = + new(result) + result.impl = gtk_recent_manager_lookup_item(cast[ptr RecentManager00](self.impl), cstring(uri)) + +type + RecentActionClass00* {.pure.} = object + parentClass*: ActionClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + RecentActionClass* = ref object + impl*: ptr RecentActionClass00 + +type + RecentChooser00* {.pure.} = object + RecentChooser* = ref object + impl*: ptr RecentChooser00 + +proc gtk_recent_chooser_get_current_item*(self: ptr RecentChooser00): ptr RecentInfo00 {. + importc: "gtk_recent_chooser_get_current_item", libprag.} + +proc getCurrentItem*(self: RecentChooser): RecentInfo = + new(result) + result.impl = gtk_recent_chooser_get_current_item(cast[ptr RecentChooser00](self.impl)) + +proc currentItem*(self: RecentChooser): RecentInfo = + new(result) + result.impl = gtk_recent_chooser_get_current_item(cast[ptr RecentChooser00](self.impl)) + +proc gtk_recent_chooser_get_current_uri*(self: ptr RecentChooser00): cstring {. + importc: "gtk_recent_chooser_get_current_uri", libprag.} + +proc getCurrentUri*(self: RecentChooser): string = + let resul0 = gtk_recent_chooser_get_current_uri(cast[ptr RecentChooser00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc currentUri*(self: RecentChooser): string = + let resul0 = gtk_recent_chooser_get_current_uri(cast[ptr RecentChooser00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_recent_chooser_get_items*(self: ptr RecentChooser00): ptr pointer {. + importc: "gtk_recent_chooser_get_items", libprag.} + +proc getItems*(self: RecentChooser): ptr pointer = + gtk_recent_chooser_get_items(cast[ptr RecentChooser00](self.impl)) + +proc items*(self: RecentChooser): ptr pointer = + gtk_recent_chooser_get_items(cast[ptr RecentChooser00](self.impl)) + +proc gtk_recent_chooser_get_limit*(self: ptr RecentChooser00): int32 {. + importc: "gtk_recent_chooser_get_limit", libprag.} + +proc getLimit*(self: RecentChooser): int = + int(gtk_recent_chooser_get_limit(cast[ptr RecentChooser00](self.impl))) + +proc limit*(self: RecentChooser): int = + int(gtk_recent_chooser_get_limit(cast[ptr RecentChooser00](self.impl))) + +proc gtk_recent_chooser_get_local_only*(self: ptr RecentChooser00): gboolean {. + importc: "gtk_recent_chooser_get_local_only", libprag.} + +proc getLocalOnly*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_local_only(cast[ptr RecentChooser00](self.impl))) + +proc localOnly*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_local_only(cast[ptr RecentChooser00](self.impl))) + +proc gtk_recent_chooser_get_select_multiple*(self: ptr RecentChooser00): gboolean {. + importc: "gtk_recent_chooser_get_select_multiple", libprag.} + +proc getSelectMultiple*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_select_multiple(cast[ptr RecentChooser00](self.impl))) + +proc selectMultiple*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_select_multiple(cast[ptr RecentChooser00](self.impl))) + +proc gtk_recent_chooser_get_show_icons*(self: ptr RecentChooser00): gboolean {. + importc: "gtk_recent_chooser_get_show_icons", libprag.} + +proc getShowIcons*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_show_icons(cast[ptr RecentChooser00](self.impl))) + +proc showIcons*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_show_icons(cast[ptr RecentChooser00](self.impl))) + +proc gtk_recent_chooser_get_show_not_found*(self: ptr RecentChooser00): gboolean {. + importc: "gtk_recent_chooser_get_show_not_found", libprag.} + +proc getShowNotFound*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_show_not_found(cast[ptr RecentChooser00](self.impl))) + +proc showNotFound*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_show_not_found(cast[ptr RecentChooser00](self.impl))) + +proc gtk_recent_chooser_get_show_private*(self: ptr RecentChooser00): gboolean {. + importc: "gtk_recent_chooser_get_show_private", libprag.} + +proc getShowPrivate*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_show_private(cast[ptr RecentChooser00](self.impl))) + +proc showPrivate*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_show_private(cast[ptr RecentChooser00](self.impl))) + +proc gtk_recent_chooser_get_show_tips*(self: ptr RecentChooser00): gboolean {. + importc: "gtk_recent_chooser_get_show_tips", libprag.} + +proc getShowTips*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_show_tips(cast[ptr RecentChooser00](self.impl))) + +proc showTips*(self: RecentChooser): bool = + toBool(gtk_recent_chooser_get_show_tips(cast[ptr RecentChooser00](self.impl))) + +proc gtk_recent_chooser_get_uris*(self: ptr RecentChooser00; length: var uint64): cstringArray {. + importc: "gtk_recent_chooser_get_uris", libprag.} + +proc getUris*(self: RecentChooser; length: var uint64): cstringArray = + gtk_recent_chooser_get_uris(cast[ptr RecentChooser00](self.impl), length) + +proc uris*(self: RecentChooser; length: var uint64): cstringArray = + gtk_recent_chooser_get_uris(cast[ptr RecentChooser00](self.impl), length) + +proc gtk_recent_chooser_list_filters*(self: ptr RecentChooser00): ptr pointer {. + importc: "gtk_recent_chooser_list_filters", libprag.} + +proc listFilters*(self: RecentChooser): ptr pointer = + gtk_recent_chooser_list_filters(cast[ptr RecentChooser00](self.impl)) + +proc gtk_recent_chooser_select_all*(self: ptr RecentChooser00) {. + importc: "gtk_recent_chooser_select_all", libprag.} + +proc selectAll*(self: RecentChooser) = + gtk_recent_chooser_select_all(cast[ptr RecentChooser00](self.impl)) + +proc gtk_recent_chooser_select_uri*(self: ptr RecentChooser00; uri: cstring): gboolean {. + importc: "gtk_recent_chooser_select_uri", libprag.} + +proc selectUri*(self: RecentChooser; uri: string): bool = + toBool(gtk_recent_chooser_select_uri(cast[ptr RecentChooser00](self.impl), cstring(uri))) + +proc gtk_recent_chooser_set_current_uri*(self: ptr RecentChooser00; uri: cstring): gboolean {. + importc: "gtk_recent_chooser_set_current_uri", libprag.} + +proc setCurrentUri*(self: RecentChooser; uri: string): bool = + toBool(gtk_recent_chooser_set_current_uri(cast[ptr RecentChooser00](self.impl), cstring(uri))) + +proc `currentUri=`*(self: RecentChooser; uri: string): bool = + toBool(gtk_recent_chooser_set_current_uri(cast[ptr RecentChooser00](self.impl), cstring(uri))) + +proc gtk_recent_chooser_set_limit*(self: ptr RecentChooser00; limit: int32) {. + importc: "gtk_recent_chooser_set_limit", libprag.} + +proc setLimit*(self: RecentChooser; limit: int) = + gtk_recent_chooser_set_limit(cast[ptr RecentChooser00](self.impl), int32(limit)) + +proc `limit=`*(self: RecentChooser; limit: int) = + gtk_recent_chooser_set_limit(cast[ptr RecentChooser00](self.impl), int32(limit)) + +proc gtk_recent_chooser_set_local_only*(self: ptr RecentChooser00; localOnly: gboolean) {. + importc: "gtk_recent_chooser_set_local_only", libprag.} + +proc setLocalOnly*(self: RecentChooser; localOnly: bool) = + gtk_recent_chooser_set_local_only(cast[ptr RecentChooser00](self.impl), gboolean(localOnly)) + +proc `localOnly=`*(self: RecentChooser; localOnly: bool) = + gtk_recent_chooser_set_local_only(cast[ptr RecentChooser00](self.impl), gboolean(localOnly)) + +proc gtk_recent_chooser_set_select_multiple*(self: ptr RecentChooser00; selectMultiple: gboolean) {. + importc: "gtk_recent_chooser_set_select_multiple", libprag.} + +proc setSelectMultiple*(self: RecentChooser; selectMultiple: bool) = + gtk_recent_chooser_set_select_multiple(cast[ptr RecentChooser00](self.impl), gboolean(selectMultiple)) + +proc `selectMultiple=`*(self: RecentChooser; selectMultiple: bool) = + gtk_recent_chooser_set_select_multiple(cast[ptr RecentChooser00](self.impl), gboolean(selectMultiple)) + +proc gtk_recent_chooser_set_show_icons*(self: ptr RecentChooser00; showIcons: gboolean) {. + importc: "gtk_recent_chooser_set_show_icons", libprag.} + +proc setShowIcons*(self: RecentChooser; showIcons: bool) = + gtk_recent_chooser_set_show_icons(cast[ptr RecentChooser00](self.impl), gboolean(showIcons)) + +proc `showIcons=`*(self: RecentChooser; showIcons: bool) = + gtk_recent_chooser_set_show_icons(cast[ptr RecentChooser00](self.impl), gboolean(showIcons)) + +proc gtk_recent_chooser_set_show_not_found*(self: ptr RecentChooser00; showNotFound: gboolean) {. + importc: "gtk_recent_chooser_set_show_not_found", libprag.} + +proc setShowNotFound*(self: RecentChooser; showNotFound: bool) = + gtk_recent_chooser_set_show_not_found(cast[ptr RecentChooser00](self.impl), gboolean(showNotFound)) + +proc `showNotFound=`*(self: RecentChooser; showNotFound: bool) = + gtk_recent_chooser_set_show_not_found(cast[ptr RecentChooser00](self.impl), gboolean(showNotFound)) + +proc gtk_recent_chooser_set_show_private*(self: ptr RecentChooser00; showPrivate: gboolean) {. + importc: "gtk_recent_chooser_set_show_private", libprag.} + +proc setShowPrivate*(self: RecentChooser; showPrivate: bool) = + gtk_recent_chooser_set_show_private(cast[ptr RecentChooser00](self.impl), gboolean(showPrivate)) + +proc `showPrivate=`*(self: RecentChooser; showPrivate: bool) = + gtk_recent_chooser_set_show_private(cast[ptr RecentChooser00](self.impl), gboolean(showPrivate)) + +proc gtk_recent_chooser_set_show_tips*(self: ptr RecentChooser00; showTips: gboolean) {. + importc: "gtk_recent_chooser_set_show_tips", libprag.} + +proc setShowTips*(self: RecentChooser; showTips: bool) = + gtk_recent_chooser_set_show_tips(cast[ptr RecentChooser00](self.impl), gboolean(showTips)) + +proc `showTips=`*(self: RecentChooser; showTips: bool) = + gtk_recent_chooser_set_show_tips(cast[ptr RecentChooser00](self.impl), gboolean(showTips)) + +proc gtk_recent_chooser_unselect_all*(self: ptr RecentChooser00) {. + importc: "gtk_recent_chooser_unselect_all", libprag.} + +proc unselectAll*(self: RecentChooser) = + gtk_recent_chooser_unselect_all(cast[ptr RecentChooser00](self.impl)) + +proc gtk_recent_chooser_unselect_uri*(self: ptr RecentChooser00; uri: cstring) {. + importc: "gtk_recent_chooser_unselect_uri", libprag.} + +proc unselectUri*(self: RecentChooser; uri: string) = + gtk_recent_chooser_unselect_uri(cast[ptr RecentChooser00](self.impl), cstring(uri)) + +type + RecentFilter* = ref object of gobject.InitiallyUnowned + RecentFilter00* = object of gobject.InitiallyUnowned00 + +proc gtk_recent_filter_new*(): ptr RecentFilter00 {. + importc: "gtk_recent_filter_new", libprag.} + +proc newRecentFilter*(): RecentFilter = + new(result, finalizeGObject) + result.impl = gtk_recent_filter_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRecentFilter*[T](result: var T) = + assert(result is RecentFilter) + new(result, finalizeGObject) + result.impl = gtk_recent_filter_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_recent_filter_add_age*(self: ptr RecentFilter00; days: int32) {. + importc: "gtk_recent_filter_add_age", libprag.} + +proc addAge*(self: RecentFilter; days: int) = + gtk_recent_filter_add_age(cast[ptr RecentFilter00](self.impl), int32(days)) + +proc gtk_recent_filter_add_application*(self: ptr RecentFilter00; application: cstring) {. + importc: "gtk_recent_filter_add_application", libprag.} + +proc addApplication*(self: RecentFilter; application: string) = + gtk_recent_filter_add_application(cast[ptr RecentFilter00](self.impl), cstring(application)) + +proc gtk_recent_filter_add_group*(self: ptr RecentFilter00; group: cstring) {. + importc: "gtk_recent_filter_add_group", libprag.} + +proc addGroup*(self: RecentFilter; group: string) = + gtk_recent_filter_add_group(cast[ptr RecentFilter00](self.impl), cstring(group)) + +proc gtk_recent_filter_add_mime_type*(self: ptr RecentFilter00; mimeType: cstring) {. + importc: "gtk_recent_filter_add_mime_type", libprag.} + +proc addMimeType*(self: RecentFilter; mimeType: string) = + gtk_recent_filter_add_mime_type(cast[ptr RecentFilter00](self.impl), cstring(mimeType)) + +proc gtk_recent_filter_add_pattern*(self: ptr RecentFilter00; pattern: cstring) {. + importc: "gtk_recent_filter_add_pattern", libprag.} + +proc addPattern*(self: RecentFilter; pattern: string) = + gtk_recent_filter_add_pattern(cast[ptr RecentFilter00](self.impl), cstring(pattern)) + +proc gtk_recent_filter_add_pixbuf_formats*(self: ptr RecentFilter00) {. + importc: "gtk_recent_filter_add_pixbuf_formats", libprag.} + +proc addPixbufFormats*(self: RecentFilter) = + gtk_recent_filter_add_pixbuf_formats(cast[ptr RecentFilter00](self.impl)) + +proc gtk_recent_filter_get_name*(self: ptr RecentFilter00): cstring {. + importc: "gtk_recent_filter_get_name", libprag.} + +proc getName*(self: RecentFilter): string = + let resul0 = gtk_recent_filter_get_name(cast[ptr RecentFilter00](self.impl)) + result = $resul0 + +proc name*(self: RecentFilter): string = + let resul0 = gtk_recent_filter_get_name(cast[ptr RecentFilter00](self.impl)) + result = $resul0 + +proc gtk_recent_filter_set_name*(self: ptr RecentFilter00; name: cstring) {. + importc: "gtk_recent_filter_set_name", libprag.} + +proc setName*(self: RecentFilter; name: string) = + gtk_recent_filter_set_name(cast[ptr RecentFilter00](self.impl), cstring(name)) + +proc `name=`*(self: RecentFilter; name: string) = + gtk_recent_filter_set_name(cast[ptr RecentFilter00](self.impl), cstring(name)) + +proc gtk_recent_chooser_add_filter*(self: ptr RecentChooser00; filter: ptr RecentFilter00) {. + importc: "gtk_recent_chooser_add_filter", libprag.} + +proc addFilter*(self: RecentChooser; filter: RecentFilter) = + gtk_recent_chooser_add_filter(cast[ptr RecentChooser00](self.impl), cast[ptr RecentFilter00](filter.impl)) + +proc gtk_recent_chooser_get_filter*(self: ptr RecentChooser00): ptr RecentFilter00 {. + importc: "gtk_recent_chooser_get_filter", libprag.} + +proc getFilter*(self: RecentChooser): RecentFilter = + let gobj = gtk_recent_chooser_get_filter(cast[ptr RecentChooser00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[RecentFilter](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc filter*(self: RecentChooser): RecentFilter = + let gobj = gtk_recent_chooser_get_filter(cast[ptr RecentChooser00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[RecentFilter](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_recent_chooser_remove_filter*(self: ptr RecentChooser00; filter: ptr RecentFilter00) {. + importc: "gtk_recent_chooser_remove_filter", libprag.} + +proc removeFilter*(self: RecentChooser; filter: RecentFilter) = + gtk_recent_chooser_remove_filter(cast[ptr RecentChooser00](self.impl), cast[ptr RecentFilter00](filter.impl)) + +proc gtk_recent_chooser_set_filter*(self: ptr RecentChooser00; filter: ptr RecentFilter00) {. + importc: "gtk_recent_chooser_set_filter", libprag.} + +proc setFilter*(self: RecentChooser; filter: RecentFilter) = + gtk_recent_chooser_set_filter(cast[ptr RecentChooser00](self.impl), cast[ptr RecentFilter00](filter.impl)) + +proc `filter=`*(self: RecentChooser; filter: RecentFilter) = + gtk_recent_chooser_set_filter(cast[ptr RecentChooser00](self.impl), cast[ptr RecentFilter00](filter.impl)) + +type + RecentFilterFlag* {.size: sizeof(cint), pure.} = enum + uri = 1 + displayName = 2 + mimeType = 3 + application = 4 + group = 5 + age = 6 + + RecentFilterFlags* {.size: sizeof(cint).} = set[RecentFilterFlag] + +type + RecentFilterInfo00* {.pure.} = object + contains*: RecentFilterFlags + uri*: cstring + displayName*: cstring + mimeType*: cstring + applications*: cstringArray + groups*: cstringArray + age*: int32 + RecentFilterInfo* = ref object + impl*: ptr RecentFilterInfo00 + +proc gtk_recent_filter_filter*(self: ptr RecentFilter00; filterInfo: ptr RecentFilterInfo00): gboolean {. + importc: "gtk_recent_filter_filter", libprag.} + +proc filter*(self: RecentFilter; filterInfo: RecentFilterInfo): bool = + toBool(gtk_recent_filter_filter(cast[ptr RecentFilter00](self.impl), cast[ptr RecentFilterInfo00](filterInfo.impl))) + +proc gtk_recent_filter_get_needed*(self: ptr RecentFilter00): RecentFilterFlags {. + importc: "gtk_recent_filter_get_needed", libprag.} + +proc getNeeded*(self: RecentFilter): RecentFilterFlags = + gtk_recent_filter_get_needed(cast[ptr RecentFilter00](self.impl)) + +proc needed*(self: RecentFilter): RecentFilterFlags = + gtk_recent_filter_get_needed(cast[ptr RecentFilter00](self.impl)) + +type + RecentSortType* {.size: sizeof(cint), pure.} = enum + none = 0 + mru = 1 + lru = 2 + custom = 3 + +proc gtk_recent_chooser_get_sort_type*(self: ptr RecentChooser00): RecentSortType {. + importc: "gtk_recent_chooser_get_sort_type", libprag.} + +proc getSortType*(self: RecentChooser): RecentSortType = + gtk_recent_chooser_get_sort_type(cast[ptr RecentChooser00](self.impl)) + +proc sortType*(self: RecentChooser): RecentSortType = + gtk_recent_chooser_get_sort_type(cast[ptr RecentChooser00](self.impl)) + +proc gtk_recent_chooser_set_sort_type*(self: ptr RecentChooser00; sortType: RecentSortType) {. + importc: "gtk_recent_chooser_set_sort_type", libprag.} + +proc setSortType*(self: RecentChooser; sortType: RecentSortType) = + gtk_recent_chooser_set_sort_type(cast[ptr RecentChooser00](self.impl), sortType) + +proc `sortType=`*(self: RecentChooser; sortType: RecentSortType) = + gtk_recent_chooser_set_sort_type(cast[ptr RecentChooser00](self.impl), sortType) + +type + RecentChooserDialogPrivate00* {.pure.} = object + RecentChooserDialogPrivate* = ref object + impl*: ptr RecentChooserDialogPrivate00 + +type + RecentChooserDialog* = ref object of Dialog + RecentChooserDialog00* = object of Dialog00 + priv6: ptr RecentChooserDialogPrivate00 + +type + RecentChooserDialogClass00* {.pure.} = object + parentClass*: DialogClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + RecentChooserDialogClass* = ref object + impl*: ptr RecentChooserDialogClass00 + +type + RecentChooserError* {.size: sizeof(cint), pure.} = enum + notFound = 0 + invalidUri = 1 + +proc gtk_recent_chooser_error_quark*(): uint32 {. + importc: "gtk_recent_chooser_error_quark", libprag.} + +type + RecentChooserMenuPrivate00* {.pure.} = object + RecentChooserMenuPrivate* = ref object + impl*: ptr RecentChooserMenuPrivate00 + +type + RecentChooserMenu* = ref object of Menu + RecentChooserMenu00* = object of Menu00 + priv5: ptr RecentChooserMenuPrivate00 + +proc gtk_recent_chooser_menu_new*(): ptr RecentChooserMenu00 {. + importc: "gtk_recent_chooser_menu_new", libprag.} + +proc newRecentChooserMenu*(): RecentChooserMenu = + new(result, finalizeGObject) + result.impl = gtk_recent_chooser_menu_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRecentChooserMenu*[T](result: var T) = + assert(result is RecentChooserMenu) + new(result, finalizeGObject) + result.impl = gtk_recent_chooser_menu_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_recent_chooser_menu_new_for_manager*(manager: ptr RecentManager00): ptr RecentChooserMenu00 {. + importc: "gtk_recent_chooser_menu_new_for_manager", libprag.} + +proc newRecentChooserMenuForManager*(manager: RecentManager): RecentChooserMenu = + new(result, finalizeGObject) + result.impl = gtk_recent_chooser_menu_new_for_manager(cast[ptr RecentManager00](manager.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRecentChooserMenuForManager*[T](result: var T; manager: RecentManager) = + assert(result is RecentChooserMenu) + new(result, finalizeGObject) + result.impl = gtk_recent_chooser_menu_new_for_manager(cast[ptr RecentManager00](manager.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_recent_chooser_menu_get_show_numbers*(self: ptr RecentChooserMenu00): gboolean {. + importc: "gtk_recent_chooser_menu_get_show_numbers", libprag.} + +proc getShowNumbers*(self: RecentChooserMenu): bool = + toBool(gtk_recent_chooser_menu_get_show_numbers(cast[ptr RecentChooserMenu00](self.impl))) + +proc showNumbers*(self: RecentChooserMenu): bool = + toBool(gtk_recent_chooser_menu_get_show_numbers(cast[ptr RecentChooserMenu00](self.impl))) + +proc gtk_recent_chooser_menu_set_show_numbers*(self: ptr RecentChooserMenu00; showNumbers: gboolean) {. + importc: "gtk_recent_chooser_menu_set_show_numbers", libprag.} + +proc setShowNumbers*(self: RecentChooserMenu; showNumbers: bool) = + gtk_recent_chooser_menu_set_show_numbers(cast[ptr RecentChooserMenu00](self.impl), gboolean(showNumbers)) + +proc `showNumbers=`*(self: RecentChooserMenu; showNumbers: bool) = + gtk_recent_chooser_menu_set_show_numbers(cast[ptr RecentChooserMenu00](self.impl), gboolean(showNumbers)) + +type + RecentChooserMenuClass00* {.pure.} = object + parentClass*: MenuClass00 + gtkRecent1*: proc() {.cdecl.} + gtkRecent2*: proc() {.cdecl.} + gtkRecent3*: proc() {.cdecl.} + gtkRecent4*: proc() {.cdecl.} + RecentChooserMenuClass* = ref object + impl*: ptr RecentChooserMenuClass00 + +type + RecentChooserWidgetPrivate00* {.pure.} = object + RecentChooserWidgetPrivate* = ref object + impl*: ptr RecentChooserWidgetPrivate00 + +type + RecentChooserWidget* = ref object of Box + RecentChooserWidget00* = object of Box00 + priv4: ptr RecentChooserWidgetPrivate00 + +proc gtk_recent_chooser_widget_new*(): ptr RecentChooserWidget00 {. + importc: "gtk_recent_chooser_widget_new", libprag.} + +proc newRecentChooserWidget*(): RecentChooserWidget = + new(result, finalizeGObject) + result.impl = gtk_recent_chooser_widget_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRecentChooserWidget*[T](result: var T) = + assert(result is RecentChooserWidget) + new(result, finalizeGObject) + result.impl = gtk_recent_chooser_widget_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_recent_chooser_widget_new_for_manager*(manager: ptr RecentManager00): ptr RecentChooserWidget00 {. + importc: "gtk_recent_chooser_widget_new_for_manager", libprag.} + +proc newRecentChooserWidgetForManager*(manager: RecentManager): RecentChooserWidget = + new(result, finalizeGObject) + result.impl = gtk_recent_chooser_widget_new_for_manager(cast[ptr RecentManager00](manager.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRecentChooserWidgetForManager*[T](result: var T; manager: RecentManager) = + assert(result is RecentChooserWidget) + new(result, finalizeGObject) + result.impl = gtk_recent_chooser_widget_new_for_manager(cast[ptr RecentManager00](manager.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + RecentChooserWidgetClass00* {.pure.} = object + parentClass*: BoxClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + RecentChooserWidgetClass* = ref object + impl*: ptr RecentChooserWidgetClass00 + +type + RecentFilterFunc* = proc (filterInfo: ptr RecentFilterInfo00; userData: pointer): gboolean {.cdecl.} + +proc gtk_recent_filter_add_custom*(self: ptr RecentFilter00; needed: RecentFilterFlags; + `func`: RecentFilterFunc; data: pointer; dataDestroy: DestroyNotify) {. + importc: "gtk_recent_filter_add_custom", libprag.} + +proc addCustom*(self: RecentFilter; needed: RecentFilterFlags; `func`: RecentFilterFunc; + data: pointer; dataDestroy: DestroyNotify) = + gtk_recent_filter_add_custom(cast[ptr RecentFilter00](self.impl), needed, `func`, data, dataDestroy) + +type + RecentManagerClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + changed*: proc(manager: ptr RecentManager00) {.cdecl.} + gtkRecent1*: pointer + gtkRecent2*: pointer + gtkRecent3*: pointer + gtkRecent4*: pointer + RecentManagerClass* = ref object + impl*: ptr RecentManagerClass00 + +type + RecentManagerError* {.size: sizeof(cint), pure.} = enum + notFound = 0 + invalidUri = 1 + invalidEncoding = 2 + notRegistered = 3 + read = 4 + write = 5 + unknown = 6 + +proc gtk_recent_manager_error_quark*(): uint32 {. + importc: "gtk_recent_manager_error_quark", libprag.} + +type + RecentSortFunc* = proc (a: ptr RecentInfo00; b: ptr RecentInfo00; userData: pointer): int32 {.cdecl.} + +type + RecentChooserIface00* {.pure.} = object + baseIface*: gobject.TypeInterface00 + setCurrentUri*: proc(chooser: ptr RecentChooser00; uri: cstring): gboolean {.cdecl.} + getCurrentUri*: proc(chooser: ptr RecentChooser00): cstring {.cdecl.} + selectUri*: proc(chooser: ptr RecentChooser00; uri: cstring): gboolean {.cdecl.} + unselectUri*: proc(chooser: ptr RecentChooser00; uri: cstring) {.cdecl.} + selectAll*: proc(chooser: ptr RecentChooser00) {.cdecl.} + unselectAll*: proc(chooser: ptr RecentChooser00) {.cdecl.} + getItems*: proc(chooser: ptr RecentChooser00): ptr pointer {.cdecl.} + getRecentManager*: pointer + addFilter*: proc(chooser: ptr RecentChooser00; filter: ptr RecentFilter00) {.cdecl.} + removeFilter*: proc(chooser: ptr RecentChooser00; filter: ptr RecentFilter00) {.cdecl.} + listFilters*: proc(chooser: ptr RecentChooser00): ptr pointer {.cdecl.} + setSortFunc*: proc(chooser: ptr RecentChooser00; sortFunc: RecentSortFunc; + sortData: pointer; dataDestroy: DestroyNotify) {.cdecl.} + itemActivated*: proc(chooser: ptr RecentChooser00) {.cdecl.} + selectionChanged*: proc(chooser: ptr RecentChooser00) {.cdecl.} + RecentChooserIface* = ref object + impl*: ptr RecentChooserIface00 + +proc gtk_recent_chooser_set_sort_func*(self: ptr RecentChooser00; sortFunc: RecentSortFunc; + sortData: pointer; dataDestroy: DestroyNotify) {. + importc: "gtk_recent_chooser_set_sort_func", libprag.} + +proc setSortFunc*(self: RecentChooser; sortFunc: RecentSortFunc; sortData: pointer; + dataDestroy: DestroyNotify) = + gtk_recent_chooser_set_sort_func(cast[ptr RecentChooser00](self.impl), sortFunc, sortData, dataDestroy) + +type + RequestedSize00* {.pure.} = object + data*: pointer + minimumSize*: int32 + naturalSize*: int32 + RequestedSize* = ref object + impl*: ptr RequestedSize00 + +type + ResponseType* {.size: sizeof(cint), pure.} = enum + help = -11 + apply = -10 + no = -9 + yes = -8 + close = -7 + cancel = -6 + ok = -5 + deleteEvent = -4 + accept = -3 + reject = -2 + none = -1 + +type + Revealer* = ref object of Bin + Revealer00* = object of Bin00 + +proc gtk_revealer_new*(): ptr Revealer00 {. + importc: "gtk_revealer_new", libprag.} + +proc newRevealer*(): Revealer = + new(result, finalizeGObject) + result.impl = gtk_revealer_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initRevealer*[T](result: var T) = + assert(result is Revealer) + new(result, finalizeGObject) + result.impl = gtk_revealer_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_revealer_get_child_revealed*(self: ptr Revealer00): gboolean {. + importc: "gtk_revealer_get_child_revealed", libprag.} + +proc getChildRevealed*(self: Revealer): bool = + toBool(gtk_revealer_get_child_revealed(cast[ptr Revealer00](self.impl))) + +proc childRevealed*(self: Revealer): bool = + toBool(gtk_revealer_get_child_revealed(cast[ptr Revealer00](self.impl))) + +proc gtk_revealer_get_reveal_child*(self: ptr Revealer00): gboolean {. + importc: "gtk_revealer_get_reveal_child", libprag.} + +proc getRevealChild*(self: Revealer): bool = + toBool(gtk_revealer_get_reveal_child(cast[ptr Revealer00](self.impl))) + +proc revealChild*(self: Revealer): bool = + toBool(gtk_revealer_get_reveal_child(cast[ptr Revealer00](self.impl))) + +proc gtk_revealer_get_transition_duration*(self: ptr Revealer00): uint32 {. + importc: "gtk_revealer_get_transition_duration", libprag.} + +proc getTransitionDuration*(self: Revealer): int = + int(gtk_revealer_get_transition_duration(cast[ptr Revealer00](self.impl))) + +proc transitionDuration*(self: Revealer): int = + int(gtk_revealer_get_transition_duration(cast[ptr Revealer00](self.impl))) + +proc gtk_revealer_set_reveal_child*(self: ptr Revealer00; revealChild: gboolean) {. + importc: "gtk_revealer_set_reveal_child", libprag.} + +proc setRevealChild*(self: Revealer; revealChild: bool) = + gtk_revealer_set_reveal_child(cast[ptr Revealer00](self.impl), gboolean(revealChild)) + +proc `revealChild=`*(self: Revealer; revealChild: bool) = + gtk_revealer_set_reveal_child(cast[ptr Revealer00](self.impl), gboolean(revealChild)) + +proc gtk_revealer_set_transition_duration*(self: ptr Revealer00; duration: uint32) {. + importc: "gtk_revealer_set_transition_duration", libprag.} + +proc setTransitionDuration*(self: Revealer; duration: int) = + gtk_revealer_set_transition_duration(cast[ptr Revealer00](self.impl), uint32(duration)) + +proc `transitionDuration=`*(self: Revealer; duration: int) = + gtk_revealer_set_transition_duration(cast[ptr Revealer00](self.impl), uint32(duration)) + +type + RevealerTransitionType* {.size: sizeof(cint), pure.} = enum + none = 0 + crossfade = 1 + slideRight = 2 + slideLeft = 3 + slideUp = 4 + slideDown = 5 + +proc gtk_revealer_get_transition_type*(self: ptr Revealer00): RevealerTransitionType {. + importc: "gtk_revealer_get_transition_type", libprag.} + +proc getTransitionType*(self: Revealer): RevealerTransitionType = + gtk_revealer_get_transition_type(cast[ptr Revealer00](self.impl)) + +proc transitionType*(self: Revealer): RevealerTransitionType = + gtk_revealer_get_transition_type(cast[ptr Revealer00](self.impl)) + +proc gtk_revealer_set_transition_type*(self: ptr Revealer00; transition: RevealerTransitionType) {. + importc: "gtk_revealer_set_transition_type", libprag.} + +proc setTransitionType*(self: Revealer; transition: RevealerTransitionType) = + gtk_revealer_set_transition_type(cast[ptr Revealer00](self.impl), transition) + +proc `transitionType=`*(self: Revealer; transition: RevealerTransitionType) = + gtk_revealer_set_transition_type(cast[ptr Revealer00](self.impl), transition) + +type + RevealerClass00* {.pure.} = object + parentClass*: BinClass00 + RevealerClass* = ref object + impl*: ptr RevealerClass00 + +const STOCK_ABOUT* = "gtk-about" + +const STOCK_ADD* = "gtk-add" + +const STOCK_APPLY* = "gtk-apply" + +const STOCK_BOLD* = "gtk-bold" + +const STOCK_CANCEL* = "gtk-cancel" + +const STOCK_CAPS_LOCK_WARNING* = "gtk-caps-lock-warning" + +const STOCK_CDROM* = "gtk-cdrom" + +const STOCK_CLEAR* = "gtk-clear" + +const STOCK_CLOSE* = "gtk-close" + +const STOCK_COLOR_PICKER* = "gtk-color-picker" + +const STOCK_CONNECT* = "gtk-connect" + +const STOCK_CONVERT* = "gtk-convert" + +const STOCK_COPY* = "gtk-copy" + +const STOCK_CUT* = "gtk-cut" + +const STOCK_DELETE* = "gtk-delete" + +const STOCK_DIALOG_AUTHENTICATION* = "gtk-dialog-authentication" + +const STOCK_DIALOG_ERROR* = "gtk-dialog-error" + +const STOCK_DIALOG_INFO* = "gtk-dialog-info" + +const STOCK_DIALOG_QUESTION* = "gtk-dialog-question" + +const STOCK_DIALOG_WARNING* = "gtk-dialog-warning" + +const STOCK_DIRECTORY* = "gtk-directory" + +const STOCK_DISCARD* = "gtk-discard" + +const STOCK_DISCONNECT* = "gtk-disconnect" + +const STOCK_DND* = "gtk-dnd" + +const STOCK_DND_MULTIPLE* = "gtk-dnd-multiple" + +const STOCK_EDIT* = "gtk-edit" + +const STOCK_EXECUTE* = "gtk-execute" + +const STOCK_FILE* = "gtk-file" + +const STOCK_FIND* = "gtk-find" + +const STOCK_FIND_AND_REPLACE* = "gtk-find-and-replace" + +const STOCK_FLOPPY* = "gtk-floppy" + +const STOCK_FULLSCREEN* = "gtk-fullscreen" + +const STOCK_GOTO_BOTTOM* = "gtk-goto-bottom" + +const STOCK_GOTO_FIRST* = "gtk-goto-first" + +const STOCK_GOTO_LAST* = "gtk-goto-last" + +const STOCK_GOTO_TOP* = "gtk-goto-top" + +const STOCK_GO_BACK* = "gtk-go-back" + +const STOCK_GO_DOWN* = "gtk-go-down" + +const STOCK_GO_FORWARD* = "gtk-go-forward" + +const STOCK_GO_UP* = "gtk-go-up" + +const STOCK_HARDDISK* = "gtk-harddisk" + +const STOCK_HELP* = "gtk-help" + +const STOCK_HOME* = "gtk-home" + +const STOCK_INDENT* = "gtk-indent" + +const STOCK_INDEX* = "gtk-index" + +const STOCK_INFO* = "gtk-info" + +const STOCK_ITALIC* = "gtk-italic" + +const STOCK_JUMP_TO* = "gtk-jump-to" + +const STOCK_JUSTIFY_CENTER* = "gtk-justify-center" + +const STOCK_JUSTIFY_FILL* = "gtk-justify-fill" + +const STOCK_JUSTIFY_LEFT* = "gtk-justify-left" + +const STOCK_JUSTIFY_RIGHT* = "gtk-justify-right" + +const STOCK_LEAVE_FULLSCREEN* = "gtk-leave-fullscreen" + +const STOCK_MEDIA_FORWARD* = "gtk-media-forward" + +const STOCK_MEDIA_NEXT* = "gtk-media-next" + +const STOCK_MEDIA_PAUSE* = "gtk-media-pause" + +const STOCK_MEDIA_PLAY* = "gtk-media-play" + +const STOCK_MEDIA_PREVIOUS* = "gtk-media-previous" + +const STOCK_MEDIA_RECORD* = "gtk-media-record" + +const STOCK_MEDIA_REWIND* = "gtk-media-rewind" + +const STOCK_MEDIA_STOP* = "gtk-media-stop" + +const STOCK_MISSING_IMAGE* = "gtk-missing-image" + +const STOCK_NETWORK* = "gtk-network" + +const STOCK_NEW* = "gtk-new" + +const STOCK_NO* = "gtk-no" + +const STOCK_OK* = "gtk-ok" + +const STOCK_OPEN* = "gtk-open" + +const STOCK_ORIENTATION_LANDSCAPE* = "gtk-orientation-landscape" + +const STOCK_ORIENTATION_PORTRAIT* = "gtk-orientation-portrait" + +const STOCK_ORIENTATION_REVERSE_LANDSCAPE* = "gtk-orientation-reverse-landscape" + +const STOCK_ORIENTATION_REVERSE_PORTRAIT* = "gtk-orientation-reverse-portrait" + +const STOCK_PAGE_SETUP* = "gtk-page-setup" + +const STOCK_PASTE* = "gtk-paste" + +const STOCK_PREFERENCES* = "gtk-preferences" + +const STOCK_PRINT* = "gtk-print" + +const STOCK_PRINT_ERROR* = "gtk-print-error" + +const STOCK_PRINT_PAUSED* = "gtk-print-paused" + +const STOCK_PRINT_PREVIEW* = "gtk-print-preview" + +const STOCK_PRINT_REPORT* = "gtk-print-report" + +const STOCK_PRINT_WARNING* = "gtk-print-warning" + +const STOCK_PROPERTIES* = "gtk-properties" + +const STOCK_QUIT* = "gtk-quit" + +const STOCK_REDO* = "gtk-redo" + +const STOCK_REFRESH* = "gtk-refresh" + +const STOCK_REMOVE* = "gtk-remove" + +const STOCK_REVERT_TO_SAVED* = "gtk-revert-to-saved" + +const STOCK_SAVE* = "gtk-save" + +const STOCK_SAVE_AS* = "gtk-save-as" + +const STOCK_SELECT_ALL* = "gtk-select-all" + +const STOCK_SELECT_COLOR* = "gtk-select-color" + +const STOCK_SELECT_FONT* = "gtk-select-font" + +const STOCK_SORT_ASCENDING* = "gtk-sort-ascending" + +const STOCK_SORT_DESCENDING* = "gtk-sort-descending" + +const STOCK_SPELL_CHECK* = "gtk-spell-check" + +const STOCK_STOP* = "gtk-stop" + +const STOCK_STRIKETHROUGH* = "gtk-strikethrough" + +const STOCK_UNDELETE* = "gtk-undelete" + +const STOCK_UNDERLINE* = "gtk-underline" + +const STOCK_UNDO* = "gtk-undo" + +const STOCK_UNINDENT* = "gtk-unindent" + +const STOCK_YES* = "gtk-yes" + +const STOCK_ZOOM_100* = "gtk-zoom-100" + +const STOCK_ZOOM_FIT* = "gtk-zoom-fit" + +const STOCK_ZOOM_IN* = "gtk-zoom-in" + +const STOCK_ZOOM_OUT* = "gtk-zoom-out" + +const STYLE_CLASS_ACCELERATOR* = "accelerator" + +const STYLE_CLASS_ARROW* = "arrow" + +const STYLE_CLASS_BACKGROUND* = "background" + +const STYLE_CLASS_BOTTOM* = "bottom" + +const STYLE_CLASS_BUTTON* = "button" + +const STYLE_CLASS_CALENDAR* = "calendar" + +const STYLE_CLASS_CELL* = "cell" + +const STYLE_CLASS_CHECK* = "check" + +const STYLE_CLASS_COMBOBOX_ENTRY* = "combobox-entry" + +const STYLE_CLASS_CONTEXT_MENU* = "context-menu" + +const STYLE_CLASS_CSD* = "csd" + +const STYLE_CLASS_CURSOR_HANDLE* = "cursor-handle" + +const STYLE_CLASS_DEFAULT* = "default" + +const STYLE_CLASS_DESTRUCTIVE_ACTION* = "destructive-action" + +const STYLE_CLASS_DIM_LABEL* = "dim-label" + +const STYLE_CLASS_DND* = "dnd" + +const STYLE_CLASS_DOCK* = "dock" + +const STYLE_CLASS_ENTRY* = "entry" + +const STYLE_CLASS_ERROR* = "error" + +const STYLE_CLASS_EXPANDER* = "expander" + +const STYLE_CLASS_FLAT* = "flat" + +const STYLE_CLASS_FRAME* = "frame" + +const STYLE_CLASS_GRIP* = "grip" + +const STYLE_CLASS_HEADER* = "header" + +const STYLE_CLASS_HIGHLIGHT* = "highlight" + +const STYLE_CLASS_HORIZONTAL* = "horizontal" + +const STYLE_CLASS_IMAGE* = "image" + +const STYLE_CLASS_INFO* = "info" + +const STYLE_CLASS_INLINE_TOOLBAR* = "inline-toolbar" + +const STYLE_CLASS_INSERTION_CURSOR* = "insertion-cursor" + +const STYLE_CLASS_LABEL* = "label" + +const STYLE_CLASS_LEFT* = "left" + +const STYLE_CLASS_LEVEL_BAR* = "level-bar" + +const STYLE_CLASS_LINKED* = "linked" + +const STYLE_CLASS_LIST* = "list" + +const STYLE_CLASS_LIST_ROW* = "list-row" + +const STYLE_CLASS_MARK* = "mark" + +const STYLE_CLASS_MENU* = "menu" + +const STYLE_CLASS_MENUBAR* = "menubar" + +const STYLE_CLASS_MENUITEM* = "menuitem" + +const STYLE_CLASS_MESSAGE_DIALOG* = "message-dialog" + +const STYLE_CLASS_MONOSPACE* = "monospace" + +const STYLE_CLASS_NEEDS_ATTENTION* = "needs-attention" + +const STYLE_CLASS_NOTEBOOK* = "notebook" + +const STYLE_CLASS_OSD* = "osd" + +const STYLE_CLASS_OVERSHOOT* = "overshoot" + +const STYLE_CLASS_PANE_SEPARATOR* = "pane-separator" + +const STYLE_CLASS_PAPER* = "paper" + +const STYLE_CLASS_POPOVER* = "popover" + +const STYLE_CLASS_POPUP* = "popup" + +const STYLE_CLASS_PRIMARY_TOOLBAR* = "primary-toolbar" + +const STYLE_CLASS_PROGRESSBAR* = "progressbar" + +const STYLE_CLASS_PULSE* = "pulse" + +const STYLE_CLASS_QUESTION* = "question" + +const STYLE_CLASS_RADIO* = "radio" + +const STYLE_CLASS_RAISED* = "raised" + +const STYLE_CLASS_READ_ONLY* = "read-only" + +const STYLE_CLASS_RIGHT* = "right" + +const STYLE_CLASS_RUBBERBAND* = "rubberband" + +const STYLE_CLASS_SCALE* = "scale" + +const STYLE_CLASS_SCALE_HAS_MARKS_ABOVE* = "scale-has-marks-above" + +const STYLE_CLASS_SCALE_HAS_MARKS_BELOW* = "scale-has-marks-below" + +const STYLE_CLASS_SCROLLBAR* = "scrollbar" + +const STYLE_CLASS_SCROLLBARS_JUNCTION* = "scrollbars-junction" + +const STYLE_CLASS_SEPARATOR* = "separator" + +const STYLE_CLASS_SIDEBAR* = "sidebar" + +const STYLE_CLASS_SLIDER* = "slider" + +const STYLE_CLASS_SPINBUTTON* = "spinbutton" + +const STYLE_CLASS_SPINNER* = "spinner" + +const STYLE_CLASS_STATUSBAR* = "statusbar" + +const STYLE_CLASS_SUBTITLE* = "subtitle" + +const STYLE_CLASS_SUGGESTED_ACTION* = "suggested-action" + +const STYLE_CLASS_TITLE* = "title" + +const STYLE_CLASS_TITLEBAR* = "titlebar" + +const STYLE_CLASS_TOOLBAR* = "toolbar" + +const STYLE_CLASS_TOOLTIP* = "tooltip" + +const STYLE_CLASS_TOP* = "top" + +const STYLE_CLASS_TOUCH_SELECTION* = "touch-selection" + +const STYLE_CLASS_TROUGH* = "trough" + +const STYLE_CLASS_UNDERSHOOT* = "undershoot" + +const STYLE_CLASS_VERTICAL* = "vertical" + +const STYLE_CLASS_VIEW* = "view" + +const STYLE_CLASS_WARNING* = "warning" + +const STYLE_CLASS_WIDE* = "wide" + +const STYLE_PROPERTY_BACKGROUND_COLOR* = "background-color" + +const STYLE_PROPERTY_BACKGROUND_IMAGE* = "background-image" + +const STYLE_PROPERTY_BORDER_COLOR* = "border-color" + +const STYLE_PROPERTY_BORDER_RADIUS* = "border-radius" + +const STYLE_PROPERTY_BORDER_STYLE* = "border-style" + +const STYLE_PROPERTY_BORDER_WIDTH* = "border-width" + +const STYLE_PROPERTY_COLOR* = "color" + +const STYLE_PROPERTY_FONT* = "font" + +const STYLE_PROPERTY_MARGIN* = "margin" + +const STYLE_PROPERTY_PADDING* = "padding" + +const STYLE_PROVIDER_PRIORITY_APPLICATION* = 600'i32 + +const STYLE_PROVIDER_PRIORITY_FALLBACK* = 1'i32 + +const STYLE_PROVIDER_PRIORITY_SETTINGS* = 400'i32 + +const STYLE_PROVIDER_PRIORITY_THEME* = 200'i32 + +const STYLE_PROVIDER_PRIORITY_USER* = 800'i32 + +const STYLE_REGION_COLUMN* = "column" + +const STYLE_REGION_COLUMN_HEADER* = "column-header" + +const STYLE_REGION_ROW* = "row" + +const STYLE_REGION_TAB* = "tab" + +type + ScaleAccessiblePrivate00* {.pure.} = object + ScaleAccessiblePrivate* = ref object + impl*: ptr ScaleAccessiblePrivate00 + +type + ScaleAccessible* = ref object of RangeAccessible + ScaleAccessible00* = object of RangeAccessible00 + priv4: ptr ScaleAccessiblePrivate00 + +type + ScaleAccessibleClass00* {.pure.} = object + parentClass*: RangeAccessibleClass00 + ScaleAccessibleClass* = ref object + impl*: ptr ScaleAccessibleClass00 + +type + ScaleButtonPrivate00* {.pure.} = object + ScaleButtonPrivate* = ref object + impl*: ptr ScaleButtonPrivate00 + +type + ScaleButton* = ref object of Button + ScaleButton00* = object of Button00 + priv5: ptr ScaleButtonPrivate00 + +proc scPopdown*(self: ScaleButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "popdown", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopup*(self: ScaleButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "popup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scValueChanged*(self: ScaleButton; p: proc (self: ptr gobject.Object00; value: cdouble; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "value-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_scale_button_new*(size: int32; min: cdouble; max: cdouble; step: cdouble; + icons: cstringArray): ptr ScaleButton00 {. + importc: "gtk_scale_button_new", libprag.} + +proc newScaleButton*(size: int; min: cdouble; max: cdouble; step: cdouble; + icons: cstringArray): ScaleButton = + new(result, finalizeGObject) + result.impl = gtk_scale_button_new(int32(size), min, max, step, icons) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initScaleButton*[T](result: var T; size: int; min: cdouble; max: cdouble; step: cdouble; + icons: cstringArray) = + assert(result is ScaleButton) + new(result, finalizeGObject) + result.impl = gtk_scale_button_new(int32(size), min, max, step, icons) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scale_button_get_adjustment*(self: ptr ScaleButton00): ptr Adjustment00 {. + importc: "gtk_scale_button_get_adjustment", libprag.} + +proc getAdjustment*(self: ScaleButton): Adjustment = + let gobj = gtk_scale_button_get_adjustment(cast[ptr ScaleButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc adjustment*(self: ScaleButton): Adjustment = + let gobj = gtk_scale_button_get_adjustment(cast[ptr ScaleButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scale_button_get_minus_button*(self: ptr ScaleButton00): ptr Button00 {. + importc: "gtk_scale_button_get_minus_button", libprag.} + +proc getMinusButton*(self: ScaleButton): Button = + let gobj = gtk_scale_button_get_minus_button(cast[ptr ScaleButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Button](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc minusButton*(self: ScaleButton): Button = + let gobj = gtk_scale_button_get_minus_button(cast[ptr ScaleButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Button](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scale_button_get_plus_button*(self: ptr ScaleButton00): ptr Button00 {. + importc: "gtk_scale_button_get_plus_button", libprag.} + +proc getPlusButton*(self: ScaleButton): Button = + let gobj = gtk_scale_button_get_plus_button(cast[ptr ScaleButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Button](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc plusButton*(self: ScaleButton): Button = + let gobj = gtk_scale_button_get_plus_button(cast[ptr ScaleButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Button](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scale_button_get_popup*(self: ptr ScaleButton00): ptr Widget00 {. + importc: "gtk_scale_button_get_popup", libprag.} + +proc getPopup*(self: ScaleButton): Widget = + let gobj = gtk_scale_button_get_popup(cast[ptr ScaleButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc popup*(self: ScaleButton): Widget = + let gobj = gtk_scale_button_get_popup(cast[ptr ScaleButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scale_button_get_value*(self: ptr ScaleButton00): cdouble {. + importc: "gtk_scale_button_get_value", libprag.} + +proc getValue*(self: ScaleButton): cdouble = + gtk_scale_button_get_value(cast[ptr ScaleButton00](self.impl)) + +proc value*(self: ScaleButton): cdouble = + gtk_scale_button_get_value(cast[ptr ScaleButton00](self.impl)) + +proc gtk_scale_button_set_adjustment*(self: ptr ScaleButton00; adjustment: ptr Adjustment00) {. + importc: "gtk_scale_button_set_adjustment", libprag.} + +proc setAdjustment*(self: ScaleButton; adjustment: Adjustment) = + gtk_scale_button_set_adjustment(cast[ptr ScaleButton00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `adjustment=`*(self: ScaleButton; adjustment: Adjustment) = + gtk_scale_button_set_adjustment(cast[ptr ScaleButton00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_scale_button_set_icons*(self: ptr ScaleButton00; icons: cstringArray) {. + importc: "gtk_scale_button_set_icons", libprag.} + +proc setIcons*(self: ScaleButton; icons: cstringArray) = + gtk_scale_button_set_icons(cast[ptr ScaleButton00](self.impl), icons) + +proc `icons=`*(self: ScaleButton; icons: cstringArray) = + gtk_scale_button_set_icons(cast[ptr ScaleButton00](self.impl), icons) + +proc gtk_scale_button_set_value*(self: ptr ScaleButton00; value: cdouble) {. + importc: "gtk_scale_button_set_value", libprag.} + +proc setValue*(self: ScaleButton; value: cdouble) = + gtk_scale_button_set_value(cast[ptr ScaleButton00](self.impl), value) + +proc `value=`*(self: ScaleButton; value: cdouble) = + gtk_scale_button_set_value(cast[ptr ScaleButton00](self.impl), value) + +type + ScaleButtonAccessiblePrivate00* {.pure.} = object + ScaleButtonAccessiblePrivate* = ref object + impl*: ptr ScaleButtonAccessiblePrivate00 + +type + ScaleButtonAccessible* = ref object of ButtonAccessible + ScaleButtonAccessible00* = object of ButtonAccessible00 + priv5: ptr ScaleButtonAccessiblePrivate00 + +type + ScaleButtonAccessibleClass00* {.pure.} = object + parentClass*: ButtonAccessibleClass00 + ScaleButtonAccessibleClass* = ref object + impl*: ptr ScaleButtonAccessibleClass00 + +type + ScaleButtonClass00* {.pure.} = object + parentClass*: ButtonClass00 + valueChanged*: proc(button: ptr ScaleButton00; value: cdouble) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ScaleButtonClass* = ref object + impl*: ptr ScaleButtonClass00 + +type + ScrollStep* {.size: sizeof(cint), pure.} = enum + steps = 0 + pages = 1 + ends = 2 + horizontalSteps = 3 + horizontalPages = 4 + horizontalEnds = 5 + +type + Scrollable00* {.pure.} = object + Scrollable* = ref object + impl*: ptr Scrollable00 + +proc gtk_scrollable_get_border*(self: ptr Scrollable00; border: var Border00): gboolean {. + importc: "gtk_scrollable_get_border", libprag.} + +proc getBorder*(self: ptr Scrollable00; border: var Border00): gboolean {. + importc: "gtk_scrollable_get_border", libprag.} + +proc border*(self: ptr Scrollable00; border: var Border00): gboolean {. + importc: "gtk_scrollable_get_border", libprag.} + +proc gtk_scrollable_get_hadjustment*(self: ptr Scrollable00): ptr Adjustment00 {. + importc: "gtk_scrollable_get_hadjustment", libprag.} + +proc getHadjustment*(self: Scrollable): Adjustment = + let gobj = gtk_scrollable_get_hadjustment(cast[ptr Scrollable00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc hadjustment*(self: Scrollable): Adjustment = + let gobj = gtk_scrollable_get_hadjustment(cast[ptr Scrollable00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scrollable_get_vadjustment*(self: ptr Scrollable00): ptr Adjustment00 {. + importc: "gtk_scrollable_get_vadjustment", libprag.} + +proc getVadjustment*(self: Scrollable): Adjustment = + let gobj = gtk_scrollable_get_vadjustment(cast[ptr Scrollable00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc vadjustment*(self: Scrollable): Adjustment = + let gobj = gtk_scrollable_get_vadjustment(cast[ptr Scrollable00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_scrollable_set_hadjustment*(self: ptr Scrollable00; hadjustment: ptr Adjustment00) {. + importc: "gtk_scrollable_set_hadjustment", libprag.} + +proc setHadjustment*(self: Scrollable; hadjustment: Adjustment) = + gtk_scrollable_set_hadjustment(cast[ptr Scrollable00](self.impl), cast[ptr Adjustment00](hadjustment.impl)) + +proc `hadjustment=`*(self: Scrollable; hadjustment: Adjustment) = + gtk_scrollable_set_hadjustment(cast[ptr Scrollable00](self.impl), cast[ptr Adjustment00](hadjustment.impl)) + +proc gtk_scrollable_set_vadjustment*(self: ptr Scrollable00; vadjustment: ptr Adjustment00) {. + importc: "gtk_scrollable_set_vadjustment", libprag.} + +proc setVadjustment*(self: Scrollable; vadjustment: Adjustment) = + gtk_scrollable_set_vadjustment(cast[ptr Scrollable00](self.impl), cast[ptr Adjustment00](vadjustment.impl)) + +proc `vadjustment=`*(self: Scrollable; vadjustment: Adjustment) = + gtk_scrollable_set_vadjustment(cast[ptr Scrollable00](self.impl), cast[ptr Adjustment00](vadjustment.impl)) + +type + ScrollablePolicy* {.size: sizeof(cint), pure.} = enum + minimum = 0 + natural = 1 + +proc gtk_scrollable_get_hscroll_policy*(self: ptr Scrollable00): ScrollablePolicy {. + importc: "gtk_scrollable_get_hscroll_policy", libprag.} + +proc getHscrollPolicy*(self: Scrollable): ScrollablePolicy = + gtk_scrollable_get_hscroll_policy(cast[ptr Scrollable00](self.impl)) + +proc hscrollPolicy*(self: Scrollable): ScrollablePolicy = + gtk_scrollable_get_hscroll_policy(cast[ptr Scrollable00](self.impl)) + +proc gtk_scrollable_get_vscroll_policy*(self: ptr Scrollable00): ScrollablePolicy {. + importc: "gtk_scrollable_get_vscroll_policy", libprag.} + +proc getVscrollPolicy*(self: Scrollable): ScrollablePolicy = + gtk_scrollable_get_vscroll_policy(cast[ptr Scrollable00](self.impl)) + +proc vscrollPolicy*(self: Scrollable): ScrollablePolicy = + gtk_scrollable_get_vscroll_policy(cast[ptr Scrollable00](self.impl)) + +proc gtk_scrollable_set_hscroll_policy*(self: ptr Scrollable00; policy: ScrollablePolicy) {. + importc: "gtk_scrollable_set_hscroll_policy", libprag.} + +proc setHscrollPolicy*(self: Scrollable; policy: ScrollablePolicy) = + gtk_scrollable_set_hscroll_policy(cast[ptr Scrollable00](self.impl), policy) + +proc `hscrollPolicy=`*(self: Scrollable; policy: ScrollablePolicy) = + gtk_scrollable_set_hscroll_policy(cast[ptr Scrollable00](self.impl), policy) + +proc gtk_scrollable_set_vscroll_policy*(self: ptr Scrollable00; policy: ScrollablePolicy) {. + importc: "gtk_scrollable_set_vscroll_policy", libprag.} + +proc setVscrollPolicy*(self: Scrollable; policy: ScrollablePolicy) = + gtk_scrollable_set_vscroll_policy(cast[ptr Scrollable00](self.impl), policy) + +proc `vscrollPolicy=`*(self: Scrollable; policy: ScrollablePolicy) = + gtk_scrollable_set_vscroll_policy(cast[ptr Scrollable00](self.impl), policy) + +type + ScrollableInterface00* {.pure.} = object + baseIface*: gobject.TypeInterface00 + getBorder*: proc(scrollable: ptr Scrollable00; border: var Border00): gboolean {.cdecl.} + ScrollableInterface* = ref object + impl*: ptr ScrollableInterface00 + +type + ScrolledWindowAccessiblePrivate00* {.pure.} = object + ScrolledWindowAccessiblePrivate* = ref object + impl*: ptr ScrolledWindowAccessiblePrivate00 + +type + ScrolledWindowAccessible* = ref object of ContainerAccessible + ScrolledWindowAccessible00* = object of ContainerAccessible00 + priv4: ptr ScrolledWindowAccessiblePrivate00 + +type + ScrolledWindowAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + ScrolledWindowAccessibleClass* = ref object + impl*: ptr ScrolledWindowAccessibleClass00 + +type + ScrolledWindowClass00* {.pure.} = object + parentClass*: BinClass00 + scrollbarSpacing*: int32 + scrollChild*: proc(scrolledWindow: ptr ScrolledWindow00; scroll: ScrollType; + horizontal: gboolean): gboolean {.cdecl.} + moveFocusOut*: proc(scrolledWindow: ptr ScrolledWindow00; direction: DirectionType) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ScrolledWindowClass* = ref object + impl*: ptr ScrolledWindowClass00 + +type + SearchBar* = ref object of Bin + SearchBar00* = object of Bin00 + +proc gtk_search_bar_new*(): ptr SearchBar00 {. + importc: "gtk_search_bar_new", libprag.} + +proc newSearchBar*(): SearchBar = + new(result, finalizeGObject) + result.impl = gtk_search_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSearchBar*[T](result: var T) = + assert(result is SearchBar) + new(result, finalizeGObject) + result.impl = gtk_search_bar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_search_bar_connect_entry*(self: ptr SearchBar00; entry: ptr Entry00) {. + importc: "gtk_search_bar_connect_entry", libprag.} + +proc connectEntry*(self: SearchBar; entry: Entry) = + gtk_search_bar_connect_entry(cast[ptr SearchBar00](self.impl), cast[ptr Entry00](entry.impl)) + +proc gtk_search_bar_get_search_mode*(self: ptr SearchBar00): gboolean {. + importc: "gtk_search_bar_get_search_mode", libprag.} + +proc getSearchMode*(self: SearchBar): bool = + toBool(gtk_search_bar_get_search_mode(cast[ptr SearchBar00](self.impl))) + +proc searchMode*(self: SearchBar): bool = + toBool(gtk_search_bar_get_search_mode(cast[ptr SearchBar00](self.impl))) + +proc gtk_search_bar_get_show_close_button*(self: ptr SearchBar00): gboolean {. + importc: "gtk_search_bar_get_show_close_button", libprag.} + +proc getShowCloseButton*(self: SearchBar): bool = + toBool(gtk_search_bar_get_show_close_button(cast[ptr SearchBar00](self.impl))) + +proc showCloseButton*(self: SearchBar): bool = + toBool(gtk_search_bar_get_show_close_button(cast[ptr SearchBar00](self.impl))) + +proc gtk_search_bar_handle_event*(self: ptr SearchBar00; event: ptr gdk.Event00): gboolean {. + importc: "gtk_search_bar_handle_event", libprag.} + +proc handleEvent*(self: SearchBar; event: gdk.Event): bool = + toBool(gtk_search_bar_handle_event(cast[ptr SearchBar00](self.impl), cast[ptr gdk.Event00](event.impl))) + +proc gtk_search_bar_set_search_mode*(self: ptr SearchBar00; searchMode: gboolean) {. + importc: "gtk_search_bar_set_search_mode", libprag.} + +proc setSearchMode*(self: SearchBar; searchMode: bool) = + gtk_search_bar_set_search_mode(cast[ptr SearchBar00](self.impl), gboolean(searchMode)) + +proc `searchMode=`*(self: SearchBar; searchMode: bool) = + gtk_search_bar_set_search_mode(cast[ptr SearchBar00](self.impl), gboolean(searchMode)) + +proc gtk_search_bar_set_show_close_button*(self: ptr SearchBar00; visible: gboolean) {. + importc: "gtk_search_bar_set_show_close_button", libprag.} + +proc setShowCloseButton*(self: SearchBar; visible: bool) = + gtk_search_bar_set_show_close_button(cast[ptr SearchBar00](self.impl), gboolean(visible)) + +proc `showCloseButton=`*(self: SearchBar; visible: bool) = + gtk_search_bar_set_show_close_button(cast[ptr SearchBar00](self.impl), gboolean(visible)) + +type + SearchBarClass00* {.pure.} = object + parentClass*: BinClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + SearchBarClass* = ref object + impl*: ptr SearchBarClass00 + +type + SearchEntry* = ref object of Entry + SearchEntry00* = object of Entry00 + +proc scNextMatch*(self: SearchEntry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "next-match", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPreviousMatch*(self: SearchEntry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "previous-match", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSearchChanged*(self: SearchEntry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "search-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStopSearch*(self: SearchEntry; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "stop-search", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_search_entry_new*(): ptr SearchEntry00 {. + importc: "gtk_search_entry_new", libprag.} + +proc newSearchEntry*(): SearchEntry = + new(result, finalizeGObject) + result.impl = gtk_search_entry_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSearchEntry*[T](result: var T) = + assert(result is SearchEntry) + new(result, finalizeGObject) + result.impl = gtk_search_entry_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_search_entry_handle_event*(self: ptr SearchEntry00; event: ptr gdk.Event00): gboolean {. + importc: "gtk_search_entry_handle_event", libprag.} + +proc handleEvent*(self: SearchEntry; event: gdk.Event): bool = + toBool(gtk_search_entry_handle_event(cast[ptr SearchEntry00](self.impl), cast[ptr gdk.Event00](event.impl))) + +type + SearchEntryClass00* {.pure.} = object + parentClass*: EntryClass00 + searchChanged*: proc(entry: ptr SearchEntry00) {.cdecl.} + nextMatch*: proc(entry: ptr SearchEntry00) {.cdecl.} + previousMatch*: proc(entry: ptr SearchEntry00) {.cdecl.} + stopSearch*: proc(entry: ptr SearchEntry00) {.cdecl.} + SearchEntryClass* = ref object + impl*: ptr SearchEntryClass00 + +type + SeparatorMenuItem* = ref object of MenuItem + SeparatorMenuItem00* = object of MenuItem00 + +proc gtk_separator_menu_item_new*(): ptr SeparatorMenuItem00 {. + importc: "gtk_separator_menu_item_new", libprag.} + +proc newSeparatorMenuItem*(): SeparatorMenuItem = + new(result, finalizeGObject) + result.impl = gtk_separator_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSeparatorMenuItem*[T](result: var T) = + assert(result is SeparatorMenuItem) + new(result, finalizeGObject) + result.impl = gtk_separator_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SeparatorMenuItemClass00* {.pure.} = object + parentClass*: MenuItemClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + SeparatorMenuItemClass* = ref object + impl*: ptr SeparatorMenuItemClass00 + +type + SeparatorToolItemPrivate00* {.pure.} = object + SeparatorToolItemPrivate* = ref object + impl*: ptr SeparatorToolItemPrivate00 + +type + SeparatorToolItem* = ref object of ToolItem + SeparatorToolItem00* = object of ToolItem00 + priv5: ptr SeparatorToolItemPrivate00 + +proc gtk_separator_tool_item_new*(): ptr SeparatorToolItem00 {. + importc: "gtk_separator_tool_item_new", libprag.} + +proc newSeparatorToolItem*(): SeparatorToolItem = + new(result, finalizeGObject) + result.impl = gtk_separator_tool_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSeparatorToolItem*[T](result: var T) = + assert(result is SeparatorToolItem) + new(result, finalizeGObject) + result.impl = gtk_separator_tool_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_separator_tool_item_get_draw*(self: ptr SeparatorToolItem00): gboolean {. + importc: "gtk_separator_tool_item_get_draw", libprag.} + +proc getDraw*(self: SeparatorToolItem): bool = + toBool(gtk_separator_tool_item_get_draw(cast[ptr SeparatorToolItem00](self.impl))) + +proc draw*(self: SeparatorToolItem): bool = + toBool(gtk_separator_tool_item_get_draw(cast[ptr SeparatorToolItem00](self.impl))) + +proc gtk_separator_tool_item_set_draw*(self: ptr SeparatorToolItem00; draw: gboolean) {. + importc: "gtk_separator_tool_item_set_draw", libprag.} + +proc setDraw*(self: SeparatorToolItem; draw: bool) = + gtk_separator_tool_item_set_draw(cast[ptr SeparatorToolItem00](self.impl), gboolean(draw)) + +proc `draw=`*(self: SeparatorToolItem; draw: bool) = + gtk_separator_tool_item_set_draw(cast[ptr SeparatorToolItem00](self.impl), gboolean(draw)) + +type + SeparatorToolItemClass00* {.pure.} = object + parentClass*: ToolItemClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + SeparatorToolItemClass* = ref object + impl*: ptr SeparatorToolItemClass00 + +type + SettingsClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + SettingsClass* = ref object + impl*: ptr SettingsClass00 + +type + ShortcutLabel* = ref object of Box + ShortcutLabel00* = object of Box00 + +proc gtk_shortcut_label_new*(accelerator: cstring): ptr ShortcutLabel00 {. + importc: "gtk_shortcut_label_new", libprag.} + +proc newShortcutLabel*(accelerator: string): ShortcutLabel = + new(result, finalizeGObject) + result.impl = gtk_shortcut_label_new(cstring(accelerator)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initShortcutLabel*[T](result: var T; accelerator: string) = + assert(result is ShortcutLabel) + new(result, finalizeGObject) + result.impl = gtk_shortcut_label_new(cstring(accelerator)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_shortcut_label_get_accelerator*(self: ptr ShortcutLabel00): cstring {. + importc: "gtk_shortcut_label_get_accelerator", libprag.} + +proc getAccelerator*(self: ShortcutLabel): string = + let resul0 = gtk_shortcut_label_get_accelerator(cast[ptr ShortcutLabel00](self.impl)) + result = $resul0 + +proc accelerator*(self: ShortcutLabel): string = + let resul0 = gtk_shortcut_label_get_accelerator(cast[ptr ShortcutLabel00](self.impl)) + result = $resul0 + +proc gtk_shortcut_label_get_disabled_text*(self: ptr ShortcutLabel00): cstring {. + importc: "gtk_shortcut_label_get_disabled_text", libprag.} + +proc getDisabledText*(self: ShortcutLabel): string = + let resul0 = gtk_shortcut_label_get_disabled_text(cast[ptr ShortcutLabel00](self.impl)) + result = $resul0 + +proc disabledText*(self: ShortcutLabel): string = + let resul0 = gtk_shortcut_label_get_disabled_text(cast[ptr ShortcutLabel00](self.impl)) + result = $resul0 + +proc gtk_shortcut_label_set_accelerator*(self: ptr ShortcutLabel00; accelerator: cstring) {. + importc: "gtk_shortcut_label_set_accelerator", libprag.} + +proc setAccelerator*(self: ShortcutLabel; accelerator: string) = + gtk_shortcut_label_set_accelerator(cast[ptr ShortcutLabel00](self.impl), cstring(accelerator)) + +proc `accelerator=`*(self: ShortcutLabel; accelerator: string) = + gtk_shortcut_label_set_accelerator(cast[ptr ShortcutLabel00](self.impl), cstring(accelerator)) + +proc gtk_shortcut_label_set_disabled_text*(self: ptr ShortcutLabel00; disabledText: cstring) {. + importc: "gtk_shortcut_label_set_disabled_text", libprag.} + +proc setDisabledText*(self: ShortcutLabel; disabledText: string) = + gtk_shortcut_label_set_disabled_text(cast[ptr ShortcutLabel00](self.impl), cstring(disabledText)) + +proc `disabledText=`*(self: ShortcutLabel; disabledText: string) = + gtk_shortcut_label_set_disabled_text(cast[ptr ShortcutLabel00](self.impl), cstring(disabledText)) + +type + ShortcutLabelClass00* {.pure.} = object + ShortcutLabelClass* = ref object + impl*: ptr ShortcutLabelClass00 + +type + ShortcutType* {.size: sizeof(cint), pure.} = enum + accelerator = 0 + gesturePinch = 1 + gestureStretch = 2 + gestureRotateClockwise = 3 + gestureRotateCounterclockwise = 4 + gestureTwoFingerSwipeLeft = 5 + gestureTwoFingerSwipeRight = 6 + gesture = 7 + +type + ShortcutsGroup* = ref object of Box + ShortcutsGroup00* = object of Box00 + +type + ShortcutsGroupClass00* {.pure.} = object + ShortcutsGroupClass* = ref object + impl*: ptr ShortcutsGroupClass00 + +type + ShortcutsSection* = ref object of Box + ShortcutsSection00* = object of Box00 + +proc scChangeCurrentPage*(self: ShortcutsSection; p: proc (self: ptr gobject.Object00; `object`: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "change-current-page", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +type + ShortcutsSectionClass00* {.pure.} = object + ShortcutsSectionClass* = ref object + impl*: ptr ShortcutsSectionClass00 + +type + ShortcutsShortcut* = ref object of Box + ShortcutsShortcut00* = object of Box00 + +type + ShortcutsShortcutClass00* {.pure.} = object + ShortcutsShortcutClass* = ref object + impl*: ptr ShortcutsShortcutClass00 + +type + ShortcutsWindowClass00* {.pure.} = object + parentClass*: WindowClass00 + close*: proc(self: ptr ShortcutsWindow00) {.cdecl.} + search*: proc(self: ptr ShortcutsWindow00) {.cdecl.} + ShortcutsWindowClass* = ref object + impl*: ptr ShortcutsWindowClass00 + +type + SizeGroupClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + SizeGroupClass* = ref object + impl*: ptr SizeGroupClass00 + +type + SocketPrivate00* {.pure.} = object + SocketPrivate* = ref object + impl*: ptr SocketPrivate00 + +type + Socket* = ref object of Container + Socket00* = object of Container00 + priv3: ptr SocketPrivate00 + +proc scPlugAdded*(self: Socket; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "plug-added", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPlugRemoved*(self: Socket; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "plug-removed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_socket_new*(): ptr Socket00 {. + importc: "gtk_socket_new", libprag.} + +proc newSocket*(): Socket = + new(result, finalizeGObject) + result.impl = gtk_socket_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSocket*[T](result: var T) = + assert(result is Socket) + new(result, finalizeGObject) + result.impl = gtk_socket_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_socket_add_id*(self: ptr Socket00; window: uint64) {. + importc: "gtk_socket_add_id", libprag.} + +proc addId*(self: Socket; window: uint64) = + gtk_socket_add_id(cast[ptr Socket00](self.impl), window) + +proc gtk_socket_get_id*(self: ptr Socket00): uint64 {. + importc: "gtk_socket_get_id", libprag.} + +proc getId*(self: Socket): uint64 = + gtk_socket_get_id(cast[ptr Socket00](self.impl)) + +proc id*(self: Socket): uint64 = + gtk_socket_get_id(cast[ptr Socket00](self.impl)) + +proc gtk_socket_get_plug_window*(self: ptr Socket00): ptr gdk.Window00 {. + importc: "gtk_socket_get_plug_window", libprag.} + +proc getPlugWindow*(self: Socket): gdk.Window = + let gobj = gtk_socket_get_plug_window(cast[ptr Socket00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc plugWindow*(self: Socket): gdk.Window = + let gobj = gtk_socket_get_plug_window(cast[ptr Socket00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + SocketClass00* {.pure.} = object + parentClass*: ContainerClass00 + plugAdded*: proc(socket: ptr Socket00) {.cdecl.} + plugRemoved*: proc(socket: ptr Socket00): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + SocketClass* = ref object + impl*: ptr SocketClass00 + +type + SortType* {.size: sizeof(cint), pure.} = enum + ascending = 0 + descending = 1 + +type + SpinButtonPrivate00* {.pure.} = object + SpinButtonPrivate* = ref object + impl*: ptr SpinButtonPrivate00 + +type + SpinButton* = ref object of Entry + SpinButton00* = object of Entry00 + priv3: ptr SpinButtonPrivate00 + +proc scChangeValue*(self: SpinButton; p: proc (self: ptr gobject.Object00; scroll: ScrollType; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "change-value", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInput*(self: SpinButton; p: proc (self: ptr gobject.Object00; newValue: var cdouble; xdata: pointer): int32 {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "input", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scOutput*(self: SpinButton; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "output", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scValueChanged*(self: SpinButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "value-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scWrapped*(self: SpinButton; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "wrapped", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_spin_button_new*(adjustment: ptr Adjustment00; climbRate: cdouble; + digits: uint32): ptr SpinButton00 {. + importc: "gtk_spin_button_new", libprag.} + +proc newSpinButton*(adjustment: Adjustment; climbRate: cdouble; digits: int): SpinButton = + new(result, finalizeGObject) + result.impl = gtk_spin_button_new(cast[ptr Adjustment00](adjustment.impl), climbRate, uint32(digits)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSpinButton*[T](result: var T; adjustment: Adjustment; climbRate: cdouble; digits: int) = + assert(result is SpinButton) + new(result, finalizeGObject) + result.impl = gtk_spin_button_new(cast[ptr Adjustment00](adjustment.impl), climbRate, uint32(digits)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_spin_button_new_with_range*(min: cdouble; max: cdouble; step: cdouble): ptr SpinButton00 {. + importc: "gtk_spin_button_new_with_range", libprag.} + +proc newSpinButtonWithRange*(min: cdouble; max: cdouble; step: cdouble): SpinButton = + new(result, finalizeGObject) + result.impl = gtk_spin_button_new_with_range(min, max, step) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSpinButtonWithRange*[T](result: var T; min: cdouble; max: cdouble; step: cdouble) = + assert(result is SpinButton) + new(result, finalizeGObject) + result.impl = gtk_spin_button_new_with_range(min, max, step) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_spin_button_configure*(self: ptr SpinButton00; adjustment: ptr Adjustment00; + climbRate: cdouble; digits: uint32) {. + importc: "gtk_spin_button_configure", libprag.} + +proc configure*(self: SpinButton; adjustment: Adjustment; climbRate: cdouble; + digits: int) = + gtk_spin_button_configure(cast[ptr SpinButton00](self.impl), cast[ptr Adjustment00](adjustment.impl), climbRate, uint32(digits)) + +proc gtk_spin_button_get_adjustment*(self: ptr SpinButton00): ptr Adjustment00 {. + importc: "gtk_spin_button_get_adjustment", libprag.} + +proc getAdjustment*(self: SpinButton): Adjustment = + let gobj = gtk_spin_button_get_adjustment(cast[ptr SpinButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc adjustment*(self: SpinButton): Adjustment = + let gobj = gtk_spin_button_get_adjustment(cast[ptr SpinButton00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_spin_button_get_digits*(self: ptr SpinButton00): uint32 {. + importc: "gtk_spin_button_get_digits", libprag.} + +proc getDigits*(self: SpinButton): int = + int(gtk_spin_button_get_digits(cast[ptr SpinButton00](self.impl))) + +proc digits*(self: SpinButton): int = + int(gtk_spin_button_get_digits(cast[ptr SpinButton00](self.impl))) + +proc gtk_spin_button_get_increments*(self: ptr SpinButton00; step: var cdouble; page: var cdouble) {. + importc: "gtk_spin_button_get_increments", libprag.} + +proc getIncrements*(self: SpinButton; step: var cdouble; page: var cdouble) = + gtk_spin_button_get_increments(cast[ptr SpinButton00](self.impl), step, page) + +proc increments*(self: SpinButton; step: var cdouble; page: var cdouble) = + gtk_spin_button_get_increments(cast[ptr SpinButton00](self.impl), step, page) + +proc gtk_spin_button_get_numeric*(self: ptr SpinButton00): gboolean {. + importc: "gtk_spin_button_get_numeric", libprag.} + +proc getNumeric*(self: SpinButton): bool = + toBool(gtk_spin_button_get_numeric(cast[ptr SpinButton00](self.impl))) + +proc numeric*(self: SpinButton): bool = + toBool(gtk_spin_button_get_numeric(cast[ptr SpinButton00](self.impl))) + +proc gtk_spin_button_get_range*(self: ptr SpinButton00; min: var cdouble; max: var cdouble) {. + importc: "gtk_spin_button_get_range", libprag.} + +proc getRange*(self: SpinButton; min: var cdouble; max: var cdouble) = + gtk_spin_button_get_range(cast[ptr SpinButton00](self.impl), min, max) + +proc range*(self: SpinButton; min: var cdouble; max: var cdouble) = + gtk_spin_button_get_range(cast[ptr SpinButton00](self.impl), min, max) + +proc gtk_spin_button_get_snap_to_ticks*(self: ptr SpinButton00): gboolean {. + importc: "gtk_spin_button_get_snap_to_ticks", libprag.} + +proc getSnapToTicks*(self: SpinButton): bool = + toBool(gtk_spin_button_get_snap_to_ticks(cast[ptr SpinButton00](self.impl))) + +proc snapToTicks*(self: SpinButton): bool = + toBool(gtk_spin_button_get_snap_to_ticks(cast[ptr SpinButton00](self.impl))) + +proc gtk_spin_button_get_value*(self: ptr SpinButton00): cdouble {. + importc: "gtk_spin_button_get_value", libprag.} + +proc getValue*(self: SpinButton): cdouble = + gtk_spin_button_get_value(cast[ptr SpinButton00](self.impl)) + +proc value*(self: SpinButton): cdouble = + gtk_spin_button_get_value(cast[ptr SpinButton00](self.impl)) + +proc gtk_spin_button_get_value_as_int*(self: ptr SpinButton00): int32 {. + importc: "gtk_spin_button_get_value_as_int", libprag.} + +proc getValueAsInt*(self: SpinButton): int = + int(gtk_spin_button_get_value_as_int(cast[ptr SpinButton00](self.impl))) + +proc valueAsInt*(self: SpinButton): int = + int(gtk_spin_button_get_value_as_int(cast[ptr SpinButton00](self.impl))) + +proc gtk_spin_button_get_wrap*(self: ptr SpinButton00): gboolean {. + importc: "gtk_spin_button_get_wrap", libprag.} + +proc getWrap*(self: SpinButton): bool = + toBool(gtk_spin_button_get_wrap(cast[ptr SpinButton00](self.impl))) + +proc wrap*(self: SpinButton): bool = + toBool(gtk_spin_button_get_wrap(cast[ptr SpinButton00](self.impl))) + +proc gtk_spin_button_set_adjustment*(self: ptr SpinButton00; adjustment: ptr Adjustment00) {. + importc: "gtk_spin_button_set_adjustment", libprag.} + +proc setAdjustment*(self: SpinButton; adjustment: Adjustment) = + gtk_spin_button_set_adjustment(cast[ptr SpinButton00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `adjustment=`*(self: SpinButton; adjustment: Adjustment) = + gtk_spin_button_set_adjustment(cast[ptr SpinButton00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_spin_button_set_digits*(self: ptr SpinButton00; digits: uint32) {. + importc: "gtk_spin_button_set_digits", libprag.} + +proc setDigits*(self: SpinButton; digits: int) = + gtk_spin_button_set_digits(cast[ptr SpinButton00](self.impl), uint32(digits)) + +proc `digits=`*(self: SpinButton; digits: int) = + gtk_spin_button_set_digits(cast[ptr SpinButton00](self.impl), uint32(digits)) + +proc gtk_spin_button_set_increments*(self: ptr SpinButton00; step: cdouble; page: cdouble) {. + importc: "gtk_spin_button_set_increments", libprag.} + +proc setIncrements*(self: SpinButton; step: cdouble; page: cdouble) = + gtk_spin_button_set_increments(cast[ptr SpinButton00](self.impl), step, page) + +proc gtk_spin_button_set_numeric*(self: ptr SpinButton00; numeric: gboolean) {. + importc: "gtk_spin_button_set_numeric", libprag.} + +proc setNumeric*(self: SpinButton; numeric: bool) = + gtk_spin_button_set_numeric(cast[ptr SpinButton00](self.impl), gboolean(numeric)) + +proc `numeric=`*(self: SpinButton; numeric: bool) = + gtk_spin_button_set_numeric(cast[ptr SpinButton00](self.impl), gboolean(numeric)) + +proc gtk_spin_button_set_range*(self: ptr SpinButton00; min: cdouble; max: cdouble) {. + importc: "gtk_spin_button_set_range", libprag.} + +proc setRange*(self: SpinButton; min: cdouble; max: cdouble) = + gtk_spin_button_set_range(cast[ptr SpinButton00](self.impl), min, max) + +proc gtk_spin_button_set_snap_to_ticks*(self: ptr SpinButton00; snapToTicks: gboolean) {. + importc: "gtk_spin_button_set_snap_to_ticks", libprag.} + +proc setSnapToTicks*(self: SpinButton; snapToTicks: bool) = + gtk_spin_button_set_snap_to_ticks(cast[ptr SpinButton00](self.impl), gboolean(snapToTicks)) + +proc `snapToTicks=`*(self: SpinButton; snapToTicks: bool) = + gtk_spin_button_set_snap_to_ticks(cast[ptr SpinButton00](self.impl), gboolean(snapToTicks)) + +proc gtk_spin_button_set_value*(self: ptr SpinButton00; value: cdouble) {. + importc: "gtk_spin_button_set_value", libprag.} + +proc setValue*(self: SpinButton; value: cdouble) = + gtk_spin_button_set_value(cast[ptr SpinButton00](self.impl), value) + +proc `value=`*(self: SpinButton; value: cdouble) = + gtk_spin_button_set_value(cast[ptr SpinButton00](self.impl), value) + +proc gtk_spin_button_set_wrap*(self: ptr SpinButton00; wrap: gboolean) {. + importc: "gtk_spin_button_set_wrap", libprag.} + +proc setWrap*(self: SpinButton; wrap: bool) = + gtk_spin_button_set_wrap(cast[ptr SpinButton00](self.impl), gboolean(wrap)) + +proc `wrap=`*(self: SpinButton; wrap: bool) = + gtk_spin_button_set_wrap(cast[ptr SpinButton00](self.impl), gboolean(wrap)) + +proc gtk_spin_button_update*(self: ptr SpinButton00) {. + importc: "gtk_spin_button_update", libprag.} + +proc update*(self: SpinButton) = + gtk_spin_button_update(cast[ptr SpinButton00](self.impl)) + +type + SpinButtonUpdatePolicy* {.size: sizeof(cint), pure.} = enum + always = 0 + ifValid = 1 + +proc gtk_spin_button_get_update_policy*(self: ptr SpinButton00): SpinButtonUpdatePolicy {. + importc: "gtk_spin_button_get_update_policy", libprag.} + +proc getUpdatePolicy*(self: SpinButton): SpinButtonUpdatePolicy = + gtk_spin_button_get_update_policy(cast[ptr SpinButton00](self.impl)) + +proc updatePolicy*(self: SpinButton): SpinButtonUpdatePolicy = + gtk_spin_button_get_update_policy(cast[ptr SpinButton00](self.impl)) + +proc gtk_spin_button_set_update_policy*(self: ptr SpinButton00; policy: SpinButtonUpdatePolicy) {. + importc: "gtk_spin_button_set_update_policy", libprag.} + +proc setUpdatePolicy*(self: SpinButton; policy: SpinButtonUpdatePolicy) = + gtk_spin_button_set_update_policy(cast[ptr SpinButton00](self.impl), policy) + +proc `updatePolicy=`*(self: SpinButton; policy: SpinButtonUpdatePolicy) = + gtk_spin_button_set_update_policy(cast[ptr SpinButton00](self.impl), policy) + +type + SpinType* {.size: sizeof(cint), pure.} = enum + stepForward = 0 + stepBackward = 1 + pageForward = 2 + pageBackward = 3 + home = 4 + `end` = 5 + userDefined = 6 + +proc gtk_spin_button_spin*(self: ptr SpinButton00; direction: SpinType; increment: cdouble) {. + importc: "gtk_spin_button_spin", libprag.} + +proc spin*(self: SpinButton; direction: SpinType; increment: cdouble) = + gtk_spin_button_spin(cast[ptr SpinButton00](self.impl), direction, increment) + +type + SpinButtonAccessiblePrivate00* {.pure.} = object + SpinButtonAccessiblePrivate* = ref object + impl*: ptr SpinButtonAccessiblePrivate00 + +type + SpinButtonAccessible* = ref object of EntryAccessible + SpinButtonAccessible00* = object of EntryAccessible00 + priv4: ptr SpinButtonAccessiblePrivate00 + +type + SpinButtonAccessibleClass00* {.pure.} = object + parentClass*: EntryAccessibleClass00 + SpinButtonAccessibleClass* = ref object + impl*: ptr SpinButtonAccessibleClass00 + +type + SpinButtonClass00* {.pure.} = object + parentClass*: EntryClass00 + input*: proc(spinButton: ptr SpinButton00; newValue: ptr cdouble): int32 {.cdecl.} + output*: proc(spinButton: ptr SpinButton00): int32 {.cdecl.} + valueChanged*: proc(spinButton: ptr SpinButton00) {.cdecl.} + changeValue*: proc(spinButton: ptr SpinButton00; scroll: ScrollType) {.cdecl.} + wrapped*: proc(spinButton: ptr SpinButton00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + SpinButtonClass* = ref object + impl*: ptr SpinButtonClass00 + +type + SpinnerPrivate00* {.pure.} = object + SpinnerPrivate* = ref object + impl*: ptr SpinnerPrivate00 + +type + Spinner* = ref object of Widget + Spinner00* = object of Widget00 + priv2: ptr SpinnerPrivate00 + +proc gtk_spinner_new*(): ptr Spinner00 {. + importc: "gtk_spinner_new", libprag.} + +proc newSpinner*(): Spinner = + new(result, finalizeGObject) + result.impl = gtk_spinner_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSpinner*[T](result: var T) = + assert(result is Spinner) + new(result, finalizeGObject) + result.impl = gtk_spinner_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_spinner_start*(self: ptr Spinner00) {. + importc: "gtk_spinner_start", libprag.} + +proc start*(self: Spinner) = + gtk_spinner_start(cast[ptr Spinner00](self.impl)) + +proc gtk_spinner_stop*(self: ptr Spinner00) {. + importc: "gtk_spinner_stop", libprag.} + +proc stop*(self: Spinner) = + gtk_spinner_stop(cast[ptr Spinner00](self.impl)) + +type + SpinnerAccessiblePrivate00* {.pure.} = object + SpinnerAccessiblePrivate* = ref object + impl*: ptr SpinnerAccessiblePrivate00 + +type + SpinnerAccessible* = ref object of WidgetAccessible + SpinnerAccessible00* = object of WidgetAccessible00 + priv3: ptr SpinnerAccessiblePrivate00 + +type + SpinnerAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + SpinnerAccessibleClass* = ref object + impl*: ptr SpinnerAccessibleClass00 + +type + SpinnerClass00* {.pure.} = object + parentClass*: WidgetClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + SpinnerClass* = ref object + impl*: ptr SpinnerClass00 + +type + Stack* = ref object of Container + Stack00* = object of Container00 + +proc gtk_stack_new*(): ptr Stack00 {. + importc: "gtk_stack_new", libprag.} + +proc newStack*(): Stack = + new(result, finalizeGObject) + result.impl = gtk_stack_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStack*[T](result: var T) = + assert(result is Stack) + new(result, finalizeGObject) + result.impl = gtk_stack_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_stack_add_named*(self: ptr Stack00; child: ptr Widget00; name: cstring) {. + importc: "gtk_stack_add_named", libprag.} + +proc addNamed*(self: Stack; child: Widget; name: string) = + gtk_stack_add_named(cast[ptr Stack00](self.impl), cast[ptr Widget00](child.impl), cstring(name)) + +proc gtk_stack_add_titled*(self: ptr Stack00; child: ptr Widget00; name: cstring; + title: cstring) {. + importc: "gtk_stack_add_titled", libprag.} + +proc addTitled*(self: Stack; child: Widget; name: string; title: string) = + gtk_stack_add_titled(cast[ptr Stack00](self.impl), cast[ptr Widget00](child.impl), cstring(name), cstring(title)) + +proc gtk_stack_get_child_by_name*(self: ptr Stack00; name: cstring): ptr Widget00 {. + importc: "gtk_stack_get_child_by_name", libprag.} + +proc getChildByName*(self: Stack; name: string): Widget = + let gobj = gtk_stack_get_child_by_name(cast[ptr Stack00](self.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc childByName*(self: Stack; name: string): Widget = + let gobj = gtk_stack_get_child_by_name(cast[ptr Stack00](self.impl), cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_stack_get_hhomogeneous*(self: ptr Stack00): gboolean {. + importc: "gtk_stack_get_hhomogeneous", libprag.} + +proc getHhomogeneous*(self: Stack): bool = + toBool(gtk_stack_get_hhomogeneous(cast[ptr Stack00](self.impl))) + +proc hhomogeneous*(self: Stack): bool = + toBool(gtk_stack_get_hhomogeneous(cast[ptr Stack00](self.impl))) + +proc gtk_stack_get_homogeneous*(self: ptr Stack00): gboolean {. + importc: "gtk_stack_get_homogeneous", libprag.} + +proc getHomogeneous*(self: Stack): bool = + toBool(gtk_stack_get_homogeneous(cast[ptr Stack00](self.impl))) + +proc homogeneous*(self: Stack): bool = + toBool(gtk_stack_get_homogeneous(cast[ptr Stack00](self.impl))) + +proc gtk_stack_get_interpolate_size*(self: ptr Stack00): gboolean {. + importc: "gtk_stack_get_interpolate_size", libprag.} + +proc getInterpolateSize*(self: Stack): bool = + toBool(gtk_stack_get_interpolate_size(cast[ptr Stack00](self.impl))) + +proc interpolateSize*(self: Stack): bool = + toBool(gtk_stack_get_interpolate_size(cast[ptr Stack00](self.impl))) + +proc gtk_stack_get_transition_duration*(self: ptr Stack00): uint32 {. + importc: "gtk_stack_get_transition_duration", libprag.} + +proc getTransitionDuration*(self: Stack): int = + int(gtk_stack_get_transition_duration(cast[ptr Stack00](self.impl))) + +proc transitionDuration*(self: Stack): int = + int(gtk_stack_get_transition_duration(cast[ptr Stack00](self.impl))) + +proc gtk_stack_get_transition_running*(self: ptr Stack00): gboolean {. + importc: "gtk_stack_get_transition_running", libprag.} + +proc getTransitionRunning*(self: Stack): bool = + toBool(gtk_stack_get_transition_running(cast[ptr Stack00](self.impl))) + +proc transitionRunning*(self: Stack): bool = + toBool(gtk_stack_get_transition_running(cast[ptr Stack00](self.impl))) + +proc gtk_stack_get_vhomogeneous*(self: ptr Stack00): gboolean {. + importc: "gtk_stack_get_vhomogeneous", libprag.} + +proc getVhomogeneous*(self: Stack): bool = + toBool(gtk_stack_get_vhomogeneous(cast[ptr Stack00](self.impl))) + +proc vhomogeneous*(self: Stack): bool = + toBool(gtk_stack_get_vhomogeneous(cast[ptr Stack00](self.impl))) + +proc gtk_stack_get_visible_child*(self: ptr Stack00): ptr Widget00 {. + importc: "gtk_stack_get_visible_child", libprag.} + +proc getVisibleChild*(self: Stack): Widget = + let gobj = gtk_stack_get_visible_child(cast[ptr Stack00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc visibleChild*(self: Stack): Widget = + let gobj = gtk_stack_get_visible_child(cast[ptr Stack00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_stack_get_visible_child_name*(self: ptr Stack00): cstring {. + importc: "gtk_stack_get_visible_child_name", libprag.} + +proc getVisibleChildName*(self: Stack): string = + let resul0 = gtk_stack_get_visible_child_name(cast[ptr Stack00](self.impl)) + result = $resul0 + +proc visibleChildName*(self: Stack): string = + let resul0 = gtk_stack_get_visible_child_name(cast[ptr Stack00](self.impl)) + result = $resul0 + +proc gtk_stack_set_hhomogeneous*(self: ptr Stack00; hhomogeneous: gboolean) {. + importc: "gtk_stack_set_hhomogeneous", libprag.} + +proc setHhomogeneous*(self: Stack; hhomogeneous: bool) = + gtk_stack_set_hhomogeneous(cast[ptr Stack00](self.impl), gboolean(hhomogeneous)) + +proc `hhomogeneous=`*(self: Stack; hhomogeneous: bool) = + gtk_stack_set_hhomogeneous(cast[ptr Stack00](self.impl), gboolean(hhomogeneous)) + +proc gtk_stack_set_homogeneous*(self: ptr Stack00; homogeneous: gboolean) {. + importc: "gtk_stack_set_homogeneous", libprag.} + +proc setHomogeneous*(self: Stack; homogeneous: bool) = + gtk_stack_set_homogeneous(cast[ptr Stack00](self.impl), gboolean(homogeneous)) + +proc `homogeneous=`*(self: Stack; homogeneous: bool) = + gtk_stack_set_homogeneous(cast[ptr Stack00](self.impl), gboolean(homogeneous)) + +proc gtk_stack_set_interpolate_size*(self: ptr Stack00; interpolateSize: gboolean) {. + importc: "gtk_stack_set_interpolate_size", libprag.} + +proc setInterpolateSize*(self: Stack; interpolateSize: bool) = + gtk_stack_set_interpolate_size(cast[ptr Stack00](self.impl), gboolean(interpolateSize)) + +proc `interpolateSize=`*(self: Stack; interpolateSize: bool) = + gtk_stack_set_interpolate_size(cast[ptr Stack00](self.impl), gboolean(interpolateSize)) + +proc gtk_stack_set_transition_duration*(self: ptr Stack00; duration: uint32) {. + importc: "gtk_stack_set_transition_duration", libprag.} + +proc setTransitionDuration*(self: Stack; duration: int) = + gtk_stack_set_transition_duration(cast[ptr Stack00](self.impl), uint32(duration)) + +proc `transitionDuration=`*(self: Stack; duration: int) = + gtk_stack_set_transition_duration(cast[ptr Stack00](self.impl), uint32(duration)) + +proc gtk_stack_set_vhomogeneous*(self: ptr Stack00; vhomogeneous: gboolean) {. + importc: "gtk_stack_set_vhomogeneous", libprag.} + +proc setVhomogeneous*(self: Stack; vhomogeneous: bool) = + gtk_stack_set_vhomogeneous(cast[ptr Stack00](self.impl), gboolean(vhomogeneous)) + +proc `vhomogeneous=`*(self: Stack; vhomogeneous: bool) = + gtk_stack_set_vhomogeneous(cast[ptr Stack00](self.impl), gboolean(vhomogeneous)) + +proc gtk_stack_set_visible_child*(self: ptr Stack00; child: ptr Widget00) {. + importc: "gtk_stack_set_visible_child", libprag.} + +proc setVisibleChild*(self: Stack; child: Widget) = + gtk_stack_set_visible_child(cast[ptr Stack00](self.impl), cast[ptr Widget00](child.impl)) + +proc `visibleChild=`*(self: Stack; child: Widget) = + gtk_stack_set_visible_child(cast[ptr Stack00](self.impl), cast[ptr Widget00](child.impl)) + +proc gtk_stack_set_visible_child_name*(self: ptr Stack00; name: cstring) {. + importc: "gtk_stack_set_visible_child_name", libprag.} + +proc setVisibleChildName*(self: Stack; name: string) = + gtk_stack_set_visible_child_name(cast[ptr Stack00](self.impl), cstring(name)) + +proc `visibleChildName=`*(self: Stack; name: string) = + gtk_stack_set_visible_child_name(cast[ptr Stack00](self.impl), cstring(name)) + +type + StackTransitionType* {.size: sizeof(cint), pure.} = enum + none = 0 + crossfade = 1 + slideRight = 2 + slideLeft = 3 + slideUp = 4 + slideDown = 5 + slideLeftRight = 6 + slideUpDown = 7 + overUp = 8 + overDown = 9 + overLeft = 10 + overRight = 11 + underUp = 12 + underDown = 13 + underLeft = 14 + underRight = 15 + overUpDown = 16 + overDownUp = 17 + overLeftRight = 18 + overRightLeft = 19 + +proc gtk_stack_get_transition_type*(self: ptr Stack00): StackTransitionType {. + importc: "gtk_stack_get_transition_type", libprag.} + +proc getTransitionType*(self: Stack): StackTransitionType = + gtk_stack_get_transition_type(cast[ptr Stack00](self.impl)) + +proc transitionType*(self: Stack): StackTransitionType = + gtk_stack_get_transition_type(cast[ptr Stack00](self.impl)) + +proc gtk_stack_set_transition_type*(self: ptr Stack00; transition: StackTransitionType) {. + importc: "gtk_stack_set_transition_type", libprag.} + +proc setTransitionType*(self: Stack; transition: StackTransitionType) = + gtk_stack_set_transition_type(cast[ptr Stack00](self.impl), transition) + +proc `transitionType=`*(self: Stack; transition: StackTransitionType) = + gtk_stack_set_transition_type(cast[ptr Stack00](self.impl), transition) + +proc gtk_stack_set_visible_child_full*(self: ptr Stack00; name: cstring; transition: StackTransitionType) {. + importc: "gtk_stack_set_visible_child_full", libprag.} + +proc setVisibleChildFull*(self: Stack; name: string; transition: StackTransitionType) = + gtk_stack_set_visible_child_full(cast[ptr Stack00](self.impl), cstring(name), transition) + +type + StackAccessible* = ref object of ContainerAccessible + StackAccessible00* = object of ContainerAccessible00 + +type + StackAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + StackAccessibleClass* = ref object + impl*: ptr StackAccessibleClass00 + +type + StackClass00* {.pure.} = object + parentClass*: ContainerClass00 + StackClass* = ref object + impl*: ptr StackClass00 + +type + StackSidebar* = ref object of Bin + StackSidebar00* = object of Bin00 + +proc gtk_stack_sidebar_new*(): ptr StackSidebar00 {. + importc: "gtk_stack_sidebar_new", libprag.} + +proc newStackSidebar*(): StackSidebar = + new(result, finalizeGObject) + result.impl = gtk_stack_sidebar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStackSidebar*[T](result: var T) = + assert(result is StackSidebar) + new(result, finalizeGObject) + result.impl = gtk_stack_sidebar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_stack_sidebar_get_stack*(self: ptr StackSidebar00): ptr Stack00 {. + importc: "gtk_stack_sidebar_get_stack", libprag.} + +proc getStack*(self: StackSidebar): Stack = + let gobj = gtk_stack_sidebar_get_stack(cast[ptr StackSidebar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Stack](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc stack*(self: StackSidebar): Stack = + let gobj = gtk_stack_sidebar_get_stack(cast[ptr StackSidebar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Stack](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_stack_sidebar_set_stack*(self: ptr StackSidebar00; stack: ptr Stack00) {. + importc: "gtk_stack_sidebar_set_stack", libprag.} + +proc setStack*(self: StackSidebar; stack: Stack) = + gtk_stack_sidebar_set_stack(cast[ptr StackSidebar00](self.impl), cast[ptr Stack00](stack.impl)) + +proc `stack=`*(self: StackSidebar; stack: Stack) = + gtk_stack_sidebar_set_stack(cast[ptr StackSidebar00](self.impl), cast[ptr Stack00](stack.impl)) + +type + StackSidebarClass00* {.pure.} = object + parentClass*: BinClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + StackSidebarClass* = ref object + impl*: ptr StackSidebarClass00 + +type + StackSidebarPrivate00* {.pure.} = object + StackSidebarPrivate* = ref object + impl*: ptr StackSidebarPrivate00 + +type + StackSwitcher* = ref object of Box + StackSwitcher00* = object of Box00 + +proc gtk_stack_switcher_new*(): ptr StackSwitcher00 {. + importc: "gtk_stack_switcher_new", libprag.} + +proc newStackSwitcher*(): StackSwitcher = + new(result, finalizeGObject) + result.impl = gtk_stack_switcher_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStackSwitcher*[T](result: var T) = + assert(result is StackSwitcher) + new(result, finalizeGObject) + result.impl = gtk_stack_switcher_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_stack_switcher_get_stack*(self: ptr StackSwitcher00): ptr Stack00 {. + importc: "gtk_stack_switcher_get_stack", libprag.} + +proc getStack*(self: StackSwitcher): Stack = + let gobj = gtk_stack_switcher_get_stack(cast[ptr StackSwitcher00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Stack](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc stack*(self: StackSwitcher): Stack = + let gobj = gtk_stack_switcher_get_stack(cast[ptr StackSwitcher00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Stack](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_stack_switcher_set_stack*(self: ptr StackSwitcher00; stack: ptr Stack00) {. + importc: "gtk_stack_switcher_set_stack", libprag.} + +proc setStack*(self: StackSwitcher; stack: Stack) = + gtk_stack_switcher_set_stack(cast[ptr StackSwitcher00](self.impl), cast[ptr Stack00](stack.impl)) + +proc `stack=`*(self: StackSwitcher; stack: Stack) = + gtk_stack_switcher_set_stack(cast[ptr StackSwitcher00](self.impl), cast[ptr Stack00](stack.impl)) + +type + StackSwitcherClass00* {.pure.} = object + parentClass*: BoxClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + StackSwitcherClass* = ref object + impl*: ptr StackSwitcherClass00 + +type + StatusIconPrivate00* {.pure.} = object + StatusIconPrivate* = ref object + impl*: ptr StatusIconPrivate00 + +type + StatusIcon* = ref object of gobject.Object + StatusIcon00* = object of gobject.Object00 + priv1: ptr StatusIconPrivate00 + +proc scActivate*(self: StatusIcon; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scButtonPressEvent*(self: StatusIcon; p: proc (self: ptr gobject.Object00; event: gdk.EventButton00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "button-press-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scButtonReleaseEvent*(self: StatusIcon; p: proc (self: ptr gobject.Object00; event: gdk.EventButton00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "button-release-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopupMenu*(self: StatusIcon; p: proc (self: ptr gobject.Object00; button: uint32; activateTime: uint32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "popup-menu", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scQueryTooltip*(self: StatusIcon; p: proc (self: ptr gobject.Object00; x: int32; y: int32; keyboardMode: gboolean; tooltip: Tooltip00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "query-tooltip", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scScrollEvent*(self: StatusIcon; p: proc (self: ptr gobject.Object00; event: gdk.EventScroll00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "scroll-event", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSizeChanged*(self: StatusIcon; p: proc (self: ptr gobject.Object00; size: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "size-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_status_icon_new*(): ptr StatusIcon00 {. + importc: "gtk_status_icon_new", libprag.} + +proc newStatusIcon*(): StatusIcon = + new(result, finalizeGObject) + result.impl = gtk_status_icon_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStatusIcon*[T](result: var T) = + assert(result is StatusIcon) + new(result, finalizeGObject) + result.impl = gtk_status_icon_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_status_icon_new_from_file*(filename: ucstring): ptr StatusIcon00 {. + importc: "gtk_status_icon_new_from_file", libprag.} + +proc newStatusIconFromFile*(filename: ucstring): StatusIcon = + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_file(filename) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStatusIconFromFile*[T](result: var T; filename: ucstring) = + assert(result is StatusIcon) + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_file(filename) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_status_icon_new_from_gicon*(icon: ptr gio.Icon00): ptr StatusIcon00 {. + importc: "gtk_status_icon_new_from_gicon", libprag.} + +proc newStatusIconFromGicon*(icon: gio.Icon): StatusIcon = + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_gicon(cast[ptr gio.Icon00](icon.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStatusIconFromGicon*[T](result: var T; icon: gio.Icon) = + assert(result is StatusIcon) + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_gicon(cast[ptr gio.Icon00](icon.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_status_icon_new_from_icon_name*(iconName: cstring): ptr StatusIcon00 {. + importc: "gtk_status_icon_new_from_icon_name", libprag.} + +proc newStatusIconFromIconName*(iconName: string): StatusIcon = + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_icon_name(cstring(iconName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStatusIconFromIconName*[T](result: var T; iconName: string) = + assert(result is StatusIcon) + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_icon_name(cstring(iconName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_status_icon_new_from_pixbuf*(pixbuf: ptr gdkpixbuf.Pixbuf00): ptr StatusIcon00 {. + importc: "gtk_status_icon_new_from_pixbuf", libprag.} + +proc newStatusIconFromPixbuf*(pixbuf: gdkpixbuf.Pixbuf): StatusIcon = + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_pixbuf(cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStatusIconFromPixbuf*[T](result: var T; pixbuf: gdkpixbuf.Pixbuf) = + assert(result is StatusIcon) + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_pixbuf(cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_status_icon_new_from_stock*(stockId: cstring): ptr StatusIcon00 {. + importc: "gtk_status_icon_new_from_stock", libprag.} + +proc newStatusIconFromStock*(stockId: string): StatusIcon = + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStatusIconFromStock*[T](result: var T; stockId: string) = + assert(result is StatusIcon) + new(result, finalizeGObject) + result.impl = gtk_status_icon_new_from_stock(cstring(stockId)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_status_icon_position_menu*(menu: ptr Menu00; x: int32; y: int32; pushIn: var gboolean; + userData: ptr StatusIcon00) {. + importc: "gtk_status_icon_position_menu", libprag.} + +proc positionMenu*(menu: Menu; x: int; y: int; pushIn: var bool; userData: StatusIcon) = + var pushIn_00 = gboolean(pushIn) + gtk_status_icon_position_menu(cast[ptr Menu00](menu.impl), int32(x), int32(y), pushIn_00, cast[ptr StatusIcon00](userData.impl)) + pushIn = toBool(pushIn_00) + +proc gtk_status_icon_get_geometry*(self: ptr StatusIcon00; screen: var ptr gdk.Screen00; + area: var gdk.Rectangle00; orientation: var Orientation): gboolean {. + importc: "gtk_status_icon_get_geometry", libprag.} + +proc getGeometry*(self: ptr StatusIcon00; screen: var ptr gdk.Screen00; + area: var gdk.Rectangle00; orientation: var Orientation): gboolean {. + importc: "gtk_status_icon_get_geometry", libprag.} + +proc geometry*(self: ptr StatusIcon00; screen: var ptr gdk.Screen00; + area: var gdk.Rectangle00; orientation: var Orientation): gboolean {. + importc: "gtk_status_icon_get_geometry", libprag.} + +proc gtk_status_icon_get_gicon*(self: ptr StatusIcon00): ptr gio.Icon00 {. + importc: "gtk_status_icon_get_gicon", libprag.} + +proc getGicon*(self: StatusIcon): gio.Icon = + new(result) + result.impl = gtk_status_icon_get_gicon(cast[ptr StatusIcon00](self.impl)) + +proc gicon*(self: StatusIcon): gio.Icon = + new(result) + result.impl = gtk_status_icon_get_gicon(cast[ptr StatusIcon00](self.impl)) + +proc gtk_status_icon_get_has_tooltip*(self: ptr StatusIcon00): gboolean {. + importc: "gtk_status_icon_get_has_tooltip", libprag.} + +proc getHasTooltip*(self: StatusIcon): bool = + toBool(gtk_status_icon_get_has_tooltip(cast[ptr StatusIcon00](self.impl))) + +proc hasTooltip*(self: StatusIcon): bool = + toBool(gtk_status_icon_get_has_tooltip(cast[ptr StatusIcon00](self.impl))) + +proc gtk_status_icon_get_icon_name*(self: ptr StatusIcon00): cstring {. + importc: "gtk_status_icon_get_icon_name", libprag.} + +proc getIconName*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_icon_name(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + +proc iconName*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_icon_name(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + +proc gtk_status_icon_get_pixbuf*(self: ptr StatusIcon00): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_status_icon_get_pixbuf", libprag.} + +proc getPixbuf*(self: StatusIcon): gdkpixbuf.Pixbuf = + let gobj = gtk_status_icon_get_pixbuf(cast[ptr StatusIcon00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbuf*(self: StatusIcon): gdkpixbuf.Pixbuf = + let gobj = gtk_status_icon_get_pixbuf(cast[ptr StatusIcon00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_status_icon_get_screen*(self: ptr StatusIcon00): ptr gdk.Screen00 {. + importc: "gtk_status_icon_get_screen", libprag.} + +proc getScreen*(self: StatusIcon): gdk.Screen = + let gobj = gtk_status_icon_get_screen(cast[ptr StatusIcon00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: StatusIcon): gdk.Screen = + let gobj = gtk_status_icon_get_screen(cast[ptr StatusIcon00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_status_icon_get_size*(self: ptr StatusIcon00): int32 {. + importc: "gtk_status_icon_get_size", libprag.} + +proc getSize*(self: StatusIcon): int = + int(gtk_status_icon_get_size(cast[ptr StatusIcon00](self.impl))) + +proc size*(self: StatusIcon): int = + int(gtk_status_icon_get_size(cast[ptr StatusIcon00](self.impl))) + +proc gtk_status_icon_get_stock*(self: ptr StatusIcon00): cstring {. + importc: "gtk_status_icon_get_stock", libprag.} + +proc getStock*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_stock(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + +proc stock*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_stock(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + +proc gtk_status_icon_get_storage_type*(self: ptr StatusIcon00): ImageType {. + importc: "gtk_status_icon_get_storage_type", libprag.} + +proc getStorageType*(self: StatusIcon): ImageType = + gtk_status_icon_get_storage_type(cast[ptr StatusIcon00](self.impl)) + +proc storageType*(self: StatusIcon): ImageType = + gtk_status_icon_get_storage_type(cast[ptr StatusIcon00](self.impl)) + +proc gtk_status_icon_get_title*(self: ptr StatusIcon00): cstring {. + importc: "gtk_status_icon_get_title", libprag.} + +proc getTitle*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_title(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + +proc title*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_title(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + +proc gtk_status_icon_get_tooltip_markup*(self: ptr StatusIcon00): cstring {. + importc: "gtk_status_icon_get_tooltip_markup", libprag.} + +proc getTooltipMarkup*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_tooltip_markup(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc tooltipMarkup*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_tooltip_markup(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_status_icon_get_tooltip_text*(self: ptr StatusIcon00): cstring {. + importc: "gtk_status_icon_get_tooltip_text", libprag.} + +proc getTooltipText*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_tooltip_text(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc tooltipText*(self: StatusIcon): string = + let resul0 = gtk_status_icon_get_tooltip_text(cast[ptr StatusIcon00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_status_icon_get_visible*(self: ptr StatusIcon00): gboolean {. + importc: "gtk_status_icon_get_visible", libprag.} + +proc getVisible*(self: StatusIcon): bool = + toBool(gtk_status_icon_get_visible(cast[ptr StatusIcon00](self.impl))) + +proc visible*(self: StatusIcon): bool = + toBool(gtk_status_icon_get_visible(cast[ptr StatusIcon00](self.impl))) + +proc gtk_status_icon_get_x11_window_id*(self: ptr StatusIcon00): uint32 {. + importc: "gtk_status_icon_get_x11_window_id", libprag.} + +proc getX11WindowId*(self: StatusIcon): int = + int(gtk_status_icon_get_x11_window_id(cast[ptr StatusIcon00](self.impl))) + +proc x11WindowId*(self: StatusIcon): int = + int(gtk_status_icon_get_x11_window_id(cast[ptr StatusIcon00](self.impl))) + +proc gtk_status_icon_is_embedded*(self: ptr StatusIcon00): gboolean {. + importc: "gtk_status_icon_is_embedded", libprag.} + +proc isEmbedded*(self: StatusIcon): bool = + toBool(gtk_status_icon_is_embedded(cast[ptr StatusIcon00](self.impl))) + +proc gtk_status_icon_set_from_file*(self: ptr StatusIcon00; filename: ucstring) {. + importc: "gtk_status_icon_set_from_file", libprag.} + +proc setFromFile*(self: StatusIcon; filename: ucstring) = + gtk_status_icon_set_from_file(cast[ptr StatusIcon00](self.impl), filename) + +proc `fromFile=`*(self: StatusIcon; filename: ucstring) = + gtk_status_icon_set_from_file(cast[ptr StatusIcon00](self.impl), filename) + +proc gtk_status_icon_set_from_gicon*(self: ptr StatusIcon00; icon: ptr gio.Icon00) {. + importc: "gtk_status_icon_set_from_gicon", libprag.} + +proc setFromGicon*(self: StatusIcon; icon: gio.Icon) = + gtk_status_icon_set_from_gicon(cast[ptr StatusIcon00](self.impl), cast[ptr gio.Icon00](icon.impl)) + +proc `fromGicon=`*(self: StatusIcon; icon: gio.Icon) = + gtk_status_icon_set_from_gicon(cast[ptr StatusIcon00](self.impl), cast[ptr gio.Icon00](icon.impl)) + +proc gtk_status_icon_set_from_icon_name*(self: ptr StatusIcon00; iconName: cstring) {. + importc: "gtk_status_icon_set_from_icon_name", libprag.} + +proc setFromIconName*(self: StatusIcon; iconName: string) = + gtk_status_icon_set_from_icon_name(cast[ptr StatusIcon00](self.impl), cstring(iconName)) + +proc `fromIconName=`*(self: StatusIcon; iconName: string) = + gtk_status_icon_set_from_icon_name(cast[ptr StatusIcon00](self.impl), cstring(iconName)) + +proc gtk_status_icon_set_from_pixbuf*(self: ptr StatusIcon00; pixbuf: ptr gdkpixbuf.Pixbuf00) {. + importc: "gtk_status_icon_set_from_pixbuf", libprag.} + +proc setFromPixbuf*(self: StatusIcon; pixbuf: gdkpixbuf.Pixbuf) = + gtk_status_icon_set_from_pixbuf(cast[ptr StatusIcon00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc `fromPixbuf=`*(self: StatusIcon; pixbuf: gdkpixbuf.Pixbuf) = + gtk_status_icon_set_from_pixbuf(cast[ptr StatusIcon00](self.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl)) + +proc gtk_status_icon_set_from_stock*(self: ptr StatusIcon00; stockId: cstring) {. + importc: "gtk_status_icon_set_from_stock", libprag.} + +proc setFromStock*(self: StatusIcon; stockId: string) = + gtk_status_icon_set_from_stock(cast[ptr StatusIcon00](self.impl), cstring(stockId)) + +proc `fromStock=`*(self: StatusIcon; stockId: string) = + gtk_status_icon_set_from_stock(cast[ptr StatusIcon00](self.impl), cstring(stockId)) + +proc gtk_status_icon_set_has_tooltip*(self: ptr StatusIcon00; hasTooltip: gboolean) {. + importc: "gtk_status_icon_set_has_tooltip", libprag.} + +proc setHasTooltip*(self: StatusIcon; hasTooltip: bool) = + gtk_status_icon_set_has_tooltip(cast[ptr StatusIcon00](self.impl), gboolean(hasTooltip)) + +proc `hasTooltip=`*(self: StatusIcon; hasTooltip: bool) = + gtk_status_icon_set_has_tooltip(cast[ptr StatusIcon00](self.impl), gboolean(hasTooltip)) + +proc gtk_status_icon_set_name*(self: ptr StatusIcon00; name: cstring) {. + importc: "gtk_status_icon_set_name", libprag.} + +proc setName*(self: StatusIcon; name: string) = + gtk_status_icon_set_name(cast[ptr StatusIcon00](self.impl), cstring(name)) + +proc `name=`*(self: StatusIcon; name: string) = + gtk_status_icon_set_name(cast[ptr StatusIcon00](self.impl), cstring(name)) + +proc gtk_status_icon_set_screen*(self: ptr StatusIcon00; screen: ptr gdk.Screen00) {. + importc: "gtk_status_icon_set_screen", libprag.} + +proc setScreen*(self: StatusIcon; screen: gdk.Screen) = + gtk_status_icon_set_screen(cast[ptr StatusIcon00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc `screen=`*(self: StatusIcon; screen: gdk.Screen) = + gtk_status_icon_set_screen(cast[ptr StatusIcon00](self.impl), cast[ptr gdk.Screen00](screen.impl)) + +proc gtk_status_icon_set_title*(self: ptr StatusIcon00; title: cstring) {. + importc: "gtk_status_icon_set_title", libprag.} + +proc setTitle*(self: StatusIcon; title: string) = + gtk_status_icon_set_title(cast[ptr StatusIcon00](self.impl), cstring(title)) + +proc `title=`*(self: StatusIcon; title: string) = + gtk_status_icon_set_title(cast[ptr StatusIcon00](self.impl), cstring(title)) + +proc gtk_status_icon_set_tooltip_markup*(self: ptr StatusIcon00; markup: cstring) {. + importc: "gtk_status_icon_set_tooltip_markup", libprag.} + +proc setTooltipMarkup*(self: StatusIcon; markup: string) = + gtk_status_icon_set_tooltip_markup(cast[ptr StatusIcon00](self.impl), cstring(markup)) + +proc `tooltipMarkup=`*(self: StatusIcon; markup: string) = + gtk_status_icon_set_tooltip_markup(cast[ptr StatusIcon00](self.impl), cstring(markup)) + +proc gtk_status_icon_set_tooltip_text*(self: ptr StatusIcon00; text: cstring) {. + importc: "gtk_status_icon_set_tooltip_text", libprag.} + +proc setTooltipText*(self: StatusIcon; text: string) = + gtk_status_icon_set_tooltip_text(cast[ptr StatusIcon00](self.impl), cstring(text)) + +proc `tooltipText=`*(self: StatusIcon; text: string) = + gtk_status_icon_set_tooltip_text(cast[ptr StatusIcon00](self.impl), cstring(text)) + +proc gtk_status_icon_set_visible*(self: ptr StatusIcon00; visible: gboolean) {. + importc: "gtk_status_icon_set_visible", libprag.} + +proc setVisible*(self: StatusIcon; visible: bool) = + gtk_status_icon_set_visible(cast[ptr StatusIcon00](self.impl), gboolean(visible)) + +proc `visible=`*(self: StatusIcon; visible: bool) = + gtk_status_icon_set_visible(cast[ptr StatusIcon00](self.impl), gboolean(visible)) + +type + StatusIconClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + activate*: proc(statusIcon: ptr StatusIcon00) {.cdecl.} + popupMenu*: proc(statusIcon: ptr StatusIcon00; button: uint32; activateTime: uint32) {.cdecl.} + sizeChanged*: proc(statusIcon: ptr StatusIcon00; size: int32): gboolean {.cdecl.} + buttonPressEvent*: proc(statusIcon: ptr StatusIcon00; event: ptr gdk.EventButton00): gboolean {.cdecl.} + buttonReleaseEvent*: proc(statusIcon: ptr StatusIcon00; event: ptr gdk.EventButton00): gboolean {.cdecl.} + scrollEvent*: proc(statusIcon: ptr StatusIcon00; event: ptr gdk.EventScroll00): gboolean {.cdecl.} + queryTooltip*: proc(statusIcon: ptr StatusIcon00; x: int32; y: int32; + keyboardMode: gboolean; tooltip: ptr Tooltip00): gboolean {.cdecl.} + GtkReserved1*: pointer + GtkReserved2*: pointer + GtkReserved3*: pointer + GtkReserved4*: pointer + StatusIconClass* = ref object + impl*: ptr StatusIconClass00 + +type + StatusbarPrivate00* {.pure.} = object + StatusbarPrivate* = ref object + impl*: ptr StatusbarPrivate00 + +type + Statusbar* = ref object of Box + Statusbar00* = object of Box00 + priv4: ptr StatusbarPrivate00 + +proc scTextPopped*(self: Statusbar; p: proc (self: ptr gobject.Object00; contextId: uint32; text: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "text-popped", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scTextPushed*(self: Statusbar; p: proc (self: ptr gobject.Object00; contextId: uint32; text: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "text-pushed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_statusbar_new*(): ptr Statusbar00 {. + importc: "gtk_statusbar_new", libprag.} + +proc newStatusbar*(): Statusbar = + new(result, finalizeGObject) + result.impl = gtk_statusbar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initStatusbar*[T](result: var T) = + assert(result is Statusbar) + new(result, finalizeGObject) + result.impl = gtk_statusbar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_statusbar_get_context_id*(self: ptr Statusbar00; contextDescription: cstring): uint32 {. + importc: "gtk_statusbar_get_context_id", libprag.} + +proc getContextId*(self: Statusbar; contextDescription: string): int = + int(gtk_statusbar_get_context_id(cast[ptr Statusbar00](self.impl), cstring(contextDescription))) + +proc contextId*(self: Statusbar; contextDescription: string): int = + int(gtk_statusbar_get_context_id(cast[ptr Statusbar00](self.impl), cstring(contextDescription))) + +proc gtk_statusbar_get_message_area*(self: ptr Statusbar00): ptr Box00 {. + importc: "gtk_statusbar_get_message_area", libprag.} + +proc getMessageArea*(self: Statusbar): Box = + let gobj = gtk_statusbar_get_message_area(cast[ptr Statusbar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Box](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc messageArea*(self: Statusbar): Box = + let gobj = gtk_statusbar_get_message_area(cast[ptr Statusbar00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Box](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_statusbar_pop*(self: ptr Statusbar00; contextId: uint32) {. + importc: "gtk_statusbar_pop", libprag.} + +proc pop*(self: Statusbar; contextId: int) = + gtk_statusbar_pop(cast[ptr Statusbar00](self.impl), uint32(contextId)) + +proc gtk_statusbar_push*(self: ptr Statusbar00; contextId: uint32; text: cstring): uint32 {. + importc: "gtk_statusbar_push", libprag.} + +proc push*(self: Statusbar; contextId: int; text: string): int = + int(gtk_statusbar_push(cast[ptr Statusbar00](self.impl), uint32(contextId), cstring(text))) + +proc gtk_statusbar_remove*(self: ptr Statusbar00; contextId: uint32; messageId: uint32) {. + importc: "gtk_statusbar_remove", libprag.} + +proc remove*(self: Statusbar; contextId: int; messageId: int) = + gtk_statusbar_remove(cast[ptr Statusbar00](self.impl), uint32(contextId), uint32(messageId)) + +proc gtk_statusbar_remove_all*(self: ptr Statusbar00; contextId: uint32) {. + importc: "gtk_statusbar_remove_all", libprag.} + +proc removeAll*(self: Statusbar; contextId: int) = + gtk_statusbar_remove_all(cast[ptr Statusbar00](self.impl), uint32(contextId)) + +type + StatusbarAccessiblePrivate00* {.pure.} = object + StatusbarAccessiblePrivate* = ref object + impl*: ptr StatusbarAccessiblePrivate00 + +type + StatusbarAccessible* = ref object of ContainerAccessible + StatusbarAccessible00* = object of ContainerAccessible00 + priv4: ptr StatusbarAccessiblePrivate00 + +type + StatusbarAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + StatusbarAccessibleClass* = ref object + impl*: ptr StatusbarAccessibleClass00 + +type + StatusbarClass00* {.pure.} = object + parentClass*: BoxClass00 + reserved*: pointer + textPushed*: proc(statusbar: ptr Statusbar00; contextId: uint32; text: cstring) {.cdecl.} + textPopped*: proc(statusbar: ptr Statusbar00; contextId: uint32; text: cstring) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + StatusbarClass* = ref object + impl*: ptr StatusbarClass00 + +type + StockItem00* {.pure.} = object + stockId*: cstring + label*: cstring + modifier*: gdk.ModifierType + keyval*: uint32 + translationDomain*: cstring + StockItem* = ref object + impl*: ptr StockItem00 + +proc gtk_stock_item_free*(self: ptr StockItem00) {. + importc: "gtk_stock_item_free", libprag.} + +proc free*(self: StockItem) = + gtk_stock_item_free(cast[ptr StockItem00](self.impl)) + +type + StyleClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + realize*: proc(style: ptr Style00) {.cdecl.} + unrealize*: proc(style: ptr Style00) {.cdecl.} + copy*: proc(style: ptr Style00; src: ptr Style00) {.cdecl.} + clone*: pointer + initFromRc*: proc(style: ptr Style00; rcStyle: ptr RcStyle00) {.cdecl.} + setBackground*: proc(style: ptr Style00; window: ptr gdk.Window00; stateType: StateType) {.cdecl.} + renderIcon*: proc(style: ptr Style00; source: ptr IconSource00; direction: TextDirection; + state: StateType; size: int32; widget: ptr Widget00; detail: cstring): ptr gdkpixbuf.Pixbuf00 {.cdecl.} + drawHline*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; x1: int32; x2: int32; y: int32) {.cdecl.} + drawVline*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; y1: int32; y2: int32; x: int32) {.cdecl.} + drawShadow*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {.cdecl.} + drawArrow*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; arrowType: ArrowType; + fill: gboolean; x: int32; y: int32; width: int32; height: int32) {.cdecl.} + drawDiamond*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {.cdecl.} + drawBox*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {.cdecl.} + drawFlatBox*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {.cdecl.} + drawCheck*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {.cdecl.} + drawOption*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {.cdecl.} + drawTab*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {.cdecl.} + drawShadowGap*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; gapSide: PositionType; gapX: int32; gapWidth: int32) {.cdecl.} + drawBoxGap*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; gapSide: PositionType; gapX: int32; gapWidth: int32) {.cdecl.} + drawExtension*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; gapSide: PositionType) {.cdecl.} + drawFocus*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; x: int32; y: int32; width: int32; height: int32) {.cdecl.} + drawSlider*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; orientation: Orientation) {.cdecl.} + drawHandle*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; orientation: Orientation) {.cdecl.} + drawExpander*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; x: int32; y: int32; expanderStyle: ExpanderStyle) {.cdecl.} + drawLayout*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + useText: gboolean; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + layout: ptr pango.Layout00) {.cdecl.} + drawResizeGrip*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; edge: gdk.WindowEdge; x: int32; y: int32; + width: int32; height: int32) {.cdecl.} + drawSpinner*: proc(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; step: uint32; x: int32; y: int32; width: int32; + height: int32) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + gtkReserved9*: pointer + gtkReserved10*: pointer + gtkReserved11*: pointer + StyleClass* = ref object + impl*: ptr StyleClass00 + +type + StyleContextClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + changed*: proc(context: ptr StyleContext00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + StyleContextClass* = ref object + impl*: ptr StyleContextClass00 + +type + StylePropertiesClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + StylePropertiesClass* = ref object + impl*: ptr StylePropertiesClass00 + +type + StylePropertyParser* = proc (string: cstring; value: ptr gobject.Value00): gboolean {.cdecl.} + +type + StyleProviderIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + getStyle*: proc(provider: ptr StyleProvider00; path: ptr WidgetPath00): ptr StyleProperties00 {.cdecl.} + getStyleProperty*: proc(provider: ptr StyleProvider00; path: ptr WidgetPath00; + state: StateFlags; pspec: ptr gobject.ParamSpec00; value: var gobject.Value00): gboolean {.cdecl.} + getIconFactory*: proc(provider: ptr StyleProvider00; path: ptr WidgetPath00): ptr IconFactory00 {.cdecl.} + StyleProviderIface* = ref object + impl*: ptr StyleProviderIface00 + +type + SwitchPrivate00* {.pure.} = object + SwitchPrivate* = ref object + impl*: ptr SwitchPrivate00 + +type + Switch* = ref object of Widget + Switch00* = object of Widget00 + priv2: ptr SwitchPrivate00 + +proc scActivate*(self: Switch; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStateSet*(self: Switch; p: proc (self: ptr gobject.Object00; state: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "state-set", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_switch_new*(): ptr Switch00 {. + importc: "gtk_switch_new", libprag.} + +proc newSwitch*(): Switch = + new(result, finalizeGObject) + result.impl = gtk_switch_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initSwitch*[T](result: var T) = + assert(result is Switch) + new(result, finalizeGObject) + result.impl = gtk_switch_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_switch_get_active*(self: ptr Switch00): gboolean {. + importc: "gtk_switch_get_active", libprag.} + +proc getActive*(self: Switch): bool = + toBool(gtk_switch_get_active(cast[ptr Switch00](self.impl))) + +proc active*(self: Switch): bool = + toBool(gtk_switch_get_active(cast[ptr Switch00](self.impl))) + +proc gtk_switch_get_state*(self: ptr Switch00): gboolean {. + importc: "gtk_switch_get_state", libprag.} + +proc getState*(self: Switch): bool = + toBool(gtk_switch_get_state(cast[ptr Switch00](self.impl))) + +proc state*(self: Switch): bool = + toBool(gtk_switch_get_state(cast[ptr Switch00](self.impl))) + +proc gtk_switch_set_active*(self: ptr Switch00; isActive: gboolean) {. + importc: "gtk_switch_set_active", libprag.} + +proc setActive*(self: Switch; isActive: bool) = + gtk_switch_set_active(cast[ptr Switch00](self.impl), gboolean(isActive)) + +proc `active=`*(self: Switch; isActive: bool) = + gtk_switch_set_active(cast[ptr Switch00](self.impl), gboolean(isActive)) + +proc gtk_switch_set_state*(self: ptr Switch00; state: gboolean) {. + importc: "gtk_switch_set_state", libprag.} + +proc setState*(self: Switch; state: bool) = + gtk_switch_set_state(cast[ptr Switch00](self.impl), gboolean(state)) + +proc `state=`*(self: Switch; state: bool) = + gtk_switch_set_state(cast[ptr Switch00](self.impl), gboolean(state)) + +type + SwitchAccessiblePrivate00* {.pure.} = object + SwitchAccessiblePrivate* = ref object + impl*: ptr SwitchAccessiblePrivate00 + +type + SwitchAccessible* = ref object of WidgetAccessible + SwitchAccessible00* = object of WidgetAccessible00 + priv3: ptr SwitchAccessiblePrivate00 + +type + SwitchAccessibleClass00* {.pure.} = object + parentClass*: WidgetAccessibleClass00 + SwitchAccessibleClass* = ref object + impl*: ptr SwitchAccessibleClass00 + +type + SwitchClass00* {.pure.} = object + parentClass*: WidgetClass00 + activate*: proc(sw: ptr Switch00) {.cdecl.} + stateSet*: proc(sw: ptr Switch00; state: gboolean): gboolean {.cdecl.} + switchPadding_1*: pointer + switchPadding_2*: pointer + switchPadding_3*: pointer + switchPadding_4*: pointer + switchPadding_5*: pointer + SwitchClass* = ref object + impl*: ptr SwitchClass00 + +const TEXT_VIEW_PRIORITY_VALIDATE* = 5'i32 + +const TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID* = -1'i32 + +const TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID* = -2'i32 + +type + TablePrivate00* {.pure.} = object + TablePrivate* = ref object + impl*: ptr TablePrivate00 + +type + Table* = ref object of Container + Table00* = object of Container00 + priv3: ptr TablePrivate00 + +proc gtk_table_new*(rows: uint32; columns: uint32; homogeneous: gboolean): ptr Table00 {. + importc: "gtk_table_new", libprag.} + +proc newTable*(rows: int; columns: int; homogeneous: bool): Table = + new(result, finalizeGObject) + result.impl = gtk_table_new(uint32(rows), uint32(columns), gboolean(homogeneous)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTable*[T](result: var T; rows: int; columns: int; homogeneous: bool) = + assert(result is Table) + new(result, finalizeGObject) + result.impl = gtk_table_new(uint32(rows), uint32(columns), gboolean(homogeneous)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_table_attach*(self: ptr Table00; child: ptr Widget00; leftAttach: uint32; + rightAttach: uint32; topAttach: uint32; bottomAttach: uint32; xoptions: AttachOptions; + yoptions: AttachOptions; xpadding: uint32; ypadding: uint32) {. + importc: "gtk_table_attach", libprag.} + +proc attach*(self: Table; child: Widget; leftAttach: int; rightAttach: int; + topAttach: int; bottomAttach: int; xoptions: AttachOptions; yoptions: AttachOptions; + xpadding: int; ypadding: int) = + gtk_table_attach(cast[ptr Table00](self.impl), cast[ptr Widget00](child.impl), uint32(leftAttach), uint32(rightAttach), uint32(topAttach), uint32(bottomAttach), xoptions, yoptions, uint32(xpadding), uint32(ypadding)) + +proc gtk_table_attach_defaults*(self: ptr Table00; widget: ptr Widget00; leftAttach: uint32; + rightAttach: uint32; topAttach: uint32; bottomAttach: uint32) {. + importc: "gtk_table_attach_defaults", libprag.} + +proc attachDefaults*(self: Table; widget: Widget; leftAttach: int; rightAttach: int; + topAttach: int; bottomAttach: int) = + gtk_table_attach_defaults(cast[ptr Table00](self.impl), cast[ptr Widget00](widget.impl), uint32(leftAttach), uint32(rightAttach), uint32(topAttach), uint32(bottomAttach)) + +proc gtk_table_get_col_spacing*(self: ptr Table00; column: uint32): uint32 {. + importc: "gtk_table_get_col_spacing", libprag.} + +proc getColSpacing*(self: Table; column: int): int = + int(gtk_table_get_col_spacing(cast[ptr Table00](self.impl), uint32(column))) + +proc colSpacing*(self: Table; column: int): int = + int(gtk_table_get_col_spacing(cast[ptr Table00](self.impl), uint32(column))) + +proc gtk_table_get_default_col_spacing*(self: ptr Table00): uint32 {. + importc: "gtk_table_get_default_col_spacing", libprag.} + +proc getDefaultColSpacing*(self: Table): int = + int(gtk_table_get_default_col_spacing(cast[ptr Table00](self.impl))) + +proc defaultColSpacing*(self: Table): int = + int(gtk_table_get_default_col_spacing(cast[ptr Table00](self.impl))) + +proc gtk_table_get_default_row_spacing*(self: ptr Table00): uint32 {. + importc: "gtk_table_get_default_row_spacing", libprag.} + +proc getDefaultRowSpacing*(self: Table): int = + int(gtk_table_get_default_row_spacing(cast[ptr Table00](self.impl))) + +proc defaultRowSpacing*(self: Table): int = + int(gtk_table_get_default_row_spacing(cast[ptr Table00](self.impl))) + +proc gtk_table_get_homogeneous*(self: ptr Table00): gboolean {. + importc: "gtk_table_get_homogeneous", libprag.} + +proc getHomogeneous*(self: Table): bool = + toBool(gtk_table_get_homogeneous(cast[ptr Table00](self.impl))) + +proc homogeneous*(self: Table): bool = + toBool(gtk_table_get_homogeneous(cast[ptr Table00](self.impl))) + +proc gtk_table_get_row_spacing*(self: ptr Table00; row: uint32): uint32 {. + importc: "gtk_table_get_row_spacing", libprag.} + +proc getRowSpacing*(self: Table; row: int): int = + int(gtk_table_get_row_spacing(cast[ptr Table00](self.impl), uint32(row))) + +proc rowSpacing*(self: Table; row: int): int = + int(gtk_table_get_row_spacing(cast[ptr Table00](self.impl), uint32(row))) + +proc gtk_table_get_size*(self: ptr Table00; rows: var uint32; columns: var uint32) {. + importc: "gtk_table_get_size", libprag.} + +proc getSize*(self: Table; rows: var int; columns: var int) = + var columns_00 = uint32(columns) + var rows_00 = uint32(rows) + gtk_table_get_size(cast[ptr Table00](self.impl), rows_00, columns_00) + columns = int(columns_00) + rows = int(rows_00) + +proc size*(self: Table; rows: var int; columns: var int) = + var columns_00 = uint32(columns) + var rows_00 = uint32(rows) + gtk_table_get_size(cast[ptr Table00](self.impl), rows_00, columns_00) + columns = int(columns_00) + rows = int(rows_00) + +proc gtk_table_resize*(self: ptr Table00; rows: uint32; columns: uint32) {. + importc: "gtk_table_resize", libprag.} + +proc resize*(self: Table; rows: int; columns: int) = + gtk_table_resize(cast[ptr Table00](self.impl), uint32(rows), uint32(columns)) + +proc gtk_table_set_col_spacing*(self: ptr Table00; column: uint32; spacing: uint32) {. + importc: "gtk_table_set_col_spacing", libprag.} + +proc setColSpacing*(self: Table; column: int; spacing: int) = + gtk_table_set_col_spacing(cast[ptr Table00](self.impl), uint32(column), uint32(spacing)) + +proc gtk_table_set_col_spacings*(self: ptr Table00; spacing: uint32) {. + importc: "gtk_table_set_col_spacings", libprag.} + +proc setColSpacings*(self: Table; spacing: int) = + gtk_table_set_col_spacings(cast[ptr Table00](self.impl), uint32(spacing)) + +proc `colSpacings=`*(self: Table; spacing: int) = + gtk_table_set_col_spacings(cast[ptr Table00](self.impl), uint32(spacing)) + +proc gtk_table_set_homogeneous*(self: ptr Table00; homogeneous: gboolean) {. + importc: "gtk_table_set_homogeneous", libprag.} + +proc setHomogeneous*(self: Table; homogeneous: bool) = + gtk_table_set_homogeneous(cast[ptr Table00](self.impl), gboolean(homogeneous)) + +proc `homogeneous=`*(self: Table; homogeneous: bool) = + gtk_table_set_homogeneous(cast[ptr Table00](self.impl), gboolean(homogeneous)) + +proc gtk_table_set_row_spacing*(self: ptr Table00; row: uint32; spacing: uint32) {. + importc: "gtk_table_set_row_spacing", libprag.} + +proc setRowSpacing*(self: Table; row: int; spacing: int) = + gtk_table_set_row_spacing(cast[ptr Table00](self.impl), uint32(row), uint32(spacing)) + +proc gtk_table_set_row_spacings*(self: ptr Table00; spacing: uint32) {. + importc: "gtk_table_set_row_spacings", libprag.} + +proc setRowSpacings*(self: Table; spacing: int) = + gtk_table_set_row_spacings(cast[ptr Table00](self.impl), uint32(spacing)) + +proc `rowSpacings=`*(self: Table; spacing: int) = + gtk_table_set_row_spacings(cast[ptr Table00](self.impl), uint32(spacing)) + +type + TableChild00* {.pure.} = object + widget*: ptr Widget00 + leftAttach*: uint16 + rightAttach*: uint16 + topAttach*: uint16 + bottomAttach*: uint16 + xpadding*: uint16 + ypadding*: uint16 + xexpand*: uint32 + yexpand*: uint32 + xshrink*: uint32 + yshrink*: uint32 + xfill*: uint32 + yfill*: uint32 + TableChild* = ref object + impl*: ptr TableChild00 + +type + TableClass00* {.pure.} = object + parentClass*: ContainerClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TableClass* = ref object + impl*: ptr TableClass00 + +type + TableRowCol00* {.pure.} = object + requisition*: uint16 + allocation*: uint16 + spacing*: uint16 + needExpand*: uint32 + needShrink*: uint32 + expand*: uint32 + shrink*: uint32 + empty*: uint32 + TableRowCol* = ref object + impl*: ptr TableRowCol00 + +type + TargetFlag* {.size: sizeof(cint), pure.} = enum + sameApp = 1 + sameWidget = 2 + otherApp = 3 + otherWidget = 4 + + TargetFlags* {.size: sizeof(cint).} = set[TargetFlag] + +type + TargetPair00* {.pure.} = object + target*: ptr gdk.Atom00 + flags*: uint32 + info*: uint32 + TargetPair* = ref object + impl*: ptr TargetPair00 + +type + TearoffMenuItemPrivate00* {.pure.} = object + TearoffMenuItemPrivate* = ref object + impl*: ptr TearoffMenuItemPrivate00 + +type + TearoffMenuItem* = ref object of MenuItem + TearoffMenuItem00* = object of MenuItem00 + priv5: ptr TearoffMenuItemPrivate00 + +proc gtk_tearoff_menu_item_new*(): ptr TearoffMenuItem00 {. + importc: "gtk_tearoff_menu_item_new", libprag.} + +proc newTearoffMenuItem*(): TearoffMenuItem = + new(result, finalizeGObject) + result.impl = gtk_tearoff_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTearoffMenuItem*[T](result: var T) = + assert(result is TearoffMenuItem) + new(result, finalizeGObject) + result.impl = gtk_tearoff_menu_item_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + TearoffMenuItemClass00* {.pure.} = object + parentClass*: MenuItemClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TearoffMenuItemClass* = ref object + impl*: ptr TearoffMenuItemClass00 + +type + TextBTree00* {.pure.} = object + TextBTree* = ref object + impl*: ptr TextBTree00 + +type + TextBufferClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + insertText*: proc(buffer: ptr TextBuffer00; pos: ptr TextIter00; newText: cstring; + newTextLength: int32) {.cdecl.} + insertPixbuf*: proc(buffer: ptr TextBuffer00; iter: ptr TextIter00; pixbuf: ptr gdkpixbuf.Pixbuf00) {.cdecl.} + insertChildAnchor*: proc(buffer: ptr TextBuffer00; iter: ptr TextIter00; anchor: ptr TextChildAnchor00) {.cdecl.} + deleteRange*: proc(buffer: ptr TextBuffer00; start: ptr TextIter00; `end`: ptr TextIter00) {.cdecl.} + changed*: proc(buffer: ptr TextBuffer00) {.cdecl.} + modifiedChanged*: proc(buffer: ptr TextBuffer00) {.cdecl.} + markSet*: proc(buffer: ptr TextBuffer00; location: ptr TextIter00; + mark: ptr TextMark00) {.cdecl.} + markDeleted*: proc(buffer: ptr TextBuffer00; mark: ptr TextMark00) {.cdecl.} + applyTag*: proc(buffer: ptr TextBuffer00; tag: ptr TextTag00; start: ptr TextIter00; + `end`: ptr TextIter00) {.cdecl.} + removeTag*: proc(buffer: ptr TextBuffer00; tag: ptr TextTag00; start: ptr TextIter00; + `end`: ptr TextIter00) {.cdecl.} + beginUserAction*: proc(buffer: ptr TextBuffer00) {.cdecl.} + endUserAction*: proc(buffer: ptr TextBuffer00) {.cdecl.} + pasteDone*: proc(buffer: ptr TextBuffer00; clipboard: ptr Clipboard00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TextBufferClass* = ref object + impl*: ptr TextBufferClass00 + +type + TextBufferDeserializeFunc* = proc (registerBuffer: ptr TextBuffer00; contentBuffer: ptr TextBuffer00; + iter: ptr TextIter00; data: uint8Array; length: uint64; createTags: gboolean; + userData: pointer): gboolean {.cdecl.} + +proc gtk_text_buffer_register_deserialize_format*(self: ptr TextBuffer00; mimeType: cstring; function: TextBufferDeserializeFunc; + userData: pointer; userDataDestroy: DestroyNotify): ptr gdk.Atom00 {. + importc: "gtk_text_buffer_register_deserialize_format", libprag.} + +proc registerDeserializeFormat*(self: TextBuffer; mimeType: string; function: TextBufferDeserializeFunc; + userData: pointer; userDataDestroy: DestroyNotify): gdk.Atom = + new(result) + result.impl = gtk_text_buffer_register_deserialize_format(cast[ptr TextBuffer00](self.impl), cstring(mimeType), function, userData, userDataDestroy) + +type + TextBufferSerializeFunc* = proc (registerBuffer: ptr TextBuffer00; contentBuffer: ptr TextBuffer00; + start: ptr TextIter00; `end`: ptr TextIter00; length: ptr uint64; userData: pointer): ptr uint8 {.cdecl.} + +proc gtk_text_buffer_register_serialize_format*(self: ptr TextBuffer00; mimeType: cstring; function: TextBufferSerializeFunc; + userData: pointer; userDataDestroy: DestroyNotify): ptr gdk.Atom00 {. + importc: "gtk_text_buffer_register_serialize_format", libprag.} + +proc registerSerializeFormat*(self: TextBuffer; mimeType: string; function: TextBufferSerializeFunc; + userData: pointer; userDataDestroy: DestroyNotify): gdk.Atom = + new(result) + result.impl = gtk_text_buffer_register_serialize_format(cast[ptr TextBuffer00](self.impl), cstring(mimeType), function, userData, userDataDestroy) + +type + TextBufferTargetInfo* {.size: sizeof(cint), pure.} = enum + text = -3 + richText = -2 + bufferContents = -1 + +type + TextCellAccessiblePrivate00* {.pure.} = object + TextCellAccessiblePrivate* = ref object + impl*: ptr TextCellAccessiblePrivate00 + +type + TextCellAccessible* = ref object of RendererCellAccessible + TextCellAccessible00* = object of RendererCellAccessible00 + priv4: ptr TextCellAccessiblePrivate00 + +type + TextCellAccessibleClass00* {.pure.} = object + parentClass*: RendererCellAccessibleClass00 + TextCellAccessibleClass* = ref object + impl*: ptr TextCellAccessibleClass00 + +type + TextCharPredicate* = proc (ch: gunichar; userData: pointer): gboolean {.cdecl.} + +proc gtk_text_iter_backward_find_char*(self: ptr TextIter00; pred: TextCharPredicate; userData: pointer; + limit: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_backward_find_char", libprag.} + +proc backwardFindChar*(self: TextIter; pred: TextCharPredicate; userData: pointer; + limit: TextIter): bool = + toBool(gtk_text_iter_backward_find_char(cast[ptr TextIter00](self.impl), pred, userData, cast[ptr TextIter00](limit.impl))) + +proc gtk_text_iter_forward_find_char*(self: ptr TextIter00; pred: TextCharPredicate; userData: pointer; + limit: ptr TextIter00): gboolean {. + importc: "gtk_text_iter_forward_find_char", libprag.} + +proc forwardFindChar*(self: TextIter; pred: TextCharPredicate; userData: pointer; + limit: TextIter): bool = + toBool(gtk_text_iter_forward_find_char(cast[ptr TextIter00](self.impl), pred, userData, cast[ptr TextIter00](limit.impl))) + +type + TextChildAnchorClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TextChildAnchorClass* = ref object + impl*: ptr TextChildAnchorClass00 + +type + TextExtendSelection* {.size: sizeof(cint), pure.} = enum + word = 0 + line = 1 + +type + TextMarkClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TextMarkClass* = ref object + impl*: ptr TextMarkClass00 + +type + TextTagClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + event*: proc(tag: ptr TextTag00; eventObject: ptr gobject.Object00; + event: ptr gdk.Event00; iter: ptr TextIter00): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TextTagClass* = ref object + impl*: ptr TextTagClass00 + +type + TextTagTableClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + tagChanged*: proc(table: ptr TextTagTable00; tag: ptr TextTag00; sizeChanged: gboolean) {.cdecl.} + tagAdded*: proc(table: ptr TextTagTable00; tag: ptr TextTag00) {.cdecl.} + tagRemoved*: proc(table: ptr TextTagTable00; tag: ptr TextTag00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TextTagTableClass* = ref object + impl*: ptr TextTagTableClass00 + +type + TextTagTableForeach* = proc (tag: ptr TextTag00; data: pointer) {.cdecl.} + +proc gtk_text_tag_table_foreach*(self: ptr TextTagTable00; `func`: TextTagTableForeach; + data: pointer) {. + importc: "gtk_text_tag_table_foreach", libprag.} + +proc foreach*(self: TextTagTable; `func`: TextTagTableForeach; data: pointer) = + gtk_text_tag_table_foreach(cast[ptr TextTagTable00](self.impl), `func`, data) + +type + TextViewPrivate00* {.pure.} = object + TextViewPrivate* = ref object + impl*: ptr TextViewPrivate00 + +type + TextView* = ref object of Container + TextView00* = object of Container00 + priv3: ptr TextViewPrivate00 + +proc scBackspace*(self: TextView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "backspace", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCopyClipboard*(self: TextView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "copy-clipboard", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCutClipboard*(self: TextView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cut-clipboard", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDeleteFromCursor*(self: TextView; p: proc (self: ptr gobject.Object00; `type`: DeleteType; count: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "delete-from-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scExtendSelection*(self: TextView; p: proc (self: ptr gobject.Object00; granularity: TextExtendSelection; location: TextIter00; + start: TextIter00; `end`: TextIter00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "extend-selection", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scInsertAtCursor*(self: TextView; p: proc (self: ptr gobject.Object00; string: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "insert-at-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveCursor*(self: TextView; p: proc (self: ptr gobject.Object00; step: MovementStep; count: int32; extendSelection: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveViewport*(self: TextView; p: proc (self: ptr gobject.Object00; step: ScrollStep; count: int32; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-viewport", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPasteClipboard*(self: TextView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "paste-clipboard", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopulatePopup*(self: TextView; p: proc (self: ptr gobject.Object00; popup: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "populate-popup", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPreeditChanged*(self: TextView; p: proc (self: ptr gobject.Object00; preedit: cstring; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "preedit-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectAll*(self: TextView; p: proc (self: ptr gobject.Object00; select: gboolean; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select-all", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSetAnchor*(self: TextView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "set-anchor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleCursorVisible*(self: TextView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-cursor-visible", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleOverwrite*(self: TextView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-overwrite", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_text_view_new*(): ptr TextView00 {. + importc: "gtk_text_view_new", libprag.} + +proc newTextView*(): TextView = + new(result, finalizeGObject) + result.impl = gtk_text_view_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTextView*[T](result: var T) = + assert(result is TextView) + new(result, finalizeGObject) + result.impl = gtk_text_view_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_view_new_with_buffer*(buffer: ptr TextBuffer00): ptr TextView00 {. + importc: "gtk_text_view_new_with_buffer", libprag.} + +proc newTextViewWithBuffer*(buffer: TextBuffer): TextView = + new(result, finalizeGObject) + result.impl = gtk_text_view_new_with_buffer(cast[ptr TextBuffer00](buffer.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTextViewWithBuffer*[T](result: var T; buffer: TextBuffer) = + assert(result is TextView) + new(result, finalizeGObject) + result.impl = gtk_text_view_new_with_buffer(cast[ptr TextBuffer00](buffer.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_view_add_child_at_anchor*(self: ptr TextView00; child: ptr Widget00; anchor: ptr TextChildAnchor00) {. + importc: "gtk_text_view_add_child_at_anchor", libprag.} + +proc addChildAtAnchor*(self: TextView; child: Widget; anchor: TextChildAnchor) = + gtk_text_view_add_child_at_anchor(cast[ptr TextView00](self.impl), cast[ptr Widget00](child.impl), cast[ptr TextChildAnchor00](anchor.impl)) + +proc gtk_text_view_backward_display_line*(self: ptr TextView00; iter: ptr TextIter00): gboolean {. + importc: "gtk_text_view_backward_display_line", libprag.} + +proc backwardDisplayLine*(self: TextView; iter: TextIter): bool = + toBool(gtk_text_view_backward_display_line(cast[ptr TextView00](self.impl), cast[ptr TextIter00](iter.impl))) + +proc gtk_text_view_backward_display_line_start*(self: ptr TextView00; iter: ptr TextIter00): gboolean {. + importc: "gtk_text_view_backward_display_line_start", libprag.} + +proc backwardDisplayLineStart*(self: TextView; iter: TextIter): bool = + toBool(gtk_text_view_backward_display_line_start(cast[ptr TextView00](self.impl), cast[ptr TextIter00](iter.impl))) + +proc gtk_text_view_forward_display_line*(self: ptr TextView00; iter: ptr TextIter00): gboolean {. + importc: "gtk_text_view_forward_display_line", libprag.} + +proc forwardDisplayLine*(self: TextView; iter: TextIter): bool = + toBool(gtk_text_view_forward_display_line(cast[ptr TextView00](self.impl), cast[ptr TextIter00](iter.impl))) + +proc gtk_text_view_forward_display_line_end*(self: ptr TextView00; iter: ptr TextIter00): gboolean {. + importc: "gtk_text_view_forward_display_line_end", libprag.} + +proc forwardDisplayLineEnd*(self: TextView; iter: TextIter): bool = + toBool(gtk_text_view_forward_display_line_end(cast[ptr TextView00](self.impl), cast[ptr TextIter00](iter.impl))) + +proc gtk_text_view_get_accepts_tab*(self: ptr TextView00): gboolean {. + importc: "gtk_text_view_get_accepts_tab", libprag.} + +proc getAcceptsTab*(self: TextView): bool = + toBool(gtk_text_view_get_accepts_tab(cast[ptr TextView00](self.impl))) + +proc acceptsTab*(self: TextView): bool = + toBool(gtk_text_view_get_accepts_tab(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_bottom_margin*(self: ptr TextView00): int32 {. + importc: "gtk_text_view_get_bottom_margin", libprag.} + +proc getBottomMargin*(self: TextView): int = + int(gtk_text_view_get_bottom_margin(cast[ptr TextView00](self.impl))) + +proc bottomMargin*(self: TextView): int = + int(gtk_text_view_get_bottom_margin(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_buffer*(self: ptr TextView00): ptr TextBuffer00 {. + importc: "gtk_text_view_get_buffer", libprag.} + +proc getBuffer*(self: TextView): TextBuffer = + let gobj = gtk_text_view_get_buffer(cast[ptr TextView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextBuffer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc buffer*(self: TextView): TextBuffer = + let gobj = gtk_text_view_get_buffer(cast[ptr TextView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TextBuffer](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_view_get_cursor_locations*(self: ptr TextView00; iter: ptr TextIter00; strong: var gdk.Rectangle00; + weak: var gdk.Rectangle00) {. + importc: "gtk_text_view_get_cursor_locations", libprag.} + +proc getCursorLocations*(self: ptr TextView00; iter: ptr TextIter00; strong: var gdk.Rectangle00; + weak: var gdk.Rectangle00) {. + importc: "gtk_text_view_get_cursor_locations", libprag.} + +proc cursorLocations*(self: ptr TextView00; iter: ptr TextIter00; strong: var gdk.Rectangle00; + weak: var gdk.Rectangle00) {. + importc: "gtk_text_view_get_cursor_locations", libprag.} + +proc gtk_text_view_get_cursor_visible*(self: ptr TextView00): gboolean {. + importc: "gtk_text_view_get_cursor_visible", libprag.} + +proc getCursorVisible*(self: TextView): bool = + toBool(gtk_text_view_get_cursor_visible(cast[ptr TextView00](self.impl))) + +proc cursorVisible*(self: TextView): bool = + toBool(gtk_text_view_get_cursor_visible(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_default_attributes*(self: ptr TextView00): ptr TextAttributes00 {. + importc: "gtk_text_view_get_default_attributes", libprag.} + +proc getDefaultAttributes*(self: TextView): TextAttributes = + new(result) + result.impl = gtk_text_view_get_default_attributes(cast[ptr TextView00](self.impl)) + +proc defaultAttributes*(self: TextView): TextAttributes = + new(result) + result.impl = gtk_text_view_get_default_attributes(cast[ptr TextView00](self.impl)) + +proc gtk_text_view_get_editable*(self: ptr TextView00): gboolean {. + importc: "gtk_text_view_get_editable", libprag.} + +proc getEditable*(self: TextView): bool = + toBool(gtk_text_view_get_editable(cast[ptr TextView00](self.impl))) + +proc editable*(self: TextView): bool = + toBool(gtk_text_view_get_editable(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_hadjustment*(self: ptr TextView00): ptr Adjustment00 {. + importc: "gtk_text_view_get_hadjustment", libprag.} + +proc getHadjustment*(self: TextView): Adjustment = + let gobj = gtk_text_view_get_hadjustment(cast[ptr TextView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc hadjustment*(self: TextView): Adjustment = + let gobj = gtk_text_view_get_hadjustment(cast[ptr TextView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_view_get_indent*(self: ptr TextView00): int32 {. + importc: "gtk_text_view_get_indent", libprag.} + +proc getIndent*(self: TextView): int = + int(gtk_text_view_get_indent(cast[ptr TextView00](self.impl))) + +proc indent*(self: TextView): int = + int(gtk_text_view_get_indent(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_input_hints*(self: ptr TextView00): InputHints {. + importc: "gtk_text_view_get_input_hints", libprag.} + +proc getInputHints*(self: TextView): InputHints = + gtk_text_view_get_input_hints(cast[ptr TextView00](self.impl)) + +proc inputHints*(self: TextView): InputHints = + gtk_text_view_get_input_hints(cast[ptr TextView00](self.impl)) + +proc gtk_text_view_get_input_purpose*(self: ptr TextView00): InputPurpose {. + importc: "gtk_text_view_get_input_purpose", libprag.} + +proc getInputPurpose*(self: TextView): InputPurpose = + gtk_text_view_get_input_purpose(cast[ptr TextView00](self.impl)) + +proc inputPurpose*(self: TextView): InputPurpose = + gtk_text_view_get_input_purpose(cast[ptr TextView00](self.impl)) + +proc gtk_text_view_get_iter_at_location*(self: ptr TextView00; iter: var TextIter00; x: int32; + y: int32): gboolean {. + importc: "gtk_text_view_get_iter_at_location", libprag.} + +proc getIterAtLocation*(self: ptr TextView00; iter: var TextIter00; x: int32; + y: int32): gboolean {. + importc: "gtk_text_view_get_iter_at_location", libprag.} + +proc iterAtLocation*(self: ptr TextView00; iter: var TextIter00; x: int32; + y: int32): gboolean {. + importc: "gtk_text_view_get_iter_at_location", libprag.} + +proc gtk_text_view_get_iter_at_position*(self: ptr TextView00; iter: var TextIter00; trailing: var int32; + x: int32; y: int32): gboolean {. + importc: "gtk_text_view_get_iter_at_position", libprag.} + +proc getIterAtPosition*(self: ptr TextView00; iter: var TextIter00; trailing: var int32; + x: int32; y: int32): gboolean {. + importc: "gtk_text_view_get_iter_at_position", libprag.} + +proc iterAtPosition*(self: ptr TextView00; iter: var TextIter00; trailing: var int32; + x: int32; y: int32): gboolean {. + importc: "gtk_text_view_get_iter_at_position", libprag.} + +proc gtk_text_view_get_iter_location*(self: ptr TextView00; iter: ptr TextIter00; location: var gdk.Rectangle00) {. + importc: "gtk_text_view_get_iter_location", libprag.} + +proc getIterLocation*(self: ptr TextView00; iter: ptr TextIter00; location: var gdk.Rectangle00) {. + importc: "gtk_text_view_get_iter_location", libprag.} + +proc iterLocation*(self: ptr TextView00; iter: ptr TextIter00; location: var gdk.Rectangle00) {. + importc: "gtk_text_view_get_iter_location", libprag.} + +proc gtk_text_view_get_justification*(self: ptr TextView00): Justification {. + importc: "gtk_text_view_get_justification", libprag.} + +proc getJustification*(self: TextView): Justification = + gtk_text_view_get_justification(cast[ptr TextView00](self.impl)) + +proc justification*(self: TextView): Justification = + gtk_text_view_get_justification(cast[ptr TextView00](self.impl)) + +proc gtk_text_view_get_left_margin*(self: ptr TextView00): int32 {. + importc: "gtk_text_view_get_left_margin", libprag.} + +proc getLeftMargin*(self: TextView): int = + int(gtk_text_view_get_left_margin(cast[ptr TextView00](self.impl))) + +proc leftMargin*(self: TextView): int = + int(gtk_text_view_get_left_margin(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_line_at_y*(self: ptr TextView00; targetIter: var TextIter00; + y: int32; lineTop: var int32) {. + importc: "gtk_text_view_get_line_at_y", libprag.} + +proc getLineAtY*(self: ptr TextView00; targetIter: var TextIter00; + y: int32; lineTop: var int32) {. + importc: "gtk_text_view_get_line_at_y", libprag.} + +proc lineAtY*(self: ptr TextView00; targetIter: var TextIter00; + y: int32; lineTop: var int32) {. + importc: "gtk_text_view_get_line_at_y", libprag.} + +proc gtk_text_view_get_line_yrange*(self: ptr TextView00; iter: ptr TextIter00; y: var int32; + height: var int32) {. + importc: "gtk_text_view_get_line_yrange", libprag.} + +proc getLineYrange*(self: TextView; iter: TextIter; y: var int; height: var int) = + var height_00 = int32(height) + var y_00 = int32(y) + gtk_text_view_get_line_yrange(cast[ptr TextView00](self.impl), cast[ptr TextIter00](iter.impl), y_00, height_00) + height = int(height_00) + y = int(y_00) + +proc lineYrange*(self: TextView; iter: TextIter; y: var int; height: var int) = + var height_00 = int32(height) + var y_00 = int32(y) + gtk_text_view_get_line_yrange(cast[ptr TextView00](self.impl), cast[ptr TextIter00](iter.impl), y_00, height_00) + height = int(height_00) + y = int(y_00) + +proc gtk_text_view_get_monospace*(self: ptr TextView00): gboolean {. + importc: "gtk_text_view_get_monospace", libprag.} + +proc getMonospace*(self: TextView): bool = + toBool(gtk_text_view_get_monospace(cast[ptr TextView00](self.impl))) + +proc monospace*(self: TextView): bool = + toBool(gtk_text_view_get_monospace(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_overwrite*(self: ptr TextView00): gboolean {. + importc: "gtk_text_view_get_overwrite", libprag.} + +proc getOverwrite*(self: TextView): bool = + toBool(gtk_text_view_get_overwrite(cast[ptr TextView00](self.impl))) + +proc overwrite*(self: TextView): bool = + toBool(gtk_text_view_get_overwrite(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_pixels_above_lines*(self: ptr TextView00): int32 {. + importc: "gtk_text_view_get_pixels_above_lines", libprag.} + +proc getPixelsAboveLines*(self: TextView): int = + int(gtk_text_view_get_pixels_above_lines(cast[ptr TextView00](self.impl))) + +proc pixelsAboveLines*(self: TextView): int = + int(gtk_text_view_get_pixels_above_lines(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_pixels_below_lines*(self: ptr TextView00): int32 {. + importc: "gtk_text_view_get_pixels_below_lines", libprag.} + +proc getPixelsBelowLines*(self: TextView): int = + int(gtk_text_view_get_pixels_below_lines(cast[ptr TextView00](self.impl))) + +proc pixelsBelowLines*(self: TextView): int = + int(gtk_text_view_get_pixels_below_lines(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_pixels_inside_wrap*(self: ptr TextView00): int32 {. + importc: "gtk_text_view_get_pixels_inside_wrap", libprag.} + +proc getPixelsInsideWrap*(self: TextView): int = + int(gtk_text_view_get_pixels_inside_wrap(cast[ptr TextView00](self.impl))) + +proc pixelsInsideWrap*(self: TextView): int = + int(gtk_text_view_get_pixels_inside_wrap(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_right_margin*(self: ptr TextView00): int32 {. + importc: "gtk_text_view_get_right_margin", libprag.} + +proc getRightMargin*(self: TextView): int = + int(gtk_text_view_get_right_margin(cast[ptr TextView00](self.impl))) + +proc rightMargin*(self: TextView): int = + int(gtk_text_view_get_right_margin(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_tabs*(self: ptr TextView00): ptr pango.TabArray00 {. + importc: "gtk_text_view_get_tabs", libprag.} + +proc getTabs*(self: TextView): pango.TabArray = + new(result) + result.impl = gtk_text_view_get_tabs(cast[ptr TextView00](self.impl)) + +proc tabs*(self: TextView): pango.TabArray = + new(result) + result.impl = gtk_text_view_get_tabs(cast[ptr TextView00](self.impl)) + +proc gtk_text_view_get_top_margin*(self: ptr TextView00): int32 {. + importc: "gtk_text_view_get_top_margin", libprag.} + +proc getTopMargin*(self: TextView): int = + int(gtk_text_view_get_top_margin(cast[ptr TextView00](self.impl))) + +proc topMargin*(self: TextView): int = + int(gtk_text_view_get_top_margin(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_get_vadjustment*(self: ptr TextView00): ptr Adjustment00 {. + importc: "gtk_text_view_get_vadjustment", libprag.} + +proc getVadjustment*(self: TextView): Adjustment = + let gobj = gtk_text_view_get_vadjustment(cast[ptr TextView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc vadjustment*(self: TextView): Adjustment = + let gobj = gtk_text_view_get_vadjustment(cast[ptr TextView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_view_get_visible_rect*(self: ptr TextView00; visibleRect: var gdk.Rectangle00) {. + importc: "gtk_text_view_get_visible_rect", libprag.} + +proc getVisibleRect*(self: ptr TextView00; visibleRect: var gdk.Rectangle00) {. + importc: "gtk_text_view_get_visible_rect", libprag.} + +proc visibleRect*(self: ptr TextView00; visibleRect: var gdk.Rectangle00) {. + importc: "gtk_text_view_get_visible_rect", libprag.} + +proc gtk_text_view_get_wrap_mode*(self: ptr TextView00): WrapMode {. + importc: "gtk_text_view_get_wrap_mode", libprag.} + +proc getWrapMode*(self: TextView): WrapMode = + gtk_text_view_get_wrap_mode(cast[ptr TextView00](self.impl)) + +proc wrapMode*(self: TextView): WrapMode = + gtk_text_view_get_wrap_mode(cast[ptr TextView00](self.impl)) + +proc gtk_text_view_im_context_filter_keypress*(self: ptr TextView00; event: ptr gdk.EventKey00): gboolean {. + importc: "gtk_text_view_im_context_filter_keypress", libprag.} + +proc imContextFilterKeypress*(self: TextView; event: gdk.EventKey): bool = + toBool(gtk_text_view_im_context_filter_keypress(cast[ptr TextView00](self.impl), cast[ptr gdk.EventKey00](event.impl))) + +proc gtk_text_view_move_child*(self: ptr TextView00; child: ptr Widget00; xpos: int32; + ypos: int32) {. + importc: "gtk_text_view_move_child", libprag.} + +proc moveChild*(self: TextView; child: Widget; xpos: int; ypos: int) = + gtk_text_view_move_child(cast[ptr TextView00](self.impl), cast[ptr Widget00](child.impl), int32(xpos), int32(ypos)) + +proc gtk_text_view_move_mark_onscreen*(self: ptr TextView00; mark: ptr TextMark00): gboolean {. + importc: "gtk_text_view_move_mark_onscreen", libprag.} + +proc moveMarkOnscreen*(self: TextView; mark: TextMark): bool = + toBool(gtk_text_view_move_mark_onscreen(cast[ptr TextView00](self.impl), cast[ptr TextMark00](mark.impl))) + +proc gtk_text_view_move_visually*(self: ptr TextView00; iter: ptr TextIter00; count: int32): gboolean {. + importc: "gtk_text_view_move_visually", libprag.} + +proc moveVisually*(self: TextView; iter: TextIter; count: int): bool = + toBool(gtk_text_view_move_visually(cast[ptr TextView00](self.impl), cast[ptr TextIter00](iter.impl), int32(count))) + +proc gtk_text_view_place_cursor_onscreen*(self: ptr TextView00): gboolean {. + importc: "gtk_text_view_place_cursor_onscreen", libprag.} + +proc placeCursorOnscreen*(self: TextView): bool = + toBool(gtk_text_view_place_cursor_onscreen(cast[ptr TextView00](self.impl))) + +proc gtk_text_view_reset_cursor_blink*(self: ptr TextView00) {. + importc: "gtk_text_view_reset_cursor_blink", libprag.} + +proc resetCursorBlink*(self: TextView) = + gtk_text_view_reset_cursor_blink(cast[ptr TextView00](self.impl)) + +proc gtk_text_view_reset_im_context*(self: ptr TextView00) {. + importc: "gtk_text_view_reset_im_context", libprag.} + +proc resetImContext*(self: TextView) = + gtk_text_view_reset_im_context(cast[ptr TextView00](self.impl)) + +proc gtk_text_view_scroll_mark_onscreen*(self: ptr TextView00; mark: ptr TextMark00) {. + importc: "gtk_text_view_scroll_mark_onscreen", libprag.} + +proc scrollMarkOnscreen*(self: TextView; mark: TextMark) = + gtk_text_view_scroll_mark_onscreen(cast[ptr TextView00](self.impl), cast[ptr TextMark00](mark.impl)) + +proc gtk_text_view_scroll_to_iter*(self: ptr TextView00; iter: ptr TextIter00; withinMargin: cdouble; + useAlign: gboolean; xalign: cdouble; yalign: cdouble): gboolean {. + importc: "gtk_text_view_scroll_to_iter", libprag.} + +proc scrollToIter*(self: TextView; iter: TextIter; withinMargin: cdouble; + useAlign: bool; xalign: cdouble; yalign: cdouble): bool = + toBool(gtk_text_view_scroll_to_iter(cast[ptr TextView00](self.impl), cast[ptr TextIter00](iter.impl), withinMargin, gboolean(useAlign), xalign, yalign)) + +proc gtk_text_view_scroll_to_mark*(self: ptr TextView00; mark: ptr TextMark00; withinMargin: cdouble; + useAlign: gboolean; xalign: cdouble; yalign: cdouble) {. + importc: "gtk_text_view_scroll_to_mark", libprag.} + +proc scrollToMark*(self: TextView; mark: TextMark; withinMargin: cdouble; + useAlign: bool; xalign: cdouble; yalign: cdouble) = + gtk_text_view_scroll_to_mark(cast[ptr TextView00](self.impl), cast[ptr TextMark00](mark.impl), withinMargin, gboolean(useAlign), xalign, yalign) + +proc gtk_text_view_set_accepts_tab*(self: ptr TextView00; acceptsTab: gboolean) {. + importc: "gtk_text_view_set_accepts_tab", libprag.} + +proc setAcceptsTab*(self: TextView; acceptsTab: bool) = + gtk_text_view_set_accepts_tab(cast[ptr TextView00](self.impl), gboolean(acceptsTab)) + +proc `acceptsTab=`*(self: TextView; acceptsTab: bool) = + gtk_text_view_set_accepts_tab(cast[ptr TextView00](self.impl), gboolean(acceptsTab)) + +proc gtk_text_view_set_bottom_margin*(self: ptr TextView00; bottomMargin: int32) {. + importc: "gtk_text_view_set_bottom_margin", libprag.} + +proc setBottomMargin*(self: TextView; bottomMargin: int) = + gtk_text_view_set_bottom_margin(cast[ptr TextView00](self.impl), int32(bottomMargin)) + +proc `bottomMargin=`*(self: TextView; bottomMargin: int) = + gtk_text_view_set_bottom_margin(cast[ptr TextView00](self.impl), int32(bottomMargin)) + +proc gtk_text_view_set_buffer*(self: ptr TextView00; buffer: ptr TextBuffer00) {. + importc: "gtk_text_view_set_buffer", libprag.} + +proc setBuffer*(self: TextView; buffer: TextBuffer) = + gtk_text_view_set_buffer(cast[ptr TextView00](self.impl), cast[ptr TextBuffer00](buffer.impl)) + +proc `buffer=`*(self: TextView; buffer: TextBuffer) = + gtk_text_view_set_buffer(cast[ptr TextView00](self.impl), cast[ptr TextBuffer00](buffer.impl)) + +proc gtk_text_view_set_cursor_visible*(self: ptr TextView00; setting: gboolean) {. + importc: "gtk_text_view_set_cursor_visible", libprag.} + +proc setCursorVisible*(self: TextView; setting: bool) = + gtk_text_view_set_cursor_visible(cast[ptr TextView00](self.impl), gboolean(setting)) + +proc `cursorVisible=`*(self: TextView; setting: bool) = + gtk_text_view_set_cursor_visible(cast[ptr TextView00](self.impl), gboolean(setting)) + +proc gtk_text_view_set_editable*(self: ptr TextView00; setting: gboolean) {. + importc: "gtk_text_view_set_editable", libprag.} + +proc setEditable*(self: TextView; setting: bool) = + gtk_text_view_set_editable(cast[ptr TextView00](self.impl), gboolean(setting)) + +proc `editable=`*(self: TextView; setting: bool) = + gtk_text_view_set_editable(cast[ptr TextView00](self.impl), gboolean(setting)) + +proc gtk_text_view_set_indent*(self: ptr TextView00; indent: int32) {. + importc: "gtk_text_view_set_indent", libprag.} + +proc setIndent*(self: TextView; indent: int) = + gtk_text_view_set_indent(cast[ptr TextView00](self.impl), int32(indent)) + +proc `indent=`*(self: TextView; indent: int) = + gtk_text_view_set_indent(cast[ptr TextView00](self.impl), int32(indent)) + +proc gtk_text_view_set_input_hints*(self: ptr TextView00; hints: InputHints) {. + importc: "gtk_text_view_set_input_hints", libprag.} + +proc setInputHints*(self: TextView; hints: InputHints) = + gtk_text_view_set_input_hints(cast[ptr TextView00](self.impl), hints) + +proc `inputHints=`*(self: TextView; hints: InputHints) = + gtk_text_view_set_input_hints(cast[ptr TextView00](self.impl), hints) + +proc gtk_text_view_set_input_purpose*(self: ptr TextView00; purpose: InputPurpose) {. + importc: "gtk_text_view_set_input_purpose", libprag.} + +proc setInputPurpose*(self: TextView; purpose: InputPurpose) = + gtk_text_view_set_input_purpose(cast[ptr TextView00](self.impl), purpose) + +proc `inputPurpose=`*(self: TextView; purpose: InputPurpose) = + gtk_text_view_set_input_purpose(cast[ptr TextView00](self.impl), purpose) + +proc gtk_text_view_set_justification*(self: ptr TextView00; justification: Justification) {. + importc: "gtk_text_view_set_justification", libprag.} + +proc setJustification*(self: TextView; justification: Justification) = + gtk_text_view_set_justification(cast[ptr TextView00](self.impl), justification) + +proc `justification=`*(self: TextView; justification: Justification) = + gtk_text_view_set_justification(cast[ptr TextView00](self.impl), justification) + +proc gtk_text_view_set_left_margin*(self: ptr TextView00; leftMargin: int32) {. + importc: "gtk_text_view_set_left_margin", libprag.} + +proc setLeftMargin*(self: TextView; leftMargin: int) = + gtk_text_view_set_left_margin(cast[ptr TextView00](self.impl), int32(leftMargin)) + +proc `leftMargin=`*(self: TextView; leftMargin: int) = + gtk_text_view_set_left_margin(cast[ptr TextView00](self.impl), int32(leftMargin)) + +proc gtk_text_view_set_monospace*(self: ptr TextView00; monospace: gboolean) {. + importc: "gtk_text_view_set_monospace", libprag.} + +proc setMonospace*(self: TextView; monospace: bool) = + gtk_text_view_set_monospace(cast[ptr TextView00](self.impl), gboolean(monospace)) + +proc `monospace=`*(self: TextView; monospace: bool) = + gtk_text_view_set_monospace(cast[ptr TextView00](self.impl), gboolean(monospace)) + +proc gtk_text_view_set_overwrite*(self: ptr TextView00; overwrite: gboolean) {. + importc: "gtk_text_view_set_overwrite", libprag.} + +proc setOverwrite*(self: TextView; overwrite: bool) = + gtk_text_view_set_overwrite(cast[ptr TextView00](self.impl), gboolean(overwrite)) + +proc `overwrite=`*(self: TextView; overwrite: bool) = + gtk_text_view_set_overwrite(cast[ptr TextView00](self.impl), gboolean(overwrite)) + +proc gtk_text_view_set_pixels_above_lines*(self: ptr TextView00; pixelsAboveLines: int32) {. + importc: "gtk_text_view_set_pixels_above_lines", libprag.} + +proc setPixelsAboveLines*(self: TextView; pixelsAboveLines: int) = + gtk_text_view_set_pixels_above_lines(cast[ptr TextView00](self.impl), int32(pixelsAboveLines)) + +proc `pixelsAboveLines=`*(self: TextView; pixelsAboveLines: int) = + gtk_text_view_set_pixels_above_lines(cast[ptr TextView00](self.impl), int32(pixelsAboveLines)) + +proc gtk_text_view_set_pixels_below_lines*(self: ptr TextView00; pixelsBelowLines: int32) {. + importc: "gtk_text_view_set_pixels_below_lines", libprag.} + +proc setPixelsBelowLines*(self: TextView; pixelsBelowLines: int) = + gtk_text_view_set_pixels_below_lines(cast[ptr TextView00](self.impl), int32(pixelsBelowLines)) + +proc `pixelsBelowLines=`*(self: TextView; pixelsBelowLines: int) = + gtk_text_view_set_pixels_below_lines(cast[ptr TextView00](self.impl), int32(pixelsBelowLines)) + +proc gtk_text_view_set_pixels_inside_wrap*(self: ptr TextView00; pixelsInsideWrap: int32) {. + importc: "gtk_text_view_set_pixels_inside_wrap", libprag.} + +proc setPixelsInsideWrap*(self: TextView; pixelsInsideWrap: int) = + gtk_text_view_set_pixels_inside_wrap(cast[ptr TextView00](self.impl), int32(pixelsInsideWrap)) + +proc `pixelsInsideWrap=`*(self: TextView; pixelsInsideWrap: int) = + gtk_text_view_set_pixels_inside_wrap(cast[ptr TextView00](self.impl), int32(pixelsInsideWrap)) + +proc gtk_text_view_set_right_margin*(self: ptr TextView00; rightMargin: int32) {. + importc: "gtk_text_view_set_right_margin", libprag.} + +proc setRightMargin*(self: TextView; rightMargin: int) = + gtk_text_view_set_right_margin(cast[ptr TextView00](self.impl), int32(rightMargin)) + +proc `rightMargin=`*(self: TextView; rightMargin: int) = + gtk_text_view_set_right_margin(cast[ptr TextView00](self.impl), int32(rightMargin)) + +proc gtk_text_view_set_tabs*(self: ptr TextView00; tabs: ptr pango.TabArray00) {. + importc: "gtk_text_view_set_tabs", libprag.} + +proc setTabs*(self: TextView; tabs: pango.TabArray) = + gtk_text_view_set_tabs(cast[ptr TextView00](self.impl), cast[ptr pango.TabArray00](tabs.impl)) + +proc `tabs=`*(self: TextView; tabs: pango.TabArray) = + gtk_text_view_set_tabs(cast[ptr TextView00](self.impl), cast[ptr pango.TabArray00](tabs.impl)) + +proc gtk_text_view_set_top_margin*(self: ptr TextView00; topMargin: int32) {. + importc: "gtk_text_view_set_top_margin", libprag.} + +proc setTopMargin*(self: TextView; topMargin: int) = + gtk_text_view_set_top_margin(cast[ptr TextView00](self.impl), int32(topMargin)) + +proc `topMargin=`*(self: TextView; topMargin: int) = + gtk_text_view_set_top_margin(cast[ptr TextView00](self.impl), int32(topMargin)) + +proc gtk_text_view_set_wrap_mode*(self: ptr TextView00; wrapMode: WrapMode) {. + importc: "gtk_text_view_set_wrap_mode", libprag.} + +proc setWrapMode*(self: TextView; wrapMode: WrapMode) = + gtk_text_view_set_wrap_mode(cast[ptr TextView00](self.impl), wrapMode) + +proc `wrapMode=`*(self: TextView; wrapMode: WrapMode) = + gtk_text_view_set_wrap_mode(cast[ptr TextView00](self.impl), wrapMode) + +proc gtk_text_view_starts_display_line*(self: ptr TextView00; iter: ptr TextIter00): gboolean {. + importc: "gtk_text_view_starts_display_line", libprag.} + +proc startsDisplayLine*(self: TextView; iter: TextIter): bool = + toBool(gtk_text_view_starts_display_line(cast[ptr TextView00](self.impl), cast[ptr TextIter00](iter.impl))) + +type + TextWindowType* {.size: sizeof(cint), pure.} = enum + private = 0 + widget = 1 + text = 2 + left = 3 + right = 4 + top = 5 + bottom = 6 + +proc gtk_text_view_add_child_in_window*(self: ptr TextView00; child: ptr Widget00; whichWindow: TextWindowType; + xpos: int32; ypos: int32) {. + importc: "gtk_text_view_add_child_in_window", libprag.} + +proc addChildInWindow*(self: TextView; child: Widget; whichWindow: TextWindowType; + xpos: int; ypos: int) = + gtk_text_view_add_child_in_window(cast[ptr TextView00](self.impl), cast[ptr Widget00](child.impl), whichWindow, int32(xpos), int32(ypos)) + +proc gtk_text_view_buffer_to_window_coords*(self: ptr TextView00; win: TextWindowType; bufferX: int32; + bufferY: int32; windowX: var int32; windowY: var int32) {. + importc: "gtk_text_view_buffer_to_window_coords", libprag.} + +proc bufferToWindowCoords*(self: TextView; win: TextWindowType; bufferX: int; + bufferY: int; windowX: var int; windowY: var int) = + var windowY_00 = int32(windowY) + var windowX_00 = int32(windowX) + gtk_text_view_buffer_to_window_coords(cast[ptr TextView00](self.impl), win, int32(bufferX), int32(bufferY), windowX_00, windowY_00) + windowY = int(windowY_00) + windowX = int(windowX_00) + +proc gtk_text_view_get_border_window_size*(self: ptr TextView00; `type`: TextWindowType): int32 {. + importc: "gtk_text_view_get_border_window_size", libprag.} + +proc getBorderWindowSize*(self: TextView; `type`: TextWindowType): int = + int(gtk_text_view_get_border_window_size(cast[ptr TextView00](self.impl), `type`)) + +proc borderWindowSize*(self: TextView; `type`: TextWindowType): int = + int(gtk_text_view_get_border_window_size(cast[ptr TextView00](self.impl), `type`)) + +proc gtk_text_view_get_window*(self: ptr TextView00; win: TextWindowType): ptr gdk.Window00 {. + importc: "gtk_text_view_get_window", libprag.} + +proc getWindow*(self: TextView; win: TextWindowType): gdk.Window = + let gobj = gtk_text_view_get_window(cast[ptr TextView00](self.impl), win) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc window*(self: TextView; win: TextWindowType): gdk.Window = + let gobj = gtk_text_view_get_window(cast[ptr TextView00](self.impl), win) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_text_view_get_window_type*(self: ptr TextView00; window: ptr gdk.Window00): TextWindowType {. + importc: "gtk_text_view_get_window_type", libprag.} + +proc getWindowType*(self: TextView; window: gdk.Window): TextWindowType = + gtk_text_view_get_window_type(cast[ptr TextView00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc windowType*(self: TextView; window: gdk.Window): TextWindowType = + gtk_text_view_get_window_type(cast[ptr TextView00](self.impl), cast[ptr gdk.Window00](window.impl)) + +proc gtk_text_view_set_border_window_size*(self: ptr TextView00; `type`: TextWindowType; size: int32) {. + importc: "gtk_text_view_set_border_window_size", libprag.} + +proc setBorderWindowSize*(self: TextView; `type`: TextWindowType; size: int) = + gtk_text_view_set_border_window_size(cast[ptr TextView00](self.impl), `type`, int32(size)) + +proc gtk_text_view_window_to_buffer_coords*(self: ptr TextView00; win: TextWindowType; windowX: int32; + windowY: int32; bufferX: var int32; bufferY: var int32) {. + importc: "gtk_text_view_window_to_buffer_coords", libprag.} + +proc windowToBufferCoords*(self: TextView; win: TextWindowType; windowX: int; + windowY: int; bufferX: var int; bufferY: var int) = + var bufferY_00 = int32(bufferY) + var bufferX_00 = int32(bufferX) + gtk_text_view_window_to_buffer_coords(cast[ptr TextView00](self.impl), win, int32(windowX), int32(windowY), bufferX_00, bufferY_00) + bufferY = int(bufferY_00) + bufferX = int(bufferX_00) + +type + TextViewAccessiblePrivate00* {.pure.} = object + TextViewAccessiblePrivate* = ref object + impl*: ptr TextViewAccessiblePrivate00 + +type + TextViewAccessible* = ref object of ContainerAccessible + TextViewAccessible00* = object of ContainerAccessible00 + priv4: ptr TextViewAccessiblePrivate00 + +type + TextViewAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + TextViewAccessibleClass* = ref object + impl*: ptr TextViewAccessibleClass00 + +type + TextViewLayer* {.size: sizeof(cint), pure.} = enum + below = 0 + above = 1 + belowText = 2 + aboveText = 3 + +type + TextViewClass00* {.pure.} = object + parentClass*: ContainerClass00 + populatePopup*: proc(textView: ptr TextView00; popup: ptr Widget00) {.cdecl.} + moveCursor*: proc(textView: ptr TextView00; step: MovementStep; count: int32; + extendSelection: gboolean) {.cdecl.} + setAnchor*: proc(textView: ptr TextView00) {.cdecl.} + insertAtCursor*: proc(textView: ptr TextView00; str: cstring) {.cdecl.} + deleteFromCursor*: proc(textView: ptr TextView00; `type`: DeleteType; count: int32) {.cdecl.} + backspace*: proc(textView: ptr TextView00) {.cdecl.} + cutClipboard*: proc(textView: ptr TextView00) {.cdecl.} + copyClipboard*: proc(textView: ptr TextView00) {.cdecl.} + pasteClipboard*: proc(textView: ptr TextView00) {.cdecl.} + toggleOverwrite*: proc(textView: ptr TextView00) {.cdecl.} + createBuffer*: pointer + drawLayer*: proc(textView: ptr TextView00; layer: TextViewLayer; cr: ptr cairo.Context00) {.cdecl.} + extendSelection*: proc(textView: ptr TextView00; granularity: TextExtendSelection; + location: ptr TextIter00; start: ptr TextIter00; `end`: ptr TextIter00): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + TextViewClass* = ref object + impl*: ptr TextViewClass00 + +type + ThemeEngine00* {.pure.} = object + ThemeEngine* = ref object + impl*: ptr ThemeEngine00 + +type + ThemingEnginePrivate00* {.pure.} = object + ThemingEnginePrivate* = ref object + impl*: ptr ThemingEnginePrivate00 + +type + ThemingEngine* = ref object of gobject.Object + ThemingEngine00* = object of gobject.Object00 + priv1: ptr ThemingEnginePrivate00 + +proc gtk_theming_engine_load*(name: cstring): ptr ThemingEngine00 {. + importc: "gtk_theming_engine_load", libprag.} + +proc load*(name: string): ThemingEngine = + let gobj = gtk_theming_engine_load(cstring(name)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ThemingEngine](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_theming_engine_get_background_color*(self: ptr ThemingEngine00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_theming_engine_get_background_color", libprag.} + +proc getBackgroundColor*(self: ptr ThemingEngine00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_theming_engine_get_background_color", libprag.} + +proc backgroundColor*(self: ptr ThemingEngine00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_theming_engine_get_background_color", libprag.} + +proc gtk_theming_engine_get_border*(self: ptr ThemingEngine00; state: StateFlags; border: var Border00) {. + importc: "gtk_theming_engine_get_border", libprag.} + +proc getBorder*(self: ptr ThemingEngine00; state: StateFlags; border: var Border00) {. + importc: "gtk_theming_engine_get_border", libprag.} + +proc border*(self: ptr ThemingEngine00; state: StateFlags; border: var Border00) {. + importc: "gtk_theming_engine_get_border", libprag.} + +proc gtk_theming_engine_get_border_color*(self: ptr ThemingEngine00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_theming_engine_get_border_color", libprag.} + +proc getBorderColor*(self: ptr ThemingEngine00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_theming_engine_get_border_color", libprag.} + +proc borderColor*(self: ptr ThemingEngine00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_theming_engine_get_border_color", libprag.} + +proc gtk_theming_engine_get_color*(self: ptr ThemingEngine00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_theming_engine_get_color", libprag.} + +proc getColor*(self: ptr ThemingEngine00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_theming_engine_get_color", libprag.} + +proc color*(self: ptr ThemingEngine00; state: StateFlags; color: var gdk.RGBA00) {. + importc: "gtk_theming_engine_get_color", libprag.} + +proc gtk_theming_engine_get_direction*(self: ptr ThemingEngine00): TextDirection {. + importc: "gtk_theming_engine_get_direction", libprag.} + +proc getDirection*(self: ThemingEngine): TextDirection = + gtk_theming_engine_get_direction(cast[ptr ThemingEngine00](self.impl)) + +proc direction*(self: ThemingEngine): TextDirection = + gtk_theming_engine_get_direction(cast[ptr ThemingEngine00](self.impl)) + +proc gtk_theming_engine_get_font*(self: ptr ThemingEngine00; state: StateFlags): ptr pango.FontDescription00 {. + importc: "gtk_theming_engine_get_font", libprag.} + +proc getFont*(self: ThemingEngine; state: StateFlags): pango.FontDescription = + new(result) + result.impl = gtk_theming_engine_get_font(cast[ptr ThemingEngine00](self.impl), state) + +proc font*(self: ThemingEngine; state: StateFlags): pango.FontDescription = + new(result) + result.impl = gtk_theming_engine_get_font(cast[ptr ThemingEngine00](self.impl), state) + +proc gtk_theming_engine_get_junction_sides*(self: ptr ThemingEngine00): JunctionSides {. + importc: "gtk_theming_engine_get_junction_sides", libprag.} + +proc getJunctionSides*(self: ThemingEngine): JunctionSides = + gtk_theming_engine_get_junction_sides(cast[ptr ThemingEngine00](self.impl)) + +proc junctionSides*(self: ThemingEngine): JunctionSides = + gtk_theming_engine_get_junction_sides(cast[ptr ThemingEngine00](self.impl)) + +proc gtk_theming_engine_get_margin*(self: ptr ThemingEngine00; state: StateFlags; margin: var Border00) {. + importc: "gtk_theming_engine_get_margin", libprag.} + +proc getMargin*(self: ptr ThemingEngine00; state: StateFlags; margin: var Border00) {. + importc: "gtk_theming_engine_get_margin", libprag.} + +proc margin*(self: ptr ThemingEngine00; state: StateFlags; margin: var Border00) {. + importc: "gtk_theming_engine_get_margin", libprag.} + +proc gtk_theming_engine_get_padding*(self: ptr ThemingEngine00; state: StateFlags; padding: var Border00) {. + importc: "gtk_theming_engine_get_padding", libprag.} + +proc getPadding*(self: ptr ThemingEngine00; state: StateFlags; padding: var Border00) {. + importc: "gtk_theming_engine_get_padding", libprag.} + +proc padding*(self: ptr ThemingEngine00; state: StateFlags; padding: var Border00) {. + importc: "gtk_theming_engine_get_padding", libprag.} + +proc gtk_theming_engine_get_path*(self: ptr ThemingEngine00): ptr WidgetPath00 {. + importc: "gtk_theming_engine_get_path", libprag.} + +proc getPath*(self: ThemingEngine): WidgetPath = + new(result) + result.impl = gtk_theming_engine_get_path(cast[ptr ThemingEngine00](self.impl)) + +proc path*(self: ThemingEngine): WidgetPath = + new(result) + result.impl = gtk_theming_engine_get_path(cast[ptr ThemingEngine00](self.impl)) + +proc gtk_theming_engine_get_property*(self: ptr ThemingEngine00; property: cstring; state: StateFlags; + value: var gobject.Value00) {. + importc: "gtk_theming_engine_get_property", libprag.} + +proc getProperty*(self: ptr ThemingEngine00; property: cstring; state: StateFlags; + value: var gobject.Value00) {. + importc: "gtk_theming_engine_get_property", libprag.} + +proc property*(self: ptr ThemingEngine00; property: cstring; state: StateFlags; + value: var gobject.Value00) {. + importc: "gtk_theming_engine_get_property", libprag.} + +proc gtk_theming_engine_get_screen*(self: ptr ThemingEngine00): ptr gdk.Screen00 {. + importc: "gtk_theming_engine_get_screen", libprag.} + +proc getScreen*(self: ThemingEngine): gdk.Screen = + let gobj = gtk_theming_engine_get_screen(cast[ptr ThemingEngine00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc screen*(self: ThemingEngine): gdk.Screen = + let gobj = gtk_theming_engine_get_screen(cast[ptr ThemingEngine00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Screen](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_theming_engine_get_state*(self: ptr ThemingEngine00): StateFlags {. + importc: "gtk_theming_engine_get_state", libprag.} + +proc getState*(self: ThemingEngine): StateFlags = + gtk_theming_engine_get_state(cast[ptr ThemingEngine00](self.impl)) + +proc state*(self: ThemingEngine): StateFlags = + gtk_theming_engine_get_state(cast[ptr ThemingEngine00](self.impl)) + +proc gtk_theming_engine_get_style_property*(self: ptr ThemingEngine00; propertyName: cstring; + value: var gobject.Value00) {. + importc: "gtk_theming_engine_get_style_property", libprag.} + +proc getStyleProperty*(self: ptr ThemingEngine00; propertyName: cstring; + value: var gobject.Value00) {. + importc: "gtk_theming_engine_get_style_property", libprag.} + +proc styleProperty*(self: ptr ThemingEngine00; propertyName: cstring; + value: var gobject.Value00) {. + importc: "gtk_theming_engine_get_style_property", libprag.} + +proc gtk_theming_engine_has_class*(self: ptr ThemingEngine00; styleClass: cstring): gboolean {. + importc: "gtk_theming_engine_has_class", libprag.} + +proc hasClass*(self: ThemingEngine; styleClass: string): bool = + toBool(gtk_theming_engine_has_class(cast[ptr ThemingEngine00](self.impl), cstring(styleClass))) + +proc gtk_theming_engine_has_region*(self: ptr ThemingEngine00; styleRegion: cstring; flags: var RegionFlags): gboolean {. + importc: "gtk_theming_engine_has_region", libprag.} + +proc hasRegion*(self: ThemingEngine; styleRegion: string; flags: var RegionFlags): bool = + toBool(gtk_theming_engine_has_region(cast[ptr ThemingEngine00](self.impl), cstring(styleRegion), flags)) + +proc gtk_theming_engine_lookup_color*(self: ptr ThemingEngine00; colorName: cstring; color: var gdk.RGBA00): gboolean {. + importc: "gtk_theming_engine_lookup_color", libprag.} + +proc lookupColor*(self: ptr ThemingEngine00; colorName: cstring; color: var gdk.RGBA00): gboolean {. + importc: "gtk_theming_engine_lookup_color", libprag.} + +proc gtk_theming_engine_state_is_running*(self: ptr ThemingEngine00; state: StateType; progress: var cdouble): gboolean {. + importc: "gtk_theming_engine_state_is_running", libprag.} + +proc stateIsRunning*(self: ThemingEngine; state: StateType; progress: var cdouble): bool = + toBool(gtk_theming_engine_state_is_running(cast[ptr ThemingEngine00](self.impl), state, progress)) + +type + ThemingEngineClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + renderLine*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x0: cdouble; y0: cdouble; x1: cdouble; y1: cdouble) {.cdecl.} + renderBackground*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {.cdecl.} + renderFrame*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {.cdecl.} + renderFrameGap*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble; gapSide: PositionType; xy0Gap: cdouble; + xy1Gap: cdouble) {.cdecl.} + renderExtension*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble; gapSide: PositionType) {.cdecl.} + renderCheck*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {.cdecl.} + renderOption*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {.cdecl.} + renderArrow*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + angle: cdouble; x: cdouble; y: cdouble; size: cdouble) {.cdecl.} + renderExpander*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {.cdecl.} + renderFocus*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {.cdecl.} + renderLayout*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; layout: ptr pango.Layout00) {.cdecl.} + renderSlider*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble; orientation: Orientation) {.cdecl.} + renderHandle*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {.cdecl.} + renderActivity*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {.cdecl.} + renderIconPixbuf*: pointer + renderIcon*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + pixbuf: ptr gdkpixbuf.Pixbuf00; x: cdouble; y: cdouble) {.cdecl.} + renderIconSurface*: proc(engine: ptr ThemingEngine00; cr: ptr cairo.Context00; + surface: ptr cairo.Surface00; x: cdouble; y: cdouble) {.cdecl.} + padding*: array[14, pointer] + ThemingEngineClass* = ref object + impl*: ptr ThemingEngineClass00 + +type + TickCallback* = proc (widget: ptr Widget00; frameClock: ptr gdk.FrameClock00; + userData: pointer): gboolean {.cdecl.} + +proc gtk_widget_add_tick_callback*(self: ptr Widget00; callback: TickCallback; userData: pointer; + notify: DestroyNotify): uint32 {. + importc: "gtk_widget_add_tick_callback", libprag.} + +proc addTickCallback*(self: Widget; callback: TickCallback; userData: pointer; + notify: DestroyNotify): int = + int(gtk_widget_add_tick_callback(cast[ptr Widget00](self.impl), callback, userData, notify)) + +type + ToggleActionEntry00* {.pure.} = object + name*: cstring + stockId*: cstring + label*: cstring + accelerator*: cstring + tooltip*: cstring + callback*: Callback + isActive*: gboolean + ToggleActionEntry* = ref object + impl*: ptr ToggleActionEntry00 + +type + ToolItemGroupPrivate00* {.pure.} = object + ToolItemGroupPrivate* = ref object + impl*: ptr ToolItemGroupPrivate00 + +type + ToolItemGroup* = ref object of Container + ToolItemGroup00* = object of Container00 + priv3: ptr ToolItemGroupPrivate00 + +proc gtk_tool_item_group_new*(label: cstring): ptr ToolItemGroup00 {. + importc: "gtk_tool_item_group_new", libprag.} + +proc newToolItemGroup*(label: string): ToolItemGroup = + new(result, finalizeGObject) + result.impl = gtk_tool_item_group_new(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToolItemGroup*[T](result: var T; label: string) = + assert(result is ToolItemGroup) + new(result, finalizeGObject) + result.impl = gtk_tool_item_group_new(cstring(label)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_item_group_get_collapsed*(self: ptr ToolItemGroup00): gboolean {. + importc: "gtk_tool_item_group_get_collapsed", libprag.} + +proc getCollapsed*(self: ToolItemGroup): bool = + toBool(gtk_tool_item_group_get_collapsed(cast[ptr ToolItemGroup00](self.impl))) + +proc collapsed*(self: ToolItemGroup): bool = + toBool(gtk_tool_item_group_get_collapsed(cast[ptr ToolItemGroup00](self.impl))) + +proc gtk_tool_item_group_get_drop_item*(self: ptr ToolItemGroup00; x: int32; y: int32): ptr ToolItem00 {. + importc: "gtk_tool_item_group_get_drop_item", libprag.} + +proc getDropItem*(self: ToolItemGroup; x: int; y: int): ToolItem = + let gobj = gtk_tool_item_group_get_drop_item(cast[ptr ToolItemGroup00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItem](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc dropItem*(self: ToolItemGroup; x: int; y: int): ToolItem = + let gobj = gtk_tool_item_group_get_drop_item(cast[ptr ToolItemGroup00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItem](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_item_group_get_ellipsize*(self: ptr ToolItemGroup00): pango.EllipsizeMode {. + importc: "gtk_tool_item_group_get_ellipsize", libprag.} + +proc getEllipsize*(self: ToolItemGroup): pango.EllipsizeMode = + gtk_tool_item_group_get_ellipsize(cast[ptr ToolItemGroup00](self.impl)) + +proc ellipsize*(self: ToolItemGroup): pango.EllipsizeMode = + gtk_tool_item_group_get_ellipsize(cast[ptr ToolItemGroup00](self.impl)) + +proc gtk_tool_item_group_get_header_relief*(self: ptr ToolItemGroup00): ReliefStyle {. + importc: "gtk_tool_item_group_get_header_relief", libprag.} + +proc getHeaderRelief*(self: ToolItemGroup): ReliefStyle = + gtk_tool_item_group_get_header_relief(cast[ptr ToolItemGroup00](self.impl)) + +proc headerRelief*(self: ToolItemGroup): ReliefStyle = + gtk_tool_item_group_get_header_relief(cast[ptr ToolItemGroup00](self.impl)) + +proc gtk_tool_item_group_get_item_position*(self: ptr ToolItemGroup00; item: ptr ToolItem00): int32 {. + importc: "gtk_tool_item_group_get_item_position", libprag.} + +proc getItemPosition*(self: ToolItemGroup; item: ToolItem): int = + int(gtk_tool_item_group_get_item_position(cast[ptr ToolItemGroup00](self.impl), cast[ptr ToolItem00](item.impl))) + +proc itemPosition*(self: ToolItemGroup; item: ToolItem): int = + int(gtk_tool_item_group_get_item_position(cast[ptr ToolItemGroup00](self.impl), cast[ptr ToolItem00](item.impl))) + +proc gtk_tool_item_group_get_label*(self: ptr ToolItemGroup00): cstring {. + importc: "gtk_tool_item_group_get_label", libprag.} + +proc getLabel*(self: ToolItemGroup): string = + let resul0 = gtk_tool_item_group_get_label(cast[ptr ToolItemGroup00](self.impl)) + result = $resul0 + +proc label*(self: ToolItemGroup): string = + let resul0 = gtk_tool_item_group_get_label(cast[ptr ToolItemGroup00](self.impl)) + result = $resul0 + +proc gtk_tool_item_group_get_label_widget*(self: ptr ToolItemGroup00): ptr Widget00 {. + importc: "gtk_tool_item_group_get_label_widget", libprag.} + +proc getLabelWidget*(self: ToolItemGroup): Widget = + let gobj = gtk_tool_item_group_get_label_widget(cast[ptr ToolItemGroup00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc labelWidget*(self: ToolItemGroup): Widget = + let gobj = gtk_tool_item_group_get_label_widget(cast[ptr ToolItemGroup00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_item_group_get_n_items*(self: ptr ToolItemGroup00): uint32 {. + importc: "gtk_tool_item_group_get_n_items", libprag.} + +proc getNItems*(self: ToolItemGroup): int = + int(gtk_tool_item_group_get_n_items(cast[ptr ToolItemGroup00](self.impl))) + +proc nItems*(self: ToolItemGroup): int = + int(gtk_tool_item_group_get_n_items(cast[ptr ToolItemGroup00](self.impl))) + +proc gtk_tool_item_group_get_nth_item*(self: ptr ToolItemGroup00; index: uint32): ptr ToolItem00 {. + importc: "gtk_tool_item_group_get_nth_item", libprag.} + +proc getNthItem*(self: ToolItemGroup; index: int): ToolItem = + let gobj = gtk_tool_item_group_get_nth_item(cast[ptr ToolItemGroup00](self.impl), uint32(index)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItem](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc nthItem*(self: ToolItemGroup; index: int): ToolItem = + let gobj = gtk_tool_item_group_get_nth_item(cast[ptr ToolItemGroup00](self.impl), uint32(index)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItem](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_item_group_insert*(self: ptr ToolItemGroup00; item: ptr ToolItem00; position: int32) {. + importc: "gtk_tool_item_group_insert", libprag.} + +proc insert*(self: ToolItemGroup; item: ToolItem; position: int) = + gtk_tool_item_group_insert(cast[ptr ToolItemGroup00](self.impl), cast[ptr ToolItem00](item.impl), int32(position)) + +proc gtk_tool_item_group_set_collapsed*(self: ptr ToolItemGroup00; collapsed: gboolean) {. + importc: "gtk_tool_item_group_set_collapsed", libprag.} + +proc setCollapsed*(self: ToolItemGroup; collapsed: bool) = + gtk_tool_item_group_set_collapsed(cast[ptr ToolItemGroup00](self.impl), gboolean(collapsed)) + +proc `collapsed=`*(self: ToolItemGroup; collapsed: bool) = + gtk_tool_item_group_set_collapsed(cast[ptr ToolItemGroup00](self.impl), gboolean(collapsed)) + +proc gtk_tool_item_group_set_ellipsize*(self: ptr ToolItemGroup00; ellipsize: pango.EllipsizeMode) {. + importc: "gtk_tool_item_group_set_ellipsize", libprag.} + +proc setEllipsize*(self: ToolItemGroup; ellipsize: pango.EllipsizeMode) = + gtk_tool_item_group_set_ellipsize(cast[ptr ToolItemGroup00](self.impl), ellipsize) + +proc `ellipsize=`*(self: ToolItemGroup; ellipsize: pango.EllipsizeMode) = + gtk_tool_item_group_set_ellipsize(cast[ptr ToolItemGroup00](self.impl), ellipsize) + +proc gtk_tool_item_group_set_header_relief*(self: ptr ToolItemGroup00; style: ReliefStyle) {. + importc: "gtk_tool_item_group_set_header_relief", libprag.} + +proc setHeaderRelief*(self: ToolItemGroup; style: ReliefStyle) = + gtk_tool_item_group_set_header_relief(cast[ptr ToolItemGroup00](self.impl), style) + +proc `headerRelief=`*(self: ToolItemGroup; style: ReliefStyle) = + gtk_tool_item_group_set_header_relief(cast[ptr ToolItemGroup00](self.impl), style) + +proc gtk_tool_item_group_set_item_position*(self: ptr ToolItemGroup00; item: ptr ToolItem00; position: int32) {. + importc: "gtk_tool_item_group_set_item_position", libprag.} + +proc setItemPosition*(self: ToolItemGroup; item: ToolItem; position: int) = + gtk_tool_item_group_set_item_position(cast[ptr ToolItemGroup00](self.impl), cast[ptr ToolItem00](item.impl), int32(position)) + +proc gtk_tool_item_group_set_label*(self: ptr ToolItemGroup00; label: cstring) {. + importc: "gtk_tool_item_group_set_label", libprag.} + +proc setLabel*(self: ToolItemGroup; label: string) = + gtk_tool_item_group_set_label(cast[ptr ToolItemGroup00](self.impl), cstring(label)) + +proc `label=`*(self: ToolItemGroup; label: string) = + gtk_tool_item_group_set_label(cast[ptr ToolItemGroup00](self.impl), cstring(label)) + +proc gtk_tool_item_group_set_label_widget*(self: ptr ToolItemGroup00; labelWidget: ptr Widget00) {. + importc: "gtk_tool_item_group_set_label_widget", libprag.} + +proc setLabelWidget*(self: ToolItemGroup; labelWidget: Widget) = + gtk_tool_item_group_set_label_widget(cast[ptr ToolItemGroup00](self.impl), cast[ptr Widget00](labelWidget.impl)) + +proc `labelWidget=`*(self: ToolItemGroup; labelWidget: Widget) = + gtk_tool_item_group_set_label_widget(cast[ptr ToolItemGroup00](self.impl), cast[ptr Widget00](labelWidget.impl)) + +type + ToolItemGroupClass00* {.pure.} = object + parentClass*: ContainerClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ToolItemGroupClass* = ref object + impl*: ptr ToolItemGroupClass00 + +type + ToolPalettePrivate00* {.pure.} = object + ToolPalettePrivate* = ref object + impl*: ptr ToolPalettePrivate00 + +type + ToolPalette* = ref object of Container + ToolPalette00* = object of Container00 + priv3: ptr ToolPalettePrivate00 + +proc gtk_tool_palette_new*(): ptr ToolPalette00 {. + importc: "gtk_tool_palette_new", libprag.} + +proc newToolPalette*(): ToolPalette = + new(result, finalizeGObject) + result.impl = gtk_tool_palette_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToolPalette*[T](result: var T) = + assert(result is ToolPalette) + new(result, finalizeGObject) + result.impl = gtk_tool_palette_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_palette_get_drag_target_group*(): ptr TargetEntry00 {. + importc: "gtk_tool_palette_get_drag_target_group", libprag.} + +proc getDragTargetGroup*(): TargetEntry = + new(result) + result.impl = gtk_tool_palette_get_drag_target_group() + +proc dragTargetGroup*(): TargetEntry = + new(result) + result.impl = gtk_tool_palette_get_drag_target_group() + +proc gtk_tool_palette_get_drag_target_item*(): ptr TargetEntry00 {. + importc: "gtk_tool_palette_get_drag_target_item", libprag.} + +proc getDragTargetItem*(): TargetEntry = + new(result) + result.impl = gtk_tool_palette_get_drag_target_item() + +proc dragTargetItem*(): TargetEntry = + new(result) + result.impl = gtk_tool_palette_get_drag_target_item() + +proc gtk_tool_palette_get_drag_item*(self: ptr ToolPalette00; selection: ptr SelectionData00): ptr Widget00 {. + importc: "gtk_tool_palette_get_drag_item", libprag.} + +proc getDragItem*(self: ToolPalette; selection: SelectionData): Widget = + let gobj = gtk_tool_palette_get_drag_item(cast[ptr ToolPalette00](self.impl), cast[ptr SelectionData00](selection.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc dragItem*(self: ToolPalette; selection: SelectionData): Widget = + let gobj = gtk_tool_palette_get_drag_item(cast[ptr ToolPalette00](self.impl), cast[ptr SelectionData00](selection.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_palette_get_drop_group*(self: ptr ToolPalette00; x: int32; y: int32): ptr ToolItemGroup00 {. + importc: "gtk_tool_palette_get_drop_group", libprag.} + +proc getDropGroup*(self: ToolPalette; x: int; y: int): ToolItemGroup = + let gobj = gtk_tool_palette_get_drop_group(cast[ptr ToolPalette00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItemGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc dropGroup*(self: ToolPalette; x: int; y: int): ToolItemGroup = + let gobj = gtk_tool_palette_get_drop_group(cast[ptr ToolPalette00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItemGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_palette_get_drop_item*(self: ptr ToolPalette00; x: int32; y: int32): ptr ToolItem00 {. + importc: "gtk_tool_palette_get_drop_item", libprag.} + +proc getDropItem*(self: ToolPalette; x: int; y: int): ToolItem = + let gobj = gtk_tool_palette_get_drop_item(cast[ptr ToolPalette00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItem](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc dropItem*(self: ToolPalette; x: int; y: int): ToolItem = + let gobj = gtk_tool_palette_get_drop_item(cast[ptr ToolPalette00](self.impl), int32(x), int32(y)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItem](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_palette_get_exclusive*(self: ptr ToolPalette00; group: ptr ToolItemGroup00): gboolean {. + importc: "gtk_tool_palette_get_exclusive", libprag.} + +proc getExclusive*(self: ToolPalette; group: ToolItemGroup): bool = + toBool(gtk_tool_palette_get_exclusive(cast[ptr ToolPalette00](self.impl), cast[ptr ToolItemGroup00](group.impl))) + +proc exclusive*(self: ToolPalette; group: ToolItemGroup): bool = + toBool(gtk_tool_palette_get_exclusive(cast[ptr ToolPalette00](self.impl), cast[ptr ToolItemGroup00](group.impl))) + +proc gtk_tool_palette_get_expand*(self: ptr ToolPalette00; group: ptr ToolItemGroup00): gboolean {. + importc: "gtk_tool_palette_get_expand", libprag.} + +proc getExpand*(self: ToolPalette; group: ToolItemGroup): bool = + toBool(gtk_tool_palette_get_expand(cast[ptr ToolPalette00](self.impl), cast[ptr ToolItemGroup00](group.impl))) + +proc expand*(self: ToolPalette; group: ToolItemGroup): bool = + toBool(gtk_tool_palette_get_expand(cast[ptr ToolPalette00](self.impl), cast[ptr ToolItemGroup00](group.impl))) + +proc gtk_tool_palette_get_group_position*(self: ptr ToolPalette00; group: ptr ToolItemGroup00): int32 {. + importc: "gtk_tool_palette_get_group_position", libprag.} + +proc getGroupPosition*(self: ToolPalette; group: ToolItemGroup): int = + int(gtk_tool_palette_get_group_position(cast[ptr ToolPalette00](self.impl), cast[ptr ToolItemGroup00](group.impl))) + +proc groupPosition*(self: ToolPalette; group: ToolItemGroup): int = + int(gtk_tool_palette_get_group_position(cast[ptr ToolPalette00](self.impl), cast[ptr ToolItemGroup00](group.impl))) + +proc gtk_tool_palette_get_hadjustment*(self: ptr ToolPalette00): ptr Adjustment00 {. + importc: "gtk_tool_palette_get_hadjustment", libprag.} + +proc getHadjustment*(self: ToolPalette): Adjustment = + let gobj = gtk_tool_palette_get_hadjustment(cast[ptr ToolPalette00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc hadjustment*(self: ToolPalette): Adjustment = + let gobj = gtk_tool_palette_get_hadjustment(cast[ptr ToolPalette00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_palette_get_icon_size*(self: ptr ToolPalette00): int32 {. + importc: "gtk_tool_palette_get_icon_size", libprag.} + +proc getIconSize*(self: ToolPalette): int = + int(gtk_tool_palette_get_icon_size(cast[ptr ToolPalette00](self.impl))) + +proc iconSize*(self: ToolPalette): int = + int(gtk_tool_palette_get_icon_size(cast[ptr ToolPalette00](self.impl))) + +proc gtk_tool_palette_get_style*(self: ptr ToolPalette00): ToolbarStyle {. + importc: "gtk_tool_palette_get_style", libprag.} + +proc getStyle*(self: ToolPalette): ToolbarStyle = + gtk_tool_palette_get_style(cast[ptr ToolPalette00](self.impl)) + +proc style*(self: ToolPalette): ToolbarStyle = + gtk_tool_palette_get_style(cast[ptr ToolPalette00](self.impl)) + +proc gtk_tool_palette_get_vadjustment*(self: ptr ToolPalette00): ptr Adjustment00 {. + importc: "gtk_tool_palette_get_vadjustment", libprag.} + +proc getVadjustment*(self: ToolPalette): Adjustment = + let gobj = gtk_tool_palette_get_vadjustment(cast[ptr ToolPalette00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc vadjustment*(self: ToolPalette): Adjustment = + let gobj = gtk_tool_palette_get_vadjustment(cast[ptr ToolPalette00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_palette_set_exclusive*(self: ptr ToolPalette00; group: ptr ToolItemGroup00; + exclusive: gboolean) {. + importc: "gtk_tool_palette_set_exclusive", libprag.} + +proc setExclusive*(self: ToolPalette; group: ToolItemGroup; exclusive: bool) = + gtk_tool_palette_set_exclusive(cast[ptr ToolPalette00](self.impl), cast[ptr ToolItemGroup00](group.impl), gboolean(exclusive)) + +proc gtk_tool_palette_set_expand*(self: ptr ToolPalette00; group: ptr ToolItemGroup00; + expand: gboolean) {. + importc: "gtk_tool_palette_set_expand", libprag.} + +proc setExpand*(self: ToolPalette; group: ToolItemGroup; expand: bool) = + gtk_tool_palette_set_expand(cast[ptr ToolPalette00](self.impl), cast[ptr ToolItemGroup00](group.impl), gboolean(expand)) + +proc gtk_tool_palette_set_group_position*(self: ptr ToolPalette00; group: ptr ToolItemGroup00; + position: int32) {. + importc: "gtk_tool_palette_set_group_position", libprag.} + +proc setGroupPosition*(self: ToolPalette; group: ToolItemGroup; position: int) = + gtk_tool_palette_set_group_position(cast[ptr ToolPalette00](self.impl), cast[ptr ToolItemGroup00](group.impl), int32(position)) + +proc gtk_tool_palette_set_icon_size*(self: ptr ToolPalette00; iconSize: int32) {. + importc: "gtk_tool_palette_set_icon_size", libprag.} + +proc setIconSize*(self: ToolPalette; iconSize: int) = + gtk_tool_palette_set_icon_size(cast[ptr ToolPalette00](self.impl), int32(iconSize)) + +proc `iconSize=`*(self: ToolPalette; iconSize: int) = + gtk_tool_palette_set_icon_size(cast[ptr ToolPalette00](self.impl), int32(iconSize)) + +proc gtk_tool_palette_set_style*(self: ptr ToolPalette00; style: ToolbarStyle) {. + importc: "gtk_tool_palette_set_style", libprag.} + +proc setStyle*(self: ToolPalette; style: ToolbarStyle) = + gtk_tool_palette_set_style(cast[ptr ToolPalette00](self.impl), style) + +proc `style=`*(self: ToolPalette; style: ToolbarStyle) = + gtk_tool_palette_set_style(cast[ptr ToolPalette00](self.impl), style) + +proc gtk_tool_palette_unset_icon_size*(self: ptr ToolPalette00) {. + importc: "gtk_tool_palette_unset_icon_size", libprag.} + +proc unsetIconSize*(self: ToolPalette) = + gtk_tool_palette_unset_icon_size(cast[ptr ToolPalette00](self.impl)) + +proc gtk_tool_palette_unset_style*(self: ptr ToolPalette00) {. + importc: "gtk_tool_palette_unset_style", libprag.} + +proc unsetStyle*(self: ToolPalette) = + gtk_tool_palette_unset_style(cast[ptr ToolPalette00](self.impl)) + +type + ToolPaletteDragTargets* {.size: sizeof(cint), pure.} = enum + items = 1 + groups = 2 + +proc gtk_tool_palette_add_drag_dest*(self: ptr ToolPalette00; widget: ptr Widget00; flags: DestDefaults; + targets: ToolPaletteDragTargets; actions: gdk.DragAction) {. + importc: "gtk_tool_palette_add_drag_dest", libprag.} + +proc addDragDest*(self: ToolPalette; widget: Widget; flags: DestDefaults; + targets: ToolPaletteDragTargets; actions: gdk.DragAction) = + gtk_tool_palette_add_drag_dest(cast[ptr ToolPalette00](self.impl), cast[ptr Widget00](widget.impl), flags, targets, actions) + +proc gtk_tool_palette_set_drag_source*(self: ptr ToolPalette00; targets: ToolPaletteDragTargets) {. + importc: "gtk_tool_palette_set_drag_source", libprag.} + +proc setDragSource*(self: ToolPalette; targets: ToolPaletteDragTargets) = + gtk_tool_palette_set_drag_source(cast[ptr ToolPalette00](self.impl), targets) + +proc `dragSource=`*(self: ToolPalette; targets: ToolPaletteDragTargets) = + gtk_tool_palette_set_drag_source(cast[ptr ToolPalette00](self.impl), targets) + +type + ToolPaletteClass00* {.pure.} = object + parentClass*: ContainerClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ToolPaletteClass* = ref object + impl*: ptr ToolPaletteClass00 + +type + ToolShell00* {.pure.} = object + ToolShell* = ref object + impl*: ptr ToolShell00 + +proc gtk_tool_shell_get_ellipsize_mode*(self: ptr ToolShell00): pango.EllipsizeMode {. + importc: "gtk_tool_shell_get_ellipsize_mode", libprag.} + +proc getEllipsizeMode*(self: ToolShell): pango.EllipsizeMode = + gtk_tool_shell_get_ellipsize_mode(cast[ptr ToolShell00](self.impl)) + +proc ellipsizeMode*(self: ToolShell): pango.EllipsizeMode = + gtk_tool_shell_get_ellipsize_mode(cast[ptr ToolShell00](self.impl)) + +proc gtk_tool_shell_get_icon_size*(self: ptr ToolShell00): int32 {. + importc: "gtk_tool_shell_get_icon_size", libprag.} + +proc getIconSize*(self: ToolShell): int = + int(gtk_tool_shell_get_icon_size(cast[ptr ToolShell00](self.impl))) + +proc iconSize*(self: ToolShell): int = + int(gtk_tool_shell_get_icon_size(cast[ptr ToolShell00](self.impl))) + +proc gtk_tool_shell_get_orientation*(self: ptr ToolShell00): Orientation {. + importc: "gtk_tool_shell_get_orientation", libprag.} + +proc getOrientation*(self: ToolShell): Orientation = + gtk_tool_shell_get_orientation(cast[ptr ToolShell00](self.impl)) + +proc orientation*(self: ToolShell): Orientation = + gtk_tool_shell_get_orientation(cast[ptr ToolShell00](self.impl)) + +proc gtk_tool_shell_get_relief_style*(self: ptr ToolShell00): ReliefStyle {. + importc: "gtk_tool_shell_get_relief_style", libprag.} + +proc getReliefStyle*(self: ToolShell): ReliefStyle = + gtk_tool_shell_get_relief_style(cast[ptr ToolShell00](self.impl)) + +proc reliefStyle*(self: ToolShell): ReliefStyle = + gtk_tool_shell_get_relief_style(cast[ptr ToolShell00](self.impl)) + +proc gtk_tool_shell_get_style*(self: ptr ToolShell00): ToolbarStyle {. + importc: "gtk_tool_shell_get_style", libprag.} + +proc getStyle*(self: ToolShell): ToolbarStyle = + gtk_tool_shell_get_style(cast[ptr ToolShell00](self.impl)) + +proc style*(self: ToolShell): ToolbarStyle = + gtk_tool_shell_get_style(cast[ptr ToolShell00](self.impl)) + +proc gtk_tool_shell_get_text_alignment*(self: ptr ToolShell00): cfloat {. + importc: "gtk_tool_shell_get_text_alignment", libprag.} + +proc getTextAlignment*(self: ToolShell): cfloat = + gtk_tool_shell_get_text_alignment(cast[ptr ToolShell00](self.impl)) + +proc textAlignment*(self: ToolShell): cfloat = + gtk_tool_shell_get_text_alignment(cast[ptr ToolShell00](self.impl)) + +proc gtk_tool_shell_get_text_orientation*(self: ptr ToolShell00): Orientation {. + importc: "gtk_tool_shell_get_text_orientation", libprag.} + +proc getTextOrientation*(self: ToolShell): Orientation = + gtk_tool_shell_get_text_orientation(cast[ptr ToolShell00](self.impl)) + +proc textOrientation*(self: ToolShell): Orientation = + gtk_tool_shell_get_text_orientation(cast[ptr ToolShell00](self.impl)) + +proc gtk_tool_shell_get_text_size_group*(self: ptr ToolShell00): ptr SizeGroup00 {. + importc: "gtk_tool_shell_get_text_size_group", libprag.} + +proc getTextSizeGroup*(self: ToolShell): SizeGroup = + let gobj = gtk_tool_shell_get_text_size_group(cast[ptr ToolShell00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SizeGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc textSizeGroup*(self: ToolShell): SizeGroup = + let gobj = gtk_tool_shell_get_text_size_group(cast[ptr ToolShell00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[SizeGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tool_shell_rebuild_menu*(self: ptr ToolShell00) {. + importc: "gtk_tool_shell_rebuild_menu", libprag.} + +proc rebuildMenu*(self: ToolShell) = + gtk_tool_shell_rebuild_menu(cast[ptr ToolShell00](self.impl)) + +type + ToolShellIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + getIconSize*: proc(shell: ptr ToolShell00): IconSize {.cdecl.} + getOrientation*: proc(shell: ptr ToolShell00): Orientation {.cdecl.} + getStyle*: proc(shell: ptr ToolShell00): ToolbarStyle {.cdecl.} + getReliefStyle*: proc(shell: ptr ToolShell00): ReliefStyle {.cdecl.} + rebuildMenu*: proc(shell: ptr ToolShell00) {.cdecl.} + getTextOrientation*: proc(shell: ptr ToolShell00): Orientation {.cdecl.} + getTextAlignment*: proc(shell: ptr ToolShell00): cfloat {.cdecl.} + getEllipsizeMode*: proc(shell: ptr ToolShell00): pango.EllipsizeMode {.cdecl.} + getTextSizeGroup*: proc(shell: ptr ToolShell00): ptr SizeGroup00 {.cdecl.} + ToolShellIface* = ref object + impl*: ptr ToolShellIface00 + +type + ToolbarPrivate00* {.pure.} = object + ToolbarPrivate* = ref object + impl*: ptr ToolbarPrivate00 + +type + Toolbar* = ref object of Container + Toolbar00* = object of Container00 + priv3: ptr ToolbarPrivate00 + +proc scFocusHomeOrEnd*(self: Toolbar; p: proc (self: ptr gobject.Object00; focusHome: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "focus-home-or-end", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scOrientationChanged*(self: Toolbar; p: proc (self: ptr gobject.Object00; orientation: Orientation; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "orientation-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPopupContextMenu*(self: Toolbar; p: proc (self: ptr gobject.Object00; x: int32; y: int32; button: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "popup-context-menu", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStyleChanged*(self: Toolbar; p: proc (self: ptr gobject.Object00; style: ToolbarStyle; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "style-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_toolbar_new*(): ptr Toolbar00 {. + importc: "gtk_toolbar_new", libprag.} + +proc newToolbar*(): Toolbar = + new(result, finalizeGObject) + result.impl = gtk_toolbar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initToolbar*[T](result: var T) = + assert(result is Toolbar) + new(result, finalizeGObject) + result.impl = gtk_toolbar_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_toolbar_get_drop_index*(self: ptr Toolbar00; x: int32; y: int32): int32 {. + importc: "gtk_toolbar_get_drop_index", libprag.} + +proc getDropIndex*(self: Toolbar; x: int; y: int): int = + int(gtk_toolbar_get_drop_index(cast[ptr Toolbar00](self.impl), int32(x), int32(y))) + +proc dropIndex*(self: Toolbar; x: int; y: int): int = + int(gtk_toolbar_get_drop_index(cast[ptr Toolbar00](self.impl), int32(x), int32(y))) + +proc gtk_toolbar_get_icon_size*(self: ptr Toolbar00): IconSize {. + importc: "gtk_toolbar_get_icon_size", libprag.} + +proc getIconSize*(self: Toolbar): IconSize = + gtk_toolbar_get_icon_size(cast[ptr Toolbar00](self.impl)) + +proc iconSize*(self: Toolbar): IconSize = + gtk_toolbar_get_icon_size(cast[ptr Toolbar00](self.impl)) + +proc gtk_toolbar_get_item_index*(self: ptr Toolbar00; item: ptr ToolItem00): int32 {. + importc: "gtk_toolbar_get_item_index", libprag.} + +proc getItemIndex*(self: Toolbar; item: ToolItem): int = + int(gtk_toolbar_get_item_index(cast[ptr Toolbar00](self.impl), cast[ptr ToolItem00](item.impl))) + +proc itemIndex*(self: Toolbar; item: ToolItem): int = + int(gtk_toolbar_get_item_index(cast[ptr Toolbar00](self.impl), cast[ptr ToolItem00](item.impl))) + +proc gtk_toolbar_get_n_items*(self: ptr Toolbar00): int32 {. + importc: "gtk_toolbar_get_n_items", libprag.} + +proc getNItems*(self: Toolbar): int = + int(gtk_toolbar_get_n_items(cast[ptr Toolbar00](self.impl))) + +proc nItems*(self: Toolbar): int = + int(gtk_toolbar_get_n_items(cast[ptr Toolbar00](self.impl))) + +proc gtk_toolbar_get_nth_item*(self: ptr Toolbar00; n: int32): ptr ToolItem00 {. + importc: "gtk_toolbar_get_nth_item", libprag.} + +proc getNthItem*(self: Toolbar; n: int): ToolItem = + let gobj = gtk_toolbar_get_nth_item(cast[ptr Toolbar00](self.impl), int32(n)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItem](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc nthItem*(self: Toolbar; n: int): ToolItem = + let gobj = gtk_toolbar_get_nth_item(cast[ptr Toolbar00](self.impl), int32(n)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[ToolItem](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_toolbar_get_relief_style*(self: ptr Toolbar00): ReliefStyle {. + importc: "gtk_toolbar_get_relief_style", libprag.} + +proc getReliefStyle*(self: Toolbar): ReliefStyle = + gtk_toolbar_get_relief_style(cast[ptr Toolbar00](self.impl)) + +proc reliefStyle*(self: Toolbar): ReliefStyle = + gtk_toolbar_get_relief_style(cast[ptr Toolbar00](self.impl)) + +proc gtk_toolbar_get_show_arrow*(self: ptr Toolbar00): gboolean {. + importc: "gtk_toolbar_get_show_arrow", libprag.} + +proc getShowArrow*(self: Toolbar): bool = + toBool(gtk_toolbar_get_show_arrow(cast[ptr Toolbar00](self.impl))) + +proc showArrow*(self: Toolbar): bool = + toBool(gtk_toolbar_get_show_arrow(cast[ptr Toolbar00](self.impl))) + +proc gtk_toolbar_get_style*(self: ptr Toolbar00): ToolbarStyle {. + importc: "gtk_toolbar_get_style", libprag.} + +proc getStyle*(self: Toolbar): ToolbarStyle = + gtk_toolbar_get_style(cast[ptr Toolbar00](self.impl)) + +proc style*(self: Toolbar): ToolbarStyle = + gtk_toolbar_get_style(cast[ptr Toolbar00](self.impl)) + +proc gtk_toolbar_insert*(self: ptr Toolbar00; item: ptr ToolItem00; pos: int32) {. + importc: "gtk_toolbar_insert", libprag.} + +proc insert*(self: Toolbar; item: ToolItem; pos: int) = + gtk_toolbar_insert(cast[ptr Toolbar00](self.impl), cast[ptr ToolItem00](item.impl), int32(pos)) + +proc gtk_toolbar_set_drop_highlight_item*(self: ptr Toolbar00; toolItem: ptr ToolItem00; index: int32) {. + importc: "gtk_toolbar_set_drop_highlight_item", libprag.} + +proc setDropHighlightItem*(self: Toolbar; toolItem: ToolItem; index: int) = + gtk_toolbar_set_drop_highlight_item(cast[ptr Toolbar00](self.impl), cast[ptr ToolItem00](toolItem.impl), int32(index)) + +proc gtk_toolbar_set_icon_size*(self: ptr Toolbar00; iconSize: IconSize) {. + importc: "gtk_toolbar_set_icon_size", libprag.} + +proc setIconSize*(self: Toolbar; iconSize: IconSize) = + gtk_toolbar_set_icon_size(cast[ptr Toolbar00](self.impl), iconSize) + +proc `iconSize=`*(self: Toolbar; iconSize: IconSize) = + gtk_toolbar_set_icon_size(cast[ptr Toolbar00](self.impl), iconSize) + +proc gtk_toolbar_set_show_arrow*(self: ptr Toolbar00; showArrow: gboolean) {. + importc: "gtk_toolbar_set_show_arrow", libprag.} + +proc setShowArrow*(self: Toolbar; showArrow: bool) = + gtk_toolbar_set_show_arrow(cast[ptr Toolbar00](self.impl), gboolean(showArrow)) + +proc `showArrow=`*(self: Toolbar; showArrow: bool) = + gtk_toolbar_set_show_arrow(cast[ptr Toolbar00](self.impl), gboolean(showArrow)) + +proc gtk_toolbar_set_style*(self: ptr Toolbar00; style: ToolbarStyle) {. + importc: "gtk_toolbar_set_style", libprag.} + +proc setStyle*(self: Toolbar; style: ToolbarStyle) = + gtk_toolbar_set_style(cast[ptr Toolbar00](self.impl), style) + +proc `style=`*(self: Toolbar; style: ToolbarStyle) = + gtk_toolbar_set_style(cast[ptr Toolbar00](self.impl), style) + +proc gtk_toolbar_unset_icon_size*(self: ptr Toolbar00) {. + importc: "gtk_toolbar_unset_icon_size", libprag.} + +proc unsetIconSize*(self: Toolbar) = + gtk_toolbar_unset_icon_size(cast[ptr Toolbar00](self.impl)) + +proc gtk_toolbar_unset_style*(self: ptr Toolbar00) {. + importc: "gtk_toolbar_unset_style", libprag.} + +proc unsetStyle*(self: Toolbar) = + gtk_toolbar_unset_style(cast[ptr Toolbar00](self.impl)) + +type + ToolbarClass00* {.pure.} = object + parentClass*: ContainerClass00 + orientationChanged*: proc(toolbar: ptr Toolbar00; orientation: Orientation) {.cdecl.} + styleChanged*: proc(toolbar: ptr Toolbar00; style: ToolbarStyle) {.cdecl.} + popupContextMenu*: proc(toolbar: ptr Toolbar00; x: int32; y: int32; buttonNumber: int32): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ToolbarClass* = ref object + impl*: ptr ToolbarClass00 + +type + ToolbarSpaceStyle* {.size: sizeof(cint), pure.} = enum + empty = 0 + line = 1 + +type + ToplevelAccessiblePrivate00* {.pure.} = object + ToplevelAccessiblePrivate* = ref object + impl*: ptr ToplevelAccessiblePrivate00 + +type + ToplevelAccessible* = ref object of atk.Object + ToplevelAccessible00* = object of atk.Object00 + priv1: ptr ToplevelAccessiblePrivate00 + +proc gtk_toplevel_accessible_get_children*(self: ptr ToplevelAccessible00): ptr pointer {. + importc: "gtk_toplevel_accessible_get_children", libprag.} + +proc getChildren*(self: ToplevelAccessible): ptr pointer = + gtk_toplevel_accessible_get_children(cast[ptr ToplevelAccessible00](self.impl)) + +proc children*(self: ToplevelAccessible): ptr pointer = + gtk_toplevel_accessible_get_children(cast[ptr ToplevelAccessible00](self.impl)) + +type + ToplevelAccessibleClass00* {.pure.} = object + parentClass*: atk.ObjectClass00 + ToplevelAccessibleClass* = ref object + impl*: ptr ToplevelAccessibleClass00 + +type + TranslateFunc* = proc (path: cstring; funcData: pointer): cstring {.cdecl.} + +proc gtk_action_group_set_translate_func*(self: ptr ActionGroup00; `func`: TranslateFunc; data: pointer; + notify: DestroyNotify) {. + importc: "gtk_action_group_set_translate_func", libprag.} + +proc setTranslateFunc*(self: ActionGroup; `func`: TranslateFunc; data: pointer; + notify: DestroyNotify) = + gtk_action_group_set_translate_func(cast[ptr ActionGroup00](self.impl), `func`, data, notify) + +type + TreeViewColumnPrivate00* {.pure.} = object + TreeViewColumnPrivate* = ref object + impl*: ptr TreeViewColumnPrivate00 + +type + TreeViewColumn* = ref object of gobject.InitiallyUnowned + TreeViewColumn00* = object of gobject.InitiallyUnowned00 + priv1: ptr TreeViewColumnPrivate00 + +proc scClicked*(self: TreeViewColumn; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "clicked", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_tree_view_column_new*(): ptr TreeViewColumn00 {. + importc: "gtk_tree_view_column_new", libprag.} + +proc newTreeViewColumn*(): TreeViewColumn = + new(result, finalizeGObject) + result.impl = gtk_tree_view_column_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTreeViewColumn*[T](result: var T) = + assert(result is TreeViewColumn) + new(result, finalizeGObject) + result.impl = gtk_tree_view_column_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_column_new_with_area*(area: ptr CellArea00): ptr TreeViewColumn00 {. + importc: "gtk_tree_view_column_new_with_area", libprag.} + +proc newTreeViewColumnWithArea*(area: CellArea): TreeViewColumn = + new(result, finalizeGObject) + result.impl = gtk_tree_view_column_new_with_area(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTreeViewColumnWithArea*[T](result: var T; area: CellArea) = + assert(result is TreeViewColumn) + new(result, finalizeGObject) + result.impl = gtk_tree_view_column_new_with_area(cast[ptr CellArea00](area.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_column_add_attribute*(self: ptr TreeViewColumn00; cellRenderer: ptr CellRenderer00; + attribute: cstring; column: int32) {. + importc: "gtk_tree_view_column_add_attribute", libprag.} + +proc addAttribute*(self: TreeViewColumn; cellRenderer: CellRenderer; + attribute: string; column: int) = + gtk_tree_view_column_add_attribute(cast[ptr TreeViewColumn00](self.impl), cast[ptr CellRenderer00](cellRenderer.impl), cstring(attribute), int32(column)) + +proc gtk_tree_view_column_cell_get_position*(self: ptr TreeViewColumn00; cellRenderer: ptr CellRenderer00; + xOffset: var int32; width: var int32): gboolean {. + importc: "gtk_tree_view_column_cell_get_position", libprag.} + +proc cellGetPosition*(self: TreeViewColumn; cellRenderer: CellRenderer; + xOffset: var int; width: var int): bool = + var width_00 = int32(width) + var xOffset_00 = int32(xOffset) + result = toBool(gtk_tree_view_column_cell_get_position(cast[ptr TreeViewColumn00](self.impl), cast[ptr CellRenderer00](cellRenderer.impl), xOffset_00, width_00)) + width = int(width_00) + xOffset = int(xOffset_00) + +proc gtk_tree_view_column_cell_get_size*(self: ptr TreeViewColumn00; cellArea: ptr gdk.Rectangle00; + xOffset: var int32; yOffset: var int32; width: var int32; height: var int32) {. + importc: "gtk_tree_view_column_cell_get_size", libprag.} + +proc cellGetSize*(self: TreeViewColumn; cellArea: gdk.Rectangle; xOffset: var int; + yOffset: var int; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + var yOffset_00 = int32(yOffset) + var xOffset_00 = int32(xOffset) + gtk_tree_view_column_cell_get_size(cast[ptr TreeViewColumn00](self.impl), cast[ptr gdk.Rectangle00](cellArea.impl), xOffset_00, yOffset_00, width_00, height_00) + height = int(height_00) + width = int(width_00) + yOffset = int(yOffset_00) + xOffset = int(xOffset_00) + +proc gtk_tree_view_column_cell_is_visible*(self: ptr TreeViewColumn00): gboolean {. + importc: "gtk_tree_view_column_cell_is_visible", libprag.} + +proc cellIsVisible*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_cell_is_visible(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_cell_set_cell_data*(self: ptr TreeViewColumn00; treeModel: ptr TreeModel00; + iter: ptr TreeIter00; isExpander: gboolean; isExpanded: gboolean) {. + importc: "gtk_tree_view_column_cell_set_cell_data", libprag.} + +proc cellSetCellData*(self: TreeViewColumn; treeModel: TreeModel; iter: TreeIter; + isExpander: bool; isExpanded: bool) = + gtk_tree_view_column_cell_set_cell_data(cast[ptr TreeViewColumn00](self.impl), cast[ptr TreeModel00](treeModel.impl), cast[ptr TreeIter00](iter.impl), gboolean(isExpander), gboolean(isExpanded)) + +proc gtk_tree_view_column_clear*(self: ptr TreeViewColumn00) {. + importc: "gtk_tree_view_column_clear", libprag.} + +proc clear*(self: TreeViewColumn) = + gtk_tree_view_column_clear(cast[ptr TreeViewColumn00](self.impl)) + +proc gtk_tree_view_column_clear_attributes*(self: ptr TreeViewColumn00; cellRenderer: ptr CellRenderer00) {. + importc: "gtk_tree_view_column_clear_attributes", libprag.} + +proc clearAttributes*(self: TreeViewColumn; cellRenderer: CellRenderer) = + gtk_tree_view_column_clear_attributes(cast[ptr TreeViewColumn00](self.impl), cast[ptr CellRenderer00](cellRenderer.impl)) + +proc gtk_tree_view_column_clicked*(self: ptr TreeViewColumn00) {. + importc: "gtk_tree_view_column_clicked", libprag.} + +proc clicked*(self: TreeViewColumn) = + gtk_tree_view_column_clicked(cast[ptr TreeViewColumn00](self.impl)) + +proc gtk_tree_view_column_focus_cell*(self: ptr TreeViewColumn00; cell: ptr CellRenderer00) {. + importc: "gtk_tree_view_column_focus_cell", libprag.} + +proc focusCell*(self: TreeViewColumn; cell: CellRenderer) = + gtk_tree_view_column_focus_cell(cast[ptr TreeViewColumn00](self.impl), cast[ptr CellRenderer00](cell.impl)) + +proc gtk_tree_view_column_get_alignment*(self: ptr TreeViewColumn00): cfloat {. + importc: "gtk_tree_view_column_get_alignment", libprag.} + +proc getAlignment*(self: TreeViewColumn): cfloat = + gtk_tree_view_column_get_alignment(cast[ptr TreeViewColumn00](self.impl)) + +proc alignment*(self: TreeViewColumn): cfloat = + gtk_tree_view_column_get_alignment(cast[ptr TreeViewColumn00](self.impl)) + +proc gtk_tree_view_column_get_button*(self: ptr TreeViewColumn00): ptr Widget00 {. + importc: "gtk_tree_view_column_get_button", libprag.} + +proc getButton*(self: TreeViewColumn): Widget = + let gobj = gtk_tree_view_column_get_button(cast[ptr TreeViewColumn00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc button*(self: TreeViewColumn): Widget = + let gobj = gtk_tree_view_column_get_button(cast[ptr TreeViewColumn00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_column_get_clickable*(self: ptr TreeViewColumn00): gboolean {. + importc: "gtk_tree_view_column_get_clickable", libprag.} + +proc getClickable*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_clickable(cast[ptr TreeViewColumn00](self.impl))) + +proc clickable*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_clickable(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_expand*(self: ptr TreeViewColumn00): gboolean {. + importc: "gtk_tree_view_column_get_expand", libprag.} + +proc getExpand*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_expand(cast[ptr TreeViewColumn00](self.impl))) + +proc expand*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_expand(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_fixed_width*(self: ptr TreeViewColumn00): int32 {. + importc: "gtk_tree_view_column_get_fixed_width", libprag.} + +proc getFixedWidth*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_fixed_width(cast[ptr TreeViewColumn00](self.impl))) + +proc fixedWidth*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_fixed_width(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_max_width*(self: ptr TreeViewColumn00): int32 {. + importc: "gtk_tree_view_column_get_max_width", libprag.} + +proc getMaxWidth*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_max_width(cast[ptr TreeViewColumn00](self.impl))) + +proc maxWidth*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_max_width(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_min_width*(self: ptr TreeViewColumn00): int32 {. + importc: "gtk_tree_view_column_get_min_width", libprag.} + +proc getMinWidth*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_min_width(cast[ptr TreeViewColumn00](self.impl))) + +proc minWidth*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_min_width(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_reorderable*(self: ptr TreeViewColumn00): gboolean {. + importc: "gtk_tree_view_column_get_reorderable", libprag.} + +proc getReorderable*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_reorderable(cast[ptr TreeViewColumn00](self.impl))) + +proc reorderable*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_reorderable(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_resizable*(self: ptr TreeViewColumn00): gboolean {. + importc: "gtk_tree_view_column_get_resizable", libprag.} + +proc getResizable*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_resizable(cast[ptr TreeViewColumn00](self.impl))) + +proc resizable*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_resizable(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_sort_column_id*(self: ptr TreeViewColumn00): int32 {. + importc: "gtk_tree_view_column_get_sort_column_id", libprag.} + +proc getSortColumnId*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_sort_column_id(cast[ptr TreeViewColumn00](self.impl))) + +proc sortColumnId*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_sort_column_id(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_sort_indicator*(self: ptr TreeViewColumn00): gboolean {. + importc: "gtk_tree_view_column_get_sort_indicator", libprag.} + +proc getSortIndicator*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_sort_indicator(cast[ptr TreeViewColumn00](self.impl))) + +proc sortIndicator*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_sort_indicator(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_sort_order*(self: ptr TreeViewColumn00): SortType {. + importc: "gtk_tree_view_column_get_sort_order", libprag.} + +proc getSortOrder*(self: TreeViewColumn): SortType = + gtk_tree_view_column_get_sort_order(cast[ptr TreeViewColumn00](self.impl)) + +proc sortOrder*(self: TreeViewColumn): SortType = + gtk_tree_view_column_get_sort_order(cast[ptr TreeViewColumn00](self.impl)) + +proc gtk_tree_view_column_get_spacing*(self: ptr TreeViewColumn00): int32 {. + importc: "gtk_tree_view_column_get_spacing", libprag.} + +proc getSpacing*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_spacing(cast[ptr TreeViewColumn00](self.impl))) + +proc spacing*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_spacing(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_title*(self: ptr TreeViewColumn00): cstring {. + importc: "gtk_tree_view_column_get_title", libprag.} + +proc getTitle*(self: TreeViewColumn): string = + let resul0 = gtk_tree_view_column_get_title(cast[ptr TreeViewColumn00](self.impl)) + result = $resul0 + +proc title*(self: TreeViewColumn): string = + let resul0 = gtk_tree_view_column_get_title(cast[ptr TreeViewColumn00](self.impl)) + result = $resul0 + +proc gtk_tree_view_column_get_tree_view*(self: ptr TreeViewColumn00): ptr Widget00 {. + importc: "gtk_tree_view_column_get_tree_view", libprag.} + +proc getTreeView*(self: TreeViewColumn): Widget = + let gobj = gtk_tree_view_column_get_tree_view(cast[ptr TreeViewColumn00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc treeView*(self: TreeViewColumn): Widget = + let gobj = gtk_tree_view_column_get_tree_view(cast[ptr TreeViewColumn00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_column_get_visible*(self: ptr TreeViewColumn00): gboolean {. + importc: "gtk_tree_view_column_get_visible", libprag.} + +proc getVisible*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_visible(cast[ptr TreeViewColumn00](self.impl))) + +proc visible*(self: TreeViewColumn): bool = + toBool(gtk_tree_view_column_get_visible(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_widget*(self: ptr TreeViewColumn00): ptr Widget00 {. + importc: "gtk_tree_view_column_get_widget", libprag.} + +proc getWidget*(self: TreeViewColumn): Widget = + let gobj = gtk_tree_view_column_get_widget(cast[ptr TreeViewColumn00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc widget*(self: TreeViewColumn): Widget = + let gobj = gtk_tree_view_column_get_widget(cast[ptr TreeViewColumn00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_column_get_width*(self: ptr TreeViewColumn00): int32 {. + importc: "gtk_tree_view_column_get_width", libprag.} + +proc getWidth*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_width(cast[ptr TreeViewColumn00](self.impl))) + +proc width*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_width(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_get_x_offset*(self: ptr TreeViewColumn00): int32 {. + importc: "gtk_tree_view_column_get_x_offset", libprag.} + +proc getXOffset*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_x_offset(cast[ptr TreeViewColumn00](self.impl))) + +proc xOffset*(self: TreeViewColumn): int = + int(gtk_tree_view_column_get_x_offset(cast[ptr TreeViewColumn00](self.impl))) + +proc gtk_tree_view_column_pack_end*(self: ptr TreeViewColumn00; cell: ptr CellRenderer00; + expand: gboolean) {. + importc: "gtk_tree_view_column_pack_end", libprag.} + +proc packEnd*(self: TreeViewColumn; cell: CellRenderer; expand: bool) = + gtk_tree_view_column_pack_end(cast[ptr TreeViewColumn00](self.impl), cast[ptr CellRenderer00](cell.impl), gboolean(expand)) + +proc gtk_tree_view_column_pack_start*(self: ptr TreeViewColumn00; cell: ptr CellRenderer00; + expand: gboolean) {. + importc: "gtk_tree_view_column_pack_start", libprag.} + +proc packStart*(self: TreeViewColumn; cell: CellRenderer; expand: bool) = + gtk_tree_view_column_pack_start(cast[ptr TreeViewColumn00](self.impl), cast[ptr CellRenderer00](cell.impl), gboolean(expand)) + +proc gtk_tree_view_column_queue_resize*(self: ptr TreeViewColumn00) {. + importc: "gtk_tree_view_column_queue_resize", libprag.} + +proc queueResize*(self: TreeViewColumn) = + gtk_tree_view_column_queue_resize(cast[ptr TreeViewColumn00](self.impl)) + +proc gtk_tree_view_column_set_alignment*(self: ptr TreeViewColumn00; xalign: cfloat) {. + importc: "gtk_tree_view_column_set_alignment", libprag.} + +proc setAlignment*(self: TreeViewColumn; xalign: cfloat) = + gtk_tree_view_column_set_alignment(cast[ptr TreeViewColumn00](self.impl), xalign) + +proc `alignment=`*(self: TreeViewColumn; xalign: cfloat) = + gtk_tree_view_column_set_alignment(cast[ptr TreeViewColumn00](self.impl), xalign) + +proc gtk_tree_view_column_set_clickable*(self: ptr TreeViewColumn00; clickable: gboolean) {. + importc: "gtk_tree_view_column_set_clickable", libprag.} + +proc setClickable*(self: TreeViewColumn; clickable: bool) = + gtk_tree_view_column_set_clickable(cast[ptr TreeViewColumn00](self.impl), gboolean(clickable)) + +proc `clickable=`*(self: TreeViewColumn; clickable: bool) = + gtk_tree_view_column_set_clickable(cast[ptr TreeViewColumn00](self.impl), gboolean(clickable)) + +proc gtk_tree_view_column_set_expand*(self: ptr TreeViewColumn00; expand: gboolean) {. + importc: "gtk_tree_view_column_set_expand", libprag.} + +proc setExpand*(self: TreeViewColumn; expand: bool) = + gtk_tree_view_column_set_expand(cast[ptr TreeViewColumn00](self.impl), gboolean(expand)) + +proc `expand=`*(self: TreeViewColumn; expand: bool) = + gtk_tree_view_column_set_expand(cast[ptr TreeViewColumn00](self.impl), gboolean(expand)) + +proc gtk_tree_view_column_set_fixed_width*(self: ptr TreeViewColumn00; fixedWidth: int32) {. + importc: "gtk_tree_view_column_set_fixed_width", libprag.} + +proc setFixedWidth*(self: TreeViewColumn; fixedWidth: int) = + gtk_tree_view_column_set_fixed_width(cast[ptr TreeViewColumn00](self.impl), int32(fixedWidth)) + +proc `fixedWidth=`*(self: TreeViewColumn; fixedWidth: int) = + gtk_tree_view_column_set_fixed_width(cast[ptr TreeViewColumn00](self.impl), int32(fixedWidth)) + +proc gtk_tree_view_column_set_max_width*(self: ptr TreeViewColumn00; maxWidth: int32) {. + importc: "gtk_tree_view_column_set_max_width", libprag.} + +proc setMaxWidth*(self: TreeViewColumn; maxWidth: int) = + gtk_tree_view_column_set_max_width(cast[ptr TreeViewColumn00](self.impl), int32(maxWidth)) + +proc `maxWidth=`*(self: TreeViewColumn; maxWidth: int) = + gtk_tree_view_column_set_max_width(cast[ptr TreeViewColumn00](self.impl), int32(maxWidth)) + +proc gtk_tree_view_column_set_min_width*(self: ptr TreeViewColumn00; minWidth: int32) {. + importc: "gtk_tree_view_column_set_min_width", libprag.} + +proc setMinWidth*(self: TreeViewColumn; minWidth: int) = + gtk_tree_view_column_set_min_width(cast[ptr TreeViewColumn00](self.impl), int32(minWidth)) + +proc `minWidth=`*(self: TreeViewColumn; minWidth: int) = + gtk_tree_view_column_set_min_width(cast[ptr TreeViewColumn00](self.impl), int32(minWidth)) + +proc gtk_tree_view_column_set_reorderable*(self: ptr TreeViewColumn00; reorderable: gboolean) {. + importc: "gtk_tree_view_column_set_reorderable", libprag.} + +proc setReorderable*(self: TreeViewColumn; reorderable: bool) = + gtk_tree_view_column_set_reorderable(cast[ptr TreeViewColumn00](self.impl), gboolean(reorderable)) + +proc `reorderable=`*(self: TreeViewColumn; reorderable: bool) = + gtk_tree_view_column_set_reorderable(cast[ptr TreeViewColumn00](self.impl), gboolean(reorderable)) + +proc gtk_tree_view_column_set_resizable*(self: ptr TreeViewColumn00; resizable: gboolean) {. + importc: "gtk_tree_view_column_set_resizable", libprag.} + +proc setResizable*(self: TreeViewColumn; resizable: bool) = + gtk_tree_view_column_set_resizable(cast[ptr TreeViewColumn00](self.impl), gboolean(resizable)) + +proc `resizable=`*(self: TreeViewColumn; resizable: bool) = + gtk_tree_view_column_set_resizable(cast[ptr TreeViewColumn00](self.impl), gboolean(resizable)) + +proc gtk_tree_view_column_set_sort_column_id*(self: ptr TreeViewColumn00; sortColumnId: int32) {. + importc: "gtk_tree_view_column_set_sort_column_id", libprag.} + +proc setSortColumnId*(self: TreeViewColumn; sortColumnId: int) = + gtk_tree_view_column_set_sort_column_id(cast[ptr TreeViewColumn00](self.impl), int32(sortColumnId)) + +proc `sortColumnId=`*(self: TreeViewColumn; sortColumnId: int) = + gtk_tree_view_column_set_sort_column_id(cast[ptr TreeViewColumn00](self.impl), int32(sortColumnId)) + +proc gtk_tree_view_column_set_sort_indicator*(self: ptr TreeViewColumn00; setting: gboolean) {. + importc: "gtk_tree_view_column_set_sort_indicator", libprag.} + +proc setSortIndicator*(self: TreeViewColumn; setting: bool) = + gtk_tree_view_column_set_sort_indicator(cast[ptr TreeViewColumn00](self.impl), gboolean(setting)) + +proc `sortIndicator=`*(self: TreeViewColumn; setting: bool) = + gtk_tree_view_column_set_sort_indicator(cast[ptr TreeViewColumn00](self.impl), gboolean(setting)) + +proc gtk_tree_view_column_set_sort_order*(self: ptr TreeViewColumn00; order: SortType) {. + importc: "gtk_tree_view_column_set_sort_order", libprag.} + +proc setSortOrder*(self: TreeViewColumn; order: SortType) = + gtk_tree_view_column_set_sort_order(cast[ptr TreeViewColumn00](self.impl), order) + +proc `sortOrder=`*(self: TreeViewColumn; order: SortType) = + gtk_tree_view_column_set_sort_order(cast[ptr TreeViewColumn00](self.impl), order) + +proc gtk_tree_view_column_set_spacing*(self: ptr TreeViewColumn00; spacing: int32) {. + importc: "gtk_tree_view_column_set_spacing", libprag.} + +proc setSpacing*(self: TreeViewColumn; spacing: int) = + gtk_tree_view_column_set_spacing(cast[ptr TreeViewColumn00](self.impl), int32(spacing)) + +proc `spacing=`*(self: TreeViewColumn; spacing: int) = + gtk_tree_view_column_set_spacing(cast[ptr TreeViewColumn00](self.impl), int32(spacing)) + +proc gtk_tree_view_column_set_title*(self: ptr TreeViewColumn00; title: cstring) {. + importc: "gtk_tree_view_column_set_title", libprag.} + +proc setTitle*(self: TreeViewColumn; title: string) = + gtk_tree_view_column_set_title(cast[ptr TreeViewColumn00](self.impl), cstring(title)) + +proc `title=`*(self: TreeViewColumn; title: string) = + gtk_tree_view_column_set_title(cast[ptr TreeViewColumn00](self.impl), cstring(title)) + +proc gtk_tree_view_column_set_visible*(self: ptr TreeViewColumn00; visible: gboolean) {. + importc: "gtk_tree_view_column_set_visible", libprag.} + +proc setVisible*(self: TreeViewColumn; visible: bool) = + gtk_tree_view_column_set_visible(cast[ptr TreeViewColumn00](self.impl), gboolean(visible)) + +proc `visible=`*(self: TreeViewColumn; visible: bool) = + gtk_tree_view_column_set_visible(cast[ptr TreeViewColumn00](self.impl), gboolean(visible)) + +proc gtk_tree_view_column_set_widget*(self: ptr TreeViewColumn00; widget: ptr Widget00) {. + importc: "gtk_tree_view_column_set_widget", libprag.} + +proc setWidget*(self: TreeViewColumn; widget: Widget) = + gtk_tree_view_column_set_widget(cast[ptr TreeViewColumn00](self.impl), cast[ptr Widget00](widget.impl)) + +proc `widget=`*(self: TreeViewColumn; widget: Widget) = + gtk_tree_view_column_set_widget(cast[ptr TreeViewColumn00](self.impl), cast[ptr Widget00](widget.impl)) + +type + TreeCellDataFunc* = proc (treeColumn: ptr TreeViewColumn00; cell: ptr CellRenderer00; + treeModel: ptr TreeModel00; iter: ptr TreeIter00; data: pointer) {.cdecl.} + +proc gtk_tree_view_column_set_cell_data_func*(self: ptr TreeViewColumn00; cellRenderer: ptr CellRenderer00; + `func`: TreeCellDataFunc; funcData: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_view_column_set_cell_data_func", libprag.} + +proc setCellDataFunc*(self: TreeViewColumn; cellRenderer: CellRenderer; + `func`: TreeCellDataFunc; funcData: pointer; destroy: DestroyNotify) = + gtk_tree_view_column_set_cell_data_func(cast[ptr TreeViewColumn00](self.impl), cast[ptr CellRenderer00](cellRenderer.impl), `func`, funcData, destroy) + +type + TreeViewColumnSizing* {.size: sizeof(cint), pure.} = enum + growOnly = 0 + autosize = 1 + fixed = 2 + +proc gtk_tree_view_column_get_sizing*(self: ptr TreeViewColumn00): TreeViewColumnSizing {. + importc: "gtk_tree_view_column_get_sizing", libprag.} + +proc getSizing*(self: TreeViewColumn): TreeViewColumnSizing = + gtk_tree_view_column_get_sizing(cast[ptr TreeViewColumn00](self.impl)) + +proc sizing*(self: TreeViewColumn): TreeViewColumnSizing = + gtk_tree_view_column_get_sizing(cast[ptr TreeViewColumn00](self.impl)) + +proc gtk_tree_view_column_set_sizing*(self: ptr TreeViewColumn00; `type`: TreeViewColumnSizing) {. + importc: "gtk_tree_view_column_set_sizing", libprag.} + +proc setSizing*(self: TreeViewColumn; `type`: TreeViewColumnSizing) = + gtk_tree_view_column_set_sizing(cast[ptr TreeViewColumn00](self.impl), `type`) + +proc `sizing=`*(self: TreeViewColumn; `type`: TreeViewColumnSizing) = + gtk_tree_view_column_set_sizing(cast[ptr TreeViewColumn00](self.impl), `type`) + +type + TreeViewPrivate00* {.pure.} = object + TreeViewPrivate* = ref object + impl*: ptr TreeViewPrivate00 + +type + TreeView* = ref object of Container + TreeView00* = object of Container00 + priv3: ptr TreeViewPrivate00 + +proc scColumnsChanged*(self: TreeView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "columns-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scCursorChanged*(self: TreeView; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "cursor-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scExpandCollapseCursorRow*(self: TreeView; p: proc (self: ptr gobject.Object00; `object`: gboolean; p0: gboolean; p1: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "expand-collapse-cursor-row", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scMoveCursor*(self: TreeView; p: proc (self: ptr gobject.Object00; step: MovementStep; direction: int32; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "move-cursor", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRowActivated*(self: TreeView; p: proc (self: ptr gobject.Object00; path: TreePath00; column: TreeViewColumn00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "row-activated", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRowCollapsed*(self: TreeView; p: proc (self: ptr gobject.Object00; iter: TreeIter00; path: TreePath00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "row-collapsed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scRowExpanded*(self: TreeView; p: proc (self: ptr gobject.Object00; iter: TreeIter00; path: TreePath00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "row-expanded", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectAll*(self: TreeView; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select-all", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectCursorParent*(self: TreeView; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select-cursor-parent", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scSelectCursorRow*(self: TreeView; p: proc (self: ptr gobject.Object00; `object`: gboolean; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "select-cursor-row", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scStartInteractiveSearch*(self: TreeView; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "start-interactive-search", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scTestCollapseRow*(self: TreeView; p: proc (self: ptr gobject.Object00; iter: TreeIter00; path: TreePath00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "test-collapse-row", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scTestExpandRow*(self: TreeView; p: proc (self: ptr gobject.Object00; iter: TreeIter00; path: TreePath00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "test-expand-row", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scToggleCursorRow*(self: TreeView; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "toggle-cursor-row", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scUnselectAll*(self: TreeView; p: proc (self: ptr gobject.Object00; xdata: pointer): gboolean {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "unselect-all", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_tree_view_new*(): ptr TreeView00 {. + importc: "gtk_tree_view_new", libprag.} + +proc newTreeView*(): TreeView = + new(result, finalizeGObject) + result.impl = gtk_tree_view_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTreeView*[T](result: var T) = + assert(result is TreeView) + new(result, finalizeGObject) + result.impl = gtk_tree_view_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_new_with_model*(model: ptr TreeModel00): ptr TreeView00 {. + importc: "gtk_tree_view_new_with_model", libprag.} + +proc newTreeViewWithModel*(model: TreeModel): TreeView = + new(result, finalizeGObject) + result.impl = gtk_tree_view_new_with_model(cast[ptr TreeModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTreeViewWithModel*[T](result: var T; model: TreeModel) = + assert(result is TreeView) + new(result, finalizeGObject) + result.impl = gtk_tree_view_new_with_model(cast[ptr TreeModel00](model.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_append_column*(self: ptr TreeView00; column: ptr TreeViewColumn00): int32 {. + importc: "gtk_tree_view_append_column", libprag.} + +proc appendColumn*(self: TreeView; column: TreeViewColumn): int = + int(gtk_tree_view_append_column(cast[ptr TreeView00](self.impl), cast[ptr TreeViewColumn00](column.impl))) + +proc gtk_tree_view_collapse_all*(self: ptr TreeView00) {. + importc: "gtk_tree_view_collapse_all", libprag.} + +proc collapseAll*(self: TreeView) = + gtk_tree_view_collapse_all(cast[ptr TreeView00](self.impl)) + +proc gtk_tree_view_collapse_row*(self: ptr TreeView00; path: ptr TreePath00): gboolean {. + importc: "gtk_tree_view_collapse_row", libprag.} + +proc collapseRow*(self: TreeView; path: TreePath): bool = + toBool(gtk_tree_view_collapse_row(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl))) + +proc gtk_tree_view_columns_autosize*(self: ptr TreeView00) {. + importc: "gtk_tree_view_columns_autosize", libprag.} + +proc columnsAutosize*(self: TreeView) = + gtk_tree_view_columns_autosize(cast[ptr TreeView00](self.impl)) + +proc gtk_tree_view_convert_bin_window_to_tree_coords*(self: ptr TreeView00; bx: int32; by: int32; tx: var int32; + ty: var int32) {. + importc: "gtk_tree_view_convert_bin_window_to_tree_coords", libprag.} + +proc convertBinWindowToTreeCoords*(self: TreeView; bx: int; by: int; tx: var int; ty: var int) = + var tx_00 = int32(tx) + var ty_00 = int32(ty) + gtk_tree_view_convert_bin_window_to_tree_coords(cast[ptr TreeView00](self.impl), int32(bx), int32(by), tx_00, ty_00) + tx = int(tx_00) + ty = int(ty_00) + +proc gtk_tree_view_convert_bin_window_to_widget_coords*(self: ptr TreeView00; bx: int32; by: int32; wx: var int32; + wy: var int32) {. + importc: "gtk_tree_view_convert_bin_window_to_widget_coords", libprag.} + +proc convertBinWindowToWidgetCoords*(self: TreeView; bx: int; by: int; wx: var int; wy: var int) = + var wy_00 = int32(wy) + var wx_00 = int32(wx) + gtk_tree_view_convert_bin_window_to_widget_coords(cast[ptr TreeView00](self.impl), int32(bx), int32(by), wx_00, wy_00) + wy = int(wy_00) + wx = int(wx_00) + +proc gtk_tree_view_convert_tree_to_bin_window_coords*(self: ptr TreeView00; tx: int32; ty: int32; bx: var int32; + by: var int32) {. + importc: "gtk_tree_view_convert_tree_to_bin_window_coords", libprag.} + +proc convertTreeToBinWindowCoords*(self: TreeView; tx: int; ty: int; bx: var int; by: var int) = + var bx_00 = int32(bx) + var by_00 = int32(by) + gtk_tree_view_convert_tree_to_bin_window_coords(cast[ptr TreeView00](self.impl), int32(tx), int32(ty), bx_00, by_00) + bx = int(bx_00) + by = int(by_00) + +proc gtk_tree_view_convert_tree_to_widget_coords*(self: ptr TreeView00; tx: int32; ty: int32; wx: var int32; + wy: var int32) {. + importc: "gtk_tree_view_convert_tree_to_widget_coords", libprag.} + +proc convertTreeToWidgetCoords*(self: TreeView; tx: int; ty: int; wx: var int; wy: var int) = + var wy_00 = int32(wy) + var wx_00 = int32(wx) + gtk_tree_view_convert_tree_to_widget_coords(cast[ptr TreeView00](self.impl), int32(tx), int32(ty), wx_00, wy_00) + wy = int(wy_00) + wx = int(wx_00) + +proc gtk_tree_view_convert_widget_to_bin_window_coords*(self: ptr TreeView00; wx: int32; wy: int32; bx: var int32; + by: var int32) {. + importc: "gtk_tree_view_convert_widget_to_bin_window_coords", libprag.} + +proc convertWidgetToBinWindowCoords*(self: TreeView; wx: int; wy: int; bx: var int; by: var int) = + var bx_00 = int32(bx) + var by_00 = int32(by) + gtk_tree_view_convert_widget_to_bin_window_coords(cast[ptr TreeView00](self.impl), int32(wx), int32(wy), bx_00, by_00) + bx = int(bx_00) + by = int(by_00) + +proc gtk_tree_view_convert_widget_to_tree_coords*(self: ptr TreeView00; wx: int32; wy: int32; tx: var int32; + ty: var int32) {. + importc: "gtk_tree_view_convert_widget_to_tree_coords", libprag.} + +proc convertWidgetToTreeCoords*(self: TreeView; wx: int; wy: int; tx: var int; ty: var int) = + var tx_00 = int32(tx) + var ty_00 = int32(ty) + gtk_tree_view_convert_widget_to_tree_coords(cast[ptr TreeView00](self.impl), int32(wx), int32(wy), tx_00, ty_00) + tx = int(tx_00) + ty = int(ty_00) + +proc gtk_tree_view_create_row_drag_icon*(self: ptr TreeView00; path: ptr TreePath00): ptr cairo.Surface00 {. + importc: "gtk_tree_view_create_row_drag_icon", libprag.} + +proc createRowDragIcon*(self: TreeView; path: TreePath): cairo.Surface = + new(result) + result.impl = gtk_tree_view_create_row_drag_icon(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_tree_view_enable_model_drag_dest*(self: ptr TreeView00; targets: TargetEntry00Array; + nTargets: int32; actions: gdk.DragAction) {. + importc: "gtk_tree_view_enable_model_drag_dest", libprag.} + +proc enableModelDragDest*(self: TreeView; targets: TargetEntry00Array; nTargets: int; + actions: gdk.DragAction) = + gtk_tree_view_enable_model_drag_dest(cast[ptr TreeView00](self.impl), targets, int32(nTargets), actions) + +proc gtk_tree_view_enable_model_drag_source*(self: ptr TreeView00; startButtonMask: gdk.ModifierType; + targets: TargetEntry00Array; nTargets: int32; actions: gdk.DragAction) {. + importc: "gtk_tree_view_enable_model_drag_source", libprag.} + +proc enableModelDragSource*(self: TreeView; startButtonMask: gdk.ModifierType; + targets: TargetEntry00Array; nTargets: int; actions: gdk.DragAction) = + gtk_tree_view_enable_model_drag_source(cast[ptr TreeView00](self.impl), startButtonMask, targets, int32(nTargets), actions) + +proc gtk_tree_view_expand_all*(self: ptr TreeView00) {. + importc: "gtk_tree_view_expand_all", libprag.} + +proc expandAll*(self: TreeView) = + gtk_tree_view_expand_all(cast[ptr TreeView00](self.impl)) + +proc gtk_tree_view_expand_row*(self: ptr TreeView00; path: ptr TreePath00; openAll: gboolean): gboolean {. + importc: "gtk_tree_view_expand_row", libprag.} + +proc expandRow*(self: TreeView; path: TreePath; openAll: bool): bool = + toBool(gtk_tree_view_expand_row(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl), gboolean(openAll))) + +proc gtk_tree_view_expand_to_path*(self: ptr TreeView00; path: ptr TreePath00) {. + importc: "gtk_tree_view_expand_to_path", libprag.} + +proc expandToPath*(self: TreeView; path: TreePath) = + gtk_tree_view_expand_to_path(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_tree_view_get_activate_on_single_click*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_activate_on_single_click", libprag.} + +proc getActivateOnSingleClick*(self: TreeView): bool = + toBool(gtk_tree_view_get_activate_on_single_click(cast[ptr TreeView00](self.impl))) + +proc activateOnSingleClick*(self: TreeView): bool = + toBool(gtk_tree_view_get_activate_on_single_click(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_background_area*(self: ptr TreeView00; path: ptr TreePath00; column: ptr TreeViewColumn00; + rect: var gdk.Rectangle00) {. + importc: "gtk_tree_view_get_background_area", libprag.} + +proc getBackgroundArea*(self: ptr TreeView00; path: ptr TreePath00; column: ptr TreeViewColumn00; + rect: var gdk.Rectangle00) {. + importc: "gtk_tree_view_get_background_area", libprag.} + +proc backgroundArea*(self: ptr TreeView00; path: ptr TreePath00; column: ptr TreeViewColumn00; + rect: var gdk.Rectangle00) {. + importc: "gtk_tree_view_get_background_area", libprag.} + +proc gtk_tree_view_get_bin_window*(self: ptr TreeView00): ptr gdk.Window00 {. + importc: "gtk_tree_view_get_bin_window", libprag.} + +proc getBinWindow*(self: TreeView): gdk.Window = + let gobj = gtk_tree_view_get_bin_window(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc binWindow*(self: TreeView): gdk.Window = + let gobj = gtk_tree_view_get_bin_window(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_get_cell_area*(self: ptr TreeView00; path: ptr TreePath00; column: ptr TreeViewColumn00; + rect: var gdk.Rectangle00) {. + importc: "gtk_tree_view_get_cell_area", libprag.} + +proc getCellArea*(self: ptr TreeView00; path: ptr TreePath00; column: ptr TreeViewColumn00; + rect: var gdk.Rectangle00) {. + importc: "gtk_tree_view_get_cell_area", libprag.} + +proc cellArea*(self: ptr TreeView00; path: ptr TreePath00; column: ptr TreeViewColumn00; + rect: var gdk.Rectangle00) {. + importc: "gtk_tree_view_get_cell_area", libprag.} + +proc gtk_tree_view_get_column*(self: ptr TreeView00; n: int32): ptr TreeViewColumn00 {. + importc: "gtk_tree_view_get_column", libprag.} + +proc getColumn*(self: TreeView; n: int): TreeViewColumn = + let gobj = gtk_tree_view_get_column(cast[ptr TreeView00](self.impl), int32(n)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TreeViewColumn](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc column*(self: TreeView; n: int): TreeViewColumn = + let gobj = gtk_tree_view_get_column(cast[ptr TreeView00](self.impl), int32(n)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TreeViewColumn](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_get_columns*(self: ptr TreeView00): ptr pointer {. + importc: "gtk_tree_view_get_columns", libprag.} + +proc getColumns*(self: TreeView): ptr pointer = + gtk_tree_view_get_columns(cast[ptr TreeView00](self.impl)) + +proc columns*(self: TreeView): ptr pointer = + gtk_tree_view_get_columns(cast[ptr TreeView00](self.impl)) + +proc gtk_tree_view_get_cursor*(self: ptr TreeView00; path: var ptr TreePath00; focusColumn: var ptr TreeViewColumn00) {. + importc: "gtk_tree_view_get_cursor", libprag.} + +proc getCursor*(self: ptr TreeView00; path: var ptr TreePath00; focusColumn: var ptr TreeViewColumn00) {. + importc: "gtk_tree_view_get_cursor", libprag.} + +proc cursor*(self: ptr TreeView00; path: var ptr TreePath00; focusColumn: var ptr TreeViewColumn00) {. + importc: "gtk_tree_view_get_cursor", libprag.} + +proc gtk_tree_view_get_enable_search*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_enable_search", libprag.} + +proc getEnableSearch*(self: TreeView): bool = + toBool(gtk_tree_view_get_enable_search(cast[ptr TreeView00](self.impl))) + +proc enableSearch*(self: TreeView): bool = + toBool(gtk_tree_view_get_enable_search(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_enable_tree_lines*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_enable_tree_lines", libprag.} + +proc getEnableTreeLines*(self: TreeView): bool = + toBool(gtk_tree_view_get_enable_tree_lines(cast[ptr TreeView00](self.impl))) + +proc enableTreeLines*(self: TreeView): bool = + toBool(gtk_tree_view_get_enable_tree_lines(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_expander_column*(self: ptr TreeView00): ptr TreeViewColumn00 {. + importc: "gtk_tree_view_get_expander_column", libprag.} + +proc getExpanderColumn*(self: TreeView): TreeViewColumn = + let gobj = gtk_tree_view_get_expander_column(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TreeViewColumn](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc expanderColumn*(self: TreeView): TreeViewColumn = + let gobj = gtk_tree_view_get_expander_column(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TreeViewColumn](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_get_fixed_height_mode*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_fixed_height_mode", libprag.} + +proc getFixedHeightMode*(self: TreeView): bool = + toBool(gtk_tree_view_get_fixed_height_mode(cast[ptr TreeView00](self.impl))) + +proc fixedHeightMode*(self: TreeView): bool = + toBool(gtk_tree_view_get_fixed_height_mode(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_hadjustment*(self: ptr TreeView00): ptr Adjustment00 {. + importc: "gtk_tree_view_get_hadjustment", libprag.} + +proc getHadjustment*(self: TreeView): Adjustment = + let gobj = gtk_tree_view_get_hadjustment(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc hadjustment*(self: TreeView): Adjustment = + let gobj = gtk_tree_view_get_hadjustment(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_get_headers_clickable*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_headers_clickable", libprag.} + +proc getHeadersClickable*(self: TreeView): bool = + toBool(gtk_tree_view_get_headers_clickable(cast[ptr TreeView00](self.impl))) + +proc headersClickable*(self: TreeView): bool = + toBool(gtk_tree_view_get_headers_clickable(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_headers_visible*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_headers_visible", libprag.} + +proc getHeadersVisible*(self: TreeView): bool = + toBool(gtk_tree_view_get_headers_visible(cast[ptr TreeView00](self.impl))) + +proc headersVisible*(self: TreeView): bool = + toBool(gtk_tree_view_get_headers_visible(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_hover_expand*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_hover_expand", libprag.} + +proc getHoverExpand*(self: TreeView): bool = + toBool(gtk_tree_view_get_hover_expand(cast[ptr TreeView00](self.impl))) + +proc hoverExpand*(self: TreeView): bool = + toBool(gtk_tree_view_get_hover_expand(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_hover_selection*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_hover_selection", libprag.} + +proc getHoverSelection*(self: TreeView): bool = + toBool(gtk_tree_view_get_hover_selection(cast[ptr TreeView00](self.impl))) + +proc hoverSelection*(self: TreeView): bool = + toBool(gtk_tree_view_get_hover_selection(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_level_indentation*(self: ptr TreeView00): int32 {. + importc: "gtk_tree_view_get_level_indentation", libprag.} + +proc getLevelIndentation*(self: TreeView): int = + int(gtk_tree_view_get_level_indentation(cast[ptr TreeView00](self.impl))) + +proc levelIndentation*(self: TreeView): int = + int(gtk_tree_view_get_level_indentation(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_model*(self: ptr TreeView00): ptr TreeModel00 {. + importc: "gtk_tree_view_get_model", libprag.} + +proc getModel*(self: TreeView): TreeModel = + new(result) + result.impl = gtk_tree_view_get_model(cast[ptr TreeView00](self.impl)) + +proc model*(self: TreeView): TreeModel = + new(result) + result.impl = gtk_tree_view_get_model(cast[ptr TreeView00](self.impl)) + +proc gtk_tree_view_get_n_columns*(self: ptr TreeView00): uint32 {. + importc: "gtk_tree_view_get_n_columns", libprag.} + +proc getNColumns*(self: TreeView): int = + int(gtk_tree_view_get_n_columns(cast[ptr TreeView00](self.impl))) + +proc nColumns*(self: TreeView): int = + int(gtk_tree_view_get_n_columns(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_path_at_pos*(self: ptr TreeView00; x: int32; y: int32; path: var ptr TreePath00; + column: var ptr TreeViewColumn00; cellX: var int32; cellY: var int32): gboolean {. + importc: "gtk_tree_view_get_path_at_pos", libprag.} + +proc getPathAtPos*(self: ptr TreeView00; x: int32; y: int32; path: var ptr TreePath00; + column: var ptr TreeViewColumn00; cellX: var int32; cellY: var int32): gboolean {. + importc: "gtk_tree_view_get_path_at_pos", libprag.} + +proc pathAtPos*(self: ptr TreeView00; x: int32; y: int32; path: var ptr TreePath00; + column: var ptr TreeViewColumn00; cellX: var int32; cellY: var int32): gboolean {. + importc: "gtk_tree_view_get_path_at_pos", libprag.} + +proc gtk_tree_view_get_reorderable*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_reorderable", libprag.} + +proc getReorderable*(self: TreeView): bool = + toBool(gtk_tree_view_get_reorderable(cast[ptr TreeView00](self.impl))) + +proc reorderable*(self: TreeView): bool = + toBool(gtk_tree_view_get_reorderable(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_rubber_banding*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_rubber_banding", libprag.} + +proc getRubberBanding*(self: TreeView): bool = + toBool(gtk_tree_view_get_rubber_banding(cast[ptr TreeView00](self.impl))) + +proc rubberBanding*(self: TreeView): bool = + toBool(gtk_tree_view_get_rubber_banding(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_rules_hint*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_rules_hint", libprag.} + +proc getRulesHint*(self: TreeView): bool = + toBool(gtk_tree_view_get_rules_hint(cast[ptr TreeView00](self.impl))) + +proc rulesHint*(self: TreeView): bool = + toBool(gtk_tree_view_get_rules_hint(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_search_column*(self: ptr TreeView00): int32 {. + importc: "gtk_tree_view_get_search_column", libprag.} + +proc getSearchColumn*(self: TreeView): int = + int(gtk_tree_view_get_search_column(cast[ptr TreeView00](self.impl))) + +proc searchColumn*(self: TreeView): int = + int(gtk_tree_view_get_search_column(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_search_entry*(self: ptr TreeView00): ptr Entry00 {. + importc: "gtk_tree_view_get_search_entry", libprag.} + +proc getSearchEntry*(self: TreeView): Entry = + let gobj = gtk_tree_view_get_search_entry(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Entry](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc searchEntry*(self: TreeView): Entry = + let gobj = gtk_tree_view_get_search_entry(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Entry](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_get_show_expanders*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_get_show_expanders", libprag.} + +proc getShowExpanders*(self: TreeView): bool = + toBool(gtk_tree_view_get_show_expanders(cast[ptr TreeView00](self.impl))) + +proc showExpanders*(self: TreeView): bool = + toBool(gtk_tree_view_get_show_expanders(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_tooltip_column*(self: ptr TreeView00): int32 {. + importc: "gtk_tree_view_get_tooltip_column", libprag.} + +proc getTooltipColumn*(self: TreeView): int = + int(gtk_tree_view_get_tooltip_column(cast[ptr TreeView00](self.impl))) + +proc tooltipColumn*(self: TreeView): int = + int(gtk_tree_view_get_tooltip_column(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_get_tooltip_context*(self: ptr TreeView00; x: int32; y: int32; keyboardTip: gboolean; + model: var ptr TreeModel00; path: var ptr TreePath00; iter: var TreeIter00): gboolean {. + importc: "gtk_tree_view_get_tooltip_context", libprag.} + +proc getTooltipContext*(self: ptr TreeView00; x: int32; y: int32; keyboardTip: gboolean; + model: var ptr TreeModel00; path: var ptr TreePath00; iter: var TreeIter00): gboolean {. + importc: "gtk_tree_view_get_tooltip_context", libprag.} + +proc tooltipContext*(self: ptr TreeView00; x: int32; y: int32; keyboardTip: gboolean; + model: var ptr TreeModel00; path: var ptr TreePath00; iter: var TreeIter00): gboolean {. + importc: "gtk_tree_view_get_tooltip_context", libprag.} + +proc gtk_tree_view_get_vadjustment*(self: ptr TreeView00): ptr Adjustment00 {. + importc: "gtk_tree_view_get_vadjustment", libprag.} + +proc getVadjustment*(self: TreeView): Adjustment = + let gobj = gtk_tree_view_get_vadjustment(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc vadjustment*(self: TreeView): Adjustment = + let gobj = gtk_tree_view_get_vadjustment(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_view_get_visible_range*(self: ptr TreeView00; startPath: var ptr TreePath00; + endPath: var ptr TreePath00): gboolean {. + importc: "gtk_tree_view_get_visible_range", libprag.} + +proc getVisibleRange*(self: ptr TreeView00; startPath: var ptr TreePath00; + endPath: var ptr TreePath00): gboolean {. + importc: "gtk_tree_view_get_visible_range", libprag.} + +proc visibleRange*(self: ptr TreeView00; startPath: var ptr TreePath00; + endPath: var ptr TreePath00): gboolean {. + importc: "gtk_tree_view_get_visible_range", libprag.} + +proc gtk_tree_view_get_visible_rect*(self: ptr TreeView00; visibleRect: var gdk.Rectangle00) {. + importc: "gtk_tree_view_get_visible_rect", libprag.} + +proc getVisibleRect*(self: ptr TreeView00; visibleRect: var gdk.Rectangle00) {. + importc: "gtk_tree_view_get_visible_rect", libprag.} + +proc visibleRect*(self: ptr TreeView00; visibleRect: var gdk.Rectangle00) {. + importc: "gtk_tree_view_get_visible_rect", libprag.} + +proc gtk_tree_view_insert_column*(self: ptr TreeView00; column: ptr TreeViewColumn00; + position: int32): int32 {. + importc: "gtk_tree_view_insert_column", libprag.} + +proc insertColumn*(self: TreeView; column: TreeViewColumn; position: int): int = + int(gtk_tree_view_insert_column(cast[ptr TreeView00](self.impl), cast[ptr TreeViewColumn00](column.impl), int32(position))) + +proc gtk_tree_view_insert_column_with_data_func*(self: ptr TreeView00; position: int32; title: cstring; + cell: ptr CellRenderer00; `func`: TreeCellDataFunc; data: pointer; dnotify: DestroyNotify): int32 {. + importc: "gtk_tree_view_insert_column_with_data_func", libprag.} + +proc insertColumnWithDataFunc*(self: TreeView; position: int; title: string; cell: CellRenderer; + `func`: TreeCellDataFunc; data: pointer; dnotify: DestroyNotify): int = + int(gtk_tree_view_insert_column_with_data_func(cast[ptr TreeView00](self.impl), int32(position), cstring(title), cast[ptr CellRenderer00](cell.impl), `func`, data, dnotify)) + +proc gtk_tree_view_is_blank_at_pos*(self: ptr TreeView00; x: int32; y: int32; path: var ptr TreePath00; + column: var ptr TreeViewColumn00; cellX: var int32; cellY: var int32): gboolean {. + importc: "gtk_tree_view_is_blank_at_pos", libprag.} + +proc isBlankAtPos*(self: ptr TreeView00; x: int32; y: int32; path: var ptr TreePath00; + column: var ptr TreeViewColumn00; cellX: var int32; cellY: var int32): gboolean {. + importc: "gtk_tree_view_is_blank_at_pos", libprag.} + +proc gtk_tree_view_is_rubber_banding_active*(self: ptr TreeView00): gboolean {. + importc: "gtk_tree_view_is_rubber_banding_active", libprag.} + +proc isRubberBandingActive*(self: TreeView): bool = + toBool(gtk_tree_view_is_rubber_banding_active(cast[ptr TreeView00](self.impl))) + +proc gtk_tree_view_move_column_after*(self: ptr TreeView00; column: ptr TreeViewColumn00; + baseColumn: ptr TreeViewColumn00) {. + importc: "gtk_tree_view_move_column_after", libprag.} + +proc moveColumnAfter*(self: TreeView; column: TreeViewColumn; baseColumn: TreeViewColumn) = + gtk_tree_view_move_column_after(cast[ptr TreeView00](self.impl), cast[ptr TreeViewColumn00](column.impl), cast[ptr TreeViewColumn00](baseColumn.impl)) + +proc gtk_tree_view_remove_column*(self: ptr TreeView00; column: ptr TreeViewColumn00): int32 {. + importc: "gtk_tree_view_remove_column", libprag.} + +proc removeColumn*(self: TreeView; column: TreeViewColumn): int = + int(gtk_tree_view_remove_column(cast[ptr TreeView00](self.impl), cast[ptr TreeViewColumn00](column.impl))) + +proc gtk_tree_view_row_activated*(self: ptr TreeView00; path: ptr TreePath00; column: ptr TreeViewColumn00) {. + importc: "gtk_tree_view_row_activated", libprag.} + +proc rowActivated*(self: TreeView; path: TreePath; column: TreeViewColumn) = + gtk_tree_view_row_activated(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr TreeViewColumn00](column.impl)) + +proc gtk_tree_view_row_expanded*(self: ptr TreeView00; path: ptr TreePath00): gboolean {. + importc: "gtk_tree_view_row_expanded", libprag.} + +proc rowExpanded*(self: TreeView; path: TreePath): bool = + toBool(gtk_tree_view_row_expanded(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl))) + +proc gtk_tree_view_scroll_to_cell*(self: ptr TreeView00; path: ptr TreePath00; column: ptr TreeViewColumn00; + useAlign: gboolean; rowAlign: cfloat; colAlign: cfloat) {. + importc: "gtk_tree_view_scroll_to_cell", libprag.} + +proc scrollToCell*(self: TreeView; path: TreePath; column: TreeViewColumn; + useAlign: bool; rowAlign: cfloat; colAlign: cfloat) = + gtk_tree_view_scroll_to_cell(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr TreeViewColumn00](column.impl), gboolean(useAlign), rowAlign, colAlign) + +proc gtk_tree_view_scroll_to_point*(self: ptr TreeView00; treeX: int32; treeY: int32) {. + importc: "gtk_tree_view_scroll_to_point", libprag.} + +proc scrollToPoint*(self: TreeView; treeX: int; treeY: int) = + gtk_tree_view_scroll_to_point(cast[ptr TreeView00](self.impl), int32(treeX), int32(treeY)) + +proc gtk_tree_view_set_activate_on_single_click*(self: ptr TreeView00; single: gboolean) {. + importc: "gtk_tree_view_set_activate_on_single_click", libprag.} + +proc setActivateOnSingleClick*(self: TreeView; single: bool) = + gtk_tree_view_set_activate_on_single_click(cast[ptr TreeView00](self.impl), gboolean(single)) + +proc `activateOnSingleClick=`*(self: TreeView; single: bool) = + gtk_tree_view_set_activate_on_single_click(cast[ptr TreeView00](self.impl), gboolean(single)) + +proc gtk_tree_view_set_cursor*(self: ptr TreeView00; path: ptr TreePath00; focusColumn: ptr TreeViewColumn00; + startEditing: gboolean) {. + importc: "gtk_tree_view_set_cursor", libprag.} + +proc setCursor*(self: TreeView; path: TreePath; focusColumn: TreeViewColumn; + startEditing: bool) = + gtk_tree_view_set_cursor(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr TreeViewColumn00](focusColumn.impl), gboolean(startEditing)) + +proc gtk_tree_view_set_cursor_on_cell*(self: ptr TreeView00; path: ptr TreePath00; focusColumn: ptr TreeViewColumn00; + focusCell: ptr CellRenderer00; startEditing: gboolean) {. + importc: "gtk_tree_view_set_cursor_on_cell", libprag.} + +proc setCursorOnCell*(self: TreeView; path: TreePath; focusColumn: TreeViewColumn; + focusCell: CellRenderer; startEditing: bool) = + gtk_tree_view_set_cursor_on_cell(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr TreeViewColumn00](focusColumn.impl), cast[ptr CellRenderer00](focusCell.impl), gboolean(startEditing)) + +proc gtk_tree_view_set_enable_search*(self: ptr TreeView00; enableSearch: gboolean) {. + importc: "gtk_tree_view_set_enable_search", libprag.} + +proc setEnableSearch*(self: TreeView; enableSearch: bool) = + gtk_tree_view_set_enable_search(cast[ptr TreeView00](self.impl), gboolean(enableSearch)) + +proc `enableSearch=`*(self: TreeView; enableSearch: bool) = + gtk_tree_view_set_enable_search(cast[ptr TreeView00](self.impl), gboolean(enableSearch)) + +proc gtk_tree_view_set_enable_tree_lines*(self: ptr TreeView00; enabled: gboolean) {. + importc: "gtk_tree_view_set_enable_tree_lines", libprag.} + +proc setEnableTreeLines*(self: TreeView; enabled: bool) = + gtk_tree_view_set_enable_tree_lines(cast[ptr TreeView00](self.impl), gboolean(enabled)) + +proc `enableTreeLines=`*(self: TreeView; enabled: bool) = + gtk_tree_view_set_enable_tree_lines(cast[ptr TreeView00](self.impl), gboolean(enabled)) + +proc gtk_tree_view_set_expander_column*(self: ptr TreeView00; column: ptr TreeViewColumn00) {. + importc: "gtk_tree_view_set_expander_column", libprag.} + +proc setExpanderColumn*(self: TreeView; column: TreeViewColumn) = + gtk_tree_view_set_expander_column(cast[ptr TreeView00](self.impl), cast[ptr TreeViewColumn00](column.impl)) + +proc `expanderColumn=`*(self: TreeView; column: TreeViewColumn) = + gtk_tree_view_set_expander_column(cast[ptr TreeView00](self.impl), cast[ptr TreeViewColumn00](column.impl)) + +proc gtk_tree_view_set_fixed_height_mode*(self: ptr TreeView00; enable: gboolean) {. + importc: "gtk_tree_view_set_fixed_height_mode", libprag.} + +proc setFixedHeightMode*(self: TreeView; enable: bool) = + gtk_tree_view_set_fixed_height_mode(cast[ptr TreeView00](self.impl), gboolean(enable)) + +proc `fixedHeightMode=`*(self: TreeView; enable: bool) = + gtk_tree_view_set_fixed_height_mode(cast[ptr TreeView00](self.impl), gboolean(enable)) + +proc gtk_tree_view_set_hadjustment*(self: ptr TreeView00; adjustment: ptr Adjustment00) {. + importc: "gtk_tree_view_set_hadjustment", libprag.} + +proc setHadjustment*(self: TreeView; adjustment: Adjustment) = + gtk_tree_view_set_hadjustment(cast[ptr TreeView00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `hadjustment=`*(self: TreeView; adjustment: Adjustment) = + gtk_tree_view_set_hadjustment(cast[ptr TreeView00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_tree_view_set_headers_clickable*(self: ptr TreeView00; setting: gboolean) {. + importc: "gtk_tree_view_set_headers_clickable", libprag.} + +proc setHeadersClickable*(self: TreeView; setting: bool) = + gtk_tree_view_set_headers_clickable(cast[ptr TreeView00](self.impl), gboolean(setting)) + +proc `headersClickable=`*(self: TreeView; setting: bool) = + gtk_tree_view_set_headers_clickable(cast[ptr TreeView00](self.impl), gboolean(setting)) + +proc gtk_tree_view_set_headers_visible*(self: ptr TreeView00; headersVisible: gboolean) {. + importc: "gtk_tree_view_set_headers_visible", libprag.} + +proc setHeadersVisible*(self: TreeView; headersVisible: bool) = + gtk_tree_view_set_headers_visible(cast[ptr TreeView00](self.impl), gboolean(headersVisible)) + +proc `headersVisible=`*(self: TreeView; headersVisible: bool) = + gtk_tree_view_set_headers_visible(cast[ptr TreeView00](self.impl), gboolean(headersVisible)) + +proc gtk_tree_view_set_hover_expand*(self: ptr TreeView00; expand: gboolean) {. + importc: "gtk_tree_view_set_hover_expand", libprag.} + +proc setHoverExpand*(self: TreeView; expand: bool) = + gtk_tree_view_set_hover_expand(cast[ptr TreeView00](self.impl), gboolean(expand)) + +proc `hoverExpand=`*(self: TreeView; expand: bool) = + gtk_tree_view_set_hover_expand(cast[ptr TreeView00](self.impl), gboolean(expand)) + +proc gtk_tree_view_set_hover_selection*(self: ptr TreeView00; hover: gboolean) {. + importc: "gtk_tree_view_set_hover_selection", libprag.} + +proc setHoverSelection*(self: TreeView; hover: bool) = + gtk_tree_view_set_hover_selection(cast[ptr TreeView00](self.impl), gboolean(hover)) + +proc `hoverSelection=`*(self: TreeView; hover: bool) = + gtk_tree_view_set_hover_selection(cast[ptr TreeView00](self.impl), gboolean(hover)) + +proc gtk_tree_view_set_level_indentation*(self: ptr TreeView00; indentation: int32) {. + importc: "gtk_tree_view_set_level_indentation", libprag.} + +proc setLevelIndentation*(self: TreeView; indentation: int) = + gtk_tree_view_set_level_indentation(cast[ptr TreeView00](self.impl), int32(indentation)) + +proc `levelIndentation=`*(self: TreeView; indentation: int) = + gtk_tree_view_set_level_indentation(cast[ptr TreeView00](self.impl), int32(indentation)) + +proc gtk_tree_view_set_model*(self: ptr TreeView00; model: ptr TreeModel00) {. + importc: "gtk_tree_view_set_model", libprag.} + +proc setModel*(self: TreeView; model: TreeModel) = + gtk_tree_view_set_model(cast[ptr TreeView00](self.impl), cast[ptr TreeModel00](model.impl)) + +proc `model=`*(self: TreeView; model: TreeModel) = + gtk_tree_view_set_model(cast[ptr TreeView00](self.impl), cast[ptr TreeModel00](model.impl)) + +proc gtk_tree_view_set_reorderable*(self: ptr TreeView00; reorderable: gboolean) {. + importc: "gtk_tree_view_set_reorderable", libprag.} + +proc setReorderable*(self: TreeView; reorderable: bool) = + gtk_tree_view_set_reorderable(cast[ptr TreeView00](self.impl), gboolean(reorderable)) + +proc `reorderable=`*(self: TreeView; reorderable: bool) = + gtk_tree_view_set_reorderable(cast[ptr TreeView00](self.impl), gboolean(reorderable)) + +proc gtk_tree_view_set_rubber_banding*(self: ptr TreeView00; enable: gboolean) {. + importc: "gtk_tree_view_set_rubber_banding", libprag.} + +proc setRubberBanding*(self: TreeView; enable: bool) = + gtk_tree_view_set_rubber_banding(cast[ptr TreeView00](self.impl), gboolean(enable)) + +proc `rubberBanding=`*(self: TreeView; enable: bool) = + gtk_tree_view_set_rubber_banding(cast[ptr TreeView00](self.impl), gboolean(enable)) + +proc gtk_tree_view_set_rules_hint*(self: ptr TreeView00; setting: gboolean) {. + importc: "gtk_tree_view_set_rules_hint", libprag.} + +proc setRulesHint*(self: TreeView; setting: bool) = + gtk_tree_view_set_rules_hint(cast[ptr TreeView00](self.impl), gboolean(setting)) + +proc `rulesHint=`*(self: TreeView; setting: bool) = + gtk_tree_view_set_rules_hint(cast[ptr TreeView00](self.impl), gboolean(setting)) + +proc gtk_tree_view_set_search_column*(self: ptr TreeView00; column: int32) {. + importc: "gtk_tree_view_set_search_column", libprag.} + +proc setSearchColumn*(self: TreeView; column: int) = + gtk_tree_view_set_search_column(cast[ptr TreeView00](self.impl), int32(column)) + +proc `searchColumn=`*(self: TreeView; column: int) = + gtk_tree_view_set_search_column(cast[ptr TreeView00](self.impl), int32(column)) + +proc gtk_tree_view_set_search_entry*(self: ptr TreeView00; entry: ptr Entry00) {. + importc: "gtk_tree_view_set_search_entry", libprag.} + +proc setSearchEntry*(self: TreeView; entry: Entry) = + gtk_tree_view_set_search_entry(cast[ptr TreeView00](self.impl), cast[ptr Entry00](entry.impl)) + +proc `searchEntry=`*(self: TreeView; entry: Entry) = + gtk_tree_view_set_search_entry(cast[ptr TreeView00](self.impl), cast[ptr Entry00](entry.impl)) + +proc gtk_tree_view_set_show_expanders*(self: ptr TreeView00; enabled: gboolean) {. + importc: "gtk_tree_view_set_show_expanders", libprag.} + +proc setShowExpanders*(self: TreeView; enabled: bool) = + gtk_tree_view_set_show_expanders(cast[ptr TreeView00](self.impl), gboolean(enabled)) + +proc `showExpanders=`*(self: TreeView; enabled: bool) = + gtk_tree_view_set_show_expanders(cast[ptr TreeView00](self.impl), gboolean(enabled)) + +proc gtk_tree_view_set_tooltip_cell*(self: ptr TreeView00; tooltip: ptr Tooltip00; path: ptr TreePath00; + column: ptr TreeViewColumn00; cell: ptr CellRenderer00) {. + importc: "gtk_tree_view_set_tooltip_cell", libprag.} + +proc setTooltipCell*(self: TreeView; tooltip: Tooltip; path: TreePath; + column: TreeViewColumn; cell: CellRenderer) = + gtk_tree_view_set_tooltip_cell(cast[ptr TreeView00](self.impl), cast[ptr Tooltip00](tooltip.impl), cast[ptr TreePath00](path.impl), cast[ptr TreeViewColumn00](column.impl), cast[ptr CellRenderer00](cell.impl)) + +proc gtk_tree_view_set_tooltip_column*(self: ptr TreeView00; column: int32) {. + importc: "gtk_tree_view_set_tooltip_column", libprag.} + +proc setTooltipColumn*(self: TreeView; column: int) = + gtk_tree_view_set_tooltip_column(cast[ptr TreeView00](self.impl), int32(column)) + +proc `tooltipColumn=`*(self: TreeView; column: int) = + gtk_tree_view_set_tooltip_column(cast[ptr TreeView00](self.impl), int32(column)) + +proc gtk_tree_view_set_tooltip_row*(self: ptr TreeView00; tooltip: ptr Tooltip00; path: ptr TreePath00) {. + importc: "gtk_tree_view_set_tooltip_row", libprag.} + +proc setTooltipRow*(self: TreeView; tooltip: Tooltip; path: TreePath) = + gtk_tree_view_set_tooltip_row(cast[ptr TreeView00](self.impl), cast[ptr Tooltip00](tooltip.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_tree_view_set_vadjustment*(self: ptr TreeView00; adjustment: ptr Adjustment00) {. + importc: "gtk_tree_view_set_vadjustment", libprag.} + +proc setVadjustment*(self: TreeView; adjustment: Adjustment) = + gtk_tree_view_set_vadjustment(cast[ptr TreeView00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `vadjustment=`*(self: TreeView; adjustment: Adjustment) = + gtk_tree_view_set_vadjustment(cast[ptr TreeView00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_tree_view_unset_rows_drag_dest*(self: ptr TreeView00) {. + importc: "gtk_tree_view_unset_rows_drag_dest", libprag.} + +proc unsetRowsDragDest*(self: TreeView) = + gtk_tree_view_unset_rows_drag_dest(cast[ptr TreeView00](self.impl)) + +proc gtk_tree_view_unset_rows_drag_source*(self: ptr TreeView00) {. + importc: "gtk_tree_view_unset_rows_drag_source", libprag.} + +proc unsetRowsDragSource*(self: TreeView) = + gtk_tree_view_unset_rows_drag_source(cast[ptr TreeView00](self.impl)) + +type + TreeDestroyCountFunc* = proc (treeView: ptr TreeView00; path: ptr TreePath00; children: int32; + userData: pointer) {.cdecl.} + +proc gtk_tree_view_set_destroy_count_func*(self: ptr TreeView00; `func`: TreeDestroyCountFunc; + data: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_view_set_destroy_count_func", libprag.} + +proc setDestroyCountFunc*(self: TreeView; `func`: TreeDestroyCountFunc; data: pointer; + destroy: DestroyNotify) = + gtk_tree_view_set_destroy_count_func(cast[ptr TreeView00](self.impl), `func`, data, destroy) + +type + TreeSelectionPrivate00* {.pure.} = object + TreeSelectionPrivate* = ref object + impl*: ptr TreeSelectionPrivate00 + +type + TreeSelection* = ref object of gobject.Object + TreeSelection00* = object of gobject.Object00 + priv1: ptr TreeSelectionPrivate00 + +proc scChanged*(self: TreeSelection; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_tree_selection_count_selected_rows*(self: ptr TreeSelection00): int32 {. + importc: "gtk_tree_selection_count_selected_rows", libprag.} + +proc countSelectedRows*(self: TreeSelection): int = + int(gtk_tree_selection_count_selected_rows(cast[ptr TreeSelection00](self.impl))) + +proc gtk_tree_selection_get_mode*(self: ptr TreeSelection00): SelectionMode {. + importc: "gtk_tree_selection_get_mode", libprag.} + +proc getMode*(self: TreeSelection): SelectionMode = + gtk_tree_selection_get_mode(cast[ptr TreeSelection00](self.impl)) + +proc mode*(self: TreeSelection): SelectionMode = + gtk_tree_selection_get_mode(cast[ptr TreeSelection00](self.impl)) + +proc gtk_tree_selection_get_selected*(self: ptr TreeSelection00; model: var ptr TreeModel00; + iter: var TreeIter00): gboolean {. + importc: "gtk_tree_selection_get_selected", libprag.} + +proc getSelected*(self: ptr TreeSelection00; model: var ptr TreeModel00; + iter: var TreeIter00): gboolean {. + importc: "gtk_tree_selection_get_selected", libprag.} + +proc selected*(self: ptr TreeSelection00; model: var ptr TreeModel00; + iter: var TreeIter00): gboolean {. + importc: "gtk_tree_selection_get_selected", libprag.} + +proc gtk_tree_selection_get_selected_rows*(self: ptr TreeSelection00; model: var ptr TreeModel00): ptr pointer {. + importc: "gtk_tree_selection_get_selected_rows", libprag.} + +proc getSelectedRows*(self: ptr TreeSelection00; model: var ptr TreeModel00): ptr pointer {. + importc: "gtk_tree_selection_get_selected_rows", libprag.} + +proc selectedRows*(self: ptr TreeSelection00; model: var ptr TreeModel00): ptr pointer {. + importc: "gtk_tree_selection_get_selected_rows", libprag.} + +proc gtk_tree_selection_get_tree_view*(self: ptr TreeSelection00): ptr TreeView00 {. + importc: "gtk_tree_selection_get_tree_view", libprag.} + +proc getTreeView*(self: TreeSelection): TreeView = + let gobj = gtk_tree_selection_get_tree_view(cast[ptr TreeSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TreeView](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc treeView*(self: TreeSelection): TreeView = + let gobj = gtk_tree_selection_get_tree_view(cast[ptr TreeSelection00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TreeView](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_selection_iter_is_selected*(self: ptr TreeSelection00; iter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_selection_iter_is_selected", libprag.} + +proc iterIsSelected*(self: TreeSelection; iter: TreeIter): bool = + toBool(gtk_tree_selection_iter_is_selected(cast[ptr TreeSelection00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_tree_selection_path_is_selected*(self: ptr TreeSelection00; path: ptr TreePath00): gboolean {. + importc: "gtk_tree_selection_path_is_selected", libprag.} + +proc pathIsSelected*(self: TreeSelection; path: TreePath): bool = + toBool(gtk_tree_selection_path_is_selected(cast[ptr TreeSelection00](self.impl), cast[ptr TreePath00](path.impl))) + +proc gtk_tree_selection_select_all*(self: ptr TreeSelection00) {. + importc: "gtk_tree_selection_select_all", libprag.} + +proc selectAll*(self: TreeSelection) = + gtk_tree_selection_select_all(cast[ptr TreeSelection00](self.impl)) + +proc gtk_tree_selection_select_iter*(self: ptr TreeSelection00; iter: ptr TreeIter00) {. + importc: "gtk_tree_selection_select_iter", libprag.} + +proc selectIter*(self: TreeSelection; iter: TreeIter) = + gtk_tree_selection_select_iter(cast[ptr TreeSelection00](self.impl), cast[ptr TreeIter00](iter.impl)) + +proc gtk_tree_selection_select_path*(self: ptr TreeSelection00; path: ptr TreePath00) {. + importc: "gtk_tree_selection_select_path", libprag.} + +proc selectPath*(self: TreeSelection; path: TreePath) = + gtk_tree_selection_select_path(cast[ptr TreeSelection00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_tree_selection_select_range*(self: ptr TreeSelection00; startPath: ptr TreePath00; + endPath: ptr TreePath00) {. + importc: "gtk_tree_selection_select_range", libprag.} + +proc selectRange*(self: TreeSelection; startPath: TreePath; endPath: TreePath) = + gtk_tree_selection_select_range(cast[ptr TreeSelection00](self.impl), cast[ptr TreePath00](startPath.impl), cast[ptr TreePath00](endPath.impl)) + +proc gtk_tree_selection_set_mode*(self: ptr TreeSelection00; `type`: SelectionMode) {. + importc: "gtk_tree_selection_set_mode", libprag.} + +proc setMode*(self: TreeSelection; `type`: SelectionMode) = + gtk_tree_selection_set_mode(cast[ptr TreeSelection00](self.impl), `type`) + +proc `mode=`*(self: TreeSelection; `type`: SelectionMode) = + gtk_tree_selection_set_mode(cast[ptr TreeSelection00](self.impl), `type`) + +proc gtk_tree_selection_unselect_all*(self: ptr TreeSelection00) {. + importc: "gtk_tree_selection_unselect_all", libprag.} + +proc unselectAll*(self: TreeSelection) = + gtk_tree_selection_unselect_all(cast[ptr TreeSelection00](self.impl)) + +proc gtk_tree_selection_unselect_iter*(self: ptr TreeSelection00; iter: ptr TreeIter00) {. + importc: "gtk_tree_selection_unselect_iter", libprag.} + +proc unselectIter*(self: TreeSelection; iter: TreeIter) = + gtk_tree_selection_unselect_iter(cast[ptr TreeSelection00](self.impl), cast[ptr TreeIter00](iter.impl)) + +proc gtk_tree_selection_unselect_path*(self: ptr TreeSelection00; path: ptr TreePath00) {. + importc: "gtk_tree_selection_unselect_path", libprag.} + +proc unselectPath*(self: TreeSelection; path: TreePath) = + gtk_tree_selection_unselect_path(cast[ptr TreeSelection00](self.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_tree_selection_unselect_range*(self: ptr TreeSelection00; startPath: ptr TreePath00; + endPath: ptr TreePath00) {. + importc: "gtk_tree_selection_unselect_range", libprag.} + +proc unselectRange*(self: TreeSelection; startPath: TreePath; endPath: TreePath) = + gtk_tree_selection_unselect_range(cast[ptr TreeSelection00](self.impl), cast[ptr TreePath00](startPath.impl), cast[ptr TreePath00](endPath.impl)) + +proc gtk_tree_view_get_selection*(self: ptr TreeView00): ptr TreeSelection00 {. + importc: "gtk_tree_view_get_selection", libprag.} + +proc getSelection*(self: TreeView): TreeSelection = + let gobj = gtk_tree_view_get_selection(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TreeSelection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc selection*(self: TreeView): TreeSelection = + let gobj = gtk_tree_view_get_selection(cast[ptr TreeView00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[TreeSelection](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + TreeViewDropPosition* {.size: sizeof(cint), pure.} = enum + before = 0 + after = 1 + intoOrBefore = 2 + intoOrAfter = 3 + +proc gtk_tree_view_get_dest_row_at_pos*(self: ptr TreeView00; dragX: int32; dragY: int32; + path: var ptr TreePath00; pos: var TreeViewDropPosition): gboolean {. + importc: "gtk_tree_view_get_dest_row_at_pos", libprag.} + +proc getDestRowAtPos*(self: ptr TreeView00; dragX: int32; dragY: int32; + path: var ptr TreePath00; pos: var TreeViewDropPosition): gboolean {. + importc: "gtk_tree_view_get_dest_row_at_pos", libprag.} + +proc destRowAtPos*(self: ptr TreeView00; dragX: int32; dragY: int32; + path: var ptr TreePath00; pos: var TreeViewDropPosition): gboolean {. + importc: "gtk_tree_view_get_dest_row_at_pos", libprag.} + +proc gtk_tree_view_get_drag_dest_row*(self: ptr TreeView00; path: var ptr TreePath00; pos: var TreeViewDropPosition) {. + importc: "gtk_tree_view_get_drag_dest_row", libprag.} + +proc getDragDestRow*(self: ptr TreeView00; path: var ptr TreePath00; pos: var TreeViewDropPosition) {. + importc: "gtk_tree_view_get_drag_dest_row", libprag.} + +proc dragDestRow*(self: ptr TreeView00; path: var ptr TreePath00; pos: var TreeViewDropPosition) {. + importc: "gtk_tree_view_get_drag_dest_row", libprag.} + +proc gtk_tree_view_set_drag_dest_row*(self: ptr TreeView00; path: ptr TreePath00; pos: TreeViewDropPosition) {. + importc: "gtk_tree_view_set_drag_dest_row", libprag.} + +proc setDragDestRow*(self: TreeView; path: TreePath; pos: TreeViewDropPosition) = + gtk_tree_view_set_drag_dest_row(cast[ptr TreeView00](self.impl), cast[ptr TreePath00](path.impl), pos) + +type + TreeViewGridLines* {.size: sizeof(cint), pure.} = enum + none = 0 + horizontal = 1 + vertical = 2 + both = 3 + +proc gtk_tree_view_get_grid_lines*(self: ptr TreeView00): TreeViewGridLines {. + importc: "gtk_tree_view_get_grid_lines", libprag.} + +proc getGridLines*(self: TreeView): TreeViewGridLines = + gtk_tree_view_get_grid_lines(cast[ptr TreeView00](self.impl)) + +proc gridLines*(self: TreeView): TreeViewGridLines = + gtk_tree_view_get_grid_lines(cast[ptr TreeView00](self.impl)) + +proc gtk_tree_view_set_grid_lines*(self: ptr TreeView00; gridLines: TreeViewGridLines) {. + importc: "gtk_tree_view_set_grid_lines", libprag.} + +proc setGridLines*(self: TreeView; gridLines: TreeViewGridLines) = + gtk_tree_view_set_grid_lines(cast[ptr TreeView00](self.impl), gridLines) + +proc `gridLines=`*(self: TreeView; gridLines: TreeViewGridLines) = + gtk_tree_view_set_grid_lines(cast[ptr TreeView00](self.impl), gridLines) + +type + TreeDragDest00* {.pure.} = object + TreeDragDest* = ref object + impl*: ptr TreeDragDest00 + +proc gtk_tree_drag_dest_drag_data_received*(self: ptr TreeDragDest00; dest: ptr TreePath00; selectionData: ptr SelectionData00): gboolean {. + importc: "gtk_tree_drag_dest_drag_data_received", libprag.} + +proc dragDataReceived*(self: TreeDragDest; dest: TreePath; selectionData: SelectionData): bool = + toBool(gtk_tree_drag_dest_drag_data_received(cast[ptr TreeDragDest00](self.impl), cast[ptr TreePath00](dest.impl), cast[ptr SelectionData00](selectionData.impl))) + +proc gtk_tree_drag_dest_row_drop_possible*(self: ptr TreeDragDest00; destPath: ptr TreePath00; + selectionData: ptr SelectionData00): gboolean {. + importc: "gtk_tree_drag_dest_row_drop_possible", libprag.} + +proc rowDropPossible*(self: TreeDragDest; destPath: TreePath; selectionData: SelectionData): bool = + toBool(gtk_tree_drag_dest_row_drop_possible(cast[ptr TreeDragDest00](self.impl), cast[ptr TreePath00](destPath.impl), cast[ptr SelectionData00](selectionData.impl))) + +type + TreeDragDestIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + dragDataReceived*: proc(dragDest: ptr TreeDragDest00; dest: ptr TreePath00; + selectionData: ptr SelectionData00): gboolean {.cdecl.} + rowDropPossible*: proc(dragDest: ptr TreeDragDest00; destPath: ptr TreePath00; + selectionData: ptr SelectionData00): gboolean {.cdecl.} + TreeDragDestIface* = ref object + impl*: ptr TreeDragDestIface00 + +type + TreeDragSource00* {.pure.} = object + TreeDragSource* = ref object + impl*: ptr TreeDragSource00 + +proc gtk_tree_drag_source_drag_data_delete*(self: ptr TreeDragSource00; path: ptr TreePath00): gboolean {. + importc: "gtk_tree_drag_source_drag_data_delete", libprag.} + +proc dragDataDelete*(self: TreeDragSource; path: TreePath): bool = + toBool(gtk_tree_drag_source_drag_data_delete(cast[ptr TreeDragSource00](self.impl), cast[ptr TreePath00](path.impl))) + +proc gtk_tree_drag_source_drag_data_get*(self: ptr TreeDragSource00; path: ptr TreePath00; + selectionData: ptr SelectionData00): gboolean {. + importc: "gtk_tree_drag_source_drag_data_get", libprag.} + +proc dragDataGet*(self: TreeDragSource; path: TreePath; selectionData: SelectionData): bool = + toBool(gtk_tree_drag_source_drag_data_get(cast[ptr TreeDragSource00](self.impl), cast[ptr TreePath00](path.impl), cast[ptr SelectionData00](selectionData.impl))) + +proc gtk_tree_drag_source_row_draggable*(self: ptr TreeDragSource00; path: ptr TreePath00): gboolean {. + importc: "gtk_tree_drag_source_row_draggable", libprag.} + +proc rowDraggable*(self: TreeDragSource; path: TreePath): bool = + toBool(gtk_tree_drag_source_row_draggable(cast[ptr TreeDragSource00](self.impl), cast[ptr TreePath00](path.impl))) + +type + TreeDragSourceIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + rowDraggable*: proc(dragSource: ptr TreeDragSource00; path: ptr TreePath00): gboolean {.cdecl.} + dragDataGet*: proc(dragSource: ptr TreeDragSource00; path: ptr TreePath00; + selectionData: ptr SelectionData00): gboolean {.cdecl.} + dragDataDelete*: proc(dragSource: ptr TreeDragSource00; path: ptr TreePath00): gboolean {.cdecl.} + TreeDragSourceIface* = ref object + impl*: ptr TreeDragSourceIface00 + +type + TreeIterCompareFunc* = proc (model: ptr TreeModel00; a: ptr TreeIter00; b: ptr TreeIter00; + userData: pointer): int32 {.cdecl.} + +type + TreeModelFilterPrivate00* {.pure.} = object + TreeModelFilterPrivate* = ref object + impl*: ptr TreeModelFilterPrivate00 + +type + TreeModelFilter* = ref object of gobject.Object + TreeModelFilter00* = object of gobject.Object00 + priv1: ptr TreeModelFilterPrivate00 + +proc gtk_tree_model_filter_clear_cache*(self: ptr TreeModelFilter00) {. + importc: "gtk_tree_model_filter_clear_cache", libprag.} + +proc clearCache*(self: TreeModelFilter) = + gtk_tree_model_filter_clear_cache(cast[ptr TreeModelFilter00](self.impl)) + +proc gtk_tree_model_filter_convert_child_iter_to_iter*(self: ptr TreeModelFilter00; filterIter: var TreeIter00; + childIter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_filter_convert_child_iter_to_iter", libprag.} + +proc convertChildIterToIter*(self: ptr TreeModelFilter00; filterIter: var TreeIter00; + childIter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_filter_convert_child_iter_to_iter", libprag.} + +proc gtk_tree_model_filter_convert_child_path_to_path*(self: ptr TreeModelFilter00; childPath: ptr TreePath00): ptr TreePath00 {. + importc: "gtk_tree_model_filter_convert_child_path_to_path", libprag.} + +proc convertChildPathToPath*(self: TreeModelFilter; childPath: TreePath): TreePath = + new(result) + result.impl = gtk_tree_model_filter_convert_child_path_to_path(cast[ptr TreeModelFilter00](self.impl), cast[ptr TreePath00](childPath.impl)) + +proc gtk_tree_model_filter_convert_iter_to_child_iter*(self: ptr TreeModelFilter00; childIter: var TreeIter00; + filterIter: ptr TreeIter00) {. + importc: "gtk_tree_model_filter_convert_iter_to_child_iter", libprag.} + +proc convertIterToChildIter*(self: ptr TreeModelFilter00; childIter: var TreeIter00; + filterIter: ptr TreeIter00) {. + importc: "gtk_tree_model_filter_convert_iter_to_child_iter", libprag.} + +proc gtk_tree_model_filter_convert_path_to_child_path*(self: ptr TreeModelFilter00; filterPath: ptr TreePath00): ptr TreePath00 {. + importc: "gtk_tree_model_filter_convert_path_to_child_path", libprag.} + +proc convertPathToChildPath*(self: TreeModelFilter; filterPath: TreePath): TreePath = + new(result) + result.impl = gtk_tree_model_filter_convert_path_to_child_path(cast[ptr TreeModelFilter00](self.impl), cast[ptr TreePath00](filterPath.impl)) + +proc gtk_tree_model_filter_get_model*(self: ptr TreeModelFilter00): ptr TreeModel00 {. + importc: "gtk_tree_model_filter_get_model", libprag.} + +proc getModel*(self: TreeModelFilter): TreeModel = + new(result) + result.impl = gtk_tree_model_filter_get_model(cast[ptr TreeModelFilter00](self.impl)) + +proc model*(self: TreeModelFilter): TreeModel = + new(result) + result.impl = gtk_tree_model_filter_get_model(cast[ptr TreeModelFilter00](self.impl)) + +proc gtk_tree_model_filter_refilter*(self: ptr TreeModelFilter00) {. + importc: "gtk_tree_model_filter_refilter", libprag.} + +proc refilter*(self: TreeModelFilter) = + gtk_tree_model_filter_refilter(cast[ptr TreeModelFilter00](self.impl)) + +proc gtk_tree_model_filter_set_visible_column*(self: ptr TreeModelFilter00; column: int32) {. + importc: "gtk_tree_model_filter_set_visible_column", libprag.} + +proc setVisibleColumn*(self: TreeModelFilter; column: int) = + gtk_tree_model_filter_set_visible_column(cast[ptr TreeModelFilter00](self.impl), int32(column)) + +proc `visibleColumn=`*(self: TreeModelFilter; column: int) = + gtk_tree_model_filter_set_visible_column(cast[ptr TreeModelFilter00](self.impl), int32(column)) + +type + TreeModelFilterClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + visible*: proc(self: ptr TreeModelFilter00; childModel: ptr TreeModel00; + iter: ptr TreeIter00): gboolean {.cdecl.} + modify*: proc(self: ptr TreeModelFilter00; childModel: ptr TreeModel00; + iter: ptr TreeIter00; value: ptr gobject.Value00; column: int32) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TreeModelFilterClass* = ref object + impl*: ptr TreeModelFilterClass00 + +type + TreeModelFilterModifyFunc* = proc (model: ptr TreeModel00; iter: ptr TreeIter00; value: var gobject.Value00; + column: int32; data: pointer) {.cdecl.} + +proc gtk_tree_model_filter_set_modify_func*(self: ptr TreeModelFilter00; nColumns: int32; types: GTypeArray; + `func`: TreeModelFilterModifyFunc; data: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_model_filter_set_modify_func", libprag.} + +proc setModifyFunc*(self: TreeModelFilter; nColumns: int; types: GTypeArray; + `func`: TreeModelFilterModifyFunc; data: pointer; destroy: DestroyNotify) = + gtk_tree_model_filter_set_modify_func(cast[ptr TreeModelFilter00](self.impl), int32(nColumns), types, `func`, data, destroy) + +type + TreeModelFilterVisibleFunc* = proc (model: ptr TreeModel00; iter: ptr TreeIter00; data: pointer): gboolean {.cdecl.} + +proc gtk_tree_model_filter_set_visible_func*(self: ptr TreeModelFilter00; `func`: TreeModelFilterVisibleFunc; + data: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_model_filter_set_visible_func", libprag.} + +proc setVisibleFunc*(self: TreeModelFilter; `func`: TreeModelFilterVisibleFunc; + data: pointer; destroy: DestroyNotify) = + gtk_tree_model_filter_set_visible_func(cast[ptr TreeModelFilter00](self.impl), `func`, data, destroy) + +type + TreeModelForeachFunc* = proc (model: ptr TreeModel00; path: ptr TreePath00; iter: ptr TreeIter00; + data: pointer): gboolean {.cdecl.} + +proc gtk_tree_model_foreach*(self: ptr TreeModel00; `func`: TreeModelForeachFunc; + userData: pointer) {. + importc: "gtk_tree_model_foreach", libprag.} + +proc foreach*(self: TreeModel; `func`: TreeModelForeachFunc; userData: pointer) = + gtk_tree_model_foreach(cast[ptr TreeModel00](self.impl), `func`, userData) + +type + TreeModelIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + rowChanged*: proc(treeModel: ptr TreeModel00; path: ptr TreePath00; + iter: ptr TreeIter00) {.cdecl.} + rowInserted*: proc(treeModel: ptr TreeModel00; path: ptr TreePath00; + iter: ptr TreeIter00) {.cdecl.} + rowHasChildToggled*: proc(treeModel: ptr TreeModel00; path: ptr TreePath00; + iter: ptr TreeIter00) {.cdecl.} + rowDeleted*: proc(treeModel: ptr TreeModel00; path: ptr TreePath00) {.cdecl.} + rowsReordered*: proc(treeModel: ptr TreeModel00; path: ptr TreePath00; + iter: ptr TreeIter00; newOrder: ptr int32) {.cdecl.} + getFlags*: proc(treeModel: ptr TreeModel00): TreeModelFlags {.cdecl.} + getNColumns*: proc(treeModel: ptr TreeModel00): int32 {.cdecl.} + getColumnType*: proc(treeModel: ptr TreeModel00; index: int32): GType {.cdecl.} + getIter*: proc(treeModel: ptr TreeModel00; iter: var TreeIter00; + path: ptr TreePath00): gboolean {.cdecl.} + getPath*: proc(treeModel: ptr TreeModel00; iter: ptr TreeIter00): ptr TreePath00 {.cdecl.} + getValue*: proc(treeModel: ptr TreeModel00; iter: ptr TreeIter00; + column: int32; value: var gobject.Value00) {.cdecl.} + iterNext*: proc(treeModel: ptr TreeModel00; iter: ptr TreeIter00): gboolean {.cdecl.} + iterPrevious*: proc(treeModel: ptr TreeModel00; iter: ptr TreeIter00): gboolean {.cdecl.} + iterChildren*: proc(treeModel: ptr TreeModel00; iter: var TreeIter00; + parent: ptr TreeIter00): gboolean {.cdecl.} + iterHasChild*: proc(treeModel: ptr TreeModel00; iter: ptr TreeIter00): gboolean {.cdecl.} + iterNChildren*: proc(treeModel: ptr TreeModel00; iter: ptr TreeIter00): int32 {.cdecl.} + iterNthChild*: proc(treeModel: ptr TreeModel00; iter: var TreeIter00; + parent: ptr TreeIter00; n: int32): gboolean {.cdecl.} + iterParent*: proc(treeModel: ptr TreeModel00; iter: var TreeIter00; + child: ptr TreeIter00): gboolean {.cdecl.} + refNode*: proc(treeModel: ptr TreeModel00; iter: ptr TreeIter00) {.cdecl.} + unrefNode*: proc(treeModel: ptr TreeModel00; iter: ptr TreeIter00) {.cdecl.} + TreeModelIface* = ref object + impl*: ptr TreeModelIface00 + +type + TreeModelSortPrivate00* {.pure.} = object + TreeModelSortPrivate* = ref object + impl*: ptr TreeModelSortPrivate00 + +type + TreeModelSort* = ref object of gobject.Object + TreeModelSort00* = object of gobject.Object00 + priv1: ptr TreeModelSortPrivate00 + +proc gtk_tree_model_sort_clear_cache*(self: ptr TreeModelSort00) {. + importc: "gtk_tree_model_sort_clear_cache", libprag.} + +proc clearCache*(self: TreeModelSort) = + gtk_tree_model_sort_clear_cache(cast[ptr TreeModelSort00](self.impl)) + +proc gtk_tree_model_sort_convert_child_iter_to_iter*(self: ptr TreeModelSort00; sortIter: var TreeIter00; + childIter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_sort_convert_child_iter_to_iter", libprag.} + +proc convertChildIterToIter*(self: ptr TreeModelSort00; sortIter: var TreeIter00; + childIter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_sort_convert_child_iter_to_iter", libprag.} + +proc gtk_tree_model_sort_convert_child_path_to_path*(self: ptr TreeModelSort00; childPath: ptr TreePath00): ptr TreePath00 {. + importc: "gtk_tree_model_sort_convert_child_path_to_path", libprag.} + +proc convertChildPathToPath*(self: TreeModelSort; childPath: TreePath): TreePath = + new(result) + result.impl = gtk_tree_model_sort_convert_child_path_to_path(cast[ptr TreeModelSort00](self.impl), cast[ptr TreePath00](childPath.impl)) + +proc gtk_tree_model_sort_convert_iter_to_child_iter*(self: ptr TreeModelSort00; childIter: var TreeIter00; + sortedIter: ptr TreeIter00) {. + importc: "gtk_tree_model_sort_convert_iter_to_child_iter", libprag.} + +proc convertIterToChildIter*(self: ptr TreeModelSort00; childIter: var TreeIter00; + sortedIter: ptr TreeIter00) {. + importc: "gtk_tree_model_sort_convert_iter_to_child_iter", libprag.} + +proc gtk_tree_model_sort_convert_path_to_child_path*(self: ptr TreeModelSort00; sortedPath: ptr TreePath00): ptr TreePath00 {. + importc: "gtk_tree_model_sort_convert_path_to_child_path", libprag.} + +proc convertPathToChildPath*(self: TreeModelSort; sortedPath: TreePath): TreePath = + new(result) + result.impl = gtk_tree_model_sort_convert_path_to_child_path(cast[ptr TreeModelSort00](self.impl), cast[ptr TreePath00](sortedPath.impl)) + +proc gtk_tree_model_sort_get_model*(self: ptr TreeModelSort00): ptr TreeModel00 {. + importc: "gtk_tree_model_sort_get_model", libprag.} + +proc getModel*(self: TreeModelSort): TreeModel = + new(result) + result.impl = gtk_tree_model_sort_get_model(cast[ptr TreeModelSort00](self.impl)) + +proc model*(self: TreeModelSort): TreeModel = + new(result) + result.impl = gtk_tree_model_sort_get_model(cast[ptr TreeModelSort00](self.impl)) + +proc gtk_tree_model_sort_iter_is_valid*(self: ptr TreeModelSort00; iter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_model_sort_iter_is_valid", libprag.} + +proc iterIsValid*(self: TreeModelSort; iter: TreeIter): bool = + toBool(gtk_tree_model_sort_iter_is_valid(cast[ptr TreeModelSort00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_tree_model_sort_reset_default_sort_func*(self: ptr TreeModelSort00) {. + importc: "gtk_tree_model_sort_reset_default_sort_func", libprag.} + +proc resetDefaultSortFunc*(self: TreeModelSort) = + gtk_tree_model_sort_reset_default_sort_func(cast[ptr TreeModelSort00](self.impl)) + +type + TreeModelSortClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TreeModelSortClass* = ref object + impl*: ptr TreeModelSortClass00 + +type + TreeRowReference00* {.pure.} = object + TreeRowReference* = ref object + impl*: ptr TreeRowReference00 + +proc gtk_tree_row_reference_new*(model: ptr TreeModel00; path: ptr TreePath00): ptr TreeRowReference00 {. + importc: "gtk_tree_row_reference_new", libprag.} + +proc newTreeRowReference*(model: TreeModel; path: TreePath): TreeRowReference = + new(result) + result.impl = gtk_tree_row_reference_new(cast[ptr TreeModel00](model.impl), cast[ptr TreePath00](path.impl)) + +proc initTreeRowReference*[T](result: var T; model: TreeModel; path: TreePath) = + assert(result is TreeRowReference) + new(result) + result.impl = gtk_tree_row_reference_new(cast[ptr TreeModel00](model.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_tree_row_reference_new_proxy*(proxy: ptr gobject.Object00; model: ptr TreeModel00; + path: ptr TreePath00): ptr TreeRowReference00 {. + importc: "gtk_tree_row_reference_new_proxy", libprag.} + +proc newTreeRowReferenceProxy*(proxy: gobject.Object; model: TreeModel; path: TreePath): TreeRowReference = + new(result) + result.impl = gtk_tree_row_reference_new_proxy(cast[ptr gobject.Object00](proxy.impl), cast[ptr TreeModel00](model.impl), cast[ptr TreePath00](path.impl)) + +proc initTreeRowReferenceProxy*[T](result: var T; proxy: gobject.Object; model: TreeModel; path: TreePath) = + assert(result is TreeRowReference) + new(result) + result.impl = gtk_tree_row_reference_new_proxy(cast[ptr gobject.Object00](proxy.impl), cast[ptr TreeModel00](model.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_tree_row_reference_copy*(self: ptr TreeRowReference00): ptr TreeRowReference00 {. + importc: "gtk_tree_row_reference_copy", libprag.} + +proc copy*(self: TreeRowReference): TreeRowReference = + new(result) + result.impl = gtk_tree_row_reference_copy(cast[ptr TreeRowReference00](self.impl)) + +proc gtk_tree_row_reference_free*(self: ptr TreeRowReference00) {. + importc: "gtk_tree_row_reference_free", libprag.} + +proc free*(self: TreeRowReference) = + gtk_tree_row_reference_free(cast[ptr TreeRowReference00](self.impl)) + +proc gtk_tree_row_reference_get_model*(self: ptr TreeRowReference00): ptr TreeModel00 {. + importc: "gtk_tree_row_reference_get_model", libprag.} + +proc getModel*(self: TreeRowReference): TreeModel = + new(result) + result.impl = gtk_tree_row_reference_get_model(cast[ptr TreeRowReference00](self.impl)) + +proc model*(self: TreeRowReference): TreeModel = + new(result) + result.impl = gtk_tree_row_reference_get_model(cast[ptr TreeRowReference00](self.impl)) + +proc gtk_tree_row_reference_get_path*(self: ptr TreeRowReference00): ptr TreePath00 {. + importc: "gtk_tree_row_reference_get_path", libprag.} + +proc getPath*(self: TreeRowReference): TreePath = + new(result) + result.impl = gtk_tree_row_reference_get_path(cast[ptr TreeRowReference00](self.impl)) + +proc path*(self: TreeRowReference): TreePath = + new(result) + result.impl = gtk_tree_row_reference_get_path(cast[ptr TreeRowReference00](self.impl)) + +proc gtk_tree_row_reference_valid*(self: ptr TreeRowReference00): gboolean {. + importc: "gtk_tree_row_reference_valid", libprag.} + +proc valid*(self: TreeRowReference): bool = + toBool(gtk_tree_row_reference_valid(cast[ptr TreeRowReference00](self.impl))) + +proc gtk_tree_row_reference_deleted*(proxy: ptr gobject.Object00; path: ptr TreePath00) {. + importc: "gtk_tree_row_reference_deleted", libprag.} + +proc deleted*(proxy: gobject.Object; path: TreePath) = + gtk_tree_row_reference_deleted(cast[ptr gobject.Object00](proxy.impl), cast[ptr TreePath00](path.impl)) + +proc gtk_tree_row_reference_inserted*(proxy: ptr gobject.Object00; path: ptr TreePath00) {. + importc: "gtk_tree_row_reference_inserted", libprag.} + +proc inserted*(proxy: gobject.Object; path: TreePath) = + gtk_tree_row_reference_inserted(cast[ptr gobject.Object00](proxy.impl), cast[ptr TreePath00](path.impl)) + +type + TreeSelectionClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + changed*: proc(selection: ptr TreeSelection00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TreeSelectionClass* = ref object + impl*: ptr TreeSelectionClass00 + +type + TreeSelectionForeachFunc* = proc (model: ptr TreeModel00; path: ptr TreePath00; iter: ptr TreeIter00; + data: pointer) {.cdecl.} + +proc gtk_tree_selection_selected_foreach*(self: ptr TreeSelection00; `func`: TreeSelectionForeachFunc; + data: pointer) {. + importc: "gtk_tree_selection_selected_foreach", libprag.} + +proc selectedForeach*(self: TreeSelection; `func`: TreeSelectionForeachFunc; + data: pointer) = + gtk_tree_selection_selected_foreach(cast[ptr TreeSelection00](self.impl), `func`, data) + +type + TreeSelectionFunc* = proc (selection: ptr TreeSelection00; model: ptr TreeModel00; + path: ptr TreePath00; pathCurrentlySelected: gboolean; data: pointer): gboolean {.cdecl.} + +proc gtk_tree_selection_set_select_function*(self: ptr TreeSelection00; `func`: TreeSelectionFunc; + data: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_selection_set_select_function", libprag.} + +proc setSelectFunction*(self: TreeSelection; `func`: TreeSelectionFunc; data: pointer; + destroy: DestroyNotify) = + gtk_tree_selection_set_select_function(cast[ptr TreeSelection00](self.impl), `func`, data, destroy) + +type + TreeSortable00* {.pure.} = object + TreeSortable* = ref object + impl*: ptr TreeSortable00 + +proc gtk_tree_sortable_get_sort_column_id*(self: ptr TreeSortable00; sortColumnId: var int32; + order: var SortType): gboolean {. + importc: "gtk_tree_sortable_get_sort_column_id", libprag.} + +proc getSortColumnId*(self: TreeSortable; sortColumnId: var int; order: var SortType): bool = + var sortColumnId_00 = int32(sortColumnId) + result = toBool(gtk_tree_sortable_get_sort_column_id(cast[ptr TreeSortable00](self.impl), sortColumnId_00, order)) + sortColumnId = int(sortColumnId_00) + +proc sortColumnId*(self: TreeSortable; sortColumnId: var int; order: var SortType): bool = + var sortColumnId_00 = int32(sortColumnId) + result = toBool(gtk_tree_sortable_get_sort_column_id(cast[ptr TreeSortable00](self.impl), sortColumnId_00, order)) + sortColumnId = int(sortColumnId_00) + +proc gtk_tree_sortable_has_default_sort_func*(self: ptr TreeSortable00): gboolean {. + importc: "gtk_tree_sortable_has_default_sort_func", libprag.} + +proc hasDefaultSortFunc*(self: TreeSortable): bool = + toBool(gtk_tree_sortable_has_default_sort_func(cast[ptr TreeSortable00](self.impl))) + +proc gtk_tree_sortable_set_default_sort_func*(self: ptr TreeSortable00; sortFunc: TreeIterCompareFunc; + userData: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_sortable_set_default_sort_func", libprag.} + +proc setDefaultSortFunc*(self: TreeSortable; sortFunc: TreeIterCompareFunc; + userData: pointer; destroy: DestroyNotify) = + gtk_tree_sortable_set_default_sort_func(cast[ptr TreeSortable00](self.impl), sortFunc, userData, destroy) + +proc gtk_tree_sortable_set_sort_column_id*(self: ptr TreeSortable00; sortColumnId: int32; order: SortType) {. + importc: "gtk_tree_sortable_set_sort_column_id", libprag.} + +proc setSortColumnId*(self: TreeSortable; sortColumnId: int; order: SortType) = + gtk_tree_sortable_set_sort_column_id(cast[ptr TreeSortable00](self.impl), int32(sortColumnId), order) + +proc gtk_tree_sortable_set_sort_func*(self: ptr TreeSortable00; sortColumnId: int32; sortFunc: TreeIterCompareFunc; + userData: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_sortable_set_sort_func", libprag.} + +proc setSortFunc*(self: TreeSortable; sortColumnId: int; sortFunc: TreeIterCompareFunc; + userData: pointer; destroy: DestroyNotify) = + gtk_tree_sortable_set_sort_func(cast[ptr TreeSortable00](self.impl), int32(sortColumnId), sortFunc, userData, destroy) + +proc gtk_tree_sortable_sort_column_changed*(self: ptr TreeSortable00) {. + importc: "gtk_tree_sortable_sort_column_changed", libprag.} + +proc sortColumnChanged*(self: TreeSortable) = + gtk_tree_sortable_sort_column_changed(cast[ptr TreeSortable00](self.impl)) + +type + TreeSortableIface00* {.pure.} = object + gIface*: gobject.TypeInterface00 + sortColumnChanged*: proc(sortable: ptr TreeSortable00) {.cdecl.} + getSortColumnId*: proc(sortable: ptr TreeSortable00; sortColumnId: var int32; + order: var SortType): gboolean {.cdecl.} + setSortColumnId*: proc(sortable: ptr TreeSortable00; sortColumnId: int32; + order: SortType) {.cdecl.} + setSortFunc*: proc(sortable: ptr TreeSortable00; sortColumnId: int32; + sortFunc: TreeIterCompareFunc; userData: pointer; destroy: DestroyNotify) {.cdecl.} + setDefaultSortFunc*: proc(sortable: ptr TreeSortable00; sortFunc: TreeIterCompareFunc; + userData: pointer; destroy: DestroyNotify) {.cdecl.} + hasDefaultSortFunc*: proc(sortable: ptr TreeSortable00): gboolean {.cdecl.} + TreeSortableIface* = ref object + impl*: ptr TreeSortableIface00 + +type + TreeStorePrivate00* {.pure.} = object + TreeStorePrivate* = ref object + impl*: ptr TreeStorePrivate00 + +type + TreeStore* = ref object of gobject.Object + TreeStore00* = object of gobject.Object00 + priv1: ptr TreeStorePrivate00 + +proc gtk_tree_store_newv*(nColumns: int32; types: GTypeArray): ptr TreeStore00 {. + importc: "gtk_tree_store_newv", libprag.} + +proc newTreeStore*(nColumns: int; types: GTypeArray): TreeStore = + new(result, finalizeGObject) + result.impl = gtk_tree_store_newv(int32(nColumns), types) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initTreeStore*[T](result: var T; nColumns: int; types: GTypeArray) = + assert(result is TreeStore) + new(result, finalizeGObject) + result.impl = gtk_tree_store_newv(int32(nColumns), types) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_tree_store_append*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00) {. + importc: "gtk_tree_store_append", libprag.} + +proc append*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00) {. + importc: "gtk_tree_store_append", libprag.} + +proc gtk_tree_store_clear*(self: ptr TreeStore00) {. + importc: "gtk_tree_store_clear", libprag.} + +proc clear*(self: TreeStore) = + gtk_tree_store_clear(cast[ptr TreeStore00](self.impl)) + +proc gtk_tree_store_insert*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00; + position: int32) {. + importc: "gtk_tree_store_insert", libprag.} + +proc insert*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00; + position: int32) {. + importc: "gtk_tree_store_insert", libprag.} + +proc gtk_tree_store_insert_after*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00; + sibling: ptr TreeIter00) {. + importc: "gtk_tree_store_insert_after", libprag.} + +proc insertAfter*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00; + sibling: ptr TreeIter00) {. + importc: "gtk_tree_store_insert_after", libprag.} + +proc gtk_tree_store_insert_before*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00; + sibling: ptr TreeIter00) {. + importc: "gtk_tree_store_insert_before", libprag.} + +proc insertBefore*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00; + sibling: ptr TreeIter00) {. + importc: "gtk_tree_store_insert_before", libprag.} + +proc gtk_tree_store_insert_with_valuesv*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00; + position: int32; columns: int32Array; values: gobject.Value00Array; nValues: int32) {. + importc: "gtk_tree_store_insert_with_valuesv", libprag.} + +proc insertWithValues*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00; + position: int32; columns: int32Array; values: gobject.Value00Array; nValues: int32) {. + importc: "gtk_tree_store_insert_with_valuesv", libprag.} + +proc gtk_tree_store_is_ancestor*(self: ptr TreeStore00; iter: ptr TreeIter00; descendant: ptr TreeIter00): gboolean {. + importc: "gtk_tree_store_is_ancestor", libprag.} + +proc isAncestor*(self: TreeStore; iter: TreeIter; descendant: TreeIter): bool = + toBool(gtk_tree_store_is_ancestor(cast[ptr TreeStore00](self.impl), cast[ptr TreeIter00](iter.impl), cast[ptr TreeIter00](descendant.impl))) + +proc gtk_tree_store_iter_depth*(self: ptr TreeStore00; iter: ptr TreeIter00): int32 {. + importc: "gtk_tree_store_iter_depth", libprag.} + +proc iterDepth*(self: TreeStore; iter: TreeIter): int = + int(gtk_tree_store_iter_depth(cast[ptr TreeStore00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_tree_store_iter_is_valid*(self: ptr TreeStore00; iter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_store_iter_is_valid", libprag.} + +proc iterIsValid*(self: TreeStore; iter: TreeIter): bool = + toBool(gtk_tree_store_iter_is_valid(cast[ptr TreeStore00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_tree_store_move_after*(self: ptr TreeStore00; iter: ptr TreeIter00; position: ptr TreeIter00) {. + importc: "gtk_tree_store_move_after", libprag.} + +proc moveAfter*(self: TreeStore; iter: TreeIter; position: TreeIter) = + gtk_tree_store_move_after(cast[ptr TreeStore00](self.impl), cast[ptr TreeIter00](iter.impl), cast[ptr TreeIter00](position.impl)) + +proc gtk_tree_store_move_before*(self: ptr TreeStore00; iter: ptr TreeIter00; position: ptr TreeIter00) {. + importc: "gtk_tree_store_move_before", libprag.} + +proc moveBefore*(self: TreeStore; iter: TreeIter; position: TreeIter) = + gtk_tree_store_move_before(cast[ptr TreeStore00](self.impl), cast[ptr TreeIter00](iter.impl), cast[ptr TreeIter00](position.impl)) + +proc gtk_tree_store_prepend*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00) {. + importc: "gtk_tree_store_prepend", libprag.} + +proc prepend*(self: ptr TreeStore00; iter: var TreeIter00; parent: ptr TreeIter00) {. + importc: "gtk_tree_store_prepend", libprag.} + +proc gtk_tree_store_remove*(self: ptr TreeStore00; iter: ptr TreeIter00): gboolean {. + importc: "gtk_tree_store_remove", libprag.} + +proc remove*(self: TreeStore; iter: TreeIter): bool = + toBool(gtk_tree_store_remove(cast[ptr TreeStore00](self.impl), cast[ptr TreeIter00](iter.impl))) + +proc gtk_tree_store_set_column_types*(self: ptr TreeStore00; nColumns: int32; types: GTypeArray) {. + importc: "gtk_tree_store_set_column_types", libprag.} + +proc setColumnTypes*(self: TreeStore; nColumns: int; types: GTypeArray) = + gtk_tree_store_set_column_types(cast[ptr TreeStore00](self.impl), int32(nColumns), types) + +proc gtk_tree_store_set_value*(self: ptr TreeStore00; iter: ptr TreeIter00; column: int32; + value: ptr gobject.Value00) {. + importc: "gtk_tree_store_set_value", libprag.} + +proc setValue*(self: TreeStore; iter: TreeIter; column: int; value: gobject.Value) = + gtk_tree_store_set_value(cast[ptr TreeStore00](self.impl), cast[ptr TreeIter00](iter.impl), int32(column), cast[ptr gobject.Value00](value.impl)) + +proc gtk_tree_store_set_valuesv*(self: ptr TreeStore00; iter: ptr TreeIter00; columns: int32Array; + values: gobject.Value00Array; nValues: int32) {. + importc: "gtk_tree_store_set_valuesv", libprag.} + +proc set*(self: TreeStore; iter: TreeIter; columns: int32Array; + values: gobject.Value00Array; nValues: int) = + gtk_tree_store_set_valuesv(cast[ptr TreeStore00](self.impl), cast[ptr TreeIter00](iter.impl), columns, values, int32(nValues)) + +proc gtk_tree_store_swap*(self: ptr TreeStore00; a: ptr TreeIter00; b: ptr TreeIter00) {. + importc: "gtk_tree_store_swap", libprag.} + +proc swap*(self: TreeStore; a: TreeIter; b: TreeIter) = + gtk_tree_store_swap(cast[ptr TreeStore00](self.impl), cast[ptr TreeIter00](a.impl), cast[ptr TreeIter00](b.impl)) + +type + TreeStoreClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TreeStoreClass* = ref object + impl*: ptr TreeStoreClass00 + +type + TreeViewAccessiblePrivate00* {.pure.} = object + TreeViewAccessiblePrivate* = ref object + impl*: ptr TreeViewAccessiblePrivate00 + +type + TreeViewAccessible* = ref object of ContainerAccessible + TreeViewAccessible00* = object of ContainerAccessible00 + priv4: ptr TreeViewAccessiblePrivate00 + +type + TreeViewAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + TreeViewAccessibleClass* = ref object + impl*: ptr TreeViewAccessibleClass00 + +type + TreeViewClass00* {.pure.} = object + parentClass*: ContainerClass00 + rowActivated*: proc(treeView: ptr TreeView00; path: ptr TreePath00; column: ptr TreeViewColumn00) {.cdecl.} + testExpandRow*: proc(treeView: ptr TreeView00; iter: ptr TreeIter00; path: ptr TreePath00): gboolean {.cdecl.} + testCollapseRow*: proc(treeView: ptr TreeView00; iter: ptr TreeIter00; path: ptr TreePath00): gboolean {.cdecl.} + rowExpanded*: proc(treeView: ptr TreeView00; iter: ptr TreeIter00; path: ptr TreePath00) {.cdecl.} + rowCollapsed*: proc(treeView: ptr TreeView00; iter: ptr TreeIter00; path: ptr TreePath00) {.cdecl.} + columnsChanged*: proc(treeView: ptr TreeView00) {.cdecl.} + cursorChanged*: proc(treeView: ptr TreeView00) {.cdecl.} + moveCursor*: proc(treeView: ptr TreeView00; step: MovementStep; count: int32): gboolean {.cdecl.} + selectAll*: proc(treeView: ptr TreeView00): gboolean {.cdecl.} + unselectAll*: proc(treeView: ptr TreeView00): gboolean {.cdecl.} + selectCursorRow*: proc(treeView: ptr TreeView00; startEditing: gboolean): gboolean {.cdecl.} + toggleCursorRow*: proc(treeView: ptr TreeView00): gboolean {.cdecl.} + expandCollapseCursorRow*: proc(treeView: ptr TreeView00; logical: gboolean; expand: gboolean; + openAll: gboolean): gboolean {.cdecl.} + selectCursorParent*: proc(treeView: ptr TreeView00): gboolean {.cdecl.} + startInteractiveSearch*: proc(treeView: ptr TreeView00): gboolean {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + gtkReserved5*: pointer + gtkReserved6*: pointer + gtkReserved7*: pointer + gtkReserved8*: pointer + TreeViewClass* = ref object + impl*: ptr TreeViewClass00 + +type + TreeViewColumnClass00* {.pure.} = object + parentClass*: gobject.InitiallyUnownedClass00 + clicked*: proc(treeColumn: ptr TreeViewColumn00) {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + TreeViewColumnClass* = ref object + impl*: ptr TreeViewColumnClass00 + +type + TreeViewColumnDropFunc* = proc (treeView: ptr TreeView00; column: ptr TreeViewColumn00; + prevColumn: ptr TreeViewColumn00; nextColumn: ptr TreeViewColumn00; data: pointer): gboolean {.cdecl.} + +proc gtk_tree_view_set_column_drag_function*(self: ptr TreeView00; `func`: TreeViewColumnDropFunc; + userData: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_view_set_column_drag_function", libprag.} + +proc setColumnDragFunction*(self: TreeView; `func`: TreeViewColumnDropFunc; userData: pointer; + destroy: DestroyNotify) = + gtk_tree_view_set_column_drag_function(cast[ptr TreeView00](self.impl), `func`, userData, destroy) + +type + TreeViewMappingFunc* = proc (treeView: ptr TreeView00; path: ptr TreePath00; userData: pointer) {.cdecl.} + +proc gtk_tree_view_map_expanded_rows*(self: ptr TreeView00; `func`: TreeViewMappingFunc; + data: pointer) {. + importc: "gtk_tree_view_map_expanded_rows", libprag.} + +proc mapExpandedRows*(self: TreeView; `func`: TreeViewMappingFunc; data: pointer) = + gtk_tree_view_map_expanded_rows(cast[ptr TreeView00](self.impl), `func`, data) + +type + TreeViewRowSeparatorFunc* = proc (model: ptr TreeModel00; iter: ptr TreeIter00; data: pointer): gboolean {.cdecl.} + +proc gtk_combo_box_set_row_separator_func*(self: ptr ComboBox00; `func`: TreeViewRowSeparatorFunc; + data: pointer; destroy: DestroyNotify) {. + importc: "gtk_combo_box_set_row_separator_func", libprag.} + +proc setRowSeparatorFunc*(self: ComboBox; `func`: TreeViewRowSeparatorFunc; + data: pointer; destroy: DestroyNotify) = + gtk_combo_box_set_row_separator_func(cast[ptr ComboBox00](self.impl), `func`, data, destroy) + +proc gtk_tree_view_set_row_separator_func*(self: ptr TreeView00; `func`: TreeViewRowSeparatorFunc; + data: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_view_set_row_separator_func", libprag.} + +proc setRowSeparatorFunc*(self: TreeView; `func`: TreeViewRowSeparatorFunc; + data: pointer; destroy: DestroyNotify) = + gtk_tree_view_set_row_separator_func(cast[ptr TreeView00](self.impl), `func`, data, destroy) + +type + TreeViewSearchEqualFunc* = proc (model: ptr TreeModel00; column: int32; key: cstring; + iter: ptr TreeIter00; searchData: pointer): gboolean {.cdecl.} + +proc gtk_tree_view_set_search_equal_func*(self: ptr TreeView00; searchEqualFunc: TreeViewSearchEqualFunc; + searchUserData: pointer; searchDestroy: DestroyNotify) {. + importc: "gtk_tree_view_set_search_equal_func", libprag.} + +proc setSearchEqualFunc*(self: TreeView; searchEqualFunc: TreeViewSearchEqualFunc; + searchUserData: pointer; searchDestroy: DestroyNotify) = + gtk_tree_view_set_search_equal_func(cast[ptr TreeView00](self.impl), searchEqualFunc, searchUserData, searchDestroy) + +type + TreeViewSearchPositionFunc* = proc (treeView: ptr TreeView00; searchDialog: ptr Widget00; + userData: pointer) {.cdecl.} + +proc gtk_tree_view_set_search_position_func*(self: ptr TreeView00; `func`: TreeViewSearchPositionFunc; + data: pointer; destroy: DestroyNotify) {. + importc: "gtk_tree_view_set_search_position_func", libprag.} + +proc setSearchPositionFunc*(self: TreeView; `func`: TreeViewSearchPositionFunc; + data: pointer; destroy: DestroyNotify) = + gtk_tree_view_set_search_position_func(cast[ptr TreeView00](self.impl), `func`, data, destroy) + +type + UIManagerPrivate00* {.pure.} = object + UIManagerPrivate* = ref object + impl*: ptr UIManagerPrivate00 + +type + UIManager* = ref object of gobject.Object + UIManager00* = object of gobject.Object00 + privateData1: ptr UIManagerPrivate00 + +proc scActionsChanged*(self: UIManager; p: proc (self: ptr gobject.Object00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "actions-changed", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scAddWidget*(self: UIManager; p: proc (self: ptr gobject.Object00; widget: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "add-widget", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scConnectProxy*(self: UIManager; p: proc (self: ptr gobject.Object00; action: Action00; proxy: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "connect-proxy", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scDisconnectProxy*(self: UIManager; p: proc (self: ptr gobject.Object00; action: Action00; proxy: Widget00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "disconnect-proxy", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPostActivate*(self: UIManager; p: proc (self: ptr gobject.Object00; action: Action00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "post-activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) +proc scPreActivate*(self: UIManager; p: proc (self: ptr gobject.Object00; action: Action00; xdata: pointer) {.cdecl.}, xdata: pointer = nil) = + discard g_signal_connect_data(self.impl, "pre-activate", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0)) + +proc gtk_ui_manager_new*(): ptr UIManager00 {. + importc: "gtk_ui_manager_new", libprag.} + +proc newUIManager*(): UIManager = + new(result, finalizeGObject) + result.impl = gtk_ui_manager_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initUIManager*[T](result: var T) = + assert(result is UIManager) + new(result, finalizeGObject) + result.impl = gtk_ui_manager_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_ui_manager_add_ui_from_file*(self: ptr UIManager00; filename: ucstring): uint32 {. + importc: "gtk_ui_manager_add_ui_from_file", libprag.} + +proc addUiFromFile*(self: UIManager; filename: ucstring): int = + int(gtk_ui_manager_add_ui_from_file(cast[ptr UIManager00](self.impl), filename)) + +proc gtk_ui_manager_add_ui_from_resource*(self: ptr UIManager00; resourcePath: cstring): uint32 {. + importc: "gtk_ui_manager_add_ui_from_resource", libprag.} + +proc addUiFromResource*(self: UIManager; resourcePath: string): int = + int(gtk_ui_manager_add_ui_from_resource(cast[ptr UIManager00](self.impl), cstring(resourcePath))) + +proc gtk_ui_manager_add_ui_from_string*(self: ptr UIManager00; buffer: cstring; length: int64): uint32 {. + importc: "gtk_ui_manager_add_ui_from_string", libprag.} + +proc addUiFromString*(self: UIManager; buffer: string; length: int64): int = + int(gtk_ui_manager_add_ui_from_string(cast[ptr UIManager00](self.impl), cstring(buffer), length)) + +proc gtk_ui_manager_ensure_update*(self: ptr UIManager00) {. + importc: "gtk_ui_manager_ensure_update", libprag.} + +proc ensureUpdate*(self: UIManager) = + gtk_ui_manager_ensure_update(cast[ptr UIManager00](self.impl)) + +proc gtk_ui_manager_get_accel_group*(self: ptr UIManager00): ptr AccelGroup00 {. + importc: "gtk_ui_manager_get_accel_group", libprag.} + +proc getAccelGroup*(self: UIManager): AccelGroup = + let gobj = gtk_ui_manager_get_accel_group(cast[ptr UIManager00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AccelGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc accelGroup*(self: UIManager): AccelGroup = + let gobj = gtk_ui_manager_get_accel_group(cast[ptr UIManager00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[AccelGroup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_ui_manager_get_action*(self: ptr UIManager00; path: cstring): ptr Action00 {. + importc: "gtk_ui_manager_get_action", libprag.} + +proc getAction*(self: UIManager; path: string): Action = + let gobj = gtk_ui_manager_get_action(cast[ptr UIManager00](self.impl), cstring(path)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Action](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc action*(self: UIManager; path: string): Action = + let gobj = gtk_ui_manager_get_action(cast[ptr UIManager00](self.impl), cstring(path)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Action](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_ui_manager_get_action_groups*(self: ptr UIManager00): ptr pointer {. + importc: "gtk_ui_manager_get_action_groups", libprag.} + +proc getActionGroups*(self: UIManager): ptr pointer = + gtk_ui_manager_get_action_groups(cast[ptr UIManager00](self.impl)) + +proc actionGroups*(self: UIManager): ptr pointer = + gtk_ui_manager_get_action_groups(cast[ptr UIManager00](self.impl)) + +proc gtk_ui_manager_get_add_tearoffs*(self: ptr UIManager00): gboolean {. + importc: "gtk_ui_manager_get_add_tearoffs", libprag.} + +proc getAddTearoffs*(self: UIManager): bool = + toBool(gtk_ui_manager_get_add_tearoffs(cast[ptr UIManager00](self.impl))) + +proc addTearoffs*(self: UIManager): bool = + toBool(gtk_ui_manager_get_add_tearoffs(cast[ptr UIManager00](self.impl))) + +proc gtk_ui_manager_get_ui*(self: ptr UIManager00): cstring {. + importc: "gtk_ui_manager_get_ui", libprag.} + +proc getUi*(self: UIManager): string = + let resul0 = gtk_ui_manager_get_ui(cast[ptr UIManager00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc ui*(self: UIManager): string = + let resul0 = gtk_ui_manager_get_ui(cast[ptr UIManager00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_ui_manager_get_widget*(self: ptr UIManager00; path: cstring): ptr Widget00 {. + importc: "gtk_ui_manager_get_widget", libprag.} + +proc getWidget*(self: UIManager; path: string): Widget = + let gobj = gtk_ui_manager_get_widget(cast[ptr UIManager00](self.impl), cstring(path)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc widget*(self: UIManager; path: string): Widget = + let gobj = gtk_ui_manager_get_widget(cast[ptr UIManager00](self.impl), cstring(path)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_ui_manager_insert_action_group*(self: ptr UIManager00; actionGroup: ptr ActionGroup00; + pos: int32) {. + importc: "gtk_ui_manager_insert_action_group", libprag.} + +proc insertActionGroup*(self: UIManager; actionGroup: ActionGroup; pos: int) = + gtk_ui_manager_insert_action_group(cast[ptr UIManager00](self.impl), cast[ptr ActionGroup00](actionGroup.impl), int32(pos)) + +proc gtk_ui_manager_new_merge_id*(self: ptr UIManager00): uint32 {. + importc: "gtk_ui_manager_new_merge_id", libprag.} + +proc newMergeId*(self: UIManager): int = + int(gtk_ui_manager_new_merge_id(cast[ptr UIManager00](self.impl))) + +proc gtk_ui_manager_remove_action_group*(self: ptr UIManager00; actionGroup: ptr ActionGroup00) {. + importc: "gtk_ui_manager_remove_action_group", libprag.} + +proc removeActionGroup*(self: UIManager; actionGroup: ActionGroup) = + gtk_ui_manager_remove_action_group(cast[ptr UIManager00](self.impl), cast[ptr ActionGroup00](actionGroup.impl)) + +proc gtk_ui_manager_remove_ui*(self: ptr UIManager00; mergeId: uint32) {. + importc: "gtk_ui_manager_remove_ui", libprag.} + +proc removeUi*(self: UIManager; mergeId: int) = + gtk_ui_manager_remove_ui(cast[ptr UIManager00](self.impl), uint32(mergeId)) + +proc gtk_ui_manager_set_add_tearoffs*(self: ptr UIManager00; addTearoffs: gboolean) {. + importc: "gtk_ui_manager_set_add_tearoffs", libprag.} + +proc setAddTearoffs*(self: UIManager; addTearoffs: bool) = + gtk_ui_manager_set_add_tearoffs(cast[ptr UIManager00](self.impl), gboolean(addTearoffs)) + +proc `addTearoffs=`*(self: UIManager; addTearoffs: bool) = + gtk_ui_manager_set_add_tearoffs(cast[ptr UIManager00](self.impl), gboolean(addTearoffs)) + +type + UIManagerItemType* {.size: sizeof(cint), pure.} = enum + auto = 0 + menubar = 1 + menu = 2 + toolbar = 4 + placeholder = 8 + popup = 16 + menuitem = 32 + toolitem = 64 + separator = 128 + accelerator = 256 + popupWithAccels = 512 + +proc gtk_ui_manager_add_ui*(self: ptr UIManager00; mergeId: uint32; path: cstring; + name: cstring; action: cstring; `type`: UIManagerItemType; top: gboolean) {. + importc: "gtk_ui_manager_add_ui", libprag.} + +proc addUi*(self: UIManager; mergeId: int; path: string; name: string; + action: string; `type`: UIManagerItemType; top: bool) = + gtk_ui_manager_add_ui(cast[ptr UIManager00](self.impl), uint32(mergeId), cstring(path), cstring(name), cstring(action), `type`, gboolean(top)) + +proc gtk_ui_manager_get_toplevels*(self: ptr UIManager00; types: UIManagerItemType): ptr pointer {. + importc: "gtk_ui_manager_get_toplevels", libprag.} + +proc getToplevels*(self: UIManager; types: UIManagerItemType): ptr pointer = + gtk_ui_manager_get_toplevels(cast[ptr UIManager00](self.impl), types) + +proc toplevels*(self: UIManager; types: UIManagerItemType): ptr pointer = + gtk_ui_manager_get_toplevels(cast[ptr UIManager00](self.impl), types) + +type + UIManagerClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + addWidget*: proc(manager: ptr UIManager00; widget: ptr Widget00) {.cdecl.} + actionsChanged*: proc(manager: ptr UIManager00) {.cdecl.} + connectProxy*: proc(manager: ptr UIManager00; action: ptr Action00; proxy: ptr Widget00) {.cdecl.} + disconnectProxy*: proc(manager: ptr UIManager00; action: ptr Action00; proxy: ptr Widget00) {.cdecl.} + preActivate*: proc(manager: ptr UIManager00; action: ptr Action00) {.cdecl.} + postActivate*: proc(manager: ptr UIManager00; action: ptr Action00) {.cdecl.} + getWidget*: proc(manager: ptr UIManager00; path: cstring): ptr Widget00 {.cdecl.} + getAction*: proc(manager: ptr UIManager00; path: cstring): ptr Action00 {.cdecl.} + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + UIManagerClass* = ref object + impl*: ptr UIManagerClass00 + +type + VBox* = ref object of Box + VBox00* = object of Box00 + +proc gtk_vbox_new*(homogeneous: gboolean; spacing: int32): ptr VBox00 {. + importc: "gtk_vbox_new", libprag.} + +proc newVBox*(homogeneous: bool; spacing: int): VBox = + new(result, finalizeGObject) + result.impl = gtk_vbox_new(gboolean(homogeneous), int32(spacing)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initVBox*[T](result: var T; homogeneous: bool; spacing: int) = + assert(result is VBox) + new(result, finalizeGObject) + result.impl = gtk_vbox_new(gboolean(homogeneous), int32(spacing)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + VBoxClass00* {.pure.} = object + parentClass*: BoxClass00 + VBoxClass* = ref object + impl*: ptr VBoxClass00 + +type + VButtonBox* = ref object of ButtonBox + VButtonBox00* = object of ButtonBox00 + +proc gtk_vbutton_box_new*(): ptr VButtonBox00 {. + importc: "gtk_vbutton_box_new", libprag.} + +proc newVButtonBox*(): VButtonBox = + new(result, finalizeGObject) + result.impl = gtk_vbutton_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initVButtonBox*[T](result: var T) = + assert(result is VButtonBox) + new(result, finalizeGObject) + result.impl = gtk_vbutton_box_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + VButtonBoxClass00* {.pure.} = object + parentClass*: ButtonBoxClass00 + VButtonBoxClass* = ref object + impl*: ptr VButtonBoxClass00 + +type + VPaned* = ref object of Paned + VPaned00* = object of Paned00 + +proc gtk_vpaned_new*(): ptr VPaned00 {. + importc: "gtk_vpaned_new", libprag.} + +proc newVPaned*(): VPaned = + new(result, finalizeGObject) + result.impl = gtk_vpaned_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initVPaned*[T](result: var T) = + assert(result is VPaned) + new(result, finalizeGObject) + result.impl = gtk_vpaned_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + VPanedClass00* {.pure.} = object + parentClass*: PanedClass00 + VPanedClass* = ref object + impl*: ptr VPanedClass00 + +type + VScale* = ref object of Scale + VScale00* = object of Scale00 + +proc gtk_vscale_new*(adjustment: ptr Adjustment00): ptr VScale00 {. + importc: "gtk_vscale_new", libprag.} + +proc newVScale*(adjustment: Adjustment): VScale = + new(result, finalizeGObject) + result.impl = gtk_vscale_new(cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initVScale*[T](result: var T; adjustment: Adjustment) = + assert(result is VScale) + new(result, finalizeGObject) + result.impl = gtk_vscale_new(cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_vscale_new_with_range*(min: cdouble; max: cdouble; step: cdouble): ptr VScale00 {. + importc: "gtk_vscale_new_with_range", libprag.} + +proc newVScaleWithRange*(min: cdouble; max: cdouble; step: cdouble): VScale = + new(result, finalizeGObject) + result.impl = gtk_vscale_new_with_range(min, max, step) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initVScaleWithRange*[T](result: var T; min: cdouble; max: cdouble; step: cdouble) = + assert(result is VScale) + new(result, finalizeGObject) + result.impl = gtk_vscale_new_with_range(min, max, step) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + VScaleClass00* {.pure.} = object + parentClass*: ScaleClass00 + VScaleClass* = ref object + impl*: ptr VScaleClass00 + +type + VScrollbar* = ref object of Scrollbar + VScrollbar00* = object of Scrollbar00 + +proc gtk_vscrollbar_new*(adjustment: ptr Adjustment00): ptr VScrollbar00 {. + importc: "gtk_vscrollbar_new", libprag.} + +proc newVScrollbar*(adjustment: Adjustment): VScrollbar = + new(result, finalizeGObject) + result.impl = gtk_vscrollbar_new(cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initVScrollbar*[T](result: var T; adjustment: Adjustment) = + assert(result is VScrollbar) + new(result, finalizeGObject) + result.impl = gtk_vscrollbar_new(cast[ptr Adjustment00](adjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + VScrollbarClass00* {.pure.} = object + parentClass*: ScrollbarClass00 + VScrollbarClass* = ref object + impl*: ptr VScrollbarClass00 + +type + VSeparator* = ref object of Separator + VSeparator00* = object of Separator00 + +proc gtk_vseparator_new*(): ptr VSeparator00 {. + importc: "gtk_vseparator_new", libprag.} + +proc newVSeparator*(): VSeparator = + new(result, finalizeGObject) + result.impl = gtk_vseparator_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initVSeparator*[T](result: var T) = + assert(result is VSeparator) + new(result, finalizeGObject) + result.impl = gtk_vseparator_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + VSeparatorClass00* {.pure.} = object + parentClass*: SeparatorClass00 + VSeparatorClass* = ref object + impl*: ptr VSeparatorClass00 + +type + ViewportPrivate00* {.pure.} = object + ViewportPrivate* = ref object + impl*: ptr ViewportPrivate00 + +type + Viewport* = ref object of Bin + Viewport00* = object of Bin00 + priv4: ptr ViewportPrivate00 + +proc gtk_viewport_new*(hadjustment: ptr Adjustment00; vadjustment: ptr Adjustment00): ptr Viewport00 {. + importc: "gtk_viewport_new", libprag.} + +proc newViewport*(hadjustment: Adjustment; vadjustment: Adjustment): Viewport = + new(result, finalizeGObject) + result.impl = gtk_viewport_new(cast[ptr Adjustment00](hadjustment.impl), cast[ptr Adjustment00](vadjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initViewport*[T](result: var T; hadjustment: Adjustment; vadjustment: Adjustment) = + assert(result is Viewport) + new(result, finalizeGObject) + result.impl = gtk_viewport_new(cast[ptr Adjustment00](hadjustment.impl), cast[ptr Adjustment00](vadjustment.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_viewport_get_bin_window*(self: ptr Viewport00): ptr gdk.Window00 {. + importc: "gtk_viewport_get_bin_window", libprag.} + +proc getBinWindow*(self: Viewport): gdk.Window = + let gobj = gtk_viewport_get_bin_window(cast[ptr Viewport00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc binWindow*(self: Viewport): gdk.Window = + let gobj = gtk_viewport_get_bin_window(cast[ptr Viewport00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_viewport_get_hadjustment*(self: ptr Viewport00): ptr Adjustment00 {. + importc: "gtk_viewport_get_hadjustment", libprag.} + +proc getHadjustment*(self: Viewport): Adjustment = + let gobj = gtk_viewport_get_hadjustment(cast[ptr Viewport00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc hadjustment*(self: Viewport): Adjustment = + let gobj = gtk_viewport_get_hadjustment(cast[ptr Viewport00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_viewport_get_shadow_type*(self: ptr Viewport00): ShadowType {. + importc: "gtk_viewport_get_shadow_type", libprag.} + +proc getShadowType*(self: Viewport): ShadowType = + gtk_viewport_get_shadow_type(cast[ptr Viewport00](self.impl)) + +proc shadowType*(self: Viewport): ShadowType = + gtk_viewport_get_shadow_type(cast[ptr Viewport00](self.impl)) + +proc gtk_viewport_get_vadjustment*(self: ptr Viewport00): ptr Adjustment00 {. + importc: "gtk_viewport_get_vadjustment", libprag.} + +proc getVadjustment*(self: Viewport): Adjustment = + let gobj = gtk_viewport_get_vadjustment(cast[ptr Viewport00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc vadjustment*(self: Viewport): Adjustment = + let gobj = gtk_viewport_get_vadjustment(cast[ptr Viewport00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Adjustment](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_viewport_get_view_window*(self: ptr Viewport00): ptr gdk.Window00 {. + importc: "gtk_viewport_get_view_window", libprag.} + +proc getViewWindow*(self: Viewport): gdk.Window = + let gobj = gtk_viewport_get_view_window(cast[ptr Viewport00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc viewWindow*(self: Viewport): gdk.Window = + let gobj = gtk_viewport_get_view_window(cast[ptr Viewport00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Window](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_viewport_set_hadjustment*(self: ptr Viewport00; adjustment: ptr Adjustment00) {. + importc: "gtk_viewport_set_hadjustment", libprag.} + +proc setHadjustment*(self: Viewport; adjustment: Adjustment) = + gtk_viewport_set_hadjustment(cast[ptr Viewport00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `hadjustment=`*(self: Viewport; adjustment: Adjustment) = + gtk_viewport_set_hadjustment(cast[ptr Viewport00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc gtk_viewport_set_shadow_type*(self: ptr Viewport00; `type`: ShadowType) {. + importc: "gtk_viewport_set_shadow_type", libprag.} + +proc setShadowType*(self: Viewport; `type`: ShadowType) = + gtk_viewport_set_shadow_type(cast[ptr Viewport00](self.impl), `type`) + +proc `shadowType=`*(self: Viewport; `type`: ShadowType) = + gtk_viewport_set_shadow_type(cast[ptr Viewport00](self.impl), `type`) + +proc gtk_viewport_set_vadjustment*(self: ptr Viewport00; adjustment: ptr Adjustment00) {. + importc: "gtk_viewport_set_vadjustment", libprag.} + +proc setVadjustment*(self: Viewport; adjustment: Adjustment) = + gtk_viewport_set_vadjustment(cast[ptr Viewport00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +proc `vadjustment=`*(self: Viewport; adjustment: Adjustment) = + gtk_viewport_set_vadjustment(cast[ptr Viewport00](self.impl), cast[ptr Adjustment00](adjustment.impl)) + +type + ViewportClass00* {.pure.} = object + parentClass*: BinClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + ViewportClass* = ref object + impl*: ptr ViewportClass00 + +type + VolumeButton* = ref object of ScaleButton + VolumeButton00* = object of ScaleButton00 + +proc gtk_volume_button_new*(): ptr VolumeButton00 {. + importc: "gtk_volume_button_new", libprag.} + +proc newVolumeButton*(): VolumeButton = + new(result, finalizeGObject) + result.impl = gtk_volume_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initVolumeButton*[T](result: var T) = + assert(result is VolumeButton) + new(result, finalizeGObject) + result.impl = gtk_volume_button_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + VolumeButtonClass00* {.pure.} = object + parentClass*: ScaleButtonClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + VolumeButtonClass* = ref object + impl*: ptr VolumeButtonClass00 + +type + WindowAccessiblePrivate00* {.pure.} = object + WindowAccessiblePrivate* = ref object + impl*: ptr WindowAccessiblePrivate00 + +type + WindowAccessible* = ref object of ContainerAccessible + WindowAccessible00* = object of ContainerAccessible00 + priv4: ptr WindowAccessiblePrivate00 + +type + WindowAccessibleClass00* {.pure.} = object + parentClass*: ContainerAccessibleClass00 + WindowAccessibleClass* = ref object + impl*: ptr WindowAccessibleClass00 + +type + WindowGeometryInfo00* {.pure.} = object + WindowGeometryInfo* = ref object + impl*: ptr WindowGeometryInfo00 + +type + WindowGroupClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + gtkReserved1*: pointer + gtkReserved2*: pointer + gtkReserved3*: pointer + gtkReserved4*: pointer + WindowGroupClass* = ref object + impl*: ptr WindowGroupClass00 + +proc gtk_accel_groups_activate*(`object`: ptr gobject.Object00; accelKey: uint32; + accelMods: gdk.ModifierType): gboolean {. + importc: "gtk_accel_groups_activate", libprag.} + +proc accelGroupsActivate*(`object`: gobject.Object; accelKey: int; accelMods: gdk.ModifierType): bool = + toBool(gtk_accel_groups_activate(cast[ptr gobject.Object00](`object`.impl), uint32(accelKey), accelMods)) + +proc gtk_accel_groups_from_object*(`object`: ptr gobject.Object00): ptr pointer {. + importc: "gtk_accel_groups_from_object", libprag.} + +proc accelGroupsFromObject*(`object`: gobject.Object): ptr pointer = + gtk_accel_groups_from_object(cast[ptr gobject.Object00](`object`.impl)) + +proc gtk_accelerator_get_default_mod_mask*(): gdk.ModifierType {. + importc: "gtk_accelerator_get_default_mod_mask", libprag.} + +proc acceleratorGetDefaultModMask*(): gdk.ModifierType {. + importc: "gtk_accelerator_get_default_mod_mask", libprag.} + +proc gtk_accelerator_get_label*(acceleratorKey: uint32; acceleratorMods: gdk.ModifierType): cstring {. + importc: "gtk_accelerator_get_label", libprag.} + +proc acceleratorGetLabel*(acceleratorKey: int; acceleratorMods: gdk.ModifierType): string = + let resul0 = gtk_accelerator_get_label(uint32(acceleratorKey), acceleratorMods) + result = $resul0 + cogfree(resul0) + +proc gtk_accelerator_get_label_with_keycode*(display: ptr gdk.Display00; acceleratorKey: uint32; + keycode: uint32; acceleratorMods: gdk.ModifierType): cstring {. + importc: "gtk_accelerator_get_label_with_keycode", libprag.} + +proc acceleratorGetLabelWithKeycode*(display: gdk.Display; acceleratorKey: int; keycode: int; + acceleratorMods: gdk.ModifierType): string = + let resul0 = gtk_accelerator_get_label_with_keycode(cast[ptr gdk.Display00](display.impl), uint32(acceleratorKey), uint32(keycode), acceleratorMods) + result = $resul0 + cogfree(resul0) + +proc gtk_accelerator_name*(acceleratorKey: uint32; acceleratorMods: gdk.ModifierType): cstring {. + importc: "gtk_accelerator_name", libprag.} + +proc acceleratorName*(acceleratorKey: int; acceleratorMods: gdk.ModifierType): string = + let resul0 = gtk_accelerator_name(uint32(acceleratorKey), acceleratorMods) + result = $resul0 + cogfree(resul0) + +proc gtk_accelerator_name_with_keycode*(display: ptr gdk.Display00; acceleratorKey: uint32; + keycode: uint32; acceleratorMods: gdk.ModifierType): cstring {. + importc: "gtk_accelerator_name_with_keycode", libprag.} + +proc acceleratorNameWithKeycode*(display: gdk.Display; acceleratorKey: int; keycode: int; + acceleratorMods: gdk.ModifierType): string = + let resul0 = gtk_accelerator_name_with_keycode(cast[ptr gdk.Display00](display.impl), uint32(acceleratorKey), uint32(keycode), acceleratorMods) + result = $resul0 + cogfree(resul0) + +proc gtk_accelerator_parse*(accelerator: cstring; acceleratorKey: var uint32; + acceleratorMods: var gdk.ModifierType) {. + importc: "gtk_accelerator_parse", libprag.} + +proc acceleratorParse*(accelerator: cstring; acceleratorKey: var uint32; + acceleratorMods: var gdk.ModifierType) {. + importc: "gtk_accelerator_parse", libprag.} + +proc gtk_accelerator_parse_with_keycode*(accelerator: cstring; acceleratorKey: var uint32; + acceleratorCodes: var uint32Array; acceleratorMods: var gdk.ModifierType) {. + importc: "gtk_accelerator_parse_with_keycode", libprag.} + +proc acceleratorParseWithKeycode*(accelerator: cstring; acceleratorKey: var uint32; + acceleratorCodes: var uint32Array; acceleratorMods: var gdk.ModifierType) {. + importc: "gtk_accelerator_parse_with_keycode", libprag.} + +proc gtk_accelerator_set_default_mod_mask*(defaultModMask: gdk.ModifierType) {. + importc: "gtk_accelerator_set_default_mod_mask", libprag.} + +proc acceleratorSetDefaultModMask*(defaultModMask: gdk.ModifierType) {. + importc: "gtk_accelerator_set_default_mod_mask", libprag.} + +proc gtk_accelerator_valid*(keyval: uint32; modifiers: gdk.ModifierType): gboolean {. + importc: "gtk_accelerator_valid", libprag.} + +proc acceleratorValid*(keyval: uint32; modifiers: gdk.ModifierType): gboolean {. + importc: "gtk_accelerator_valid", libprag.} + +proc gtk_alternative_dialog_button_order*(screen: ptr gdk.Screen00): gboolean {. + importc: "gtk_alternative_dialog_button_order", libprag.} + +proc alternativeDialogButtonOrder*(screen: gdk.Screen): bool = + toBool(gtk_alternative_dialog_button_order(cast[ptr gdk.Screen00](screen.impl))) + +proc gtk_bindings_activate*(`object`: ptr gobject.Object00; keyval: uint32; modifiers: gdk.ModifierType): gboolean {. + importc: "gtk_bindings_activate", libprag.} + +proc bindingsActivate*(`object`: gobject.Object; keyval: int; modifiers: gdk.ModifierType): bool = + toBool(gtk_bindings_activate(cast[ptr gobject.Object00](`object`.impl), uint32(keyval), modifiers)) + +proc gtk_bindings_activate_event*(`object`: ptr gobject.Object00; event: ptr gdk.EventKey00): gboolean {. + importc: "gtk_bindings_activate_event", libprag.} + +proc bindingsActivateEvent*(`object`: gobject.Object; event: gdk.EventKey): bool = + toBool(gtk_bindings_activate_event(cast[ptr gobject.Object00](`object`.impl), cast[ptr gdk.EventKey00](event.impl))) + +proc gtk_cairo_should_draw_window*(cr: ptr cairo.Context00; window: ptr gdk.Window00): gboolean {. + importc: "gtk_cairo_should_draw_window", libprag.} + +proc cairoShouldDrawWindow*(cr: cairo.Context; window: gdk.Window): bool = + toBool(gtk_cairo_should_draw_window(cast[ptr cairo.Context00](cr.impl), cast[ptr gdk.Window00](window.impl))) + +proc gtk_cairo_transform_to_window*(cr: ptr cairo.Context00; widget: ptr Widget00; window: ptr gdk.Window00) {. + importc: "gtk_cairo_transform_to_window", libprag.} + +proc cairoTransformToWindow*(cr: cairo.Context; widget: Widget; window: gdk.Window) = + gtk_cairo_transform_to_window(cast[ptr cairo.Context00](cr.impl), cast[ptr Widget00](widget.impl), cast[ptr gdk.Window00](window.impl)) + +proc gtk_check_version*(requiredMajor: uint32; requiredMinor: uint32; requiredMicro: uint32): cstring {. + importc: "gtk_check_version", libprag.} + +proc checkVersion*(requiredMajor: int; requiredMinor: int; requiredMicro: int): string = + let resul0 = gtk_check_version(uint32(requiredMajor), uint32(requiredMinor), uint32(requiredMicro)) + result = $resul0 + +proc gtk_device_grab_add*(widget: ptr Widget00; device: ptr gdk.Device00; blockOthers: gboolean) {. + importc: "gtk_device_grab_add", libprag.} + +proc deviceGrabAdd*(widget: Widget; device: gdk.Device; blockOthers: bool) = + gtk_device_grab_add(cast[ptr Widget00](widget.impl), cast[ptr gdk.Device00](device.impl), gboolean(blockOthers)) + +proc gtk_device_grab_remove*(widget: ptr Widget00; device: ptr gdk.Device00) {. + importc: "gtk_device_grab_remove", libprag.} + +proc deviceGrabRemove*(widget: Widget; device: gdk.Device) = + gtk_device_grab_remove(cast[ptr Widget00](widget.impl), cast[ptr gdk.Device00](device.impl)) + +proc gtk_disable_setlocale*() {. + importc: "gtk_disable_setlocale", libprag.} + +proc disableSetlocale*() {. + importc: "gtk_disable_setlocale", libprag.} + +proc gtk_distribute_natural_allocation*(extraSpace: int32; nRequestedSizes: uint32; sizes: ptr RequestedSize00): int32 {. + importc: "gtk_distribute_natural_allocation", libprag.} + +proc distributeNaturalAllocation*(extraSpace: int; nRequestedSizes: int; sizes: RequestedSize): int = + int(gtk_distribute_natural_allocation(int32(extraSpace), uint32(nRequestedSizes), cast[ptr RequestedSize00](sizes.impl))) + +proc gtk_drag_cancel*(context: ptr gdk.DragContext00) {. + importc: "gtk_drag_cancel", libprag.} + +proc dragCancel*(context: gdk.DragContext) = + gtk_drag_cancel(cast[ptr gdk.DragContext00](context.impl)) + +proc gtk_drag_finish*(context: ptr gdk.DragContext00; success: gboolean; + del: gboolean; time: uint32) {. + importc: "gtk_drag_finish", libprag.} + +proc dragFinish*(context: gdk.DragContext; success: bool; del: bool; + time: int) = + gtk_drag_finish(cast[ptr gdk.DragContext00](context.impl), gboolean(success), gboolean(del), uint32(time)) + +proc gtk_drag_get_source_widget*(context: ptr gdk.DragContext00): ptr Widget00 {. + importc: "gtk_drag_get_source_widget", libprag.} + +proc dragGetSourceWidget*(context: gdk.DragContext): Widget = + let gobj = gtk_drag_get_source_widget(cast[ptr gdk.DragContext00](context.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_drag_set_icon_default*(context: ptr gdk.DragContext00) {. + importc: "gtk_drag_set_icon_default", libprag.} + +proc dragSetIconDefault*(context: gdk.DragContext) = + gtk_drag_set_icon_default(cast[ptr gdk.DragContext00](context.impl)) + +proc gtk_drag_set_icon_gicon*(context: ptr gdk.DragContext00; icon: ptr gio.Icon00; + hotX: int32; hotY: int32) {. + importc: "gtk_drag_set_icon_gicon", libprag.} + +proc dragSetIconGicon*(context: gdk.DragContext; icon: gio.Icon; hotX: int; + hotY: int) = + gtk_drag_set_icon_gicon(cast[ptr gdk.DragContext00](context.impl), cast[ptr gio.Icon00](icon.impl), int32(hotX), int32(hotY)) + +proc gtk_drag_set_icon_name*(context: ptr gdk.DragContext00; iconName: cstring; + hotX: int32; hotY: int32) {. + importc: "gtk_drag_set_icon_name", libprag.} + +proc dragSetIconName*(context: gdk.DragContext; iconName: string; hotX: int; + hotY: int) = + gtk_drag_set_icon_name(cast[ptr gdk.DragContext00](context.impl), cstring(iconName), int32(hotX), int32(hotY)) + +proc gtk_drag_set_icon_pixbuf*(context: ptr gdk.DragContext00; pixbuf: ptr gdkpixbuf.Pixbuf00; + hotX: int32; hotY: int32) {. + importc: "gtk_drag_set_icon_pixbuf", libprag.} + +proc dragSetIconPixbuf*(context: gdk.DragContext; pixbuf: gdkpixbuf.Pixbuf; + hotX: int; hotY: int) = + gtk_drag_set_icon_pixbuf(cast[ptr gdk.DragContext00](context.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl), int32(hotX), int32(hotY)) + +proc gtk_drag_set_icon_stock*(context: ptr gdk.DragContext00; stockId: cstring; + hotX: int32; hotY: int32) {. + importc: "gtk_drag_set_icon_stock", libprag.} + +proc dragSetIconStock*(context: gdk.DragContext; stockId: string; hotX: int; + hotY: int) = + gtk_drag_set_icon_stock(cast[ptr gdk.DragContext00](context.impl), cstring(stockId), int32(hotX), int32(hotY)) + +proc gtk_drag_set_icon_surface*(context: ptr gdk.DragContext00; surface: ptr cairo.Surface00) {. + importc: "gtk_drag_set_icon_surface", libprag.} + +proc dragSetIconSurface*(context: gdk.DragContext; surface: cairo.Surface) = + gtk_drag_set_icon_surface(cast[ptr gdk.DragContext00](context.impl), cast[ptr cairo.Surface00](surface.impl)) + +proc gtk_drag_set_icon_widget*(context: ptr gdk.DragContext00; widget: ptr Widget00; + hotX: int32; hotY: int32) {. + importc: "gtk_drag_set_icon_widget", libprag.} + +proc dragSetIconWidget*(context: gdk.DragContext; widget: Widget; hotX: int; + hotY: int) = + gtk_drag_set_icon_widget(cast[ptr gdk.DragContext00](context.impl), cast[ptr Widget00](widget.impl), int32(hotX), int32(hotY)) + +proc gtk_draw_insertion_cursor*(widget: ptr Widget00; cr: ptr cairo.Context00; location: ptr gdk.Rectangle00; + isPrimary: gboolean; direction: TextDirection; drawArrow: gboolean) {. + importc: "gtk_draw_insertion_cursor", libprag.} + +proc drawInsertionCursor*(widget: Widget; cr: cairo.Context; location: gdk.Rectangle; + isPrimary: bool; direction: TextDirection; drawArrow: bool) = + gtk_draw_insertion_cursor(cast[ptr Widget00](widget.impl), cast[ptr cairo.Context00](cr.impl), cast[ptr gdk.Rectangle00](location.impl), gboolean(isPrimary), direction, gboolean(drawArrow)) + +proc gtk_events_pending*(): gboolean {. + importc: "gtk_events_pending", libprag.} + +proc eventsPending*(): gboolean {. + importc: "gtk_events_pending", libprag.} + +proc gtk_false*(): gboolean {. + importc: "gtk_false", libprag.} + +proc false*(): gboolean {. + importc: "gtk_false", libprag.} + +proc gtk_get_binary_age*(): uint32 {. + importc: "gtk_get_binary_age", libprag.} + +proc getBinaryAge*(): uint32 {. + importc: "gtk_get_binary_age", libprag.} + +proc binaryAge*(): uint32 {. + importc: "gtk_get_binary_age", libprag.} + +proc gtk_get_current_event*(): ptr gdk.Event00 {. + importc: "gtk_get_current_event", libprag.} + +proc getCurrentEvent*(): gdk.Event = + new(result) + result.impl = gtk_get_current_event() + +proc currentEvent*(): gdk.Event = + new(result) + result.impl = gtk_get_current_event() + +proc gtk_get_current_event_device*(): ptr gdk.Device00 {. + importc: "gtk_get_current_event_device", libprag.} + +proc getCurrentEventDevice*(): gdk.Device = + let gobj = gtk_get_current_event_device() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc currentEventDevice*(): gdk.Device = + let gobj = gtk_get_current_event_device() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdk.Device](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_get_current_event_state*(state: var gdk.ModifierType): gboolean {. + importc: "gtk_get_current_event_state", libprag.} + +proc getCurrentEventState*(state: var gdk.ModifierType): gboolean {. + importc: "gtk_get_current_event_state", libprag.} + +proc currentEventState*(state: var gdk.ModifierType): gboolean {. + importc: "gtk_get_current_event_state", libprag.} + +proc gtk_get_current_event_time*(): uint32 {. + importc: "gtk_get_current_event_time", libprag.} + +proc getCurrentEventTime*(): uint32 {. + importc: "gtk_get_current_event_time", libprag.} + +proc currentEventTime*(): uint32 {. + importc: "gtk_get_current_event_time", libprag.} + +proc gtk_get_debug_flags*(): uint32 {. + importc: "gtk_get_debug_flags", libprag.} + +proc getDebugFlags*(): uint32 {. + importc: "gtk_get_debug_flags", libprag.} + +proc debugFlags*(): uint32 {. + importc: "gtk_get_debug_flags", libprag.} + +proc gtk_get_default_language*(): ptr pango.Language00 {. + importc: "gtk_get_default_language", libprag.} + +proc getDefaultLanguage*(): pango.Language = + new(result) + result.impl = gtk_get_default_language() + +proc defaultLanguage*(): pango.Language = + new(result) + result.impl = gtk_get_default_language() + +proc gtk_get_event_widget*(event: ptr gdk.Event00): ptr Widget00 {. + importc: "gtk_get_event_widget", libprag.} + +proc getEventWidget*(event: gdk.Event): Widget = + let gobj = gtk_get_event_widget(cast[ptr gdk.Event00](event.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc eventWidget*(event: gdk.Event): Widget = + let gobj = gtk_get_event_widget(cast[ptr gdk.Event00](event.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_get_interface_age*(): uint32 {. + importc: "gtk_get_interface_age", libprag.} + +proc getInterfaceAge*(): uint32 {. + importc: "gtk_get_interface_age", libprag.} + +proc interfaceAge*(): uint32 {. + importc: "gtk_get_interface_age", libprag.} + +proc gtk_get_locale_direction*(): TextDirection {. + importc: "gtk_get_locale_direction", libprag.} + +proc getLocaleDirection*(): TextDirection {. + importc: "gtk_get_locale_direction", libprag.} + +proc localeDirection*(): TextDirection {. + importc: "gtk_get_locale_direction", libprag.} + +proc gtk_get_major_version*(): uint32 {. + importc: "gtk_get_major_version", libprag.} + +proc getMajorVersion*(): uint32 {. + importc: "gtk_get_major_version", libprag.} + +proc majorVersion*(): uint32 {. + importc: "gtk_get_major_version", libprag.} + +proc gtk_get_micro_version*(): uint32 {. + importc: "gtk_get_micro_version", libprag.} + +proc getMicroVersion*(): uint32 {. + importc: "gtk_get_micro_version", libprag.} + +proc microVersion*(): uint32 {. + importc: "gtk_get_micro_version", libprag.} + +proc gtk_get_minor_version*(): uint32 {. + importc: "gtk_get_minor_version", libprag.} + +proc getMinorVersion*(): uint32 {. + importc: "gtk_get_minor_version", libprag.} + +proc minorVersion*(): uint32 {. + importc: "gtk_get_minor_version", libprag.} + +proc gtk_get_option_group*(openDefaultDisplay: gboolean): ptr glib.OptionGroup00 {. + importc: "gtk_get_option_group", libprag.} + +proc getOptionGroup*(openDefaultDisplay: bool): glib.OptionGroup = + new(result) + result.impl = gtk_get_option_group(gboolean(openDefaultDisplay)) + +proc optionGroup*(openDefaultDisplay: bool): glib.OptionGroup = + new(result) + result.impl = gtk_get_option_group(gboolean(openDefaultDisplay)) + +proc gtk_grab_get_current*(): ptr Widget00 {. + importc: "gtk_grab_get_current", libprag.} + +proc grabGetCurrent*(): Widget = + let gobj = gtk_grab_get_current() + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_init*(argc: int32; argv: cstringArray) {. + importc: "gtk_init", libprag.} + +proc init*(argc: int32; argv: cstringArray) {. + importc: "gtk_init", libprag.} + +proc gtk_init_check*(argc: int32; argv: cstringArray): gboolean {. + importc: "gtk_init_check", libprag.} + +proc initCheck*(argc: int32; argv: cstringArray): gboolean {. + importc: "gtk_init_check", libprag.} + +proc gtk_init_with_args*(argc: int32; argv: cstringArray; parameterString: cstring; + entries: glib.OptionEntry00Array; translationDomain: cstring): gboolean {. + importc: "gtk_init_with_args", libprag.} + +proc initWithArgs*(argc: int32; argv: cstringArray; parameterString: cstring; + entries: glib.OptionEntry00Array; translationDomain: cstring): gboolean {. + importc: "gtk_init_with_args", libprag.} + +proc gtk_key_snooper_remove*(snooperHandlerId: uint32) {. + importc: "gtk_key_snooper_remove", libprag.} + +proc keySnooperRemove*(snooperHandlerId: uint32) {. + importc: "gtk_key_snooper_remove", libprag.} + +proc gtk_main*() {. + importc: "gtk_main", libprag.} + +proc main*() {. + importc: "gtk_main", libprag.} + +proc gtk_main_do_event*(event: ptr gdk.Event00) {. + importc: "gtk_main_do_event", libprag.} + +proc mainDoEvent*(event: gdk.Event) = + gtk_main_do_event(cast[ptr gdk.Event00](event.impl)) + +proc gtk_main_iteration*(): gboolean {. + importc: "gtk_main_iteration", libprag.} + +proc mainIteration*(): gboolean {. + importc: "gtk_main_iteration", libprag.} + +proc gtk_main_iteration_do*(blocking: gboolean): gboolean {. + importc: "gtk_main_iteration_do", libprag.} + +proc mainIterationDo*(blocking: gboolean): gboolean {. + importc: "gtk_main_iteration_do", libprag.} + +proc gtk_main_level*(): uint32 {. + importc: "gtk_main_level", libprag.} + +proc mainLevel*(): uint32 {. + importc: "gtk_main_level", libprag.} + +proc gtk_main_quit*() {. + importc: "gtk_main_quit", libprag.} + +proc mainQuit*() {. + importc: "gtk_main_quit", libprag.} + +proc gtk_paint_arrow*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; arrowType: ArrowType; + fill: gboolean; x: int32; y: int32; width: int32; height: int32) {. + importc: "gtk_paint_arrow", libprag.} + +proc paintArrow*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; arrowType: ArrowType; fill: bool; + x: int; y: int; width: int; height: int) = + gtk_paint_arrow(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), arrowType, gboolean(fill), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_box*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {. + importc: "gtk_paint_box", libprag.} + +proc paintBox*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int) = + gtk_paint_box(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_box_gap*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; gapSide: PositionType; gapX: int32; gapWidth: int32) {. + importc: "gtk_paint_box_gap", libprag.} + +proc paintBoxGap*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int; + gapSide: PositionType; gapX: int; gapWidth: int) = + gtk_paint_box_gap(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height), gapSide, int32(gapX), int32(gapWidth)) + +proc gtk_paint_check*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {. + importc: "gtk_paint_check", libprag.} + +proc paintCheck*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int) = + gtk_paint_check(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_diamond*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {. + importc: "gtk_paint_diamond", libprag.} + +proc paintDiamond*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int) = + gtk_paint_diamond(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_expander*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; x: int32; y: int32; expanderStyle: ExpanderStyle) {. + importc: "gtk_paint_expander", libprag.} + +proc paintExpander*(style: Style; cr: cairo.Context; stateType: StateType; + widget: Widget; detail: string; x: int; y: int; expanderStyle: ExpanderStyle) = + gtk_paint_expander(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), expanderStyle) + +proc gtk_paint_extension*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; gapSide: PositionType) {. + importc: "gtk_paint_extension", libprag.} + +proc paintExtension*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int; + gapSide: PositionType) = + gtk_paint_extension(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height), gapSide) + +proc gtk_paint_flat_box*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {. + importc: "gtk_paint_flat_box", libprag.} + +proc paintFlatBox*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int) = + gtk_paint_flat_box(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_focus*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; x: int32; y: int32; width: int32; height: int32) {. + importc: "gtk_paint_focus", libprag.} + +proc paintFocus*(style: Style; cr: cairo.Context; stateType: StateType; + widget: Widget; detail: string; x: int; y: int; width: int; height: int) = + gtk_paint_focus(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_handle*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; orientation: Orientation) {. + importc: "gtk_paint_handle", libprag.} + +proc paintHandle*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int; + orientation: Orientation) = + gtk_paint_handle(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height), orientation) + +proc gtk_paint_hline*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; x1: int32; x2: int32; y: int32) {. + importc: "gtk_paint_hline", libprag.} + +proc paintHline*(style: Style; cr: cairo.Context; stateType: StateType; + widget: Widget; detail: string; x1: int; x2: int; y: int) = + gtk_paint_hline(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x1), int32(x2), int32(y)) + +proc gtk_paint_layout*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + useText: gboolean; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + layout: ptr pango.Layout00) {. + importc: "gtk_paint_layout", libprag.} + +proc paintLayout*(style: Style; cr: cairo.Context; stateType: StateType; + useText: bool; widget: Widget; detail: string; x: int; y: int; layout: pango.Layout) = + gtk_paint_layout(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, gboolean(useText), cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), cast[ptr pango.Layout00](layout.impl)) + +proc gtk_paint_option*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {. + importc: "gtk_paint_option", libprag.} + +proc paintOption*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int) = + gtk_paint_option(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_resize_grip*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; edge: gdk.WindowEdge; x: int32; y: int32; + width: int32; height: int32) {. + importc: "gtk_paint_resize_grip", libprag.} + +proc paintResizeGrip*(style: Style; cr: cairo.Context; stateType: StateType; + widget: Widget; detail: string; edge: gdk.WindowEdge; x: int; y: int; width: int; height: int) = + gtk_paint_resize_grip(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, cast[ptr Widget00](widget.impl), cstring(detail), edge, int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_shadow*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {. + importc: "gtk_paint_shadow", libprag.} + +proc paintShadow*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int) = + gtk_paint_shadow(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_shadow_gap*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; gapSide: PositionType; gapX: int32; gapWidth: int32) {. + importc: "gtk_paint_shadow_gap", libprag.} + +proc paintShadowGap*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int; + gapSide: PositionType; gapX: int; gapWidth: int) = + gtk_paint_shadow_gap(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height), gapSide, int32(gapX), int32(gapWidth)) + +proc gtk_paint_slider*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32; orientation: Orientation) {. + importc: "gtk_paint_slider", libprag.} + +proc paintSlider*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int; + orientation: Orientation) = + gtk_paint_slider(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height), orientation) + +proc gtk_paint_spinner*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; step: uint32; x: int32; y: int32; width: int32; + height: int32) {. + importc: "gtk_paint_spinner", libprag.} + +proc paintSpinner*(style: Style; cr: cairo.Context; stateType: StateType; + widget: Widget; detail: string; step: int; x: int; y: int; width: int; height: int) = + gtk_paint_spinner(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, cast[ptr Widget00](widget.impl), cstring(detail), uint32(step), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_tab*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + shadowType: ShadowType; widget: ptr Widget00; detail: cstring; x: int32; y: int32; + width: int32; height: int32) {. + importc: "gtk_paint_tab", libprag.} + +proc paintTab*(style: Style; cr: cairo.Context; stateType: StateType; + shadowType: ShadowType; widget: Widget; detail: string; x: int; y: int; width: int; height: int) = + gtk_paint_tab(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, shadowType, cast[ptr Widget00](widget.impl), cstring(detail), int32(x), int32(y), int32(width), int32(height)) + +proc gtk_paint_vline*(style: ptr Style00; cr: ptr cairo.Context00; stateType: StateType; + widget: ptr Widget00; detail: cstring; y1: int32; y2: int32; x: int32) {. + importc: "gtk_paint_vline", libprag.} + +proc paintVline*(style: Style; cr: cairo.Context; stateType: StateType; + widget: Widget; detail: string; y1: int; y2: int; x: int) = + gtk_paint_vline(cast[ptr Style00](style.impl), cast[ptr cairo.Context00](cr.impl), stateType, cast[ptr Widget00](widget.impl), cstring(detail), int32(y1), int32(y2), int32(x)) + +proc gtk_parse_args*(argc: int32; argv: cstringArray): gboolean {. + importc: "gtk_parse_args", libprag.} + +proc parseArgs*(argc: int32; argv: cstringArray): gboolean {. + importc: "gtk_parse_args", libprag.} + +proc gtk_print_run_page_setup_dialog*(parent: ptr Window00; pageSetup: ptr PageSetup00; + settings: ptr PrintSettings00): ptr PageSetup00 {. + importc: "gtk_print_run_page_setup_dialog", libprag.} + +proc printRunPageSetupDialog*(parent: Window; pageSetup: PageSetup; settings: PrintSettings): PageSetup = + let gobj = gtk_print_run_page_setup_dialog(cast[ptr Window00](parent.impl), cast[ptr PageSetup00](pageSetup.impl), cast[ptr PrintSettings00](settings.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[PageSetup](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_print_run_page_setup_dialog_async*(parent: ptr Window00; pageSetup: ptr PageSetup00; + settings: ptr PrintSettings00; doneCb: PageSetupDoneFunc; data: pointer) {. + importc: "gtk_print_run_page_setup_dialog_async", libprag.} + +proc printRunPageSetupDialogAsync*(parent: Window; pageSetup: PageSetup; settings: PrintSettings; + doneCb: PageSetupDoneFunc; data: pointer) = + gtk_print_run_page_setup_dialog_async(cast[ptr Window00](parent.impl), cast[ptr PageSetup00](pageSetup.impl), cast[ptr PrintSettings00](settings.impl), doneCb, data) + +proc gtk_propagate_event*(widget: ptr Widget00; event: ptr gdk.Event00) {. + importc: "gtk_propagate_event", libprag.} + +proc propagateEvent*(widget: Widget; event: gdk.Event) = + gtk_propagate_event(cast[ptr Widget00](widget.impl), cast[ptr gdk.Event00](event.impl)) + +proc gtk_rc_add_default_file*(filename: ucstring) {. + importc: "gtk_rc_add_default_file", libprag.} + +proc rcAddDefaultFile*(filename: ucstring) {. + importc: "gtk_rc_add_default_file", libprag.} + +proc gtk_rc_find_module_in_path*(moduleFile: cstring): ucstring {. + importc: "gtk_rc_find_module_in_path", libprag.} + +proc rcFindModuleInPath*(moduleFile: cstring): ucstring {. + importc: "gtk_rc_find_module_in_path", libprag.} + +proc gtk_rc_find_pixmap_in_path*(settings: ptr Settings00; scanner: ptr glib.Scanner00; + pixmapFile: cstring): ucstring {. + importc: "gtk_rc_find_pixmap_in_path", libprag.} + +proc rcFindPixmapInPath*(settings: Settings; scanner: glib.Scanner; pixmapFile: string): ucstring = + gtk_rc_find_pixmap_in_path(cast[ptr Settings00](settings.impl), cast[ptr glib.Scanner00](scanner.impl), cstring(pixmapFile)) + +proc gtk_rc_get_default_files*(): ucstringArray {. + importc: "gtk_rc_get_default_files", libprag.} + +proc rcGetDefaultFiles*(): ucstringArray {. + importc: "gtk_rc_get_default_files", libprag.} + +proc gtk_rc_get_im_module_file*(): ucstring {. + importc: "gtk_rc_get_im_module_file", libprag.} + +proc rcGetImModuleFile*(): ucstring {. + importc: "gtk_rc_get_im_module_file", libprag.} + +proc gtk_rc_get_im_module_path*(): ucstring {. + importc: "gtk_rc_get_im_module_path", libprag.} + +proc rcGetImModulePath*(): ucstring {. + importc: "gtk_rc_get_im_module_path", libprag.} + +proc gtk_rc_get_module_dir*(): ucstring {. + importc: "gtk_rc_get_module_dir", libprag.} + +proc rcGetModuleDir*(): ucstring {. + importc: "gtk_rc_get_module_dir", libprag.} + +proc gtk_rc_get_style*(widget: ptr Widget00): ptr Style00 {. + importc: "gtk_rc_get_style", libprag.} + +proc rcGetStyle*(widget: Widget): Style = + let gobj = gtk_rc_get_style(cast[ptr Widget00](widget.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Style](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_rc_get_style_by_paths*(settings: ptr Settings00; widgetPath: cstring; classPath: cstring; + `type`: GType): ptr Style00 {. + importc: "gtk_rc_get_style_by_paths", libprag.} + +proc rcGetStyleByPaths*(settings: Settings; widgetPath: string; classPath: string; + `type`: GType): Style = + let gobj = gtk_rc_get_style_by_paths(cast[ptr Settings00](settings.impl), cstring(widgetPath), cstring(classPath), `type`) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Style](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_rc_get_theme_dir*(): cstring {. + importc: "gtk_rc_get_theme_dir", libprag.} + +proc rcGetThemeDir*(): string = + let resul0 = gtk_rc_get_theme_dir() + result = $resul0 + cogfree(resul0) + +proc gtk_rc_parse*(filename: cstring) {. + importc: "gtk_rc_parse", libprag.} + +proc rcParse*(filename: cstring) {. + importc: "gtk_rc_parse", libprag.} + +proc gtk_rc_parse_color*(scanner: ptr glib.Scanner00; color: var gdk.Color00): uint32 {. + importc: "gtk_rc_parse_color", libprag.} + +proc rcParseColor*(scanner: ptr glib.Scanner00; color: var gdk.Color00): uint32 {. + importc: "gtk_rc_parse_color", libprag.} + +proc gtk_rc_parse_color_full*(scanner: ptr glib.Scanner00; style: ptr RcStyle00; + color: var gdk.Color00): uint32 {. + importc: "gtk_rc_parse_color_full", libprag.} + +proc rcParseColorFull*(scanner: ptr glib.Scanner00; style: ptr RcStyle00; + color: var gdk.Color00): uint32 {. + importc: "gtk_rc_parse_color_full", libprag.} + +proc gtk_rc_parse_priority*(scanner: ptr glib.Scanner00; priority: ptr PathPriorityType): uint32 {. + importc: "gtk_rc_parse_priority", libprag.} + +proc rcParsePriority*(scanner: glib.Scanner; priority: ptr PathPriorityType): int = + int(gtk_rc_parse_priority(cast[ptr glib.Scanner00](scanner.impl), priority)) + +proc gtk_rc_parse_state*(scanner: ptr glib.Scanner00; state: var StateType): uint32 {. + importc: "gtk_rc_parse_state", libprag.} + +proc rcParseState*(scanner: glib.Scanner; state: var StateType): int = + int(gtk_rc_parse_state(cast[ptr glib.Scanner00](scanner.impl), state)) + +proc gtk_rc_parse_string*(rcString: cstring) {. + importc: "gtk_rc_parse_string", libprag.} + +proc rcParseString*(rcString: cstring) {. + importc: "gtk_rc_parse_string", libprag.} + +proc gtk_rc_reparse_all*(): gboolean {. + importc: "gtk_rc_reparse_all", libprag.} + +proc rcReparseAll*(): gboolean {. + importc: "gtk_rc_reparse_all", libprag.} + +proc gtk_rc_reparse_all_for_settings*(settings: ptr Settings00; forceLoad: gboolean): gboolean {. + importc: "gtk_rc_reparse_all_for_settings", libprag.} + +proc rcReparseAllForSettings*(settings: Settings; forceLoad: bool): bool = + toBool(gtk_rc_reparse_all_for_settings(cast[ptr Settings00](settings.impl), gboolean(forceLoad))) + +proc gtk_rc_reset_styles*(settings: ptr Settings00) {. + importc: "gtk_rc_reset_styles", libprag.} + +proc rcResetStyles*(settings: Settings) = + gtk_rc_reset_styles(cast[ptr Settings00](settings.impl)) + +proc gtk_rc_set_default_files*(filenames: ucstringArray) {. + importc: "gtk_rc_set_default_files", libprag.} + +proc rcSetDefaultFiles*(filenames: ucstringArray) {. + importc: "gtk_rc_set_default_files", libprag.} + +proc gtk_render_activity*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {. + importc: "gtk_render_activity", libprag.} + +proc renderActivity*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble) = + gtk_render_activity(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height) + +proc gtk_render_arrow*(context: ptr StyleContext00; cr: ptr cairo.Context00; + angle: cdouble; x: cdouble; y: cdouble; size: cdouble) {. + importc: "gtk_render_arrow", libprag.} + +proc renderArrow*(context: StyleContext; cr: cairo.Context; angle: cdouble; + x: cdouble; y: cdouble; size: cdouble) = + gtk_render_arrow(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), angle, x, y, size) + +proc gtk_render_background*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {. + importc: "gtk_render_background", libprag.} + +proc renderBackground*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble) = + gtk_render_background(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height) + +proc gtk_render_background_get_clip*(context: ptr StyleContext00; x: cdouble; y: cdouble; + width: cdouble; height: cdouble; outClip: var gdk.Rectangle00) {. + importc: "gtk_render_background_get_clip", libprag.} + +proc renderBackgroundGetClip*(context: ptr StyleContext00; x: cdouble; y: cdouble; + width: cdouble; height: cdouble; outClip: var gdk.Rectangle00) {. + importc: "gtk_render_background_get_clip", libprag.} + +proc gtk_render_check*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {. + importc: "gtk_render_check", libprag.} + +proc renderCheck*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble) = + gtk_render_check(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height) + +proc gtk_render_expander*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {. + importc: "gtk_render_expander", libprag.} + +proc renderExpander*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble) = + gtk_render_expander(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height) + +proc gtk_render_extension*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble; gapSide: PositionType) {. + importc: "gtk_render_extension", libprag.} + +proc renderExtension*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble; gapSide: PositionType) = + gtk_render_extension(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height, gapSide) + +proc gtk_render_focus*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {. + importc: "gtk_render_focus", libprag.} + +proc renderFocus*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble) = + gtk_render_focus(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height) + +proc gtk_render_frame*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {. + importc: "gtk_render_frame", libprag.} + +proc renderFrame*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble) = + gtk_render_frame(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height) + +proc gtk_render_frame_gap*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble; gapSide: PositionType; xy0Gap: cdouble; + xy1Gap: cdouble) {. + importc: "gtk_render_frame_gap", libprag.} + +proc renderFrameGap*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble; gapSide: PositionType; xy0Gap: cdouble; xy1Gap: cdouble) = + gtk_render_frame_gap(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height, gapSide, xy0Gap, xy1Gap) + +proc gtk_render_handle*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {. + importc: "gtk_render_handle", libprag.} + +proc renderHandle*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble) = + gtk_render_handle(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height) + +proc gtk_render_icon*(context: ptr StyleContext00; cr: ptr cairo.Context00; + pixbuf: ptr gdkpixbuf.Pixbuf00; x: cdouble; y: cdouble) {. + importc: "gtk_render_icon", libprag.} + +proc renderIcon*(context: StyleContext; cr: cairo.Context; pixbuf: gdkpixbuf.Pixbuf; + x: cdouble; y: cdouble) = + gtk_render_icon(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), cast[ptr gdkpixbuf.Pixbuf00](pixbuf.impl), x, y) + +proc gtk_render_icon_pixbuf*(context: ptr StyleContext00; source: ptr IconSource00; + size: int32): ptr gdkpixbuf.Pixbuf00 {. + importc: "gtk_render_icon_pixbuf", libprag.} + +proc renderIconPixbuf*(context: StyleContext; source: IconSource; size: int): gdkpixbuf.Pixbuf = + let gobj = gtk_render_icon_pixbuf(cast[ptr StyleContext00](context.impl), cast[ptr IconSource00](source.impl), int32(size)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_render_icon_surface*(context: ptr StyleContext00; cr: ptr cairo.Context00; + surface: ptr cairo.Surface00; x: cdouble; y: cdouble) {. + importc: "gtk_render_icon_surface", libprag.} + +proc renderIconSurface*(context: StyleContext; cr: cairo.Context; surface: cairo.Surface; + x: cdouble; y: cdouble) = + gtk_render_icon_surface(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), cast[ptr cairo.Surface00](surface.impl), x, y) + +proc gtk_render_insertion_cursor*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; layout: ptr pango.Layout00; index: int32; direction: pango.Direction) {. + importc: "gtk_render_insertion_cursor", libprag.} + +proc renderInsertionCursor*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; layout: pango.Layout; index: int; direction: pango.Direction) = + gtk_render_insertion_cursor(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, cast[ptr pango.Layout00](layout.impl), int32(index), direction) + +proc gtk_render_layout*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; layout: ptr pango.Layout00) {. + importc: "gtk_render_layout", libprag.} + +proc renderLayout*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; layout: pango.Layout) = + gtk_render_layout(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, cast[ptr pango.Layout00](layout.impl)) + +proc gtk_render_line*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x0: cdouble; y0: cdouble; x1: cdouble; y1: cdouble) {. + importc: "gtk_render_line", libprag.} + +proc renderLine*(context: StyleContext; cr: cairo.Context; x0: cdouble; + y0: cdouble; x1: cdouble; y1: cdouble) = + gtk_render_line(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x0, y0, x1, y1) + +proc gtk_render_option*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble) {. + importc: "gtk_render_option", libprag.} + +proc renderOption*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble) = + gtk_render_option(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height) + +proc gtk_render_slider*(context: ptr StyleContext00; cr: ptr cairo.Context00; + x: cdouble; y: cdouble; width: cdouble; height: cdouble; orientation: Orientation) {. + importc: "gtk_render_slider", libprag.} + +proc renderSlider*(context: StyleContext; cr: cairo.Context; x: cdouble; + y: cdouble; width: cdouble; height: cdouble; orientation: Orientation) = + gtk_render_slider(cast[ptr StyleContext00](context.impl), cast[ptr cairo.Context00](cr.impl), x, y, width, height, orientation) + +proc gtk_rgb_to_hsv*(r: cdouble; g: cdouble; b: cdouble; h: var cdouble; + s: var cdouble; v: var cdouble) {. + importc: "gtk_rgb_to_hsv", libprag.} + +proc rgbToHsv*(r: cdouble; g: cdouble; b: cdouble; h: var cdouble; + s: var cdouble; v: var cdouble) {. + importc: "gtk_rgb_to_hsv", libprag.} + +proc gtk_selection_add_target*(widget: ptr Widget00; selection: ptr gdk.Atom00; target: ptr gdk.Atom00; + info: uint32) {. + importc: "gtk_selection_add_target", libprag.} + +proc selectionAddTarget*(widget: Widget; selection: gdk.Atom; target: gdk.Atom; + info: int) = + gtk_selection_add_target(cast[ptr Widget00](widget.impl), cast[ptr gdk.Atom00](selection.impl), cast[ptr gdk.Atom00](target.impl), uint32(info)) + +proc gtk_selection_add_targets*(widget: ptr Widget00; selection: ptr gdk.Atom00; targets: TargetEntry00Array; + ntargets: uint32) {. + importc: "gtk_selection_add_targets", libprag.} + +proc selectionAddTargets*(widget: Widget; selection: gdk.Atom; targets: TargetEntry00Array; + ntargets: int) = + gtk_selection_add_targets(cast[ptr Widget00](widget.impl), cast[ptr gdk.Atom00](selection.impl), targets, uint32(ntargets)) + +proc gtk_selection_clear_targets*(widget: ptr Widget00; selection: ptr gdk.Atom00) {. + importc: "gtk_selection_clear_targets", libprag.} + +proc selectionClearTargets*(widget: Widget; selection: gdk.Atom) = + gtk_selection_clear_targets(cast[ptr Widget00](widget.impl), cast[ptr gdk.Atom00](selection.impl)) + +proc gtk_selection_convert*(widget: ptr Widget00; selection: ptr gdk.Atom00; target: ptr gdk.Atom00; + time: uint32): gboolean {. + importc: "gtk_selection_convert", libprag.} + +proc selectionConvert*(widget: Widget; selection: gdk.Atom; target: gdk.Atom; + time: int): bool = + toBool(gtk_selection_convert(cast[ptr Widget00](widget.impl), cast[ptr gdk.Atom00](selection.impl), cast[ptr gdk.Atom00](target.impl), uint32(time))) + +proc gtk_selection_owner_set*(widget: ptr Widget00; selection: ptr gdk.Atom00; time: uint32): gboolean {. + importc: "gtk_selection_owner_set", libprag.} + +proc selectionOwnerSet*(widget: Widget; selection: gdk.Atom; time: int): bool = + toBool(gtk_selection_owner_set(cast[ptr Widget00](widget.impl), cast[ptr gdk.Atom00](selection.impl), uint32(time))) + +proc gtk_selection_owner_set_for_display*(display: ptr gdk.Display00; widget: ptr Widget00; + selection: ptr gdk.Atom00; time: uint32): gboolean {. + importc: "gtk_selection_owner_set_for_display", libprag.} + +proc selectionOwnerSetForDisplay*(display: gdk.Display; widget: Widget; selection: gdk.Atom; + time: int): bool = + toBool(gtk_selection_owner_set_for_display(cast[ptr gdk.Display00](display.impl), cast[ptr Widget00](widget.impl), cast[ptr gdk.Atom00](selection.impl), uint32(time))) + +proc gtk_selection_remove_all*(widget: ptr Widget00) {. + importc: "gtk_selection_remove_all", libprag.} + +proc selectionRemoveAll*(widget: Widget) = + gtk_selection_remove_all(cast[ptr Widget00](widget.impl)) + +proc gtk_set_debug_flags*(flags: uint32) {. + importc: "gtk_set_debug_flags", libprag.} + +proc setDebugFlags*(flags: uint32) {. + importc: "gtk_set_debug_flags", libprag.} + +proc `debugFlags=`*(flags: uint32) {. + importc: "gtk_set_debug_flags", libprag.} + +proc gtk_show_uri*(screen: ptr gdk.Screen00; uri: cstring; timestamp: uint32): gboolean {. + importc: "gtk_show_uri", libprag.} + +proc showUri*(screen: gdk.Screen; uri: string; timestamp: int): bool = + toBool(gtk_show_uri(cast[ptr gdk.Screen00](screen.impl), cstring(uri), uint32(timestamp))) + +proc gtk_show_uri_on_window*(parent: ptr Window00; uri: cstring; timestamp: uint32): gboolean {. + importc: "gtk_show_uri_on_window", libprag.} + +proc showUriOnWindow*(parent: Window; uri: string; timestamp: int): bool = + toBool(gtk_show_uri_on_window(cast[ptr Window00](parent.impl), cstring(uri), uint32(timestamp))) + +proc gtk_stock_add*(items: StockItem00Array; nItems: uint32) {. + importc: "gtk_stock_add", libprag.} + +proc stockAdd*(items: StockItem00Array; nItems: uint32) {. + importc: "gtk_stock_add", libprag.} + +proc gtk_stock_add_static*(items: StockItem00Array; nItems: uint32) {. + importc: "gtk_stock_add_static", libprag.} + +proc stockAddStatic*(items: StockItem00Array; nItems: uint32) {. + importc: "gtk_stock_add_static", libprag.} + +proc gtk_stock_list_ids*(): ptr pointer {. + importc: "gtk_stock_list_ids", libprag.} + +proc stockListIds*(): ptr pointer {. + importc: "gtk_stock_list_ids", libprag.} + +proc gtk_stock_lookup*(stockId: cstring; item: var StockItem00): gboolean {. + importc: "gtk_stock_lookup", libprag.} + +proc stockLookup*(stockId: cstring; item: var StockItem00): gboolean {. + importc: "gtk_stock_lookup", libprag.} + +proc gtk_stock_set_translate_func*(domain: cstring; `func`: TranslateFunc; data: pointer; + notify: DestroyNotify) {. + importc: "gtk_stock_set_translate_func", libprag.} + +proc stockSetTranslateFunc*(domain: cstring; `func`: TranslateFunc; data: pointer; + notify: DestroyNotify) {. + importc: "gtk_stock_set_translate_func", libprag.} + +proc gtk_target_table_free*(targets: TargetEntry00Array; nTargets: int32) {. + importc: "gtk_target_table_free", libprag.} + +proc targetTableFree*(targets: TargetEntry00Array; nTargets: int32) {. + importc: "gtk_target_table_free", libprag.} + +proc gtk_target_table_new_from_list*(list: ptr TargetList00; nTargets: var int32): TargetEntry00Array {. + importc: "gtk_target_table_new_from_list", libprag.} + +proc targetTableNewFromList*(list: TargetList; nTargets: var int): TargetEntry00Array = + var nTargets_00 = int32(nTargets) + result = gtk_target_table_new_from_list(cast[ptr TargetList00](list.impl), nTargets_00) + nTargets = int(nTargets_00) + +proc gtk_targets_include_image*(targets: ptr gdk.Atom00Array; nTargets: int32; writable: gboolean): gboolean {. + importc: "gtk_targets_include_image", libprag.} + +proc targetsIncludeImage*(targets: ptr gdk.Atom00Array; nTargets: int32; writable: gboolean): gboolean {. + importc: "gtk_targets_include_image", libprag.} + +proc gtk_targets_include_rich_text*(targets: ptr gdk.Atom00Array; nTargets: int32; buffer: ptr TextBuffer00): gboolean {. + importc: "gtk_targets_include_rich_text", libprag.} + +proc targetsIncludeRichText*(targets: ptr gdk.Atom00Array; nTargets: int; buffer: TextBuffer): bool = + toBool(gtk_targets_include_rich_text(targets, int32(nTargets), cast[ptr TextBuffer00](buffer.impl))) + +proc gtk_targets_include_text*(targets: ptr gdk.Atom00Array; nTargets: int32): gboolean {. + importc: "gtk_targets_include_text", libprag.} + +proc targetsIncludeText*(targets: ptr gdk.Atom00Array; nTargets: int32): gboolean {. + importc: "gtk_targets_include_text", libprag.} + +proc gtk_targets_include_uri*(targets: ptr gdk.Atom00Array; nTargets: int32): gboolean {. + importc: "gtk_targets_include_uri", libprag.} + +proc targetsIncludeUri*(targets: ptr gdk.Atom00Array; nTargets: int32): gboolean {. + importc: "gtk_targets_include_uri", libprag.} + +proc gtk_test_create_simple_window*(windowTitle: cstring; dialogText: cstring): ptr Widget00 {. + importc: "gtk_test_create_simple_window", libprag.} + +proc testCreateSimpleWindow*(windowTitle: string; dialogText: string): Widget = + let gobj = gtk_test_create_simple_window(cstring(windowTitle), cstring(dialogText)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_test_find_label*(widget: ptr Widget00; labelPattern: cstring): ptr Widget00 {. + importc: "gtk_test_find_label", libprag.} + +proc testFindLabel*(widget: Widget; labelPattern: string): Widget = + let gobj = gtk_test_find_label(cast[ptr Widget00](widget.impl), cstring(labelPattern)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_test_find_sibling*(baseWidget: ptr Widget00; widgetType: GType): ptr Widget00 {. + importc: "gtk_test_find_sibling", libprag.} + +proc testFindSibling*(baseWidget: Widget; widgetType: GType): Widget = + let gobj = gtk_test_find_sibling(cast[ptr Widget00](baseWidget.impl), widgetType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_test_find_widget*(widget: ptr Widget00; labelPattern: cstring; widgetType: GType): ptr Widget00 {. + importc: "gtk_test_find_widget", libprag.} + +proc testFindWidget*(widget: Widget; labelPattern: string; widgetType: GType): Widget = + let gobj = gtk_test_find_widget(cast[ptr Widget00](widget.impl), cstring(labelPattern), widgetType) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Widget](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc gtk_test_list_all_types*(nTypes: var uint32): GTypeArray {. + importc: "gtk_test_list_all_types", libprag.} + +proc testListAllTypes*(nTypes: var uint32): GTypeArray {. + importc: "gtk_test_list_all_types", libprag.} + +proc gtk_test_register_all_types*() {. + importc: "gtk_test_register_all_types", libprag.} + +proc testRegisterAllTypes*() {. + importc: "gtk_test_register_all_types", libprag.} + +proc gtk_test_slider_get_value*(widget: ptr Widget00): cdouble {. + importc: "gtk_test_slider_get_value", libprag.} + +proc testSliderGetValue*(widget: Widget): cdouble = + gtk_test_slider_get_value(cast[ptr Widget00](widget.impl)) + +proc gtk_test_slider_set_perc*(widget: ptr Widget00; percentage: cdouble) {. + importc: "gtk_test_slider_set_perc", libprag.} + +proc testSliderSetPerc*(widget: Widget; percentage: cdouble) = + gtk_test_slider_set_perc(cast[ptr Widget00](widget.impl), percentage) + +proc gtk_test_spin_button_click*(spinner: ptr SpinButton00; button: uint32; upwards: gboolean): gboolean {. + importc: "gtk_test_spin_button_click", libprag.} + +proc testSpinButtonClick*(spinner: SpinButton; button: int; upwards: bool): bool = + toBool(gtk_test_spin_button_click(cast[ptr SpinButton00](spinner.impl), uint32(button), gboolean(upwards))) + +proc gtk_test_text_get*(widget: ptr Widget00): cstring {. + importc: "gtk_test_text_get", libprag.} + +proc testTextGet*(widget: Widget): string = + let resul0 = gtk_test_text_get(cast[ptr Widget00](widget.impl)) + result = $resul0 + cogfree(resul0) + +proc gtk_test_text_set*(widget: ptr Widget00; string: cstring) {. + importc: "gtk_test_text_set", libprag.} + +proc testTextSet*(widget: Widget; string: string) = + gtk_test_text_set(cast[ptr Widget00](widget.impl), cstring(string)) + +proc gtk_test_widget_click*(widget: ptr Widget00; button: uint32; modifiers: gdk.ModifierType): gboolean {. + importc: "gtk_test_widget_click", libprag.} + +proc testWidgetClick*(widget: Widget; button: int; modifiers: gdk.ModifierType): bool = + toBool(gtk_test_widget_click(cast[ptr Widget00](widget.impl), uint32(button), modifiers)) + +proc gtk_test_widget_send_key*(widget: ptr Widget00; keyval: uint32; modifiers: gdk.ModifierType): gboolean {. + importc: "gtk_test_widget_send_key", libprag.} + +proc testWidgetSendKey*(widget: Widget; keyval: int; modifiers: gdk.ModifierType): bool = + toBool(gtk_test_widget_send_key(cast[ptr Widget00](widget.impl), uint32(keyval), modifiers)) + +proc gtk_test_widget_wait_for_draw*(widget: ptr Widget00) {. + importc: "gtk_test_widget_wait_for_draw", libprag.} + +proc testWidgetWaitForDraw*(widget: Widget) = + gtk_test_widget_wait_for_draw(cast[ptr Widget00](widget.impl)) + +proc gtk_tree_get_row_drag_data*(selectionData: ptr SelectionData00; treeModel: var ptr TreeModel00; + path: var ptr TreePath00): gboolean {. + importc: "gtk_tree_get_row_drag_data", libprag.} + +proc treeGetRowDragData*(selectionData: ptr SelectionData00; treeModel: var ptr TreeModel00; + path: var ptr TreePath00): gboolean {. + importc: "gtk_tree_get_row_drag_data", libprag.} + +proc gtk_tree_set_row_drag_data*(selectionData: ptr SelectionData00; treeModel: ptr TreeModel00; + path: ptr TreePath00): gboolean {. + importc: "gtk_tree_set_row_drag_data", libprag.} + +proc treeSetRowDragData*(selectionData: SelectionData; treeModel: TreeModel; + path: TreePath): bool = + toBool(gtk_tree_set_row_drag_data(cast[ptr SelectionData00](selectionData.impl), cast[ptr TreeModel00](treeModel.impl), cast[ptr TreePath00](path.impl))) + +proc gtk_true*(): gboolean {. + importc: "gtk_true", libprag.} + +proc true*(): gboolean {. + importc: "gtk_true", libprag.} +# === remaining symbols: + +proc init* = + init(0, nil) + +import macros, strutils + +var ProcID: int + +macro mconnect(widget: gobject.Object; signal: string; p: untyped; arg: typed; widgett: typedesc; argt: typedesc): typed = + inc(ProcID) + let wt = getType(widgett)[1] # widget type + let at = getType(argt)[1] # argument type + let signalName = ($signal).replace("-", "_") # maybe we should just use plain proc names + let procNameCdecl = newIdentNode("connect_for_signal_cdecl_" & signalName & $ProcID) + let procName = newIdentNode("connect_for_signal_" & signalName & $ProcID) + let scName = newIdentNode("sc" & signalName) + result = quote do: + proc `procNameCdecl`(w: ptr gobject.Object00 , data: pointer) {.cdecl.} = + var h: pointer = g_object_get_qdata(w, Quark) + `p`(cast[`wt`](h), cast[`at`](data)) + + proc `procName`(self: `wt`; p: proc (self: `wt`, arg: `at`); a: `at`) = + var ar: ref `at` + new(ar) + deepCopy(ar[], a) + GC_ref(ar) + `scName`(self, `procNameCdecl`, cast[pointer](ar[])) + `procName`(`widget`, `p`, `arg`) + +template connect*(widget: gobject.Object; signal: string; p: untyped; arg: typed) = + mconnect(widget, signal, p, arg, type(widget), type(arg)) + +macro mconnect(widget: gobject.Object; signal: string; p: untyped; widgett: typedesc): typed = + inc(ProcID) + let wt = getType(widgett)[1] + let signalName = ($signal).replace("-", "_") + let procNameCdecl = newIdentNode("connect_for_signal_cdecl_" & signalName & $ProcID) + let procName = newIdentNode("connect_for_signal_" & signalName & $ProcID) + let scName = newIdentNode("sc" & signalName) + result = quote do: + proc `procNameCdecl`(w: ptr gobject.Object00 , data: pointer) {.cdecl.} = + var h: pointer = g_object_get_qdata(w, Quark) + `p`(cast[`wt`](h)) + + proc `procName`(self: `wt`; p: proc (self: `wt`)) = + `scName`(self, `procNameCdecl`, nil) + `procName`(`widget`, `p`) + +template connect*(widget: gobject.Object; signal: string; p: untyped) = + mconnect(widget, signal, p, type(widget)) + diff --git a/gintro/pango.nim b/gintro/pango.nim new file mode 100644 index 0000000..c6a8893 --- /dev/null +++ b/gintro/pango.nim @@ -0,0 +1,3884 @@ +# dependencies: +# cairo-1.0 +# GLib-2.0 +# GObject-2.0 +# immediate dependencies: +# cairo-1.0 +# GObject-2.0 +# libraries: +# libpango-1.0.so.0 +{.deadCodeElim: on.} +import cairo, glib, gobject +const Lib* = "libpango-1.0.so.0" +{.pragma: libprag, cdecl, dynlib: Lib.} +type + GlyphInfo00Array* = pointer +type + LogAttr00Array* = pointer +type + FontDescription00Array* = pointer +type + FontFamily00Array* = pointer +type + FontFace00Array* = pointer +type + ScriptArray* = pointer +let Quark = g_quark_from_static_string("NimGIQuark") + +const ANALYSIS_FLAG_CENTERED_BASELINE* = 1'i32 + +const ANALYSIS_FLAG_IS_ELLIPSIS* = 2'i32 + +const ATTR_INDEX_FROM_TEXT_BEGINNING* = 0'i32 + +type + Alignment* {.size: sizeof(cint), pure.} = enum + left = 0 + center = 1 + right = 2 + +type + Engine* = ref object of gobject.Object + Engine00* = object of gobject.Object00 + +type + EngineShape* = ref object of Engine + EngineShape00* = object of Engine00 + +type + EngineLang* = ref object of Engine + EngineLang00* = object of Engine00 + +type + Font* = ref object of gobject.Object + Font00* = object of gobject.Object00 + +type + FontDescription00* {.pure.} = object + FontDescription* = ref object + impl*: ptr FontDescription00 + +proc pango_font_description_new*(): ptr FontDescription00 {. + importc: "pango_font_description_new", libprag.} + +proc newFontDescription*(): FontDescription = + new(result) + result.impl = pango_font_description_new() + +proc initFontDescription*[T](result: var T) = + assert(result is FontDescription) + new(result) + result.impl = pango_font_description_new() + +proc pango_font_description_better_match*(self: ptr FontDescription00; oldMatch: ptr FontDescription00; + newMatch: ptr FontDescription00): gboolean {. + importc: "pango_font_description_better_match", libprag.} + +proc betterMatch*(self: FontDescription; oldMatch: FontDescription; + newMatch: FontDescription): bool = + toBool(pango_font_description_better_match(cast[ptr FontDescription00](self.impl), cast[ptr FontDescription00](oldMatch.impl), cast[ptr FontDescription00](newMatch.impl))) + +proc pango_font_description_copy*(self: ptr FontDescription00): ptr FontDescription00 {. + importc: "pango_font_description_copy", libprag.} + +proc copy*(self: FontDescription): FontDescription = + new(result) + result.impl = pango_font_description_copy(cast[ptr FontDescription00](self.impl)) + +proc pango_font_description_copy_static*(self: ptr FontDescription00): ptr FontDescription00 {. + importc: "pango_font_description_copy_static", libprag.} + +proc copyStatic*(self: FontDescription): FontDescription = + new(result) + result.impl = pango_font_description_copy_static(cast[ptr FontDescription00](self.impl)) + +proc pango_font_description_equal*(self: ptr FontDescription00; desc2: ptr FontDescription00): gboolean {. + importc: "pango_font_description_equal", libprag.} + +proc equal*(self: FontDescription; desc2: FontDescription): bool = + toBool(pango_font_description_equal(cast[ptr FontDescription00](self.impl), cast[ptr FontDescription00](desc2.impl))) + +proc pango_font_description_free*(self: ptr FontDescription00) {. + importc: "pango_font_description_free", libprag.} + +proc free*(self: FontDescription) = + pango_font_description_free(cast[ptr FontDescription00](self.impl)) + +proc pango_font_description_get_family*(self: ptr FontDescription00): cstring {. + importc: "pango_font_description_get_family", libprag.} + +proc getFamily*(self: FontDescription): string = + let resul0 = pango_font_description_get_family(cast[ptr FontDescription00](self.impl)) + result = $resul0 + +proc family*(self: FontDescription): string = + let resul0 = pango_font_description_get_family(cast[ptr FontDescription00](self.impl)) + result = $resul0 + +proc pango_font_description_get_size*(self: ptr FontDescription00): int32 {. + importc: "pango_font_description_get_size", libprag.} + +proc getSize*(self: FontDescription): int = + int(pango_font_description_get_size(cast[ptr FontDescription00](self.impl))) + +proc size*(self: FontDescription): int = + int(pango_font_description_get_size(cast[ptr FontDescription00](self.impl))) + +proc pango_font_description_get_size_is_absolute*(self: ptr FontDescription00): gboolean {. + importc: "pango_font_description_get_size_is_absolute", libprag.} + +proc getSizeIsAbsolute*(self: FontDescription): bool = + toBool(pango_font_description_get_size_is_absolute(cast[ptr FontDescription00](self.impl))) + +proc sizeIsAbsolute*(self: FontDescription): bool = + toBool(pango_font_description_get_size_is_absolute(cast[ptr FontDescription00](self.impl))) + +proc pango_font_description_hash*(self: ptr FontDescription00): uint32 {. + importc: "pango_font_description_hash", libprag.} + +proc hash*(self: FontDescription): int = + int(pango_font_description_hash(cast[ptr FontDescription00](self.impl))) + +proc pango_font_description_merge*(self: ptr FontDescription00; descToMerge: ptr FontDescription00; + replaceExisting: gboolean) {. + importc: "pango_font_description_merge", libprag.} + +proc merge*(self: FontDescription; descToMerge: FontDescription; + replaceExisting: bool) = + pango_font_description_merge(cast[ptr FontDescription00](self.impl), cast[ptr FontDescription00](descToMerge.impl), gboolean(replaceExisting)) + +proc pango_font_description_merge_static*(self: ptr FontDescription00; descToMerge: ptr FontDescription00; + replaceExisting: gboolean) {. + importc: "pango_font_description_merge_static", libprag.} + +proc mergeStatic*(self: FontDescription; descToMerge: FontDescription; + replaceExisting: bool) = + pango_font_description_merge_static(cast[ptr FontDescription00](self.impl), cast[ptr FontDescription00](descToMerge.impl), gboolean(replaceExisting)) + +proc pango_font_description_set_absolute_size*(self: ptr FontDescription00; size: cdouble) {. + importc: "pango_font_description_set_absolute_size", libprag.} + +proc setAbsoluteSize*(self: FontDescription; size: cdouble) = + pango_font_description_set_absolute_size(cast[ptr FontDescription00](self.impl), size) + +proc `absoluteSize=`*(self: FontDescription; size: cdouble) = + pango_font_description_set_absolute_size(cast[ptr FontDescription00](self.impl), size) + +proc pango_font_description_set_family*(self: ptr FontDescription00; family: cstring) {. + importc: "pango_font_description_set_family", libprag.} + +proc setFamily*(self: FontDescription; family: string) = + pango_font_description_set_family(cast[ptr FontDescription00](self.impl), cstring(family)) + +proc `family=`*(self: FontDescription; family: string) = + pango_font_description_set_family(cast[ptr FontDescription00](self.impl), cstring(family)) + +proc pango_font_description_set_family_static*(self: ptr FontDescription00; family: cstring) {. + importc: "pango_font_description_set_family_static", libprag.} + +proc setFamilyStatic*(self: FontDescription; family: string) = + pango_font_description_set_family_static(cast[ptr FontDescription00](self.impl), cstring(family)) + +proc `familyStatic=`*(self: FontDescription; family: string) = + pango_font_description_set_family_static(cast[ptr FontDescription00](self.impl), cstring(family)) + +proc pango_font_description_set_size*(self: ptr FontDescription00; size: int32) {. + importc: "pango_font_description_set_size", libprag.} + +proc setSize*(self: FontDescription; size: int) = + pango_font_description_set_size(cast[ptr FontDescription00](self.impl), int32(size)) + +proc `size=`*(self: FontDescription; size: int) = + pango_font_description_set_size(cast[ptr FontDescription00](self.impl), int32(size)) + +proc pango_font_description_to_filename*(self: ptr FontDescription00): cstring {. + importc: "pango_font_description_to_filename", libprag.} + +proc toFilename*(self: FontDescription): string = + let resul0 = pango_font_description_to_filename(cast[ptr FontDescription00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc pango_font_description_to_string*(self: ptr FontDescription00): cstring {. + importc: "pango_font_description_to_string", libprag.} + +proc toString*(self: FontDescription): string = + let resul0 = pango_font_description_to_string(cast[ptr FontDescription00](self.impl)) + result = $resul0 + cogfree(resul0) + +proc pango_font_description_from_string*(str: cstring): ptr FontDescription00 {. + importc: "pango_font_description_from_string", libprag.} + +proc fromString*(str: string): FontDescription = + new(result) + result.impl = pango_font_description_from_string(cstring(str)) + +proc pango_font_descriptions_free*(descs: ptr FontDescription00Array; nDescs: int32) {. + importc: "pango_font_descriptions_free", libprag.} + +proc descriptionsFree*(descs: ptr FontDescription00Array; nDescs: int32) {. + importc: "pango_font_descriptions_free", libprag.} + +proc pango_font_describe*(self: ptr Font00): ptr FontDescription00 {. + importc: "pango_font_describe", libprag.} + +proc describe*(self: Font): FontDescription = + new(result) + result.impl = pango_font_describe(cast[ptr Font00](self.impl)) + +proc pango_font_describe_with_absolute_size*(self: ptr Font00): ptr FontDescription00 {. + importc: "pango_font_describe_with_absolute_size", libprag.} + +proc describeWithAbsoluteSize*(self: Font): FontDescription = + new(result) + result.impl = pango_font_describe_with_absolute_size(cast[ptr Font00](self.impl)) + +type + Gravity* {.size: sizeof(cint), pure.} = enum + south = 0 + east = 1 + north = 2 + west = 3 + auto = 4 + +proc pango_gravity_to_rotation*(gravity: Gravity): cdouble {. + importc: "pango_gravity_to_rotation", libprag.} + +proc toRotation*(gravity: Gravity): cdouble {. + importc: "pango_gravity_to_rotation", libprag.} + +proc pango_font_description_get_gravity*(self: ptr FontDescription00): Gravity {. + importc: "pango_font_description_get_gravity", libprag.} + +proc getGravity*(self: FontDescription): Gravity = + pango_font_description_get_gravity(cast[ptr FontDescription00](self.impl)) + +proc gravity*(self: FontDescription): Gravity = + pango_font_description_get_gravity(cast[ptr FontDescription00](self.impl)) + +proc pango_font_description_set_gravity*(self: ptr FontDescription00; gravity: Gravity) {. + importc: "pango_font_description_set_gravity", libprag.} + +proc setGravity*(self: FontDescription; gravity: Gravity) = + pango_font_description_set_gravity(cast[ptr FontDescription00](self.impl), gravity) + +proc `gravity=`*(self: FontDescription; gravity: Gravity) = + pango_font_description_set_gravity(cast[ptr FontDescription00](self.impl), gravity) + +type + Matrix00* {.pure.} = object + xx*: cdouble + xy*: cdouble + yx*: cdouble + yy*: cdouble + x0*: cdouble + y0*: cdouble + Matrix* = ref object + impl*: ptr Matrix00 + +proc pango_matrix_concat*(self: ptr Matrix00; newMatrix: ptr Matrix00) {. + importc: "pango_matrix_concat", libprag.} + +proc concat*(self: Matrix; newMatrix: Matrix) = + pango_matrix_concat(cast[ptr Matrix00](self.impl), cast[ptr Matrix00](newMatrix.impl)) + +proc pango_matrix_copy*(self: ptr Matrix00): ptr Matrix00 {. + importc: "pango_matrix_copy", libprag.} + +proc copy*(self: Matrix): Matrix = + new(result) + result.impl = pango_matrix_copy(cast[ptr Matrix00](self.impl)) + +proc pango_matrix_free*(self: ptr Matrix00) {. + importc: "pango_matrix_free", libprag.} + +proc free*(self: Matrix) = + pango_matrix_free(cast[ptr Matrix00](self.impl)) + +proc pango_matrix_get_font_scale_factor*(self: ptr Matrix00): cdouble {. + importc: "pango_matrix_get_font_scale_factor", libprag.} + +proc getFontScaleFactor*(self: Matrix): cdouble = + pango_matrix_get_font_scale_factor(cast[ptr Matrix00](self.impl)) + +proc fontScaleFactor*(self: Matrix): cdouble = + pango_matrix_get_font_scale_factor(cast[ptr Matrix00](self.impl)) + +proc pango_matrix_get_font_scale_factors*(self: ptr Matrix00; xscale: var cdouble; yscale: var cdouble) {. + importc: "pango_matrix_get_font_scale_factors", libprag.} + +proc getFontScaleFactors*(self: Matrix; xscale: var cdouble; yscale: var cdouble) = + pango_matrix_get_font_scale_factors(cast[ptr Matrix00](self.impl), xscale, yscale) + +proc fontScaleFactors*(self: Matrix; xscale: var cdouble; yscale: var cdouble) = + pango_matrix_get_font_scale_factors(cast[ptr Matrix00](self.impl), xscale, yscale) + +proc pango_matrix_rotate*(self: ptr Matrix00; degrees: cdouble) {. + importc: "pango_matrix_rotate", libprag.} + +proc rotate*(self: Matrix; degrees: cdouble) = + pango_matrix_rotate(cast[ptr Matrix00](self.impl), degrees) + +proc pango_matrix_scale*(self: ptr Matrix00; scaleX: cdouble; scaleY: cdouble) {. + importc: "pango_matrix_scale", libprag.} + +proc scale*(self: Matrix; scaleX: cdouble; scaleY: cdouble) = + pango_matrix_scale(cast[ptr Matrix00](self.impl), scaleX, scaleY) + +proc pango_matrix_transform_distance*(self: ptr Matrix00; dx: cdouble; dy: cdouble) {. + importc: "pango_matrix_transform_distance", libprag.} + +proc transformDistance*(self: Matrix; dx: cdouble; dy: cdouble) = + pango_matrix_transform_distance(cast[ptr Matrix00](self.impl), dx, dy) + +proc pango_matrix_transform_point*(self: ptr Matrix00; x: cdouble; y: cdouble) {. + importc: "pango_matrix_transform_point", libprag.} + +proc transformPoint*(self: Matrix; x: cdouble; y: cdouble) = + pango_matrix_transform_point(cast[ptr Matrix00](self.impl), x, y) + +proc pango_matrix_translate*(self: ptr Matrix00; tx: cdouble; ty: cdouble) {. + importc: "pango_matrix_translate", libprag.} + +proc translate*(self: Matrix; tx: cdouble; ty: cdouble) = + pango_matrix_translate(cast[ptr Matrix00](self.impl), tx, ty) + +proc pango_gravity_get_for_matrix*(matrix: ptr Matrix00): Gravity {. + importc: "pango_gravity_get_for_matrix", libprag.} + +proc getForMatrix*(matrix: Matrix): Gravity = + pango_gravity_get_for_matrix(cast[ptr Matrix00](matrix.impl)) + +proc forMatrix*(matrix: Matrix): Gravity = + pango_gravity_get_for_matrix(cast[ptr Matrix00](matrix.impl)) + +type + Script* {.size: sizeof(cint), pure.} = enum + invalidCode = -1 + common = 0 + inherited = 1 + arabic = 2 + armenian = 3 + bengali = 4 + bopomofo = 5 + cherokee = 6 + coptic = 7 + cyrillic = 8 + deseret = 9 + devanagari = 10 + ethiopic = 11 + georgian = 12 + gothic = 13 + greek = 14 + gujarati = 15 + gurmukhi = 16 + han = 17 + hangul = 18 + hebrew = 19 + hiragana = 20 + kannada = 21 + katakana = 22 + khmer = 23 + lao = 24 + latin = 25 + malayalam = 26 + mongolian = 27 + myanmar = 28 + ogham = 29 + oldItalic = 30 + oriya = 31 + runic = 32 + sinhala = 33 + syriac = 34 + tamil = 35 + telugu = 36 + thaana = 37 + thai = 38 + tibetan = 39 + canadianAboriginal = 40 + yi = 41 + tagalog = 42 + hanunoo = 43 + buhid = 44 + tagbanwa = 45 + braille = 46 + cypriot = 47 + limbu = 48 + osmanya = 49 + shavian = 50 + linearB = 51 + taiLe = 52 + ugaritic = 53 + newTaiLue = 54 + buginese = 55 + glagolitic = 56 + tifinagh = 57 + sylotiNagri = 58 + oldPersian = 59 + kharoshthi = 60 + unknown = 61 + balinese = 62 + cuneiform = 63 + phoenician = 64 + phagsPa = 65 + nko = 66 + kayahLi = 67 + lepcha = 68 + rejang = 69 + sundanese = 70 + saurashtra = 71 + cham = 72 + olChiki = 73 + vai = 74 + carian = 75 + lycian = 76 + lydian = 77 + batak = 78 + brahmi = 79 + mandaic = 80 + chakma = 81 + meroiticCursive = 82 + meroiticHieroglyphs = 83 + miao = 84 + sharada = 85 + soraSompeng = 86 + takri = 87 + bassaVah = 88 + caucasianAlbanian = 89 + duployan = 90 + elbasan = 91 + grantha = 92 + khojki = 93 + khudawadi = 94 + linearA = 95 + mahajani = 96 + manichaean = 97 + mendeKikakui = 98 + modi = 99 + mro = 100 + nabataean = 101 + oldNorthArabian = 102 + oldPermic = 103 + pahawhHmong = 104 + palmyrene = 105 + pauCinHau = 106 + psalterPahlavi = 107 + siddham = 108 + tirhuta = 109 + warangCiti = 110 + ahom = 111 + anatolianHieroglyphs = 112 + hatran = 113 + multani = 114 + oldHungarian = 115 + signwriting = 116 + +proc pango_script_for_unichar*(ch: gunichar): Script {. + importc: "pango_script_for_unichar", libprag.} + +proc forUnichar*(ch: gunichar): Script {. + importc: "pango_script_for_unichar", libprag.} + +type + GravityHint* {.size: sizeof(cint), pure.} = enum + natural = 0 + strong = 1 + line = 2 + +proc pango_gravity_get_for_script*(script: Script; baseGravity: Gravity; hint: GravityHint): Gravity {. + importc: "pango_gravity_get_for_script", libprag.} + +proc getForScript*(script: Script; baseGravity: Gravity; hint: GravityHint): Gravity {. + importc: "pango_gravity_get_for_script", libprag.} + +proc forScript*(script: Script; baseGravity: Gravity; hint: GravityHint): Gravity {. + importc: "pango_gravity_get_for_script", libprag.} + +proc pango_gravity_get_for_script_and_width*(script: Script; wide: gboolean; baseGravity: Gravity; + hint: GravityHint): Gravity {. + importc: "pango_gravity_get_for_script_and_width", libprag.} + +proc getForScriptAndWidth*(script: Script; wide: gboolean; baseGravity: Gravity; + hint: GravityHint): Gravity {. + importc: "pango_gravity_get_for_script_and_width", libprag.} + +proc forScriptAndWidth*(script: Script; wide: gboolean; baseGravity: Gravity; + hint: GravityHint): Gravity {. + importc: "pango_gravity_get_for_script_and_width", libprag.} + +type + Stretch* {.size: sizeof(cint), pure.} = enum + ultraCondensed = 0 + extraCondensed = 1 + condensed = 2 + semiCondensed = 3 + normal = 4 + semiExpanded = 5 + expanded = 6 + extraExpanded = 7 + ultraExpanded = 8 + +proc pango_font_description_get_stretch*(self: ptr FontDescription00): Stretch {. + importc: "pango_font_description_get_stretch", libprag.} + +proc getStretch*(self: FontDescription): Stretch = + pango_font_description_get_stretch(cast[ptr FontDescription00](self.impl)) + +proc stretch*(self: FontDescription): Stretch = + pango_font_description_get_stretch(cast[ptr FontDescription00](self.impl)) + +proc pango_font_description_set_stretch*(self: ptr FontDescription00; stretch: Stretch) {. + importc: "pango_font_description_set_stretch", libprag.} + +proc setStretch*(self: FontDescription; stretch: Stretch) = + pango_font_description_set_stretch(cast[ptr FontDescription00](self.impl), stretch) + +proc `stretch=`*(self: FontDescription; stretch: Stretch) = + pango_font_description_set_stretch(cast[ptr FontDescription00](self.impl), stretch) + +type + Style* {.size: sizeof(cint), pure.} = enum + normal = 0 + oblique = 1 + italic = 2 + +proc pango_font_description_get_style*(self: ptr FontDescription00): Style {. + importc: "pango_font_description_get_style", libprag.} + +proc getStyle*(self: FontDescription): Style = + pango_font_description_get_style(cast[ptr FontDescription00](self.impl)) + +proc style*(self: FontDescription): Style = + pango_font_description_get_style(cast[ptr FontDescription00](self.impl)) + +proc pango_font_description_set_style*(self: ptr FontDescription00; style: Style) {. + importc: "pango_font_description_set_style", libprag.} + +proc setStyle*(self: FontDescription; style: Style) = + pango_font_description_set_style(cast[ptr FontDescription00](self.impl), style) + +proc `style=`*(self: FontDescription; style: Style) = + pango_font_description_set_style(cast[ptr FontDescription00](self.impl), style) + +type + Variant* {.size: sizeof(cint), pure.} = enum + normal = 0 + smallCaps = 1 + +proc pango_font_description_get_variant*(self: ptr FontDescription00): Variant {. + importc: "pango_font_description_get_variant", libprag.} + +proc getVariant*(self: FontDescription): Variant = + pango_font_description_get_variant(cast[ptr FontDescription00](self.impl)) + +proc variant*(self: FontDescription): Variant = + pango_font_description_get_variant(cast[ptr FontDescription00](self.impl)) + +proc pango_font_description_set_variant*(self: ptr FontDescription00; variant: Variant) {. + importc: "pango_font_description_set_variant", libprag.} + +proc setVariant*(self: FontDescription; variant: Variant) = + pango_font_description_set_variant(cast[ptr FontDescription00](self.impl), variant) + +proc `variant=`*(self: FontDescription; variant: Variant) = + pango_font_description_set_variant(cast[ptr FontDescription00](self.impl), variant) + +type + Weight* {.size: sizeof(cint), pure.} = enum + thin = 100 + ultralight = 200 + light = 300 + semilight = 350 + book = 380 + normal = 400 + medium = 500 + semibold = 600 + bold = 700 + ultrabold = 800 + heavy = 900 + ultraheavy = 1000 + +proc pango_font_description_get_weight*(self: ptr FontDescription00): Weight {. + importc: "pango_font_description_get_weight", libprag.} + +proc getWeight*(self: FontDescription): Weight = + pango_font_description_get_weight(cast[ptr FontDescription00](self.impl)) + +proc weight*(self: FontDescription): Weight = + pango_font_description_get_weight(cast[ptr FontDescription00](self.impl)) + +proc pango_font_description_set_weight*(self: ptr FontDescription00; weight: Weight) {. + importc: "pango_font_description_set_weight", libprag.} + +proc setWeight*(self: FontDescription; weight: Weight) = + pango_font_description_set_weight(cast[ptr FontDescription00](self.impl), weight) + +proc `weight=`*(self: FontDescription; weight: Weight) = + pango_font_description_set_weight(cast[ptr FontDescription00](self.impl), weight) + +type + FontMask* {.size: sizeof(cint), pure.} = enum + family = 1 + style = 2 + variant = 4 + weight = 8 + stretch = 16 + size = 32 + gravity = 64 + +proc pango_font_description_get_set_fields*(self: ptr FontDescription00): FontMask {. + importc: "pango_font_description_get_set_fields", libprag.} + +proc getSetFields*(self: FontDescription): FontMask = + pango_font_description_get_set_fields(cast[ptr FontDescription00](self.impl)) + +proc `fields=`*(self: FontDescription): FontMask = + pango_font_description_get_set_fields(cast[ptr FontDescription00](self.impl)) + +proc pango_font_description_unset_fields*(self: ptr FontDescription00; toUnset: FontMask) {. + importc: "pango_font_description_unset_fields", libprag.} + +proc unsetFields*(self: FontDescription; toUnset: FontMask) = + pango_font_description_unset_fields(cast[ptr FontDescription00](self.impl), toUnset) + +type + FontMap* = ref object of gobject.Object + FontMap00* = object of gobject.Object00 + +proc pango_font_map_changed*(self: ptr FontMap00) {. + importc: "pango_font_map_changed", libprag.} + +proc changed*(self: FontMap) = + pango_font_map_changed(cast[ptr FontMap00](self.impl)) + +proc pango_font_map_get_serial*(self: ptr FontMap00): uint32 {. + importc: "pango_font_map_get_serial", libprag.} + +proc getSerial*(self: FontMap): int = + int(pango_font_map_get_serial(cast[ptr FontMap00](self.impl))) + +proc serial*(self: FontMap): int = + int(pango_font_map_get_serial(cast[ptr FontMap00](self.impl))) + +proc pango_font_map_get_shape_engine_type*(self: ptr FontMap00): cstring {. + importc: "pango_font_map_get_shape_engine_type", libprag.} + +proc getShapeEngineType*(self: FontMap): string = + let resul0 = pango_font_map_get_shape_engine_type(cast[ptr FontMap00](self.impl)) + result = $resul0 + +proc shapeEngineType*(self: FontMap): string = + let resul0 = pango_font_map_get_shape_engine_type(cast[ptr FontMap00](self.impl)) + result = $resul0 + +proc pango_font_get_font_map*(self: ptr Font00): ptr FontMap00 {. + importc: "pango_font_get_font_map", libprag.} + +proc getFontMap*(self: Font): FontMap = + let gobj = pango_font_get_font_map(cast[ptr Font00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fontMap*(self: Font): FontMap = + let gobj = pango_font_get_font_map(cast[ptr Font00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + FontFamily* = ref object of gobject.Object + FontFamily00* = object of gobject.Object00 + +proc pango_font_family_get_name*(self: ptr FontFamily00): cstring {. + importc: "pango_font_family_get_name", libprag.} + +proc getName*(self: FontFamily): string = + let resul0 = pango_font_family_get_name(cast[ptr FontFamily00](self.impl)) + result = $resul0 + +proc name*(self: FontFamily): string = + let resul0 = pango_font_family_get_name(cast[ptr FontFamily00](self.impl)) + result = $resul0 + +proc pango_font_family_is_monospace*(self: ptr FontFamily00): gboolean {. + importc: "pango_font_family_is_monospace", libprag.} + +proc isMonospace*(self: FontFamily): bool = + toBool(pango_font_family_is_monospace(cast[ptr FontFamily00](self.impl))) + +proc pango_font_map_list_families*(self: ptr FontMap00; families: var ptr FontFamily00Array; + nFamilies: var int32) {. + importc: "pango_font_map_list_families", libprag.} + +proc listFamilies*(self: FontMap; families: var ptr FontFamily00Array; + nFamilies: var int) = + var nFamilies_00 = int32(nFamilies) + pango_font_map_list_families(cast[ptr FontMap00](self.impl), families, nFamilies_00) + nFamilies = int(nFamilies_00) + +type + FontFace* = ref object of gobject.Object + FontFace00* = object of gobject.Object00 + +proc pango_font_face_describe*(self: ptr FontFace00): ptr FontDescription00 {. + importc: "pango_font_face_describe", libprag.} + +proc describe*(self: FontFace): FontDescription = + new(result) + result.impl = pango_font_face_describe(cast[ptr FontFace00](self.impl)) + +proc pango_font_face_get_face_name*(self: ptr FontFace00): cstring {. + importc: "pango_font_face_get_face_name", libprag.} + +proc getFaceName*(self: FontFace): string = + let resul0 = pango_font_face_get_face_name(cast[ptr FontFace00](self.impl)) + result = $resul0 + +proc faceName*(self: FontFace): string = + let resul0 = pango_font_face_get_face_name(cast[ptr FontFace00](self.impl)) + result = $resul0 + +proc pango_font_face_is_synthesized*(self: ptr FontFace00): gboolean {. + importc: "pango_font_face_is_synthesized", libprag.} + +proc isSynthesized*(self: FontFace): bool = + toBool(pango_font_face_is_synthesized(cast[ptr FontFace00](self.impl))) + +proc pango_font_face_list_sizes*(self: ptr FontFace00; sizes: var int32Array; nSizes: var int32) {. + importc: "pango_font_face_list_sizes", libprag.} + +proc listSizes*(self: FontFace; sizes: var int32Array; nSizes: var int) = + var nSizes_00 = int32(nSizes) + pango_font_face_list_sizes(cast[ptr FontFace00](self.impl), sizes, nSizes_00) + nSizes = int(nSizes_00) + +proc pango_font_family_list_faces*(self: ptr FontFamily00; faces: var ptr FontFace00Array; + nFaces: var int32) {. + importc: "pango_font_family_list_faces", libprag.} + +proc listFaces*(self: FontFamily; faces: var ptr FontFace00Array; + nFaces: var int) = + var nFaces_00 = int32(nFaces) + pango_font_family_list_faces(cast[ptr FontFamily00](self.impl), faces, nFaces_00) + nFaces = int(nFaces_00) + +type + Context* = ref object of gobject.Object + Context00* = object of gobject.Object00 + +proc pango_context_new*(): ptr Context00 {. + importc: "pango_context_new", libprag.} + +proc newContext*(): Context = + new(result, finalizeGObject) + result.impl = pango_context_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initContext*[T](result: var T) = + assert(result is Context) + new(result, finalizeGObject) + result.impl = pango_context_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_context_changed*(self: ptr Context00) {. + importc: "pango_context_changed", libprag.} + +proc changed*(self: Context) = + pango_context_changed(cast[ptr Context00](self.impl)) + +proc pango_context_get_base_gravity*(self: ptr Context00): Gravity {. + importc: "pango_context_get_base_gravity", libprag.} + +proc getBaseGravity*(self: Context): Gravity = + pango_context_get_base_gravity(cast[ptr Context00](self.impl)) + +proc baseGravity*(self: Context): Gravity = + pango_context_get_base_gravity(cast[ptr Context00](self.impl)) + +proc pango_context_get_font_description*(self: ptr Context00): ptr FontDescription00 {. + importc: "pango_context_get_font_description", libprag.} + +proc getFontDescription*(self: Context): FontDescription = + new(result) + result.impl = pango_context_get_font_description(cast[ptr Context00](self.impl)) + +proc fontDescription*(self: Context): FontDescription = + new(result) + result.impl = pango_context_get_font_description(cast[ptr Context00](self.impl)) + +proc pango_context_get_font_map*(self: ptr Context00): ptr FontMap00 {. + importc: "pango_context_get_font_map", libprag.} + +proc getFontMap*(self: Context): FontMap = + let gobj = pango_context_get_font_map(cast[ptr Context00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc fontMap*(self: Context): FontMap = + let gobj = pango_context_get_font_map(cast[ptr Context00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[FontMap](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_context_get_gravity*(self: ptr Context00): Gravity {. + importc: "pango_context_get_gravity", libprag.} + +proc getGravity*(self: Context): Gravity = + pango_context_get_gravity(cast[ptr Context00](self.impl)) + +proc gravity*(self: Context): Gravity = + pango_context_get_gravity(cast[ptr Context00](self.impl)) + +proc pango_context_get_gravity_hint*(self: ptr Context00): GravityHint {. + importc: "pango_context_get_gravity_hint", libprag.} + +proc getGravityHint*(self: Context): GravityHint = + pango_context_get_gravity_hint(cast[ptr Context00](self.impl)) + +proc gravityHint*(self: Context): GravityHint = + pango_context_get_gravity_hint(cast[ptr Context00](self.impl)) + +proc pango_context_get_matrix*(self: ptr Context00): ptr Matrix00 {. + importc: "pango_context_get_matrix", libprag.} + +proc getMatrix*(self: Context): Matrix = + new(result) + result.impl = pango_context_get_matrix(cast[ptr Context00](self.impl)) + +proc matrix*(self: Context): Matrix = + new(result) + result.impl = pango_context_get_matrix(cast[ptr Context00](self.impl)) + +proc pango_context_get_serial*(self: ptr Context00): uint32 {. + importc: "pango_context_get_serial", libprag.} + +proc getSerial*(self: Context): int = + int(pango_context_get_serial(cast[ptr Context00](self.impl))) + +proc serial*(self: Context): int = + int(pango_context_get_serial(cast[ptr Context00](self.impl))) + +proc pango_context_list_families*(self: ptr Context00; families: var ptr FontFamily00Array; + nFamilies: var int32) {. + importc: "pango_context_list_families", libprag.} + +proc listFamilies*(self: Context; families: var ptr FontFamily00Array; + nFamilies: var int) = + var nFamilies_00 = int32(nFamilies) + pango_context_list_families(cast[ptr Context00](self.impl), families, nFamilies_00) + nFamilies = int(nFamilies_00) + +proc pango_context_load_font*(self: ptr Context00; desc: ptr FontDescription00): ptr Font00 {. + importc: "pango_context_load_font", libprag.} + +proc loadFont*(self: Context; desc: FontDescription): Font = + let gobj = pango_context_load_font(cast[ptr Context00](self.impl), cast[ptr FontDescription00](desc.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Font](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_context_set_base_gravity*(self: ptr Context00; gravity: Gravity) {. + importc: "pango_context_set_base_gravity", libprag.} + +proc setBaseGravity*(self: Context; gravity: Gravity) = + pango_context_set_base_gravity(cast[ptr Context00](self.impl), gravity) + +proc `baseGravity=`*(self: Context; gravity: Gravity) = + pango_context_set_base_gravity(cast[ptr Context00](self.impl), gravity) + +proc pango_context_set_font_description*(self: ptr Context00; desc: ptr FontDescription00) {. + importc: "pango_context_set_font_description", libprag.} + +proc setFontDescription*(self: Context; desc: FontDescription) = + pango_context_set_font_description(cast[ptr Context00](self.impl), cast[ptr FontDescription00](desc.impl)) + +proc `fontDescription=`*(self: Context; desc: FontDescription) = + pango_context_set_font_description(cast[ptr Context00](self.impl), cast[ptr FontDescription00](desc.impl)) + +proc pango_context_set_font_map*(self: ptr Context00; fontMap: ptr FontMap00) {. + importc: "pango_context_set_font_map", libprag.} + +proc setFontMap*(self: Context; fontMap: FontMap) = + pango_context_set_font_map(cast[ptr Context00](self.impl), cast[ptr FontMap00](fontMap.impl)) + +proc `fontMap=`*(self: Context; fontMap: FontMap) = + pango_context_set_font_map(cast[ptr Context00](self.impl), cast[ptr FontMap00](fontMap.impl)) + +proc pango_context_set_gravity_hint*(self: ptr Context00; hint: GravityHint) {. + importc: "pango_context_set_gravity_hint", libprag.} + +proc setGravityHint*(self: Context; hint: GravityHint) = + pango_context_set_gravity_hint(cast[ptr Context00](self.impl), hint) + +proc `gravityHint=`*(self: Context; hint: GravityHint) = + pango_context_set_gravity_hint(cast[ptr Context00](self.impl), hint) + +proc pango_context_set_matrix*(self: ptr Context00; matrix: ptr Matrix00) {. + importc: "pango_context_set_matrix", libprag.} + +proc setMatrix*(self: Context; matrix: Matrix) = + pango_context_set_matrix(cast[ptr Context00](self.impl), cast[ptr Matrix00](matrix.impl)) + +proc `matrix=`*(self: Context; matrix: Matrix) = + pango_context_set_matrix(cast[ptr Context00](self.impl), cast[ptr Matrix00](matrix.impl)) + +proc pango_font_map_create_context*(self: ptr FontMap00): ptr Context00 {. + importc: "pango_font_map_create_context", libprag.} + +proc createContext*(self: FontMap): Context = + let gobj = pango_font_map_create_context(cast[ptr FontMap00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_font_map_load_font*(self: ptr FontMap00; context: ptr Context00; desc: ptr FontDescription00): ptr Font00 {. + importc: "pango_font_map_load_font", libprag.} + +proc loadFont*(self: FontMap; context: Context; desc: FontDescription): Font = + let gobj = pango_font_map_load_font(cast[ptr FontMap00](self.impl), cast[ptr Context00](context.impl), cast[ptr FontDescription00](desc.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Font](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + Direction* {.size: sizeof(cint), pure.} = enum + ltr = 0 + rtl = 1 + ttbLtr = 2 + ttbRtl = 3 + weakLtr = 4 + weakRtl = 5 + neutral = 6 + +proc pango_context_get_base_dir*(self: ptr Context00): Direction {. + importc: "pango_context_get_base_dir", libprag.} + +proc getBaseDir*(self: Context): Direction = + pango_context_get_base_dir(cast[ptr Context00](self.impl)) + +proc baseDir*(self: Context): Direction = + pango_context_get_base_dir(cast[ptr Context00](self.impl)) + +proc pango_context_set_base_dir*(self: ptr Context00; direction: Direction) {. + importc: "pango_context_set_base_dir", libprag.} + +proc setBaseDir*(self: Context; direction: Direction) = + pango_context_set_base_dir(cast[ptr Context00](self.impl), direction) + +proc `baseDir=`*(self: Context; direction: Direction) = + pango_context_set_base_dir(cast[ptr Context00](self.impl), direction) + +type + Rectangle00* {.pure.} = object + x*: int32 + y*: int32 + width*: int32 + height*: int32 + Rectangle* = ref object + impl*: ptr Rectangle00 + +proc pango_font_get_glyph_extents*(self: ptr Font00; glyph: uint32; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_font_get_glyph_extents", libprag.} + +proc getGlyphExtents*(self: ptr Font00; glyph: uint32; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_font_get_glyph_extents", libprag.} + +proc glyphExtents*(self: ptr Font00; glyph: uint32; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_font_get_glyph_extents", libprag.} + +proc pango_matrix_transform_pixel_rectangle*(self: ptr Matrix00; rect: Rectangle00) {. + importc: "pango_matrix_transform_pixel_rectangle", libprag.} + +proc transformPixelRectangle*(self: ptr Matrix00; rect: Rectangle00) {. + importc: "pango_matrix_transform_pixel_rectangle", libprag.} + +proc pango_matrix_transform_rectangle*(self: ptr Matrix00; rect: Rectangle00) {. + importc: "pango_matrix_transform_rectangle", libprag.} + +proc transformRectangle*(self: ptr Matrix00; rect: Rectangle00) {. + importc: "pango_matrix_transform_rectangle", libprag.} + +type + Language00* {.pure.} = object + Language* = ref object + impl*: ptr Language00 + +proc pango_language_get_sample_string*(self: ptr Language00): cstring {. + importc: "pango_language_get_sample_string", libprag.} + +proc getSampleString*(self: Language): string = + let resul0 = pango_language_get_sample_string(cast[ptr Language00](self.impl)) + result = $resul0 + +proc sampleString*(self: Language): string = + let resul0 = pango_language_get_sample_string(cast[ptr Language00](self.impl)) + result = $resul0 + +proc pango_language_get_scripts*(self: ptr Language00; numScripts: var int32): ScriptArray {. + importc: "pango_language_get_scripts", libprag.} + +proc getScripts*(self: Language; numScripts: var int): ScriptArray = + var numScripts_00 = int32(numScripts) + result = pango_language_get_scripts(cast[ptr Language00](self.impl), numScripts_00) + numScripts = int(numScripts_00) + +proc scripts*(self: Language; numScripts: var int): ScriptArray = + var numScripts_00 = int32(numScripts) + result = pango_language_get_scripts(cast[ptr Language00](self.impl), numScripts_00) + numScripts = int(numScripts_00) + +proc pango_language_includes_script*(self: ptr Language00; script: Script): gboolean {. + importc: "pango_language_includes_script", libprag.} + +proc includesScript*(self: Language; script: Script): bool = + toBool(pango_language_includes_script(cast[ptr Language00](self.impl), script)) + +proc pango_language_matches*(self: ptr Language00; rangeList: cstring): gboolean {. + importc: "pango_language_matches", libprag.} + +proc matches*(self: Language; rangeList: string): bool = + toBool(pango_language_matches(cast[ptr Language00](self.impl), cstring(rangeList))) + +proc pango_language_to_string*(self: ptr Language00): cstring {. + importc: "pango_language_to_string", libprag.} + +proc toString*(self: Language): string = + let resul0 = pango_language_to_string(cast[ptr Language00](self.impl)) + result = $resul0 + +proc pango_language_from_string*(language: cstring): ptr Language00 {. + importc: "pango_language_from_string", libprag.} + +proc fromString*(language: string): Language = + new(result) + result.impl = pango_language_from_string(cstring(language)) + +proc pango_language_get_default*(): ptr Language00 {. + importc: "pango_language_get_default", libprag.} + +proc getDefault*(): Language = + new(result) + result.impl = pango_language_get_default() + +proc default*(): Language = + new(result) + result.impl = pango_language_get_default() + +type + Analysis00* {.pure.} = object + shapeEngine*: ptr EngineShape00 + langEngine*: ptr EngineLang00 + font*: ptr Font00 + level*: uint8 + gravity*: uint8 + flags*: uint8 + script*: uint8 + language*: ptr Language00 + extraAttrs*: ptr pointer + Analysis* = ref object + impl*: ptr Analysis00 + +proc pango_font_find_shaper*(self: ptr Font00; language: ptr Language00; ch: uint32): ptr EngineShape00 {. + importc: "pango_font_find_shaper", libprag.} + +proc findShaper*(self: Font; language: Language; ch: int): EngineShape = + let gobj = pango_font_find_shaper(cast[ptr Font00](self.impl), cast[ptr Language00](language.impl), uint32(ch)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[EngineShape](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_script_get_sample_language*(script: Script): ptr Language00 {. + importc: "pango_script_get_sample_language", libprag.} + +proc getSampleLanguage*(script: Script): Language = + new(result) + result.impl = pango_script_get_sample_language(script) + +proc sampleLanguage*(script: Script): Language = + new(result) + result.impl = pango_script_get_sample_language(script) + +proc pango_context_get_language*(self: ptr Context00): ptr Language00 {. + importc: "pango_context_get_language", libprag.} + +proc getLanguage*(self: Context): Language = + new(result) + result.impl = pango_context_get_language(cast[ptr Context00](self.impl)) + +proc language*(self: Context): Language = + new(result) + result.impl = pango_context_get_language(cast[ptr Context00](self.impl)) + +proc pango_context_set_language*(self: ptr Context00; language: ptr Language00) {. + importc: "pango_context_set_language", libprag.} + +proc setLanguage*(self: Context; language: Language) = + pango_context_set_language(cast[ptr Context00](self.impl), cast[ptr Language00](language.impl)) + +proc `language=`*(self: Context; language: Language) = + pango_context_set_language(cast[ptr Context00](self.impl), cast[ptr Language00](language.impl)) + +type + FontMetrics00* {.pure.} = object + refCount*: uint32 + ascent*: int32 + descent*: int32 + approximateCharWidth*: int32 + approximateDigitWidth*: int32 + underlinePosition*: int32 + underlineThickness*: int32 + strikethroughPosition*: int32 + strikethroughThickness*: int32 + FontMetrics* = ref object + impl*: ptr FontMetrics00 + +proc pango_font_metrics_new*(): ptr FontMetrics00 {. + importc: "pango_font_metrics_new", libprag.} + +proc newFontMetrics*(): FontMetrics = + new(result) + result.impl = pango_font_metrics_new() + +proc initFontMetrics*[T](result: var T) = + assert(result is FontMetrics) + new(result) + result.impl = pango_font_metrics_new() + +proc pango_font_metrics_get_approximate_char_width*(self: ptr FontMetrics00): int32 {. + importc: "pango_font_metrics_get_approximate_char_width", libprag.} + +proc getApproximateCharWidth*(self: FontMetrics): int = + int(pango_font_metrics_get_approximate_char_width(cast[ptr FontMetrics00](self.impl))) + +proc approximateCharWidth*(self: FontMetrics): int = + int(pango_font_metrics_get_approximate_char_width(cast[ptr FontMetrics00](self.impl))) + +proc pango_font_metrics_get_approximate_digit_width*(self: ptr FontMetrics00): int32 {. + importc: "pango_font_metrics_get_approximate_digit_width", libprag.} + +proc getApproximateDigitWidth*(self: FontMetrics): int = + int(pango_font_metrics_get_approximate_digit_width(cast[ptr FontMetrics00](self.impl))) + +proc approximateDigitWidth*(self: FontMetrics): int = + int(pango_font_metrics_get_approximate_digit_width(cast[ptr FontMetrics00](self.impl))) + +proc pango_font_metrics_get_ascent*(self: ptr FontMetrics00): int32 {. + importc: "pango_font_metrics_get_ascent", libprag.} + +proc getAscent*(self: FontMetrics): int = + int(pango_font_metrics_get_ascent(cast[ptr FontMetrics00](self.impl))) + +proc ascent*(self: FontMetrics): int = + int(pango_font_metrics_get_ascent(cast[ptr FontMetrics00](self.impl))) + +proc pango_font_metrics_get_descent*(self: ptr FontMetrics00): int32 {. + importc: "pango_font_metrics_get_descent", libprag.} + +proc getDescent*(self: FontMetrics): int = + int(pango_font_metrics_get_descent(cast[ptr FontMetrics00](self.impl))) + +proc descent*(self: FontMetrics): int = + int(pango_font_metrics_get_descent(cast[ptr FontMetrics00](self.impl))) + +proc pango_font_metrics_get_strikethrough_position*(self: ptr FontMetrics00): int32 {. + importc: "pango_font_metrics_get_strikethrough_position", libprag.} + +proc getStrikethroughPosition*(self: FontMetrics): int = + int(pango_font_metrics_get_strikethrough_position(cast[ptr FontMetrics00](self.impl))) + +proc strikethroughPosition*(self: FontMetrics): int = + int(pango_font_metrics_get_strikethrough_position(cast[ptr FontMetrics00](self.impl))) + +proc pango_font_metrics_get_strikethrough_thickness*(self: ptr FontMetrics00): int32 {. + importc: "pango_font_metrics_get_strikethrough_thickness", libprag.} + +proc getStrikethroughThickness*(self: FontMetrics): int = + int(pango_font_metrics_get_strikethrough_thickness(cast[ptr FontMetrics00](self.impl))) + +proc strikethroughThickness*(self: FontMetrics): int = + int(pango_font_metrics_get_strikethrough_thickness(cast[ptr FontMetrics00](self.impl))) + +proc pango_font_metrics_get_underline_position*(self: ptr FontMetrics00): int32 {. + importc: "pango_font_metrics_get_underline_position", libprag.} + +proc getUnderlinePosition*(self: FontMetrics): int = + int(pango_font_metrics_get_underline_position(cast[ptr FontMetrics00](self.impl))) + +proc underlinePosition*(self: FontMetrics): int = + int(pango_font_metrics_get_underline_position(cast[ptr FontMetrics00](self.impl))) + +proc pango_font_metrics_get_underline_thickness*(self: ptr FontMetrics00): int32 {. + importc: "pango_font_metrics_get_underline_thickness", libprag.} + +proc getUnderlineThickness*(self: FontMetrics): int = + int(pango_font_metrics_get_underline_thickness(cast[ptr FontMetrics00](self.impl))) + +proc underlineThickness*(self: FontMetrics): int = + int(pango_font_metrics_get_underline_thickness(cast[ptr FontMetrics00](self.impl))) + +proc pango_font_metrics_ref*(self: ptr FontMetrics00): ptr FontMetrics00 {. + importc: "pango_font_metrics_ref", libprag.} + +proc `ref`*(self: FontMetrics): FontMetrics = + new(result) + result.impl = pango_font_metrics_ref(cast[ptr FontMetrics00](self.impl)) + +proc pango_font_metrics_unref*(self: ptr FontMetrics00) {. + importc: "pango_font_metrics_unref", libprag.} + +proc unref*(self: FontMetrics) = + pango_font_metrics_unref(cast[ptr FontMetrics00](self.impl)) + +proc pango_font_get_metrics*(self: ptr Font00; language: ptr Language00): ptr FontMetrics00 {. + importc: "pango_font_get_metrics", libprag.} + +proc getMetrics*(self: Font; language: Language): FontMetrics = + new(result) + result.impl = pango_font_get_metrics(cast[ptr Font00](self.impl), cast[ptr Language00](language.impl)) + +proc metrics*(self: Font; language: Language): FontMetrics = + new(result) + result.impl = pango_font_get_metrics(cast[ptr Font00](self.impl), cast[ptr Language00](language.impl)) + +proc pango_context_get_metrics*(self: ptr Context00; desc: ptr FontDescription00; + language: ptr Language00): ptr FontMetrics00 {. + importc: "pango_context_get_metrics", libprag.} + +proc getMetrics*(self: Context; desc: FontDescription; language: Language): FontMetrics = + new(result) + result.impl = pango_context_get_metrics(cast[ptr Context00](self.impl), cast[ptr FontDescription00](desc.impl), cast[ptr Language00](language.impl)) + +proc metrics*(self: Context; desc: FontDescription; language: Language): FontMetrics = + new(result) + result.impl = pango_context_get_metrics(cast[ptr Context00](self.impl), cast[ptr FontDescription00](desc.impl), cast[ptr Language00](language.impl)) + +type + Fontset* = ref object of gobject.Object + Fontset00* = object of gobject.Object00 + +proc pango_fontset_get_font*(self: ptr Fontset00; wc: uint32): ptr Font00 {. + importc: "pango_fontset_get_font", libprag.} + +proc getFont*(self: Fontset; wc: int): Font = + let gobj = pango_fontset_get_font(cast[ptr Fontset00](self.impl), uint32(wc)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Font](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc font*(self: Fontset; wc: int): Font = + let gobj = pango_fontset_get_font(cast[ptr Fontset00](self.impl), uint32(wc)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Font](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_fontset_get_metrics*(self: ptr Fontset00): ptr FontMetrics00 {. + importc: "pango_fontset_get_metrics", libprag.} + +proc getMetrics*(self: Fontset): FontMetrics = + new(result) + result.impl = pango_fontset_get_metrics(cast[ptr Fontset00](self.impl)) + +proc metrics*(self: Fontset): FontMetrics = + new(result) + result.impl = pango_fontset_get_metrics(cast[ptr Fontset00](self.impl)) + +proc pango_font_map_load_fontset*(self: ptr FontMap00; context: ptr Context00; desc: ptr FontDescription00; + language: ptr Language00): ptr Fontset00 {. + importc: "pango_font_map_load_fontset", libprag.} + +proc loadFontset*(self: FontMap; context: Context; desc: FontDescription; + language: Language): Fontset = + let gobj = pango_font_map_load_fontset(cast[ptr FontMap00](self.impl), cast[ptr Context00](context.impl), cast[ptr FontDescription00](desc.impl), cast[ptr Language00](language.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Fontset](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_context_load_fontset*(self: ptr Context00; desc: ptr FontDescription00; + language: ptr Language00): ptr Fontset00 {. + importc: "pango_context_load_fontset", libprag.} + +proc loadFontset*(self: Context; desc: FontDescription; language: Language): Fontset = + let gobj = pango_context_load_fontset(cast[ptr Context00](self.impl), cast[ptr FontDescription00](desc.impl), cast[ptr Language00](language.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Fontset](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + AttrType* {.size: sizeof(cint), pure.} = enum + invalid = 0 + language = 1 + family = 2 + style = 3 + weight = 4 + variant = 5 + stretch = 6 + size = 7 + fontDesc = 8 + foreground = 9 + background = 10 + underline = 11 + strikethrough = 12 + rise = 13 + shape = 14 + scale = 15 + fallback = 16 + letterSpacing = 17 + underlineColor = 18 + strikethroughColor = 19 + absoluteSize = 20 + gravity = 21 + gravityHint = 22 + fontFeatures = 23 + foregroundAlpha = 24 + backgroundAlpha = 25 + +proc pango_attr_type_get_name*(`type`: AttrType): cstring {. + importc: "pango_attr_type_get_name", libprag.} + +proc getName*(`type`: AttrType): string = + let resul0 = pango_attr_type_get_name(`type`) + result = $resul0 + +proc name*(`type`: AttrType): string = + let resul0 = pango_attr_type_get_name(`type`) + result = $resul0 + +proc pango_attr_type_register*(name: cstring): AttrType {. + importc: "pango_attr_type_register", libprag.} + +proc register*(name: cstring): AttrType {. + importc: "pango_attr_type_register", libprag.} +type + + Attribute00* {.pure.} = object + klass*: ptr AttrClass00 + startIndex*: uint32 + endIndex*: uint32 + Attribute* = ref object + impl*: ptr Attribute00 + + AttrClass00* {.pure.} = object + `type`*: AttrType + copy*: pointer + destroy*: proc(attr: ptr Attribute00) {.cdecl.} + equal*: proc(attr1: ptr Attribute00; attr2: ptr Attribute00): gboolean {.cdecl.} + AttrClass* = ref object + impl*: ptr AttrClass00 + +proc pango_attribute_destroy*(self: ptr Attribute00) {. + importc: "pango_attribute_destroy", libprag.} + +proc destroy*(self: Attribute) = + pango_attribute_destroy(cast[ptr Attribute00](self.impl)) + +proc pango_attribute_equal*(self: ptr Attribute00; attr2: ptr Attribute00): gboolean {. + importc: "pango_attribute_equal", libprag.} + +proc equal*(self: Attribute; attr2: Attribute): bool = + toBool(pango_attribute_equal(cast[ptr Attribute00](self.impl), cast[ptr Attribute00](attr2.impl))) + +proc pango_attribute_init*(self: ptr Attribute00; klass: ptr AttrClass00) {. + importc: "pango_attribute_init", libprag.} + +proc init*(self: Attribute; klass: AttrClass) = + pango_attribute_init(cast[ptr Attribute00](self.impl), cast[ptr AttrClass00](klass.impl)) + +type + Color00* {.pure.} = object + red*: uint16 + green*: uint16 + blue*: uint16 + Color* = ref object + impl*: ptr Color00 + +proc pango_color_copy*(self: ptr Color00): ptr Color00 {. + importc: "pango_color_copy", libprag.} + +proc copy*(self: Color): Color = + new(result) + result.impl = pango_color_copy(cast[ptr Color00](self.impl)) + +proc pango_color_free*(self: ptr Color00) {. + importc: "pango_color_free", libprag.} + +proc free*(self: Color) = + pango_color_free(cast[ptr Color00](self.impl)) + +proc pango_color_parse*(self: ptr Color00; spec: cstring): gboolean {. + importc: "pango_color_parse", libprag.} + +proc parse*(self: Color; spec: string): bool = + toBool(pango_color_parse(cast[ptr Color00](self.impl), cstring(spec))) + +proc pango_color_to_string*(self: ptr Color00): cstring {. + importc: "pango_color_to_string", libprag.} + +proc toString*(self: Color): string = + let resul0 = pango_color_to_string(cast[ptr Color00](self.impl)) + result = $resul0 + cogfree(resul0) + +type + AttrColor00* {.pure.} = object + attr*: Attribute00 + color*: Color00 + AttrColor* = ref object + impl*: ptr AttrColor00 + +type + AttrDataCopyFunc* = proc (userData: pointer): pointer {.cdecl.} + +type + AttrFilterFunc* = proc (attribute: ptr Attribute00; userData: pointer): gboolean {.cdecl.} + +type + AttrFloat00* {.pure.} = object + attr*: Attribute00 + value*: cdouble + AttrFloat* = ref object + impl*: ptr AttrFloat00 + +type + AttrFontDesc00* {.pure.} = object + attr*: Attribute00 + desc*: ptr FontDescription00 + AttrFontDesc* = ref object + impl*: ptr AttrFontDesc00 + +type + AttrFontFeatures00* {.pure.} = object + attr*: Attribute00 + features*: cstring + AttrFontFeatures* = ref object + impl*: ptr AttrFontFeatures00 + +type + AttrInt00* {.pure.} = object + attr*: Attribute00 + value*: int32 + AttrInt* = ref object + impl*: ptr AttrInt00 + +type + AttrIterator00* {.pure.} = object + AttrIterator* = ref object + impl*: ptr AttrIterator00 + +proc pango_attr_iterator_destroy*(self: ptr AttrIterator00) {. + importc: "pango_attr_iterator_destroy", libprag.} + +proc destroy*(self: AttrIterator) = + pango_attr_iterator_destroy(cast[ptr AttrIterator00](self.impl)) + +proc pango_attr_iterator_get_attrs*(self: ptr AttrIterator00): ptr pointer {. + importc: "pango_attr_iterator_get_attrs", libprag.} + +proc getAttrs*(self: AttrIterator): ptr pointer = + pango_attr_iterator_get_attrs(cast[ptr AttrIterator00](self.impl)) + +proc attrs*(self: AttrIterator): ptr pointer = + pango_attr_iterator_get_attrs(cast[ptr AttrIterator00](self.impl)) + +proc pango_attr_iterator_get_font*(self: ptr AttrIterator00; desc: ptr FontDescription00; + language: ptr Language00; extraAttrs: ptr pointer) {. + importc: "pango_attr_iterator_get_font", libprag.} + +proc getFont*(self: AttrIterator; desc: FontDescription; language: Language; + extraAttrs: ptr pointer) = + pango_attr_iterator_get_font(cast[ptr AttrIterator00](self.impl), cast[ptr FontDescription00](desc.impl), cast[ptr Language00](language.impl), extraAttrs) + +proc font*(self: AttrIterator; desc: FontDescription; language: Language; + extraAttrs: ptr pointer) = + pango_attr_iterator_get_font(cast[ptr AttrIterator00](self.impl), cast[ptr FontDescription00](desc.impl), cast[ptr Language00](language.impl), extraAttrs) + +proc pango_attr_iterator_next*(self: ptr AttrIterator00): gboolean {. + importc: "pango_attr_iterator_next", libprag.} + +proc next*(self: AttrIterator): bool = + toBool(pango_attr_iterator_next(cast[ptr AttrIterator00](self.impl))) + +proc pango_attr_iterator_range*(self: ptr AttrIterator00; start: var int32; `end`: var int32) {. + importc: "pango_attr_iterator_range", libprag.} + +proc range*(self: AttrIterator; start: var int; `end`: var int) = + var end_00 = int32(`end`) + var start_00 = int32(start) + pango_attr_iterator_range(cast[ptr AttrIterator00](self.impl), start_00, end_00) + `end` = int(end_00) + start = int(start_00) + +type + AttrLanguage00* {.pure.} = object + attr*: Attribute00 + value*: ptr Language00 + AttrLanguage* = ref object + impl*: ptr AttrLanguage00 + +type + AttrList00* {.pure.} = object + AttrList* = ref object + impl*: ptr AttrList00 + +proc pango_attr_list_new*(): ptr AttrList00 {. + importc: "pango_attr_list_new", libprag.} + +proc newAttrList*(): AttrList = + new(result) + result.impl = pango_attr_list_new() + +proc initAttrList*[T](result: var T) = + assert(result is AttrList) + new(result) + result.impl = pango_attr_list_new() + +proc pango_attr_list_change*(self: ptr AttrList00; attr: ptr Attribute00) {. + importc: "pango_attr_list_change", libprag.} + +proc change*(self: AttrList; attr: Attribute) = + pango_attr_list_change(cast[ptr AttrList00](self.impl), cast[ptr Attribute00](attr.impl)) + +proc pango_attr_list_copy*(self: ptr AttrList00): ptr AttrList00 {. + importc: "pango_attr_list_copy", libprag.} + +proc copy*(self: AttrList): AttrList = + new(result) + result.impl = pango_attr_list_copy(cast[ptr AttrList00](self.impl)) + +proc pango_attr_list_filter*(self: ptr AttrList00; `func`: AttrFilterFunc; data: pointer): ptr AttrList00 {. + importc: "pango_attr_list_filter", libprag.} + +proc filter*(self: AttrList; `func`: AttrFilterFunc; data: pointer): AttrList = + new(result) + result.impl = pango_attr_list_filter(cast[ptr AttrList00](self.impl), `func`, data) + +proc pango_attr_list_insert*(self: ptr AttrList00; attr: ptr Attribute00) {. + importc: "pango_attr_list_insert", libprag.} + +proc insert*(self: AttrList; attr: Attribute) = + pango_attr_list_insert(cast[ptr AttrList00](self.impl), cast[ptr Attribute00](attr.impl)) + +proc pango_attr_list_insert_before*(self: ptr AttrList00; attr: ptr Attribute00) {. + importc: "pango_attr_list_insert_before", libprag.} + +proc insertBefore*(self: AttrList; attr: Attribute) = + pango_attr_list_insert_before(cast[ptr AttrList00](self.impl), cast[ptr Attribute00](attr.impl)) + +proc pango_attr_list_ref*(self: ptr AttrList00): ptr AttrList00 {. + importc: "pango_attr_list_ref", libprag.} + +proc `ref`*(self: AttrList): AttrList = + new(result) + result.impl = pango_attr_list_ref(cast[ptr AttrList00](self.impl)) + +proc pango_attr_list_splice*(self: ptr AttrList00; other: ptr AttrList00; pos: int32; + len: int32) {. + importc: "pango_attr_list_splice", libprag.} + +proc splice*(self: AttrList; other: AttrList; pos: int; len: int) = + pango_attr_list_splice(cast[ptr AttrList00](self.impl), cast[ptr AttrList00](other.impl), int32(pos), int32(len)) + +proc pango_attr_list_unref*(self: ptr AttrList00) {. + importc: "pango_attr_list_unref", libprag.} + +proc unref*(self: AttrList) = + pango_attr_list_unref(cast[ptr AttrList00](self.impl)) + +type + AttrShape00* {.pure.} = object + attr*: Attribute00 + inkRect*: Rectangle00 + logicalRect*: Rectangle00 + data*: pointer + copyFunc*: AttrDataCopyFunc + destroyFunc*: DestroyNotify + AttrShape* = ref object + impl*: ptr AttrShape00 + +type + AttrSize00* {.pure.} = object + attr*: Attribute00 + size*: int32 + absolute*: uint32 + AttrSize* = ref object + impl*: ptr AttrSize00 + +type + AttrString00* {.pure.} = object + attr*: Attribute00 + value*: cstring + AttrString* = ref object + impl*: ptr AttrString00 + +type + BidiType* {.size: sizeof(cint), pure.} = enum + l = 0 + lre = 1 + lro = 2 + r = 3 + al = 4 + rle = 5 + rlo = 6 + pdf = 7 + en = 8 + es = 9 + et = 10 + an = 11 + cs = 12 + nsm = 13 + bn = 14 + b = 15 + s = 16 + ws = 17 + on = 18 + +proc pango_bidi_type_for_unichar*(ch: gunichar): BidiType {. + importc: "pango_bidi_type_for_unichar", libprag.} + +proc forUnichar*(ch: gunichar): BidiType {. + importc: "pango_bidi_type_for_unichar", libprag.} + +type + ContextClass00* {.pure.} = object + ContextClass* = ref object + impl*: ptr ContextClass00 + +type + Coverage00* {.pure.} = object + Coverage* = ref object + impl*: ptr Coverage00 + +proc pango_coverage_max*(self: ptr Coverage00; other: ptr Coverage00) {. + importc: "pango_coverage_max", libprag.} + +proc max*(self: Coverage; other: Coverage) = + pango_coverage_max(cast[ptr Coverage00](self.impl), cast[ptr Coverage00](other.impl)) + +proc pango_coverage_to_bytes*(self: ptr Coverage00; bytes: var uint8Array; nBytes: var int32) {. + importc: "pango_coverage_to_bytes", libprag.} + +proc toBytes*(self: Coverage; bytes: var uint8Array; nBytes: var int) = + var nBytes_00 = int32(nBytes) + pango_coverage_to_bytes(cast[ptr Coverage00](self.impl), bytes, nBytes_00) + nBytes = int(nBytes_00) + +proc pango_coverage_unref*(self: ptr Coverage00) {. + importc: "pango_coverage_unref", libprag.} + +proc unref*(self: Coverage) = + pango_coverage_unref(cast[ptr Coverage00](self.impl)) + +type + CoverageLevel* {.size: sizeof(cint), pure.} = enum + none = 0 + fallback = 1 + approximate = 2 + exact = 3 + +proc pango_coverage_get*(self: ptr Coverage00; index: int32): CoverageLevel {. + importc: "pango_coverage_get", libprag.} + +proc get*(self: Coverage; index: int): CoverageLevel = + pango_coverage_get(cast[ptr Coverage00](self.impl), int32(index)) + +proc pango_coverage_set*(self: ptr Coverage00; index: int32; level: CoverageLevel) {. + importc: "pango_coverage_set", libprag.} + +proc set*(self: Coverage; index: int; level: CoverageLevel) = + pango_coverage_set(cast[ptr Coverage00](self.impl), int32(index), level) + +const ENGINE_TYPE_LANG* = "PangoEngineLang" + +const ENGINE_TYPE_SHAPE* = "PangoEngineShape" + +type + EllipsizeMode* {.size: sizeof(cint), pure.} = enum + none = 0 + start = 1 + middle = 2 + `end` = 3 + +type + EngineClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + EngineClass* = ref object + impl*: ptr EngineClass00 + +type + EngineScriptInfo00* {.pure.} = object + script*: Script + langs*: cstring + EngineScriptInfo* = ref object + impl*: ptr EngineScriptInfo00 + +type + EngineInfo00* {.pure.} = object + id*: cstring + engineType*: cstring + renderType*: cstring + scripts*: ptr EngineScriptInfo00 + nScripts*: int32 + EngineInfo* = ref object + impl*: ptr EngineInfo00 + +type + LogAttr00* {.pure.} = object + isLineBreak*: uint32 + isMandatoryBreak*: uint32 + isCharBreak*: uint32 + isWhite*: uint32 + isCursorPosition*: uint32 + isWordStart*: uint32 + isWordEnd*: uint32 + isSentenceBoundary*: uint32 + isSentenceStart*: uint32 + isSentenceEnd*: uint32 + backspaceDeletesCharacter*: uint32 + isExpandableSpace*: uint32 + isWordBoundary*: uint32 + LogAttr* = ref object + impl*: ptr LogAttr00 + +type + EngineLangClass00* {.pure.} = object + parentClass*: EngineClass00 + scriptBreak*: proc(engine: ptr EngineLang00; text: cstring; len: int32; + analysis: ptr Analysis00; attrs: ptr LogAttr00; attrsLen: int32) {.cdecl.} + EngineLangClass* = ref object + impl*: ptr EngineLangClass00 + +type + GlyphGeometry00* {.pure.} = object + width*: int32 + xOffset*: int32 + yOffset*: int32 + GlyphGeometry* = ref object + impl*: ptr GlyphGeometry00 + +type + GlyphVisAttr00* {.pure.} = object + isClusterStart*: uint32 + GlyphVisAttr* = ref object + impl*: ptr GlyphVisAttr00 + +type + GlyphInfo00* {.pure.} = object + glyph*: uint32 + geometry*: GlyphGeometry00 + attr*: GlyphVisAttr00 + GlyphInfo* = ref object + impl*: ptr GlyphInfo00 + +type + GlyphString00* {.pure.} = object + numGlyphs*: int32 + glyphs*: GlyphInfo00Array + logClusters*: ptr int32 + space*: int32 + GlyphString* = ref object + impl*: ptr GlyphString00 + +proc pango_glyph_string_new*(): ptr GlyphString00 {. + importc: "pango_glyph_string_new", libprag.} + +proc newGlyphString*(): GlyphString = + new(result) + result.impl = pango_glyph_string_new() + +proc initGlyphString*[T](result: var T) = + assert(result is GlyphString) + new(result) + result.impl = pango_glyph_string_new() + +proc pango_glyph_string_copy*(self: ptr GlyphString00): ptr GlyphString00 {. + importc: "pango_glyph_string_copy", libprag.} + +proc copy*(self: GlyphString): GlyphString = + new(result) + result.impl = pango_glyph_string_copy(cast[ptr GlyphString00](self.impl)) + +proc pango_glyph_string_extents*(self: ptr GlyphString00; font: ptr Font00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_glyph_string_extents", libprag.} + +proc extents*(self: ptr GlyphString00; font: ptr Font00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_glyph_string_extents", libprag.} + +proc pango_glyph_string_extents_range*(self: ptr GlyphString00; start: int32; `end`: int32; + font: ptr Font00; inkRect: var Rectangle00; logicalRect: var Rectangle00) {. + importc: "pango_glyph_string_extents_range", libprag.} + +proc extentsRange*(self: ptr GlyphString00; start: int32; `end`: int32; + font: ptr Font00; inkRect: var Rectangle00; logicalRect: var Rectangle00) {. + importc: "pango_glyph_string_extents_range", libprag.} + +proc pango_glyph_string_free*(self: ptr GlyphString00) {. + importc: "pango_glyph_string_free", libprag.} + +proc free*(self: GlyphString) = + pango_glyph_string_free(cast[ptr GlyphString00](self.impl)) + +proc pango_glyph_string_get_logical_widths*(self: ptr GlyphString00; text: cstring; length: int32; + embeddingLevel: int32; logicalWidths: int32Array) {. + importc: "pango_glyph_string_get_logical_widths", libprag.} + +proc getLogicalWidths*(self: GlyphString; text: string; length: int; embeddingLevel: int; + logicalWidths: int32Array) = + pango_glyph_string_get_logical_widths(cast[ptr GlyphString00](self.impl), cstring(text), int32(length), int32(embeddingLevel), logicalWidths) + +proc logicalWidths*(self: GlyphString; text: string; length: int; embeddingLevel: int; + logicalWidths: int32Array) = + pango_glyph_string_get_logical_widths(cast[ptr GlyphString00](self.impl), cstring(text), int32(length), int32(embeddingLevel), logicalWidths) + +proc pango_glyph_string_get_width*(self: ptr GlyphString00): int32 {. + importc: "pango_glyph_string_get_width", libprag.} + +proc getWidth*(self: GlyphString): int = + int(pango_glyph_string_get_width(cast[ptr GlyphString00](self.impl))) + +proc width*(self: GlyphString): int = + int(pango_glyph_string_get_width(cast[ptr GlyphString00](self.impl))) + +proc pango_glyph_string_index_to_x*(self: ptr GlyphString00; text: cstring; length: int32; + analysis: ptr Analysis00; index: int32; trailing: gboolean; xPos: var int32) {. + importc: "pango_glyph_string_index_to_x", libprag.} + +proc indexToX*(self: GlyphString; text: string; length: int; analysis: Analysis; + index: int; trailing: bool; xPos: var int) = + var xPos_00 = int32(xPos) + pango_glyph_string_index_to_x(cast[ptr GlyphString00](self.impl), cstring(text), int32(length), cast[ptr Analysis00](analysis.impl), int32(index), gboolean(trailing), xPos_00) + xPos = int(xPos_00) + +proc pango_glyph_string_set_size*(self: ptr GlyphString00; newLen: int32) {. + importc: "pango_glyph_string_set_size", libprag.} + +proc setSize*(self: GlyphString; newLen: int) = + pango_glyph_string_set_size(cast[ptr GlyphString00](self.impl), int32(newLen)) + +proc `size=`*(self: GlyphString; newLen: int) = + pango_glyph_string_set_size(cast[ptr GlyphString00](self.impl), int32(newLen)) + +proc pango_glyph_string_x_to_index*(self: ptr GlyphString00; text: cstring; length: int32; + analysis: ptr Analysis00; xPos: int32; index: var int32; trailing: var int32) {. + importc: "pango_glyph_string_x_to_index", libprag.} + +proc xToIndex*(self: GlyphString; text: string; length: int; analysis: Analysis; + xPos: int; index: var int; trailing: var int) = + var index_00 = int32(index) + var trailing_00 = int32(trailing) + pango_glyph_string_x_to_index(cast[ptr GlyphString00](self.impl), cstring(text), int32(length), cast[ptr Analysis00](analysis.impl), int32(xPos), index_00, trailing_00) + index = int(index_00) + trailing = int(trailing_00) + +type + EngineShapeClass00* {.pure.} = object + parentClass*: EngineClass00 + scriptShape*: proc(engine: ptr EngineShape00; font: ptr Font00; itemText: cstring; + itemLength: uint32; analysis: ptr Analysis00; glyphs: ptr GlyphString00; paragraphText: cstring; + paragraphLength: uint32) {.cdecl.} + covers*: proc(engine: ptr EngineShape00; font: ptr Font00; language: ptr Language00; + wc: gunichar): CoverageLevel {.cdecl.} + EngineShapeClass* = ref object + impl*: ptr EngineShapeClass00 + +type + FontClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + describe*: proc(font: ptr Font00): ptr FontDescription00 {.cdecl.} + getCoverage*: pointer + findShaper*: proc(font: ptr Font00; lang: ptr Language00; ch: uint32): ptr EngineShape00 {.cdecl.} + getGlyphExtents*: proc(font: ptr Font00; glyph: uint32; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {.cdecl.} + getMetrics*: proc(font: ptr Font00; language: ptr Language00): ptr FontMetrics00 {.cdecl.} + getFontMap*: proc(font: ptr Font00): ptr FontMap00 {.cdecl.} + describeAbsolute*: proc(font: ptr Font00): ptr FontDescription00 {.cdecl.} + pangoReserved1*: pointer + pangoReserved2*: pointer + FontClass* = ref object + impl*: ptr FontClass00 + +type + FontFaceClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getFaceName*: proc(face: ptr FontFace00): cstring {.cdecl.} + describe*: proc(face: ptr FontFace00): ptr FontDescription00 {.cdecl.} + listSizes*: proc(face: ptr FontFace00; sizes: var int32Array; nSizes: var int32) {.cdecl.} + isSynthesized*: proc(face: ptr FontFace00): gboolean {.cdecl.} + pangoReserved3*: pointer + pangoReserved4*: pointer + FontFaceClass* = ref object + impl*: ptr FontFaceClass00 + +type + FontFamilyClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + listFaces*: proc(family: ptr FontFamily00; faces: var ptr FontFace00Array; + nFaces: var int32) {.cdecl.} + getName*: proc(family: ptr FontFamily00): cstring {.cdecl.} + isMonospace*: proc(family: ptr FontFamily00): gboolean {.cdecl.} + pangoReserved2*: pointer + pangoReserved3*: pointer + pangoReserved4*: pointer + FontFamilyClass* = ref object + impl*: ptr FontFamilyClass00 + +type + FontMapClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + loadFont*: proc(fontmap: ptr FontMap00; context: ptr Context00; desc: ptr FontDescription00): ptr Font00 {.cdecl.} + listFamilies*: proc(fontmap: ptr FontMap00; families: var ptr FontFamily00Array; + nFamilies: var int32) {.cdecl.} + loadFontset*: proc(fontmap: ptr FontMap00; context: ptr Context00; desc: ptr FontDescription00; + language: ptr Language00): ptr Fontset00 {.cdecl.} + shapeEngineType*: cstring + getSerial*: proc(fontmap: ptr FontMap00): uint32 {.cdecl.} + changed*: proc(fontmap: ptr FontMap00) {.cdecl.} + pangoReserved1*: pointer + pangoReserved2*: pointer + FontMapClass* = ref object + impl*: ptr FontMapClass00 + +type + FontsetForeachFunc* = proc (fontset: ptr Fontset00; font: ptr Font00; userData: pointer): gboolean {.cdecl.} + +type + FontsetClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + getFont*: proc(fontset: ptr Fontset00; wc: uint32): ptr Font00 {.cdecl.} + getMetrics*: proc(fontset: ptr Fontset00): ptr FontMetrics00 {.cdecl.} + getLanguage*: proc(fontset: ptr Fontset00): ptr Language00 {.cdecl.} + foreach*: proc(fontset: ptr Fontset00; `func`: FontsetForeachFunc; + data: pointer) {.cdecl.} + pangoReserved1*: pointer + pangoReserved2*: pointer + pangoReserved3*: pointer + pangoReserved4*: pointer + FontsetClass* = ref object + impl*: ptr FontsetClass00 + +proc pango_fontset_foreach*(self: ptr Fontset00; `func`: FontsetForeachFunc; data: pointer) {. + importc: "pango_fontset_foreach", libprag.} + +proc foreach*(self: Fontset; `func`: FontsetForeachFunc; data: pointer) = + pango_fontset_foreach(cast[ptr Fontset00](self.impl), `func`, data) + +type + FontsetSimple* = ref object of Fontset + FontsetSimple00* = object of Fontset00 + +proc pango_fontset_simple_new*(language: ptr Language00): ptr FontsetSimple00 {. + importc: "pango_fontset_simple_new", libprag.} + +proc newFontsetSimple*(language: Language): FontsetSimple = + new(result, finalizeGObject) + result.impl = pango_fontset_simple_new(cast[ptr Language00](language.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initFontsetSimple*[T](result: var T; language: Language) = + assert(result is FontsetSimple) + new(result, finalizeGObject) + result.impl = pango_fontset_simple_new(cast[ptr Language00](language.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_fontset_simple_append*(self: ptr FontsetSimple00; font: ptr Font00) {. + importc: "pango_fontset_simple_append", libprag.} + +proc append*(self: FontsetSimple; font: Font) = + pango_fontset_simple_append(cast[ptr FontsetSimple00](self.impl), cast[ptr Font00](font.impl)) + +proc pango_fontset_simple_size*(self: ptr FontsetSimple00): int32 {. + importc: "pango_fontset_simple_size", libprag.} + +proc size*(self: FontsetSimple): int = + int(pango_fontset_simple_size(cast[ptr FontsetSimple00](self.impl))) + +type + FontsetSimpleClass00* {.pure.} = object + FontsetSimpleClass* = ref object + impl*: ptr FontsetSimpleClass00 + +const GLYPH_EMPTY* = 268435455'u32 + +const GLYPH_INVALID_INPUT* = 4294967295'u32 + +const GLYPH_UNKNOWN_FLAG* = 268435456'u32 + +type + Item00* {.pure.} = object + offset*: int32 + length*: int32 + numChars*: int32 + analysis*: Analysis00 + Item* = ref object + impl*: ptr Item00 + +proc pango_item_new*(): ptr Item00 {. + importc: "pango_item_new", libprag.} + +proc newItem*(): Item = + new(result) + result.impl = pango_item_new() + +proc initItem*[T](result: var T) = + assert(result is Item) + new(result) + result.impl = pango_item_new() + +proc pango_item_copy*(self: ptr Item00): ptr Item00 {. + importc: "pango_item_copy", libprag.} + +proc copy*(self: Item): Item = + new(result) + result.impl = pango_item_copy(cast[ptr Item00](self.impl)) + +proc pango_item_free*(self: ptr Item00) {. + importc: "pango_item_free", libprag.} + +proc free*(self: Item) = + pango_item_free(cast[ptr Item00](self.impl)) + +proc pango_item_split*(self: ptr Item00; splitIndex: int32; splitOffset: int32): ptr Item00 {. + importc: "pango_item_split", libprag.} + +proc split*(self: Item; splitIndex: int; splitOffset: int): Item = + new(result) + result.impl = pango_item_split(cast[ptr Item00](self.impl), int32(splitIndex), int32(splitOffset)) + +type + GlyphItem00* {.pure.} = object + item*: ptr Item00 + glyphs*: ptr GlyphString00 + GlyphItem* = ref object + impl*: ptr GlyphItem00 + +proc pango_glyph_item_apply_attrs*(self: ptr GlyphItem00; text: cstring; list: ptr AttrList00): ptr pointer {. + importc: "pango_glyph_item_apply_attrs", libprag.} + +proc applyAttrs*(self: GlyphItem; text: string; list: AttrList): ptr pointer = + pango_glyph_item_apply_attrs(cast[ptr GlyphItem00](self.impl), cstring(text), cast[ptr AttrList00](list.impl)) + +proc pango_glyph_item_copy*(self: ptr GlyphItem00): ptr GlyphItem00 {. + importc: "pango_glyph_item_copy", libprag.} + +proc copy*(self: GlyphItem): GlyphItem = + new(result) + result.impl = pango_glyph_item_copy(cast[ptr GlyphItem00](self.impl)) + +proc pango_glyph_item_free*(self: ptr GlyphItem00) {. + importc: "pango_glyph_item_free", libprag.} + +proc free*(self: GlyphItem) = + pango_glyph_item_free(cast[ptr GlyphItem00](self.impl)) + +proc pango_glyph_item_get_logical_widths*(self: ptr GlyphItem00; text: cstring; logicalWidths: int32Array) {. + importc: "pango_glyph_item_get_logical_widths", libprag.} + +proc getLogicalWidths*(self: GlyphItem; text: string; logicalWidths: int32Array) = + pango_glyph_item_get_logical_widths(cast[ptr GlyphItem00](self.impl), cstring(text), logicalWidths) + +proc logicalWidths*(self: GlyphItem; text: string; logicalWidths: int32Array) = + pango_glyph_item_get_logical_widths(cast[ptr GlyphItem00](self.impl), cstring(text), logicalWidths) + +proc pango_glyph_item_letter_space*(self: ptr GlyphItem00; text: cstring; logAttrs: LogAttr00Array; + letterSpacing: int32) {. + importc: "pango_glyph_item_letter_space", libprag.} + +proc letterSpace*(self: GlyphItem; text: string; logAttrs: LogAttr00Array; + letterSpacing: int) = + pango_glyph_item_letter_space(cast[ptr GlyphItem00](self.impl), cstring(text), logAttrs, int32(letterSpacing)) + +proc pango_glyph_item_split*(self: ptr GlyphItem00; text: cstring; splitIndex: int32): ptr GlyphItem00 {. + importc: "pango_glyph_item_split", libprag.} + +proc split*(self: GlyphItem; text: string; splitIndex: int): GlyphItem = + new(result) + result.impl = pango_glyph_item_split(cast[ptr GlyphItem00](self.impl), cstring(text), int32(splitIndex)) + +type + GlyphItemIter00* {.pure.} = object + glyphItem*: ptr GlyphItem00 + text*: cstring + startGlyph*: int32 + startIndex*: int32 + startChar*: int32 + endGlyph*: int32 + endIndex*: int32 + endChar*: int32 + GlyphItemIter* = ref object + impl*: ptr GlyphItemIter00 + +proc pango_glyph_item_iter_copy*(self: ptr GlyphItemIter00): ptr GlyphItemIter00 {. + importc: "pango_glyph_item_iter_copy", libprag.} + +proc copy*(self: GlyphItemIter): GlyphItemIter = + new(result) + result.impl = pango_glyph_item_iter_copy(cast[ptr GlyphItemIter00](self.impl)) + +proc pango_glyph_item_iter_free*(self: ptr GlyphItemIter00) {. + importc: "pango_glyph_item_iter_free", libprag.} + +proc free*(self: GlyphItemIter) = + pango_glyph_item_iter_free(cast[ptr GlyphItemIter00](self.impl)) + +proc pango_glyph_item_iter_init_end*(self: ptr GlyphItemIter00; glyphItem: ptr GlyphItem00; + text: cstring): gboolean {. + importc: "pango_glyph_item_iter_init_end", libprag.} + +proc initEnd*(self: GlyphItemIter; glyphItem: GlyphItem; text: string): bool = + toBool(pango_glyph_item_iter_init_end(cast[ptr GlyphItemIter00](self.impl), cast[ptr GlyphItem00](glyphItem.impl), cstring(text))) + +proc pango_glyph_item_iter_init_start*(self: ptr GlyphItemIter00; glyphItem: ptr GlyphItem00; + text: cstring): gboolean {. + importc: "pango_glyph_item_iter_init_start", libprag.} + +proc initStart*(self: GlyphItemIter; glyphItem: GlyphItem; text: string): bool = + toBool(pango_glyph_item_iter_init_start(cast[ptr GlyphItemIter00](self.impl), cast[ptr GlyphItem00](glyphItem.impl), cstring(text))) + +proc pango_glyph_item_iter_next_cluster*(self: ptr GlyphItemIter00): gboolean {. + importc: "pango_glyph_item_iter_next_cluster", libprag.} + +proc nextCluster*(self: GlyphItemIter): bool = + toBool(pango_glyph_item_iter_next_cluster(cast[ptr GlyphItemIter00](self.impl))) + +proc pango_glyph_item_iter_prev_cluster*(self: ptr GlyphItemIter00): gboolean {. + importc: "pango_glyph_item_iter_prev_cluster", libprag.} + +proc prevCluster*(self: GlyphItemIter): bool = + toBool(pango_glyph_item_iter_prev_cluster(cast[ptr GlyphItemIter00](self.impl))) + +type + IncludedModule00* {.pure.} = object + list*: proc(engines: ptr EngineInfo00; nEngines: ptr int32) {.cdecl.} + init*: proc(module: ptr gobject.TypeModule00) {.cdecl.} + exit*: proc() {.cdecl.} + create*: pointer + IncludedModule* = ref object + impl*: ptr IncludedModule00 + +type + Layout* = ref object of gobject.Object + Layout00* = object of gobject.Object00 + +proc pango_layout_new*(context: ptr Context00): ptr Layout00 {. + importc: "pango_layout_new", libprag.} + +proc newLayout*(context: Context): Layout = + new(result, finalizeGObject) + result.impl = pango_layout_new(cast[ptr Context00](context.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initLayout*[T](result: var T; context: Context) = + assert(result is Layout) + new(result, finalizeGObject) + result.impl = pango_layout_new(cast[ptr Context00](context.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_layout_context_changed*(self: ptr Layout00) {. + importc: "pango_layout_context_changed", libprag.} + +proc contextChanged*(self: Layout) = + pango_layout_context_changed(cast[ptr Layout00](self.impl)) + +proc pango_layout_copy*(self: ptr Layout00): ptr Layout00 {. + importc: "pango_layout_copy", libprag.} + +proc copy*(self: Layout): Layout = + let gobj = pango_layout_copy(cast[ptr Layout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_layout_get_alignment*(self: ptr Layout00): Alignment {. + importc: "pango_layout_get_alignment", libprag.} + +proc getAlignment*(self: Layout): Alignment = + pango_layout_get_alignment(cast[ptr Layout00](self.impl)) + +proc alignment*(self: Layout): Alignment = + pango_layout_get_alignment(cast[ptr Layout00](self.impl)) + +proc pango_layout_get_attributes*(self: ptr Layout00): ptr AttrList00 {. + importc: "pango_layout_get_attributes", libprag.} + +proc getAttributes*(self: Layout): AttrList = + new(result) + result.impl = pango_layout_get_attributes(cast[ptr Layout00](self.impl)) + +proc attributes*(self: Layout): AttrList = + new(result) + result.impl = pango_layout_get_attributes(cast[ptr Layout00](self.impl)) + +proc pango_layout_get_auto_dir*(self: ptr Layout00): gboolean {. + importc: "pango_layout_get_auto_dir", libprag.} + +proc getAutoDir*(self: Layout): bool = + toBool(pango_layout_get_auto_dir(cast[ptr Layout00](self.impl))) + +proc autoDir*(self: Layout): bool = + toBool(pango_layout_get_auto_dir(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_baseline*(self: ptr Layout00): int32 {. + importc: "pango_layout_get_baseline", libprag.} + +proc getBaseline*(self: Layout): int = + int(pango_layout_get_baseline(cast[ptr Layout00](self.impl))) + +proc baseline*(self: Layout): int = + int(pango_layout_get_baseline(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_character_count*(self: ptr Layout00): int32 {. + importc: "pango_layout_get_character_count", libprag.} + +proc getCharacterCount*(self: Layout): int = + int(pango_layout_get_character_count(cast[ptr Layout00](self.impl))) + +proc characterCount*(self: Layout): int = + int(pango_layout_get_character_count(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_context*(self: ptr Layout00): ptr Context00 {. + importc: "pango_layout_get_context", libprag.} + +proc getContext*(self: Layout): Context = + let gobj = pango_layout_get_context(cast[ptr Layout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc context*(self: Layout): Context = + let gobj = pango_layout_get_context(cast[ptr Layout00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Context](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_layout_get_cursor_pos*(self: ptr Layout00; index: int32; strongPos: var Rectangle00; + weakPos: var Rectangle00) {. + importc: "pango_layout_get_cursor_pos", libprag.} + +proc getCursorPos*(self: ptr Layout00; index: int32; strongPos: var Rectangle00; + weakPos: var Rectangle00) {. + importc: "pango_layout_get_cursor_pos", libprag.} + +proc cursorPos*(self: ptr Layout00; index: int32; strongPos: var Rectangle00; + weakPos: var Rectangle00) {. + importc: "pango_layout_get_cursor_pos", libprag.} + +proc pango_layout_get_ellipsize*(self: ptr Layout00): EllipsizeMode {. + importc: "pango_layout_get_ellipsize", libprag.} + +proc getEllipsize*(self: Layout): EllipsizeMode = + pango_layout_get_ellipsize(cast[ptr Layout00](self.impl)) + +proc ellipsize*(self: Layout): EllipsizeMode = + pango_layout_get_ellipsize(cast[ptr Layout00](self.impl)) + +proc pango_layout_get_extents*(self: ptr Layout00; inkRect: var Rectangle00; logicalRect: var Rectangle00) {. + importc: "pango_layout_get_extents", libprag.} + +proc getExtents*(self: ptr Layout00; inkRect: var Rectangle00; logicalRect: var Rectangle00) {. + importc: "pango_layout_get_extents", libprag.} + +proc extents*(self: ptr Layout00; inkRect: var Rectangle00; logicalRect: var Rectangle00) {. + importc: "pango_layout_get_extents", libprag.} + +proc pango_layout_get_font_description*(self: ptr Layout00): ptr FontDescription00 {. + importc: "pango_layout_get_font_description", libprag.} + +proc getFontDescription*(self: Layout): FontDescription = + new(result) + result.impl = pango_layout_get_font_description(cast[ptr Layout00](self.impl)) + +proc fontDescription*(self: Layout): FontDescription = + new(result) + result.impl = pango_layout_get_font_description(cast[ptr Layout00](self.impl)) + +proc pango_layout_get_height*(self: ptr Layout00): int32 {. + importc: "pango_layout_get_height", libprag.} + +proc getHeight*(self: Layout): int = + int(pango_layout_get_height(cast[ptr Layout00](self.impl))) + +proc height*(self: Layout): int = + int(pango_layout_get_height(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_indent*(self: ptr Layout00): int32 {. + importc: "pango_layout_get_indent", libprag.} + +proc getIndent*(self: Layout): int = + int(pango_layout_get_indent(cast[ptr Layout00](self.impl))) + +proc indent*(self: Layout): int = + int(pango_layout_get_indent(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_justify*(self: ptr Layout00): gboolean {. + importc: "pango_layout_get_justify", libprag.} + +proc getJustify*(self: Layout): bool = + toBool(pango_layout_get_justify(cast[ptr Layout00](self.impl))) + +proc justify*(self: Layout): bool = + toBool(pango_layout_get_justify(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_line_count*(self: ptr Layout00): int32 {. + importc: "pango_layout_get_line_count", libprag.} + +proc getLineCount*(self: Layout): int = + int(pango_layout_get_line_count(cast[ptr Layout00](self.impl))) + +proc lineCount*(self: Layout): int = + int(pango_layout_get_line_count(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_lines*(self: ptr Layout00): ptr pointer {. + importc: "pango_layout_get_lines", libprag.} + +proc getLines*(self: Layout): ptr pointer = + pango_layout_get_lines(cast[ptr Layout00](self.impl)) + +proc lines*(self: Layout): ptr pointer = + pango_layout_get_lines(cast[ptr Layout00](self.impl)) + +proc pango_layout_get_lines_readonly*(self: ptr Layout00): ptr pointer {. + importc: "pango_layout_get_lines_readonly", libprag.} + +proc getLinesReadonly*(self: Layout): ptr pointer = + pango_layout_get_lines_readonly(cast[ptr Layout00](self.impl)) + +proc linesReadonly*(self: Layout): ptr pointer = + pango_layout_get_lines_readonly(cast[ptr Layout00](self.impl)) + +proc pango_layout_get_log_attrs*(self: ptr Layout00; attrs: var LogAttr00Array; nAttrs: var int32) {. + importc: "pango_layout_get_log_attrs", libprag.} + +proc getLogAttrs*(self: Layout; attrs: var LogAttr00Array; nAttrs: var int) = + var nAttrs_00 = int32(nAttrs) + pango_layout_get_log_attrs(cast[ptr Layout00](self.impl), attrs, nAttrs_00) + nAttrs = int(nAttrs_00) + +proc logAttrs*(self: Layout; attrs: var LogAttr00Array; nAttrs: var int) = + var nAttrs_00 = int32(nAttrs) + pango_layout_get_log_attrs(cast[ptr Layout00](self.impl), attrs, nAttrs_00) + nAttrs = int(nAttrs_00) + +proc pango_layout_get_log_attrs_readonly*(self: ptr Layout00; nAttrs: var int32): LogAttr00Array {. + importc: "pango_layout_get_log_attrs_readonly", libprag.} + +proc getLogAttrsReadonly*(self: Layout; nAttrs: var int): LogAttr00Array = + var nAttrs_00 = int32(nAttrs) + result = pango_layout_get_log_attrs_readonly(cast[ptr Layout00](self.impl), nAttrs_00) + nAttrs = int(nAttrs_00) + +proc logAttrsReadonly*(self: Layout; nAttrs: var int): LogAttr00Array = + var nAttrs_00 = int32(nAttrs) + result = pango_layout_get_log_attrs_readonly(cast[ptr Layout00](self.impl), nAttrs_00) + nAttrs = int(nAttrs_00) + +proc pango_layout_get_pixel_extents*(self: ptr Layout00; inkRect: var Rectangle00; logicalRect: var Rectangle00) {. + importc: "pango_layout_get_pixel_extents", libprag.} + +proc getPixelExtents*(self: ptr Layout00; inkRect: var Rectangle00; logicalRect: var Rectangle00) {. + importc: "pango_layout_get_pixel_extents", libprag.} + +proc pixelExtents*(self: ptr Layout00; inkRect: var Rectangle00; logicalRect: var Rectangle00) {. + importc: "pango_layout_get_pixel_extents", libprag.} + +proc pango_layout_get_pixel_size*(self: ptr Layout00; width: var int32; height: var int32) {. + importc: "pango_layout_get_pixel_size", libprag.} + +proc getPixelSize*(self: Layout; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + pango_layout_get_pixel_size(cast[ptr Layout00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc pixelSize*(self: Layout; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + pango_layout_get_pixel_size(cast[ptr Layout00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc pango_layout_get_serial*(self: ptr Layout00): uint32 {. + importc: "pango_layout_get_serial", libprag.} + +proc getSerial*(self: Layout): int = + int(pango_layout_get_serial(cast[ptr Layout00](self.impl))) + +proc serial*(self: Layout): int = + int(pango_layout_get_serial(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_single_paragraph_mode*(self: ptr Layout00): gboolean {. + importc: "pango_layout_get_single_paragraph_mode", libprag.} + +proc getSingleParagraphMode*(self: Layout): bool = + toBool(pango_layout_get_single_paragraph_mode(cast[ptr Layout00](self.impl))) + +proc singleParagraphMode*(self: Layout): bool = + toBool(pango_layout_get_single_paragraph_mode(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_size*(self: ptr Layout00; width: var int32; height: var int32) {. + importc: "pango_layout_get_size", libprag.} + +proc getSize*(self: Layout; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + pango_layout_get_size(cast[ptr Layout00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc size*(self: Layout; width: var int; height: var int) = + var height_00 = int32(height) + var width_00 = int32(width) + pango_layout_get_size(cast[ptr Layout00](self.impl), width_00, height_00) + height = int(height_00) + width = int(width_00) + +proc pango_layout_get_spacing*(self: ptr Layout00): int32 {. + importc: "pango_layout_get_spacing", libprag.} + +proc getSpacing*(self: Layout): int = + int(pango_layout_get_spacing(cast[ptr Layout00](self.impl))) + +proc spacing*(self: Layout): int = + int(pango_layout_get_spacing(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_text*(self: ptr Layout00): cstring {. + importc: "pango_layout_get_text", libprag.} + +proc getText*(self: Layout): string = + let resul0 = pango_layout_get_text(cast[ptr Layout00](self.impl)) + result = $resul0 + +proc text*(self: Layout): string = + let resul0 = pango_layout_get_text(cast[ptr Layout00](self.impl)) + result = $resul0 + +proc pango_layout_get_unknown_glyphs_count*(self: ptr Layout00): int32 {. + importc: "pango_layout_get_unknown_glyphs_count", libprag.} + +proc getUnknownGlyphsCount*(self: Layout): int = + int(pango_layout_get_unknown_glyphs_count(cast[ptr Layout00](self.impl))) + +proc unknownGlyphsCount*(self: Layout): int = + int(pango_layout_get_unknown_glyphs_count(cast[ptr Layout00](self.impl))) + +proc pango_layout_get_width*(self: ptr Layout00): int32 {. + importc: "pango_layout_get_width", libprag.} + +proc getWidth*(self: Layout): int = + int(pango_layout_get_width(cast[ptr Layout00](self.impl))) + +proc width*(self: Layout): int = + int(pango_layout_get_width(cast[ptr Layout00](self.impl))) + +proc pango_layout_index_to_line_x*(self: ptr Layout00; index: int32; trailing: gboolean; + line: var int32; xPos: var int32) {. + importc: "pango_layout_index_to_line_x", libprag.} + +proc indexToLineX*(self: Layout; index: int; trailing: bool; line: var int; + xPos: var int) = + var xPos_00 = int32(xPos) + var line_00 = int32(line) + pango_layout_index_to_line_x(cast[ptr Layout00](self.impl), int32(index), gboolean(trailing), line_00, xPos_00) + xPos = int(xPos_00) + line = int(line_00) + +proc pango_layout_index_to_pos*(self: ptr Layout00; index: int32; pos: var Rectangle00) {. + importc: "pango_layout_index_to_pos", libprag.} + +proc indexToPos*(self: ptr Layout00; index: int32; pos: var Rectangle00) {. + importc: "pango_layout_index_to_pos", libprag.} + +proc pango_layout_is_ellipsized*(self: ptr Layout00): gboolean {. + importc: "pango_layout_is_ellipsized", libprag.} + +proc isEllipsized*(self: Layout): bool = + toBool(pango_layout_is_ellipsized(cast[ptr Layout00](self.impl))) + +proc pango_layout_is_wrapped*(self: ptr Layout00): gboolean {. + importc: "pango_layout_is_wrapped", libprag.} + +proc isWrapped*(self: Layout): bool = + toBool(pango_layout_is_wrapped(cast[ptr Layout00](self.impl))) + +proc pango_layout_move_cursor_visually*(self: ptr Layout00; strong: gboolean; oldIndex: int32; + oldTrailing: int32; direction: int32; newIndex: var int32; newTrailing: var int32) {. + importc: "pango_layout_move_cursor_visually", libprag.} + +proc moveCursorVisually*(self: Layout; strong: bool; oldIndex: int; oldTrailing: int; + direction: int; newIndex: var int; newTrailing: var int) = + var newIndex_00 = int32(newIndex) + var newTrailing_00 = int32(newTrailing) + pango_layout_move_cursor_visually(cast[ptr Layout00](self.impl), gboolean(strong), int32(oldIndex), int32(oldTrailing), int32(direction), newIndex_00, newTrailing_00) + newIndex = int(newIndex_00) + newTrailing = int(newTrailing_00) + +proc pango_layout_set_alignment*(self: ptr Layout00; alignment: Alignment) {. + importc: "pango_layout_set_alignment", libprag.} + +proc setAlignment*(self: Layout; alignment: Alignment) = + pango_layout_set_alignment(cast[ptr Layout00](self.impl), alignment) + +proc `alignment=`*(self: Layout; alignment: Alignment) = + pango_layout_set_alignment(cast[ptr Layout00](self.impl), alignment) + +proc pango_layout_set_attributes*(self: ptr Layout00; attrs: ptr AttrList00) {. + importc: "pango_layout_set_attributes", libprag.} + +proc setAttributes*(self: Layout; attrs: AttrList) = + pango_layout_set_attributes(cast[ptr Layout00](self.impl), cast[ptr AttrList00](attrs.impl)) + +proc `attributes=`*(self: Layout; attrs: AttrList) = + pango_layout_set_attributes(cast[ptr Layout00](self.impl), cast[ptr AttrList00](attrs.impl)) + +proc pango_layout_set_auto_dir*(self: ptr Layout00; autoDir: gboolean) {. + importc: "pango_layout_set_auto_dir", libprag.} + +proc setAutoDir*(self: Layout; autoDir: bool) = + pango_layout_set_auto_dir(cast[ptr Layout00](self.impl), gboolean(autoDir)) + +proc `autoDir=`*(self: Layout; autoDir: bool) = + pango_layout_set_auto_dir(cast[ptr Layout00](self.impl), gboolean(autoDir)) + +proc pango_layout_set_ellipsize*(self: ptr Layout00; ellipsize: EllipsizeMode) {. + importc: "pango_layout_set_ellipsize", libprag.} + +proc setEllipsize*(self: Layout; ellipsize: EllipsizeMode) = + pango_layout_set_ellipsize(cast[ptr Layout00](self.impl), ellipsize) + +proc `ellipsize=`*(self: Layout; ellipsize: EllipsizeMode) = + pango_layout_set_ellipsize(cast[ptr Layout00](self.impl), ellipsize) + +proc pango_layout_set_font_description*(self: ptr Layout00; desc: ptr FontDescription00) {. + importc: "pango_layout_set_font_description", libprag.} + +proc setFontDescription*(self: Layout; desc: FontDescription) = + pango_layout_set_font_description(cast[ptr Layout00](self.impl), cast[ptr FontDescription00](desc.impl)) + +proc `fontDescription=`*(self: Layout; desc: FontDescription) = + pango_layout_set_font_description(cast[ptr Layout00](self.impl), cast[ptr FontDescription00](desc.impl)) + +proc pango_layout_set_height*(self: ptr Layout00; height: int32) {. + importc: "pango_layout_set_height", libprag.} + +proc setHeight*(self: Layout; height: int) = + pango_layout_set_height(cast[ptr Layout00](self.impl), int32(height)) + +proc `height=`*(self: Layout; height: int) = + pango_layout_set_height(cast[ptr Layout00](self.impl), int32(height)) + +proc pango_layout_set_indent*(self: ptr Layout00; indent: int32) {. + importc: "pango_layout_set_indent", libprag.} + +proc setIndent*(self: Layout; indent: int) = + pango_layout_set_indent(cast[ptr Layout00](self.impl), int32(indent)) + +proc `indent=`*(self: Layout; indent: int) = + pango_layout_set_indent(cast[ptr Layout00](self.impl), int32(indent)) + +proc pango_layout_set_justify*(self: ptr Layout00; justify: gboolean) {. + importc: "pango_layout_set_justify", libprag.} + +proc setJustify*(self: Layout; justify: bool) = + pango_layout_set_justify(cast[ptr Layout00](self.impl), gboolean(justify)) + +proc `justify=`*(self: Layout; justify: bool) = + pango_layout_set_justify(cast[ptr Layout00](self.impl), gboolean(justify)) + +proc pango_layout_set_markup*(self: ptr Layout00; markup: cstring; length: int32) {. + importc: "pango_layout_set_markup", libprag.} + +proc setMarkup*(self: Layout; markup: string; length: int) = + pango_layout_set_markup(cast[ptr Layout00](self.impl), cstring(markup), int32(length)) + +proc pango_layout_set_markup_with_accel*(self: ptr Layout00; markup: cstring; length: int32; + accelMarker: gunichar; accelChar: var gunichar) {. + importc: "pango_layout_set_markup_with_accel", libprag.} + +proc setMarkupWithAccel*(self: Layout; markup: string; length: int; accelMarker: gunichar; + accelChar: var gunichar) = + pango_layout_set_markup_with_accel(cast[ptr Layout00](self.impl), cstring(markup), int32(length), accelMarker, accelChar) + +proc pango_layout_set_single_paragraph_mode*(self: ptr Layout00; setting: gboolean) {. + importc: "pango_layout_set_single_paragraph_mode", libprag.} + +proc setSingleParagraphMode*(self: Layout; setting: bool) = + pango_layout_set_single_paragraph_mode(cast[ptr Layout00](self.impl), gboolean(setting)) + +proc `singleParagraphMode=`*(self: Layout; setting: bool) = + pango_layout_set_single_paragraph_mode(cast[ptr Layout00](self.impl), gboolean(setting)) + +proc pango_layout_set_spacing*(self: ptr Layout00; spacing: int32) {. + importc: "pango_layout_set_spacing", libprag.} + +proc setSpacing*(self: Layout; spacing: int) = + pango_layout_set_spacing(cast[ptr Layout00](self.impl), int32(spacing)) + +proc `spacing=`*(self: Layout; spacing: int) = + pango_layout_set_spacing(cast[ptr Layout00](self.impl), int32(spacing)) + +proc pango_layout_set_text*(self: ptr Layout00; text: cstring; length: int32) {. + importc: "pango_layout_set_text", libprag.} + +proc setText*(self: Layout; text: string; length: int) = + pango_layout_set_text(cast[ptr Layout00](self.impl), cstring(text), int32(length)) + +proc pango_layout_set_width*(self: ptr Layout00; width: int32) {. + importc: "pango_layout_set_width", libprag.} + +proc setWidth*(self: Layout; width: int) = + pango_layout_set_width(cast[ptr Layout00](self.impl), int32(width)) + +proc `width=`*(self: Layout; width: int) = + pango_layout_set_width(cast[ptr Layout00](self.impl), int32(width)) + +proc pango_layout_xy_to_index*(self: ptr Layout00; x: int32; y: int32; index: var int32; + trailing: var int32): gboolean {. + importc: "pango_layout_xy_to_index", libprag.} + +proc xyToIndex*(self: Layout; x: int; y: int; index: var int; trailing: var int): bool = + var index_00 = int32(index) + var trailing_00 = int32(trailing) + result = toBool(pango_layout_xy_to_index(cast[ptr Layout00](self.impl), int32(x), int32(y), index_00, trailing_00)) + index = int(index_00) + trailing = int(trailing_00) + +type + LayoutIter00* {.pure.} = object + LayoutIter* = ref object + impl*: ptr LayoutIter00 + +proc pango_layout_iter_at_last_line*(self: ptr LayoutIter00): gboolean {. + importc: "pango_layout_iter_at_last_line", libprag.} + +proc atLastLine*(self: LayoutIter): bool = + toBool(pango_layout_iter_at_last_line(cast[ptr LayoutIter00](self.impl))) + +proc pango_layout_iter_copy*(self: ptr LayoutIter00): ptr LayoutIter00 {. + importc: "pango_layout_iter_copy", libprag.} + +proc copy*(self: LayoutIter): LayoutIter = + new(result) + result.impl = pango_layout_iter_copy(cast[ptr LayoutIter00](self.impl)) + +proc pango_layout_iter_free*(self: ptr LayoutIter00) {. + importc: "pango_layout_iter_free", libprag.} + +proc free*(self: LayoutIter) = + pango_layout_iter_free(cast[ptr LayoutIter00](self.impl)) + +proc pango_layout_iter_get_baseline*(self: ptr LayoutIter00): int32 {. + importc: "pango_layout_iter_get_baseline", libprag.} + +proc getBaseline*(self: LayoutIter): int = + int(pango_layout_iter_get_baseline(cast[ptr LayoutIter00](self.impl))) + +proc baseline*(self: LayoutIter): int = + int(pango_layout_iter_get_baseline(cast[ptr LayoutIter00](self.impl))) + +proc pango_layout_iter_get_char_extents*(self: ptr LayoutIter00; logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_char_extents", libprag.} + +proc getCharExtents*(self: ptr LayoutIter00; logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_char_extents", libprag.} + +proc charExtents*(self: ptr LayoutIter00; logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_char_extents", libprag.} + +proc pango_layout_iter_get_cluster_extents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_cluster_extents", libprag.} + +proc getClusterExtents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_cluster_extents", libprag.} + +proc clusterExtents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_cluster_extents", libprag.} + +proc pango_layout_iter_get_index*(self: ptr LayoutIter00): int32 {. + importc: "pango_layout_iter_get_index", libprag.} + +proc getIndex*(self: LayoutIter): int = + int(pango_layout_iter_get_index(cast[ptr LayoutIter00](self.impl))) + +proc index*(self: LayoutIter): int = + int(pango_layout_iter_get_index(cast[ptr LayoutIter00](self.impl))) + +proc pango_layout_iter_get_layout*(self: ptr LayoutIter00): ptr Layout00 {. + importc: "pango_layout_iter_get_layout", libprag.} + +proc getLayout*(self: LayoutIter): Layout = + let gobj = pango_layout_iter_get_layout(cast[ptr LayoutIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc layout*(self: LayoutIter): Layout = + let gobj = pango_layout_iter_get_layout(cast[ptr LayoutIter00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_layout_iter_get_layout_extents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_layout_extents", libprag.} + +proc getLayoutExtents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_layout_extents", libprag.} + +proc layoutExtents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_layout_extents", libprag.} + +proc pango_layout_iter_get_line_extents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_line_extents", libprag.} + +proc getLineExtents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_line_extents", libprag.} + +proc lineExtents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_line_extents", libprag.} + +proc pango_layout_iter_get_line_yrange*(self: ptr LayoutIter00; y0: var int32; y1: var int32) {. + importc: "pango_layout_iter_get_line_yrange", libprag.} + +proc getLineYrange*(self: LayoutIter; y0: var int; y1: var int) = + var y1_00 = int32(y1) + var y0_00 = int32(y0) + pango_layout_iter_get_line_yrange(cast[ptr LayoutIter00](self.impl), y0_00, y1_00) + y1 = int(y1_00) + y0 = int(y0_00) + +proc lineYrange*(self: LayoutIter; y0: var int; y1: var int) = + var y1_00 = int32(y1) + var y0_00 = int32(y0) + pango_layout_iter_get_line_yrange(cast[ptr LayoutIter00](self.impl), y0_00, y1_00) + y1 = int(y1_00) + y0 = int(y0_00) + +proc pango_layout_iter_get_run*(self: ptr LayoutIter00): ptr GlyphItem00 {. + importc: "pango_layout_iter_get_run", libprag.} + +proc getRun*(self: LayoutIter): GlyphItem = + new(result) + result.impl = pango_layout_iter_get_run(cast[ptr LayoutIter00](self.impl)) + +proc run*(self: LayoutIter): GlyphItem = + new(result) + result.impl = pango_layout_iter_get_run(cast[ptr LayoutIter00](self.impl)) + +proc pango_layout_iter_get_run_extents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_run_extents", libprag.} + +proc getRunExtents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_run_extents", libprag.} + +proc runExtents*(self: ptr LayoutIter00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_iter_get_run_extents", libprag.} + +proc pango_layout_iter_get_run_readonly*(self: ptr LayoutIter00): ptr GlyphItem00 {. + importc: "pango_layout_iter_get_run_readonly", libprag.} + +proc getRunReadonly*(self: LayoutIter): GlyphItem = + new(result) + result.impl = pango_layout_iter_get_run_readonly(cast[ptr LayoutIter00](self.impl)) + +proc runReadonly*(self: LayoutIter): GlyphItem = + new(result) + result.impl = pango_layout_iter_get_run_readonly(cast[ptr LayoutIter00](self.impl)) + +proc pango_layout_iter_next_char*(self: ptr LayoutIter00): gboolean {. + importc: "pango_layout_iter_next_char", libprag.} + +proc nextChar*(self: LayoutIter): bool = + toBool(pango_layout_iter_next_char(cast[ptr LayoutIter00](self.impl))) + +proc pango_layout_iter_next_cluster*(self: ptr LayoutIter00): gboolean {. + importc: "pango_layout_iter_next_cluster", libprag.} + +proc nextCluster*(self: LayoutIter): bool = + toBool(pango_layout_iter_next_cluster(cast[ptr LayoutIter00](self.impl))) + +proc pango_layout_iter_next_line*(self: ptr LayoutIter00): gboolean {. + importc: "pango_layout_iter_next_line", libprag.} + +proc nextLine*(self: LayoutIter): bool = + toBool(pango_layout_iter_next_line(cast[ptr LayoutIter00](self.impl))) + +proc pango_layout_iter_next_run*(self: ptr LayoutIter00): gboolean {. + importc: "pango_layout_iter_next_run", libprag.} + +proc nextRun*(self: LayoutIter): bool = + toBool(pango_layout_iter_next_run(cast[ptr LayoutIter00](self.impl))) + +proc pango_layout_get_iter*(self: ptr Layout00): ptr LayoutIter00 {. + importc: "pango_layout_get_iter", libprag.} + +proc getIter*(self: Layout): LayoutIter = + new(result) + result.impl = pango_layout_get_iter(cast[ptr Layout00](self.impl)) + +proc iter*(self: Layout): LayoutIter = + new(result) + result.impl = pango_layout_get_iter(cast[ptr Layout00](self.impl)) + +type + LayoutLine00* {.pure.} = object + layout*: ptr Layout00 + startIndex*: int32 + length*: int32 + runs*: ptr pointer + isParagraphStart*: uint32 + resolvedDir*: uint32 + LayoutLine* = ref object + impl*: ptr LayoutLine00 + +proc pango_layout_line_get_extents*(self: ptr LayoutLine00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_line_get_extents", libprag.} + +proc getExtents*(self: ptr LayoutLine00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_line_get_extents", libprag.} + +proc extents*(self: ptr LayoutLine00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_line_get_extents", libprag.} + +proc pango_layout_line_get_pixel_extents*(self: ptr LayoutLine00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_line_get_pixel_extents", libprag.} + +proc getPixelExtents*(self: ptr LayoutLine00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_line_get_pixel_extents", libprag.} + +proc pixelExtents*(self: ptr LayoutLine00; inkRect: var Rectangle00; + logicalRect: var Rectangle00) {. + importc: "pango_layout_line_get_pixel_extents", libprag.} + +proc pango_layout_line_get_x_ranges*(self: ptr LayoutLine00; startIndex: int32; endIndex: int32; + ranges: var int32Array; nRanges: var int32) {. + importc: "pango_layout_line_get_x_ranges", libprag.} + +proc getXRanges*(self: LayoutLine; startIndex: int; endIndex: int; + ranges: var int32Array; nRanges: var int) = + var nRanges_00 = int32(nRanges) + pango_layout_line_get_x_ranges(cast[ptr LayoutLine00](self.impl), int32(startIndex), int32(endIndex), ranges, nRanges_00) + nRanges = int(nRanges_00) + +proc xRanges*(self: LayoutLine; startIndex: int; endIndex: int; + ranges: var int32Array; nRanges: var int) = + var nRanges_00 = int32(nRanges) + pango_layout_line_get_x_ranges(cast[ptr LayoutLine00](self.impl), int32(startIndex), int32(endIndex), ranges, nRanges_00) + nRanges = int(nRanges_00) + +proc pango_layout_line_index_to_x*(self: ptr LayoutLine00; index: int32; trailing: gboolean; + xPos: var int32) {. + importc: "pango_layout_line_index_to_x", libprag.} + +proc indexToX*(self: LayoutLine; index: int; trailing: bool; xPos: var int) = + var xPos_00 = int32(xPos) + pango_layout_line_index_to_x(cast[ptr LayoutLine00](self.impl), int32(index), gboolean(trailing), xPos_00) + xPos = int(xPos_00) + +proc pango_layout_line_ref*(self: ptr LayoutLine00): ptr LayoutLine00 {. + importc: "pango_layout_line_ref", libprag.} + +proc `ref`*(self: LayoutLine): LayoutLine = + new(result) + result.impl = pango_layout_line_ref(cast[ptr LayoutLine00](self.impl)) + +proc pango_layout_line_unref*(self: ptr LayoutLine00) {. + importc: "pango_layout_line_unref", libprag.} + +proc unref*(self: LayoutLine) = + pango_layout_line_unref(cast[ptr LayoutLine00](self.impl)) + +proc pango_layout_line_x_to_index*(self: ptr LayoutLine00; xPos: int32; index: var int32; + trailing: var int32): gboolean {. + importc: "pango_layout_line_x_to_index", libprag.} + +proc xToIndex*(self: LayoutLine; xPos: int; index: var int; trailing: var int): bool = + var index_00 = int32(index) + var trailing_00 = int32(trailing) + result = toBool(pango_layout_line_x_to_index(cast[ptr LayoutLine00](self.impl), int32(xPos), index_00, trailing_00)) + index = int(index_00) + trailing = int(trailing_00) + +proc pango_layout_get_line*(self: ptr Layout00; line: int32): ptr LayoutLine00 {. + importc: "pango_layout_get_line", libprag.} + +proc getLine*(self: Layout; line: int): LayoutLine = + new(result) + result.impl = pango_layout_get_line(cast[ptr Layout00](self.impl), int32(line)) + +proc line*(self: Layout; line: int): LayoutLine = + new(result) + result.impl = pango_layout_get_line(cast[ptr Layout00](self.impl), int32(line)) + +proc pango_layout_get_line_readonly*(self: ptr Layout00; line: int32): ptr LayoutLine00 {. + importc: "pango_layout_get_line_readonly", libprag.} + +proc getLineReadonly*(self: Layout; line: int): LayoutLine = + new(result) + result.impl = pango_layout_get_line_readonly(cast[ptr Layout00](self.impl), int32(line)) + +proc lineReadonly*(self: Layout; line: int): LayoutLine = + new(result) + result.impl = pango_layout_get_line_readonly(cast[ptr Layout00](self.impl), int32(line)) + +proc pango_layout_iter_get_line*(self: ptr LayoutIter00): ptr LayoutLine00 {. + importc: "pango_layout_iter_get_line", libprag.} + +proc getLine*(self: LayoutIter): LayoutLine = + new(result) + result.impl = pango_layout_iter_get_line(cast[ptr LayoutIter00](self.impl)) + +proc line*(self: LayoutIter): LayoutLine = + new(result) + result.impl = pango_layout_iter_get_line(cast[ptr LayoutIter00](self.impl)) + +proc pango_layout_iter_get_line_readonly*(self: ptr LayoutIter00): ptr LayoutLine00 {. + importc: "pango_layout_iter_get_line_readonly", libprag.} + +proc getLineReadonly*(self: LayoutIter): LayoutLine = + new(result) + result.impl = pango_layout_iter_get_line_readonly(cast[ptr LayoutIter00](self.impl)) + +proc lineReadonly*(self: LayoutIter): LayoutLine = + new(result) + result.impl = pango_layout_iter_get_line_readonly(cast[ptr LayoutIter00](self.impl)) + +type + TabArray00* {.pure.} = object + TabArray* = ref object + impl*: ptr TabArray00 + +proc pango_tab_array_new*(initialSize: int32; positionsInPixels: gboolean): ptr TabArray00 {. + importc: "pango_tab_array_new", libprag.} + +proc newTabArray*(initialSize: int; positionsInPixels: bool): TabArray = + new(result) + result.impl = pango_tab_array_new(int32(initialSize), gboolean(positionsInPixels)) + +proc initTabArray*[T](result: var T; initialSize: int; positionsInPixels: bool) = + assert(result is TabArray) + new(result) + result.impl = pango_tab_array_new(int32(initialSize), gboolean(positionsInPixels)) + +proc pango_tab_array_copy*(self: ptr TabArray00): ptr TabArray00 {. + importc: "pango_tab_array_copy", libprag.} + +proc copy*(self: TabArray): TabArray = + new(result) + result.impl = pango_tab_array_copy(cast[ptr TabArray00](self.impl)) + +proc pango_tab_array_free*(self: ptr TabArray00) {. + importc: "pango_tab_array_free", libprag.} + +proc free*(self: TabArray) = + pango_tab_array_free(cast[ptr TabArray00](self.impl)) + +proc pango_tab_array_get_positions_in_pixels*(self: ptr TabArray00): gboolean {. + importc: "pango_tab_array_get_positions_in_pixels", libprag.} + +proc getPositionsInPixels*(self: TabArray): bool = + toBool(pango_tab_array_get_positions_in_pixels(cast[ptr TabArray00](self.impl))) + +proc positionsInPixels*(self: TabArray): bool = + toBool(pango_tab_array_get_positions_in_pixels(cast[ptr TabArray00](self.impl))) + +proc pango_tab_array_get_size*(self: ptr TabArray00): int32 {. + importc: "pango_tab_array_get_size", libprag.} + +proc getSize*(self: TabArray): int = + int(pango_tab_array_get_size(cast[ptr TabArray00](self.impl))) + +proc size*(self: TabArray): int = + int(pango_tab_array_get_size(cast[ptr TabArray00](self.impl))) + +proc pango_tab_array_resize*(self: ptr TabArray00; newSize: int32) {. + importc: "pango_tab_array_resize", libprag.} + +proc resize*(self: TabArray; newSize: int) = + pango_tab_array_resize(cast[ptr TabArray00](self.impl), int32(newSize)) + +proc pango_layout_get_tabs*(self: ptr Layout00): ptr TabArray00 {. + importc: "pango_layout_get_tabs", libprag.} + +proc getTabs*(self: Layout): TabArray = + new(result) + result.impl = pango_layout_get_tabs(cast[ptr Layout00](self.impl)) + +proc tabs*(self: Layout): TabArray = + new(result) + result.impl = pango_layout_get_tabs(cast[ptr Layout00](self.impl)) + +proc pango_layout_set_tabs*(self: ptr Layout00; tabs: ptr TabArray00) {. + importc: "pango_layout_set_tabs", libprag.} + +proc setTabs*(self: Layout; tabs: TabArray) = + pango_layout_set_tabs(cast[ptr Layout00](self.impl), cast[ptr TabArray00](tabs.impl)) + +proc `tabs=`*(self: Layout; tabs: TabArray) = + pango_layout_set_tabs(cast[ptr Layout00](self.impl), cast[ptr TabArray00](tabs.impl)) + +type + TabAlign* {.size: sizeof(cint), pure.} = enum + left = 0 + +proc pango_tab_array_get_tab*(self: ptr TabArray00; tabIndex: int32; alignment: var TabAlign; + location: var int32) {. + importc: "pango_tab_array_get_tab", libprag.} + +proc getTab*(self: TabArray; tabIndex: int; alignment: var TabAlign; + location: var int) = + var location_00 = int32(location) + pango_tab_array_get_tab(cast[ptr TabArray00](self.impl), int32(tabIndex), alignment, location_00) + location = int(location_00) + +proc tab*(self: TabArray; tabIndex: int; alignment: var TabAlign; + location: var int) = + var location_00 = int32(location) + pango_tab_array_get_tab(cast[ptr TabArray00](self.impl), int32(tabIndex), alignment, location_00) + location = int(location_00) + +proc pango_tab_array_get_tabs*(self: ptr TabArray00; alignments: var ptr TabAlign; + locations: var int32Array) {. + importc: "pango_tab_array_get_tabs", libprag.} + +proc getTabs*(self: TabArray; alignments: var ptr TabAlign; locations: var int32Array) = + pango_tab_array_get_tabs(cast[ptr TabArray00](self.impl), alignments, locations) + +proc tabs*(self: TabArray; alignments: var ptr TabAlign; locations: var int32Array) = + pango_tab_array_get_tabs(cast[ptr TabArray00](self.impl), alignments, locations) + +proc pango_tab_array_set_tab*(self: ptr TabArray00; tabIndex: int32; alignment: TabAlign; + location: int32) {. + importc: "pango_tab_array_set_tab", libprag.} + +proc setTab*(self: TabArray; tabIndex: int; alignment: TabAlign; + location: int) = + pango_tab_array_set_tab(cast[ptr TabArray00](self.impl), int32(tabIndex), alignment, int32(location)) + +type + WrapMode* {.size: sizeof(cint), pure.} = enum + word = 0 + char = 1 + wordChar = 2 + +proc pango_layout_get_wrap*(self: ptr Layout00): WrapMode {. + importc: "pango_layout_get_wrap", libprag.} + +proc getWrap*(self: Layout): WrapMode = + pango_layout_get_wrap(cast[ptr Layout00](self.impl)) + +proc wrap*(self: Layout): WrapMode = + pango_layout_get_wrap(cast[ptr Layout00](self.impl)) + +proc pango_layout_set_wrap*(self: ptr Layout00; wrap: WrapMode) {. + importc: "pango_layout_set_wrap", libprag.} + +proc setWrap*(self: Layout; wrap: WrapMode) = + pango_layout_set_wrap(cast[ptr Layout00](self.impl), wrap) + +proc `wrap=`*(self: Layout; wrap: WrapMode) = + pango_layout_set_wrap(cast[ptr Layout00](self.impl), wrap) + +type + LayoutClass00* {.pure.} = object + LayoutClass* = ref object + impl*: ptr LayoutClass00 + +type + Map00* {.pure.} = object + Map* = ref object + impl*: ptr Map00 + +type + MapEntry00* {.pure.} = object + MapEntry* = ref object + impl*: ptr MapEntry00 + +const RENDER_TYPE_NONE* = "PangoRenderNone" + +type + RenderPart* {.size: sizeof(cint), pure.} = enum + foreground = 0 + background = 1 + underline = 2 + strikethrough = 3 + +type + Underline* {.size: sizeof(cint), pure.} = enum + none = 0 + single = 1 + double = 2 + low = 3 + error = 4 + +type + RendererPrivate00* {.pure.} = object + RendererPrivate* = ref object + impl*: ptr RendererPrivate00 + +type + Renderer* = ref object of gobject.Object + Renderer00* = object of gobject.Object00 + underline*: Underline + strikethrough*: gboolean + activeCount*: int32 + matrix*: ptr Matrix00 + priv1: ptr RendererPrivate00 + +proc pango_renderer_activate*(self: ptr Renderer00) {. + importc: "pango_renderer_activate", libprag.} + +proc activate*(self: Renderer) = + pango_renderer_activate(cast[ptr Renderer00](self.impl)) + +proc pango_renderer_deactivate*(self: ptr Renderer00) {. + importc: "pango_renderer_deactivate", libprag.} + +proc deactivate*(self: Renderer) = + pango_renderer_deactivate(cast[ptr Renderer00](self.impl)) + +proc pango_renderer_draw_error_underline*(self: ptr Renderer00; x: int32; y: int32; width: int32; + height: int32) {. + importc: "pango_renderer_draw_error_underline", libprag.} + +proc drawErrorUnderline*(self: Renderer; x: int; y: int; width: int; height: int) = + pango_renderer_draw_error_underline(cast[ptr Renderer00](self.impl), int32(x), int32(y), int32(width), int32(height)) + +proc pango_renderer_draw_glyph*(self: ptr Renderer00; font: ptr Font00; glyph: uint32; + x: cdouble; y: cdouble) {. + importc: "pango_renderer_draw_glyph", libprag.} + +proc drawGlyph*(self: Renderer; font: Font; glyph: int; x: cdouble; + y: cdouble) = + pango_renderer_draw_glyph(cast[ptr Renderer00](self.impl), cast[ptr Font00](font.impl), uint32(glyph), x, y) + +proc pango_renderer_draw_glyph_item*(self: ptr Renderer00; text: cstring; glyphItem: ptr GlyphItem00; + x: int32; y: int32) {. + importc: "pango_renderer_draw_glyph_item", libprag.} + +proc drawGlyphItem*(self: Renderer; text: string; glyphItem: GlyphItem; + x: int; y: int) = + pango_renderer_draw_glyph_item(cast[ptr Renderer00](self.impl), cstring(text), cast[ptr GlyphItem00](glyphItem.impl), int32(x), int32(y)) + +proc pango_renderer_draw_glyphs*(self: ptr Renderer00; font: ptr Font00; glyphs: ptr GlyphString00; + x: int32; y: int32) {. + importc: "pango_renderer_draw_glyphs", libprag.} + +proc drawGlyphs*(self: Renderer; font: Font; glyphs: GlyphString; x: int; + y: int) = + pango_renderer_draw_glyphs(cast[ptr Renderer00](self.impl), cast[ptr Font00](font.impl), cast[ptr GlyphString00](glyphs.impl), int32(x), int32(y)) + +proc pango_renderer_draw_layout*(self: ptr Renderer00; layout: ptr Layout00; x: int32; + y: int32) {. + importc: "pango_renderer_draw_layout", libprag.} + +proc drawLayout*(self: Renderer; layout: Layout; x: int; y: int) = + pango_renderer_draw_layout(cast[ptr Renderer00](self.impl), cast[ptr Layout00](layout.impl), int32(x), int32(y)) + +proc pango_renderer_draw_layout_line*(self: ptr Renderer00; line: ptr LayoutLine00; x: int32; + y: int32) {. + importc: "pango_renderer_draw_layout_line", libprag.} + +proc drawLayoutLine*(self: Renderer; line: LayoutLine; x: int; y: int) = + pango_renderer_draw_layout_line(cast[ptr Renderer00](self.impl), cast[ptr LayoutLine00](line.impl), int32(x), int32(y)) + +proc pango_renderer_draw_rectangle*(self: ptr Renderer00; part: RenderPart; x: int32; + y: int32; width: int32; height: int32) {. + importc: "pango_renderer_draw_rectangle", libprag.} + +proc drawRectangle*(self: Renderer; part: RenderPart; x: int; y: int; + width: int; height: int) = + pango_renderer_draw_rectangle(cast[ptr Renderer00](self.impl), part, int32(x), int32(y), int32(width), int32(height)) + +proc pango_renderer_draw_trapezoid*(self: ptr Renderer00; part: RenderPart; y1: cdouble; + x11: cdouble; x21: cdouble; y2: cdouble; x12: cdouble; x22: cdouble) {. + importc: "pango_renderer_draw_trapezoid", libprag.} + +proc drawTrapezoid*(self: Renderer; part: RenderPart; y1: cdouble; x11: cdouble; + x21: cdouble; y2: cdouble; x12: cdouble; x22: cdouble) = + pango_renderer_draw_trapezoid(cast[ptr Renderer00](self.impl), part, y1, x11, x21, y2, x12, x22) + +proc pango_renderer_get_alpha*(self: ptr Renderer00; part: RenderPart): uint16 {. + importc: "pango_renderer_get_alpha", libprag.} + +proc getAlpha*(self: Renderer; part: RenderPart): uint16 = + pango_renderer_get_alpha(cast[ptr Renderer00](self.impl), part) + +proc alpha*(self: Renderer; part: RenderPart): uint16 = + pango_renderer_get_alpha(cast[ptr Renderer00](self.impl), part) + +proc pango_renderer_get_color*(self: ptr Renderer00; part: RenderPart): ptr Color00 {. + importc: "pango_renderer_get_color", libprag.} + +proc getColor*(self: Renderer; part: RenderPart): Color = + new(result) + result.impl = pango_renderer_get_color(cast[ptr Renderer00](self.impl), part) + +proc color*(self: Renderer; part: RenderPart): Color = + new(result) + result.impl = pango_renderer_get_color(cast[ptr Renderer00](self.impl), part) + +proc pango_renderer_get_layout*(self: ptr Renderer00): ptr Layout00 {. + importc: "pango_renderer_get_layout", libprag.} + +proc getLayout*(self: Renderer): Layout = + let gobj = pango_renderer_get_layout(cast[ptr Renderer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc layout*(self: Renderer): Layout = + let gobj = pango_renderer_get_layout(cast[ptr Renderer00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[Layout](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pango_renderer_get_layout_line*(self: ptr Renderer00): ptr LayoutLine00 {. + importc: "pango_renderer_get_layout_line", libprag.} + +proc getLayoutLine*(self: Renderer): LayoutLine = + new(result) + result.impl = pango_renderer_get_layout_line(cast[ptr Renderer00](self.impl)) + +proc layoutLine*(self: Renderer): LayoutLine = + new(result) + result.impl = pango_renderer_get_layout_line(cast[ptr Renderer00](self.impl)) + +proc pango_renderer_get_matrix*(self: ptr Renderer00): ptr Matrix00 {. + importc: "pango_renderer_get_matrix", libprag.} + +proc getMatrix*(self: Renderer): Matrix = + new(result) + result.impl = pango_renderer_get_matrix(cast[ptr Renderer00](self.impl)) + +proc matrix*(self: Renderer): Matrix = + new(result) + result.impl = pango_renderer_get_matrix(cast[ptr Renderer00](self.impl)) + +proc pango_renderer_part_changed*(self: ptr Renderer00; part: RenderPart) {. + importc: "pango_renderer_part_changed", libprag.} + +proc partChanged*(self: Renderer; part: RenderPart) = + pango_renderer_part_changed(cast[ptr Renderer00](self.impl), part) + +proc pango_renderer_set_alpha*(self: ptr Renderer00; part: RenderPart; alpha: uint16) {. + importc: "pango_renderer_set_alpha", libprag.} + +proc setAlpha*(self: Renderer; part: RenderPart; alpha: uint16) = + pango_renderer_set_alpha(cast[ptr Renderer00](self.impl), part, alpha) + +proc pango_renderer_set_color*(self: ptr Renderer00; part: RenderPart; color: ptr Color00) {. + importc: "pango_renderer_set_color", libprag.} + +proc setColor*(self: Renderer; part: RenderPart; color: Color) = + pango_renderer_set_color(cast[ptr Renderer00](self.impl), part, cast[ptr Color00](color.impl)) + +proc pango_renderer_set_matrix*(self: ptr Renderer00; matrix: ptr Matrix00) {. + importc: "pango_renderer_set_matrix", libprag.} + +proc setMatrix*(self: Renderer; matrix: Matrix) = + pango_renderer_set_matrix(cast[ptr Renderer00](self.impl), cast[ptr Matrix00](matrix.impl)) + +proc `matrix=`*(self: Renderer; matrix: Matrix) = + pango_renderer_set_matrix(cast[ptr Renderer00](self.impl), cast[ptr Matrix00](matrix.impl)) + +type + RendererClass00* {.pure.} = object + parentClass*: gobject.ObjectClass00 + drawGlyphs*: proc(renderer: ptr Renderer00; font: ptr Font00; glyphs: ptr GlyphString00; + x: int32; y: int32) {.cdecl.} + drawRectangle*: proc(renderer: ptr Renderer00; part: RenderPart; x: int32; + y: int32; width: int32; height: int32) {.cdecl.} + drawErrorUnderline*: proc(renderer: ptr Renderer00; x: int32; y: int32; width: int32; + height: int32) {.cdecl.} + drawShape*: proc(renderer: ptr Renderer00; attr: ptr AttrShape00; x: int32; + y: int32) {.cdecl.} + drawTrapezoid*: proc(renderer: ptr Renderer00; part: RenderPart; y1: cdouble; + x11: cdouble; x21: cdouble; y2: cdouble; x12: cdouble; x22: cdouble) {.cdecl.} + drawGlyph*: proc(renderer: ptr Renderer00; font: ptr Font00; glyph: uint32; + x: cdouble; y: cdouble) {.cdecl.} + partChanged*: proc(renderer: ptr Renderer00; part: RenderPart) {.cdecl.} + begin*: proc(renderer: ptr Renderer00) {.cdecl.} + `end`*: proc(renderer: ptr Renderer00) {.cdecl.} + prepareRun*: proc(renderer: ptr Renderer00; run: ptr GlyphItem00) {.cdecl.} + drawGlyphItem*: proc(renderer: ptr Renderer00; text: cstring; glyphItem: ptr GlyphItem00; + x: int32; y: int32) {.cdecl.} + pangoReserved2*: pointer + pangoReserved3*: pointer + pangoReserved4*: pointer + RendererClass* = ref object + impl*: ptr RendererClass00 + +const SCALE* = 1024'i32 + +type + ScriptForLang00* {.pure.} = object + lang*: array[7, int8] + scripts*: array[3, Script] + ScriptForLang* = ref object + impl*: ptr ScriptForLang00 + +type + ScriptIter00* {.pure.} = object + ScriptIter* = ref object + impl*: ptr ScriptIter00 + +proc pango_script_iter_free*(self: ptr ScriptIter00) {. + importc: "pango_script_iter_free", libprag.} + +proc free*(self: ScriptIter) = + pango_script_iter_free(cast[ptr ScriptIter00](self.impl)) + +proc pango_script_iter_get_range*(self: ptr ScriptIter00; start: var cstring; `end`: var cstring; + script: var Script) {. + importc: "pango_script_iter_get_range", libprag.} + +proc getRange*(self: ScriptIter; start: var string; `end`: var string; + script: var Script) = + var end_00 = cstring(`end`) + var start_00 = cstring(start) + pango_script_iter_get_range(cast[ptr ScriptIter00](self.impl), start_00, end_00, script) + `end` = $(end_00) + start = $(start_00) + +proc range*(self: ScriptIter; start: var string; `end`: var string; + script: var Script) = + var end_00 = cstring(`end`) + var start_00 = cstring(start) + pango_script_iter_get_range(cast[ptr ScriptIter00](self.impl), start_00, end_00, script) + `end` = $(end_00) + start = $(start_00) + +proc pango_script_iter_next*(self: ptr ScriptIter00): gboolean {. + importc: "pango_script_iter_next", libprag.} + +proc next*(self: ScriptIter): bool = + toBool(pango_script_iter_next(cast[ptr ScriptIter00](self.impl))) + +const UNKNOWN_GLYPH_HEIGHT* = 14'i32 + +const UNKNOWN_GLYPH_WIDTH* = 10'i32 + +const VERSION_MIN_REQUIRED* = 2'i32 + +proc pango_break*(text: cstring; length: int32; analysis: ptr Analysis00; + attrs: LogAttr00Array; attrsLen: int32) {. + importc: "pango_break", libprag.} + +proc `break`*(text: string; length: int; analysis: Analysis; attrs: LogAttr00Array; + attrsLen: int) = + pango_break(cstring(text), int32(length), cast[ptr Analysis00](analysis.impl), attrs, int32(attrsLen)) + +proc pango_config_key_get*(key: cstring): cstring {. + importc: "pango_config_key_get", libprag.} + +proc configKeyGet*(key: string): string = + let resul0 = pango_config_key_get(cstring(key)) + result = $resul0 + cogfree(resul0) + +proc pango_config_key_get_system*(key: cstring): cstring {. + importc: "pango_config_key_get_system", libprag.} + +proc configKeyGetSystem*(key: string): string = + let resul0 = pango_config_key_get_system(cstring(key)) + result = $resul0 + cogfree(resul0) + +proc pango_default_break*(text: cstring; length: int32; analysis: ptr Analysis00; + attrs: ptr LogAttr00; attrsLen: int32) {. + importc: "pango_default_break", libprag.} + +proc defaultBreak*(text: string; length: int; analysis: Analysis; attrs: LogAttr; + attrsLen: int) = + pango_default_break(cstring(text), int32(length), cast[ptr Analysis00](analysis.impl), cast[ptr LogAttr00](attrs.impl), int32(attrsLen)) + +proc pango_extents_to_pixels*(inclusive: ptr Rectangle00; nearest: ptr Rectangle00) {. + importc: "pango_extents_to_pixels", libprag.} + +proc extentsToPixels*(inclusive: Rectangle; nearest: Rectangle) = + pango_extents_to_pixels(cast[ptr Rectangle00](inclusive.impl), cast[ptr Rectangle00](nearest.impl)) + +proc pango_find_base_dir*(text: cstring; length: int32): Direction {. + importc: "pango_find_base_dir", libprag.} + +proc findBaseDir*(text: cstring; length: int32): Direction {. + importc: "pango_find_base_dir", libprag.} + +proc pango_find_paragraph_boundary*(text: cstring; length: int32; paragraphDelimiterIndex: var int32; + nextParagraphStart: var int32) {. + importc: "pango_find_paragraph_boundary", libprag.} + +proc findParagraphBoundary*(text: cstring; length: int32; paragraphDelimiterIndex: var int32; + nextParagraphStart: var int32) {. + importc: "pango_find_paragraph_boundary", libprag.} + +proc pango_get_lib_subdirectory*(): cstring {. + importc: "pango_get_lib_subdirectory", libprag.} + +proc getLibSubdirectory*(): string = + let resul0 = pango_get_lib_subdirectory() + result = $resul0 + +proc libSubdirectory*(): string = + let resul0 = pango_get_lib_subdirectory() + result = $resul0 + +proc pango_get_log_attrs*(text: cstring; length: int32; level: int32; language: ptr Language00; + logAttrs: LogAttr00Array; attrsLen: int32) {. + importc: "pango_get_log_attrs", libprag.} + +proc getLogAttrs*(text: string; length: int; level: int; language: Language; + logAttrs: LogAttr00Array; attrsLen: int) = + pango_get_log_attrs(cstring(text), int32(length), int32(level), cast[ptr Language00](language.impl), logAttrs, int32(attrsLen)) + +proc logAttrs*(text: string; length: int; level: int; language: Language; + logAttrs: LogAttr00Array; attrsLen: int) = + pango_get_log_attrs(cstring(text), int32(length), int32(level), cast[ptr Language00](language.impl), logAttrs, int32(attrsLen)) + +proc pango_get_mirror_char*(ch: gunichar; mirroredCh: ptr gunichar): gboolean {. + importc: "pango_get_mirror_char", libprag.} + +proc getMirrorChar*(ch: gunichar; mirroredCh: ptr gunichar): gboolean {. + importc: "pango_get_mirror_char", libprag.} + +proc mirrorChar*(ch: gunichar; mirroredCh: ptr gunichar): gboolean {. + importc: "pango_get_mirror_char", libprag.} + +proc pango_get_sysconf_subdirectory*(): cstring {. + importc: "pango_get_sysconf_subdirectory", libprag.} + +proc getSysconfSubdirectory*(): string = + let resul0 = pango_get_sysconf_subdirectory() + result = $resul0 + +proc sysconfSubdirectory*(): string = + let resul0 = pango_get_sysconf_subdirectory() + result = $resul0 + +proc pango_is_zero_width*(ch: gunichar): gboolean {. + importc: "pango_is_zero_width", libprag.} + +proc isZeroWidth*(ch: gunichar): gboolean {. + importc: "pango_is_zero_width", libprag.} + +proc pango_itemize*(context: ptr Context00; text: cstring; startIndex: int32; + length: int32; attrs: ptr AttrList00; cachedIter: ptr AttrIterator00): ptr pointer {. + importc: "pango_itemize", libprag.} + +proc itemize*(context: Context; text: string; startIndex: int; length: int; + attrs: AttrList; cachedIter: AttrIterator): ptr pointer = + pango_itemize(cast[ptr Context00](context.impl), cstring(text), int32(startIndex), int32(length), cast[ptr AttrList00](attrs.impl), cast[ptr AttrIterator00](cachedIter.impl)) + +proc pango_itemize_with_base_dir*(context: ptr Context00; baseDir: Direction; text: cstring; + startIndex: int32; length: int32; attrs: ptr AttrList00; cachedIter: ptr AttrIterator00): ptr pointer {. + importc: "pango_itemize_with_base_dir", libprag.} + +proc itemizeWithBaseDir*(context: Context; baseDir: Direction; text: string; + startIndex: int; length: int; attrs: AttrList; cachedIter: AttrIterator): ptr pointer = + pango_itemize_with_base_dir(cast[ptr Context00](context.impl), baseDir, cstring(text), int32(startIndex), int32(length), cast[ptr AttrList00](attrs.impl), cast[ptr AttrIterator00](cachedIter.impl)) + +proc pango_log2vis_get_embedding_levels*(text: cstring; length: int32; pbaseDir: ptr Direction): ptr uint8 {. + importc: "pango_log2vis_get_embedding_levels", libprag.} + +proc log2visGetEmbeddingLevels*(text: cstring; length: int32; pbaseDir: ptr Direction): ptr uint8 {. + importc: "pango_log2vis_get_embedding_levels", libprag.} + +proc pango_lookup_aliases*(fontname: cstring; families: var cstringArray; nFamilies: var int32) {. + importc: "pango_lookup_aliases", libprag.} + +proc lookupAliases*(fontname: cstring; families: var cstringArray; nFamilies: var int32) {. + importc: "pango_lookup_aliases", libprag.} + +proc pango_markup_parser_finish*(context: ptr glib.MarkupParseContext00; attrList: var ptr AttrList00; + text: var cstring; accelChar: var gunichar): gboolean {. + importc: "pango_markup_parser_finish", libprag.} + +proc markupParserFinish*(context: ptr glib.MarkupParseContext00; attrList: var ptr AttrList00; + text: var cstring; accelChar: var gunichar): gboolean {. + importc: "pango_markup_parser_finish", libprag.} + +proc pango_markup_parser_new*(accelMarker: gunichar): ptr glib.MarkupParseContext00 {. + importc: "pango_markup_parser_new", libprag.} + +proc markupParserNew*(accelMarker: gunichar): glib.MarkupParseContext = + new(result) + result.impl = pango_markup_parser_new(accelMarker) + +proc pango_module_register*(module: ptr IncludedModule00) {. + importc: "pango_module_register", libprag.} + +proc moduleRegister*(module: IncludedModule) = + pango_module_register(cast[ptr IncludedModule00](module.impl)) + +proc pango_parse_enum*(`type`: GType; str: cstring; value: var int32; warn: gboolean; + possibleValues: var cstring): gboolean {. + importc: "pango_parse_enum", libprag.} + +proc parseEnum*(`type`: GType; str: cstring; value: var int32; warn: gboolean; + possibleValues: var cstring): gboolean {. + importc: "pango_parse_enum", libprag.} + +proc pango_parse_markup*(markupText: cstring; length: int32; accelMarker: gunichar; + attrList: var ptr AttrList00; text: var cstring; accelChar: var gunichar): gboolean {. + importc: "pango_parse_markup", libprag.} + +proc parseMarkup*(markupText: cstring; length: int32; accelMarker: gunichar; + attrList: var ptr AttrList00; text: var cstring; accelChar: var gunichar): gboolean {. + importc: "pango_parse_markup", libprag.} + +proc pango_parse_stretch*(str: cstring; stretch: var Stretch; warn: gboolean): gboolean {. + importc: "pango_parse_stretch", libprag.} + +proc parseStretch*(str: cstring; stretch: var Stretch; warn: gboolean): gboolean {. + importc: "pango_parse_stretch", libprag.} + +proc pango_parse_style*(str: cstring; style: var Style; warn: gboolean): gboolean {. + importc: "pango_parse_style", libprag.} + +proc parseStyle*(str: cstring; style: var Style; warn: gboolean): gboolean {. + importc: "pango_parse_style", libprag.} + +proc pango_parse_variant*(str: cstring; variant: var Variant; warn: gboolean): gboolean {. + importc: "pango_parse_variant", libprag.} + +proc parseVariant*(str: cstring; variant: var Variant; warn: gboolean): gboolean {. + importc: "pango_parse_variant", libprag.} + +proc pango_parse_weight*(str: cstring; weight: var Weight; warn: gboolean): gboolean {. + importc: "pango_parse_weight", libprag.} + +proc parseWeight*(str: cstring; weight: var Weight; warn: gboolean): gboolean {. + importc: "pango_parse_weight", libprag.} + +proc pango_quantize_line_geometry*(thickness: int32; position: int32) {. + importc: "pango_quantize_line_geometry", libprag.} + +proc quantizeLineGeometry*(thickness: int32; position: int32) {. + importc: "pango_quantize_line_geometry", libprag.} + +proc pango_read_line*(stream: pointer; str: var glib.String00): int32 {. + importc: "pango_read_line", libprag.} + +proc readLine*(stream: pointer; str: var glib.String00): int32 {. + importc: "pango_read_line", libprag.} + +proc pango_reorder_items*(logicalItems: ptr pointer): ptr pointer {. + importc: "pango_reorder_items", libprag.} + +proc reorderItems*(logicalItems: ptr pointer): ptr pointer {. + importc: "pango_reorder_items", libprag.} + +proc pango_scan_int*(pos: cstring; `out`: var int32): gboolean {. + importc: "pango_scan_int", libprag.} + +proc scanInt*(pos: cstring; `out`: var int32): gboolean {. + importc: "pango_scan_int", libprag.} + +proc pango_scan_string*(pos: cstring; `out`: var glib.String00): gboolean {. + importc: "pango_scan_string", libprag.} + +proc scanString*(pos: cstring; `out`: var glib.String00): gboolean {. + importc: "pango_scan_string", libprag.} + +proc pango_scan_word*(pos: cstring; `out`: var glib.String00): gboolean {. + importc: "pango_scan_word", libprag.} + +proc scanWord*(pos: cstring; `out`: var glib.String00): gboolean {. + importc: "pango_scan_word", libprag.} + +proc pango_shape*(text: cstring; length: int32; analysis: ptr Analysis00; + glyphs: ptr GlyphString00) {. + importc: "pango_shape", libprag.} + +proc shape*(text: string; length: int; analysis: Analysis; glyphs: GlyphString) = + pango_shape(cstring(text), int32(length), cast[ptr Analysis00](analysis.impl), cast[ptr GlyphString00](glyphs.impl)) + +proc pango_shape_full*(itemText: cstring; itemLength: int32; paragraphText: cstring; + paragraphLength: int32; analysis: ptr Analysis00; glyphs: ptr GlyphString00) {. + importc: "pango_shape_full", libprag.} + +proc shapeFull*(itemText: string; itemLength: int; paragraphText: string; + paragraphLength: int; analysis: Analysis; glyphs: GlyphString) = + pango_shape_full(cstring(itemText), int32(itemLength), cstring(paragraphText), int32(paragraphLength), cast[ptr Analysis00](analysis.impl), cast[ptr GlyphString00](glyphs.impl)) + +proc pango_skip_space*(pos: cstring): gboolean {. + importc: "pango_skip_space", libprag.} + +proc skipSpace*(pos: cstring): gboolean {. + importc: "pango_skip_space", libprag.} + +proc pango_split_file_list*(str: cstring): cstringArray {. + importc: "pango_split_file_list", libprag.} + +proc splitFileList*(str: cstring): cstringArray {. + importc: "pango_split_file_list", libprag.} + +proc pango_trim_string*(str: cstring): cstring {. + importc: "pango_trim_string", libprag.} + +proc trimString*(str: string): string = + let resul0 = pango_trim_string(cstring(str)) + result = $resul0 + cogfree(resul0) + +proc pango_unichar_direction*(ch: gunichar): Direction {. + importc: "pango_unichar_direction", libprag.} + +proc unicharDirection*(ch: gunichar): Direction {. + importc: "pango_unichar_direction", libprag.} + +proc pango_units_from_double*(d: cdouble): int32 {. + importc: "pango_units_from_double", libprag.} + +proc unitsFromDouble*(d: cdouble): int32 {. + importc: "pango_units_from_double", libprag.} + +proc pango_units_to_double*(i: int32): cdouble {. + importc: "pango_units_to_double", libprag.} + +proc unitsToDouble*(i: int32): cdouble {. + importc: "pango_units_to_double", libprag.} + +proc pango_version*(): int32 {. + importc: "pango_version", libprag.} + +proc version*(): int32 {. + importc: "pango_version", libprag.} + +proc pango_version_check*(requiredMajor: int32; requiredMinor: int32; requiredMicro: int32): cstring {. + importc: "pango_version_check", libprag.} + +proc versionCheck*(requiredMajor: int; requiredMinor: int; requiredMicro: int): string = + let resul0 = pango_version_check(int32(requiredMajor), int32(requiredMinor), int32(requiredMicro)) + result = $resul0 + +proc pango_version_string*(): cstring {. + importc: "pango_version_string", libprag.} + +proc versionString*(): string = + let resul0 = pango_version_string() + result = $resul0 +# === remaining symbols: diff --git a/gintro/rsvg.nim b/gintro/rsvg.nim new file mode 100644 index 0000000..5bedeaa --- /dev/null +++ b/gintro/rsvg.nim @@ -0,0 +1,428 @@ +# dependencies: +# cairo-1.0 +# GLib-2.0 +# Gio-2.0 +# GObject-2.0 +# GModule-2.0 +# GdkPixbuf-2.0 +# immediate dependencies: +# cairo-1.0 +# Gio-2.0 +# GdkPixbuf-2.0 +# GObject-2.0 +# GLib-2.0 +# libraries: +# librsvg-2.so.2 +{.deadCodeElim: on.} +import cairo, glib, gio, gobject, gmodule, gdkpixbuf +const Lib* = "librsvg-2.so.2" +{.pragma: libprag, cdecl, dynlib: Lib.} +let Quark = g_quark_from_static_string("NimGIQuark") + +type + DimensionData00* {.pure.} = object + width*: int32 + height*: int32 + em*: cdouble + ex*: cdouble + DimensionData* = ref object + impl*: ptr DimensionData00 + +type + Error* {.size: sizeof(cint), pure.} = enum + errorFailed = 0 + +type + HandlePrivate00* {.pure.} = object + HandlePrivate* = ref object + impl*: ptr HandlePrivate00 + +type + Handle* = ref object of gobject.Object + Handle00* = object of gobject.Object00 + priv1: ptr HandlePrivate00 + abiPadding*: array[15, pointer] + +proc rsvg_handle_new*(): ptr Handle00 {. + importc: "rsvg_handle_new", libprag.} + +proc newHandle*(): Handle = + new(result, finalizeGObject) + result.impl = rsvg_handle_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHandle*[T](result: var T) = + assert(result is Handle) + new(result, finalizeGObject) + result.impl = rsvg_handle_new() + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rsvg_handle_new_from_data*(data: uint8Array; dataLen: uint64): ptr Handle00 {. + importc: "rsvg_handle_new_from_data", libprag.} + +proc newHandleFromData*(data: uint8Array; dataLen: uint64): Handle = + new(result, finalizeGObject) + result.impl = rsvg_handle_new_from_data(data, dataLen) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHandleFromData*[T](result: var T; data: uint8Array; dataLen: uint64) = + assert(result is Handle) + new(result, finalizeGObject) + result.impl = rsvg_handle_new_from_data(data, dataLen) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rsvg_handle_new_from_file*(fileName: cstring): ptr Handle00 {. + importc: "rsvg_handle_new_from_file", libprag.} + +proc newHandleFromFile*(fileName: string): Handle = + new(result, finalizeGObject) + result.impl = rsvg_handle_new_from_file(cstring(fileName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHandleFromFile*[T](result: var T; fileName: string) = + assert(result is Handle) + new(result, finalizeGObject) + result.impl = rsvg_handle_new_from_file(cstring(fileName)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rsvg_handle_close*(self: ptr Handle00): gboolean {. + importc: "rsvg_handle_close", libprag.} + +proc close*(self: Handle): bool = + toBool(rsvg_handle_close(cast[ptr Handle00](self.impl))) + +proc rsvg_handle_get_base_uri*(self: ptr Handle00): cstring {. + importc: "rsvg_handle_get_base_uri", libprag.} + +proc getBaseUri*(self: Handle): string = + let resul0 = rsvg_handle_get_base_uri(cast[ptr Handle00](self.impl)) + result = $resul0 + +proc baseUri*(self: Handle): string = + let resul0 = rsvg_handle_get_base_uri(cast[ptr Handle00](self.impl)) + result = $resul0 + +proc rsvg_handle_get_dimensions*(self: ptr Handle00; dimensionData: var DimensionData00) {. + importc: "rsvg_handle_get_dimensions", libprag.} + +proc getDimensions*(self: ptr Handle00; dimensionData: var DimensionData00) {. + importc: "rsvg_handle_get_dimensions", libprag.} + +proc dimensions*(self: ptr Handle00; dimensionData: var DimensionData00) {. + importc: "rsvg_handle_get_dimensions", libprag.} + +proc rsvg_handle_get_dimensions_sub*(self: ptr Handle00; dimensionData: var DimensionData00; + id: cstring): gboolean {. + importc: "rsvg_handle_get_dimensions_sub", libprag.} + +proc getDimensionsSub*(self: ptr Handle00; dimensionData: var DimensionData00; + id: cstring): gboolean {. + importc: "rsvg_handle_get_dimensions_sub", libprag.} + +proc dimensionsSub*(self: ptr Handle00; dimensionData: var DimensionData00; + id: cstring): gboolean {. + importc: "rsvg_handle_get_dimensions_sub", libprag.} + +proc rsvg_handle_get_pixbuf*(self: ptr Handle00): ptr gdkpixbuf.Pixbuf00 {. + importc: "rsvg_handle_get_pixbuf", libprag.} + +proc getPixbuf*(self: Handle): gdkpixbuf.Pixbuf = + let gobj = rsvg_handle_get_pixbuf(cast[ptr Handle00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbuf*(self: Handle): gdkpixbuf.Pixbuf = + let gobj = rsvg_handle_get_pixbuf(cast[ptr Handle00](self.impl)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rsvg_handle_get_pixbuf_sub*(self: ptr Handle00; id: cstring): ptr gdkpixbuf.Pixbuf00 {. + importc: "rsvg_handle_get_pixbuf_sub", libprag.} + +proc getPixbufSub*(self: Handle; id: string): gdkpixbuf.Pixbuf = + let gobj = rsvg_handle_get_pixbuf_sub(cast[ptr Handle00](self.impl), cstring(id)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc pixbufSub*(self: Handle; id: string): gdkpixbuf.Pixbuf = + let gobj = rsvg_handle_get_pixbuf_sub(cast[ptr Handle00](self.impl), cstring(id)) + if g_object_get_qdata(gobj, Quark) != nil: + result = cast[gdkpixbuf.Pixbuf](g_object_get_qdata(gobj, Quark)) + assert(result.impl == gobj) + else: + new(result, finalizeGObject) + result.impl = gobj + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rsvg_handle_has_sub*(self: ptr Handle00; id: cstring): gboolean {. + importc: "rsvg_handle_has_sub", libprag.} + +proc hasSub*(self: Handle; id: string): bool = + toBool(rsvg_handle_has_sub(cast[ptr Handle00](self.impl), cstring(id))) + +proc rsvg_handle_read_stream_sync*(self: ptr Handle00; stream: ptr gio.InputStream00; + cancellable: ptr gio.Cancellable00): gboolean {. + importc: "rsvg_handle_read_stream_sync", libprag.} + +proc readStreamSync*(self: Handle; stream: gio.InputStream; cancellable: gio.Cancellable): bool = + toBool(rsvg_handle_read_stream_sync(cast[ptr Handle00](self.impl), cast[ptr gio.InputStream00](stream.impl), cast[ptr gio.Cancellable00](cancellable.impl))) + +proc rsvg_handle_render_cairo*(self: ptr Handle00; cr: ptr cairo.Context00): gboolean {. + importc: "rsvg_handle_render_cairo", libprag.} + +proc renderCairo*(self: Handle; cr: cairo.Context): bool = + toBool(rsvg_handle_render_cairo(cast[ptr Handle00](self.impl), cast[ptr cairo.Context00](cr.impl))) + +proc rsvg_handle_render_cairo_sub*(self: ptr Handle00; cr: ptr cairo.Context00; id: cstring): gboolean {. + importc: "rsvg_handle_render_cairo_sub", libprag.} + +proc renderCairoSub*(self: Handle; cr: cairo.Context; id: string): bool = + toBool(rsvg_handle_render_cairo_sub(cast[ptr Handle00](self.impl), cast[ptr cairo.Context00](cr.impl), cstring(id))) + +proc rsvg_handle_set_base_gfile*(self: ptr Handle00; baseFile: ptr gio.File00) {. + importc: "rsvg_handle_set_base_gfile", libprag.} + +proc setBaseGfile*(self: Handle; baseFile: gio.File) = + rsvg_handle_set_base_gfile(cast[ptr Handle00](self.impl), cast[ptr gio.File00](baseFile.impl)) + +proc `baseGfile=`*(self: Handle; baseFile: gio.File) = + rsvg_handle_set_base_gfile(cast[ptr Handle00](self.impl), cast[ptr gio.File00](baseFile.impl)) + +proc rsvg_handle_set_base_uri*(self: ptr Handle00; baseUri: cstring) {. + importc: "rsvg_handle_set_base_uri", libprag.} + +proc setBaseUri*(self: Handle; baseUri: string) = + rsvg_handle_set_base_uri(cast[ptr Handle00](self.impl), cstring(baseUri)) + +proc `baseUri=`*(self: Handle; baseUri: string) = + rsvg_handle_set_base_uri(cast[ptr Handle00](self.impl), cstring(baseUri)) + +proc rsvg_handle_set_dpi*(self: ptr Handle00; dpi: cdouble) {. + importc: "rsvg_handle_set_dpi", libprag.} + +proc setDpi*(self: Handle; dpi: cdouble) = + rsvg_handle_set_dpi(cast[ptr Handle00](self.impl), dpi) + +proc `dpi=`*(self: Handle; dpi: cdouble) = + rsvg_handle_set_dpi(cast[ptr Handle00](self.impl), dpi) + +proc rsvg_handle_set_dpi_x_y*(self: ptr Handle00; dpiX: cdouble; dpiY: cdouble) {. + importc: "rsvg_handle_set_dpi_x_y", libprag.} + +proc setDpiXY*(self: Handle; dpiX: cdouble; dpiY: cdouble) = + rsvg_handle_set_dpi_x_y(cast[ptr Handle00](self.impl), dpiX, dpiY) + +proc rsvg_handle_write*(self: ptr Handle00; buf: uint8Array; count: uint64): gboolean {. + importc: "rsvg_handle_write", libprag.} + +proc write*(self: Handle; buf: uint8Array; count: uint64): bool = + toBool(rsvg_handle_write(cast[ptr Handle00](self.impl), buf, count)) + +type + HandleFlag* {.size: sizeof(cint), pure.} = enum + flagUnlimited = 1 + flagKeepImageData = 2 + + HandleFlags* {.size: sizeof(cint).} = set[HandleFlag] + +proc rsvg_handle_new_from_gfile_sync*(file: ptr gio.File00; flags: HandleFlags; cancellable: ptr gio.Cancellable00): ptr Handle00 {. + importc: "rsvg_handle_new_from_gfile_sync", libprag.} + +proc newHandleFromGfileSync*(file: gio.File; flags: HandleFlags; cancellable: gio.Cancellable): Handle = + new(result, finalizeGObject) + result.impl = rsvg_handle_new_from_gfile_sync(cast[ptr gio.File00](file.impl), flags, cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHandleFromGfileSync*[T](result: var T; file: gio.File; flags: HandleFlags; cancellable: gio.Cancellable) = + assert(result is Handle) + new(result, finalizeGObject) + result.impl = rsvg_handle_new_from_gfile_sync(cast[ptr gio.File00](file.impl), flags, cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rsvg_handle_new_from_stream_sync*(inputStream: ptr gio.InputStream00; baseFile: ptr gio.File00; + flags: HandleFlags; cancellable: ptr gio.Cancellable00): ptr Handle00 {. + importc: "rsvg_handle_new_from_stream_sync", libprag.} + +proc newHandleFromStreamSync*(inputStream: gio.InputStream; baseFile: gio.File; + flags: HandleFlags; cancellable: gio.Cancellable): Handle = + new(result, finalizeGObject) + result.impl = rsvg_handle_new_from_stream_sync(cast[ptr gio.InputStream00](inputStream.impl), cast[ptr gio.File00](baseFile.impl), flags, cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHandleFromStreamSync*[T](result: var T; inputStream: gio.InputStream; baseFile: gio.File; + flags: HandleFlags; cancellable: gio.Cancellable) = + assert(result is Handle) + new(result, finalizeGObject) + result.impl = rsvg_handle_new_from_stream_sync(cast[ptr gio.InputStream00](inputStream.impl), cast[ptr gio.File00](baseFile.impl), flags, cast[ptr gio.Cancellable00](cancellable.impl)) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc rsvg_handle_new_with_flags*(flags: HandleFlags): ptr Handle00 {. + importc: "rsvg_handle_new_with_flags", libprag.} + +proc newHandleWithFlags*(flags: HandleFlags): Handle = + new(result, finalizeGObject) + result.impl = rsvg_handle_new_with_flags(flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +proc initHandleWithFlags*[T](result: var T; flags: HandleFlags) = + assert(result is Handle) + new(result, finalizeGObject) + result.impl = rsvg_handle_new_with_flags(flags) + GC_ref(result) + discard g_object_ref_sink(result.impl) + g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[])) + g_object_unref(result.impl) + assert(g_object_get_qdata(result.impl, Quark) == nil) + g_object_set_qdata(result.impl, Quark, addr(result[])) + +type + PositionData00* {.pure.} = object + x*: int32 + y*: int32 + PositionData* = ref object + impl*: ptr PositionData00 + +proc rsvg_handle_get_position_sub*(self: ptr Handle00; positionData: var PositionData00; + id: cstring): gboolean {. + importc: "rsvg_handle_get_position_sub", libprag.} + +proc getPositionSub*(self: ptr Handle00; positionData: var PositionData00; + id: cstring): gboolean {. + importc: "rsvg_handle_get_position_sub", libprag.} + +proc positionSub*(self: ptr Handle00; positionData: var PositionData00; + id: cstring): gboolean {. + importc: "rsvg_handle_get_position_sub", libprag.} + +type + HandleClass00* {.pure.} = object + parent*: gobject.ObjectClass00 + abiPadding*: array[15, pointer] + HandleClass* = ref object + impl*: ptr HandleClass00 + +const MAJOR_VERSION* = 2'i32 + +const MICRO_VERSION* = 17'i32 + +const MINOR_VERSION* = 40'i32 + +const VERSION* = "2.40.17" + +proc rsvg_cleanup*() {. + importc: "rsvg_cleanup", libprag.} + +proc cleanup*() {. + importc: "rsvg_cleanup", libprag.} + +proc rsvg_error_quark*(): uint32 {. + importc: "rsvg_error_quark", libprag.} + +proc rsvg_set_default_dpi*(dpi: cdouble) {. + importc: "rsvg_set_default_dpi", libprag.} + +proc setDefaultDpi*(dpi: cdouble) {. + importc: "rsvg_set_default_dpi", libprag.} + +proc `defaultDpi=`*(dpi: cdouble) {. + importc: "rsvg_set_default_dpi", libprag.} + +proc rsvg_set_default_dpi_x_y*(dpiX: cdouble; dpiY: cdouble) {. + importc: "rsvg_set_default_dpi_x_y", libprag.} + +proc setDefaultDpiXY*(dpiX: cdouble; dpiY: cdouble) {. + importc: "rsvg_set_default_dpi_x_y", libprag.} + +proc `defaultDpiXY=`*(dpiX: cdouble; dpiY: cdouble) {. + importc: "rsvg_set_default_dpi_x_y", libprag.} +# === remaining symbols: diff --git a/gintro/xlib.nim b/gintro/xlib.nim new file mode 100644 index 0000000..e2fd2e0 --- /dev/null +++ b/gintro/xlib.nim @@ -0,0 +1,65 @@ +# dependencies: +# immediate dependencies: +# libraries: +# +{.deadCodeElim: on.} + +const Lib* = "" +{.pragma: libprag, cdecl, dynlib: Lib.} + +type + Display00* {.pure.} = object + Display* = ref object + impl*: ptr Display00 + +type + Screen00* {.pure.} = object + Screen* = ref object + impl*: ptr Screen00 + +type + Visual00* {.pure.} = object + Visual* = ref object + impl*: ptr Visual00 + +type + XEvent00* = object {.union.} + XEvent* = ref object + impl*: ptr XEvent00 + +type + XConfigureEvent00* {.pure.} = object + XConfigureEvent* = ref object + impl*: ptr XConfigureEvent00 + +type + XImage00* {.pure.} = object + XImage* = ref object + impl*: ptr XImage00 + +type + XFontStruct00* {.pure.} = object + XFontStruct* = ref object + impl*: ptr XFontStruct00 + +type + XTrapezoid00* {.pure.} = object + XTrapezoid* = ref object + impl*: ptr XTrapezoid00 + +type + XVisualInfo00* {.pure.} = object + XVisualInfo* = ref object + impl*: ptr XVisualInfo00 + +type + XWindowAttributes00* {.pure.} = object + XWindowAttributes* = ref object + impl*: ptr XWindowAttributes00 + +proc XOpenDisplay*() {. + importc: "XOpenDisplay", libprag.} + +proc openDisplay*() {. + importc: "XOpenDisplay", libprag.} +# === remaining symbols: diff --git a/tests/combinatorics.nim b/tests/combinatorics.nim new file mode 100644 index 0000000..f448da3 --- /dev/null +++ b/tests/combinatorics.nim @@ -0,0 +1,181 @@ +# +# +# Nimrod Combinatorics Module +# (c) Copyright 2014 Reimer Behrends +# +# See the file "LICENSE", included in this +# distribution, for details about the copyright. +# + +## The combinatorics module contains routines to enumerate permutations, +## choices, or combinations of a sequence or array. These routines are +## implemented as iterators that yield sequences. ``sequtils.toSeq`` +## can be used to gather all results in a single sequence. +## +## The implementations assume that the input does not contain duplicates; +## if it contains duplicate entries, these will be treated as distinct +## items. + +iterator permutations*[T](s: openarray[T]): seq[T] = + ## Enumerates all possible permutations of `s`. Example: + ## + ## .. code-block:: nimrod + ## for p in permutations(@[1,2,3]): + ## + ## ...generates this output: + ## + ## .. code-block:: + ## @[1, 2, 3] + ## @[2, 1, 3] + ## @[1, 3, 2] + ## @[2, 3, 1] + ## @[3, 2, 1] + ## @[3, 1, 2] + let n = len(s) + var pos = newSeq[int](n) + var current = newSeq[T](n) + for i in 0..n-1: + pos[i] = i + while true: + for i in 0..n-1: + current[i] = current[pos[i]] + current[pos[i]] = s[i] + yield current + var i = 1 + while i < n: + pos[i] -= 1 + if pos[i] < 0: + pos[i] = i + i += 1 + else: + break + if i >= n: + break + +iterator combinations*[T](s: openarray[T], k: int): seq[T] = + ## Enumerates all combinations of `k` distinct elements + ## out of `s`. Example: + ## + ## .. code-block:: nimrod + ## for p in combinations(@[1,2,3], 2): + ## + ## ...generates this output: + ## + ## .. code-block:: + ## @[1, 2] + ## @[1, 3] + ## @[2, 3] + let n = len(s) + assert k >= 0 and k <= n + var pos = newSeq[int](k) + var current = newSeq[T](k) + for i in 0..k-1: + pos[k-i-1] = i + var done = false + while not done: + for i in 0..k-1: + current[i] = s[pos[k-i-1]] + yield current + var i = 0 + while i < k: + pos[i] += 1 + if pos[i] < n-i: + for j in 0..i-1: + pos[j] = pos[i] + i - j + break + i += 1 + if i >= k: + break + +iterator multicombinations*[T](s: openarray[T], k: int): seq[T] = + ## Enumerates all ordered combinations of `k` elements + ## out of `s` where the elements can be repeated. + ## Example: + ## + ## .. code-block:: nimrod + ## for p in multicombinations(@[1,2,3], 2): + ## + ## ...generates this output: + ## + ## .. code-block:: + ## @[1, 1] + ## @[1, 2] + ## @[1, 3] + ## @[2, 2] + ## @[2, 3] + ## @[3, 3] + let n = len(s) + assert k >= 0 and k <= n + var pos = newSeq[int](k) + var current = newSeq[T](k) + var done = false + while not done: + for i in 0..k-1: + current[i] = s[pos[k-i-1]] + yield current + var i = 0 + while i < k: + pos[i] += 1 + if pos[i] < n: + for j in 0..i-1: + pos[j] = pos[i] + break + i += 1 + if i == k: + break + +iterator tuples*[T](s: openarray[T], k: int): seq[T] = + ## Enumerates all ordered combinations of `k` elements + ## out of `s` where the elements can be repeated. This is + ## essentially the Cartesian product of `s` with itself + ## for `k` factors. Example: + ## + ## .. code-block:: nimrod + ## for p in tuples(@[1,2], 2): + ## + ## ...generates this output: + ## + ## .. code-block:: + ## @[1, 1] + ## @[1, 2] + ## @[2, 1] + ## @[2, 2] + if k >= 0 and len(s) > 0: + var pos = newSeq[int](k) + var current = newSeq[T](k) + while true: + for i in 0..k-1: + current[i] = s[pos[i]] + yield current + var i = 0 + while i < k: + pos[i] += 1 + if pos[i] >= len(s): + pos[i] = 0 + i += 1 + else: + break + if i == k: + break + +when isMainModule: + import sets, math, sequtils + template count(s: untyped): untyped = + block: + var i = 0 + for x in s: i += 1 + i + proc mcoeff(a, b: int): int = + binom(a+b-1, b) + doAssert count(permutations[int]([])) == 1 + doAssert count(permutations([1,2,3,4,5])) == fac(5) + doAssert count(permutations(["a", "b", "c"])) == fac(3) + doAssert count(combinations([1,2,3,4], 1)) == binom(4, 1) + doAssert count(combinations([1,2,3,4], 2)) == binom(4, 2) + doAssert count(combinations([1,2,3,4], 3)) == binom(4, 3) + doAssert count(combinations(["a", "b", "c", "d", "e"], 3)) == 10 + doAssert count(multicombinations([1,2,3,4], 1)) == mcoeff(4, 1) + doAssert count(multicombinations([1,2,3,4], 2)) == mcoeff(4, 2) + doAssert count(multicombinations([1,2,3,4], 3)) == mcoeff(4, 3) + doAssert count(tuples([1,2,3,4], 3)) == 4*4*4 + doAssert count(tuples([1,2], 10)) == 1024 diff --git a/tests/gen.nim b/tests/gen.nim new file mode 100644 index 0000000..cbddc8b --- /dev/null +++ b/tests/gen.nim @@ -0,0 +1,1221 @@ +# High level gobject-introspection based GTK3 bindings for the Nim programming language +# v 0.1 2017-JUL-12 +# (c) S. Salewski 2017 + +# https://wiki.gnome.org/Projects/GObjectIntrospection +# https://developer.gnome.org/gi/1.50/index.html +# https://mail.gnome.org/archives/gtk-devel-list/2005-April/msg00095.html +# /usr/share/gir-1.0/GLib-2.0.gir + +# you may also compare the currently unmaintained work of +# https://github.com/jdmansour/nim-smartgi + +# This module itself is still based on the low level GTK 3.20 wrappers at +# https://github.com/ngtk3 + +# Currently we intentionally do not free any resources! + +# First goal is creating low level bindings similar to current ngtk3. #XXX DONE +# Then we will add the high level wrapper similar as done in Nim's libui wrapper. #XXX Mostly DONE +# What remains is carefully inspecting the generated code, adding special like list/array results +# and of course a lot of testing. + +# Known gobject-introspection related issues: +# - gFieldInfoGetSize() is always zero, so we have no bitfield support yet. +# - ParamSpec is reported as object, but has no parent +# - gBaseInfoGetName() is "" for g_iconv() +# - dirSep is wrong for unix -- that is an already reported gi bug +# - well there are more than 180 open issues about gobject introspection in gnome bugzilla :-( +# - + +# This module is really ugly currently -- the first goal was to get a working gi solution + +from os import `/` +import gir +import glib +import strutils +import sequtils +import streams +import sets +import bitops +import tables +import algorithm +from combinatorics import combinations + +template isCallbackInfo(info: untyped): untyped = + (gBaseInfoGetType(cast[GIBaseInfo](info)) == GIInfoType.Callback) + +template isFunctionInfo(info: untyped): untyped = + (gBaseInfoGetType(cast[GIBaseInfo](info)) == GIInfoType.Function) + +const EM = "*" + +# hope that will work reliable +proc cut(s: var StringStream; pos: int) = + assert(pos >= 0 and pos <= s.getPosition) + s.setPosition(pos) + s.data.setLen(pos) + s.setPosition(pos) + +var moduleNamespace: string +let libprag: string = "libprag" + +let keywords = """ +addr and as asm atomic bind block break case cast concept const continue converter +defer discard distinct div do elif else end enum except export finally for from func +generic if import in include interface is isnot iterator let macro method mixin mod +nil not notin object of or out proc ptr raise ref return shl shr static template try tuple +type using var when while with without xor yield +""" + +let nims = """ +int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 pointer +""" + +proc mysnakeToCamel(s: cstring): string = + var i, j: int + result = newString(s.len) + if s[i] == '_': inc(i) + while true: + if s[i] == '_' and (s[i + 1] == '\0' or s[i + 1] == '_'): + inc(i) + elif (s[i] == '_' or s[i] == '-') and s[i + 1].isLowerAscii and not s[i - 1].isUpperAscii: + inc(i) + result[j] = toUpperAscii(s[i]) + inc(i) + inc(j) + else: + result[j] = s[i] + inc(i) + inc(j) + if s[i] == '\0': + result.setLen(j) + break + if result[0] == '\0': # this may result, so we emit a dummy name as marker + result = "QQQ" + #assert(false) + +proc renumber(s: var string; i: int) = + var h = "" + if s[^1].isDigit: + h.add(s[^1]) + setLen(s, s.len - 1) + s.add($i) + s.add(h) + +var defaultParameters = newTable[string, string]() +var fixedProcNames = newTable[string, string]() +var mangledNames = newTable[string, string]() +var gdkKeys = newTable[string, seq[string]]() +var allSyms: HashSet[string] +var priList: seq[string] +var knownSyms: HashSet[string] +var suppressType = false +var suppressRaise = false +var droppedSyms = initSet[string]() +var callerAlloc = initSet[string]() +var callerAllocCollector = initSet[string]() +var privStr = initSet[string]() +var processedFunctions = initSet[string]() +var delayedMethods: seq[(GIBaseInfo, GIFunctionInfo)] +var classList: seq[GIBaseInfo] +var ct: CountTable[string] + +fixedProcNames.add("gtk_button_new_with_label", "newButton") +defaultParameters.add("gtk_window_new", "`type` WindowType WindowType.toplevel") +defaultParameters.add("gtk_application_new", "flags gio.ApplicationFlags {}") +for i in keywords.split: mangledNames.add(i, '`' & i & '`') + +mangledNames.add("CSET_A_2_Z", "CSET_A_2_Z_U") +mangledNames.add("CSET_a_2_z", "CSET_a_2_z_L") +mangledNames.add("2big", "tooBig") +mangledNames.add("2buttonPress", "twoButtonPress") +mangledNames.add("3buttonPress", "threeButtonPress") +mangledNames.add("result", "resu") + +proc mangleName(s: cstring): string = + result = mysnakeToCamel(s) + if mangledNames.contains(result): + result = mangledNames[result] + if result == "``": + # assert(false) + result = "xxx" # XXX + +var mangledTypes = newTable[string, string]() + +mangledTypes.add("gint8", "int8") +mangledTypes.add("gint16", "int16") +mangledTypes.add("gint32", "int32") +mangledTypes.add("gint64", "int64") +mangledTypes.add("guint8", "uint8") +mangledTypes.add("guint16", "uint16") +mangledTypes.add("guint32", "uint32") +mangledTypes.add("guint64", "uint64") +mangledTypes.add("gfloat", "cfloat") +mangledTypes.add("gdouble", "cdouble") +mangledTypes.add("ptr void", "pointer") +mangledTypes.add("ptr filename", "ucstring") # WRONG, var deleted to make it compile! +mangledTypes.add("ptr error", "ptr Error00") +mangledTypes.add("ptr ghash", "ptr HashTable00") +mangledTypes.add("ptr glist", "ptr pointer") +mangledTypes.add("ptr gslist", "ptr pointer") +mangledTypes.add("ptr utf8", "cstring") + +droppedSyms.incl("MININT8") +droppedSyms.incl("MININT16") +droppedSyms.incl("MININT32") +droppedSyms.incl("MININT64") + +# we may have to add digits to avoid name conflicts due to inheritance +privStr.incl("privat") +privStr.incl("priv") +privStr.incl("padding") +privStr.incl("pad") +privStr.incl("unused") +privStr.incl("privateData") + +callerAlloc.incl("atk.Rectangle") # ATK has TextRectangle and Rectangle! +callerAlloc.incl("pango.Color") # we have to add these manually -- maybe there are more plain structs to add + +const CA_Items = """ +pango.Style +pango.Stretch +glib.MarkupParser +glib.TimeVal +gtk.TextIter +pango.Weight +gdk.Rectangle +gtk.AccelKey +gtk.TextAttributes +gobject.Value +gobject.SignalQuery +gobject.TypeQuery +gtk.TreeIter +gtk.StockItem +glib.String +gdk.Atom +rsvg.PositionData +rsvg.DimensionData +pango.Variant +gdk.Color +gtk.Border +atk.TextRectangle +gdk.RGBA +pango.Rectangle +gtk.Requisition +""" +for i in CA_Items.split: + callerAlloc.incl(i) + +type + UndefEx = object of Exception + +proc mangleType(s: cstring): string = + result = mangleName(s) + if mangledTypes.contains(result): + result = mangledTypes[result] + if allSyms.contains(result) and not knownSyms.contains(result): + if not suppressRaise: + pri_list.add(result) + raise newException(UndefEx, "forward declaration") + else: + echo "!!!", result + +var output: StringStream +var methodBuffer: StringStream + +proc genP(info: GICallableInfo; genProxy = false; binfo: GIBaseInfo = nil): (string, string, TableRef[string, string]) + +proc isString(t: GITypeInfo): bool = + let tag = gTypeInfoGetTag(t) + tag == GITypeTag.UTF8 + +# recursive investigate that type -- resolve Arrays and Interfaces +proc genRec(t: GITypeInfo; genProxy = false; fullQualified: bool = false): string = + var rawmark = "" + var proxyResult = false#callerAllocCollector + let p = gTypeInfoIsPointer(t) + let tag = gTypeInfoGetTag(t) + if tag == GITypeTag.ARRAY: + let toa = gTypeInfoGetArrayType(t) # type of array + if toa == GIArrayType.ARRAY: result = "Array" + elif toa == GIArrayType.PTR_ARRAY: result = "PtrArray" + elif toa == GIArrayType.BYTE_ARRAY: result = "ByteArray00" + elif toa == GIArrayType.C: + let arrayType = gTypeInfoGetParamType(t, 0) + let arrayTag = gTypeInfoGetTag(arrayType) + let arrayFixedSize = gTypeInfoGetArrayFixedSize(t) + let arrayLength = gTypeInfoGetArrayLength(t) + let xxx = genRec(arrayType) + let child = mangleType(mangleName(genRec(arrayType))) + result = "array[$1, $2]" % [$arrayFixedSize, child] + if arrayFixedSize == -1: + result = child & "Array" + return + elif tag == GITypeTag.INTERFACE: + let iface = gTypeInfoGetInterface(t) + if gBaseInfoGetType(iface) == GIInfoType.CALLBACK: + if gBaseInfoGetName(iface)[0].isLowerAscii: + result = "proc" & genP(iface)[0] & " {.cdecl.}" + else: + result = mangleName(gBaseInfoGetName(iface)) + else: + var ns = ($gBaseInfoGetNamespace(iface)).toLowerAscii + result = mangleName($gBaseInfoGetName(iface)) + if gBaseInfoGetType(iface) == GIInfoType.Object or gBaseInfoGetType(iface) == GIInfoType.STRUCT or gBaseInfoGetType(iface) == GIInfoType.UNION or gBaseInfoGetType(iface) == GIInfoType.INTERFACE: + proxyResult = genProxy + if not (genProxy or callerAlloc.contains(ns & '.' & result)): + rawmark = "00" + if fullQualified or ns != moduleNamespace: + result = ns & '.' & result + else: + result = $gTypeTagToString(tag) + result = mangleType(result) + if p and (not proxyResult):# or callerAlloc.contains(result)): + result = "ptr " & result + var xxx = result + result = mangleType(result) & rawmark + +proc isProxyCandidate(t: GITypeInfo): bool = + let tag = gTypeInfoGetTag(t) + if tag == GITypeTag.INTERFACE: + let iface = gTypeInfoGetInterface(t) + var ns = ($gBaseInfoGetNamespace(iface)).toLowerAscii + if callerAlloc.contains(ns & '.' & $gBaseInfoGetName(iface)): return false + result = gBaseInfoGetType(iface) in {GIInfoType.Object, GIInfoType.STRUCT, GIInfoType.UNION, GIInfoType.INTERFACE} + +proc needProxyProc(info: GICallableInfo): bool = + result = gCallableInfoIsMethod(info) + let m = gCallableInfoGetNArgs(info) - 1 + for j in 0 .. m: + let arg = gCallableInfoGetArg(info, j) + let t = gArgInfoGetType(arg) + if isProxyCandidate(t): result = true + var ret = gCallableInfoGetReturnType(info) + assert(ret != nil) + let tag = gTypeInfoGetTag(ret) + if isFunctionInfo(info): + if (gFunctionInfoGetFlags(info).int and GIFunctionInfoFlags.IS_CONSTRUCTOR.int) != 0: + let h = gBaseInfoGetContainer(info) + if gBaseInfoGetType(h) == GIInfoType.OBJECT: + result = true + return result + if isProxyCandidate(ret): result = true + +var ct2nt = newTable[string, string]() +ct2nt.add("uint32", "int") +ct2nt.add("int32", "int") +ct2nt.add("cstring", "string") +ct2nt.add("gboolean", "bool") + +proc ct3nt(s: string): string = + assert(ct2nt.contains(s)) + result = + case s: + of "cstring": "$" + of "gboolean": "toBool" + else: ct2nt[s] + +proc genP(info: GICallableInfo; genProxy = false; binfo: GIBaseInfo = nil): (string, string, TableRef[string, string]) = + var cutat = 50 + var arglist: string + var resul: string + var replist = newTable[string, string]() + let m = gCallableInfoGetNArgs(info) - 1 + var sym = "" + if isFunctionInfo(info): + sym = $gFunctionInfoGetSymbol(info) + if binfo.isNil or not gCallableInfoIsMethod(info): + resul = "(" + arglist = "(" + else: + var ns = ($gBaseInfoGetNamespace(binfo)).toLowerAscii + if callerAlloc.contains(ns & '.' & manglename(gBaseInfoGetName(binfo))): + resul = "(self: " & manglename(gBaseInfoGetName(binfo)) + arglist = "(self" + else: + arglist = "(cast[ptr " & manglename(gBaseInfoGetName(binfo)) & "00](" & "self.impl)" + if genProxy: + resul = "(self: " & manglename(gBaseInfoGetName(binfo)) + else: + resul = "(self: ptr " & manglename(gBaseInfoGetName(binfo)) & "00" + if m >= 0: + resul.add("; ") + arglist.add(", ") + for j in 0 .. m: + let arg = gCallableInfoGetArg(info, j) + let t = gArgInfoGetType(arg) + if gArgInfoIsCallerAllocates(arg): + callerAllocCollector.incl(genRec(t, true, true)) + var str = genRec(t, genProxy and not gArgInfoIsCallerAllocates(arg)) + var userAlloc: bool + if callerAlloc.contains(genRec(t, true, true)): + userAlloc = true + str = genRec(t, true) + let name = mangleName(gBaseInfoGetName(arg)) + if isProxyCandidate(t) and not gArgInfoIsCallerAllocates(arg) and not userAlloc: + arglist.add("cast[" & genRec(t, false) & "](" & name & ".impl)") + else: + if ct2nt.contains(str) and (gArgInfoGetDirection(arg) == GIDirection.OUT or gArgInfoGetDirection(arg) == GIDirection.INOUT): + let kk = if name[0] == '`': name[1 .. ^2] else: name + arglist.add(kk & "_00") + elif ct2nt.contains(str): + arglist.add(str & '(' & name & ')') + else: + arglist.add(name) + if not genProxy and ct2nt.contains(str) and str != "cstring": + replist.add($name, $str) + if genProxy and ct2nt.contains(str): + if gArgInfoGetDirection(arg) == GIDirection.OUT or gArgInfoGetDirection(arg) == GIDirection.INOUT: + replist.add($name, $str) + str = ct2nt[str] + if gArgInfoGetDirection(arg) == GIDirection.OUT or gArgInfoGetDirection(arg) == GIDirection.INOUT: # caution cstringArray + str.insert("var ") + if genProxy and defaultParameters.contains(sym): + var h1, h2, h3: string + (h1, h2, h3) = defaultParameters[sym].split + if name == h1 and str == h2: + str.add(" = " & h3) + resul.add(name & ": " & str) + if j < m: + resul.add("; ") + arglist.add(", ") + if resul.len > cutat: + cutat = 3 * cutat + resul.add("\n ") + if not genProxy and gCallableInfoCanThrowGerror(info): + if resul[^1] != '(': resul.add("; ") + resul.add("error: GError = nil") + resul.add(')') + arglist.add(')') + var ret = gCallableInfoGetReturnType(info) + assert(ret != nil) + let tag = gTypeInfoGetTag(ret) + if isFunctionInfo(info): + if (gFunctionInfoGetFlags(info).int and GIFunctionInfoFlags.IS_CONSTRUCTOR.int) != 0: + let h = gBaseInfoGetContainer(info) + if gBaseInfoGetType(h) == GIInfoType.OBJECT: + if genProxy: + resul.add(": " & mangleType(mangleName(gBaseInfoGetName(h)))) + else: + resul.add(": ptr " & mangleType(mangleName(gBaseInfoGetName(h))) & "00") + return (resul, arglist, replist) + var r = genRec(ret, genProxy) + if gTypeInfoIsPointer(ret) and callerAlloc.contains(genRec(ret, true, true)) and (not r.startsWith("ptr")): + r = "ptr " & r + if r != "void": + if genProxy and ct2nt.contains(r): + r = ct2nt[r] + resul.add(": " & r) + return (resul, arglist, replist) + +proc writeMethod(info: GIBaseInfo; minfo: GIFunctionInfo; genProxy = false) = + assert(isCallableInfo(mInfo)) + assert(isFunctionInfo(mInfo)) + var plist, arglist: string + var replist: TableRef[string, string] + let p = methodBuffer.getPosition + let sym = $gFunctionInfoGetSymbol(mInfo) + if sym[^1] == '_': return + if sym.contains("__"): return + if processedFunctions.contains(sym): return + if sym == "gtk_text_iter_copy": return + if sym == "gtk_widget_destroyed": return + if sym == "g_error_new_literal": return + for j in 0 ..< gCallableInfoGetNArgs(minfo): + let arg = gCallableInfoGetArg(minfo, j) + let t = gArgInfoGetType(arg) + if isProxyCandidate(t) and gArgInfoGetDirection(arg) == GIDirection.OUT and not gArgInfoIsCallerAllocates(arg): return + if sym == "g_iconv": + return + try: + (plist, arglist, replist) = genP(mInfo, genProxy, info) + methodBuffer.write("\nproc " & sym & EM & plist) + methodBuffer.writeLine(" {.\n importc: \"", sym, "\", ", libprag, ".}") + processedFunctions.incl(sym) + if sym.contains("g_param_spec_") or sym.contains("g_type_interface_") or sym.contains("g_object_interface_") or sym.contains("g_value_"): return + if sym.contains("gtk_widget_class_find_style_property") or sym.contains("gtk_container_class_find_child_property"): return + if sym.contains("gtk_cell_area_class_find_cell_property"): return + var asym = manglename(gBaseInfoGetName(mInfo)) + if keywords.split.contains(asym) or nims.split.contains(asym): asym.add('P') + var ret2 = gCallableInfoGetReturnType(minfo) + for run in 0 .. 1: + if run == 1: + if not (asym.startsWith("get") or asym.startsWith("set")) or asym == "getPlugin" or asym.len < 4: continue + if asym.startsWith("get") and gTypeInfoGetTag(ret2) == GITypeTag.VOID: continue + if asym.startsWith("set"): + if gCallableInfoGetNArgs(minfo) > 2: + continue + if gCallableInfoIsMethod(minfo) and gCallableInfoGetNArgs(minfo) > 1: + continue + if asym.startsWith("get"): + asym = asym[3 .. ^1] + asym[0] = asym[0].toLowerAscii + if asym.startsWith("set"): + asym = asym[3 .. ^1] + asym[0] = asym[0].toLowerAscii + asym = '`' & asym & '=' & '`' + if keywords.split.contains(asym) or nims.split.contains(asym): continue + if needProxyProc(mInfo) or isString(ret2) or replist.len > 0: + var isGObject = false + let tag = gTypeInfoGetTag(ret2) + if tag == GITypeTag.INTERFACE: + let iface = gTypeInfoGetInterface(ret2) + if gBaseInfoGetType(iface) == GIInfoType.Object: + isGObject = true + (plist, arglist, replist) = genP(mInfo, true, info) + if (gFunctionInfoGetFlags(mInfo).int and GIFunctionInfoFlags.IS_CONSTRUCTOR.int) != 0: + if info != nil: + asym = asym.replace("new", "new" & manglename(gBaseInfoGetName(info))) + if fixedProcNames.contains(sym): + asym = fixedProcNames[sym] + for i in 0 .. 1: + var hhh = "\nproc " & asym & EM & plist + if i > 0: + let semi = if hhh.contains("()"): "" else: "; " + let p = hhh.find("): ") + hhh.setLen(p + 1) + hhh = hhh.replace("new", "init") + hhh = hhh.replace("*(", "*[T](result: var T" & semi) + methodBuffer.writeLine(hhh & " =") + if i > 0: + methodBuffer.writeLine(" assert(result is $1)" % [manglename(gBaseInfoGetName(info))]) + assert(replist.len == 0) + for k, v in replist: + let kk = if k[0] == '`': k[1 .. ^2] else: k + methodBuffer.writeLine(" var $1_00 = $2($3)" % [kk, v, k]) + if isGObject: + methodBuffer.writeLine(" new(result, finalizeGObject)") + else: + methodBuffer.writeLine(" new(result)") + methodBuffer.writeLine(" result.impl = " & sym & arglist) + for k, v in replist: + let kk = if k[0] == '`': k[1 .. ^2] else: k + methodBuffer.writeLine(" $1 = $2($3_00)" % [k, ct3nt(v), kk]) + if isGObject: + methodBuffer.writeLine(" GC_ref(result)") + methodBuffer.writeLine(" discard g_object_ref_sink(result.impl)") + methodBuffer.writeLine(" g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[]))") + methodBuffer.writeLine(" g_object_unref(result.impl)") + methodBuffer.writeLine(" assert(g_object_get_qdata(result.impl, Quark) == nil)") + methodBuffer.writeLine(" g_object_set_qdata(result.impl, Quark, addr(result[]))") + elif isProxyCandidate(ret2): + if info != nil: + asym = asym.replace("new", "new" & manglename(gBaseInfoGetName(info))) + methodBuffer.writeLine("\nproc " & asym & EM & plist & " =") + for k, v in replist: + let kk = if k[0] == '`': k[1 .. ^2] else: k + methodBuffer.writeLine(" var $1_00 = $2($3)" % [kk, v, k]) + if isGObject: + methodBuffer.writeLine(" let gobj = " & sym & arglist) + methodBuffer.writeLine(" if g_object_get_qdata(gobj, Quark) != nil:") + methodBuffer.writeLine(" result = cast[$1](g_object_get_qdata(gobj, Quark))" % [genRec(ret2, true)]) + methodBuffer.writeLine(" assert(result.impl == gobj)") + methodBuffer.writeLine(" else:") # I guess this will never get called... + if sym == "g_object_ref" or sym == "g_object_ref_sink": + methodBuffer.writeLine(" assert(false)") + else: + methodBuffer.writeLine(" new(result, finalizeGObject)") + methodBuffer.writeLine(" result.impl = gobj") + methodBuffer.writeLine(" GC_ref(result)") + methodBuffer.writeLine(" discard g_object_ref_sink(result.impl)") + methodBuffer.writeLine(" g_object_add_toggle_ref(result.impl, toggleNotify, addr(result[]))") + methodBuffer.writeLine(" g_object_unref(result.impl)") + methodBuffer.writeLine(" assert(g_object_get_qdata(result.impl, Quark) == nil)") + methodBuffer.writeLine(" g_object_set_qdata(result.impl, Quark, addr(result[]))") + else: + methodBuffer.writeLine(" new(result)") + methodBuffer.writeLine(" result.impl = " & sym & arglist) + for k, v in replist: + let kk = if k[0] == '`': k[1 .. ^2] else: k + methodBuffer.writeLine(" $1 = $2($3_00)" % [k, ct3nt(v), kk]) + else: + if asym == "newFromStreamAsync" and sym.contains("gdk_pixbuf_animation_new"): + asym = "newAnimationFromStreamAsync" + methodBuffer.writeLine("\nproc " & asym & EM & plist & " =") + for k, v in replist: + let kk = if k[0] == '`': k[1 .. ^2] else: k + methodBuffer.writeLine(" var $1_00 = $2($3)" % [kk, v, k]) + if isString(ret2): + methodBuffer.write(" let resul0 = ") + methodBuffer.writeLine(sym & arglist) + methodBuffer.writeLine(" result = $resul0") + assert(gCallableInfoGetCallerOwns(minfo) in {GITransfer.EVERYTHING, GITransfer.NOTHING}) + if gCallableInfoGetCallerOwns(minfo) == GITransfer.EVERYTHING: + methodBuffer.writeLine(" cogfree(resul0)") + elif replist.len > 0 and genRec(ret2) != "void": + methodBuffer.write(" result = ") + if ct2nt.contains(genRec(ret2)): + methodBuffer.writeLine(ct3nt(genRec(ret2)) & '(' & sym & arglist & ')') + else: + methodBuffer.writeLine(sym & arglist) + elif ct2nt.contains(genRec(ret2)): + methodBuffer.writeLine(" " & ct3nt(genRec(ret2)) & '(' & sym & arglist & ')') + else: + methodBuffer.writeLine(" " & sym & arglist) + for k, v in replist: + let kk = if k[0] == '`': k[1 .. ^2] else: k + methodBuffer.writeLine(" $1 = $2($3_00)" % [k, ct3nt(v), kk]) + else: + (plist, arglist, replist) = genP(mInfo, genProxy, info) + if asym != "errorQuark" and asym != "getPlugin" and asym != "quark": + methodBuffer.write("\nproc " & asym & EM & plist) + methodBuffer.writeLine(" {.\n importc: \"", sym, "\", ", libprag, ".}") + if sym == "gtk_window_set_default_size": + methodBuffer.writeLine("\nproc `defaultSize=`*(self: Window; dim: tuple[width: int; height: int]) =") + methodBuffer.writeLine(" gtk_window_set_default_size(cast[ptr Window00](self.impl), int32(dim[0]), int32(dim[1]))") + + except UndefEx: + echo "delay ", sym + delayedMethods.add((info, minfo)) + methodBuffer.cut(p) + +proc writeUnion(info: GIUnionInfo) = + if not suppressType: + output.writeLine("type") + output.writeLine(" ", mangleName(gBaseInfoGetName(info)) & "00" & EM, " = object {.union.}") + let n = info.gUnionInfoGetNFields() + for j in 0 .. int: + result = cmp(x.v, y.v) + if result == 0: + result = cmp(x.n, y.n) + for j in 0 .. s.high: + if s[j].v < 0: flags = false + if j == 0 and s[j].v == 0: continue + if bitops.popCount(s[j].v) != 1: flags = false + if s.len <= 1: flags = false + var tname = mangleName(gBaseInfoGetName(info)) + if flags: tname = tname[0 .. ^6] + if flags: + output.writeLine(" ", tname & "Flag" & EM, " {.size: sizeof(cint), pure.} = enum") + else: + output.writeLine(" ", tname & EM, " {.size: sizeof(cint), pure.} = enum") + var k: T + for j in 0 .. s.high: + let i = s[j] + var val = i.v + if flags and j == 0 and val == 0: continue + if j > 0 and i.v == k.v: + if i.n != k.n: + alias.add(" " & tname & i.n.capitalizeAscii & EM & " = " & tname & '.' & k.n) + continue + if flags: val = firstSetBit(val) + output.writeLine(" ", i.n, " = ", val) + k = i + if alias.len > 0: + output.writeLine("\nconst") + for i in alias: + output.writeLine(i) + if flags: + output.writeLine("\n ", tname & "Flags" & EM, " {.size: sizeof(cint).} = set[$1Flag]" % [tname]) + let nMethods = gEnumInfoGetNMethods(info) + ###assert(nMethods <= 0) + for j in 0 .. 0: + renumber(name, cnt) + else: + name.add(EM) + let t = gFieldInfoGetType(field) + let h = genRec(t) + if j == 0 and parent != nil: + continue + output.writeLine(" ", name, ": ", h) + if mangleName(gBaseInfoGetName(info)) == "Object" and moduleNamespace == "gobject": + + output.writeLine("type") + output.writeLine(" GToggleNotify* = proc (data: pointer; obj: ptr Object00; isLastRef: gboolean) {.cdecl.}\n") + output.writeLine("proc g_object_add_toggle_ref*(obj: ptr Object00; notify: GToggleNotify; data: pointer) {.") + output.writeLine(" importc: \"g_object_add_toggle_ref\", libprag.}") + output.writeLine("proc g_object_remove_toggle_ref*(obj: ptr Object00; notify: GToggleNotify; data: pointer) {.") + output.writeLine(" importc: \"g_object_remove_toggle_ref\", libprag.}") + output.writeLine("\nproc g_object_set_qdata*(self: ptr Object00; quark: uint32; p: pointer) {.") + output.writeLine(" importc: \"g_object_set_qdata\", libprag.}") + output.writeLine("proc toggleNotify*(data: pointer; obj: ptr Object00; isLastRef: gboolean) {.cdecl.} =") + output.writeLine(" if isLastRef.int == 0:") + output.writeLine(" GC_ref(cast[RootRef](data))") + output.writeLine(" echo \"GC_ref(cast[RootRef](data)\"") + output.writeLine(" else:") + output.writeLine(" GC_unref(cast[RootRef](data))") + output.writeLine(" echo \"GC_unref(cast[RootRef](data)\"") + output.writeLine(" echo \"toggleNotify\"") + output.writeLine(" echo obj.ref_count") + methodBuffer.writeLine("\nproc finalizeGObject*[T](o: T) =") + methodBuffer.writeLine(" echo(\"finalizeGObject\")") + methodBuffer.writeLine(" g_object_remove_toggle_ref(o.impl, toggleNotify, addr(o[]))") + + let numsig = info.gObjectInfoGetNSignals + if numsig > 0: output.writeLine("") + for j in 0 .. 0: + h = h.replace(")", "; xdata: pointer)") + else: + h = h.replace(")", "xdata: pointer)") + var xxx = mangleName(gBaseInfoGetName(info)) + output.write("proc " & mangleName("sc_" & $gBaseInfoGetName(signalInfo)) & EM & "(self: " & xxx & "; ") + output.writeLine(" p: proc (self: ptr gobject.Object00; " & h & " {.cdecl.}, xdata: pointer = nil) =") + output.write(" discard g_signal_connect_data(self.impl, \"") + output.write($gBaseInfoGetName(signalInfo)) + output.writeLine("\", cast[GCallback](p), xdata, nil, cast[ConnectFlags](0))") + let nMethods = gObjectInfoGetNMethods(info) + for j in 0 .. 1: + if s.len == 2: + if h == s[0]: + tg = "U" + elif h == s[1]: + discard + else: + assert(false) + elif s.len == 3: # eth and thorn + if h == s[0]: + tg = "X" + elif h == s[2]: + discard + elif h == s[1]: + tg = "U" + else: + assert(false) + output.writeLine("const ", tg, h & EM, " = ", str) + else: + output.writeLine("const ", mangleName(h) & EM, " = ", str) + +proc processInfo(i: GIBaseInfo) = + if not isFunctionInfo(i): + output.write("\n") + if isCallableInfo(i): + if isFunctionInfo(i): + let s = $gFunctionInfoGetSymbol(i) + if s[^1] != '_' and not processedFunctions.contains(s) and not s.contains("__") and s != "g_type_add_interface_dynamic" and + s != "g_type_get_plugin" and s != "g_type_register_dynamic": + writeMethod(nil, i) + else: + assert(isCallbackInfo(i)) + if not suppressType: + output.write("type\n") + output.writeLine(" ", mangleName(gBaseInfoGetName(i)) & "* = proc " & genP(i)[0] & " {.cdecl.}") + elif gBaseInfoGetType(i) == GIInfoType.OBJECT: + writeObj(i) + elif gBaseInfoGetType(i) == GIInfoType.UNION: + writeUnion(i) + elif gBaseInfoGetType(i) == GIInfoType.INTERFACE: + let h = gInterfaceInfoGetIfaceStruct(i) + if h != nil: + writeInterface(i) + elif gBaseInfoGetType(i) == GIInfoType.STRUCT: + writeStruct(i) + elif isEnumInfo(i): + writeEnum(i) + elif gBaseInfoGetType(i) == GIInfoType.CONSTANT: + writeConst(i) + else: assert(false) + +const GIO_EPI = """ + +proc run*(self: Application): int = + int(g_application_run(cast[ptr Application00](self.impl), 0, nil)) +""" + +const GTK_EPI = """ + +proc init* = + var argc: int32 = 0 + var argv: cstringArray = nil + gtk_init(argc, argv) + +import macros, strutils + +var ProcID: int + +macro mconnect(widget: gobject.Object; signal: string; p: untyped; arg: typed; widgett: typedesc; argt: typedesc): typed = + inc(ProcID) + let wt = getType(widgett)[1] # widget type + let at = getType(argt)[1] # argument type + let signalName = ($signal).replace("-", "_") # maybe we should just use plain proc names + let procNameCdecl = newIdentNode("connect_for_signal_cdecl_" & signalName & $ProcID) + let procName = newIdentNode("connect_for_signal_" & signalName & $ProcID) + let scName = newIdentNode("sc" & signalName) + result = quote do: + proc `procNameCdecl`(w: ptr gobject.Object00 , data: pointer) {.cdecl.} = + var h: pointer = g_object_get_qdata(w, Quark) + `p`(cast[`wt`](h), cast[`at`](data)) + + proc `procName`(self: `wt`; p: proc (self: `wt`, arg: `at`); a: `at`) = + when a is RootRef: + GC_ref(a) + `scName`(self, `procNameCdecl`, cast[pointer](a)) + else: + var ar: ref `at` + new(ar) + deepCopy(ar[], a) + GC_ref(ar) + `scName`(self, `procNameCdecl`, cast[pointer](ar[])) + `procName`(`widget`, `p`, `arg`) + +template connect*(widget: gobject.Object; signal: string; p: untyped; arg: typed) = + mconnect(widget, signal, p, arg, type(widget), type(arg)) + +macro mconnect(widget: gobject.Object; signal: string; p: untyped; widgett: typedesc): typed = + inc(ProcID) + let wt = getType(widgett)[1] + let signalName = ($signal).replace("-", "_") + let procNameCdecl = newIdentNode("connect_for_signal_cdecl_" & signalName & $ProcID) + let procName = newIdentNode("connect_for_signal_" & signalName & $ProcID) + let scName = newIdentNode("sc" & signalName) + result = quote do: + proc `procNameCdecl`(w: ptr gobject.Object00 , data: pointer) {.cdecl.} = + var h: pointer = g_object_get_qdata(w, Quark) + `p`(cast[`wt`](h)) + + proc `procName`(self: `wt`; p: proc (self: `wt`)) = + `scName`(self, `procNameCdecl`, nil) + `procName`(`widget`, `p`) + +template connect*(widget: gobject.Object; signal: string; p: untyped) = + mconnect(widget, signal, p, type(widget)) + +""" +proc main(namespace: string) = + priList = newSeq[string]() + suppressType = false + suppressRaise = false + delayedMethods = newSeq[(GIBaseInfo, GIFunctionInfo)]() + classList = newSeq[GIBaseInfo]() + output = newStringStream() + methodBuffer = newStringStream() + var error: GError + ct = initCountTable[string]() + var delayedSyms = newSeq[GIBaseInfo]() + allSyms = initSet[string]() + var ig = initSet[string]() + knownSyms = initSet[string]() + let gi = gIrepositoryGetDefault() + assert(gi != nil) + moduleNamespace = namespace.toLowerAscii + let version: cstring = nil # latest + let typelib = gi.gIrepositoryRequire(namespace, version, cast[GIRepositoryLoadFlags](0), error) + if typelib.isNil: + echo error.message + let dep: cstringArray = gi.gIrepositoryGetDependencies(namespace) + output.writeLine("# dependencies:") + var importedModules = "" + for j in 0 .. 9: + if dep[j].isNil: break + if j == 0: + importedModules = "import " + output.writeLine("# ", dep[j]) + importedModules.add(($dep[j]).split('-',2)[0].toLowerAscii & ", ") + importedModules.removeSuffix(", ") + strfreev(dep) + let idep: cstringArray = gi.gIrepositoryGetImmediateDependencies(namespace) + output.writeLine("# immediate dependencies:") + for j in 0 .. 9: + if idep[j].isNil: break + output.writeLine("# ", idep[j]) + strfreev(idep) + let libs = gi.gIrepositoryGetSharedLibrary(namespace) + + output.writeLine("# libraries:") + output.writeLine("# ", libs) + output.writeLine("{.deadCodeElim: on.}") + output.writeLine(importedModules) + let Lib = if libs.isNil: "" else: ($libs).split(',', 2)[0] + output.writeLine("const Lib* = \"$1\"" % Lib) + output.writeLine("{.pragma: libprag, cdecl, dynlib: Lib.}") + if namespace == "GObject": # declare array types to make it compile -- procs using these will need special care! + output.writeLine("type\n GCallback* = proc () {.cdecl.}") + output.writeLine("type\n Parameter00Array* = pointer") + output.writeLine("type\n Object00Array* = pointer") + output.writeLine("type\n Value00Array* = pointer") + output.writeLine("type\n GTypeArray* = pointer") + output.writeLine("type\n ParamSpec00Array* = pointer") + output.writeLine("type\n TypePlugin00Array* = pointer") + output.writeLine("type\n uint32Array* = pointer") + output.writeLine("type\n VaClosureMarshal* = pointer") + output.writeLine("type\n TypePlugin00* = object") + elif namespace == "GLib": + output.writeLine("type\n GError* = pointer") + output.writeLine("type\n OptionEntry00Array* = pointer") + output.writeLine("type\n int8Array* = pointer") + output.writeLine("type\n uintArray* = pointer") + output.writeLine("type\n gbooleanArray* = pointer") + output.writeLine("type\n cdoubleArray* = pointer") + output.writeLine("type\n int32Array* = pointer") + output.writeLine("type\n PollFD00Array* = pointer") + output.writeLine("type\n Variant00Array* = pointer") + output.writeLine("type\n LogField00Array* = pointer") + output.writeLine("type\n VariantType00Array* = pointer") + output.writeLine("type\n DebugKey00Array* = pointer") + output.writeLine("type\n utf8Array* = pointer") + output.writeLine("type\n uint8Array* = pointer") + output.writeLine("type\n ucstringArray* = pointer") + output.writeLine("type\n ucstring* = distinct cstring") + output.writeLine("type\n gboolean* = distinct cint") + output.writeLine("type\n GType* = distinct cint") + output.writeLine("type\n gunichar* = uint32") + output.writeLine("type\n utf8* = char") + output.writeLine("const GFalse = gboolean(0)") + output.writeLine("const GTrue = gboolean(1)") + output.writeLine("proc cogfree*(mem: pointer) {.importc: \"g_free\", libprag.}") + output.writeLine("proc toBool*(g: gboolean): bool = g.int != 0") + elif namespace == "Gdk": + output.writeLine("type\n AtomArray* = pointer") + output.writeLine("type\n KeymapKey00Array* = pointer") + output.writeLine("type\n VisualTypeArray* = pointer") # enums! + output.writeLine("type\n RGBAArray* = pointer") + output.writeLine("type\n ColorArray* = pointer") + output.writeLine("type\n Point00Array* = pointer") + elif namespace == "Gtk": + output.writeLine("type\n TargetEntry00Array* = pointer") + output.writeLine("type\n AccelGroupEntry00Array* = pointer") + output.writeLine("type\n BindingArg00Array* = pointer") + output.writeLine("type\n StockItemArray* = pointer") + output.writeLine("type\n PageRange00Array* = pointer") + output.writeLine("type\n PadActionEntry00Array* = pointer") + output.writeLine("type\n Array* = pointer") + elif namespace == "Atk": + output.writeLine("type\n StateTypeArray* = pointer") # enums! + output.writeLine("type\n TextRange00Array* = pointer") + output.writeLine("type\n PtrArray* = pointer") + elif namespace == "Pango": + output.writeLine("type\n GlyphInfo00Array* = pointer") + output.writeLine("type\n LogAttr00Array* = pointer") + output.writeLine("type\n FontDescription00Array* = pointer") + output.writeLine("type\n FontFamily00Array* = pointer") + output.writeLine("type\n FontFace00Array* = pointer") + output.writeLine("type\n ScriptArray* = pointer") # array of enums! + elif namespace == "Gio": + output.writeLine("type\n ActionEntry00Array* = pointer") + output.writeLine("type\n DBusAnnotationInfo00Array* = pointer") + output.writeLine("type\n DBusArgInfo00Array* = pointer") + output.writeLine("type\n DBusMethodInfo00Array* = pointer") + output.writeLine("type\n DBusSignalInfo00Array* = pointer") + output.writeLine("type\n DBusPropertyInfo00Array* = pointer") + output.writeLine("type\n DBusInterfaceInfo00Array* = pointer") + output.writeLine("type\n DBusNodeInfo00Array* = pointer") + output.writeLine("type\n InputVector00Array* = pointer") + output.writeLine("type\n SocketControlMessage00Array* = pointer") + output.writeLine("type\n InputMessage00Array* = pointer") + output.writeLine("type\n OutputMessage00Array* = pointer") + output.writeLine("type\n utf8ArrayArray* = pointer") + output.writeLine("type\n cstringArrayArray* = pointer") + output.writeLine("type\n File00Array* = pointer") + output.writeLine("type\n Array* = pointer") + output.writeLine("type\n OutputVector00Array* = pointer") + + if namespace == "GObject": + output.writeLine("\nimport times") + output.writeLine("var qt = \"NGIQ\" & $epochTime()") + output.writeLine("if g_quark_try_string(qt) != 0:") + output.writeLine(" qt = \"NGIQ\" & $epochTime()") + output.writeLine("let Quark* = g_quark_from_static_string(qt)") + var n = gi.gIrepositoryGetNInfos(namespace) + var s = newSeq[GIBaseInfo]() + for i in 0 ..< n: + if not droppedSyms.contains(mangleName(gBaseInfoGetName(gi.gIrepositoryGetInfo(namespace, i)))): + s.add(gi.gIrepositoryGetInfo(namespace, i)) + for i in s: + if gBaseInfoGetType(i) == GIInfoType.OBJECT or gBaseInfoGetType(i) == GIInfoType.INTERFACE or gBaseInfoGetType(i) == GIInfoType.STRUCT or gBaseInfoGetType(i) == GIInfoType.UNION or isEnumInfo(i) or isCallbackInfo(i): + allSyms.incl(mangleName(gBaseInfoGetName(i))) + if namespace == "Gdk": # special care for gdk keys due to nim's style insensitivity! + for i in s: + var h = $gBaseInfoGetName(i) + if h.startsWith("KEY_"): + if gdkKeys.contains(h.toLowerAscii): + gdkKeys.mget(h.toLowerAscii).add(h) + else: + gdkKeys.add(h.toLowerAscii, @[h]) + for el in mvalues(gdkKeys): + sort(el, system.cmp) + var i: GIBaseInfo + var unp = newSeq[GIBaseInfo]() + reverse(s) + while s.len > 0: + if namespace == "GObject" and not knownSyms.contains("g_signal_connect_data"): + if knownSyms.contains("ClosureNotify") and knownSyms.contains("ConnectFlags"): + knownSyms.incl("g_signal_connect_data") + output.writeLine("proc g_signal_connect_data*(instance: pointer; detailedSignal: cstring; cHandler: GCallback;") + output.writeLine(" data: pointer; destroyData: ClosureNotify; connectFlags: ConnectFlags): culong {.") + output.writeLine(" importc: \"g_signal_connect_data\", libprag.}") + while priList.len > 0: # move missing symbols to top, but only once! + let h = priList.pop + if ig.contains(h): continue + ig.incl(h) + echo h + var k = -1 + for p, el in s: + if (gBaseInfoGetType(el) == GIInfoType.OBJECT or gBaseInfoGetType(el) == GIInfoType.INTERFACE or gBaseInfoGetType(el) == GIInfoType.STRUCT or isEnumInfo(el)) and gBaseInfoGetName(el) == h: + k = p + if k >= 0: + echo "moved" + s.add(s[k]) + s.delete(k) + + i = s.pop + delayedSyms.insert(i) + if classList.len > 0: + delayedSyms.insert(classList.pop) + unp.setLen(0) + for k in delayedSyms: + var pos = output.getPosition + try: + knownSyms.incl(mangleName(gBaseInfoGetName(k))) + methodBuffer = newStringStream() + processInfo(k) + output.write(methodBuffer.data) + echo "----------", gBaseInfoGetName(k) + except UndefEx: + unp.add(k) + knownSyms.excl(mangleName(gBaseInfoGetName(k))) + output.cut(pos) + delayedSyms = unp + block myb: + for a in 1 .. 2: # process clustered symbols into one single type section + if delayedSyms.len > a: + suppressType = true + methodBuffer = newStringStream() + unp = delayedSyms + for t in unp.combinations(a + 1): + var pos = output.getPosition + methodBuffer = newStringStream() + let x = delayedMethods.len + try: + var h = false + for k in t: + if gBaseInfoGetType(k) != GIInfoType.OBJECT and gBaseInfoGetType(k) != GIInfoType.STRUCT and gBaseInfoGetType(k) != GIInfoType.UNION and not isCallbackInfo(k): + h = true + if h: continue + output.writeLine("type") + for k in t: + knownSyms.incl(mangleName(gBaseInfoGetName(k))) + for k in t: + processInfo(k) + for k in t: + delayedSyms.keepItIf(mangleName(gBaseInfoGetName(k)) != mangleName(gBaseInfoGetName(it))) + suppressType = false + output.write(methodBuffer.data) + break myb + except UndefEx: + for k in t: + knownSyms.excl(mangleName(gBaseInfoGetName(k))) + output.setPosition(pos) + delayedMethods.setLen(x) + suppressType = false + + methodBuffer = newStringStream() + var h = delayedMethods + #delayedMethods.setLen(0) + delayedMethods = newSeq[(GIBaseInfo, GIFunctionInfo)]() + for el in h: + writeMethod(el[0], el[1]) + output.write(methodBuffer.data) + + suppressRaise = true + output.writeLine("# === remaining symbols:") # in best case there is nothing left + for i in delayedSyms: + processInfo(i) + + if namespace == "Gtk": + output.write(GTK_EPI) + + if namespace == "Gio": + output.write(GIO_EPI) + + output.flush + var o = open("nim_gi" / (namespace.toLowerAscii) & ".nim", fmWrite) + o.write(output.data) + o.close() + output.close + echo "Remaining delayed methods: ", delayedMethods.len + for el in delayedMethods: + echo gBaseInfoGetName(el[1]) + +# when isMainModule: +main("GLib") +main("GObject") +main("GModule") +main("xlib") +main("Gio") +main("Atk") +main("Pango") +main("cairo") +main("GdkPixbuf") +main("Rsvg") +main("Gdk") +main("Gtk") + +#for i in callerAllocCollector: echo i