cvs: php-gtk / Makefile.in TODO buildconf config.m4 php_gtk.m4 /build2 build.mk build2.mk config-stubs genext.sh print_include.awk /ext .cvsignore
Makefile.in /ext/gtk+ .cvsignore Makefile.in config.m4 gdk.defs gdk.overrides gtk-extrafuncs.defs gtk.defs gtk.overrides php_gtk+.c php_gtk+.h
php_gtk+_types.c /ext/libglade .cvsignore Makefile.in config.m4 libglade.defs libglade.overrides php_libglade.c php_libglade.h /generator
generator.php scheme.php templates.php /src .cvsignore Makefile.in php_gtk.c php_gtk.h php_gtk_ext.c.in php_gtk_module.h php_gtk_object.c
php_gtk_types.c php_gtk_util.c
| From: | Andrei Zmievski | Date: | Tue, 10 Jul 2001 18:27:53 +0000 |
| Subject: | cvs: php-gtk / Makefile.in TODO buildconf config.m4 php_gtk.m4 /build2 build.mk build2.mk config-stubs genext.sh print_include.awk /ext .cvsignore Makefile.in /ext/gtk+ .cvsignore Makefile.in config.m4 gdk.defs gdk.overrides gtk-extrafuncs.defs gtk.defs gtk.overrides php_gtk+.c php_gtk+.h php_gtk+_types.c /ext/libglade .cvsignore Makefile.in config.m4 libglade.defs libglade.overrides php_libglade.c php_libglade.h /generator generator.php scheme.php templates.php /src .cvsignore Makefile.in php_gtk.c php_gtk.h php_gtk_ext.c.in php_gtk_module.h php_gtk_object.c php_gtk_types.c php_gtk_util.c |
||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-2103@lists.php.net to get a copy of this message | ||
andrei Tue Jul 10 14:27:53 2001 EDT
Added files:
/php-gtk/build2 build.mk build2.mk config-stubs genext.sh
print_include.awk
Removed files:
/php-gtk/src php_gtk_types.c
Modified files:
/php-gtk buildconf php_gtk.m4 Makefile.in TODO config.m4
/php-gtk/ext .cvsignore Makefile.in
/php-gtk/ext/gtk+ .cvsignore Makefile.in config.m4 gdk.defs
gdk.overrides gtk-extrafuncs.defs gtk.defs
gtk.overrides php_gtk+.c php_gtk+.h
php_gtk+_types.c
/php-gtk/ext/libglade .cvsignore Makefile.in config.m4
libglade.defs libglade.overrides
php_libglade.c php_libglade.h
/php-gtk/generator generator.php scheme.php templates.php
/php-gtk/src php_gtk_ext.c.in .cvsignore Makefile.in php_gtk.c
php_gtk.h php_gtk_module.h php_gtk_object.c
php_gtk_util.c
Log:
This implements a new build system for PHP-GTK. It is based on PHP build
system and is necessary in order to keep adding support for GtkObject
based extensions such as GtkHtml, Bonobo, GtkScintilla and others.
The only currently implemented extensions are Gtk+ and libglade. Each
extension (except for Gtk+, obviously) can be enabled or disabled
from the 'configure' command-line.
The new build process for CVS versions of PHP-GTK is such:
./buildconf
./configure
make
Index: php-gtk/buildconf diff -u /dev/null php-gtk/buildconf:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/buildconf Tue Jul 10 14:27:45 2001 @@ -0,0 +1,5 @@ +#!/bin/sh +# $Id: buildconf,v 1.2 2001/07/10 18:27:45 andrei Exp $ + +rm -f generated_lists +${MAKE:-make} -s -f build2/build.mk Index: php-gtk/php_gtk.m4 diff -u /dev/null php-gtk/php_gtk.m4:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/php_gtk.m4 Tue Jul 10 14:27:45 2001 @@ -0,0 +1,45 @@ +dnl +dnl PHP_GTK_EXTENSION(extname) +dnl +dnl Includes an extension in the build. +dnl +dnl "extname" is the name of the ext/ subdir where the extension resides +dnl +AC_DEFUN(PHP_GTK_EXTENSION,[ + PHP_GTK_EXT_SUBDIRS="$PHP_GTK_EXT_SUBDIRS $1" + + php_gtk_ext_builddir=ext/$1 + php_gtk_ext_srcdir=$abs_srcdir/ext/$1 + + LIB_BUILD($php_gtk_ext_builddir) + PHP_GTK_EXT_LTLIBS="$PHP_GTK_EXT_LTLIBS $php_gtk_ext_builddir/lib$1.la" + PHP_GTK_EXTENSIONS="$PHP_GTK_EXTENSIONS $1" + + PHP_FAST_OUTPUT($php_gtk_ext_builddir/Makefile) +]) + +PHP_SUBST(PHP_GTK_EXT_SUBDIRS) +PHP_SUBST(PHP_GTK_EXT_LTLIBS) +PHP_SUBST(PHP_GTK_EXTENSIONS) + +dnl +dnl PHP_GTK_ARG_ENABLE(arg-name, check message, help text[, default-val]) +dnl Sets PHP_GTK_ARG_NAME either to the user value or to the default value. +dnl default-val defaults to no. +dnl +AC_DEFUN(PHP_GTK_ARG_ENABLE,[ +PHP_GTK_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_GTK_[]translit($1,a-z-,A-Z_)) +]) + +AC_DEFUN(PHP_GTK_REAL_ARG_ENABLE,[ +AC_MSG_CHECKING($2) +AC_ARG_ENABLE($1,[$3],$5=[$]enableval,$5=ifelse($4,,no,$4)) +case [$]$5 in +no) + AC_MSG_RESULT(no) + ;; +*) + AC_MSG_RESULT(yes) + ;; +esac +]) Index: php-gtk/Makefile.in diff -u php-gtk/Makefile.in:1.1.1.1 php-gtk/Makefile.in:1.2 --- php-gtk/Makefile.in:1.1.1.1 Mon Jan 29 17:15:58 2001 +++ php-gtk/Makefile.in Tue Jul 10 14:27:44 2001 @@ -1,8 +1,9 @@ +SUBDIRS = ext main + LTLIBRARY_NAME = libphp_gtk.la LTLIBRARY_SHARED_NAME = php_gtk.la -LTLIBRARY_SHARED_LIBADD = $(PHP_GTK_SHARED_LIBADD) -LTLIBRARY_DEPENDENCIES = $(PHP_GTK_SOURCE_LIBADD) - -SUBDIRS = src +LTLIBRARY_DEPENDENCIES = $(PHP_GTK_EXT_LTLIBS) \ + main/libmain.la +LTLIBRARY_SHARED_LIBADD = $(LTLIBRARY_DEPENDENCIES) include $(top_srcdir)/build/dynlib.mk Index: php-gtk/TODO diff -u php-gtk/TODO:1.36 php-gtk/TODO:1.37 --- php-gtk/TODO:1.36 Fri May 4 16:09:11 2001 +++ php-gtk/TODO Tue Jul 10 14:27:44 2001 @@ -9,5 +9,8 @@ cascaded overloads, i.e. $style->base[GTK_STATE_NORMAL]->red = 55555. * Make <gdk/gdkkeysyms.h> available as constants and document them. +* Have a separate _init() function for each module(). Also have .ini setting + that automatically inits modules. + # vim: set tw=80 ai et sts=4: Index: php-gtk/config.m4 diff -u php-gtk/config.m4:1.3 php-gtk/config.m4:1.4 --- php-gtk/config.m4:1.3 Thu Mar 29 10:00:53 2001 +++ php-gtk/config.m4 Tue Jul 10 14:27:45 2001 @@ -1,292 +1,27 @@ -dnl $Id: config.m4,v 1.3 2001/03/29 15:00:53 andrei Exp $ -dnl config.m4 for extension gtk +dnl $Id: config.m4,v 1.4 2001/07/10 18:27:45 andrei Exp $ +dnl config.m4 for extension php-gtk -PHP_ARG_ENABLE(php-gtk, whether to enable PHP GTK+ support, - [ --enable-php-gtk Enable PHP GTK+ support]) - -dnl Configure paths for GTK+ (borrowed from gtk.m4) -dnl Owen Taylor 97-11-3 - -dnl PHP_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS -dnl -AC_DEFUN(PHP_PATH_GTK, -[dnl -dnl Get the cflags and libraries from the gtk-config script -dnl -AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], - gtk_config_prefix="$withval", gtk_config_prefix="") -AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], - gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") -AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], - , enable_gtktest=yes) - - for module in . $4 - do - case "$module" in - gthread) - gtk_config_args="$gtk_config_args gthread" - ;; - esac - done - - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi - fi - - AC_PATH_PROG(GTK_CONFIG, gtk-config, no) - min_gtk_version=ifelse([$1], ,0.99.7,$1) - AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) - no_gtk="" - if test "$GTK_CONFIG" = "no" ; then - no_gtk=yes - else - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` - gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_gtktest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$GTK_LIBS $LIBS" -dnl -dnl Now check if the installed GTK is sufficiently new. (Also sanity -dnl checks the results of gtk-config to some extent -dnl - rm -f conf.gtktest - AC_TRY_RUN([ -#include <gtk/gtk.h> -#include <stdio.h> -#include <stdlib.h> - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtktest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtk_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - if ((gtk_major_version != $gtk_config_major_version) || - (gtk_minor_version != $gtk_config_minor_version) || - (gtk_micro_version != $gtk_config_micro_version)) - { - printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", - $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If gtk-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); - printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) - else if ((gtk_major_version != GTK_MAJOR_VERSION) || - (gtk_minor_version != GTK_MINOR_VERSION) || - (gtk_micro_version != GTK_MICRO_VERSION)) - { - printf("*** GTK+ header files (version %d.%d.%d) do not match\n", - GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - } -#endif /* defined (GTK_MAJOR_VERSION) ... */ - else - { - if ((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); - printf("*** correct copy of gtk-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtk" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GTK_CONFIG" = "no" ; then - echo "*** The gtk-config script installed by GTK could not be found" - echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." - else - if test -f conf.gtktest ; then - : - else - echo "*** Could not run GTK test program, checking why..." - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" - AC_TRY_LINK([ -#include <gtk/gtk.h> -#include <stdio.h> -], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK or finding the wrong" - echo "*** version of GTK. If it is not finding GTK, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK was incorrectly installed" - echo "*** or that you have moved GTK since it was installed. In the latter case, you" - echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK_CFLAGS="" - GTK_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) - rm -f conf.gtktest -]) - -dnl PHP_PATH_LIBGLADE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]) -dnl Test to see if libglade is installed, and define LIBGLADE_CFLAGS, LIBS -dnl -AC_DEFUN(PHP_PATH_LIBGLADE, -[dnl -dnl Get the cflags and libraries from the libglade-config script -dnl -AC_ARG_WITH(libglade-config, -[ --with-libglade-config=LIBGLADE_CONFIG Location of libglade-config], -LIBGLADE_CONFIG="$withval") - -module_args= -for module in . $3; do - case "$module" in - gnome) - module_args="$module_args gnome" - ;; - bonobo) - module_args="$module_args bonobo" - ;; - esac -done - -AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no) -AC_MSG_CHECKING(for libglade) -if test "$LIBGLADE_CONFIG" = "no"; then - AC_MSG_RESULT(no) - ifelse([$2], , :, [$2]) -else - if $LIBGLADE_CONFIG --check $module_args; then - LIBGLADE_CFLAGS=`$LIBGLADE_CONFIG --cflags $module_args` - LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs $module_args` - AC_MSG_RESULT(yes) - ifelse([$1], , :, [$1]) - else - echo "*** libglade was not compiled with support for $module_args" 1>&2 - AC_MSG_RESULT(no) - ifelse([$2], , :, [$2]) - fi -fi -AC_SUBST(LIBGLADE_CFLAGS) -AC_SUBST(LIBGLADE_LIBS) -]) +PHP_ARG_ENABLE(php-gtk,for PHP-GTK support, +[ --enable-php-gtk Enable PHP-GTK support]) if test "$PHP_PHP_GTK" != "no"; then - PHP_EXTENSION(php-gtk, $ext_shared) - - PHP_GTK_SOURCE_LIBADD=src/libphp_gtk_src.la - PHP_GTK_SHARED_LIBADD=$PHP_GTK_SOURCE_LIBADD + AC_PROG_AWK + PHP_SUBST(AWK) - PHP_PATH_GTK(1.2.6,PHP_GTK_MODULES="gtk gdk") - PHP_PATH_LIBGLADE(build_libglade=yes,build_libglade=no) + sinclude(php_gtk.m4) - if test "$build_libglade" = "yes"; then - PHP_GTK_MODULES="$PHP_GTK_MODULES libglade" - AC_DEFINE(HAVE_LIBGLADE, 1, [If libglade support to be compiled in]) - fi + BSD_MAKEFILE=no + case $host_alias in + *bsdi*) + BSD_MAKEFILE=yes;; + esac - for arg in $GTK_CFLAGS $LIBGLADE_CFLAGS; do - case $arg in - -I*) - n=`echo $ac_n $arg$ac_c|sed s/-I//` - PHP_ADD_INCLUDE($n) - ;; - esac - done - for arg in $GTK_LIBS $LIBGLADE_LIBS; do - case "$arg" in - -l*) - n=`echo $ac_n $arg$ac_c|sed s/-l//` - PHP_ADD_LIBRARY($n,, PHP_GTK_SHARED_LIBADD) - ;; - -L*) - n=`echo $ac_n $arg$ac_c|sed s/-L//` - PHP_ADD_LIBPATH($n, PHP_GTK_SHARED_LIBADD) - ;; - esac - done + # reading config stubs + esyscmd(./build2/config-stubs ext) - for arg in $PHP_GTK_MODULES; do - PHP_GTK_GEN_SOURCES="$PHP_GTK_GEN_SOURCES php_gtk_gen_$arg.c" - done - PHP_SUBST(PHP_GTK_SHARED_LIBADD) - PHP_SUBST(PHP_GTK_SOURCE_LIBADD) - PHP_SUBST(PHP_GTK_MODULES) - PHP_SUBST(PHP_GTK_GEN_SOURCES) + INCLUDES="$INCLUDES -I\$(top_srcdir)/main" - AC_DEFINE(HAVE_PHP_GTK, 1, [If you want PHP GTK+ support enabled]) - PHP_FAST_OUTPUT($ext_builddir/src/Makefile) - LIB_BUILD($ext_builddir/src,$ext_shared,yes) + PHP_EXTENSION(php-gtk, $ext_shared) + AC_DEFINE(HAVE_PHP_GTK, 1, [If PHP-GTK support is enabled]) + PHP_FAST_OUTPUT(main/Makefile ext/Makefile) fi Index: php-gtk/ext/.cvsignore diff -u /dev/null php-gtk/ext/.cvsignore:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/.cvsignore Tue Jul 10 14:27:47 2001 @@ -0,0 +1,2 @@ +Makefile +.deps Index: php-gtk/ext/Makefile.in diff -u /dev/null php-gtk/ext/Makefile.in:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/Makefile.in Tue Jul 10 14:27:47 2001 @@ -0,0 +1,3 @@ +SUBDIRS = $(PHP_GTK_EXT_SUBDIRS) + +include $(top_srcdir)/build/rules.mk Index: php-gtk/ext/gtk+/.cvsignore diff -u /dev/null php-gtk/ext/gtk+/.cvsignore:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/gtk+/.cvsignore Tue Jul 10 14:27:47 2001 @@ -0,0 +1,7 @@ +.deps +Makefile +*.lo +*.la +.libs +libs.mk +gen_* Index: php-gtk/ext/gtk+/Makefile.in diff -u /dev/null php-gtk/ext/gtk+/Makefile.in:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/gtk+/Makefile.in Tue Jul 10 14:27:47 2001 @@ -0,0 +1,19 @@ +LTLIBRARY_NAME = libgtk+.la +LTLIBRARY_SOURCES = php_gtk+.c php_gtk+_types.c gen_gtk.c gen_gdk.c +LTLIBRARY_LIBADD = $(GTK_PLUS_SHARED_LIBADD) +LTLIBRARY_SHARED_NAME = gtk+.la +LTLIBRARY_SHARED_LIBADD = $(GTK_PLUS_SHARED_LIBADD) + +include $(top_srcdir)/build/dynlib.mk + +php_gtk+.o php_gtk+.lo php_gtk+.slo: gen_ce_gtk.h + +gen_gtk.c: gtk.defs gtk-extrafuncs.defs gtk.overrides + php -q $(top_srcdir)/generator/generator.php -o ext/gtk%2b/gtk.overrides -p gtk ext/gtk%2b/gtk.defs > gen_gtk.c + +gen_gdk.c: gdk.defs gdk.overrides + php -q $(top_srcdir)/generator/generator.php -o ext/gtk%2b/gdk.overrides -p gdk ext/gtk%2b/gdk.defs > gen_gdk.c + +gen_ce_gtk.h: gen_gtk.c gen_gdk.c + grep -h "^PHP_GTK_EXPORT_CE" gen_gtk.c gen_gdk.c | sed -e "s!^!extern !" > gen_ce_gtk.h + Index: php-gtk/ext/gtk+/config.m4 diff -u /dev/null php-gtk/ext/gtk+/config.m4:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/gtk+/config.m4 Tue Jul 10 14:27:47 2001 @@ -0,0 +1,201 @@ +dnl $Id: config.m4,v 1.2 2001/07/10 18:27:47 andrei Exp $ +dnl config.m4 for gtk+ module + +dnl PHP_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS +dnl +AC_DEFUN(PHP_PATH_GTK, +[dnl +dnl Get the cflags and libraries from the gtk-config script +dnl +AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], + gtk_config_prefix="$withval", gtk_config_prefix="") +AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], + gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") +AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], + , enable_gtktest=yes) + + for module in . $4 + do + case "$module" in + gthread) + gtk_config_args="$gtk_config_args gthread" + ;; + esac + done + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + AC_PATH_PROG(GTK_CONFIG, gtk-config, no) + min_gtk_version=ifelse([$1], ,0.99.7,$1) + AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" +dnl +dnl Now check if the installed GTK is sufficiently new. (Also sanity +dnl checks the results of gtk-config to some extent +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include <gtk/gtk.h> +#include <stdio.h> +#include <stdlib.h> + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } +#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } +#endif /* defined (GTK_MAJOR_VERSION) ... */ + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include <gtk/gtk.h> +#include <stdio.h> +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) + +PHP_PATH_GTK(1.2.6) +PHP_EVAL_INCLINE($GTK_CFLAGS) +PHP_EVAL_LIBLINE($GTK_LIBS, GTK_PLUS_SHARED_LIBADD) +PHP_SUBST(GTK_PLUS_SHARED_LIBADD) +PHP_SUBST(GTK_PLUS_GEN_SOURCES) +PHP_GTK_EXTENSION(gtk+) Index: php-gtk/ext/gtk+/gdk.defs diff -u /dev/null php-gtk/ext/gtk+/gdk.defs:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gdk.defs Tue Jul 10 14:27:48 2001 @@ -0,0 +1,1072 @@ +;; -*- scheme -*- +;; Enumerations and flags ... + +(flags ColorInfoFlags + (in-module Gdk) + (c-name GdkColorInfoFlags) + (value (name writable) (c-name GDK_COLOR_WRITEABLE)) +) + +(flags DebugFlag + (in-module Gdk) + (c-name GdkDebugFlag) + (value (name misc) (c-name GDK_DEBUG_MISC)) + (value (name events) (c-name GDK_DEBUG_EVENTS)) + (value (name dnd) (c-name GDK_DEBUG_DND)) + (value (name color-context) (c-name GDK_DEBUG_COLOR_CONTEXT)) + (value (name xim) (c-name GDK_DEBUG_XIM)) +) + +(enum RgbDither + (in-module Gdk) + (c-name GdkRgbDither) + (value (name none) (c-name GDK_RGB_DITHER_NONE)) + (value (name normal) (c-name GDK_RGB_DITHER_NORMAL)) + (value (name max) (c-name GDK_RGB_DITHER_MAX)) +) + +(enum WindowType + (in-module Gdk) + (c-name GdkWindowType) + (value (name root) (c-name GDK_WINDOW_ROOT)) + (value (name toplevel) (c-name GDK_WINDOW_TOPLEVEL)) + (value (name child) (c-name GDK_WINDOW_CHILD)) + (value (name dialog) (c-name GDK_WINDOW_DIALOG)) + (value (name temp) (c-name GDK_WINDOW_TEMP)) + (value (name pixmap) (c-name GDK_WINDOW_PIXMAP)) + (value (name foreign) (c-name GDK_WINDOW_FOREIGN)) +) + +(enum WindowClass + (in-module Gdk) + (c-name GdkWindowClass) + (value (name utput) (c-name GDK_INPUT_OUTPUT)) + (value (name nly) (c-name GDK_INPUT_ONLY)) +) + +(enum ImageType + (in-module Gdk) + (c-name GdkImageType) + (value (name normal) (c-name GDK_IMAGE_NORMAL)) + (value (name shared) (c-name GDK_IMAGE_SHARED)) + (value (name fastest) (c-name GDK_IMAGE_FASTEST)) +) + +(enum VisualType + (in-module Gdk) + (c-name GdkVisualType) + (value (name static-gray) (c-name GDK_VISUAL_STATIC_GRAY)) + (value (name grayscale) (c-name GDK_VISUAL_GRAYSCALE)) + (value (name static-color) (c-name GDK_VISUAL_STATIC_COLOR)) + (value (name pseudo-color) (c-name GDK_VISUAL_PSEUDO_COLOR)) + (value (name true-color) (c-name GDK_VISUAL_TRUE_COLOR)) + (value (name direct-color) (c-name GDK_VISUAL_DIRECT_COLOR)) +) + +(enum FontType + (in-module Gdk) + (c-name GdkFontType) + (value (name font) (c-name GDK_FONT_FONT)) + (value (name fontset) (c-name GDK_FONT_FONTSET)) +) + +(flags WindowAttributesType + (in-module Gdk) + (c-name GdkWindowAttributesType) + (value (name title) (c-name GDK_WA_TITLE)) + (value (name x) (c-name GDK_WA_X)) + (value (name y) (c-name GDK_WA_Y)) + (value (name cursor) (c-name GDK_WA_CURSOR)) + (value (name colormap) (c-name GDK_WA_COLORMAP)) + (value (name visual) (c-name GDK_WA_VISUAL)) + (value (name wmclass) (c-name GDK_WA_WMCLASS)) + (value (name noredir) (c-name GDK_WA_NOREDIR)) +) + +(flags WindowHints + (in-module Gdk) + (c-name GdkWindowHints) + (value (name pos) (c-name GDK_HINT_POS)) + (value (name min-size) (c-name GDK_HINT_MIN_SIZE)) + (value (name max-size) (c-name GDK_HINT_MAX_SIZE)) + (value (name base-size) (c-name GDK_HINT_BASE_SIZE)) + (value (name aspect) (c-name GDK_HINT_ASPECT)) + (value (name resize-inc) (c-name GDK_HINT_RESIZE_INC)) +) + +(enum Function + (in-module Gdk) + (c-name GdkFunction) + (value (name copy) (c-name GDK_COPY)) + (value (name invert) (c-name GDK_INVERT)) + (value (name xor) (c-name GDK_XOR)) + (value (name clear) (c-name GDK_CLEAR)) + (value (name and) (c-name GDK_AND)) + (value (name and-reverse) (c-name GDK_AND_REVERSE)) + (value (name and-invert) (c-name GDK_AND_INVERT)) + (value (name noop) (c-name GDK_NOOP)) + (value (name or) (c-name GDK_OR)) + (value (name equiv) (c-name GDK_EQUIV)) + (value (name or-reverse) (c-name GDK_OR_REVERSE)) + (value (name copy-invert) (c-name GDK_COPY_INVERT)) + (value (name or-invert) (c-name GDK_OR_INVERT)) + (value (name nand) (c-name GDK_NAND)) + (value (name set) (c-name GDK_SET)) +) + +(enum Fill + (in-module Gdk) + (c-name GdkFill) + (value (name solid) (c-name GDK_SOLID)) + (value (name tiled) (c-name GDK_TILED)) + (value (name stippled) (c-name GDK_STIPPLED)) + (value (name opaque-stippled) (c-name GDK_OPAQUE_STIPPLED)) +) + +(enum FillRule + (in-module Gdk) + (c-name GdkFillRule) + (value (name even-odd-rule) (c-name GDK_EVEN_ODD_RULE)) + (value (name winding-rule) (c-name GDK_WINDING_RULE)) +) + +(enum LineStyle + (in-module Gdk) + (c-name GdkLineStyle) + (value (name solid) (c-name GDK_LINE_SOLID)) + (value (name on-off-dash) (c-name GDK_LINE_ON_OFF_DASH)) + (value (name double-dash) (c-name GDK_LINE_DOUBLE_DASH)) +) + +(enum CapStyle + (in-module Gdk) + (c-name GdkCapStyle) + (value (name not-last) (c-name GDK_CAP_NOT_LAST)) + (value (name butt) (c-name GDK_CAP_BUTT)) + (value (name round) (c-name GDK_CAP_ROUND)) + (value (name projecting) (c-name GDK_CAP_PROJECTING)) +) + +(enum JoinStyle + (in-module Gdk) + (c-name GdkJoinStyle) + (value (name miter) (c-name GDK_JOIN_MITER)) + (value (name round) (c-name GDK_JOIN_ROUND)) + (value (name bevel) (c-name GDK_JOIN_BEVEL)) +) + +(enum CursorType + (in-module Gdk) + (c-name GdkCursorType) + (value (name is-pixmap) (c-name GDK_CURSOR_IS_PIXMAP)) +) + +(enum FilterReturn + (in-module Gdk) + (c-name GdkFilterReturn) + (value (name continue) (c-name GDK_FILTER_CONTINUE)) + (value (name translate) (c-name GDK_FILTER_TRANSLATE)) + (value (name remove) (c-name GDK_FILTER_REMOVE)) +) + +(enum VisibilityState + (in-module Gdk) + (c-name GdkVisibilityState) + (value (name unobscured) (c-name GDK_VISIBILITY_UNOBSCURED)) + (value (name partial) (c-name GDK_VISIBILITY_PARTIAL)) + (value (name fully-obscured) (c-name GDK_VISIBILITY_FULLY_OBSCURED)) +) + +(enum EventType + (in-module Gdk) + (c-name GdkEventType) + (value (name nothing) (c-name GDK_NOTHING)) + (value (name delete) (c-name GDK_DELETE)) + (value (name destroy) (c-name GDK_DESTROY)) + (value (name expose) (c-name GDK_EXPOSE)) + (value (name motion-notify) (c-name GDK_MOTION_NOTIFY)) + (value (name button-press) (c-name GDK_BUTTON_PRESS)) + (value (name 2button-press) (c-name GDK_2BUTTON_PRESS)) + (value (name 3button-press) (c-name GDK_3BUTTON_PRESS)) + (value (name button-release) (c-name GDK_BUTTON_RELEASE)) + (value (name key-press) (c-name GDK_KEY_PRESS)) + (value (name key-release) (c-name GDK_KEY_RELEASE)) + (value (name enter-notify) (c-name GDK_ENTER_NOTIFY)) + (value (name leave-notify) (c-name GDK_LEAVE_NOTIFY)) + (value (name focus-change) (c-name GDK_FOCUS_CHANGE)) + (value (name configure) (c-name GDK_CONFIGURE)) + (value (name map) (c-name GDK_MAP)) + (value (name unmap) (c-name GDK_UNMAP)) + (value (name property-notify) (c-name GDK_PROPERTY_NOTIFY)) + (value (name selection-clear) (c-name GDK_SELECTION_CLEAR)) + (value (name selection-request) (c-name GDK_SELECTION_REQUEST)) + (value (name selection-notify) (c-name GDK_SELECTION_NOTIFY)) + (value (name proximity-in) (c-name GDK_PROXIMITY_IN)) + (value (name proximity-out) (c-name GDK_PROXIMITY_OUT)) + (value (name drag-enter) (c-name GDK_DRAG_ENTER)) + (value (name drag-leave) (c-name GDK_DRAG_LEAVE)) + (value (name drag-motion) (c-name GDK_DRAG_MOTION)) + (value (name drag-status) (c-name GDK_DRAG_STATUS)) + (value (name drop-start) (c-name GDK_DROP_START)) + (value (name drop-finished) (c-name GDK_DROP_FINISHED)) + (value (name client-event) (c-name GDK_CLIENT_EVENT)) + (value (name visibility-notify) (c-name GDK_VISIBILITY_NOTIFY)) + (value (name no-expose) (c-name GDK_NO_EXPOSE)) +) + +(flags EventMask + (in-module Gdk) + (c-name GdkEventMask) + (value (name exposure-mask) (c-name GDK_EXPOSURE_MASK)) + (value (name pointer-motion-mask) (c-name GDK_POINTER_MOTION_MASK)) + (value (name pointer-motion-hint-mask) (c-name GDK_POINTER_MOTION_HINT_MASK)) + (value (name button-motion-mask) (c-name GDK_BUTTON_MOTION_MASK)) + (value (name button1-motion-mask) (c-name GDK_BUTTON1_MOTION_MASK)) + (value (name button2-motion-mask) (c-name GDK_BUTTON2_MOTION_MASK)) + (value (name button3-motion-mask) (c-name GDK_BUTTON3_MOTION_MASK)) + (value (name button-press-mask) (c-name GDK_BUTTON_PRESS_MASK)) + (value (name button-release-mask) (c-name GDK_BUTTON_RELEASE_MASK)) + (value (name key-press-mask) (c-name GDK_KEY_PRESS_MASK)) + (value (name key-release-mask) (c-name GDK_KEY_RELEASE_MASK)) + (value (name enter-notify-mask) (c-name GDK_ENTER_NOTIFY_MASK)) + (value (name leave-notify-mask) (c-name GDK_LEAVE_NOTIFY_MASK)) + (value (name focus-change-mask) (c-name GDK_FOCUS_CHANGE_MASK)) + (value (name structure-mask) (c-name GDK_STRUCTURE_MASK)) + (value (name property-change-mask) (c-name GDK_PROPERTY_CHANGE_MASK)) + (value (name visibility-notify-mask) (c-name GDK_VISIBILITY_NOTIFY_MASK)) + (value (name proximity-in-mask) (c-name GDK_PROXIMITY_IN_MASK)) + (value (name proximity-out-mask) (c-name GDK_PROXIMITY_OUT_MASK)) + (value (name substructure-mask) (c-name GDK_SUBSTRUCTURE_MASK)) + (value (name all-events-mask) (c-name GDK_ALL_EVENTS_MASK)) +) + +(enum NotifyType + (in-module Gdk) + (c-name GdkNotifyType) + (value (name ancestor) (c-name GDK_NOTIFY_ANCESTOR)) + (value (name virtual) (c-name GDK_NOTIFY_VIRTUAL)) + (value (name inferior) (c-name GDK_NOTIFY_INFERIOR)) + (value (name nonlinear) (c-name GDK_NOTIFY_NONLINEAR)) + (value (name nonlinear-virtual) (c-name GDK_NOTIFY_NONLINEAR_VIRTUAL)) + (value (name unknown) (c-name GDK_NOTIFY_UNKNOWN)) +) + +(enum CrossingMode + (in-module Gdk) + (c-name GdkCrossingMode) + (value (name normal) (c-name GDK_CROSSING_NORMAL)) + (value (name grab) (c-name GDK_CROSSING_GRAB)) + (value (name ungrab) (c-name GDK_CROSSING_UNGRAB)) +) + +(flags ModifierType + (in-module Gdk) + (c-name GdkModifierType) + (value (name shift-mask) (c-name GDK_SHIFT_MASK)) + (value (name lock-mask) (c-name GDK_LOCK_MASK)) + (value (name control-mask) (c-name GDK_CONTROL_MASK)) + (value (name mod1-mask) (c-name GDK_MOD1_MASK)) + (value (name mod2-mask) (c-name GDK_MOD2_MASK)) + (value (name mod3-mask) (c-name GDK_MOD3_MASK)) + (value (name mod4-mask) (c-name GDK_MOD4_MASK)) + (value (name mod5-mask) (c-name GDK_MOD5_MASK)) + (value (name button1-mask) (c-name GDK_BUTTON1_MASK)) + (value (name button2-mask) (c-name GDK_BUTTON2_MASK)) + (value (name button3-mask) (c-name GDK_BUTTON3_MASK)) + (value (name button4-mask) (c-name GDK_BUTTON4_MASK)) + (value (name button5-mask) (c-name GDK_BUTTON5_MASK)) + (value (name release-mask) (c-name GDK_RELEASE_MASK)) + (value (name modifier-mask) (c-name GDK_MODIFIER_MASK)) +) + +(enum SubwindowMode + (in-module Gdk) + (c-name GdkSubwindowMode) + (value (name clip-by-children) (c-name GDK_CLIP_BY_CHILDREN)) + (value (name include-inferiors) (c-name GDK_INCLUDE_INFERIORS)) +) + +(flags InputCondition + (in-module Gdk) + (c-name GdkInputCondition) + (value (name read) (c-name GDK_INPUT_READ)) + (value (name write) (c-name GDK_INPUT_WRITE)) + (value (name exception) (c-name GDK_INPUT_EXCEPTION)) +) + +(enum Status + (in-module Gdk) + (c-name GdkStatus) + (value (name ok) (c-name GDK_OK)) + (value (name error) (c-name GDK_ERROR)) + (value (name error-param) (c-name GDK_ERROR_PARAM)) + (value (name error-file) (c-name GDK_ERROR_FILE)) + (value (name error-mem) (c-name GDK_ERROR_MEM)) +) + +(enum ByteOrder + (in-module Gdk) + (c-name GdkByteOrder) + (value (name lsb-first) (c-name GDK_LSB_FIRST)) + (value (name msb-first) (c-name GDK_MSB_FIRST)) +) + +(flags GCValuesMask + (in-module Gdk) + (c-name GdkGCValuesMask) + (value (name foreground) (c-name GDK_GC_FOREGROUND)) + (value (name background) (c-name GDK_GC_BACKGROUND)) + (value (name font) (c-name GDK_GC_FONT)) + (value (name function) (c-name GDK_GC_FUNCTION)) + (value (name fill) (c-name GDK_GC_FILL)) + (value (name tile) (c-name GDK_GC_TILE)) + (value (name stipple) (c-name GDK_GC_STIPPLE)) + (value (name clip-mask) (c-name GDK_GC_CLIP_MASK)) + (value (name subwindow) (c-name GDK_GC_SUBWINDOW)) + (value (name ts-x-origin) (c-name GDK_GC_TS_X_ORIGIN)) + (value (name ts-y-origin) (c-name GDK_GC_TS_Y_ORIGIN)) + (value (name clip-x-origin) (c-name GDK_GC_CLIP_X_ORIGIN)) + (value (name clip-y-origin) (c-name GDK_GC_CLIP_Y_ORIGIN)) + (value (name exposures) (c-name GDK_GC_EXPOSURES)) + (value (name line-width) (c-name GDK_GC_LINE_WIDTH)) + (value (name line-style) (c-name GDK_GC_LINE_STYLE)) + (value (name cap-style) (c-name GDK_GC_CAP_STYLE)) + (value (name join-style) (c-name GDK_GC_JOIN_STYLE)) +) + +(enum Selection + (in-module Gdk) + (c-name GdkSelection) + (value (name primary) (c-name GDK_SELECTION_PRIMARY)) + (value (name secondary) (c-name GDK_SELECTION_SECONDARY)) +) + +(enum PropertyState + (in-module Gdk) + (c-name GdkPropertyState) + (value (name new-value) (c-name GDK_PROPERTY_NEW_VALUE)) + (value (name delete) (c-name GDK_PROPERTY_DELETE)) +) + +(enum PropMode + (in-module Gdk) + (c-name GdkPropMode) + (value (name replace) (c-name GDK_PROP_MODE_REPLACE)) + (value (name prepend) (c-name GDK_PROP_MODE_PREPEND)) + (value (name append) (c-name GDK_PROP_MODE_APPEND)) +) + +(enum InputSource + (in-module Gdk) + (c-name GdkInputSource) + (value (name mouse) (c-name GDK_SOURCE_MOUSE)) + (value (name pen) (c-name GDK_SOURCE_PEN)) + (value (name eraser) (c-name GDK_SOURCE_ERASER)) + (value (name cursor) (c-name GDK_SOURCE_CURSOR)) +) + +(enum InputMode + (in-module Gdk) + (c-name GdkInputMode) + (value (name disabled) (c-name GDK_MODE_DISABLED)) + (value (name screen) (c-name GDK_MODE_SCREEN)) + (value (name window) (c-name GDK_MODE_WINDOW)) +) + +(enum AxisUse + (in-module Gdk) + (c-name GdkAxisUse) + (value (name ignore) (c-name GDK_AXIS_IGNORE)) + (value (name x) (c-name GDK_AXIS_X)) + (value (name y) (c-name GDK_AXIS_Y)) + (value (name pressure) (c-name GDK_AXIS_PRESSURE)) + (value (name xtilt) (c-name GDK_AXIS_XTILT)) + (value (name ytilt) (c-name GDK_AXIS_YTILT)) + (value (name last) (c-name GDK_AXIS_LAST)) +) + +(enum Target + (in-module Gdk) + (c-name GdkTarget) + (value (name bitmap) (c-name GDK_TARGET_BITMAP)) + (value (name colormap) (c-name GDK_TARGET_COLORMAP)) + (value (name drawable) (c-name GDK_TARGET_DRAWABLE)) + (value (name pixmap) (c-name GDK_TARGET_PIXMAP)) + (value (name string) (c-name GDK_TARGET_STRING)) +) + +(enum SelectionType + (in-module Gdk) + (c-name GdkSelectionType) + (value (name atom) (c-name GDK_SELECTION_TYPE_ATOM)) + (value (name bitmap) (c-name GDK_SELECTION_TYPE_BITMAP)) + (value (name colormap) (c-name GDK_SELECTION_TYPE_COLORMAP)) + (value (name drawable) (c-name GDK_SELECTION_TYPE_DRAWABLE)) + (value (name integer) (c-name GDK_SELECTION_TYPE_INTEGER)) + (value (name pixmap) (c-name GDK_SELECTION_TYPE_PIXMAP)) + (value (name window) (c-name GDK_SELECTION_TYPE_WINDOW)) + (value (name string) (c-name GDK_SELECTION_TYPE_STRING)) +) + +(enum ExtensionMode + (in-module Gdk) + (c-name GdkExtensionMode) + (value (name none) (c-name GDK_EXTENSION_EVENTS_NONE)) + (value (name all) (c-name GDK_EXTENSION_EVENTS_ALL)) + (value (name cursor) (c-name GDK_EXTENSION_EVENTS_CURSOR)) +) + +(enum IMStyle + (in-module Gdk) + (c-name GdkIMStyle) + (value (name preedit-area) (c-name GDK_IM_PREEDIT_AREA)) + (value (name preedit-callbacks) (c-name GDK_IM_PREEDIT_CALLBACKS)) + (value (name preedit-position) (c-name GDK_IM_PREEDIT_POSITION)) + (value (name preedit-nothing) (c-name GDK_IM_PREEDIT_NOTHING)) + (value (name preedit-none) (c-name GDK_IM_PREEDIT_NONE)) + (value (name preedit-mask) (c-name GDK_IM_PREEDIT_MASK)) + (value (name status-area) (c-name GDK_IM_STATUS_AREA)) + (value (name status-callbacks) (c-name GDK_IM_STATUS_CALLBACKS)) + (value (name status-nothing) (c-name GDK_IM_STATUS_NOTHING)) + (value (name status-none) (c-name GDK_IM_STATUS_NONE)) + (value (name status-mask) (c-name GDK_IM_STATUS_MASK)) +) + +(flags ICAttributesType + (in-module Gdk) + (c-name GdkICAttributesType) + (value (name style) (c-name GDK_IC_STYLE)) + (value (name client-window) (c-name GDK_IC_CLIENT_WINDOW)) + (value (name focus-window) (c-name GDK_IC_FOCUS_WINDOW)) + (value (name filter-events) (c-name GDK_IC_FILTER_EVENTS)) + (value (name spot-location) (c-name GDK_IC_SPOT_LOCATION)) + (value (name line-spacing) (c-name GDK_IC_LINE_SPACING)) + (value (name cursor) (c-name GDK_IC_CURSOR)) + (value (name preedit-fontset) (c-name GDK_IC_PREEDIT_FONTSET)) + (value (name preedit-area) (c-name GDK_IC_PREEDIT_AREA)) + (value (name preedit-area-needed) (c-name GDK_IC_PREEDIT_AREA_NEEDED)) + (value (name preedit-foreground) (c-name GDK_IC_PREEDIT_FOREGROUND)) + (value (name preedit-background) (c-name GDK_IC_PREEDIT_BACKGROUND)) + (value (name preedit-pixmap) (c-name GDK_IC_PREEDIT_PIXMAP)) + (value (name preedit-colormap) (c-name GDK_IC_PREEDIT_COLORMAP)) + (value (name status-fontset) (c-name GDK_IC_STATUS_FONTSET)) + (value (name status-area) (c-name GDK_IC_STATUS_AREA)) + (value (name status-area-needed) (c-name GDK_IC_STATUS_AREA_NEEDED)) + (value (name status-foreground) (c-name GDK_IC_STATUS_FOREGROUND)) + (value (name status-background) (c-name GDK_IC_STATUS_BACKGROUND)) + (value (name status-pixmap) (c-name GDK_IC_STATUS_PIXMAP)) + (value (name status-colormap) (c-name GDK_IC_STATUS_COLORMAP)) + (value (name all-req) (c-name GDK_IC_ALL_REQ)) + (value (name preedit-area-req) (c-name GDK_IC_PREEDIT_AREA_REQ)) + (value (name preedit-position-req) (c-name GDK_IC_PREEDIT_POSITION_REQ)) + (value (name status-area-req) (c-name GDK_IC_STATUS_AREA_REQ)) +) + +(flags WMDecoration + (in-module Gdk) + (c-name GdkWMDecoration) + (value (name all) (c-name GDK_DECOR_ALL)) + (value (name border) (c-name GDK_DECOR_BORDER)) + (value (name resizeh) (c-name GDK_DECOR_RESIZEH)) + (value (name title) (c-name GDK_DECOR_TITLE)) + (value (name menu) (c-name GDK_DECOR_MENU)) + (value (name minimize) (c-name GDK_DECOR_MINIMIZE)) + (value (name maximize) (c-name GDK_DECOR_MAXIMIZE)) +) + +(flags WMFunction + (in-module Gdk) + (c-name GdkWMFunction) + (value (name all) (c-name GDK_FUNC_ALL)) + (value (name resize) (c-name GDK_FUNC_RESIZE)) + (value (name move) (c-name GDK_FUNC_MOVE)) + (value (name minimize) (c-name GDK_FUNC_MINIMIZE)) + (value (name maximize) (c-name GDK_FUNC_MAXIMIZE)) + (value (name close) (c-name GDK_FUNC_CLOSE)) +) + +(enum ColorContextMode + (in-module Gdk) + (c-name GdkColorContextMode) + (value (name undefined) (c-name GDK_CC_MODE_UNDEFINED)) + (value (name bw) (c-name GDK_CC_MODE_BW)) + (value (name std-cmap) (c-name GDK_CC_MODE_STD_CMAP)) + (value (name true) (c-name GDK_CC_MODE_TRUE)) + (value (name my-gray) (c-name GDK_CC_MODE_MY_GRAY)) + (value (name palette) (c-name GDK_CC_MODE_PALETTE)) +) + +(enum OverlapType + (in-module Gdk) + (c-name GdkOverlapType) + (value (name in) (c-name GDK_OVERLAP_RECTANGLE_IN)) + (value (name out) (c-name GDK_OVERLAP_RECTANGLE_OUT)) + (value (name part) (c-name GDK_OVERLAP_RECTANGLE_PART)) +) + +(flags DragAction + (in-module Gdk) + (c-name GdkDragAction) + (value (name default) (c-name GDK_ACTION_DEFAULT)) + (value (name copy) (c-name GDK_ACTION_COPY)) + (value (name move) (c-name GDK_ACTION_MOVE)) + (value (name link) (c-name GDK_ACTION_LINK)) + (value (name private) (c-name GDK_ACTION_PRIVATE)) + (value (name ask) (c-name GDK_ACTION_ASK)) +) + +(enum DragProtocol + (in-module Gdk) + (c-name GdkDragProtocol) + (value (name motif) (c-name GDK_DRAG_PROTO_MOTIF)) + (value (name xdnd) (c-name GDK_DRAG_PROTO_XDND)) + (value (name rootwin) (c-name GDK_DRAG_PROTO_ROOTWIN)) + (value (name none) (c-name GDK_DRAG_PROTO_NONE)) +) + + +;; From /usr/include/gdk/gdk.h + +(function gdk_get_display + (c-name gdk_get_display) + (return-type gchar*) +) + +(function input_remove + (c-name gdk_input_remove) + (return-type none) + (parameter (type-and-name gint tag)) +) + +(function pointer_is_grabbed + (c-name gdk_pointer_is_grabbed) + (return-type gboolean) +) + +(function screen_width + (c-name gdk_screen_width) + (return-type gint) +) + +(function screen_height + (c-name gdk_screen_height) + (return-type gint) +) + +(function screen_width_mm + (c-name gdk_screen_width_mm) + (return-type gint) +) + +(function screen_height_mm + (c-name gdk_screen_height_mm) + (return-type gint) +) + +(function flush + (c-name gdk_flush) + (return-type none) +) + +(function beep + (c-name gdk_beep) + (return-type none) +) + +(function visual_get_system + (c-name gdk_visual_get_system) + (return-type GdkVisual*) +) + +(function visual_get_best + (c-name gdk_visual_get_best) + (return-type GdkVisual*) +) + +(function visual_get_best_with_depth + (c-name gdk_visual_get_best_with_depth) + (return-type GdkVisual*) + (parameter (type-and-name gint depth)) +) + +(function visual_get_best_with_type + (c-name gdk_visual_get_best_with_type) + (return-type GdkVisual*) + (parameter (type-and-name GdkVisualType visual_type)) +) + +(function visual_get_best_with_both + (c-name gdk_visual_get_best_with_both) + (return-type GdkVisual*) + (parameter (type-and-name gint depth)) + (parameter (type-and-name GdkVisualType visual_type)) +) + +(function gdk_drag_status + (c-name gdk_drag_status) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) + (parameter (type-and-name GdkDragAction action)) + (parameter (type-and-name guint32 time)) +) + +(method set_icon + (of-object Window (Gdk)) + (c-name gdk_window_set_icon) + (return-type none) + (parameter (type-and-name GdkWindow* icon_window)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method set_icon_name + (of-object Window (Gdk)) + (c-name gdk_window_set_icon_name) + (return-type none) + (parameter (type-and-name const-gchar* name)) +) + +(function cursor_new + (c-name gdk_cursor_new) + (return-type GdkCursor*) + (parameter (type-and-name GdkCursorType cursor_type)) +) + +(function cursor_new_from_pixmap + (c-name gdk_cursor_new_from_pixmap) + (return-type GdkCursor*) + (parameter (type-and-name GdkPixmap* source)) + (parameter (type-and-name GdkPixmap* mask)) + (parameter (type-and-name GdkColor* fg)) + (parameter (type-and-name GdkColor* bg)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(function pixmap_new + (c-name gdk_pixmap_new) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window) (null-ok)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name gint depth)) +) + +(function pixmap_create_from_xpm + (c-name gdk_pixmap_create_from_xpm) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkBitmap** mask)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name const-gchar* filename)) +) + +(function pixmap_colormap_create_from_xpm + (c-name gdk_pixmap_colormap_create_from_xpm) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkBitmap** mask)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name const-gchar* filename)) +) + +(function pixmap_create_from_xpm_d + (c-name gdk_pixmap_create_from_xpm_d) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkBitmap** mask)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name gchar** data)) +) + +(function pixmap_colormap_create_from_xpm_d + (c-name gdk_pixmap_colormap_create_from_xpm_d) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkBitmap** mask)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name gchar** data)) +) + + +(function colormap_new + (c-name gdk_colormap_new) + (return-type GdkColormap*) + (parameter (type-and-name GdkVisual* visual)) + (parameter (type-and-name gboolean allocate)) +) + +(method ref + (of-object Colormap (Gdk)) + (c-name gdk_colormap_ref) + (return-type GdkColormap*) +) + +(method unref + (of-object Colormap (Gdk)) + (c-name gdk_colormap_unref) + (return-type none) +) + +(function colormap_get_system + (c-name gdk_colormap_get_system) + (return-type GdkColormap*) +) + +(function colormap_get_system_size + (c-name gdk_colormap_get_system_size) + (return-type gint) +) + +(method change + (of-object Colormap (Gdk)) + (c-name gdk_colormap_change) + (return-type none) + (parameter (type-and-name gint ncolors)) +) + +(method alloc_colors + (of-object Colormap (Gdk)) + (c-name gdk_colormap_alloc_colors) + (return-type gint) + (parameter (type-and-name GdkColor* colors)) + (parameter (type-and-name gint ncolors)) + (parameter (type-and-name gboolean writeable)) + (parameter (type-and-name gboolean best_match)) + (parameter (type-and-name gboolean* success)) +) + +(method alloc_color + (of-object Colormap (Gdk)) + (c-name gdk_colormap_alloc_color) + (return-type gboolean) + (parameter (type-and-name GdkColor* color)) + (parameter (type-and-name gboolean writeable)) + (parameter (type-and-name gboolean best_match)) +) + +(method free_colors + (of-object Colormap (Gdk)) + (c-name gdk_colormap_free_colors) + (return-type none) + (parameter (type-and-name GdkColor* colors)) + (parameter (type-and-name gint ncolors)) +) + +(method get_visual + (of-object Colormap (Gdk)) + (c-name gdk_colormap_get_visual) + (return-type GdkVisual*) +) + +(method copy + (of-object Color (Gdk)) + (c-name gdk_color_copy) + (return-type GdkColor*) +) + +(method free + (of-object Color (Gdk)) + (c-name gdk_color_free) + (return-type none) +) + +(function gdk_color_parse + (c-name gdk_color_parse) + (return-type gboolean) + (parameter (type-and-name const-gchar* spec)) + (parameter (type-and-name GdkColor* color)) +) + +(method hash + (of-object Color (Gdk)) + (c-name gdk_color_hash) + (return-type guint) + (parameter (type-and-name const-GdkColor* colorb)) +) + +(method equal + (of-object Color (Gdk)) + (c-name gdk_color_equal) + (return-type gboolean) + (parameter (type-and-name const-GdkColor* colorb)) +) + +(function font_load + (c-name gdk_font_load) + (return-type GdkFont*) + (parameter (type-and-name const-gchar* font_name)) +) + +(function fontset_load + (c-name gdk_fontset_load) + (return-type GdkFont*) + (parameter (type-and-name const-gchar* fontset_name)) +) + +(function draw_point + (c-name gdk_draw_point) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(function draw_line + (c-name gdk_draw_line) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x1)) + (parameter (type-and-name gint y1)) + (parameter (type-and-name gint x2)) + (parameter (type-and-name gint y2)) +) + +(function draw_rectangle + (c-name gdk_draw_rectangle) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint filled)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function draw_arc + (c-name gdk_draw_arc) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint filled)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name gint angle1)) + (parameter (type-and-name gint angle2)) +) + +(function draw_polygon + (c-name gdk_draw_polygon) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint filled)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) +) + +(function draw_string + (c-name gdk_draw_string) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkFont* font)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-gchar* string)) +) + +(function draw_text + (c-name gdk_draw_text) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkFont* font)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-gchar* text)) + (parameter (type-and-name gint text_length)) +) + +(function draw_text_wc + (c-name gdk_draw_text_wc) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkFont* font)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-GdkWChar* text)) + (parameter (type-and-name gint text_length)) +) + +(function draw_pixmap + (c-name gdk_draw_pixmap) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkDrawable* src)) + (parameter (type-and-name gint xsrc)) + (parameter (type-and-name gint ysrc)) + (parameter (type-and-name gint xdest)) + (parameter (type-and-name gint ydest)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function draw_image + (c-name gdk_draw_image) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkImage* image)) + (parameter (type-and-name gint xsrc)) + (parameter (type-and-name gint ysrc)) + (parameter (type-and-name gint xdest)) + (parameter (type-and-name gint ydest)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function draw_points + (c-name gdk_draw_points) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) +) + +(function draw_segments + (c-name gdk_draw_segments) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkSegment* segs)) + (parameter (type-and-name gint nsegs)) +) + +(function draw_lines + (c-name gdk_draw_lines) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) +) + +(function atom_intern + (c-name gdk_atom_intern) + (return-type GdkAtom) + (parameter (type-and-name const-gchar* atom_name)) + (parameter (type-and-name gint only_if_exists) (default "FALSE")) +) + +(method name + (of-object Atom (Gdk)) + (c-name gdk_atom_name) + (return-type gchar*) +) + +(function threads_enter + (c-name gdk_threads_enter) + (return-type none) +) + +(function threads_leave + (c-name gdk_threads_leave) + (return-type none) +) + + + +;; From /usr/include/gdk/gdkrgb.h + +(function rgb_xpixel_from_rgb + (c-name gdk_rgb_xpixel_from_rgb) + (return-type gulong) + (parameter (type-and-name guint32 rgb)) +) + +(function rgb_gc_set_foreground + (c-name gdk_rgb_gc_set_foreground) + (return-type none) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name guint32 rgb)) +) + +(function rgb_gc_set_background + (c-name gdk_rgb_gc_set_background) + (return-type none) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name guint32 rgb)) +) + +(function draw_rgb_image + (c-name gdk_draw_rgb_image) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GdkRgbDither dith)) + (parameter (type-and-name guchar* rgb_buf)) + (parameter (type-and-name gint rowstride)) +) + +(function draw_rgb_image_dithalign + (c-name gdk_draw_rgb_image_dithalign) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GdkRgbDither dith)) + (parameter (type-and-name guchar* rgb_buf)) + (parameter (type-and-name gint rowstride)) + (parameter (type-and-name gint xdith)) + (parameter (type-and-name gint ydith)) +) + +(function draw_rgb_32_image + (c-name gdk_draw_rgb_32_image) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GdkRgbDither dith)) + (parameter (type-and-name guchar* buf)) + (parameter (type-and-name gint rowstride)) +) + +(function draw_gray_image + (c-name gdk_draw_gray_image) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GdkRgbDither dith)) + (parameter (type-and-name guchar* buf)) + (parameter (type-and-name gint rowstride)) +) + +(function rgb_get_cmap + (c-name gdk_rgb_get_cmap) + (return-type GdkColormap*) +) + +(function rgb_get_visual + (c-name gdk_rgb_get_visual) + (return-type GdkVisual*) +) + + + + Index: php-gtk/ext/gtk+/gdk.overrides diff -u /dev/null php-gtk/ext/gtk+/gdk.overrides:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gdk.overrides Tue Jul 10 14:27:49 2001 @@ -0,0 +1,174 @@ +/* vim: set ft=cpp: */ +%% +ignore + GdkDebugFlag + GdkColorInfoFlags +%% +override gdk_color_parse +PHP_FUNCTION(wrap_gdk_color_parse) +{ + gchar *color_spec; + GdkColor color; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s", &color_spec)) { + return; + } + + if (gdk_color_parse(color_spec, &color)) + *return_value = *php_gdk_color_new(&color); + else + php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(), color_spec); +} +%% +override gdk_pixmap_create_from_xpm +PHP_FUNCTION(wrap_gdk_pixmap_create_from_xpm) +{ + zval *php_window, *php_trans_color; + gchar *filename; + GdkWindow *window = NULL; + GdkColor *trans_color = NULL; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNs", &php_window, gdk_window_ce, + &php_trans_color, gdk_color_ce, &filename)) + return; + + if (Z_TYPE_P(php_window) != IS_NULL) + window = PHP_GDK_WINDOW_GET(php_window); + if (Z_TYPE_P(php_trans_color) != IS_NULL) + trans_color = PHP_GDK_COLOR_GET(php_trans_color); + + pixmap = gdk_pixmap_create_from_xpm(window, &mask, trans_color, filename); + if (!pixmap) { + php_error(E_WARNING, "%s() cannot load pixmap", get_active_function_name()); + return; + } + + *return_value = *php_gtk_build_value("(NN)", php_gdk_pixmap_new(pixmap), php_gdk_bitmap_new(mask)); + gdk_pixmap_unref(pixmap); + gdk_bitmap_unref(mask); +} +%% +override gdk_pixmap_create_from_xpm_d +PHP_FUNCTION(wrap_gdk_pixmap_create_from_xpm_d) +{ + zval *php_window, *php_trans_color, *php_data; + zval **line; + GdkWindow *window = NULL; + GdkColor *trans_color = NULL; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask; + char **data; + int len, i = 0; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNa/", &php_window, gdk_window_ce, + &php_trans_color, gdk_color_ce, &php_data)) + return; + + if (Z_TYPE_P(php_window) != IS_NULL) + window = PHP_GDK_WINDOW_GET(php_window); + if (Z_TYPE_P(php_trans_color) != IS_NULL) + trans_color = PHP_GDK_COLOR_GET(php_trans_color); + + len = zend_hash_num_elements(Z_ARRVAL_P(php_data)); + data = emalloc(len * sizeof(char *)); + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_data)); + zend_hash_get_current_data(Z_ARRVAL_P(php_data), (void **)&line) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_data))) { + convert_to_string_ex(line); + data[i++] = Z_STRVAL_PP(line); + } + + pixmap = gdk_pixmap_create_from_xpm_d(window, &mask, trans_color, data); + efree(data); + if (!pixmap) { + php_error(E_WARNING, "%s() cannot create pixmap", get_active_function_name()); + return; + } + + *return_value = *php_gtk_build_value("(NN)", php_gdk_pixmap_new(pixmap), php_gdk_bitmap_new(mask)); + gdk_pixmap_unref(pixmap); + gdk_bitmap_unref(mask); +} +%% +override gdk_pixmap_colormap_create_from_xpm +PHP_FUNCTION(wrap_gdk_pixmap_colormap_create_from_xpm) +{ + zval *php_window, *php_trans_color, *php_colormap; + gchar *filename; + GdkWindow *window = NULL; + GdkColormap *colormap = NULL; + GdkColor *trans_color = NULL; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNNs", &php_window, gdk_window_ce, + &php_colormap, gdk_colormap_ce, &php_trans_color, + gdk_color_ce, &filename)) + return; + + if (Z_TYPE_P(php_window) != IS_NULL) + window = PHP_GDK_WINDOW_GET(php_window); + if (Z_TYPE_P(php_colormap) != IS_NULL) + colormap = PHP_GDK_COLORMAP_GET(php_colormap); + if (Z_TYPE_P(php_trans_color) != IS_NULL) + trans_color = PHP_GDK_COLOR_GET(php_trans_color); + + pixmap = gdk_pixmap_colormap_create_from_xpm(window, colormap, &mask, trans_color, filename); + if (!pixmap) { + php_error(E_WARNING, "%s() cannot load pixmap", get_active_function_name()); + return; + } + + *return_value = *php_gtk_build_value("(NN)", php_gdk_pixmap_new(pixmap), php_gdk_bitmap_new(mask)); + gdk_pixmap_unref(pixmap); + gdk_bitmap_unref(mask); +} +%% +override gdk_pixmap_colormap_create_from_xpm_d +PHP_FUNCTION(wrap_gdk_pixmap_colormap_create_from_xpm_d) +{ + zval *php_window, *php_colormap, + *php_trans_color, *php_data; + zval **line; + GdkWindow *window = NULL; + GdkColormap *colormap = NULL; + GdkColor *trans_color = NULL; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask; + char **data; + int len, i = 0; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNNa/", &php_window, + gdk_window_ce, &php_colormap, gdk_colormap_ce, + &php_trans_color, gdk_color_ce, &php_data)) + return; + + if (Z_TYPE_P(php_window) != IS_NULL) + window = PHP_GDK_WINDOW_GET(php_window); + if (Z_TYPE_P(php_colormap) != IS_NULL) + colormap = PHP_GDK_COLORMAP_GET(php_colormap); + if (Z_TYPE_P(php_trans_color) != IS_NULL) + trans_color = PHP_GDK_COLOR_GET(php_trans_color); + + len = zend_hash_num_elements(Z_ARRVAL_P(php_data)); + data = emalloc(len * sizeof(char *)); + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_data)); + zend_hash_get_current_data(Z_ARRVAL_P(php_data), (void **)&line) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_data))) { + convert_to_string_ex(line); + data[i++] = Z_STRVAL_PP(line); + } + + pixmap = gdk_pixmap_colormap_create_from_xpm_d(window, colormap, &mask, trans_color, data); + efree(data); + if (!pixmap) { + php_error(E_WARNING, "%s() cannot create pixmap", get_active_function_name()); + return; + } + + *return_value = *php_gtk_build_value("(NN)", php_gdk_pixmap_new(pixmap), php_gdk_bitmap_new(mask)); + gdk_pixmap_unref(pixmap); + gdk_bitmap_unref(mask); +} Index: php-gtk/ext/gtk+/gtk-extrafuncs.defs diff -u /dev/null php-gtk/ext/gtk+/gtk-extrafuncs.defs:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gtk-extrafuncs.defs Tue Jul 10 14:27:49 2001 @@ -0,0 +1,27 @@ +; -*- scheme -*- + +(method flags + (of-object Object (Gtk)) + (c-name GTK_OBJECT_FLAGS) + (return-type guint) +) + +(method set_flags + (of-object Object (Gtk)) + (c-name GTK_OBJECT_SET_FLAGS) + (return-type none) + (parameter (type-and-name guint flags)) +) + +(method unset_flags + (of-object Object (Gtk)) + (c-name GTK_OBJECT_UNSET_FLAGS) + (return-type none) + (parameter (type-and-name guint flags)) +) + +(method get_allocation + (of-object Widget (Gtk)) + (c-name gtk_widget_get_allocation) + (return-type GtkAllocation) +) Index: php-gtk/ext/gtk+/gtk.defs diff -u /dev/null php-gtk/ext/gtk+/gtk.defs:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gtk.defs Tue Jul 10 14:27:49 2001 @@ -0,0 +1,10505 @@ +;; -*- scheme -*- + +; object definitions ... +(object Object + (in-module Gtk) + (c-name GtkObject) +) + +(object ItemFactory + (in-module Gtk) + (parent Object (Gtk)) + (c-name GtkItemFactory) +) + +(object Data + (in-module Gtk) + (parent Object (Gtk)) + (c-name GtkData) +) + +(object Adjustment + (in-module Gtk) + (parent Data (Gtk)) + (c-name GtkAdjustment) + (field (type-and-name gfloat value)) + (field (type-and-name gfloat lower)) + (field (type-and-name gfloat upper)) + (field (type-and-name gfloat step_increment)) + (field (type-and-name gfloat page_increment)) + (field (type-and-name gfloat page_size)) +) + +(object Tooltips + (in-module Gtk) + (parent Data (Gtk)) + (c-name GtkTooltips) +) + +(object Widget + (in-module Gtk) + (parent Object (Gtk)) + (c-name GtkWidget) + (field (type-and-name GtkStyle* style)) + (field (type-and-name GdkWindow* window)) +) + +(object Separator + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkSeparator) +) + +(object VSeparator + (in-module Gtk) + (parent Separator (Gtk)) + (c-name GtkVSeparator) +) + +(object HSeparator + (in-module Gtk) + (parent Separator (Gtk)) + (c-name GtkHSeparator) +) + +(object Ruler + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkRuler) +) + +(object VRuler + (in-module Gtk) + (parent Ruler (Gtk)) + (c-name GtkVRuler) +) + +(object HRuler + (in-module Gtk) + (parent Ruler (Gtk)) + (c-name GtkHRuler) +) + +(object Range + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkRange) +) + +(object Scrollbar + (in-module Gtk) + (parent Range (Gtk)) + (c-name GtkScrollbar) +) + +(object VScrollbar + (in-module Gtk) + (parent Scrollbar (Gtk)) + (c-name GtkVScrollbar) +) + +(object HScrollbar + (in-module Gtk) + (parent Scrollbar (Gtk)) + (c-name GtkHScrollbar) +) + +(object Scale + (in-module Gtk) + (parent Range (Gtk)) + (c-name GtkScale) +) + +(object VScale + (in-module Gtk) + (parent Scale (Gtk)) + (c-name GtkVScale) +) + +(object HScale + (in-module Gtk) + (parent Scale (Gtk)) + (c-name GtkHScale) +) + +(object Progress + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkProgress) +) + +(object ProgressBar + (in-module Gtk) + (parent Progress (Gtk)) + (c-name GtkProgressBar) +) + +(object Preview + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkPreview) +) + +(object Misc + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkMisc) + (field (type-and-name gfloat xalign)) + (field (type-and-name gfloat yalign)) + (field (type-and-name guint16 xpad)) + (field (type-and-name guint16 ypad)) +) + +(object Pixmap + (in-module Gtk) + (parent Misc (Gtk)) + (c-name GtkPixmap) +) + +(object Arrow + (in-module Gtk) + (parent Misc (Gtk)) + (c-name GtkArrow) + (field (type-and-name gint16 arrow_type)) + (field (type-and-name gint16 shadow_type)) +) + +(object Image + (in-module Gtk) + (parent Misc (Gtk)) + (c-name GtkImage) +) + +(object Label + (in-module Gtk) + (parent Misc (Gtk)) + (c-name GtkLabel) +) + +(object AccelLabel + (in-module Gtk) + (parent Label (Gtk)) + (c-name GtkAccelLabel) +) + +(object Editable + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkEditable) + (field (type-and-name guint selection_start_pos)) + (field (type-and-name guint selection_end_pos)) + (field (type-and-name gboolean has_selection)) +) + +(object Text + (in-module Gtk) + (parent Editable (Gtk)) + (c-name GtkText) + (field (type-and-name GtkAdjustment* hadj)) + (field (type-and-name GtkAdjustment* vadj)) +) + +(object Entry + (in-module Gtk) + (parent Editable (Gtk)) + (c-name GtkEntry) +) + +(object SpinButton + (in-module Gtk) + (parent Entry (Gtk)) + (c-name GtkSpinButton) +) + +(object DrawingArea + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkDrawingArea) +) + +(object Curve + (in-module Gtk) + (parent DrawingArea (Gtk)) + (c-name GtkCurve) +) + +(object Container + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkContainer) +) + +(object Tree + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkTree) +) + +(object Toolbar + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkToolbar) +) + +(object Table + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkTable) +) + +(object Socket + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkSocket) +) + +(object Paned + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkPaned) +) + +(object VPaned + (in-module Gtk) + (parent Paned (Gtk)) + (c-name GtkVPaned) +) + +(object HPaned + (in-module Gtk) + (parent Paned (Gtk)) + (c-name GtkHPaned) +) + +(object Packer + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkPacker) +) + +(object Notebook + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkNotebook) + (field (type-and-name GtkPositionType tab_pos)) +) + +(object FontSelection + (in-module Gtk) + (parent Notebook (Gtk)) + (c-name GtkFontSelection) +) + +(object MenuShell + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkMenuShell) +) + +(object Menu + (in-module Gtk) + (parent MenuShell (Gtk)) + (c-name GtkMenu) +) + +(object MenuBar + (in-module Gtk) + (parent MenuShell (Gtk)) + (c-name GtkMenuBar) +) + +(object List + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkList) + (field (type-and-name GList* selection)) +) + +(object Layout + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkLayout) +) + +(object Fixed + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkFixed) + (field (type-and-name GList* children)) +) + +(object Bin + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkBin) + (field (type-and-name GtkWidget* child)) +) + +(object Viewport + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkViewport) +) + +(object ScrolledWindow + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkScrolledWindow) +) + +(object Item + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkItem) +) + +(object TreeItem + (in-module Gtk) + (parent Item (Gtk)) + (c-name GtkTreeItem) + (field (type-and-name GtkWidget* subtree)) +) + +(object MenuItem + (in-module Gtk) + (parent Item (Gtk)) + (c-name GtkMenuItem) +) + +(object TearoffMenuItem + (in-module Gtk) + (parent MenuItem (Gtk)) + (c-name GtkTearoffMenuItem) +) + +(object CheckMenuItem + (in-module Gtk) + (parent MenuItem (Gtk)) + (c-name GtkCheckMenuItem) + (field (type-and-name gboolean active)) +) + +(object RadioMenuItem + (in-module Gtk) + (parent CheckMenuItem (Gtk)) + (c-name GtkRadioMenuItem) +) + +(object ListItem + (in-module Gtk) + (parent Item (Gtk)) + (c-name GtkListItem) +) + +(object Invisible + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkInvisible) +) + +(object HandleBox + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkHandleBox) + (field (type-and-name GtkShadowType shadow_type)) + (field (type-and-name GtkPositionType handle_position)) + (field (type-and-name gint snap_edge)) + (field (type-and-name gboolean child_detached)) +) + +(object Frame + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkFrame) +) + +(object EventBox + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkEventBox) +) + +(object Alignment + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkAlignment) +) + +(object Button + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkButton) +) + +(object ToggleButton + (in-module Gtk) + (parent Button (Gtk)) + (c-name GtkToggleButton) + (field (type-and-name gboolean draw_indicator)) +) + +(object CheckButton + (in-module Gtk) + (parent ToggleButton (Gtk)) + (c-name GtkCheckButton) +) + +(object RadioButton + (in-module Gtk) + (parent CheckButton (Gtk)) + (c-name GtkRadioButton) +) + +(object OptionMenu + (in-module Gtk) + (parent Button (Gtk)) + (c-name GtkOptionMenu) +) + +(object Box + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkBox) + (field (type-and-name GList* children)) + (field (type-and-name gint16 spacing)) + (field (type-and-name gboolean homogeneous)) +) + +(object VBox + (in-module Gtk) + (parent Box (Gtk)) + (c-name GtkVBox) +) + +(object ColorSelection + (in-module Gtk) + (parent VBox (Gtk)) + (c-name GtkColorSelection) +) + +(object GammaCurve + (in-module Gtk) + (parent VBox (Gtk)) + (c-name GtkGammaCurve) + (field (type-and-name GtkWidget* table)) + (field (type-and-name GtkWidget* curve)) + (field (type-and-name gfloat gamma)) + (field (type-and-name GtkWidget* gamma_dialog)) + (field (type-and-name GtkWidget* gamma_text)) +) + +(object HBox + (in-module Gtk) + (parent Box (Gtk)) + (c-name GtkHBox) +) + +(object Statusbar + (in-module Gtk) + (parent HBox (Gtk)) + (c-name GtkStatusbar) +) + +(object Combo + (in-module Gtk) + (parent HBox (Gtk)) + (c-name GtkCombo) + (field (type-and-name GtkWidget* entry)) + (field (type-and-name GtkWidget* list)) +) + +(object ButtonBox + (in-module Gtk) + (parent Box (Gtk)) + (c-name GtkButtonBox) +) + +(object VButtonBox + (in-module Gtk) + (parent ButtonBox (Gtk)) + (c-name GtkVButtonBox) +) + +(object HButtonBox + (in-module Gtk) + (parent ButtonBox (Gtk)) + (c-name GtkHButtonBox) +) + +(object CList + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkCList) + (field (type-and-name gint focus_row)) + (field (type-and-name gint rows)) + (field (type-and-name gint sort_column)) + (field (type-and-name GtkSortType sort_type)) + (field (type-and-name GList* selection)) + (field (type-and-name GtkSelectionMode selection_mode)) + (field (type-and-name GList* row_list)) +) + +(object CTree + (in-module Gtk) + (parent CList (Gtk)) + (c-name GtkCTree) + (field (type-and-name gint tree_indent)) + (field (type-and-name gint tree_spacing)) + (field (type-and-name gint tree_column)) + (field (type-and-name GtkCTreeLineStyle line_style)) + (field (type-and-name GtkCTreeExpanderStyle expander_style)) + (field (type-and-name GtkCList clist)) + (field (type-and-name GList* selection)) + (field (type-and-name GList* row_list)) +) + +(object Calendar + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkCalendar) + (field (type-and-name gint month)) + (field (type-and-name gint year)) + (field (type-and-name gint selected_day)) + (field (type-and-name gint num_marked_dates)) + (field (type-and-name gint* marked_date)) +) + +(object Window + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkWindow) +) + +(object Plug + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkPlug) +) + +(object FontSelectionDialog + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkFontSelectionDialog) + (field (type-and-name GtkWidget* fontsel)) + (field (type-and-name GtkWidget* main_vbox)) + (field (type-and-name GtkWidget* action_area)) + (field (type-and-name GtkWidget* ok_button)) + (field (type-and-name GtkWidget* apply_button)) + (field (type-and-name GtkWidget* cancel_button)) +) + +(object FileSelection + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkFileSelection) + (field (type-and-name GtkWidget* dir_list)) + (field (type-and-name GtkWidget* file_list)) + (field (type-and-name GtkWidget* selection_entry)) + (field (type-and-name GtkWidget* selection_text)) + (field (type-and-name GtkWidget* main_vbox)) + (field (type-and-name GtkWidget* ok_button)) + (field (type-and-name GtkWidget* cancel_button)) + (field (type-and-name GtkWidget* help_button)) +) + +(object Dialog + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkDialog) + (field (type-and-name GtkWidget* vbox)) + (field (type-and-name GtkWidget* action_area)) +) + +(object InputDialog + (in-module Gtk) + (parent Dialog (Gtk)) + (c-name GtkInputDialog) + (field (type-and-name GtkWidget* close_button)) + (field (type-and-name GtkWidget* save_button)) +) + +(object ColorSelectionDialog + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkColorSelectionDialog) + (field (type-and-name GtkWidget* colorsel)) + (field (type-and-name GtkWidget* main_vbox)) + (field (type-and-name GtkWidget* ok_button)) + (field (type-and-name GtkWidget* reset_button)) + (field (type-and-name GtkWidget* cancel_button)) + (field (type-and-name GtkWidget* help_button)) +) + +(object TipsQuery + (in-module Gtk) + (parent Label (Gtk)) + (c-name GtkTipsQuery) +) + +(object AspectFrame + (in-module Gtk) + (parent Frame (Gtk)) + (c-name GtkAspectFrame) +) + +;; Enumerations and flags ... + +(flags AccelFlags + (in-module Gtk) + (c-name GtkAccelFlags) + (value (name visible) (c-name GTK_ACCEL_VISIBLE)) + (value (name signal-visible) (c-name GTK_ACCEL_SIGNAL_VISIBLE)) + (value (name locked) (c-name GTK_ACCEL_LOCKED)) + (value (name mask) (c-name GTK_ACCEL_MASK)) +) + +(flags CalendarDisplayOptions + (in-module Gtk) + (c-name GtkCalendarDisplayOptions) + (value (name show-heading) (c-name GTK_CALENDAR_SHOW_HEADING)) + (value (name show-day-names) (c-name GTK_CALENDAR_SHOW_DAY_NAMES)) + (value (name no-month-change) (c-name GTK_CALENDAR_NO_MONTH_CHANGE)) + (value (name show-week-numbers) (c-name GTK_CALENDAR_SHOW_WEEK_NUMBERS)) + (value (name week-start-monday) (c-name GTK_CALENDAR_WEEK_START_MONDAY)) +) + +(enum CellType + (in-module Gtk) + (c-name GtkCellType) + (value (name empty) (c-name GTK_CELL_EMPTY)) + (value (name text) (c-name GTK_CELL_TEXT)) + (value (name pixmap) (c-name GTK_CELL_PIXMAP)) + (value (name pixtext) (c-name GTK_CELL_PIXTEXT)) + (value (name widget) (c-name GTK_CELL_WIDGET)) +) + +(enum CListDragPos + (in-module Gtk) + (c-name GtkCListDragPos) + (value (name none) (c-name GTK_CLIST_DRAG_NONE)) + (value (name before) (c-name GTK_CLIST_DRAG_BEFORE)) + (value (name into) (c-name GTK_CLIST_DRAG_INTO)) + (value (name after) (c-name GTK_CLIST_DRAG_AFTER)) +) + +(flags ButtonAction + (in-module Gtk) + (c-name GtkButtonAction) + (value (name ignored) (c-name GTK_BUTTON_IGNORED)) + (value (name selects) (c-name GTK_BUTTON_SELECTS)) + (value (name drags) (c-name GTK_BUTTON_DRAGS)) + (value (name expands) (c-name GTK_BUTTON_EXPANDS)) +) + +(enum CTreePos + (in-module Gtk) + (c-name GtkCTreePos) + (value (name before) (c-name GTK_CTREE_POS_BEFORE)) + (value (name as-child) (c-name GTK_CTREE_POS_AS_CHILD)) + (value (name after) (c-name GTK_CTREE_POS_AFTER)) +) + +(enum CTreeLineStyle + (in-module Gtk) + (c-name GtkCTreeLineStyle) + (value (name none) (c-name GTK_CTREE_LINES_NONE)) + (value (name solid) (c-name GTK_CTREE_LINES_SOLID)) + (value (name dotted) (c-name GTK_CTREE_LINES_DOTTED)) + (value (name tabbed) (c-name GTK_CTREE_LINES_TABBED)) +) + +(enum CTreeExpanderStyle + (in-module Gtk) + (c-name GtkCTreeExpanderStyle) + (value (name none) (c-name GTK_CTREE_EXPANDER_NONE)) + (value (name square) (c-name GTK_CTREE_EXPANDER_SQUARE)) + (value (name triangle) (c-name GTK_CTREE_EXPANDER_TRIANGLE)) + (value (name circular) (c-name GTK_CTREE_EXPANDER_CIRCULAR)) +) + +(enum CTreeExpansionType + (in-module Gtk) + (c-name GtkCTreeExpansionType) + (value (name expand) (c-name GTK_CTREE_EXPANSION_EXPAND)) + (value (name expand-recursive) (c-name GTK_CTREE_EXPANSION_EXPAND_RECURSIVE)) + (value (name collapse) (c-name GTK_CTREE_EXPANSION_COLLAPSE)) + (value (name collapse-recursive) (c-name GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE)) + (value (name toggle) (c-name GTK_CTREE_EXPANSION_TOGGLE)) + (value (name toggle-recursive) (c-name GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE)) +) + +(flags DebugFlag + (in-module Gtk) + (c-name GtkDebugFlag) + (value (name objects) (c-name GTK_DEBUG_OBJECTS)) + (value (name misc) (c-name GTK_DEBUG_MISC)) + (value (name signals) (c-name GTK_DEBUG_SIGNALS)) + (value (name dnd) (c-name GTK_DEBUG_DND)) + (value (name plugsocket) (c-name GTK_DEBUG_PLUGSOCKET)) +) + +(flags DestDefaults + (in-module Gtk) + (c-name GtkDestDefaults) + (value (name motion) (c-name GTK_DEST_DEFAULT_MOTION)) + (value (name highlight) (c-name GTK_DEST_DEFAULT_HIGHLIGHT)) + (value (name drop) (c-name GTK_DEST_DEFAULT_DROP)) + (value (name all) (c-name GTK_DEST_DEFAULT_ALL)) +) + +(flags TargetFlags + (in-module Gtk) + (c-name GtkTargetFlags) + (value (name app) (c-name GTK_TARGET_SAME_APP)) + (value (name widget) (c-name GTK_TARGET_SAME_WIDGET)) +) + +(enum ArrowType + (in-module Gtk) + (c-name GtkArrowType) + (value (name up) (c-name GTK_ARROW_UP)) + (value (name down) (c-name GTK_ARROW_DOWN)) + (value (name left) (c-name GTK_ARROW_LEFT)) + (value (name right) (c-name GTK_ARROW_RIGHT)) +) + +(flags AttachOptions + (in-module Gtk) + (c-name GtkAttachOptions) + (value (name expand) (c-name GTK_EXPAND)) + (value (name shrink) (c-name GTK_SHRINK)) + (value (name fill) (c-name GTK_FILL)) +) + +(enum ButtonBoxStyle + (in-module Gtk) + (c-name GtkButtonBoxStyle) + (value (name default-style) (c-name GTK_BUTTONBOX_DEFAULT_STYLE)) + (value (name spread) (c-name GTK_BUTTONBOX_SPREAD)) + (value (name edge) (c-name GTK_BUTTONBOX_EDGE)) + (value (name start) (c-name GTK_BUTTONBOX_START)) + (value (name end) (c-name GTK_BUTTONBOX_END)) +) + +(enum CurveType + (in-module Gtk) + (c-name GtkCurveType) + (value (name linear) (c-name GTK_CURVE_TYPE_LINEAR)) + (value (name spline) (c-name GTK_CURVE_TYPE_SPLINE)) + (value (name free) (c-name GTK_CURVE_TYPE_FREE)) +) + +(enum DirectionType + (in-module Gtk) + (c-name GtkDirectionType) + (value (name tab-forward) (c-name GTK_DIR_TAB_FORWARD)) + (value (name tab-backward) (c-name GTK_DIR_TAB_BACKWARD)) + (value (name up) (c-name GTK_DIR_UP)) + (value (name down) (c-name GTK_DIR_DOWN)) + (value (name left) (c-name GTK_DIR_LEFT)) + (value (name right) (c-name GTK_DIR_RIGHT)) +) + +(enum Justification + (in-module Gtk) + (c-name GtkJustification) + (value (name left) (c-name GTK_JUSTIFY_LEFT)) + (value (name right) (c-name GTK_JUSTIFY_RIGHT)) + (value (name center) (c-name GTK_JUSTIFY_CENTER)) + (value (name fill) (c-name GTK_JUSTIFY_FILL)) +) + +(enum MatchType + (in-module Gtk) + (c-name GtkMatchType) + (value (name all) (c-name GTK_MATCH_ALL)) + (value (name all-tail) (c-name GTK_MATCH_ALL_TAIL)) + (value (name head) (c-name GTK_MATCH_HEAD)) + (value (name tail) (c-name GTK_MATCH_TAIL)) + (value (name exact) (c-name GTK_MATCH_EXACT)) + (value (name last) (c-name GTK_MATCH_LAST)) +) + +(enum MenuDirectionType + (in-module Gtk) + (c-name GtkMenuDirectionType) + (value (name parent) (c-name GTK_MENU_DIR_PARENT)) + (value (name child) (c-name GTK_MENU_DIR_CHILD)) + (value (name next) (c-name GTK_MENU_DIR_NEXT)) + (value (name prev) (c-name GTK_MENU_DIR_PREV)) +) + +(enum MenuFactoryType + (in-module Gtk) + (c-name GtkMenuFactoryType) + (value (name menu) (c-name GTK_MENU_FACTORY_MENU)) + (value (name menu-bar) (c-name GTK_MENU_FACTORY_MENU_BAR)) + (value (name option-menu) (c-name GTK_MENU_FACTORY_OPTION_MENU)) +) + +(enum MetricType + (in-module Gtk) + (c-name GtkMetricType) + (value (name pixels) (c-name GTK_PIXELS)) + (value (name inches) (c-name GTK_INCHES)) + (value (name centimeters) (c-name GTK_CENTIMETERS)) +) + +(enum Orientation + (in-module Gtk) + (c-name GtkOrientation) + (value (name horizontal) (c-name GTK_ORIENTATION_HORIZONTAL)) + (value (name vertical) (c-name GTK_ORIENTATION_VERTICAL)) +) + +(enum CornerType + (in-module Gtk) + (c-name GtkCornerType) + (value (name top-left) (c-name GTK_CORNER_TOP_LEFT)) + (value (name bottom-left) (c-name GTK_CORNER_BOTTOM_LEFT)) + (value (name top-right) (c-name GTK_CORNER_TOP_RIGHT)) + (value (name bottom-right) (c-name GTK_CORNER_BOTTOM_RIGHT)) +) + +(enum PackType + (in-module Gtk) + (c-name GtkPackType) + (value (name start) (c-name GTK_PACK_START)) + (value (name end) (c-name GTK_PACK_END)) +) + +(enum PathPriorityType + (in-module Gtk) + (c-name GtkPathPriorityType) + (value (name lowest) (c-name GTK_PATH_PRIO_LOWEST)) + (value (name gtk) (c-name GTK_PATH_PRIO_GTK)) + (value (name application) (c-name GTK_PATH_PRIO_APPLICATION)) + (value (name rc) (c-name GTK_PATH_PRIO_RC)) + (value (name highest) (c-name GTK_PATH_PRIO_HIGHEST)) + (value (name mask) (c-name GTK_PATH_PRIO_MASK)) +) + +(enum PathType + (in-module Gtk) + (c-name GtkPathType) + (value (name widget) (c-name GTK_PATH_WIDGET)) + (value (name widget-class) (c-name GTK_PATH_WIDGET_CLASS)) + (value (name class) (c-name GTK_PATH_CLASS)) +) + +(enum PolicyType + (in-module Gtk) + (c-name GtkPolicyType) + (value (name always) (c-name GTK_POLICY_ALWAYS)) + (value (name automatic) (c-name GTK_POLICY_AUTOMATIC)) + (value (name never) (c-name GTK_POLICY_NEVER)) +) + +(enum PositionType + (in-module Gtk) + (c-name GtkPositionType) + (value (name left) (c-name GTK_POS_LEFT)) + (value (name right) (c-name GTK_POS_RIGHT)) + (value (name top) (c-name GTK_POS_TOP)) + (value (name bottom) (c-name GTK_POS_BOTTOM)) +) + +(enum PreviewType + (in-module Gtk) + (c-name GtkPreviewType) + (value (name color) (c-name GTK_PREVIEW_COLOR)) + (value (name grayscale) (c-name GTK_PREVIEW_GRAYSCALE)) +) + +(enum ReliefStyle + (in-module Gtk) + (c-name GtkReliefStyle) + (value (name normal) (c-name GTK_RELIEF_NORMAL)) + (value (name half) (c-name GTK_RELIEF_HALF)) + (value (name none) (c-name GTK_RELIEF_NONE)) +) + +(enum ResizeMode + (in-module Gtk) + (c-name GtkResizeMode) + (value (name parent) (c-name GTK_RESIZE_PARENT)) + (value (name queue) (c-name GTK_RESIZE_QUEUE)) + (value (name immediate) (c-name GTK_RESIZE_IMMEDIATE)) +) + +(flags SignalRunType + (in-module Gtk) + (c-name GtkSignalRunType) + (value (name first) (c-name GTK_RUN_FIRST)) + (value (name last) (c-name GTK_RUN_LAST)) + (value (name both) (c-name GTK_RUN_BOTH)) + (value (name no-recurse) (c-name GTK_RUN_NO_RECURSE)) + (value (name action) (c-name GTK_RUN_ACTION)) + (value (name no-hooks) (c-name GTK_RUN_NO_HOOKS)) +) + +(enum ScrollType + (in-module Gtk) + (c-name GtkScrollType) + (value (name none) (c-name GTK_SCROLL_NONE)) + (value (name step-backward) (c-name GTK_SCROLL_STEP_BACKWARD)) + (value (name step-forward) (c-name GTK_SCROLL_STEP_FORWARD)) + (value (name page-backward) (c-name GTK_SCROLL_PAGE_BACKWARD)) + (value (name page-forward) (c-name GTK_SCROLL_PAGE_FORWARD)) + (value (name jump) (c-name GTK_SCROLL_JUMP)) +) + +(enum SelectionMode + (in-module Gtk) + (c-name GtkSelectionMode) + (value (name single) (c-name GTK_SELECTION_SINGLE)) + (value (name browse) (c-name GTK_SELECTION_BROWSE)) + (value (name multiple) (c-name GTK_SELECTION_MULTIPLE)) + (value (name extended) (c-name GTK_SELECTION_EXTENDED)) +) + +(enum ShadowType + (in-module Gtk) + (c-name GtkShadowType) + (value (name none) (c-name GTK_SHADOW_NONE)) + (value (name in) (c-name GTK_SHADOW_IN)) + (value (name out) (c-name GTK_SHADOW_OUT)) + (value (name etched-in) (c-name GTK_SHADOW_ETCHED_IN)) + (value (name etched-out) (c-name GTK_SHADOW_ETCHED_OUT)) +) + +(enum StateType + (in-module Gtk) + (c-name GtkStateType) + (value (name normal) (c-name GTK_STATE_NORMAL)) + (value (name active) (c-name GTK_STATE_ACTIVE)) + (value (name prelight) (c-name GTK_STATE_PRELIGHT)) + (value (name selected) (c-name GTK_STATE_SELECTED)) + (value (name insensitive) (c-name GTK_STATE_INSENSITIVE)) +) + +(enum SubmenuDirection + (in-module Gtk) + (c-name GtkSubmenuDirection) + (value (name left) (c-name GTK_DIRECTION_LEFT)) + (value (name right) (c-name GTK_DIRECTION_RIGHT)) +) + +(enum SubmenuPlacement + (in-module Gtk) + (c-name GtkSubmenuPlacement) + (value (name top-bottom) (c-name GTK_TOP_BOTTOM)) + (value (name left-right) (c-name GTK_LEFT_RIGHT)) +) + +(enum ToolbarStyle + (in-module Gtk) + (c-name GtkToolbarStyle) + (value (name icons) (c-name GTK_TOOLBAR_ICONS)) + (value (name text) (c-name GTK_TOOLBAR_TEXT)) + (value (name both) (c-name GTK_TOOLBAR_BOTH)) +) + +(enum TroughType + (in-module Gtk) + (c-name GtkTroughType) + (value (name none) (c-name GTK_TROUGH_NONE)) + (value (name start) (c-name GTK_TROUGH_START)) + (value (name end) (c-name GTK_TROUGH_END)) + (value (name jump) (c-name GTK_TROUGH_JUMP)) +) + +(enum UpdateType + (in-module Gtk) + (c-name GtkUpdateType) + (value (name continuous) (c-name GTK_UPDATE_CONTINUOUS)) + (value (name discontinuous) (c-name GTK_UPDATE_DISCONTINUOUS)) + (value (name delayed) (c-name GTK_UPDATE_DELAYED)) +) + +(enum Visibility + (in-module Gtk) + (c-name GtkVisibility) + (value (name none) (c-name GTK_VISIBILITY_NONE)) + (value (name partial) (c-name GTK_VISIBILITY_PARTIAL)) + (value (name full) (c-name GTK_VISIBILITY_FULL)) +) + +(enum WindowPosition + (in-module Gtk) + (c-name GtkWindowPosition) + (value (name none) (c-name GTK_WIN_POS_NONE)) + (value (name center) (c-name GTK_WIN_POS_CENTER)) + (value (name mouse) (c-name GTK_WIN_POS_MOUSE)) + (value (name center-always) (c-name GTK_WIN_POS_CENTER_ALWAYS)) +) + +(enum WindowType + (in-module Gtk) + (c-name GtkWindowType) + (value (name toplevel) (c-name GTK_WINDOW_TOPLEVEL)) + (value (name dialog) (c-name GTK_WINDOW_DIALOG)) + (value (name popup) (c-name GTK_WINDOW_POPUP)) +) + +(enum SortType + (in-module Gtk) + (c-name GtkSortType) + (value (name ascending) (c-name GTK_SORT_ASCENDING)) + (value (name descending) (c-name GTK_SORT_DESCENDING)) +) + +(enum FontMetricType + (in-module Gtk) + (c-name GtkFontMetricType) + (value (name ixels) (c-name GTK_FONT_METRIC_PIXELS)) + (value (name oints) (c-name GTK_FONT_METRIC_POINTS)) +) + +(flags FontType + (in-module Gtk) + (c-name GtkFontType) + (value (name bitmap) (c-name GTK_FONT_BITMAP)) + (value (name scalable) (c-name GTK_FONT_SCALABLE)) + (value (name scalable-bitmap) (c-name GTK_FONT_SCALABLE_BITMAP)) + (value (name all) (c-name GTK_FONT_ALL)) +) + +(enum FontFilterType + (in-module Gtk) + (c-name GtkFontFilterType) + (value (name base) (c-name GTK_FONT_FILTER_BASE)) + (value (name user) (c-name GTK_FONT_FILTER_USER)) +) + +(flags ObjectFlags + (in-module Gtk) + (c-name GtkObjectFlags) + (value (name destroyed) (c-name GTK_DESTROYED)) + (value (name floating) (c-name GTK_FLOATING)) + (value (name connected) (c-name GTK_CONNECTED)) + (value (name constructed) (c-name GTK_CONSTRUCTED)) +) + +(flags ArgFlags + (in-module Gtk) + (c-name GtkArgFlags) + (value (name readable) (c-name GTK_ARG_READABLE)) + (value (name writable) (c-name GTK_ARG_WRITABLE)) + (value (name construct) (c-name GTK_ARG_CONSTRUCT)) + (value (name construct-only) (c-name GTK_ARG_CONSTRUCT_ONLY)) + (value (name child-arg) (c-name GTK_ARG_CHILD_ARG)) + (value (name mask) (c-name GTK_ARG_MASK)) + (value (name readwrite) (c-name GTK_ARG_READWRITE)) +) + +(flags PackerOptions + (in-module Gtk) + (c-name GtkPackerOptions) + (value (name pack-expand) (c-name GTK_PACK_EXPAND)) + (value (name fill-x) (c-name GTK_FILL_X)) + (value (name fill-y) (c-name GTK_FILL_Y)) +) + +(enum SideType + (in-module Gtk) + (c-name GtkSideType) + (value (name top) (c-name GTK_SIDE_TOP)) + (value (name bottom) (c-name GTK_SIDE_BOTTOM)) + (value (name left) (c-name GTK_SIDE_LEFT)) + (value (name right) (c-name GTK_SIDE_RIGHT)) +) + +(enum AnchorType + (in-module Gtk) + (c-name GtkAnchorType) + (value (name center) (c-name GTK_ANCHOR_CENTER)) + (value (name north) (c-name GTK_ANCHOR_NORTH)) + (value (name north-west) (c-name GTK_ANCHOR_NORTH_WEST)) + (value (name north-east) (c-name GTK_ANCHOR_NORTH_EAST)) + (value (name south) (c-name GTK_ANCHOR_SOUTH)) + (value (name south-west) (c-name GTK_ANCHOR_SOUTH_WEST)) + (value (name south-east) (c-name GTK_ANCHOR_SOUTH_EAST)) + (value (name west) (c-name GTK_ANCHOR_WEST)) + (value (name east) (c-name GTK_ANCHOR_EAST)) + (value (name n) (c-name GTK_ANCHOR_N)) + (value (name nw) (c-name GTK_ANCHOR_NW)) + (value (name ne) (c-name GTK_ANCHOR_NE)) + (value (name s) (c-name GTK_ANCHOR_S)) + (value (name sw) (c-name GTK_ANCHOR_SW)) + (value (name se) (c-name GTK_ANCHOR_SE)) + (value (name w) (c-name GTK_ANCHOR_W)) + (value (name e) (c-name GTK_ANCHOR_E)) +) + +(flags PrivateFlags + (in-module Gtk) + (c-name GtkPrivateFlags) + (value (name user-style) (c-name PRIVATE_GTK_USER_STYLE)) + (value (name redraw-pending) (c-name PRIVATE_GTK_REDRAW_PENDING)) + (value (name resize-pending) (c-name PRIVATE_GTK_RESIZE_PENDING)) + (value (name resize-needed) (c-name PRIVATE_GTK_RESIZE_NEEDED)) + (value (name leave-pending) (c-name PRIVATE_GTK_LEAVE_PENDING)) + (value (name has-shape-mask) (c-name PRIVATE_GTK_HAS_SHAPE_MASK)) + (value (name in-reparent) (c-name PRIVATE_GTK_IN_REPARENT)) + (value (name is-offscreen) (c-name PRIVATE_GTK_IS_OFFSCREEN)) + (value (name fulldraw-pending) (c-name PRIVATE_GTK_FULLDRAW_PENDING)) +) + +(enum ProgressBarStyle + (in-module Gtk) + (c-name GtkProgressBarStyle) + (value (name continuous) (c-name GTK_PROGRESS_CONTINUOUS)) + (value (name discrete) (c-name GTK_PROGRESS_DISCRETE)) +) + +(enum ProgressBarOrientation + (in-module Gtk) + (c-name GtkProgressBarOrientation) + (value (name left-to-right) (c-name GTK_PROGRESS_LEFT_TO_RIGHT)) + (value (name right-to-left) (c-name GTK_PROGRESS_RIGHT_TO_LEFT)) + (value (name bottom-to-top) (c-name GTK_PROGRESS_BOTTOM_TO_TOP)) + (value (name top-to-bottom) (c-name GTK_PROGRESS_TOP_TO_BOTTOM)) +) + +(flags RcFlags + (in-module Gtk) + (c-name GtkRcFlags) + (value (name fg) (c-name GTK_RC_FG)) + (value (name bg) (c-name GTK_RC_BG)) + (value (name text) (c-name GTK_RC_TEXT)) + (value (name base) (c-name GTK_RC_BASE)) +) + +(enum RcTokenType + (in-module Gtk) + (c-name GtkRcTokenType) + (value (name invalid) (c-name GTK_RC_TOKEN_INVALID)) + (value (name include) (c-name GTK_RC_TOKEN_INCLUDE)) + (value (name normal) (c-name GTK_RC_TOKEN_NORMAL)) + (value (name active) (c-name GTK_RC_TOKEN_ACTIVE)) + (value (name prelight) (c-name GTK_RC_TOKEN_PRELIGHT)) + (value (name selected) (c-name GTK_RC_TOKEN_SELECTED)) + (value (name insensitive) (c-name GTK_RC_TOKEN_INSENSITIVE)) + (value (name fg) (c-name GTK_RC_TOKEN_FG)) + (value (name bg) (c-name GTK_RC_TOKEN_BG)) + (value (name base) (c-name GTK_RC_TOKEN_BASE)) + (value (name text) (c-name GTK_RC_TOKEN_TEXT)) + (value (name font) (c-name GTK_RC_TOKEN_FONT)) + (value (name fontset) (c-name GTK_RC_TOKEN_FONTSET)) + (value (name bg-pixmap) (c-name GTK_RC_TOKEN_BG_PIXMAP)) + (value (name pixmap-path) (c-name GTK_RC_TOKEN_PIXMAP_PATH)) + (value (name style) (c-name GTK_RC_TOKEN_STYLE)) + (value (name binding) (c-name GTK_RC_TOKEN_BINDING)) + (value (name bind) (c-name GTK_RC_TOKEN_BIND)) + (value (name widget) (c-name GTK_RC_TOKEN_WIDGET)) + (value (name widget-class) (c-name GTK_RC_TOKEN_WIDGET_CLASS)) + (value (name class) (c-name GTK_RC_TOKEN_CLASS)) + (value (name lowest) (c-name GTK_RC_TOKEN_LOWEST)) + (value (name gtk) (c-name GTK_RC_TOKEN_GTK)) + (value (name application) (c-name GTK_RC_TOKEN_APPLICATION)) + (value (name rc) (c-name GTK_RC_TOKEN_RC)) + (value (name highest) (c-name GTK_RC_TOKEN_HIGHEST)) + (value (name engine) (c-name GTK_RC_TOKEN_ENGINE)) + (value (name module-path) (c-name GTK_RC_TOKEN_MODULE_PATH)) + (value (name last) (c-name GTK_RC_TOKEN_LAST)) +) + +(enum SpinButtonUpdatePolicy + (in-module Gtk) + (c-name GtkSpinButtonUpdatePolicy) + (value (name always) (c-name GTK_UPDATE_ALWAYS)) + (value (name if-valid) (c-name GTK_UPDATE_IF_VALID)) +) + +(enum SpinType + (in-module Gtk) + (c-name GtkSpinType) + (value (name step-forward) (c-name GTK_SPIN_STEP_FORWARD)) + (value (name step-backward) (c-name GTK_SPIN_STEP_BACKWARD)) + (value (name page-forward) (c-name GTK_SPIN_PAGE_FORWARD)) + (value (name page-backward) (c-name GTK_SPIN_PAGE_BACKWARD)) + (value (name home) (c-name GTK_SPIN_HOME)) + (value (name end) (c-name GTK_SPIN_END)) + (value (name user-defined) (c-name GTK_SPIN_USER_DEFINED)) +) + +(enum ToolbarChildType + (in-module Gtk) + (c-name GtkToolbarChildType) + (value (name space) (c-name GTK_TOOLBAR_CHILD_SPACE)) + (value (name button) (c-name GTK_TOOLBAR_CHILD_BUTTON)) + (value (name togglebutton) (c-name GTK_TOOLBAR_CHILD_TOGGLEBUTTON)) + (value (name radiobutton) (c-name GTK_TOOLBAR_CHILD_RADIOBUTTON)) + (value (name widget) (c-name GTK_TOOLBAR_CHILD_WIDGET)) +) + +(enum ToolbarSpaceStyle + (in-module Gtk) + (c-name GtkToolbarSpaceStyle) + (value (name empty) (c-name GTK_TOOLBAR_SPACE_EMPTY)) + (value (name line) (c-name GTK_TOOLBAR_SPACE_LINE)) +) + +(enum TreeViewMode + (in-module Gtk) + (c-name GtkTreeViewMode) + (value (name line) (c-name GTK_TREE_VIEW_LINE)) + (value (name item) (c-name GTK_TREE_VIEW_ITEM)) +) + +(enum FundamentalType + (in-module Gtk) + (c-name GtkFundamentalType) + (value (name invalid) (c-name GTK_TYPE_INVALID)) + (value (name none) (c-name GTK_TYPE_NONE)) + (value (name char) (c-name GTK_TYPE_CHAR)) + (value (name uchar) (c-name GTK_TYPE_UCHAR)) + (value (name bool) (c-name GTK_TYPE_BOOL)) + (value (name int) (c-name GTK_TYPE_INT)) + (value (name uint) (c-name GTK_TYPE_UINT)) + (value (name long) (c-name GTK_TYPE_LONG)) + (value (name ulong) (c-name GTK_TYPE_ULONG)) + (value (name float) (c-name GTK_TYPE_FLOAT)) + (value (name double) (c-name GTK_TYPE_DOUBLE)) + (value (name string) (c-name GTK_TYPE_STRING)) + (value (name enum) (c-name GTK_TYPE_ENUM)) + (value (name flags) (c-name GTK_TYPE_FLAGS)) + (value (name boxed) (c-name GTK_TYPE_BOXED)) + (value (name pointer) (c-name GTK_TYPE_POINTER)) + (value (name signal) (c-name GTK_TYPE_SIGNAL)) + (value (name args) (c-name GTK_TYPE_ARGS)) + (value (name callback) (c-name GTK_TYPE_CALLBACK)) + (value (name c-callback) (c-name GTK_TYPE_C_CALLBACK)) + (value (name foreign) (c-name GTK_TYPE_FOREIGN)) + (value (name object) (c-name GTK_TYPE_OBJECT)) +) + +(flags WidgetFlags + (in-module Gtk) + (c-name GtkWidgetFlags) + (value (name toplevel) (c-name GTK_TOPLEVEL)) + (value (name no-window) (c-name GTK_NO_WINDOW)) + (value (name realized) (c-name GTK_REALIZED)) + (value (name mapped) (c-name GTK_MAPPED)) + (value (name visible) (c-name GTK_VISIBLE)) + (value (name sensitive) (c-name GTK_SENSITIVE)) + (value (name parent-sensitive) (c-name GTK_PARENT_SENSITIVE)) + (value (name can-focus) (c-name GTK_CAN_FOCUS)) + (value (name has-focus) (c-name GTK_HAS_FOCUS)) + (value (name can-default) (c-name GTK_CAN_DEFAULT)) + (value (name has-default) (c-name GTK_HAS_DEFAULT)) + (value (name has-grab) (c-name GTK_HAS_GRAB)) + (value (name rc-style) (c-name GTK_RC_STYLE)) + (value (name composite-child) (c-name GTK_COMPOSITE_CHILD)) + (value (name no-reparent) (c-name GTK_NO_REPARENT)) + (value (name app-paintable) (c-name GTK_APP_PAINTABLE)) + (value (name receives-default) (c-name GTK_RECEIVES_DEFAULT)) +) + + +(include "gtk-extrafuncs.defs") + + +;; From /usr/include/gtk/gtk.h + + + +;; From /usr/include/gtk/gtkaccelgroup.h + +(function gtk_accelerator_valid + (c-name gtk_accelerator_valid) + (return-type gboolean) + (parameter (type-and-name guint keyval)) + (parameter (type-and-name GdkModifierType modifiers)) +) + +(function gtk_accelerator_parse + (c-name gtk_accelerator_parse) + (return-type none) + (parameter (type-and-name const-gchar* accelerator)) + (parameter (type-and-name guint* accelerator_key)) + (parameter (type-and-name GdkModifierType* accelerator_mods)) +) + +(function gtk_accelerator_name + (c-name gtk_accelerator_name) + (return-type gchar*) + (parameter (type-and-name guint accelerator_key)) + (parameter (type-and-name GdkModifierType accelerator_mods)) +) + +(function gtk_accelerator_set_default_mod_mask + (c-name gtk_accelerator_set_default_mod_mask) + (return-type none) + (parameter (type-and-name GdkModifierType default_mod_mask)) +) + +(function gtk_accelerator_get_default_mod_mask + (c-name gtk_accelerator_get_default_mod_mask) + (return-type guint) +) + +(function GtkAccelGroup + (c-name gtk_accel_group_new) + (return-type GtkAccelGroup*) +) + +(function accel_group_get_default + (c-name gtk_accel_group_get_default) + (return-type GtkAccelGroup*) +) + +(method ref + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_ref) + (return-type GtkAccelGroup*) +) + +(method unref + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_unref) + (return-type none) +) + +(method lock + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_lock) + (return-type none) +) + +(method unlock + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_unlock) + (return-type none) +) + +(function gtk_accel_groups_activate + (c-name gtk_accel_groups_activate) + (return-type gboolean) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method activate + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_activate) + (return-type gboolean) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method attach + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_attach) + (return-type none) + (parameter (type-and-name GtkObject* object)) +) + +(method detach + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_detach) + (return-type none) + (parameter (type-and-name GtkObject* object)) +) + +(method get_entry + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_get_entry) + (return-type GtkAccelEntry*) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method lock_entry + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_lock_entry) + (return-type none) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method unlock_entry + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_unlock_entry) + (return-type none) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method add + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_add) + (return-type none) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) + (parameter (type-and-name GtkAccelFlags accel_flags)) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* accel_signal)) +) + +(method remove + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_remove) + (return-type none) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) + (parameter (type-and-name GtkObject* object)) +) + +(function gtk_accel_group_handle_add + (c-name gtk_accel_group_handle_add) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint accel_signal_id)) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) + (parameter (type-and-name GtkAccelFlags accel_flags)) +) + +(function gtk_accel_group_handle_remove + (c-name gtk_accel_group_handle_remove) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(function gtk_accel_group_create_add + (c-name gtk_accel_group_create_add) + (return-type guint) + (parameter (type-and-name GtkType class_type)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name guint handler_offset)) +) + +(function gtk_accel_group_create_remove + (c-name gtk_accel_group_create_remove) + (return-type guint) + (parameter (type-and-name GtkType class_type)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name guint handler_offset)) +) + +(function gtk_accel_groups_from_object + (c-name gtk_accel_groups_from_object) + (return-type GSList*) + (parameter (type-and-name GtkObject* object)) +) + +(function gtk_accel_group_entries_from_object + (c-name gtk_accel_group_entries_from_object) + (return-type GSList*) + (parameter (type-and-name GtkObject* object)) +) + + + +;; From /usr/include/gtk/gtkaccellabel.h + +(function gtk_accel_label_get_type + (c-name gtk_accel_label_get_type) + (return-type GtkType) +) + +(function gtk_accel_label_new + (c-name gtk_accel_label_new) + (is-constructor-of GtkAccelLabel) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* string)) +) + +(method get_accel_width + (of-object AccelLabel (Gtk)) + (c-name gtk_accel_label_get_accel_width) + (return-type guint) +) + +(method set_accel_widget + (of-object AccelLabel (Gtk)) + (c-name gtk_accel_label_set_accel_widget) + (return-type none) + (parameter (type-and-name GtkWidget* accel_widget)) +) + +(method refetch + (of-object AccelLabel (Gtk)) + (c-name gtk_accel_label_refetch) + (return-type gboolean) +) + + + +;; From /usr/include/gtk/gtkadjustment.h + +(function gtk_adjustment_get_type + (c-name gtk_adjustment_get_type) + (return-type GtkType) +) + +(function gtk_adjustment_new + (c-name gtk_adjustment_new) + (is-constructor-of GtkAdjustment) + (return-type GtkObject*) + (parameter (type-and-name gfloat value)) + (parameter (type-and-name gfloat lower)) + (parameter (type-and-name gfloat upper)) + (parameter (type-and-name gfloat step_increment)) + (parameter (type-and-name gfloat page_increment)) + (parameter (type-and-name gfloat page_size)) +) + +(method changed + (of-object Adjustment (Gtk)) + (c-name gtk_adjustment_changed) + (return-type none) +) + +(method value_changed + (of-object Adjustment (Gtk)) + (c-name gtk_adjustment_value_changed) + (return-type none) +) + +(method clamp_page + (of-object Adjustment (Gtk)) + (c-name gtk_adjustment_clamp_page) + (return-type none) + (parameter (type-and-name gfloat lower)) + (parameter (type-and-name gfloat upper)) +) + +(method set_value + (of-object Adjustment (Gtk)) + (c-name gtk_adjustment_set_value) + (return-type none) + (parameter (type-and-name gfloat value)) +) + + + +;; From /usr/include/gtk/gtkalignment.h + +(function gtk_alignment_get_type + (c-name gtk_alignment_get_type) + (return-type GtkType) +) + +(function gtk_alignment_new + (c-name gtk_alignment_new) + (is-constructor-of GtkAlignment) + (return-type GtkWidget*) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) + (parameter (type-and-name gfloat xscale)) + (parameter (type-and-name gfloat yscale)) +) + +(method set + (of-object Alignment (Gtk)) + (c-name gtk_alignment_set) + (return-type none) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) + (parameter (type-and-name gfloat xscale)) + (parameter (type-and-name gfloat yscale)) +) + + + +;; From /usr/include/gtk/gtkarrow.h + +(function gtk_arrow_get_type + (c-name gtk_arrow_get_type) + (return-type GtkType) +) + +(function gtk_arrow_new + (c-name gtk_arrow_new) + (is-constructor-of GtkArrow) + (return-type GtkWidget*) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name GtkShadowType shadow_type)) +) + +(method set + (of-object Arrow (Gtk)) + (c-name gtk_arrow_set) + (return-type none) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name GtkShadowType shadow_type)) +) + + + +;; From /usr/include/gtk/gtkaspectframe.h + +(function gtk_aspect_frame_get_type + (c-name gtk_aspect_frame_get_type) + (return-type GtkType) +) + +(function gtk_aspect_frame_new + (c-name gtk_aspect_frame_new) + (is-constructor-of GtkAspectFrame) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label) (null-ok) (default "NULL")) + (parameter (type-and-name gfloat xalign) (default "0.5")) + (parameter (type-and-name gfloat yalign) (default "0.5")) + (parameter (type-and-name gfloat ratio) (default "1.0")) + (parameter (type-and-name gboolean obey_child) (default "TRUE")) +) + +(method set + (of-object AspectFrame (Gtk)) + (c-name gtk_aspect_frame_set) + (return-type none) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) + (parameter (type-and-name gfloat ratio)) + (parameter (type-and-name gboolean obey_child)) +) + + + +;; From /usr/include/gtk/gtkbbox.h + +(function gtk_button_box_get_type + (c-name gtk_button_box_get_type) + (return-type GtkType) +) + +(function button_box_get_child_size_default + (c-name gtk_button_box_get_child_size_default) + (return-type none) + (parameter (type-and-name gint* min_width)) + (parameter (type-and-name gint* min_height)) +) + +(function button_box_get_child_ipadding_default + (c-name gtk_button_box_get_child_ipadding_default) + (return-type none) + (parameter (type-and-name gint* ipad_x)) + (parameter (type-and-name gint* ipad_y)) +) + +(function button_box_set_child_size_default + (c-name gtk_button_box_set_child_size_default) + (return-type none) + (parameter (type-and-name gint min_width)) + (parameter (type-and-name gint min_height)) +) + +(function button_box_set_child_ipadding_default + (c-name gtk_button_box_set_child_ipadding_default) + (return-type none) + (parameter (type-and-name gint ipad_x)) + (parameter (type-and-name gint ipad_y)) +) + +(method get_spacing + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_get_spacing) + (return-type gint) +) + +(method get_layout + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_get_layout) + (return-type GtkButtonBoxStyle) +) + +(method get_child_size + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_get_child_size) + (return-type none) + (parameter (type-and-name gint* min_width)) + (parameter (type-and-name gint* min_height)) +) + +(method get_child_ipadding + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_get_child_ipadding) + (return-type none) + (parameter (type-and-name gint* ipad_x)) + (parameter (type-and-name gint* ipad_y)) +) + +(method set_spacing + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_set_spacing) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(method set_layout + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_set_layout) + (return-type none) + (parameter (type-and-name GtkButtonBoxStyle layout_style)) +) + +(method set_child_size + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_set_child_size) + (return-type none) + (parameter (type-and-name gint min_width)) + (parameter (type-and-name gint min_height)) +) + +(method set_child_ipadding + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_set_child_ipadding) + (return-type none) + (parameter (type-and-name gint ipad_x)) + (parameter (type-and-name gint ipad_y)) +) + +(function gtk_button_box_child_requisition + (c-name gtk_button_box_child_requisition) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name int* nvis_children)) + (parameter (type-and-name int* width)) + (parameter (type-and-name int* height)) +) + + + +;; From /usr/include/gtk/gtkbin.h + +(function gtk_bin_get_type + (c-name gtk_bin_get_type) + (return-type GtkType) +) + + + +;; From /usr/include/gtk/gtkbox.h + +(function gtk_box_get_type + (c-name gtk_box_get_type) + (return-type GtkType) +) + +(method pack_start + (of-object Box (Gtk)) + (c-name gtk_box_pack_start) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean expand) (default "TRUE")) + (parameter (type-and-name gboolean fill) (default "TRUE")) + (parameter (type-and-name guint padding) (default "0")) +) + +(method pack_end + (of-object Box (Gtk)) + (c-name gtk_box_pack_end) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean expand) (default "TRUE")) + (parameter (type-and-name gboolean fill) (default "TRUE")) + (parameter (type-and-name guint padding) (default "0")) +) + +(method pack_start_defaults + (of-object Box (Gtk)) + (c-name gtk_box_pack_start_defaults) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(method pack_end_defaults + (of-object Box (Gtk)) + (c-name gtk_box_pack_end_defaults) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(method set_homogeneous + (of-object Box (Gtk)) + (c-name gtk_box_set_homogeneous) + (return-type none) + (parameter (type-and-name gboolean homogeneous)) +) + +(method set_spacing + (of-object Box (Gtk)) + (c-name gtk_box_set_spacing) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(method reorder_child + (of-object Box (Gtk)) + (c-name gtk_box_reorder_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method query_child_packing + (of-object Box (Gtk)) + (c-name gtk_box_query_child_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean* expand)) + (parameter (type-and-name gboolean* fill)) + (parameter (type-and-name guint* padding)) + (parameter (type-and-name GtkPackType* pack_type)) +) + +(method set_child_packing + (of-object Box (Gtk)) + (c-name gtk_box_set_child_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean expand)) + (parameter (type-and-name gboolean fill)) + (parameter (type-and-name guint padding)) + (parameter (type-and-name GtkPackType pack_type)) +) + + + +;; From /usr/include/gtk/gtkbutton.h + +(function gtk_button_get_type + (c-name gtk_button_get_type) + (return-type GtkType) +) + +(function gtk_button_new + (c-name gtk_button_new) + (is-constructor-of GtkButton) + (return-type GtkWidget*) +) + +(function gtk_button_new_with_label + (c-name gtk_button_new_with_label) + (is-constructor-of GtkButton) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method pressed + (of-object Button (Gtk)) + (c-name gtk_button_pressed) + (return-type none) +) + +(method released + (of-object Button (Gtk)) + (c-name gtk_button_released) + (return-type none) +) + +(method clicked + (of-object Button (Gtk)) + (c-name gtk_button_clicked) + (return-type none) +) + +(method enter + (of-object Button (Gtk)) + (c-name gtk_button_enter) + (return-type none) +) + +(method leave + (of-object Button (Gtk)) + (c-name gtk_button_leave) + (return-type none) +) + +(method set_relief + (of-object Button (Gtk)) + (c-name gtk_button_set_relief) + (return-type none) + (parameter (type-and-name GtkReliefStyle newstyle)) +) + +(method get_relief + (of-object Button (Gtk)) + (c-name gtk_button_get_relief) + (return-type GtkReliefStyle) +) + + + +;; From /usr/include/gtk/gtkcalendar.h + +(function gtk_calendar_get_type + (c-name gtk_calendar_get_type) + (return-type GtkType) +) + +(function gtk_calendar_new + (c-name gtk_calendar_new) + (is-constructor-of GtkCalendar) + (return-type GtkWidget*) +) + +(method select_month + (of-object Calendar (Gtk)) + (c-name gtk_calendar_select_month) + (return-type gint) + (parameter (type-and-name guint month)) + (parameter (type-and-name guint year)) +) + +(method select_day + (of-object Calendar (Gtk)) + (c-name gtk_calendar_select_day) + (return-type none) + (parameter (type-and-name guint day)) +) + +(method mark_day + (of-object Calendar (Gtk)) + (c-name gtk_calendar_mark_day) + (return-type gint) + (parameter (type-and-name guint day)) +) + +(method unmark_day + (of-object Calendar (Gtk)) + (c-name gtk_calendar_unmark_day) + (return-type gint) + (parameter (type-and-name guint day)) +) + +(method clear_marks + (of-object Calendar (Gtk)) + (c-name gtk_calendar_clear_marks) + (return-type none) +) + +(method display_options + (of-object Calendar (Gtk)) + (c-name gtk_calendar_display_options) + (return-type none) + (parameter (type-and-name GtkCalendarDisplayOptions flags)) +) + +(method get_date + (of-object Calendar (Gtk)) + (c-name gtk_calendar_get_date) + (return-type none) + (parameter (type-and-name guint* year)) + (parameter (type-and-name guint* month)) + (parameter (type-and-name guint* day)) +) + +(method freeze + (of-object Calendar (Gtk)) + (c-name gtk_calendar_freeze) + (return-type none) +) + +(method thaw + (of-object Calendar (Gtk)) + (c-name gtk_calendar_thaw) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkcheckbutton.h + +(function gtk_check_button_get_type + (c-name gtk_check_button_get_type) + (return-type GtkType) +) + +(function gtk_check_button_new + (c-name gtk_check_button_new) + (is-constructor-of GtkCheckButton) + (return-type GtkWidget*) +) + +(function gtk_check_button_new_with_label + (c-name gtk_check_button_new_with_label) + (is-constructor-of GtkCheckButton) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + + + +;; From /usr/include/gtk/gtkcheckmenuitem.h + +(function gtk_check_menu_item_get_type + (c-name gtk_check_menu_item_get_type) + (return-type GtkType) +) + +(function gtk_check_menu_item_new + (c-name gtk_check_menu_item_new) + (is-constructor-of GtkCheckMenuItem) + (return-type GtkWidget*) +) + +(function gtk_check_menu_item_new_with_label + (c-name gtk_check_menu_item_new_with_label) + (is-constructor-of GtkCheckMenuItem) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method set_active + (of-object CheckMenuItem (Gtk)) + (c-name gtk_check_menu_item_set_active) + (return-type none) + (parameter (type-and-name gboolean is_active)) +) + +(method set_show_toggle + (of-object CheckMenuItem (Gtk)) + (c-name gtk_check_menu_item_set_show_toggle) + (return-type none) + (parameter (type-and-name gboolean always)) +) + +(method toggled + (of-object CheckMenuItem (Gtk)) + (c-name gtk_check_menu_item_toggled) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkclist.h + +(function gtk_clist_get_type + (c-name gtk_clist_get_type) + (return-type GtkType) +) + +(method construct + (of-object CList (Gtk)) + (c-name gtk_clist_construct) + (return-type none) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gchar*[] titles)) +) + +(function gtk_clist_new + (c-name gtk_clist_new) + (is-constructor-of GtkCList) + (return-type GtkWidget*) + (parameter (type-and-name gint columns)) +) + +(function gtk_clist_new_with_titles + (c-name gtk_clist_new_with_titles) + (is-constructor-of GtkCList) + (return-type GtkWidget*) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gchar*[] titles)) +) + +(method set_hadjustment + (of-object CList (Gtk)) + (c-name gtk_clist_set_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_vadjustment + (of-object CList (Gtk)) + (c-name gtk_clist_set_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method get_hadjustment + (of-object CList (Gtk)) + (c-name gtk_clist_get_hadjustment) + (return-type GtkAdjustment*) +) + +(method get_vadjustment + (of-object CList (Gtk)) + (c-name gtk_clist_get_vadjustment) + (return-type GtkAdjustment*) +) + +(method set_shadow_type + (of-object CList (Gtk)) + (c-name gtk_clist_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + +(method set_selection_mode + (of-object CList (Gtk)) + (c-name gtk_clist_set_selection_mode) + (return-type none) + (parameter (type-and-name GtkSelectionMode mode)) +) + +(method set_reorderable + (of-object CList (Gtk)) + (c-name gtk_clist_set_reorderable) + (return-type none) + (parameter (type-and-name gboolean reorderable)) +) + +(method set_use_drag_icons + (of-object CList (Gtk)) + (c-name gtk_clist_set_use_drag_icons) + (return-type none) + (parameter (type-and-name gboolean use_icons)) +) + +(method set_button_actions + (of-object CList (Gtk)) + (c-name gtk_clist_set_button_actions) + (return-type none) + (parameter (type-and-name guint button)) + (parameter (type-and-name guint8 button_actions)) +) + +(method freeze + (of-object CList (Gtk)) + (c-name gtk_clist_freeze) + (return-type none) +) + +(method thaw + (of-object CList (Gtk)) + (c-name gtk_clist_thaw) + (return-type none) +) + +(method column_titles_show + (of-object CList (Gtk)) + (c-name gtk_clist_column_titles_show) + (return-type none) +) + +(method column_titles_hide + (of-object CList (Gtk)) + (c-name gtk_clist_column_titles_hide) + (return-type none) +) + +(method column_title_active + (of-object CList (Gtk)) + (c-name gtk_clist_column_title_active) + (return-type none) + (parameter (type-and-name gint column)) +) + +(method column_title_passive + (of-object CList (Gtk)) + (c-name gtk_clist_column_title_passive) + (return-type none) + (parameter (type-and-name gint column)) +) + +(method column_titles_active + (of-object CList (Gtk)) + (c-name gtk_clist_column_titles_active) + (return-type none) +) + +(method column_titles_passive + (of-object CList (Gtk)) + (c-name gtk_clist_column_titles_passive) + (return-type none) +) + +(method set_column_title + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_title) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* title)) +) + +(method get_column_title + (of-object CList (Gtk)) + (c-name gtk_clist_get_column_title) + (return-type gchar*) + (parameter (type-and-name gint column)) +) + +(method set_column_widget + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_widget) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name GtkWidget* widget)) +) + +(method get_column_widget + (of-object CList (Gtk)) + (c-name gtk_clist_get_column_widget) + (return-type GtkWidget*) + (parameter (type-and-name gint column)) +) + +(method set_column_justification + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_justification) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name GtkJustification justification)) +) + +(method set_column_visibility + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_visibility) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gboolean visible)) +) + +(method set_column_resizeable + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_resizeable) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gboolean resizeable)) +) + +(method set_column_auto_resize + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_auto_resize) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gboolean auto_resize)) +) + +(method columns_autosize + (of-object CList (Gtk)) + (c-name gtk_clist_columns_autosize) + (return-type gint) +) + +(method optimal_column_width + (of-object CList (Gtk)) + (c-name gtk_clist_optimal_column_width) + (return-type gint) + (parameter (type-and-name gint column)) +) + +(method set_column_width + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_width) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint width)) +) + +(method set_column_min_width + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_min_width) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint min_width)) +) + +(method set_column_max_width + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_max_width) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint max_width)) +) + +(method set_row_height + (of-object CList (Gtk)) + (c-name gtk_clist_set_row_height) + (return-type none) + (parameter (type-and-name guint height)) +) + +(method moveto + (of-object CList (Gtk)) + (c-name gtk_clist_moveto) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gfloat row_align)) + (parameter (type-and-name gfloat col_align)) +) + +(method row_is_visible + (of-object CList (Gtk)) + (c-name gtk_clist_row_is_visible) + (return-type GtkVisibility) + (parameter (type-and-name gint row)) +) + +(method get_cell_type + (of-object CList (Gtk)) + (c-name gtk_clist_get_cell_type) + (return-type GtkCellType) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) +) + +(method set_text + (of-object CList (Gtk)) + (c-name gtk_clist_set_text) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* text)) +) + +(method get_text + (of-object CList (Gtk)) + (c-name gtk_clist_get_text) + (return-type gint) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gchar** text)) +) + +(method set_pixmap + (of-object CList (Gtk)) + (c-name gtk_clist_set_pixmap) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method get_pixmap + (of-object CList (Gtk)) + (c-name gtk_clist_get_pixmap) + (return-type gint) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GdkPixmap** pixmap)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method set_pixtext + (of-object CList (Gtk)) + (c-name gtk_clist_set_pixtext) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* text)) + (parameter (type-and-name guint8 spacing)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method get_pixtext + (of-object CList (Gtk)) + (c-name gtk_clist_get_pixtext) + (return-type gint) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gchar** text)) + (parameter (type-and-name guint8* spacing)) + (parameter (type-and-name GdkPixmap** pixmap)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method set_foreground + (of-object CList (Gtk)) + (c-name gtk_clist_set_foreground) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name GdkColor* color)) +) + +(method set_background + (of-object CList (Gtk)) + (c-name gtk_clist_set_background) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name GdkColor* color)) +) + +(method set_cell_style + (of-object CList (Gtk)) + (c-name gtk_clist_set_cell_style) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GtkStyle* style)) +) + +(method get_cell_style + (of-object CList (Gtk)) + (c-name gtk_clist_get_cell_style) + (return-type GtkStyle*) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) +) + +(method set_row_style + (of-object CList (Gtk)) + (c-name gtk_clist_set_row_style) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name GtkStyle* style)) +) + +(method get_row_style + (of-object CList (Gtk)) + (c-name gtk_clist_get_row_style) + (return-type GtkStyle*) + (parameter (type-and-name gint row)) +) + +(method set_shift + (of-object CList (Gtk)) + (c-name gtk_clist_set_shift) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint vertical)) + (parameter (type-and-name gint horizontal)) +) + +(method set_selectable + (of-object CList (Gtk)) + (c-name gtk_clist_set_selectable) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gboolean selectable)) +) + +(method get_selectable + (of-object CList (Gtk)) + (c-name gtk_clist_get_selectable) + (return-type gboolean) + (parameter (type-and-name gint row)) +) + +(method prepend + (of-object CList (Gtk)) + (c-name gtk_clist_prepend) + (return-type gint) + (parameter (type-and-name gchar*[] text)) +) + +(method append + (of-object CList (Gtk)) + (c-name gtk_clist_append) + (return-type gint) + (parameter (type-and-name gchar*[] text)) +) + +(method insert + (of-object CList (Gtk)) + (c-name gtk_clist_insert) + (return-type gint) + (parameter (type-and-name gint row)) + (parameter (type-and-name gchar*[] text)) +) + +(method remove + (of-object CList (Gtk)) + (c-name gtk_clist_remove) + (return-type none) + (parameter (type-and-name gint row)) +) + +(method set_row_data + (of-object CList (Gtk)) + (c-name gtk_clist_set_row_data) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gpointer data)) +) + +(method set_row_data_full + (of-object CList (Gtk)) + (c-name gtk_clist_set_row_data_full) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(method get_row_data + (of-object CList (Gtk)) + (c-name gtk_clist_get_row_data) + (return-type gpointer) + (parameter (type-and-name gint row)) +) + +(method find_row_from_data + (of-object CList (Gtk)) + (c-name gtk_clist_find_row_from_data) + (return-type gint) + (parameter (type-and-name gpointer data)) +) + +(method select_row + (of-object CList (Gtk)) + (c-name gtk_clist_select_row) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) +) + +(method unselect_row + (of-object CList (Gtk)) + (c-name gtk_clist_unselect_row) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) +) + +(method undo_selection + (of-object CList (Gtk)) + (c-name gtk_clist_undo_selection) + (return-type none) +) + +(method clear + (of-object CList (Gtk)) + (c-name gtk_clist_clear) + (return-type none) +) + +(method get_selection_info + (of-object CList (Gtk)) + (c-name gtk_clist_get_selection_info) + (return-type gint) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint* row)) + (parameter (type-and-name gint* column)) +) + +(method select_all + (of-object CList (Gtk)) + (c-name gtk_clist_select_all) + (return-type none) +) + +(method unselect_all + (of-object CList (Gtk)) + (c-name gtk_clist_unselect_all) + (return-type none) +) + +(method swap_rows + (of-object CList (Gtk)) + (c-name gtk_clist_swap_rows) + (return-type none) + (parameter (type-and-name gint row1)) + (parameter (type-and-name gint row2)) +) + +(method row_move + (of-object CList (Gtk)) + (c-name gtk_clist_row_move) + (return-type none) + (parameter (type-and-name gint source_row)) + (parameter (type-and-name gint dest_row)) +) + +(method set_compare_func + (of-object CList (Gtk)) + (c-name gtk_clist_set_compare_func) + (return-type none) + (parameter (type-and-name GtkCListCompareFunc cmp_func)) +) + +(method set_sort_column + (of-object CList (Gtk)) + (c-name gtk_clist_set_sort_column) + (return-type none) + (parameter (type-and-name gint column)) +) + +(method set_sort_type + (of-object CList (Gtk)) + (c-name gtk_clist_set_sort_type) + (return-type none) + (parameter (type-and-name GtkSortType sort_type)) +) + +(method sort + (of-object CList (Gtk)) + (c-name gtk_clist_sort) + (return-type none) +) + +(method set_auto_sort + (of-object CList (Gtk)) + (c-name gtk_clist_set_auto_sort) + (return-type none) + (parameter (type-and-name gboolean auto_sort)) +) + + + +;; From /usr/include/gtk/gtkcolorsel.h + +(function gtk_color_selection_get_type + (c-name gtk_color_selection_get_type) + (return-type GtkType) +) + +(function gtk_color_selection_new + (c-name gtk_color_selection_new) + (is-constructor-of GtkColorSelection) + (return-type GtkWidget*) +) + +(method set_update_policy + (of-object ColorSelection (Gtk)) + (c-name gtk_color_selection_set_update_policy) + (return-type none) + (parameter (type-and-name GtkUpdateType policy)) +) + +(method set_opacity + (of-object ColorSelection (Gtk)) + (c-name gtk_color_selection_set_opacity) + (return-type none) + (parameter (type-and-name gint use_opacity)) +) + +(method set_color + (of-object ColorSelection (Gtk)) + (c-name gtk_color_selection_set_color) + (return-type none) + (parameter (type-and-name gdouble* color)) +) + +(method get_color + (of-object ColorSelection (Gtk)) + (c-name gtk_color_selection_get_color) + (return-type none) + (parameter (type-and-name gdouble* color)) +) + +(function gtk_color_selection_dialog_get_type + (c-name gtk_color_selection_dialog_get_type) + (return-type GtkType) +) + +(function gtk_color_selection_dialog_new + (c-name gtk_color_selection_dialog_new) + (is-constructor-of GtkColorSelectionDialog) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* title)) +) + + + +;; From /usr/include/gtk/gtkcombo.h + +(function gtk_combo_get_type + (c-name gtk_combo_get_type) + (return-type guint) +) + +(function gtk_combo_new + (c-name gtk_combo_new) + (is-constructor-of GtkCombo) + (return-type GtkWidget*) +) + +(method set_value_in_list + (of-object Combo (Gtk)) + (c-name gtk_combo_set_value_in_list) + (return-type none) + (parameter (type-and-name gint val)) + (parameter (type-and-name gint ok_if_empty)) +) + +(method set_use_arrows + (of-object Combo (Gtk)) + (c-name gtk_combo_set_use_arrows) + (return-type none) + (parameter (type-and-name gint val)) +) + +(method set_use_arrows_always + (of-object Combo (Gtk)) + (c-name gtk_combo_set_use_arrows_always) + (return-type none) + (parameter (type-and-name gint val)) +) + +(method set_case_sensitive + (of-object Combo (Gtk)) + (c-name gtk_combo_set_case_sensitive) + (return-type none) + (parameter (type-and-name gint val)) +) + +(method set_item_string + (of-object Combo (Gtk)) + (c-name gtk_combo_set_item_string) + (return-type none) + (parameter (type-and-name GtkItem* item)) + (parameter (type-and-name const-gchar* item_value)) +) + +(method set_popdown_strings + (of-object Combo (Gtk)) + (c-name gtk_combo_set_popdown_strings) + (return-type none) + (parameter (type-and-name GList* strings)) +) + +(method disable_activate + (of-object Combo (Gtk)) + (c-name gtk_combo_disable_activate) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkcontainer.h + +(function gtk_container_get_type + (c-name gtk_container_get_type) + (return-type GtkType) +) + +(method set_border_width + (of-object Container (Gtk)) + (c-name gtk_container_set_border_width) + (return-type none) + (parameter (type-and-name guint border_width)) +) + +(method add + (of-object Container (Gtk)) + (c-name gtk_container_add) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(method remove + (of-object Container (Gtk)) + (c-name gtk_container_remove) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(method set_resize_mode + (of-object Container (Gtk)) + (c-name gtk_container_set_resize_mode) + (return-type none) + (parameter (type-and-name GtkResizeMode resize_mode)) +) + +(method check_resize + (of-object Container (Gtk)) + (c-name gtk_container_check_resize) + (return-type none) +) + +(method foreach + (of-object Container (Gtk)) + (c-name gtk_container_foreach) + (return-type none) + (parameter (type-and-name GtkCallback callback)) + (parameter (type-and-name gpointer callback_data)) +) + +(method foreach_full + (of-object Container (Gtk)) + (c-name gtk_container_foreach_full) + (return-type none) + (parameter (type-and-name GtkCallback callback)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer callback_data)) + (parameter (type-and-name GtkDestroyNotify notify)) +) + +(method children + (of-object Container (Gtk)) + (c-name gtk_container_children) + (return-type GList*) +) + +(method focus + (of-object Container (Gtk)) + (c-name gtk_container_focus) + (return-type gint) + (parameter (type-and-name GtkDirectionType direction)) +) + +(method set_reallocate_redraws + (of-object Container (Gtk)) + (c-name gtk_container_set_reallocate_redraws) + (return-type none) + (parameter (type-and-name gboolean needs_redraws)) +) + +(method set_focus_child + (of-object Container (Gtk)) + (c-name gtk_container_set_focus_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_focus_vadjustment + (of-object Container (Gtk)) + (c-name gtk_container_set_focus_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_focus_hadjustment + (of-object Container (Gtk)) + (c-name gtk_container_set_focus_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method register_toplevel + (of-object Container (Gtk)) + (c-name gtk_container_register_toplevel) + (return-type none) +) + +(method unregister_toplevel + (of-object Container (Gtk)) + (c-name gtk_container_unregister_toplevel) + (return-type none) +) + +(function gtk_container_get_toplevels + (c-name gtk_container_get_toplevels) + (return-type GList*) +) + +(method resize_children + (of-object Container (Gtk)) + (c-name gtk_container_resize_children) + (return-type none) +) + +(method child_type + (of-object Container (Gtk)) + (c-name gtk_container_child_type) + (return-type GtkType) +) + +(function gtk_container_add_child_arg_type + (c-name gtk_container_add_child_arg_type) + (return-type none) + (parameter (type-and-name const-gchar* arg_name)) + (parameter (type-and-name GtkType arg_type)) + (parameter (type-and-name guint arg_flags)) + (parameter (type-and-name guint arg_id)) +) + +(function gtk_container_query_child_args + (c-name gtk_container_query_child_args) + (return-type GtkArg*) + (parameter (type-and-name GtkType class_type)) + (parameter (type-and-name guint32** arg_flags)) + (parameter (type-and-name guint* nargs)) +) + +(method child_getv + (of-object Container (Gtk)) + (c-name gtk_container_child_getv) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method child_setv + (of-object Container (Gtk)) + (c-name gtk_container_child_setv) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method add_with_args + (of-object Container (Gtk)) + (c-name gtk_container_add_with_args) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method addv + (of-object Container (Gtk)) + (c-name gtk_container_addv) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method child_set + (of-object Container (Gtk)) + (c-name gtk_container_child_set) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method queue_resize + (of-object Container (Gtk)) + (c-name gtk_container_queue_resize) + (return-type none) +) + +(method clear_resize_widgets + (of-object Container (Gtk)) + (c-name gtk_container_clear_resize_widgets) + (return-type none) +) + +(method arg_set + (of-object Container (Gtk)) + (c-name gtk_container_arg_set) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkArg* arg)) + (parameter (type-and-name GtkArgInfo* info)) +) + +(method arg_get + (of-object Container (Gtk)) + (c-name gtk_container_arg_get) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkArg* arg)) + (parameter (type-and-name GtkArgInfo* info)) +) + +(function gtk_container_child_args_collect + (c-name gtk_container_child_args_collect) + (return-type gchar*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name GSList** arg_list_p)) + (parameter (type-and-name GSList** info_list_p)) + (parameter (type-and-name const-gchar* first_arg_name)) + (parameter (type-and-name va_list args)) +) + +(function gtk_container_child_arg_get_info + (c-name gtk_container_child_arg_get_info) + (return-type gchar*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name const-gchar* arg_name)) + (parameter (type-and-name GtkArgInfo** info_p)) +) + +(method forall + (of-object Container (Gtk)) + (c-name gtk_container_forall) + (return-type none) + (parameter (type-and-name GtkCallback callback)) + (parameter (type-and-name gpointer callback_data)) +) + +(method child_composite_name + (of-object Container (Gtk)) + (c-name gtk_container_child_composite_name) + (return-type gchar*) + (parameter (type-and-name GtkWidget* child)) +) + +(method dequeue_resize_handler + (of-object Container (Gtk)) + (c-name gtk_container_dequeue_resize_handler) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkctree.h + +(function gtk_ctree_get_type + (c-name gtk_ctree_get_type) + (return-type GtkType) +) + +(method construct + (of-object CTree (Gtk)) + (c-name gtk_ctree_construct) + (return-type none) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gint tree_column)) + (parameter (type-and-name gchar*[] titles)) +) + +(function gtk_ctree_new_with_titles + (c-name gtk_ctree_new_with_titles) + (is-constructor-of GtkCTree) + (return-type GtkWidget*) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gint tree_column)) + (parameter (type-and-name gchar*[] titles)) +) + +(function gtk_ctree_new + (c-name gtk_ctree_new) + (is-constructor-of GtkCTree) + (return-type GtkWidget*) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gint tree_column)) +) + +(method insert_node + (of-object CTree (Gtk)) + (c-name gtk_ctree_insert_node) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* parent)) + (parameter (type-and-name GtkCTreeNode* sibling)) + (parameter (type-and-name gchar*[] text)) + (parameter (type-and-name guint8 spacing)) + (parameter (type-and-name GdkPixmap* pixmap_closed)) + (parameter (type-and-name GdkBitmap* mask_closed)) + (parameter (type-and-name GdkPixmap* pixmap_opened)) + (parameter (type-and-name GdkBitmap* mask_opened)) + (parameter (type-and-name gboolean is_leaf)) + (parameter (type-and-name gboolean expanded)) +) + +(method remove_node + (of-object CTree (Gtk)) + (c-name gtk_ctree_remove_node) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method insert_gnode + (of-object CTree (Gtk)) + (c-name gtk_ctree_insert_gnode) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* parent)) + (parameter (type-and-name GtkCTreeNode* sibling)) + (parameter (type-and-name GNode* gnode)) + (parameter (type-and-name GtkCTreeGNodeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method export_to_gnode + (of-object CTree (Gtk)) + (c-name gtk_ctree_export_to_gnode) + (return-type GNode*) + (parameter (type-and-name GNode* parent)) + (parameter (type-and-name GNode* sibling)) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeGNodeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method post_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_post_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method post_recursive_to_depth + (of-object CTree (Gtk)) + (c-name gtk_ctree_post_recursive_to_depth) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint depth)) + (parameter (type-and-name GtkCTreeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method pre_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_pre_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method pre_recursive_to_depth + (of-object CTree (Gtk)) + (c-name gtk_ctree_pre_recursive_to_depth) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint depth)) + (parameter (type-and-name GtkCTreeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method is_viewable + (of-object CTree (Gtk)) + (c-name gtk_ctree_is_viewable) + (return-type gboolean) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method last + (of-object CTree (Gtk)) + (c-name gtk_ctree_last) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method find_node_ptr + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_node_ptr) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeRow* ctree_row)) +) + +(method node_nth + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_nth) + (return-type GtkCTreeNode*) + (parameter (type-and-name guint row)) +) + +(method find + (of-object CTree (Gtk)) + (c-name gtk_ctree_find) + (return-type gboolean) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeNode* child)) +) + +(method is_ancestor + (of-object CTree (Gtk)) + (c-name gtk_ctree_is_ancestor) + (return-type gboolean) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeNode* child)) +) + +(method find_by_row_data + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_by_row_data) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) +) + +(method find_all_by_row_data + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_all_by_row_data) + (return-type GList*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) +) + +(method find_by_row_data_custom + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_by_row_data_custom) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GCompareFunc func)) +) + +(method find_all_by_row_data_custom + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_all_by_row_data_custom) + (return-type GList*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GCompareFunc func)) +) + +(method is_hot_spot + (of-object CTree (Gtk)) + (c-name gtk_ctree_is_hot_spot) + (return-type gboolean) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method move + (of-object CTree (Gtk)) + (c-name gtk_ctree_move) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeNode* new_parent) (null-ok)) + (parameter (type-and-name GtkCTreeNode* new_sibling) (null-ok)) +) + +(method expand + (of-object CTree (Gtk)) + (c-name gtk_ctree_expand) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method expand_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_expand_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + +(method expand_to_depth + (of-object CTree (Gtk)) + (c-name gtk_ctree_expand_to_depth) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint depth)) +) + +(method collapse + (of-object CTree (Gtk)) + (c-name gtk_ctree_collapse) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method collapse_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_collapse_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + +(method collapse_to_depth + (of-object CTree (Gtk)) + (c-name gtk_ctree_collapse_to_depth) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint depth)) +) + +(method toggle_expansion + (of-object CTree (Gtk)) + (c-name gtk_ctree_toggle_expansion) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method toggle_expansion_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_toggle_expansion_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method select + (of-object CTree (Gtk)) + (c-name gtk_ctree_select) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method select_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_select_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + +(method unselect + (of-object CTree (Gtk)) + (c-name gtk_ctree_unselect) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method unselect_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_unselect_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + +(method node_set_text + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_text) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* text)) +) + +(method node_set_pixmap + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_pixmap) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask) (null-ok)) +) + +(method node_set_pixtext + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_pixtext) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* text)) + (parameter (type-and-name guint8 spacing)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask) (null-ok)) +) + +(method set_node_info + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_node_info) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name const-gchar* text)) + (parameter (type-and-name guint8 spacing)) + (parameter (type-and-name GdkPixmap* pixmap_closed) (null-ok)) + (parameter (type-and-name GdkBitmap* mask_closed) (null-ok)) + (parameter (type-and-name GdkPixmap* pixmap_opened) (null-ok)) + (parameter (type-and-name GdkBitmap* mask_opened) (null-ok)) + (parameter (type-and-name gboolean is_leaf)) + (parameter (type-and-name gboolean expanded)) +) + +(method node_set_shift + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_shift) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint vertical)) + (parameter (type-and-name gint horizontal)) +) + +(method node_set_selectable + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_selectable) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gboolean selectable)) +) + +(method node_get_selectable + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_selectable) + (return-type gboolean) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method node_get_cell_type + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_cell_type) + (return-type GtkCellType) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) +) + +(method node_get_text + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_text) + (return-type gint) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gchar** text)) +) + +(method node_get_pixmap + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_pixmap) + (return-type gint) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GdkPixmap** pixmap)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method node_get_pixtext + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_pixtext) + (return-type gint) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gchar** text)) + (parameter (type-and-name guint8* spacing)) + (parameter (type-and-name GdkPixmap** pixmap)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method get_node_info + (of-object CTree (Gtk)) + (c-name gtk_ctree_get_node_info) + (return-type gint) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gchar** text)) + (parameter (type-and-name guint8* spacing)) + (parameter (type-and-name GdkPixmap** pixmap_closed)) + (parameter (type-and-name GdkBitmap** mask_closed)) + (parameter (type-and-name GdkPixmap** pixmap_opened)) + (parameter (type-and-name GdkBitmap** mask_opened)) + (parameter (type-and-name gboolean* is_leaf)) + (parameter (type-and-name gboolean* expanded)) +) + +(method node_set_row_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_row_style) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkStyle* style) (null-ok)) +) + +(method node_get_row_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_row_style) + (return-type GtkStyle*) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method node_set_cell_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_cell_style) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GtkStyle* style)) +) + +(method node_get_cell_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_cell_style) + (return-type GtkStyle*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) +) + +(method node_set_foreground + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_foreground) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GdkColor* color)) +) + +(method node_set_background + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_background) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GdkColor* color)) +) + +(method node_set_row_data + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_row_data) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) +) + +(method node_set_row_data_full + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_row_data_full) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(method node_get_row_data + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_row_data) + (return-type gpointer) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method node_moveto + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_moveto) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gfloat row_align)) + (parameter (type-and-name gfloat col_align)) +) + +(method node_is_visible + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_is_visible) + (return-type GtkVisibility) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method set_indent + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_indent) + (return-type none) + (parameter (type-and-name gint indent)) +) + +(method set_spacing + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_spacing) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(method set_show_stub + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_show_stub) + (return-type none) + (parameter (type-and-name gboolean show_stub)) +) + +(method set_line_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_line_style) + (return-type none) + (parameter (type-and-name GtkCTreeLineStyle line_style)) +) + +(method set_expander_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_expander_style) + (return-type none) + (parameter (type-and-name GtkCTreeExpanderStyle expander_style)) +) + +(method set_drag_compare_func + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_drag_compare_func) + (return-type none) + (parameter (type-and-name GtkCTreeCompareDragFunc cmp_func)) +) + +(method sort_node + (of-object CTree (Gtk)) + (c-name gtk_ctree_sort_node) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method sort_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_sort_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + + + +;; From /usr/include/gtk/gtkcurve.h + +(function gtk_curve_get_type + (c-name gtk_curve_get_type) + (return-type GtkType) +) + +(function gtk_curve_new + (c-name gtk_curve_new) + (is-constructor-of GtkCurve) + (return-type GtkWidget*) +) + +(method reset + (of-object Curve (Gtk)) + (c-name gtk_curve_reset) + (return-type none) +) + +(method set_gamma + (of-object Curve (Gtk)) + (c-name gtk_curve_set_gamma) + (return-type none) + (parameter (type-and-name gfloat gamma)) +) + +(method set_range + (of-object Curve (Gtk)) + (c-name gtk_curve_set_range) + (return-type none) + (parameter (type-and-name gfloat min_x)) + (parameter (type-and-name gfloat max_x)) + (parameter (type-and-name gfloat min_y)) + (parameter (type-and-name gfloat max_y)) +) + +(method get_vector + (of-object Curve (Gtk)) + (c-name gtk_curve_get_vector) + (return-type none) + (parameter (type-and-name int veclen)) + (parameter (type-and-name gfloat[] vector)) +) + +(method set_vector + (of-object Curve (Gtk)) + (c-name gtk_curve_set_vector) + (return-type none) + (parameter (type-and-name int veclen)) + (parameter (type-and-name gfloat[] vector)) +) + +(method set_curve_type + (of-object Curve (Gtk)) + (c-name gtk_curve_set_curve_type) + (return-type none) + (parameter (type-and-name GtkCurveType type)) +) + + + +;; From /usr/include/gtk/gtkdata.h + +(function gtk_data_get_type + (c-name gtk_data_get_type) + (return-type GtkType) +) + + + +;; From /usr/include/gtk/gtkdialog.h + +(function gtk_dialog_get_type + (c-name gtk_dialog_get_type) + (return-type GtkType) +) + +(function gtk_dialog_new + (c-name gtk_dialog_new) + (is-constructor-of GtkDialog) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkdnd.h + +(function gtk_drag_finish + (c-name gtk_drag_finish) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) + (parameter (type-and-name gboolean success)) + (parameter (type-and-name gboolean del)) + (parameter (type-and-name guint32 time)) +) + +(function gtk_drag_get_source_widget + (c-name gtk_drag_get_source_widget) + (return-type GtkWidget*) + (parameter (type-and-name GdkDragContext* context)) +) + +(method drag_highlight + (of-object Widget (Gtk)) + (c-name gtk_drag_highlight) + (return-type none) +) + +(method drag_unhighlight + (of-object Widget (Gtk)) + (c-name gtk_drag_unhighlight) + (return-type none) +) + +(method drag_dest_set + (of-object Widget (Gtk)) + (c-name gtk_drag_dest_set) + (return-type none) + (parameter (type-and-name GtkDestDefaults flags)) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name gint n_targets)) + (parameter (type-and-name GdkDragAction actions)) +) + +(method drag_dest_set_proxy + (of-object Widget (Gtk)) + (c-name gtk_drag_dest_set_proxy) + (return-type none) + (parameter (type-and-name GdkWindow* proxy_window)) + (parameter (type-and-name GdkDragProtocol protocol)) + (parameter (type-and-name gboolean use_coordinates)) +) + +(method drag_dest_unset + (of-object Widget (Gtk)) + (c-name gtk_drag_dest_unset) + (return-type none) +) + +(method drag_source_set + (of-object Widget (Gtk)) + (c-name gtk_drag_source_set) + (return-type none) + (parameter (type-and-name GdkModifierType start_button_mask)) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name gint n_targets)) + (parameter (type-and-name GdkDragAction actions)) +) + +(method drag_source_unset + (of-object Widget (Gtk)) + (c-name gtk_drag_source_unset) + (return-type none) +) + +(method drag_source_set_icon + (of-object Widget (Gtk)) + (c-name gtk_drag_source_set_icon) + (return-type none) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method drag_begin + (of-object Widget (Gtk)) + (c-name gtk_drag_begin) + (return-type GdkDragContext*) + (parameter (type-and-name GtkTargetList* targets)) + (parameter (type-and-name GdkDragAction actions)) + (parameter (type-and-name gint button)) + (parameter (type-and-name GdkEvent* event)) +) + +(function gtk_drag_set_icon_widget + (c-name gtk_drag_set_icon_widget) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint hot_x)) + (parameter (type-and-name gint hot_y)) +) + +(function gtk_drag_set_icon_pixmap + (c-name gtk_drag_set_icon_pixmap) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) + (parameter (type-and-name gint hot_x)) + (parameter (type-and-name gint hot_y)) +) + +(function gtk_drag_set_icon_default + (c-name gtk_drag_set_icon_default) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) +) + +(function gtk_drag_set_default_icon + (c-name gtk_drag_set_default_icon) + (return-type none) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) + (parameter (type-and-name gint hot_x)) + (parameter (type-and-name gint hot_y)) +) + +(function gtk_drag_source_handle_event + (c-name gtk_drag_source_handle_event) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name GdkEvent* event)) +) + +(function gtk_drag_dest_handle_event + (c-name gtk_drag_dest_handle_event) + (return-type none) + (parameter (type-and-name GtkWidget* toplevel)) + (parameter (type-and-name GdkEvent* event)) +) + + + +;; From /usr/include/gtk/gtkdrawingarea.h + +(function gtk_drawing_area_get_type + (c-name gtk_drawing_area_get_type) + (return-type GtkType) +) + +(function gtk_drawing_area_new + (c-name gtk_drawing_area_new) + (is-constructor-of GtkDrawingArea) + (return-type GtkWidget*) +) + +(method size + (of-object DrawingArea (Gtk)) + (c-name gtk_drawing_area_size) + (return-type none) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + + + +;; From /usr/include/gtk/gtkeditable.h + +(function gtk_editable_get_type + (c-name gtk_editable_get_type) + (return-type GtkType) +) + +(method select_region + (of-object Editable (Gtk)) + (c-name gtk_editable_select_region) + (return-type none) + (parameter (type-and-name gint start)) + (parameter (type-and-name gint end)) +) + +(method insert_text + (of-object Editable (Gtk)) + (c-name gtk_editable_insert_text) + (return-type none) + (parameter (type-and-name const-gchar* new_text)) + (parameter (type-and-name gint new_text_length)) + (parameter (type-and-name gint* position)) +) + +(method delete_text + (of-object Editable (Gtk)) + (c-name gtk_editable_delete_text) + (return-type none) + (parameter (type-and-name gint start_pos)) + (parameter (type-and-name gint end_pos)) +) + +(method get_chars + (of-object Editable (Gtk)) + (c-name gtk_editable_get_chars) + (return-type gchar*) + (parameter (type-and-name gint start_pos)) + (parameter (type-and-name gint end_pos)) +) + +(method cut_clipboard + (of-object Editable (Gtk)) + (c-name gtk_editable_cut_clipboard) + (return-type none) +) + +(method copy_clipboard + (of-object Editable (Gtk)) + (c-name gtk_editable_copy_clipboard) + (return-type none) +) + +(method paste_clipboard + (of-object Editable (Gtk)) + (c-name gtk_editable_paste_clipboard) + (return-type none) +) + +(method claim_selection + (of-object Editable (Gtk)) + (c-name gtk_editable_claim_selection) + (return-type none) + (parameter (type-and-name gboolean claim)) + (parameter (type-and-name guint32 time)) +) + +(method delete_selection + (of-object Editable (Gtk)) + (c-name gtk_editable_delete_selection) + (return-type none) +) + +(method changed + (of-object Editable (Gtk)) + (c-name gtk_editable_changed) + (return-type none) +) + +(method set_position + (of-object Editable (Gtk)) + (c-name gtk_editable_set_position) + (return-type none) + (parameter (type-and-name gint position)) +) + +(method get_position + (of-object Editable (Gtk)) + (c-name gtk_editable_get_position) + (return-type gint) +) + +(method set_editable + (of-object Editable (Gtk)) + (c-name gtk_editable_set_editable) + (return-type none) + (parameter (type-and-name gboolean is_editable)) +) + + + +;; From /usr/include/gtk/gtkentry.h + +(function gtk_entry_get_type + (c-name gtk_entry_get_type) + (return-type GtkType) +) + +(function gtk_entry_new + (c-name gtk_entry_new) + (is-constructor-of GtkEntry) + (return-type GtkWidget*) +) + +(function gtk_entry_new_with_max_length + (c-name gtk_entry_new_with_max_length) + (return-type GtkWidget*) + (parameter (type-and-name guint16 max)) +) + +(method set_text + (of-object Entry (Gtk)) + (c-name gtk_entry_set_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + +(method append_text + (of-object Entry (Gtk)) + (c-name gtk_entry_append_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + +(method prepend_text + (of-object Entry (Gtk)) + (c-name gtk_entry_prepend_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + +(method set_position + (of-object Entry (Gtk)) + (c-name gtk_entry_set_position) + (return-type none) + (parameter (type-and-name gint position)) +) + +(method get_text + (of-object Entry (Gtk)) + (c-name gtk_entry_get_text) + (return-type static_string) +) + +(method select_region + (of-object Entry (Gtk)) + (c-name gtk_entry_select_region) + (return-type none) + (parameter (type-and-name gint start)) + (parameter (type-and-name gint end)) +) + +(method set_visibility + (of-object Entry (Gtk)) + (c-name gtk_entry_set_visibility) + (return-type none) + (parameter (type-and-name gboolean visible)) +) + +(method set_editable + (of-object Entry (Gtk)) + (c-name gtk_entry_set_editable) + (return-type none) + (parameter (type-and-name gboolean editable)) +) + +(method set_max_length + (of-object Entry (Gtk)) + (c-name gtk_entry_set_max_length) + (return-type none) + (parameter (type-and-name guint16 max)) +) + + + +;; From /usr/include/gtk/gtkeventbox.h + +(function gtk_event_box_get_type + (c-name gtk_event_box_get_type) + (return-type GtkType) +) + +(function gtk_event_box_new + (c-name gtk_event_box_new) + (is-constructor-of GtkEventBox) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkfeatures.h + + + +;; From /usr/include/gtk/gtkfilesel.h + +(function gtk_file_selection_get_type + (c-name gtk_file_selection_get_type) + (return-type GtkType) +) + +(function gtk_file_selection_new + (c-name gtk_file_selection_new) + (is-constructor-of GtkFileSelection) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* title) (default "NULL")) +) + +(method set_filename + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_set_filename) + (return-type none) + (parameter (type-and-name const-gchar* filename)) +) + +(method get_filename + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_get_filename) + (return-type gchar*) +) + +(method complete + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_complete) + (return-type none) + (parameter (type-and-name const-gchar* pattern)) +) + +(method show_fileop_buttons + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_show_fileop_buttons) + (return-type none) +) + +(method hide_fileop_buttons + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_hide_fileop_buttons) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkfixed.h + +(function gtk_fixed_get_type + (c-name gtk_fixed_get_type) + (return-type GtkType) +) + +(function gtk_fixed_new + (c-name gtk_fixed_new) + (is-constructor-of GtkFixed) + (return-type GtkWidget*) +) + +(method put + (of-object Fixed (Gtk)) + (c-name gtk_fixed_put) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint16 x)) + (parameter (type-and-name gint16 y)) +) + +(method move + (of-object Fixed (Gtk)) + (c-name gtk_fixed_move) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint16 x)) + (parameter (type-and-name gint16 y)) +) + + + +;; From /usr/include/gtk/gtkfontsel.h + +(function gtk_font_selection_get_type + (c-name gtk_font_selection_get_type) + (return-type GtkType) +) + +(function gtk_font_selection_new + (c-name gtk_font_selection_new) + (is-constructor-of GtkFontSelection) + (return-type GtkWidget*) +) + +(method get_font_name + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_get_font_name) + (return-type gchar*) +) + +(method get_font + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_get_font) + (return-type GdkFont*) +) + +(method set_font_name + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_set_font_name) + (return-type gboolean) + (parameter (type-and-name const-gchar* fontname)) +) + +(method set_filter + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_set_filter) + (return-type none) + (parameter (type-and-name GtkFontFilterType filter_type)) + (parameter (type-and-name GtkFontType font_type)) + (parameter (type-and-name gchar** foundries)) + (parameter (type-and-name gchar** weights)) + (parameter (type-and-name gchar** slants)) + (parameter (type-and-name gchar** setwidths)) + (parameter (type-and-name gchar** spacings)) + (parameter (type-and-name gchar** charsets)) +) + +(method get_preview_text + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_get_preview_text) + (return-type gchar*) +) + +(method set_preview_text + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_set_preview_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + +(function gtk_font_selection_dialog_get_type + (c-name gtk_font_selection_dialog_get_type) + (return-type GtkType) +) + +(function gtk_font_selection_dialog_new + (c-name gtk_font_selection_dialog_new) + (is-constructor-of GtkFontSelectionDialog) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* title)) +) + +(method get_font_name + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_get_font_name) + (return-type gchar*) +) + +(method get_font + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_get_font) + (return-type GdkFont*) +) + +(method set_font_name + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_set_font_name) + (return-type gboolean) + (parameter (type-and-name const-gchar* fontname)) +) + +(method set_filter + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_set_filter) + (return-type none) + (parameter (type-and-name GtkFontFilterType filter_type)) + (parameter (type-and-name GtkFontType font_type)) + (parameter (type-and-name gchar** foundries)) + (parameter (type-and-name gchar** weights)) + (parameter (type-and-name gchar** slants)) + (parameter (type-and-name gchar** setwidths)) + (parameter (type-and-name gchar** spacings)) + (parameter (type-and-name gchar** charsets)) +) + +(method get_preview_text + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_get_preview_text) + (return-type gchar*) +) + +(method set_preview_text + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_set_preview_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + + + +;; From /usr/include/gtk/gtkframe.h + +(function gtk_frame_get_type + (c-name gtk_frame_get_type) + (return-type GtkType) +) + +(function gtk_frame_new + (c-name gtk_frame_new) + (is-constructor-of GtkFrame) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label) (default "NULL") (null-ok)) +) + +(method set_label + (of-object Frame (Gtk)) + (c-name gtk_frame_set_label) + (return-type none) + (parameter (type-and-name const-gchar* label) (null-ok)) +) + +(method set_label_align + (of-object Frame (Gtk)) + (c-name gtk_frame_set_label_align) + (return-type none) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) +) + +(method set_shadow_type + (of-object Frame (Gtk)) + (c-name gtk_frame_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + + + +;; From /usr/include/gtk/gtkgamma.h + +(function gtk_gamma_curve_get_type + (c-name gtk_gamma_curve_get_type) + (return-type guint) +) + +(function gtk_gamma_curve_new + (c-name gtk_gamma_curve_new) + (is-constructor-of GtkGammaCurve) + (return-type GtkWidget*) +) + + +;; From /usr/include/gtk/gtkhandlebox.h + +(function gtk_handle_box_get_type + (c-name gtk_handle_box_get_type) + (return-type GtkType) +) + +(function gtk_handle_box_new + (c-name gtk_handle_box_new) + (is-constructor-of GtkHandleBox) + (return-type GtkWidget*) +) + +(method set_shadow_type + (of-object HandleBox (Gtk)) + (c-name gtk_handle_box_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + +(method set_handle_position + (of-object HandleBox (Gtk)) + (c-name gtk_handle_box_set_handle_position) + (return-type none) + (parameter (type-and-name GtkPositionType position)) +) + +(method set_snap_edge + (of-object HandleBox (Gtk)) + (c-name gtk_handle_box_set_snap_edge) + (return-type none) + (parameter (type-and-name GtkPositionType edge)) +) + + + +;; From /usr/include/gtk/gtkhbbox.h + +(function gtk_hbutton_box_get_type + (c-name gtk_hbutton_box_get_type) + (return-type guint) +) + +(function gtk_hbutton_box_new + (c-name gtk_hbutton_box_new) + (is-constructor-of GtkHButtonBox) + (return-type GtkWidget*) +) + +(function hbutton_box_get_spacing_default + (c-name gtk_hbutton_box_get_spacing_default) + (return-type gint) +) + +(function hbutton_box_get_layout_default + (c-name gtk_hbutton_box_get_layout_default) + (return-type GtkButtonBoxStyle) +) + +(function hbutton_box_set_spacing_default + (c-name gtk_hbutton_box_set_spacing_default) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(function hbutton_box_set_layout_default + (c-name gtk_hbutton_box_set_layout_default) + (return-type none) + (parameter (type-and-name GtkButtonBoxStyle layout)) +) + + + +;; From /usr/include/gtk/gtkhbox.h + +(function gtk_hbox_get_type + (c-name gtk_hbox_get_type) + (return-type GtkType) +) + +(function gtk_hbox_new + (c-name gtk_hbox_new) + (is-constructor-of GtkHBox) + (return-type GtkWidget*) + (parameter (type-and-name gboolean homogeneous) (default "FALSE")) + (parameter (type-and-name gint spacing) (default "0")) +) + + + +;; From /usr/include/gtk/gtkhpaned.h + +(function gtk_hpaned_get_type + (c-name gtk_hpaned_get_type) + (return-type guint) +) + +(function gtk_hpaned_new + (c-name gtk_hpaned_new) + (is-constructor-of GtkHPaned) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkhruler.h + +(function gtk_hruler_get_type + (c-name gtk_hruler_get_type) + (return-type guint) +) + +(function gtk_hruler_new + (c-name gtk_hruler_new) + (is-constructor-of GtkHRuler) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkhscale.h + +(function gtk_hscale_get_type + (c-name gtk_hscale_get_type) + (return-type GtkType) +) + +(function gtk_hscale_new + (c-name gtk_hscale_new) + (is-constructor-of GtkHScale) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok)) +) + + + +;; From /usr/include/gtk/gtkhscrollbar.h + +(function gtk_hscrollbar_get_type + (c-name gtk_hscrollbar_get_type) + (return-type GtkType) +) + +(function gtk_hscrollbar_new + (c-name gtk_hscrollbar_new) + (is-constructor-of GtkHScrollbar) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok)) +) + + + +;; From /usr/include/gtk/gtkhseparator.h + +(function gtk_hseparator_get_type + (c-name gtk_hseparator_get_type) + (return-type GtkType) +) + +(function gtk_hseparator_new + (c-name gtk_hseparator_new) + (is-constructor-of GtkHSeparator) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkimage.h + +(function gtk_image_get_type + (c-name gtk_image_get_type) + (return-type GtkType) +) + +(function gtk_image_new + (c-name gtk_image_new) + (is-constructor-of GtkImage) + (return-type GtkWidget*) + (parameter (type-and-name GdkImage* val)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method set + (of-object Image (Gtk)) + (c-name gtk_image_set) + (return-type none) + (parameter (type-and-name GdkImage* val)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method get + (of-object Image (Gtk)) + (c-name gtk_image_get) + (return-type none) + (parameter (type-and-name GdkImage** val)) + (parameter (type-and-name GdkBitmap** mask)) +) + + + +;; From /usr/include/gtk/gtkinputdialog.h + +(function gtk_input_dialog_get_type + (c-name gtk_input_dialog_get_type) + (return-type GtkType) +) + +(function gtk_input_dialog_new + (c-name gtk_input_dialog_new) + (is-constructor-of GtkInputDialog) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkinvisible.h + +(function gtk_invisible_get_type + (c-name gtk_invisible_get_type) + (return-type GtkType) +) + +(function gtk_invisible_new + (c-name gtk_invisible_new) + (is-constructor-of GtkInvisible) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkitem.h + +(function gtk_item_get_type + (c-name gtk_item_get_type) + (return-type GtkType) +) + +(method select + (of-object Item (Gtk)) + (c-name gtk_item_select) + (return-type none) +) + +(method deselect + (of-object Item (Gtk)) + (c-name gtk_item_deselect) + (return-type none) +) + +(method toggle + (of-object Item (Gtk)) + (c-name gtk_item_toggle) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkitemfactory.h + +(function gtk_item_factory_get_type + (c-name gtk_item_factory_get_type) + (return-type GtkType) +) + +(function gtk_item_factory_new + (c-name gtk_item_factory_new) + (is-constructor-of GtkItemFactory) + (return-type GtkItemFactory*) + (parameter (type-and-name GtkType container_type)) + (parameter (type-and-name const-gchar* path)) + (parameter (type-and-name GtkAccelGroup* accel_group) (null-ok)) +) + +(method construct + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_construct) + (return-type none) + (parameter (type-and-name GtkType container_type)) + (parameter (type-and-name const-gchar* path)) + (parameter (type-and-name GtkAccelGroup* accel_group)) +) + +(function gtk_item_factory_parse_rc + (c-name gtk_item_factory_parse_rc) + (return-type none) + (parameter (type-and-name const-gchar* file_name)) +) + +(function gtk_item_factory_parse_rc_string + (c-name gtk_item_factory_parse_rc_string) + (return-type none) + (parameter (type-and-name const-gchar* rc_string)) +) + +(function gtk_item_factory_parse_rc_scanner + (c-name gtk_item_factory_parse_rc_scanner) + (return-type none) + (parameter (type-and-name GScanner* scanner)) +) + +(function gtk_item_factory_add_foreign + (c-name gtk_item_factory_add_foreign) + (return-type none) + (parameter (type-and-name GtkWidget* accel_widget)) + (parameter (type-and-name const-gchar* full_path)) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint keyval)) + (parameter (type-and-name GdkModifierType modifiers)) +) + +(function gtk_item_factory_from_widget + (c-name gtk_item_factory_from_widget) + (return-type GtkItemFactory*) + (parameter (type-and-name GtkWidget* widget)) +) + +(function gtk_item_factory_path_from_widget + (c-name gtk_item_factory_path_from_widget) + (return-type gchar*) + (parameter (type-and-name GtkWidget* widget)) +) + +(method get_item + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_get_item) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* path)) +) + +(method get_widget + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_get_widget) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* path)) +) + +(method get_widget_by_action + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_get_widget_by_action) + (return-type GtkWidget*) + (parameter (type-and-name guint action)) +) + +(method get_item_by_action + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_get_item_by_action) + (return-type GtkWidget*) + (parameter (type-and-name guint action)) +) + +(function gtk_item_factory_dump_items + (c-name gtk_item_factory_dump_items) + (return-type none) + (parameter (type-and-name GtkPatternSpec* path_pspec)) + (parameter (type-and-name gboolean modified_only)) + (parameter (type-and-name GtkPrintFunc print_func)) + (parameter (type-and-name gpointer func_data)) +) + +(function gtk_item_factory_dump_rc + (c-name gtk_item_factory_dump_rc) + (return-type none) + (parameter (type-and-name const-gchar* file_name)) + (parameter (type-and-name GtkPatternSpec* path_pspec)) + (parameter (type-and-name gboolean modified_only)) +) + +(function gtk_item_factory_print_func + (c-name gtk_item_factory_print_func) + (return-type none) + (parameter (type-and-name gpointer FILE_pointer)) + (parameter (type-and-name gchar* string)) +) + +(method create_item + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_create_item) + (return-type none) + (parameter (type-and-name GtkItemFactoryEntry* entry)) + (parameter (type-and-name gpointer callback_data)) + (parameter (type-and-name guint callback_type)) +) + +(method create_items + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_create_items) + (return-type none) + (parameter (type-and-name guint n_entries)) + (parameter (type-and-name GtkItemFactoryEntry* entries)) + (parameter (type-and-name gpointer callback_data)) +) + +(method delete_item + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_delete_item) + (return-type none) + (parameter (type-and-name const-gchar* path)) +) + +(method delete_entry + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_delete_entry) + (return-type none) + (parameter (type-and-name GtkItemFactoryEntry* entry)) +) + +(method delete_entries + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_delete_entries) + (return-type none) + (parameter (type-and-name guint n_entries)) + (parameter (type-and-name GtkItemFactoryEntry* entries)) +) + +(method popup + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_popup) + (return-type none) + (parameter (type-and-name guint x)) + (parameter (type-and-name guint y)) + (parameter (type-and-name guint mouse_button)) + (parameter (type-and-name guint32 time)) +) + +(method popup_with_data + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_popup_with_data) + (return-type none) + (parameter (type-and-name gpointer popup_data)) + (parameter (type-and-name GtkDestroyNotify destroy)) + (parameter (type-and-name guint x)) + (parameter (type-and-name guint y)) + (parameter (type-and-name guint mouse_button)) + (parameter (type-and-name guint32 time)) +) + +(method popup_data + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_popup_data) + (return-type gpointer) +) + +(function gtk_item_factory_popup_data_from_widget + (c-name gtk_item_factory_popup_data_from_widget) + (return-type gpointer) + (parameter (type-and-name GtkWidget* widget)) +) + +(method set_translate_func + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_set_translate_func) + (return-type none) + (parameter (type-and-name GtkTranslateFunc func)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify notify)) +) + +(function gtk_item_factory_from_path + (c-name gtk_item_factory_from_path) + (return-type GtkItemFactory*) + (parameter (type-and-name const-gchar* path)) +) + +(function gtk_item_factory_create_menu_entries + (c-name gtk_item_factory_create_menu_entries) + (return-type none) + (parameter (type-and-name guint n_entries)) + (parameter (type-and-name GtkMenuEntry* entries)) +) + +(function gtk_item_factories_path_delete + (c-name gtk_item_factories_path_delete) + (return-type none) + (parameter (type-and-name const-gchar* ifactory_path)) + (parameter (type-and-name const-gchar* path)) +) + +(method create_items_ac + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_create_items_ac) + (return-type none) + (parameter (type-and-name guint n_entries)) + (parameter (type-and-name GtkItemFactoryEntry* entries)) + (parameter (type-and-name gpointer callback_data)) + (parameter (type-and-name guint callback_type)) +) + + + +;; From /usr/include/gtk/gtklabel.h + +(function gtk_label_get_type + (c-name gtk_label_get_type) + (return-type GtkType) +) + +(function gtk_label_new + (c-name gtk_label_new) + (is-constructor-of GtkLabel) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* str) (default "NULL")) +) + +(method set_text + (of-object Label (Gtk)) + (c-name gtk_label_set_text) + (return-type none) + (parameter (type-and-name const-gchar* str)) +) + +(method set_justify + (of-object Label (Gtk)) + (c-name gtk_label_set_justify) + (return-type none) + (parameter (type-and-name GtkJustification jtype)) +) + +(method set_pattern + (of-object Label (Gtk)) + (c-name gtk_label_set_pattern) + (return-type none) + (parameter (type-and-name const-gchar* pattern) (default "NULL")) +) + +(method set_line_wrap + (of-object Label (Gtk)) + (c-name gtk_label_set_line_wrap) + (return-type none) + (parameter (type-and-name gboolean wrap)) +) + +(method get + (of-object Label (Gtk)) + (c-name gtk_label_get) + (return-type none) + (parameter (type-and-name gchar** str)) +) + +(method parse_uline + (of-object Label (Gtk)) + (c-name gtk_label_parse_uline) + (return-type guint) + (parameter (type-and-name const-gchar* string)) +) + + + +;; From /usr/include/gtk/gtklayout.h + +(function gtk_layout_get_type + (c-name gtk_layout_get_type) + (return-type GtkType) +) + +(function gtk_layout_new + (c-name gtk_layout_new) + (is-constructor-of GtkLayout) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* hadjustment) (null-ok)) + (parameter (type-and-name GtkAdjustment* vadjustment) (null-ok)) +) + +(method put + (of-object Layout (Gtk)) + (c-name gtk_layout_put) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method move + (of-object Layout (Gtk)) + (c-name gtk_layout_move) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method set_size + (of-object Layout (Gtk)) + (c-name gtk_layout_set_size) + (return-type none) + (parameter (type-and-name guint width)) + (parameter (type-and-name guint height)) +) + +(method get_hadjustment + (of-object Layout (Gtk)) + (c-name gtk_layout_get_hadjustment) + (return-type GtkAdjustment*) +) + +(method get_vadjustment + (of-object Layout (Gtk)) + (c-name gtk_layout_get_vadjustment) + (return-type GtkAdjustment*) +) + +(method set_hadjustment + (of-object Layout (Gtk)) + (c-name gtk_layout_set_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_vadjustment + (of-object Layout (Gtk)) + (c-name gtk_layout_set_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method freeze + (of-object Layout (Gtk)) + (c-name gtk_layout_freeze) + (return-type none) +) + +(method thaw + (of-object Layout (Gtk)) + (c-name gtk_layout_thaw) + (return-type none) +) + + + +;; From /usr/include/gtk/gtklist.h + +(function gtk_list_get_type + (c-name gtk_list_get_type) + (return-type GtkType) +) + +(function gtk_list_new + (c-name gtk_list_new) + (is-constructor-of GtkList) + (return-type GtkWidget*) +) + +(method insert_items + (of-object List (Gtk)) + (c-name gtk_list_insert_items) + (return-type none) + (parameter (type-and-name GList* items)) + (parameter (type-and-name gint position)) +) + +(method append_items + (of-object List (Gtk)) + (c-name gtk_list_append_items) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method prepend_items + (of-object List (Gtk)) + (c-name gtk_list_prepend_items) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method remove_items + (of-object List (Gtk)) + (c-name gtk_list_remove_items) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method remove_items_no_unref + (of-object List (Gtk)) + (c-name gtk_list_remove_items_no_unref) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method clear_items + (of-object List (Gtk)) + (c-name gtk_list_clear_items) + (return-type none) + (parameter (type-and-name gint start)) + (parameter (type-and-name gint end)) +) + +(method select_item + (of-object List (Gtk)) + (c-name gtk_list_select_item) + (return-type none) + (parameter (type-and-name gint item)) +) + +(method unselect_item + (of-object List (Gtk)) + (c-name gtk_list_unselect_item) + (return-type none) + (parameter (type-and-name gint item)) +) + +(method select_child + (of-object List (Gtk)) + (c-name gtk_list_select_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method unselect_child + (of-object List (Gtk)) + (c-name gtk_list_unselect_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method child_position + (of-object List (Gtk)) + (c-name gtk_list_child_position) + (return-type gint) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_selection_mode + (of-object List (Gtk)) + (c-name gtk_list_set_selection_mode) + (return-type none) + (parameter (type-and-name GtkSelectionMode mode)) +) + +(method extend_selection + (of-object List (Gtk)) + (c-name gtk_list_extend_selection) + (return-type none) + (parameter (type-and-name GtkScrollType scroll_type)) + (parameter (type-and-name gfloat position)) + (parameter (type-and-name gboolean auto_start_selection)) +) + +(method start_selection + (of-object List (Gtk)) + (c-name gtk_list_start_selection) + (return-type none) +) + +(method end_selection + (of-object List (Gtk)) + (c-name gtk_list_end_selection) + (return-type none) +) + +(method select_all + (of-object List (Gtk)) + (c-name gtk_list_select_all) + (return-type none) +) + +(method unselect_all + (of-object List (Gtk)) + (c-name gtk_list_unselect_all) + (return-type none) +) + +(method scroll_horizontal + (of-object List (Gtk)) + (c-name gtk_list_scroll_horizontal) + (return-type none) + (parameter (type-and-name GtkScrollType scroll_type)) + (parameter (type-and-name gfloat position)) +) + +(method scroll_vertical + (of-object List (Gtk)) + (c-name gtk_list_scroll_vertical) + (return-type none) + (parameter (type-and-name GtkScrollType scroll_type)) + (parameter (type-and-name gfloat position)) +) + +(method toggle_add_mode + (of-object List (Gtk)) + (c-name gtk_list_toggle_add_mode) + (return-type none) +) + +(method toggle_focus_row + (of-object List (Gtk)) + (c-name gtk_list_toggle_focus_row) + (return-type none) +) + +(method toggle_row + (of-object List (Gtk)) + (c-name gtk_list_toggle_row) + (return-type none) + (parameter (type-and-name GtkWidget* item)) +) + +(method undo_selection + (of-object List (Gtk)) + (c-name gtk_list_undo_selection) + (return-type none) +) + +(method end_drag_selection + (of-object List (Gtk)) + (c-name gtk_list_end_drag_selection) + (return-type none) +) + + + +;; From /usr/include/gtk/gtklistitem.h + +(function gtk_list_item_get_type + (c-name gtk_list_item_get_type) + (return-type GtkType) +) + +(function gtk_list_item_new + (c-name gtk_list_item_new) + (is-constructor-of GtkListItem) + (return-type GtkWidget*) +) + +(function gtk_list_item_new_with_label + (c-name gtk_list_item_new_with_label) + (is-constructor-of GtkListItem) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method select + (of-object ListItem (Gtk)) + (c-name gtk_list_item_select) + (return-type none) +) + +(method deselect + (of-object ListItem (Gtk)) + (c-name gtk_list_item_deselect) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkmain.h + +(function check_version + (c-name gtk_check_version) + (return-type gchar*) + (parameter (type-and-name guint required_major)) + (parameter (type-and-name guint required_minor)) + (parameter (type-and-name guint required_micro)) +) + +(function init + (c-name gtk_init) + (return-type none) + (parameter (type-and-name int* argc)) + (parameter (type-and-name char*** argv)) +) + +(function init_check + (c-name gtk_init_check) + (return-type gboolean) + (parameter (type-and-name int* argc)) + (parameter (type-and-name char*** argv)) +) + +(function exit + (c-name gtk_exit) + (return-type none) + (parameter (type-and-name gint error_code)) +) + +(function set_locale + (c-name gtk_set_locale) + (return-type gchar*) +) + +(function events_pending + (c-name gtk_events_pending) + (return-type gint) +) + +(function main_do_event + (c-name gtk_main_do_event) + (return-type none) + (parameter (type-and-name GdkEvent* event)) +) + +(function main + (c-name gtk_main) + (return-type none) +) + +(function main_level + (c-name gtk_main_level) + (return-type guint) +) + +(function main_quit + (c-name gtk_main_quit) + (return-type none) +) + +(function main_iteration + (c-name gtk_main_iteration) + (return-type gint) +) + +(function main_iteration_do + (c-name gtk_main_iteration_do) + (return-type gint) + (parameter (type-and-name gboolean blocking) (default "TRUE")) +) + +(function gtk_true + (c-name gtk_true) + (return-type gint) +) + +(function gtk_false + (c-name gtk_false) + (return-type gint) +) + +(function grab_add + (c-name gtk_grab_add) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(function grab_get_current + (c-name gtk_grab_get_current) + (return-type GtkWidget*) +) + +(function grab_remove + (c-name gtk_grab_remove) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(function init_add + (c-name gtk_init_add) + (return-type none) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function quit_add_destroy + (c-name gtk_quit_add_destroy) + (return-type none) + (parameter (type-and-name guint main_level)) + (parameter (type-and-name GtkObject* object)) +) + +(function quit_add + (c-name gtk_quit_add) + (return-type guint) + (parameter (type-and-name guint main_level)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function quit_add_full + (c-name gtk_quit_add_full) + (return-type guint) + (parameter (type-and-name guint main_level)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(function quit_remove + (c-name gtk_quit_remove) + (return-type none) + (parameter (type-and-name guint quit_handler_id)) +) + +(function quit_remove_by_data + (c-name gtk_quit_remove_by_data) + (return-type none) + (parameter (type-and-name gpointer data)) +) + +(function timeout_add + (c-name gtk_timeout_add) + (return-type guint) + (parameter (type-and-name guint32 interval)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function timeout_add_full + (c-name gtk_timeout_add_full) + (return-type guint) + (parameter (type-and-name guint32 interval)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(function timeout_remove + (c-name gtk_timeout_remove) + (return-type none) + (parameter (type-and-name guint timeout_handler_id)) +) + +(function idle_add + (c-name gtk_idle_add) + (return-type guint) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function idle_add_priority + (c-name gtk_idle_add_priority) + (return-type guint) + (parameter (type-and-name gint priority)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function idle_add_full + (c-name gtk_idle_add_full) + (return-type guint) + (parameter (type-and-name gint priority)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(function idle_remove + (c-name gtk_idle_remove) + (return-type none) + (parameter (type-and-name guint idle_handler_id)) +) + +(function idle_remove_by_data + (c-name gtk_idle_remove_by_data) + (return-type none) + (parameter (type-and-name gpointer data)) +) + +(function input_add + (c-name gtk_input_add_full) + (return-type guint) + (parameter (type-and-name gint source)) + (parameter (type-and-name GdkInputCondition condition)) + (parameter (type-and-name GdkInputFunction function)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(function input_remove + (c-name gtk_input_remove) + (return-type none) + (parameter (type-and-name guint input_handler_id)) +) + +(function key_snooper_install + (c-name gtk_key_snooper_install) + (return-type guint) + (parameter (type-and-name GtkKeySnoopFunc snooper)) + (parameter (type-and-name gpointer func_data)) +) + +(function key_snooper_remove + (c-name gtk_key_snooper_remove) + (return-type none) + (parameter (type-and-name guint snooper_handler_id)) +) + +(function get_current_event + (c-name gtk_get_current_event) + (return-type GdkEvent*) +) + +(function get_event_widget + (c-name gtk_get_event_widget) + (return-type GtkWidget*) + (parameter (type-and-name GdkEvent* event)) +) + +(function propagate_event + (c-name gtk_propagate_event) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name GdkEvent* event)) +) + + + +;; From /usr/include/gtk/gtkmenu.h + +(function gtk_menu_get_type + (c-name gtk_menu_get_type) + (return-type GtkType) +) + +(function gtk_menu_new + (c-name gtk_menu_new) + (is-constructor-of GtkMenu) + (return-type GtkWidget*) +) + +(method append + (of-object Menu (Gtk)) + (c-name gtk_menu_append) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method prepend + (of-object Menu (Gtk)) + (c-name gtk_menu_prepend) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method insert + (of-object Menu (Gtk)) + (c-name gtk_menu_insert) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method popup + (of-object Menu (Gtk)) + (c-name gtk_menu_popup) + (return-type none) + (parameter (type-and-name GtkWidget* parent_menu_shell)) + (parameter (type-and-name GtkWidget* parent_menu_item)) + (parameter (type-and-name GtkMenuPositionFunc func)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name guint button)) + (parameter (type-and-name guint32 activate_time)) +) + +(method reposition + (of-object Menu (Gtk)) + (c-name gtk_menu_reposition) + (return-type none) +) + +(method popdown + (of-object Menu (Gtk)) + (c-name gtk_menu_popdown) + (return-type none) +) + +(method get_active + (of-object Menu (Gtk)) + (c-name gtk_menu_get_active) + (return-type GtkWidget*) +) + +(method set_active + (of-object Menu (Gtk)) + (c-name gtk_menu_set_active) + (return-type none) + (parameter (type-and-name guint index)) +) + +(method set_accel_group + (of-object Menu (Gtk)) + (c-name gtk_menu_set_accel_group) + (return-type none) + (parameter (type-and-name GtkAccelGroup* accel_group)) +) + +(method get_accel_group + (of-object Menu (Gtk)) + (c-name gtk_menu_get_accel_group) + (return-type GtkAccelGroup*) +) + +(method get_uline_accel_group + (of-object Menu (Gtk)) + (c-name gtk_menu_get_uline_accel_group) + (return-type GtkAccelGroup*) +) + +(method ensure_uline_accel_group + (of-object Menu (Gtk)) + (c-name gtk_menu_ensure_uline_accel_group) + (return-type GtkAccelGroup*) +) + +(method attach_to_widget + (of-object Menu (Gtk)) + (c-name gtk_menu_attach_to_widget) + (return-type none) + (parameter (type-and-name GtkWidget* attach_widget)) + (parameter (type-and-name GtkMenuDetachFunc detacher)) +) + +(method detach + (of-object Menu (Gtk)) + (c-name gtk_menu_detach) + (return-type none) +) + +(method get_attach_widget + (of-object Menu (Gtk)) + (c-name gtk_menu_get_attach_widget) + (return-type GtkWidget*) +) + +(method set_tearoff_state + (of-object Menu (Gtk)) + (c-name gtk_menu_set_tearoff_state) + (return-type none) + (parameter (type-and-name gboolean torn_off)) +) + +(method set_title + (of-object Menu (Gtk)) + (c-name gtk_menu_set_title) + (return-type none) + (parameter (type-and-name const-gchar* title)) +) + +(method reorder_child + (of-object Menu (Gtk)) + (c-name gtk_menu_reorder_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + + + +;; From /usr/include/gtk/gtkmenubar.h + +(function gtk_menu_bar_get_type + (c-name gtk_menu_bar_get_type) + (return-type GtkType) +) + +(function gtk_menu_bar_new + (c-name gtk_menu_bar_new) + (is-constructor-of GtkMenuBar) + (return-type GtkWidget*) +) + +(method append + (of-object MenuBar (Gtk)) + (c-name gtk_menu_bar_append) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method prepend + (of-object MenuBar (Gtk)) + (c-name gtk_menu_bar_prepend) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method insert + (of-object MenuBar (Gtk)) + (c-name gtk_menu_bar_insert) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method set_shadow_type + (of-object MenuBar (Gtk)) + (c-name gtk_menu_bar_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + + +;; From /usr/include/gtk/gtkmenuitem.h + +(function gtk_menu_item_get_type + (c-name gtk_menu_item_get_type) + (return-type GtkType) +) + +(function gtk_menu_item_new + (c-name gtk_menu_item_new) + (is-constructor-of GtkMenuItem) + (return-type GtkWidget*) +) + +(function gtk_menu_item_new_with_label + (c-name gtk_menu_item_new_with_label) + (is-constructor-of GtkMenuItem) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method set_submenu + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_set_submenu) + (return-type none) + (parameter (type-and-name GtkWidget* submenu)) +) + +(method remove_submenu + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_remove_submenu) + (return-type none) +) + +(method set_placement + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_set_placement) + (return-type none) + (parameter (type-and-name GtkSubmenuPlacement placement)) +) + +(method configure + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_configure) + (return-type none) + (parameter (type-and-name gint show_toggle_indicator)) + (parameter (type-and-name gint show_submenu_indicator)) +) + +(method select + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_select) + (return-type none) +) + +(method deselect + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_deselect) + (return-type none) +) + +(method activate + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_activate) + (return-type none) +) + +(method right_justify + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_right_justify) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkmenushell.h + +(function gtk_menu_shell_get_type + (c-name gtk_menu_shell_get_type) + (return-type GtkType) +) + +(method append + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_append) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method prepend + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_prepend) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method insert + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_insert) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method deactivate + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_deactivate) + (return-type none) +) + +(method select_item + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_select_item) + (return-type none) + (parameter (type-and-name GtkWidget* menu_item)) +) + +(method deselect + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_deselect) + (return-type none) +) + +(method activate_item + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_activate_item) + (return-type none) + (parameter (type-and-name GtkWidget* menu_item)) + (parameter (type-and-name gboolean force_deactivate)) +) + + + +;; From /usr/include/gtk/gtkmisc.h + +(function gtk_misc_get_type + (c-name gtk_misc_get_type) + (return-type GtkType) +) + +(method set_alignment + (of-object Misc (Gtk)) + (c-name gtk_misc_set_alignment) + (return-type none) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) +) + +(method set_padding + (of-object Misc (Gtk)) + (c-name gtk_misc_set_padding) + (return-type none) + (parameter (type-and-name gint xpad)) + (parameter (type-and-name gint ypad)) +) + + + +;; From /usr/include/gtk/gtknotebook.h + +(function gtk_notebook_get_type + (c-name gtk_notebook_get_type) + (return-type GtkType) +) + +(function gtk_notebook_new + (c-name gtk_notebook_new) + (is-constructor-of GtkNotebook) + (return-type GtkWidget*) +) + +(method append_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_append_page) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) +) + +(method append_page_menu + (of-object Notebook (Gtk)) + (c-name gtk_notebook_append_page_menu) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) + (parameter (type-and-name GtkWidget* menu_label)) +) + +(method prepend_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_prepend_page) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) +) + +(method prepend_page_menu + (of-object Notebook (Gtk)) + (c-name gtk_notebook_prepend_page_menu) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) + (parameter (type-and-name GtkWidget* menu_label)) +) + +(method insert_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_insert_page) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) + (parameter (type-and-name gint position)) +) + +(method insert_page_menu + (of-object Notebook (Gtk)) + (c-name gtk_notebook_insert_page_menu) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) + (parameter (type-and-name GtkWidget* menu_label)) + (parameter (type-and-name gint position)) +) + +(method remove_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_remove_page) + (return-type none) + (parameter (type-and-name gint page_num)) +) + +(method get_current_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_get_current_page) + (return-type gint) +) + +(method get_nth_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_get_nth_page) + (return-type GtkWidget*) + (parameter (type-and-name gint page_num)) +) + +(method page_num + (of-object Notebook (Gtk)) + (c-name gtk_notebook_page_num) + (return-type gint) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_page) + (return-type none) + (parameter (type-and-name gint page_num)) +) + +(method next_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_next_page) + (return-type none) +) + +(method prev_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_prev_page) + (return-type none) +) + +(method set_show_border + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_show_border) + (return-type none) + (parameter (type-and-name gboolean show_border)) +) + +(method set_show_tabs + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_show_tabs) + (return-type none) + (parameter (type-and-name gboolean show_tabs)) +) + +(method set_tab_pos + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_pos) + (return-type none) + (parameter (type-and-name GtkPositionType pos)) +) + +(method set_homogeneous_tabs + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_homogeneous_tabs) + (return-type none) + (parameter (type-and-name gboolean homogeneous)) +) + +(method set_tab_border + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_border) + (return-type none) + (parameter (type-and-name guint border_width)) +) + +(method set_tab_hborder + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_hborder) + (return-type none) + (parameter (type-and-name guint tab_hborder)) +) + +(method set_tab_vborder + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_vborder) + (return-type none) + (parameter (type-and-name guint tab_vborder)) +) + +(method set_scrollable + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_scrollable) + (return-type none) + (parameter (type-and-name gboolean scrollable)) +) + +(method popup_enable + (of-object Notebook (Gtk)) + (c-name gtk_notebook_popup_enable) + (return-type none) +) + +(method popup_disable + (of-object Notebook (Gtk)) + (c-name gtk_notebook_popup_disable) + (return-type none) +) + +(method get_tab_label + (of-object Notebook (Gtk)) + (c-name gtk_notebook_get_tab_label) + (return-type GtkWidget*) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_tab_label + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_label) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) +) + +(method set_tab_label_text + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_label_text) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name const-gchar* tab_text)) +) + +(method get_menu_label + (of-object Notebook (Gtk)) + (c-name gtk_notebook_get_menu_label) + (return-type GtkWidget*) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_menu_label + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_menu_label) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* menu_label)) +) + +(method set_menu_label_text + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_menu_label_text) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name const-gchar* menu_text)) +) + +(method query_tab_label_packing + (of-object Notebook (Gtk)) + (c-name gtk_notebook_query_tab_label_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean* expand)) + (parameter (type-and-name gboolean* fill)) + (parameter (type-and-name GtkPackType* pack_type)) +) + +(method set_tab_label_packing + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_label_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean expand)) + (parameter (type-and-name gboolean fill)) + (parameter (type-and-name GtkPackType pack_type)) +) + +(method reorder_child + (of-object Notebook (Gtk)) + (c-name gtk_notebook_reorder_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + + + +;; From /usr/include/gtk/gtkobject.h + +(function gtk_object_get_type + (c-name gtk_object_get_type) + (return-type GtkType) +) + +(method user_signal_new + (of-object ObjectClass (Gtk)) + (c-name gtk_object_class_user_signal_new) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name GtkSignalMarshaller marshaller)) + (parameter (type-and-name GtkType return_val)) + (parameter (type-and-name guint nparams)) + (varargs t) +) + +(method user_signal_newv + (of-object ObjectClass (Gtk)) + (c-name gtk_object_class_user_signal_newv) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name GtkSignalMarshaller marshaller)) + (parameter (type-and-name GtkType return_val)) + (parameter (type-and-name guint nparams)) + (parameter (type-and-name GtkType* params)) +) + +(function gtk_object_new + (c-name gtk_object_new) + (return-type GtkObject*) + (parameter (type-and-name GtkType type)) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(function gtk_object_newv + (c-name gtk_object_newv) + (return-type GtkObject*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method default_construct + (of-object Object (Gtk)) + (c-name gtk_object_default_construct) + (return-type none) +) + +(method constructed + (of-object Object (Gtk)) + (c-name gtk_object_constructed) + (return-type none) +) + +(method sink + (of-object Object (Gtk)) + (c-name gtk_object_sink) + (return-type none) +) + +(method ref + (of-object Object (Gtk)) + (c-name gtk_object_ref) + (return-type none) +) + +(method unref + (of-object Object (Gtk)) + (c-name gtk_object_unref) + (return-type none) +) + +(method weakref + (of-object Object (Gtk)) + (c-name gtk_object_weakref) + (return-type none) + (parameter (type-and-name GtkDestroyNotify notify)) + (parameter (type-and-name gpointer data)) +) + +(method weakunref + (of-object Object (Gtk)) + (c-name gtk_object_weakunref) + (return-type none) + (parameter (type-and-name GtkDestroyNotify notify)) + (parameter (type-and-name gpointer data)) +) + +(method destroy + (of-object Object (Gtk)) + (c-name gtk_object_destroy) + (return-type none) +) + +(method getv + (of-object Object (Gtk)) + (c-name gtk_object_getv) + (return-type none) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method get_arg + (of-object Object (Gtk)) + (c-name gtk_object_get) + (return-type none) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method set_arg + (of-object Object (Gtk)) + (c-name gtk_object_set) + (return-type none) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method setv + (of-object Object (Gtk)) + (c-name gtk_object_setv) + (return-type none) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(function gtk_object_query_args + (c-name gtk_object_query_args) + (return-type GtkArg*) + (parameter (type-and-name GtkType class_type)) + (parameter (type-and-name guint32** arg_flags)) + (parameter (type-and-name guint* n_args)) +) + +(method set_data + (of-object Object (Gtk)) + (c-name gtk_object_set_data) + (return-type none) + (parameter (type-and-name const-gchar* key)) + (parameter (type-and-name gpointer data)) +) + +(method set_data_full + (of-object Object (Gtk)) + (c-name gtk_object_set_data_full) + (return-type none) + (parameter (type-and-name const-gchar* key)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(method remove_data + (of-object Object (Gtk)) + (c-name gtk_object_remove_data) + (return-type none) + (parameter (type-and-name const-gchar* key)) +) + +(method get_data + (of-object Object (Gtk)) + (c-name gtk_object_get_data) + (return-type gpointer) + (parameter (type-and-name const-gchar* key)) +) + +(method remove_no_notify + (of-object Object (Gtk)) + (c-name gtk_object_remove_no_notify) + (return-type none) + (parameter (type-and-name const-gchar* key)) +) + +(method set_user_data + (of-object Object (Gtk)) + (c-name gtk_object_set_user_data) + (return-type none) + (parameter (type-and-name gpointer data)) +) + +(method get_user_data + (of-object Object (Gtk)) + (c-name gtk_object_get_user_data) + (return-type gpointer) +) + +(method add_signals + (of-object ObjectClass (Gtk)) + (c-name gtk_object_class_add_signals) + (return-type none) + (parameter (type-and-name guint* signals)) + (parameter (type-and-name guint nsignals)) +) + +(function gtk_object_add_arg_type + (c-name gtk_object_add_arg_type) + (return-type none) + (parameter (type-and-name const-gchar* arg_name)) + (parameter (type-and-name GtkType arg_type)) + (parameter (type-and-name guint arg_flags)) + (parameter (type-and-name guint arg_id)) +) + +(method set_data_by_id + (of-object Object (Gtk)) + (c-name gtk_object_set_data_by_id) + (return-type none) + (parameter (type-and-name GQuark data_id)) + (parameter (type-and-name gpointer data)) +) + +(method set_data_by_id_full + (of-object Object (Gtk)) + (c-name gtk_object_set_data_by_id_full) + (return-type none) + (parameter (type-and-name GQuark data_id)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(method get_data_by_id + (of-object Object (Gtk)) + (c-name gtk_object_get_data_by_id) + (return-type gpointer) + (parameter (type-and-name GQuark data_id)) +) + +(method remove_data_by_id + (of-object Object (Gtk)) + (c-name gtk_object_remove_data_by_id) + (return-type none) + (parameter (type-and-name GQuark data_id)) +) + +(method remove_no_notify_by_id + (of-object Object (Gtk)) + (c-name gtk_object_remove_no_notify_by_id) + (return-type none) + (parameter (type-and-name GQuark key_id)) +) + +(method arg_set + (of-object Object (Gtk)) + (c-name gtk_object_arg_set) + (return-type none) + (parameter (type-and-name GtkArg* arg)) + (parameter (type-and-name GtkArgInfo* info)) +) + +(method arg_get + (of-object Object (Gtk)) + (c-name gtk_object_arg_get) + (return-type none) + (parameter (type-and-name GtkArg* arg)) + (parameter (type-and-name GtkArgInfo* info)) +) + +(function gtk_object_args_collect + (c-name gtk_object_args_collect) + (return-type gchar*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name GSList** arg_list_p)) + (parameter (type-and-name GSList** info_list_p)) + (parameter (type-and-name const-gchar* first_arg_name)) + (parameter (type-and-name va_list var_args)) +) + +(function gtk_object_arg_get_info + (c-name gtk_object_arg_get_info) + (return-type gchar*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name const-gchar* arg_name)) + (parameter (type-and-name GtkArgInfo** info_p)) +) + +(function gtk_trace_referencing + (c-name gtk_trace_referencing) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* func)) + (parameter (type-and-name guint dummy)) + (parameter (type-and-name guint line)) + (parameter (type-and-name gboolean do_ref)) +) + + + +;; From /usr/include/gtk/gtkoptionmenu.h + +(function gtk_option_menu_get_type + (c-name gtk_option_menu_get_type) + (return-type GtkType) +) + +(function gtk_option_menu_new + (c-name gtk_option_menu_new) + (is-constructor-of GtkOptionMenu) + (return-type GtkWidget*) +) + +(method get_menu + (of-object OptionMenu (Gtk)) + (c-name gtk_option_menu_get_menu) + (return-type GtkWidget*) +) + +(method set_menu + (of-object OptionMenu (Gtk)) + (c-name gtk_option_menu_set_menu) + (return-type none) + (parameter (type-and-name GtkWidget* menu)) +) + +(method remove_menu + (of-object OptionMenu (Gtk)) + (c-name gtk_option_menu_remove_menu) + (return-type none) +) + +(method set_history + (of-object OptionMenu (Gtk)) + (c-name gtk_option_menu_set_history) + (return-type none) + (parameter (type-and-name guint index)) +) + + + +;; From /usr/include/gtk/gtkpacker.h + +(function gtk_packer_get_type + (c-name gtk_packer_get_type) + (return-type GtkType) +) + +(function gtk_packer_new + (c-name gtk_packer_new) + (is-constructor-of GtkPacker) + (return-type GtkWidget*) +) + +(method add_defaults + (of-object Packer (Gtk)) + (c-name gtk_packer_add_defaults) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkSideType side)) + (parameter (type-and-name GtkAnchorType anchor)) + (parameter (type-and-name GtkPackerOptions options)) +) + +(method add + (of-object Packer (Gtk)) + (c-name gtk_packer_add) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkSideType side)) + (parameter (type-and-name GtkAnchorType anchor)) + (parameter (type-and-name GtkPackerOptions options)) + (parameter (type-and-name guint border_width) (default "0")) + (parameter (type-and-name guint pad_x) (default "0")) + (parameter (type-and-name guint pad_y) (default "0")) + (parameter (type-and-name guint i_pad_x) (default "0")) + (parameter (type-and-name guint i_pad_y) (default "0")) +) + +(method set_child_packing + (of-object Packer (Gtk)) + (c-name gtk_packer_set_child_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkSideType side)) + (parameter (type-and-name GtkAnchorType anchor)) + (parameter (type-and-name GtkPackerOptions options)) + (parameter (type-and-name guint border_width) (default "0")) + (parameter (type-and-name guint pad_x) (default "0")) + (parameter (type-and-name guint pad_y) (default "0")) + (parameter (type-and-name guint i_pad_x) (default "0")) + (parameter (type-and-name guint i_pad_y) (default "0")) +) + +(method reorder_child + (of-object Packer (Gtk)) + (c-name gtk_packer_reorder_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method set_spacing + (of-object Packer (Gtk)) + (c-name gtk_packer_set_spacing) + (return-type none) + (parameter (type-and-name guint spacing)) +) + +(method set_default_border_width + (of-object Packer (Gtk)) + (c-name gtk_packer_set_default_border_width) + (return-type none) + (parameter (type-and-name guint border)) +) + +(method set_default_pad + (of-object Packer (Gtk)) + (c-name gtk_packer_set_default_pad) + (return-type none) + (parameter (type-and-name guint pad_x)) + (parameter (type-and-name guint pad_y)) +) + +(method set_default_ipad + (of-object Packer (Gtk)) + (c-name gtk_packer_set_default_ipad) + (return-type none) + (parameter (type-and-name guint i_pad_x)) + (parameter (type-and-name guint i_pad_y)) +) + + + +;; From /usr/include/gtk/gtkpaned.h + +(function gtk_paned_get_type + (c-name gtk_paned_get_type) + (return-type GtkType) +) + +(method add1 + (of-object Paned (Gtk)) + (c-name gtk_paned_add1) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method add2 + (of-object Paned (Gtk)) + (c-name gtk_paned_add2) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method pack1 + (of-object Paned (Gtk)) + (c-name gtk_paned_pack1) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean resize) (default "FALSE")) + (parameter (type-and-name gboolean shrink) (default "TRUE")) +) + +(method pack2 + (of-object Paned (Gtk)) + (c-name gtk_paned_pack2) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean resize) (default "TRUE")) + (parameter (type-and-name gboolean shrink) (default "TRUE")) +) + +(method set_position + (of-object Paned (Gtk)) + (c-name gtk_paned_set_position) + (return-type none) + (parameter (type-and-name gint position)) +) + +(method set_handle_size + (of-object Paned (Gtk)) + (c-name gtk_paned_set_handle_size) + (return-type none) + (parameter (type-and-name guint16 size)) +) + +(method set_gutter_size + (of-object Paned (Gtk)) + (c-name gtk_paned_set_gutter_size) + (return-type none) + (parameter (type-and-name guint16 size)) +) + +(method compute_position + (of-object Paned (Gtk)) + (c-name gtk_paned_compute_position) + (return-type none) + (parameter (type-and-name gint allocation)) + (parameter (type-and-name gint child1_req)) + (parameter (type-and-name gint child2_req)) +) + + + +;; From /usr/include/gtk/gtkpixmap.h + +(function gtk_pixmap_get_type + (c-name gtk_pixmap_get_type) + (return-type GtkType) +) + +(function gtk_pixmap_new + (c-name gtk_pixmap_new) + (is-constructor-of GtkPixmap) + (return-type GtkWidget*) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method set + (of-object Pixmap (Gtk)) + (c-name gtk_pixmap_set) + (return-type none) + (parameter (type-and-name GdkPixmap* val)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method get + (of-object Pixmap (Gtk)) + (c-name gtk_pixmap_get) + (return-type none) + (parameter (type-and-name GdkPixmap** val)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method set_build_insensitive + (of-object Pixmap (Gtk)) + (c-name gtk_pixmap_set_build_insensitive) + (return-type none) + (parameter (type-and-name guint build)) +) + + + +;; From /usr/include/gtk/gtkplug.h + +(function gtk_plug_get_type + (c-name gtk_plug_get_type) + (return-type guint) +) + +(method construct + (of-object Plug (Gtk)) + (c-name gtk_plug_construct) + (return-type none) + (parameter (type-and-name guint32 socket_id)) +) + +(function gtk_plug_new + (c-name gtk_plug_new) + (is-constructor-of GtkPlug) + (return-type GtkWidget*) + (parameter (type-and-name guint32 socket_id)) +) + + + +;; From /usr/include/gtk/gtkpreview.h + +(function gtk_preview_get_type + (c-name gtk_preview_get_type) + (return-type GtkType) +) + +(function gtk_preview_uninit + (c-name gtk_preview_uninit) + (return-type none) +) + +(function gtk_preview_new + (c-name gtk_preview_new) + (is-constructor-of GtkPreview) + (return-type GtkWidget*) + (parameter (type-and-name GtkPreviewType type)) +) + +(method size + (of-object Preview (Gtk)) + (c-name gtk_preview_size) + (return-type none) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method put + (of-object Preview (Gtk)) + (c-name gtk_preview_put) + (return-type none) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint srcx)) + (parameter (type-and-name gint srcy)) + (parameter (type-and-name gint destx)) + (parameter (type-and-name gint desty)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method draw_row + (of-object Preview (Gtk)) + (c-name gtk_preview_draw_row) + (return-type none) + (parameter (type-and-name guchar* data)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint w)) +) + +(method set_expand + (of-object Preview (Gtk)) + (c-name gtk_preview_set_expand) + (return-type none) + (parameter (type-and-name gboolean expand)) +) + +(function preview_set_gamma + (c-name gtk_preview_set_gamma) + (return-type none) + (parameter (type-and-name double gamma)) +) + +(function preview_set_color_cube + (c-name gtk_preview_set_color_cube) + (return-type none) + (parameter (type-and-name guint nred_shades)) + (parameter (type-and-name guint ngreen_shades)) + (parameter (type-and-name guint nblue_shades)) + (parameter (type-and-name guint ngray_shades)) +) + +(function preview_set_install_cmap + (c-name gtk_preview_set_install_cmap) + (return-type none) + (parameter (type-and-name gint install_cmap)) +) + +(function preview_set_reserved + (c-name gtk_preview_set_reserved) + (return-type none) + (parameter (type-and-name gint nreserved)) +) + +(method set_dither + (of-object Preview (Gtk)) + (c-name gtk_preview_set_dither) + (return-type none) + (parameter (type-and-name GdkRgbDither dither)) +) + +(function preview_get_visual + (c-name gtk_preview_get_visual) + (return-type GdkVisual*) +) + +(function preview_get_cmap + (c-name gtk_preview_get_cmap) + (return-type GdkColormap*) +) + +(function preview_get_info + (c-name gtk_preview_get_info) + (return-type GtkPreviewInfo*) +) + +(function preview_reset + (c-name gtk_preview_reset) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkprogress.h + +(function gtk_progress_get_type + (c-name gtk_progress_get_type) + (return-type GtkType) +) + +(method set_show_text + (of-object Progress (Gtk)) + (c-name gtk_progress_set_show_text) + (return-type none) + (parameter (type-and-name gint show_text)) +) + +(method set_text_alignment + (of-object Progress (Gtk)) + (c-name gtk_progress_set_text_alignment) + (return-type none) + (parameter (type-and-name gfloat x_align)) + (parameter (type-and-name gfloat y_align)) +) + +(method set_format_string + (of-object Progress (Gtk)) + (c-name gtk_progress_set_format_string) + (return-type none) + (parameter (type-and-name const-gchar* format)) +) + +(method set_adjustment + (of-object Progress (Gtk)) + (c-name gtk_progress_set_adjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method configure + (of-object Progress (Gtk)) + (c-name gtk_progress_configure) + (return-type none) + (parameter (type-and-name gfloat value)) + (parameter (type-and-name gfloat min)) + (parameter (type-and-name gfloat max)) +) + +(method set_percentage + (of-object Progress (Gtk)) + (c-name gtk_progress_set_percentage) + (return-type none) + (parameter (type-and-name gfloat percentage)) +) + +(method set_value + (of-object Progress (Gtk)) + (c-name gtk_progress_set_value) + (return-type none) + (parameter (type-and-name gfloat value)) +) + +(method get_value + (of-object Progress (Gtk)) + (c-name gtk_progress_get_value) + (return-type gfloat) +) + +(method set_activity_mode + (of-object Progress (Gtk)) + (c-name gtk_progress_set_activity_mode) + (return-type none) + (parameter (type-and-name guint activity_mode)) +) + +(method get_current_text + (of-object Progress (Gtk)) + (c-name gtk_progress_get_current_text) + (return-type gchar*) +) + +(method get_text_from_value + (of-object Progress (Gtk)) + (c-name gtk_progress_get_text_from_value) + (return-type gchar*) + (parameter (type-and-name gfloat value)) +) + +(method get_current_percentage + (of-object Progress (Gtk)) + (c-name gtk_progress_get_current_percentage) + (return-type gfloat) +) + +(method get_percentage_from_value + (of-object Progress (Gtk)) + (c-name gtk_progress_get_percentage_from_value) + (return-type gfloat) + (parameter (type-and-name gfloat value)) +) + + + +;; From /usr/include/gtk/gtkprogressbar.h + +(function gtk_progress_bar_get_type + (c-name gtk_progress_bar_get_type) + (return-type GtkType) +) + +(function gtk_progress_bar_new + (c-name gtk_progress_bar_new) + (return-type GtkWidget*) +) + +(function gtk_progress_bar_new_with_adjustment + (c-name gtk_progress_bar_new_with_adjustment) + (is-constructor-of GtkProgressBar) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok) (default "NULL")) +) + +(method set_bar_style + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_bar_style) + (return-type none) + (parameter (type-and-name GtkProgressBarStyle style)) +) + +(method set_discrete_blocks + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_discrete_blocks) + (return-type none) + (parameter (type-and-name guint blocks)) +) + +(method set_activity_step + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_activity_step) + (return-type none) + (parameter (type-and-name guint step)) +) + +(method set_activity_blocks + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_activity_blocks) + (return-type none) + (parameter (type-and-name guint blocks)) +) + +(method set_orientation + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_orientation) + (return-type none) + (parameter (type-and-name GtkProgressBarOrientation orientation)) +) + +(method update + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_update) + (return-type none) + (parameter (type-and-name gfloat percentage)) +) + + + +;; From /usr/include/gtk/gtkradiobutton.h + +(function gtk_radio_button_get_type + (c-name gtk_radio_button_get_type) + (return-type GtkType) +) + +(function gtk_radio_button_new + (c-name gtk_radio_button_new) + (is-constructor-of GtkRadioButton) + (return-type GtkWidget*) + (parameter (type-and-name GSList* group)) +) + +(function gtk_radio_button_new_from_widget + (c-name gtk_radio_button_new_from_widget) + (is-constructor-of GtkRadioButton) + (return-type GtkWidget*) +) + +(function gtk_radio_button_new_with_label + (c-name gtk_radio_button_new_with_label) + (is-constructor-of GtkRadioButton) + (return-type GtkWidget*) + (parameter (type-and-name GSList* group)) + (parameter (type-and-name const-gchar* label)) +) + +(function gtk_radio_button_new_with_label_from_widget + (c-name gtk_radio_button_new_with_label_from_widget) + (is-constructor-of GtkRadioButton) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method group + (of-object RadioButton (Gtk)) + (c-name gtk_radio_button_group) + (return-type GSList*) +) + +(method set_group + (of-object RadioButton (Gtk)) + (c-name gtk_radio_button_set_group) + (return-type none) + (parameter (type-and-name GSList* group)) +) + + + +;; From /usr/include/gtk/gtkradiomenuitem.h + +(function gtk_radio_menu_item_get_type + (c-name gtk_radio_menu_item_get_type) + (return-type GtkType) +) + +(function gtk_radio_menu_item_new + (c-name gtk_radio_menu_item_new) + (is-constructor-of GtkRadioMenuItem) + (return-type GtkWidget*) + (parameter (type-and-name GSList* group)) +) + +(function gtk_radio_menu_item_new_with_label + (c-name gtk_radio_menu_item_new_with_label) + (is-constructor-of GtkRadioMenuItem) + (return-type GtkWidget*) + (parameter (type-and-name GSList* group)) + (parameter (type-and-name const-gchar* label)) +) + +(method group + (of-object RadioMenuItem (Gtk)) + (c-name gtk_radio_menu_item_group) + (return-type GSList*) +) + +(method set_group + (of-object RadioMenuItem (Gtk)) + (c-name gtk_radio_menu_item_set_group) + (return-type none) + (parameter (type-and-name GSList* group)) +) + + + +;; From /usr/include/gtk/gtkrange.h + +(function gtk_range_get_type + (c-name gtk_range_get_type) + (return-type GtkType) +) + +(method get_adjustment + (of-object Range (Gtk)) + (c-name gtk_range_get_adjustment) + (return-type GtkAdjustment*) +) + +(method set_update_policy + (of-object Range (Gtk)) + (c-name gtk_range_set_update_policy) + (return-type none) + (parameter (type-and-name GtkUpdateType policy)) +) + +(method set_adjustment + (of-object Range (Gtk)) + (c-name gtk_range_set_adjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method draw_background + (of-object Range (Gtk)) + (c-name gtk_range_draw_background) + (return-type none) +) + +(method clear_background + (of-object Range (Gtk)) + (c-name gtk_range_clear_background) + (return-type none) +) + +(method draw_trough + (of-object Range (Gtk)) + (c-name gtk_range_draw_trough) + (return-type none) +) + +(method draw_slider + (of-object Range (Gtk)) + (c-name gtk_range_draw_slider) + (return-type none) +) + +(method draw_step_forw + (of-object Range (Gtk)) + (c-name gtk_range_draw_step_forw) + (return-type none) +) + +(method draw_step_back + (of-object Range (Gtk)) + (c-name gtk_range_draw_step_back) + (return-type none) +) + +(method slider_update + (of-object Range (Gtk)) + (c-name gtk_range_slider_update) + (return-type none) +) + +(method trough_click + (of-object Range (Gtk)) + (c-name gtk_range_trough_click) + (return-type gint) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gfloat* jump_perc)) +) + +(method default_hslider_update + (of-object Range (Gtk)) + (c-name gtk_range_default_hslider_update) + (return-type none) +) + +(method default_vslider_update + (of-object Range (Gtk)) + (c-name gtk_range_default_vslider_update) + (return-type none) +) + +(method default_htrough_click + (of-object Range (Gtk)) + (c-name gtk_range_default_htrough_click) + (return-type gint) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gfloat* jump_perc)) +) + +(method default_vtrough_click + (of-object Range (Gtk)) + (c-name gtk_range_default_vtrough_click) + (return-type gint) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gfloat* jump_perc)) +) + +(method default_hmotion + (of-object Range (Gtk)) + (c-name gtk_range_default_hmotion) + (return-type none) + (parameter (type-and-name gint xdelta)) + (parameter (type-and-name gint ydelta)) +) + +(method default_vmotion + (of-object Range (Gtk)) + (c-name gtk_range_default_vmotion) + (return-type none) + (parameter (type-and-name gint xdelta)) + (parameter (type-and-name gint ydelta)) +) + + + +;; From /usr/include/gtk/gtkrc.h + +(function rc_add_default_file + (c-name gtk_rc_add_default_file) + (return-type none) + (parameter (type-and-name const-gchar* filename)) +) + +(function rc_set_default_files + (c-name gtk_rc_set_default_files) + (return-type none) + (parameter (type-and-name gchar** filenames)) +) + +(function rc_get_default_files + (c-name gtk_rc_get_default_files) + (return-type gchar**) +) + +(function rc_parse + (c-name gtk_rc_parse) + (return-type none) + (parameter (type-and-name const-gchar* filename)) +) + +(function rc_parse_string + (c-name gtk_rc_parse_string) + (return-type none) + (parameter (type-and-name const-gchar* rc_string)) +) + +(function rc_reparse_all + (c-name gtk_rc_reparse_all) + (return-type gboolean) +) + +(function rc_get_style + (c-name gtk_rc_get_style) + (return-type GtkStyle*) + (parameter (type-and-name GtkWidget* widget)) +) + +(function rc_add_widget_name_style + (c-name gtk_rc_add_widget_name_style) + (return-type none) + (parameter (type-and-name GtkRcStyle* rc_style)) + (parameter (type-and-name const-gchar* pattern)) +) + +(function rc_add_widget_class_style + (c-name gtk_rc_add_widget_class_style) + (return-type none) + (parameter (type-and-name GtkRcStyle* rc_style)) + (parameter (type-and-name const-gchar* pattern)) +) + +(function rc_add_class_style + (c-name gtk_rc_add_class_style) + (return-type none) + (parameter (type-and-name GtkRcStyle* rc_style)) + (parameter (type-and-name const-gchar* pattern)) +) + +(function rc_set_image_loader + (c-name gtk_rc_set_image_loader) + (return-type none) + (parameter (type-and-name GtkImageLoader loader)) +) + +(function rc_load_image + (c-name gtk_rc_load_image) + (return-type GdkPixmap*) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name const-gchar* filename)) +) + +(function rc_find_pixmap_in_path + (c-name gtk_rc_find_pixmap_in_path) + (return-type gchar*) + (parameter (type-and-name GScanner* scanner)) + (parameter (type-and-name const-gchar* pixmap_file)) +) + +(function rc_find_module_in_path + (c-name gtk_rc_find_module_in_path) + (return-type gchar*) + (parameter (type-and-name const-gchar* module_file)) +) + +(function rc_get_theme_dir + (c-name gtk_rc_get_theme_dir) + (return-type gchar*) +) + +(function rc_get_module_dir + (c-name gtk_rc_get_module_dir) + (return-type gchar*) +) + +(function rc_parse_color + (c-name gtk_rc_parse_color) + (return-type guint) + (parameter (type-and-name GScanner* scanner)) + (parameter (type-and-name GdkColor* color)) +) + +(function rc_parse_state + (c-name gtk_rc_parse_state) + (return-type guint) + (parameter (type-and-name GScanner* scanner)) + (parameter (type-and-name GtkStateType* state)) +) + +(function rc_parse_priority + (c-name gtk_rc_parse_priority) + (return-type guint) + (parameter (type-and-name GScanner* scanner)) + (parameter (type-and-name GtkPathPriorityType* priority)) +) + + + +;; From /usr/include/gtk/gtkruler.h + +(function gtk_ruler_get_type + (c-name gtk_ruler_get_type) + (return-type GtkType) +) + +(method set_metric + (of-object Ruler (Gtk)) + (c-name gtk_ruler_set_metric) + (return-type none) + (parameter (type-and-name GtkMetricType metric)) +) + +(method set_range + (of-object Ruler (Gtk)) + (c-name gtk_ruler_set_range) + (return-type none) + (parameter (type-and-name gfloat lower)) + (parameter (type-and-name gfloat upper)) + (parameter (type-and-name gfloat position)) + (parameter (type-and-name gfloat max_size)) +) + +(method draw_ticks + (of-object Ruler (Gtk)) + (c-name gtk_ruler_draw_ticks) + (return-type none) +) + +(method draw_pos + (of-object Ruler (Gtk)) + (c-name gtk_ruler_draw_pos) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkscale.h + +(function gtk_scale_get_type + (c-name gtk_scale_get_type) + (return-type GtkType) +) + +(method set_digits + (of-object Scale (Gtk)) + (c-name gtk_scale_set_digits) + (return-type none) + (parameter (type-and-name gint digits)) +) + +(method set_draw_value + (of-object Scale (Gtk)) + (c-name gtk_scale_set_draw_value) + (return-type none) + (parameter (type-and-name gboolean draw_value)) +) + +(method set_value_pos + (of-object Scale (Gtk)) + (c-name gtk_scale_set_value_pos) + (return-type none) + (parameter (type-and-name GtkPositionType pos)) +) + +(method get_value_width + (of-object Scale (Gtk)) + (c-name gtk_scale_get_value_width) + (return-type gint) +) + +(method draw_value + (of-object Scale (Gtk)) + (c-name gtk_scale_draw_value) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkscrollbar.h + +(function gtk_scrollbar_get_type + (c-name gtk_scrollbar_get_type) + (return-type GtkType) +) + + + +;; From /usr/include/gtk/gtkscrolledwindow.h + +(function gtk_scrolled_window_get_type + (c-name gtk_scrolled_window_get_type) + (return-type GtkType) +) + +(function gtk_scrolled_window_new + (c-name gtk_scrolled_window_new) + (is-constructor-of GtkScrolledWindow) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* hadjustment) (null-ok) (default "NULL")) + (parameter (type-and-name GtkAdjustment* vadjustment) (null-ok) (default "NULL")) +) + +(method set_hadjustment + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_set_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* hadjustment)) +) + +(method set_vadjustment + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_set_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* hadjustment)) +) + +(method get_hadjustment + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_get_hadjustment) + (return-type GtkAdjustment*) +) + +(method get_vadjustment + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_get_vadjustment) + (return-type GtkAdjustment*) +) + +(method set_policy + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_set_policy) + (return-type none) + (parameter (type-and-name GtkPolicyType hscrollbar_policy)) + (parameter (type-and-name GtkPolicyType vscrollbar_policy)) +) + +(method set_placement + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_set_placement) + (return-type none) + (parameter (type-and-name GtkCornerType window_placement)) +) + +(method add_with_viewport + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_add_with_viewport) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + + + +;; From /usr/include/gtk/gtkselection.h + +(function gtk_target_list_new + (c-name gtk_target_list_new) + (return-type GtkTargetList*) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name guint ntargets)) +) + +(method ref + (of-object TargetList (Gtk)) + (c-name gtk_target_list_ref) + (return-type none) +) + +(method unref + (of-object TargetList (Gtk)) + (c-name gtk_target_list_unref) + (return-type none) +) + +(method add + (of-object TargetList (Gtk)) + (c-name gtk_target_list_add) + (return-type none) + (parameter (type-and-name GdkAtom target)) + (parameter (type-and-name guint flags)) + (parameter (type-and-name guint info)) +) + +(method add_table + (of-object TargetList (Gtk)) + (c-name gtk_target_list_add_table) + (return-type none) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name guint ntargets)) +) + +(method remove + (of-object TargetList (Gtk)) + (c-name gtk_target_list_remove) + (return-type none) + (parameter (type-and-name GdkAtom target)) +) + +(method find + (of-object TargetList (Gtk)) + (c-name gtk_target_list_find) + (return-type gboolean) + (parameter (type-and-name GdkAtom target)) + (parameter (type-and-name guint* info)) +) + +(method selection_owner_set + (of-object Widget (Gtk)) + (c-name gtk_selection_owner_set) + (return-type gint) + (parameter (type-and-name GdkAtom selection)) + (parameter (type-and-name guint32 time)) +) + +(method selection_add_target + (of-object Widget (Gtk)) + (c-name gtk_selection_add_target) + (return-type none) + (parameter (type-and-name GdkAtom selection)) + (parameter (type-and-name GdkAtom target)) + (parameter (type-and-name guint info)) +) + +(method selection_add_targets + (of-object Widget (Gtk)) + (c-name gtk_selection_add_targets) + (return-type none) + (parameter (type-and-name GdkAtom selection)) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name guint ntargets)) +) + +(method selection_convert + (of-object Widget (Gtk)) + (c-name gtk_selection_convert) + (return-type gint) + (parameter (type-and-name GdkAtom selection)) + (parameter (type-and-name GdkAtom target)) + (parameter (type-and-name guint32 time)) +) + +(method set + (of-object SelectionData (Gtk)) + (c-name gtk_selection_data_set) + (return-type none) + (parameter (type-and-name GdkAtom type)) + (parameter (type-and-name gint format)) + (parameter (type-and-name const-guchar* data)) + (parameter (type-and-name gint length)) +) + +(method selection_remove_all + (of-object Widget (Gtk)) + (c-name gtk_selection_remove_all) + (return-type none) +) + +(method selection_clear + (of-object Widget (Gtk)) + (c-name gtk_selection_clear) + (return-type gint) + (parameter (type-and-name GdkEventSelection* event)) +) + +(method selection_request + (of-object Widget (Gtk)) + (c-name gtk_selection_request) + (return-type gint) + (parameter (type-and-name GdkEventSelection* event)) +) + +(function gtk_selection_incr_event + (c-name gtk_selection_incr_event) + (return-type gint) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkEventProperty* event)) +) + +(method selection_notify + (of-object Widget (Gtk)) + (c-name gtk_selection_notify) + (return-type gint) + (parameter (type-and-name GdkEventSelection* event)) +) + +(method selection_property_notify + (of-object Widget (Gtk)) + (c-name gtk_selection_property_notify) + (return-type gint) + (parameter (type-and-name GdkEventProperty* event)) +) + +(method copy + (of-object SelectionData (Gtk)) + (c-name gtk_selection_data_copy) + (return-type GtkSelectioData*) +) + +(method free + (of-object SelectionData (Gtk)) + (c-name gtk_selection_data_free) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkseparator.h + +(function gtk_separator_get_type + (c-name gtk_separator_get_type) + (return-type GtkType) +) + + + +;; From /usr/include/gtk/gtksignal.h + +(function gtk_signal_lookup + (c-name gtk_signal_lookup) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkType object_type)) +) + +(function gtk_signal_name + (c-name gtk_signal_name) + (return-type gchar*) + (parameter (type-and-name guint signal_id)) +) + +(function gtk_signal_n_emissions + (c-name gtk_signal_n_emissions) + (return-type guint) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint signal_id)) +) + +(function gtk_signal_n_emissions_by_name + (c-name gtk_signal_n_emissions_by_name) + (return-type guint) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* name)) +) + +(method emit_stop + (of-object Object (Gtk)) + (c-name gtk_signal_emit_stop) + (return-type none) + (parameter (type-and-name guint signal_id)) +) + +(method emit_stop_by_name + (of-object Object (Gtk)) + (c-name gtk_signal_emit_stop_by_name) + (return-type none) + (parameter (type-and-name const-gchar* name)) +) + +(method connect + (of-object Object (Gtk)) + (c-name gtk_signal_connect) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer func_data)) +) + +(method connect_after + (of-object Object (Gtk)) + (c-name gtk_signal_connect_after) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer func_data)) +) + +(method connect_object + (of-object Object (Gtk)) + (c-name gtk_signal_connect_object) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name GtkObject* slot_object)) +) + +(method connect_object_after + (of-object Object (Gtk)) + (c-name gtk_signal_connect_object_after) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name GtkObject* slot_object)) +) + +(function gtk_signal_connect_full + (c-name gtk_signal_connect_full) + (return-type guint) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy_func)) + (parameter (type-and-name gint object_signal)) + (parameter (type-and-name gint after)) +) + +(function gtk_signal_connect_object_while_alive + (c-name gtk_signal_connect_object_while_alive) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* signal)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name GtkObject* alive_object)) +) + +(function gtk_signal_connect_while_alive + (c-name gtk_signal_connect_while_alive) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* signal)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer func_data)) + (parameter (type-and-name GtkObject* alive_object)) +) + +(method disconnect + (of-object Object (Gtk)) + (c-name gtk_signal_disconnect) + (return-type none) + (parameter (type-and-name guint handler_id)) +) + +(function gtk_signal_disconnect_by_func + (c-name gtk_signal_disconnect_by_func) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer data)) +) + +(function gtk_signal_disconnect_by_data + (c-name gtk_signal_disconnect_by_data) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name gpointer data)) +) + +(method signal_handler_block + (of-object Object (Gtk)) + (c-name gtk_signal_handler_block) + (return-type none) + (parameter (type-and-name guint handler_id)) +) + +(function gtk_signal_handler_block_by_func + (c-name gtk_signal_handler_block_by_func) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer data)) +) + +(function gtk_signal_handler_block_by_data + (c-name gtk_signal_handler_block_by_data) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name gpointer data)) +) + +(method signal_handler_unblock + (of-object Object (Gtk)) + (c-name gtk_signal_handler_unblock) + (return-type none) + (parameter (type-and-name guint handler_id)) +) + +(function gtk_signal_handler_unblock_by_func + (c-name gtk_signal_handler_unblock_by_func) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer data)) +) + +(function gtk_signal_handler_unblock_by_data + (c-name gtk_signal_handler_unblock_by_data) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name gpointer data)) +) + +(method signal_handler_pending + (of-object Object (Gtk)) + (c-name gtk_signal_handler_pending) + (return-type guint) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name gboolean may_be_blocked)) +) + +(function gtk_signal_handler_pending_by_func + (c-name gtk_signal_handler_pending_by_func) + (return-type guint) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name gboolean may_be_blocked)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method signal_handler_pending_by_id + (of-object Object (Gtk)) + (c-name gtk_signal_handler_pending_by_id) + (return-type gint) + (parameter (type-and-name guint handler_id)) + (parameter (type-and-name gboolean may_be_blocked)) +) + +(function gtk_signal_add_emission_hook + (c-name gtk_signal_add_emission_hook) + (return-type guint) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name GtkEmissionHook hook_func)) + (parameter (type-and-name gpointer data)) +) + +(function gtk_signal_add_emission_hook_full + (c-name gtk_signal_add_emission_hook_full) + (return-type guint) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name GtkEmissionHook hook_func)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GDestroyNotify destroy)) +) + +(function gtk_signal_remove_emission_hook + (c-name gtk_signal_remove_emission_hook) + (return-type none) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name guint hook_id)) +) + +(function gtk_signal_query + (c-name gtk_signal_query) + (return-type GtkSignalQuery*) + (parameter (type-and-name guint signal_id)) +) + +(function gtk_signal_new + (c-name gtk_signal_new) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name guint function_offset)) + (parameter (type-and-name GtkSignalMarshaller marshaller)) + (parameter (type-and-name GtkType return_val)) + (parameter (type-and-name guint nparams)) + (varargs t) +) + +(function gtk_signal_newv + (c-name gtk_signal_newv) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name guint function_offset)) + (parameter (type-and-name GtkSignalMarshaller marshaller)) + (parameter (type-and-name GtkType return_val)) + (parameter (type-and-name guint nparams)) + (parameter (type-and-name GtkType* params)) +) + +(method emit + (of-object Object (Gtk)) + (c-name gtk_signal_emit) + (return-type none) + (parameter (type-and-name guint signal_id)) + (varargs t) +) + +(function gtk_signal_emit_by_name + (c-name gtk_signal_emit_by_name) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* name)) + (varargs t) +) + +(function gtk_signal_emitv + (c-name gtk_signal_emitv) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name GtkArg* params)) +) + +(function gtk_signal_emitv_by_name + (c-name gtk_signal_emitv_by_name) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkArg* params)) +) + +(method signal_handlers_destroy + (of-object Object (Gtk)) + (c-name gtk_signal_handlers_destroy) + (return-type none) +) + +(function gtk_signal_set_funcs + (c-name gtk_signal_set_funcs) + (return-type none) + (parameter (type-and-name GtkSignalMarshal marshal_func)) + (parameter (type-and-name GtkSignalDestroy destroy_func)) +) + + + +;; From /usr/include/gtk/gtksocket.h + +(function gtk_socket_new + (c-name gtk_socket_new) + (is-constructor-of GtkSocket) + (return-type GtkWidget*) +) + +(function gtk_socket_get_type + (c-name gtk_socket_get_type) + (return-type guint) +) + +(method steal + (of-object Socket (Gtk)) + (c-name gtk_socket_steal) + (return-type none) + (parameter (type-and-name guint32 wid)) +) + + + +;; From /usr/include/gtk/gtkspinbutton.h + +(function gtk_spin_button_get_type + (c-name gtk_spin_button_get_type) + (return-type GtkType) +) + +(method configure + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_configure) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) + (parameter (type-and-name gfloat climb_rate)) + (parameter (type-and-name guint digits)) +) + +(function gtk_spin_button_new + (c-name gtk_spin_button_new) + (is-constructor-of GtkSpinButton) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok) (default "NULL")) + (parameter (type-and-name gfloat climb_rate) (default "0.0")) + (parameter (type-and-name guint digits) (default "0")) +) + +(method set_adjustment + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_adjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method get_adjustment + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_get_adjustment) + (return-type GtkAdjustment*) +) + +(method set_digits + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_digits) + (return-type none) + (parameter (type-and-name guint digits)) +) + +(method get_value_as_float + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_get_value_as_float) + (return-type gfloat) +) + +(method get_value_as_int + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_get_value_as_int) + (return-type gint) +) + +(method set_value + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_value) + (return-type none) + (parameter (type-and-name gfloat value)) +) + +(method set_update_policy + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_update_policy) + (return-type none) + (parameter (type-and-name GtkSpinButtonUpdatePolicy policy)) +) + +(method set_numeric + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_numeric) + (return-type none) + (parameter (type-and-name gboolean numeric)) +) + +(method spin + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_spin) + (return-type none) + (parameter (type-and-name GtkSpinType direction)) + (parameter (type-and-name gfloat increment)) +) + +(method set_wrap + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_wrap) + (return-type none) + (parameter (type-and-name gboolean wrap)) +) + +(method set_shadow_type + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType shadow_type)) +) + +(method set_snap_to_ticks + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_snap_to_ticks) + (return-type none) + (parameter (type-and-name gboolean snap_to_ticks)) +) + +(method update + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_update) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkstatusbar.h + +(function gtk_statusbar_get_type + (c-name gtk_statusbar_get_type) + (return-type guint) +) + +(function gtk_statusbar_new + (c-name gtk_statusbar_new) + (is-constructor-of GtkStatusbar) + (return-type GtkWidget*) +) + +(method get_context_id + (of-object Statusbar (Gtk)) + (c-name gtk_statusbar_get_context_id) + (return-type guint) + (parameter (type-and-name const-gchar* context_description)) +) + +(method push + (of-object Statusbar (Gtk)) + (c-name gtk_statusbar_push) + (return-type guint) + (parameter (type-and-name guint context_id)) + (parameter (type-and-name const-gchar* text)) +) + +(method pop + (of-object Statusbar (Gtk)) + (c-name gtk_statusbar_pop) + (return-type none) + (parameter (type-and-name guint context_id)) +) + +(method remove + (of-object Statusbar (Gtk)) + (c-name gtk_statusbar_remove) + (return-type none) + (parameter (type-and-name guint context_id)) + (parameter (type-and-name guint message_id)) +) + + + +;; From /usr/include/gtk/gtkstyle.h + +(function gtk_style_new + (c-name gtk_style_new) + (return-type GtkStyle*) +) + +(method copy + (of-object Style (Gtk)) + (c-name gtk_style_copy) + (return-type GtkStyle*) +) + +(method attach + (of-object Style (Gtk)) + (c-name gtk_style_attach) + (return-type GtkStyle*) + (parameter (type-and-name GdkWindow* window)) +) + +(method detach + (of-object Style (Gtk)) + (c-name gtk_style_detach) + (return-type none) +) + +(method ref + (of-object Style (Gtk)) + (c-name gtk_style_ref) + (return-type GtkStyle*) +) + +(method unref + (of-object Style (Gtk)) + (c-name gtk_style_unref) + (return-type none) +) + +(method set_background + (of-object Style (Gtk)) + (c-name gtk_style_set_background) + (return-type none) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) +) + +(method apply_default_background + (of-object Style (Gtk)) + (c-name gtk_style_apply_default_background) + (return-type none) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name gboolean set_bg)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_hline + (c-name gtk_draw_hline) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name gint x1)) + (parameter (type-and-name gint x2)) + (parameter (type-and-name gint y)) +) + +(function gtk_draw_vline + (c-name gtk_draw_vline) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name gint y1)) + (parameter (type-and-name gint y2)) + (parameter (type-and-name gint x)) +) + +(function gtk_draw_shadow + (c-name gtk_draw_shadow) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_polygon + (c-name gtk_draw_polygon) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) + (parameter (type-and-name gboolean fill)) +) + +(function gtk_draw_arrow + (c-name gtk_draw_arrow) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name gboolean fill)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_diamond + (c-name gtk_draw_diamond) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_oval + (c-name gtk_draw_oval) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_string + (c-name gtk_draw_string) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-gchar* string)) +) + +(function gtk_draw_box + (c-name gtk_draw_box) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_flat_box + (c-name gtk_draw_flat_box) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_check + (c-name gtk_draw_check) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_option + (c-name gtk_draw_option) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_cross + (c-name gtk_draw_cross) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_ramp + (c-name gtk_draw_ramp) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_tab + (c-name gtk_draw_tab) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_shadow_gap + (c-name gtk_draw_shadow_gap) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) + (parameter (type-and-name gint gap_x)) + (parameter (type-and-name gint gap_width)) +) + +(function gtk_draw_box_gap + (c-name gtk_draw_box_gap) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) + (parameter (type-and-name gint gap_x)) + (parameter (type-and-name gint gap_width)) +) + +(function gtk_draw_extension + (c-name gtk_draw_extension) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) +) + +(function gtk_draw_focus + (c-name gtk_draw_focus) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_slider + (c-name gtk_draw_slider) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkOrientation orientation)) +) + +(function gtk_draw_handle + (c-name gtk_draw_handle) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkOrientation orientation)) +) + +(function gtk_paint_hline + (c-name gtk_paint_hline) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x1)) + (parameter (type-and-name gint x2)) + (parameter (type-and-name gint y)) +) + +(function gtk_paint_vline + (c-name gtk_paint_vline) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint y1)) + (parameter (type-and-name gint y2)) + (parameter (type-and-name gint x)) +) + +(function gtk_paint_shadow + (c-name gtk_paint_shadow) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_polygon + (c-name gtk_paint_polygon) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) + (parameter (type-and-name gboolean fill)) +) + +(function gtk_paint_arrow + (c-name gtk_paint_arrow) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name gboolean fill)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_diamond + (c-name gtk_paint_diamond) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_oval + (c-name gtk_paint_oval) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_string + (c-name gtk_paint_string) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-gchar* string)) +) + +(function gtk_paint_box + (c-name gtk_paint_box) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_flat_box + (c-name gtk_paint_flat_box) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_check + (c-name gtk_paint_check) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_option + (c-name gtk_paint_option) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_cross + (c-name gtk_paint_cross) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_ramp + (c-name gtk_paint_ramp) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_tab + (c-name gtk_paint_tab) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_shadow_gap + (c-name gtk_paint_shadow_gap) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) + (parameter (type-and-name gint gap_x)) + (parameter (type-and-name gint gap_width)) +) + +(function gtk_paint_box_gap + (c-name gtk_paint_box_gap) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) + (parameter (type-and-name gint gap_x)) + (parameter (type-and-name gint gap_width)) +) + +(function gtk_paint_extension + (c-name gtk_paint_extension) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) +) + +(function gtk_paint_focus + (c-name gtk_paint_focus) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_slider + (c-name gtk_paint_slider) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkOrientation orientation)) +) + +(function gtk_paint_handle + (c-name gtk_paint_handle) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkOrientation orientation)) +) + + + +;; From /usr/include/gtk/gtktable.h + +(function gtk_table_get_type + (c-name gtk_table_get_type) + (return-type GtkType) +) + +(function gtk_table_new + (c-name gtk_table_new) + (is-constructor-of GtkTable) + (return-type GtkWidget*) + (parameter (type-and-name guint rows) (default "1")) + (parameter (type-and-name guint columns) (default "1")) + (parameter (type-and-name gboolean homogeneous) (default "FALSE")) +) + +(method resize + (of-object Table (Gtk)) + (c-name gtk_table_resize) + (return-type none) + (parameter (type-and-name guint rows)) + (parameter (type-and-name guint columns)) +) + +(method attach + (of-object Table (Gtk)) + (c-name gtk_table_attach) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name guint left_attach)) + (parameter (type-and-name guint right_attach)) + (parameter (type-and-name guint top_attach)) + (parameter (type-and-name guint bottom_attach)) + (parameter (type-and-name GtkAttachOptions xoptions) (default "GTK_EXPAND|GTK_FILL")) + (parameter (type-and-name GtkAttachOptions yoptions) (default "GTK_EXPAND|GTK_FILL")) + (parameter (type-and-name guint xpadding) (default "0")) + (parameter (type-and-name guint ypadding) (default "0")) +) + +(method attach_defaults + (of-object Table (Gtk)) + (c-name gtk_table_attach_defaults) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name guint left_attach)) + (parameter (type-and-name guint right_attach)) + (parameter (type-and-name guint top_attach)) + (parameter (type-and-name guint bottom_attach)) +) + +(method set_row_spacing + (of-object Table (Gtk)) + (c-name gtk_table_set_row_spacing) + (return-type none) + (parameter (type-and-name guint row)) + (parameter (type-and-name guint spacing)) +) + +(method set_col_spacing + (of-object Table (Gtk)) + (c-name gtk_table_set_col_spacing) + (return-type none) + (parameter (type-and-name guint column)) + (parameter (type-and-name guint spacing)) +) + +(method set_row_spacings + (of-object Table (Gtk)) + (c-name gtk_table_set_row_spacings) + (return-type none) + (parameter (type-and-name guint spacing)) +) + +(method set_col_spacings + (of-object Table (Gtk)) + (c-name gtk_table_set_col_spacings) + (return-type none) + (parameter (type-and-name guint spacing)) +) + +(method set_homogeneous + (of-object Table (Gtk)) + (c-name gtk_table_set_homogeneous) + (return-type none) + (parameter (type-and-name gboolean homogeneous)) +) + + + +;; From /usr/include/gtk/gtktearoffmenuitem.h + +(function gtk_tearoff_menu_item_get_type + (c-name gtk_tearoff_menu_item_get_type) + (return-type GtkType) +) + +(function gtk_tearoff_menu_item_new + (c-name gtk_tearoff_menu_item_new) + (is-constructor-of GtkTearoffMenuItem) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtktext.h + +(function gtk_text_get_type + (c-name gtk_text_get_type) + (return-type GtkType) +) + +(function gtk_text_new + (c-name gtk_text_new) + (is-constructor-of GtkText) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* hadj) (null-ok) (default "NULL")) + (parameter (type-and-name GtkAdjustment* vadj) (null-ok) (default "NULL")) +) + +(method set_editable + (of-object Text (Gtk)) + (c-name gtk_text_set_editable) + (return-type none) + (parameter (type-and-name gboolean editable)) +) + +(method set_word_wrap + (of-object Text (Gtk)) + (c-name gtk_text_set_word_wrap) + (return-type none) + (parameter (type-and-name gint word_wrap)) +) + +(method set_line_wrap + (of-object Text (Gtk)) + (c-name gtk_text_set_line_wrap) + (return-type none) + (parameter (type-and-name gint line_wrap)) +) + +(method set_adjustments + (of-object Text (Gtk)) + (c-name gtk_text_set_adjustments) + (return-type none) + (parameter (type-and-name GtkAdjustment* hadj)) + (parameter (type-and-name GtkAdjustment* vadj)) +) + +(method set_point + (of-object Text (Gtk)) + (c-name gtk_text_set_point) + (return-type none) + (parameter (type-and-name guint index)) +) + +(method get_point + (of-object Text (Gtk)) + (c-name gtk_text_get_point) + (return-type guint) +) + +(method get_length + (of-object Text (Gtk)) + (c-name gtk_text_get_length) + (return-type guint) +) + +(method freeze + (of-object Text (Gtk)) + (c-name gtk_text_freeze) + (return-type none) +) + +(method thaw + (of-object Text (Gtk)) + (c-name gtk_text_thaw) + (return-type none) +) + +(method insert + (of-object Text (Gtk)) + (c-name gtk_text_insert) + (return-type none) + (parameter (type-and-name GdkFont* font) (null-ok)) + (parameter (type-and-name GdkColor* fore) (null-ok)) + (parameter (type-and-name GdkColor* back) (null-ok)) + (parameter (type-and-name const-char* chars)) + (parameter (type-and-name gint length) (default "-1")) +) + +(method backward_delete + (of-object Text (Gtk)) + (c-name gtk_text_backward_delete) + (return-type gint) + (parameter (type-and-name guint nchars)) +) + +(method forward_delete + (of-object Text (Gtk)) + (c-name gtk_text_forward_delete) + (return-type gint) + (parameter (type-and-name guint nchars)) +) + + + +;; From /usr/include/gtk/gtktipsquery.h + +(function gtk_tips_query_get_type + (c-name gtk_tips_query_get_type) + (return-type GtkType) +) + +(function gtk_tips_query_new + (c-name gtk_tips_query_new) + (is-constructor-of GtkTipsQuery) + (return-type GtkWidget*) +) + +(method start_query + (of-object TipsQuery (Gtk)) + (c-name gtk_tips_query_start_query) + (return-type none) +) + +(method stop_query + (of-object TipsQuery (Gtk)) + (c-name gtk_tips_query_stop_query) + (return-type none) +) + +(method set_caller + (of-object TipsQuery (Gtk)) + (c-name gtk_tips_query_set_caller) + (return-type none) + (parameter (type-and-name GtkWidget* caller)) +) + +(method set_labels + (of-object TipsQuery (Gtk)) + (c-name gtk_tips_query_set_labels) + (return-type none) + (parameter (type-and-name const-gchar* label_inactive)) + (parameter (type-and-name const-gchar* label_no_tip)) +) + + + +;; From /usr/include/gtk/gtktogglebutton.h + +(function gtk_toggle_button_get_type + (c-name gtk_toggle_button_get_type) + (return-type GtkType) +) + +(function gtk_toggle_button_new + (c-name gtk_toggle_button_new) + (is-constructor-of GtkToggleButton) + (return-type GtkWidget*) +) + +(function gtk_toggle_button_new_with_label + (c-name gtk_toggle_button_new_with_label) + (is-constructor-of GtkToggleButton) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method set_mode + (of-object ToggleButton (Gtk)) + (c-name gtk_toggle_button_set_mode) + (return-type none) + (parameter (type-and-name gboolean draw_indicator)) +) + +(method set_active + (of-object ToggleButton (Gtk)) + (c-name gtk_toggle_button_set_active) + (return-type none) + (parameter (type-and-name gboolean is_active)) +) + +(method get_active + (of-object ToggleButton (Gtk)) + (c-name gtk_toggle_button_get_active) + (return-type gboolean) +) + +(method toggled + (of-object ToggleButton (Gtk)) + (c-name gtk_toggle_button_toggled) + (return-type none) +) + + + +;; From /usr/include/gtk/gtktoolbar.h + +(function gtk_toolbar_get_type + (c-name gtk_toolbar_get_type) + (return-type GtkType) +) + +(function gtk_toolbar_new + (c-name gtk_toolbar_new) + (is-constructor-of GtkToolbar) + (return-type GtkWidget*) + (parameter (type-and-name GtkOrientation orientation)) + (parameter (type-and-name GtkToolbarStyle style)) +) + +(method append_item + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_append_item) + (return-type GtkWidget*) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) +) + +(method prepend_item + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_prepend_item) + (return-type GtkWidget*) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) +) + +(method insert_item + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_insert_item) + (return-type GtkWidget*) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) + (parameter (type-and-name gint position)) +) + +(method append_space + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_append_space) + (return-type none) +) + +(method prepend_space + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_prepend_space) + (return-type none) +) + +(method insert_space + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_insert_space) + (return-type none) + (parameter (type-and-name gint position)) +) + +(method append_element + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_append_element) + (return-type GtkWidget*) + (parameter (type-and-name GtkToolbarChildType type)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) +) + +(method prepend_element + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_prepend_element) + (return-type GtkWidget*) + (parameter (type-and-name GtkToolbarChildType type)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) +) + +(method insert_element + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_insert_element) + (return-type GtkWidget*) + (parameter (type-and-name GtkToolbarChildType type)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) + (parameter (type-and-name gint position)) +) + +(method append_widget + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_append_widget) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) +) + +(method prepend_widget + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_prepend_widget) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) +) + +(method insert_widget + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_insert_widget) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name gint position)) +) + +(method set_orientation + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_orientation) + (return-type none) + (parameter (type-and-name GtkOrientation orientation)) +) + +(method set_style + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_style) + (return-type none) + (parameter (type-and-name GtkToolbarStyle style)) +) + +(method set_space_size + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_space_size) + (return-type none) + (parameter (type-and-name gint space_size)) +) + +(method set_space_style + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_space_style) + (return-type none) + (parameter (type-and-name GtkToolbarSpaceStyle space_style)) +) + +(method set_tooltips + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_tooltips) + (return-type none) + (parameter (type-and-name gint enable)) +) + +(method set_button_relief + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_button_relief) + (return-type none) + (parameter (type-and-name GtkReliefStyle relief)) +) + +(method get_button_relief + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_get_button_relief) + (return-type GtkReliefStyle) +) + + + +;; From /usr/include/gtk/gtktooltips.h + +(function gtk_tooltips_get_type + (c-name gtk_tooltips_get_type) + (return-type GtkType) +) + +(function gtk_tooltips_new + (c-name gtk_tooltips_new) + (is-constructor-of GtkTooltips) + (return-type GtkTooltips*) +) + +(method enable + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_enable) + (return-type none) +) + +(method disable + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_disable) + (return-type none) +) + +(method set_delay + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_set_delay) + (return-type none) + (parameter (type-and-name guint delay)) +) + +(method set_tip + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_set_tip) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-gchar* tip_text)) + (parameter (type-and-name const-gchar* tip_private)) +) + +(method set_colors + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_set_colors) + (return-type none) + (parameter (type-and-name GdkColor* background)) + (parameter (type-and-name GdkColor* foreground)) +) + +(function gtk_tooltips_data_get + (c-name gtk_tooltips_data_get) + (return-type GtkTooltipsData*) + (parameter (type-and-name GtkWidget* widget)) +) + +(method force_window + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_force_window) + (return-type none) +) + + + +;; From /usr/include/gtk/gtktree.h + +(function gtk_tree_get_type + (c-name gtk_tree_get_type) + (return-type GtkType) +) + +(function gtk_tree_new + (c-name gtk_tree_new) + (is-constructor-of GtkTree) + (return-type GtkWidget*) +) + +(method append + (of-object Tree (Gtk)) + (c-name gtk_tree_append) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) +) + +(method prepend + (of-object Tree (Gtk)) + (c-name gtk_tree_prepend) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) +) + +(method insert + (of-object Tree (Gtk)) + (c-name gtk_tree_insert) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) + (parameter (type-and-name gint position)) +) + +(method remove_items + (of-object Tree (Gtk)) + (c-name gtk_tree_remove_items) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method clear_items + (of-object Tree (Gtk)) + (c-name gtk_tree_clear_items) + (return-type none) + (parameter (type-and-name gint start)) + (parameter (type-and-name gint end)) +) + +(method select_item + (of-object Tree (Gtk)) + (c-name gtk_tree_select_item) + (return-type none) + (parameter (type-and-name gint item)) +) + +(method unselect_item + (of-object Tree (Gtk)) + (c-name gtk_tree_unselect_item) + (return-type none) + (parameter (type-and-name gint item)) +) + +(method select_child + (of-object Tree (Gtk)) + (c-name gtk_tree_select_child) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) +) + +(method unselect_child + (of-object Tree (Gtk)) + (c-name gtk_tree_unselect_child) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) +) + +(method child_position + (of-object Tree (Gtk)) + (c-name gtk_tree_child_position) + (return-type gint) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_selection_mode + (of-object Tree (Gtk)) + (c-name gtk_tree_set_selection_mode) + (return-type none) + (parameter (type-and-name GtkSelectionMode mode)) +) + +(method set_view_mode + (of-object Tree (Gtk)) + (c-name gtk_tree_set_view_mode) + (return-type none) + (parameter (type-and-name GtkTreeViewMode mode)) +) + +(method set_view_lines + (of-object Tree (Gtk)) + (c-name gtk_tree_set_view_lines) + (return-type none) + (parameter (type-and-name guint flag)) +) + +(method remove_item + (of-object Tree (Gtk)) + (c-name gtk_tree_remove_item) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + + + +;; From /usr/include/gtk/gtktreeitem.h + +(function gtk_tree_item_get_type + (c-name gtk_tree_item_get_type) + (return-type GtkType) +) + +(function gtk_tree_item_new + (c-name gtk_tree_item_new) + (is-constructor-of GtkTreeItem) + (return-type GtkWidget*) +) + +(function gtk_tree_item_new_with_label + (c-name gtk_tree_item_new_with_label) + (is-constructor-of GtkTreeItem) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method set_subtree + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_set_subtree) + (return-type none) + (parameter (type-and-name GtkWidget* subtree)) +) + +(method remove_subtree + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_remove_subtree) + (return-type none) +) + +(method select + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_select) + (return-type none) +) + +(method deselect + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_deselect) + (return-type none) +) + +(method expand + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_expand) + (return-type none) +) + +(method collapse + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_collapse) + (return-type none) +) + + + +;; From /usr/include/gtk/gtktypeutils.h + +(method unique + (of-object Type (Gtk)) + (c-name gtk_type_unique) + (return-type GtkType) + (parameter (type-and-name const-GtkTypeInfo* type_info)) +) + +(method set_chunk_alloc + (of-object Type (Gtk)) + (c-name gtk_type_set_chunk_alloc) + (return-type none) + (parameter (type-and-name guint n_chunks)) +) + +(function gtk_type_name + (c-name gtk_type_name) + (return-type gchar*) + (parameter (type-and-name guint type)) +) + +(function gtk_type_from_name + (c-name gtk_type_from_name) + (return-type GtkType) + (parameter (type-and-name const-gchar* name)) +) + +(method parent + (of-object Type (Gtk)) + (c-name gtk_type_parent) + (return-type GtkType) +) + +(method class + (of-object Type (Gtk)) + (c-name gtk_type_class) + (return-type gpointer) +) + +(method parent_class + (of-object Type (Gtk)) + (c-name gtk_type_parent_class) + (return-type gpointer) +) + +(method children_types + (of-object Type (Gtk)) + (c-name gtk_type_children_types) + (return-type GList*) +) + +(method new + (of-object Type (Gtk)) + (c-name gtk_type_new) + (return-type gpointer) +) + +(method free + (of-object Type (Gtk)) + (c-name gtk_type_free) + (return-type none) + (parameter (type-and-name gpointer mem)) +) + +(method describe_heritage + (of-object Type (Gtk)) + (c-name gtk_type_describe_heritage) + (return-type none) +) + +(method describe_tree + (of-object Type (Gtk)) + (c-name gtk_type_describe_tree) + (return-type none) + (parameter (type-and-name gboolean show_size)) +) + +(method is_a + (of-object Type (Gtk)) + (c-name gtk_type_is_a) + (return-type gboolean) + (parameter (type-and-name GtkType is_a_type)) +) + +(function gtk_type_check_object_cast + (c-name gtk_type_check_object_cast) + (return-type GtkTypeObject*) + (parameter (type-and-name GtkTypeObject* type_object)) + (parameter (type-and-name GtkType cast_type)) +) + +(function gtk_type_check_class_cast + (c-name gtk_type_check_class_cast) + (return-type GtkTypeClass*) + (parameter (type-and-name GtkTypeClass* klass)) + (parameter (type-and-name GtkType cast_type)) +) + +(function gtk_type_register_enum + (c-name gtk_type_register_enum) + (return-type GtkType) + (parameter (type-and-name const-gchar* type_name)) + (parameter (type-and-name GtkEnumValue* values)) +) + +(function gtk_type_register_flags + (c-name gtk_type_register_flags) + (return-type GtkType) + (parameter (type-and-name const-gchar* type_name)) + (parameter (type-and-name GtkFlagValue* values)) +) + +(method enum_get_values + (of-object Type (Gtk)) + (c-name gtk_type_enum_get_values) + (return-type GtkEnumValue*) +) + +(method flags_get_values + (of-object Type (Gtk)) + (c-name gtk_type_flags_get_values) + (return-type GtkFlagValue*) +) + +(method enum_find_value + (of-object Type (Gtk)) + (c-name gtk_type_enum_find_value) + (return-type GtkEnumValue*) + (parameter (type-and-name const-gchar* value_name)) +) + +(method flags_find_value + (of-object Type (Gtk)) + (c-name gtk_type_flags_find_value) + (return-type GtkFlagValue*) + (parameter (type-and-name const-gchar* value_name)) +) + +(method set_varargs_type + (of-object Type (Gtk)) + (c-name gtk_type_set_varargs_type) + (return-type none) + (parameter (type-and-name GtkType varargs_type)) +) + +(method get_varargs_type + (of-object Type (Gtk)) + (c-name gtk_type_get_varargs_type) + (return-type GtkType) +) + +(method query + (of-object Type (Gtk)) + (c-name gtk_type_query) + (return-type GtkTypeQuery*) +) + + + +;; From /usr/include/gtk/gtkvbbox.h + +(function gtk_vbutton_box_get_type + (c-name gtk_vbutton_box_get_type) + (return-type guint) +) + +(function gtk_vbutton_box_new + (c-name gtk_vbutton_box_new) + (is-constructor-of GtkVButtonBox) + (return-type GtkWidget*) +) + +(function vbutton_box_get_spacing_default + (c-name gtk_vbutton_box_get_spacing_default) + (return-type gint) +) + +(function vbutton_box_set_spacing_default + (c-name gtk_vbutton_box_set_spacing_default) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(function vbutton_box_get_layout_default + (c-name gtk_vbutton_box_get_layout_default) + (return-type GtkButtonBoxStyle) +) + +(function vbutton_box_set_layout_default + (c-name gtk_vbutton_box_set_layout_default) + (return-type none) + (parameter (type-and-name GtkButtonBoxStyle layout)) +) + + + +;; From /usr/include/gtk/gtkvbox.h + +(function gtk_vbox_get_type + (c-name gtk_vbox_get_type) + (return-type GtkType) +) + +(function gtk_vbox_new + (c-name gtk_vbox_new) + (is-constructor-of GtkVBox) + (return-type GtkWidget*) + (parameter (type-and-name gboolean homogeneous) (default "FALSE")) + (parameter (type-and-name gint spacing) (default "0")) +) + + + +;; From /usr/include/gtk/gtkviewport.h + +(function gtk_viewport_get_type + (c-name gtk_viewport_get_type) + (return-type GtkType) +) + +(function gtk_viewport_new + (c-name gtk_viewport_new) + (is-constructor-of GtkViewport) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* hadjustment) (null-ok) (default "NULL")) + (parameter (type-and-name GtkAdjustment* vadjustment) (null-ok) (default "NULL")) +) + +(method get_hadjustment + (of-object Viewport (Gtk)) + (c-name gtk_viewport_get_hadjustment) + (return-type GtkAdjustment*) +) + +(method get_vadjustment + (of-object Viewport (Gtk)) + (c-name gtk_viewport_get_vadjustment) + (return-type GtkAdjustment*) +) + +(method set_hadjustment + (of-object Viewport (Gtk)) + (c-name gtk_viewport_set_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_vadjustment + (of-object Viewport (Gtk)) + (c-name gtk_viewport_set_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_shadow_type + (of-object Viewport (Gtk)) + (c-name gtk_viewport_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + + + +;; From /usr/include/gtk/gtkvpaned.h + +(function gtk_vpaned_get_type + (c-name gtk_vpaned_get_type) + (return-type guint) +) + +(function gtk_vpaned_new + (c-name gtk_vpaned_new) + (is-constructor-of GtkVPaned) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkvruler.h + +(function gtk_vruler_get_type + (c-name gtk_vruler_get_type) + (return-type guint) +) + +(function gtk_vruler_new + (c-name gtk_vruler_new) + (is-constructor-of GtkVRuler) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkvscale.h + +(function gtk_vscale_get_type + (c-name gtk_vscale_get_type) + (return-type GtkType) +) + +(function gtk_vscale_new + (c-name gtk_vscale_new) + (is-constructor-of GtkVScale) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok) (default "NULL")) +) + + + +;; From /usr/include/gtk/gtkvscrollbar.h + +(function gtk_vscrollbar_new + (c-name gtk_vscrollbar_new) + (is-constructor-of GtkVScrollbar) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok) (default "NULL")) +) + + + +;; From /usr/include/gtk/gtkvseparator.h + +(function gtk_vseparator_get_type + (c-name gtk_vseparator_get_type) + (return-type GtkType) +) + +(function gtk_vseparator_new + (c-name gtk_vseparator_new) + (is-constructor-of GtkVSeparator) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkwidget.h + +(function gtk_widget_get_type + (c-name gtk_widget_get_type) + (return-type GtkType) +) + +(function gtk_widget_new + (c-name gtk_widget_new) + (return-type GtkWidget*) + (parameter (type-and-name GtkType type)) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(function gtk_widget_newv + (c-name gtk_widget_newv) + (return-type GtkWidget*) + (parameter (type-and-name GtkType type)) + (parameter (type-and-name guint nargs)) + (parameter (type-and-name GtkArg* args)) +) + +(method ref + (of-object Widget (Gtk)) + (c-name gtk_widget_ref) + (return-type none) +) + +(method unref + (of-object Widget (Gtk)) + (c-name gtk_widget_unref) + (return-type none) +) + +(method destroy + (of-object Widget (Gtk)) + (c-name gtk_widget_destroy) + (return-type none) +) + +(method destroyed + (of-object Widget (Gtk)) + (c-name gtk_widget_destroyed) + (return-type none) + (parameter (type-and-name GtkWidget** widget_pointer)) +) + +(method get + (of-object Widget (Gtk)) + (c-name gtk_widget_get) + (return-type none) + (parameter (type-and-name GtkArg* arg)) +) + +(method getv + (of-object Widget (Gtk)) + (c-name gtk_widget_getv) + (return-type none) + (parameter (type-and-name guint nargs)) + (parameter (type-and-name GtkArg* args)) +) + +(method set + (of-object Widget (Gtk)) + (c-name gtk_widget_set) + (return-type none) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method setv + (of-object Widget (Gtk)) + (c-name gtk_widget_setv) + (return-type none) + (parameter (type-and-name guint nargs)) + (parameter (type-and-name GtkArg* args)) +) + +(method unparent + (of-object Widget (Gtk)) + (c-name gtk_widget_unparent) + (return-type none) +) + +(method show + (of-object Widget (Gtk)) + (c-name gtk_widget_show) + (return-type none) +) + +(method show_now + (of-object Widget (Gtk)) + (c-name gtk_widget_show_now) + (return-type none) +) + +(method hide + (of-object Widget (Gtk)) + (c-name gtk_widget_hide) + (return-type none) +) + +(method show_all + (of-object Widget (Gtk)) + (c-name gtk_widget_show_all) + (return-type none) +) + +(method hide_all + (of-object Widget (Gtk)) + (c-name gtk_widget_hide_all) + (return-type none) +) + +(method map + (of-object Widget (Gtk)) + (c-name gtk_widget_map) + (return-type none) +) + +(method unmap + (of-object Widget (Gtk)) + (c-name gtk_widget_unmap) + (return-type none) +) + +(method realize + (of-object Widget (Gtk)) + (c-name gtk_widget_realize) + (return-type none) +) + +(method unrealize + (of-object Widget (Gtk)) + (c-name gtk_widget_unrealize) + (return-type none) +) + +(method queue_draw + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_draw) + (return-type none) +) + +(method queue_draw_area + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_draw_area) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method queue_clear + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_clear) + (return-type none) +) + +(method queue_clear_area + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_clear_area) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method queue_resize + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_resize) + (return-type none) +) + +(method draw + (of-object Widget (Gtk)) + (c-name gtk_widget_draw) + (return-type none) + (parameter (type-and-name GdkRectangle* area)) +) + +(method draw_focus + (of-object Widget (Gtk)) + (c-name gtk_widget_draw_focus) + (return-type none) +) + +(method draw_default + (of-object Widget (Gtk)) + (c-name gtk_widget_draw_default) + (return-type none) +) + +(method size_request + (of-object Widget (Gtk)) + (c-name gtk_widget_size_request) + (return-type none) + (parameter (type-and-name GtkRequisition* requisition)) +) + +(method size_allocate + (of-object Widget (Gtk)) + (c-name gtk_widget_size_allocate) + (return-type none) + (parameter (type-and-name GtkAllocation* allocation)) +) + +(method get_child_requisition + (of-object Widget (Gtk)) + (c-name gtk_widget_get_child_requisition) + (return-type none) + (parameter (type-and-name GtkRequisition* requisition)) +) + +(method add_accelerator + (of-object Widget (Gtk)) + (c-name gtk_widget_add_accelerator) + (return-type none) + (parameter (type-and-name const-gchar* accel_signal)) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name guint accel_mods)) + (parameter (type-and-name GtkAccelFlags accel_flags)) +) + +(method remove_accelerator + (of-object Widget (Gtk)) + (c-name gtk_widget_remove_accelerator) + (return-type none) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name guint accel_mods)) +) + +(method remove_accelerators + (of-object Widget (Gtk)) + (c-name gtk_widget_remove_accelerators) + (return-type none) + (parameter (type-and-name const-gchar* accel_signal)) + (parameter (type-and-name gboolean visible_only)) +) + +(method accelerator_signal + (of-object Widget (Gtk)) + (c-name gtk_widget_accelerator_signal) + (return-type guint) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name guint accel_mods)) +) + +(method lock_accelerators + (of-object Widget (Gtk)) + (c-name gtk_widget_lock_accelerators) + (return-type none) +) + +(method unlock_accelerators + (of-object Widget (Gtk)) + (c-name gtk_widget_unlock_accelerators) + (return-type none) +) + +(method accelerators_locked + (of-object Widget (Gtk)) + (c-name gtk_widget_accelerators_locked) + (return-type gboolean) +) + +(method event + (of-object Widget (Gtk)) + (c-name gtk_widget_event) + (return-type gint) + (parameter (type-and-name GdkEvent* event)) +) + +(method activate + (of-object Widget (Gtk)) + (c-name gtk_widget_activate) + (return-type gboolean) +) + +(method set_scroll_adjustments + (of-object Widget (Gtk)) + (c-name gtk_widget_set_scroll_adjustments) + (return-type gboolean) + (parameter (type-and-name GtkAdjustment* hadjustment)) + (parameter (type-and-name GtkAdjustment* vadjustment)) +) + +(method reparent + (of-object Widget (Gtk)) + (c-name gtk_widget_reparent) + (return-type none) + (parameter (type-and-name GtkWidget* new_parent)) +) + +(method popup + (of-object Widget (Gtk)) + (c-name gtk_widget_popup) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method intersect + (of-object Widget (Gtk)) + (c-name gtk_widget_intersect) + (return-type gint) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GdkRectangle* intersection)) +) + +(method grab_focus + (of-object Widget (Gtk)) + (c-name gtk_widget_grab_focus) + (return-type none) +) + +(method grab_default + (of-object Widget (Gtk)) + (c-name gtk_widget_grab_default) + (return-type none) +) + +(method set_name + (of-object Widget (Gtk)) + (c-name gtk_widget_set_name) + (return-type none) + (parameter (type-and-name const-gchar* name)) +) + +(method get_name + (of-object Widget (Gtk)) + (c-name gtk_widget_get_name) + (return-type gchar*) +) + +(method set_state + (of-object Widget (Gtk)) + (c-name gtk_widget_set_state) + (return-type none) + (parameter (type-and-name GtkStateType state)) +) + +(method set_sensitive + (of-object Widget (Gtk)) + (c-name gtk_widget_set_sensitive) + (return-type none) + (parameter (type-and-name gboolean sensitive)) +) + +(method set_app_paintable + (of-object Widget (Gtk)) + (c-name gtk_widget_set_app_paintable) + (return-type none) + (parameter (type-and-name gboolean app_paintable)) +) + +(method set_parent + (of-object Widget (Gtk)) + (c-name gtk_widget_set_parent) + (return-type none) + (parameter (type-and-name GtkWidget* parent)) +) + +(method set_parent_window + (of-object Widget (Gtk)) + (c-name gtk_widget_set_parent_window) + (return-type none) + (parameter (type-and-name GdkWindow* parent_window)) +) + +(method get_parent_window + (of-object Widget (Gtk)) + (c-name gtk_widget_get_parent_window) + (return-type GdkWindow*) +) + +(method set_uposition + (of-object Widget (Gtk)) + (c-name gtk_widget_set_uposition) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method set_usize + (of-object Widget (Gtk)) + (c-name gtk_widget_set_usize) + (return-type none) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method set_events + (of-object Widget (Gtk)) + (c-name gtk_widget_set_events) + (return-type none) + (parameter (type-and-name gint events)) +) + +(method add_events + (of-object Widget (Gtk)) + (c-name gtk_widget_add_events) + (return-type none) + (parameter (type-and-name gint events)) +) + +(method set_extension_events + (of-object Widget (Gtk)) + (c-name gtk_widget_set_extension_events) + (return-type none) + (parameter (type-and-name GdkExtensionMode mode)) +) + +(method get_extension_events + (of-object Widget (Gtk)) + (c-name gtk_widget_get_extension_events) + (return-type GdkExtensionMode) +) + +(method get_toplevel + (of-object Widget (Gtk)) + (c-name gtk_widget_get_toplevel) + (return-type GtkWidget*) +) + +(method get_ancestor + (of-object Widget (Gtk)) + (c-name gtk_widget_get_ancestor) + (return-type GtkWidget*) + (parameter (type-and-name GtkType widget_type)) +) + +(method get_colormap + (of-object Widget (Gtk)) + (c-name gtk_widget_get_colormap) + (return-type GdkColormap*) +) + +(method get_visual + (of-object Widget (Gtk)) + (c-name gtk_widget_get_visual) + (return-type GdkVisual*) +) + +(method set_colormap + (of-object Widget (Gtk)) + (c-name gtk_widget_set_colormap) + (return-type none) + (parameter (type-and-name GdkColormap* colormap)) +) + +(method set_visual + (of-object Widget (Gtk)) + (c-name gtk_widget_set_visual) + (return-type none) + (parameter (type-and-name GdkVisual* visual)) +) + +(method get_events + (of-object Widget (Gtk)) + (c-name gtk_widget_get_events) + (return-type gint) +) + +(method get_pointer + (of-object Widget (Gtk)) + (c-name gtk_widget_get_pointer) + (return-type none) + (parameter (type-and-name gint* x)) + (parameter (type-and-name gint* y)) +) + +(method is_ancestor + (of-object Widget (Gtk)) + (c-name gtk_widget_is_ancestor) + (return-type gint) + (parameter (type-and-name GtkWidget* ancestor)) +) + +(method hide_on_delete + (of-object Widget (Gtk)) + (c-name gtk_widget_hide_on_delete) + (return-type gint) +) + +(method set_style + (of-object Widget (Gtk)) + (c-name gtk_widget_set_style) + (return-type none) + (parameter (type-and-name GtkStyle* style)) +) + +(method set_rc_style + (of-object Widget (Gtk)) + (c-name gtk_widget_set_rc_style) + (return-type none) +) + +(method ensure_style + (of-object Widget (Gtk)) + (c-name gtk_widget_ensure_style) + (return-type none) +) + +(method get_style + (of-object Widget (Gtk)) + (c-name gtk_widget_get_style) + (return-type GtkStyle*) +) + +(method restore_default_style + (of-object Widget (Gtk)) + (c-name gtk_widget_restore_default_style) + (return-type none) +) + +(method modify_style + (of-object Widget (Gtk)) + (c-name gtk_widget_modify_style) + (return-type none) + (parameter (type-and-name GtkRcStyle* style)) +) + +(method set_composite_name + (of-object Widget (Gtk)) + (c-name gtk_widget_set_composite_name) + (return-type none) + (parameter (type-and-name const-gchar* name)) +) + +(method get_composite_name + (of-object Widget (Gtk)) + (c-name gtk_widget_get_composite_name) + (return-type gchar*) +) + +(method reset_rc_styles + (of-object Widget (Gtk)) + (c-name gtk_widget_reset_rc_styles) + (return-type none) +) + +(function widget_push_style + (c-name gtk_widget_push_style) + (return-type none) + (parameter (type-and-name GtkStyle* style)) +) + +(function widget_push_colormap + (c-name gtk_widget_push_colormap) + (return-type none) + (parameter (type-and-name GdkColormap* cmap)) +) + +(function widget_push_visual + (c-name gtk_widget_push_visual) + (return-type none) + (parameter (type-and-name GdkVisual* visual)) +) + +(function widget_push_composite_child + (c-name gtk_widget_push_composite_child) + (return-type none) +) + +(function widget_pop_composite_child + (c-name gtk_widget_pop_composite_child) + (return-type none) +) + +(function widget_pop_style + (c-name gtk_widget_pop_style) + (return-type none) +) + +(function widget_pop_colormap + (c-name gtk_widget_pop_colormap) + (return-type none) +) + +(function widget_pop_visual + (c-name gtk_widget_pop_visual) + (return-type none) +) + +(function widget_set_default_style + (c-name gtk_widget_set_default_style) + (return-type none) + (parameter (type-and-name GtkStyle* style)) +) + +(function widget_set_default_colormap + (c-name gtk_widget_set_default_colormap) + (return-type none) + (parameter (type-and-name GdkColormap* colormap)) +) + +(function widget_set_default_visual + (c-name gtk_widget_set_default_visual) + (return-type none) + (parameter (type-and-name GdkVisual* visual)) +) + +(function widget_get_default_style + (c-name gtk_widget_get_default_style) + (return-type GtkStyle*) +) + +(function widget_get_default_colormap + (c-name gtk_widget_get_default_colormap) + (return-type GdkColormap*) +) + +(function widget_get_default_visual + (c-name gtk_widget_get_default_visual) + (return-type GdkVisual*) +) + +(method shape_combine_mask + (of-object Widget (Gtk)) + (c-name gtk_widget_shape_combine_mask) + (return-type none) + (parameter (type-and-name GdkBitmap* shape_mask)) + (parameter (type-and-name gint offset_x)) + (parameter (type-and-name gint offset_y)) +) + +(method reset_shapes + (of-object Widget (Gtk)) + (c-name gtk_widget_reset_shapes) + (return-type none) +) + +(method path + (of-object Widget (Gtk)) + (c-name gtk_widget_path) + (return-type none) + (parameter (type-and-name guint* path_length)) + (parameter (type-and-name gchar** path)) + (parameter (type-and-name gchar** path_reversed)) +) + +(method class_path + (of-object Widget (Gtk)) + (c-name gtk_widget_class_path) + (return-type none) + (parameter (type-and-name guint* path_length)) + (parameter (type-and-name gchar** path)) + (parameter (type-and-name gchar** path_reversed)) +) + + + +;; From /usr/include/gtk/gtkwindow.h + +(function gtk_window_get_type + (c-name gtk_window_get_type) + (return-type GtkType) +) + +(function gtk_window_new + (c-name gtk_window_new) + (is-constructor-of GtkWindow) + (return-type GtkWidget*) + (parameter (type-and-name GtkWindowType type) (default "GTK_WINDOW_TOPLEVEL")) +) + +(method set_title + (of-object Window (Gtk)) + (c-name gtk_window_set_title) + (return-type none) + (parameter (type-and-name const-gchar* title)) +) + +(method set_wmclass + (of-object Window (Gtk)) + (c-name gtk_window_set_wmclass) + (return-type none) + (parameter (type-and-name const-gchar* wmclass_name)) + (parameter (type-and-name const-gchar* wmclass_class)) +) + +(method set_policy + (of-object Window (Gtk)) + (c-name gtk_window_set_policy) + (return-type none) + (parameter (type-and-name gint allow_shrink)) + (parameter (type-and-name gint allow_grow)) + (parameter (type-and-name gint auto_shrink)) +) + +(method add_accel_group + (of-object Window (Gtk)) + (c-name gtk_window_add_accel_group) + (return-type none) + (parameter (type-and-name GtkAccelGroup* accel_group)) +) + +(method remove_accel_group + (of-object Window (Gtk)) + (c-name gtk_window_remove_accel_group) + (return-type none) + (parameter (type-and-name GtkAccelGroup* accel_group)) +) + +(method set_position + (of-object Window (Gtk)) + (c-name gtk_window_set_position) + (return-type none) + (parameter (type-and-name GtkWindowPosition position)) +) + +(method activate_focus + (of-object Window (Gtk)) + (c-name gtk_window_activate_focus) + (return-type gint) +) + +(method activate_default + (of-object Window (Gtk)) + (c-name gtk_window_activate_default) + (return-type gint) +) + +(method set_transient_for + (of-object Window (Gtk)) + (c-name gtk_window_set_transient_for) + (return-type none) + (parameter (type-and-name GtkWindow* parent)) +) + +(method set_geometry_hints + (of-object Window (Gtk)) + (c-name gtk_window_set_geometry_hints) + (return-type none) + (parameter (type-and-name GtkWidget* geometry_widget)) + (parameter (type-and-name GdkGeometry* geometry)) + (parameter (type-and-name GdkWindowHints geom_mask)) +) + +(method set_default_size + (of-object Window (Gtk)) + (c-name gtk_window_set_default_size) + (return-type none) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method set_modal + (of-object Window (Gtk)) + (c-name gtk_window_set_modal) + (return-type none) + (parameter (type-and-name gboolean modal)) +) + +(method set_focus + (of-object Window (Gtk)) + (c-name gtk_window_set_focus) + (return-type none) + (parameter (type-and-name GtkWidget* focus)) +) + +(method set_default + (of-object Window (Gtk)) + (c-name gtk_window_set_default) + (return-type none) + (parameter (type-and-name GtkWidget* defaultw)) +) + +(method remove_embedded_xid + (of-object Window (Gtk)) + (c-name gtk_window_remove_embedded_xid) + (return-type none) + (parameter (type-and-name guint xid)) +) + +(method add_embedded_xid + (of-object Window (Gtk)) + (c-name gtk_window_add_embedded_xid) + (return-type none) + (parameter (type-and-name guint xid)) +) + +(method reposition + (of-object Window (Gtk)) + (c-name gtk_window_reposition) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + + Index: php-gtk/ext/gtk+/gtk.overrides diff -u /dev/null php-gtk/ext/gtk+/gtk.overrides:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gtk.overrides Tue Jul 10 14:27:50 2001 @@ -0,0 +1,2025 @@ +/* vim: set ft=cpp: */ +%% +headers +#include "ext/standard/file.h" +%% +ignore-glob + *_get_type + gtk_marshal_* + gtk_arg_* + gtk_args_* + gtk_signal_connect* + gtk_signal_add_emission_hook* + gtk_signal_new* + gtk_init_add_* + gtk_quit_add_* + gtk_timeout_add_* + gtk_idle_add_* + gtk_accelerator_* + gtk_target_list_* +%% +ignore + gtk_init + gtk_init_check + gtk_exit + gtk_set_locale + gtk_accel_group_new + gtk_accel_group_ref + gtk_accel_group_unref + gtk_accel_group_lock + gtk_accel_group_unlock + gtk_accel_groups_activate + gtk_accel_group_activate + gtk_accel_group_attach + gtk_accel_group_detach + gtk_accel_group_get_entry + gtk_accel_group_lock_entry + gtk_accel_group_unlock_entry + gtk_accel_group_add + gtk_accel_group_remove + gtk_accel_group_handle_add + gtk_accel_group_handle_remove + gtk_accel_group_create_add + gtk_accel_group_create_remove + gtk_accel_groups_from_object + gtk_accel_group_entries_from_object + gtk_signal_set_funcs + gtk_signal_lookup + gtk_signal_disconnect_by_func + gtk_signal_disconnect_by_data + gtk_signal_handler_block_by_func + gtk_signal_handler_block_by_data + gtk_signal_handler_unblock_by_func + gtk_signal_handler_unblock_by_data + gtk_signal_handler_pending_by_func + gtk_signal_n_emissions + gtk_signal_n_emissions_by_name + gtk_signal_name + gtk_signal_remove_emission_hook + gtk_signal_query + gtk_signal_emit + gtk_signal_emit_by_name + gtk_signal_emitv + gtk_signal_emitv_by_name + gtk_quit_remove_by_data + gtk_idle_remove_by_data + gtk_object_weakref + gtk_object_weakunref + gtk_object_get + gtk_object_getv + gtk_object_set + gtk_object_setv + gtk_object_set_data_full + gtk_object_set_user_data + gtk_object_get_user_data + gtk_object_set_data_by_id + gtk_object_set_data_by_id_full + gtk_object_get_data_by_id + gtk_object_remove_data_by_id + gtk_object_remove_no_notify_by_id + gtk_object_arg_set + gtk_object_arg_get + gtk_trace_referencing + gtk_widget_get + gtk_widget_getv + gtk_widget_set + gtk_widget_setv + gtk_container_get_toplevels + gtk_container_add_child_arg_type + gtk_container_query_child_args + gtk_container_child_args_collect + gtk_container_child_arg_get_info + gtk_container_foreach + gtk_container_foreach_full + gtk_container_forall + gtk_container_child_getv + gtk_container_child_setv + gtk_container_add_with_args + gtk_container_addv + gtk_container_child_set + gtk_container_arg_set + gtk_container_arg_get + gtk_progress_bar_new + gtk_clist_set_row_data_full + gtk_window_add_embedded_xid + gtk_window_remove_embedded_xid + gtk_range_trough_click + gtk_range_default_htrough_click + gtk_range_default_vtrough_click + gtk_tooltips_data_get + gtk_type_check_object_cast + gtk_type_check_class_cast + gtk_type_register_enum + gtk_type_register_flags + gtk_preview_uninit + gtk_item_factory_create_item + gtk_item_factory_delete_entry + gtk_item_factory_delete_entries + gtk_item_factory_popup_with_data + gtk_item_factory_popup_data + gtk_item_factory_set_translate_func + gtk_item_factory_create_items_ac + gtk_item_factory_create_menu_entries + gtk_menu_attach_to_widget + gtk_radio_menu_item_group + gtk_radio_menu_item_set_group + gtk_radio_button_group + gtk_radio_button_set_group + gtk_style_new +%% +ignore + gtk_object_new + gtk_object_newv + gtk_object_query_args + gtk_object_add_arg_type + gtk_object_args_collect + gtk_object_arg_get_info + gtk_widget_new + gtk_widget_newv +%% +ignore + gtk_key_snooper_install + gtk_key_snooper_remove + gtk_get_current_event + gtk_get_event_widget + gtk_propagate_event +%% +ignore + GtkPrivateFlags +%% +ignore + gtk_container_dequeue_resize_handler + gtk_window_reposition +%% +ignore + gtk_draw_flat_box + gtk_draw_check + gtk_draw_option + gtk_draw_cross + gtk_draw_ramp + gtk_draw_tab + gtk_draw_shadow_gap + gtk_draw_box_gap + gtk_draw_extension + gtk_draw_focus + gtk_draw_slider + gtk_draw_handle +%% +override gtk_true +PHP_FUNCTION(wrap_gtk_true) +{ + RETURN_TRUE; +} +%% +override gtk_false +PHP_FUNCTION(wrap_gtk_false) +{ + RETURN_FALSE; +} +%% +override gtk_timeout_add +PHP_FUNCTION(wrap_gtk_timeout_add) +{ + guint32 interval; + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + if (ZEND_NUM_ARGS() < 2) { + php_error(E_WARNING, "%s() requires at least 2 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(2, "iV", &interval, &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + RETURN_LONG(gtk_timeout_add_full(interval, NULL, + (GtkCallbackMarshal)php_gtk_handler_marshal, + data, php_gtk_destroy_notify)); +} +%% +override gtk_idle_add +PHP_FUNCTION(wrap_gtk_idle_add) +{ + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + if (ZEND_NUM_ARGS() < 1) { + php_error(E_WARNING, "%s() requires at least 1 argument, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(1, "V", &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 1, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + RETURN_LONG(gtk_idle_add_full(GTK_PRIORITY_DEFAULT, NULL, + (GtkCallbackMarshal)php_gtk_handler_marshal, + data, php_gtk_destroy_notify)); +} +%% +override gtk_quit_add +PHP_FUNCTION(wrap_gtk_quit_add) +{ + gint main_level; + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + if (ZEND_NUM_ARGS() < 2) { + php_error(E_WARNING, "%s() requires at least 2 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(2, "iV", &main_level, &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + RETURN_LONG(gtk_quit_add_full(main_level, NULL, + (GtkCallbackMarshal)php_gtk_handler_marshal, + data, php_gtk_destroy_notify)); +} +%% +override gtk_input_add_full +PHP_FUNCTION(wrap_gtk_input_add_full) +{ + zval *source_rsrc; + int rsrc_type; + int *source; + GdkInputCondition condition; + zval *callback = NULL; + zval *extra, *data; + char *callback_filename; + uint callback_lineno; + + if (ZEND_NUM_ARGS() < 3) { + php_error(E_WARNING, "%s() requires at least 3 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(3, "riV", &source_rsrc, &condition, &callback)) + return; + + source = zend_list_find(Z_LVAL_P(source_rsrc), &rsrc_type); + if (!source || rsrc_type != php_file_le_fopen()) { + php_error(E_WARNING, "%s() expects argument 1 to be a valid filehandle resource", get_active_function_name()); + return; + } + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 3, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + RETURN_LONG(gtk_input_add_full(*source, condition, NULL, + (GtkCallbackMarshal)php_gtk_input_marshal, + data, php_gtk_destroy_notify)); +} +%% +override gtk_signal_connect +static void wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAMETERS, int pass_object, int after) +{ + char *name = NULL; + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (ZEND_NUM_ARGS() < 2) { + php_error(E_WARNING, "%s() requires at least 2 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(2, "sV", &name, &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNisi)", callback, extra, pass_object, callback_filename, callback_lineno); + RETURN_LONG(gtk_signal_connect_full(PHP_GTK_GET(this_ptr), name, NULL, + (GtkCallbackMarshal)php_gtk_callback_marshal, + data, php_gtk_destroy_notify, FALSE, after)); +} + +PHP_FUNCTION(wrap_gtk_signal_connect) +{ + wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 0); +} +%% +override gtk_signal_connect_object +PHP_FUNCTION(wrap_gtk_signal_connect_object) +{ + wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 0); +} +%% +override gtk_signal_connect_after +PHP_FUNCTION(wrap_gtk_signal_connect_after) +{ + wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 1); +} +%% +override gtk_signal_connect_object_after +PHP_FUNCTION(wrap_gtk_signal_connect_object_after) +{ + wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); +} +%% +override gtk_signal_emit +PHP_FUNCTION(wrap_gtk_signal_emit) +{ + char *name; + guint signal_id, nparams, i; + GtkSignalQuery *query; + GtkArg *params; + zval *php_params, *ret; + gchar buf[sizeof(GtkArg)]; /* holds the return value */ + + NOT_STATIC_METHOD(); + + if (ZEND_NUM_ARGS() < 1) { + php_error(E_WARNING, "%s() requires at least 1 argument, 0 given", get_active_function_name()); + return; + } + + if (!php_gtk_parse_args(1, "s", &name)) + return; + + signal_id = gtk_signal_lookup(name, GTK_OBJECT_TYPE(PHP_GTK_GET(this_ptr))); + if (signal_id <= 0) { + php_error(E_WARNING, "%s() can't find signal '%s' in class hierarchy", + get_active_function_name(), name); + return; + } + + query = gtk_signal_query(signal_id); + if (ZEND_NUM_ARGS() < (int)query->nparams + 1) { + php_error(E_WARNING, "%s() requires %d arguments for signal '%s', %d given", + get_active_function_name(), query->nparams, name, ZEND_NUM_ARGS()-1); + g_free(query); + return; + } + + php_params = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 1, ZEND_NUM_ARGS()); + params = g_new(GtkArg, query->nparams + 1); + nparams = query->nparams; + + for (i = 0; i < nparams; i++) { + params[i].type = query->params[i]; + params[i].name = NULL; + } + params[i].type = query->return_val; + params[i].name = NULL; + params[i].d.pointer_data = buf; + g_free(query); + + if (!php_gtk_args_from_hash(params, nparams, php_params)) { + zval_ptr_dtor(&php_params); + g_free(params); + return; + } + zval_ptr_dtor(&php_params); + + gtk_signal_emitv(PHP_GTK_GET(this_ptr), signal_id, params); + ret = php_gtk_ret_as_value(¶ms[nparams]); + g_free(params); + if (ret) { + *return_value = *ret; + FREE_ZVAL(ret); + } +} +%% +override gtk_object_set +PHP_FUNCTION(wrap_gtk_object_set) +{ + zval *hash; + GtkArg *arg; + gint nargs; + GtkObject *obj; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &hash)) + return; + + obj = PHP_GTK_GET(this_ptr); + arg = php_gtk_hash_as_args(hash, GTK_OBJECT_TYPE(obj), &nargs); + if (!arg && nargs != 0) + return; + + gtk_object_setv(obj, nargs, arg); + g_free(arg); +} +%% +override gtk_object_get +PHP_FUNCTION(wrap_gtk_object_get) +{ + char *name; + GtkArg garg; + zval *ret; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s", &name)) + return; + + garg.type = GTK_TYPE_INVALID; + garg.name = name; + gtk_object_getv(PHP_GTK_GET(this_ptr), 1, &garg); + + if (garg.type == GTK_TYPE_INVALID) { + php_error(E_WARNING, "%s(): invalid arg '%s'", + get_active_function_name(), name); + return; + } + + ret = php_gtk_arg_as_value(&garg); + if (ret == NULL) { + php_error(E_WARNING, "%s() couldn't translate type"); + return; + } + + zval_add_ref(&ret); + *return_value = *ret; + FREE_ZVAL(ret); +} +%% +override gtk_object_set_data +PHP_FUNCTION(wrap_gtk_object_set_data) +{ + char *key; + zval *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "sV", &key, &data)) + return; + + zval_add_ref(&data); + gtk_object_set_data_full(PHP_GTK_GET(this_ptr), key, data, php_gtk_destroy_notify); +} +%% +override gtk_object_get_data +PHP_FUNCTION(wrap_gtk_object_get_data) +{ + char *key; + zval *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s", &key)) + return; + + data = gtk_object_get_data(PHP_GTK_GET(this_ptr), key); + if (data) { + *return_value = *data; + zval_copy_ctor(return_value); + } +} +%% +override gtk_widget_intersect +PHP_FUNCTION(wrap_gtk_widget_intersect) +{ + GdkRectangle area, intersection; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "iiii", &(area.x), &(area.y), &(area.width), &(area.height))) + return; + + if (gtk_widget_intersect(GTK_WIDGET(PHP_GTK_GET(this_ptr)), &area, &intersection)) { + array_init(return_value); + *return_value = *php_gtk_build_value("(iiii)", area.x, area.y, area.width, area.height); + } +} +%% +override gtk_menu_attach_to_widget +static void gtk_menu_detacher(GtkWidget *widget, GtkMenu *menu) +{ + GtkMenu *remove_menu; + g_return_if_fail(widget != NULL); + g_return_if_fail(GTK_IS_MENU(widget)); + + remove_menu = GTK_MENU(widget); +// g_return_if_fail(remove_menu->menu == (GtkWidget*) menu); + +// remove_menu->menu = NULL; +} + +PHP_FUNCTION(wrap_gtk_menu_attach_to_widget) +{ + zval *php_widget = NULL; + GtkWidget* obj = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &php_widget, gtk_widget_ce)) + return; + + gtk_menu_attach_to_widget(GTK_MENU(PHP_GTK_GET(this_ptr)), GTK_WIDGET(PHP_GTK_GET(php_widget)), gtk_menu_detacher); +} +%% +override gtk_curve_get_vector +PHP_FUNCTION(wrap_gtk_curve_get_vector) +{ + int veclen = -1, i; + gfloat *vector = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|i", &veclen)) + return; + + if (veclen < 0) + veclen = GTK_CURVE(PHP_GTK_GET(this_ptr))->num_points; + vector = emalloc(sizeof(gfloat) * veclen); + gtk_curve_get_vector(GTK_CURVE(PHP_GTK_GET(this_ptr)), veclen, vector); + array_init(return_value); + for (i = 0; i < veclen; i++) + add_index_double(return_value, i, vector[i]); + efree(vector); +} +%% +override gtk_curve_set_vector +PHP_FUNCTION(wrap_gtk_curve_set_vector) +{ + int veclen, i; + gfloat *vector = NULL; + zval *php_vector, **temp_vector; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &php_vector)) + return; + + target_hash = HASH_OF(php_vector); + veclen = zend_hash_num_elements(target_hash); + vector = emalloc(sizeof(gfloat) * veclen); + zend_hash_internal_pointer_reset(target_hash); + i = 0; + while (zend_hash_get_current_data(target_hash, (void **)&temp_vector) == SUCCESS) { + vector[i++] = Z_DVAL_PP(temp_vector); + zend_hash_move_forward(target_hash); + } + + gtk_curve_set_vector(GTK_CURVE(PHP_GTK_GET(this_ptr)), veclen, vector); + RETURN_TRUE; +} +%% +overrides gtk_rc_get_default_files +PHP_FUNCTION(wrap_gtk_rc_get_default_files) +{ + gchar **ret; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + ret = gtk_rc_get_default_files(); + if (ret) { + array_init(return_value); + while (*ret) { + add_next_index_string(return_value, *ret, 1); + *ret++; + } + g_free(ret); + } else + RETURN_NULL(); +} +%% +ignore gtk_clist_new_with_titles +%% +override gtk_clist_new +PHP_FUNCTION(wrap_gtk_clist_new) +{ + GtkObject *wrapped_obj; + gint columns, i; + gchar **titles; + zval *php_titles = NULL, **temp_title; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "i|a/", &columns, &php_titles)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (columns <= 0) { + php_error(E_WARNING, "%s() needs number of columns to be > 0", get_active_function_name()); + return; + } + + if (php_titles) { + if (zend_hash_num_elements(Z_ARRVAL_P(php_titles)) < columns) { + php_error(E_WARNING, "%s(): the array of titles is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_titles); + titles = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&temp_title) == SUCCESS) { + convert_to_string_ex(temp_title); + titles[i++] = estrndup(Z_STRVAL_PP(temp_title), Z_STRLEN_PP(temp_title)); + zend_hash_move_forward(target_hash); + } + wrapped_obj = (GtkObject *)gtk_clist_new_with_titles(columns, titles); + efree(titles); + } else + wrapped_obj = (GtkObject *)gtk_clist_new(columns); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkCList object", get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +override gtk_clist_append +PHP_FUNCTION(wrap_gtk_clist_append) +{ + gint columns, i, res; + gchar **list; + zval *php_list, **text; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a/", &php_list)) { + php_gtk_invalidate(this_ptr); + return; + } + + columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns; + if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) { + php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_list); + list = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&text) == SUCCESS) { + convert_to_string_ex(text); + list[i++] = estrndup(Z_STRVAL_PP(text), Z_STRLEN_PP(text)); + zend_hash_move_forward(target_hash); + } + ZVAL_LONG(return_value, gtk_clist_append(GTK_CLIST(PHP_GTK_GET(this_ptr)), list)); + efree(list); +} +%% +override gtk_clist_prepend +PHP_FUNCTION(wrap_gtk_clist_prepend) +{ + gint columns, i, res; + gchar **list; + zval *php_list, **text; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a/", &php_list)) { + php_gtk_invalidate(this_ptr); + return; + } + + columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns; + if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) { + php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_list); + list = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&text) == SUCCESS) { + convert_to_string_ex(text); + list[i++] = estrndup(Z_STRVAL_PP(text), Z_STRLEN_PP(text)); + zend_hash_move_forward(target_hash); + } + ZVAL_LONG(return_value, gtk_clist_prepend(GTK_CLIST(PHP_GTK_GET(this_ptr)), list)); + efree(list); +} +%% +override gtk_clist_insert +PHP_FUNCTION(wrap_gtk_clist_insert) +{ + gint columns, i, row, res; + gchar **list; + zval *php_list, **text; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ia/", &row, &php_list)) { + php_gtk_invalidate(this_ptr); + return; + } + + columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns; + if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) { + php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_list); + list = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&text) == SUCCESS) { + convert_to_string_ex(text); + list[i++] = estrndup(Z_STRVAL_PP(text), Z_STRLEN_PP(text)); + zend_hash_move_forward(target_hash); + } + ZVAL_LONG(return_value, gtk_clist_insert(GTK_CLIST(PHP_GTK_GET(this_ptr)), row, list)); + efree(list); +} +%% +override gtk_clist_get_text +PHP_FUNCTION(wrap_gtk_clist_get_text) +{ + gint row, column; + gchar *text; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ii", &row, &column)) + return; + + if (!gtk_clist_get_text(GTK_CLIST(PHP_GTK_GET(this_ptr)), row, column, &text)) { + php_error(E_WARNING, "%s() cannot get text value", get_active_function_name()); + return; + } + + RETURN_STRING(text, 1); +} +%% +ignore gtk_menu_item_new_with_label +%% +override gtk_menu_item_new +PHP_FUNCTION(wrap_gtk_menu_item_new) +{ + char *label; + GtkObject *wrapped_obj; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &label)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (label) + wrapped_obj = (GtkObject *)gtk_menu_item_new_with_label(label); + else + wrapped_obj = (GtkObject *)gtk_menu_item_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkMenuItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} + +%% +ignore gtk_check_menu_item_new_with_label +%% +override gtk_check_menu_item_new +PHP_FUNCTION(wrap_gtk_check_menu_item_new) +{ + char *label; + GtkObject *wrapped_obj; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &label)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (label) + wrapped_obj = (GtkObject *)gtk_check_menu_item_new_with_label(label); + else + wrapped_obj = (GtkObject *)gtk_check_menu_item_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkCheckMenuItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +override gtk_list_append_items +PHP_FUNCTION(wrap_gtk_list_append_items) +{ + zval *php_items, **item; + GList *items = NULL; + int i = 0; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &php_items)) + return; + + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_items)); + zend_hash_get_current_data(Z_ARRVAL_P(php_items), (void **)&item) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_items)), i++) { + if (!php_gtk_check_class(*item, gtk_listitem_ce)) { + php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(), i); + g_list_free(items); + return; + } + + items = g_list_append(items, PHP_GTK_GET(*item)); + } + + gtk_list_append_items(GTK_LIST(PHP_GTK_GET(this_ptr)), items); +} +%% +override gtk_list_prepend_items +PHP_FUNCTION(wrap_gtk_list_prepend_items) +{ + zval *php_items, **item; + GList *items = NULL; + int i = 0; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &php_items)) + return; + + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_items)); + zend_hash_get_current_data(Z_ARRVAL_P(php_items), (void **)&item) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_items)), i++) { + if (!php_gtk_check_class(*item, gtk_listitem_ce)) { + php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(), i); + g_list_free(items); + return; + } + + items = g_list_append(items, PHP_GTK_GET(*item)); + } + + gtk_list_prepend_items(GTK_LIST(PHP_GTK_GET(this_ptr)), items); +} +%% +override gtk_list_insert_items +PHP_FUNCTION(wrap_gtk_list_insert_items) +{ + zval *php_items, **item; + GList *items = NULL; + int position, i = 0; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ai", &php_items, &position)) + return; + + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_items)); + zend_hash_get_current_data(Z_ARRVAL_P(php_items), (void **)&item) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_items)), i++) { + if (!php_gtk_check_class(*item, gtk_listitem_ce)) { + php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(), i); + g_list_free(items); + return; + } + + items = g_list_append(items, PHP_GTK_GET(*item)); + } + + gtk_list_insert_items(GTK_LIST(PHP_GTK_GET(this_ptr)), items, position); +} +%% +ignore gtk_list_item_new_with_label +%% +override gtk_list_item_new +PHP_FUNCTION(wrap_gtk_list_item_new) +{ + GtkObject *wrapped_obj; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &text)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (text) + wrapped_obj = (GtkObject *)gtk_list_item_new_with_label(text); + else + wrapped_obj = (GtkObject *)gtk_list_item_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkListItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore gtk_tree_item_new_with_label +%% +override gtk_tree_item_new +PHP_FUNCTION(wrap_gtk_tree_item_new) +{ + GtkObject *wrapped_obj; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &text)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (text) + wrapped_obj = (GtkObject *)gtk_tree_item_new_with_label(text); + else + wrapped_obj = (GtkObject *)gtk_tree_item_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkTreeItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore gtk_button_new_with_label +%% +override gtk_button_new +PHP_FUNCTION(wrap_gtk_button_new) +{ + GtkObject *wrapped_obj; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &text)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (text) + wrapped_obj = (GtkObject *)gtk_button_new_with_label(text); + else + wrapped_obj = (GtkObject *)gtk_button_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkButton object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore gtk_toggle_button_new_with_label +%% +override gtk_toggle_button_new +PHP_FUNCTION(wrap_gtk_toggle_button_new) +{ + GtkObject *wrapped_obj; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &text)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (text) + wrapped_obj = (GtkObject *)gtk_toggle_button_new_with_label(text); + else + wrapped_obj = (GtkObject *)gtk_toggle_button_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkToggleButton object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore gtk_check_button_new_with_label +%% +override gtk_check_button_new +PHP_FUNCTION(wrap_gtk_check_button_new) +{ + char *label; + GtkObject *wrapped_obj; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &label)) { + php_gtk_invalidate(this_ptr); + return; + } + if (label) + wrapped_obj = (GtkObject *)gtk_check_button_new_with_label(label); + else + wrapped_obj = (GtkObject *)gtk_check_button_new(); + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkCheckButton object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore + gtk_ctree_construct + gtk_ctree_insert_gnode + gtk_ctree_export_to_gnode + gtk_ctree_find_node_ptr + gtk_ctree_new +%% +override gtk_ctree_new_with_titles +PHP_FUNCTION(wrap_gtk_ctree_new_with_titles) +{ + GtkObject *wrapped_obj; + gint columns, tree_column, i; + gchar **titles; + zval *php_titles = NULL, **temp_title; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ii|a/", &columns, &tree_column, &php_titles)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (columns <= 0) { + php_error(E_WARNING, "%s() needs number of columns to be > 0", get_active_function_name()); + return; + } + + if (php_titles) { + if (zend_hash_num_elements(Z_ARRVAL_P(php_titles)) < columns) { + php_error(E_WARNING, "%s(): the array of titles is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_titles); + titles = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&temp_title) == SUCCESS) { + convert_to_string_ex(temp_title); + titles[i++] = estrndup(Z_STRVAL_PP(temp_title), Z_STRLEN_PP(temp_title)); + zend_hash_move_forward(target_hash); + } + wrapped_obj = (GtkObject *)gtk_ctree_new_with_titles(columns, tree_column, titles); + efree(titles); + } else + wrapped_obj = (GtkObject *)gtk_ctree_new(columns, tree_column); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkCTree object", get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +override gtk_ctree_insert_node +PHP_FUNCTION(wrap_gtk_ctree_insert_node) +{ + zval *php_parent, *php_sibling, *php_text, + *php_pixmap_closed, *php_pixmap_opened, + *php_mask_closed, *php_mask_opened, **temp_text; + zval *php_ret; + gint spacing, columns, i; + zend_bool is_leaf, expanded; + GtkCTreeNode *parent = NULL, *sibling = NULL, *ret; + GdkPixmap *pixmap_closed = NULL, *pixmap_opened = NULL; + GdkBitmap *mask_closed = NULL, *mask_opened = NULL; + GtkCTree *tree; + gchar **text = NULL; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNa/iNNNNbb", &php_parent, + gtk_ctree_node_ce, &php_sibling, gtk_ctree_node_ce, + &php_text, &spacing, &php_pixmap_closed, + gdk_pixmap_ce, &php_mask_closed, gdk_bitmap_ce, + &php_pixmap_opened, gdk_pixmap_ce, &php_mask_opened, + gdk_bitmap_ce, &is_leaf, &expanded)) + return; + + target_hash = HASH_OF(php_text); + tree = GTK_CTREE(PHP_GTK_GET(this_ptr)); + columns = GTK_CLIST(tree)->columns; + if (zend_hash_num_elements(target_hash) < columns) { + php_error(E_WARNING, "%s(): the text array is not long enough", get_active_function_name()); + return; + } + + if (Z_TYPE_P(php_parent) != IS_NULL) + parent = PHP_GTK_CTREE_NODE_GET(php_parent); + if (Z_TYPE_P(php_sibling) != IS_NULL) + sibling = PHP_GTK_CTREE_NODE_GET(php_sibling); + if (Z_TYPE_P(php_pixmap_closed) != IS_NULL) + pixmap_closed = PHP_GDK_PIXMAP_GET(php_pixmap_closed); + if (Z_TYPE_P(php_mask_closed) != IS_NULL) + mask_closed = PHP_GDK_BITMAP_GET(php_mask_closed); + if (Z_TYPE_P(php_pixmap_opened) != IS_NULL) + pixmap_opened = PHP_GDK_PIXMAP_GET(php_pixmap_opened); + if (Z_TYPE_P(php_mask_opened) != IS_NULL) + mask_opened = PHP_GDK_BITMAP_GET(php_mask_opened); + + text = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&temp_text) == SUCCESS) { + convert_to_string_ex(temp_text); + text[i++] = estrndup(Z_STRVAL_PP(temp_text), Z_STRLEN_PP(temp_text)); + zend_hash_move_forward(target_hash); + } + + ret = gtk_ctree_insert_node(tree, parent, sibling, text, (guint8)spacing, + pixmap_closed, mask_closed, pixmap_opened, + mask_opened, is_leaf, expanded); + efree(text); + php_ret = php_gtk_ctree_node_new(ret); + SEPARATE_ZVAL(&php_ret); + *return_value = *php_ret; +} +%% +override gtk_ctree_post_recursive +static void ctree_callback(GtkCTree *ctree, GtkCTreeNode *node, zval *callback_data) +{ + zval *retval = NULL; + zval **callback = NULL, **extra = NULL; + zval **callback_filename = NULL, **callback_lineno = NULL; + zval ***args, *params; + char *callback_name; + ELS_FETCH(); + + zend_hash_index_find(Z_ARRVAL_P(callback_data), 0, (void **)&callback); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 1, (void **)&extra); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 2, (void **)&callback_filename); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 3, (void **)&callback_lineno); + + if (!php_gtk_is_callable(*callback, 0, &callback_name)) { + php_error(E_WARNING, "Unable to call ctree callback '%s' specified in %s on line %d", callback_name, Z_STRVAL_PP(callback_filename), Z_LVAL_PP(callback_lineno)); + efree(callback_name); + return; + } + + params = php_gtk_build_value("(NN)", php_gtk_new((GtkObject *)ctree), + php_gtk_ctree_node_new(node)); + if (extra) + php_array_merge(Z_ARRVAL_P(params), Z_ARRVAL_PP(extra), 0); + + args = php_gtk_hash_as_array(params); + + call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL); + if (retval) + zval_ptr_dtor(&retval); + efree(args); + zval_ptr_dtor(¶ms); +} + +static void traverse_ctree(INTERNAL_FUNCTION_PARAMETERS, zend_bool use_depth, zend_bool pre_order) +{ + zval *ctree, *php_node, *callback; + zval *data, *extra; + GtkCTreeNode *node = NULL; + gint depth; + int req_args = 2; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (use_depth) + req_args = 3; + + if (ZEND_NUM_ARGS() < req_args) { + php_error(E_WARNING, "%s() requires at least %d arguments, %d given", + get_active_function_name(), req_args, ZEND_NUM_ARGS()); + return; + } + + if (use_depth) { + if (!php_gtk_parse_args(3, "NiV", &php_node, gtk_ctree_node_ce, &depth, &callback)) + return; + } else { + if (!php_gtk_parse_args(2, "NV", &php_node, gtk_ctree_node_ce, &callback)) + return; + } + + if (Z_TYPE_P(php_node) != IS_NULL) + node = PHP_GTK_CTREE_NODE_GET(php_node); + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + if (pre_order) { + if (use_depth) + gtk_ctree_pre_recursive_to_depth(GTK_CTREE(PHP_GTK_GET(this_ptr)), + node, depth, + (GtkCTreeFunc)ctree_callback, data); + else + gtk_ctree_pre_recursive(GTK_CTREE(PHP_GTK_GET(this_ptr)), node, + (GtkCTreeFunc)ctree_callback, data); + } else { + if (use_depth) + gtk_ctree_post_recursive_to_depth(GTK_CTREE(PHP_GTK_GET(this_ptr)), + node, depth, + (GtkCTreeFunc)ctree_callback, data); + else + gtk_ctree_post_recursive(GTK_CTREE(PHP_GTK_GET(this_ptr)), node, + (GtkCTreeFunc)ctree_callback, data); + } +} + +PHP_FUNCTION(wrap_gtk_ctree_post_recursive) +{ + traverse_ctree(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 0); +} +%% +override gtk_ctree_post_recursive_to_depth +PHP_FUNCTION(wrap_gtk_ctree_post_recursive_to_depth) +{ + traverse_ctree(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 0); +} +%% +override gtk_ctree_pre_recursive +PHP_FUNCTION(wrap_gtk_ctree_pre_recursive) +{ + traverse_ctree(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); +} +%% +override gtk_ctree_pre_recursive_to_depth +PHP_FUNCTION(wrap_gtk_ctree_pre_recursive_to_depth) +{ + traverse_ctree(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 1); +} +%% +override gtk_ctree_get_node_info +PHP_FUNCTION(wrap_gtk_ctree_get_node_info) +{ + zval *node; + zval *php_pixmap_closed, *php_mask_closed; + zval *php_pixmap_opened, *php_mask_opened; + gchar *text; + guint8 spacing; + GdkPixmap *pixmap_closed, *pixmap_opened; + GdkBitmap *mask_closed, *mask_opened; + gboolean is_leaf, expanded; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &node, gtk_ctree_node_ce)) + return; + + if (!gtk_ctree_get_node_info(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), &text, &spacing, + &pixmap_closed, &mask_closed, &pixmap_opened, + &mask_opened, &is_leaf, &expanded)) { + php_error(E_WARNING, "%s() cannot get node info", get_active_function_name()); + return; + } + + php_pixmap_closed = php_gdk_pixmap_new(pixmap_closed); + php_pixmap_opened = php_gdk_pixmap_new(pixmap_opened); + php_mask_closed = php_gdk_bitmap_new(mask_closed); + php_mask_opened = php_gdk_bitmap_new(mask_opened); + + *return_value = *php_gtk_build_value("(siNNNNbb)", text, (int)spacing, + php_pixmap_closed, php_mask_closed, + php_pixmap_opened, php_mask_opened, + (int)is_leaf, (int)expanded); +} +%% +override gtk_container_children +PHP_FUNCTION(wrap_gtk_container_children) +{ + GList *children, *tmp; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + children = gtk_container_children(GTK_CONTAINER(PHP_GTK_GET(this_ptr))); + array_init(return_value); + for (tmp = children; tmp; tmp = tmp->next) + add_next_index_zval(return_value, php_gtk_new(tmp->data)); + g_list_free(children); +} +%% +override gtk_item_factory_create_items +static void item_factory_callback(zval *callback_data, guint action, GtkWidget *widget) +{ + zval *retval = NULL; + zval **callback, **extra; + zval **callback_filename, **callback_lineno; + zval *params; + zval ***args; + char *callback_name; + ELS_FETCH(); + + zend_hash_index_find(Z_ARRVAL_P(callback_data), 0, (void **)&callback); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 1, (void **)&callback_filename); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 2, (void **)&callback_lineno); + if (!php_gtk_is_callable(*callback, 0, &callback_name)) { + php_error(E_WARNING, "unable to call item factory callback '%s' specified in %s on line %d", callback_name, Z_STRVAL_PP(callback_filename), Z_LVAL_PP(callback_lineno)); + efree(callback_name); + return; + } + + params = php_gtk_build_value("(iN)", action, php_gtk_new((GtkObject *)widget)); + if (zend_hash_num_elements(Z_ARRVAL_P(callback_data)) > 3) { + zend_hash_index_find(Z_ARRVAL_P(callback_data), 3, (void **)&extra); + php_array_merge(Z_ARRVAL_P(params), Z_ARRVAL_PP(extra), 0); + } + + args = php_gtk_hash_as_array(params); + + call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL); + if (retval) + zval_ptr_dtor(&retval); + efree(args); + zval_ptr_dtor(¶ms); +} + +PHP_FUNCTION(wrap_gtk_item_factory_create_items) +{ + zval *list, **item, *callback_data, + *callback, *extra = NULL; + GtkItemFactoryEntry entry; + GtkItemFactory *factory; + int i = 0; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &list)) + return; + + factory = GTK_ITEM_FACTORY(PHP_GTK_GET(this_ptr)); + zend_hash_internal_pointer_reset(Z_ARRVAL_P(list)); + while (zend_hash_get_current_data(Z_ARRVAL_P(list), (void**)&item) == SUCCESS) { + if (Z_TYPE_PP(item) != IS_ARRAY || + !php_gtk_parse_args_hash_quiet(*item, "ssVis|a", &entry.path, + &entry.accelerator, &callback, + &entry.callback_action, &entry.item_type, &extra)) { + php_error(E_WARNING, "%s() was unable to parse item #%d in the input array", + get_active_function_name(), i+1); + return; + } + + if (Z_TYPE_P(callback) == IS_NULL) + entry.callback = NULL; + else { + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + if (extra) + callback_data = php_gtk_build_value("(VsiV)", callback, callback_filename, callback_lineno, extra); + else + callback_data = php_gtk_build_value("(Vsi)", callback, callback_filename, callback_lineno); + entry.callback = (GtkItemFactoryCallback)item_factory_callback; + } + + gtk_item_factory_create_item(factory, &entry, callback_data, 1); + + i++; + zend_hash_move_forward(Z_ARRVAL_P(list)); + } + + RETURN_TRUE; +} +%% +override gtk_combo_set_popdown_strings +PHP_FUNCTION(wrap_gtk_combo_set_popdown_strings) +{ + zval *php_list, **item; + GList *list = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a/", &php_list)) + return; + + zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_list)); + while (zend_hash_get_current_data(Z_ARRVAL_P(php_list), (void **)&item) == SUCCESS) { + convert_to_string_ex(item); + list = g_list_append(list, Z_STRVAL_PP(item)); + zend_hash_move_forward(Z_ARRVAL_P(php_list)); + } + + gtk_combo_set_popdown_strings(GTK_COMBO(PHP_GTK_GET(this_ptr)), list); + g_list_free(list); + RETURN_TRUE; +} +%% +override gtk_label_get +PHP_FUNCTION(wrap_gtk_label_get) +{ + gchar *text; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gtk_label_get(GTK_LABEL(PHP_GTK_GET(this_ptr)), &text); + RETURN_STRING(text, 1); +} +%% +getprop GtkBox children + GList *tmp; + GList *children = GTK_BOX(PHP_GTK_GET(object))->children; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = children, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_box_child_new((GtkBoxChild *)tmp->data); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = children; tmp; tmp = tmp->next) { + add_next_index_zval(return_value, php_gtk_box_child_new((GtkBoxChild *)tmp->data)); + } + } +%% +getprop GtkCalendar marked_date + GtkCalendar *cal = GTK_CALENDAR(PHP_GTK_GET(object)); + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + if (prop_index > 0 && prop_index < 31) + ZVAL_LONG(return_value, cal->marked_date[prop_index]); + } + } else { + int i; + + array_init(return_value); + for (i = 0; i < 31; i++) + add_next_index_long(return_value, cal->marked_date[i]); + } +%% +override gtk_calendar_get_date +PHP_FUNCTION(wrap_gtk_calendar_get_date) +{ + guint year, month, day; + + NOT_STATIC_METHOD(); + + gtk_calendar_get_date(GTK_CALENDAR(PHP_GTK_GET(this_ptr)), &year, &month, &day); + *return_value = *php_gtk_build_value("(iii)", year, month, day); +} +%% +getprop GtkFixed children + GList *tmp; + GList *children = GTK_FIXED(PHP_GTK_GET(object))->children; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = children, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_fixed_child_new((GtkFixedChild *)tmp->data); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = children; tmp; tmp = tmp->next) { + add_next_index_zval(return_value, php_gtk_fixed_child_new((GtkFixedChild *)tmp->data)); + } + } +%% +getprop GtkList selection + GtkListItem *item; + GList *tmp; + GList *selection = GTK_LIST(PHP_GTK_GET(object))->selection; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = selection, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_new((GtkObject *)tmp->data); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = selection; tmp; tmp = tmp->next) + add_next_index_zval(return_value, php_gtk_new((GtkObject *)tmp->data)); + } +%% +getprop GtkCList selection + GList *tmp; + GList *selection = GTK_CLIST(PHP_GTK_GET(object))->selection; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = selection, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + RETURN_LONG(GPOINTER_TO_INT(tmp->data)); + } + } + } + } else { + array_init(return_value); + for (tmp = selection; tmp; tmp = tmp->next) + add_next_index_long(return_value, GPOINTER_TO_INT(tmp->data)); + } +%% +getprop GtkCTree selection + GList *tmp; + GList *selection = GTK_CLIST(PHP_GTK_GET(object))->selection; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = selection, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_ctree_node_new(GTK_CTREE_NODE(tmp->data)); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = selection; tmp; tmp = tmp->next) + add_next_index_zval(return_value, php_gtk_ctree_node_new(GTK_CTREE_NODE(tmp->data))); + } +%% +ignore gtk_radio_menu_item_new_with_label +%% +override gtk_radio_menu_item_new +PHP_FUNCTION(wrap_gtk_radio_menu_item_new) +{ + zval *php_group = NULL; + gchar *text = NULL; + GtkRadioMenuItem *group = NULL; + GtkObject *wrapped_obj = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|Ns", &php_group, gtk_radiomenuitem_ce, &text)) + return; + + if (Z_TYPE_P(php_group) != IS_NULL) + group = GTK_RADIO_MENU_ITEM(PHP_GTK_GET(php_group)); + + if (!text) { + if (!group) + wrapped_obj = (GtkObject *)gtk_radio_menu_item_new(NULL); + else + wrapped_obj = (GtkObject *)gtk_radio_menu_item_new(group->group); + } else { + if (!group) + wrapped_obj = (GtkObject *)gtk_radio_menu_item_new_with_label(NULL, text); + else + wrapped_obj = (GtkObject *)gtk_radio_menu_item_new_with_label(group->group, text); + } + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkRadioMenuItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore-glob gtk_radio_button_new_* +%% +override gtk_radio_button_new +PHP_FUNCTION(wrap_gtk_radio_button_new) +{ + zval *php_group = NULL; + gchar *text = NULL; + GtkRadioButton *group = NULL; + GtkObject *wrapped_obj = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|Ns", &php_group, gtk_radiobutton_ce, &text)) + return; + + if (Z_TYPE_P(php_group) != IS_NULL) + group = GTK_RADIO_BUTTON(PHP_GTK_GET(php_group)); + + if (!text) { + if (!group) + wrapped_obj = (GtkObject *)gtk_radio_button_new(NULL); + else + wrapped_obj = (GtkObject *)gtk_radio_button_new(group->group); + } else { + if (!group) + wrapped_obj = (GtkObject *)gtk_radio_button_new_with_label(NULL, text); + else + wrapped_obj = (GtkObject *)gtk_radio_button_new_with_label(group->group, text); + } + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkRadioButton object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +override gtk_color_selection_set_color +PHP_FUNCTION(wrap_gtk_color_selection_set_color) +{ + gdouble value[4]; + + NOT_STATIC_METHOD(); + + value[3] = 1.0; + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ddd|d", + &value[0], &value[1], &value[2], &value[3])) + return; + + gtk_color_selection_set_color(GTK_COLOR_SELECTION(PHP_GTK_GET(this_ptr)), value); +} +%% +override gtk_color_selection_get_color +PHP_FUNCTION(wrap_gtk_color_selection_get_color) +{ + gdouble value[4]; + GtkColorSelection *colorsel; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + colorsel = GTK_COLOR_SELECTION(PHP_GTK_GET(this_ptr)); + gtk_color_selection_get_color(colorsel, value); + if (colorsel->use_opacity) + *return_value = *php_gtk_build_value("(dddd)", value[0], value[1], value[2], value[3]); + else + *return_value = *php_gtk_build_value("(ddd)", value[0], value[1], value[2]); +} +%% +getprop GtkCTree clist + *return_value = *php_gtk_new((GtkObject *)GTK_CLIST(PHP_GTK_GET(object))); +%% +getprop GtkCList row_list + GList *tmp; + GList *row_list = GTK_CLIST(PHP_GTK_GET(object))->row_list; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = row_list, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_clist_row_new((GtkCListRow *)tmp->data); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = row_list; tmp; tmp = tmp->next) { + add_next_index_zval(return_value, php_gtk_clist_row_new((GtkCListRow *)tmp->data)); + } + } +%% +getprop GtkCTree row_list + GList *tmp; + GList *row_list = GTK_CLIST(PHP_GTK_GET(object))->row_list; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = row_list, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_ctree_node_new(GTK_CTREE_NODE(tmp)); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = row_list; tmp; tmp = tmp->next) { + add_next_index_zval(return_value, php_gtk_ctree_node_new(GTK_CTREE_NODE(tmp))); + } + } +%% +ignore gtk_ctree_node_set_row_data_full +%% +override gtk_ctree_node_set_row_data +PHP_FUNCTION(wrap_gtk_ctree_node_set_row_data) +{ + zval *node, *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "OV", &node, gtk_ctree_node_ce, &data)) + return; + + zval_add_ref(&data); + gtk_ctree_node_set_row_data_full(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), data, + php_gtk_destroy_notify); +} +%% +override gtk_ctree_node_get_row_data +PHP_FUNCTION(wrap_gtk_ctree_node_get_row_data) +{ + zval *node, *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &node, gtk_ctree_node_ce)) + return; + + data = gtk_ctree_node_get_row_data(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node)); + if (data) { + *return_value = *data; + zval_copy_ctor(return_value); + } else { + RETURN_NULL(); + } +} +%% +override gtk_ctree_node_get_text +PHP_FUNCTION(wrap_gtk_ctree_node_get_text) +{ + zval *node; + gint column; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "Oi", &node, gtk_ctree_node_ce, &column)) + return; + + if (!gtk_ctree_node_get_text(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), column, &text)) { + php_error(E_WARNING, "%s() cannot get text value", get_active_function_name()); + return; + } + + RETURN_STRING(text, 1); +} +%% +override gtk_ctree_node_get_pixmap +PHP_FUNCTION(wrap_gtk_ctree_node_get_pixmap) +{ + zval *node, *php_pixmap, *php_mask; + int column; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "Oi", &node, gtk_ctree_node_ce, &column)) + return; + + if (!gtk_ctree_node_get_pixmap(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), column, + &pixmap, &mask)) { + php_error(E_WARNING, "%s() cannot get pixmap value", get_active_function_name()); + return; + } + + php_pixmap = php_gdk_pixmap_new(pixmap); + php_mask = php_gdk_bitmap_new(pixmap); + + *return_value = *php_gtk_build_value("(NN)", php_pixmap, php_mask); +} +%% +override gtk_ctree_node_get_pixtext +PHP_FUNCTION(wrap_gtk_ctree_node_get_pixtext) +{ + zval *node, *php_pixmap = NULL, *php_mask = NULL; + int column; + gchar *text = NULL; + guint8 spacing; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "Oi", &node, gtk_ctree_node_ce, &column)) + return; + + if (!gtk_ctree_node_get_pixtext(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), column, &text, + &spacing, &pixmap, &mask)) { + php_error(E_WARNING, "%s() cannot get pixtext value", get_active_function_name()); + return; + } + + if (pixmap) { + php_pixmap = php_gdk_pixmap_new(pixmap); + } else { + MAKE_STD_ZVAL(php_pixmap); + ZVAL_NULL(php_pixmap); + } + + if (mask) { + php_mask = php_gdk_bitmap_new(mask); + } else { + MAKE_STD_ZVAL(php_mask); + ZVAL_NULL(php_mask); + } + + *return_value = *php_gtk_build_value("(siNN)", text, (int)spacing, + php_pixmap, php_mask); +} +%% +override gtk_menu_popup +static void php_gtk_menu_position(GtkMenu *menu, int *x, int *y, zval *callback_data) +{ + zval **callback, *php_menu; + zval **callback_filename, **callback_lineno; + zval *retval, *params; + zval ***args; + char *callback_name; + ELS_FETCH(); + + zend_hash_index_find(Z_ARRVAL_P(callback_data), 0, (void **)&callback); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 1, (void **)&callback_filename); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 2, (void **)&callback_lineno); + if (!php_gtk_is_callable(*callback, 0, &callback_name)) { + php_error(E_WARNING, "unable to call menu position callback '%s' specified in %s on line %d", callback_name, Z_STRVAL_PP(callback_filename), Z_LVAL_PP(callback_lineno)); + efree(callback_name); + return; + } + + params = php_gtk_build_value("(Nii)", php_gtk_new(GTK_OBJECT(menu)), *x, *y); + args = php_gtk_hash_as_array(params); + + call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL); + + if (retval) { + if (Z_TYPE_P(retval) == IS_ARRAY && + !php_gtk_parse_args_hash_quiet(retval, "ii", x, y)) { + php_error(E_WARNING, "unable to parse result of menu position callback"); + } + zval_ptr_dtor(&retval); + } + + efree(args); + zval_ptr_dtor(¶ms); +} + +PHP_FUNCTION(wrap_gtk_menu_popup) +{ + zval *php_pms, *php_pmi; + GtkWidget *pms = NULL, *pmi = NULL; + zval *callback, *data; + int button, time; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNVii", &php_pms, gtk_widget_ce, + &php_pmi, gtk_widget_ce, &callback, &button, &time)) + return; + + if (Z_TYPE_P(php_pms) != IS_NULL) + pms = GTK_WIDGET(PHP_GTK_GET(php_pms)); + if (Z_TYPE_P(php_pmi) != IS_NULL) + pmi = GTK_WIDGET(PHP_GTK_GET(php_pmi)); + + if (Z_TYPE_P(callback) != IS_NULL) { + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + data = php_gtk_build_value("(Vsi)", callback, callback_filename, callback_lineno); + gtk_menu_popup(GTK_MENU(PHP_GTK_GET(this_ptr)), pms, pmi, + (GtkMenuPositionFunc)php_gtk_menu_position, data, + button, time); + } else + gtk_menu_popup(GTK_MENU(PHP_GTK_GET(this_ptr)), pms, pmi, NULL, NULL, + button, time); +} +%% +override gtk_editable_insert_text +PHP_FUNCTION(wrap_gtk_editable_insert_text) +{ + char *text; + int len, pos; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#i", &text, &len, &pos)) + return; + + gtk_editable_insert_text(GTK_EDITABLE(PHP_GTK_GET(this_ptr)), text, len, &pos); + RETURN_LONG(pos); +} Index: php-gtk/ext/gtk+/php_gtk+.c diff -u /dev/null php-gtk/ext/gtk+/php_gtk+.c:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/php_gtk+.c Tue Jul 10 14:27:50 2001 @@ -0,0 +1,167 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_gtk+.c,v 1.2 2001/07/10 18:27:50 andrei Exp $: */ + +#include "php_gtk.h" +#include "SAPI.h" + +#if HAVE_PHP_GTK + +#include "php_gtk+.h" + +int le_gtk_object; + +static void init_gtk(void) +{ + HashTable *symbol_table; + zval **z_argv = NULL, **z_argc = NULL, **entry; + zval *tmp; + char **argv; + int argc, i; + zend_bool no_argc = 0; + PLS_FETCH(); + SLS_FETCH(); + + /* We check request_method to see if we've been called from command line or + Web server. Running GUI apps through a Web module can be dangerous to + your health. */ + if (SG(request_info).request_method != NULL) { + php_error(E_ERROR, "php-gtk: PHP GTK+ support is not available under Web servers"); + return; + } + + /* + * Since track_vars is always on, we just get the argc/argv values from + * there. + */ + symbol_table = PG(http_globals)[TRACK_VARS_SERVER]->value.ht; + + zend_hash_find(symbol_table, "argc", sizeof("argc"), (void **)&z_argc); + zend_hash_find(symbol_table, "argv", sizeof("argv"), (void **)&z_argv); + if (!z_argc || !z_argv || Z_TYPE_PP(z_argc) != IS_LONG || Z_TYPE_PP(z_argv) != IS_ARRAY) { + php_error(E_ERROR, "php-gtk: argc/argv are corrupted"); + } + + argc = Z_LVAL_PP(z_argc); + + /* + * If the script was called via -f switch and no further arguments were + * given, argc will be 0 and that's not good for gtk_init_check(). We use + * the path to the script as the only argument, and remember that we won't + * have to update symbol table after gtk_init_check(). + */ + if (argc == 0) { + argc = 1; + no_argc = 1; + argv = (char **)g_new(char *, argc); + argv[0] = g_strdup(SG(request_info).path_translated); + } else { + argv = (char **)g_new(char *, argc); + i = 0; + for (zend_hash_internal_pointer_reset(Z_ARRVAL_PP(z_argv)); + zend_hash_get_current_data(Z_ARRVAL_PP(z_argv), (void **)&entry) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_PP(z_argv))) { + argv[i++] = g_strndup(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry)); + } + } + + /* Ok, this is a hack. GTK+/GDK calls g_atexit() to set up a couple of cleanup + functions that should be called when the main program exits. However, if + we're compiled as .so library, libgtk.so will be unloaded first and the + pointers to the cleanup functions will be invalid. So we load libgtk.so + one more time to make sure it stays in memory even after our .so is + unloaded. */ + //DL_LOAD("libgtk.so"); + + if (!gtk_init_check(&argc, &argv)) { + if (argv != NULL) { + for (i = 0; i < argc; i++) + g_free(argv[i]); + g_free(argv); + } + php_error(E_ERROR, "php-gtk: Could not open display"); + return; + } + + /* + We must always call gtk_set_locale() in order to get GTK+/GDK + correctly initialize multilingual support. Otherwise, application + will refuse any letters outside ASCII and font metrics will + be broken. + */ + gtk_set_locale(); + + if (no_argc) { + /* The -f switch case, simple. */ + g_free(argv[0]); + } else { + /* We always clean the argv array. */ + zend_hash_clean(Z_ARRVAL_PP(z_argv)); + + /* Then if there are any arguments left after processing with + gtk_init_check(), we put them back into PHP's argv array and update + argc as well. */ + if (argv != NULL) { + for (i = 0; i < argc; i++) { + ALLOC_ZVAL(tmp); + tmp->type = IS_STRING; + tmp->value.str.len = strlen(argv[i]); + tmp->value.str.val = estrndup(argv[i], tmp->value.str.len); + INIT_PZVAL(tmp); + zend_hash_next_index_insert(Z_ARRVAL_PP(z_argv), &tmp, sizeof(zval *), NULL); + } + g_free(argv); + + Z_LVAL_PP(z_argc) = argc; + } + } +} + +static void release_gtk_object_rsrc(zend_rsrc_list_entry *rsrc) +{ + GtkObject *obj = (GtkObject *)rsrc->ptr; + gtk_object_unref(obj); +} + +PHP_GTK_XINIT_FUNCTION(gtk_plus) +{ + le_gtk_object = zend_register_list_destructors_ex(release_gtk_object_rsrc, NULL, "GtkObject", module_number); + + init_gtk(); + php_gtk_register_constants(); + php_gdk_register_constants(); + php_gtk_register_classes(); + php_gdk_register_classes(); + php_gtk_plus_register_types(module_number); +} + +PHP_GTK_XSHUTDOWN_FUNCTION(gtk_plus) +{ + gtk_exit(0); +} + +php_gtk_ext_entry gtk_plus_ext_entry = { + "gtk+", + PHP_GTK_XINIT(gtk_plus), + PHP_GTK_XSHUTDOWN(gtk_plus) +}; + +#endif /* HAVE_PHP_GTK */ Index: php-gtk/ext/gtk+/php_gtk+.h diff -u /dev/null php-gtk/ext/gtk+/php_gtk+.h:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/php_gtk+.h Tue Jul 10 14:27:50 2001 @@ -0,0 +1,108 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_gtk+.h,v 1.2 2001/07/10 18:27:50 andrei Exp $: */ + +#ifndef _PHP_GTK_PLUS_H +#define _PHP_GTK_PLUS_H + +#include <gtk/gtk.h> +#include "gtk/gtkinvisible.h" + +extern php_gtk_ext_entry gtk_plus_ext_entry; +#define php_gtk_ext_gtk__ptr >k_plus_ext_entry + +extern int le_gtk_object; +extern int le_php_gtk_wrapper; +extern int le_gdk_window; +extern int le_gdk_bitmap; +extern int le_gdk_color; +extern int le_gdk_colormap; +extern int le_gdk_cursor; +extern int le_gdk_visual; +extern int le_gdk_font; +extern int le_gdk_gc; +extern int le_gdk_drag_context; +extern int le_gtk_accel_group; +extern int le_gtk_style; + +#define PHP_GTK_GET(w) PHP_GTK_GET_GENERIC(w, GtkObject*, le_gtk_object) +#define PHP_GDK_EVENT_GET(w) PHP_GTK_GET_GENERIC(w, GdkEvent*, le_php_gtk_wrapper) +#define PHP_GDK_WINDOW_GET(w) PHP_GTK_GET_GENERIC(w, GdkWindow*, le_gdk_window) +#define PHP_GDK_PIXMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkPixmap*, le_gdk_window) +#define PHP_GDK_BITMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkBitmap*, le_gdk_bitmap) +#define PHP_GDK_COLOR_GET(w) PHP_GTK_GET_GENERIC(w, GdkColor*, le_gdk_color) +#define PHP_GDK_COLORMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkColormap*, le_gdk_colormap) +#define PHP_GDK_ATOM_GET(w) (php_gdk_atom_get(w)) +#define PHP_GDK_CURSOR_GET(w) PHP_GTK_GET_GENERIC(w, GdkCursor*, le_gdk_cursor) +#define PHP_GDK_VISUAL_GET(w) PHP_GTK_GET_GENERIC(w, GdkVisual*, le_gdk_visual) +#define PHP_GDK_FONT_GET(w) PHP_GTK_GET_GENERIC(w, GdkFont*, le_gdk_font) +#define PHP_GDK_GC_GET(w) PHP_GTK_GET_GENERIC(w, GdkGC*, le_gdk_gc) +#define PHP_GDK_DRAG_CONTEXT_GET(w) PHP_GTK_GET_GENERIC(w, GdkDragContext*, le_gdk_drag_context) +#define PHP_GTK_SELECTION_DATA_GET(w) PHP_GTK_GET_GENERIC(w, GtkSelectionData*, le_php_gtk_wrapper) +#define PHP_GTK_CTREE_NODE_GET(w) PHP_GTK_GET_GENERIC(w, GtkCTreeNode*, le_php_gtk_wrapper) +#define PHP_GTK_ACCEL_GROUP_GET(w) PHP_GTK_GET_GENERIC(w, GtkAccelGroup*, le_gtk_accel_group) +#define PHP_GTK_STYLE_GET(w) PHP_GTK_GET_GENERIC(w, GtkStyle*, le_gtk_style) + +extern PHP_GTK_EXPORT_CE(gdk_event_ce) +extern PHP_GTK_EXPORT_CE(gdk_window_ce) +extern PHP_GTK_EXPORT_CE(gdk_pixmap_ce) +extern PHP_GTK_EXPORT_CE(gdk_bitmap_ce) +extern PHP_GTK_EXPORT_CE(gdk_color_ce) +extern PHP_GTK_EXPORT_CE(gdk_colormap_ce) +extern PHP_GTK_EXPORT_CE(gdk_atom_ce) +extern PHP_GTK_EXPORT_CE(gdk_cursor_ce) +extern PHP_GTK_EXPORT_CE(gdk_visual_ce) +extern PHP_GTK_EXPORT_CE(gdk_font_ce) +extern PHP_GTK_EXPORT_CE(gdk_gc_ce) +extern PHP_GTK_EXPORT_CE(gdk_drag_context_ce) +extern PHP_GTK_EXPORT_CE(gtk_selection_data_ce) +extern PHP_GTK_EXPORT_CE(gtk_ctree_node_ce) +extern PHP_GTK_EXPORT_CE(gtk_accel_group_ce) +extern PHP_GTK_EXPORT_CE(gtk_style_ce) +extern PHP_GTK_EXPORT_CE(gtk_box_child_ce) +extern PHP_GTK_EXPORT_CE(gtk_fixed_child_ce) +extern PHP_GTK_EXPORT_CE(gtk_clist_row_ce) + +#include "gen_ce_gtk.h" + +zval *php_gtk_new(GtkObject *obj); +zval *php_gdk_event_new(GdkEvent *event); +zval *php_gdk_window_new(GdkWindow *window); +zval *php_gdk_pixmap_new(GdkPixmap *pixmap); +zval *php_gdk_bitmap_new(GdkBitmap *bitmap); +zval *php_gdk_color_new(GdkColor *color); +zval *php_gdk_colormap_new(GdkColormap *cmap); +zval *php_gdk_atom_new(GdkAtom atom); +zval *php_gdk_cursor_new(GdkCursor *cursor); +zval *php_gdk_visual_new(GdkVisual *visual); +zval *php_gdk_font_new(GdkFont *font); +zval *php_gdk_gc_new(GdkGC *gc); +zval *php_gdk_drag_context_new(GdkDragContext *context); +zval *php_gtk_selection_data_new(GtkSelectionData *data); +zval *php_gtk_ctree_node_new(GtkCTreeNode *node); +zval *php_gtk_accel_group_new(GtkAccelGroup *group); +zval *php_gtk_style_new(GtkStyle *style); +zval *php_gtk_box_child_new(GtkBoxChild *box_child); +zval *php_gtk_fixed_child_new(GtkFixedChild *fixed_child); +zval *php_gtk_clist_row_new(GtkCListRow *clist_row); + + +#endif /* _PHP_GTK_PLUS_H */ Index: php-gtk/ext/gtk+/php_gtk+_types.c diff -u /dev/null php-gtk/ext/gtk+/php_gtk+_types.c:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/php_gtk+_types.c Tue Jul 10 14:27:50 2001 @@ -0,0 +1,2527 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_gtk+_types.c,v 1.2 2001/07/10 18:27:50 andrei Exp $ */ + +#include "php_gtk.h" + +#if HAVE_PHP_GTK +#ifndef PHP_WIN32 +#include <gdk/gdkx.h> +#endif + +int le_php_gtk_wrapper; +int le_gdk_window; +int le_gdk_bitmap; +int le_gdk_color; +int le_gdk_colormap; +int le_gdk_cursor; +int le_gdk_visual; +int le_gdk_font; +int le_gdk_gc; +int le_gdk_drag_context; +int le_gtk_accel_group; +int le_gtk_style; + +PHP_GTK_EXPORT_CE(gdk_event_ce) +PHP_GTK_EXPORT_CE(gdk_window_ce) +PHP_GTK_EXPORT_CE(gdk_pixmap_ce) +PHP_GTK_EXPORT_CE(gdk_bitmap_ce) +PHP_GTK_EXPORT_CE(gdk_color_ce) +PHP_GTK_EXPORT_CE(gdk_colormap_ce) +PHP_GTK_EXPORT_CE(gdk_atom_ce) +PHP_GTK_EXPORT_CE(gdk_cursor_ce) +PHP_GTK_EXPORT_CE(gdk_visual_ce) +PHP_GTK_EXPORT_CE(gdk_font_ce) +PHP_GTK_EXPORT_CE(gdk_gc_ce) +PHP_GTK_EXPORT_CE(gdk_drag_context_ce) +PHP_GTK_EXPORT_CE(gtk_selection_data_ce) +PHP_GTK_EXPORT_CE(gtk_ctree_node_ce) +PHP_GTK_EXPORT_CE(gtk_accel_group_ce) +PHP_GTK_EXPORT_CE(gtk_style_ce) +PHP_GTK_EXPORT_CE(gtk_box_child_ce) +PHP_GTK_EXPORT_CE(gtk_fixed_child_ce) +PHP_GTK_EXPORT_CE(gtk_clist_row_ce) + +/* GdkEvent */ +static function_entry php_gdk_event_functions[] = { + {"gdkevent", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_event_new(GdkEvent *event) +{ + zval *result; + zval *value; + + MAKE_STD_ZVAL(result); + + if (!event) { + ZVAL_NULL(result); + return result; + } + + object_init_ex(result, gdk_event_ce); + + add_property_long(result, "type", event->type); + + if (event->any.window) { + value = php_gdk_window_new(event->any.window); + add_property_zval(result, "window", value); + } else + add_property_null(result, "window"); + add_property_bool(result, "send_event", event->any.send_event); + + switch (event->type) { + case GDK_NOTHING: + case GDK_DELETE: + case GDK_DESTROY: + break; + + case GDK_EXPOSE: + value = php_gtk_build_value("(iiii)", + event->expose.area.x, + event->expose.area.y, + event->expose.area.width, + event->expose.area.height); + zend_hash_update(Z_OBJPROP_P(result), "area", sizeof("area"), &value, sizeof(zval *), NULL); + add_property_long(result, "count", event->expose.count); + break; + + case GDK_MOTION_NOTIFY: + add_property_long(result, "time", event->motion.time); + add_property_double(result, "x", event->motion.x); + add_property_double(result, "y", event->motion.y); + add_property_double(result, "pressure", event->motion.pressure); + add_property_double(result, "xtilt", event->motion.xtilt); + add_property_double(result, "ytilt", event->motion.ytilt); + add_property_long(result, "state", event->motion.state); + add_property_long(result, "is_hint", event->motion.is_hint); + add_property_long(result, "source", event->motion.source); + add_property_long(result, "deviceid", event->motion.deviceid); + add_property_double(result, "x_root", event->motion.x_root); + add_property_double(result, "y_root", event->motion.y_root); + break; + + case GDK_BUTTON_PRESS: /*GdkEventButton button*/ + case GDK_2BUTTON_PRESS: /*GdkEventButton button*/ + case GDK_3BUTTON_PRESS: /*GdkEventButton button*/ + case GDK_BUTTON_RELEASE: /*GdkEventButton button*/ + add_property_long(result, "time", event->button.time); + add_property_double(result, "x", event->button.x); + add_property_double(result, "y", event->button.y); + add_property_double(result, "pressure", event->button.pressure); + add_property_double(result, "xtilt", event->button.xtilt); + add_property_double(result, "ytilt", event->button.ytilt); + add_property_long(result, "state", event->button.state); + add_property_long(result, "button", event->button.button); + add_property_long(result, "source", event->button.source); + add_property_long(result, "deviceid", event->button.deviceid); + add_property_double(result, "x_root", event->button.x_root); + add_property_double(result, "y_root", event->button.y_root); + break; + + case GDK_KEY_PRESS: + case GDK_KEY_RELEASE: + add_property_long(result, "time", event->key.time); + add_property_long(result, "state", event->key.state); + add_property_long(result, "keyval", event->key.keyval); + add_property_stringl(result, "string", event->key.string, event->key.length, 1); + break; + + case GDK_ENTER_NOTIFY: + case GDK_LEAVE_NOTIFY: + if (event->crossing.subwindow) { + value = php_gdk_window_new(event->crossing.subwindow); + add_property_zval(result, "subwindow", value); + } else + add_property_null(result, "subwindow"); + add_property_long(result, "time", event->crossing.time); + add_property_double(result, "x", event->crossing.x); + add_property_double(result, "y", event->crossing.y); + add_property_double(result, "x_root", event->crossing.x_root); + add_property_double(result, "y_root", event->crossing.y_root); + add_property_long(result, "mode", event->crossing.mode); + add_property_long(result, "detail", event->crossing.detail); + add_property_bool(result, "focus", event->crossing.focus); + add_property_long(result, "state", event->crossing.state); + break; + + case GDK_FOCUS_CHANGE: + add_property_bool(result, "in", event->focus_change.in); + break; + + case GDK_CONFIGURE: + add_property_long(result, "x", event->configure.x); + add_property_long(result, "y", event->configure.y); + add_property_long(result, "width", event->configure.width); + add_property_long(result, "height", event->configure.height); + break; + + case GDK_MAP: + case GDK_UNMAP: + break; + + case GDK_PROPERTY_NOTIFY: + add_property_zval(result, "atom", php_gdk_atom_new(event->property.atom)); + add_property_long(result, "time", event->property.time); + add_property_long(result, "state", event->property.state); + break; + + case GDK_SELECTION_CLEAR: + case GDK_SELECTION_REQUEST: + case GDK_SELECTION_NOTIFY: + add_property_zval(result, "selection", php_gdk_atom_new(event->selection.selection)); + add_property_zval(result, "target", php_gdk_atom_new(event->selection.target)); + add_property_zval(result, "property", php_gdk_atom_new(event->selection.property)); + add_property_long(result, "requestor", event->selection.requestor); + add_property_long(result, "time", event->selection.time); + break; + + case GDK_PROXIMITY_IN: + case GDK_PROXIMITY_OUT: + add_property_long(result, "time", event->proximity.time); + add_property_long(result, "source", event->proximity.source); + add_property_long(result, "deviceid", event->proximity.deviceid); + break; + + case GDK_DRAG_ENTER: + case GDK_DRAG_LEAVE: + case GDK_DRAG_MOTION: + case GDK_DRAG_STATUS: + case GDK_DROP_START: + case GDK_DROP_FINISHED: + add_property_zval(result, "context", php_gdk_drag_context_new(event->dnd.context)); + add_property_long(result, "time", event->dnd.time); + add_property_long(result, "x_root", event->dnd.x_root); + add_property_long(result, "y_root", event->dnd.y_root); + break; + + case GDK_CLIENT_EVENT: + add_property_zval(result, "message_type", php_gdk_atom_new(event->client.message_type)); + add_property_long(result, "data_format", event->client.data_format); + add_property_stringl(result, "data", event->client.data.b, 20, 1); + break; + + case GDK_VISIBILITY_NOTIFY: + add_property_long(result, "state", event->visibility.state); + break; + + case GDK_NO_EXPOSE: + break; + + default: + break; + } + + return result; +} + + +/* GdkWindow */ +PHP_FUNCTION(gdk_window_raise) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gdk_window_raise(PHP_GDK_WINDOW_GET(this_ptr)); + RETURN_NULL(); +} + +PHP_FUNCTION(gdk_window_lower) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gdk_window_lower(PHP_GDK_WINDOW_GET(this_ptr)); + RETURN_NULL(); +} + +PHP_FUNCTION(gdk_window_get_pointer) +{ + guint32 deviceid; + gdouble x = 0.0, y = 0.0, pressure = 0.0, xtilt = 0.0, ytilt = 0.0; + GdkModifierType mask = 0; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "i", &deviceid)) + return; + + gdk_input_window_get_pointer(PHP_GDK_WINDOW_GET(this_ptr), deviceid, &x, &y, &pressure, &xtilt, &ytilt, &mask); + *return_value = *php_gtk_build_value("(dddddi)", x, y, pressure, xtilt, ytilt, mask); +} + +PHP_FUNCTION(gdk_window_set_cursor) +{ + zval *cursor; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &cursor, gdk_cursor_ce)) + return; + + gdk_window_set_cursor(PHP_GDK_WINDOW_GET(this_ptr), PHP_GDK_CURSOR_GET(cursor)); + RETURN_NULL(); +} + +PHP_FUNCTION(gdk_window_new_gc) +{ + zval *php_values = NULL; + zval **value; + char *key; + ulong key_len, num_key; + HashTable *hash; + GdkGCValues values; + GdkGCValuesMask mask = 0; + GdkGC *gc; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|a", &php_values)) + return; + + if (php_values) { + hash = HASH_OF(php_values); + zend_hash_internal_pointer_reset(hash); + while (zend_hash_get_current_data(hash, (void**)&value) == SUCCESS) { + if (zend_hash_get_current_key_ex(hash, &key, &key_len, &num_key, 0, NULL) == HASH_KEY_IS_STRING) { + if (!strncmp(key, "foreground", key_len)) { + GdkColor *c; + + if (!php_gtk_check_class(*value, gdk_color_ce)) { + php_error(E_WARNING, "foreground value has to be a GdkColor"); + return; + } + c = PHP_GDK_COLOR_GET(*value); + mask |= GDK_GC_FOREGROUND; + values.foreground.red = c->red; + values.foreground.green = c->green; + values.foreground.blue = c->blue; + values.foreground.pixel = c->pixel; + } else if (!strncmp(key, "background", key_len)) { + GdkColor *c; + + if (!php_gtk_check_class(*value, gdk_color_ce)) { + php_error(E_WARNING, "background value has to be a GdkColor"); + return; + } + c = PHP_GDK_COLOR_GET(*value); + mask |= GDK_GC_BACKGROUND; + values.background.red = c->red; + values.background.green = c->green; + values.background.blue = c->blue; + values.background.pixel = c->pixel; + } else if (!strncmp(key, "font", key_len)) { + if (!php_gtk_check_class(*value, gdk_font_ce)) { + php_error(E_WARNING, "font value has to be a GdkFont"); + return; + } + mask |= GDK_GC_FONT; + values.font = PHP_GDK_FONT_GET(*value); + } else if (!strncmp(key, "tile", key_len)) { + if (!php_gtk_check_class(*value, gdk_window_ce)) { + php_error(E_WARNING, "tile value has to be a GdkPixmap"); + return; + } + mask |= GDK_GC_TILE; + values.tile = PHP_GDK_WINDOW_GET(*value); + } else if (!strncmp(key, "stipple", key_len)) { + if (!php_gtk_check_class(*value, gdk_window_ce)) { + php_error(E_WARNING, "stipple value has to be a GdkPixmap"); + return; + } + mask |= GDK_GC_STIPPLE; + values.stipple = PHP_GDK_WINDOW_GET(*value); + } else if (!strncmp(key, "clip_mask", key_len)) { + if (!php_gtk_check_class(*value, gdk_window_ce)) { + php_error(E_WARNING, "clip_mask value has to be a GdkPixmap"); + return; + } + mask |= GDK_GC_CLIP_MASK; + values.clip_mask = PHP_GDK_WINDOW_GET(*value); + } + } + zend_hash_move_forward(hash); + } + } + + gc = gdk_gc_new_with_values(PHP_GDK_WINDOW_GET(this_ptr), &values, mask); + *return_value = *php_gdk_gc_new(gc); + gdk_gc_unref(gc); +} + +PHP_FUNCTION(gdk_window_property_get) +{ + GdkAtom property, type = 0; + gint delete = FALSE; + GdkAtom atype; + gint aformat, alength; + guchar *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "O|Oi", &property, gdk_atom_ce, &type, gdk_atom_ce, &delete)) { + gchar *prop_name; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s|Oi", &prop_name, &type, gdk_atom_ce, &delete)) + return; + + property = gdk_atom_intern(prop_name, FALSE); + } + + if (gdk_property_get(PHP_GDK_WINDOW_GET(this_ptr), property, type, 0, 9999, delete, + &atype, &aformat, &alength, &data)) { + zval *php_data; + int i; + guint16 *data16; + guint32 *data32; + + MAKE_STD_ZVAL(php_data); + + switch (aformat) { + case 8: + ZVAL_STRINGL(php_data, data, alength, 1); + break; + + case 16: + data16 = (guint16 *)data; + array_init(php_data); + for (i = 0; i < alength; i++) + add_next_index_long(php_data, data16[i]); + break; + + case 32: + data32 = (guint32 *)data; + array_init(php_data); + for (i = 0; i < alength; i++) + add_next_index_long(php_data, data32[i]); + break; + + default: + php_error(E_WARNING, "%s() got property format != 8, 16, or 32", + get_active_function_name()); + break; + } + g_free(data); + *return_value = *php_gtk_build_value("(NiN)", php_gdk_atom_new(atype), aformat, php_data); + } +} + +PHP_FUNCTION(gdk_window_property_change) +{ + GdkAtom property, type; + gint format; + zval *php_mode, *php_data; + GdkPropMode mode; + guchar *data = NULL; + gint n_elements; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "OOiVV", &property, gdk_atom_ce, + &type, gdk_atom_ce, &format, &php_mode, &php_data)) { + gchar *prop_name; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "sOiVV/", &prop_name, &type, + gdk_atom_ce, &format, &php_mode, &php_data)) + return; + + property = gdk_atom_intern(prop_name, FALSE); + } + + if (!php_gtk_get_enum_value(GTK_TYPE_GDK_PROP_MODE, php_mode, (gint *)&mode)) + return; + + switch (format) { + case 8: + if (Z_TYPE_P(php_data) != IS_STRING) { + php_error(E_WARNING, "%s() expects data to be a string for format=8", get_active_function_name()); + return; + } + data = Z_STRVAL_P(php_data); + n_elements = Z_STRLEN_P(php_data); + break; + + case 16: + { + guint16 *data16; + zval **data_temp; + int i; + + if (Z_TYPE_P(php_data) != IS_ARRAY) { + php_error(E_WARNING, "%s() expects data to be an array for format=16", get_active_function_name()); + return; + } + n_elements = zend_hash_num_elements(Z_ARRVAL_P(php_data)); + data16 = g_new(guint16, n_elements); + i = 0; + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_data)); + zend_hash_get_current_data(Z_ARRVAL_P(php_data), (void **)&data_temp); + zend_hash_move_forward(Z_ARRVAL_P(php_data))) { + convert_to_long_ex(data_temp); + data16[i++] = Z_LVAL_PP(data_temp); + } + } + break; + + case 32: + { + guint32 *data32; + zval **data_temp; + int i; + + if (Z_TYPE_P(php_data) != IS_ARRAY) { + php_error(E_WARNING, "%s() expects data to be an array for format=32", get_active_function_name()); + return; + } + n_elements = zend_hash_num_elements(Z_ARRVAL_P(php_data)); + data32 = g_new(guint32, n_elements); + i = 0; + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_data)); + zend_hash_get_current_data(Z_ARRVAL_P(php_data), (void **)&data_temp); + zend_hash_move_forward(Z_ARRVAL_P(php_data))) { + convert_to_long_ex(data_temp); + data32[i++] = Z_LVAL_PP(data_temp); + } + } + break; + + default: + php_error(E_WARNING, "%s() expects format to be 8, 16, or 32", get_active_function_name()); + break; + } + + gdk_property_change(PHP_GDK_WINDOW_GET(this_ptr), property, type, format, + mode, data, n_elements); + if (format != 8) + g_free(data); +} + +PHP_FUNCTION(gdk_window_property_delete) +{ + GdkAtom property; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "O", &property, gdk_atom_ce)) { + gchar *prop_name; + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "s", &prop_name)) + return; + + property = gdk_atom_intern(prop_name, FALSE); + } + + gdk_property_delete(PHP_GDK_WINDOW_GET(this_ptr), property); +} + +static function_entry php_gdk_window_functions[] = { + {"gdkwindow", PHP_FN(wrap_no_direct_constructor), NULL}, + {"raise", PHP_FN(gdk_window_raise), NULL}, + {"lower", PHP_FN(gdk_window_lower), NULL}, + {"get_pointer", PHP_FN(gdk_window_get_pointer), NULL}, + {"set_cursor", PHP_FN(gdk_window_set_cursor), NULL}, + {"new_gc", PHP_FN(gdk_window_new_gc), NULL}, + {"property_get", PHP_FN(gdk_window_property_get), NULL}, + {"property_change", PHP_FN(gdk_window_property_change), NULL}, + {"property_delete", PHP_FN(gdk_window_property_delete), NULL}, + {NULL, NULL, NULL} +}; + +static function_entry php_gdk_pixmap_functions[] = { + {"gdkpixmap", PHP_FN(wrap_no_direct_constructor), NULL}, + {"new_gc", PHP_FN(gdk_window_new_gc), NULL}, + {"property_get", PHP_FN(gdk_window_property_get), NULL}, + {"property_change", PHP_FN(gdk_window_property_change), NULL}, + {"property_delete", PHP_FN(gdk_window_property_delete), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_window_new(GdkWindow *window) +{ + zval *result; + zval **wrapper_ptr; + + if (!window) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)window, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_window_ce); + + gdk_window_ref(window); + php_gtk_set_object(result, window, le_gdk_window); + + return result; +} + +zval *php_gdk_pixmap_new(GdkPixmap *pixmap) +{ + zval *result; + zval **wrapper_ptr; + + if (!pixmap) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)pixmap, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_pixmap_ce); + + gdk_pixmap_ref(pixmap); + php_gtk_set_object(result, pixmap, le_gdk_window); + + return result; +} + +zval *php_gdk_bitmap_new(GdkWindow *bitmap) +{ + zval *result; + zval **wrapper_ptr; + + if (!bitmap) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)bitmap, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_bitmap_ce); + + gdk_bitmap_ref(bitmap); + php_gtk_set_object(result, bitmap, le_gdk_bitmap); + + return result; +} + +static void gdk_window_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + zval *value; + GdkWindow *win = PHP_GDK_WINDOW_GET(object); + gint x, y; + GdkModifierType p_mask; + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "width")) { + gdk_window_get_size(win, &x, NULL); + RETURN_LONG(x); + } else if (!strcmp(prop_name, "height")) { + gdk_window_get_size(win, NULL, &y); + RETURN_LONG(y); + } else if (!strcmp(prop_name, "x")) { + gdk_window_get_position(win, &x, NULL); + RETURN_LONG(x); + } else if (!strcmp(prop_name, "y")) { + gdk_window_get_position(win, NULL, &y); + RETURN_LONG(y); + } else if (!strcmp(prop_name, "colormap")) { + *return_value = *php_gdk_colormap_new(gdk_window_get_colormap(win)); + return; + } else if (!strcmp(prop_name, "pointer")) { + gdk_window_get_pointer(win, &x, &y, NULL); + *return_value = *php_gtk_build_value("(ii)", x, y); + return; + } else if (!strcmp(prop_name, "pointer_state")) { + gdk_window_get_pointer(win, NULL, NULL, &p_mask); + RETURN_LONG(p_mask); + } else if (!strcmp(prop_name, "parent")) { + GdkWindow *parent = gdk_window_get_parent(win); + if (parent) + *return_value = *php_gdk_window_new(parent); + return; + } else if (!strcmp(prop_name, "toplevel")) { + *return_value = *php_gdk_window_new(gdk_window_get_toplevel(win)); + return; + } else if (!strcmp(prop_name, "children")) { + GList *children, *tmp; + zval *child; + children = gdk_window_get_children(win); + array_init(return_value); + for (tmp = children; tmp; tmp = tmp->next) { + child = php_gdk_window_new(tmp->data); + zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &child, sizeof(zval *), NULL); + } + g_list_free(children); + return; + } else if (!strcmp(prop_name, "type")) { + RETURN_LONG(gdk_window_get_type(win)); + } else if (!strcmp(prop_name, "depth")) { + gdk_window_get_geometry(win, NULL, NULL, NULL, NULL, &x); + RETURN_LONG(x); + } +#ifndef PHP_WIN32 + else if (!strcmp(prop_name, "xid")) { + RETURN_LONG(GDK_WINDOW_XWINDOW(win)); + } +#endif + + *result = FAILURE; +} + + +static void release_gdk_window_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkWindow *obj = (GdkWindow *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + if (gdk_window_get_type(obj) == GDK_WINDOW_PIXMAP) + gdk_pixmap_unref(obj); + else + gdk_window_unref(obj); +} + +static void release_gdk_bitmap_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkBitmap *obj = (GdkBitmap *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_bitmap_unref(obj); +} + +/* GdkColor */ +PHP_FUNCTION(gdkcolor) +{ + char *color_spec; + GdkColor color; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "hhh", &color.red, &color.green, &color.blue)) { + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "s", &color_spec)) { + php_error(E_WARNING, "%s() requires a color spec or RGB triplet", get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } else if (!gdk_color_parse(color_spec, &color)) { + php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(), color_spec); + php_gtk_invalidate(this_ptr); + return; + } + } + + php_gtk_set_object(this_ptr, gdk_color_copy(&color), le_gdk_color); +} + +static function_entry php_gdk_color_functions[] = { + {"gdkcolor", PHP_FN(gdkcolor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_color_new(GdkColor *color) +{ + zval *result; + GdkColor *result_obj; + + MAKE_STD_ZVAL(result); + + if (!color) { + ZVAL_NULL(result); + return result; + } + + object_init_ex(result, gdk_color_ce); + + result_obj = gdk_color_copy(color); + php_gtk_set_object(result, result_obj, le_gdk_color); + + return result; +} + +static void gdk_color_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkColor *color = PHP_GDK_COLOR_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "red")) { + RETURN_LONG(color->red); + } else if (!strcmp(prop_name, "green")) { + RETURN_LONG(color->green); + } else if (!strcmp(prop_name, "blue")) { + RETURN_LONG(color->blue); + } else if (!strcmp(prop_name, "pixel")) { + RETURN_LONG(color->pixel); + } + + *result = FAILURE; +} + +static int gdk_color_set_property(zval *object, zend_llist_element **element, zval *value) +{ + GdkColor *color = PHP_GDK_COLOR_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + convert_to_long(value); + if (!strcmp(prop_name, "red")) { + color->red = (gushort)Z_LVAL_P(value); + } else if (!strcmp(prop_name, "green")) { + color->green = (gushort)Z_LVAL_P(value); + } else if (!strcmp(prop_name, "blue")) { + color->blue = (gushort)Z_LVAL_P(value); + } else { + return FAILURE; + } + + return SUCCESS; +} + +static void release_gdk_color_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkColor *obj = (GdkColor *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_color_free(obj); +} + + +/* GdkColormap */ +PHP_FUNCTION(gdk_colormap_size) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + ZVAL_LONG(return_value, PHP_GDK_COLORMAP_GET(this_ptr)->size); +} + +PHP_FUNCTION(gdk_colormap_alloc) +{ + gchar *color_spec; + GdkColor color = {0, 0, 0, 0}; + zend_bool writeable = 0, best_match = 1; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "hhh|bb", &color.red, &color.green, &color.blue, &writeable, &best_match)) { + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "s|bb", &color_spec, &writeable, &best_match)) { + php_error(E_WARNING, "%s() requires a color spec or RGB triplet", get_active_function_name()); + return; + } else if (!gdk_color_parse(color_spec, &color)) { + php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(), color_spec); + return; + } + } + + if (!gdk_colormap_alloc_color(PHP_GDK_COLORMAP_GET(this_ptr), &color, writeable, best_match)) { + php_error(E_WARNING, "%s() could not allocate color"); + return; + } + + *return_value = *php_gdk_color_new(&color); +} + +static function_entry php_gdk_colormap_functions[] = { + {"gdkcolormap", PHP_FN(wrap_no_direct_constructor), NULL}, + {"size", PHP_FN(gdk_colormap_size), NULL}, + {"alloc", PHP_FN(gdk_colormap_alloc), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_colormap_new(GdkColormap *cmap) +{ + zval *result; + zval **wrapper_ptr; + + if (!cmap) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)cmap, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_colormap_ce); + + gdk_colormap_ref(cmap); + php_gtk_set_object(result, cmap, le_gdk_colormap); + + return result; +} + +static void release_gdk_colormap_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkColormap *obj = (GdkColormap *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_colormap_unref(obj); +} + +static void gdk_colormap_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkColormap *cmap = PHP_GDK_COLORMAP_GET(object); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + zend_llist_element *next; + char *prop_name = Z_STRVAL(property->element); + int prop_index, i; + + *result = SUCCESS; + + if (!strcmp(prop_name, "colors") && cmap->colors) { + next = (*element)->next; + if (next) { + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + if (prop_index < 0 || prop_index >= cmap->size) { + php_error(E_WARNING, "colormap index out of range"); + return; + } + *return_value = *php_gdk_color_new(&cmap->colors[prop_index]); + } + } else { + array_init(return_value); + + for (i = 0; i < cmap->size; i++) + add_next_index_zval(return_value, php_gdk_color_new(&cmap->colors[i])); + } + + return; + } + + *result = FAILURE; +} + + +/* GdkAtom */ +/* TODO maybe change this to have a real constructor */ +static function_entry php_gdk_atom_functions[] = { + {"gdkatom", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +inline GdkAtom php_gdk_atom_get(zval *wrapper) +{ + zval **atom; + + zend_hash_find(Z_OBJPROP_P(wrapper), "atom", sizeof("atom"), (void**)&atom); + return (GdkAtom)Z_LVAL_PP(atom); +} + +zval *php_gdk_atom_new(GdkAtom atom) +{ + zval *result; + gchar *atom_name; + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_atom_ce); + add_property_long_ex(result, "atom", sizeof("atom"), atom); + atom_name = gdk_atom_name(atom); + if (atom_name) + add_property_string_ex(result, "string", sizeof("string"), atom_name, 0); + else + add_property_null_ex(result, "string", sizeof("string")); + + return result; +} + +/* GdkCursor */ +static function_entry php_gdk_cursor_functions[] = { + {"gdkcursor", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_cursor_new(GdkCursor *cursor) +{ + zval *result; + zval **wrapper_ptr; + + if (!cursor) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)cursor, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_cursor_ce); + php_gtk_set_object(result, cursor, le_gdk_cursor); + + return result; +} + +static void release_gdk_cursor_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkCursor *obj = (GdkCursor *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_cursor_destroy(obj); +} + +static void gdk_cursor_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkCursor *cursor = PHP_GDK_CURSOR_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "type")) { + RETURN_LONG(cursor->type); + } else if (!strcmp(prop_name, "name")) { + GtkEnumValue *vals = gtk_type_enum_get_values(GTK_TYPE_GDK_CURSOR_TYPE); + while (vals->value_name != NULL && vals->value != (unsigned)cursor->type) + vals++; + if (vals->value_nick) { + RETURN_STRING(vals->value_nick, 1); + } else { + RETURN_STRINGL("*unknown*", sizeof("*unknown*"), 1); + } + } + + *result = FAILURE; +} + + +/* GdkVisual */ +static function_entry php_gdk_visual_functions[] = { + {"gdkvisual", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_visual_new(GdkVisual *visual) +{ + zval *result; + zval **wrapper_ptr; + + if (!visual) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)visual, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_visual_ce); + gdk_visual_ref(visual); + php_gtk_set_object(result, visual, le_gdk_visual); + + return result; +} + +static void release_gdk_visual_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkVisual *obj = (GdkVisual *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_visual_unref(obj); +} + +static void gdk_visual_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkVisual *visual = PHP_GDK_VISUAL_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "type")) { + RETURN_LONG(visual->type); + } else if (!strcmp(prop_name, "depth")) { + RETURN_LONG(visual->depth); + } else if (!strcmp(prop_name, "byte_order")) { + RETURN_LONG(visual->byte_order); + } else if (!strcmp(prop_name, "colormap_size")) { + RETURN_LONG(visual->colormap_size); + } else if (!strcmp(prop_name, "bits_per_rgb")) { + RETURN_LONG(visual->bits_per_rgb); + } else if (!strcmp(prop_name, "red_mask")) { + RETURN_LONG(visual->red_shift); + } else if (!strcmp(prop_name, "red_shift")) { + RETURN_LONG(visual->red_prec); + } else if (!strcmp(prop_name, "red_prec")) { + RETURN_LONG(visual->red_mask); + } else if (!strcmp(prop_name, "green_mask")) { + RETURN_LONG(visual->green_mask); + } else if (!strcmp(prop_name, "green_shift")) { + RETURN_LONG(visual->green_shift); + } else if (!strcmp(prop_name, "green_prec")) { + RETURN_LONG(visual->green_prec); + } else if (!strcmp(prop_name, "blue_mask")) { + RETURN_LONG(visual->blue_mask); + } else if (!strcmp(prop_name, "blue_shift")) { + RETURN_LONG(visual->blue_shift); + } else if (!strcmp(prop_name, "blue_prec")) { + RETURN_LONG(visual->blue_prec); + } + + *result = FAILURE; +} + + +/* GdkFont */ +PHP_FUNCTION(gdk_font_width) +{ + char *text; + int length; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#", &text, &length)) + return; + + RETURN_LONG(gdk_text_width(PHP_GDK_FONT_GET(this_ptr), text, length)); +} + +PHP_FUNCTION(gdk_font_height) +{ + char *text; + int length; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#", &text, &length)) + return; + + RETURN_LONG(gdk_text_height(PHP_GDK_FONT_GET(this_ptr), text, length)); +} + +PHP_FUNCTION(gdk_font_measure) +{ + char *text; + int length; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#", &text, &length)) + return; + + RETURN_LONG(gdk_text_measure(PHP_GDK_FONT_GET(this_ptr), text, length)); +} + +PHP_FUNCTION(gdk_font_extents) +{ + char *text; + int length, lbearing, rbearing, width, ascent, descent; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#", &text, &length)) + return; + + gdk_text_extents(PHP_GDK_FONT_GET(this_ptr), text, length, &lbearing, &rbearing, &width, &ascent, &descent); + *return_value = *php_gtk_build_value("(iiiii)", lbearing, rbearing, width, ascent, descent); +} + +static function_entry php_gdk_font_functions[] = { + {"gdkfont", PHP_FN(wrap_no_direct_constructor), NULL}, + {"width", PHP_FN(gdk_font_width), NULL}, + {"height", PHP_FN(gdk_font_height), NULL}, + {"measure", PHP_FN(gdk_font_measure), NULL}, + {"extents", PHP_FN(gdk_font_extents), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_font_new(GdkFont *font) +{ + zval *result; + zval **wrapper_ptr; + + if (!font) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)font, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_font_ce); + gdk_font_ref(font); + php_gtk_set_object(result, font, le_gdk_font); + + return result; +} + +static void release_gdk_font_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkFont *obj = (GdkFont *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_font_unref(obj); +} + +static void gdk_font_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkFont *font = PHP_GDK_FONT_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "type")) { + RETURN_LONG(font->type); + } else if (!strcmp(prop_name, "ascent")) { + RETURN_LONG(font->ascent); + } else if (!strcmp(prop_name, "descent")) { + RETURN_LONG(font->descent); + } + + *result = FAILURE; +} + + +/* GdkGC */ +PHP_FUNCTION(gdk_gc_set_dashes) +{ + gint dash_offset, length, i = 0; + zval *php_list, **temp; + guchar *dash_list; + HashTable *hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ia", &dash_offset, &php_list)) + return; + + hash = HASH_OF(php_list); + length = zend_hash_num_elements(hash); + dash_list = g_new(char, length); + zend_hash_internal_pointer_reset(hash); + while (zend_hash_get_current_data(hash, (void**)&temp) == SUCCESS) { + if (Z_TYPE_PP(temp) != IS_LONG) { + php_error(E_WARNING, "%s() expects array elements to be integers", + get_active_function_name()); + g_free(dash_list); + return; + } + dash_list[i] = (guchar)Z_LVAL_PP(temp); + if (dash_list[i] == 0) { + php_error(E_WARNING, "%s() expects array elements to be non-zero", + get_active_function_name()); + g_free(dash_list); + return; + } + zend_hash_move_forward(hash); + } + + gdk_gc_set_dashes(PHP_GDK_GC_GET(this_ptr), dash_offset, dash_list, length); + g_free(dash_list); + RETURN_NULL(); +} + +static function_entry php_gdk_gc_functions[] = { + {"gdkgc", PHP_FN(wrap_no_direct_constructor), NULL}, + {"set_dashes", PHP_FN(gdk_gc_set_dashes), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_gc_new(GdkGC *gc) +{ + zval *result; + zval **wrapper_ptr; + + if (!gc) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)gc, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_gc_ce); + gdk_gc_ref(gc); + php_gtk_set_object(result, gc, le_gdk_gc); + + return result; +} + +static void release_gdk_gc_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkGC *obj = (GdkGC *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_gc_unref(obj); +} + + +static void gdk_colormap_query_color (GdkColormap *colormap, gulong pixel, GdkColor *result) +{ +#ifndef PHP_WIN32 + XColor xcolor; +#endif + GdkVisual *visual; + + visual = gdk_colormap_get_visual (colormap); + + switch (visual->type) { + case GDK_VISUAL_DIRECT_COLOR: + case GDK_VISUAL_TRUE_COLOR: + result->red = 65535. * (double)((pixel & visual->red_mask) >> + visual->red_shift) / ((1 << visual->red_prec) - 1); + result->green = 65535. * (double)((pixel & visual->green_mask) >> + visual->green_shift) / ((1 << visual->green_prec) - 1); + result->blue = 65535. * (double)((pixel & visual->blue_mask) >> + visual->blue_shift) / ((1 << visual->blue_prec) - 1); + break; + case GDK_VISUAL_STATIC_GRAY: + case GDK_VISUAL_GRAYSCALE: + result->red = result->green = result->blue = 65535. * + (double)pixel/((1<<visual->depth) - 1); + break; + case GDK_VISUAL_STATIC_COLOR: +#ifdef PHP_WIN32 + g_assert_not_reached (); +#else + xcolor.pixel = pixel; + XQueryColor(GDK_DISPLAY(), GDK_COLORMAP_XCOLORMAP(colormap), &xcolor); + result->red = xcolor.red; + result->green = xcolor.green; + result->blue = xcolor.blue; +#endif + break; + case GDK_VISUAL_PSEUDO_COLOR: + result->red = colormap->colors[pixel].red; + result->green = colormap->colors[pixel].green; + result->blue = colormap->colors[pixel].blue; + break; + default: + g_assert_not_reached (); + break; + } +} + +static void gdk_gc_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkGC *gc = PHP_GDK_GC_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + GdkGCValues gcv; + + *result = SUCCESS; + + gdk_gc_get_values(gc, &gcv); + + if (!strcmp(prop_name, "foreground")) { + *return_value = *php_gdk_color_new(&gcv.foreground); + return; + } else if (!strcmp(prop_name, "background")) { + *return_value = *php_gdk_color_new(&gcv.background); + return; + } else if (!strcmp(prop_name, "font")) { + *return_value = *php_gdk_font_new(gcv.font); + return; + } else if (!strcmp(prop_name, "function")) { + RETURN_LONG(gcv.function); + } else if (!strcmp(prop_name, "fill")) { + RETURN_LONG(gcv.fill); + } else if (!strcmp(prop_name, "tile")) { + if (gcv.tile) + *return_value = *php_gdk_pixmap_new(gcv.tile); + return; + } else if (!strcmp(prop_name, "stipple")) { + if (gcv.stipple) + *return_value = *php_gdk_pixmap_new(gcv.stipple); + return; + } else if (!strcmp(prop_name, "clip_mask")) { + if (gcv.clip_mask) + *return_value = *php_gdk_pixmap_new(gcv.clip_mask); + return; + } else if (!strcmp(prop_name, "subwindow_mode")) { + RETURN_LONG(gcv.subwindow_mode); + } else if (!strcmp(prop_name, "ts_x_origin")) { + RETURN_LONG(gcv.ts_x_origin); + } else if (!strcmp(prop_name, "ts_y_origin")) { + RETURN_LONG(gcv.ts_y_origin); + } else if (!strcmp(prop_name, "clip_x_origin")) { + RETURN_LONG(gcv.clip_x_origin); + } else if (!strcmp(prop_name, "clip_y_origin")) { + RETURN_LONG(gcv.clip_y_origin); + } else if (!strcmp(prop_name, "graphics_exposures")) { + RETURN_LONG(gcv.graphics_exposures); + } else if (!strcmp(prop_name, "line_width")) { + RETURN_LONG(gcv.line_width); + } else if (!strcmp(prop_name, "line_style")) { + RETURN_LONG(gcv.line_style); + } else if (!strcmp(prop_name, "cap_style")) { + RETURN_LONG(gcv.cap_style); + } else if (!strcmp(prop_name, "join_style")) { + RETURN_LONG(gcv.join_style); + } + + *result = FAILURE; +} + +static int gdk_gc_set_property(zval *object, zend_llist_element **element, zval *value) +{ + GdkGC *gc = PHP_GDK_GC_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + zend_bool type_mismatch = 0; + int i; + static char *props[] = { + "function", "fill", "subwindow_mode", "ts_x_origin", "ts_y_origin", + "clip_x_origin", "clip_y_origin", "graphics_exposures", "line_width", + "line_style", "cap_style", "join_style", "foreground", "background", + "font", "tile", "stipple", "clip_mask" }; + + for (i = 0; i < sizeof(props)/sizeof(char *); i++) { + if (!strcmp(prop_name, props[i])) + break; + } + if (i == sizeof(props)/sizeof(char *)) + return FAILURE; + + if (Z_TYPE_P(value) == IS_LONG) { + int iv = Z_LVAL_P(value); + GdkGCValues v; + + gdk_gc_get_values(gc, &v); + if (!strcmp(prop_name, "function")) + gdk_gc_set_function(gc, iv); + else if (!strcmp(prop_name, "fill")) + gdk_gc_set_fill(gc, iv); + else if (!strcmp(prop_name, "subwindow_mode")) + gdk_gc_set_subwindow(gc, iv); + else if (!strcmp(prop_name, "ts_x_origin")) + gdk_gc_set_ts_origin(gc, iv, v.ts_y_origin); + else if (!strcmp(prop_name, "ts_y_origin")) + gdk_gc_set_ts_origin(gc, v.ts_x_origin, iv); + else if (!strcmp(prop_name, "clip_x_origin")) + gdk_gc_set_clip_origin(gc, iv, v.clip_y_origin); + else if (!strcmp(prop_name, "clip_y_origin")) + gdk_gc_set_clip_origin(gc, v.clip_x_origin, iv); + else if (!strcmp(prop_name, "graphics_exposures")) + gdk_gc_set_exposures(gc, iv); + else if (!strcmp(prop_name, "line_width")) + gdk_gc_set_line_attributes(gc, iv, v.line_style, v.cap_style, v.join_style); + else if (!strcmp(prop_name, "line_style")) + gdk_gc_set_line_attributes(gc, v.line_width, iv, v.cap_style, v.join_style); + else if (!strcmp(prop_name, "cap_style")) + gdk_gc_set_line_attributes(gc, v.line_width, v.line_style, iv, v.join_style); + else if (!strcmp(prop_name, "join_style")) + gdk_gc_set_line_attributes(gc, v.line_width, v.line_style, v.cap_style, iv); + else + type_mismatch = 1; + } else if (php_gtk_check_class(value, gdk_color_ce)) { + GdkColor *c = PHP_GDK_COLOR_GET(value); + + if (!strcmp(prop_name, "foreground")) + gdk_gc_set_foreground(gc, c); + else if (!strcmp(prop_name, "background")) + gdk_gc_set_background(gc, c); + else + type_mismatch = 1; + } else if (php_gtk_check_class(value, gdk_font_ce)) { + if (!strcmp(prop_name, "font")) + gdk_gc_set_font(gc, PHP_GDK_FONT_GET(value)); + else + type_mismatch = 1; + } else if (php_gtk_check_class(value, gdk_window_ce) || Z_TYPE_P(value) == IS_NULL) { + GdkWindow *w = (Z_TYPE_P(value) == IS_NULL) ? NULL : PHP_GDK_WINDOW_GET(value); + + if (!strcmp(prop_name, "tile")) + gdk_gc_set_tile(gc, w); + else if (!strcmp(prop_name, "stipple")) + gdk_gc_set_stipple(gc, w); + else if (!strcmp(prop_name, "clip_mask")) + gdk_gc_set_clip_mask(gc, w); + else + type_mismatch = 1; + } else + type_mismatch = 1; + + if (type_mismatch) { + php_error(E_WARNING, "Type mismatch trying to set property '%s'", prop_name); + return PG_ERROR; + } else + return SUCCESS; +} + + +/* GdkDragContext */ +static function_entry php_gdk_drag_context_functions[] = { + {"gdkdragcontext", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_drag_context_new(GdkDragContext *context) +{ + zval *result; + zval **wrapper_ptr; + + if (!context) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)context, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_drag_context_ce); + gdk_drag_context_ref(context); + php_gtk_set_object(result, context, le_gdk_drag_context); + + return result; +} + +static void release_gdk_drag_context_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkDragContext *obj = (GdkDragContext *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_drag_context_unref(obj); +} + +static void gdk_drag_context_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkDragContext *context = PHP_GDK_DRAG_CONTEXT_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "protocol")) { + RETURN_LONG(context->protocol); + } else if (!strcmp(prop_name, "is_source")) { + RETURN_BOOL(context->is_source); + } else if (!strcmp(prop_name, "source_window")) { + if (context->source_window) + *return_value = *php_gdk_window_new(context->source_window); + return; + } else if (!strcmp(prop_name, "dest_window")) { + if (context->dest_window) + *return_value = *php_gdk_window_new(context->dest_window); + return; + } else if (!strcmp(prop_name, "targets")) { + GList *tmp; + + array_init(return_value); + for (tmp = context->targets; tmp; tmp = tmp->next) + add_next_index_zval(return_value, php_gdk_atom_new(GPOINTER_TO_INT(tmp->data))); + return; + } else if (!strcmp(prop_name, "actions")) { + RETURN_LONG(context->actions); + } else if (!strcmp(prop_name, "suggested_action")) { + RETURN_LONG(context->suggested_action); + } else if (!strcmp(prop_name, "action")) { + RETURN_LONG(context->action); + } else if (!strcmp(prop_name, "start_time")) { + RETURN_LONG(context->start_time); + } + + *result = FAILURE; +} + + +/* GtkSelectionData */ +PHP_FUNCTION(gtk_selection_data_set) +{ + GdkAtom type; + int format, length; + guchar *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "iis#", &type, &format, &data, &length)) + return; + + gtk_selection_data_set(PHP_GTK_SELECTION_DATA_GET(this_ptr), type, format, data, length); + RETURN_NULL(); +} + +static function_entry php_gtk_selection_data_functions[] = { + {"gdkselectiondata", PHP_FN(wrap_no_direct_constructor), NULL}, + {"set", PHP_FN(gtk_selection_data_set), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_selection_data_new(GtkSelectionData *data) +{ + zval *result; + zval **wrapper_ptr; + + if (!data) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)data, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_selection_data_ce); + php_gtk_set_object(result, data, le_php_gtk_wrapper); + + return result; +} + +static void gtk_selection_data_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkSelectionData *data = PHP_GTK_SELECTION_DATA_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "selection")) { + *return_value = *php_gdk_atom_new(data->selection); + return; + } else if (!strcmp(prop_name, "target")) { + *return_value = *php_gdk_atom_new(data->target); + return; + } else if (!strcmp(prop_name, "type")) { + *return_value = *php_gdk_atom_new(data->type); + return; + } else if (!strcmp(prop_name, "format")) { + RETURN_LONG(data->format); + } else if (!strcmp(prop_name, "length")) { + RETURN_LONG(data->length); + } else if (!strcmp(prop_name, "data") && data->length > -1) { + RETURN_STRINGL(data->data, data->length, 1); + } + + *result = FAILURE; +} + +/* GtkCtreeNode */ +static function_entry php_gtk_ctree_node_functions[] = { + {"gtkctreenode", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_ctree_node_new(GtkCTreeNode *node) +{ + zval *result; + zval **wrapper_ptr; + static zval *static_ptr = NULL; + + if (!node) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)node, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_ctree_node_ce); + php_gtk_set_object(result, node, le_php_gtk_wrapper); + if (static_ptr == NULL) { + static_ptr = result; + } + + return result; +} + +static void gtk_ctree_node_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkCTreeNode *node = PHP_GTK_CTREE_NODE_GET(object); + GtkCTreeNode *temp; + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "parent")) { + temp = GTK_CTREE_ROW(node)->parent; + if (temp) + *return_value = *php_gtk_ctree_node_new(temp); + return; + } else if (!strcmp(prop_name, "sibling")) { + temp = GTK_CTREE_ROW(node)->sibling; + if (temp) + *return_value = *php_gtk_ctree_node_new(temp); + return; + } else if (!strcmp(prop_name, "children")) { + zval *php_node; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + temp = GTK_CTREE_ROW(node)->children; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + while (temp) { + if (i == prop_index) { + *return_value = *php_gtk_ctree_node_new(temp); + return; + } + temp = GTK_CTREE_ROW(temp)->sibling; + i++; + } + } + } else { + array_init(return_value); + while (temp) { + php_node = php_gtk_ctree_node_new(temp); + add_next_index_zval(return_value, php_node); + temp = GTK_CTREE_ROW(temp)->sibling; + } + } + + return; + } else if (!strcmp(prop_name, "pixmap_closed")) { + GdkPixmap *pixmap = GTK_CTREE_ROW(node)->pixmap_closed; + if (pixmap) + *return_value = *php_gdk_pixmap_new(pixmap); + return; + } else if (!strcmp(prop_name, "pixmap_opened")) { + GdkPixmap *pixmap = GTK_CTREE_ROW(node)->pixmap_opened; + if (pixmap) + *return_value = *php_gdk_pixmap_new(pixmap); + return; + } else if (!strcmp(prop_name, "mask_closed")) { + GdkBitmap *mask = GTK_CTREE_ROW(node)->mask_closed; + if (mask) + *return_value = *php_gdk_bitmap_new(mask); + return; + } else if (!strcmp(prop_name, "mask_opened")) { + GdkBitmap *mask = GTK_CTREE_ROW(node)->mask_opened; + if (mask) + *return_value = *php_gdk_bitmap_new(mask); + return; + } else if (!strcmp(prop_name, "level")) { + RETURN_LONG(GTK_CTREE_ROW(node)->level); + } else if (!strcmp(prop_name, "is_leaf")) { + RETURN_BOOL(GTK_CTREE_ROW(node)->is_leaf); + } else if (!strcmp(prop_name, "expanded")) { + RETURN_BOOL(GTK_CTREE_ROW(node)->expanded); + } else if (!strcmp(prop_name, "row")) { + *return_value = *php_gtk_clist_row_new(>K_CTREE_ROW(node)->row); + return; + } + + *result = FAILURE; +} + + +/* GtkAccelGroup */ +PHP_FUNCTION(gtkaccelgroup) +{ + GtkAccelGroup *accel_group; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) { + php_gtk_invalidate(this_ptr); + return; + } + + accel_group = gtk_accel_group_new(); + php_gtk_set_object(this_ptr, accel_group, le_gtk_accel_group); +} + +PHP_FUNCTION(gtk_accel_group_lock) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gtk_accel_group_lock(PHP_GTK_ACCEL_GROUP_GET(this_ptr)); +} + +PHP_FUNCTION(gtk_accel_group_unlock) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gtk_accel_group_unlock(PHP_GTK_ACCEL_GROUP_GET(this_ptr)); +} + +static function_entry php_gtk_accel_group_functions[] = { + {"gtkaccelgroup", PHP_FN(gtkaccelgroup), NULL}, + {"lock", PHP_FN(gtk_accel_group_lock), NULL}, + {"unlock", PHP_FN(gtk_accel_group_unlock), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_accel_group_new(GtkAccelGroup *group) +{ + zval *result; + zval **wrapper_ptr; + + if (!group) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)group, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_accel_group_ce); + gtk_accel_group_ref(group); + php_gtk_set_object(result, group, le_gtk_accel_group); + + return result; +} + +static void release_gtk_accel_group_rsrc(zend_rsrc_list_entry *rsrc) +{ + GtkAccelGroup *obj = (GtkAccelGroup *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gtk_accel_group_unref(obj); +} + + +/* GtkStyle */ +PHP_FUNCTION(gtkstyle) +{ + GtkStyle *ret; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + ret = gtk_style_new(); + php_gtk_set_object(this_ptr, ret, le_gtk_style); +} + +PHP_FUNCTION(gtk_style_copy) +{ + GtkStyle *style; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + style = gtk_style_copy(PHP_GTK_STYLE_GET(this_ptr)); + *return_value = *php_gtk_style_new(style); + gtk_style_unref(style); +} + +static function_entry php_gtk_style_functions[] = { + {"gtkstyle", PHP_FN(gtkstyle), NULL}, + {"copy", PHP_FN(gtk_style_copy), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_style_new(GtkStyle *style) +{ + zval *result; + zval **wrapper_ptr; + + if (!style) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)style, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_style_ce); + gtk_style_ref(style); + php_gtk_set_object(result, style, le_gtk_style); + + return result; +} + +static void release_gtk_style_rsrc(zend_rsrc_list_entry *rsrc) +{ + GtkStyle *obj = (GtkStyle *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gtk_style_unref(obj); +} + +typedef enum { + STYLE_COLOR_ARRAY, + STYLE_GC_ARRAY, + STYLE_PIXMAP_ARRAY +} style_array_type; + +static void style_helper_get(zval *result, style_array_type type, gpointer array, zend_llist_element **element) +{ + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + if (prop_index < 0 || prop_index >= 5) { + php_error(E_WARNING, "style index out of range"); + return; + } + + switch (type) { + case STYLE_COLOR_ARRAY: + { + GdkColor *color_array = (GdkColor *)array; + *result = *php_gdk_color_new(&color_array[prop_index]); + } + return; + + case STYLE_GC_ARRAY: + { + GdkGC **gc_array = (GdkGC **)array; + *result = *php_gdk_gc_new(gc_array[prop_index]); + } + return; + + case STYLE_PIXMAP_ARRAY: + { + GdkWindow **pixmap_array = (GdkPixmap **)array; + if (pixmap_array[prop_index]) + *result = *php_gdk_pixmap_new(pixmap_array[prop_index]); + } + return; + + default: + g_assert_not_reached(); + break; + } + } + } else { + int i; + + array_init(result); + switch (type) { + case STYLE_COLOR_ARRAY: + { + GdkColor *color_array = (GdkColor *)array; + for (i = 0; i < 5; i++) + add_next_index_zval(result, php_gdk_color_new(&color_array[i])); + } + break; + + case STYLE_GC_ARRAY: + { + GdkGC **gc_array = (GdkGC **)array; + for (i = 0; i < 5; i++) + add_next_index_zval(result, php_gdk_gc_new(gc_array[i])); + } + break; + + case STYLE_PIXMAP_ARRAY: + { + GdkWindow **pixmap_array = (GdkWindow **)array; + for (i = 0; i < 5; i++) + add_next_index_zval(result, php_gdk_pixmap_new(pixmap_array[i])); + } + break; + + default: + g_assert_not_reached(); + break; + } + } +} + +static void gtk_style_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkStyle *style = PHP_GTK_STYLE_GET(object); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + char *prop_name = Z_STRVAL(property->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "black")) { + *return_value = *php_gdk_color_new(&style->black); + return; + } else if (!strcmp(prop_name, "white")) { + *return_value = *php_gdk_color_new(&style->white); + return; + } else if (!strcmp(prop_name, "font")) { + *return_value = *php_gdk_font_new(style->font); + return; + } else if (!strcmp(prop_name, "black_gc")) { + *return_value = *php_gdk_gc_new(style->black_gc); + return; + } else if (!strcmp(prop_name, "white_gc")) { + *return_value = *php_gdk_gc_new(style->white_gc); + return; + } else if (!strcmp(prop_name, "colormap")) { + if (style->colormap) + *return_value = *php_gdk_colormap_new(style->colormap); + return; + } else if (!strcmp(prop_name, "fg")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->fg, element); + return; + } else if (!strcmp(prop_name, "bg")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->bg, element); + return; + } else if (!strcmp(prop_name, "light")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->light, element); + return; + } else if (!strcmp(prop_name, "dark")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->dark, element); + return; + } else if (!strcmp(prop_name, "mid")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->mid, element); + return; + } else if (!strcmp(prop_name, "text")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->text, element); + return; + } else if (!strcmp(prop_name, "base")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->base, element); + return; + } else if (!strcmp(prop_name, "fg_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->fg_gc, element); + return; + } else if (!strcmp(prop_name, "bg_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->bg_gc, element); + return; + } else if (!strcmp(prop_name, "light_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->light_gc, element); + return; + } else if (!strcmp(prop_name, "dark_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->dark_gc, element); + return; + } else if (!strcmp(prop_name, "mid_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->mid_gc, element); + return; + } else if (!strcmp(prop_name, "text_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->text_gc, element); + return; + } else if (!strcmp(prop_name, "base_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->base_gc, element); + return; + } else if (!strcmp(prop_name, "bg_pixmap")) { + style_helper_get(return_value, STYLE_PIXMAP_ARRAY, style->bg_pixmap, element); + return; + } + + *result = FAILURE; +} + +static int style_helper_set(style_array_type type, gpointer array, zval *value, zend_llist_element **element) +{ + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + int prop_index; + + if (next) { + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + if (prop_index < 0 || prop_index >= 5) { + php_error(E_WARNING, "style index out of range"); + return PG_ERROR; + } + + switch (type) { + case STYLE_COLOR_ARRAY: + { + GdkColor *color_array = (GdkColor *)array; + if (!php_gtk_check_class(value, gdk_color_ce)) { + php_error(E_WARNING, "can only assign a GdkColor"); + return PG_ERROR; + } + color_array[prop_index] = *PHP_GDK_COLOR_GET(value); + } + break; + + case STYLE_GC_ARRAY: + { + GdkGC **gc_array = (GdkGC **)array; + if (!php_gtk_check_class(value, gdk_gc_ce)) { + php_error(E_WARNING, "can only assign a GdkGC"); + return PG_ERROR; + } + if (gc_array[prop_index]) + gdk_gc_unref(gc_array[prop_index]); + gc_array[prop_index] = gdk_gc_ref(PHP_GDK_GC_GET(value)); + } + break; + + case STYLE_PIXMAP_ARRAY: + { + GdkWindow **pixmap_array = (GdkWindow **)array; + if (!php_gtk_check_class(value, gdk_window_ce) && Z_TYPE_P(value) != IS_NULL) { + php_error(E_WARNING, "can only assign a GdkPixmap or null"); + return PG_ERROR; + } + if (pixmap_array[prop_index]) + gdk_pixmap_unref(pixmap_array[prop_index]); + if (Z_TYPE_P(value) != IS_NULL) + pixmap_array[prop_index] = gdk_pixmap_ref(PHP_GDK_WINDOW_GET(value)); + else + pixmap_array[prop_index] = NULL; + } + break; + + default: + g_assert_not_reached(); + break; + } + } else { + php_error(E_WARNING, "property '%s' cannot be indexed by strings", prop_name); + return PG_ERROR; + } + } else { + php_error(E_WARNING, "cannot assign directly to '%s'", prop_name); + return PG_ERROR; + } + + return SUCCESS; +} + +static int gtk_style_set_property(zval *object, zend_llist_element **element, zval *value) +{ + GtkStyle *style = PHP_GTK_STYLE_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + if (!strcmp(prop_name, "font")) { + if (php_gtk_check_class(value, gdk_font_ce)) { + if (style->font) + gdk_font_unref(style->font); + style->font = gdk_font_ref(PHP_GDK_FONT_GET(value)); + } else { + php_error(E_WARNING, "'%s' property should be a GdkFont", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "black")) { + if (php_gtk_check_class(value, gdk_color_ce)) + style->black = *PHP_GDK_COLOR_GET(value); + else { + php_error(E_WARNING, "'%s' property should be a GdkColor", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "white")) { + if (php_gtk_check_class(value, gdk_color_ce)) + style->white = *PHP_GDK_COLOR_GET(value); + else { + php_error(E_WARNING, "'%s' property should be a GdkColor", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "black_gc")) { + if (php_gtk_check_class(value, gdk_gc_ce)) { + if (style->black_gc) + gdk_gc_unref(style->black_gc); + style->black_gc = gdk_gc_ref(PHP_GDK_GC_GET(value)); + } else { + php_error(E_WARNING, "'%s' property should be a GdkGC", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "white_gc")) { + if (php_gtk_check_class(value, gdk_gc_ce)) { + if (style->white_gc) + gdk_gc_unref(style->white_gc); + style->white_gc = gdk_gc_ref(PHP_GDK_GC_GET(value)); + } else { + php_error(E_WARNING, "'%s' property should be a GdkGC", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "colormap")) { + if (php_gtk_check_class(value, gdk_colormap_ce)) { + if (style->colormap) + gdk_colormap_unref(style->colormap); + style->colormap = gdk_colormap_ref(PHP_GDK_COLORMAP_GET(value)); + } else { + php_error(E_WARNING, "'%s' property should be a GdkColormap", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "fg")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->fg, value, element); + } else if (!strcmp(prop_name, "bg")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->bg, value, element); + } else if (!strcmp(prop_name, "light")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->light, value, element); + } else if (!strcmp(prop_name, "dark")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->dark, value, element); + } else if (!strcmp(prop_name, "mid")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->mid, value, element); + } else if (!strcmp(prop_name, "text")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->text, value, element); + } else if (!strcmp(prop_name, "base")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->base, value, element); + } else if (!strcmp(prop_name, "fg_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->fg_gc, value, element); + } else if (!strcmp(prop_name, "bg_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->bg_gc, value, element); + } else if (!strcmp(prop_name, "light_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->light_gc, value, element); + } else if (!strcmp(prop_name, "dark_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->dark_gc, value, element); + } else if (!strcmp(prop_name, "mid_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->mid_gc, value, element); + } else if (!strcmp(prop_name, "text_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->text_gc, value, element); + } else if (!strcmp(prop_name, "base_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->base_gc, value, element); + } else if (!strcmp(prop_name, "bg_pixmap")) { + return style_helper_set(STYLE_PIXMAP_ARRAY, style->bg_pixmap, value, element); + } else { + return FAILURE; + } + + return SUCCESS; +} + + +/* GtkBoxChild */ +static function_entry php_gtk_box_child_functions[] = { + {"gtkboxchild", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_box_child_new(GtkBoxChild *box_child) +{ + zval *result; + zval **wrapper_ptr; + + if (!box_child) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)box_child, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_box_child_ce); + php_gtk_set_object(result, box_child, le_php_gtk_wrapper); + + return result; +} + +static void gtk_box_child_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkBoxChild *box_child = PHP_GTK_GET_GENERIC(object, GtkBoxChild*, le_php_gtk_wrapper); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + char *prop_name = Z_STRVAL(property->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "widget")) { + *return_value = *php_gtk_new((GtkObject *)box_child->widget); + return; + } else if (!strcmp(prop_name, "padding")) { + RETURN_LONG(box_child->padding); + } else if (!strcmp(prop_name, "expand")) { + RETURN_BOOL(box_child->expand); + } else if (!strcmp(prop_name, "fill")) { + RETURN_BOOL(box_child->fill); + } else if (!strcmp(prop_name, "pack")) { + RETURN_BOOL(box_child->pack); + } + + *result = FAILURE; +} + + +/* GtkFixedChild */ +static function_entry php_gtk_fixed_child_functions[] = { + {"gtkfixedchild", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_fixed_child_new(GtkFixedChild *fixed_child) +{ + zval *result; + zval **wrapper_ptr; + + if (!fixed_child) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)fixed_child, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_fixed_child_ce); + php_gtk_set_object(result, fixed_child, le_php_gtk_wrapper); + + return result; +} + +static void gtk_fixed_child_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkFixedChild *fixed_child = PHP_GTK_GET_GENERIC(object, GtkFixedChild*, le_php_gtk_wrapper); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + char *prop_name = Z_STRVAL(property->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "widget")) { + *return_value = *php_gtk_new((GtkObject *)fixed_child->widget); + return; + } else if (!strcmp(prop_name, "x")) { + RETURN_LONG(fixed_child->x); + } else if (!strcmp(prop_name, "y")) { + RETURN_LONG(fixed_child->y); + } + + *result = FAILURE; +} + + +/* GtkCListRow */ +static function_entry php_gtk_clist_row_functions[] = { + {"gtkclistrow", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_clist_row_new(GtkCListRow *clist_row) +{ + zval *result; + zval **wrapper_ptr; + + if (!clist_row) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)clist_row, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_clist_row_ce); + php_gtk_set_object(result, clist_row, le_php_gtk_wrapper); + + return result; +} + +static void gtk_clist_row_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkCListRow *clist_row = PHP_GTK_GET_GENERIC(object, GtkCListRow*, le_php_gtk_wrapper); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + char *prop_name = Z_STRVAL(property->element); + + *result = SUCCESS; + + /* TODO add 'data' and 'cell' here */ + if (!strcmp(prop_name, "state")) { + RETURN_LONG(clist_row->state); + } else if (!strcmp(prop_name, "foreground")) { + *return_value = *php_gdk_color_new(&clist_row->foreground); + return; + } else if (!strcmp(prop_name, "background")) { + *return_value = *php_gdk_color_new(&clist_row->background); + return; + } else if (!strcmp(prop_name, "style")) { + *return_value = *php_gtk_style_new(clist_row->style); + return; + } else if (!strcmp(prop_name, "fg_set")) { + RETURN_BOOL(clist_row->fg_set); + } else if (!strcmp(prop_name, "bg_set")) { + RETURN_BOOL(clist_row->bg_set); + } else if (!strcmp(prop_name, "selectable")) { + RETURN_BOOL(clist_row->selectable); + } + + *result = FAILURE; +} + + +void php_gtk_plus_register_types(int module_number) +{ + zend_class_entry ce; + + le_php_gtk_wrapper = zend_register_list_destructors_ex(NULL, NULL, "Generic PHP-GTK wrapper", module_number); + le_gdk_window = zend_register_list_destructors_ex(release_gdk_window_rsrc, NULL, "GdkWindow", module_number); + le_gdk_bitmap = zend_register_list_destructors_ex(release_gdk_bitmap_rsrc, NULL, "GdkBitmap", module_number); + le_gdk_color = zend_register_list_destructors_ex(release_gdk_color_rsrc, NULL, "GdkColor", module_number); + le_gdk_colormap = zend_register_list_destructors_ex(release_gdk_colormap_rsrc, NULL, "GdkColormap", module_number); + le_gdk_cursor = zend_register_list_destructors_ex(release_gdk_cursor_rsrc, NULL, "GdkCursor", module_number); + le_gdk_visual = zend_register_list_destructors_ex(release_gdk_visual_rsrc, NULL, "GdkVisual", module_number); + le_gdk_font = zend_register_list_destructors_ex(release_gdk_font_rsrc, NULL, "GdkFont", module_number); + le_gdk_gc = zend_register_list_destructors_ex(release_gdk_gc_rsrc, NULL, "GdkGC", module_number); + le_gdk_drag_context = zend_register_list_destructors_ex(release_gdk_drag_context_rsrc, NULL, "GdkDragContext", module_number); + le_gtk_accel_group = zend_register_list_destructors_ex(release_gtk_accel_group_rsrc, NULL, "GtkAccelGroup", module_number); + le_gtk_style = zend_register_list_destructors_ex(release_gtk_style_rsrc, NULL, "GtkStyle", module_number); + + INIT_CLASS_ENTRY(ce, "gdkevent", php_gdk_event_functions); + gdk_event_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkwindow", php_gdk_window_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_window_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkpixmap", php_gdk_pixmap_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_pixmap_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkbitmap", php_gdk_window_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_bitmap_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_window_ce, gdk_window_get_property); + php_gtk_register_prop_getter(gdk_pixmap_ce, gdk_window_get_property); + php_gtk_register_prop_getter(gdk_bitmap_ce, gdk_window_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkcolor", php_gdk_color_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_color_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_color_ce, gdk_color_get_property); + php_gtk_register_prop_setter(gdk_color_ce, gdk_color_set_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkcolormap", php_gdk_colormap_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_colormap_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_colormap_ce, gdk_colormap_get_property); + + INIT_CLASS_ENTRY(ce, "gdkatom", php_gdk_atom_functions); + gdk_atom_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkcursor", php_gdk_cursor_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_cursor_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_cursor_ce, gdk_cursor_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkvisual", php_gdk_visual_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_visual_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_visual_ce, gdk_visual_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkfont", php_gdk_font_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_font_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_font_ce, gdk_font_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkgc", php_gdk_gc_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_gc_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_gc_ce, gdk_gc_get_property); + php_gtk_register_prop_setter(gdk_gc_ce, gdk_gc_set_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkdragcontext", php_gdk_drag_context_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_drag_context_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_drag_context_ce, gdk_drag_context_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkselectiondata", php_gtk_selection_data_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_selection_data_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_selection_data_ce, gtk_selection_data_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkctreenode", php_gtk_ctree_node_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_ctree_node_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_ctree_node_ce, gtk_ctree_node_get_property); + + INIT_CLASS_ENTRY(ce, "gtkaccelgroup", php_gtk_accel_group_functions); + gtk_accel_group_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkstyle", php_gtk_style_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_style_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_style_ce, gtk_style_get_property); + php_gtk_register_prop_setter(gtk_style_ce, gtk_style_set_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkboxchild", NULL, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_box_child_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_box_child_ce, gtk_box_child_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkfixedchild", NULL, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_fixed_child_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_fixed_child_ce, gtk_fixed_child_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkclistrow", NULL, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_clist_row_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_clist_row_ce, gtk_clist_row_get_property); +} + +#endif Index: php-gtk/ext/libglade/.cvsignore diff -u /dev/null php-gtk/ext/libglade/.cvsignore:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/.cvsignore Tue Jul 10 14:27:51 2001 @@ -0,0 +1,7 @@ +.deps +Makefile +*.lo +*.la +.libs +libs.mk +gen_* Index: php-gtk/ext/libglade/Makefile.in diff -u /dev/null php-gtk/ext/libglade/Makefile.in:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/Makefile.in Tue Jul 10 14:27:51 2001 @@ -0,0 +1,16 @@ +LTLIBRARY_NAME = liblibglade.la +LTLIBRARY_SOURCES = php_libglade.c gen_libglade.c +LTLIBRARY_LIBADD = $(LIBGLADE_SHARED_LIBADD) +LTLIBRARY_SHARED_NAME = libglade.la +LTLIBRARY_SHARED_LIBADD = $(LIBGLADE_SHARED_LIBADD) + +include $(top_srcdir)/build/dynlib.mk + +php_libglade.o php_libglade.lo php_libglade.slo: gen_ce_libglade.h + +gen_libglade.c: libglade.defs libglade.overrides + php -q $(top_srcdir)/generator/generator.php -o $(srcdir)/libglade.overrides -p libglade -r $(top_srcdir)/ext/gtk%2b/gtk.defs $(srcdir)/libglade.defs > gen_libglade.c + +gen_ce_libglade.h: gen_libglade.c + grep -h "^PHP_GTK_EXPORT_CE" gen_libglade.c | sed -e "s!^!extern !" > gen_ce_libglade.h + Index: php-gtk/ext/libglade/config.m4 diff -u /dev/null php-gtk/ext/libglade/config.m4:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/config.m4 Tue Jul 10 14:27:51 2001 @@ -0,0 +1,63 @@ +dnl $Id: config.m4,v 1.2 2001/07/10 18:27:51 andrei Exp $ +dnl config.m4 for libglade module + +dnl PHP_PATH_LIBGLADE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]) +dnl Test to see if libglade is installed, and define LIBGLADE_CFLAGS, LIBS +dnl +AC_DEFUN(PHP_PATH_LIBGLADE, +[dnl +dnl Get the cflags and libraries from the libglade-config script +dnl +AC_ARG_WITH(libglade-config, +[ --with-libglade-config=LIBGLADE_CONFIG Location of libglade-config], +LIBGLADE_CONFIG="$withval") + +module_args= +for module in . $3; do + case "$module" in + gnome) + module_args="$module_args gnome" + ;; + bonobo) + module_args="$module_args bonobo" + ;; + esac +done + +AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no) +AC_MSG_CHECKING(for libglade) +if test "$LIBGLADE_CONFIG" = "no"; then + AC_MSG_RESULT(no) + ifelse([$2], , :, [$2]) +else + if $LIBGLADE_CONFIG --check $module_args; then + LIBGLADE_CFLAGS=`$LIBGLADE_CONFIG --cflags $module_args` + LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs $module_args` + AC_MSG_RESULT(yes) + ifelse([$1], , :, [$1]) + else + echo "*** libglade was not compiled with support for $module_args" 1>&2 + AC_MSG_RESULT(no) + ifelse([$2], , :, [$2]) + fi +fi +AC_SUBST(LIBGLADE_CFLAGS) +AC_SUBST(LIBGLADE_LIBS) +]) + +PHP_GTK_ARG_ENABLE(libglade,for libglade support, +[ --disable-libglade Enable libglade support],yes) + +if test "$PHP_GTK_LIBGLADE" != "no"; then + PHP_PATH_LIBGLADE(have_libglade=yes,have_libglade=no) + AC_DEFINE(HAVE_LIBGLADE,1,[libglade support]) + if test "$have_libglade" != "yes"; then + AC_MSG_ERROR(Unable to locate libglade) + else + PHP_EVAL_INCLINE($LIBGLADE_CFLAGS) + PHP_EVAL_LIBLINE($LIBGLADE_LIBS, LIBGLADE_SHARED_LIBADD) + PHP_SUBST(LIBGLADE_SHARED_LIBADD) + PHP_SUBST(LIBGLADE_GEN_SOURCES) + PHP_GTK_EXTENSION(libglade) + fi +fi Index: php-gtk/ext/libglade/libglade.defs diff -u /dev/null php-gtk/ext/libglade/libglade.defs:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/libglade.defs Tue Jul 10 14:27:51 2001 @@ -0,0 +1,138 @@ +;; -*- scheme -*- +; object definitions ... +(object XML + (in-module Glade) + (parent Data (Gtk)) + (c-name GladeXML) +) + +;; Enumerations and flags ... + + +;; From /usr/include/glade/glade-xml.h + +(function glade_xml_get_type + (c-name glade_xml_get_type) + (return-type GtkType) +) + +(function glade_xml_new + (c-name glade_xml_new) + (return-type GladeXML*) + (parameter (type-and-name const-char* fname)) + (parameter (type-and-name const-char* root) (null-ok) (default "NULL")) +) + +(function glade_xml_new_with_domain + (c-name glade_xml_new_with_domain) + (is-constructor-of GladeXML) + (return-type GladeXML*) + (parameter (type-and-name const-char* fname)) + (parameter (type-and-name const-char* root) (null-ok) (default "NULL")) + (parameter (type-and-name const-char* domain) (null-ok) (default "NULL")) +) + +(function xml_new_from_memory + (c-name glade_xml_new_from_memory) + (return-type GladeXML*) + (parameter (type-and-name char* buffer)) + (parameter (type-and-name int size)) + (parameter (type-and-name const-char* root) (null-ok)) + (parameter (type-and-name const-char* domain) (null-ok)) +) + +(method construct + (of-object XML (Glade)) + (c-name glade_xml_construct) + (return-type gboolean) + (parameter (type-and-name const-char* fname)) + (parameter (type-and-name const-char* root)) + (parameter (type-and-name const-char* domain)) +) + +(method signal_connect + (of-object XML (Glade)) + (c-name glade_xml_signal_connect) + (return-type none) + (parameter (type-and-name const-char* handlername)) + (parameter (type-and-name GtkSignalFunc func)) +) + +(method signal_connect_data + (of-object XML (Glade)) + (c-name glade_xml_signal_connect_data) + (return-type none) + (parameter (type-and-name const-char* handlername)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer user_data)) +) + +(method signal_autoconnect + (of-object XML (Glade)) + (c-name glade_xml_signal_autoconnect) + (return-type none) +) + +(method signal_connect_full + (of-object XML (Glade)) + (c-name glade_xml_signal_connect_full) + (return-type none) + (parameter (type-and-name const-gchar* handler_name)) + (parameter (type-and-name GladeXMLConnectFunc func)) + (parameter (type-and-name gpointer user_data)) +) + +(method signal_autoconnect_full + (of-object XML (Glade)) + (c-name glade_xml_signal_autoconnect_full) + (return-type none) + (parameter (type-and-name GladeXMLConnectFunc func)) + (parameter (type-and-name gpointer user_data)) +) + +(method get_widget + (of-object XML (Glade)) + (c-name glade_xml_get_widget) + (return-type GtkWidget*) + (parameter (type-and-name const-char* name)) +) + +(method get_widget_prefix + (of-object XML (Glade)) + (c-name glade_xml_get_widget_prefix) + (return-type GList*) + (parameter (type-and-name const-char* name)) +) + +(method get_widget_by_long_name + (of-object XML (Glade)) + (c-name glade_xml_get_widget_by_long_name) + (return-type GtkWidget*) + (parameter (type-and-name const-char* longname)) +) + +(method relative_file + (of-object XML (Glade)) + (c-name glade_xml_relative_file) + (return-type gchar*) + (parameter (type-and-name const-gchar* filename)) +) + +(function get_widget_name + (c-name glade_get_widget_name) + (return-type const-gchar*) + (parameter (type-and-name GtkWidget* widget)) +) + +(function get_widget_long_name + (c-name glade_get_widget_long_name) + (return-type const-gchar*) + (parameter (type-and-name GtkWidget* widget)) +) + +(function get_widget_tree + (c-name glade_get_widget_tree) + (return-type GladeXML*) + (parameter (type-and-name GtkWidget* widget)) +) + Index: php-gtk/ext/libglade/libglade.overrides diff -u /dev/null php-gtk/ext/libglade/libglade.overrides:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/libglade.overrides Tue Jul 10 14:27:51 2001 @@ -0,0 +1,147 @@ +/* vim: set ft=cpp: */ +%% +headers +#include <glade/glade.h> +#include "ext/gtk+/php_gtk+.h" +%% +ignore-glob + *_get_type +%% +ignore + glade_xml_new + glade_xml_signal_connect_full + glade_xml_signal_connect_data + glade_xml_signal_autoconnect_full +%% +override glade_xml_signal_connect +static void glade_connect_one(const gchar *handler_name, GtkObject *obj, const + gchar *signal_name, const gchar *signal_data, + GtkObject *connect_object, gboolean after, + zval *callback_data) +{ + zval **callback = NULL, **extra = NULL, **pass_object = NULL; + zval **callback_filename = NULL, **callback_lineno = NULL; + zval *object; + + zend_hash_index_find(Z_ARRVAL_P(callback_data), 0, (void **)&callback); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 1, (void **)&extra); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 2, (void **)&pass_object); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 3, (void **)&callback_filename); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 4, (void **)&callback_lineno); + + if (connect_object) { + zval *temp; + + Z_LVAL_PP(pass_object) = 0; + object = php_gtk_new(connect_object); + MAKE_STD_ZVAL(temp); + array_init(temp); + add_next_index_zval(temp, object); + php_array_merge(Z_ARRVAL_P(temp), Z_ARRVAL_PP(extra), 0); + REPLACE_ZVAL_VALUE(extra, temp, 0); + } + + gtk_signal_connect_full(obj, signal_name, NULL, + (GtkCallbackMarshal)php_gtk_callback_marshal, + callback_data, php_gtk_destroy_notify, FALSE, after); +} + +PHP_FUNCTION(wrap_glade_xml_signal_connect) +{ + char *handler_name = NULL; + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (ZEND_NUM_ARGS() < 2) { + php_error(E_WARNING, "%s() requires at least 2 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(2, "sV", &handler_name, &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNisi)", callback, extra, 1, callback_filename, callback_lineno); + glade_xml_signal_connect_full(GLADE_XML(PHP_GTK_GET(this_ptr)), handler_name, + (GladeXMLConnectFunc)glade_connect_one, data); + RETURN_NULL(); +} +%% +override glade_xml_signal_autoconnect +static void glade_connect_auto(const gchar *handler_name, GtkObject *obj, + const gchar *signal_name, const gchar *signal_data, + GtkObject *connect_object, gboolean after, + zval *map) +{ + zval **callback_data = NULL; + zval **callback_ptr = NULL, *extra = NULL, *params = NULL; + zval *callback, *data, *object = NULL; + int pass_object = 1; + char *callback_filename; + uint callback_lineno; + ELS_FETCH(); + + if (map && zend_hash_find(Z_ARRVAL_P(map), (char *)handler_name, strlen(handler_name) + 1, (void **)&callback_data) == SUCCESS) { + if (Z_TYPE_PP(callback_data) != IS_ARRAY || + zend_hash_index_find(Z_ARRVAL_PP(callback_data), 0, (void **)&callback_ptr) == FAILURE) { + php_error(E_WARNING, "%s() is supplied with invalid callback structure for handler '%s'", get_active_function_name(), handler_name); + return; + } + zval_add_ref(callback_ptr); + callback = *callback_ptr; + zend_hash_index_del(Z_ARRVAL_PP(callback_data), 0); + extra = *callback_data; + } else { + MAKE_STD_ZVAL(callback); + ZVAL_STRING(callback, (char *)handler_name, 1); + } + + if (!zend_is_callable(callback, 0, NULL)) { + php_error(E_WARNING, "%s() is unable to autoconnect callback for handler '%s'", + get_active_function_name(), handler_name); + return; + } + + MAKE_STD_ZVAL(params); + array_init(params); + + if (connect_object) { + zval *temp; + + pass_object = 0; + object = php_gtk_new(connect_object); + add_next_index_zval(params, object); + } + + if (extra) + php_array_merge(Z_ARRVAL_P(params), Z_ARRVAL_P(extra), 0); + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + data = php_gtk_build_value("(NNisi)", callback, params, pass_object, + callback_filename, callback_lineno); + gtk_signal_connect_full(obj, signal_name, NULL, + (GtkCallbackMarshal)php_gtk_callback_marshal, + data, php_gtk_destroy_notify, FALSE, after); +} + +PHP_FUNCTION(wrap_glade_xml_signal_autoconnect) +{ + zval *map = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|a", &map)) + return; + + glade_xml_signal_autoconnect_full(GLADE_XML(PHP_GTK_GET(this_ptr)), + (GladeXMLConnectFunc)glade_connect_auto, map); +} Index: php-gtk/ext/libglade/php_libglade.c diff -u /dev/null php-gtk/ext/libglade/php_libglade.c:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/php_libglade.c Tue Jul 10 14:27:51 2001 @@ -0,0 +1,40 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_libglade.c,v 1.2 2001/07/10 18:27:51 andrei Exp $: */ + +#include "php_gtk.h" + +#if HAVE_LIBGLADE + +PHP_GTK_XINIT_FUNCTION(libglade) +{ + glade_init(); + php_libglade_register_constants(); + php_libglade_register_classes(); +} + +php_gtk_ext_entry libglade_ext_entry = { + "libglade", + PHP_GTK_XINIT(libglade), + NULL, +}; + +#endif /* HAVE_LIBGLADE */ Index: php-gtk/ext/libglade/php_libglade.h diff -u /dev/null php-gtk/ext/libglade/php_libglade.h:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/php_libglade.h Tue Jul 10 14:27:51 2001 @@ -0,0 +1,41 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_libglade.h,v 1.2 2001/07/10 18:27:51 andrei Exp $: */ + +#ifndef PHP_LIBGLADE_H +#define PHP_LIBGLADE_H + +#include "php_gtk.h" + +#if HAVE_LIBGLADE + +extern php_gtk_ext_entry libglade_ext_entry; +#define libglade_ext_ptr &libglade_ext_entry + +#else + +#define libglade_ext_ptr NULL + +#endif /* HAVE_LIBGLADE */ + +#define php_gtk_ext_libglade_ptr libglade_ext_ptr + +#endif /* PHP_LIBGLADE_H */ Index: php-gtk/generator/generator.php diff -u php-gtk/generator/generator.php:1.22 php-gtk/generator/generator.php:1.23 --- php-gtk/generator/generator.php:1.22 Sat May 19 21:03:35 2001 +++ php-gtk/generator/generator.php Tue Jul 10 14:27:51 2001 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: generator.php,v 1.22 2001/05/20 01:03:35 andrei Exp $ */ +/* $Id: generator.php,v 1.23 2001/07/10 18:27:51 andrei Exp $ */ /* * Significant portions of this generator are based on the pygtk code generator @@ -491,7 +491,7 @@ { global $register_classes_tpl; - $fp = fopen('../src/php_gtk_gen_' . $this->prefix . '.c', 'w'); + $fp = fopen('php://stdout', 'w'); fwrite($fp, "#include \"php_gtk.h\""); fwrite($fp, "\n#if HAVE_PHP_GTK\n"); fwrite($fp, $this->overrides->get_headers()); @@ -510,11 +510,17 @@ $argc = $HTTP_SERVER_VARS['argc']; $argv = $HTTP_SERVER_VARS['argv']; +/* An ugly hack to counteract PHP's pernicious desire to treat + as an argument + separator in command-line version. */ +array_walk($argv, create_function('&$x', '$x = urldecode($x);')); + $result = Console_Getopt::getopt($argv, 'o:p:r:'); if (!$result || count($result[1]) < 2) die("usage: php -q generator.php [-o overridesfile] [-p prefix] [-r typesfile] defsfile\n"); list($opts, $argv) = $result; + +chdir('..'); $prefix = 'gtk'; $overrides = new Overrides(); Index: php-gtk/generator/scheme.php diff -u php-gtk/generator/scheme.php:1.6 php-gtk/generator/scheme.php:1.7 --- php-gtk/generator/scheme.php:1.6 Tue Mar 13 00:38:42 2001 +++ php-gtk/generator/scheme.php Tue Jul 10 14:27:51 2001 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: scheme.php,v 1.6 2001/03/13 05:38:42 andrei Exp $ */ +/* $Id: scheme.php,v 1.7 2001/07/10 18:27:51 andrei Exp $ */ require "definitions.php"; @@ -80,7 +80,7 @@ { switch (gettype($arg)) { case 'string': - print("Parsing file \"$arg\".\n"); + error_log("Parsing file \"$arg\"."); $this->file_name = $arg; $this->file_path = dirname($this->file_name); $this->parse_tree = parse(fopen($arg, 'r')); @@ -162,7 +162,7 @@ function handle_include($arg) { $include_file = $this->file_path . "/" . $arg[0]; - print("Parsing file \"$include_file\".\n"); + error_log("Parsing file \"$include_file\"."); $include_tree = parse(fopen($include_file, 'r')); $this->start_parsing($include_tree); } Index: php-gtk/generator/templates.php diff -u php-gtk/generator/templates.php:1.11 php-gtk/generator/templates.php:1.12 --- php-gtk/generator/templates.php:1.11 Wed May 2 14:29:08 2001 +++ php-gtk/generator/templates.php Tue Jul 10 14:27:51 2001 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: templates.php,v 1.11 2001/05/02 18:29:08 andrei Exp $ */ +/* $Id: templates.php,v 1.12 2001/07/10 18:27:51 andrei Exp $ */ $function_tpl = " PHP_FUNCTION(wrap_%s) @@ -111,6 +111,6 @@ $register_class_tpl = "\t%s = zend_register_internal_class_ex(&ce, %s, NULL);\n"; -$class_entry_tpl = "zend_class_entry *%s;\n"; +$class_entry_tpl = "PHP_GTK_EXPORT_CE(%s)\n"; ?> Index: php-gtk/src/php_gtk_ext.c.in diff -u /dev/null php-gtk/src/php_gtk_ext.c.in:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/src/php_gtk_ext.c.in Tue Jul 10 14:27:51 2001 @@ -0,0 +1,41 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_gtk_ext.c.in,v 1.2 2001/07/10 18:27:51 andrei Exp $: */ + +#include "php_gtk.h" + +#if HAVE_PHP_GTK + +@EXT_INCLUDE_CODE@ + +php_gtk_ext_entry *php_gtk_extensions[] = { +@EXT_PTRS@ +}; + +#define EXTCOUNT (sizeof(php_gtk_extensions)/sizeof(php_gtk_ext_entry *)) + + +int php_gtk_startup_all_extensions(int module_number) +{ + return php_gtk_startup_extensions(php_gtk_extensions, EXTCOUNT, module_number); +} + +#endif /* HAVE_PHP_GTK */ Index: php-gtk/src/.cvsignore diff -u php-gtk/src/.cvsignore:1.4 php-gtk/src/.cvsignore:1.5 --- php-gtk/src/.cvsignore:1.4 Tue Mar 13 12:59:27 2001 +++ php-gtk/src/.cvsignore Tue Jul 10 14:27:51 2001 @@ -38,4 +38,4 @@ want_dependencies .deps config.nice -php_gtk_gen* +php_gtk_ext.c Index: php-gtk/src/Makefile.in diff -u php-gtk/src/Makefile.in:1.4 php-gtk/src/Makefile.in:1.5 --- php-gtk/src/Makefile.in:1.4 Tue Mar 13 08:59:52 2001 +++ php-gtk/src/Makefile.in Tue Jul 10 14:27:51 2001 @@ -1,21 +1,8 @@ -LTLIBRARY_NAME = libphp_gtk_src.la -LTLIBRARY_SOURCES = php_gtk.c php_gtk_object.c php_gtk_types.c php_gtk_util.c $(PHP_GTK_GEN_SOURCES) +LTLIBRARY_NAME = libmain.la +LTLIBRARY_SOURCES = php_gtk.c php_gtk_object.c php_gtk_util.c php_gtk_ext.c -include $(top_srcdir)/build/dynlib.mk +include $(top_srcdir)/build/ltlib.mk -php_gtk.o php_gtk.lo php_gtk.slo: php_gtk_gen_reg_items.h php_gtk_gen_ce.h - -php_gtk_gen_ce.h: $(PHP_GTK_GEN_SOURCES) - grep -h "^zend_class_entry" $(PHP_GTK_GEN_SOURCES) | sed -e "s!^!extern !" > $(srcdir)/php_gtk_gen_ce.h - -php_gtk_gen_reg_items.h: - php -q $(top_srcdir)/generator/make_reg_items.php $(PHP_GTK_MODULES) - -php_gtk_gen_gtk.c: $(top_srcdir)/generator/gtk.defs $(top_srcdir)/generator/gtk-extrafuncs.defs $(top_srcdir)/generator/gtk.overrides - php -q $(top_srcdir)/generator/generator.php -o gtk.overrides -p gtk gtk.defs - -php_gtk_gen_gdk.c: $(top_srcdir)/generator/gdk.defs $(top_srcdir)/generator/gdk.overrides - php -q $(top_srcdir)/generator/generator.php -o gdk.overrides -p gdk gdk.defs - -php_gtk_gen_libglade.c: $(top_srcdir)/generator/libglade.defs $(top_srcdir)/generator/libglade.overrides - php -q $(top_srcdir)/generator/generator.php -o libglade.overrides -p libglade -r gtk.defs libglade.defs +php_gtk_ext.c: php_gtk_ext.c.in $(top_builddir)/config.status + @echo "creating main/php_gtk_ext.c" + sh $(top_srcdir)/build2/genext.sh $(srcdir)/php_gtk_ext.c.in $(top_srcdir) "" $(AWK) $(PHP_GTK_EXTENSIONS) > $(srcdir)/php_gtk_ext.c Index: php-gtk/src/php_gtk.c diff -u php-gtk/src/php_gtk.c:1.12 php-gtk/src/php_gtk.c:1.13 --- php-gtk/src/php_gtk.c:1.12 Thu May 10 14:56:42 2001 +++ php-gtk/src/php_gtk.c Tue Jul 10 14:27:51 2001 @@ -18,13 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk.c,v 1.12 2001/05/10 18:56:42 andrei Exp $: */ +/* $Id: php_gtk.c,v 1.13 2001/07/10 18:27:51 andrei Exp $: */ #include "php_gtk.h" #include "SAPI.h" #if HAVE_PHP_GTK +HashTable php_gtk_ext_registry; GHashTable *php_gtk_class_hash = NULL; zend_module_entry gtk_module_entry = { @@ -42,124 +43,11 @@ ZEND_GET_MODULE(gtk) #endif - -static void init_gtk(void) -{ - HashTable *symbol_table; - zval **z_argv = NULL, **z_argc = NULL, **entry; - zval *tmp; - char **argv; - int argc, i; - zend_bool no_argc = 0; - PLS_FETCH(); - SLS_FETCH(); - - /* We check request_method to see if we've been called from command line or - Web server. Running GUI apps through a Web module can be dangerous to - your health. */ - if (SG(request_info).request_method != NULL) { - php_error(E_ERROR, "php-gtk: PHP GTK+ support is not available under Web servers"); - return; - } - - /* - * Since track_vars is always on, we just get the argc/argv values from - * there. - */ - symbol_table = PG(http_globals)[TRACK_VARS_SERVER]->value.ht; - - zend_hash_find(symbol_table, "argc", sizeof("argc"), (void **)&z_argc); - zend_hash_find(symbol_table, "argv", sizeof("argv"), (void **)&z_argv); - if (!z_argc || !z_argv || Z_TYPE_PP(z_argc) != IS_LONG || Z_TYPE_PP(z_argv) != IS_ARRAY) { - php_error(E_ERROR, "php-gtk: argc/argv are corrupted"); - } - - argc = Z_LVAL_PP(z_argc); - - /* - * If the script was called via -f switch and no further arguments were - * given, argc will be 0 and that's not good for gtk_init_check(). We use - * the path to the script as the only argument, and remember that we won't - * have to update symbol table after gtk_init_check(). - */ - if (argc == 0) { - argc = 1; - no_argc = 1; - argv = (char **)g_new(char *, argc); - argv[0] = g_strdup(SG(request_info).path_translated); - } else { - argv = (char **)g_new(char *, argc); - i = 0; - for (zend_hash_internal_pointer_reset(Z_ARRVAL_PP(z_argv)); - zend_hash_get_current_data(Z_ARRVAL_PP(z_argv), (void **)&entry) == SUCCESS; - zend_hash_move_forward(Z_ARRVAL_PP(z_argv))) { - argv[i++] = g_strndup(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry)); - } - } - - /* Ok, this is a hack. GTK+/GDK calls g_atexit() to set up a couple of cleanup - functions that should be called when the main program exits. However, if - we're compiled as .so library, libgtk.so will be unloaded first and the - pointers to the cleanup functions will be invalid. So we load libgtk.so - one more time to make sure it stays in memory even after our .so is - unloaded. */ - //DL_LOAD("libgtk.so"); - - if (!gtk_init_check(&argc, &argv)) { - if (argv != NULL) { - for (i = 0; i < argc; i++) - g_free(argv[i]); - g_free(argv); - } - php_error(E_ERROR, "php-gtk: Could not open display"); - return; - } - - /* - We must always call gtk_set_locale() in order to get GTK+/GDK - correctly initialize multilingual support. Otherwise, application - will refuse any letters outside ASCII and font metrics will - be broken. - */ - gtk_set_locale(); - - if (no_argc) { - /* The -f switch case, simple. */ - g_free(argv[0]); - } else { - /* We always clean the argv array. */ - zend_hash_clean(Z_ARRVAL_PP(z_argv)); - - /* Then if there are any arguments left after processing with - gtk_init_check(), we put them back into PHP's argv array and update - argc as well. */ - if (argv != NULL) { - for (i = 0; i < argc; i++) { - ALLOC_ZVAL(tmp); - tmp->type = IS_STRING; - tmp->value.str.len = strlen(argv[i]); - tmp->value.str.val = estrndup(argv[i], tmp->value.str.len); - INIT_PZVAL(tmp); - zend_hash_next_index_insert(Z_ARRVAL_PP(z_argv), &tmp, sizeof(zval *), NULL); - } - g_free(argv); - - Z_LVAL_PP(z_argc) = argc; - } - } -} - /* Remove comments and fill if you need to have entries in php.ini PHP_INI_BEGIN() PHP_INI_END() */ -static void release_gtk_object_rsrc(zend_rsrc_list_entry *rsrc) -{ - GtkObject *obj = (GtkObject *)rsrc->ptr; - gtk_object_unref(obj); -} - PHP_MINIT_FUNCTION(gtk) { // ZEND_INIT_MODULE_GLOBALS(gtk, NULL, NULL); @@ -179,27 +67,32 @@ return SUCCESS; } +static void php_gtk_ext_destructor(php_gtk_ext_entry *ext) +{ + if (ext->ext_started && ext->ext_shutdown_func) + ext->ext_shutdown_func(); + ext->ext_started = 0; +} + /* Remove if there's nothing to do at request start */ PHP_RINIT_FUNCTION(gtk) { - le_gtk = zend_register_list_destructors_ex(release_gtk_object_rsrc, NULL, "GtkObject", module_number); + zend_hash_init_ex(&php_gtk_ext_registry, 10, NULL, (void (*)(void *))php_gtk_ext_destructor, 1, 0); php_gtk_class_hash = g_hash_table_new(g_str_hash, g_str_equal); zend_hash_init_ex(&php_gtk_prop_getters, 20, NULL, NULL, 1, 0); zend_hash_init_ex(&php_gtk_prop_setters, 20, NULL, NULL, 1, 0); zend_hash_init_ex(&php_gtk_rsrc_hash, 50, NULL, NULL, 1, 0); zend_hash_init_ex(&php_gtk_type_hash, 50, NULL, NULL, 1, 0); -#include "src/php_gtk_gen_reg_items.h" - php_gtk_register_types(module_number); - init_gtk(); -#if HAVE_LIBGLADE - glade_init(); -#endif - zend_unset_timeout(); zend_set_timeout(0); + if (php_gtk_startup_all_extensions(module_number) == FAILURE) { + php_error(E_WARNING, "Unable to start extensions"); + return FAILURE; + } + return SUCCESS; } @@ -210,7 +103,8 @@ zend_hash_destroy(&php_gtk_prop_setters); zend_hash_destroy(&php_gtk_rsrc_hash); zend_hash_destroy(&php_gtk_type_hash); - gtk_exit(0); + + zend_hash_destroy(&php_gtk_ext_registry); return SUCCESS; } @@ -236,12 +130,43 @@ php_gtk_invalidate(this_ptr); } +PHP_FUNCTION(wrap_no_direct_constructor) +{ + php_error(E_WARNING, "Class %s cannot be constructed directly", get_active_function_name()); + php_gtk_invalidate(this_ptr); +} -#endif /* HAVE_PHP_GTK */ +static int php_gtk_startup_extension(php_gtk_ext_entry *ext, int module_number) +{ + if (ext) { + if (ext->ext_startup_func) { + if (ext->ext_startup_func(module_number) == FAILURE) { + php_error(E_WARNING, "Unable to start '%s' PHP-GTK extension", ext->name); + return FAILURE; + } + } + ext->ext_started = 1; + zend_hash_add(&php_gtk_ext_registry, ext->name, strlen(ext->name)+1, + (void *)ext, sizeof(php_gtk_ext_entry), NULL); + } -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ + return SUCCESS; +} + +int php_gtk_startup_extensions(php_gtk_ext_entry **ext, int ext_count, int module_number) +{ + php_gtk_ext_entry **end = ext + ext_count; + + while (ext < end) { + if (*ext) { + if (php_gtk_startup_extension(*ext, module_number)==FAILURE) { + return FAILURE; + } + } + ext++; + } + + return SUCCESS; +} + +#endif /* HAVE_PHP_GTK */ Index: php-gtk/src/php_gtk.h diff -u php-gtk/src/php_gtk.h:1.41 php-gtk/src/php_gtk.h:1.42 --- php-gtk/src/php_gtk.h:1.41 Tue May 22 12:40:43 2001 +++ php-gtk/src/php_gtk.h Tue Jul 10 14:27:51 2001 @@ -18,85 +18,45 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk.h,v 1.41 2001/05/22 16:40:43 fmk Exp $: */ +/* $Id: php_gtk.h,v 1.42 2001/07/10 18:27:51 andrei Exp $: */ #ifndef _PHP_GTK_H #define _PHP_GTK_H #include "php_gtk_module.h" -#include "gtk/gtkinvisible.h" #if HAVE_PHP_GTK -#include <gtk/gtk.h> - -extern int le_gtk; -extern int le_php_gtk_wrapper; -extern int le_gdk_window; -extern int le_gdk_bitmap; -extern int le_gdk_color; -extern int le_gdk_colormap; -extern int le_gdk_cursor; -extern int le_gdk_visual; -extern int le_gdk_font; -extern int le_gdk_gc; -extern int le_gdk_drag_context; -extern int le_gtk_accel_group; -extern int le_gtk_style; - -extern zend_class_entry *gdk_event_ce; -extern zend_class_entry *gdk_window_ce; -extern zend_class_entry *gdk_pixmap_ce; -extern zend_class_entry *gdk_bitmap_ce; -extern zend_class_entry *gdk_color_ce; -extern zend_class_entry *gdk_colormap_ce; -extern zend_class_entry *gdk_atom_ce; -extern zend_class_entry *gdk_cursor_ce; -extern zend_class_entry *gdk_visual_ce; -extern zend_class_entry *gdk_font_ce; -extern zend_class_entry *gdk_gc_ce; -extern zend_class_entry *gdk_drag_context_ce; -extern zend_class_entry *gtk_selection_data_ce; -extern zend_class_entry *gtk_ctree_node_ce; -extern zend_class_entry *gtk_accel_group_ce; -extern zend_class_entry *gtk_style_ce; -extern zend_class_entry *gtk_box_child_ce; -extern zend_class_entry *gtk_fixed_child_ce; -extern zend_class_entry *gtk_clist_row_ce; - -/* include generated class entries */ -#include "src/php_gtk_gen_ce.h" +#define PHP_GTK_EXPORT_CE(ce) zend_class_entry *ce; +#define PHP_GTK_GET_GENERIC(w, type, le) ((type)php_gtk_get_object(w, le)) -/* include generated register functions declarations */ -#include "src/php_gtk_gen_reg_items_decl.h" +#undef PG_ERROR +#define PG_ERROR -2 typedef void (*prop_getter_t)(zval *return_value, zval *object, zend_llist_element **element, int *result); typedef int (*prop_setter_t)(zval *object, zend_llist_element **element, zval *value); -#undef PG_ERROR -#define PG_ERROR -2 +#define EXT_INIT_ARGS int module_number +#define EXT_SHUTDOWN_ARGS void -/* Useful macros. */ -#define PHP_GTK_GET_GENERIC(w, type, le) ((type)php_gtk_get_object(w, le)) -#define PHP_GTK_GET(w) PHP_GTK_GET_GENERIC(w, GtkObject*, le_gtk) -#define PHP_GDK_EVENT_GET(w) PHP_GTK_GET_GENERIC(w, GdkEvent*, le_php_gtk_wrapper) -#define PHP_GDK_WINDOW_GET(w) PHP_GTK_GET_GENERIC(w, GdkWindow*, le_gdk_window) -#define PHP_GDK_PIXMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkPixmap*, le_gdk_window) -#define PHP_GDK_BITMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkBitmap*, le_gdk_bitmap) -#define PHP_GDK_COLOR_GET(w) PHP_GTK_GET_GENERIC(w, GdkColor*, le_gdk_color) -#define PHP_GDK_COLORMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkColormap*, le_gdk_colormap) -#define PHP_GDK_ATOM_GET(w) (php_gdk_atom_get(w)) -#define PHP_GDK_CURSOR_GET(w) PHP_GTK_GET_GENERIC(w, GdkCursor*, le_gdk_cursor) -#define PHP_GDK_VISUAL_GET(w) PHP_GTK_GET_GENERIC(w, GdkVisual*, le_gdk_visual) -#define PHP_GDK_FONT_GET(w) PHP_GTK_GET_GENERIC(w, GdkFont*, le_gdk_font) -#define PHP_GDK_GC_GET(w) PHP_GTK_GET_GENERIC(w, GdkGC*, le_gdk_gc) -#define PHP_GDK_DRAG_CONTEXT_GET(w) PHP_GTK_GET_GENERIC(w, GdkDragContext*, le_gdk_drag_context) -#define PHP_GTK_SELECTION_DATA_GET(w) PHP_GTK_GET_GENERIC(w, GtkSelectionData*, le_php_gtk_wrapper) -#define PHP_GTK_CTREE_NODE_GET(w) PHP_GTK_GET_GENERIC(w, GtkCTreeNode*, le_php_gtk_wrapper) -#define PHP_GTK_ACCEL_GROUP_GET(w) PHP_GTK_GET_GENERIC(w, GtkAccelGroup*, le_gtk_accel_group) -#define PHP_GTK_STYLE_GET(w) PHP_GTK_GET_GENERIC(w, GtkStyle*, le_gtk_style) +#define PHP_GTK_XINIT(ext) php_gtk_xinit_##ext +#define PHP_GTK_XSHUTDOWN(ext) php_gtk_xshutdown_##ext + +#define PHP_GTK_XINIT_FUNCTION(ext) int PHP_GTK_XINIT(ext)(EXT_INIT_ARGS) +#define PHP_GTK_XSHUTDOWN_FUNCTION(ext) int PHP_GTK_XSHUTDOWN(ext)(EXT_SHUTDOWN_ARGS) + +typedef struct _php_gtk_ext_entry php_gtk_ext_entry; +struct _php_gtk_ext_entry { + char *name; + int (*ext_startup_func)(EXT_INIT_ARGS); + int (*ext_shutdown_func)(EXT_SHUTDOWN_ARGS); + int ext_started; +}; + +#include "ext/gtk+/php_gtk+.h" /* True globals. */ +extern HashTable php_gtk_ext_registry; extern GHashTable *php_gtk_class_hash; extern HashTable php_gtk_rsrc_hash; extern HashTable php_gtk_prop_getters; @@ -105,7 +65,9 @@ /* Function declarations. */ -void php_gtk_register_types(int module_number); +int php_gtk_startup_all_extensions(int module_number); +int php_gtk_startup_extensions(php_gtk_ext_entry **ext, int ext_count, int module_number); + void php_gtk_set_object(zval *wrapper, void *obj, int rsrc_type); void *php_gtk_get_object(zval *wrapper, int rsrc_type); int php_gtk_get_enum_value(GtkType enum_type, zval *enum_val, int *result); @@ -137,28 +99,7 @@ sizeof(prop_setter_t), NULL); } -/* Constructors and initializers. */ void php_gtk_object_init(GtkObject *obj, zval *wrapper); -zval *php_gtk_new(GtkObject *obj); -zval *php_gdk_event_new(GdkEvent *event); -zval *php_gdk_window_new(GdkWindow *window); -zval *php_gdk_pixmap_new(GdkPixmap *pixmap); -zval *php_gdk_bitmap_new(GdkBitmap *bitmap); -zval *php_gdk_color_new(GdkColor *color); -zval *php_gdk_colormap_new(GdkColormap *cmap); -zval *php_gdk_atom_new(GdkAtom atom); -zval *php_gdk_cursor_new(GdkCursor *cursor); -zval *php_gdk_visual_new(GdkVisual *visual); -zval *php_gdk_font_new(GdkFont *font); -zval *php_gdk_gc_new(GdkGC *gc); -zval *php_gdk_drag_context_new(GdkDragContext *context); -zval *php_gtk_selection_data_new(GtkSelectionData *data); -zval *php_gtk_ctree_node_new(GtkCTreeNode *node); -zval *php_gtk_accel_group_new(GtkAccelGroup *group); -zval *php_gtk_style_new(GtkStyle *style); -zval *php_gtk_box_child_new(GtkBoxChild *box_child); -zval *php_gtk_fixed_child_new(GtkFixedChild *fixed_child); -zval *php_gtk_clist_row_new(GtkCListRow *clist_row); /* Utility functions. */ int php_gtk_parse_args(int argc, char *format, ...); @@ -182,16 +123,10 @@ } PHP_FUNCTION(wrap_no_constructor); +PHP_FUNCTION(wrap_no_direct_constructor); extern char *php_gtk_zval_type_name(zval *arg); #endif /* HAVE_PHP_GTK */ #endif /* _PHP_GTK_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ Index: php-gtk/src/php_gtk_module.h diff -u php-gtk/src/php_gtk_module.h:1.5 php-gtk/src/php_gtk_module.h:1.6 --- php-gtk/src/php_gtk_module.h:1.5 Tue Mar 13 12:59:27 2001 +++ php-gtk/src/php_gtk_module.h Tue Jul 10 14:27:51 2001 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk_module.h,v 1.5 2001/03/13 17:59:27 andrei Exp $: */ +/* $Id: php_gtk_module.h,v 1.6 2001/07/10 18:27:51 andrei Exp $: */ #ifndef _PHP_GTK_MODULE_H #define _PHP_GTK_MODULE_H @@ -71,10 +71,3 @@ #endif /* HAVE_PHP_GTK */ #endif /* _PHP_GTK_MODULE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ Index: php-gtk/src/php_gtk_object.c diff -u php-gtk/src/php_gtk_object.c:1.40 php-gtk/src/php_gtk_object.c:1.41 --- php-gtk/src/php_gtk_object.c:1.40 Sat May 12 00:19:11 2001 +++ php-gtk/src/php_gtk_object.c Tue Jul 10 14:27:51 2001 @@ -18,13 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk_object.c,v 1.40 2001/05/12 04:19:11 andrei Exp $ */ +/* $Id: php_gtk_object.c,v 1.41 2001/07/10 18:27:51 andrei Exp $ */ #include "php_gtk.h" #if HAVE_PHP_GTK -int le_gtk; +#include "ext/gtk+/php_gtk+.h" + HashTable php_gtk_prop_getters; HashTable php_gtk_prop_setters; HashTable php_gtk_rsrc_hash; @@ -37,7 +38,7 @@ gtk_object_ref(obj); gtk_object_sink(obj); - php_gtk_set_object(wrapper, obj, le_gtk); + php_gtk_set_object(wrapper, obj, le_gtk_object); } void php_gtk_set_object(zval *wrapper, void *obj, int rsrc_type) @@ -50,7 +51,7 @@ Z_LVAL_P(handle) = zend_list_insert(obj, rsrc_type); zend_hash_index_update(Z_OBJPROP_P(wrapper), 0, &handle, sizeof(zval *), NULL); zval_add_ref(&wrapper); - if (rsrc_type == le_gtk) + if (rsrc_type == le_gtk_object) gtk_object_set_data_full(obj, php_gtk_wrapper_key, wrapper, php_gtk_destroy_notify); else zend_hash_index_update(&php_gtk_type_hash, (long)obj, (void *)&wrapper, sizeof(zval *), NULL); @@ -334,7 +335,7 @@ object_init_ex(wrapper, ce); gtk_object_ref(obj); - php_gtk_set_object(wrapper, obj, le_gtk); + php_gtk_set_object(wrapper, obj, le_gtk_object); return wrapper; } Index: php-gtk/src/php_gtk_util.c diff -u php-gtk/src/php_gtk_util.c:1.17 php-gtk/src/php_gtk_util.c:1.18 --- php-gtk/src/php_gtk_util.c:1.17 Tue May 22 12:40:43 2001 +++ php-gtk/src/php_gtk_util.c Tue Jul 10 14:27:52 2001 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk_util.c,v 1.17 2001/05/22 16:40:43 fmk Exp $ */ +/* $Id: php_gtk_util.c,v 1.18 2001/07/10 18:27:52 andrei Exp $ */ #include "php_gtk.h" Index: php-gtk/build2/build.mk +++ php-gtk/build2/build.mk # $Id: build.mk,v 1.1 2001/07/10 18:27:45 andrei Exp $ # # # Makefile to generate build tools # STAMP = buildmk.stamp ALWAYS = generated_lists all: $(STAMP) $(ALWAYS) @$(MAKE) -s -f build2/build2.mk generated_lists: @echo config_m4_files = ext/*/config*.m4 >> $@ $(STAMP): phpize && touch $(STAMP) Index: php-gtk/build2/build2.mk +++ php-gtk/build2/build2.mk # $Id: build2.mk,v 1.1 2001/07/10 18:27:45 andrei Exp $ # include generated_lists all: configure config.h configure: aclocal.m4 config.m4 php_gtk.m4 configure.in $(config_m4_files) @echo rebuilding $@ @autoconf config.h: configure # explicitly remove target since autoheader does not seem to work # correctly otherwise (timestamps are not updated) @echo rebuilding $@ @rm -f $@ @autoheader Index: php-gtk/build2/genext.sh +++ php-gtk/build2/genext.sh #! /bin/sh # $Id: genext.sh,v 1.1 2001/07/10 18:27:45 andrei Exp $ # replacement for genif.pl infile="$1" shift srcdir="$1" shift extra_module_ptrs="$1" shift awk="$1" shift if test "$infile" = "" -o "$srcdir" = ""; then echo "please supply infile and srcdir" exit 1 fi module_ptrs="$extra_module_ptrs" header_list="" olddir=`pwd` cd $srcdir for ext in ${1+"$@"} ; do ext_canonical=`echo ${ext} | sed -e 's![^a-zA-Z0-9_]!_!'` module_ptrs=" php_gtk_ext_${ext_canonical}_ptr,@NEWLINE@$module_ptrs" header_list="$header_list ext/$ext/*.h" done includes=`$awk -f ./build2/print_include.awk $header_list` cd $olddir cat $infile | \ sed \ -e "s'@EXT_INCLUDE_CODE@'$includes'" \ -e "s'@EXT_PTRS@'$module_ptrs'" \ -e 's/@NEWLINE@/\ /g' Index: php-gtk/build2/print_include.awk +++ php-gtk/build2/print_include.awk /php_gtk_ext_/ { if (old_filename != FILENAME) { printf "#include \"" FILENAME "\"@NEWLINE@" old_filename = FILENAME } }
Index: php-gtk/buildconf diff -u /dev/null php-gtk/buildconf:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/buildconf Tue Jul 10 14:27:45 2001 @@ -0,0 +1,5 @@ +#!/bin/sh +# $Id: buildconf,v 1.2 2001/07/10 18:27:45 andrei Exp $ + +rm -f generated_lists +${MAKE:-make} -s -f build2/build.mk Index: php-gtk/php_gtk.m4 diff -u /dev/null php-gtk/php_gtk.m4:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/php_gtk.m4 Tue Jul 10 14:27:45 2001 @@ -0,0 +1,45 @@ +dnl +dnl PHP_GTK_EXTENSION(extname) +dnl +dnl Includes an extension in the build. +dnl +dnl "extname" is the name of the ext/ subdir where the extension resides +dnl +AC_DEFUN(PHP_GTK_EXTENSION,[ + PHP_GTK_EXT_SUBDIRS="$PHP_GTK_EXT_SUBDIRS $1" + + php_gtk_ext_builddir=ext/$1 + php_gtk_ext_srcdir=$abs_srcdir/ext/$1 + + LIB_BUILD($php_gtk_ext_builddir) + PHP_GTK_EXT_LTLIBS="$PHP_GTK_EXT_LTLIBS $php_gtk_ext_builddir/lib$1.la" + PHP_GTK_EXTENSIONS="$PHP_GTK_EXTENSIONS $1" + + PHP_FAST_OUTPUT($php_gtk_ext_builddir/Makefile) +]) + +PHP_SUBST(PHP_GTK_EXT_SUBDIRS) +PHP_SUBST(PHP_GTK_EXT_LTLIBS) +PHP_SUBST(PHP_GTK_EXTENSIONS) + +dnl +dnl PHP_GTK_ARG_ENABLE(arg-name, check message, help text[, default-val]) +dnl Sets PHP_GTK_ARG_NAME either to the user value or to the default value. +dnl default-val defaults to no. +dnl +AC_DEFUN(PHP_GTK_ARG_ENABLE,[ +PHP_GTK_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_GTK_[]translit($1,a-z-,A-Z_)) +]) + +AC_DEFUN(PHP_GTK_REAL_ARG_ENABLE,[ +AC_MSG_CHECKING($2) +AC_ARG_ENABLE($1,[$3],$5=[$]enableval,$5=ifelse($4,,no,$4)) +case [$]$5 in +no) + AC_MSG_RESULT(no) + ;; +*) + AC_MSG_RESULT(yes) + ;; +esac +]) Index: php-gtk/Makefile.in diff -u php-gtk/Makefile.in:1.1.1.1 php-gtk/Makefile.in:1.2 --- php-gtk/Makefile.in:1.1.1.1 Mon Jan 29 17:15:58 2001 +++ php-gtk/Makefile.in Tue Jul 10 14:27:44 2001 @@ -1,8 +1,9 @@ +SUBDIRS = ext main + LTLIBRARY_NAME = libphp_gtk.la LTLIBRARY_SHARED_NAME = php_gtk.la -LTLIBRARY_SHARED_LIBADD = $(PHP_GTK_SHARED_LIBADD) -LTLIBRARY_DEPENDENCIES = $(PHP_GTK_SOURCE_LIBADD) - -SUBDIRS = src +LTLIBRARY_DEPENDENCIES = $(PHP_GTK_EXT_LTLIBS) \ + main/libmain.la +LTLIBRARY_SHARED_LIBADD = $(LTLIBRARY_DEPENDENCIES) include $(top_srcdir)/build/dynlib.mk Index: php-gtk/TODO diff -u php-gtk/TODO:1.36 php-gtk/TODO:1.37 --- php-gtk/TODO:1.36 Fri May 4 16:09:11 2001 +++ php-gtk/TODO Tue Jul 10 14:27:44 2001 @@ -9,5 +9,8 @@ cascaded overloads, i.e. $style->base[GTK_STATE_NORMAL]->red = 55555. * Make <gdk/gdkkeysyms.h> available as constants and document them. +* Have a separate _init() function for each module(). Also have .ini setting + that automatically inits modules. + # vim: set tw=80 ai et sts=4: Index: php-gtk/config.m4 diff -u php-gtk/config.m4:1.3 php-gtk/config.m4:1.4 --- php-gtk/config.m4:1.3 Thu Mar 29 10:00:53 2001 +++ php-gtk/config.m4 Tue Jul 10 14:27:45 2001 @@ -1,292 +1,27 @@ -dnl $Id: config.m4,v 1.3 2001/03/29 15:00:53 andrei Exp $ -dnl config.m4 for extension gtk +dnl $Id: config.m4,v 1.4 2001/07/10 18:27:45 andrei Exp $ +dnl config.m4 for extension php-gtk -PHP_ARG_ENABLE(php-gtk, whether to enable PHP GTK+ support, - [ --enable-php-gtk Enable PHP GTK+ support]) - -dnl Configure paths for GTK+ (borrowed from gtk.m4) -dnl Owen Taylor 97-11-3 - -dnl PHP_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS -dnl -AC_DEFUN(PHP_PATH_GTK, -[dnl -dnl Get the cflags and libraries from the gtk-config script -dnl -AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], - gtk_config_prefix="$withval", gtk_config_prefix="") -AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], - gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") -AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], - , enable_gtktest=yes) - - for module in . $4 - do - case "$module" in - gthread) - gtk_config_args="$gtk_config_args gthread" - ;; - esac - done - - if test x$gtk_config_exec_prefix != x ; then - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config - fi - fi - if test x$gtk_config_prefix != x ; then - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" - if test x${GTK_CONFIG+set} != xset ; then - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config - fi - fi - - AC_PATH_PROG(GTK_CONFIG, gtk-config, no) - min_gtk_version=ifelse([$1], ,0.99.7,$1) - AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) - no_gtk="" - if test "$GTK_CONFIG" = "no" ; then - no_gtk=yes - else - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` - gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_gtktest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$GTK_LIBS $LIBS" -dnl -dnl Now check if the installed GTK is sufficiently new. (Also sanity -dnl checks the results of gtk-config to some extent -dnl - rm -f conf.gtktest - AC_TRY_RUN([ -#include <gtk/gtk.h> -#include <stdio.h> -#include <stdlib.h> - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtktest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtk_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - if ((gtk_major_version != $gtk_config_major_version) || - (gtk_minor_version != $gtk_config_minor_version) || - (gtk_micro_version != $gtk_config_micro_version)) - { - printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", - $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If gtk-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); - printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) - else if ((gtk_major_version != GTK_MAJOR_VERSION) || - (gtk_minor_version != GTK_MINOR_VERSION) || - (gtk_micro_version != GTK_MICRO_VERSION)) - { - printf("*** GTK+ header files (version %d.%d.%d) do not match\n", - GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - } -#endif /* defined (GTK_MAJOR_VERSION) ... */ - else - { - if ((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); - printf("*** correct copy of gtk-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtk" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GTK_CONFIG" = "no" ; then - echo "*** The gtk-config script installed by GTK could not be found" - echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GTK_CONFIG environment variable to the" - echo "*** full path to gtk-config." - else - if test -f conf.gtktest ; then - : - else - echo "*** Could not run GTK test program, checking why..." - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" - AC_TRY_LINK([ -#include <gtk/gtk.h> -#include <stdio.h> -], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK or finding the wrong" - echo "*** version of GTK. If it is not finding GTK, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK was incorrectly installed" - echo "*** or that you have moved GTK since it was installed. In the latter case, you" - echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK_CFLAGS="" - GTK_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) - rm -f conf.gtktest -]) - -dnl PHP_PATH_LIBGLADE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]) -dnl Test to see if libglade is installed, and define LIBGLADE_CFLAGS, LIBS -dnl -AC_DEFUN(PHP_PATH_LIBGLADE, -[dnl -dnl Get the cflags and libraries from the libglade-config script -dnl -AC_ARG_WITH(libglade-config, -[ --with-libglade-config=LIBGLADE_CONFIG Location of libglade-config], -LIBGLADE_CONFIG="$withval") - -module_args= -for module in . $3; do - case "$module" in - gnome) - module_args="$module_args gnome" - ;; - bonobo) - module_args="$module_args bonobo" - ;; - esac -done - -AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no) -AC_MSG_CHECKING(for libglade) -if test "$LIBGLADE_CONFIG" = "no"; then - AC_MSG_RESULT(no) - ifelse([$2], , :, [$2]) -else - if $LIBGLADE_CONFIG --check $module_args; then - LIBGLADE_CFLAGS=`$LIBGLADE_CONFIG --cflags $module_args` - LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs $module_args` - AC_MSG_RESULT(yes) - ifelse([$1], , :, [$1]) - else - echo "*** libglade was not compiled with support for $module_args" 1>&2 - AC_MSG_RESULT(no) - ifelse([$2], , :, [$2]) - fi -fi -AC_SUBST(LIBGLADE_CFLAGS) -AC_SUBST(LIBGLADE_LIBS) -]) +PHP_ARG_ENABLE(php-gtk,for PHP-GTK support, +[ --enable-php-gtk Enable PHP-GTK support]) if test "$PHP_PHP_GTK" != "no"; then - PHP_EXTENSION(php-gtk, $ext_shared) - - PHP_GTK_SOURCE_LIBADD=src/libphp_gtk_src.la - PHP_GTK_SHARED_LIBADD=$PHP_GTK_SOURCE_LIBADD + AC_PROG_AWK + PHP_SUBST(AWK) - PHP_PATH_GTK(1.2.6,PHP_GTK_MODULES="gtk gdk") - PHP_PATH_LIBGLADE(build_libglade=yes,build_libglade=no) + sinclude(php_gtk.m4) - if test "$build_libglade" = "yes"; then - PHP_GTK_MODULES="$PHP_GTK_MODULES libglade" - AC_DEFINE(HAVE_LIBGLADE, 1, [If libglade support to be compiled in]) - fi + BSD_MAKEFILE=no + case $host_alias in + *bsdi*) + BSD_MAKEFILE=yes;; + esac - for arg in $GTK_CFLAGS $LIBGLADE_CFLAGS; do - case $arg in - -I*) - n=`echo $ac_n $arg$ac_c|sed s/-I//` - PHP_ADD_INCLUDE($n) - ;; - esac - done - for arg in $GTK_LIBS $LIBGLADE_LIBS; do - case "$arg" in - -l*) - n=`echo $ac_n $arg$ac_c|sed s/-l//` - PHP_ADD_LIBRARY($n,, PHP_GTK_SHARED_LIBADD) - ;; - -L*) - n=`echo $ac_n $arg$ac_c|sed s/-L//` - PHP_ADD_LIBPATH($n, PHP_GTK_SHARED_LIBADD) - ;; - esac - done + # reading config stubs + esyscmd(./build2/config-stubs ext) - for arg in $PHP_GTK_MODULES; do - PHP_GTK_GEN_SOURCES="$PHP_GTK_GEN_SOURCES php_gtk_gen_$arg.c" - done - PHP_SUBST(PHP_GTK_SHARED_LIBADD) - PHP_SUBST(PHP_GTK_SOURCE_LIBADD) - PHP_SUBST(PHP_GTK_MODULES) - PHP_SUBST(PHP_GTK_GEN_SOURCES) + INCLUDES="$INCLUDES -I\$(top_srcdir)/main" - AC_DEFINE(HAVE_PHP_GTK, 1, [If you want PHP GTK+ support enabled]) - PHP_FAST_OUTPUT($ext_builddir/src/Makefile) - LIB_BUILD($ext_builddir/src,$ext_shared,yes) + PHP_EXTENSION(php-gtk, $ext_shared) + AC_DEFINE(HAVE_PHP_GTK, 1, [If PHP-GTK support is enabled]) + PHP_FAST_OUTPUT(main/Makefile ext/Makefile) fi Index: php-gtk/ext/.cvsignore diff -u /dev/null php-gtk/ext/.cvsignore:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/.cvsignore Tue Jul 10 14:27:47 2001 @@ -0,0 +1,2 @@ +Makefile +.deps Index: php-gtk/ext/Makefile.in diff -u /dev/null php-gtk/ext/Makefile.in:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/Makefile.in Tue Jul 10 14:27:47 2001 @@ -0,0 +1,3 @@ +SUBDIRS = $(PHP_GTK_EXT_SUBDIRS) + +include $(top_srcdir)/build/rules.mk Index: php-gtk/ext/gtk+/.cvsignore diff -u /dev/null php-gtk/ext/gtk+/.cvsignore:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/gtk+/.cvsignore Tue Jul 10 14:27:47 2001 @@ -0,0 +1,7 @@ +.deps +Makefile +*.lo +*.la +.libs +libs.mk +gen_* Index: php-gtk/ext/gtk+/Makefile.in diff -u /dev/null php-gtk/ext/gtk+/Makefile.in:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/gtk+/Makefile.in Tue Jul 10 14:27:47 2001 @@ -0,0 +1,19 @@ +LTLIBRARY_NAME = libgtk+.la +LTLIBRARY_SOURCES = php_gtk+.c php_gtk+_types.c gen_gtk.c gen_gdk.c +LTLIBRARY_LIBADD = $(GTK_PLUS_SHARED_LIBADD) +LTLIBRARY_SHARED_NAME = gtk+.la +LTLIBRARY_SHARED_LIBADD = $(GTK_PLUS_SHARED_LIBADD) + +include $(top_srcdir)/build/dynlib.mk + +php_gtk+.o php_gtk+.lo php_gtk+.slo: gen_ce_gtk.h + +gen_gtk.c: gtk.defs gtk-extrafuncs.defs gtk.overrides + php -q $(top_srcdir)/generator/generator.php -o ext/gtk%2b/gtk.overrides -p gtk ext/gtk%2b/gtk.defs > gen_gtk.c + +gen_gdk.c: gdk.defs gdk.overrides + php -q $(top_srcdir)/generator/generator.php -o ext/gtk%2b/gdk.overrides -p gdk ext/gtk%2b/gdk.defs > gen_gdk.c + +gen_ce_gtk.h: gen_gtk.c gen_gdk.c + grep -h "^PHP_GTK_EXPORT_CE" gen_gtk.c gen_gdk.c | sed -e "s!^!extern !" > gen_ce_gtk.h + Index: php-gtk/ext/gtk+/config.m4 diff -u /dev/null php-gtk/ext/gtk+/config.m4:1.2 --- /dev/null Tue Jul 10 14:27:52 2001 +++ php-gtk/ext/gtk+/config.m4 Tue Jul 10 14:27:47 2001 @@ -0,0 +1,201 @@ +dnl $Id: config.m4,v 1.2 2001/07/10 18:27:47 andrei Exp $ +dnl config.m4 for gtk+ module + +dnl PHP_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS +dnl +AC_DEFUN(PHP_PATH_GTK, +[dnl +dnl Get the cflags and libraries from the gtk-config script +dnl +AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], + gtk_config_prefix="$withval", gtk_config_prefix="") +AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], + gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") +AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], + , enable_gtktest=yes) + + for module in . $4 + do + case "$module" in + gthread) + gtk_config_args="$gtk_config_args gthread" + ;; + esac + done + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + AC_PATH_PROG(GTK_CONFIG, gtk-config, no) + min_gtk_version=ifelse([$1], ,0.99.7,$1) + AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" +dnl +dnl Now check if the installed GTK is sufficiently new. (Also sanity +dnl checks the results of gtk-config to some extent +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include <gtk/gtk.h> +#include <stdio.h> +#include <stdlib.h> + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } +#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } +#endif /* defined (GTK_MAJOR_VERSION) ... */ + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include <gtk/gtk.h> +#include <stdio.h> +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) + +PHP_PATH_GTK(1.2.6) +PHP_EVAL_INCLINE($GTK_CFLAGS) +PHP_EVAL_LIBLINE($GTK_LIBS, GTK_PLUS_SHARED_LIBADD) +PHP_SUBST(GTK_PLUS_SHARED_LIBADD) +PHP_SUBST(GTK_PLUS_GEN_SOURCES) +PHP_GTK_EXTENSION(gtk+) Index: php-gtk/ext/gtk+/gdk.defs diff -u /dev/null php-gtk/ext/gtk+/gdk.defs:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gdk.defs Tue Jul 10 14:27:48 2001 @@ -0,0 +1,1072 @@ +;; -*- scheme -*- +;; Enumerations and flags ... + +(flags ColorInfoFlags + (in-module Gdk) + (c-name GdkColorInfoFlags) + (value (name writable) (c-name GDK_COLOR_WRITEABLE)) +) + +(flags DebugFlag + (in-module Gdk) + (c-name GdkDebugFlag) + (value (name misc) (c-name GDK_DEBUG_MISC)) + (value (name events) (c-name GDK_DEBUG_EVENTS)) + (value (name dnd) (c-name GDK_DEBUG_DND)) + (value (name color-context) (c-name GDK_DEBUG_COLOR_CONTEXT)) + (value (name xim) (c-name GDK_DEBUG_XIM)) +) + +(enum RgbDither + (in-module Gdk) + (c-name GdkRgbDither) + (value (name none) (c-name GDK_RGB_DITHER_NONE)) + (value (name normal) (c-name GDK_RGB_DITHER_NORMAL)) + (value (name max) (c-name GDK_RGB_DITHER_MAX)) +) + +(enum WindowType + (in-module Gdk) + (c-name GdkWindowType) + (value (name root) (c-name GDK_WINDOW_ROOT)) + (value (name toplevel) (c-name GDK_WINDOW_TOPLEVEL)) + (value (name child) (c-name GDK_WINDOW_CHILD)) + (value (name dialog) (c-name GDK_WINDOW_DIALOG)) + (value (name temp) (c-name GDK_WINDOW_TEMP)) + (value (name pixmap) (c-name GDK_WINDOW_PIXMAP)) + (value (name foreign) (c-name GDK_WINDOW_FOREIGN)) +) + +(enum WindowClass + (in-module Gdk) + (c-name GdkWindowClass) + (value (name utput) (c-name GDK_INPUT_OUTPUT)) + (value (name nly) (c-name GDK_INPUT_ONLY)) +) + +(enum ImageType + (in-module Gdk) + (c-name GdkImageType) + (value (name normal) (c-name GDK_IMAGE_NORMAL)) + (value (name shared) (c-name GDK_IMAGE_SHARED)) + (value (name fastest) (c-name GDK_IMAGE_FASTEST)) +) + +(enum VisualType + (in-module Gdk) + (c-name GdkVisualType) + (value (name static-gray) (c-name GDK_VISUAL_STATIC_GRAY)) + (value (name grayscale) (c-name GDK_VISUAL_GRAYSCALE)) + (value (name static-color) (c-name GDK_VISUAL_STATIC_COLOR)) + (value (name pseudo-color) (c-name GDK_VISUAL_PSEUDO_COLOR)) + (value (name true-color) (c-name GDK_VISUAL_TRUE_COLOR)) + (value (name direct-color) (c-name GDK_VISUAL_DIRECT_COLOR)) +) + +(enum FontType + (in-module Gdk) + (c-name GdkFontType) + (value (name font) (c-name GDK_FONT_FONT)) + (value (name fontset) (c-name GDK_FONT_FONTSET)) +) + +(flags WindowAttributesType + (in-module Gdk) + (c-name GdkWindowAttributesType) + (value (name title) (c-name GDK_WA_TITLE)) + (value (name x) (c-name GDK_WA_X)) + (value (name y) (c-name GDK_WA_Y)) + (value (name cursor) (c-name GDK_WA_CURSOR)) + (value (name colormap) (c-name GDK_WA_COLORMAP)) + (value (name visual) (c-name GDK_WA_VISUAL)) + (value (name wmclass) (c-name GDK_WA_WMCLASS)) + (value (name noredir) (c-name GDK_WA_NOREDIR)) +) + +(flags WindowHints + (in-module Gdk) + (c-name GdkWindowHints) + (value (name pos) (c-name GDK_HINT_POS)) + (value (name min-size) (c-name GDK_HINT_MIN_SIZE)) + (value (name max-size) (c-name GDK_HINT_MAX_SIZE)) + (value (name base-size) (c-name GDK_HINT_BASE_SIZE)) + (value (name aspect) (c-name GDK_HINT_ASPECT)) + (value (name resize-inc) (c-name GDK_HINT_RESIZE_INC)) +) + +(enum Function + (in-module Gdk) + (c-name GdkFunction) + (value (name copy) (c-name GDK_COPY)) + (value (name invert) (c-name GDK_INVERT)) + (value (name xor) (c-name GDK_XOR)) + (value (name clear) (c-name GDK_CLEAR)) + (value (name and) (c-name GDK_AND)) + (value (name and-reverse) (c-name GDK_AND_REVERSE)) + (value (name and-invert) (c-name GDK_AND_INVERT)) + (value (name noop) (c-name GDK_NOOP)) + (value (name or) (c-name GDK_OR)) + (value (name equiv) (c-name GDK_EQUIV)) + (value (name or-reverse) (c-name GDK_OR_REVERSE)) + (value (name copy-invert) (c-name GDK_COPY_INVERT)) + (value (name or-invert) (c-name GDK_OR_INVERT)) + (value (name nand) (c-name GDK_NAND)) + (value (name set) (c-name GDK_SET)) +) + +(enum Fill + (in-module Gdk) + (c-name GdkFill) + (value (name solid) (c-name GDK_SOLID)) + (value (name tiled) (c-name GDK_TILED)) + (value (name stippled) (c-name GDK_STIPPLED)) + (value (name opaque-stippled) (c-name GDK_OPAQUE_STIPPLED)) +) + +(enum FillRule + (in-module Gdk) + (c-name GdkFillRule) + (value (name even-odd-rule) (c-name GDK_EVEN_ODD_RULE)) + (value (name winding-rule) (c-name GDK_WINDING_RULE)) +) + +(enum LineStyle + (in-module Gdk) + (c-name GdkLineStyle) + (value (name solid) (c-name GDK_LINE_SOLID)) + (value (name on-off-dash) (c-name GDK_LINE_ON_OFF_DASH)) + (value (name double-dash) (c-name GDK_LINE_DOUBLE_DASH)) +) + +(enum CapStyle + (in-module Gdk) + (c-name GdkCapStyle) + (value (name not-last) (c-name GDK_CAP_NOT_LAST)) + (value (name butt) (c-name GDK_CAP_BUTT)) + (value (name round) (c-name GDK_CAP_ROUND)) + (value (name projecting) (c-name GDK_CAP_PROJECTING)) +) + +(enum JoinStyle + (in-module Gdk) + (c-name GdkJoinStyle) + (value (name miter) (c-name GDK_JOIN_MITER)) + (value (name round) (c-name GDK_JOIN_ROUND)) + (value (name bevel) (c-name GDK_JOIN_BEVEL)) +) + +(enum CursorType + (in-module Gdk) + (c-name GdkCursorType) + (value (name is-pixmap) (c-name GDK_CURSOR_IS_PIXMAP)) +) + +(enum FilterReturn + (in-module Gdk) + (c-name GdkFilterReturn) + (value (name continue) (c-name GDK_FILTER_CONTINUE)) + (value (name translate) (c-name GDK_FILTER_TRANSLATE)) + (value (name remove) (c-name GDK_FILTER_REMOVE)) +) + +(enum VisibilityState + (in-module Gdk) + (c-name GdkVisibilityState) + (value (name unobscured) (c-name GDK_VISIBILITY_UNOBSCURED)) + (value (name partial) (c-name GDK_VISIBILITY_PARTIAL)) + (value (name fully-obscured) (c-name GDK_VISIBILITY_FULLY_OBSCURED)) +) + +(enum EventType + (in-module Gdk) + (c-name GdkEventType) + (value (name nothing) (c-name GDK_NOTHING)) + (value (name delete) (c-name GDK_DELETE)) + (value (name destroy) (c-name GDK_DESTROY)) + (value (name expose) (c-name GDK_EXPOSE)) + (value (name motion-notify) (c-name GDK_MOTION_NOTIFY)) + (value (name button-press) (c-name GDK_BUTTON_PRESS)) + (value (name 2button-press) (c-name GDK_2BUTTON_PRESS)) + (value (name 3button-press) (c-name GDK_3BUTTON_PRESS)) + (value (name button-release) (c-name GDK_BUTTON_RELEASE)) + (value (name key-press) (c-name GDK_KEY_PRESS)) + (value (name key-release) (c-name GDK_KEY_RELEASE)) + (value (name enter-notify) (c-name GDK_ENTER_NOTIFY)) + (value (name leave-notify) (c-name GDK_LEAVE_NOTIFY)) + (value (name focus-change) (c-name GDK_FOCUS_CHANGE)) + (value (name configure) (c-name GDK_CONFIGURE)) + (value (name map) (c-name GDK_MAP)) + (value (name unmap) (c-name GDK_UNMAP)) + (value (name property-notify) (c-name GDK_PROPERTY_NOTIFY)) + (value (name selection-clear) (c-name GDK_SELECTION_CLEAR)) + (value (name selection-request) (c-name GDK_SELECTION_REQUEST)) + (value (name selection-notify) (c-name GDK_SELECTION_NOTIFY)) + (value (name proximity-in) (c-name GDK_PROXIMITY_IN)) + (value (name proximity-out) (c-name GDK_PROXIMITY_OUT)) + (value (name drag-enter) (c-name GDK_DRAG_ENTER)) + (value (name drag-leave) (c-name GDK_DRAG_LEAVE)) + (value (name drag-motion) (c-name GDK_DRAG_MOTION)) + (value (name drag-status) (c-name GDK_DRAG_STATUS)) + (value (name drop-start) (c-name GDK_DROP_START)) + (value (name drop-finished) (c-name GDK_DROP_FINISHED)) + (value (name client-event) (c-name GDK_CLIENT_EVENT)) + (value (name visibility-notify) (c-name GDK_VISIBILITY_NOTIFY)) + (value (name no-expose) (c-name GDK_NO_EXPOSE)) +) + +(flags EventMask + (in-module Gdk) + (c-name GdkEventMask) + (value (name exposure-mask) (c-name GDK_EXPOSURE_MASK)) + (value (name pointer-motion-mask) (c-name GDK_POINTER_MOTION_MASK)) + (value (name pointer-motion-hint-mask) (c-name GDK_POINTER_MOTION_HINT_MASK)) + (value (name button-motion-mask) (c-name GDK_BUTTON_MOTION_MASK)) + (value (name button1-motion-mask) (c-name GDK_BUTTON1_MOTION_MASK)) + (value (name button2-motion-mask) (c-name GDK_BUTTON2_MOTION_MASK)) + (value (name button3-motion-mask) (c-name GDK_BUTTON3_MOTION_MASK)) + (value (name button-press-mask) (c-name GDK_BUTTON_PRESS_MASK)) + (value (name button-release-mask) (c-name GDK_BUTTON_RELEASE_MASK)) + (value (name key-press-mask) (c-name GDK_KEY_PRESS_MASK)) + (value (name key-release-mask) (c-name GDK_KEY_RELEASE_MASK)) + (value (name enter-notify-mask) (c-name GDK_ENTER_NOTIFY_MASK)) + (value (name leave-notify-mask) (c-name GDK_LEAVE_NOTIFY_MASK)) + (value (name focus-change-mask) (c-name GDK_FOCUS_CHANGE_MASK)) + (value (name structure-mask) (c-name GDK_STRUCTURE_MASK)) + (value (name property-change-mask) (c-name GDK_PROPERTY_CHANGE_MASK)) + (value (name visibility-notify-mask) (c-name GDK_VISIBILITY_NOTIFY_MASK)) + (value (name proximity-in-mask) (c-name GDK_PROXIMITY_IN_MASK)) + (value (name proximity-out-mask) (c-name GDK_PROXIMITY_OUT_MASK)) + (value (name substructure-mask) (c-name GDK_SUBSTRUCTURE_MASK)) + (value (name all-events-mask) (c-name GDK_ALL_EVENTS_MASK)) +) + +(enum NotifyType + (in-module Gdk) + (c-name GdkNotifyType) + (value (name ancestor) (c-name GDK_NOTIFY_ANCESTOR)) + (value (name virtual) (c-name GDK_NOTIFY_VIRTUAL)) + (value (name inferior) (c-name GDK_NOTIFY_INFERIOR)) + (value (name nonlinear) (c-name GDK_NOTIFY_NONLINEAR)) + (value (name nonlinear-virtual) (c-name GDK_NOTIFY_NONLINEAR_VIRTUAL)) + (value (name unknown) (c-name GDK_NOTIFY_UNKNOWN)) +) + +(enum CrossingMode + (in-module Gdk) + (c-name GdkCrossingMode) + (value (name normal) (c-name GDK_CROSSING_NORMAL)) + (value (name grab) (c-name GDK_CROSSING_GRAB)) + (value (name ungrab) (c-name GDK_CROSSING_UNGRAB)) +) + +(flags ModifierType + (in-module Gdk) + (c-name GdkModifierType) + (value (name shift-mask) (c-name GDK_SHIFT_MASK)) + (value (name lock-mask) (c-name GDK_LOCK_MASK)) + (value (name control-mask) (c-name GDK_CONTROL_MASK)) + (value (name mod1-mask) (c-name GDK_MOD1_MASK)) + (value (name mod2-mask) (c-name GDK_MOD2_MASK)) + (value (name mod3-mask) (c-name GDK_MOD3_MASK)) + (value (name mod4-mask) (c-name GDK_MOD4_MASK)) + (value (name mod5-mask) (c-name GDK_MOD5_MASK)) + (value (name button1-mask) (c-name GDK_BUTTON1_MASK)) + (value (name button2-mask) (c-name GDK_BUTTON2_MASK)) + (value (name button3-mask) (c-name GDK_BUTTON3_MASK)) + (value (name button4-mask) (c-name GDK_BUTTON4_MASK)) + (value (name button5-mask) (c-name GDK_BUTTON5_MASK)) + (value (name release-mask) (c-name GDK_RELEASE_MASK)) + (value (name modifier-mask) (c-name GDK_MODIFIER_MASK)) +) + +(enum SubwindowMode + (in-module Gdk) + (c-name GdkSubwindowMode) + (value (name clip-by-children) (c-name GDK_CLIP_BY_CHILDREN)) + (value (name include-inferiors) (c-name GDK_INCLUDE_INFERIORS)) +) + +(flags InputCondition + (in-module Gdk) + (c-name GdkInputCondition) + (value (name read) (c-name GDK_INPUT_READ)) + (value (name write) (c-name GDK_INPUT_WRITE)) + (value (name exception) (c-name GDK_INPUT_EXCEPTION)) +) + +(enum Status + (in-module Gdk) + (c-name GdkStatus) + (value (name ok) (c-name GDK_OK)) + (value (name error) (c-name GDK_ERROR)) + (value (name error-param) (c-name GDK_ERROR_PARAM)) + (value (name error-file) (c-name GDK_ERROR_FILE)) + (value (name error-mem) (c-name GDK_ERROR_MEM)) +) + +(enum ByteOrder + (in-module Gdk) + (c-name GdkByteOrder) + (value (name lsb-first) (c-name GDK_LSB_FIRST)) + (value (name msb-first) (c-name GDK_MSB_FIRST)) +) + +(flags GCValuesMask + (in-module Gdk) + (c-name GdkGCValuesMask) + (value (name foreground) (c-name GDK_GC_FOREGROUND)) + (value (name background) (c-name GDK_GC_BACKGROUND)) + (value (name font) (c-name GDK_GC_FONT)) + (value (name function) (c-name GDK_GC_FUNCTION)) + (value (name fill) (c-name GDK_GC_FILL)) + (value (name tile) (c-name GDK_GC_TILE)) + (value (name stipple) (c-name GDK_GC_STIPPLE)) + (value (name clip-mask) (c-name GDK_GC_CLIP_MASK)) + (value (name subwindow) (c-name GDK_GC_SUBWINDOW)) + (value (name ts-x-origin) (c-name GDK_GC_TS_X_ORIGIN)) + (value (name ts-y-origin) (c-name GDK_GC_TS_Y_ORIGIN)) + (value (name clip-x-origin) (c-name GDK_GC_CLIP_X_ORIGIN)) + (value (name clip-y-origin) (c-name GDK_GC_CLIP_Y_ORIGIN)) + (value (name exposures) (c-name GDK_GC_EXPOSURES)) + (value (name line-width) (c-name GDK_GC_LINE_WIDTH)) + (value (name line-style) (c-name GDK_GC_LINE_STYLE)) + (value (name cap-style) (c-name GDK_GC_CAP_STYLE)) + (value (name join-style) (c-name GDK_GC_JOIN_STYLE)) +) + +(enum Selection + (in-module Gdk) + (c-name GdkSelection) + (value (name primary) (c-name GDK_SELECTION_PRIMARY)) + (value (name secondary) (c-name GDK_SELECTION_SECONDARY)) +) + +(enum PropertyState + (in-module Gdk) + (c-name GdkPropertyState) + (value (name new-value) (c-name GDK_PROPERTY_NEW_VALUE)) + (value (name delete) (c-name GDK_PROPERTY_DELETE)) +) + +(enum PropMode + (in-module Gdk) + (c-name GdkPropMode) + (value (name replace) (c-name GDK_PROP_MODE_REPLACE)) + (value (name prepend) (c-name GDK_PROP_MODE_PREPEND)) + (value (name append) (c-name GDK_PROP_MODE_APPEND)) +) + +(enum InputSource + (in-module Gdk) + (c-name GdkInputSource) + (value (name mouse) (c-name GDK_SOURCE_MOUSE)) + (value (name pen) (c-name GDK_SOURCE_PEN)) + (value (name eraser) (c-name GDK_SOURCE_ERASER)) + (value (name cursor) (c-name GDK_SOURCE_CURSOR)) +) + +(enum InputMode + (in-module Gdk) + (c-name GdkInputMode) + (value (name disabled) (c-name GDK_MODE_DISABLED)) + (value (name screen) (c-name GDK_MODE_SCREEN)) + (value (name window) (c-name GDK_MODE_WINDOW)) +) + +(enum AxisUse + (in-module Gdk) + (c-name GdkAxisUse) + (value (name ignore) (c-name GDK_AXIS_IGNORE)) + (value (name x) (c-name GDK_AXIS_X)) + (value (name y) (c-name GDK_AXIS_Y)) + (value (name pressure) (c-name GDK_AXIS_PRESSURE)) + (value (name xtilt) (c-name GDK_AXIS_XTILT)) + (value (name ytilt) (c-name GDK_AXIS_YTILT)) + (value (name last) (c-name GDK_AXIS_LAST)) +) + +(enum Target + (in-module Gdk) + (c-name GdkTarget) + (value (name bitmap) (c-name GDK_TARGET_BITMAP)) + (value (name colormap) (c-name GDK_TARGET_COLORMAP)) + (value (name drawable) (c-name GDK_TARGET_DRAWABLE)) + (value (name pixmap) (c-name GDK_TARGET_PIXMAP)) + (value (name string) (c-name GDK_TARGET_STRING)) +) + +(enum SelectionType + (in-module Gdk) + (c-name GdkSelectionType) + (value (name atom) (c-name GDK_SELECTION_TYPE_ATOM)) + (value (name bitmap) (c-name GDK_SELECTION_TYPE_BITMAP)) + (value (name colormap) (c-name GDK_SELECTION_TYPE_COLORMAP)) + (value (name drawable) (c-name GDK_SELECTION_TYPE_DRAWABLE)) + (value (name integer) (c-name GDK_SELECTION_TYPE_INTEGER)) + (value (name pixmap) (c-name GDK_SELECTION_TYPE_PIXMAP)) + (value (name window) (c-name GDK_SELECTION_TYPE_WINDOW)) + (value (name string) (c-name GDK_SELECTION_TYPE_STRING)) +) + +(enum ExtensionMode + (in-module Gdk) + (c-name GdkExtensionMode) + (value (name none) (c-name GDK_EXTENSION_EVENTS_NONE)) + (value (name all) (c-name GDK_EXTENSION_EVENTS_ALL)) + (value (name cursor) (c-name GDK_EXTENSION_EVENTS_CURSOR)) +) + +(enum IMStyle + (in-module Gdk) + (c-name GdkIMStyle) + (value (name preedit-area) (c-name GDK_IM_PREEDIT_AREA)) + (value (name preedit-callbacks) (c-name GDK_IM_PREEDIT_CALLBACKS)) + (value (name preedit-position) (c-name GDK_IM_PREEDIT_POSITION)) + (value (name preedit-nothing) (c-name GDK_IM_PREEDIT_NOTHING)) + (value (name preedit-none) (c-name GDK_IM_PREEDIT_NONE)) + (value (name preedit-mask) (c-name GDK_IM_PREEDIT_MASK)) + (value (name status-area) (c-name GDK_IM_STATUS_AREA)) + (value (name status-callbacks) (c-name GDK_IM_STATUS_CALLBACKS)) + (value (name status-nothing) (c-name GDK_IM_STATUS_NOTHING)) + (value (name status-none) (c-name GDK_IM_STATUS_NONE)) + (value (name status-mask) (c-name GDK_IM_STATUS_MASK)) +) + +(flags ICAttributesType + (in-module Gdk) + (c-name GdkICAttributesType) + (value (name style) (c-name GDK_IC_STYLE)) + (value (name client-window) (c-name GDK_IC_CLIENT_WINDOW)) + (value (name focus-window) (c-name GDK_IC_FOCUS_WINDOW)) + (value (name filter-events) (c-name GDK_IC_FILTER_EVENTS)) + (value (name spot-location) (c-name GDK_IC_SPOT_LOCATION)) + (value (name line-spacing) (c-name GDK_IC_LINE_SPACING)) + (value (name cursor) (c-name GDK_IC_CURSOR)) + (value (name preedit-fontset) (c-name GDK_IC_PREEDIT_FONTSET)) + (value (name preedit-area) (c-name GDK_IC_PREEDIT_AREA)) + (value (name preedit-area-needed) (c-name GDK_IC_PREEDIT_AREA_NEEDED)) + (value (name preedit-foreground) (c-name GDK_IC_PREEDIT_FOREGROUND)) + (value (name preedit-background) (c-name GDK_IC_PREEDIT_BACKGROUND)) + (value (name preedit-pixmap) (c-name GDK_IC_PREEDIT_PIXMAP)) + (value (name preedit-colormap) (c-name GDK_IC_PREEDIT_COLORMAP)) + (value (name status-fontset) (c-name GDK_IC_STATUS_FONTSET)) + (value (name status-area) (c-name GDK_IC_STATUS_AREA)) + (value (name status-area-needed) (c-name GDK_IC_STATUS_AREA_NEEDED)) + (value (name status-foreground) (c-name GDK_IC_STATUS_FOREGROUND)) + (value (name status-background) (c-name GDK_IC_STATUS_BACKGROUND)) + (value (name status-pixmap) (c-name GDK_IC_STATUS_PIXMAP)) + (value (name status-colormap) (c-name GDK_IC_STATUS_COLORMAP)) + (value (name all-req) (c-name GDK_IC_ALL_REQ)) + (value (name preedit-area-req) (c-name GDK_IC_PREEDIT_AREA_REQ)) + (value (name preedit-position-req) (c-name GDK_IC_PREEDIT_POSITION_REQ)) + (value (name status-area-req) (c-name GDK_IC_STATUS_AREA_REQ)) +) + +(flags WMDecoration + (in-module Gdk) + (c-name GdkWMDecoration) + (value (name all) (c-name GDK_DECOR_ALL)) + (value (name border) (c-name GDK_DECOR_BORDER)) + (value (name resizeh) (c-name GDK_DECOR_RESIZEH)) + (value (name title) (c-name GDK_DECOR_TITLE)) + (value (name menu) (c-name GDK_DECOR_MENU)) + (value (name minimize) (c-name GDK_DECOR_MINIMIZE)) + (value (name maximize) (c-name GDK_DECOR_MAXIMIZE)) +) + +(flags WMFunction + (in-module Gdk) + (c-name GdkWMFunction) + (value (name all) (c-name GDK_FUNC_ALL)) + (value (name resize) (c-name GDK_FUNC_RESIZE)) + (value (name move) (c-name GDK_FUNC_MOVE)) + (value (name minimize) (c-name GDK_FUNC_MINIMIZE)) + (value (name maximize) (c-name GDK_FUNC_MAXIMIZE)) + (value (name close) (c-name GDK_FUNC_CLOSE)) +) + +(enum ColorContextMode + (in-module Gdk) + (c-name GdkColorContextMode) + (value (name undefined) (c-name GDK_CC_MODE_UNDEFINED)) + (value (name bw) (c-name GDK_CC_MODE_BW)) + (value (name std-cmap) (c-name GDK_CC_MODE_STD_CMAP)) + (value (name true) (c-name GDK_CC_MODE_TRUE)) + (value (name my-gray) (c-name GDK_CC_MODE_MY_GRAY)) + (value (name palette) (c-name GDK_CC_MODE_PALETTE)) +) + +(enum OverlapType + (in-module Gdk) + (c-name GdkOverlapType) + (value (name in) (c-name GDK_OVERLAP_RECTANGLE_IN)) + (value (name out) (c-name GDK_OVERLAP_RECTANGLE_OUT)) + (value (name part) (c-name GDK_OVERLAP_RECTANGLE_PART)) +) + +(flags DragAction + (in-module Gdk) + (c-name GdkDragAction) + (value (name default) (c-name GDK_ACTION_DEFAULT)) + (value (name copy) (c-name GDK_ACTION_COPY)) + (value (name move) (c-name GDK_ACTION_MOVE)) + (value (name link) (c-name GDK_ACTION_LINK)) + (value (name private) (c-name GDK_ACTION_PRIVATE)) + (value (name ask) (c-name GDK_ACTION_ASK)) +) + +(enum DragProtocol + (in-module Gdk) + (c-name GdkDragProtocol) + (value (name motif) (c-name GDK_DRAG_PROTO_MOTIF)) + (value (name xdnd) (c-name GDK_DRAG_PROTO_XDND)) + (value (name rootwin) (c-name GDK_DRAG_PROTO_ROOTWIN)) + (value (name none) (c-name GDK_DRAG_PROTO_NONE)) +) + + +;; From /usr/include/gdk/gdk.h + +(function gdk_get_display + (c-name gdk_get_display) + (return-type gchar*) +) + +(function input_remove + (c-name gdk_input_remove) + (return-type none) + (parameter (type-and-name gint tag)) +) + +(function pointer_is_grabbed + (c-name gdk_pointer_is_grabbed) + (return-type gboolean) +) + +(function screen_width + (c-name gdk_screen_width) + (return-type gint) +) + +(function screen_height + (c-name gdk_screen_height) + (return-type gint) +) + +(function screen_width_mm + (c-name gdk_screen_width_mm) + (return-type gint) +) + +(function screen_height_mm + (c-name gdk_screen_height_mm) + (return-type gint) +) + +(function flush + (c-name gdk_flush) + (return-type none) +) + +(function beep + (c-name gdk_beep) + (return-type none) +) + +(function visual_get_system + (c-name gdk_visual_get_system) + (return-type GdkVisual*) +) + +(function visual_get_best + (c-name gdk_visual_get_best) + (return-type GdkVisual*) +) + +(function visual_get_best_with_depth + (c-name gdk_visual_get_best_with_depth) + (return-type GdkVisual*) + (parameter (type-and-name gint depth)) +) + +(function visual_get_best_with_type + (c-name gdk_visual_get_best_with_type) + (return-type GdkVisual*) + (parameter (type-and-name GdkVisualType visual_type)) +) + +(function visual_get_best_with_both + (c-name gdk_visual_get_best_with_both) + (return-type GdkVisual*) + (parameter (type-and-name gint depth)) + (parameter (type-and-name GdkVisualType visual_type)) +) + +(function gdk_drag_status + (c-name gdk_drag_status) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) + (parameter (type-and-name GdkDragAction action)) + (parameter (type-and-name guint32 time)) +) + +(method set_icon + (of-object Window (Gdk)) + (c-name gdk_window_set_icon) + (return-type none) + (parameter (type-and-name GdkWindow* icon_window)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method set_icon_name + (of-object Window (Gdk)) + (c-name gdk_window_set_icon_name) + (return-type none) + (parameter (type-and-name const-gchar* name)) +) + +(function cursor_new + (c-name gdk_cursor_new) + (return-type GdkCursor*) + (parameter (type-and-name GdkCursorType cursor_type)) +) + +(function cursor_new_from_pixmap + (c-name gdk_cursor_new_from_pixmap) + (return-type GdkCursor*) + (parameter (type-and-name GdkPixmap* source)) + (parameter (type-and-name GdkPixmap* mask)) + (parameter (type-and-name GdkColor* fg)) + (parameter (type-and-name GdkColor* bg)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(function pixmap_new + (c-name gdk_pixmap_new) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window) (null-ok)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name gint depth)) +) + +(function pixmap_create_from_xpm + (c-name gdk_pixmap_create_from_xpm) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkBitmap** mask)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name const-gchar* filename)) +) + +(function pixmap_colormap_create_from_xpm + (c-name gdk_pixmap_colormap_create_from_xpm) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkBitmap** mask)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name const-gchar* filename)) +) + +(function pixmap_create_from_xpm_d + (c-name gdk_pixmap_create_from_xpm_d) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkBitmap** mask)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name gchar** data)) +) + +(function pixmap_colormap_create_from_xpm_d + (c-name gdk_pixmap_colormap_create_from_xpm_d) + (return-type GdkPixmap*) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkBitmap** mask)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name gchar** data)) +) + + +(function colormap_new + (c-name gdk_colormap_new) + (return-type GdkColormap*) + (parameter (type-and-name GdkVisual* visual)) + (parameter (type-and-name gboolean allocate)) +) + +(method ref + (of-object Colormap (Gdk)) + (c-name gdk_colormap_ref) + (return-type GdkColormap*) +) + +(method unref + (of-object Colormap (Gdk)) + (c-name gdk_colormap_unref) + (return-type none) +) + +(function colormap_get_system + (c-name gdk_colormap_get_system) + (return-type GdkColormap*) +) + +(function colormap_get_system_size + (c-name gdk_colormap_get_system_size) + (return-type gint) +) + +(method change + (of-object Colormap (Gdk)) + (c-name gdk_colormap_change) + (return-type none) + (parameter (type-and-name gint ncolors)) +) + +(method alloc_colors + (of-object Colormap (Gdk)) + (c-name gdk_colormap_alloc_colors) + (return-type gint) + (parameter (type-and-name GdkColor* colors)) + (parameter (type-and-name gint ncolors)) + (parameter (type-and-name gboolean writeable)) + (parameter (type-and-name gboolean best_match)) + (parameter (type-and-name gboolean* success)) +) + +(method alloc_color + (of-object Colormap (Gdk)) + (c-name gdk_colormap_alloc_color) + (return-type gboolean) + (parameter (type-and-name GdkColor* color)) + (parameter (type-and-name gboolean writeable)) + (parameter (type-and-name gboolean best_match)) +) + +(method free_colors + (of-object Colormap (Gdk)) + (c-name gdk_colormap_free_colors) + (return-type none) + (parameter (type-and-name GdkColor* colors)) + (parameter (type-and-name gint ncolors)) +) + +(method get_visual + (of-object Colormap (Gdk)) + (c-name gdk_colormap_get_visual) + (return-type GdkVisual*) +) + +(method copy + (of-object Color (Gdk)) + (c-name gdk_color_copy) + (return-type GdkColor*) +) + +(method free + (of-object Color (Gdk)) + (c-name gdk_color_free) + (return-type none) +) + +(function gdk_color_parse + (c-name gdk_color_parse) + (return-type gboolean) + (parameter (type-and-name const-gchar* spec)) + (parameter (type-and-name GdkColor* color)) +) + +(method hash + (of-object Color (Gdk)) + (c-name gdk_color_hash) + (return-type guint) + (parameter (type-and-name const-GdkColor* colorb)) +) + +(method equal + (of-object Color (Gdk)) + (c-name gdk_color_equal) + (return-type gboolean) + (parameter (type-and-name const-GdkColor* colorb)) +) + +(function font_load + (c-name gdk_font_load) + (return-type GdkFont*) + (parameter (type-and-name const-gchar* font_name)) +) + +(function fontset_load + (c-name gdk_fontset_load) + (return-type GdkFont*) + (parameter (type-and-name const-gchar* fontset_name)) +) + +(function draw_point + (c-name gdk_draw_point) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(function draw_line + (c-name gdk_draw_line) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x1)) + (parameter (type-and-name gint y1)) + (parameter (type-and-name gint x2)) + (parameter (type-and-name gint y2)) +) + +(function draw_rectangle + (c-name gdk_draw_rectangle) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint filled)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function draw_arc + (c-name gdk_draw_arc) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint filled)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name gint angle1)) + (parameter (type-and-name gint angle2)) +) + +(function draw_polygon + (c-name gdk_draw_polygon) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint filled)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) +) + +(function draw_string + (c-name gdk_draw_string) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkFont* font)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-gchar* string)) +) + +(function draw_text + (c-name gdk_draw_text) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkFont* font)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-gchar* text)) + (parameter (type-and-name gint text_length)) +) + +(function draw_text_wc + (c-name gdk_draw_text_wc) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkFont* font)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-GdkWChar* text)) + (parameter (type-and-name gint text_length)) +) + +(function draw_pixmap + (c-name gdk_draw_pixmap) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkDrawable* src)) + (parameter (type-and-name gint xsrc)) + (parameter (type-and-name gint ysrc)) + (parameter (type-and-name gint xdest)) + (parameter (type-and-name gint ydest)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function draw_image + (c-name gdk_draw_image) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkImage* image)) + (parameter (type-and-name gint xsrc)) + (parameter (type-and-name gint ysrc)) + (parameter (type-and-name gint xdest)) + (parameter (type-and-name gint ydest)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function draw_points + (c-name gdk_draw_points) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) +) + +(function draw_segments + (c-name gdk_draw_segments) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkSegment* segs)) + (parameter (type-and-name gint nsegs)) +) + +(function draw_lines + (c-name gdk_draw_lines) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) +) + +(function atom_intern + (c-name gdk_atom_intern) + (return-type GdkAtom) + (parameter (type-and-name const-gchar* atom_name)) + (parameter (type-and-name gint only_if_exists) (default "FALSE")) +) + +(method name + (of-object Atom (Gdk)) + (c-name gdk_atom_name) + (return-type gchar*) +) + +(function threads_enter + (c-name gdk_threads_enter) + (return-type none) +) + +(function threads_leave + (c-name gdk_threads_leave) + (return-type none) +) + + + +;; From /usr/include/gdk/gdkrgb.h + +(function rgb_xpixel_from_rgb + (c-name gdk_rgb_xpixel_from_rgb) + (return-type gulong) + (parameter (type-and-name guint32 rgb)) +) + +(function rgb_gc_set_foreground + (c-name gdk_rgb_gc_set_foreground) + (return-type none) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name guint32 rgb)) +) + +(function rgb_gc_set_background + (c-name gdk_rgb_gc_set_background) + (return-type none) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name guint32 rgb)) +) + +(function draw_rgb_image + (c-name gdk_draw_rgb_image) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GdkRgbDither dith)) + (parameter (type-and-name guchar* rgb_buf)) + (parameter (type-and-name gint rowstride)) +) + +(function draw_rgb_image_dithalign + (c-name gdk_draw_rgb_image_dithalign) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GdkRgbDither dith)) + (parameter (type-and-name guchar* rgb_buf)) + (parameter (type-and-name gint rowstride)) + (parameter (type-and-name gint xdith)) + (parameter (type-and-name gint ydith)) +) + +(function draw_rgb_32_image + (c-name gdk_draw_rgb_32_image) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GdkRgbDither dith)) + (parameter (type-and-name guchar* buf)) + (parameter (type-and-name gint rowstride)) +) + +(function draw_gray_image + (c-name gdk_draw_gray_image) + (return-type none) + (parameter (type-and-name GdkDrawable* drawable)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GdkRgbDither dith)) + (parameter (type-and-name guchar* buf)) + (parameter (type-and-name gint rowstride)) +) + +(function rgb_get_cmap + (c-name gdk_rgb_get_cmap) + (return-type GdkColormap*) +) + +(function rgb_get_visual + (c-name gdk_rgb_get_visual) + (return-type GdkVisual*) +) + + + + Index: php-gtk/ext/gtk+/gdk.overrides diff -u /dev/null php-gtk/ext/gtk+/gdk.overrides:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gdk.overrides Tue Jul 10 14:27:49 2001 @@ -0,0 +1,174 @@ +/* vim: set ft=cpp: */ +%% +ignore + GdkDebugFlag + GdkColorInfoFlags +%% +override gdk_color_parse +PHP_FUNCTION(wrap_gdk_color_parse) +{ + gchar *color_spec; + GdkColor color; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s", &color_spec)) { + return; + } + + if (gdk_color_parse(color_spec, &color)) + *return_value = *php_gdk_color_new(&color); + else + php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(), color_spec); +} +%% +override gdk_pixmap_create_from_xpm +PHP_FUNCTION(wrap_gdk_pixmap_create_from_xpm) +{ + zval *php_window, *php_trans_color; + gchar *filename; + GdkWindow *window = NULL; + GdkColor *trans_color = NULL; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNs", &php_window, gdk_window_ce, + &php_trans_color, gdk_color_ce, &filename)) + return; + + if (Z_TYPE_P(php_window) != IS_NULL) + window = PHP_GDK_WINDOW_GET(php_window); + if (Z_TYPE_P(php_trans_color) != IS_NULL) + trans_color = PHP_GDK_COLOR_GET(php_trans_color); + + pixmap = gdk_pixmap_create_from_xpm(window, &mask, trans_color, filename); + if (!pixmap) { + php_error(E_WARNING, "%s() cannot load pixmap", get_active_function_name()); + return; + } + + *return_value = *php_gtk_build_value("(NN)", php_gdk_pixmap_new(pixmap), php_gdk_bitmap_new(mask)); + gdk_pixmap_unref(pixmap); + gdk_bitmap_unref(mask); +} +%% +override gdk_pixmap_create_from_xpm_d +PHP_FUNCTION(wrap_gdk_pixmap_create_from_xpm_d) +{ + zval *php_window, *php_trans_color, *php_data; + zval **line; + GdkWindow *window = NULL; + GdkColor *trans_color = NULL; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask; + char **data; + int len, i = 0; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNa/", &php_window, gdk_window_ce, + &php_trans_color, gdk_color_ce, &php_data)) + return; + + if (Z_TYPE_P(php_window) != IS_NULL) + window = PHP_GDK_WINDOW_GET(php_window); + if (Z_TYPE_P(php_trans_color) != IS_NULL) + trans_color = PHP_GDK_COLOR_GET(php_trans_color); + + len = zend_hash_num_elements(Z_ARRVAL_P(php_data)); + data = emalloc(len * sizeof(char *)); + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_data)); + zend_hash_get_current_data(Z_ARRVAL_P(php_data), (void **)&line) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_data))) { + convert_to_string_ex(line); + data[i++] = Z_STRVAL_PP(line); + } + + pixmap = gdk_pixmap_create_from_xpm_d(window, &mask, trans_color, data); + efree(data); + if (!pixmap) { + php_error(E_WARNING, "%s() cannot create pixmap", get_active_function_name()); + return; + } + + *return_value = *php_gtk_build_value("(NN)", php_gdk_pixmap_new(pixmap), php_gdk_bitmap_new(mask)); + gdk_pixmap_unref(pixmap); + gdk_bitmap_unref(mask); +} +%% +override gdk_pixmap_colormap_create_from_xpm +PHP_FUNCTION(wrap_gdk_pixmap_colormap_create_from_xpm) +{ + zval *php_window, *php_trans_color, *php_colormap; + gchar *filename; + GdkWindow *window = NULL; + GdkColormap *colormap = NULL; + GdkColor *trans_color = NULL; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNNs", &php_window, gdk_window_ce, + &php_colormap, gdk_colormap_ce, &php_trans_color, + gdk_color_ce, &filename)) + return; + + if (Z_TYPE_P(php_window) != IS_NULL) + window = PHP_GDK_WINDOW_GET(php_window); + if (Z_TYPE_P(php_colormap) != IS_NULL) + colormap = PHP_GDK_COLORMAP_GET(php_colormap); + if (Z_TYPE_P(php_trans_color) != IS_NULL) + trans_color = PHP_GDK_COLOR_GET(php_trans_color); + + pixmap = gdk_pixmap_colormap_create_from_xpm(window, colormap, &mask, trans_color, filename); + if (!pixmap) { + php_error(E_WARNING, "%s() cannot load pixmap", get_active_function_name()); + return; + } + + *return_value = *php_gtk_build_value("(NN)", php_gdk_pixmap_new(pixmap), php_gdk_bitmap_new(mask)); + gdk_pixmap_unref(pixmap); + gdk_bitmap_unref(mask); +} +%% +override gdk_pixmap_colormap_create_from_xpm_d +PHP_FUNCTION(wrap_gdk_pixmap_colormap_create_from_xpm_d) +{ + zval *php_window, *php_colormap, + *php_trans_color, *php_data; + zval **line; + GdkWindow *window = NULL; + GdkColormap *colormap = NULL; + GdkColor *trans_color = NULL; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask; + char **data; + int len, i = 0; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNNa/", &php_window, + gdk_window_ce, &php_colormap, gdk_colormap_ce, + &php_trans_color, gdk_color_ce, &php_data)) + return; + + if (Z_TYPE_P(php_window) != IS_NULL) + window = PHP_GDK_WINDOW_GET(php_window); + if (Z_TYPE_P(php_colormap) != IS_NULL) + colormap = PHP_GDK_COLORMAP_GET(php_colormap); + if (Z_TYPE_P(php_trans_color) != IS_NULL) + trans_color = PHP_GDK_COLOR_GET(php_trans_color); + + len = zend_hash_num_elements(Z_ARRVAL_P(php_data)); + data = emalloc(len * sizeof(char *)); + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_data)); + zend_hash_get_current_data(Z_ARRVAL_P(php_data), (void **)&line) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_data))) { + convert_to_string_ex(line); + data[i++] = Z_STRVAL_PP(line); + } + + pixmap = gdk_pixmap_colormap_create_from_xpm_d(window, colormap, &mask, trans_color, data); + efree(data); + if (!pixmap) { + php_error(E_WARNING, "%s() cannot create pixmap", get_active_function_name()); + return; + } + + *return_value = *php_gtk_build_value("(NN)", php_gdk_pixmap_new(pixmap), php_gdk_bitmap_new(mask)); + gdk_pixmap_unref(pixmap); + gdk_bitmap_unref(mask); +} Index: php-gtk/ext/gtk+/gtk-extrafuncs.defs diff -u /dev/null php-gtk/ext/gtk+/gtk-extrafuncs.defs:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gtk-extrafuncs.defs Tue Jul 10 14:27:49 2001 @@ -0,0 +1,27 @@ +; -*- scheme -*- + +(method flags + (of-object Object (Gtk)) + (c-name GTK_OBJECT_FLAGS) + (return-type guint) +) + +(method set_flags + (of-object Object (Gtk)) + (c-name GTK_OBJECT_SET_FLAGS) + (return-type none) + (parameter (type-and-name guint flags)) +) + +(method unset_flags + (of-object Object (Gtk)) + (c-name GTK_OBJECT_UNSET_FLAGS) + (return-type none) + (parameter (type-and-name guint flags)) +) + +(method get_allocation + (of-object Widget (Gtk)) + (c-name gtk_widget_get_allocation) + (return-type GtkAllocation) +) Index: php-gtk/ext/gtk+/gtk.defs diff -u /dev/null php-gtk/ext/gtk+/gtk.defs:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gtk.defs Tue Jul 10 14:27:49 2001 @@ -0,0 +1,10505 @@ +;; -*- scheme -*- + +; object definitions ... +(object Object + (in-module Gtk) + (c-name GtkObject) +) + +(object ItemFactory + (in-module Gtk) + (parent Object (Gtk)) + (c-name GtkItemFactory) +) + +(object Data + (in-module Gtk) + (parent Object (Gtk)) + (c-name GtkData) +) + +(object Adjustment + (in-module Gtk) + (parent Data (Gtk)) + (c-name GtkAdjustment) + (field (type-and-name gfloat value)) + (field (type-and-name gfloat lower)) + (field (type-and-name gfloat upper)) + (field (type-and-name gfloat step_increment)) + (field (type-and-name gfloat page_increment)) + (field (type-and-name gfloat page_size)) +) + +(object Tooltips + (in-module Gtk) + (parent Data (Gtk)) + (c-name GtkTooltips) +) + +(object Widget + (in-module Gtk) + (parent Object (Gtk)) + (c-name GtkWidget) + (field (type-and-name GtkStyle* style)) + (field (type-and-name GdkWindow* window)) +) + +(object Separator + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkSeparator) +) + +(object VSeparator + (in-module Gtk) + (parent Separator (Gtk)) + (c-name GtkVSeparator) +) + +(object HSeparator + (in-module Gtk) + (parent Separator (Gtk)) + (c-name GtkHSeparator) +) + +(object Ruler + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkRuler) +) + +(object VRuler + (in-module Gtk) + (parent Ruler (Gtk)) + (c-name GtkVRuler) +) + +(object HRuler + (in-module Gtk) + (parent Ruler (Gtk)) + (c-name GtkHRuler) +) + +(object Range + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkRange) +) + +(object Scrollbar + (in-module Gtk) + (parent Range (Gtk)) + (c-name GtkScrollbar) +) + +(object VScrollbar + (in-module Gtk) + (parent Scrollbar (Gtk)) + (c-name GtkVScrollbar) +) + +(object HScrollbar + (in-module Gtk) + (parent Scrollbar (Gtk)) + (c-name GtkHScrollbar) +) + +(object Scale + (in-module Gtk) + (parent Range (Gtk)) + (c-name GtkScale) +) + +(object VScale + (in-module Gtk) + (parent Scale (Gtk)) + (c-name GtkVScale) +) + +(object HScale + (in-module Gtk) + (parent Scale (Gtk)) + (c-name GtkHScale) +) + +(object Progress + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkProgress) +) + +(object ProgressBar + (in-module Gtk) + (parent Progress (Gtk)) + (c-name GtkProgressBar) +) + +(object Preview + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkPreview) +) + +(object Misc + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkMisc) + (field (type-and-name gfloat xalign)) + (field (type-and-name gfloat yalign)) + (field (type-and-name guint16 xpad)) + (field (type-and-name guint16 ypad)) +) + +(object Pixmap + (in-module Gtk) + (parent Misc (Gtk)) + (c-name GtkPixmap) +) + +(object Arrow + (in-module Gtk) + (parent Misc (Gtk)) + (c-name GtkArrow) + (field (type-and-name gint16 arrow_type)) + (field (type-and-name gint16 shadow_type)) +) + +(object Image + (in-module Gtk) + (parent Misc (Gtk)) + (c-name GtkImage) +) + +(object Label + (in-module Gtk) + (parent Misc (Gtk)) + (c-name GtkLabel) +) + +(object AccelLabel + (in-module Gtk) + (parent Label (Gtk)) + (c-name GtkAccelLabel) +) + +(object Editable + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkEditable) + (field (type-and-name guint selection_start_pos)) + (field (type-and-name guint selection_end_pos)) + (field (type-and-name gboolean has_selection)) +) + +(object Text + (in-module Gtk) + (parent Editable (Gtk)) + (c-name GtkText) + (field (type-and-name GtkAdjustment* hadj)) + (field (type-and-name GtkAdjustment* vadj)) +) + +(object Entry + (in-module Gtk) + (parent Editable (Gtk)) + (c-name GtkEntry) +) + +(object SpinButton + (in-module Gtk) + (parent Entry (Gtk)) + (c-name GtkSpinButton) +) + +(object DrawingArea + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkDrawingArea) +) + +(object Curve + (in-module Gtk) + (parent DrawingArea (Gtk)) + (c-name GtkCurve) +) + +(object Container + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkContainer) +) + +(object Tree + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkTree) +) + +(object Toolbar + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkToolbar) +) + +(object Table + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkTable) +) + +(object Socket + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkSocket) +) + +(object Paned + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkPaned) +) + +(object VPaned + (in-module Gtk) + (parent Paned (Gtk)) + (c-name GtkVPaned) +) + +(object HPaned + (in-module Gtk) + (parent Paned (Gtk)) + (c-name GtkHPaned) +) + +(object Packer + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkPacker) +) + +(object Notebook + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkNotebook) + (field (type-and-name GtkPositionType tab_pos)) +) + +(object FontSelection + (in-module Gtk) + (parent Notebook (Gtk)) + (c-name GtkFontSelection) +) + +(object MenuShell + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkMenuShell) +) + +(object Menu + (in-module Gtk) + (parent MenuShell (Gtk)) + (c-name GtkMenu) +) + +(object MenuBar + (in-module Gtk) + (parent MenuShell (Gtk)) + (c-name GtkMenuBar) +) + +(object List + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkList) + (field (type-and-name GList* selection)) +) + +(object Layout + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkLayout) +) + +(object Fixed + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkFixed) + (field (type-and-name GList* children)) +) + +(object Bin + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkBin) + (field (type-and-name GtkWidget* child)) +) + +(object Viewport + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkViewport) +) + +(object ScrolledWindow + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkScrolledWindow) +) + +(object Item + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkItem) +) + +(object TreeItem + (in-module Gtk) + (parent Item (Gtk)) + (c-name GtkTreeItem) + (field (type-and-name GtkWidget* subtree)) +) + +(object MenuItem + (in-module Gtk) + (parent Item (Gtk)) + (c-name GtkMenuItem) +) + +(object TearoffMenuItem + (in-module Gtk) + (parent MenuItem (Gtk)) + (c-name GtkTearoffMenuItem) +) + +(object CheckMenuItem + (in-module Gtk) + (parent MenuItem (Gtk)) + (c-name GtkCheckMenuItem) + (field (type-and-name gboolean active)) +) + +(object RadioMenuItem + (in-module Gtk) + (parent CheckMenuItem (Gtk)) + (c-name GtkRadioMenuItem) +) + +(object ListItem + (in-module Gtk) + (parent Item (Gtk)) + (c-name GtkListItem) +) + +(object Invisible + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkInvisible) +) + +(object HandleBox + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkHandleBox) + (field (type-and-name GtkShadowType shadow_type)) + (field (type-and-name GtkPositionType handle_position)) + (field (type-and-name gint snap_edge)) + (field (type-and-name gboolean child_detached)) +) + +(object Frame + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkFrame) +) + +(object EventBox + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkEventBox) +) + +(object Alignment + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkAlignment) +) + +(object Button + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkButton) +) + +(object ToggleButton + (in-module Gtk) + (parent Button (Gtk)) + (c-name GtkToggleButton) + (field (type-and-name gboolean draw_indicator)) +) + +(object CheckButton + (in-module Gtk) + (parent ToggleButton (Gtk)) + (c-name GtkCheckButton) +) + +(object RadioButton + (in-module Gtk) + (parent CheckButton (Gtk)) + (c-name GtkRadioButton) +) + +(object OptionMenu + (in-module Gtk) + (parent Button (Gtk)) + (c-name GtkOptionMenu) +) + +(object Box + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkBox) + (field (type-and-name GList* children)) + (field (type-and-name gint16 spacing)) + (field (type-and-name gboolean homogeneous)) +) + +(object VBox + (in-module Gtk) + (parent Box (Gtk)) + (c-name GtkVBox) +) + +(object ColorSelection + (in-module Gtk) + (parent VBox (Gtk)) + (c-name GtkColorSelection) +) + +(object GammaCurve + (in-module Gtk) + (parent VBox (Gtk)) + (c-name GtkGammaCurve) + (field (type-and-name GtkWidget* table)) + (field (type-and-name GtkWidget* curve)) + (field (type-and-name gfloat gamma)) + (field (type-and-name GtkWidget* gamma_dialog)) + (field (type-and-name GtkWidget* gamma_text)) +) + +(object HBox + (in-module Gtk) + (parent Box (Gtk)) + (c-name GtkHBox) +) + +(object Statusbar + (in-module Gtk) + (parent HBox (Gtk)) + (c-name GtkStatusbar) +) + +(object Combo + (in-module Gtk) + (parent HBox (Gtk)) + (c-name GtkCombo) + (field (type-and-name GtkWidget* entry)) + (field (type-and-name GtkWidget* list)) +) + +(object ButtonBox + (in-module Gtk) + (parent Box (Gtk)) + (c-name GtkButtonBox) +) + +(object VButtonBox + (in-module Gtk) + (parent ButtonBox (Gtk)) + (c-name GtkVButtonBox) +) + +(object HButtonBox + (in-module Gtk) + (parent ButtonBox (Gtk)) + (c-name GtkHButtonBox) +) + +(object CList + (in-module Gtk) + (parent Container (Gtk)) + (c-name GtkCList) + (field (type-and-name gint focus_row)) + (field (type-and-name gint rows)) + (field (type-and-name gint sort_column)) + (field (type-and-name GtkSortType sort_type)) + (field (type-and-name GList* selection)) + (field (type-and-name GtkSelectionMode selection_mode)) + (field (type-and-name GList* row_list)) +) + +(object CTree + (in-module Gtk) + (parent CList (Gtk)) + (c-name GtkCTree) + (field (type-and-name gint tree_indent)) + (field (type-and-name gint tree_spacing)) + (field (type-and-name gint tree_column)) + (field (type-and-name GtkCTreeLineStyle line_style)) + (field (type-and-name GtkCTreeExpanderStyle expander_style)) + (field (type-and-name GtkCList clist)) + (field (type-and-name GList* selection)) + (field (type-and-name GList* row_list)) +) + +(object Calendar + (in-module Gtk) + (parent Widget (Gtk)) + (c-name GtkCalendar) + (field (type-and-name gint month)) + (field (type-and-name gint year)) + (field (type-and-name gint selected_day)) + (field (type-and-name gint num_marked_dates)) + (field (type-and-name gint* marked_date)) +) + +(object Window + (in-module Gtk) + (parent Bin (Gtk)) + (c-name GtkWindow) +) + +(object Plug + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkPlug) +) + +(object FontSelectionDialog + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkFontSelectionDialog) + (field (type-and-name GtkWidget* fontsel)) + (field (type-and-name GtkWidget* main_vbox)) + (field (type-and-name GtkWidget* action_area)) + (field (type-and-name GtkWidget* ok_button)) + (field (type-and-name GtkWidget* apply_button)) + (field (type-and-name GtkWidget* cancel_button)) +) + +(object FileSelection + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkFileSelection) + (field (type-and-name GtkWidget* dir_list)) + (field (type-and-name GtkWidget* file_list)) + (field (type-and-name GtkWidget* selection_entry)) + (field (type-and-name GtkWidget* selection_text)) + (field (type-and-name GtkWidget* main_vbox)) + (field (type-and-name GtkWidget* ok_button)) + (field (type-and-name GtkWidget* cancel_button)) + (field (type-and-name GtkWidget* help_button)) +) + +(object Dialog + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkDialog) + (field (type-and-name GtkWidget* vbox)) + (field (type-and-name GtkWidget* action_area)) +) + +(object InputDialog + (in-module Gtk) + (parent Dialog (Gtk)) + (c-name GtkInputDialog) + (field (type-and-name GtkWidget* close_button)) + (field (type-and-name GtkWidget* save_button)) +) + +(object ColorSelectionDialog + (in-module Gtk) + (parent Window (Gtk)) + (c-name GtkColorSelectionDialog) + (field (type-and-name GtkWidget* colorsel)) + (field (type-and-name GtkWidget* main_vbox)) + (field (type-and-name GtkWidget* ok_button)) + (field (type-and-name GtkWidget* reset_button)) + (field (type-and-name GtkWidget* cancel_button)) + (field (type-and-name GtkWidget* help_button)) +) + +(object TipsQuery + (in-module Gtk) + (parent Label (Gtk)) + (c-name GtkTipsQuery) +) + +(object AspectFrame + (in-module Gtk) + (parent Frame (Gtk)) + (c-name GtkAspectFrame) +) + +;; Enumerations and flags ... + +(flags AccelFlags + (in-module Gtk) + (c-name GtkAccelFlags) + (value (name visible) (c-name GTK_ACCEL_VISIBLE)) + (value (name signal-visible) (c-name GTK_ACCEL_SIGNAL_VISIBLE)) + (value (name locked) (c-name GTK_ACCEL_LOCKED)) + (value (name mask) (c-name GTK_ACCEL_MASK)) +) + +(flags CalendarDisplayOptions + (in-module Gtk) + (c-name GtkCalendarDisplayOptions) + (value (name show-heading) (c-name GTK_CALENDAR_SHOW_HEADING)) + (value (name show-day-names) (c-name GTK_CALENDAR_SHOW_DAY_NAMES)) + (value (name no-month-change) (c-name GTK_CALENDAR_NO_MONTH_CHANGE)) + (value (name show-week-numbers) (c-name GTK_CALENDAR_SHOW_WEEK_NUMBERS)) + (value (name week-start-monday) (c-name GTK_CALENDAR_WEEK_START_MONDAY)) +) + +(enum CellType + (in-module Gtk) + (c-name GtkCellType) + (value (name empty) (c-name GTK_CELL_EMPTY)) + (value (name text) (c-name GTK_CELL_TEXT)) + (value (name pixmap) (c-name GTK_CELL_PIXMAP)) + (value (name pixtext) (c-name GTK_CELL_PIXTEXT)) + (value (name widget) (c-name GTK_CELL_WIDGET)) +) + +(enum CListDragPos + (in-module Gtk) + (c-name GtkCListDragPos) + (value (name none) (c-name GTK_CLIST_DRAG_NONE)) + (value (name before) (c-name GTK_CLIST_DRAG_BEFORE)) + (value (name into) (c-name GTK_CLIST_DRAG_INTO)) + (value (name after) (c-name GTK_CLIST_DRAG_AFTER)) +) + +(flags ButtonAction + (in-module Gtk) + (c-name GtkButtonAction) + (value (name ignored) (c-name GTK_BUTTON_IGNORED)) + (value (name selects) (c-name GTK_BUTTON_SELECTS)) + (value (name drags) (c-name GTK_BUTTON_DRAGS)) + (value (name expands) (c-name GTK_BUTTON_EXPANDS)) +) + +(enum CTreePos + (in-module Gtk) + (c-name GtkCTreePos) + (value (name before) (c-name GTK_CTREE_POS_BEFORE)) + (value (name as-child) (c-name GTK_CTREE_POS_AS_CHILD)) + (value (name after) (c-name GTK_CTREE_POS_AFTER)) +) + +(enum CTreeLineStyle + (in-module Gtk) + (c-name GtkCTreeLineStyle) + (value (name none) (c-name GTK_CTREE_LINES_NONE)) + (value (name solid) (c-name GTK_CTREE_LINES_SOLID)) + (value (name dotted) (c-name GTK_CTREE_LINES_DOTTED)) + (value (name tabbed) (c-name GTK_CTREE_LINES_TABBED)) +) + +(enum CTreeExpanderStyle + (in-module Gtk) + (c-name GtkCTreeExpanderStyle) + (value (name none) (c-name GTK_CTREE_EXPANDER_NONE)) + (value (name square) (c-name GTK_CTREE_EXPANDER_SQUARE)) + (value (name triangle) (c-name GTK_CTREE_EXPANDER_TRIANGLE)) + (value (name circular) (c-name GTK_CTREE_EXPANDER_CIRCULAR)) +) + +(enum CTreeExpansionType + (in-module Gtk) + (c-name GtkCTreeExpansionType) + (value (name expand) (c-name GTK_CTREE_EXPANSION_EXPAND)) + (value (name expand-recursive) (c-name GTK_CTREE_EXPANSION_EXPAND_RECURSIVE)) + (value (name collapse) (c-name GTK_CTREE_EXPANSION_COLLAPSE)) + (value (name collapse-recursive) (c-name GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE)) + (value (name toggle) (c-name GTK_CTREE_EXPANSION_TOGGLE)) + (value (name toggle-recursive) (c-name GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE)) +) + +(flags DebugFlag + (in-module Gtk) + (c-name GtkDebugFlag) + (value (name objects) (c-name GTK_DEBUG_OBJECTS)) + (value (name misc) (c-name GTK_DEBUG_MISC)) + (value (name signals) (c-name GTK_DEBUG_SIGNALS)) + (value (name dnd) (c-name GTK_DEBUG_DND)) + (value (name plugsocket) (c-name GTK_DEBUG_PLUGSOCKET)) +) + +(flags DestDefaults + (in-module Gtk) + (c-name GtkDestDefaults) + (value (name motion) (c-name GTK_DEST_DEFAULT_MOTION)) + (value (name highlight) (c-name GTK_DEST_DEFAULT_HIGHLIGHT)) + (value (name drop) (c-name GTK_DEST_DEFAULT_DROP)) + (value (name all) (c-name GTK_DEST_DEFAULT_ALL)) +) + +(flags TargetFlags + (in-module Gtk) + (c-name GtkTargetFlags) + (value (name app) (c-name GTK_TARGET_SAME_APP)) + (value (name widget) (c-name GTK_TARGET_SAME_WIDGET)) +) + +(enum ArrowType + (in-module Gtk) + (c-name GtkArrowType) + (value (name up) (c-name GTK_ARROW_UP)) + (value (name down) (c-name GTK_ARROW_DOWN)) + (value (name left) (c-name GTK_ARROW_LEFT)) + (value (name right) (c-name GTK_ARROW_RIGHT)) +) + +(flags AttachOptions + (in-module Gtk) + (c-name GtkAttachOptions) + (value (name expand) (c-name GTK_EXPAND)) + (value (name shrink) (c-name GTK_SHRINK)) + (value (name fill) (c-name GTK_FILL)) +) + +(enum ButtonBoxStyle + (in-module Gtk) + (c-name GtkButtonBoxStyle) + (value (name default-style) (c-name GTK_BUTTONBOX_DEFAULT_STYLE)) + (value (name spread) (c-name GTK_BUTTONBOX_SPREAD)) + (value (name edge) (c-name GTK_BUTTONBOX_EDGE)) + (value (name start) (c-name GTK_BUTTONBOX_START)) + (value (name end) (c-name GTK_BUTTONBOX_END)) +) + +(enum CurveType + (in-module Gtk) + (c-name GtkCurveType) + (value (name linear) (c-name GTK_CURVE_TYPE_LINEAR)) + (value (name spline) (c-name GTK_CURVE_TYPE_SPLINE)) + (value (name free) (c-name GTK_CURVE_TYPE_FREE)) +) + +(enum DirectionType + (in-module Gtk) + (c-name GtkDirectionType) + (value (name tab-forward) (c-name GTK_DIR_TAB_FORWARD)) + (value (name tab-backward) (c-name GTK_DIR_TAB_BACKWARD)) + (value (name up) (c-name GTK_DIR_UP)) + (value (name down) (c-name GTK_DIR_DOWN)) + (value (name left) (c-name GTK_DIR_LEFT)) + (value (name right) (c-name GTK_DIR_RIGHT)) +) + +(enum Justification + (in-module Gtk) + (c-name GtkJustification) + (value (name left) (c-name GTK_JUSTIFY_LEFT)) + (value (name right) (c-name GTK_JUSTIFY_RIGHT)) + (value (name center) (c-name GTK_JUSTIFY_CENTER)) + (value (name fill) (c-name GTK_JUSTIFY_FILL)) +) + +(enum MatchType + (in-module Gtk) + (c-name GtkMatchType) + (value (name all) (c-name GTK_MATCH_ALL)) + (value (name all-tail) (c-name GTK_MATCH_ALL_TAIL)) + (value (name head) (c-name GTK_MATCH_HEAD)) + (value (name tail) (c-name GTK_MATCH_TAIL)) + (value (name exact) (c-name GTK_MATCH_EXACT)) + (value (name last) (c-name GTK_MATCH_LAST)) +) + +(enum MenuDirectionType + (in-module Gtk) + (c-name GtkMenuDirectionType) + (value (name parent) (c-name GTK_MENU_DIR_PARENT)) + (value (name child) (c-name GTK_MENU_DIR_CHILD)) + (value (name next) (c-name GTK_MENU_DIR_NEXT)) + (value (name prev) (c-name GTK_MENU_DIR_PREV)) +) + +(enum MenuFactoryType + (in-module Gtk) + (c-name GtkMenuFactoryType) + (value (name menu) (c-name GTK_MENU_FACTORY_MENU)) + (value (name menu-bar) (c-name GTK_MENU_FACTORY_MENU_BAR)) + (value (name option-menu) (c-name GTK_MENU_FACTORY_OPTION_MENU)) +) + +(enum MetricType + (in-module Gtk) + (c-name GtkMetricType) + (value (name pixels) (c-name GTK_PIXELS)) + (value (name inches) (c-name GTK_INCHES)) + (value (name centimeters) (c-name GTK_CENTIMETERS)) +) + +(enum Orientation + (in-module Gtk) + (c-name GtkOrientation) + (value (name horizontal) (c-name GTK_ORIENTATION_HORIZONTAL)) + (value (name vertical) (c-name GTK_ORIENTATION_VERTICAL)) +) + +(enum CornerType + (in-module Gtk) + (c-name GtkCornerType) + (value (name top-left) (c-name GTK_CORNER_TOP_LEFT)) + (value (name bottom-left) (c-name GTK_CORNER_BOTTOM_LEFT)) + (value (name top-right) (c-name GTK_CORNER_TOP_RIGHT)) + (value (name bottom-right) (c-name GTK_CORNER_BOTTOM_RIGHT)) +) + +(enum PackType + (in-module Gtk) + (c-name GtkPackType) + (value (name start) (c-name GTK_PACK_START)) + (value (name end) (c-name GTK_PACK_END)) +) + +(enum PathPriorityType + (in-module Gtk) + (c-name GtkPathPriorityType) + (value (name lowest) (c-name GTK_PATH_PRIO_LOWEST)) + (value (name gtk) (c-name GTK_PATH_PRIO_GTK)) + (value (name application) (c-name GTK_PATH_PRIO_APPLICATION)) + (value (name rc) (c-name GTK_PATH_PRIO_RC)) + (value (name highest) (c-name GTK_PATH_PRIO_HIGHEST)) + (value (name mask) (c-name GTK_PATH_PRIO_MASK)) +) + +(enum PathType + (in-module Gtk) + (c-name GtkPathType) + (value (name widget) (c-name GTK_PATH_WIDGET)) + (value (name widget-class) (c-name GTK_PATH_WIDGET_CLASS)) + (value (name class) (c-name GTK_PATH_CLASS)) +) + +(enum PolicyType + (in-module Gtk) + (c-name GtkPolicyType) + (value (name always) (c-name GTK_POLICY_ALWAYS)) + (value (name automatic) (c-name GTK_POLICY_AUTOMATIC)) + (value (name never) (c-name GTK_POLICY_NEVER)) +) + +(enum PositionType + (in-module Gtk) + (c-name GtkPositionType) + (value (name left) (c-name GTK_POS_LEFT)) + (value (name right) (c-name GTK_POS_RIGHT)) + (value (name top) (c-name GTK_POS_TOP)) + (value (name bottom) (c-name GTK_POS_BOTTOM)) +) + +(enum PreviewType + (in-module Gtk) + (c-name GtkPreviewType) + (value (name color) (c-name GTK_PREVIEW_COLOR)) + (value (name grayscale) (c-name GTK_PREVIEW_GRAYSCALE)) +) + +(enum ReliefStyle + (in-module Gtk) + (c-name GtkReliefStyle) + (value (name normal) (c-name GTK_RELIEF_NORMAL)) + (value (name half) (c-name GTK_RELIEF_HALF)) + (value (name none) (c-name GTK_RELIEF_NONE)) +) + +(enum ResizeMode + (in-module Gtk) + (c-name GtkResizeMode) + (value (name parent) (c-name GTK_RESIZE_PARENT)) + (value (name queue) (c-name GTK_RESIZE_QUEUE)) + (value (name immediate) (c-name GTK_RESIZE_IMMEDIATE)) +) + +(flags SignalRunType + (in-module Gtk) + (c-name GtkSignalRunType) + (value (name first) (c-name GTK_RUN_FIRST)) + (value (name last) (c-name GTK_RUN_LAST)) + (value (name both) (c-name GTK_RUN_BOTH)) + (value (name no-recurse) (c-name GTK_RUN_NO_RECURSE)) + (value (name action) (c-name GTK_RUN_ACTION)) + (value (name no-hooks) (c-name GTK_RUN_NO_HOOKS)) +) + +(enum ScrollType + (in-module Gtk) + (c-name GtkScrollType) + (value (name none) (c-name GTK_SCROLL_NONE)) + (value (name step-backward) (c-name GTK_SCROLL_STEP_BACKWARD)) + (value (name step-forward) (c-name GTK_SCROLL_STEP_FORWARD)) + (value (name page-backward) (c-name GTK_SCROLL_PAGE_BACKWARD)) + (value (name page-forward) (c-name GTK_SCROLL_PAGE_FORWARD)) + (value (name jump) (c-name GTK_SCROLL_JUMP)) +) + +(enum SelectionMode + (in-module Gtk) + (c-name GtkSelectionMode) + (value (name single) (c-name GTK_SELECTION_SINGLE)) + (value (name browse) (c-name GTK_SELECTION_BROWSE)) + (value (name multiple) (c-name GTK_SELECTION_MULTIPLE)) + (value (name extended) (c-name GTK_SELECTION_EXTENDED)) +) + +(enum ShadowType + (in-module Gtk) + (c-name GtkShadowType) + (value (name none) (c-name GTK_SHADOW_NONE)) + (value (name in) (c-name GTK_SHADOW_IN)) + (value (name out) (c-name GTK_SHADOW_OUT)) + (value (name etched-in) (c-name GTK_SHADOW_ETCHED_IN)) + (value (name etched-out) (c-name GTK_SHADOW_ETCHED_OUT)) +) + +(enum StateType + (in-module Gtk) + (c-name GtkStateType) + (value (name normal) (c-name GTK_STATE_NORMAL)) + (value (name active) (c-name GTK_STATE_ACTIVE)) + (value (name prelight) (c-name GTK_STATE_PRELIGHT)) + (value (name selected) (c-name GTK_STATE_SELECTED)) + (value (name insensitive) (c-name GTK_STATE_INSENSITIVE)) +) + +(enum SubmenuDirection + (in-module Gtk) + (c-name GtkSubmenuDirection) + (value (name left) (c-name GTK_DIRECTION_LEFT)) + (value (name right) (c-name GTK_DIRECTION_RIGHT)) +) + +(enum SubmenuPlacement + (in-module Gtk) + (c-name GtkSubmenuPlacement) + (value (name top-bottom) (c-name GTK_TOP_BOTTOM)) + (value (name left-right) (c-name GTK_LEFT_RIGHT)) +) + +(enum ToolbarStyle + (in-module Gtk) + (c-name GtkToolbarStyle) + (value (name icons) (c-name GTK_TOOLBAR_ICONS)) + (value (name text) (c-name GTK_TOOLBAR_TEXT)) + (value (name both) (c-name GTK_TOOLBAR_BOTH)) +) + +(enum TroughType + (in-module Gtk) + (c-name GtkTroughType) + (value (name none) (c-name GTK_TROUGH_NONE)) + (value (name start) (c-name GTK_TROUGH_START)) + (value (name end) (c-name GTK_TROUGH_END)) + (value (name jump) (c-name GTK_TROUGH_JUMP)) +) + +(enum UpdateType + (in-module Gtk) + (c-name GtkUpdateType) + (value (name continuous) (c-name GTK_UPDATE_CONTINUOUS)) + (value (name discontinuous) (c-name GTK_UPDATE_DISCONTINUOUS)) + (value (name delayed) (c-name GTK_UPDATE_DELAYED)) +) + +(enum Visibility + (in-module Gtk) + (c-name GtkVisibility) + (value (name none) (c-name GTK_VISIBILITY_NONE)) + (value (name partial) (c-name GTK_VISIBILITY_PARTIAL)) + (value (name full) (c-name GTK_VISIBILITY_FULL)) +) + +(enum WindowPosition + (in-module Gtk) + (c-name GtkWindowPosition) + (value (name none) (c-name GTK_WIN_POS_NONE)) + (value (name center) (c-name GTK_WIN_POS_CENTER)) + (value (name mouse) (c-name GTK_WIN_POS_MOUSE)) + (value (name center-always) (c-name GTK_WIN_POS_CENTER_ALWAYS)) +) + +(enum WindowType + (in-module Gtk) + (c-name GtkWindowType) + (value (name toplevel) (c-name GTK_WINDOW_TOPLEVEL)) + (value (name dialog) (c-name GTK_WINDOW_DIALOG)) + (value (name popup) (c-name GTK_WINDOW_POPUP)) +) + +(enum SortType + (in-module Gtk) + (c-name GtkSortType) + (value (name ascending) (c-name GTK_SORT_ASCENDING)) + (value (name descending) (c-name GTK_SORT_DESCENDING)) +) + +(enum FontMetricType + (in-module Gtk) + (c-name GtkFontMetricType) + (value (name ixels) (c-name GTK_FONT_METRIC_PIXELS)) + (value (name oints) (c-name GTK_FONT_METRIC_POINTS)) +) + +(flags FontType + (in-module Gtk) + (c-name GtkFontType) + (value (name bitmap) (c-name GTK_FONT_BITMAP)) + (value (name scalable) (c-name GTK_FONT_SCALABLE)) + (value (name scalable-bitmap) (c-name GTK_FONT_SCALABLE_BITMAP)) + (value (name all) (c-name GTK_FONT_ALL)) +) + +(enum FontFilterType + (in-module Gtk) + (c-name GtkFontFilterType) + (value (name base) (c-name GTK_FONT_FILTER_BASE)) + (value (name user) (c-name GTK_FONT_FILTER_USER)) +) + +(flags ObjectFlags + (in-module Gtk) + (c-name GtkObjectFlags) + (value (name destroyed) (c-name GTK_DESTROYED)) + (value (name floating) (c-name GTK_FLOATING)) + (value (name connected) (c-name GTK_CONNECTED)) + (value (name constructed) (c-name GTK_CONSTRUCTED)) +) + +(flags ArgFlags + (in-module Gtk) + (c-name GtkArgFlags) + (value (name readable) (c-name GTK_ARG_READABLE)) + (value (name writable) (c-name GTK_ARG_WRITABLE)) + (value (name construct) (c-name GTK_ARG_CONSTRUCT)) + (value (name construct-only) (c-name GTK_ARG_CONSTRUCT_ONLY)) + (value (name child-arg) (c-name GTK_ARG_CHILD_ARG)) + (value (name mask) (c-name GTK_ARG_MASK)) + (value (name readwrite) (c-name GTK_ARG_READWRITE)) +) + +(flags PackerOptions + (in-module Gtk) + (c-name GtkPackerOptions) + (value (name pack-expand) (c-name GTK_PACK_EXPAND)) + (value (name fill-x) (c-name GTK_FILL_X)) + (value (name fill-y) (c-name GTK_FILL_Y)) +) + +(enum SideType + (in-module Gtk) + (c-name GtkSideType) + (value (name top) (c-name GTK_SIDE_TOP)) + (value (name bottom) (c-name GTK_SIDE_BOTTOM)) + (value (name left) (c-name GTK_SIDE_LEFT)) + (value (name right) (c-name GTK_SIDE_RIGHT)) +) + +(enum AnchorType + (in-module Gtk) + (c-name GtkAnchorType) + (value (name center) (c-name GTK_ANCHOR_CENTER)) + (value (name north) (c-name GTK_ANCHOR_NORTH)) + (value (name north-west) (c-name GTK_ANCHOR_NORTH_WEST)) + (value (name north-east) (c-name GTK_ANCHOR_NORTH_EAST)) + (value (name south) (c-name GTK_ANCHOR_SOUTH)) + (value (name south-west) (c-name GTK_ANCHOR_SOUTH_WEST)) + (value (name south-east) (c-name GTK_ANCHOR_SOUTH_EAST)) + (value (name west) (c-name GTK_ANCHOR_WEST)) + (value (name east) (c-name GTK_ANCHOR_EAST)) + (value (name n) (c-name GTK_ANCHOR_N)) + (value (name nw) (c-name GTK_ANCHOR_NW)) + (value (name ne) (c-name GTK_ANCHOR_NE)) + (value (name s) (c-name GTK_ANCHOR_S)) + (value (name sw) (c-name GTK_ANCHOR_SW)) + (value (name se) (c-name GTK_ANCHOR_SE)) + (value (name w) (c-name GTK_ANCHOR_W)) + (value (name e) (c-name GTK_ANCHOR_E)) +) + +(flags PrivateFlags + (in-module Gtk) + (c-name GtkPrivateFlags) + (value (name user-style) (c-name PRIVATE_GTK_USER_STYLE)) + (value (name redraw-pending) (c-name PRIVATE_GTK_REDRAW_PENDING)) + (value (name resize-pending) (c-name PRIVATE_GTK_RESIZE_PENDING)) + (value (name resize-needed) (c-name PRIVATE_GTK_RESIZE_NEEDED)) + (value (name leave-pending) (c-name PRIVATE_GTK_LEAVE_PENDING)) + (value (name has-shape-mask) (c-name PRIVATE_GTK_HAS_SHAPE_MASK)) + (value (name in-reparent) (c-name PRIVATE_GTK_IN_REPARENT)) + (value (name is-offscreen) (c-name PRIVATE_GTK_IS_OFFSCREEN)) + (value (name fulldraw-pending) (c-name PRIVATE_GTK_FULLDRAW_PENDING)) +) + +(enum ProgressBarStyle + (in-module Gtk) + (c-name GtkProgressBarStyle) + (value (name continuous) (c-name GTK_PROGRESS_CONTINUOUS)) + (value (name discrete) (c-name GTK_PROGRESS_DISCRETE)) +) + +(enum ProgressBarOrientation + (in-module Gtk) + (c-name GtkProgressBarOrientation) + (value (name left-to-right) (c-name GTK_PROGRESS_LEFT_TO_RIGHT)) + (value (name right-to-left) (c-name GTK_PROGRESS_RIGHT_TO_LEFT)) + (value (name bottom-to-top) (c-name GTK_PROGRESS_BOTTOM_TO_TOP)) + (value (name top-to-bottom) (c-name GTK_PROGRESS_TOP_TO_BOTTOM)) +) + +(flags RcFlags + (in-module Gtk) + (c-name GtkRcFlags) + (value (name fg) (c-name GTK_RC_FG)) + (value (name bg) (c-name GTK_RC_BG)) + (value (name text) (c-name GTK_RC_TEXT)) + (value (name base) (c-name GTK_RC_BASE)) +) + +(enum RcTokenType + (in-module Gtk) + (c-name GtkRcTokenType) + (value (name invalid) (c-name GTK_RC_TOKEN_INVALID)) + (value (name include) (c-name GTK_RC_TOKEN_INCLUDE)) + (value (name normal) (c-name GTK_RC_TOKEN_NORMAL)) + (value (name active) (c-name GTK_RC_TOKEN_ACTIVE)) + (value (name prelight) (c-name GTK_RC_TOKEN_PRELIGHT)) + (value (name selected) (c-name GTK_RC_TOKEN_SELECTED)) + (value (name insensitive) (c-name GTK_RC_TOKEN_INSENSITIVE)) + (value (name fg) (c-name GTK_RC_TOKEN_FG)) + (value (name bg) (c-name GTK_RC_TOKEN_BG)) + (value (name base) (c-name GTK_RC_TOKEN_BASE)) + (value (name text) (c-name GTK_RC_TOKEN_TEXT)) + (value (name font) (c-name GTK_RC_TOKEN_FONT)) + (value (name fontset) (c-name GTK_RC_TOKEN_FONTSET)) + (value (name bg-pixmap) (c-name GTK_RC_TOKEN_BG_PIXMAP)) + (value (name pixmap-path) (c-name GTK_RC_TOKEN_PIXMAP_PATH)) + (value (name style) (c-name GTK_RC_TOKEN_STYLE)) + (value (name binding) (c-name GTK_RC_TOKEN_BINDING)) + (value (name bind) (c-name GTK_RC_TOKEN_BIND)) + (value (name widget) (c-name GTK_RC_TOKEN_WIDGET)) + (value (name widget-class) (c-name GTK_RC_TOKEN_WIDGET_CLASS)) + (value (name class) (c-name GTK_RC_TOKEN_CLASS)) + (value (name lowest) (c-name GTK_RC_TOKEN_LOWEST)) + (value (name gtk) (c-name GTK_RC_TOKEN_GTK)) + (value (name application) (c-name GTK_RC_TOKEN_APPLICATION)) + (value (name rc) (c-name GTK_RC_TOKEN_RC)) + (value (name highest) (c-name GTK_RC_TOKEN_HIGHEST)) + (value (name engine) (c-name GTK_RC_TOKEN_ENGINE)) + (value (name module-path) (c-name GTK_RC_TOKEN_MODULE_PATH)) + (value (name last) (c-name GTK_RC_TOKEN_LAST)) +) + +(enum SpinButtonUpdatePolicy + (in-module Gtk) + (c-name GtkSpinButtonUpdatePolicy) + (value (name always) (c-name GTK_UPDATE_ALWAYS)) + (value (name if-valid) (c-name GTK_UPDATE_IF_VALID)) +) + +(enum SpinType + (in-module Gtk) + (c-name GtkSpinType) + (value (name step-forward) (c-name GTK_SPIN_STEP_FORWARD)) + (value (name step-backward) (c-name GTK_SPIN_STEP_BACKWARD)) + (value (name page-forward) (c-name GTK_SPIN_PAGE_FORWARD)) + (value (name page-backward) (c-name GTK_SPIN_PAGE_BACKWARD)) + (value (name home) (c-name GTK_SPIN_HOME)) + (value (name end) (c-name GTK_SPIN_END)) + (value (name user-defined) (c-name GTK_SPIN_USER_DEFINED)) +) + +(enum ToolbarChildType + (in-module Gtk) + (c-name GtkToolbarChildType) + (value (name space) (c-name GTK_TOOLBAR_CHILD_SPACE)) + (value (name button) (c-name GTK_TOOLBAR_CHILD_BUTTON)) + (value (name togglebutton) (c-name GTK_TOOLBAR_CHILD_TOGGLEBUTTON)) + (value (name radiobutton) (c-name GTK_TOOLBAR_CHILD_RADIOBUTTON)) + (value (name widget) (c-name GTK_TOOLBAR_CHILD_WIDGET)) +) + +(enum ToolbarSpaceStyle + (in-module Gtk) + (c-name GtkToolbarSpaceStyle) + (value (name empty) (c-name GTK_TOOLBAR_SPACE_EMPTY)) + (value (name line) (c-name GTK_TOOLBAR_SPACE_LINE)) +) + +(enum TreeViewMode + (in-module Gtk) + (c-name GtkTreeViewMode) + (value (name line) (c-name GTK_TREE_VIEW_LINE)) + (value (name item) (c-name GTK_TREE_VIEW_ITEM)) +) + +(enum FundamentalType + (in-module Gtk) + (c-name GtkFundamentalType) + (value (name invalid) (c-name GTK_TYPE_INVALID)) + (value (name none) (c-name GTK_TYPE_NONE)) + (value (name char) (c-name GTK_TYPE_CHAR)) + (value (name uchar) (c-name GTK_TYPE_UCHAR)) + (value (name bool) (c-name GTK_TYPE_BOOL)) + (value (name int) (c-name GTK_TYPE_INT)) + (value (name uint) (c-name GTK_TYPE_UINT)) + (value (name long) (c-name GTK_TYPE_LONG)) + (value (name ulong) (c-name GTK_TYPE_ULONG)) + (value (name float) (c-name GTK_TYPE_FLOAT)) + (value (name double) (c-name GTK_TYPE_DOUBLE)) + (value (name string) (c-name GTK_TYPE_STRING)) + (value (name enum) (c-name GTK_TYPE_ENUM)) + (value (name flags) (c-name GTK_TYPE_FLAGS)) + (value (name boxed) (c-name GTK_TYPE_BOXED)) + (value (name pointer) (c-name GTK_TYPE_POINTER)) + (value (name signal) (c-name GTK_TYPE_SIGNAL)) + (value (name args) (c-name GTK_TYPE_ARGS)) + (value (name callback) (c-name GTK_TYPE_CALLBACK)) + (value (name c-callback) (c-name GTK_TYPE_C_CALLBACK)) + (value (name foreign) (c-name GTK_TYPE_FOREIGN)) + (value (name object) (c-name GTK_TYPE_OBJECT)) +) + +(flags WidgetFlags + (in-module Gtk) + (c-name GtkWidgetFlags) + (value (name toplevel) (c-name GTK_TOPLEVEL)) + (value (name no-window) (c-name GTK_NO_WINDOW)) + (value (name realized) (c-name GTK_REALIZED)) + (value (name mapped) (c-name GTK_MAPPED)) + (value (name visible) (c-name GTK_VISIBLE)) + (value (name sensitive) (c-name GTK_SENSITIVE)) + (value (name parent-sensitive) (c-name GTK_PARENT_SENSITIVE)) + (value (name can-focus) (c-name GTK_CAN_FOCUS)) + (value (name has-focus) (c-name GTK_HAS_FOCUS)) + (value (name can-default) (c-name GTK_CAN_DEFAULT)) + (value (name has-default) (c-name GTK_HAS_DEFAULT)) + (value (name has-grab) (c-name GTK_HAS_GRAB)) + (value (name rc-style) (c-name GTK_RC_STYLE)) + (value (name composite-child) (c-name GTK_COMPOSITE_CHILD)) + (value (name no-reparent) (c-name GTK_NO_REPARENT)) + (value (name app-paintable) (c-name GTK_APP_PAINTABLE)) + (value (name receives-default) (c-name GTK_RECEIVES_DEFAULT)) +) + + +(include "gtk-extrafuncs.defs") + + +;; From /usr/include/gtk/gtk.h + + + +;; From /usr/include/gtk/gtkaccelgroup.h + +(function gtk_accelerator_valid + (c-name gtk_accelerator_valid) + (return-type gboolean) + (parameter (type-and-name guint keyval)) + (parameter (type-and-name GdkModifierType modifiers)) +) + +(function gtk_accelerator_parse + (c-name gtk_accelerator_parse) + (return-type none) + (parameter (type-and-name const-gchar* accelerator)) + (parameter (type-and-name guint* accelerator_key)) + (parameter (type-and-name GdkModifierType* accelerator_mods)) +) + +(function gtk_accelerator_name + (c-name gtk_accelerator_name) + (return-type gchar*) + (parameter (type-and-name guint accelerator_key)) + (parameter (type-and-name GdkModifierType accelerator_mods)) +) + +(function gtk_accelerator_set_default_mod_mask + (c-name gtk_accelerator_set_default_mod_mask) + (return-type none) + (parameter (type-and-name GdkModifierType default_mod_mask)) +) + +(function gtk_accelerator_get_default_mod_mask + (c-name gtk_accelerator_get_default_mod_mask) + (return-type guint) +) + +(function GtkAccelGroup + (c-name gtk_accel_group_new) + (return-type GtkAccelGroup*) +) + +(function accel_group_get_default + (c-name gtk_accel_group_get_default) + (return-type GtkAccelGroup*) +) + +(method ref + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_ref) + (return-type GtkAccelGroup*) +) + +(method unref + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_unref) + (return-type none) +) + +(method lock + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_lock) + (return-type none) +) + +(method unlock + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_unlock) + (return-type none) +) + +(function gtk_accel_groups_activate + (c-name gtk_accel_groups_activate) + (return-type gboolean) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method activate + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_activate) + (return-type gboolean) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method attach + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_attach) + (return-type none) + (parameter (type-and-name GtkObject* object)) +) + +(method detach + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_detach) + (return-type none) + (parameter (type-and-name GtkObject* object)) +) + +(method get_entry + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_get_entry) + (return-type GtkAccelEntry*) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method lock_entry + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_lock_entry) + (return-type none) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method unlock_entry + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_unlock_entry) + (return-type none) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(method add + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_add) + (return-type none) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) + (parameter (type-and-name GtkAccelFlags accel_flags)) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* accel_signal)) +) + +(method remove + (of-object AccelGroup (Gtk)) + (c-name gtk_accel_group_remove) + (return-type none) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) + (parameter (type-and-name GtkObject* object)) +) + +(function gtk_accel_group_handle_add + (c-name gtk_accel_group_handle_add) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint accel_signal_id)) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) + (parameter (type-and-name GtkAccelFlags accel_flags)) +) + +(function gtk_accel_group_handle_remove + (c-name gtk_accel_group_handle_remove) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name GdkModifierType accel_mods)) +) + +(function gtk_accel_group_create_add + (c-name gtk_accel_group_create_add) + (return-type guint) + (parameter (type-and-name GtkType class_type)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name guint handler_offset)) +) + +(function gtk_accel_group_create_remove + (c-name gtk_accel_group_create_remove) + (return-type guint) + (parameter (type-and-name GtkType class_type)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name guint handler_offset)) +) + +(function gtk_accel_groups_from_object + (c-name gtk_accel_groups_from_object) + (return-type GSList*) + (parameter (type-and-name GtkObject* object)) +) + +(function gtk_accel_group_entries_from_object + (c-name gtk_accel_group_entries_from_object) + (return-type GSList*) + (parameter (type-and-name GtkObject* object)) +) + + + +;; From /usr/include/gtk/gtkaccellabel.h + +(function gtk_accel_label_get_type + (c-name gtk_accel_label_get_type) + (return-type GtkType) +) + +(function gtk_accel_label_new + (c-name gtk_accel_label_new) + (is-constructor-of GtkAccelLabel) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* string)) +) + +(method get_accel_width + (of-object AccelLabel (Gtk)) + (c-name gtk_accel_label_get_accel_width) + (return-type guint) +) + +(method set_accel_widget + (of-object AccelLabel (Gtk)) + (c-name gtk_accel_label_set_accel_widget) + (return-type none) + (parameter (type-and-name GtkWidget* accel_widget)) +) + +(method refetch + (of-object AccelLabel (Gtk)) + (c-name gtk_accel_label_refetch) + (return-type gboolean) +) + + + +;; From /usr/include/gtk/gtkadjustment.h + +(function gtk_adjustment_get_type + (c-name gtk_adjustment_get_type) + (return-type GtkType) +) + +(function gtk_adjustment_new + (c-name gtk_adjustment_new) + (is-constructor-of GtkAdjustment) + (return-type GtkObject*) + (parameter (type-and-name gfloat value)) + (parameter (type-and-name gfloat lower)) + (parameter (type-and-name gfloat upper)) + (parameter (type-and-name gfloat step_increment)) + (parameter (type-and-name gfloat page_increment)) + (parameter (type-and-name gfloat page_size)) +) + +(method changed + (of-object Adjustment (Gtk)) + (c-name gtk_adjustment_changed) + (return-type none) +) + +(method value_changed + (of-object Adjustment (Gtk)) + (c-name gtk_adjustment_value_changed) + (return-type none) +) + +(method clamp_page + (of-object Adjustment (Gtk)) + (c-name gtk_adjustment_clamp_page) + (return-type none) + (parameter (type-and-name gfloat lower)) + (parameter (type-and-name gfloat upper)) +) + +(method set_value + (of-object Adjustment (Gtk)) + (c-name gtk_adjustment_set_value) + (return-type none) + (parameter (type-and-name gfloat value)) +) + + + +;; From /usr/include/gtk/gtkalignment.h + +(function gtk_alignment_get_type + (c-name gtk_alignment_get_type) + (return-type GtkType) +) + +(function gtk_alignment_new + (c-name gtk_alignment_new) + (is-constructor-of GtkAlignment) + (return-type GtkWidget*) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) + (parameter (type-and-name gfloat xscale)) + (parameter (type-and-name gfloat yscale)) +) + +(method set + (of-object Alignment (Gtk)) + (c-name gtk_alignment_set) + (return-type none) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) + (parameter (type-and-name gfloat xscale)) + (parameter (type-and-name gfloat yscale)) +) + + + +;; From /usr/include/gtk/gtkarrow.h + +(function gtk_arrow_get_type + (c-name gtk_arrow_get_type) + (return-type GtkType) +) + +(function gtk_arrow_new + (c-name gtk_arrow_new) + (is-constructor-of GtkArrow) + (return-type GtkWidget*) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name GtkShadowType shadow_type)) +) + +(method set + (of-object Arrow (Gtk)) + (c-name gtk_arrow_set) + (return-type none) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name GtkShadowType shadow_type)) +) + + + +;; From /usr/include/gtk/gtkaspectframe.h + +(function gtk_aspect_frame_get_type + (c-name gtk_aspect_frame_get_type) + (return-type GtkType) +) + +(function gtk_aspect_frame_new + (c-name gtk_aspect_frame_new) + (is-constructor-of GtkAspectFrame) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label) (null-ok) (default "NULL")) + (parameter (type-and-name gfloat xalign) (default "0.5")) + (parameter (type-and-name gfloat yalign) (default "0.5")) + (parameter (type-and-name gfloat ratio) (default "1.0")) + (parameter (type-and-name gboolean obey_child) (default "TRUE")) +) + +(method set + (of-object AspectFrame (Gtk)) + (c-name gtk_aspect_frame_set) + (return-type none) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) + (parameter (type-and-name gfloat ratio)) + (parameter (type-and-name gboolean obey_child)) +) + + + +;; From /usr/include/gtk/gtkbbox.h + +(function gtk_button_box_get_type + (c-name gtk_button_box_get_type) + (return-type GtkType) +) + +(function button_box_get_child_size_default + (c-name gtk_button_box_get_child_size_default) + (return-type none) + (parameter (type-and-name gint* min_width)) + (parameter (type-and-name gint* min_height)) +) + +(function button_box_get_child_ipadding_default + (c-name gtk_button_box_get_child_ipadding_default) + (return-type none) + (parameter (type-and-name gint* ipad_x)) + (parameter (type-and-name gint* ipad_y)) +) + +(function button_box_set_child_size_default + (c-name gtk_button_box_set_child_size_default) + (return-type none) + (parameter (type-and-name gint min_width)) + (parameter (type-and-name gint min_height)) +) + +(function button_box_set_child_ipadding_default + (c-name gtk_button_box_set_child_ipadding_default) + (return-type none) + (parameter (type-and-name gint ipad_x)) + (parameter (type-and-name gint ipad_y)) +) + +(method get_spacing + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_get_spacing) + (return-type gint) +) + +(method get_layout + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_get_layout) + (return-type GtkButtonBoxStyle) +) + +(method get_child_size + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_get_child_size) + (return-type none) + (parameter (type-and-name gint* min_width)) + (parameter (type-and-name gint* min_height)) +) + +(method get_child_ipadding + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_get_child_ipadding) + (return-type none) + (parameter (type-and-name gint* ipad_x)) + (parameter (type-and-name gint* ipad_y)) +) + +(method set_spacing + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_set_spacing) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(method set_layout + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_set_layout) + (return-type none) + (parameter (type-and-name GtkButtonBoxStyle layout_style)) +) + +(method set_child_size + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_set_child_size) + (return-type none) + (parameter (type-and-name gint min_width)) + (parameter (type-and-name gint min_height)) +) + +(method set_child_ipadding + (of-object ButtonBox (Gtk)) + (c-name gtk_button_box_set_child_ipadding) + (return-type none) + (parameter (type-and-name gint ipad_x)) + (parameter (type-and-name gint ipad_y)) +) + +(function gtk_button_box_child_requisition + (c-name gtk_button_box_child_requisition) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name int* nvis_children)) + (parameter (type-and-name int* width)) + (parameter (type-and-name int* height)) +) + + + +;; From /usr/include/gtk/gtkbin.h + +(function gtk_bin_get_type + (c-name gtk_bin_get_type) + (return-type GtkType) +) + + + +;; From /usr/include/gtk/gtkbox.h + +(function gtk_box_get_type + (c-name gtk_box_get_type) + (return-type GtkType) +) + +(method pack_start + (of-object Box (Gtk)) + (c-name gtk_box_pack_start) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean expand) (default "TRUE")) + (parameter (type-and-name gboolean fill) (default "TRUE")) + (parameter (type-and-name guint padding) (default "0")) +) + +(method pack_end + (of-object Box (Gtk)) + (c-name gtk_box_pack_end) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean expand) (default "TRUE")) + (parameter (type-and-name gboolean fill) (default "TRUE")) + (parameter (type-and-name guint padding) (default "0")) +) + +(method pack_start_defaults + (of-object Box (Gtk)) + (c-name gtk_box_pack_start_defaults) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(method pack_end_defaults + (of-object Box (Gtk)) + (c-name gtk_box_pack_end_defaults) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(method set_homogeneous + (of-object Box (Gtk)) + (c-name gtk_box_set_homogeneous) + (return-type none) + (parameter (type-and-name gboolean homogeneous)) +) + +(method set_spacing + (of-object Box (Gtk)) + (c-name gtk_box_set_spacing) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(method reorder_child + (of-object Box (Gtk)) + (c-name gtk_box_reorder_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method query_child_packing + (of-object Box (Gtk)) + (c-name gtk_box_query_child_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean* expand)) + (parameter (type-and-name gboolean* fill)) + (parameter (type-and-name guint* padding)) + (parameter (type-and-name GtkPackType* pack_type)) +) + +(method set_child_packing + (of-object Box (Gtk)) + (c-name gtk_box_set_child_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean expand)) + (parameter (type-and-name gboolean fill)) + (parameter (type-and-name guint padding)) + (parameter (type-and-name GtkPackType pack_type)) +) + + + +;; From /usr/include/gtk/gtkbutton.h + +(function gtk_button_get_type + (c-name gtk_button_get_type) + (return-type GtkType) +) + +(function gtk_button_new + (c-name gtk_button_new) + (is-constructor-of GtkButton) + (return-type GtkWidget*) +) + +(function gtk_button_new_with_label + (c-name gtk_button_new_with_label) + (is-constructor-of GtkButton) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method pressed + (of-object Button (Gtk)) + (c-name gtk_button_pressed) + (return-type none) +) + +(method released + (of-object Button (Gtk)) + (c-name gtk_button_released) + (return-type none) +) + +(method clicked + (of-object Button (Gtk)) + (c-name gtk_button_clicked) + (return-type none) +) + +(method enter + (of-object Button (Gtk)) + (c-name gtk_button_enter) + (return-type none) +) + +(method leave + (of-object Button (Gtk)) + (c-name gtk_button_leave) + (return-type none) +) + +(method set_relief + (of-object Button (Gtk)) + (c-name gtk_button_set_relief) + (return-type none) + (parameter (type-and-name GtkReliefStyle newstyle)) +) + +(method get_relief + (of-object Button (Gtk)) + (c-name gtk_button_get_relief) + (return-type GtkReliefStyle) +) + + + +;; From /usr/include/gtk/gtkcalendar.h + +(function gtk_calendar_get_type + (c-name gtk_calendar_get_type) + (return-type GtkType) +) + +(function gtk_calendar_new + (c-name gtk_calendar_new) + (is-constructor-of GtkCalendar) + (return-type GtkWidget*) +) + +(method select_month + (of-object Calendar (Gtk)) + (c-name gtk_calendar_select_month) + (return-type gint) + (parameter (type-and-name guint month)) + (parameter (type-and-name guint year)) +) + +(method select_day + (of-object Calendar (Gtk)) + (c-name gtk_calendar_select_day) + (return-type none) + (parameter (type-and-name guint day)) +) + +(method mark_day + (of-object Calendar (Gtk)) + (c-name gtk_calendar_mark_day) + (return-type gint) + (parameter (type-and-name guint day)) +) + +(method unmark_day + (of-object Calendar (Gtk)) + (c-name gtk_calendar_unmark_day) + (return-type gint) + (parameter (type-and-name guint day)) +) + +(method clear_marks + (of-object Calendar (Gtk)) + (c-name gtk_calendar_clear_marks) + (return-type none) +) + +(method display_options + (of-object Calendar (Gtk)) + (c-name gtk_calendar_display_options) + (return-type none) + (parameter (type-and-name GtkCalendarDisplayOptions flags)) +) + +(method get_date + (of-object Calendar (Gtk)) + (c-name gtk_calendar_get_date) + (return-type none) + (parameter (type-and-name guint* year)) + (parameter (type-and-name guint* month)) + (parameter (type-and-name guint* day)) +) + +(method freeze + (of-object Calendar (Gtk)) + (c-name gtk_calendar_freeze) + (return-type none) +) + +(method thaw + (of-object Calendar (Gtk)) + (c-name gtk_calendar_thaw) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkcheckbutton.h + +(function gtk_check_button_get_type + (c-name gtk_check_button_get_type) + (return-type GtkType) +) + +(function gtk_check_button_new + (c-name gtk_check_button_new) + (is-constructor-of GtkCheckButton) + (return-type GtkWidget*) +) + +(function gtk_check_button_new_with_label + (c-name gtk_check_button_new_with_label) + (is-constructor-of GtkCheckButton) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + + + +;; From /usr/include/gtk/gtkcheckmenuitem.h + +(function gtk_check_menu_item_get_type + (c-name gtk_check_menu_item_get_type) + (return-type GtkType) +) + +(function gtk_check_menu_item_new + (c-name gtk_check_menu_item_new) + (is-constructor-of GtkCheckMenuItem) + (return-type GtkWidget*) +) + +(function gtk_check_menu_item_new_with_label + (c-name gtk_check_menu_item_new_with_label) + (is-constructor-of GtkCheckMenuItem) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method set_active + (of-object CheckMenuItem (Gtk)) + (c-name gtk_check_menu_item_set_active) + (return-type none) + (parameter (type-and-name gboolean is_active)) +) + +(method set_show_toggle + (of-object CheckMenuItem (Gtk)) + (c-name gtk_check_menu_item_set_show_toggle) + (return-type none) + (parameter (type-and-name gboolean always)) +) + +(method toggled + (of-object CheckMenuItem (Gtk)) + (c-name gtk_check_menu_item_toggled) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkclist.h + +(function gtk_clist_get_type + (c-name gtk_clist_get_type) + (return-type GtkType) +) + +(method construct + (of-object CList (Gtk)) + (c-name gtk_clist_construct) + (return-type none) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gchar*[] titles)) +) + +(function gtk_clist_new + (c-name gtk_clist_new) + (is-constructor-of GtkCList) + (return-type GtkWidget*) + (parameter (type-and-name gint columns)) +) + +(function gtk_clist_new_with_titles + (c-name gtk_clist_new_with_titles) + (is-constructor-of GtkCList) + (return-type GtkWidget*) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gchar*[] titles)) +) + +(method set_hadjustment + (of-object CList (Gtk)) + (c-name gtk_clist_set_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_vadjustment + (of-object CList (Gtk)) + (c-name gtk_clist_set_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method get_hadjustment + (of-object CList (Gtk)) + (c-name gtk_clist_get_hadjustment) + (return-type GtkAdjustment*) +) + +(method get_vadjustment + (of-object CList (Gtk)) + (c-name gtk_clist_get_vadjustment) + (return-type GtkAdjustment*) +) + +(method set_shadow_type + (of-object CList (Gtk)) + (c-name gtk_clist_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + +(method set_selection_mode + (of-object CList (Gtk)) + (c-name gtk_clist_set_selection_mode) + (return-type none) + (parameter (type-and-name GtkSelectionMode mode)) +) + +(method set_reorderable + (of-object CList (Gtk)) + (c-name gtk_clist_set_reorderable) + (return-type none) + (parameter (type-and-name gboolean reorderable)) +) + +(method set_use_drag_icons + (of-object CList (Gtk)) + (c-name gtk_clist_set_use_drag_icons) + (return-type none) + (parameter (type-and-name gboolean use_icons)) +) + +(method set_button_actions + (of-object CList (Gtk)) + (c-name gtk_clist_set_button_actions) + (return-type none) + (parameter (type-and-name guint button)) + (parameter (type-and-name guint8 button_actions)) +) + +(method freeze + (of-object CList (Gtk)) + (c-name gtk_clist_freeze) + (return-type none) +) + +(method thaw + (of-object CList (Gtk)) + (c-name gtk_clist_thaw) + (return-type none) +) + +(method column_titles_show + (of-object CList (Gtk)) + (c-name gtk_clist_column_titles_show) + (return-type none) +) + +(method column_titles_hide + (of-object CList (Gtk)) + (c-name gtk_clist_column_titles_hide) + (return-type none) +) + +(method column_title_active + (of-object CList (Gtk)) + (c-name gtk_clist_column_title_active) + (return-type none) + (parameter (type-and-name gint column)) +) + +(method column_title_passive + (of-object CList (Gtk)) + (c-name gtk_clist_column_title_passive) + (return-type none) + (parameter (type-and-name gint column)) +) + +(method column_titles_active + (of-object CList (Gtk)) + (c-name gtk_clist_column_titles_active) + (return-type none) +) + +(method column_titles_passive + (of-object CList (Gtk)) + (c-name gtk_clist_column_titles_passive) + (return-type none) +) + +(method set_column_title + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_title) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* title)) +) + +(method get_column_title + (of-object CList (Gtk)) + (c-name gtk_clist_get_column_title) + (return-type gchar*) + (parameter (type-and-name gint column)) +) + +(method set_column_widget + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_widget) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name GtkWidget* widget)) +) + +(method get_column_widget + (of-object CList (Gtk)) + (c-name gtk_clist_get_column_widget) + (return-type GtkWidget*) + (parameter (type-and-name gint column)) +) + +(method set_column_justification + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_justification) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name GtkJustification justification)) +) + +(method set_column_visibility + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_visibility) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gboolean visible)) +) + +(method set_column_resizeable + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_resizeable) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gboolean resizeable)) +) + +(method set_column_auto_resize + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_auto_resize) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gboolean auto_resize)) +) + +(method columns_autosize + (of-object CList (Gtk)) + (c-name gtk_clist_columns_autosize) + (return-type gint) +) + +(method optimal_column_width + (of-object CList (Gtk)) + (c-name gtk_clist_optimal_column_width) + (return-type gint) + (parameter (type-and-name gint column)) +) + +(method set_column_width + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_width) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint width)) +) + +(method set_column_min_width + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_min_width) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint min_width)) +) + +(method set_column_max_width + (of-object CList (Gtk)) + (c-name gtk_clist_set_column_max_width) + (return-type none) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint max_width)) +) + +(method set_row_height + (of-object CList (Gtk)) + (c-name gtk_clist_set_row_height) + (return-type none) + (parameter (type-and-name guint height)) +) + +(method moveto + (of-object CList (Gtk)) + (c-name gtk_clist_moveto) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gfloat row_align)) + (parameter (type-and-name gfloat col_align)) +) + +(method row_is_visible + (of-object CList (Gtk)) + (c-name gtk_clist_row_is_visible) + (return-type GtkVisibility) + (parameter (type-and-name gint row)) +) + +(method get_cell_type + (of-object CList (Gtk)) + (c-name gtk_clist_get_cell_type) + (return-type GtkCellType) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) +) + +(method set_text + (of-object CList (Gtk)) + (c-name gtk_clist_set_text) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* text)) +) + +(method get_text + (of-object CList (Gtk)) + (c-name gtk_clist_get_text) + (return-type gint) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gchar** text)) +) + +(method set_pixmap + (of-object CList (Gtk)) + (c-name gtk_clist_set_pixmap) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method get_pixmap + (of-object CList (Gtk)) + (c-name gtk_clist_get_pixmap) + (return-type gint) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GdkPixmap** pixmap)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method set_pixtext + (of-object CList (Gtk)) + (c-name gtk_clist_set_pixtext) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* text)) + (parameter (type-and-name guint8 spacing)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method get_pixtext + (of-object CList (Gtk)) + (c-name gtk_clist_get_pixtext) + (return-type gint) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gchar** text)) + (parameter (type-and-name guint8* spacing)) + (parameter (type-and-name GdkPixmap** pixmap)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method set_foreground + (of-object CList (Gtk)) + (c-name gtk_clist_set_foreground) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name GdkColor* color)) +) + +(method set_background + (of-object CList (Gtk)) + (c-name gtk_clist_set_background) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name GdkColor* color)) +) + +(method set_cell_style + (of-object CList (Gtk)) + (c-name gtk_clist_set_cell_style) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GtkStyle* style)) +) + +(method get_cell_style + (of-object CList (Gtk)) + (c-name gtk_clist_get_cell_style) + (return-type GtkStyle*) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) +) + +(method set_row_style + (of-object CList (Gtk)) + (c-name gtk_clist_set_row_style) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name GtkStyle* style)) +) + +(method get_row_style + (of-object CList (Gtk)) + (c-name gtk_clist_get_row_style) + (return-type GtkStyle*) + (parameter (type-and-name gint row)) +) + +(method set_shift + (of-object CList (Gtk)) + (c-name gtk_clist_set_shift) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint vertical)) + (parameter (type-and-name gint horizontal)) +) + +(method set_selectable + (of-object CList (Gtk)) + (c-name gtk_clist_set_selectable) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gboolean selectable)) +) + +(method get_selectable + (of-object CList (Gtk)) + (c-name gtk_clist_get_selectable) + (return-type gboolean) + (parameter (type-and-name gint row)) +) + +(method prepend + (of-object CList (Gtk)) + (c-name gtk_clist_prepend) + (return-type gint) + (parameter (type-and-name gchar*[] text)) +) + +(method append + (of-object CList (Gtk)) + (c-name gtk_clist_append) + (return-type gint) + (parameter (type-and-name gchar*[] text)) +) + +(method insert + (of-object CList (Gtk)) + (c-name gtk_clist_insert) + (return-type gint) + (parameter (type-and-name gint row)) + (parameter (type-and-name gchar*[] text)) +) + +(method remove + (of-object CList (Gtk)) + (c-name gtk_clist_remove) + (return-type none) + (parameter (type-and-name gint row)) +) + +(method set_row_data + (of-object CList (Gtk)) + (c-name gtk_clist_set_row_data) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gpointer data)) +) + +(method set_row_data_full + (of-object CList (Gtk)) + (c-name gtk_clist_set_row_data_full) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(method get_row_data + (of-object CList (Gtk)) + (c-name gtk_clist_get_row_data) + (return-type gpointer) + (parameter (type-and-name gint row)) +) + +(method find_row_from_data + (of-object CList (Gtk)) + (c-name gtk_clist_find_row_from_data) + (return-type gint) + (parameter (type-and-name gpointer data)) +) + +(method select_row + (of-object CList (Gtk)) + (c-name gtk_clist_select_row) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) +) + +(method unselect_row + (of-object CList (Gtk)) + (c-name gtk_clist_unselect_row) + (return-type none) + (parameter (type-and-name gint row)) + (parameter (type-and-name gint column)) +) + +(method undo_selection + (of-object CList (Gtk)) + (c-name gtk_clist_undo_selection) + (return-type none) +) + +(method clear + (of-object CList (Gtk)) + (c-name gtk_clist_clear) + (return-type none) +) + +(method get_selection_info + (of-object CList (Gtk)) + (c-name gtk_clist_get_selection_info) + (return-type gint) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint* row)) + (parameter (type-and-name gint* column)) +) + +(method select_all + (of-object CList (Gtk)) + (c-name gtk_clist_select_all) + (return-type none) +) + +(method unselect_all + (of-object CList (Gtk)) + (c-name gtk_clist_unselect_all) + (return-type none) +) + +(method swap_rows + (of-object CList (Gtk)) + (c-name gtk_clist_swap_rows) + (return-type none) + (parameter (type-and-name gint row1)) + (parameter (type-and-name gint row2)) +) + +(method row_move + (of-object CList (Gtk)) + (c-name gtk_clist_row_move) + (return-type none) + (parameter (type-and-name gint source_row)) + (parameter (type-and-name gint dest_row)) +) + +(method set_compare_func + (of-object CList (Gtk)) + (c-name gtk_clist_set_compare_func) + (return-type none) + (parameter (type-and-name GtkCListCompareFunc cmp_func)) +) + +(method set_sort_column + (of-object CList (Gtk)) + (c-name gtk_clist_set_sort_column) + (return-type none) + (parameter (type-and-name gint column)) +) + +(method set_sort_type + (of-object CList (Gtk)) + (c-name gtk_clist_set_sort_type) + (return-type none) + (parameter (type-and-name GtkSortType sort_type)) +) + +(method sort + (of-object CList (Gtk)) + (c-name gtk_clist_sort) + (return-type none) +) + +(method set_auto_sort + (of-object CList (Gtk)) + (c-name gtk_clist_set_auto_sort) + (return-type none) + (parameter (type-and-name gboolean auto_sort)) +) + + + +;; From /usr/include/gtk/gtkcolorsel.h + +(function gtk_color_selection_get_type + (c-name gtk_color_selection_get_type) + (return-type GtkType) +) + +(function gtk_color_selection_new + (c-name gtk_color_selection_new) + (is-constructor-of GtkColorSelection) + (return-type GtkWidget*) +) + +(method set_update_policy + (of-object ColorSelection (Gtk)) + (c-name gtk_color_selection_set_update_policy) + (return-type none) + (parameter (type-and-name GtkUpdateType policy)) +) + +(method set_opacity + (of-object ColorSelection (Gtk)) + (c-name gtk_color_selection_set_opacity) + (return-type none) + (parameter (type-and-name gint use_opacity)) +) + +(method set_color + (of-object ColorSelection (Gtk)) + (c-name gtk_color_selection_set_color) + (return-type none) + (parameter (type-and-name gdouble* color)) +) + +(method get_color + (of-object ColorSelection (Gtk)) + (c-name gtk_color_selection_get_color) + (return-type none) + (parameter (type-and-name gdouble* color)) +) + +(function gtk_color_selection_dialog_get_type + (c-name gtk_color_selection_dialog_get_type) + (return-type GtkType) +) + +(function gtk_color_selection_dialog_new + (c-name gtk_color_selection_dialog_new) + (is-constructor-of GtkColorSelectionDialog) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* title)) +) + + + +;; From /usr/include/gtk/gtkcombo.h + +(function gtk_combo_get_type + (c-name gtk_combo_get_type) + (return-type guint) +) + +(function gtk_combo_new + (c-name gtk_combo_new) + (is-constructor-of GtkCombo) + (return-type GtkWidget*) +) + +(method set_value_in_list + (of-object Combo (Gtk)) + (c-name gtk_combo_set_value_in_list) + (return-type none) + (parameter (type-and-name gint val)) + (parameter (type-and-name gint ok_if_empty)) +) + +(method set_use_arrows + (of-object Combo (Gtk)) + (c-name gtk_combo_set_use_arrows) + (return-type none) + (parameter (type-and-name gint val)) +) + +(method set_use_arrows_always + (of-object Combo (Gtk)) + (c-name gtk_combo_set_use_arrows_always) + (return-type none) + (parameter (type-and-name gint val)) +) + +(method set_case_sensitive + (of-object Combo (Gtk)) + (c-name gtk_combo_set_case_sensitive) + (return-type none) + (parameter (type-and-name gint val)) +) + +(method set_item_string + (of-object Combo (Gtk)) + (c-name gtk_combo_set_item_string) + (return-type none) + (parameter (type-and-name GtkItem* item)) + (parameter (type-and-name const-gchar* item_value)) +) + +(method set_popdown_strings + (of-object Combo (Gtk)) + (c-name gtk_combo_set_popdown_strings) + (return-type none) + (parameter (type-and-name GList* strings)) +) + +(method disable_activate + (of-object Combo (Gtk)) + (c-name gtk_combo_disable_activate) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkcontainer.h + +(function gtk_container_get_type + (c-name gtk_container_get_type) + (return-type GtkType) +) + +(method set_border_width + (of-object Container (Gtk)) + (c-name gtk_container_set_border_width) + (return-type none) + (parameter (type-and-name guint border_width)) +) + +(method add + (of-object Container (Gtk)) + (c-name gtk_container_add) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(method remove + (of-object Container (Gtk)) + (c-name gtk_container_remove) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(method set_resize_mode + (of-object Container (Gtk)) + (c-name gtk_container_set_resize_mode) + (return-type none) + (parameter (type-and-name GtkResizeMode resize_mode)) +) + +(method check_resize + (of-object Container (Gtk)) + (c-name gtk_container_check_resize) + (return-type none) +) + +(method foreach + (of-object Container (Gtk)) + (c-name gtk_container_foreach) + (return-type none) + (parameter (type-and-name GtkCallback callback)) + (parameter (type-and-name gpointer callback_data)) +) + +(method foreach_full + (of-object Container (Gtk)) + (c-name gtk_container_foreach_full) + (return-type none) + (parameter (type-and-name GtkCallback callback)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer callback_data)) + (parameter (type-and-name GtkDestroyNotify notify)) +) + +(method children + (of-object Container (Gtk)) + (c-name gtk_container_children) + (return-type GList*) +) + +(method focus + (of-object Container (Gtk)) + (c-name gtk_container_focus) + (return-type gint) + (parameter (type-and-name GtkDirectionType direction)) +) + +(method set_reallocate_redraws + (of-object Container (Gtk)) + (c-name gtk_container_set_reallocate_redraws) + (return-type none) + (parameter (type-and-name gboolean needs_redraws)) +) + +(method set_focus_child + (of-object Container (Gtk)) + (c-name gtk_container_set_focus_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_focus_vadjustment + (of-object Container (Gtk)) + (c-name gtk_container_set_focus_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_focus_hadjustment + (of-object Container (Gtk)) + (c-name gtk_container_set_focus_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method register_toplevel + (of-object Container (Gtk)) + (c-name gtk_container_register_toplevel) + (return-type none) +) + +(method unregister_toplevel + (of-object Container (Gtk)) + (c-name gtk_container_unregister_toplevel) + (return-type none) +) + +(function gtk_container_get_toplevels + (c-name gtk_container_get_toplevels) + (return-type GList*) +) + +(method resize_children + (of-object Container (Gtk)) + (c-name gtk_container_resize_children) + (return-type none) +) + +(method child_type + (of-object Container (Gtk)) + (c-name gtk_container_child_type) + (return-type GtkType) +) + +(function gtk_container_add_child_arg_type + (c-name gtk_container_add_child_arg_type) + (return-type none) + (parameter (type-and-name const-gchar* arg_name)) + (parameter (type-and-name GtkType arg_type)) + (parameter (type-and-name guint arg_flags)) + (parameter (type-and-name guint arg_id)) +) + +(function gtk_container_query_child_args + (c-name gtk_container_query_child_args) + (return-type GtkArg*) + (parameter (type-and-name GtkType class_type)) + (parameter (type-and-name guint32** arg_flags)) + (parameter (type-and-name guint* nargs)) +) + +(method child_getv + (of-object Container (Gtk)) + (c-name gtk_container_child_getv) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method child_setv + (of-object Container (Gtk)) + (c-name gtk_container_child_setv) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method add_with_args + (of-object Container (Gtk)) + (c-name gtk_container_add_with_args) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method addv + (of-object Container (Gtk)) + (c-name gtk_container_addv) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method child_set + (of-object Container (Gtk)) + (c-name gtk_container_child_set) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method queue_resize + (of-object Container (Gtk)) + (c-name gtk_container_queue_resize) + (return-type none) +) + +(method clear_resize_widgets + (of-object Container (Gtk)) + (c-name gtk_container_clear_resize_widgets) + (return-type none) +) + +(method arg_set + (of-object Container (Gtk)) + (c-name gtk_container_arg_set) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkArg* arg)) + (parameter (type-and-name GtkArgInfo* info)) +) + +(method arg_get + (of-object Container (Gtk)) + (c-name gtk_container_arg_get) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkArg* arg)) + (parameter (type-and-name GtkArgInfo* info)) +) + +(function gtk_container_child_args_collect + (c-name gtk_container_child_args_collect) + (return-type gchar*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name GSList** arg_list_p)) + (parameter (type-and-name GSList** info_list_p)) + (parameter (type-and-name const-gchar* first_arg_name)) + (parameter (type-and-name va_list args)) +) + +(function gtk_container_child_arg_get_info + (c-name gtk_container_child_arg_get_info) + (return-type gchar*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name const-gchar* arg_name)) + (parameter (type-and-name GtkArgInfo** info_p)) +) + +(method forall + (of-object Container (Gtk)) + (c-name gtk_container_forall) + (return-type none) + (parameter (type-and-name GtkCallback callback)) + (parameter (type-and-name gpointer callback_data)) +) + +(method child_composite_name + (of-object Container (Gtk)) + (c-name gtk_container_child_composite_name) + (return-type gchar*) + (parameter (type-and-name GtkWidget* child)) +) + +(method dequeue_resize_handler + (of-object Container (Gtk)) + (c-name gtk_container_dequeue_resize_handler) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkctree.h + +(function gtk_ctree_get_type + (c-name gtk_ctree_get_type) + (return-type GtkType) +) + +(method construct + (of-object CTree (Gtk)) + (c-name gtk_ctree_construct) + (return-type none) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gint tree_column)) + (parameter (type-and-name gchar*[] titles)) +) + +(function gtk_ctree_new_with_titles + (c-name gtk_ctree_new_with_titles) + (is-constructor-of GtkCTree) + (return-type GtkWidget*) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gint tree_column)) + (parameter (type-and-name gchar*[] titles)) +) + +(function gtk_ctree_new + (c-name gtk_ctree_new) + (is-constructor-of GtkCTree) + (return-type GtkWidget*) + (parameter (type-and-name gint columns)) + (parameter (type-and-name gint tree_column)) +) + +(method insert_node + (of-object CTree (Gtk)) + (c-name gtk_ctree_insert_node) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* parent)) + (parameter (type-and-name GtkCTreeNode* sibling)) + (parameter (type-and-name gchar*[] text)) + (parameter (type-and-name guint8 spacing)) + (parameter (type-and-name GdkPixmap* pixmap_closed)) + (parameter (type-and-name GdkBitmap* mask_closed)) + (parameter (type-and-name GdkPixmap* pixmap_opened)) + (parameter (type-and-name GdkBitmap* mask_opened)) + (parameter (type-and-name gboolean is_leaf)) + (parameter (type-and-name gboolean expanded)) +) + +(method remove_node + (of-object CTree (Gtk)) + (c-name gtk_ctree_remove_node) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method insert_gnode + (of-object CTree (Gtk)) + (c-name gtk_ctree_insert_gnode) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* parent)) + (parameter (type-and-name GtkCTreeNode* sibling)) + (parameter (type-and-name GNode* gnode)) + (parameter (type-and-name GtkCTreeGNodeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method export_to_gnode + (of-object CTree (Gtk)) + (c-name gtk_ctree_export_to_gnode) + (return-type GNode*) + (parameter (type-and-name GNode* parent)) + (parameter (type-and-name GNode* sibling)) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeGNodeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method post_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_post_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method post_recursive_to_depth + (of-object CTree (Gtk)) + (c-name gtk_ctree_post_recursive_to_depth) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint depth)) + (parameter (type-and-name GtkCTreeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method pre_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_pre_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method pre_recursive_to_depth + (of-object CTree (Gtk)) + (c-name gtk_ctree_pre_recursive_to_depth) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint depth)) + (parameter (type-and-name GtkCTreeFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method is_viewable + (of-object CTree (Gtk)) + (c-name gtk_ctree_is_viewable) + (return-type gboolean) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method last + (of-object CTree (Gtk)) + (c-name gtk_ctree_last) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method find_node_ptr + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_node_ptr) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeRow* ctree_row)) +) + +(method node_nth + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_nth) + (return-type GtkCTreeNode*) + (parameter (type-and-name guint row)) +) + +(method find + (of-object CTree (Gtk)) + (c-name gtk_ctree_find) + (return-type gboolean) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeNode* child)) +) + +(method is_ancestor + (of-object CTree (Gtk)) + (c-name gtk_ctree_is_ancestor) + (return-type gboolean) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeNode* child)) +) + +(method find_by_row_data + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_by_row_data) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) +) + +(method find_all_by_row_data + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_all_by_row_data) + (return-type GList*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) +) + +(method find_by_row_data_custom + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_by_row_data_custom) + (return-type GtkCTreeNode*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GCompareFunc func)) +) + +(method find_all_by_row_data_custom + (of-object CTree (Gtk)) + (c-name gtk_ctree_find_all_by_row_data_custom) + (return-type GList*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GCompareFunc func)) +) + +(method is_hot_spot + (of-object CTree (Gtk)) + (c-name gtk_ctree_is_hot_spot) + (return-type gboolean) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method move + (of-object CTree (Gtk)) + (c-name gtk_ctree_move) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkCTreeNode* new_parent) (null-ok)) + (parameter (type-and-name GtkCTreeNode* new_sibling) (null-ok)) +) + +(method expand + (of-object CTree (Gtk)) + (c-name gtk_ctree_expand) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method expand_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_expand_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + +(method expand_to_depth + (of-object CTree (Gtk)) + (c-name gtk_ctree_expand_to_depth) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint depth)) +) + +(method collapse + (of-object CTree (Gtk)) + (c-name gtk_ctree_collapse) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method collapse_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_collapse_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + +(method collapse_to_depth + (of-object CTree (Gtk)) + (c-name gtk_ctree_collapse_to_depth) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint depth)) +) + +(method toggle_expansion + (of-object CTree (Gtk)) + (c-name gtk_ctree_toggle_expansion) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method toggle_expansion_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_toggle_expansion_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method select + (of-object CTree (Gtk)) + (c-name gtk_ctree_select) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method select_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_select_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + +(method unselect + (of-object CTree (Gtk)) + (c-name gtk_ctree_unselect) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method unselect_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_unselect_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + +(method node_set_text + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_text) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* text)) +) + +(method node_set_pixmap + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_pixmap) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask) (null-ok)) +) + +(method node_set_pixtext + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_pixtext) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name const-gchar* text)) + (parameter (type-and-name guint8 spacing)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask) (null-ok)) +) + +(method set_node_info + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_node_info) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name const-gchar* text)) + (parameter (type-and-name guint8 spacing)) + (parameter (type-and-name GdkPixmap* pixmap_closed) (null-ok)) + (parameter (type-and-name GdkBitmap* mask_closed) (null-ok)) + (parameter (type-and-name GdkPixmap* pixmap_opened) (null-ok)) + (parameter (type-and-name GdkBitmap* mask_opened) (null-ok)) + (parameter (type-and-name gboolean is_leaf)) + (parameter (type-and-name gboolean expanded)) +) + +(method node_set_shift + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_shift) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gint vertical)) + (parameter (type-and-name gint horizontal)) +) + +(method node_set_selectable + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_selectable) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gboolean selectable)) +) + +(method node_get_selectable + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_selectable) + (return-type gboolean) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method node_get_cell_type + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_cell_type) + (return-type GtkCellType) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) +) + +(method node_get_text + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_text) + (return-type gint) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gchar** text)) +) + +(method node_get_pixmap + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_pixmap) + (return-type gint) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GdkPixmap** pixmap)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method node_get_pixtext + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_pixtext) + (return-type gint) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gchar** text)) + (parameter (type-and-name guint8* spacing)) + (parameter (type-and-name GdkPixmap** pixmap)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method get_node_info + (of-object CTree (Gtk)) + (c-name gtk_ctree_get_node_info) + (return-type gint) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gchar** text)) + (parameter (type-and-name guint8* spacing)) + (parameter (type-and-name GdkPixmap** pixmap_closed)) + (parameter (type-and-name GdkBitmap** mask_closed)) + (parameter (type-and-name GdkPixmap** pixmap_opened)) + (parameter (type-and-name GdkBitmap** mask_opened)) + (parameter (type-and-name gboolean* is_leaf)) + (parameter (type-and-name gboolean* expanded)) +) + +(method node_set_row_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_row_style) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GtkStyle* style) (null-ok)) +) + +(method node_get_row_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_row_style) + (return-type GtkStyle*) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method node_set_cell_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_cell_style) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name GtkStyle* style)) +) + +(method node_get_cell_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_cell_style) + (return-type GtkStyle*) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) +) + +(method node_set_foreground + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_foreground) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GdkColor* color)) +) + +(method node_set_background + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_background) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name GdkColor* color)) +) + +(method node_set_row_data + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_row_data) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) +) + +(method node_set_row_data_full + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_set_row_data_full) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(method node_get_row_data + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_get_row_data) + (return-type gpointer) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method node_moveto + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_moveto) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) + (parameter (type-and-name gint column)) + (parameter (type-and-name gfloat row_align)) + (parameter (type-and-name gfloat col_align)) +) + +(method node_is_visible + (of-object CTree (Gtk)) + (c-name gtk_ctree_node_is_visible) + (return-type GtkVisibility) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method set_indent + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_indent) + (return-type none) + (parameter (type-and-name gint indent)) +) + +(method set_spacing + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_spacing) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(method set_show_stub + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_show_stub) + (return-type none) + (parameter (type-and-name gboolean show_stub)) +) + +(method set_line_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_line_style) + (return-type none) + (parameter (type-and-name GtkCTreeLineStyle line_style)) +) + +(method set_expander_style + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_expander_style) + (return-type none) + (parameter (type-and-name GtkCTreeExpanderStyle expander_style)) +) + +(method set_drag_compare_func + (of-object CTree (Gtk)) + (c-name gtk_ctree_set_drag_compare_func) + (return-type none) + (parameter (type-and-name GtkCTreeCompareDragFunc cmp_func)) +) + +(method sort_node + (of-object CTree (Gtk)) + (c-name gtk_ctree_sort_node) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node)) +) + +(method sort_recursive + (of-object CTree (Gtk)) + (c-name gtk_ctree_sort_recursive) + (return-type none) + (parameter (type-and-name GtkCTreeNode* node) (null-ok) (default "NULL")) +) + + + +;; From /usr/include/gtk/gtkcurve.h + +(function gtk_curve_get_type + (c-name gtk_curve_get_type) + (return-type GtkType) +) + +(function gtk_curve_new + (c-name gtk_curve_new) + (is-constructor-of GtkCurve) + (return-type GtkWidget*) +) + +(method reset + (of-object Curve (Gtk)) + (c-name gtk_curve_reset) + (return-type none) +) + +(method set_gamma + (of-object Curve (Gtk)) + (c-name gtk_curve_set_gamma) + (return-type none) + (parameter (type-and-name gfloat gamma)) +) + +(method set_range + (of-object Curve (Gtk)) + (c-name gtk_curve_set_range) + (return-type none) + (parameter (type-and-name gfloat min_x)) + (parameter (type-and-name gfloat max_x)) + (parameter (type-and-name gfloat min_y)) + (parameter (type-and-name gfloat max_y)) +) + +(method get_vector + (of-object Curve (Gtk)) + (c-name gtk_curve_get_vector) + (return-type none) + (parameter (type-and-name int veclen)) + (parameter (type-and-name gfloat[] vector)) +) + +(method set_vector + (of-object Curve (Gtk)) + (c-name gtk_curve_set_vector) + (return-type none) + (parameter (type-and-name int veclen)) + (parameter (type-and-name gfloat[] vector)) +) + +(method set_curve_type + (of-object Curve (Gtk)) + (c-name gtk_curve_set_curve_type) + (return-type none) + (parameter (type-and-name GtkCurveType type)) +) + + + +;; From /usr/include/gtk/gtkdata.h + +(function gtk_data_get_type + (c-name gtk_data_get_type) + (return-type GtkType) +) + + + +;; From /usr/include/gtk/gtkdialog.h + +(function gtk_dialog_get_type + (c-name gtk_dialog_get_type) + (return-type GtkType) +) + +(function gtk_dialog_new + (c-name gtk_dialog_new) + (is-constructor-of GtkDialog) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkdnd.h + +(function gtk_drag_finish + (c-name gtk_drag_finish) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) + (parameter (type-and-name gboolean success)) + (parameter (type-and-name gboolean del)) + (parameter (type-and-name guint32 time)) +) + +(function gtk_drag_get_source_widget + (c-name gtk_drag_get_source_widget) + (return-type GtkWidget*) + (parameter (type-and-name GdkDragContext* context)) +) + +(method drag_highlight + (of-object Widget (Gtk)) + (c-name gtk_drag_highlight) + (return-type none) +) + +(method drag_unhighlight + (of-object Widget (Gtk)) + (c-name gtk_drag_unhighlight) + (return-type none) +) + +(method drag_dest_set + (of-object Widget (Gtk)) + (c-name gtk_drag_dest_set) + (return-type none) + (parameter (type-and-name GtkDestDefaults flags)) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name gint n_targets)) + (parameter (type-and-name GdkDragAction actions)) +) + +(method drag_dest_set_proxy + (of-object Widget (Gtk)) + (c-name gtk_drag_dest_set_proxy) + (return-type none) + (parameter (type-and-name GdkWindow* proxy_window)) + (parameter (type-and-name GdkDragProtocol protocol)) + (parameter (type-and-name gboolean use_coordinates)) +) + +(method drag_dest_unset + (of-object Widget (Gtk)) + (c-name gtk_drag_dest_unset) + (return-type none) +) + +(method drag_source_set + (of-object Widget (Gtk)) + (c-name gtk_drag_source_set) + (return-type none) + (parameter (type-and-name GdkModifierType start_button_mask)) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name gint n_targets)) + (parameter (type-and-name GdkDragAction actions)) +) + +(method drag_source_unset + (of-object Widget (Gtk)) + (c-name gtk_drag_source_unset) + (return-type none) +) + +(method drag_source_set_icon + (of-object Widget (Gtk)) + (c-name gtk_drag_source_set_icon) + (return-type none) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method drag_begin + (of-object Widget (Gtk)) + (c-name gtk_drag_begin) + (return-type GdkDragContext*) + (parameter (type-and-name GtkTargetList* targets)) + (parameter (type-and-name GdkDragAction actions)) + (parameter (type-and-name gint button)) + (parameter (type-and-name GdkEvent* event)) +) + +(function gtk_drag_set_icon_widget + (c-name gtk_drag_set_icon_widget) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint hot_x)) + (parameter (type-and-name gint hot_y)) +) + +(function gtk_drag_set_icon_pixmap + (c-name gtk_drag_set_icon_pixmap) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) + (parameter (type-and-name gint hot_x)) + (parameter (type-and-name gint hot_y)) +) + +(function gtk_drag_set_icon_default + (c-name gtk_drag_set_icon_default) + (return-type none) + (parameter (type-and-name GdkDragContext* context)) +) + +(function gtk_drag_set_default_icon + (c-name gtk_drag_set_default_icon) + (return-type none) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) + (parameter (type-and-name gint hot_x)) + (parameter (type-and-name gint hot_y)) +) + +(function gtk_drag_source_handle_event + (c-name gtk_drag_source_handle_event) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name GdkEvent* event)) +) + +(function gtk_drag_dest_handle_event + (c-name gtk_drag_dest_handle_event) + (return-type none) + (parameter (type-and-name GtkWidget* toplevel)) + (parameter (type-and-name GdkEvent* event)) +) + + + +;; From /usr/include/gtk/gtkdrawingarea.h + +(function gtk_drawing_area_get_type + (c-name gtk_drawing_area_get_type) + (return-type GtkType) +) + +(function gtk_drawing_area_new + (c-name gtk_drawing_area_new) + (is-constructor-of GtkDrawingArea) + (return-type GtkWidget*) +) + +(method size + (of-object DrawingArea (Gtk)) + (c-name gtk_drawing_area_size) + (return-type none) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + + + +;; From /usr/include/gtk/gtkeditable.h + +(function gtk_editable_get_type + (c-name gtk_editable_get_type) + (return-type GtkType) +) + +(method select_region + (of-object Editable (Gtk)) + (c-name gtk_editable_select_region) + (return-type none) + (parameter (type-and-name gint start)) + (parameter (type-and-name gint end)) +) + +(method insert_text + (of-object Editable (Gtk)) + (c-name gtk_editable_insert_text) + (return-type none) + (parameter (type-and-name const-gchar* new_text)) + (parameter (type-and-name gint new_text_length)) + (parameter (type-and-name gint* position)) +) + +(method delete_text + (of-object Editable (Gtk)) + (c-name gtk_editable_delete_text) + (return-type none) + (parameter (type-and-name gint start_pos)) + (parameter (type-and-name gint end_pos)) +) + +(method get_chars + (of-object Editable (Gtk)) + (c-name gtk_editable_get_chars) + (return-type gchar*) + (parameter (type-and-name gint start_pos)) + (parameter (type-and-name gint end_pos)) +) + +(method cut_clipboard + (of-object Editable (Gtk)) + (c-name gtk_editable_cut_clipboard) + (return-type none) +) + +(method copy_clipboard + (of-object Editable (Gtk)) + (c-name gtk_editable_copy_clipboard) + (return-type none) +) + +(method paste_clipboard + (of-object Editable (Gtk)) + (c-name gtk_editable_paste_clipboard) + (return-type none) +) + +(method claim_selection + (of-object Editable (Gtk)) + (c-name gtk_editable_claim_selection) + (return-type none) + (parameter (type-and-name gboolean claim)) + (parameter (type-and-name guint32 time)) +) + +(method delete_selection + (of-object Editable (Gtk)) + (c-name gtk_editable_delete_selection) + (return-type none) +) + +(method changed + (of-object Editable (Gtk)) + (c-name gtk_editable_changed) + (return-type none) +) + +(method set_position + (of-object Editable (Gtk)) + (c-name gtk_editable_set_position) + (return-type none) + (parameter (type-and-name gint position)) +) + +(method get_position + (of-object Editable (Gtk)) + (c-name gtk_editable_get_position) + (return-type gint) +) + +(method set_editable + (of-object Editable (Gtk)) + (c-name gtk_editable_set_editable) + (return-type none) + (parameter (type-and-name gboolean is_editable)) +) + + + +;; From /usr/include/gtk/gtkentry.h + +(function gtk_entry_get_type + (c-name gtk_entry_get_type) + (return-type GtkType) +) + +(function gtk_entry_new + (c-name gtk_entry_new) + (is-constructor-of GtkEntry) + (return-type GtkWidget*) +) + +(function gtk_entry_new_with_max_length + (c-name gtk_entry_new_with_max_length) + (return-type GtkWidget*) + (parameter (type-and-name guint16 max)) +) + +(method set_text + (of-object Entry (Gtk)) + (c-name gtk_entry_set_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + +(method append_text + (of-object Entry (Gtk)) + (c-name gtk_entry_append_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + +(method prepend_text + (of-object Entry (Gtk)) + (c-name gtk_entry_prepend_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + +(method set_position + (of-object Entry (Gtk)) + (c-name gtk_entry_set_position) + (return-type none) + (parameter (type-and-name gint position)) +) + +(method get_text + (of-object Entry (Gtk)) + (c-name gtk_entry_get_text) + (return-type static_string) +) + +(method select_region + (of-object Entry (Gtk)) + (c-name gtk_entry_select_region) + (return-type none) + (parameter (type-and-name gint start)) + (parameter (type-and-name gint end)) +) + +(method set_visibility + (of-object Entry (Gtk)) + (c-name gtk_entry_set_visibility) + (return-type none) + (parameter (type-and-name gboolean visible)) +) + +(method set_editable + (of-object Entry (Gtk)) + (c-name gtk_entry_set_editable) + (return-type none) + (parameter (type-and-name gboolean editable)) +) + +(method set_max_length + (of-object Entry (Gtk)) + (c-name gtk_entry_set_max_length) + (return-type none) + (parameter (type-and-name guint16 max)) +) + + + +;; From /usr/include/gtk/gtkeventbox.h + +(function gtk_event_box_get_type + (c-name gtk_event_box_get_type) + (return-type GtkType) +) + +(function gtk_event_box_new + (c-name gtk_event_box_new) + (is-constructor-of GtkEventBox) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkfeatures.h + + + +;; From /usr/include/gtk/gtkfilesel.h + +(function gtk_file_selection_get_type + (c-name gtk_file_selection_get_type) + (return-type GtkType) +) + +(function gtk_file_selection_new + (c-name gtk_file_selection_new) + (is-constructor-of GtkFileSelection) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* title) (default "NULL")) +) + +(method set_filename + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_set_filename) + (return-type none) + (parameter (type-and-name const-gchar* filename)) +) + +(method get_filename + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_get_filename) + (return-type gchar*) +) + +(method complete + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_complete) + (return-type none) + (parameter (type-and-name const-gchar* pattern)) +) + +(method show_fileop_buttons + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_show_fileop_buttons) + (return-type none) +) + +(method hide_fileop_buttons + (of-object FileSelection (Gtk)) + (c-name gtk_file_selection_hide_fileop_buttons) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkfixed.h + +(function gtk_fixed_get_type + (c-name gtk_fixed_get_type) + (return-type GtkType) +) + +(function gtk_fixed_new + (c-name gtk_fixed_new) + (is-constructor-of GtkFixed) + (return-type GtkWidget*) +) + +(method put + (of-object Fixed (Gtk)) + (c-name gtk_fixed_put) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint16 x)) + (parameter (type-and-name gint16 y)) +) + +(method move + (of-object Fixed (Gtk)) + (c-name gtk_fixed_move) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint16 x)) + (parameter (type-and-name gint16 y)) +) + + + +;; From /usr/include/gtk/gtkfontsel.h + +(function gtk_font_selection_get_type + (c-name gtk_font_selection_get_type) + (return-type GtkType) +) + +(function gtk_font_selection_new + (c-name gtk_font_selection_new) + (is-constructor-of GtkFontSelection) + (return-type GtkWidget*) +) + +(method get_font_name + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_get_font_name) + (return-type gchar*) +) + +(method get_font + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_get_font) + (return-type GdkFont*) +) + +(method set_font_name + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_set_font_name) + (return-type gboolean) + (parameter (type-and-name const-gchar* fontname)) +) + +(method set_filter + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_set_filter) + (return-type none) + (parameter (type-and-name GtkFontFilterType filter_type)) + (parameter (type-and-name GtkFontType font_type)) + (parameter (type-and-name gchar** foundries)) + (parameter (type-and-name gchar** weights)) + (parameter (type-and-name gchar** slants)) + (parameter (type-and-name gchar** setwidths)) + (parameter (type-and-name gchar** spacings)) + (parameter (type-and-name gchar** charsets)) +) + +(method get_preview_text + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_get_preview_text) + (return-type gchar*) +) + +(method set_preview_text + (of-object FontSelection (Gtk)) + (c-name gtk_font_selection_set_preview_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + +(function gtk_font_selection_dialog_get_type + (c-name gtk_font_selection_dialog_get_type) + (return-type GtkType) +) + +(function gtk_font_selection_dialog_new + (c-name gtk_font_selection_dialog_new) + (is-constructor-of GtkFontSelectionDialog) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* title)) +) + +(method get_font_name + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_get_font_name) + (return-type gchar*) +) + +(method get_font + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_get_font) + (return-type GdkFont*) +) + +(method set_font_name + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_set_font_name) + (return-type gboolean) + (parameter (type-and-name const-gchar* fontname)) +) + +(method set_filter + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_set_filter) + (return-type none) + (parameter (type-and-name GtkFontFilterType filter_type)) + (parameter (type-and-name GtkFontType font_type)) + (parameter (type-and-name gchar** foundries)) + (parameter (type-and-name gchar** weights)) + (parameter (type-and-name gchar** slants)) + (parameter (type-and-name gchar** setwidths)) + (parameter (type-and-name gchar** spacings)) + (parameter (type-and-name gchar** charsets)) +) + +(method get_preview_text + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_get_preview_text) + (return-type gchar*) +) + +(method set_preview_text + (of-object FontSelectionDialog (Gtk)) + (c-name gtk_font_selection_dialog_set_preview_text) + (return-type none) + (parameter (type-and-name const-gchar* text)) +) + + + +;; From /usr/include/gtk/gtkframe.h + +(function gtk_frame_get_type + (c-name gtk_frame_get_type) + (return-type GtkType) +) + +(function gtk_frame_new + (c-name gtk_frame_new) + (is-constructor-of GtkFrame) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label) (default "NULL") (null-ok)) +) + +(method set_label + (of-object Frame (Gtk)) + (c-name gtk_frame_set_label) + (return-type none) + (parameter (type-and-name const-gchar* label) (null-ok)) +) + +(method set_label_align + (of-object Frame (Gtk)) + (c-name gtk_frame_set_label_align) + (return-type none) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) +) + +(method set_shadow_type + (of-object Frame (Gtk)) + (c-name gtk_frame_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + + + +;; From /usr/include/gtk/gtkgamma.h + +(function gtk_gamma_curve_get_type + (c-name gtk_gamma_curve_get_type) + (return-type guint) +) + +(function gtk_gamma_curve_new + (c-name gtk_gamma_curve_new) + (is-constructor-of GtkGammaCurve) + (return-type GtkWidget*) +) + + +;; From /usr/include/gtk/gtkhandlebox.h + +(function gtk_handle_box_get_type + (c-name gtk_handle_box_get_type) + (return-type GtkType) +) + +(function gtk_handle_box_new + (c-name gtk_handle_box_new) + (is-constructor-of GtkHandleBox) + (return-type GtkWidget*) +) + +(method set_shadow_type + (of-object HandleBox (Gtk)) + (c-name gtk_handle_box_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + +(method set_handle_position + (of-object HandleBox (Gtk)) + (c-name gtk_handle_box_set_handle_position) + (return-type none) + (parameter (type-and-name GtkPositionType position)) +) + +(method set_snap_edge + (of-object HandleBox (Gtk)) + (c-name gtk_handle_box_set_snap_edge) + (return-type none) + (parameter (type-and-name GtkPositionType edge)) +) + + + +;; From /usr/include/gtk/gtkhbbox.h + +(function gtk_hbutton_box_get_type + (c-name gtk_hbutton_box_get_type) + (return-type guint) +) + +(function gtk_hbutton_box_new + (c-name gtk_hbutton_box_new) + (is-constructor-of GtkHButtonBox) + (return-type GtkWidget*) +) + +(function hbutton_box_get_spacing_default + (c-name gtk_hbutton_box_get_spacing_default) + (return-type gint) +) + +(function hbutton_box_get_layout_default + (c-name gtk_hbutton_box_get_layout_default) + (return-type GtkButtonBoxStyle) +) + +(function hbutton_box_set_spacing_default + (c-name gtk_hbutton_box_set_spacing_default) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(function hbutton_box_set_layout_default + (c-name gtk_hbutton_box_set_layout_default) + (return-type none) + (parameter (type-and-name GtkButtonBoxStyle layout)) +) + + + +;; From /usr/include/gtk/gtkhbox.h + +(function gtk_hbox_get_type + (c-name gtk_hbox_get_type) + (return-type GtkType) +) + +(function gtk_hbox_new + (c-name gtk_hbox_new) + (is-constructor-of GtkHBox) + (return-type GtkWidget*) + (parameter (type-and-name gboolean homogeneous) (default "FALSE")) + (parameter (type-and-name gint spacing) (default "0")) +) + + + +;; From /usr/include/gtk/gtkhpaned.h + +(function gtk_hpaned_get_type + (c-name gtk_hpaned_get_type) + (return-type guint) +) + +(function gtk_hpaned_new + (c-name gtk_hpaned_new) + (is-constructor-of GtkHPaned) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkhruler.h + +(function gtk_hruler_get_type + (c-name gtk_hruler_get_type) + (return-type guint) +) + +(function gtk_hruler_new + (c-name gtk_hruler_new) + (is-constructor-of GtkHRuler) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkhscale.h + +(function gtk_hscale_get_type + (c-name gtk_hscale_get_type) + (return-type GtkType) +) + +(function gtk_hscale_new + (c-name gtk_hscale_new) + (is-constructor-of GtkHScale) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok)) +) + + + +;; From /usr/include/gtk/gtkhscrollbar.h + +(function gtk_hscrollbar_get_type + (c-name gtk_hscrollbar_get_type) + (return-type GtkType) +) + +(function gtk_hscrollbar_new + (c-name gtk_hscrollbar_new) + (is-constructor-of GtkHScrollbar) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok)) +) + + + +;; From /usr/include/gtk/gtkhseparator.h + +(function gtk_hseparator_get_type + (c-name gtk_hseparator_get_type) + (return-type GtkType) +) + +(function gtk_hseparator_new + (c-name gtk_hseparator_new) + (is-constructor-of GtkHSeparator) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkimage.h + +(function gtk_image_get_type + (c-name gtk_image_get_type) + (return-type GtkType) +) + +(function gtk_image_new + (c-name gtk_image_new) + (is-constructor-of GtkImage) + (return-type GtkWidget*) + (parameter (type-and-name GdkImage* val)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method set + (of-object Image (Gtk)) + (c-name gtk_image_set) + (return-type none) + (parameter (type-and-name GdkImage* val)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method get + (of-object Image (Gtk)) + (c-name gtk_image_get) + (return-type none) + (parameter (type-and-name GdkImage** val)) + (parameter (type-and-name GdkBitmap** mask)) +) + + + +;; From /usr/include/gtk/gtkinputdialog.h + +(function gtk_input_dialog_get_type + (c-name gtk_input_dialog_get_type) + (return-type GtkType) +) + +(function gtk_input_dialog_new + (c-name gtk_input_dialog_new) + (is-constructor-of GtkInputDialog) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkinvisible.h + +(function gtk_invisible_get_type + (c-name gtk_invisible_get_type) + (return-type GtkType) +) + +(function gtk_invisible_new + (c-name gtk_invisible_new) + (is-constructor-of GtkInvisible) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkitem.h + +(function gtk_item_get_type + (c-name gtk_item_get_type) + (return-type GtkType) +) + +(method select + (of-object Item (Gtk)) + (c-name gtk_item_select) + (return-type none) +) + +(method deselect + (of-object Item (Gtk)) + (c-name gtk_item_deselect) + (return-type none) +) + +(method toggle + (of-object Item (Gtk)) + (c-name gtk_item_toggle) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkitemfactory.h + +(function gtk_item_factory_get_type + (c-name gtk_item_factory_get_type) + (return-type GtkType) +) + +(function gtk_item_factory_new + (c-name gtk_item_factory_new) + (is-constructor-of GtkItemFactory) + (return-type GtkItemFactory*) + (parameter (type-and-name GtkType container_type)) + (parameter (type-and-name const-gchar* path)) + (parameter (type-and-name GtkAccelGroup* accel_group) (null-ok)) +) + +(method construct + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_construct) + (return-type none) + (parameter (type-and-name GtkType container_type)) + (parameter (type-and-name const-gchar* path)) + (parameter (type-and-name GtkAccelGroup* accel_group)) +) + +(function gtk_item_factory_parse_rc + (c-name gtk_item_factory_parse_rc) + (return-type none) + (parameter (type-and-name const-gchar* file_name)) +) + +(function gtk_item_factory_parse_rc_string + (c-name gtk_item_factory_parse_rc_string) + (return-type none) + (parameter (type-and-name const-gchar* rc_string)) +) + +(function gtk_item_factory_parse_rc_scanner + (c-name gtk_item_factory_parse_rc_scanner) + (return-type none) + (parameter (type-and-name GScanner* scanner)) +) + +(function gtk_item_factory_add_foreign + (c-name gtk_item_factory_add_foreign) + (return-type none) + (parameter (type-and-name GtkWidget* accel_widget)) + (parameter (type-and-name const-gchar* full_path)) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint keyval)) + (parameter (type-and-name GdkModifierType modifiers)) +) + +(function gtk_item_factory_from_widget + (c-name gtk_item_factory_from_widget) + (return-type GtkItemFactory*) + (parameter (type-and-name GtkWidget* widget)) +) + +(function gtk_item_factory_path_from_widget + (c-name gtk_item_factory_path_from_widget) + (return-type gchar*) + (parameter (type-and-name GtkWidget* widget)) +) + +(method get_item + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_get_item) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* path)) +) + +(method get_widget + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_get_widget) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* path)) +) + +(method get_widget_by_action + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_get_widget_by_action) + (return-type GtkWidget*) + (parameter (type-and-name guint action)) +) + +(method get_item_by_action + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_get_item_by_action) + (return-type GtkWidget*) + (parameter (type-and-name guint action)) +) + +(function gtk_item_factory_dump_items + (c-name gtk_item_factory_dump_items) + (return-type none) + (parameter (type-and-name GtkPatternSpec* path_pspec)) + (parameter (type-and-name gboolean modified_only)) + (parameter (type-and-name GtkPrintFunc print_func)) + (parameter (type-and-name gpointer func_data)) +) + +(function gtk_item_factory_dump_rc + (c-name gtk_item_factory_dump_rc) + (return-type none) + (parameter (type-and-name const-gchar* file_name)) + (parameter (type-and-name GtkPatternSpec* path_pspec)) + (parameter (type-and-name gboolean modified_only)) +) + +(function gtk_item_factory_print_func + (c-name gtk_item_factory_print_func) + (return-type none) + (parameter (type-and-name gpointer FILE_pointer)) + (parameter (type-and-name gchar* string)) +) + +(method create_item + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_create_item) + (return-type none) + (parameter (type-and-name GtkItemFactoryEntry* entry)) + (parameter (type-and-name gpointer callback_data)) + (parameter (type-and-name guint callback_type)) +) + +(method create_items + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_create_items) + (return-type none) + (parameter (type-and-name guint n_entries)) + (parameter (type-and-name GtkItemFactoryEntry* entries)) + (parameter (type-and-name gpointer callback_data)) +) + +(method delete_item + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_delete_item) + (return-type none) + (parameter (type-and-name const-gchar* path)) +) + +(method delete_entry + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_delete_entry) + (return-type none) + (parameter (type-and-name GtkItemFactoryEntry* entry)) +) + +(method delete_entries + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_delete_entries) + (return-type none) + (parameter (type-and-name guint n_entries)) + (parameter (type-and-name GtkItemFactoryEntry* entries)) +) + +(method popup + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_popup) + (return-type none) + (parameter (type-and-name guint x)) + (parameter (type-and-name guint y)) + (parameter (type-and-name guint mouse_button)) + (parameter (type-and-name guint32 time)) +) + +(method popup_with_data + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_popup_with_data) + (return-type none) + (parameter (type-and-name gpointer popup_data)) + (parameter (type-and-name GtkDestroyNotify destroy)) + (parameter (type-and-name guint x)) + (parameter (type-and-name guint y)) + (parameter (type-and-name guint mouse_button)) + (parameter (type-and-name guint32 time)) +) + +(method popup_data + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_popup_data) + (return-type gpointer) +) + +(function gtk_item_factory_popup_data_from_widget + (c-name gtk_item_factory_popup_data_from_widget) + (return-type gpointer) + (parameter (type-and-name GtkWidget* widget)) +) + +(method set_translate_func + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_set_translate_func) + (return-type none) + (parameter (type-and-name GtkTranslateFunc func)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify notify)) +) + +(function gtk_item_factory_from_path + (c-name gtk_item_factory_from_path) + (return-type GtkItemFactory*) + (parameter (type-and-name const-gchar* path)) +) + +(function gtk_item_factory_create_menu_entries + (c-name gtk_item_factory_create_menu_entries) + (return-type none) + (parameter (type-and-name guint n_entries)) + (parameter (type-and-name GtkMenuEntry* entries)) +) + +(function gtk_item_factories_path_delete + (c-name gtk_item_factories_path_delete) + (return-type none) + (parameter (type-and-name const-gchar* ifactory_path)) + (parameter (type-and-name const-gchar* path)) +) + +(method create_items_ac + (of-object ItemFactory (Gtk)) + (c-name gtk_item_factory_create_items_ac) + (return-type none) + (parameter (type-and-name guint n_entries)) + (parameter (type-and-name GtkItemFactoryEntry* entries)) + (parameter (type-and-name gpointer callback_data)) + (parameter (type-and-name guint callback_type)) +) + + + +;; From /usr/include/gtk/gtklabel.h + +(function gtk_label_get_type + (c-name gtk_label_get_type) + (return-type GtkType) +) + +(function gtk_label_new + (c-name gtk_label_new) + (is-constructor-of GtkLabel) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* str) (default "NULL")) +) + +(method set_text + (of-object Label (Gtk)) + (c-name gtk_label_set_text) + (return-type none) + (parameter (type-and-name const-gchar* str)) +) + +(method set_justify + (of-object Label (Gtk)) + (c-name gtk_label_set_justify) + (return-type none) + (parameter (type-and-name GtkJustification jtype)) +) + +(method set_pattern + (of-object Label (Gtk)) + (c-name gtk_label_set_pattern) + (return-type none) + (parameter (type-and-name const-gchar* pattern) (default "NULL")) +) + +(method set_line_wrap + (of-object Label (Gtk)) + (c-name gtk_label_set_line_wrap) + (return-type none) + (parameter (type-and-name gboolean wrap)) +) + +(method get + (of-object Label (Gtk)) + (c-name gtk_label_get) + (return-type none) + (parameter (type-and-name gchar** str)) +) + +(method parse_uline + (of-object Label (Gtk)) + (c-name gtk_label_parse_uline) + (return-type guint) + (parameter (type-and-name const-gchar* string)) +) + + + +;; From /usr/include/gtk/gtklayout.h + +(function gtk_layout_get_type + (c-name gtk_layout_get_type) + (return-type GtkType) +) + +(function gtk_layout_new + (c-name gtk_layout_new) + (is-constructor-of GtkLayout) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* hadjustment) (null-ok)) + (parameter (type-and-name GtkAdjustment* vadjustment) (null-ok)) +) + +(method put + (of-object Layout (Gtk)) + (c-name gtk_layout_put) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method move + (of-object Layout (Gtk)) + (c-name gtk_layout_move) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method set_size + (of-object Layout (Gtk)) + (c-name gtk_layout_set_size) + (return-type none) + (parameter (type-and-name guint width)) + (parameter (type-and-name guint height)) +) + +(method get_hadjustment + (of-object Layout (Gtk)) + (c-name gtk_layout_get_hadjustment) + (return-type GtkAdjustment*) +) + +(method get_vadjustment + (of-object Layout (Gtk)) + (c-name gtk_layout_get_vadjustment) + (return-type GtkAdjustment*) +) + +(method set_hadjustment + (of-object Layout (Gtk)) + (c-name gtk_layout_set_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_vadjustment + (of-object Layout (Gtk)) + (c-name gtk_layout_set_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method freeze + (of-object Layout (Gtk)) + (c-name gtk_layout_freeze) + (return-type none) +) + +(method thaw + (of-object Layout (Gtk)) + (c-name gtk_layout_thaw) + (return-type none) +) + + + +;; From /usr/include/gtk/gtklist.h + +(function gtk_list_get_type + (c-name gtk_list_get_type) + (return-type GtkType) +) + +(function gtk_list_new + (c-name gtk_list_new) + (is-constructor-of GtkList) + (return-type GtkWidget*) +) + +(method insert_items + (of-object List (Gtk)) + (c-name gtk_list_insert_items) + (return-type none) + (parameter (type-and-name GList* items)) + (parameter (type-and-name gint position)) +) + +(method append_items + (of-object List (Gtk)) + (c-name gtk_list_append_items) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method prepend_items + (of-object List (Gtk)) + (c-name gtk_list_prepend_items) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method remove_items + (of-object List (Gtk)) + (c-name gtk_list_remove_items) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method remove_items_no_unref + (of-object List (Gtk)) + (c-name gtk_list_remove_items_no_unref) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method clear_items + (of-object List (Gtk)) + (c-name gtk_list_clear_items) + (return-type none) + (parameter (type-and-name gint start)) + (parameter (type-and-name gint end)) +) + +(method select_item + (of-object List (Gtk)) + (c-name gtk_list_select_item) + (return-type none) + (parameter (type-and-name gint item)) +) + +(method unselect_item + (of-object List (Gtk)) + (c-name gtk_list_unselect_item) + (return-type none) + (parameter (type-and-name gint item)) +) + +(method select_child + (of-object List (Gtk)) + (c-name gtk_list_select_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method unselect_child + (of-object List (Gtk)) + (c-name gtk_list_unselect_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method child_position + (of-object List (Gtk)) + (c-name gtk_list_child_position) + (return-type gint) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_selection_mode + (of-object List (Gtk)) + (c-name gtk_list_set_selection_mode) + (return-type none) + (parameter (type-and-name GtkSelectionMode mode)) +) + +(method extend_selection + (of-object List (Gtk)) + (c-name gtk_list_extend_selection) + (return-type none) + (parameter (type-and-name GtkScrollType scroll_type)) + (parameter (type-and-name gfloat position)) + (parameter (type-and-name gboolean auto_start_selection)) +) + +(method start_selection + (of-object List (Gtk)) + (c-name gtk_list_start_selection) + (return-type none) +) + +(method end_selection + (of-object List (Gtk)) + (c-name gtk_list_end_selection) + (return-type none) +) + +(method select_all + (of-object List (Gtk)) + (c-name gtk_list_select_all) + (return-type none) +) + +(method unselect_all + (of-object List (Gtk)) + (c-name gtk_list_unselect_all) + (return-type none) +) + +(method scroll_horizontal + (of-object List (Gtk)) + (c-name gtk_list_scroll_horizontal) + (return-type none) + (parameter (type-and-name GtkScrollType scroll_type)) + (parameter (type-and-name gfloat position)) +) + +(method scroll_vertical + (of-object List (Gtk)) + (c-name gtk_list_scroll_vertical) + (return-type none) + (parameter (type-and-name GtkScrollType scroll_type)) + (parameter (type-and-name gfloat position)) +) + +(method toggle_add_mode + (of-object List (Gtk)) + (c-name gtk_list_toggle_add_mode) + (return-type none) +) + +(method toggle_focus_row + (of-object List (Gtk)) + (c-name gtk_list_toggle_focus_row) + (return-type none) +) + +(method toggle_row + (of-object List (Gtk)) + (c-name gtk_list_toggle_row) + (return-type none) + (parameter (type-and-name GtkWidget* item)) +) + +(method undo_selection + (of-object List (Gtk)) + (c-name gtk_list_undo_selection) + (return-type none) +) + +(method end_drag_selection + (of-object List (Gtk)) + (c-name gtk_list_end_drag_selection) + (return-type none) +) + + + +;; From /usr/include/gtk/gtklistitem.h + +(function gtk_list_item_get_type + (c-name gtk_list_item_get_type) + (return-type GtkType) +) + +(function gtk_list_item_new + (c-name gtk_list_item_new) + (is-constructor-of GtkListItem) + (return-type GtkWidget*) +) + +(function gtk_list_item_new_with_label + (c-name gtk_list_item_new_with_label) + (is-constructor-of GtkListItem) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method select + (of-object ListItem (Gtk)) + (c-name gtk_list_item_select) + (return-type none) +) + +(method deselect + (of-object ListItem (Gtk)) + (c-name gtk_list_item_deselect) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkmain.h + +(function check_version + (c-name gtk_check_version) + (return-type gchar*) + (parameter (type-and-name guint required_major)) + (parameter (type-and-name guint required_minor)) + (parameter (type-and-name guint required_micro)) +) + +(function init + (c-name gtk_init) + (return-type none) + (parameter (type-and-name int* argc)) + (parameter (type-and-name char*** argv)) +) + +(function init_check + (c-name gtk_init_check) + (return-type gboolean) + (parameter (type-and-name int* argc)) + (parameter (type-and-name char*** argv)) +) + +(function exit + (c-name gtk_exit) + (return-type none) + (parameter (type-and-name gint error_code)) +) + +(function set_locale + (c-name gtk_set_locale) + (return-type gchar*) +) + +(function events_pending + (c-name gtk_events_pending) + (return-type gint) +) + +(function main_do_event + (c-name gtk_main_do_event) + (return-type none) + (parameter (type-and-name GdkEvent* event)) +) + +(function main + (c-name gtk_main) + (return-type none) +) + +(function main_level + (c-name gtk_main_level) + (return-type guint) +) + +(function main_quit + (c-name gtk_main_quit) + (return-type none) +) + +(function main_iteration + (c-name gtk_main_iteration) + (return-type gint) +) + +(function main_iteration_do + (c-name gtk_main_iteration_do) + (return-type gint) + (parameter (type-and-name gboolean blocking) (default "TRUE")) +) + +(function gtk_true + (c-name gtk_true) + (return-type gint) +) + +(function gtk_false + (c-name gtk_false) + (return-type gint) +) + +(function grab_add + (c-name gtk_grab_add) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(function grab_get_current + (c-name gtk_grab_get_current) + (return-type GtkWidget*) +) + +(function grab_remove + (c-name gtk_grab_remove) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) +) + +(function init_add + (c-name gtk_init_add) + (return-type none) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function quit_add_destroy + (c-name gtk_quit_add_destroy) + (return-type none) + (parameter (type-and-name guint main_level)) + (parameter (type-and-name GtkObject* object)) +) + +(function quit_add + (c-name gtk_quit_add) + (return-type guint) + (parameter (type-and-name guint main_level)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function quit_add_full + (c-name gtk_quit_add_full) + (return-type guint) + (parameter (type-and-name guint main_level)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(function quit_remove + (c-name gtk_quit_remove) + (return-type none) + (parameter (type-and-name guint quit_handler_id)) +) + +(function quit_remove_by_data + (c-name gtk_quit_remove_by_data) + (return-type none) + (parameter (type-and-name gpointer data)) +) + +(function timeout_add + (c-name gtk_timeout_add) + (return-type guint) + (parameter (type-and-name guint32 interval)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function timeout_add_full + (c-name gtk_timeout_add_full) + (return-type guint) + (parameter (type-and-name guint32 interval)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(function timeout_remove + (c-name gtk_timeout_remove) + (return-type none) + (parameter (type-and-name guint timeout_handler_id)) +) + +(function idle_add + (c-name gtk_idle_add) + (return-type guint) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function idle_add_priority + (c-name gtk_idle_add_priority) + (return-type guint) + (parameter (type-and-name gint priority)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name gpointer data)) +) + +(function idle_add_full + (c-name gtk_idle_add_full) + (return-type guint) + (parameter (type-and-name gint priority)) + (parameter (type-and-name GtkFunction function)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(function idle_remove + (c-name gtk_idle_remove) + (return-type none) + (parameter (type-and-name guint idle_handler_id)) +) + +(function idle_remove_by_data + (c-name gtk_idle_remove_by_data) + (return-type none) + (parameter (type-and-name gpointer data)) +) + +(function input_add + (c-name gtk_input_add_full) + (return-type guint) + (parameter (type-and-name gint source)) + (parameter (type-and-name GdkInputCondition condition)) + (parameter (type-and-name GdkInputFunction function)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(function input_remove + (c-name gtk_input_remove) + (return-type none) + (parameter (type-and-name guint input_handler_id)) +) + +(function key_snooper_install + (c-name gtk_key_snooper_install) + (return-type guint) + (parameter (type-and-name GtkKeySnoopFunc snooper)) + (parameter (type-and-name gpointer func_data)) +) + +(function key_snooper_remove + (c-name gtk_key_snooper_remove) + (return-type none) + (parameter (type-and-name guint snooper_handler_id)) +) + +(function get_current_event + (c-name gtk_get_current_event) + (return-type GdkEvent*) +) + +(function get_event_widget + (c-name gtk_get_event_widget) + (return-type GtkWidget*) + (parameter (type-and-name GdkEvent* event)) +) + +(function propagate_event + (c-name gtk_propagate_event) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name GdkEvent* event)) +) + + + +;; From /usr/include/gtk/gtkmenu.h + +(function gtk_menu_get_type + (c-name gtk_menu_get_type) + (return-type GtkType) +) + +(function gtk_menu_new + (c-name gtk_menu_new) + (is-constructor-of GtkMenu) + (return-type GtkWidget*) +) + +(method append + (of-object Menu (Gtk)) + (c-name gtk_menu_append) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method prepend + (of-object Menu (Gtk)) + (c-name gtk_menu_prepend) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method insert + (of-object Menu (Gtk)) + (c-name gtk_menu_insert) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method popup + (of-object Menu (Gtk)) + (c-name gtk_menu_popup) + (return-type none) + (parameter (type-and-name GtkWidget* parent_menu_shell)) + (parameter (type-and-name GtkWidget* parent_menu_item)) + (parameter (type-and-name GtkMenuPositionFunc func)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name guint button)) + (parameter (type-and-name guint32 activate_time)) +) + +(method reposition + (of-object Menu (Gtk)) + (c-name gtk_menu_reposition) + (return-type none) +) + +(method popdown + (of-object Menu (Gtk)) + (c-name gtk_menu_popdown) + (return-type none) +) + +(method get_active + (of-object Menu (Gtk)) + (c-name gtk_menu_get_active) + (return-type GtkWidget*) +) + +(method set_active + (of-object Menu (Gtk)) + (c-name gtk_menu_set_active) + (return-type none) + (parameter (type-and-name guint index)) +) + +(method set_accel_group + (of-object Menu (Gtk)) + (c-name gtk_menu_set_accel_group) + (return-type none) + (parameter (type-and-name GtkAccelGroup* accel_group)) +) + +(method get_accel_group + (of-object Menu (Gtk)) + (c-name gtk_menu_get_accel_group) + (return-type GtkAccelGroup*) +) + +(method get_uline_accel_group + (of-object Menu (Gtk)) + (c-name gtk_menu_get_uline_accel_group) + (return-type GtkAccelGroup*) +) + +(method ensure_uline_accel_group + (of-object Menu (Gtk)) + (c-name gtk_menu_ensure_uline_accel_group) + (return-type GtkAccelGroup*) +) + +(method attach_to_widget + (of-object Menu (Gtk)) + (c-name gtk_menu_attach_to_widget) + (return-type none) + (parameter (type-and-name GtkWidget* attach_widget)) + (parameter (type-and-name GtkMenuDetachFunc detacher)) +) + +(method detach + (of-object Menu (Gtk)) + (c-name gtk_menu_detach) + (return-type none) +) + +(method get_attach_widget + (of-object Menu (Gtk)) + (c-name gtk_menu_get_attach_widget) + (return-type GtkWidget*) +) + +(method set_tearoff_state + (of-object Menu (Gtk)) + (c-name gtk_menu_set_tearoff_state) + (return-type none) + (parameter (type-and-name gboolean torn_off)) +) + +(method set_title + (of-object Menu (Gtk)) + (c-name gtk_menu_set_title) + (return-type none) + (parameter (type-and-name const-gchar* title)) +) + +(method reorder_child + (of-object Menu (Gtk)) + (c-name gtk_menu_reorder_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + + + +;; From /usr/include/gtk/gtkmenubar.h + +(function gtk_menu_bar_get_type + (c-name gtk_menu_bar_get_type) + (return-type GtkType) +) + +(function gtk_menu_bar_new + (c-name gtk_menu_bar_new) + (is-constructor-of GtkMenuBar) + (return-type GtkWidget*) +) + +(method append + (of-object MenuBar (Gtk)) + (c-name gtk_menu_bar_append) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method prepend + (of-object MenuBar (Gtk)) + (c-name gtk_menu_bar_prepend) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method insert + (of-object MenuBar (Gtk)) + (c-name gtk_menu_bar_insert) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method set_shadow_type + (of-object MenuBar (Gtk)) + (c-name gtk_menu_bar_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + + +;; From /usr/include/gtk/gtkmenuitem.h + +(function gtk_menu_item_get_type + (c-name gtk_menu_item_get_type) + (return-type GtkType) +) + +(function gtk_menu_item_new + (c-name gtk_menu_item_new) + (is-constructor-of GtkMenuItem) + (return-type GtkWidget*) +) + +(function gtk_menu_item_new_with_label + (c-name gtk_menu_item_new_with_label) + (is-constructor-of GtkMenuItem) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method set_submenu + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_set_submenu) + (return-type none) + (parameter (type-and-name GtkWidget* submenu)) +) + +(method remove_submenu + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_remove_submenu) + (return-type none) +) + +(method set_placement + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_set_placement) + (return-type none) + (parameter (type-and-name GtkSubmenuPlacement placement)) +) + +(method configure + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_configure) + (return-type none) + (parameter (type-and-name gint show_toggle_indicator)) + (parameter (type-and-name gint show_submenu_indicator)) +) + +(method select + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_select) + (return-type none) +) + +(method deselect + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_deselect) + (return-type none) +) + +(method activate + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_activate) + (return-type none) +) + +(method right_justify + (of-object MenuItem (Gtk)) + (c-name gtk_menu_item_right_justify) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkmenushell.h + +(function gtk_menu_shell_get_type + (c-name gtk_menu_shell_get_type) + (return-type GtkType) +) + +(method append + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_append) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method prepend + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_prepend) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method insert + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_insert) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method deactivate + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_deactivate) + (return-type none) +) + +(method select_item + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_select_item) + (return-type none) + (parameter (type-and-name GtkWidget* menu_item)) +) + +(method deselect + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_deselect) + (return-type none) +) + +(method activate_item + (of-object MenuShell (Gtk)) + (c-name gtk_menu_shell_activate_item) + (return-type none) + (parameter (type-and-name GtkWidget* menu_item)) + (parameter (type-and-name gboolean force_deactivate)) +) + + + +;; From /usr/include/gtk/gtkmisc.h + +(function gtk_misc_get_type + (c-name gtk_misc_get_type) + (return-type GtkType) +) + +(method set_alignment + (of-object Misc (Gtk)) + (c-name gtk_misc_set_alignment) + (return-type none) + (parameter (type-and-name gfloat xalign)) + (parameter (type-and-name gfloat yalign)) +) + +(method set_padding + (of-object Misc (Gtk)) + (c-name gtk_misc_set_padding) + (return-type none) + (parameter (type-and-name gint xpad)) + (parameter (type-and-name gint ypad)) +) + + + +;; From /usr/include/gtk/gtknotebook.h + +(function gtk_notebook_get_type + (c-name gtk_notebook_get_type) + (return-type GtkType) +) + +(function gtk_notebook_new + (c-name gtk_notebook_new) + (is-constructor-of GtkNotebook) + (return-type GtkWidget*) +) + +(method append_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_append_page) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) +) + +(method append_page_menu + (of-object Notebook (Gtk)) + (c-name gtk_notebook_append_page_menu) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) + (parameter (type-and-name GtkWidget* menu_label)) +) + +(method prepend_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_prepend_page) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) +) + +(method prepend_page_menu + (of-object Notebook (Gtk)) + (c-name gtk_notebook_prepend_page_menu) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) + (parameter (type-and-name GtkWidget* menu_label)) +) + +(method insert_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_insert_page) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) + (parameter (type-and-name gint position)) +) + +(method insert_page_menu + (of-object Notebook (Gtk)) + (c-name gtk_notebook_insert_page_menu) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) + (parameter (type-and-name GtkWidget* menu_label)) + (parameter (type-and-name gint position)) +) + +(method remove_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_remove_page) + (return-type none) + (parameter (type-and-name gint page_num)) +) + +(method get_current_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_get_current_page) + (return-type gint) +) + +(method get_nth_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_get_nth_page) + (return-type GtkWidget*) + (parameter (type-and-name gint page_num)) +) + +(method page_num + (of-object Notebook (Gtk)) + (c-name gtk_notebook_page_num) + (return-type gint) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_page) + (return-type none) + (parameter (type-and-name gint page_num)) +) + +(method next_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_next_page) + (return-type none) +) + +(method prev_page + (of-object Notebook (Gtk)) + (c-name gtk_notebook_prev_page) + (return-type none) +) + +(method set_show_border + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_show_border) + (return-type none) + (parameter (type-and-name gboolean show_border)) +) + +(method set_show_tabs + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_show_tabs) + (return-type none) + (parameter (type-and-name gboolean show_tabs)) +) + +(method set_tab_pos + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_pos) + (return-type none) + (parameter (type-and-name GtkPositionType pos)) +) + +(method set_homogeneous_tabs + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_homogeneous_tabs) + (return-type none) + (parameter (type-and-name gboolean homogeneous)) +) + +(method set_tab_border + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_border) + (return-type none) + (parameter (type-and-name guint border_width)) +) + +(method set_tab_hborder + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_hborder) + (return-type none) + (parameter (type-and-name guint tab_hborder)) +) + +(method set_tab_vborder + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_vborder) + (return-type none) + (parameter (type-and-name guint tab_vborder)) +) + +(method set_scrollable + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_scrollable) + (return-type none) + (parameter (type-and-name gboolean scrollable)) +) + +(method popup_enable + (of-object Notebook (Gtk)) + (c-name gtk_notebook_popup_enable) + (return-type none) +) + +(method popup_disable + (of-object Notebook (Gtk)) + (c-name gtk_notebook_popup_disable) + (return-type none) +) + +(method get_tab_label + (of-object Notebook (Gtk)) + (c-name gtk_notebook_get_tab_label) + (return-type GtkWidget*) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_tab_label + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_label) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* tab_label)) +) + +(method set_tab_label_text + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_label_text) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name const-gchar* tab_text)) +) + +(method get_menu_label + (of-object Notebook (Gtk)) + (c-name gtk_notebook_get_menu_label) + (return-type GtkWidget*) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_menu_label + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_menu_label) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkWidget* menu_label)) +) + +(method set_menu_label_text + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_menu_label_text) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name const-gchar* menu_text)) +) + +(method query_tab_label_packing + (of-object Notebook (Gtk)) + (c-name gtk_notebook_query_tab_label_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean* expand)) + (parameter (type-and-name gboolean* fill)) + (parameter (type-and-name GtkPackType* pack_type)) +) + +(method set_tab_label_packing + (of-object Notebook (Gtk)) + (c-name gtk_notebook_set_tab_label_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean expand)) + (parameter (type-and-name gboolean fill)) + (parameter (type-and-name GtkPackType pack_type)) +) + +(method reorder_child + (of-object Notebook (Gtk)) + (c-name gtk_notebook_reorder_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + + + +;; From /usr/include/gtk/gtkobject.h + +(function gtk_object_get_type + (c-name gtk_object_get_type) + (return-type GtkType) +) + +(method user_signal_new + (of-object ObjectClass (Gtk)) + (c-name gtk_object_class_user_signal_new) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name GtkSignalMarshaller marshaller)) + (parameter (type-and-name GtkType return_val)) + (parameter (type-and-name guint nparams)) + (varargs t) +) + +(method user_signal_newv + (of-object ObjectClass (Gtk)) + (c-name gtk_object_class_user_signal_newv) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name GtkSignalMarshaller marshaller)) + (parameter (type-and-name GtkType return_val)) + (parameter (type-and-name guint nparams)) + (parameter (type-and-name GtkType* params)) +) + +(function gtk_object_new + (c-name gtk_object_new) + (return-type GtkObject*) + (parameter (type-and-name GtkType type)) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(function gtk_object_newv + (c-name gtk_object_newv) + (return-type GtkObject*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method default_construct + (of-object Object (Gtk)) + (c-name gtk_object_default_construct) + (return-type none) +) + +(method constructed + (of-object Object (Gtk)) + (c-name gtk_object_constructed) + (return-type none) +) + +(method sink + (of-object Object (Gtk)) + (c-name gtk_object_sink) + (return-type none) +) + +(method ref + (of-object Object (Gtk)) + (c-name gtk_object_ref) + (return-type none) +) + +(method unref + (of-object Object (Gtk)) + (c-name gtk_object_unref) + (return-type none) +) + +(method weakref + (of-object Object (Gtk)) + (c-name gtk_object_weakref) + (return-type none) + (parameter (type-and-name GtkDestroyNotify notify)) + (parameter (type-and-name gpointer data)) +) + +(method weakunref + (of-object Object (Gtk)) + (c-name gtk_object_weakunref) + (return-type none) + (parameter (type-and-name GtkDestroyNotify notify)) + (parameter (type-and-name gpointer data)) +) + +(method destroy + (of-object Object (Gtk)) + (c-name gtk_object_destroy) + (return-type none) +) + +(method getv + (of-object Object (Gtk)) + (c-name gtk_object_getv) + (return-type none) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(method get_arg + (of-object Object (Gtk)) + (c-name gtk_object_get) + (return-type none) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method set_arg + (of-object Object (Gtk)) + (c-name gtk_object_set) + (return-type none) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method setv + (of-object Object (Gtk)) + (c-name gtk_object_setv) + (return-type none) + (parameter (type-and-name guint n_args)) + (parameter (type-and-name GtkArg* args)) +) + +(function gtk_object_query_args + (c-name gtk_object_query_args) + (return-type GtkArg*) + (parameter (type-and-name GtkType class_type)) + (parameter (type-and-name guint32** arg_flags)) + (parameter (type-and-name guint* n_args)) +) + +(method set_data + (of-object Object (Gtk)) + (c-name gtk_object_set_data) + (return-type none) + (parameter (type-and-name const-gchar* key)) + (parameter (type-and-name gpointer data)) +) + +(method set_data_full + (of-object Object (Gtk)) + (c-name gtk_object_set_data_full) + (return-type none) + (parameter (type-and-name const-gchar* key)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(method remove_data + (of-object Object (Gtk)) + (c-name gtk_object_remove_data) + (return-type none) + (parameter (type-and-name const-gchar* key)) +) + +(method get_data + (of-object Object (Gtk)) + (c-name gtk_object_get_data) + (return-type gpointer) + (parameter (type-and-name const-gchar* key)) +) + +(method remove_no_notify + (of-object Object (Gtk)) + (c-name gtk_object_remove_no_notify) + (return-type none) + (parameter (type-and-name const-gchar* key)) +) + +(method set_user_data + (of-object Object (Gtk)) + (c-name gtk_object_set_user_data) + (return-type none) + (parameter (type-and-name gpointer data)) +) + +(method get_user_data + (of-object Object (Gtk)) + (c-name gtk_object_get_user_data) + (return-type gpointer) +) + +(method add_signals + (of-object ObjectClass (Gtk)) + (c-name gtk_object_class_add_signals) + (return-type none) + (parameter (type-and-name guint* signals)) + (parameter (type-and-name guint nsignals)) +) + +(function gtk_object_add_arg_type + (c-name gtk_object_add_arg_type) + (return-type none) + (parameter (type-and-name const-gchar* arg_name)) + (parameter (type-and-name GtkType arg_type)) + (parameter (type-and-name guint arg_flags)) + (parameter (type-and-name guint arg_id)) +) + +(method set_data_by_id + (of-object Object (Gtk)) + (c-name gtk_object_set_data_by_id) + (return-type none) + (parameter (type-and-name GQuark data_id)) + (parameter (type-and-name gpointer data)) +) + +(method set_data_by_id_full + (of-object Object (Gtk)) + (c-name gtk_object_set_data_by_id_full) + (return-type none) + (parameter (type-and-name GQuark data_id)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy)) +) + +(method get_data_by_id + (of-object Object (Gtk)) + (c-name gtk_object_get_data_by_id) + (return-type gpointer) + (parameter (type-and-name GQuark data_id)) +) + +(method remove_data_by_id + (of-object Object (Gtk)) + (c-name gtk_object_remove_data_by_id) + (return-type none) + (parameter (type-and-name GQuark data_id)) +) + +(method remove_no_notify_by_id + (of-object Object (Gtk)) + (c-name gtk_object_remove_no_notify_by_id) + (return-type none) + (parameter (type-and-name GQuark key_id)) +) + +(method arg_set + (of-object Object (Gtk)) + (c-name gtk_object_arg_set) + (return-type none) + (parameter (type-and-name GtkArg* arg)) + (parameter (type-and-name GtkArgInfo* info)) +) + +(method arg_get + (of-object Object (Gtk)) + (c-name gtk_object_arg_get) + (return-type none) + (parameter (type-and-name GtkArg* arg)) + (parameter (type-and-name GtkArgInfo* info)) +) + +(function gtk_object_args_collect + (c-name gtk_object_args_collect) + (return-type gchar*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name GSList** arg_list_p)) + (parameter (type-and-name GSList** info_list_p)) + (parameter (type-and-name const-gchar* first_arg_name)) + (parameter (type-and-name va_list var_args)) +) + +(function gtk_object_arg_get_info + (c-name gtk_object_arg_get_info) + (return-type gchar*) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name const-gchar* arg_name)) + (parameter (type-and-name GtkArgInfo** info_p)) +) + +(function gtk_trace_referencing + (c-name gtk_trace_referencing) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* func)) + (parameter (type-and-name guint dummy)) + (parameter (type-and-name guint line)) + (parameter (type-and-name gboolean do_ref)) +) + + + +;; From /usr/include/gtk/gtkoptionmenu.h + +(function gtk_option_menu_get_type + (c-name gtk_option_menu_get_type) + (return-type GtkType) +) + +(function gtk_option_menu_new + (c-name gtk_option_menu_new) + (is-constructor-of GtkOptionMenu) + (return-type GtkWidget*) +) + +(method get_menu + (of-object OptionMenu (Gtk)) + (c-name gtk_option_menu_get_menu) + (return-type GtkWidget*) +) + +(method set_menu + (of-object OptionMenu (Gtk)) + (c-name gtk_option_menu_set_menu) + (return-type none) + (parameter (type-and-name GtkWidget* menu)) +) + +(method remove_menu + (of-object OptionMenu (Gtk)) + (c-name gtk_option_menu_remove_menu) + (return-type none) +) + +(method set_history + (of-object OptionMenu (Gtk)) + (c-name gtk_option_menu_set_history) + (return-type none) + (parameter (type-and-name guint index)) +) + + + +;; From /usr/include/gtk/gtkpacker.h + +(function gtk_packer_get_type + (c-name gtk_packer_get_type) + (return-type GtkType) +) + +(function gtk_packer_new + (c-name gtk_packer_new) + (is-constructor-of GtkPacker) + (return-type GtkWidget*) +) + +(method add_defaults + (of-object Packer (Gtk)) + (c-name gtk_packer_add_defaults) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkSideType side)) + (parameter (type-and-name GtkAnchorType anchor)) + (parameter (type-and-name GtkPackerOptions options)) +) + +(method add + (of-object Packer (Gtk)) + (c-name gtk_packer_add) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkSideType side)) + (parameter (type-and-name GtkAnchorType anchor)) + (parameter (type-and-name GtkPackerOptions options)) + (parameter (type-and-name guint border_width) (default "0")) + (parameter (type-and-name guint pad_x) (default "0")) + (parameter (type-and-name guint pad_y) (default "0")) + (parameter (type-and-name guint i_pad_x) (default "0")) + (parameter (type-and-name guint i_pad_y) (default "0")) +) + +(method set_child_packing + (of-object Packer (Gtk)) + (c-name gtk_packer_set_child_packing) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name GtkSideType side)) + (parameter (type-and-name GtkAnchorType anchor)) + (parameter (type-and-name GtkPackerOptions options)) + (parameter (type-and-name guint border_width) (default "0")) + (parameter (type-and-name guint pad_x) (default "0")) + (parameter (type-and-name guint pad_y) (default "0")) + (parameter (type-and-name guint i_pad_x) (default "0")) + (parameter (type-and-name guint i_pad_y) (default "0")) +) + +(method reorder_child + (of-object Packer (Gtk)) + (c-name gtk_packer_reorder_child) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gint position)) +) + +(method set_spacing + (of-object Packer (Gtk)) + (c-name gtk_packer_set_spacing) + (return-type none) + (parameter (type-and-name guint spacing)) +) + +(method set_default_border_width + (of-object Packer (Gtk)) + (c-name gtk_packer_set_default_border_width) + (return-type none) + (parameter (type-and-name guint border)) +) + +(method set_default_pad + (of-object Packer (Gtk)) + (c-name gtk_packer_set_default_pad) + (return-type none) + (parameter (type-and-name guint pad_x)) + (parameter (type-and-name guint pad_y)) +) + +(method set_default_ipad + (of-object Packer (Gtk)) + (c-name gtk_packer_set_default_ipad) + (return-type none) + (parameter (type-and-name guint i_pad_x)) + (parameter (type-and-name guint i_pad_y)) +) + + + +;; From /usr/include/gtk/gtkpaned.h + +(function gtk_paned_get_type + (c-name gtk_paned_get_type) + (return-type GtkType) +) + +(method add1 + (of-object Paned (Gtk)) + (c-name gtk_paned_add1) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method add2 + (of-object Paned (Gtk)) + (c-name gtk_paned_add2) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + +(method pack1 + (of-object Paned (Gtk)) + (c-name gtk_paned_pack1) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean resize) (default "FALSE")) + (parameter (type-and-name gboolean shrink) (default "TRUE")) +) + +(method pack2 + (of-object Paned (Gtk)) + (c-name gtk_paned_pack2) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name gboolean resize) (default "TRUE")) + (parameter (type-and-name gboolean shrink) (default "TRUE")) +) + +(method set_position + (of-object Paned (Gtk)) + (c-name gtk_paned_set_position) + (return-type none) + (parameter (type-and-name gint position)) +) + +(method set_handle_size + (of-object Paned (Gtk)) + (c-name gtk_paned_set_handle_size) + (return-type none) + (parameter (type-and-name guint16 size)) +) + +(method set_gutter_size + (of-object Paned (Gtk)) + (c-name gtk_paned_set_gutter_size) + (return-type none) + (parameter (type-and-name guint16 size)) +) + +(method compute_position + (of-object Paned (Gtk)) + (c-name gtk_paned_compute_position) + (return-type none) + (parameter (type-and-name gint allocation)) + (parameter (type-and-name gint child1_req)) + (parameter (type-and-name gint child2_req)) +) + + + +;; From /usr/include/gtk/gtkpixmap.h + +(function gtk_pixmap_get_type + (c-name gtk_pixmap_get_type) + (return-type GtkType) +) + +(function gtk_pixmap_new + (c-name gtk_pixmap_new) + (is-constructor-of GtkPixmap) + (return-type GtkWidget*) + (parameter (type-and-name GdkPixmap* pixmap)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method set + (of-object Pixmap (Gtk)) + (c-name gtk_pixmap_set) + (return-type none) + (parameter (type-and-name GdkPixmap* val)) + (parameter (type-and-name GdkBitmap* mask)) +) + +(method get + (of-object Pixmap (Gtk)) + (c-name gtk_pixmap_get) + (return-type none) + (parameter (type-and-name GdkPixmap** val)) + (parameter (type-and-name GdkBitmap** mask)) +) + +(method set_build_insensitive + (of-object Pixmap (Gtk)) + (c-name gtk_pixmap_set_build_insensitive) + (return-type none) + (parameter (type-and-name guint build)) +) + + + +;; From /usr/include/gtk/gtkplug.h + +(function gtk_plug_get_type + (c-name gtk_plug_get_type) + (return-type guint) +) + +(method construct + (of-object Plug (Gtk)) + (c-name gtk_plug_construct) + (return-type none) + (parameter (type-and-name guint32 socket_id)) +) + +(function gtk_plug_new + (c-name gtk_plug_new) + (is-constructor-of GtkPlug) + (return-type GtkWidget*) + (parameter (type-and-name guint32 socket_id)) +) + + + +;; From /usr/include/gtk/gtkpreview.h + +(function gtk_preview_get_type + (c-name gtk_preview_get_type) + (return-type GtkType) +) + +(function gtk_preview_uninit + (c-name gtk_preview_uninit) + (return-type none) +) + +(function gtk_preview_new + (c-name gtk_preview_new) + (is-constructor-of GtkPreview) + (return-type GtkWidget*) + (parameter (type-and-name GtkPreviewType type)) +) + +(method size + (of-object Preview (Gtk)) + (c-name gtk_preview_size) + (return-type none) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method put + (of-object Preview (Gtk)) + (c-name gtk_preview_put) + (return-type none) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkGC* gc)) + (parameter (type-and-name gint srcx)) + (parameter (type-and-name gint srcy)) + (parameter (type-and-name gint destx)) + (parameter (type-and-name gint desty)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method draw_row + (of-object Preview (Gtk)) + (c-name gtk_preview_draw_row) + (return-type none) + (parameter (type-and-name guchar* data)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint w)) +) + +(method set_expand + (of-object Preview (Gtk)) + (c-name gtk_preview_set_expand) + (return-type none) + (parameter (type-and-name gboolean expand)) +) + +(function preview_set_gamma + (c-name gtk_preview_set_gamma) + (return-type none) + (parameter (type-and-name double gamma)) +) + +(function preview_set_color_cube + (c-name gtk_preview_set_color_cube) + (return-type none) + (parameter (type-and-name guint nred_shades)) + (parameter (type-and-name guint ngreen_shades)) + (parameter (type-and-name guint nblue_shades)) + (parameter (type-and-name guint ngray_shades)) +) + +(function preview_set_install_cmap + (c-name gtk_preview_set_install_cmap) + (return-type none) + (parameter (type-and-name gint install_cmap)) +) + +(function preview_set_reserved + (c-name gtk_preview_set_reserved) + (return-type none) + (parameter (type-and-name gint nreserved)) +) + +(method set_dither + (of-object Preview (Gtk)) + (c-name gtk_preview_set_dither) + (return-type none) + (parameter (type-and-name GdkRgbDither dither)) +) + +(function preview_get_visual + (c-name gtk_preview_get_visual) + (return-type GdkVisual*) +) + +(function preview_get_cmap + (c-name gtk_preview_get_cmap) + (return-type GdkColormap*) +) + +(function preview_get_info + (c-name gtk_preview_get_info) + (return-type GtkPreviewInfo*) +) + +(function preview_reset + (c-name gtk_preview_reset) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkprogress.h + +(function gtk_progress_get_type + (c-name gtk_progress_get_type) + (return-type GtkType) +) + +(method set_show_text + (of-object Progress (Gtk)) + (c-name gtk_progress_set_show_text) + (return-type none) + (parameter (type-and-name gint show_text)) +) + +(method set_text_alignment + (of-object Progress (Gtk)) + (c-name gtk_progress_set_text_alignment) + (return-type none) + (parameter (type-and-name gfloat x_align)) + (parameter (type-and-name gfloat y_align)) +) + +(method set_format_string + (of-object Progress (Gtk)) + (c-name gtk_progress_set_format_string) + (return-type none) + (parameter (type-and-name const-gchar* format)) +) + +(method set_adjustment + (of-object Progress (Gtk)) + (c-name gtk_progress_set_adjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method configure + (of-object Progress (Gtk)) + (c-name gtk_progress_configure) + (return-type none) + (parameter (type-and-name gfloat value)) + (parameter (type-and-name gfloat min)) + (parameter (type-and-name gfloat max)) +) + +(method set_percentage + (of-object Progress (Gtk)) + (c-name gtk_progress_set_percentage) + (return-type none) + (parameter (type-and-name gfloat percentage)) +) + +(method set_value + (of-object Progress (Gtk)) + (c-name gtk_progress_set_value) + (return-type none) + (parameter (type-and-name gfloat value)) +) + +(method get_value + (of-object Progress (Gtk)) + (c-name gtk_progress_get_value) + (return-type gfloat) +) + +(method set_activity_mode + (of-object Progress (Gtk)) + (c-name gtk_progress_set_activity_mode) + (return-type none) + (parameter (type-and-name guint activity_mode)) +) + +(method get_current_text + (of-object Progress (Gtk)) + (c-name gtk_progress_get_current_text) + (return-type gchar*) +) + +(method get_text_from_value + (of-object Progress (Gtk)) + (c-name gtk_progress_get_text_from_value) + (return-type gchar*) + (parameter (type-and-name gfloat value)) +) + +(method get_current_percentage + (of-object Progress (Gtk)) + (c-name gtk_progress_get_current_percentage) + (return-type gfloat) +) + +(method get_percentage_from_value + (of-object Progress (Gtk)) + (c-name gtk_progress_get_percentage_from_value) + (return-type gfloat) + (parameter (type-and-name gfloat value)) +) + + + +;; From /usr/include/gtk/gtkprogressbar.h + +(function gtk_progress_bar_get_type + (c-name gtk_progress_bar_get_type) + (return-type GtkType) +) + +(function gtk_progress_bar_new + (c-name gtk_progress_bar_new) + (return-type GtkWidget*) +) + +(function gtk_progress_bar_new_with_adjustment + (c-name gtk_progress_bar_new_with_adjustment) + (is-constructor-of GtkProgressBar) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok) (default "NULL")) +) + +(method set_bar_style + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_bar_style) + (return-type none) + (parameter (type-and-name GtkProgressBarStyle style)) +) + +(method set_discrete_blocks + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_discrete_blocks) + (return-type none) + (parameter (type-and-name guint blocks)) +) + +(method set_activity_step + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_activity_step) + (return-type none) + (parameter (type-and-name guint step)) +) + +(method set_activity_blocks + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_activity_blocks) + (return-type none) + (parameter (type-and-name guint blocks)) +) + +(method set_orientation + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_set_orientation) + (return-type none) + (parameter (type-and-name GtkProgressBarOrientation orientation)) +) + +(method update + (of-object ProgressBar (Gtk)) + (c-name gtk_progress_bar_update) + (return-type none) + (parameter (type-and-name gfloat percentage)) +) + + + +;; From /usr/include/gtk/gtkradiobutton.h + +(function gtk_radio_button_get_type + (c-name gtk_radio_button_get_type) + (return-type GtkType) +) + +(function gtk_radio_button_new + (c-name gtk_radio_button_new) + (is-constructor-of GtkRadioButton) + (return-type GtkWidget*) + (parameter (type-and-name GSList* group)) +) + +(function gtk_radio_button_new_from_widget + (c-name gtk_radio_button_new_from_widget) + (is-constructor-of GtkRadioButton) + (return-type GtkWidget*) +) + +(function gtk_radio_button_new_with_label + (c-name gtk_radio_button_new_with_label) + (is-constructor-of GtkRadioButton) + (return-type GtkWidget*) + (parameter (type-and-name GSList* group)) + (parameter (type-and-name const-gchar* label)) +) + +(function gtk_radio_button_new_with_label_from_widget + (c-name gtk_radio_button_new_with_label_from_widget) + (is-constructor-of GtkRadioButton) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method group + (of-object RadioButton (Gtk)) + (c-name gtk_radio_button_group) + (return-type GSList*) +) + +(method set_group + (of-object RadioButton (Gtk)) + (c-name gtk_radio_button_set_group) + (return-type none) + (parameter (type-and-name GSList* group)) +) + + + +;; From /usr/include/gtk/gtkradiomenuitem.h + +(function gtk_radio_menu_item_get_type + (c-name gtk_radio_menu_item_get_type) + (return-type GtkType) +) + +(function gtk_radio_menu_item_new + (c-name gtk_radio_menu_item_new) + (is-constructor-of GtkRadioMenuItem) + (return-type GtkWidget*) + (parameter (type-and-name GSList* group)) +) + +(function gtk_radio_menu_item_new_with_label + (c-name gtk_radio_menu_item_new_with_label) + (is-constructor-of GtkRadioMenuItem) + (return-type GtkWidget*) + (parameter (type-and-name GSList* group)) + (parameter (type-and-name const-gchar* label)) +) + +(method group + (of-object RadioMenuItem (Gtk)) + (c-name gtk_radio_menu_item_group) + (return-type GSList*) +) + +(method set_group + (of-object RadioMenuItem (Gtk)) + (c-name gtk_radio_menu_item_set_group) + (return-type none) + (parameter (type-and-name GSList* group)) +) + + + +;; From /usr/include/gtk/gtkrange.h + +(function gtk_range_get_type + (c-name gtk_range_get_type) + (return-type GtkType) +) + +(method get_adjustment + (of-object Range (Gtk)) + (c-name gtk_range_get_adjustment) + (return-type GtkAdjustment*) +) + +(method set_update_policy + (of-object Range (Gtk)) + (c-name gtk_range_set_update_policy) + (return-type none) + (parameter (type-and-name GtkUpdateType policy)) +) + +(method set_adjustment + (of-object Range (Gtk)) + (c-name gtk_range_set_adjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method draw_background + (of-object Range (Gtk)) + (c-name gtk_range_draw_background) + (return-type none) +) + +(method clear_background + (of-object Range (Gtk)) + (c-name gtk_range_clear_background) + (return-type none) +) + +(method draw_trough + (of-object Range (Gtk)) + (c-name gtk_range_draw_trough) + (return-type none) +) + +(method draw_slider + (of-object Range (Gtk)) + (c-name gtk_range_draw_slider) + (return-type none) +) + +(method draw_step_forw + (of-object Range (Gtk)) + (c-name gtk_range_draw_step_forw) + (return-type none) +) + +(method draw_step_back + (of-object Range (Gtk)) + (c-name gtk_range_draw_step_back) + (return-type none) +) + +(method slider_update + (of-object Range (Gtk)) + (c-name gtk_range_slider_update) + (return-type none) +) + +(method trough_click + (of-object Range (Gtk)) + (c-name gtk_range_trough_click) + (return-type gint) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gfloat* jump_perc)) +) + +(method default_hslider_update + (of-object Range (Gtk)) + (c-name gtk_range_default_hslider_update) + (return-type none) +) + +(method default_vslider_update + (of-object Range (Gtk)) + (c-name gtk_range_default_vslider_update) + (return-type none) +) + +(method default_htrough_click + (of-object Range (Gtk)) + (c-name gtk_range_default_htrough_click) + (return-type gint) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gfloat* jump_perc)) +) + +(method default_vtrough_click + (of-object Range (Gtk)) + (c-name gtk_range_default_vtrough_click) + (return-type gint) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gfloat* jump_perc)) +) + +(method default_hmotion + (of-object Range (Gtk)) + (c-name gtk_range_default_hmotion) + (return-type none) + (parameter (type-and-name gint xdelta)) + (parameter (type-and-name gint ydelta)) +) + +(method default_vmotion + (of-object Range (Gtk)) + (c-name gtk_range_default_vmotion) + (return-type none) + (parameter (type-and-name gint xdelta)) + (parameter (type-and-name gint ydelta)) +) + + + +;; From /usr/include/gtk/gtkrc.h + +(function rc_add_default_file + (c-name gtk_rc_add_default_file) + (return-type none) + (parameter (type-and-name const-gchar* filename)) +) + +(function rc_set_default_files + (c-name gtk_rc_set_default_files) + (return-type none) + (parameter (type-and-name gchar** filenames)) +) + +(function rc_get_default_files + (c-name gtk_rc_get_default_files) + (return-type gchar**) +) + +(function rc_parse + (c-name gtk_rc_parse) + (return-type none) + (parameter (type-and-name const-gchar* filename)) +) + +(function rc_parse_string + (c-name gtk_rc_parse_string) + (return-type none) + (parameter (type-and-name const-gchar* rc_string)) +) + +(function rc_reparse_all + (c-name gtk_rc_reparse_all) + (return-type gboolean) +) + +(function rc_get_style + (c-name gtk_rc_get_style) + (return-type GtkStyle*) + (parameter (type-and-name GtkWidget* widget)) +) + +(function rc_add_widget_name_style + (c-name gtk_rc_add_widget_name_style) + (return-type none) + (parameter (type-and-name GtkRcStyle* rc_style)) + (parameter (type-and-name const-gchar* pattern)) +) + +(function rc_add_widget_class_style + (c-name gtk_rc_add_widget_class_style) + (return-type none) + (parameter (type-and-name GtkRcStyle* rc_style)) + (parameter (type-and-name const-gchar* pattern)) +) + +(function rc_add_class_style + (c-name gtk_rc_add_class_style) + (return-type none) + (parameter (type-and-name GtkRcStyle* rc_style)) + (parameter (type-and-name const-gchar* pattern)) +) + +(function rc_set_image_loader + (c-name gtk_rc_set_image_loader) + (return-type none) + (parameter (type-and-name GtkImageLoader loader)) +) + +(function rc_load_image + (c-name gtk_rc_load_image) + (return-type GdkPixmap*) + (parameter (type-and-name GdkColormap* colormap)) + (parameter (type-and-name GdkColor* transparent_color)) + (parameter (type-and-name const-gchar* filename)) +) + +(function rc_find_pixmap_in_path + (c-name gtk_rc_find_pixmap_in_path) + (return-type gchar*) + (parameter (type-and-name GScanner* scanner)) + (parameter (type-and-name const-gchar* pixmap_file)) +) + +(function rc_find_module_in_path + (c-name gtk_rc_find_module_in_path) + (return-type gchar*) + (parameter (type-and-name const-gchar* module_file)) +) + +(function rc_get_theme_dir + (c-name gtk_rc_get_theme_dir) + (return-type gchar*) +) + +(function rc_get_module_dir + (c-name gtk_rc_get_module_dir) + (return-type gchar*) +) + +(function rc_parse_color + (c-name gtk_rc_parse_color) + (return-type guint) + (parameter (type-and-name GScanner* scanner)) + (parameter (type-and-name GdkColor* color)) +) + +(function rc_parse_state + (c-name gtk_rc_parse_state) + (return-type guint) + (parameter (type-and-name GScanner* scanner)) + (parameter (type-and-name GtkStateType* state)) +) + +(function rc_parse_priority + (c-name gtk_rc_parse_priority) + (return-type guint) + (parameter (type-and-name GScanner* scanner)) + (parameter (type-and-name GtkPathPriorityType* priority)) +) + + + +;; From /usr/include/gtk/gtkruler.h + +(function gtk_ruler_get_type + (c-name gtk_ruler_get_type) + (return-type GtkType) +) + +(method set_metric + (of-object Ruler (Gtk)) + (c-name gtk_ruler_set_metric) + (return-type none) + (parameter (type-and-name GtkMetricType metric)) +) + +(method set_range + (of-object Ruler (Gtk)) + (c-name gtk_ruler_set_range) + (return-type none) + (parameter (type-and-name gfloat lower)) + (parameter (type-and-name gfloat upper)) + (parameter (type-and-name gfloat position)) + (parameter (type-and-name gfloat max_size)) +) + +(method draw_ticks + (of-object Ruler (Gtk)) + (c-name gtk_ruler_draw_ticks) + (return-type none) +) + +(method draw_pos + (of-object Ruler (Gtk)) + (c-name gtk_ruler_draw_pos) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkscale.h + +(function gtk_scale_get_type + (c-name gtk_scale_get_type) + (return-type GtkType) +) + +(method set_digits + (of-object Scale (Gtk)) + (c-name gtk_scale_set_digits) + (return-type none) + (parameter (type-and-name gint digits)) +) + +(method set_draw_value + (of-object Scale (Gtk)) + (c-name gtk_scale_set_draw_value) + (return-type none) + (parameter (type-and-name gboolean draw_value)) +) + +(method set_value_pos + (of-object Scale (Gtk)) + (c-name gtk_scale_set_value_pos) + (return-type none) + (parameter (type-and-name GtkPositionType pos)) +) + +(method get_value_width + (of-object Scale (Gtk)) + (c-name gtk_scale_get_value_width) + (return-type gint) +) + +(method draw_value + (of-object Scale (Gtk)) + (c-name gtk_scale_draw_value) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkscrollbar.h + +(function gtk_scrollbar_get_type + (c-name gtk_scrollbar_get_type) + (return-type GtkType) +) + + + +;; From /usr/include/gtk/gtkscrolledwindow.h + +(function gtk_scrolled_window_get_type + (c-name gtk_scrolled_window_get_type) + (return-type GtkType) +) + +(function gtk_scrolled_window_new + (c-name gtk_scrolled_window_new) + (is-constructor-of GtkScrolledWindow) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* hadjustment) (null-ok) (default "NULL")) + (parameter (type-and-name GtkAdjustment* vadjustment) (null-ok) (default "NULL")) +) + +(method set_hadjustment + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_set_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* hadjustment)) +) + +(method set_vadjustment + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_set_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* hadjustment)) +) + +(method get_hadjustment + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_get_hadjustment) + (return-type GtkAdjustment*) +) + +(method get_vadjustment + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_get_vadjustment) + (return-type GtkAdjustment*) +) + +(method set_policy + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_set_policy) + (return-type none) + (parameter (type-and-name GtkPolicyType hscrollbar_policy)) + (parameter (type-and-name GtkPolicyType vscrollbar_policy)) +) + +(method set_placement + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_set_placement) + (return-type none) + (parameter (type-and-name GtkCornerType window_placement)) +) + +(method add_with_viewport + (of-object ScrolledWindow (Gtk)) + (c-name gtk_scrolled_window_add_with_viewport) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + + + +;; From /usr/include/gtk/gtkselection.h + +(function gtk_target_list_new + (c-name gtk_target_list_new) + (return-type GtkTargetList*) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name guint ntargets)) +) + +(method ref + (of-object TargetList (Gtk)) + (c-name gtk_target_list_ref) + (return-type none) +) + +(method unref + (of-object TargetList (Gtk)) + (c-name gtk_target_list_unref) + (return-type none) +) + +(method add + (of-object TargetList (Gtk)) + (c-name gtk_target_list_add) + (return-type none) + (parameter (type-and-name GdkAtom target)) + (parameter (type-and-name guint flags)) + (parameter (type-and-name guint info)) +) + +(method add_table + (of-object TargetList (Gtk)) + (c-name gtk_target_list_add_table) + (return-type none) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name guint ntargets)) +) + +(method remove + (of-object TargetList (Gtk)) + (c-name gtk_target_list_remove) + (return-type none) + (parameter (type-and-name GdkAtom target)) +) + +(method find + (of-object TargetList (Gtk)) + (c-name gtk_target_list_find) + (return-type gboolean) + (parameter (type-and-name GdkAtom target)) + (parameter (type-and-name guint* info)) +) + +(method selection_owner_set + (of-object Widget (Gtk)) + (c-name gtk_selection_owner_set) + (return-type gint) + (parameter (type-and-name GdkAtom selection)) + (parameter (type-and-name guint32 time)) +) + +(method selection_add_target + (of-object Widget (Gtk)) + (c-name gtk_selection_add_target) + (return-type none) + (parameter (type-and-name GdkAtom selection)) + (parameter (type-and-name GdkAtom target)) + (parameter (type-and-name guint info)) +) + +(method selection_add_targets + (of-object Widget (Gtk)) + (c-name gtk_selection_add_targets) + (return-type none) + (parameter (type-and-name GdkAtom selection)) + (parameter (type-and-name const-GtkTargetEntry* targets)) + (parameter (type-and-name guint ntargets)) +) + +(method selection_convert + (of-object Widget (Gtk)) + (c-name gtk_selection_convert) + (return-type gint) + (parameter (type-and-name GdkAtom selection)) + (parameter (type-and-name GdkAtom target)) + (parameter (type-and-name guint32 time)) +) + +(method set + (of-object SelectionData (Gtk)) + (c-name gtk_selection_data_set) + (return-type none) + (parameter (type-and-name GdkAtom type)) + (parameter (type-and-name gint format)) + (parameter (type-and-name const-guchar* data)) + (parameter (type-and-name gint length)) +) + +(method selection_remove_all + (of-object Widget (Gtk)) + (c-name gtk_selection_remove_all) + (return-type none) +) + +(method selection_clear + (of-object Widget (Gtk)) + (c-name gtk_selection_clear) + (return-type gint) + (parameter (type-and-name GdkEventSelection* event)) +) + +(method selection_request + (of-object Widget (Gtk)) + (c-name gtk_selection_request) + (return-type gint) + (parameter (type-and-name GdkEventSelection* event)) +) + +(function gtk_selection_incr_event + (c-name gtk_selection_incr_event) + (return-type gint) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkEventProperty* event)) +) + +(method selection_notify + (of-object Widget (Gtk)) + (c-name gtk_selection_notify) + (return-type gint) + (parameter (type-and-name GdkEventSelection* event)) +) + +(method selection_property_notify + (of-object Widget (Gtk)) + (c-name gtk_selection_property_notify) + (return-type gint) + (parameter (type-and-name GdkEventProperty* event)) +) + +(method copy + (of-object SelectionData (Gtk)) + (c-name gtk_selection_data_copy) + (return-type GtkSelectioData*) +) + +(method free + (of-object SelectionData (Gtk)) + (c-name gtk_selection_data_free) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkseparator.h + +(function gtk_separator_get_type + (c-name gtk_separator_get_type) + (return-type GtkType) +) + + + +;; From /usr/include/gtk/gtksignal.h + +(function gtk_signal_lookup + (c-name gtk_signal_lookup) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkType object_type)) +) + +(function gtk_signal_name + (c-name gtk_signal_name) + (return-type gchar*) + (parameter (type-and-name guint signal_id)) +) + +(function gtk_signal_n_emissions + (c-name gtk_signal_n_emissions) + (return-type guint) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint signal_id)) +) + +(function gtk_signal_n_emissions_by_name + (c-name gtk_signal_n_emissions_by_name) + (return-type guint) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* name)) +) + +(method emit_stop + (of-object Object (Gtk)) + (c-name gtk_signal_emit_stop) + (return-type none) + (parameter (type-and-name guint signal_id)) +) + +(method emit_stop_by_name + (of-object Object (Gtk)) + (c-name gtk_signal_emit_stop_by_name) + (return-type none) + (parameter (type-and-name const-gchar* name)) +) + +(method connect + (of-object Object (Gtk)) + (c-name gtk_signal_connect) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer func_data)) +) + +(method connect_after + (of-object Object (Gtk)) + (c-name gtk_signal_connect_after) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer func_data)) +) + +(method connect_object + (of-object Object (Gtk)) + (c-name gtk_signal_connect_object) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name GtkObject* slot_object)) +) + +(method connect_object_after + (of-object Object (Gtk)) + (c-name gtk_signal_connect_object_after) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name GtkObject* slot_object)) +) + +(function gtk_signal_connect_full + (c-name gtk_signal_connect_full) + (return-type guint) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name GtkCallbackMarshal marshal)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GtkDestroyNotify destroy_func)) + (parameter (type-and-name gint object_signal)) + (parameter (type-and-name gint after)) +) + +(function gtk_signal_connect_object_while_alive + (c-name gtk_signal_connect_object_while_alive) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* signal)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name GtkObject* alive_object)) +) + +(function gtk_signal_connect_while_alive + (c-name gtk_signal_connect_while_alive) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* signal)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer func_data)) + (parameter (type-and-name GtkObject* alive_object)) +) + +(method disconnect + (of-object Object (Gtk)) + (c-name gtk_signal_disconnect) + (return-type none) + (parameter (type-and-name guint handler_id)) +) + +(function gtk_signal_disconnect_by_func + (c-name gtk_signal_disconnect_by_func) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer data)) +) + +(function gtk_signal_disconnect_by_data + (c-name gtk_signal_disconnect_by_data) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name gpointer data)) +) + +(method signal_handler_block + (of-object Object (Gtk)) + (c-name gtk_signal_handler_block) + (return-type none) + (parameter (type-and-name guint handler_id)) +) + +(function gtk_signal_handler_block_by_func + (c-name gtk_signal_handler_block_by_func) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer data)) +) + +(function gtk_signal_handler_block_by_data + (c-name gtk_signal_handler_block_by_data) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name gpointer data)) +) + +(method signal_handler_unblock + (of-object Object (Gtk)) + (c-name gtk_signal_handler_unblock) + (return-type none) + (parameter (type-and-name guint handler_id)) +) + +(function gtk_signal_handler_unblock_by_func + (c-name gtk_signal_handler_unblock_by_func) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer data)) +) + +(function gtk_signal_handler_unblock_by_data + (c-name gtk_signal_handler_unblock_by_data) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name gpointer data)) +) + +(method signal_handler_pending + (of-object Object (Gtk)) + (c-name gtk_signal_handler_pending) + (return-type guint) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name gboolean may_be_blocked)) +) + +(function gtk_signal_handler_pending_by_func + (c-name gtk_signal_handler_pending_by_func) + (return-type guint) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name gboolean may_be_blocked)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer data)) +) + +(method signal_handler_pending_by_id + (of-object Object (Gtk)) + (c-name gtk_signal_handler_pending_by_id) + (return-type gint) + (parameter (type-and-name guint handler_id)) + (parameter (type-and-name gboolean may_be_blocked)) +) + +(function gtk_signal_add_emission_hook + (c-name gtk_signal_add_emission_hook) + (return-type guint) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name GtkEmissionHook hook_func)) + (parameter (type-and-name gpointer data)) +) + +(function gtk_signal_add_emission_hook_full + (c-name gtk_signal_add_emission_hook_full) + (return-type guint) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name GtkEmissionHook hook_func)) + (parameter (type-and-name gpointer data)) + (parameter (type-and-name GDestroyNotify destroy)) +) + +(function gtk_signal_remove_emission_hook + (c-name gtk_signal_remove_emission_hook) + (return-type none) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name guint hook_id)) +) + +(function gtk_signal_query + (c-name gtk_signal_query) + (return-type GtkSignalQuery*) + (parameter (type-and-name guint signal_id)) +) + +(function gtk_signal_new + (c-name gtk_signal_new) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name guint function_offset)) + (parameter (type-and-name GtkSignalMarshaller marshaller)) + (parameter (type-and-name GtkType return_val)) + (parameter (type-and-name guint nparams)) + (varargs t) +) + +(function gtk_signal_newv + (c-name gtk_signal_newv) + (return-type guint) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkSignalRunType signal_flags)) + (parameter (type-and-name GtkType object_type)) + (parameter (type-and-name guint function_offset)) + (parameter (type-and-name GtkSignalMarshaller marshaller)) + (parameter (type-and-name GtkType return_val)) + (parameter (type-and-name guint nparams)) + (parameter (type-and-name GtkType* params)) +) + +(method emit + (of-object Object (Gtk)) + (c-name gtk_signal_emit) + (return-type none) + (parameter (type-and-name guint signal_id)) + (varargs t) +) + +(function gtk_signal_emit_by_name + (c-name gtk_signal_emit_by_name) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* name)) + (varargs t) +) + +(function gtk_signal_emitv + (c-name gtk_signal_emitv) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name guint signal_id)) + (parameter (type-and-name GtkArg* params)) +) + +(function gtk_signal_emitv_by_name + (c-name gtk_signal_emitv_by_name) + (return-type none) + (parameter (type-and-name GtkObject* object)) + (parameter (type-and-name const-gchar* name)) + (parameter (type-and-name GtkArg* params)) +) + +(method signal_handlers_destroy + (of-object Object (Gtk)) + (c-name gtk_signal_handlers_destroy) + (return-type none) +) + +(function gtk_signal_set_funcs + (c-name gtk_signal_set_funcs) + (return-type none) + (parameter (type-and-name GtkSignalMarshal marshal_func)) + (parameter (type-and-name GtkSignalDestroy destroy_func)) +) + + + +;; From /usr/include/gtk/gtksocket.h + +(function gtk_socket_new + (c-name gtk_socket_new) + (is-constructor-of GtkSocket) + (return-type GtkWidget*) +) + +(function gtk_socket_get_type + (c-name gtk_socket_get_type) + (return-type guint) +) + +(method steal + (of-object Socket (Gtk)) + (c-name gtk_socket_steal) + (return-type none) + (parameter (type-and-name guint32 wid)) +) + + + +;; From /usr/include/gtk/gtkspinbutton.h + +(function gtk_spin_button_get_type + (c-name gtk_spin_button_get_type) + (return-type GtkType) +) + +(method configure + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_configure) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) + (parameter (type-and-name gfloat climb_rate)) + (parameter (type-and-name guint digits)) +) + +(function gtk_spin_button_new + (c-name gtk_spin_button_new) + (is-constructor-of GtkSpinButton) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok) (default "NULL")) + (parameter (type-and-name gfloat climb_rate) (default "0.0")) + (parameter (type-and-name guint digits) (default "0")) +) + +(method set_adjustment + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_adjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method get_adjustment + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_get_adjustment) + (return-type GtkAdjustment*) +) + +(method set_digits + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_digits) + (return-type none) + (parameter (type-and-name guint digits)) +) + +(method get_value_as_float + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_get_value_as_float) + (return-type gfloat) +) + +(method get_value_as_int + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_get_value_as_int) + (return-type gint) +) + +(method set_value + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_value) + (return-type none) + (parameter (type-and-name gfloat value)) +) + +(method set_update_policy + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_update_policy) + (return-type none) + (parameter (type-and-name GtkSpinButtonUpdatePolicy policy)) +) + +(method set_numeric + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_numeric) + (return-type none) + (parameter (type-and-name gboolean numeric)) +) + +(method spin + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_spin) + (return-type none) + (parameter (type-and-name GtkSpinType direction)) + (parameter (type-and-name gfloat increment)) +) + +(method set_wrap + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_wrap) + (return-type none) + (parameter (type-and-name gboolean wrap)) +) + +(method set_shadow_type + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType shadow_type)) +) + +(method set_snap_to_ticks + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_set_snap_to_ticks) + (return-type none) + (parameter (type-and-name gboolean snap_to_ticks)) +) + +(method update + (of-object SpinButton (Gtk)) + (c-name gtk_spin_button_update) + (return-type none) +) + + + +;; From /usr/include/gtk/gtkstatusbar.h + +(function gtk_statusbar_get_type + (c-name gtk_statusbar_get_type) + (return-type guint) +) + +(function gtk_statusbar_new + (c-name gtk_statusbar_new) + (is-constructor-of GtkStatusbar) + (return-type GtkWidget*) +) + +(method get_context_id + (of-object Statusbar (Gtk)) + (c-name gtk_statusbar_get_context_id) + (return-type guint) + (parameter (type-and-name const-gchar* context_description)) +) + +(method push + (of-object Statusbar (Gtk)) + (c-name gtk_statusbar_push) + (return-type guint) + (parameter (type-and-name guint context_id)) + (parameter (type-and-name const-gchar* text)) +) + +(method pop + (of-object Statusbar (Gtk)) + (c-name gtk_statusbar_pop) + (return-type none) + (parameter (type-and-name guint context_id)) +) + +(method remove + (of-object Statusbar (Gtk)) + (c-name gtk_statusbar_remove) + (return-type none) + (parameter (type-and-name guint context_id)) + (parameter (type-and-name guint message_id)) +) + + + +;; From /usr/include/gtk/gtkstyle.h + +(function gtk_style_new + (c-name gtk_style_new) + (return-type GtkStyle*) +) + +(method copy + (of-object Style (Gtk)) + (c-name gtk_style_copy) + (return-type GtkStyle*) +) + +(method attach + (of-object Style (Gtk)) + (c-name gtk_style_attach) + (return-type GtkStyle*) + (parameter (type-and-name GdkWindow* window)) +) + +(method detach + (of-object Style (Gtk)) + (c-name gtk_style_detach) + (return-type none) +) + +(method ref + (of-object Style (Gtk)) + (c-name gtk_style_ref) + (return-type GtkStyle*) +) + +(method unref + (of-object Style (Gtk)) + (c-name gtk_style_unref) + (return-type none) +) + +(method set_background + (of-object Style (Gtk)) + (c-name gtk_style_set_background) + (return-type none) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) +) + +(method apply_default_background + (of-object Style (Gtk)) + (c-name gtk_style_apply_default_background) + (return-type none) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name gboolean set_bg)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_hline + (c-name gtk_draw_hline) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name gint x1)) + (parameter (type-and-name gint x2)) + (parameter (type-and-name gint y)) +) + +(function gtk_draw_vline + (c-name gtk_draw_vline) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name gint y1)) + (parameter (type-and-name gint y2)) + (parameter (type-and-name gint x)) +) + +(function gtk_draw_shadow + (c-name gtk_draw_shadow) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_polygon + (c-name gtk_draw_polygon) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) + (parameter (type-and-name gboolean fill)) +) + +(function gtk_draw_arrow + (c-name gtk_draw_arrow) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name gboolean fill)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_diamond + (c-name gtk_draw_diamond) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_oval + (c-name gtk_draw_oval) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_string + (c-name gtk_draw_string) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-gchar* string)) +) + +(function gtk_draw_box + (c-name gtk_draw_box) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_flat_box + (c-name gtk_draw_flat_box) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_check + (c-name gtk_draw_check) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_option + (c-name gtk_draw_option) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_cross + (c-name gtk_draw_cross) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_ramp + (c-name gtk_draw_ramp) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_tab + (c-name gtk_draw_tab) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_shadow_gap + (c-name gtk_draw_shadow_gap) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) + (parameter (type-and-name gint gap_x)) + (parameter (type-and-name gint gap_width)) +) + +(function gtk_draw_box_gap + (c-name gtk_draw_box_gap) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) + (parameter (type-and-name gint gap_x)) + (parameter (type-and-name gint gap_width)) +) + +(function gtk_draw_extension + (c-name gtk_draw_extension) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) +) + +(function gtk_draw_focus + (c-name gtk_draw_focus) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_draw_slider + (c-name gtk_draw_slider) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkOrientation orientation)) +) + +(function gtk_draw_handle + (c-name gtk_draw_handle) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkOrientation orientation)) +) + +(function gtk_paint_hline + (c-name gtk_paint_hline) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x1)) + (parameter (type-and-name gint x2)) + (parameter (type-and-name gint y)) +) + +(function gtk_paint_vline + (c-name gtk_paint_vline) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint y1)) + (parameter (type-and-name gint y2)) + (parameter (type-and-name gint x)) +) + +(function gtk_paint_shadow + (c-name gtk_paint_shadow) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_polygon + (c-name gtk_paint_polygon) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name GdkPoint* points)) + (parameter (type-and-name gint npoints)) + (parameter (type-and-name gboolean fill)) +) + +(function gtk_paint_arrow + (c-name gtk_paint_arrow) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name gboolean fill)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_diamond + (c-name gtk_paint_diamond) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_oval + (c-name gtk_paint_oval) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_string + (c-name gtk_paint_string) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name const-gchar* string)) +) + +(function gtk_paint_box + (c-name gtk_paint_box) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_flat_box + (c-name gtk_paint_flat_box) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_check + (c-name gtk_paint_check) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_option + (c-name gtk_paint_option) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_cross + (c-name gtk_paint_cross) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_ramp + (c-name gtk_paint_ramp) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name GtkArrowType arrow_type)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_tab + (c-name gtk_paint_tab) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_shadow_gap + (c-name gtk_paint_shadow_gap) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) + (parameter (type-and-name gint gap_x)) + (parameter (type-and-name gint gap_width)) +) + +(function gtk_paint_box_gap + (c-name gtk_paint_box_gap) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) + (parameter (type-and-name gint gap_x)) + (parameter (type-and-name gint gap_width)) +) + +(function gtk_paint_extension + (c-name gtk_paint_extension) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkPositionType gap_side)) +) + +(function gtk_paint_focus + (c-name gtk_paint_focus) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(function gtk_paint_slider + (c-name gtk_paint_slider) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkOrientation orientation)) +) + +(function gtk_paint_handle + (c-name gtk_paint_handle) + (return-type none) + (parameter (type-and-name GtkStyle* style)) + (parameter (type-and-name GdkWindow* window)) + (parameter (type-and-name GtkStateType state_type)) + (parameter (type-and-name GtkShadowType shadow_type)) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name gchar* detail)) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) + (parameter (type-and-name GtkOrientation orientation)) +) + + + +;; From /usr/include/gtk/gtktable.h + +(function gtk_table_get_type + (c-name gtk_table_get_type) + (return-type GtkType) +) + +(function gtk_table_new + (c-name gtk_table_new) + (is-constructor-of GtkTable) + (return-type GtkWidget*) + (parameter (type-and-name guint rows) (default "1")) + (parameter (type-and-name guint columns) (default "1")) + (parameter (type-and-name gboolean homogeneous) (default "FALSE")) +) + +(method resize + (of-object Table (Gtk)) + (c-name gtk_table_resize) + (return-type none) + (parameter (type-and-name guint rows)) + (parameter (type-and-name guint columns)) +) + +(method attach + (of-object Table (Gtk)) + (c-name gtk_table_attach) + (return-type none) + (parameter (type-and-name GtkWidget* child)) + (parameter (type-and-name guint left_attach)) + (parameter (type-and-name guint right_attach)) + (parameter (type-and-name guint top_attach)) + (parameter (type-and-name guint bottom_attach)) + (parameter (type-and-name GtkAttachOptions xoptions) (default "GTK_EXPAND|GTK_FILL")) + (parameter (type-and-name GtkAttachOptions yoptions) (default "GTK_EXPAND|GTK_FILL")) + (parameter (type-and-name guint xpadding) (default "0")) + (parameter (type-and-name guint ypadding) (default "0")) +) + +(method attach_defaults + (of-object Table (Gtk)) + (c-name gtk_table_attach_defaults) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name guint left_attach)) + (parameter (type-and-name guint right_attach)) + (parameter (type-and-name guint top_attach)) + (parameter (type-and-name guint bottom_attach)) +) + +(method set_row_spacing + (of-object Table (Gtk)) + (c-name gtk_table_set_row_spacing) + (return-type none) + (parameter (type-and-name guint row)) + (parameter (type-and-name guint spacing)) +) + +(method set_col_spacing + (of-object Table (Gtk)) + (c-name gtk_table_set_col_spacing) + (return-type none) + (parameter (type-and-name guint column)) + (parameter (type-and-name guint spacing)) +) + +(method set_row_spacings + (of-object Table (Gtk)) + (c-name gtk_table_set_row_spacings) + (return-type none) + (parameter (type-and-name guint spacing)) +) + +(method set_col_spacings + (of-object Table (Gtk)) + (c-name gtk_table_set_col_spacings) + (return-type none) + (parameter (type-and-name guint spacing)) +) + +(method set_homogeneous + (of-object Table (Gtk)) + (c-name gtk_table_set_homogeneous) + (return-type none) + (parameter (type-and-name gboolean homogeneous)) +) + + + +;; From /usr/include/gtk/gtktearoffmenuitem.h + +(function gtk_tearoff_menu_item_get_type + (c-name gtk_tearoff_menu_item_get_type) + (return-type GtkType) +) + +(function gtk_tearoff_menu_item_new + (c-name gtk_tearoff_menu_item_new) + (is-constructor-of GtkTearoffMenuItem) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtktext.h + +(function gtk_text_get_type + (c-name gtk_text_get_type) + (return-type GtkType) +) + +(function gtk_text_new + (c-name gtk_text_new) + (is-constructor-of GtkText) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* hadj) (null-ok) (default "NULL")) + (parameter (type-and-name GtkAdjustment* vadj) (null-ok) (default "NULL")) +) + +(method set_editable + (of-object Text (Gtk)) + (c-name gtk_text_set_editable) + (return-type none) + (parameter (type-and-name gboolean editable)) +) + +(method set_word_wrap + (of-object Text (Gtk)) + (c-name gtk_text_set_word_wrap) + (return-type none) + (parameter (type-and-name gint word_wrap)) +) + +(method set_line_wrap + (of-object Text (Gtk)) + (c-name gtk_text_set_line_wrap) + (return-type none) + (parameter (type-and-name gint line_wrap)) +) + +(method set_adjustments + (of-object Text (Gtk)) + (c-name gtk_text_set_adjustments) + (return-type none) + (parameter (type-and-name GtkAdjustment* hadj)) + (parameter (type-and-name GtkAdjustment* vadj)) +) + +(method set_point + (of-object Text (Gtk)) + (c-name gtk_text_set_point) + (return-type none) + (parameter (type-and-name guint index)) +) + +(method get_point + (of-object Text (Gtk)) + (c-name gtk_text_get_point) + (return-type guint) +) + +(method get_length + (of-object Text (Gtk)) + (c-name gtk_text_get_length) + (return-type guint) +) + +(method freeze + (of-object Text (Gtk)) + (c-name gtk_text_freeze) + (return-type none) +) + +(method thaw + (of-object Text (Gtk)) + (c-name gtk_text_thaw) + (return-type none) +) + +(method insert + (of-object Text (Gtk)) + (c-name gtk_text_insert) + (return-type none) + (parameter (type-and-name GdkFont* font) (null-ok)) + (parameter (type-and-name GdkColor* fore) (null-ok)) + (parameter (type-and-name GdkColor* back) (null-ok)) + (parameter (type-and-name const-char* chars)) + (parameter (type-and-name gint length) (default "-1")) +) + +(method backward_delete + (of-object Text (Gtk)) + (c-name gtk_text_backward_delete) + (return-type gint) + (parameter (type-and-name guint nchars)) +) + +(method forward_delete + (of-object Text (Gtk)) + (c-name gtk_text_forward_delete) + (return-type gint) + (parameter (type-and-name guint nchars)) +) + + + +;; From /usr/include/gtk/gtktipsquery.h + +(function gtk_tips_query_get_type + (c-name gtk_tips_query_get_type) + (return-type GtkType) +) + +(function gtk_tips_query_new + (c-name gtk_tips_query_new) + (is-constructor-of GtkTipsQuery) + (return-type GtkWidget*) +) + +(method start_query + (of-object TipsQuery (Gtk)) + (c-name gtk_tips_query_start_query) + (return-type none) +) + +(method stop_query + (of-object TipsQuery (Gtk)) + (c-name gtk_tips_query_stop_query) + (return-type none) +) + +(method set_caller + (of-object TipsQuery (Gtk)) + (c-name gtk_tips_query_set_caller) + (return-type none) + (parameter (type-and-name GtkWidget* caller)) +) + +(method set_labels + (of-object TipsQuery (Gtk)) + (c-name gtk_tips_query_set_labels) + (return-type none) + (parameter (type-and-name const-gchar* label_inactive)) + (parameter (type-and-name const-gchar* label_no_tip)) +) + + + +;; From /usr/include/gtk/gtktogglebutton.h + +(function gtk_toggle_button_get_type + (c-name gtk_toggle_button_get_type) + (return-type GtkType) +) + +(function gtk_toggle_button_new + (c-name gtk_toggle_button_new) + (is-constructor-of GtkToggleButton) + (return-type GtkWidget*) +) + +(function gtk_toggle_button_new_with_label + (c-name gtk_toggle_button_new_with_label) + (is-constructor-of GtkToggleButton) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method set_mode + (of-object ToggleButton (Gtk)) + (c-name gtk_toggle_button_set_mode) + (return-type none) + (parameter (type-and-name gboolean draw_indicator)) +) + +(method set_active + (of-object ToggleButton (Gtk)) + (c-name gtk_toggle_button_set_active) + (return-type none) + (parameter (type-and-name gboolean is_active)) +) + +(method get_active + (of-object ToggleButton (Gtk)) + (c-name gtk_toggle_button_get_active) + (return-type gboolean) +) + +(method toggled + (of-object ToggleButton (Gtk)) + (c-name gtk_toggle_button_toggled) + (return-type none) +) + + + +;; From /usr/include/gtk/gtktoolbar.h + +(function gtk_toolbar_get_type + (c-name gtk_toolbar_get_type) + (return-type GtkType) +) + +(function gtk_toolbar_new + (c-name gtk_toolbar_new) + (is-constructor-of GtkToolbar) + (return-type GtkWidget*) + (parameter (type-and-name GtkOrientation orientation)) + (parameter (type-and-name GtkToolbarStyle style)) +) + +(method append_item + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_append_item) + (return-type GtkWidget*) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) +) + +(method prepend_item + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_prepend_item) + (return-type GtkWidget*) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) +) + +(method insert_item + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_insert_item) + (return-type GtkWidget*) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) + (parameter (type-and-name gint position)) +) + +(method append_space + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_append_space) + (return-type none) +) + +(method prepend_space + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_prepend_space) + (return-type none) +) + +(method insert_space + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_insert_space) + (return-type none) + (parameter (type-and-name gint position)) +) + +(method append_element + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_append_element) + (return-type GtkWidget*) + (parameter (type-and-name GtkToolbarChildType type)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) +) + +(method prepend_element + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_prepend_element) + (return-type GtkWidget*) + (parameter (type-and-name GtkToolbarChildType type)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) +) + +(method insert_element + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_insert_element) + (return-type GtkWidget*) + (parameter (type-and-name GtkToolbarChildType type)) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* text)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name GtkWidget* icon)) + (parameter (type-and-name GtkSignalFunc callback)) + (parameter (type-and-name gpointer user_data)) + (parameter (type-and-name gint position)) +) + +(method append_widget + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_append_widget) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) +) + +(method prepend_widget + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_prepend_widget) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) +) + +(method insert_widget + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_insert_widget) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-char* tooltip_text)) + (parameter (type-and-name const-char* tooltip_private_text)) + (parameter (type-and-name gint position)) +) + +(method set_orientation + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_orientation) + (return-type none) + (parameter (type-and-name GtkOrientation orientation)) +) + +(method set_style + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_style) + (return-type none) + (parameter (type-and-name GtkToolbarStyle style)) +) + +(method set_space_size + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_space_size) + (return-type none) + (parameter (type-and-name gint space_size)) +) + +(method set_space_style + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_space_style) + (return-type none) + (parameter (type-and-name GtkToolbarSpaceStyle space_style)) +) + +(method set_tooltips + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_tooltips) + (return-type none) + (parameter (type-and-name gint enable)) +) + +(method set_button_relief + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_set_button_relief) + (return-type none) + (parameter (type-and-name GtkReliefStyle relief)) +) + +(method get_button_relief + (of-object Toolbar (Gtk)) + (c-name gtk_toolbar_get_button_relief) + (return-type GtkReliefStyle) +) + + + +;; From /usr/include/gtk/gtktooltips.h + +(function gtk_tooltips_get_type + (c-name gtk_tooltips_get_type) + (return-type GtkType) +) + +(function gtk_tooltips_new + (c-name gtk_tooltips_new) + (is-constructor-of GtkTooltips) + (return-type GtkTooltips*) +) + +(method enable + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_enable) + (return-type none) +) + +(method disable + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_disable) + (return-type none) +) + +(method set_delay + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_set_delay) + (return-type none) + (parameter (type-and-name guint delay)) +) + +(method set_tip + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_set_tip) + (return-type none) + (parameter (type-and-name GtkWidget* widget)) + (parameter (type-and-name const-gchar* tip_text)) + (parameter (type-and-name const-gchar* tip_private)) +) + +(method set_colors + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_set_colors) + (return-type none) + (parameter (type-and-name GdkColor* background)) + (parameter (type-and-name GdkColor* foreground)) +) + +(function gtk_tooltips_data_get + (c-name gtk_tooltips_data_get) + (return-type GtkTooltipsData*) + (parameter (type-and-name GtkWidget* widget)) +) + +(method force_window + (of-object Tooltips (Gtk)) + (c-name gtk_tooltips_force_window) + (return-type none) +) + + + +;; From /usr/include/gtk/gtktree.h + +(function gtk_tree_get_type + (c-name gtk_tree_get_type) + (return-type GtkType) +) + +(function gtk_tree_new + (c-name gtk_tree_new) + (is-constructor-of GtkTree) + (return-type GtkWidget*) +) + +(method append + (of-object Tree (Gtk)) + (c-name gtk_tree_append) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) +) + +(method prepend + (of-object Tree (Gtk)) + (c-name gtk_tree_prepend) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) +) + +(method insert + (of-object Tree (Gtk)) + (c-name gtk_tree_insert) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) + (parameter (type-and-name gint position)) +) + +(method remove_items + (of-object Tree (Gtk)) + (c-name gtk_tree_remove_items) + (return-type none) + (parameter (type-and-name GList* items)) +) + +(method clear_items + (of-object Tree (Gtk)) + (c-name gtk_tree_clear_items) + (return-type none) + (parameter (type-and-name gint start)) + (parameter (type-and-name gint end)) +) + +(method select_item + (of-object Tree (Gtk)) + (c-name gtk_tree_select_item) + (return-type none) + (parameter (type-and-name gint item)) +) + +(method unselect_item + (of-object Tree (Gtk)) + (c-name gtk_tree_unselect_item) + (return-type none) + (parameter (type-and-name gint item)) +) + +(method select_child + (of-object Tree (Gtk)) + (c-name gtk_tree_select_child) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) +) + +(method unselect_child + (of-object Tree (Gtk)) + (c-name gtk_tree_unselect_child) + (return-type none) + (parameter (type-and-name GtkWidget* tree_item)) +) + +(method child_position + (of-object Tree (Gtk)) + (c-name gtk_tree_child_position) + (return-type gint) + (parameter (type-and-name GtkWidget* child)) +) + +(method set_selection_mode + (of-object Tree (Gtk)) + (c-name gtk_tree_set_selection_mode) + (return-type none) + (parameter (type-and-name GtkSelectionMode mode)) +) + +(method set_view_mode + (of-object Tree (Gtk)) + (c-name gtk_tree_set_view_mode) + (return-type none) + (parameter (type-and-name GtkTreeViewMode mode)) +) + +(method set_view_lines + (of-object Tree (Gtk)) + (c-name gtk_tree_set_view_lines) + (return-type none) + (parameter (type-and-name guint flag)) +) + +(method remove_item + (of-object Tree (Gtk)) + (c-name gtk_tree_remove_item) + (return-type none) + (parameter (type-and-name GtkWidget* child)) +) + + + +;; From /usr/include/gtk/gtktreeitem.h + +(function gtk_tree_item_get_type + (c-name gtk_tree_item_get_type) + (return-type GtkType) +) + +(function gtk_tree_item_new + (c-name gtk_tree_item_new) + (is-constructor-of GtkTreeItem) + (return-type GtkWidget*) +) + +(function gtk_tree_item_new_with_label + (c-name gtk_tree_item_new_with_label) + (is-constructor-of GtkTreeItem) + (return-type GtkWidget*) + (parameter (type-and-name const-gchar* label)) +) + +(method set_subtree + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_set_subtree) + (return-type none) + (parameter (type-and-name GtkWidget* subtree)) +) + +(method remove_subtree + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_remove_subtree) + (return-type none) +) + +(method select + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_select) + (return-type none) +) + +(method deselect + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_deselect) + (return-type none) +) + +(method expand + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_expand) + (return-type none) +) + +(method collapse + (of-object TreeItem (Gtk)) + (c-name gtk_tree_item_collapse) + (return-type none) +) + + + +;; From /usr/include/gtk/gtktypeutils.h + +(method unique + (of-object Type (Gtk)) + (c-name gtk_type_unique) + (return-type GtkType) + (parameter (type-and-name const-GtkTypeInfo* type_info)) +) + +(method set_chunk_alloc + (of-object Type (Gtk)) + (c-name gtk_type_set_chunk_alloc) + (return-type none) + (parameter (type-and-name guint n_chunks)) +) + +(function gtk_type_name + (c-name gtk_type_name) + (return-type gchar*) + (parameter (type-and-name guint type)) +) + +(function gtk_type_from_name + (c-name gtk_type_from_name) + (return-type GtkType) + (parameter (type-and-name const-gchar* name)) +) + +(method parent + (of-object Type (Gtk)) + (c-name gtk_type_parent) + (return-type GtkType) +) + +(method class + (of-object Type (Gtk)) + (c-name gtk_type_class) + (return-type gpointer) +) + +(method parent_class + (of-object Type (Gtk)) + (c-name gtk_type_parent_class) + (return-type gpointer) +) + +(method children_types + (of-object Type (Gtk)) + (c-name gtk_type_children_types) + (return-type GList*) +) + +(method new + (of-object Type (Gtk)) + (c-name gtk_type_new) + (return-type gpointer) +) + +(method free + (of-object Type (Gtk)) + (c-name gtk_type_free) + (return-type none) + (parameter (type-and-name gpointer mem)) +) + +(method describe_heritage + (of-object Type (Gtk)) + (c-name gtk_type_describe_heritage) + (return-type none) +) + +(method describe_tree + (of-object Type (Gtk)) + (c-name gtk_type_describe_tree) + (return-type none) + (parameter (type-and-name gboolean show_size)) +) + +(method is_a + (of-object Type (Gtk)) + (c-name gtk_type_is_a) + (return-type gboolean) + (parameter (type-and-name GtkType is_a_type)) +) + +(function gtk_type_check_object_cast + (c-name gtk_type_check_object_cast) + (return-type GtkTypeObject*) + (parameter (type-and-name GtkTypeObject* type_object)) + (parameter (type-and-name GtkType cast_type)) +) + +(function gtk_type_check_class_cast + (c-name gtk_type_check_class_cast) + (return-type GtkTypeClass*) + (parameter (type-and-name GtkTypeClass* klass)) + (parameter (type-and-name GtkType cast_type)) +) + +(function gtk_type_register_enum + (c-name gtk_type_register_enum) + (return-type GtkType) + (parameter (type-and-name const-gchar* type_name)) + (parameter (type-and-name GtkEnumValue* values)) +) + +(function gtk_type_register_flags + (c-name gtk_type_register_flags) + (return-type GtkType) + (parameter (type-and-name const-gchar* type_name)) + (parameter (type-and-name GtkFlagValue* values)) +) + +(method enum_get_values + (of-object Type (Gtk)) + (c-name gtk_type_enum_get_values) + (return-type GtkEnumValue*) +) + +(method flags_get_values + (of-object Type (Gtk)) + (c-name gtk_type_flags_get_values) + (return-type GtkFlagValue*) +) + +(method enum_find_value + (of-object Type (Gtk)) + (c-name gtk_type_enum_find_value) + (return-type GtkEnumValue*) + (parameter (type-and-name const-gchar* value_name)) +) + +(method flags_find_value + (of-object Type (Gtk)) + (c-name gtk_type_flags_find_value) + (return-type GtkFlagValue*) + (parameter (type-and-name const-gchar* value_name)) +) + +(method set_varargs_type + (of-object Type (Gtk)) + (c-name gtk_type_set_varargs_type) + (return-type none) + (parameter (type-and-name GtkType varargs_type)) +) + +(method get_varargs_type + (of-object Type (Gtk)) + (c-name gtk_type_get_varargs_type) + (return-type GtkType) +) + +(method query + (of-object Type (Gtk)) + (c-name gtk_type_query) + (return-type GtkTypeQuery*) +) + + + +;; From /usr/include/gtk/gtkvbbox.h + +(function gtk_vbutton_box_get_type + (c-name gtk_vbutton_box_get_type) + (return-type guint) +) + +(function gtk_vbutton_box_new + (c-name gtk_vbutton_box_new) + (is-constructor-of GtkVButtonBox) + (return-type GtkWidget*) +) + +(function vbutton_box_get_spacing_default + (c-name gtk_vbutton_box_get_spacing_default) + (return-type gint) +) + +(function vbutton_box_set_spacing_default + (c-name gtk_vbutton_box_set_spacing_default) + (return-type none) + (parameter (type-and-name gint spacing)) +) + +(function vbutton_box_get_layout_default + (c-name gtk_vbutton_box_get_layout_default) + (return-type GtkButtonBoxStyle) +) + +(function vbutton_box_set_layout_default + (c-name gtk_vbutton_box_set_layout_default) + (return-type none) + (parameter (type-and-name GtkButtonBoxStyle layout)) +) + + + +;; From /usr/include/gtk/gtkvbox.h + +(function gtk_vbox_get_type + (c-name gtk_vbox_get_type) + (return-type GtkType) +) + +(function gtk_vbox_new + (c-name gtk_vbox_new) + (is-constructor-of GtkVBox) + (return-type GtkWidget*) + (parameter (type-and-name gboolean homogeneous) (default "FALSE")) + (parameter (type-and-name gint spacing) (default "0")) +) + + + +;; From /usr/include/gtk/gtkviewport.h + +(function gtk_viewport_get_type + (c-name gtk_viewport_get_type) + (return-type GtkType) +) + +(function gtk_viewport_new + (c-name gtk_viewport_new) + (is-constructor-of GtkViewport) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* hadjustment) (null-ok) (default "NULL")) + (parameter (type-and-name GtkAdjustment* vadjustment) (null-ok) (default "NULL")) +) + +(method get_hadjustment + (of-object Viewport (Gtk)) + (c-name gtk_viewport_get_hadjustment) + (return-type GtkAdjustment*) +) + +(method get_vadjustment + (of-object Viewport (Gtk)) + (c-name gtk_viewport_get_vadjustment) + (return-type GtkAdjustment*) +) + +(method set_hadjustment + (of-object Viewport (Gtk)) + (c-name gtk_viewport_set_hadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_vadjustment + (of-object Viewport (Gtk)) + (c-name gtk_viewport_set_vadjustment) + (return-type none) + (parameter (type-and-name GtkAdjustment* adjustment)) +) + +(method set_shadow_type + (of-object Viewport (Gtk)) + (c-name gtk_viewport_set_shadow_type) + (return-type none) + (parameter (type-and-name GtkShadowType type)) +) + + + +;; From /usr/include/gtk/gtkvpaned.h + +(function gtk_vpaned_get_type + (c-name gtk_vpaned_get_type) + (return-type guint) +) + +(function gtk_vpaned_new + (c-name gtk_vpaned_new) + (is-constructor-of GtkVPaned) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkvruler.h + +(function gtk_vruler_get_type + (c-name gtk_vruler_get_type) + (return-type guint) +) + +(function gtk_vruler_new + (c-name gtk_vruler_new) + (is-constructor-of GtkVRuler) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkvscale.h + +(function gtk_vscale_get_type + (c-name gtk_vscale_get_type) + (return-type GtkType) +) + +(function gtk_vscale_new + (c-name gtk_vscale_new) + (is-constructor-of GtkVScale) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok) (default "NULL")) +) + + + +;; From /usr/include/gtk/gtkvscrollbar.h + +(function gtk_vscrollbar_new + (c-name gtk_vscrollbar_new) + (is-constructor-of GtkVScrollbar) + (return-type GtkWidget*) + (parameter (type-and-name GtkAdjustment* adjustment) (null-ok) (default "NULL")) +) + + + +;; From /usr/include/gtk/gtkvseparator.h + +(function gtk_vseparator_get_type + (c-name gtk_vseparator_get_type) + (return-type GtkType) +) + +(function gtk_vseparator_new + (c-name gtk_vseparator_new) + (is-constructor-of GtkVSeparator) + (return-type GtkWidget*) +) + + + +;; From /usr/include/gtk/gtkwidget.h + +(function gtk_widget_get_type + (c-name gtk_widget_get_type) + (return-type GtkType) +) + +(function gtk_widget_new + (c-name gtk_widget_new) + (return-type GtkWidget*) + (parameter (type-and-name GtkType type)) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(function gtk_widget_newv + (c-name gtk_widget_newv) + (return-type GtkWidget*) + (parameter (type-and-name GtkType type)) + (parameter (type-and-name guint nargs)) + (parameter (type-and-name GtkArg* args)) +) + +(method ref + (of-object Widget (Gtk)) + (c-name gtk_widget_ref) + (return-type none) +) + +(method unref + (of-object Widget (Gtk)) + (c-name gtk_widget_unref) + (return-type none) +) + +(method destroy + (of-object Widget (Gtk)) + (c-name gtk_widget_destroy) + (return-type none) +) + +(method destroyed + (of-object Widget (Gtk)) + (c-name gtk_widget_destroyed) + (return-type none) + (parameter (type-and-name GtkWidget** widget_pointer)) +) + +(method get + (of-object Widget (Gtk)) + (c-name gtk_widget_get) + (return-type none) + (parameter (type-and-name GtkArg* arg)) +) + +(method getv + (of-object Widget (Gtk)) + (c-name gtk_widget_getv) + (return-type none) + (parameter (type-and-name guint nargs)) + (parameter (type-and-name GtkArg* args)) +) + +(method set + (of-object Widget (Gtk)) + (c-name gtk_widget_set) + (return-type none) + (parameter (type-and-name const-gchar* first_arg_name)) + (varargs t) +) + +(method setv + (of-object Widget (Gtk)) + (c-name gtk_widget_setv) + (return-type none) + (parameter (type-and-name guint nargs)) + (parameter (type-and-name GtkArg* args)) +) + +(method unparent + (of-object Widget (Gtk)) + (c-name gtk_widget_unparent) + (return-type none) +) + +(method show + (of-object Widget (Gtk)) + (c-name gtk_widget_show) + (return-type none) +) + +(method show_now + (of-object Widget (Gtk)) + (c-name gtk_widget_show_now) + (return-type none) +) + +(method hide + (of-object Widget (Gtk)) + (c-name gtk_widget_hide) + (return-type none) +) + +(method show_all + (of-object Widget (Gtk)) + (c-name gtk_widget_show_all) + (return-type none) +) + +(method hide_all + (of-object Widget (Gtk)) + (c-name gtk_widget_hide_all) + (return-type none) +) + +(method map + (of-object Widget (Gtk)) + (c-name gtk_widget_map) + (return-type none) +) + +(method unmap + (of-object Widget (Gtk)) + (c-name gtk_widget_unmap) + (return-type none) +) + +(method realize + (of-object Widget (Gtk)) + (c-name gtk_widget_realize) + (return-type none) +) + +(method unrealize + (of-object Widget (Gtk)) + (c-name gtk_widget_unrealize) + (return-type none) +) + +(method queue_draw + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_draw) + (return-type none) +) + +(method queue_draw_area + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_draw_area) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method queue_clear + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_clear) + (return-type none) +) + +(method queue_clear_area + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_clear_area) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method queue_resize + (of-object Widget (Gtk)) + (c-name gtk_widget_queue_resize) + (return-type none) +) + +(method draw + (of-object Widget (Gtk)) + (c-name gtk_widget_draw) + (return-type none) + (parameter (type-and-name GdkRectangle* area)) +) + +(method draw_focus + (of-object Widget (Gtk)) + (c-name gtk_widget_draw_focus) + (return-type none) +) + +(method draw_default + (of-object Widget (Gtk)) + (c-name gtk_widget_draw_default) + (return-type none) +) + +(method size_request + (of-object Widget (Gtk)) + (c-name gtk_widget_size_request) + (return-type none) + (parameter (type-and-name GtkRequisition* requisition)) +) + +(method size_allocate + (of-object Widget (Gtk)) + (c-name gtk_widget_size_allocate) + (return-type none) + (parameter (type-and-name GtkAllocation* allocation)) +) + +(method get_child_requisition + (of-object Widget (Gtk)) + (c-name gtk_widget_get_child_requisition) + (return-type none) + (parameter (type-and-name GtkRequisition* requisition)) +) + +(method add_accelerator + (of-object Widget (Gtk)) + (c-name gtk_widget_add_accelerator) + (return-type none) + (parameter (type-and-name const-gchar* accel_signal)) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name guint accel_mods)) + (parameter (type-and-name GtkAccelFlags accel_flags)) +) + +(method remove_accelerator + (of-object Widget (Gtk)) + (c-name gtk_widget_remove_accelerator) + (return-type none) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name guint accel_mods)) +) + +(method remove_accelerators + (of-object Widget (Gtk)) + (c-name gtk_widget_remove_accelerators) + (return-type none) + (parameter (type-and-name const-gchar* accel_signal)) + (parameter (type-and-name gboolean visible_only)) +) + +(method accelerator_signal + (of-object Widget (Gtk)) + (c-name gtk_widget_accelerator_signal) + (return-type guint) + (parameter (type-and-name GtkAccelGroup* accel_group)) + (parameter (type-and-name guint accel_key)) + (parameter (type-and-name guint accel_mods)) +) + +(method lock_accelerators + (of-object Widget (Gtk)) + (c-name gtk_widget_lock_accelerators) + (return-type none) +) + +(method unlock_accelerators + (of-object Widget (Gtk)) + (c-name gtk_widget_unlock_accelerators) + (return-type none) +) + +(method accelerators_locked + (of-object Widget (Gtk)) + (c-name gtk_widget_accelerators_locked) + (return-type gboolean) +) + +(method event + (of-object Widget (Gtk)) + (c-name gtk_widget_event) + (return-type gint) + (parameter (type-and-name GdkEvent* event)) +) + +(method activate + (of-object Widget (Gtk)) + (c-name gtk_widget_activate) + (return-type gboolean) +) + +(method set_scroll_adjustments + (of-object Widget (Gtk)) + (c-name gtk_widget_set_scroll_adjustments) + (return-type gboolean) + (parameter (type-and-name GtkAdjustment* hadjustment)) + (parameter (type-and-name GtkAdjustment* vadjustment)) +) + +(method reparent + (of-object Widget (Gtk)) + (c-name gtk_widget_reparent) + (return-type none) + (parameter (type-and-name GtkWidget* new_parent)) +) + +(method popup + (of-object Widget (Gtk)) + (c-name gtk_widget_popup) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method intersect + (of-object Widget (Gtk)) + (c-name gtk_widget_intersect) + (return-type gint) + (parameter (type-and-name GdkRectangle* area)) + (parameter (type-and-name GdkRectangle* intersection)) +) + +(method grab_focus + (of-object Widget (Gtk)) + (c-name gtk_widget_grab_focus) + (return-type none) +) + +(method grab_default + (of-object Widget (Gtk)) + (c-name gtk_widget_grab_default) + (return-type none) +) + +(method set_name + (of-object Widget (Gtk)) + (c-name gtk_widget_set_name) + (return-type none) + (parameter (type-and-name const-gchar* name)) +) + +(method get_name + (of-object Widget (Gtk)) + (c-name gtk_widget_get_name) + (return-type gchar*) +) + +(method set_state + (of-object Widget (Gtk)) + (c-name gtk_widget_set_state) + (return-type none) + (parameter (type-and-name GtkStateType state)) +) + +(method set_sensitive + (of-object Widget (Gtk)) + (c-name gtk_widget_set_sensitive) + (return-type none) + (parameter (type-and-name gboolean sensitive)) +) + +(method set_app_paintable + (of-object Widget (Gtk)) + (c-name gtk_widget_set_app_paintable) + (return-type none) + (parameter (type-and-name gboolean app_paintable)) +) + +(method set_parent + (of-object Widget (Gtk)) + (c-name gtk_widget_set_parent) + (return-type none) + (parameter (type-and-name GtkWidget* parent)) +) + +(method set_parent_window + (of-object Widget (Gtk)) + (c-name gtk_widget_set_parent_window) + (return-type none) + (parameter (type-and-name GdkWindow* parent_window)) +) + +(method get_parent_window + (of-object Widget (Gtk)) + (c-name gtk_widget_get_parent_window) + (return-type GdkWindow*) +) + +(method set_uposition + (of-object Widget (Gtk)) + (c-name gtk_widget_set_uposition) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + +(method set_usize + (of-object Widget (Gtk)) + (c-name gtk_widget_set_usize) + (return-type none) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method set_events + (of-object Widget (Gtk)) + (c-name gtk_widget_set_events) + (return-type none) + (parameter (type-and-name gint events)) +) + +(method add_events + (of-object Widget (Gtk)) + (c-name gtk_widget_add_events) + (return-type none) + (parameter (type-and-name gint events)) +) + +(method set_extension_events + (of-object Widget (Gtk)) + (c-name gtk_widget_set_extension_events) + (return-type none) + (parameter (type-and-name GdkExtensionMode mode)) +) + +(method get_extension_events + (of-object Widget (Gtk)) + (c-name gtk_widget_get_extension_events) + (return-type GdkExtensionMode) +) + +(method get_toplevel + (of-object Widget (Gtk)) + (c-name gtk_widget_get_toplevel) + (return-type GtkWidget*) +) + +(method get_ancestor + (of-object Widget (Gtk)) + (c-name gtk_widget_get_ancestor) + (return-type GtkWidget*) + (parameter (type-and-name GtkType widget_type)) +) + +(method get_colormap + (of-object Widget (Gtk)) + (c-name gtk_widget_get_colormap) + (return-type GdkColormap*) +) + +(method get_visual + (of-object Widget (Gtk)) + (c-name gtk_widget_get_visual) + (return-type GdkVisual*) +) + +(method set_colormap + (of-object Widget (Gtk)) + (c-name gtk_widget_set_colormap) + (return-type none) + (parameter (type-and-name GdkColormap* colormap)) +) + +(method set_visual + (of-object Widget (Gtk)) + (c-name gtk_widget_set_visual) + (return-type none) + (parameter (type-and-name GdkVisual* visual)) +) + +(method get_events + (of-object Widget (Gtk)) + (c-name gtk_widget_get_events) + (return-type gint) +) + +(method get_pointer + (of-object Widget (Gtk)) + (c-name gtk_widget_get_pointer) + (return-type none) + (parameter (type-and-name gint* x)) + (parameter (type-and-name gint* y)) +) + +(method is_ancestor + (of-object Widget (Gtk)) + (c-name gtk_widget_is_ancestor) + (return-type gint) + (parameter (type-and-name GtkWidget* ancestor)) +) + +(method hide_on_delete + (of-object Widget (Gtk)) + (c-name gtk_widget_hide_on_delete) + (return-type gint) +) + +(method set_style + (of-object Widget (Gtk)) + (c-name gtk_widget_set_style) + (return-type none) + (parameter (type-and-name GtkStyle* style)) +) + +(method set_rc_style + (of-object Widget (Gtk)) + (c-name gtk_widget_set_rc_style) + (return-type none) +) + +(method ensure_style + (of-object Widget (Gtk)) + (c-name gtk_widget_ensure_style) + (return-type none) +) + +(method get_style + (of-object Widget (Gtk)) + (c-name gtk_widget_get_style) + (return-type GtkStyle*) +) + +(method restore_default_style + (of-object Widget (Gtk)) + (c-name gtk_widget_restore_default_style) + (return-type none) +) + +(method modify_style + (of-object Widget (Gtk)) + (c-name gtk_widget_modify_style) + (return-type none) + (parameter (type-and-name GtkRcStyle* style)) +) + +(method set_composite_name + (of-object Widget (Gtk)) + (c-name gtk_widget_set_composite_name) + (return-type none) + (parameter (type-and-name const-gchar* name)) +) + +(method get_composite_name + (of-object Widget (Gtk)) + (c-name gtk_widget_get_composite_name) + (return-type gchar*) +) + +(method reset_rc_styles + (of-object Widget (Gtk)) + (c-name gtk_widget_reset_rc_styles) + (return-type none) +) + +(function widget_push_style + (c-name gtk_widget_push_style) + (return-type none) + (parameter (type-and-name GtkStyle* style)) +) + +(function widget_push_colormap + (c-name gtk_widget_push_colormap) + (return-type none) + (parameter (type-and-name GdkColormap* cmap)) +) + +(function widget_push_visual + (c-name gtk_widget_push_visual) + (return-type none) + (parameter (type-and-name GdkVisual* visual)) +) + +(function widget_push_composite_child + (c-name gtk_widget_push_composite_child) + (return-type none) +) + +(function widget_pop_composite_child + (c-name gtk_widget_pop_composite_child) + (return-type none) +) + +(function widget_pop_style + (c-name gtk_widget_pop_style) + (return-type none) +) + +(function widget_pop_colormap + (c-name gtk_widget_pop_colormap) + (return-type none) +) + +(function widget_pop_visual + (c-name gtk_widget_pop_visual) + (return-type none) +) + +(function widget_set_default_style + (c-name gtk_widget_set_default_style) + (return-type none) + (parameter (type-and-name GtkStyle* style)) +) + +(function widget_set_default_colormap + (c-name gtk_widget_set_default_colormap) + (return-type none) + (parameter (type-and-name GdkColormap* colormap)) +) + +(function widget_set_default_visual + (c-name gtk_widget_set_default_visual) + (return-type none) + (parameter (type-and-name GdkVisual* visual)) +) + +(function widget_get_default_style + (c-name gtk_widget_get_default_style) + (return-type GtkStyle*) +) + +(function widget_get_default_colormap + (c-name gtk_widget_get_default_colormap) + (return-type GdkColormap*) +) + +(function widget_get_default_visual + (c-name gtk_widget_get_default_visual) + (return-type GdkVisual*) +) + +(method shape_combine_mask + (of-object Widget (Gtk)) + (c-name gtk_widget_shape_combine_mask) + (return-type none) + (parameter (type-and-name GdkBitmap* shape_mask)) + (parameter (type-and-name gint offset_x)) + (parameter (type-and-name gint offset_y)) +) + +(method reset_shapes + (of-object Widget (Gtk)) + (c-name gtk_widget_reset_shapes) + (return-type none) +) + +(method path + (of-object Widget (Gtk)) + (c-name gtk_widget_path) + (return-type none) + (parameter (type-and-name guint* path_length)) + (parameter (type-and-name gchar** path)) + (parameter (type-and-name gchar** path_reversed)) +) + +(method class_path + (of-object Widget (Gtk)) + (c-name gtk_widget_class_path) + (return-type none) + (parameter (type-and-name guint* path_length)) + (parameter (type-and-name gchar** path)) + (parameter (type-and-name gchar** path_reversed)) +) + + + +;; From /usr/include/gtk/gtkwindow.h + +(function gtk_window_get_type + (c-name gtk_window_get_type) + (return-type GtkType) +) + +(function gtk_window_new + (c-name gtk_window_new) + (is-constructor-of GtkWindow) + (return-type GtkWidget*) + (parameter (type-and-name GtkWindowType type) (default "GTK_WINDOW_TOPLEVEL")) +) + +(method set_title + (of-object Window (Gtk)) + (c-name gtk_window_set_title) + (return-type none) + (parameter (type-and-name const-gchar* title)) +) + +(method set_wmclass + (of-object Window (Gtk)) + (c-name gtk_window_set_wmclass) + (return-type none) + (parameter (type-and-name const-gchar* wmclass_name)) + (parameter (type-and-name const-gchar* wmclass_class)) +) + +(method set_policy + (of-object Window (Gtk)) + (c-name gtk_window_set_policy) + (return-type none) + (parameter (type-and-name gint allow_shrink)) + (parameter (type-and-name gint allow_grow)) + (parameter (type-and-name gint auto_shrink)) +) + +(method add_accel_group + (of-object Window (Gtk)) + (c-name gtk_window_add_accel_group) + (return-type none) + (parameter (type-and-name GtkAccelGroup* accel_group)) +) + +(method remove_accel_group + (of-object Window (Gtk)) + (c-name gtk_window_remove_accel_group) + (return-type none) + (parameter (type-and-name GtkAccelGroup* accel_group)) +) + +(method set_position + (of-object Window (Gtk)) + (c-name gtk_window_set_position) + (return-type none) + (parameter (type-and-name GtkWindowPosition position)) +) + +(method activate_focus + (of-object Window (Gtk)) + (c-name gtk_window_activate_focus) + (return-type gint) +) + +(method activate_default + (of-object Window (Gtk)) + (c-name gtk_window_activate_default) + (return-type gint) +) + +(method set_transient_for + (of-object Window (Gtk)) + (c-name gtk_window_set_transient_for) + (return-type none) + (parameter (type-and-name GtkWindow* parent)) +) + +(method set_geometry_hints + (of-object Window (Gtk)) + (c-name gtk_window_set_geometry_hints) + (return-type none) + (parameter (type-and-name GtkWidget* geometry_widget)) + (parameter (type-and-name GdkGeometry* geometry)) + (parameter (type-and-name GdkWindowHints geom_mask)) +) + +(method set_default_size + (of-object Window (Gtk)) + (c-name gtk_window_set_default_size) + (return-type none) + (parameter (type-and-name gint width)) + (parameter (type-and-name gint height)) +) + +(method set_modal + (of-object Window (Gtk)) + (c-name gtk_window_set_modal) + (return-type none) + (parameter (type-and-name gboolean modal)) +) + +(method set_focus + (of-object Window (Gtk)) + (c-name gtk_window_set_focus) + (return-type none) + (parameter (type-and-name GtkWidget* focus)) +) + +(method set_default + (of-object Window (Gtk)) + (c-name gtk_window_set_default) + (return-type none) + (parameter (type-and-name GtkWidget* defaultw)) +) + +(method remove_embedded_xid + (of-object Window (Gtk)) + (c-name gtk_window_remove_embedded_xid) + (return-type none) + (parameter (type-and-name guint xid)) +) + +(method add_embedded_xid + (of-object Window (Gtk)) + (c-name gtk_window_add_embedded_xid) + (return-type none) + (parameter (type-and-name guint xid)) +) + +(method reposition + (of-object Window (Gtk)) + (c-name gtk_window_reposition) + (return-type none) + (parameter (type-and-name gint x)) + (parameter (type-and-name gint y)) +) + + Index: php-gtk/ext/gtk+/gtk.overrides diff -u /dev/null php-gtk/ext/gtk+/gtk.overrides:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/gtk.overrides Tue Jul 10 14:27:50 2001 @@ -0,0 +1,2025 @@ +/* vim: set ft=cpp: */ +%% +headers +#include "ext/standard/file.h" +%% +ignore-glob + *_get_type + gtk_marshal_* + gtk_arg_* + gtk_args_* + gtk_signal_connect* + gtk_signal_add_emission_hook* + gtk_signal_new* + gtk_init_add_* + gtk_quit_add_* + gtk_timeout_add_* + gtk_idle_add_* + gtk_accelerator_* + gtk_target_list_* +%% +ignore + gtk_init + gtk_init_check + gtk_exit + gtk_set_locale + gtk_accel_group_new + gtk_accel_group_ref + gtk_accel_group_unref + gtk_accel_group_lock + gtk_accel_group_unlock + gtk_accel_groups_activate + gtk_accel_group_activate + gtk_accel_group_attach + gtk_accel_group_detach + gtk_accel_group_get_entry + gtk_accel_group_lock_entry + gtk_accel_group_unlock_entry + gtk_accel_group_add + gtk_accel_group_remove + gtk_accel_group_handle_add + gtk_accel_group_handle_remove + gtk_accel_group_create_add + gtk_accel_group_create_remove + gtk_accel_groups_from_object + gtk_accel_group_entries_from_object + gtk_signal_set_funcs + gtk_signal_lookup + gtk_signal_disconnect_by_func + gtk_signal_disconnect_by_data + gtk_signal_handler_block_by_func + gtk_signal_handler_block_by_data + gtk_signal_handler_unblock_by_func + gtk_signal_handler_unblock_by_data + gtk_signal_handler_pending_by_func + gtk_signal_n_emissions + gtk_signal_n_emissions_by_name + gtk_signal_name + gtk_signal_remove_emission_hook + gtk_signal_query + gtk_signal_emit + gtk_signal_emit_by_name + gtk_signal_emitv + gtk_signal_emitv_by_name + gtk_quit_remove_by_data + gtk_idle_remove_by_data + gtk_object_weakref + gtk_object_weakunref + gtk_object_get + gtk_object_getv + gtk_object_set + gtk_object_setv + gtk_object_set_data_full + gtk_object_set_user_data + gtk_object_get_user_data + gtk_object_set_data_by_id + gtk_object_set_data_by_id_full + gtk_object_get_data_by_id + gtk_object_remove_data_by_id + gtk_object_remove_no_notify_by_id + gtk_object_arg_set + gtk_object_arg_get + gtk_trace_referencing + gtk_widget_get + gtk_widget_getv + gtk_widget_set + gtk_widget_setv + gtk_container_get_toplevels + gtk_container_add_child_arg_type + gtk_container_query_child_args + gtk_container_child_args_collect + gtk_container_child_arg_get_info + gtk_container_foreach + gtk_container_foreach_full + gtk_container_forall + gtk_container_child_getv + gtk_container_child_setv + gtk_container_add_with_args + gtk_container_addv + gtk_container_child_set + gtk_container_arg_set + gtk_container_arg_get + gtk_progress_bar_new + gtk_clist_set_row_data_full + gtk_window_add_embedded_xid + gtk_window_remove_embedded_xid + gtk_range_trough_click + gtk_range_default_htrough_click + gtk_range_default_vtrough_click + gtk_tooltips_data_get + gtk_type_check_object_cast + gtk_type_check_class_cast + gtk_type_register_enum + gtk_type_register_flags + gtk_preview_uninit + gtk_item_factory_create_item + gtk_item_factory_delete_entry + gtk_item_factory_delete_entries + gtk_item_factory_popup_with_data + gtk_item_factory_popup_data + gtk_item_factory_set_translate_func + gtk_item_factory_create_items_ac + gtk_item_factory_create_menu_entries + gtk_menu_attach_to_widget + gtk_radio_menu_item_group + gtk_radio_menu_item_set_group + gtk_radio_button_group + gtk_radio_button_set_group + gtk_style_new +%% +ignore + gtk_object_new + gtk_object_newv + gtk_object_query_args + gtk_object_add_arg_type + gtk_object_args_collect + gtk_object_arg_get_info + gtk_widget_new + gtk_widget_newv +%% +ignore + gtk_key_snooper_install + gtk_key_snooper_remove + gtk_get_current_event + gtk_get_event_widget + gtk_propagate_event +%% +ignore + GtkPrivateFlags +%% +ignore + gtk_container_dequeue_resize_handler + gtk_window_reposition +%% +ignore + gtk_draw_flat_box + gtk_draw_check + gtk_draw_option + gtk_draw_cross + gtk_draw_ramp + gtk_draw_tab + gtk_draw_shadow_gap + gtk_draw_box_gap + gtk_draw_extension + gtk_draw_focus + gtk_draw_slider + gtk_draw_handle +%% +override gtk_true +PHP_FUNCTION(wrap_gtk_true) +{ + RETURN_TRUE; +} +%% +override gtk_false +PHP_FUNCTION(wrap_gtk_false) +{ + RETURN_FALSE; +} +%% +override gtk_timeout_add +PHP_FUNCTION(wrap_gtk_timeout_add) +{ + guint32 interval; + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + if (ZEND_NUM_ARGS() < 2) { + php_error(E_WARNING, "%s() requires at least 2 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(2, "iV", &interval, &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + RETURN_LONG(gtk_timeout_add_full(interval, NULL, + (GtkCallbackMarshal)php_gtk_handler_marshal, + data, php_gtk_destroy_notify)); +} +%% +override gtk_idle_add +PHP_FUNCTION(wrap_gtk_idle_add) +{ + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + if (ZEND_NUM_ARGS() < 1) { + php_error(E_WARNING, "%s() requires at least 1 argument, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(1, "V", &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 1, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + RETURN_LONG(gtk_idle_add_full(GTK_PRIORITY_DEFAULT, NULL, + (GtkCallbackMarshal)php_gtk_handler_marshal, + data, php_gtk_destroy_notify)); +} +%% +override gtk_quit_add +PHP_FUNCTION(wrap_gtk_quit_add) +{ + gint main_level; + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + if (ZEND_NUM_ARGS() < 2) { + php_error(E_WARNING, "%s() requires at least 2 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(2, "iV", &main_level, &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + RETURN_LONG(gtk_quit_add_full(main_level, NULL, + (GtkCallbackMarshal)php_gtk_handler_marshal, + data, php_gtk_destroy_notify)); +} +%% +override gtk_input_add_full +PHP_FUNCTION(wrap_gtk_input_add_full) +{ + zval *source_rsrc; + int rsrc_type; + int *source; + GdkInputCondition condition; + zval *callback = NULL; + zval *extra, *data; + char *callback_filename; + uint callback_lineno; + + if (ZEND_NUM_ARGS() < 3) { + php_error(E_WARNING, "%s() requires at least 3 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(3, "riV", &source_rsrc, &condition, &callback)) + return; + + source = zend_list_find(Z_LVAL_P(source_rsrc), &rsrc_type); + if (!source || rsrc_type != php_file_le_fopen()) { + php_error(E_WARNING, "%s() expects argument 1 to be a valid filehandle resource", get_active_function_name()); + return; + } + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 3, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + RETURN_LONG(gtk_input_add_full(*source, condition, NULL, + (GtkCallbackMarshal)php_gtk_input_marshal, + data, php_gtk_destroy_notify)); +} +%% +override gtk_signal_connect +static void wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAMETERS, int pass_object, int after) +{ + char *name = NULL; + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (ZEND_NUM_ARGS() < 2) { + php_error(E_WARNING, "%s() requires at least 2 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(2, "sV", &name, &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNisi)", callback, extra, pass_object, callback_filename, callback_lineno); + RETURN_LONG(gtk_signal_connect_full(PHP_GTK_GET(this_ptr), name, NULL, + (GtkCallbackMarshal)php_gtk_callback_marshal, + data, php_gtk_destroy_notify, FALSE, after)); +} + +PHP_FUNCTION(wrap_gtk_signal_connect) +{ + wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 0); +} +%% +override gtk_signal_connect_object +PHP_FUNCTION(wrap_gtk_signal_connect_object) +{ + wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 0); +} +%% +override gtk_signal_connect_after +PHP_FUNCTION(wrap_gtk_signal_connect_after) +{ + wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 1); +} +%% +override gtk_signal_connect_object_after +PHP_FUNCTION(wrap_gtk_signal_connect_object_after) +{ + wrap_gtk_signal_connect_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); +} +%% +override gtk_signal_emit +PHP_FUNCTION(wrap_gtk_signal_emit) +{ + char *name; + guint signal_id, nparams, i; + GtkSignalQuery *query; + GtkArg *params; + zval *php_params, *ret; + gchar buf[sizeof(GtkArg)]; /* holds the return value */ + + NOT_STATIC_METHOD(); + + if (ZEND_NUM_ARGS() < 1) { + php_error(E_WARNING, "%s() requires at least 1 argument, 0 given", get_active_function_name()); + return; + } + + if (!php_gtk_parse_args(1, "s", &name)) + return; + + signal_id = gtk_signal_lookup(name, GTK_OBJECT_TYPE(PHP_GTK_GET(this_ptr))); + if (signal_id <= 0) { + php_error(E_WARNING, "%s() can't find signal '%s' in class hierarchy", + get_active_function_name(), name); + return; + } + + query = gtk_signal_query(signal_id); + if (ZEND_NUM_ARGS() < (int)query->nparams + 1) { + php_error(E_WARNING, "%s() requires %d arguments for signal '%s', %d given", + get_active_function_name(), query->nparams, name, ZEND_NUM_ARGS()-1); + g_free(query); + return; + } + + php_params = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 1, ZEND_NUM_ARGS()); + params = g_new(GtkArg, query->nparams + 1); + nparams = query->nparams; + + for (i = 0; i < nparams; i++) { + params[i].type = query->params[i]; + params[i].name = NULL; + } + params[i].type = query->return_val; + params[i].name = NULL; + params[i].d.pointer_data = buf; + g_free(query); + + if (!php_gtk_args_from_hash(params, nparams, php_params)) { + zval_ptr_dtor(&php_params); + g_free(params); + return; + } + zval_ptr_dtor(&php_params); + + gtk_signal_emitv(PHP_GTK_GET(this_ptr), signal_id, params); + ret = php_gtk_ret_as_value(¶ms[nparams]); + g_free(params); + if (ret) { + *return_value = *ret; + FREE_ZVAL(ret); + } +} +%% +override gtk_object_set +PHP_FUNCTION(wrap_gtk_object_set) +{ + zval *hash; + GtkArg *arg; + gint nargs; + GtkObject *obj; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &hash)) + return; + + obj = PHP_GTK_GET(this_ptr); + arg = php_gtk_hash_as_args(hash, GTK_OBJECT_TYPE(obj), &nargs); + if (!arg && nargs != 0) + return; + + gtk_object_setv(obj, nargs, arg); + g_free(arg); +} +%% +override gtk_object_get +PHP_FUNCTION(wrap_gtk_object_get) +{ + char *name; + GtkArg garg; + zval *ret; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s", &name)) + return; + + garg.type = GTK_TYPE_INVALID; + garg.name = name; + gtk_object_getv(PHP_GTK_GET(this_ptr), 1, &garg); + + if (garg.type == GTK_TYPE_INVALID) { + php_error(E_WARNING, "%s(): invalid arg '%s'", + get_active_function_name(), name); + return; + } + + ret = php_gtk_arg_as_value(&garg); + if (ret == NULL) { + php_error(E_WARNING, "%s() couldn't translate type"); + return; + } + + zval_add_ref(&ret); + *return_value = *ret; + FREE_ZVAL(ret); +} +%% +override gtk_object_set_data +PHP_FUNCTION(wrap_gtk_object_set_data) +{ + char *key; + zval *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "sV", &key, &data)) + return; + + zval_add_ref(&data); + gtk_object_set_data_full(PHP_GTK_GET(this_ptr), key, data, php_gtk_destroy_notify); +} +%% +override gtk_object_get_data +PHP_FUNCTION(wrap_gtk_object_get_data) +{ + char *key; + zval *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s", &key)) + return; + + data = gtk_object_get_data(PHP_GTK_GET(this_ptr), key); + if (data) { + *return_value = *data; + zval_copy_ctor(return_value); + } +} +%% +override gtk_widget_intersect +PHP_FUNCTION(wrap_gtk_widget_intersect) +{ + GdkRectangle area, intersection; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "iiii", &(area.x), &(area.y), &(area.width), &(area.height))) + return; + + if (gtk_widget_intersect(GTK_WIDGET(PHP_GTK_GET(this_ptr)), &area, &intersection)) { + array_init(return_value); + *return_value = *php_gtk_build_value("(iiii)", area.x, area.y, area.width, area.height); + } +} +%% +override gtk_menu_attach_to_widget +static void gtk_menu_detacher(GtkWidget *widget, GtkMenu *menu) +{ + GtkMenu *remove_menu; + g_return_if_fail(widget != NULL); + g_return_if_fail(GTK_IS_MENU(widget)); + + remove_menu = GTK_MENU(widget); +// g_return_if_fail(remove_menu->menu == (GtkWidget*) menu); + +// remove_menu->menu = NULL; +} + +PHP_FUNCTION(wrap_gtk_menu_attach_to_widget) +{ + zval *php_widget = NULL; + GtkWidget* obj = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &php_widget, gtk_widget_ce)) + return; + + gtk_menu_attach_to_widget(GTK_MENU(PHP_GTK_GET(this_ptr)), GTK_WIDGET(PHP_GTK_GET(php_widget)), gtk_menu_detacher); +} +%% +override gtk_curve_get_vector +PHP_FUNCTION(wrap_gtk_curve_get_vector) +{ + int veclen = -1, i; + gfloat *vector = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|i", &veclen)) + return; + + if (veclen < 0) + veclen = GTK_CURVE(PHP_GTK_GET(this_ptr))->num_points; + vector = emalloc(sizeof(gfloat) * veclen); + gtk_curve_get_vector(GTK_CURVE(PHP_GTK_GET(this_ptr)), veclen, vector); + array_init(return_value); + for (i = 0; i < veclen; i++) + add_index_double(return_value, i, vector[i]); + efree(vector); +} +%% +override gtk_curve_set_vector +PHP_FUNCTION(wrap_gtk_curve_set_vector) +{ + int veclen, i; + gfloat *vector = NULL; + zval *php_vector, **temp_vector; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &php_vector)) + return; + + target_hash = HASH_OF(php_vector); + veclen = zend_hash_num_elements(target_hash); + vector = emalloc(sizeof(gfloat) * veclen); + zend_hash_internal_pointer_reset(target_hash); + i = 0; + while (zend_hash_get_current_data(target_hash, (void **)&temp_vector) == SUCCESS) { + vector[i++] = Z_DVAL_PP(temp_vector); + zend_hash_move_forward(target_hash); + } + + gtk_curve_set_vector(GTK_CURVE(PHP_GTK_GET(this_ptr)), veclen, vector); + RETURN_TRUE; +} +%% +overrides gtk_rc_get_default_files +PHP_FUNCTION(wrap_gtk_rc_get_default_files) +{ + gchar **ret; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + ret = gtk_rc_get_default_files(); + if (ret) { + array_init(return_value); + while (*ret) { + add_next_index_string(return_value, *ret, 1); + *ret++; + } + g_free(ret); + } else + RETURN_NULL(); +} +%% +ignore gtk_clist_new_with_titles +%% +override gtk_clist_new +PHP_FUNCTION(wrap_gtk_clist_new) +{ + GtkObject *wrapped_obj; + gint columns, i; + gchar **titles; + zval *php_titles = NULL, **temp_title; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "i|a/", &columns, &php_titles)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (columns <= 0) { + php_error(E_WARNING, "%s() needs number of columns to be > 0", get_active_function_name()); + return; + } + + if (php_titles) { + if (zend_hash_num_elements(Z_ARRVAL_P(php_titles)) < columns) { + php_error(E_WARNING, "%s(): the array of titles is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_titles); + titles = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&temp_title) == SUCCESS) { + convert_to_string_ex(temp_title); + titles[i++] = estrndup(Z_STRVAL_PP(temp_title), Z_STRLEN_PP(temp_title)); + zend_hash_move_forward(target_hash); + } + wrapped_obj = (GtkObject *)gtk_clist_new_with_titles(columns, titles); + efree(titles); + } else + wrapped_obj = (GtkObject *)gtk_clist_new(columns); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkCList object", get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +override gtk_clist_append +PHP_FUNCTION(wrap_gtk_clist_append) +{ + gint columns, i, res; + gchar **list; + zval *php_list, **text; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a/", &php_list)) { + php_gtk_invalidate(this_ptr); + return; + } + + columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns; + if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) { + php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_list); + list = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&text) == SUCCESS) { + convert_to_string_ex(text); + list[i++] = estrndup(Z_STRVAL_PP(text), Z_STRLEN_PP(text)); + zend_hash_move_forward(target_hash); + } + ZVAL_LONG(return_value, gtk_clist_append(GTK_CLIST(PHP_GTK_GET(this_ptr)), list)); + efree(list); +} +%% +override gtk_clist_prepend +PHP_FUNCTION(wrap_gtk_clist_prepend) +{ + gint columns, i, res; + gchar **list; + zval *php_list, **text; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a/", &php_list)) { + php_gtk_invalidate(this_ptr); + return; + } + + columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns; + if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) { + php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_list); + list = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&text) == SUCCESS) { + convert_to_string_ex(text); + list[i++] = estrndup(Z_STRVAL_PP(text), Z_STRLEN_PP(text)); + zend_hash_move_forward(target_hash); + } + ZVAL_LONG(return_value, gtk_clist_prepend(GTK_CLIST(PHP_GTK_GET(this_ptr)), list)); + efree(list); +} +%% +override gtk_clist_insert +PHP_FUNCTION(wrap_gtk_clist_insert) +{ + gint columns, i, row, res; + gchar **list; + zval *php_list, **text; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ia/", &row, &php_list)) { + php_gtk_invalidate(this_ptr); + return; + } + + columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns; + if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) { + php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_list); + list = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&text) == SUCCESS) { + convert_to_string_ex(text); + list[i++] = estrndup(Z_STRVAL_PP(text), Z_STRLEN_PP(text)); + zend_hash_move_forward(target_hash); + } + ZVAL_LONG(return_value, gtk_clist_insert(GTK_CLIST(PHP_GTK_GET(this_ptr)), row, list)); + efree(list); +} +%% +override gtk_clist_get_text +PHP_FUNCTION(wrap_gtk_clist_get_text) +{ + gint row, column; + gchar *text; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ii", &row, &column)) + return; + + if (!gtk_clist_get_text(GTK_CLIST(PHP_GTK_GET(this_ptr)), row, column, &text)) { + php_error(E_WARNING, "%s() cannot get text value", get_active_function_name()); + return; + } + + RETURN_STRING(text, 1); +} +%% +ignore gtk_menu_item_new_with_label +%% +override gtk_menu_item_new +PHP_FUNCTION(wrap_gtk_menu_item_new) +{ + char *label; + GtkObject *wrapped_obj; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &label)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (label) + wrapped_obj = (GtkObject *)gtk_menu_item_new_with_label(label); + else + wrapped_obj = (GtkObject *)gtk_menu_item_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkMenuItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} + +%% +ignore gtk_check_menu_item_new_with_label +%% +override gtk_check_menu_item_new +PHP_FUNCTION(wrap_gtk_check_menu_item_new) +{ + char *label; + GtkObject *wrapped_obj; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &label)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (label) + wrapped_obj = (GtkObject *)gtk_check_menu_item_new_with_label(label); + else + wrapped_obj = (GtkObject *)gtk_check_menu_item_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkCheckMenuItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +override gtk_list_append_items +PHP_FUNCTION(wrap_gtk_list_append_items) +{ + zval *php_items, **item; + GList *items = NULL; + int i = 0; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &php_items)) + return; + + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_items)); + zend_hash_get_current_data(Z_ARRVAL_P(php_items), (void **)&item) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_items)), i++) { + if (!php_gtk_check_class(*item, gtk_listitem_ce)) { + php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(), i); + g_list_free(items); + return; + } + + items = g_list_append(items, PHP_GTK_GET(*item)); + } + + gtk_list_append_items(GTK_LIST(PHP_GTK_GET(this_ptr)), items); +} +%% +override gtk_list_prepend_items +PHP_FUNCTION(wrap_gtk_list_prepend_items) +{ + zval *php_items, **item; + GList *items = NULL; + int i = 0; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &php_items)) + return; + + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_items)); + zend_hash_get_current_data(Z_ARRVAL_P(php_items), (void **)&item) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_items)), i++) { + if (!php_gtk_check_class(*item, gtk_listitem_ce)) { + php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(), i); + g_list_free(items); + return; + } + + items = g_list_append(items, PHP_GTK_GET(*item)); + } + + gtk_list_prepend_items(GTK_LIST(PHP_GTK_GET(this_ptr)), items); +} +%% +override gtk_list_insert_items +PHP_FUNCTION(wrap_gtk_list_insert_items) +{ + zval *php_items, **item; + GList *items = NULL; + int position, i = 0; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ai", &php_items, &position)) + return; + + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_items)); + zend_hash_get_current_data(Z_ARRVAL_P(php_items), (void **)&item) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_P(php_items)), i++) { + if (!php_gtk_check_class(*item, gtk_listitem_ce)) { + php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(), i); + g_list_free(items); + return; + } + + items = g_list_append(items, PHP_GTK_GET(*item)); + } + + gtk_list_insert_items(GTK_LIST(PHP_GTK_GET(this_ptr)), items, position); +} +%% +ignore gtk_list_item_new_with_label +%% +override gtk_list_item_new +PHP_FUNCTION(wrap_gtk_list_item_new) +{ + GtkObject *wrapped_obj; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &text)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (text) + wrapped_obj = (GtkObject *)gtk_list_item_new_with_label(text); + else + wrapped_obj = (GtkObject *)gtk_list_item_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkListItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore gtk_tree_item_new_with_label +%% +override gtk_tree_item_new +PHP_FUNCTION(wrap_gtk_tree_item_new) +{ + GtkObject *wrapped_obj; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &text)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (text) + wrapped_obj = (GtkObject *)gtk_tree_item_new_with_label(text); + else + wrapped_obj = (GtkObject *)gtk_tree_item_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkTreeItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore gtk_button_new_with_label +%% +override gtk_button_new +PHP_FUNCTION(wrap_gtk_button_new) +{ + GtkObject *wrapped_obj; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &text)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (text) + wrapped_obj = (GtkObject *)gtk_button_new_with_label(text); + else + wrapped_obj = (GtkObject *)gtk_button_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkButton object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore gtk_toggle_button_new_with_label +%% +override gtk_toggle_button_new +PHP_FUNCTION(wrap_gtk_toggle_button_new) +{ + GtkObject *wrapped_obj; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &text)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (text) + wrapped_obj = (GtkObject *)gtk_toggle_button_new_with_label(text); + else + wrapped_obj = (GtkObject *)gtk_toggle_button_new(); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkToggleButton object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore gtk_check_button_new_with_label +%% +override gtk_check_button_new +PHP_FUNCTION(wrap_gtk_check_button_new) +{ + char *label; + GtkObject *wrapped_obj; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|s", &label)) { + php_gtk_invalidate(this_ptr); + return; + } + if (label) + wrapped_obj = (GtkObject *)gtk_check_button_new_with_label(label); + else + wrapped_obj = (GtkObject *)gtk_check_button_new(); + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkCheckButton object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore + gtk_ctree_construct + gtk_ctree_insert_gnode + gtk_ctree_export_to_gnode + gtk_ctree_find_node_ptr + gtk_ctree_new +%% +override gtk_ctree_new_with_titles +PHP_FUNCTION(wrap_gtk_ctree_new_with_titles) +{ + GtkObject *wrapped_obj; + gint columns, tree_column, i; + gchar **titles; + zval *php_titles = NULL, **temp_title; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ii|a/", &columns, &tree_column, &php_titles)) { + php_gtk_invalidate(this_ptr); + return; + } + + if (columns <= 0) { + php_error(E_WARNING, "%s() needs number of columns to be > 0", get_active_function_name()); + return; + } + + if (php_titles) { + if (zend_hash_num_elements(Z_ARRVAL_P(php_titles)) < columns) { + php_error(E_WARNING, "%s(): the array of titles is not long enough", get_active_function_name()); + return; + } + + target_hash = HASH_OF(php_titles); + titles = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&temp_title) == SUCCESS) { + convert_to_string_ex(temp_title); + titles[i++] = estrndup(Z_STRVAL_PP(temp_title), Z_STRLEN_PP(temp_title)); + zend_hash_move_forward(target_hash); + } + wrapped_obj = (GtkObject *)gtk_ctree_new_with_titles(columns, tree_column, titles); + efree(titles); + } else + wrapped_obj = (GtkObject *)gtk_ctree_new(columns, tree_column); + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkCTree object", get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +override gtk_ctree_insert_node +PHP_FUNCTION(wrap_gtk_ctree_insert_node) +{ + zval *php_parent, *php_sibling, *php_text, + *php_pixmap_closed, *php_pixmap_opened, + *php_mask_closed, *php_mask_opened, **temp_text; + zval *php_ret; + gint spacing, columns, i; + zend_bool is_leaf, expanded; + GtkCTreeNode *parent = NULL, *sibling = NULL, *ret; + GdkPixmap *pixmap_closed = NULL, *pixmap_opened = NULL; + GdkBitmap *mask_closed = NULL, *mask_opened = NULL; + GtkCTree *tree; + gchar **text = NULL; + HashTable *target_hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNa/iNNNNbb", &php_parent, + gtk_ctree_node_ce, &php_sibling, gtk_ctree_node_ce, + &php_text, &spacing, &php_pixmap_closed, + gdk_pixmap_ce, &php_mask_closed, gdk_bitmap_ce, + &php_pixmap_opened, gdk_pixmap_ce, &php_mask_opened, + gdk_bitmap_ce, &is_leaf, &expanded)) + return; + + target_hash = HASH_OF(php_text); + tree = GTK_CTREE(PHP_GTK_GET(this_ptr)); + columns = GTK_CLIST(tree)->columns; + if (zend_hash_num_elements(target_hash) < columns) { + php_error(E_WARNING, "%s(): the text array is not long enough", get_active_function_name()); + return; + } + + if (Z_TYPE_P(php_parent) != IS_NULL) + parent = PHP_GTK_CTREE_NODE_GET(php_parent); + if (Z_TYPE_P(php_sibling) != IS_NULL) + sibling = PHP_GTK_CTREE_NODE_GET(php_sibling); + if (Z_TYPE_P(php_pixmap_closed) != IS_NULL) + pixmap_closed = PHP_GDK_PIXMAP_GET(php_pixmap_closed); + if (Z_TYPE_P(php_mask_closed) != IS_NULL) + mask_closed = PHP_GDK_BITMAP_GET(php_mask_closed); + if (Z_TYPE_P(php_pixmap_opened) != IS_NULL) + pixmap_opened = PHP_GDK_PIXMAP_GET(php_pixmap_opened); + if (Z_TYPE_P(php_mask_opened) != IS_NULL) + mask_opened = PHP_GDK_BITMAP_GET(php_mask_opened); + + text = emalloc(sizeof(gchar *) * columns); + i = 0; + zend_hash_internal_pointer_reset(target_hash); + while (zend_hash_get_current_data(target_hash, (void **)&temp_text) == SUCCESS) { + convert_to_string_ex(temp_text); + text[i++] = estrndup(Z_STRVAL_PP(temp_text), Z_STRLEN_PP(temp_text)); + zend_hash_move_forward(target_hash); + } + + ret = gtk_ctree_insert_node(tree, parent, sibling, text, (guint8)spacing, + pixmap_closed, mask_closed, pixmap_opened, + mask_opened, is_leaf, expanded); + efree(text); + php_ret = php_gtk_ctree_node_new(ret); + SEPARATE_ZVAL(&php_ret); + *return_value = *php_ret; +} +%% +override gtk_ctree_post_recursive +static void ctree_callback(GtkCTree *ctree, GtkCTreeNode *node, zval *callback_data) +{ + zval *retval = NULL; + zval **callback = NULL, **extra = NULL; + zval **callback_filename = NULL, **callback_lineno = NULL; + zval ***args, *params; + char *callback_name; + ELS_FETCH(); + + zend_hash_index_find(Z_ARRVAL_P(callback_data), 0, (void **)&callback); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 1, (void **)&extra); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 2, (void **)&callback_filename); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 3, (void **)&callback_lineno); + + if (!php_gtk_is_callable(*callback, 0, &callback_name)) { + php_error(E_WARNING, "Unable to call ctree callback '%s' specified in %s on line %d", callback_name, Z_STRVAL_PP(callback_filename), Z_LVAL_PP(callback_lineno)); + efree(callback_name); + return; + } + + params = php_gtk_build_value("(NN)", php_gtk_new((GtkObject *)ctree), + php_gtk_ctree_node_new(node)); + if (extra) + php_array_merge(Z_ARRVAL_P(params), Z_ARRVAL_PP(extra), 0); + + args = php_gtk_hash_as_array(params); + + call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL); + if (retval) + zval_ptr_dtor(&retval); + efree(args); + zval_ptr_dtor(¶ms); +} + +static void traverse_ctree(INTERNAL_FUNCTION_PARAMETERS, zend_bool use_depth, zend_bool pre_order) +{ + zval *ctree, *php_node, *callback; + zval *data, *extra; + GtkCTreeNode *node = NULL; + gint depth; + int req_args = 2; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (use_depth) + req_args = 3; + + if (ZEND_NUM_ARGS() < req_args) { + php_error(E_WARNING, "%s() requires at least %d arguments, %d given", + get_active_function_name(), req_args, ZEND_NUM_ARGS()); + return; + } + + if (use_depth) { + if (!php_gtk_parse_args(3, "NiV", &php_node, gtk_ctree_node_ce, &depth, &callback)) + return; + } else { + if (!php_gtk_parse_args(2, "NV", &php_node, gtk_ctree_node_ce, &callback)) + return; + } + + if (Z_TYPE_P(php_node) != IS_NULL) + node = PHP_GTK_CTREE_NODE_GET(php_node); + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNsi)", callback, extra, callback_filename, callback_lineno); + if (pre_order) { + if (use_depth) + gtk_ctree_pre_recursive_to_depth(GTK_CTREE(PHP_GTK_GET(this_ptr)), + node, depth, + (GtkCTreeFunc)ctree_callback, data); + else + gtk_ctree_pre_recursive(GTK_CTREE(PHP_GTK_GET(this_ptr)), node, + (GtkCTreeFunc)ctree_callback, data); + } else { + if (use_depth) + gtk_ctree_post_recursive_to_depth(GTK_CTREE(PHP_GTK_GET(this_ptr)), + node, depth, + (GtkCTreeFunc)ctree_callback, data); + else + gtk_ctree_post_recursive(GTK_CTREE(PHP_GTK_GET(this_ptr)), node, + (GtkCTreeFunc)ctree_callback, data); + } +} + +PHP_FUNCTION(wrap_gtk_ctree_post_recursive) +{ + traverse_ctree(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 0); +} +%% +override gtk_ctree_post_recursive_to_depth +PHP_FUNCTION(wrap_gtk_ctree_post_recursive_to_depth) +{ + traverse_ctree(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 0); +} +%% +override gtk_ctree_pre_recursive +PHP_FUNCTION(wrap_gtk_ctree_pre_recursive) +{ + traverse_ctree(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 1); +} +%% +override gtk_ctree_pre_recursive_to_depth +PHP_FUNCTION(wrap_gtk_ctree_pre_recursive_to_depth) +{ + traverse_ctree(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1, 1); +} +%% +override gtk_ctree_get_node_info +PHP_FUNCTION(wrap_gtk_ctree_get_node_info) +{ + zval *node; + zval *php_pixmap_closed, *php_mask_closed; + zval *php_pixmap_opened, *php_mask_opened; + gchar *text; + guint8 spacing; + GdkPixmap *pixmap_closed, *pixmap_opened; + GdkBitmap *mask_closed, *mask_opened; + gboolean is_leaf, expanded; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &node, gtk_ctree_node_ce)) + return; + + if (!gtk_ctree_get_node_info(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), &text, &spacing, + &pixmap_closed, &mask_closed, &pixmap_opened, + &mask_opened, &is_leaf, &expanded)) { + php_error(E_WARNING, "%s() cannot get node info", get_active_function_name()); + return; + } + + php_pixmap_closed = php_gdk_pixmap_new(pixmap_closed); + php_pixmap_opened = php_gdk_pixmap_new(pixmap_opened); + php_mask_closed = php_gdk_bitmap_new(mask_closed); + php_mask_opened = php_gdk_bitmap_new(mask_opened); + + *return_value = *php_gtk_build_value("(siNNNNbb)", text, (int)spacing, + php_pixmap_closed, php_mask_closed, + php_pixmap_opened, php_mask_opened, + (int)is_leaf, (int)expanded); +} +%% +override gtk_container_children +PHP_FUNCTION(wrap_gtk_container_children) +{ + GList *children, *tmp; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + children = gtk_container_children(GTK_CONTAINER(PHP_GTK_GET(this_ptr))); + array_init(return_value); + for (tmp = children; tmp; tmp = tmp->next) + add_next_index_zval(return_value, php_gtk_new(tmp->data)); + g_list_free(children); +} +%% +override gtk_item_factory_create_items +static void item_factory_callback(zval *callback_data, guint action, GtkWidget *widget) +{ + zval *retval = NULL; + zval **callback, **extra; + zval **callback_filename, **callback_lineno; + zval *params; + zval ***args; + char *callback_name; + ELS_FETCH(); + + zend_hash_index_find(Z_ARRVAL_P(callback_data), 0, (void **)&callback); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 1, (void **)&callback_filename); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 2, (void **)&callback_lineno); + if (!php_gtk_is_callable(*callback, 0, &callback_name)) { + php_error(E_WARNING, "unable to call item factory callback '%s' specified in %s on line %d", callback_name, Z_STRVAL_PP(callback_filename), Z_LVAL_PP(callback_lineno)); + efree(callback_name); + return; + } + + params = php_gtk_build_value("(iN)", action, php_gtk_new((GtkObject *)widget)); + if (zend_hash_num_elements(Z_ARRVAL_P(callback_data)) > 3) { + zend_hash_index_find(Z_ARRVAL_P(callback_data), 3, (void **)&extra); + php_array_merge(Z_ARRVAL_P(params), Z_ARRVAL_PP(extra), 0); + } + + args = php_gtk_hash_as_array(params); + + call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL); + if (retval) + zval_ptr_dtor(&retval); + efree(args); + zval_ptr_dtor(¶ms); +} + +PHP_FUNCTION(wrap_gtk_item_factory_create_items) +{ + zval *list, **item, *callback_data, + *callback, *extra = NULL; + GtkItemFactoryEntry entry; + GtkItemFactory *factory; + int i = 0; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a", &list)) + return; + + factory = GTK_ITEM_FACTORY(PHP_GTK_GET(this_ptr)); + zend_hash_internal_pointer_reset(Z_ARRVAL_P(list)); + while (zend_hash_get_current_data(Z_ARRVAL_P(list), (void**)&item) == SUCCESS) { + if (Z_TYPE_PP(item) != IS_ARRAY || + !php_gtk_parse_args_hash_quiet(*item, "ssVis|a", &entry.path, + &entry.accelerator, &callback, + &entry.callback_action, &entry.item_type, &extra)) { + php_error(E_WARNING, "%s() was unable to parse item #%d in the input array", + get_active_function_name(), i+1); + return; + } + + if (Z_TYPE_P(callback) == IS_NULL) + entry.callback = NULL; + else { + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + if (extra) + callback_data = php_gtk_build_value("(VsiV)", callback, callback_filename, callback_lineno, extra); + else + callback_data = php_gtk_build_value("(Vsi)", callback, callback_filename, callback_lineno); + entry.callback = (GtkItemFactoryCallback)item_factory_callback; + } + + gtk_item_factory_create_item(factory, &entry, callback_data, 1); + + i++; + zend_hash_move_forward(Z_ARRVAL_P(list)); + } + + RETURN_TRUE; +} +%% +override gtk_combo_set_popdown_strings +PHP_FUNCTION(wrap_gtk_combo_set_popdown_strings) +{ + zval *php_list, **item; + GList *list = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "a/", &php_list)) + return; + + zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_list)); + while (zend_hash_get_current_data(Z_ARRVAL_P(php_list), (void **)&item) == SUCCESS) { + convert_to_string_ex(item); + list = g_list_append(list, Z_STRVAL_PP(item)); + zend_hash_move_forward(Z_ARRVAL_P(php_list)); + } + + gtk_combo_set_popdown_strings(GTK_COMBO(PHP_GTK_GET(this_ptr)), list); + g_list_free(list); + RETURN_TRUE; +} +%% +override gtk_label_get +PHP_FUNCTION(wrap_gtk_label_get) +{ + gchar *text; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gtk_label_get(GTK_LABEL(PHP_GTK_GET(this_ptr)), &text); + RETURN_STRING(text, 1); +} +%% +getprop GtkBox children + GList *tmp; + GList *children = GTK_BOX(PHP_GTK_GET(object))->children; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = children, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_box_child_new((GtkBoxChild *)tmp->data); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = children; tmp; tmp = tmp->next) { + add_next_index_zval(return_value, php_gtk_box_child_new((GtkBoxChild *)tmp->data)); + } + } +%% +getprop GtkCalendar marked_date + GtkCalendar *cal = GTK_CALENDAR(PHP_GTK_GET(object)); + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + if (prop_index > 0 && prop_index < 31) + ZVAL_LONG(return_value, cal->marked_date[prop_index]); + } + } else { + int i; + + array_init(return_value); + for (i = 0; i < 31; i++) + add_next_index_long(return_value, cal->marked_date[i]); + } +%% +override gtk_calendar_get_date +PHP_FUNCTION(wrap_gtk_calendar_get_date) +{ + guint year, month, day; + + NOT_STATIC_METHOD(); + + gtk_calendar_get_date(GTK_CALENDAR(PHP_GTK_GET(this_ptr)), &year, &month, &day); + *return_value = *php_gtk_build_value("(iii)", year, month, day); +} +%% +getprop GtkFixed children + GList *tmp; + GList *children = GTK_FIXED(PHP_GTK_GET(object))->children; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = children, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_fixed_child_new((GtkFixedChild *)tmp->data); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = children; tmp; tmp = tmp->next) { + add_next_index_zval(return_value, php_gtk_fixed_child_new((GtkFixedChild *)tmp->data)); + } + } +%% +getprop GtkList selection + GtkListItem *item; + GList *tmp; + GList *selection = GTK_LIST(PHP_GTK_GET(object))->selection; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = selection, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_new((GtkObject *)tmp->data); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = selection; tmp; tmp = tmp->next) + add_next_index_zval(return_value, php_gtk_new((GtkObject *)tmp->data)); + } +%% +getprop GtkCList selection + GList *tmp; + GList *selection = GTK_CLIST(PHP_GTK_GET(object))->selection; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = selection, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + RETURN_LONG(GPOINTER_TO_INT(tmp->data)); + } + } + } + } else { + array_init(return_value); + for (tmp = selection; tmp; tmp = tmp->next) + add_next_index_long(return_value, GPOINTER_TO_INT(tmp->data)); + } +%% +getprop GtkCTree selection + GList *tmp; + GList *selection = GTK_CLIST(PHP_GTK_GET(object))->selection; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = selection, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_ctree_node_new(GTK_CTREE_NODE(tmp->data)); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = selection; tmp; tmp = tmp->next) + add_next_index_zval(return_value, php_gtk_ctree_node_new(GTK_CTREE_NODE(tmp->data))); + } +%% +ignore gtk_radio_menu_item_new_with_label +%% +override gtk_radio_menu_item_new +PHP_FUNCTION(wrap_gtk_radio_menu_item_new) +{ + zval *php_group = NULL; + gchar *text = NULL; + GtkRadioMenuItem *group = NULL; + GtkObject *wrapped_obj = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|Ns", &php_group, gtk_radiomenuitem_ce, &text)) + return; + + if (Z_TYPE_P(php_group) != IS_NULL) + group = GTK_RADIO_MENU_ITEM(PHP_GTK_GET(php_group)); + + if (!text) { + if (!group) + wrapped_obj = (GtkObject *)gtk_radio_menu_item_new(NULL); + else + wrapped_obj = (GtkObject *)gtk_radio_menu_item_new(group->group); + } else { + if (!group) + wrapped_obj = (GtkObject *)gtk_radio_menu_item_new_with_label(NULL, text); + else + wrapped_obj = (GtkObject *)gtk_radio_menu_item_new_with_label(group->group, text); + } + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkRadioMenuItem object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +ignore-glob gtk_radio_button_new_* +%% +override gtk_radio_button_new +PHP_FUNCTION(wrap_gtk_radio_button_new) +{ + zval *php_group = NULL; + gchar *text = NULL; + GtkRadioButton *group = NULL; + GtkObject *wrapped_obj = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|Ns", &php_group, gtk_radiobutton_ce, &text)) + return; + + if (Z_TYPE_P(php_group) != IS_NULL) + group = GTK_RADIO_BUTTON(PHP_GTK_GET(php_group)); + + if (!text) { + if (!group) + wrapped_obj = (GtkObject *)gtk_radio_button_new(NULL); + else + wrapped_obj = (GtkObject *)gtk_radio_button_new(group->group); + } else { + if (!group) + wrapped_obj = (GtkObject *)gtk_radio_button_new_with_label(NULL, text); + else + wrapped_obj = (GtkObject *)gtk_radio_button_new_with_label(group->group, text); + } + + if (!wrapped_obj) { + php_error(E_WARNING, "%s(): could not create GtkRadioButton object", + get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } + + php_gtk_object_init(wrapped_obj, this_ptr); +} +%% +override gtk_color_selection_set_color +PHP_FUNCTION(wrap_gtk_color_selection_set_color) +{ + gdouble value[4]; + + NOT_STATIC_METHOD(); + + value[3] = 1.0; + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ddd|d", + &value[0], &value[1], &value[2], &value[3])) + return; + + gtk_color_selection_set_color(GTK_COLOR_SELECTION(PHP_GTK_GET(this_ptr)), value); +} +%% +override gtk_color_selection_get_color +PHP_FUNCTION(wrap_gtk_color_selection_get_color) +{ + gdouble value[4]; + GtkColorSelection *colorsel; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + colorsel = GTK_COLOR_SELECTION(PHP_GTK_GET(this_ptr)); + gtk_color_selection_get_color(colorsel, value); + if (colorsel->use_opacity) + *return_value = *php_gtk_build_value("(dddd)", value[0], value[1], value[2], value[3]); + else + *return_value = *php_gtk_build_value("(ddd)", value[0], value[1], value[2]); +} +%% +getprop GtkCTree clist + *return_value = *php_gtk_new((GtkObject *)GTK_CLIST(PHP_GTK_GET(object))); +%% +getprop GtkCList row_list + GList *tmp; + GList *row_list = GTK_CLIST(PHP_GTK_GET(object))->row_list; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = row_list, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_clist_row_new((GtkCListRow *)tmp->data); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = row_list; tmp; tmp = tmp->next) { + add_next_index_zval(return_value, php_gtk_clist_row_new((GtkCListRow *)tmp->data)); + } + } +%% +getprop GtkCTree row_list + GList *tmp; + GList *row_list = GTK_CLIST(PHP_GTK_GET(object))->row_list; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + for (tmp = row_list, i = 0; tmp; tmp = tmp->next, i++) { + if (i == prop_index) { + *return_value = *php_gtk_ctree_node_new(GTK_CTREE_NODE(tmp)); + return; + } + } + } + } else { + array_init(return_value); + for (tmp = row_list; tmp; tmp = tmp->next) { + add_next_index_zval(return_value, php_gtk_ctree_node_new(GTK_CTREE_NODE(tmp))); + } + } +%% +ignore gtk_ctree_node_set_row_data_full +%% +override gtk_ctree_node_set_row_data +PHP_FUNCTION(wrap_gtk_ctree_node_set_row_data) +{ + zval *node, *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "OV", &node, gtk_ctree_node_ce, &data)) + return; + + zval_add_ref(&data); + gtk_ctree_node_set_row_data_full(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), data, + php_gtk_destroy_notify); +} +%% +override gtk_ctree_node_get_row_data +PHP_FUNCTION(wrap_gtk_ctree_node_get_row_data) +{ + zval *node, *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &node, gtk_ctree_node_ce)) + return; + + data = gtk_ctree_node_get_row_data(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node)); + if (data) { + *return_value = *data; + zval_copy_ctor(return_value); + } else { + RETURN_NULL(); + } +} +%% +override gtk_ctree_node_get_text +PHP_FUNCTION(wrap_gtk_ctree_node_get_text) +{ + zval *node; + gint column; + gchar *text = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "Oi", &node, gtk_ctree_node_ce, &column)) + return; + + if (!gtk_ctree_node_get_text(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), column, &text)) { + php_error(E_WARNING, "%s() cannot get text value", get_active_function_name()); + return; + } + + RETURN_STRING(text, 1); +} +%% +override gtk_ctree_node_get_pixmap +PHP_FUNCTION(wrap_gtk_ctree_node_get_pixmap) +{ + zval *node, *php_pixmap, *php_mask; + int column; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "Oi", &node, gtk_ctree_node_ce, &column)) + return; + + if (!gtk_ctree_node_get_pixmap(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), column, + &pixmap, &mask)) { + php_error(E_WARNING, "%s() cannot get pixmap value", get_active_function_name()); + return; + } + + php_pixmap = php_gdk_pixmap_new(pixmap); + php_mask = php_gdk_bitmap_new(pixmap); + + *return_value = *php_gtk_build_value("(NN)", php_pixmap, php_mask); +} +%% +override gtk_ctree_node_get_pixtext +PHP_FUNCTION(wrap_gtk_ctree_node_get_pixtext) +{ + zval *node, *php_pixmap = NULL, *php_mask = NULL; + int column; + gchar *text = NULL; + guint8 spacing; + GdkPixmap *pixmap = NULL; + GdkBitmap *mask = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "Oi", &node, gtk_ctree_node_ce, &column)) + return; + + if (!gtk_ctree_node_get_pixtext(GTK_CTREE(PHP_GTK_GET(this_ptr)), + PHP_GTK_CTREE_NODE_GET(node), column, &text, + &spacing, &pixmap, &mask)) { + php_error(E_WARNING, "%s() cannot get pixtext value", get_active_function_name()); + return; + } + + if (pixmap) { + php_pixmap = php_gdk_pixmap_new(pixmap); + } else { + MAKE_STD_ZVAL(php_pixmap); + ZVAL_NULL(php_pixmap); + } + + if (mask) { + php_mask = php_gdk_bitmap_new(mask); + } else { + MAKE_STD_ZVAL(php_mask); + ZVAL_NULL(php_mask); + } + + *return_value = *php_gtk_build_value("(siNN)", text, (int)spacing, + php_pixmap, php_mask); +} +%% +override gtk_menu_popup +static void php_gtk_menu_position(GtkMenu *menu, int *x, int *y, zval *callback_data) +{ + zval **callback, *php_menu; + zval **callback_filename, **callback_lineno; + zval *retval, *params; + zval ***args; + char *callback_name; + ELS_FETCH(); + + zend_hash_index_find(Z_ARRVAL_P(callback_data), 0, (void **)&callback); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 1, (void **)&callback_filename); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 2, (void **)&callback_lineno); + if (!php_gtk_is_callable(*callback, 0, &callback_name)) { + php_error(E_WARNING, "unable to call menu position callback '%s' specified in %s on line %d", callback_name, Z_STRVAL_PP(callback_filename), Z_LVAL_PP(callback_lineno)); + efree(callback_name); + return; + } + + params = php_gtk_build_value("(Nii)", php_gtk_new(GTK_OBJECT(menu)), *x, *y); + args = php_gtk_hash_as_array(params); + + call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL); + + if (retval) { + if (Z_TYPE_P(retval) == IS_ARRAY && + !php_gtk_parse_args_hash_quiet(retval, "ii", x, y)) { + php_error(E_WARNING, "unable to parse result of menu position callback"); + } + zval_ptr_dtor(&retval); + } + + efree(args); + zval_ptr_dtor(¶ms); +} + +PHP_FUNCTION(wrap_gtk_menu_popup) +{ + zval *php_pms, *php_pmi; + GtkWidget *pms = NULL, *pmi = NULL; + zval *callback, *data; + int button, time; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "NNVii", &php_pms, gtk_widget_ce, + &php_pmi, gtk_widget_ce, &callback, &button, &time)) + return; + + if (Z_TYPE_P(php_pms) != IS_NULL) + pms = GTK_WIDGET(PHP_GTK_GET(php_pms)); + if (Z_TYPE_P(php_pmi) != IS_NULL) + pmi = GTK_WIDGET(PHP_GTK_GET(php_pmi)); + + if (Z_TYPE_P(callback) != IS_NULL) { + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + data = php_gtk_build_value("(Vsi)", callback, callback_filename, callback_lineno); + gtk_menu_popup(GTK_MENU(PHP_GTK_GET(this_ptr)), pms, pmi, + (GtkMenuPositionFunc)php_gtk_menu_position, data, + button, time); + } else + gtk_menu_popup(GTK_MENU(PHP_GTK_GET(this_ptr)), pms, pmi, NULL, NULL, + button, time); +} +%% +override gtk_editable_insert_text +PHP_FUNCTION(wrap_gtk_editable_insert_text) +{ + char *text; + int len, pos; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#i", &text, &len, &pos)) + return; + + gtk_editable_insert_text(GTK_EDITABLE(PHP_GTK_GET(this_ptr)), text, len, &pos); + RETURN_LONG(pos); +} Index: php-gtk/ext/gtk+/php_gtk+.c diff -u /dev/null php-gtk/ext/gtk+/php_gtk+.c:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/php_gtk+.c Tue Jul 10 14:27:50 2001 @@ -0,0 +1,167 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_gtk+.c,v 1.2 2001/07/10 18:27:50 andrei Exp $: */ + +#include "php_gtk.h" +#include "SAPI.h" + +#if HAVE_PHP_GTK + +#include "php_gtk+.h" + +int le_gtk_object; + +static void init_gtk(void) +{ + HashTable *symbol_table; + zval **z_argv = NULL, **z_argc = NULL, **entry; + zval *tmp; + char **argv; + int argc, i; + zend_bool no_argc = 0; + PLS_FETCH(); + SLS_FETCH(); + + /* We check request_method to see if we've been called from command line or + Web server. Running GUI apps through a Web module can be dangerous to + your health. */ + if (SG(request_info).request_method != NULL) { + php_error(E_ERROR, "php-gtk: PHP GTK+ support is not available under Web servers"); + return; + } + + /* + * Since track_vars is always on, we just get the argc/argv values from + * there. + */ + symbol_table = PG(http_globals)[TRACK_VARS_SERVER]->value.ht; + + zend_hash_find(symbol_table, "argc", sizeof("argc"), (void **)&z_argc); + zend_hash_find(symbol_table, "argv", sizeof("argv"), (void **)&z_argv); + if (!z_argc || !z_argv || Z_TYPE_PP(z_argc) != IS_LONG || Z_TYPE_PP(z_argv) != IS_ARRAY) { + php_error(E_ERROR, "php-gtk: argc/argv are corrupted"); + } + + argc = Z_LVAL_PP(z_argc); + + /* + * If the script was called via -f switch and no further arguments were + * given, argc will be 0 and that's not good for gtk_init_check(). We use + * the path to the script as the only argument, and remember that we won't + * have to update symbol table after gtk_init_check(). + */ + if (argc == 0) { + argc = 1; + no_argc = 1; + argv = (char **)g_new(char *, argc); + argv[0] = g_strdup(SG(request_info).path_translated); + } else { + argv = (char **)g_new(char *, argc); + i = 0; + for (zend_hash_internal_pointer_reset(Z_ARRVAL_PP(z_argv)); + zend_hash_get_current_data(Z_ARRVAL_PP(z_argv), (void **)&entry) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_PP(z_argv))) { + argv[i++] = g_strndup(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry)); + } + } + + /* Ok, this is a hack. GTK+/GDK calls g_atexit() to set up a couple of cleanup + functions that should be called when the main program exits. However, if + we're compiled as .so library, libgtk.so will be unloaded first and the + pointers to the cleanup functions will be invalid. So we load libgtk.so + one more time to make sure it stays in memory even after our .so is + unloaded. */ + //DL_LOAD("libgtk.so"); + + if (!gtk_init_check(&argc, &argv)) { + if (argv != NULL) { + for (i = 0; i < argc; i++) + g_free(argv[i]); + g_free(argv); + } + php_error(E_ERROR, "php-gtk: Could not open display"); + return; + } + + /* + We must always call gtk_set_locale() in order to get GTK+/GDK + correctly initialize multilingual support. Otherwise, application + will refuse any letters outside ASCII and font metrics will + be broken. + */ + gtk_set_locale(); + + if (no_argc) { + /* The -f switch case, simple. */ + g_free(argv[0]); + } else { + /* We always clean the argv array. */ + zend_hash_clean(Z_ARRVAL_PP(z_argv)); + + /* Then if there are any arguments left after processing with + gtk_init_check(), we put them back into PHP's argv array and update + argc as well. */ + if (argv != NULL) { + for (i = 0; i < argc; i++) { + ALLOC_ZVAL(tmp); + tmp->type = IS_STRING; + tmp->value.str.len = strlen(argv[i]); + tmp->value.str.val = estrndup(argv[i], tmp->value.str.len); + INIT_PZVAL(tmp); + zend_hash_next_index_insert(Z_ARRVAL_PP(z_argv), &tmp, sizeof(zval *), NULL); + } + g_free(argv); + + Z_LVAL_PP(z_argc) = argc; + } + } +} + +static void release_gtk_object_rsrc(zend_rsrc_list_entry *rsrc) +{ + GtkObject *obj = (GtkObject *)rsrc->ptr; + gtk_object_unref(obj); +} + +PHP_GTK_XINIT_FUNCTION(gtk_plus) +{ + le_gtk_object = zend_register_list_destructors_ex(release_gtk_object_rsrc, NULL, "GtkObject", module_number); + + init_gtk(); + php_gtk_register_constants(); + php_gdk_register_constants(); + php_gtk_register_classes(); + php_gdk_register_classes(); + php_gtk_plus_register_types(module_number); +} + +PHP_GTK_XSHUTDOWN_FUNCTION(gtk_plus) +{ + gtk_exit(0); +} + +php_gtk_ext_entry gtk_plus_ext_entry = { + "gtk+", + PHP_GTK_XINIT(gtk_plus), + PHP_GTK_XSHUTDOWN(gtk_plus) +}; + +#endif /* HAVE_PHP_GTK */ Index: php-gtk/ext/gtk+/php_gtk+.h diff -u /dev/null php-gtk/ext/gtk+/php_gtk+.h:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/php_gtk+.h Tue Jul 10 14:27:50 2001 @@ -0,0 +1,108 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_gtk+.h,v 1.2 2001/07/10 18:27:50 andrei Exp $: */ + +#ifndef _PHP_GTK_PLUS_H +#define _PHP_GTK_PLUS_H + +#include <gtk/gtk.h> +#include "gtk/gtkinvisible.h" + +extern php_gtk_ext_entry gtk_plus_ext_entry; +#define php_gtk_ext_gtk__ptr >k_plus_ext_entry + +extern int le_gtk_object; +extern int le_php_gtk_wrapper; +extern int le_gdk_window; +extern int le_gdk_bitmap; +extern int le_gdk_color; +extern int le_gdk_colormap; +extern int le_gdk_cursor; +extern int le_gdk_visual; +extern int le_gdk_font; +extern int le_gdk_gc; +extern int le_gdk_drag_context; +extern int le_gtk_accel_group; +extern int le_gtk_style; + +#define PHP_GTK_GET(w) PHP_GTK_GET_GENERIC(w, GtkObject*, le_gtk_object) +#define PHP_GDK_EVENT_GET(w) PHP_GTK_GET_GENERIC(w, GdkEvent*, le_php_gtk_wrapper) +#define PHP_GDK_WINDOW_GET(w) PHP_GTK_GET_GENERIC(w, GdkWindow*, le_gdk_window) +#define PHP_GDK_PIXMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkPixmap*, le_gdk_window) +#define PHP_GDK_BITMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkBitmap*, le_gdk_bitmap) +#define PHP_GDK_COLOR_GET(w) PHP_GTK_GET_GENERIC(w, GdkColor*, le_gdk_color) +#define PHP_GDK_COLORMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkColormap*, le_gdk_colormap) +#define PHP_GDK_ATOM_GET(w) (php_gdk_atom_get(w)) +#define PHP_GDK_CURSOR_GET(w) PHP_GTK_GET_GENERIC(w, GdkCursor*, le_gdk_cursor) +#define PHP_GDK_VISUAL_GET(w) PHP_GTK_GET_GENERIC(w, GdkVisual*, le_gdk_visual) +#define PHP_GDK_FONT_GET(w) PHP_GTK_GET_GENERIC(w, GdkFont*, le_gdk_font) +#define PHP_GDK_GC_GET(w) PHP_GTK_GET_GENERIC(w, GdkGC*, le_gdk_gc) +#define PHP_GDK_DRAG_CONTEXT_GET(w) PHP_GTK_GET_GENERIC(w, GdkDragContext*, le_gdk_drag_context) +#define PHP_GTK_SELECTION_DATA_GET(w) PHP_GTK_GET_GENERIC(w, GtkSelectionData*, le_php_gtk_wrapper) +#define PHP_GTK_CTREE_NODE_GET(w) PHP_GTK_GET_GENERIC(w, GtkCTreeNode*, le_php_gtk_wrapper) +#define PHP_GTK_ACCEL_GROUP_GET(w) PHP_GTK_GET_GENERIC(w, GtkAccelGroup*, le_gtk_accel_group) +#define PHP_GTK_STYLE_GET(w) PHP_GTK_GET_GENERIC(w, GtkStyle*, le_gtk_style) + +extern PHP_GTK_EXPORT_CE(gdk_event_ce) +extern PHP_GTK_EXPORT_CE(gdk_window_ce) +extern PHP_GTK_EXPORT_CE(gdk_pixmap_ce) +extern PHP_GTK_EXPORT_CE(gdk_bitmap_ce) +extern PHP_GTK_EXPORT_CE(gdk_color_ce) +extern PHP_GTK_EXPORT_CE(gdk_colormap_ce) +extern PHP_GTK_EXPORT_CE(gdk_atom_ce) +extern PHP_GTK_EXPORT_CE(gdk_cursor_ce) +extern PHP_GTK_EXPORT_CE(gdk_visual_ce) +extern PHP_GTK_EXPORT_CE(gdk_font_ce) +extern PHP_GTK_EXPORT_CE(gdk_gc_ce) +extern PHP_GTK_EXPORT_CE(gdk_drag_context_ce) +extern PHP_GTK_EXPORT_CE(gtk_selection_data_ce) +extern PHP_GTK_EXPORT_CE(gtk_ctree_node_ce) +extern PHP_GTK_EXPORT_CE(gtk_accel_group_ce) +extern PHP_GTK_EXPORT_CE(gtk_style_ce) +extern PHP_GTK_EXPORT_CE(gtk_box_child_ce) +extern PHP_GTK_EXPORT_CE(gtk_fixed_child_ce) +extern PHP_GTK_EXPORT_CE(gtk_clist_row_ce) + +#include "gen_ce_gtk.h" + +zval *php_gtk_new(GtkObject *obj); +zval *php_gdk_event_new(GdkEvent *event); +zval *php_gdk_window_new(GdkWindow *window); +zval *php_gdk_pixmap_new(GdkPixmap *pixmap); +zval *php_gdk_bitmap_new(GdkBitmap *bitmap); +zval *php_gdk_color_new(GdkColor *color); +zval *php_gdk_colormap_new(GdkColormap *cmap); +zval *php_gdk_atom_new(GdkAtom atom); +zval *php_gdk_cursor_new(GdkCursor *cursor); +zval *php_gdk_visual_new(GdkVisual *visual); +zval *php_gdk_font_new(GdkFont *font); +zval *php_gdk_gc_new(GdkGC *gc); +zval *php_gdk_drag_context_new(GdkDragContext *context); +zval *php_gtk_selection_data_new(GtkSelectionData *data); +zval *php_gtk_ctree_node_new(GtkCTreeNode *node); +zval *php_gtk_accel_group_new(GtkAccelGroup *group); +zval *php_gtk_style_new(GtkStyle *style); +zval *php_gtk_box_child_new(GtkBoxChild *box_child); +zval *php_gtk_fixed_child_new(GtkFixedChild *fixed_child); +zval *php_gtk_clist_row_new(GtkCListRow *clist_row); + + +#endif /* _PHP_GTK_PLUS_H */ Index: php-gtk/ext/gtk+/php_gtk+_types.c diff -u /dev/null php-gtk/ext/gtk+/php_gtk+_types.c:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/gtk+/php_gtk+_types.c Tue Jul 10 14:27:50 2001 @@ -0,0 +1,2527 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_gtk+_types.c,v 1.2 2001/07/10 18:27:50 andrei Exp $ */ + +#include "php_gtk.h" + +#if HAVE_PHP_GTK +#ifndef PHP_WIN32 +#include <gdk/gdkx.h> +#endif + +int le_php_gtk_wrapper; +int le_gdk_window; +int le_gdk_bitmap; +int le_gdk_color; +int le_gdk_colormap; +int le_gdk_cursor; +int le_gdk_visual; +int le_gdk_font; +int le_gdk_gc; +int le_gdk_drag_context; +int le_gtk_accel_group; +int le_gtk_style; + +PHP_GTK_EXPORT_CE(gdk_event_ce) +PHP_GTK_EXPORT_CE(gdk_window_ce) +PHP_GTK_EXPORT_CE(gdk_pixmap_ce) +PHP_GTK_EXPORT_CE(gdk_bitmap_ce) +PHP_GTK_EXPORT_CE(gdk_color_ce) +PHP_GTK_EXPORT_CE(gdk_colormap_ce) +PHP_GTK_EXPORT_CE(gdk_atom_ce) +PHP_GTK_EXPORT_CE(gdk_cursor_ce) +PHP_GTK_EXPORT_CE(gdk_visual_ce) +PHP_GTK_EXPORT_CE(gdk_font_ce) +PHP_GTK_EXPORT_CE(gdk_gc_ce) +PHP_GTK_EXPORT_CE(gdk_drag_context_ce) +PHP_GTK_EXPORT_CE(gtk_selection_data_ce) +PHP_GTK_EXPORT_CE(gtk_ctree_node_ce) +PHP_GTK_EXPORT_CE(gtk_accel_group_ce) +PHP_GTK_EXPORT_CE(gtk_style_ce) +PHP_GTK_EXPORT_CE(gtk_box_child_ce) +PHP_GTK_EXPORT_CE(gtk_fixed_child_ce) +PHP_GTK_EXPORT_CE(gtk_clist_row_ce) + +/* GdkEvent */ +static function_entry php_gdk_event_functions[] = { + {"gdkevent", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_event_new(GdkEvent *event) +{ + zval *result; + zval *value; + + MAKE_STD_ZVAL(result); + + if (!event) { + ZVAL_NULL(result); + return result; + } + + object_init_ex(result, gdk_event_ce); + + add_property_long(result, "type", event->type); + + if (event->any.window) { + value = php_gdk_window_new(event->any.window); + add_property_zval(result, "window", value); + } else + add_property_null(result, "window"); + add_property_bool(result, "send_event", event->any.send_event); + + switch (event->type) { + case GDK_NOTHING: + case GDK_DELETE: + case GDK_DESTROY: + break; + + case GDK_EXPOSE: + value = php_gtk_build_value("(iiii)", + event->expose.area.x, + event->expose.area.y, + event->expose.area.width, + event->expose.area.height); + zend_hash_update(Z_OBJPROP_P(result), "area", sizeof("area"), &value, sizeof(zval *), NULL); + add_property_long(result, "count", event->expose.count); + break; + + case GDK_MOTION_NOTIFY: + add_property_long(result, "time", event->motion.time); + add_property_double(result, "x", event->motion.x); + add_property_double(result, "y", event->motion.y); + add_property_double(result, "pressure", event->motion.pressure); + add_property_double(result, "xtilt", event->motion.xtilt); + add_property_double(result, "ytilt", event->motion.ytilt); + add_property_long(result, "state", event->motion.state); + add_property_long(result, "is_hint", event->motion.is_hint); + add_property_long(result, "source", event->motion.source); + add_property_long(result, "deviceid", event->motion.deviceid); + add_property_double(result, "x_root", event->motion.x_root); + add_property_double(result, "y_root", event->motion.y_root); + break; + + case GDK_BUTTON_PRESS: /*GdkEventButton button*/ + case GDK_2BUTTON_PRESS: /*GdkEventButton button*/ + case GDK_3BUTTON_PRESS: /*GdkEventButton button*/ + case GDK_BUTTON_RELEASE: /*GdkEventButton button*/ + add_property_long(result, "time", event->button.time); + add_property_double(result, "x", event->button.x); + add_property_double(result, "y", event->button.y); + add_property_double(result, "pressure", event->button.pressure); + add_property_double(result, "xtilt", event->button.xtilt); + add_property_double(result, "ytilt", event->button.ytilt); + add_property_long(result, "state", event->button.state); + add_property_long(result, "button", event->button.button); + add_property_long(result, "source", event->button.source); + add_property_long(result, "deviceid", event->button.deviceid); + add_property_double(result, "x_root", event->button.x_root); + add_property_double(result, "y_root", event->button.y_root); + break; + + case GDK_KEY_PRESS: + case GDK_KEY_RELEASE: + add_property_long(result, "time", event->key.time); + add_property_long(result, "state", event->key.state); + add_property_long(result, "keyval", event->key.keyval); + add_property_stringl(result, "string", event->key.string, event->key.length, 1); + break; + + case GDK_ENTER_NOTIFY: + case GDK_LEAVE_NOTIFY: + if (event->crossing.subwindow) { + value = php_gdk_window_new(event->crossing.subwindow); + add_property_zval(result, "subwindow", value); + } else + add_property_null(result, "subwindow"); + add_property_long(result, "time", event->crossing.time); + add_property_double(result, "x", event->crossing.x); + add_property_double(result, "y", event->crossing.y); + add_property_double(result, "x_root", event->crossing.x_root); + add_property_double(result, "y_root", event->crossing.y_root); + add_property_long(result, "mode", event->crossing.mode); + add_property_long(result, "detail", event->crossing.detail); + add_property_bool(result, "focus", event->crossing.focus); + add_property_long(result, "state", event->crossing.state); + break; + + case GDK_FOCUS_CHANGE: + add_property_bool(result, "in", event->focus_change.in); + break; + + case GDK_CONFIGURE: + add_property_long(result, "x", event->configure.x); + add_property_long(result, "y", event->configure.y); + add_property_long(result, "width", event->configure.width); + add_property_long(result, "height", event->configure.height); + break; + + case GDK_MAP: + case GDK_UNMAP: + break; + + case GDK_PROPERTY_NOTIFY: + add_property_zval(result, "atom", php_gdk_atom_new(event->property.atom)); + add_property_long(result, "time", event->property.time); + add_property_long(result, "state", event->property.state); + break; + + case GDK_SELECTION_CLEAR: + case GDK_SELECTION_REQUEST: + case GDK_SELECTION_NOTIFY: + add_property_zval(result, "selection", php_gdk_atom_new(event->selection.selection)); + add_property_zval(result, "target", php_gdk_atom_new(event->selection.target)); + add_property_zval(result, "property", php_gdk_atom_new(event->selection.property)); + add_property_long(result, "requestor", event->selection.requestor); + add_property_long(result, "time", event->selection.time); + break; + + case GDK_PROXIMITY_IN: + case GDK_PROXIMITY_OUT: + add_property_long(result, "time", event->proximity.time); + add_property_long(result, "source", event->proximity.source); + add_property_long(result, "deviceid", event->proximity.deviceid); + break; + + case GDK_DRAG_ENTER: + case GDK_DRAG_LEAVE: + case GDK_DRAG_MOTION: + case GDK_DRAG_STATUS: + case GDK_DROP_START: + case GDK_DROP_FINISHED: + add_property_zval(result, "context", php_gdk_drag_context_new(event->dnd.context)); + add_property_long(result, "time", event->dnd.time); + add_property_long(result, "x_root", event->dnd.x_root); + add_property_long(result, "y_root", event->dnd.y_root); + break; + + case GDK_CLIENT_EVENT: + add_property_zval(result, "message_type", php_gdk_atom_new(event->client.message_type)); + add_property_long(result, "data_format", event->client.data_format); + add_property_stringl(result, "data", event->client.data.b, 20, 1); + break; + + case GDK_VISIBILITY_NOTIFY: + add_property_long(result, "state", event->visibility.state); + break; + + case GDK_NO_EXPOSE: + break; + + default: + break; + } + + return result; +} + + +/* GdkWindow */ +PHP_FUNCTION(gdk_window_raise) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gdk_window_raise(PHP_GDK_WINDOW_GET(this_ptr)); + RETURN_NULL(); +} + +PHP_FUNCTION(gdk_window_lower) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gdk_window_lower(PHP_GDK_WINDOW_GET(this_ptr)); + RETURN_NULL(); +} + +PHP_FUNCTION(gdk_window_get_pointer) +{ + guint32 deviceid; + gdouble x = 0.0, y = 0.0, pressure = 0.0, xtilt = 0.0, ytilt = 0.0; + GdkModifierType mask = 0; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "i", &deviceid)) + return; + + gdk_input_window_get_pointer(PHP_GDK_WINDOW_GET(this_ptr), deviceid, &x, &y, &pressure, &xtilt, &ytilt, &mask); + *return_value = *php_gtk_build_value("(dddddi)", x, y, pressure, xtilt, ytilt, mask); +} + +PHP_FUNCTION(gdk_window_set_cursor) +{ + zval *cursor; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "O", &cursor, gdk_cursor_ce)) + return; + + gdk_window_set_cursor(PHP_GDK_WINDOW_GET(this_ptr), PHP_GDK_CURSOR_GET(cursor)); + RETURN_NULL(); +} + +PHP_FUNCTION(gdk_window_new_gc) +{ + zval *php_values = NULL; + zval **value; + char *key; + ulong key_len, num_key; + HashTable *hash; + GdkGCValues values; + GdkGCValuesMask mask = 0; + GdkGC *gc; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|a", &php_values)) + return; + + if (php_values) { + hash = HASH_OF(php_values); + zend_hash_internal_pointer_reset(hash); + while (zend_hash_get_current_data(hash, (void**)&value) == SUCCESS) { + if (zend_hash_get_current_key_ex(hash, &key, &key_len, &num_key, 0, NULL) == HASH_KEY_IS_STRING) { + if (!strncmp(key, "foreground", key_len)) { + GdkColor *c; + + if (!php_gtk_check_class(*value, gdk_color_ce)) { + php_error(E_WARNING, "foreground value has to be a GdkColor"); + return; + } + c = PHP_GDK_COLOR_GET(*value); + mask |= GDK_GC_FOREGROUND; + values.foreground.red = c->red; + values.foreground.green = c->green; + values.foreground.blue = c->blue; + values.foreground.pixel = c->pixel; + } else if (!strncmp(key, "background", key_len)) { + GdkColor *c; + + if (!php_gtk_check_class(*value, gdk_color_ce)) { + php_error(E_WARNING, "background value has to be a GdkColor"); + return; + } + c = PHP_GDK_COLOR_GET(*value); + mask |= GDK_GC_BACKGROUND; + values.background.red = c->red; + values.background.green = c->green; + values.background.blue = c->blue; + values.background.pixel = c->pixel; + } else if (!strncmp(key, "font", key_len)) { + if (!php_gtk_check_class(*value, gdk_font_ce)) { + php_error(E_WARNING, "font value has to be a GdkFont"); + return; + } + mask |= GDK_GC_FONT; + values.font = PHP_GDK_FONT_GET(*value); + } else if (!strncmp(key, "tile", key_len)) { + if (!php_gtk_check_class(*value, gdk_window_ce)) { + php_error(E_WARNING, "tile value has to be a GdkPixmap"); + return; + } + mask |= GDK_GC_TILE; + values.tile = PHP_GDK_WINDOW_GET(*value); + } else if (!strncmp(key, "stipple", key_len)) { + if (!php_gtk_check_class(*value, gdk_window_ce)) { + php_error(E_WARNING, "stipple value has to be a GdkPixmap"); + return; + } + mask |= GDK_GC_STIPPLE; + values.stipple = PHP_GDK_WINDOW_GET(*value); + } else if (!strncmp(key, "clip_mask", key_len)) { + if (!php_gtk_check_class(*value, gdk_window_ce)) { + php_error(E_WARNING, "clip_mask value has to be a GdkPixmap"); + return; + } + mask |= GDK_GC_CLIP_MASK; + values.clip_mask = PHP_GDK_WINDOW_GET(*value); + } + } + zend_hash_move_forward(hash); + } + } + + gc = gdk_gc_new_with_values(PHP_GDK_WINDOW_GET(this_ptr), &values, mask); + *return_value = *php_gdk_gc_new(gc); + gdk_gc_unref(gc); +} + +PHP_FUNCTION(gdk_window_property_get) +{ + GdkAtom property, type = 0; + gint delete = FALSE; + GdkAtom atype; + gint aformat, alength; + guchar *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "O|Oi", &property, gdk_atom_ce, &type, gdk_atom_ce, &delete)) { + gchar *prop_name; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s|Oi", &prop_name, &type, gdk_atom_ce, &delete)) + return; + + property = gdk_atom_intern(prop_name, FALSE); + } + + if (gdk_property_get(PHP_GDK_WINDOW_GET(this_ptr), property, type, 0, 9999, delete, + &atype, &aformat, &alength, &data)) { + zval *php_data; + int i; + guint16 *data16; + guint32 *data32; + + MAKE_STD_ZVAL(php_data); + + switch (aformat) { + case 8: + ZVAL_STRINGL(php_data, data, alength, 1); + break; + + case 16: + data16 = (guint16 *)data; + array_init(php_data); + for (i = 0; i < alength; i++) + add_next_index_long(php_data, data16[i]); + break; + + case 32: + data32 = (guint32 *)data; + array_init(php_data); + for (i = 0; i < alength; i++) + add_next_index_long(php_data, data32[i]); + break; + + default: + php_error(E_WARNING, "%s() got property format != 8, 16, or 32", + get_active_function_name()); + break; + } + g_free(data); + *return_value = *php_gtk_build_value("(NiN)", php_gdk_atom_new(atype), aformat, php_data); + } +} + +PHP_FUNCTION(gdk_window_property_change) +{ + GdkAtom property, type; + gint format; + zval *php_mode, *php_data; + GdkPropMode mode; + guchar *data = NULL; + gint n_elements; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "OOiVV", &property, gdk_atom_ce, + &type, gdk_atom_ce, &format, &php_mode, &php_data)) { + gchar *prop_name; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "sOiVV/", &prop_name, &type, + gdk_atom_ce, &format, &php_mode, &php_data)) + return; + + property = gdk_atom_intern(prop_name, FALSE); + } + + if (!php_gtk_get_enum_value(GTK_TYPE_GDK_PROP_MODE, php_mode, (gint *)&mode)) + return; + + switch (format) { + case 8: + if (Z_TYPE_P(php_data) != IS_STRING) { + php_error(E_WARNING, "%s() expects data to be a string for format=8", get_active_function_name()); + return; + } + data = Z_STRVAL_P(php_data); + n_elements = Z_STRLEN_P(php_data); + break; + + case 16: + { + guint16 *data16; + zval **data_temp; + int i; + + if (Z_TYPE_P(php_data) != IS_ARRAY) { + php_error(E_WARNING, "%s() expects data to be an array for format=16", get_active_function_name()); + return; + } + n_elements = zend_hash_num_elements(Z_ARRVAL_P(php_data)); + data16 = g_new(guint16, n_elements); + i = 0; + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_data)); + zend_hash_get_current_data(Z_ARRVAL_P(php_data), (void **)&data_temp); + zend_hash_move_forward(Z_ARRVAL_P(php_data))) { + convert_to_long_ex(data_temp); + data16[i++] = Z_LVAL_PP(data_temp); + } + } + break; + + case 32: + { + guint32 *data32; + zval **data_temp; + int i; + + if (Z_TYPE_P(php_data) != IS_ARRAY) { + php_error(E_WARNING, "%s() expects data to be an array for format=32", get_active_function_name()); + return; + } + n_elements = zend_hash_num_elements(Z_ARRVAL_P(php_data)); + data32 = g_new(guint32, n_elements); + i = 0; + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(php_data)); + zend_hash_get_current_data(Z_ARRVAL_P(php_data), (void **)&data_temp); + zend_hash_move_forward(Z_ARRVAL_P(php_data))) { + convert_to_long_ex(data_temp); + data32[i++] = Z_LVAL_PP(data_temp); + } + } + break; + + default: + php_error(E_WARNING, "%s() expects format to be 8, 16, or 32", get_active_function_name()); + break; + } + + gdk_property_change(PHP_GDK_WINDOW_GET(this_ptr), property, type, format, + mode, data, n_elements); + if (format != 8) + g_free(data); +} + +PHP_FUNCTION(gdk_window_property_delete) +{ + GdkAtom property; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "O", &property, gdk_atom_ce)) { + gchar *prop_name; + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "s", &prop_name)) + return; + + property = gdk_atom_intern(prop_name, FALSE); + } + + gdk_property_delete(PHP_GDK_WINDOW_GET(this_ptr), property); +} + +static function_entry php_gdk_window_functions[] = { + {"gdkwindow", PHP_FN(wrap_no_direct_constructor), NULL}, + {"raise", PHP_FN(gdk_window_raise), NULL}, + {"lower", PHP_FN(gdk_window_lower), NULL}, + {"get_pointer", PHP_FN(gdk_window_get_pointer), NULL}, + {"set_cursor", PHP_FN(gdk_window_set_cursor), NULL}, + {"new_gc", PHP_FN(gdk_window_new_gc), NULL}, + {"property_get", PHP_FN(gdk_window_property_get), NULL}, + {"property_change", PHP_FN(gdk_window_property_change), NULL}, + {"property_delete", PHP_FN(gdk_window_property_delete), NULL}, + {NULL, NULL, NULL} +}; + +static function_entry php_gdk_pixmap_functions[] = { + {"gdkpixmap", PHP_FN(wrap_no_direct_constructor), NULL}, + {"new_gc", PHP_FN(gdk_window_new_gc), NULL}, + {"property_get", PHP_FN(gdk_window_property_get), NULL}, + {"property_change", PHP_FN(gdk_window_property_change), NULL}, + {"property_delete", PHP_FN(gdk_window_property_delete), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_window_new(GdkWindow *window) +{ + zval *result; + zval **wrapper_ptr; + + if (!window) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)window, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_window_ce); + + gdk_window_ref(window); + php_gtk_set_object(result, window, le_gdk_window); + + return result; +} + +zval *php_gdk_pixmap_new(GdkPixmap *pixmap) +{ + zval *result; + zval **wrapper_ptr; + + if (!pixmap) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)pixmap, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_pixmap_ce); + + gdk_pixmap_ref(pixmap); + php_gtk_set_object(result, pixmap, le_gdk_window); + + return result; +} + +zval *php_gdk_bitmap_new(GdkWindow *bitmap) +{ + zval *result; + zval **wrapper_ptr; + + if (!bitmap) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)bitmap, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_bitmap_ce); + + gdk_bitmap_ref(bitmap); + php_gtk_set_object(result, bitmap, le_gdk_bitmap); + + return result; +} + +static void gdk_window_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + zval *value; + GdkWindow *win = PHP_GDK_WINDOW_GET(object); + gint x, y; + GdkModifierType p_mask; + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "width")) { + gdk_window_get_size(win, &x, NULL); + RETURN_LONG(x); + } else if (!strcmp(prop_name, "height")) { + gdk_window_get_size(win, NULL, &y); + RETURN_LONG(y); + } else if (!strcmp(prop_name, "x")) { + gdk_window_get_position(win, &x, NULL); + RETURN_LONG(x); + } else if (!strcmp(prop_name, "y")) { + gdk_window_get_position(win, NULL, &y); + RETURN_LONG(y); + } else if (!strcmp(prop_name, "colormap")) { + *return_value = *php_gdk_colormap_new(gdk_window_get_colormap(win)); + return; + } else if (!strcmp(prop_name, "pointer")) { + gdk_window_get_pointer(win, &x, &y, NULL); + *return_value = *php_gtk_build_value("(ii)", x, y); + return; + } else if (!strcmp(prop_name, "pointer_state")) { + gdk_window_get_pointer(win, NULL, NULL, &p_mask); + RETURN_LONG(p_mask); + } else if (!strcmp(prop_name, "parent")) { + GdkWindow *parent = gdk_window_get_parent(win); + if (parent) + *return_value = *php_gdk_window_new(parent); + return; + } else if (!strcmp(prop_name, "toplevel")) { + *return_value = *php_gdk_window_new(gdk_window_get_toplevel(win)); + return; + } else if (!strcmp(prop_name, "children")) { + GList *children, *tmp; + zval *child; + children = gdk_window_get_children(win); + array_init(return_value); + for (tmp = children; tmp; tmp = tmp->next) { + child = php_gdk_window_new(tmp->data); + zend_hash_next_index_insert(Z_ARRVAL_P(return_value), &child, sizeof(zval *), NULL); + } + g_list_free(children); + return; + } else if (!strcmp(prop_name, "type")) { + RETURN_LONG(gdk_window_get_type(win)); + } else if (!strcmp(prop_name, "depth")) { + gdk_window_get_geometry(win, NULL, NULL, NULL, NULL, &x); + RETURN_LONG(x); + } +#ifndef PHP_WIN32 + else if (!strcmp(prop_name, "xid")) { + RETURN_LONG(GDK_WINDOW_XWINDOW(win)); + } +#endif + + *result = FAILURE; +} + + +static void release_gdk_window_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkWindow *obj = (GdkWindow *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + if (gdk_window_get_type(obj) == GDK_WINDOW_PIXMAP) + gdk_pixmap_unref(obj); + else + gdk_window_unref(obj); +} + +static void release_gdk_bitmap_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkBitmap *obj = (GdkBitmap *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_bitmap_unref(obj); +} + +/* GdkColor */ +PHP_FUNCTION(gdkcolor) +{ + char *color_spec; + GdkColor color; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "hhh", &color.red, &color.green, &color.blue)) { + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "s", &color_spec)) { + php_error(E_WARNING, "%s() requires a color spec or RGB triplet", get_active_function_name()); + php_gtk_invalidate(this_ptr); + return; + } else if (!gdk_color_parse(color_spec, &color)) { + php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(), color_spec); + php_gtk_invalidate(this_ptr); + return; + } + } + + php_gtk_set_object(this_ptr, gdk_color_copy(&color), le_gdk_color); +} + +static function_entry php_gdk_color_functions[] = { + {"gdkcolor", PHP_FN(gdkcolor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_color_new(GdkColor *color) +{ + zval *result; + GdkColor *result_obj; + + MAKE_STD_ZVAL(result); + + if (!color) { + ZVAL_NULL(result); + return result; + } + + object_init_ex(result, gdk_color_ce); + + result_obj = gdk_color_copy(color); + php_gtk_set_object(result, result_obj, le_gdk_color); + + return result; +} + +static void gdk_color_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkColor *color = PHP_GDK_COLOR_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "red")) { + RETURN_LONG(color->red); + } else if (!strcmp(prop_name, "green")) { + RETURN_LONG(color->green); + } else if (!strcmp(prop_name, "blue")) { + RETURN_LONG(color->blue); + } else if (!strcmp(prop_name, "pixel")) { + RETURN_LONG(color->pixel); + } + + *result = FAILURE; +} + +static int gdk_color_set_property(zval *object, zend_llist_element **element, zval *value) +{ + GdkColor *color = PHP_GDK_COLOR_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + convert_to_long(value); + if (!strcmp(prop_name, "red")) { + color->red = (gushort)Z_LVAL_P(value); + } else if (!strcmp(prop_name, "green")) { + color->green = (gushort)Z_LVAL_P(value); + } else if (!strcmp(prop_name, "blue")) { + color->blue = (gushort)Z_LVAL_P(value); + } else { + return FAILURE; + } + + return SUCCESS; +} + +static void release_gdk_color_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkColor *obj = (GdkColor *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_color_free(obj); +} + + +/* GdkColormap */ +PHP_FUNCTION(gdk_colormap_size) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + ZVAL_LONG(return_value, PHP_GDK_COLORMAP_GET(this_ptr)->size); +} + +PHP_FUNCTION(gdk_colormap_alloc) +{ + gchar *color_spec; + GdkColor color = {0, 0, 0, 0}; + zend_bool writeable = 0, best_match = 1; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "hhh|bb", &color.red, &color.green, &color.blue, &writeable, &best_match)) { + if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "s|bb", &color_spec, &writeable, &best_match)) { + php_error(E_WARNING, "%s() requires a color spec or RGB triplet", get_active_function_name()); + return; + } else if (!gdk_color_parse(color_spec, &color)) { + php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(), color_spec); + return; + } + } + + if (!gdk_colormap_alloc_color(PHP_GDK_COLORMAP_GET(this_ptr), &color, writeable, best_match)) { + php_error(E_WARNING, "%s() could not allocate color"); + return; + } + + *return_value = *php_gdk_color_new(&color); +} + +static function_entry php_gdk_colormap_functions[] = { + {"gdkcolormap", PHP_FN(wrap_no_direct_constructor), NULL}, + {"size", PHP_FN(gdk_colormap_size), NULL}, + {"alloc", PHP_FN(gdk_colormap_alloc), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_colormap_new(GdkColormap *cmap) +{ + zval *result; + zval **wrapper_ptr; + + if (!cmap) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)cmap, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_colormap_ce); + + gdk_colormap_ref(cmap); + php_gtk_set_object(result, cmap, le_gdk_colormap); + + return result; +} + +static void release_gdk_colormap_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkColormap *obj = (GdkColormap *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_colormap_unref(obj); +} + +static void gdk_colormap_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkColormap *cmap = PHP_GDK_COLORMAP_GET(object); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + zend_llist_element *next; + char *prop_name = Z_STRVAL(property->element); + int prop_index, i; + + *result = SUCCESS; + + if (!strcmp(prop_name, "colors") && cmap->colors) { + next = (*element)->next; + if (next) { + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + if (prop_index < 0 || prop_index >= cmap->size) { + php_error(E_WARNING, "colormap index out of range"); + return; + } + *return_value = *php_gdk_color_new(&cmap->colors[prop_index]); + } + } else { + array_init(return_value); + + for (i = 0; i < cmap->size; i++) + add_next_index_zval(return_value, php_gdk_color_new(&cmap->colors[i])); + } + + return; + } + + *result = FAILURE; +} + + +/* GdkAtom */ +/* TODO maybe change this to have a real constructor */ +static function_entry php_gdk_atom_functions[] = { + {"gdkatom", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +inline GdkAtom php_gdk_atom_get(zval *wrapper) +{ + zval **atom; + + zend_hash_find(Z_OBJPROP_P(wrapper), "atom", sizeof("atom"), (void**)&atom); + return (GdkAtom)Z_LVAL_PP(atom); +} + +zval *php_gdk_atom_new(GdkAtom atom) +{ + zval *result; + gchar *atom_name; + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_atom_ce); + add_property_long_ex(result, "atom", sizeof("atom"), atom); + atom_name = gdk_atom_name(atom); + if (atom_name) + add_property_string_ex(result, "string", sizeof("string"), atom_name, 0); + else + add_property_null_ex(result, "string", sizeof("string")); + + return result; +} + +/* GdkCursor */ +static function_entry php_gdk_cursor_functions[] = { + {"gdkcursor", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_cursor_new(GdkCursor *cursor) +{ + zval *result; + zval **wrapper_ptr; + + if (!cursor) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)cursor, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_cursor_ce); + php_gtk_set_object(result, cursor, le_gdk_cursor); + + return result; +} + +static void release_gdk_cursor_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkCursor *obj = (GdkCursor *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_cursor_destroy(obj); +} + +static void gdk_cursor_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkCursor *cursor = PHP_GDK_CURSOR_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "type")) { + RETURN_LONG(cursor->type); + } else if (!strcmp(prop_name, "name")) { + GtkEnumValue *vals = gtk_type_enum_get_values(GTK_TYPE_GDK_CURSOR_TYPE); + while (vals->value_name != NULL && vals->value != (unsigned)cursor->type) + vals++; + if (vals->value_nick) { + RETURN_STRING(vals->value_nick, 1); + } else { + RETURN_STRINGL("*unknown*", sizeof("*unknown*"), 1); + } + } + + *result = FAILURE; +} + + +/* GdkVisual */ +static function_entry php_gdk_visual_functions[] = { + {"gdkvisual", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_visual_new(GdkVisual *visual) +{ + zval *result; + zval **wrapper_ptr; + + if (!visual) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)visual, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_visual_ce); + gdk_visual_ref(visual); + php_gtk_set_object(result, visual, le_gdk_visual); + + return result; +} + +static void release_gdk_visual_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkVisual *obj = (GdkVisual *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_visual_unref(obj); +} + +static void gdk_visual_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkVisual *visual = PHP_GDK_VISUAL_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "type")) { + RETURN_LONG(visual->type); + } else if (!strcmp(prop_name, "depth")) { + RETURN_LONG(visual->depth); + } else if (!strcmp(prop_name, "byte_order")) { + RETURN_LONG(visual->byte_order); + } else if (!strcmp(prop_name, "colormap_size")) { + RETURN_LONG(visual->colormap_size); + } else if (!strcmp(prop_name, "bits_per_rgb")) { + RETURN_LONG(visual->bits_per_rgb); + } else if (!strcmp(prop_name, "red_mask")) { + RETURN_LONG(visual->red_shift); + } else if (!strcmp(prop_name, "red_shift")) { + RETURN_LONG(visual->red_prec); + } else if (!strcmp(prop_name, "red_prec")) { + RETURN_LONG(visual->red_mask); + } else if (!strcmp(prop_name, "green_mask")) { + RETURN_LONG(visual->green_mask); + } else if (!strcmp(prop_name, "green_shift")) { + RETURN_LONG(visual->green_shift); + } else if (!strcmp(prop_name, "green_prec")) { + RETURN_LONG(visual->green_prec); + } else if (!strcmp(prop_name, "blue_mask")) { + RETURN_LONG(visual->blue_mask); + } else if (!strcmp(prop_name, "blue_shift")) { + RETURN_LONG(visual->blue_shift); + } else if (!strcmp(prop_name, "blue_prec")) { + RETURN_LONG(visual->blue_prec); + } + + *result = FAILURE; +} + + +/* GdkFont */ +PHP_FUNCTION(gdk_font_width) +{ + char *text; + int length; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#", &text, &length)) + return; + + RETURN_LONG(gdk_text_width(PHP_GDK_FONT_GET(this_ptr), text, length)); +} + +PHP_FUNCTION(gdk_font_height) +{ + char *text; + int length; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#", &text, &length)) + return; + + RETURN_LONG(gdk_text_height(PHP_GDK_FONT_GET(this_ptr), text, length)); +} + +PHP_FUNCTION(gdk_font_measure) +{ + char *text; + int length; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#", &text, &length)) + return; + + RETURN_LONG(gdk_text_measure(PHP_GDK_FONT_GET(this_ptr), text, length)); +} + +PHP_FUNCTION(gdk_font_extents) +{ + char *text; + int length, lbearing, rbearing, width, ascent, descent; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s#", &text, &length)) + return; + + gdk_text_extents(PHP_GDK_FONT_GET(this_ptr), text, length, &lbearing, &rbearing, &width, &ascent, &descent); + *return_value = *php_gtk_build_value("(iiiii)", lbearing, rbearing, width, ascent, descent); +} + +static function_entry php_gdk_font_functions[] = { + {"gdkfont", PHP_FN(wrap_no_direct_constructor), NULL}, + {"width", PHP_FN(gdk_font_width), NULL}, + {"height", PHP_FN(gdk_font_height), NULL}, + {"measure", PHP_FN(gdk_font_measure), NULL}, + {"extents", PHP_FN(gdk_font_extents), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_font_new(GdkFont *font) +{ + zval *result; + zval **wrapper_ptr; + + if (!font) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)font, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_font_ce); + gdk_font_ref(font); + php_gtk_set_object(result, font, le_gdk_font); + + return result; +} + +static void release_gdk_font_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkFont *obj = (GdkFont *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_font_unref(obj); +} + +static void gdk_font_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkFont *font = PHP_GDK_FONT_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "type")) { + RETURN_LONG(font->type); + } else if (!strcmp(prop_name, "ascent")) { + RETURN_LONG(font->ascent); + } else if (!strcmp(prop_name, "descent")) { + RETURN_LONG(font->descent); + } + + *result = FAILURE; +} + + +/* GdkGC */ +PHP_FUNCTION(gdk_gc_set_dashes) +{ + gint dash_offset, length, i = 0; + zval *php_list, **temp; + guchar *dash_list; + HashTable *hash; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "ia", &dash_offset, &php_list)) + return; + + hash = HASH_OF(php_list); + length = zend_hash_num_elements(hash); + dash_list = g_new(char, length); + zend_hash_internal_pointer_reset(hash); + while (zend_hash_get_current_data(hash, (void**)&temp) == SUCCESS) { + if (Z_TYPE_PP(temp) != IS_LONG) { + php_error(E_WARNING, "%s() expects array elements to be integers", + get_active_function_name()); + g_free(dash_list); + return; + } + dash_list[i] = (guchar)Z_LVAL_PP(temp); + if (dash_list[i] == 0) { + php_error(E_WARNING, "%s() expects array elements to be non-zero", + get_active_function_name()); + g_free(dash_list); + return; + } + zend_hash_move_forward(hash); + } + + gdk_gc_set_dashes(PHP_GDK_GC_GET(this_ptr), dash_offset, dash_list, length); + g_free(dash_list); + RETURN_NULL(); +} + +static function_entry php_gdk_gc_functions[] = { + {"gdkgc", PHP_FN(wrap_no_direct_constructor), NULL}, + {"set_dashes", PHP_FN(gdk_gc_set_dashes), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_gc_new(GdkGC *gc) +{ + zval *result; + zval **wrapper_ptr; + + if (!gc) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)gc, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_gc_ce); + gdk_gc_ref(gc); + php_gtk_set_object(result, gc, le_gdk_gc); + + return result; +} + +static void release_gdk_gc_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkGC *obj = (GdkGC *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_gc_unref(obj); +} + + +static void gdk_colormap_query_color (GdkColormap *colormap, gulong pixel, GdkColor *result) +{ +#ifndef PHP_WIN32 + XColor xcolor; +#endif + GdkVisual *visual; + + visual = gdk_colormap_get_visual (colormap); + + switch (visual->type) { + case GDK_VISUAL_DIRECT_COLOR: + case GDK_VISUAL_TRUE_COLOR: + result->red = 65535. * (double)((pixel & visual->red_mask) >> + visual->red_shift) / ((1 << visual->red_prec) - 1); + result->green = 65535. * (double)((pixel & visual->green_mask) >> + visual->green_shift) / ((1 << visual->green_prec) - 1); + result->blue = 65535. * (double)((pixel & visual->blue_mask) >> + visual->blue_shift) / ((1 << visual->blue_prec) - 1); + break; + case GDK_VISUAL_STATIC_GRAY: + case GDK_VISUAL_GRAYSCALE: + result->red = result->green = result->blue = 65535. * + (double)pixel/((1<<visual->depth) - 1); + break; + case GDK_VISUAL_STATIC_COLOR: +#ifdef PHP_WIN32 + g_assert_not_reached (); +#else + xcolor.pixel = pixel; + XQueryColor(GDK_DISPLAY(), GDK_COLORMAP_XCOLORMAP(colormap), &xcolor); + result->red = xcolor.red; + result->green = xcolor.green; + result->blue = xcolor.blue; +#endif + break; + case GDK_VISUAL_PSEUDO_COLOR: + result->red = colormap->colors[pixel].red; + result->green = colormap->colors[pixel].green; + result->blue = colormap->colors[pixel].blue; + break; + default: + g_assert_not_reached (); + break; + } +} + +static void gdk_gc_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkGC *gc = PHP_GDK_GC_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + GdkGCValues gcv; + + *result = SUCCESS; + + gdk_gc_get_values(gc, &gcv); + + if (!strcmp(prop_name, "foreground")) { + *return_value = *php_gdk_color_new(&gcv.foreground); + return; + } else if (!strcmp(prop_name, "background")) { + *return_value = *php_gdk_color_new(&gcv.background); + return; + } else if (!strcmp(prop_name, "font")) { + *return_value = *php_gdk_font_new(gcv.font); + return; + } else if (!strcmp(prop_name, "function")) { + RETURN_LONG(gcv.function); + } else if (!strcmp(prop_name, "fill")) { + RETURN_LONG(gcv.fill); + } else if (!strcmp(prop_name, "tile")) { + if (gcv.tile) + *return_value = *php_gdk_pixmap_new(gcv.tile); + return; + } else if (!strcmp(prop_name, "stipple")) { + if (gcv.stipple) + *return_value = *php_gdk_pixmap_new(gcv.stipple); + return; + } else if (!strcmp(prop_name, "clip_mask")) { + if (gcv.clip_mask) + *return_value = *php_gdk_pixmap_new(gcv.clip_mask); + return; + } else if (!strcmp(prop_name, "subwindow_mode")) { + RETURN_LONG(gcv.subwindow_mode); + } else if (!strcmp(prop_name, "ts_x_origin")) { + RETURN_LONG(gcv.ts_x_origin); + } else if (!strcmp(prop_name, "ts_y_origin")) { + RETURN_LONG(gcv.ts_y_origin); + } else if (!strcmp(prop_name, "clip_x_origin")) { + RETURN_LONG(gcv.clip_x_origin); + } else if (!strcmp(prop_name, "clip_y_origin")) { + RETURN_LONG(gcv.clip_y_origin); + } else if (!strcmp(prop_name, "graphics_exposures")) { + RETURN_LONG(gcv.graphics_exposures); + } else if (!strcmp(prop_name, "line_width")) { + RETURN_LONG(gcv.line_width); + } else if (!strcmp(prop_name, "line_style")) { + RETURN_LONG(gcv.line_style); + } else if (!strcmp(prop_name, "cap_style")) { + RETURN_LONG(gcv.cap_style); + } else if (!strcmp(prop_name, "join_style")) { + RETURN_LONG(gcv.join_style); + } + + *result = FAILURE; +} + +static int gdk_gc_set_property(zval *object, zend_llist_element **element, zval *value) +{ + GdkGC *gc = PHP_GDK_GC_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + zend_bool type_mismatch = 0; + int i; + static char *props[] = { + "function", "fill", "subwindow_mode", "ts_x_origin", "ts_y_origin", + "clip_x_origin", "clip_y_origin", "graphics_exposures", "line_width", + "line_style", "cap_style", "join_style", "foreground", "background", + "font", "tile", "stipple", "clip_mask" }; + + for (i = 0; i < sizeof(props)/sizeof(char *); i++) { + if (!strcmp(prop_name, props[i])) + break; + } + if (i == sizeof(props)/sizeof(char *)) + return FAILURE; + + if (Z_TYPE_P(value) == IS_LONG) { + int iv = Z_LVAL_P(value); + GdkGCValues v; + + gdk_gc_get_values(gc, &v); + if (!strcmp(prop_name, "function")) + gdk_gc_set_function(gc, iv); + else if (!strcmp(prop_name, "fill")) + gdk_gc_set_fill(gc, iv); + else if (!strcmp(prop_name, "subwindow_mode")) + gdk_gc_set_subwindow(gc, iv); + else if (!strcmp(prop_name, "ts_x_origin")) + gdk_gc_set_ts_origin(gc, iv, v.ts_y_origin); + else if (!strcmp(prop_name, "ts_y_origin")) + gdk_gc_set_ts_origin(gc, v.ts_x_origin, iv); + else if (!strcmp(prop_name, "clip_x_origin")) + gdk_gc_set_clip_origin(gc, iv, v.clip_y_origin); + else if (!strcmp(prop_name, "clip_y_origin")) + gdk_gc_set_clip_origin(gc, v.clip_x_origin, iv); + else if (!strcmp(prop_name, "graphics_exposures")) + gdk_gc_set_exposures(gc, iv); + else if (!strcmp(prop_name, "line_width")) + gdk_gc_set_line_attributes(gc, iv, v.line_style, v.cap_style, v.join_style); + else if (!strcmp(prop_name, "line_style")) + gdk_gc_set_line_attributes(gc, v.line_width, iv, v.cap_style, v.join_style); + else if (!strcmp(prop_name, "cap_style")) + gdk_gc_set_line_attributes(gc, v.line_width, v.line_style, iv, v.join_style); + else if (!strcmp(prop_name, "join_style")) + gdk_gc_set_line_attributes(gc, v.line_width, v.line_style, v.cap_style, iv); + else + type_mismatch = 1; + } else if (php_gtk_check_class(value, gdk_color_ce)) { + GdkColor *c = PHP_GDK_COLOR_GET(value); + + if (!strcmp(prop_name, "foreground")) + gdk_gc_set_foreground(gc, c); + else if (!strcmp(prop_name, "background")) + gdk_gc_set_background(gc, c); + else + type_mismatch = 1; + } else if (php_gtk_check_class(value, gdk_font_ce)) { + if (!strcmp(prop_name, "font")) + gdk_gc_set_font(gc, PHP_GDK_FONT_GET(value)); + else + type_mismatch = 1; + } else if (php_gtk_check_class(value, gdk_window_ce) || Z_TYPE_P(value) == IS_NULL) { + GdkWindow *w = (Z_TYPE_P(value) == IS_NULL) ? NULL : PHP_GDK_WINDOW_GET(value); + + if (!strcmp(prop_name, "tile")) + gdk_gc_set_tile(gc, w); + else if (!strcmp(prop_name, "stipple")) + gdk_gc_set_stipple(gc, w); + else if (!strcmp(prop_name, "clip_mask")) + gdk_gc_set_clip_mask(gc, w); + else + type_mismatch = 1; + } else + type_mismatch = 1; + + if (type_mismatch) { + php_error(E_WARNING, "Type mismatch trying to set property '%s'", prop_name); + return PG_ERROR; + } else + return SUCCESS; +} + + +/* GdkDragContext */ +static function_entry php_gdk_drag_context_functions[] = { + {"gdkdragcontext", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gdk_drag_context_new(GdkDragContext *context) +{ + zval *result; + zval **wrapper_ptr; + + if (!context) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)context, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gdk_drag_context_ce); + gdk_drag_context_ref(context); + php_gtk_set_object(result, context, le_gdk_drag_context); + + return result; +} + +static void release_gdk_drag_context_rsrc(zend_rsrc_list_entry *rsrc) +{ + GdkDragContext *obj = (GdkDragContext *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gdk_drag_context_unref(obj); +} + +static void gdk_drag_context_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GdkDragContext *context = PHP_GDK_DRAG_CONTEXT_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "protocol")) { + RETURN_LONG(context->protocol); + } else if (!strcmp(prop_name, "is_source")) { + RETURN_BOOL(context->is_source); + } else if (!strcmp(prop_name, "source_window")) { + if (context->source_window) + *return_value = *php_gdk_window_new(context->source_window); + return; + } else if (!strcmp(prop_name, "dest_window")) { + if (context->dest_window) + *return_value = *php_gdk_window_new(context->dest_window); + return; + } else if (!strcmp(prop_name, "targets")) { + GList *tmp; + + array_init(return_value); + for (tmp = context->targets; tmp; tmp = tmp->next) + add_next_index_zval(return_value, php_gdk_atom_new(GPOINTER_TO_INT(tmp->data))); + return; + } else if (!strcmp(prop_name, "actions")) { + RETURN_LONG(context->actions); + } else if (!strcmp(prop_name, "suggested_action")) { + RETURN_LONG(context->suggested_action); + } else if (!strcmp(prop_name, "action")) { + RETURN_LONG(context->action); + } else if (!strcmp(prop_name, "start_time")) { + RETURN_LONG(context->start_time); + } + + *result = FAILURE; +} + + +/* GtkSelectionData */ +PHP_FUNCTION(gtk_selection_data_set) +{ + GdkAtom type; + int format, length; + guchar *data; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "iis#", &type, &format, &data, &length)) + return; + + gtk_selection_data_set(PHP_GTK_SELECTION_DATA_GET(this_ptr), type, format, data, length); + RETURN_NULL(); +} + +static function_entry php_gtk_selection_data_functions[] = { + {"gdkselectiondata", PHP_FN(wrap_no_direct_constructor), NULL}, + {"set", PHP_FN(gtk_selection_data_set), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_selection_data_new(GtkSelectionData *data) +{ + zval *result; + zval **wrapper_ptr; + + if (!data) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)data, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_selection_data_ce); + php_gtk_set_object(result, data, le_php_gtk_wrapper); + + return result; +} + +static void gtk_selection_data_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkSelectionData *data = PHP_GTK_SELECTION_DATA_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "selection")) { + *return_value = *php_gdk_atom_new(data->selection); + return; + } else if (!strcmp(prop_name, "target")) { + *return_value = *php_gdk_atom_new(data->target); + return; + } else if (!strcmp(prop_name, "type")) { + *return_value = *php_gdk_atom_new(data->type); + return; + } else if (!strcmp(prop_name, "format")) { + RETURN_LONG(data->format); + } else if (!strcmp(prop_name, "length")) { + RETURN_LONG(data->length); + } else if (!strcmp(prop_name, "data") && data->length > -1) { + RETURN_STRINGL(data->data, data->length, 1); + } + + *result = FAILURE; +} + +/* GtkCtreeNode */ +static function_entry php_gtk_ctree_node_functions[] = { + {"gtkctreenode", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_ctree_node_new(GtkCTreeNode *node) +{ + zval *result; + zval **wrapper_ptr; + static zval *static_ptr = NULL; + + if (!node) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)node, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_ctree_node_ce); + php_gtk_set_object(result, node, le_php_gtk_wrapper); + if (static_ptr == NULL) { + static_ptr = result; + } + + return result; +} + +static void gtk_ctree_node_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkCTreeNode *node = PHP_GTK_CTREE_NODE_GET(object); + GtkCTreeNode *temp; + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "parent")) { + temp = GTK_CTREE_ROW(node)->parent; + if (temp) + *return_value = *php_gtk_ctree_node_new(temp); + return; + } else if (!strcmp(prop_name, "sibling")) { + temp = GTK_CTREE_ROW(node)->sibling; + if (temp) + *return_value = *php_gtk_ctree_node_new(temp); + return; + } else if (!strcmp(prop_name, "children")) { + zval *php_node; + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + temp = GTK_CTREE_ROW(node)->children; + + if (next) { + int i = 0; + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + while (temp) { + if (i == prop_index) { + *return_value = *php_gtk_ctree_node_new(temp); + return; + } + temp = GTK_CTREE_ROW(temp)->sibling; + i++; + } + } + } else { + array_init(return_value); + while (temp) { + php_node = php_gtk_ctree_node_new(temp); + add_next_index_zval(return_value, php_node); + temp = GTK_CTREE_ROW(temp)->sibling; + } + } + + return; + } else if (!strcmp(prop_name, "pixmap_closed")) { + GdkPixmap *pixmap = GTK_CTREE_ROW(node)->pixmap_closed; + if (pixmap) + *return_value = *php_gdk_pixmap_new(pixmap); + return; + } else if (!strcmp(prop_name, "pixmap_opened")) { + GdkPixmap *pixmap = GTK_CTREE_ROW(node)->pixmap_opened; + if (pixmap) + *return_value = *php_gdk_pixmap_new(pixmap); + return; + } else if (!strcmp(prop_name, "mask_closed")) { + GdkBitmap *mask = GTK_CTREE_ROW(node)->mask_closed; + if (mask) + *return_value = *php_gdk_bitmap_new(mask); + return; + } else if (!strcmp(prop_name, "mask_opened")) { + GdkBitmap *mask = GTK_CTREE_ROW(node)->mask_opened; + if (mask) + *return_value = *php_gdk_bitmap_new(mask); + return; + } else if (!strcmp(prop_name, "level")) { + RETURN_LONG(GTK_CTREE_ROW(node)->level); + } else if (!strcmp(prop_name, "is_leaf")) { + RETURN_BOOL(GTK_CTREE_ROW(node)->is_leaf); + } else if (!strcmp(prop_name, "expanded")) { + RETURN_BOOL(GTK_CTREE_ROW(node)->expanded); + } else if (!strcmp(prop_name, "row")) { + *return_value = *php_gtk_clist_row_new(>K_CTREE_ROW(node)->row); + return; + } + + *result = FAILURE; +} + + +/* GtkAccelGroup */ +PHP_FUNCTION(gtkaccelgroup) +{ + GtkAccelGroup *accel_group; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) { + php_gtk_invalidate(this_ptr); + return; + } + + accel_group = gtk_accel_group_new(); + php_gtk_set_object(this_ptr, accel_group, le_gtk_accel_group); +} + +PHP_FUNCTION(gtk_accel_group_lock) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gtk_accel_group_lock(PHP_GTK_ACCEL_GROUP_GET(this_ptr)); +} + +PHP_FUNCTION(gtk_accel_group_unlock) +{ + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + gtk_accel_group_unlock(PHP_GTK_ACCEL_GROUP_GET(this_ptr)); +} + +static function_entry php_gtk_accel_group_functions[] = { + {"gtkaccelgroup", PHP_FN(gtkaccelgroup), NULL}, + {"lock", PHP_FN(gtk_accel_group_lock), NULL}, + {"unlock", PHP_FN(gtk_accel_group_unlock), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_accel_group_new(GtkAccelGroup *group) +{ + zval *result; + zval **wrapper_ptr; + + if (!group) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)group, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_accel_group_ce); + gtk_accel_group_ref(group); + php_gtk_set_object(result, group, le_gtk_accel_group); + + return result; +} + +static void release_gtk_accel_group_rsrc(zend_rsrc_list_entry *rsrc) +{ + GtkAccelGroup *obj = (GtkAccelGroup *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gtk_accel_group_unref(obj); +} + + +/* GtkStyle */ +PHP_FUNCTION(gtkstyle) +{ + GtkStyle *ret; + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + ret = gtk_style_new(); + php_gtk_set_object(this_ptr, ret, le_gtk_style); +} + +PHP_FUNCTION(gtk_style_copy) +{ + GtkStyle *style; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")) + return; + + style = gtk_style_copy(PHP_GTK_STYLE_GET(this_ptr)); + *return_value = *php_gtk_style_new(style); + gtk_style_unref(style); +} + +static function_entry php_gtk_style_functions[] = { + {"gtkstyle", PHP_FN(gtkstyle), NULL}, + {"copy", PHP_FN(gtk_style_copy), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_style_new(GtkStyle *style) +{ + zval *result; + zval **wrapper_ptr; + + if (!style) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)style, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_style_ce); + gtk_style_ref(style); + php_gtk_set_object(result, style, le_gtk_style); + + return result; +} + +static void release_gtk_style_rsrc(zend_rsrc_list_entry *rsrc) +{ + GtkStyle *obj = (GtkStyle *)rsrc->ptr; + zval **wrapper_ptr; + + if (zend_hash_index_find(&php_gtk_type_hash, (long)obj, (void **)&wrapper_ptr) == SUCCESS) { + zval_ptr_dtor(wrapper_ptr); + } + + gtk_style_unref(obj); +} + +typedef enum { + STYLE_COLOR_ARRAY, + STYLE_GC_ARRAY, + STYLE_PIXMAP_ARRAY +} style_array_type; + +static void style_helper_get(zval *result, style_array_type type, gpointer array, zend_llist_element **element) +{ + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + int prop_index; + + if (next) { + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + if (prop_index < 0 || prop_index >= 5) { + php_error(E_WARNING, "style index out of range"); + return; + } + + switch (type) { + case STYLE_COLOR_ARRAY: + { + GdkColor *color_array = (GdkColor *)array; + *result = *php_gdk_color_new(&color_array[prop_index]); + } + return; + + case STYLE_GC_ARRAY: + { + GdkGC **gc_array = (GdkGC **)array; + *result = *php_gdk_gc_new(gc_array[prop_index]); + } + return; + + case STYLE_PIXMAP_ARRAY: + { + GdkWindow **pixmap_array = (GdkPixmap **)array; + if (pixmap_array[prop_index]) + *result = *php_gdk_pixmap_new(pixmap_array[prop_index]); + } + return; + + default: + g_assert_not_reached(); + break; + } + } + } else { + int i; + + array_init(result); + switch (type) { + case STYLE_COLOR_ARRAY: + { + GdkColor *color_array = (GdkColor *)array; + for (i = 0; i < 5; i++) + add_next_index_zval(result, php_gdk_color_new(&color_array[i])); + } + break; + + case STYLE_GC_ARRAY: + { + GdkGC **gc_array = (GdkGC **)array; + for (i = 0; i < 5; i++) + add_next_index_zval(result, php_gdk_gc_new(gc_array[i])); + } + break; + + case STYLE_PIXMAP_ARRAY: + { + GdkWindow **pixmap_array = (GdkWindow **)array; + for (i = 0; i < 5; i++) + add_next_index_zval(result, php_gdk_pixmap_new(pixmap_array[i])); + } + break; + + default: + g_assert_not_reached(); + break; + } + } +} + +static void gtk_style_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkStyle *style = PHP_GTK_STYLE_GET(object); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + char *prop_name = Z_STRVAL(property->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "black")) { + *return_value = *php_gdk_color_new(&style->black); + return; + } else if (!strcmp(prop_name, "white")) { + *return_value = *php_gdk_color_new(&style->white); + return; + } else if (!strcmp(prop_name, "font")) { + *return_value = *php_gdk_font_new(style->font); + return; + } else if (!strcmp(prop_name, "black_gc")) { + *return_value = *php_gdk_gc_new(style->black_gc); + return; + } else if (!strcmp(prop_name, "white_gc")) { + *return_value = *php_gdk_gc_new(style->white_gc); + return; + } else if (!strcmp(prop_name, "colormap")) { + if (style->colormap) + *return_value = *php_gdk_colormap_new(style->colormap); + return; + } else if (!strcmp(prop_name, "fg")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->fg, element); + return; + } else if (!strcmp(prop_name, "bg")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->bg, element); + return; + } else if (!strcmp(prop_name, "light")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->light, element); + return; + } else if (!strcmp(prop_name, "dark")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->dark, element); + return; + } else if (!strcmp(prop_name, "mid")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->mid, element); + return; + } else if (!strcmp(prop_name, "text")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->text, element); + return; + } else if (!strcmp(prop_name, "base")) { + style_helper_get(return_value, STYLE_COLOR_ARRAY, style->base, element); + return; + } else if (!strcmp(prop_name, "fg_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->fg_gc, element); + return; + } else if (!strcmp(prop_name, "bg_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->bg_gc, element); + return; + } else if (!strcmp(prop_name, "light_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->light_gc, element); + return; + } else if (!strcmp(prop_name, "dark_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->dark_gc, element); + return; + } else if (!strcmp(prop_name, "mid_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->mid_gc, element); + return; + } else if (!strcmp(prop_name, "text_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->text_gc, element); + return; + } else if (!strcmp(prop_name, "base_gc")) { + style_helper_get(return_value, STYLE_GC_ARRAY, style->base_gc, element); + return; + } else if (!strcmp(prop_name, "bg_pixmap")) { + style_helper_get(return_value, STYLE_PIXMAP_ARRAY, style->bg_pixmap, element); + return; + } + + *result = FAILURE; +} + +static int style_helper_set(style_array_type type, gpointer array, zval *value, zend_llist_element **element) +{ + zend_overloaded_element *property; + zend_llist_element *next = (*element)->next; + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + int prop_index; + + if (next) { + property = (zend_overloaded_element *)next->data; + if (Z_TYPE_P(property) == OE_IS_ARRAY && Z_TYPE(property->element) == IS_LONG) { + *element = next; + prop_index = Z_LVAL(property->element); + if (prop_index < 0 || prop_index >= 5) { + php_error(E_WARNING, "style index out of range"); + return PG_ERROR; + } + + switch (type) { + case STYLE_COLOR_ARRAY: + { + GdkColor *color_array = (GdkColor *)array; + if (!php_gtk_check_class(value, gdk_color_ce)) { + php_error(E_WARNING, "can only assign a GdkColor"); + return PG_ERROR; + } + color_array[prop_index] = *PHP_GDK_COLOR_GET(value); + } + break; + + case STYLE_GC_ARRAY: + { + GdkGC **gc_array = (GdkGC **)array; + if (!php_gtk_check_class(value, gdk_gc_ce)) { + php_error(E_WARNING, "can only assign a GdkGC"); + return PG_ERROR; + } + if (gc_array[prop_index]) + gdk_gc_unref(gc_array[prop_index]); + gc_array[prop_index] = gdk_gc_ref(PHP_GDK_GC_GET(value)); + } + break; + + case STYLE_PIXMAP_ARRAY: + { + GdkWindow **pixmap_array = (GdkWindow **)array; + if (!php_gtk_check_class(value, gdk_window_ce) && Z_TYPE_P(value) != IS_NULL) { + php_error(E_WARNING, "can only assign a GdkPixmap or null"); + return PG_ERROR; + } + if (pixmap_array[prop_index]) + gdk_pixmap_unref(pixmap_array[prop_index]); + if (Z_TYPE_P(value) != IS_NULL) + pixmap_array[prop_index] = gdk_pixmap_ref(PHP_GDK_WINDOW_GET(value)); + else + pixmap_array[prop_index] = NULL; + } + break; + + default: + g_assert_not_reached(); + break; + } + } else { + php_error(E_WARNING, "property '%s' cannot be indexed by strings", prop_name); + return PG_ERROR; + } + } else { + php_error(E_WARNING, "cannot assign directly to '%s'", prop_name); + return PG_ERROR; + } + + return SUCCESS; +} + +static int gtk_style_set_property(zval *object, zend_llist_element **element, zval *value) +{ + GtkStyle *style = PHP_GTK_STYLE_GET(object); + char *prop_name = Z_STRVAL(((zend_overloaded_element *)(*element)->data)->element); + + if (!strcmp(prop_name, "font")) { + if (php_gtk_check_class(value, gdk_font_ce)) { + if (style->font) + gdk_font_unref(style->font); + style->font = gdk_font_ref(PHP_GDK_FONT_GET(value)); + } else { + php_error(E_WARNING, "'%s' property should be a GdkFont", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "black")) { + if (php_gtk_check_class(value, gdk_color_ce)) + style->black = *PHP_GDK_COLOR_GET(value); + else { + php_error(E_WARNING, "'%s' property should be a GdkColor", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "white")) { + if (php_gtk_check_class(value, gdk_color_ce)) + style->white = *PHP_GDK_COLOR_GET(value); + else { + php_error(E_WARNING, "'%s' property should be a GdkColor", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "black_gc")) { + if (php_gtk_check_class(value, gdk_gc_ce)) { + if (style->black_gc) + gdk_gc_unref(style->black_gc); + style->black_gc = gdk_gc_ref(PHP_GDK_GC_GET(value)); + } else { + php_error(E_WARNING, "'%s' property should be a GdkGC", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "white_gc")) { + if (php_gtk_check_class(value, gdk_gc_ce)) { + if (style->white_gc) + gdk_gc_unref(style->white_gc); + style->white_gc = gdk_gc_ref(PHP_GDK_GC_GET(value)); + } else { + php_error(E_WARNING, "'%s' property should be a GdkGC", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "colormap")) { + if (php_gtk_check_class(value, gdk_colormap_ce)) { + if (style->colormap) + gdk_colormap_unref(style->colormap); + style->colormap = gdk_colormap_ref(PHP_GDK_COLORMAP_GET(value)); + } else { + php_error(E_WARNING, "'%s' property should be a GdkColormap", prop_name); + return PG_ERROR; + } + } else if (!strcmp(prop_name, "fg")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->fg, value, element); + } else if (!strcmp(prop_name, "bg")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->bg, value, element); + } else if (!strcmp(prop_name, "light")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->light, value, element); + } else if (!strcmp(prop_name, "dark")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->dark, value, element); + } else if (!strcmp(prop_name, "mid")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->mid, value, element); + } else if (!strcmp(prop_name, "text")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->text, value, element); + } else if (!strcmp(prop_name, "base")) { + return style_helper_set(STYLE_COLOR_ARRAY, style->base, value, element); + } else if (!strcmp(prop_name, "fg_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->fg_gc, value, element); + } else if (!strcmp(prop_name, "bg_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->bg_gc, value, element); + } else if (!strcmp(prop_name, "light_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->light_gc, value, element); + } else if (!strcmp(prop_name, "dark_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->dark_gc, value, element); + } else if (!strcmp(prop_name, "mid_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->mid_gc, value, element); + } else if (!strcmp(prop_name, "text_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->text_gc, value, element); + } else if (!strcmp(prop_name, "base_gc")) { + return style_helper_set(STYLE_GC_ARRAY, style->base_gc, value, element); + } else if (!strcmp(prop_name, "bg_pixmap")) { + return style_helper_set(STYLE_PIXMAP_ARRAY, style->bg_pixmap, value, element); + } else { + return FAILURE; + } + + return SUCCESS; +} + + +/* GtkBoxChild */ +static function_entry php_gtk_box_child_functions[] = { + {"gtkboxchild", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_box_child_new(GtkBoxChild *box_child) +{ + zval *result; + zval **wrapper_ptr; + + if (!box_child) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)box_child, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_box_child_ce); + php_gtk_set_object(result, box_child, le_php_gtk_wrapper); + + return result; +} + +static void gtk_box_child_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkBoxChild *box_child = PHP_GTK_GET_GENERIC(object, GtkBoxChild*, le_php_gtk_wrapper); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + char *prop_name = Z_STRVAL(property->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "widget")) { + *return_value = *php_gtk_new((GtkObject *)box_child->widget); + return; + } else if (!strcmp(prop_name, "padding")) { + RETURN_LONG(box_child->padding); + } else if (!strcmp(prop_name, "expand")) { + RETURN_BOOL(box_child->expand); + } else if (!strcmp(prop_name, "fill")) { + RETURN_BOOL(box_child->fill); + } else if (!strcmp(prop_name, "pack")) { + RETURN_BOOL(box_child->pack); + } + + *result = FAILURE; +} + + +/* GtkFixedChild */ +static function_entry php_gtk_fixed_child_functions[] = { + {"gtkfixedchild", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_fixed_child_new(GtkFixedChild *fixed_child) +{ + zval *result; + zval **wrapper_ptr; + + if (!fixed_child) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)fixed_child, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_fixed_child_ce); + php_gtk_set_object(result, fixed_child, le_php_gtk_wrapper); + + return result; +} + +static void gtk_fixed_child_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkFixedChild *fixed_child = PHP_GTK_GET_GENERIC(object, GtkFixedChild*, le_php_gtk_wrapper); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + char *prop_name = Z_STRVAL(property->element); + + *result = SUCCESS; + + if (!strcmp(prop_name, "widget")) { + *return_value = *php_gtk_new((GtkObject *)fixed_child->widget); + return; + } else if (!strcmp(prop_name, "x")) { + RETURN_LONG(fixed_child->x); + } else if (!strcmp(prop_name, "y")) { + RETURN_LONG(fixed_child->y); + } + + *result = FAILURE; +} + + +/* GtkCListRow */ +static function_entry php_gtk_clist_row_functions[] = { + {"gtkclistrow", PHP_FN(wrap_no_direct_constructor), NULL}, + {NULL, NULL, NULL} +}; + +zval *php_gtk_clist_row_new(GtkCListRow *clist_row) +{ + zval *result; + zval **wrapper_ptr; + + if (!clist_row) { + MAKE_STD_ZVAL(result); + ZVAL_NULL(result); + return result; + } + + if (zend_hash_index_find(&php_gtk_type_hash, (long)clist_row, (void **)&wrapper_ptr) == SUCCESS) { + zval_add_ref(wrapper_ptr); + return *wrapper_ptr; + } + + MAKE_STD_ZVAL(result); + object_init_ex(result, gtk_clist_row_ce); + php_gtk_set_object(result, clist_row, le_php_gtk_wrapper); + + return result; +} + +static void gtk_clist_row_get_property(zval *return_value, zval *object, zend_llist_element **element, int *result) +{ + GtkCListRow *clist_row = PHP_GTK_GET_GENERIC(object, GtkCListRow*, le_php_gtk_wrapper); + zend_overloaded_element *property = (zend_overloaded_element *)(*element)->data; + char *prop_name = Z_STRVAL(property->element); + + *result = SUCCESS; + + /* TODO add 'data' and 'cell' here */ + if (!strcmp(prop_name, "state")) { + RETURN_LONG(clist_row->state); + } else if (!strcmp(prop_name, "foreground")) { + *return_value = *php_gdk_color_new(&clist_row->foreground); + return; + } else if (!strcmp(prop_name, "background")) { + *return_value = *php_gdk_color_new(&clist_row->background); + return; + } else if (!strcmp(prop_name, "style")) { + *return_value = *php_gtk_style_new(clist_row->style); + return; + } else if (!strcmp(prop_name, "fg_set")) { + RETURN_BOOL(clist_row->fg_set); + } else if (!strcmp(prop_name, "bg_set")) { + RETURN_BOOL(clist_row->bg_set); + } else if (!strcmp(prop_name, "selectable")) { + RETURN_BOOL(clist_row->selectable); + } + + *result = FAILURE; +} + + +void php_gtk_plus_register_types(int module_number) +{ + zend_class_entry ce; + + le_php_gtk_wrapper = zend_register_list_destructors_ex(NULL, NULL, "Generic PHP-GTK wrapper", module_number); + le_gdk_window = zend_register_list_destructors_ex(release_gdk_window_rsrc, NULL, "GdkWindow", module_number); + le_gdk_bitmap = zend_register_list_destructors_ex(release_gdk_bitmap_rsrc, NULL, "GdkBitmap", module_number); + le_gdk_color = zend_register_list_destructors_ex(release_gdk_color_rsrc, NULL, "GdkColor", module_number); + le_gdk_colormap = zend_register_list_destructors_ex(release_gdk_colormap_rsrc, NULL, "GdkColormap", module_number); + le_gdk_cursor = zend_register_list_destructors_ex(release_gdk_cursor_rsrc, NULL, "GdkCursor", module_number); + le_gdk_visual = zend_register_list_destructors_ex(release_gdk_visual_rsrc, NULL, "GdkVisual", module_number); + le_gdk_font = zend_register_list_destructors_ex(release_gdk_font_rsrc, NULL, "GdkFont", module_number); + le_gdk_gc = zend_register_list_destructors_ex(release_gdk_gc_rsrc, NULL, "GdkGC", module_number); + le_gdk_drag_context = zend_register_list_destructors_ex(release_gdk_drag_context_rsrc, NULL, "GdkDragContext", module_number); + le_gtk_accel_group = zend_register_list_destructors_ex(release_gtk_accel_group_rsrc, NULL, "GtkAccelGroup", module_number); + le_gtk_style = zend_register_list_destructors_ex(release_gtk_style_rsrc, NULL, "GtkStyle", module_number); + + INIT_CLASS_ENTRY(ce, "gdkevent", php_gdk_event_functions); + gdk_event_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkwindow", php_gdk_window_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_window_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkpixmap", php_gdk_pixmap_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_pixmap_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkbitmap", php_gdk_window_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_bitmap_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_window_ce, gdk_window_get_property); + php_gtk_register_prop_getter(gdk_pixmap_ce, gdk_window_get_property); + php_gtk_register_prop_getter(gdk_bitmap_ce, gdk_window_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkcolor", php_gdk_color_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_color_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_color_ce, gdk_color_get_property); + php_gtk_register_prop_setter(gdk_color_ce, gdk_color_set_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkcolormap", php_gdk_colormap_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_colormap_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_colormap_ce, gdk_colormap_get_property); + + INIT_CLASS_ENTRY(ce, "gdkatom", php_gdk_atom_functions); + gdk_atom_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkcursor", php_gdk_cursor_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_cursor_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_cursor_ce, gdk_cursor_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkvisual", php_gdk_visual_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_visual_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_visual_ce, gdk_visual_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkfont", php_gdk_font_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_font_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_font_ce, gdk_font_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkgc", php_gdk_gc_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_gc_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_gc_ce, gdk_gc_get_property); + php_gtk_register_prop_setter(gdk_gc_ce, gdk_gc_set_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkdragcontext", php_gdk_drag_context_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gdk_drag_context_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gdk_drag_context_ce, gdk_drag_context_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkselectiondata", php_gtk_selection_data_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_selection_data_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_selection_data_ce, gtk_selection_data_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkctreenode", php_gtk_ctree_node_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_ctree_node_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_ctree_node_ce, gtk_ctree_node_get_property); + + INIT_CLASS_ENTRY(ce, "gtkaccelgroup", php_gtk_accel_group_functions); + gtk_accel_group_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkstyle", php_gtk_style_functions, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_style_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_style_ce, gtk_style_get_property); + php_gtk_register_prop_setter(gtk_style_ce, gtk_style_set_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkboxchild", NULL, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_box_child_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_box_child_ce, gtk_box_child_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkfixedchild", NULL, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_fixed_child_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_fixed_child_ce, gtk_fixed_child_get_property); + + INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkclistrow", NULL, NULL, php_gtk_get_property, php_gtk_set_property); + gtk_clist_row_ce = zend_register_internal_class_ex(&ce, NULL, NULL); + php_gtk_register_prop_getter(gtk_clist_row_ce, gtk_clist_row_get_property); +} + +#endif Index: php-gtk/ext/libglade/.cvsignore diff -u /dev/null php-gtk/ext/libglade/.cvsignore:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/.cvsignore Tue Jul 10 14:27:51 2001 @@ -0,0 +1,7 @@ +.deps +Makefile +*.lo +*.la +.libs +libs.mk +gen_* Index: php-gtk/ext/libglade/Makefile.in diff -u /dev/null php-gtk/ext/libglade/Makefile.in:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/Makefile.in Tue Jul 10 14:27:51 2001 @@ -0,0 +1,16 @@ +LTLIBRARY_NAME = liblibglade.la +LTLIBRARY_SOURCES = php_libglade.c gen_libglade.c +LTLIBRARY_LIBADD = $(LIBGLADE_SHARED_LIBADD) +LTLIBRARY_SHARED_NAME = libglade.la +LTLIBRARY_SHARED_LIBADD = $(LIBGLADE_SHARED_LIBADD) + +include $(top_srcdir)/build/dynlib.mk + +php_libglade.o php_libglade.lo php_libglade.slo: gen_ce_libglade.h + +gen_libglade.c: libglade.defs libglade.overrides + php -q $(top_srcdir)/generator/generator.php -o $(srcdir)/libglade.overrides -p libglade -r $(top_srcdir)/ext/gtk%2b/gtk.defs $(srcdir)/libglade.defs > gen_libglade.c + +gen_ce_libglade.h: gen_libglade.c + grep -h "^PHP_GTK_EXPORT_CE" gen_libglade.c | sed -e "s!^!extern !" > gen_ce_libglade.h + Index: php-gtk/ext/libglade/config.m4 diff -u /dev/null php-gtk/ext/libglade/config.m4:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/config.m4 Tue Jul 10 14:27:51 2001 @@ -0,0 +1,63 @@ +dnl $Id: config.m4,v 1.2 2001/07/10 18:27:51 andrei Exp $ +dnl config.m4 for libglade module + +dnl PHP_PATH_LIBGLADE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]) +dnl Test to see if libglade is installed, and define LIBGLADE_CFLAGS, LIBS +dnl +AC_DEFUN(PHP_PATH_LIBGLADE, +[dnl +dnl Get the cflags and libraries from the libglade-config script +dnl +AC_ARG_WITH(libglade-config, +[ --with-libglade-config=LIBGLADE_CONFIG Location of libglade-config], +LIBGLADE_CONFIG="$withval") + +module_args= +for module in . $3; do + case "$module" in + gnome) + module_args="$module_args gnome" + ;; + bonobo) + module_args="$module_args bonobo" + ;; + esac +done + +AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no) +AC_MSG_CHECKING(for libglade) +if test "$LIBGLADE_CONFIG" = "no"; then + AC_MSG_RESULT(no) + ifelse([$2], , :, [$2]) +else + if $LIBGLADE_CONFIG --check $module_args; then + LIBGLADE_CFLAGS=`$LIBGLADE_CONFIG --cflags $module_args` + LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs $module_args` + AC_MSG_RESULT(yes) + ifelse([$1], , :, [$1]) + else + echo "*** libglade was not compiled with support for $module_args" 1>&2 + AC_MSG_RESULT(no) + ifelse([$2], , :, [$2]) + fi +fi +AC_SUBST(LIBGLADE_CFLAGS) +AC_SUBST(LIBGLADE_LIBS) +]) + +PHP_GTK_ARG_ENABLE(libglade,for libglade support, +[ --disable-libglade Enable libglade support],yes) + +if test "$PHP_GTK_LIBGLADE" != "no"; then + PHP_PATH_LIBGLADE(have_libglade=yes,have_libglade=no) + AC_DEFINE(HAVE_LIBGLADE,1,[libglade support]) + if test "$have_libglade" != "yes"; then + AC_MSG_ERROR(Unable to locate libglade) + else + PHP_EVAL_INCLINE($LIBGLADE_CFLAGS) + PHP_EVAL_LIBLINE($LIBGLADE_LIBS, LIBGLADE_SHARED_LIBADD) + PHP_SUBST(LIBGLADE_SHARED_LIBADD) + PHP_SUBST(LIBGLADE_GEN_SOURCES) + PHP_GTK_EXTENSION(libglade) + fi +fi Index: php-gtk/ext/libglade/libglade.defs diff -u /dev/null php-gtk/ext/libglade/libglade.defs:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/libglade.defs Tue Jul 10 14:27:51 2001 @@ -0,0 +1,138 @@ +;; -*- scheme -*- +; object definitions ... +(object XML + (in-module Glade) + (parent Data (Gtk)) + (c-name GladeXML) +) + +;; Enumerations and flags ... + + +;; From /usr/include/glade/glade-xml.h + +(function glade_xml_get_type + (c-name glade_xml_get_type) + (return-type GtkType) +) + +(function glade_xml_new + (c-name glade_xml_new) + (return-type GladeXML*) + (parameter (type-and-name const-char* fname)) + (parameter (type-and-name const-char* root) (null-ok) (default "NULL")) +) + +(function glade_xml_new_with_domain + (c-name glade_xml_new_with_domain) + (is-constructor-of GladeXML) + (return-type GladeXML*) + (parameter (type-and-name const-char* fname)) + (parameter (type-and-name const-char* root) (null-ok) (default "NULL")) + (parameter (type-and-name const-char* domain) (null-ok) (default "NULL")) +) + +(function xml_new_from_memory + (c-name glade_xml_new_from_memory) + (return-type GladeXML*) + (parameter (type-and-name char* buffer)) + (parameter (type-and-name int size)) + (parameter (type-and-name const-char* root) (null-ok)) + (parameter (type-and-name const-char* domain) (null-ok)) +) + +(method construct + (of-object XML (Glade)) + (c-name glade_xml_construct) + (return-type gboolean) + (parameter (type-and-name const-char* fname)) + (parameter (type-and-name const-char* root)) + (parameter (type-and-name const-char* domain)) +) + +(method signal_connect + (of-object XML (Glade)) + (c-name glade_xml_signal_connect) + (return-type none) + (parameter (type-and-name const-char* handlername)) + (parameter (type-and-name GtkSignalFunc func)) +) + +(method signal_connect_data + (of-object XML (Glade)) + (c-name glade_xml_signal_connect_data) + (return-type none) + (parameter (type-and-name const-char* handlername)) + (parameter (type-and-name GtkSignalFunc func)) + (parameter (type-and-name gpointer user_data)) +) + +(method signal_autoconnect + (of-object XML (Glade)) + (c-name glade_xml_signal_autoconnect) + (return-type none) +) + +(method signal_connect_full + (of-object XML (Glade)) + (c-name glade_xml_signal_connect_full) + (return-type none) + (parameter (type-and-name const-gchar* handler_name)) + (parameter (type-and-name GladeXMLConnectFunc func)) + (parameter (type-and-name gpointer user_data)) +) + +(method signal_autoconnect_full + (of-object XML (Glade)) + (c-name glade_xml_signal_autoconnect_full) + (return-type none) + (parameter (type-and-name GladeXMLConnectFunc func)) + (parameter (type-and-name gpointer user_data)) +) + +(method get_widget + (of-object XML (Glade)) + (c-name glade_xml_get_widget) + (return-type GtkWidget*) + (parameter (type-and-name const-char* name)) +) + +(method get_widget_prefix + (of-object XML (Glade)) + (c-name glade_xml_get_widget_prefix) + (return-type GList*) + (parameter (type-and-name const-char* name)) +) + +(method get_widget_by_long_name + (of-object XML (Glade)) + (c-name glade_xml_get_widget_by_long_name) + (return-type GtkWidget*) + (parameter (type-and-name const-char* longname)) +) + +(method relative_file + (of-object XML (Glade)) + (c-name glade_xml_relative_file) + (return-type gchar*) + (parameter (type-and-name const-gchar* filename)) +) + +(function get_widget_name + (c-name glade_get_widget_name) + (return-type const-gchar*) + (parameter (type-and-name GtkWidget* widget)) +) + +(function get_widget_long_name + (c-name glade_get_widget_long_name) + (return-type const-gchar*) + (parameter (type-and-name GtkWidget* widget)) +) + +(function get_widget_tree + (c-name glade_get_widget_tree) + (return-type GladeXML*) + (parameter (type-and-name GtkWidget* widget)) +) + Index: php-gtk/ext/libglade/libglade.overrides diff -u /dev/null php-gtk/ext/libglade/libglade.overrides:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/libglade.overrides Tue Jul 10 14:27:51 2001 @@ -0,0 +1,147 @@ +/* vim: set ft=cpp: */ +%% +headers +#include <glade/glade.h> +#include "ext/gtk+/php_gtk+.h" +%% +ignore-glob + *_get_type +%% +ignore + glade_xml_new + glade_xml_signal_connect_full + glade_xml_signal_connect_data + glade_xml_signal_autoconnect_full +%% +override glade_xml_signal_connect +static void glade_connect_one(const gchar *handler_name, GtkObject *obj, const + gchar *signal_name, const gchar *signal_data, + GtkObject *connect_object, gboolean after, + zval *callback_data) +{ + zval **callback = NULL, **extra = NULL, **pass_object = NULL; + zval **callback_filename = NULL, **callback_lineno = NULL; + zval *object; + + zend_hash_index_find(Z_ARRVAL_P(callback_data), 0, (void **)&callback); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 1, (void **)&extra); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 2, (void **)&pass_object); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 3, (void **)&callback_filename); + zend_hash_index_find(Z_ARRVAL_P(callback_data), 4, (void **)&callback_lineno); + + if (connect_object) { + zval *temp; + + Z_LVAL_PP(pass_object) = 0; + object = php_gtk_new(connect_object); + MAKE_STD_ZVAL(temp); + array_init(temp); + add_next_index_zval(temp, object); + php_array_merge(Z_ARRVAL_P(temp), Z_ARRVAL_PP(extra), 0); + REPLACE_ZVAL_VALUE(extra, temp, 0); + } + + gtk_signal_connect_full(obj, signal_name, NULL, + (GtkCallbackMarshal)php_gtk_callback_marshal, + callback_data, php_gtk_destroy_notify, FALSE, after); +} + +PHP_FUNCTION(wrap_glade_xml_signal_connect) +{ + char *handler_name = NULL; + zval *callback = NULL; + zval *extra; + zval *data; + char *callback_filename; + uint callback_lineno; + + NOT_STATIC_METHOD(); + + if (ZEND_NUM_ARGS() < 2) { + php_error(E_WARNING, "%s() requires at least 2 arguments, %d given", + get_active_function_name(), ZEND_NUM_ARGS()); + return; + } + + if (!php_gtk_parse_args(2, "sV", &handler_name, &callback)) + return; + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + extra = php_gtk_func_args_as_hash(ZEND_NUM_ARGS(), 2, ZEND_NUM_ARGS()); + data = php_gtk_build_value("(VNisi)", callback, extra, 1, callback_filename, callback_lineno); + glade_xml_signal_connect_full(GLADE_XML(PHP_GTK_GET(this_ptr)), handler_name, + (GladeXMLConnectFunc)glade_connect_one, data); + RETURN_NULL(); +} +%% +override glade_xml_signal_autoconnect +static void glade_connect_auto(const gchar *handler_name, GtkObject *obj, + const gchar *signal_name, const gchar *signal_data, + GtkObject *connect_object, gboolean after, + zval *map) +{ + zval **callback_data = NULL; + zval **callback_ptr = NULL, *extra = NULL, *params = NULL; + zval *callback, *data, *object = NULL; + int pass_object = 1; + char *callback_filename; + uint callback_lineno; + ELS_FETCH(); + + if (map && zend_hash_find(Z_ARRVAL_P(map), (char *)handler_name, strlen(handler_name) + 1, (void **)&callback_data) == SUCCESS) { + if (Z_TYPE_PP(callback_data) != IS_ARRAY || + zend_hash_index_find(Z_ARRVAL_PP(callback_data), 0, (void **)&callback_ptr) == FAILURE) { + php_error(E_WARNING, "%s() is supplied with invalid callback structure for handler '%s'", get_active_function_name(), handler_name); + return; + } + zval_add_ref(callback_ptr); + callback = *callback_ptr; + zend_hash_index_del(Z_ARRVAL_PP(callback_data), 0); + extra = *callback_data; + } else { + MAKE_STD_ZVAL(callback); + ZVAL_STRING(callback, (char *)handler_name, 1); + } + + if (!zend_is_callable(callback, 0, NULL)) { + php_error(E_WARNING, "%s() is unable to autoconnect callback for handler '%s'", + get_active_function_name(), handler_name); + return; + } + + MAKE_STD_ZVAL(params); + array_init(params); + + if (connect_object) { + zval *temp; + + pass_object = 0; + object = php_gtk_new(connect_object); + add_next_index_zval(params, object); + } + + if (extra) + php_array_merge(Z_ARRVAL_P(params), Z_ARRVAL_P(extra), 0); + + callback_filename = zend_get_executed_filename(ELS_C); + callback_lineno = zend_get_executed_lineno(ELS_C); + data = php_gtk_build_value("(NNisi)", callback, params, pass_object, + callback_filename, callback_lineno); + gtk_signal_connect_full(obj, signal_name, NULL, + (GtkCallbackMarshal)php_gtk_callback_marshal, + data, php_gtk_destroy_notify, FALSE, after); +} + +PHP_FUNCTION(wrap_glade_xml_signal_autoconnect) +{ + zval *map = NULL; + + NOT_STATIC_METHOD(); + + if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|a", &map)) + return; + + glade_xml_signal_autoconnect_full(GLADE_XML(PHP_GTK_GET(this_ptr)), + (GladeXMLConnectFunc)glade_connect_auto, map); +} Index: php-gtk/ext/libglade/php_libglade.c diff -u /dev/null php-gtk/ext/libglade/php_libglade.c:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/php_libglade.c Tue Jul 10 14:27:51 2001 @@ -0,0 +1,40 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_libglade.c,v 1.2 2001/07/10 18:27:51 andrei Exp $: */ + +#include "php_gtk.h" + +#if HAVE_LIBGLADE + +PHP_GTK_XINIT_FUNCTION(libglade) +{ + glade_init(); + php_libglade_register_constants(); + php_libglade_register_classes(); +} + +php_gtk_ext_entry libglade_ext_entry = { + "libglade", + PHP_GTK_XINIT(libglade), + NULL, +}; + +#endif /* HAVE_LIBGLADE */ Index: php-gtk/ext/libglade/php_libglade.h diff -u /dev/null php-gtk/ext/libglade/php_libglade.h:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/ext/libglade/php_libglade.h Tue Jul 10 14:27:51 2001 @@ -0,0 +1,41 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_libglade.h,v 1.2 2001/07/10 18:27:51 andrei Exp $: */ + +#ifndef PHP_LIBGLADE_H +#define PHP_LIBGLADE_H + +#include "php_gtk.h" + +#if HAVE_LIBGLADE + +extern php_gtk_ext_entry libglade_ext_entry; +#define libglade_ext_ptr &libglade_ext_entry + +#else + +#define libglade_ext_ptr NULL + +#endif /* HAVE_LIBGLADE */ + +#define php_gtk_ext_libglade_ptr libglade_ext_ptr + +#endif /* PHP_LIBGLADE_H */ Index: php-gtk/generator/generator.php diff -u php-gtk/generator/generator.php:1.22 php-gtk/generator/generator.php:1.23 --- php-gtk/generator/generator.php:1.22 Sat May 19 21:03:35 2001 +++ php-gtk/generator/generator.php Tue Jul 10 14:27:51 2001 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: generator.php,v 1.22 2001/05/20 01:03:35 andrei Exp $ */ +/* $Id: generator.php,v 1.23 2001/07/10 18:27:51 andrei Exp $ */ /* * Significant portions of this generator are based on the pygtk code generator @@ -491,7 +491,7 @@ { global $register_classes_tpl; - $fp = fopen('../src/php_gtk_gen_' . $this->prefix . '.c', 'w'); + $fp = fopen('php://stdout', 'w'); fwrite($fp, "#include \"php_gtk.h\""); fwrite($fp, "\n#if HAVE_PHP_GTK\n"); fwrite($fp, $this->overrides->get_headers()); @@ -510,11 +510,17 @@ $argc = $HTTP_SERVER_VARS['argc']; $argv = $HTTP_SERVER_VARS['argv']; +/* An ugly hack to counteract PHP's pernicious desire to treat + as an argument + separator in command-line version. */ +array_walk($argv, create_function('&$x', '$x = urldecode($x);')); + $result = Console_Getopt::getopt($argv, 'o:p:r:'); if (!$result || count($result[1]) < 2) die("usage: php -q generator.php [-o overridesfile] [-p prefix] [-r typesfile] defsfile\n"); list($opts, $argv) = $result; + +chdir('..'); $prefix = 'gtk'; $overrides = new Overrides(); Index: php-gtk/generator/scheme.php diff -u php-gtk/generator/scheme.php:1.6 php-gtk/generator/scheme.php:1.7 --- php-gtk/generator/scheme.php:1.6 Tue Mar 13 00:38:42 2001 +++ php-gtk/generator/scheme.php Tue Jul 10 14:27:51 2001 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: scheme.php,v 1.6 2001/03/13 05:38:42 andrei Exp $ */ +/* $Id: scheme.php,v 1.7 2001/07/10 18:27:51 andrei Exp $ */ require "definitions.php"; @@ -80,7 +80,7 @@ { switch (gettype($arg)) { case 'string': - print("Parsing file \"$arg\".\n"); + error_log("Parsing file \"$arg\"."); $this->file_name = $arg; $this->file_path = dirname($this->file_name); $this->parse_tree = parse(fopen($arg, 'r')); @@ -162,7 +162,7 @@ function handle_include($arg) { $include_file = $this->file_path . "/" . $arg[0]; - print("Parsing file \"$include_file\".\n"); + error_log("Parsing file \"$include_file\"."); $include_tree = parse(fopen($include_file, 'r')); $this->start_parsing($include_tree); } Index: php-gtk/generator/templates.php diff -u php-gtk/generator/templates.php:1.11 php-gtk/generator/templates.php:1.12 --- php-gtk/generator/templates.php:1.11 Wed May 2 14:29:08 2001 +++ php-gtk/generator/templates.php Tue Jul 10 14:27:51 2001 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: templates.php,v 1.11 2001/05/02 18:29:08 andrei Exp $ */ +/* $Id: templates.php,v 1.12 2001/07/10 18:27:51 andrei Exp $ */ $function_tpl = " PHP_FUNCTION(wrap_%s) @@ -111,6 +111,6 @@ $register_class_tpl = "\t%s = zend_register_internal_class_ex(&ce, %s, NULL);\n"; -$class_entry_tpl = "zend_class_entry *%s;\n"; +$class_entry_tpl = "PHP_GTK_EXPORT_CE(%s)\n"; ?> Index: php-gtk/src/php_gtk_ext.c.in diff -u /dev/null php-gtk/src/php_gtk_ext.c.in:1.2 --- /dev/null Tue Jul 10 14:27:53 2001 +++ php-gtk/src/php_gtk_ext.c.in Tue Jul 10 14:27:51 2001 @@ -0,0 +1,41 @@ +/* + * PHP-GTK - The PHP language bindings for GTK+ + * + * Copyright (C) 2001 Andrei Zmievski <andrei@php.net> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: php_gtk_ext.c.in,v 1.2 2001/07/10 18:27:51 andrei Exp $: */ + +#include "php_gtk.h" + +#if HAVE_PHP_GTK + +@EXT_INCLUDE_CODE@ + +php_gtk_ext_entry *php_gtk_extensions[] = { +@EXT_PTRS@ +}; + +#define EXTCOUNT (sizeof(php_gtk_extensions)/sizeof(php_gtk_ext_entry *)) + + +int php_gtk_startup_all_extensions(int module_number) +{ + return php_gtk_startup_extensions(php_gtk_extensions, EXTCOUNT, module_number); +} + +#endif /* HAVE_PHP_GTK */ Index: php-gtk/src/.cvsignore diff -u php-gtk/src/.cvsignore:1.4 php-gtk/src/.cvsignore:1.5 --- php-gtk/src/.cvsignore:1.4 Tue Mar 13 12:59:27 2001 +++ php-gtk/src/.cvsignore Tue Jul 10 14:27:51 2001 @@ -38,4 +38,4 @@ want_dependencies .deps config.nice -php_gtk_gen* +php_gtk_ext.c Index: php-gtk/src/Makefile.in diff -u php-gtk/src/Makefile.in:1.4 php-gtk/src/Makefile.in:1.5 --- php-gtk/src/Makefile.in:1.4 Tue Mar 13 08:59:52 2001 +++ php-gtk/src/Makefile.in Tue Jul 10 14:27:51 2001 @@ -1,21 +1,8 @@ -LTLIBRARY_NAME = libphp_gtk_src.la -LTLIBRARY_SOURCES = php_gtk.c php_gtk_object.c php_gtk_types.c php_gtk_util.c $(PHP_GTK_GEN_SOURCES) +LTLIBRARY_NAME = libmain.la +LTLIBRARY_SOURCES = php_gtk.c php_gtk_object.c php_gtk_util.c php_gtk_ext.c -include $(top_srcdir)/build/dynlib.mk +include $(top_srcdir)/build/ltlib.mk -php_gtk.o php_gtk.lo php_gtk.slo: php_gtk_gen_reg_items.h php_gtk_gen_ce.h - -php_gtk_gen_ce.h: $(PHP_GTK_GEN_SOURCES) - grep -h "^zend_class_entry" $(PHP_GTK_GEN_SOURCES) | sed -e "s!^!extern !" > $(srcdir)/php_gtk_gen_ce.h - -php_gtk_gen_reg_items.h: - php -q $(top_srcdir)/generator/make_reg_items.php $(PHP_GTK_MODULES) - -php_gtk_gen_gtk.c: $(top_srcdir)/generator/gtk.defs $(top_srcdir)/generator/gtk-extrafuncs.defs $(top_srcdir)/generator/gtk.overrides - php -q $(top_srcdir)/generator/generator.php -o gtk.overrides -p gtk gtk.defs - -php_gtk_gen_gdk.c: $(top_srcdir)/generator/gdk.defs $(top_srcdir)/generator/gdk.overrides - php -q $(top_srcdir)/generator/generator.php -o gdk.overrides -p gdk gdk.defs - -php_gtk_gen_libglade.c: $(top_srcdir)/generator/libglade.defs $(top_srcdir)/generator/libglade.overrides - php -q $(top_srcdir)/generator/generator.php -o libglade.overrides -p libglade -r gtk.defs libglade.defs +php_gtk_ext.c: php_gtk_ext.c.in $(top_builddir)/config.status + @echo "creating main/php_gtk_ext.c" + sh $(top_srcdir)/build2/genext.sh $(srcdir)/php_gtk_ext.c.in $(top_srcdir) "" $(AWK) $(PHP_GTK_EXTENSIONS) > $(srcdir)/php_gtk_ext.c Index: php-gtk/src/php_gtk.c diff -u php-gtk/src/php_gtk.c:1.12 php-gtk/src/php_gtk.c:1.13 --- php-gtk/src/php_gtk.c:1.12 Thu May 10 14:56:42 2001 +++ php-gtk/src/php_gtk.c Tue Jul 10 14:27:51 2001 @@ -18,13 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk.c,v 1.12 2001/05/10 18:56:42 andrei Exp $: */ +/* $Id: php_gtk.c,v 1.13 2001/07/10 18:27:51 andrei Exp $: */ #include "php_gtk.h" #include "SAPI.h" #if HAVE_PHP_GTK +HashTable php_gtk_ext_registry; GHashTable *php_gtk_class_hash = NULL; zend_module_entry gtk_module_entry = { @@ -42,124 +43,11 @@ ZEND_GET_MODULE(gtk) #endif - -static void init_gtk(void) -{ - HashTable *symbol_table; - zval **z_argv = NULL, **z_argc = NULL, **entry; - zval *tmp; - char **argv; - int argc, i; - zend_bool no_argc = 0; - PLS_FETCH(); - SLS_FETCH(); - - /* We check request_method to see if we've been called from command line or - Web server. Running GUI apps through a Web module can be dangerous to - your health. */ - if (SG(request_info).request_method != NULL) { - php_error(E_ERROR, "php-gtk: PHP GTK+ support is not available under Web servers"); - return; - } - - /* - * Since track_vars is always on, we just get the argc/argv values from - * there. - */ - symbol_table = PG(http_globals)[TRACK_VARS_SERVER]->value.ht; - - zend_hash_find(symbol_table, "argc", sizeof("argc"), (void **)&z_argc); - zend_hash_find(symbol_table, "argv", sizeof("argv"), (void **)&z_argv); - if (!z_argc || !z_argv || Z_TYPE_PP(z_argc) != IS_LONG || Z_TYPE_PP(z_argv) != IS_ARRAY) { - php_error(E_ERROR, "php-gtk: argc/argv are corrupted"); - } - - argc = Z_LVAL_PP(z_argc); - - /* - * If the script was called via -f switch and no further arguments were - * given, argc will be 0 and that's not good for gtk_init_check(). We use - * the path to the script as the only argument, and remember that we won't - * have to update symbol table after gtk_init_check(). - */ - if (argc == 0) { - argc = 1; - no_argc = 1; - argv = (char **)g_new(char *, argc); - argv[0] = g_strdup(SG(request_info).path_translated); - } else { - argv = (char **)g_new(char *, argc); - i = 0; - for (zend_hash_internal_pointer_reset(Z_ARRVAL_PP(z_argv)); - zend_hash_get_current_data(Z_ARRVAL_PP(z_argv), (void **)&entry) == SUCCESS; - zend_hash_move_forward(Z_ARRVAL_PP(z_argv))) { - argv[i++] = g_strndup(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry)); - } - } - - /* Ok, this is a hack. GTK+/GDK calls g_atexit() to set up a couple of cleanup - functions that should be called when the main program exits. However, if - we're compiled as .so library, libgtk.so will be unloaded first and the - pointers to the cleanup functions will be invalid. So we load libgtk.so - one more time to make sure it stays in memory even after our .so is - unloaded. */ - //DL_LOAD("libgtk.so"); - - if (!gtk_init_check(&argc, &argv)) { - if (argv != NULL) { - for (i = 0; i < argc; i++) - g_free(argv[i]); - g_free(argv); - } - php_error(E_ERROR, "php-gtk: Could not open display"); - return; - } - - /* - We must always call gtk_set_locale() in order to get GTK+/GDK - correctly initialize multilingual support. Otherwise, application - will refuse any letters outside ASCII and font metrics will - be broken. - */ - gtk_set_locale(); - - if (no_argc) { - /* The -f switch case, simple. */ - g_free(argv[0]); - } else { - /* We always clean the argv array. */ - zend_hash_clean(Z_ARRVAL_PP(z_argv)); - - /* Then if there are any arguments left after processing with - gtk_init_check(), we put them back into PHP's argv array and update - argc as well. */ - if (argv != NULL) { - for (i = 0; i < argc; i++) { - ALLOC_ZVAL(tmp); - tmp->type = IS_STRING; - tmp->value.str.len = strlen(argv[i]); - tmp->value.str.val = estrndup(argv[i], tmp->value.str.len); - INIT_PZVAL(tmp); - zend_hash_next_index_insert(Z_ARRVAL_PP(z_argv), &tmp, sizeof(zval *), NULL); - } - g_free(argv); - - Z_LVAL_PP(z_argc) = argc; - } - } -} - /* Remove comments and fill if you need to have entries in php.ini PHP_INI_BEGIN() PHP_INI_END() */ -static void release_gtk_object_rsrc(zend_rsrc_list_entry *rsrc) -{ - GtkObject *obj = (GtkObject *)rsrc->ptr; - gtk_object_unref(obj); -} - PHP_MINIT_FUNCTION(gtk) { // ZEND_INIT_MODULE_GLOBALS(gtk, NULL, NULL); @@ -179,27 +67,32 @@ return SUCCESS; } +static void php_gtk_ext_destructor(php_gtk_ext_entry *ext) +{ + if (ext->ext_started && ext->ext_shutdown_func) + ext->ext_shutdown_func(); + ext->ext_started = 0; +} + /* Remove if there's nothing to do at request start */ PHP_RINIT_FUNCTION(gtk) { - le_gtk = zend_register_list_destructors_ex(release_gtk_object_rsrc, NULL, "GtkObject", module_number); + zend_hash_init_ex(&php_gtk_ext_registry, 10, NULL, (void (*)(void *))php_gtk_ext_destructor, 1, 0); php_gtk_class_hash = g_hash_table_new(g_str_hash, g_str_equal); zend_hash_init_ex(&php_gtk_prop_getters, 20, NULL, NULL, 1, 0); zend_hash_init_ex(&php_gtk_prop_setters, 20, NULL, NULL, 1, 0); zend_hash_init_ex(&php_gtk_rsrc_hash, 50, NULL, NULL, 1, 0); zend_hash_init_ex(&php_gtk_type_hash, 50, NULL, NULL, 1, 0); -#include "src/php_gtk_gen_reg_items.h" - php_gtk_register_types(module_number); - init_gtk(); -#if HAVE_LIBGLADE - glade_init(); -#endif - zend_unset_timeout(); zend_set_timeout(0); + if (php_gtk_startup_all_extensions(module_number) == FAILURE) { + php_error(E_WARNING, "Unable to start extensions"); + return FAILURE; + } + return SUCCESS; } @@ -210,7 +103,8 @@ zend_hash_destroy(&php_gtk_prop_setters); zend_hash_destroy(&php_gtk_rsrc_hash); zend_hash_destroy(&php_gtk_type_hash); - gtk_exit(0); + + zend_hash_destroy(&php_gtk_ext_registry); return SUCCESS; } @@ -236,12 +130,43 @@ php_gtk_invalidate(this_ptr); } +PHP_FUNCTION(wrap_no_direct_constructor) +{ + php_error(E_WARNING, "Class %s cannot be constructed directly", get_active_function_name()); + php_gtk_invalidate(this_ptr); +} -#endif /* HAVE_PHP_GTK */ +static int php_gtk_startup_extension(php_gtk_ext_entry *ext, int module_number) +{ + if (ext) { + if (ext->ext_startup_func) { + if (ext->ext_startup_func(module_number) == FAILURE) { + php_error(E_WARNING, "Unable to start '%s' PHP-GTK extension", ext->name); + return FAILURE; + } + } + ext->ext_started = 1; + zend_hash_add(&php_gtk_ext_registry, ext->name, strlen(ext->name)+1, + (void *)ext, sizeof(php_gtk_ext_entry), NULL); + } -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ + return SUCCESS; +} + +int php_gtk_startup_extensions(php_gtk_ext_entry **ext, int ext_count, int module_number) +{ + php_gtk_ext_entry **end = ext + ext_count; + + while (ext < end) { + if (*ext) { + if (php_gtk_startup_extension(*ext, module_number)==FAILURE) { + return FAILURE; + } + } + ext++; + } + + return SUCCESS; +} + +#endif /* HAVE_PHP_GTK */ Index: php-gtk/src/php_gtk.h diff -u php-gtk/src/php_gtk.h:1.41 php-gtk/src/php_gtk.h:1.42 --- php-gtk/src/php_gtk.h:1.41 Tue May 22 12:40:43 2001 +++ php-gtk/src/php_gtk.h Tue Jul 10 14:27:51 2001 @@ -18,85 +18,45 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk.h,v 1.41 2001/05/22 16:40:43 fmk Exp $: */ +/* $Id: php_gtk.h,v 1.42 2001/07/10 18:27:51 andrei Exp $: */ #ifndef _PHP_GTK_H #define _PHP_GTK_H #include "php_gtk_module.h" -#include "gtk/gtkinvisible.h" #if HAVE_PHP_GTK -#include <gtk/gtk.h> - -extern int le_gtk; -extern int le_php_gtk_wrapper; -extern int le_gdk_window; -extern int le_gdk_bitmap; -extern int le_gdk_color; -extern int le_gdk_colormap; -extern int le_gdk_cursor; -extern int le_gdk_visual; -extern int le_gdk_font; -extern int le_gdk_gc; -extern int le_gdk_drag_context; -extern int le_gtk_accel_group; -extern int le_gtk_style; - -extern zend_class_entry *gdk_event_ce; -extern zend_class_entry *gdk_window_ce; -extern zend_class_entry *gdk_pixmap_ce; -extern zend_class_entry *gdk_bitmap_ce; -extern zend_class_entry *gdk_color_ce; -extern zend_class_entry *gdk_colormap_ce; -extern zend_class_entry *gdk_atom_ce; -extern zend_class_entry *gdk_cursor_ce; -extern zend_class_entry *gdk_visual_ce; -extern zend_class_entry *gdk_font_ce; -extern zend_class_entry *gdk_gc_ce; -extern zend_class_entry *gdk_drag_context_ce; -extern zend_class_entry *gtk_selection_data_ce; -extern zend_class_entry *gtk_ctree_node_ce; -extern zend_class_entry *gtk_accel_group_ce; -extern zend_class_entry *gtk_style_ce; -extern zend_class_entry *gtk_box_child_ce; -extern zend_class_entry *gtk_fixed_child_ce; -extern zend_class_entry *gtk_clist_row_ce; - -/* include generated class entries */ -#include "src/php_gtk_gen_ce.h" +#define PHP_GTK_EXPORT_CE(ce) zend_class_entry *ce; +#define PHP_GTK_GET_GENERIC(w, type, le) ((type)php_gtk_get_object(w, le)) -/* include generated register functions declarations */ -#include "src/php_gtk_gen_reg_items_decl.h" +#undef PG_ERROR +#define PG_ERROR -2 typedef void (*prop_getter_t)(zval *return_value, zval *object, zend_llist_element **element, int *result); typedef int (*prop_setter_t)(zval *object, zend_llist_element **element, zval *value); -#undef PG_ERROR -#define PG_ERROR -2 +#define EXT_INIT_ARGS int module_number +#define EXT_SHUTDOWN_ARGS void -/* Useful macros. */ -#define PHP_GTK_GET_GENERIC(w, type, le) ((type)php_gtk_get_object(w, le)) -#define PHP_GTK_GET(w) PHP_GTK_GET_GENERIC(w, GtkObject*, le_gtk) -#define PHP_GDK_EVENT_GET(w) PHP_GTK_GET_GENERIC(w, GdkEvent*, le_php_gtk_wrapper) -#define PHP_GDK_WINDOW_GET(w) PHP_GTK_GET_GENERIC(w, GdkWindow*, le_gdk_window) -#define PHP_GDK_PIXMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkPixmap*, le_gdk_window) -#define PHP_GDK_BITMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkBitmap*, le_gdk_bitmap) -#define PHP_GDK_COLOR_GET(w) PHP_GTK_GET_GENERIC(w, GdkColor*, le_gdk_color) -#define PHP_GDK_COLORMAP_GET(w) PHP_GTK_GET_GENERIC(w, GdkColormap*, le_gdk_colormap) -#define PHP_GDK_ATOM_GET(w) (php_gdk_atom_get(w)) -#define PHP_GDK_CURSOR_GET(w) PHP_GTK_GET_GENERIC(w, GdkCursor*, le_gdk_cursor) -#define PHP_GDK_VISUAL_GET(w) PHP_GTK_GET_GENERIC(w, GdkVisual*, le_gdk_visual) -#define PHP_GDK_FONT_GET(w) PHP_GTK_GET_GENERIC(w, GdkFont*, le_gdk_font) -#define PHP_GDK_GC_GET(w) PHP_GTK_GET_GENERIC(w, GdkGC*, le_gdk_gc) -#define PHP_GDK_DRAG_CONTEXT_GET(w) PHP_GTK_GET_GENERIC(w, GdkDragContext*, le_gdk_drag_context) -#define PHP_GTK_SELECTION_DATA_GET(w) PHP_GTK_GET_GENERIC(w, GtkSelectionData*, le_php_gtk_wrapper) -#define PHP_GTK_CTREE_NODE_GET(w) PHP_GTK_GET_GENERIC(w, GtkCTreeNode*, le_php_gtk_wrapper) -#define PHP_GTK_ACCEL_GROUP_GET(w) PHP_GTK_GET_GENERIC(w, GtkAccelGroup*, le_gtk_accel_group) -#define PHP_GTK_STYLE_GET(w) PHP_GTK_GET_GENERIC(w, GtkStyle*, le_gtk_style) +#define PHP_GTK_XINIT(ext) php_gtk_xinit_##ext +#define PHP_GTK_XSHUTDOWN(ext) php_gtk_xshutdown_##ext + +#define PHP_GTK_XINIT_FUNCTION(ext) int PHP_GTK_XINIT(ext)(EXT_INIT_ARGS) +#define PHP_GTK_XSHUTDOWN_FUNCTION(ext) int PHP_GTK_XSHUTDOWN(ext)(EXT_SHUTDOWN_ARGS) + +typedef struct _php_gtk_ext_entry php_gtk_ext_entry; +struct _php_gtk_ext_entry { + char *name; + int (*ext_startup_func)(EXT_INIT_ARGS); + int (*ext_shutdown_func)(EXT_SHUTDOWN_ARGS); + int ext_started; +}; + +#include "ext/gtk+/php_gtk+.h" /* True globals. */ +extern HashTable php_gtk_ext_registry; extern GHashTable *php_gtk_class_hash; extern HashTable php_gtk_rsrc_hash; extern HashTable php_gtk_prop_getters; @@ -105,7 +65,9 @@ /* Function declarations. */ -void php_gtk_register_types(int module_number); +int php_gtk_startup_all_extensions(int module_number); +int php_gtk_startup_extensions(php_gtk_ext_entry **ext, int ext_count, int module_number); + void php_gtk_set_object(zval *wrapper, void *obj, int rsrc_type); void *php_gtk_get_object(zval *wrapper, int rsrc_type); int php_gtk_get_enum_value(GtkType enum_type, zval *enum_val, int *result); @@ -137,28 +99,7 @@ sizeof(prop_setter_t), NULL); } -/* Constructors and initializers. */ void php_gtk_object_init(GtkObject *obj, zval *wrapper); -zval *php_gtk_new(GtkObject *obj); -zval *php_gdk_event_new(GdkEvent *event); -zval *php_gdk_window_new(GdkWindow *window); -zval *php_gdk_pixmap_new(GdkPixmap *pixmap); -zval *php_gdk_bitmap_new(GdkBitmap *bitmap); -zval *php_gdk_color_new(GdkColor *color); -zval *php_gdk_colormap_new(GdkColormap *cmap); -zval *php_gdk_atom_new(GdkAtom atom); -zval *php_gdk_cursor_new(GdkCursor *cursor); -zval *php_gdk_visual_new(GdkVisual *visual); -zval *php_gdk_font_new(GdkFont *font); -zval *php_gdk_gc_new(GdkGC *gc); -zval *php_gdk_drag_context_new(GdkDragContext *context); -zval *php_gtk_selection_data_new(GtkSelectionData *data); -zval *php_gtk_ctree_node_new(GtkCTreeNode *node); -zval *php_gtk_accel_group_new(GtkAccelGroup *group); -zval *php_gtk_style_new(GtkStyle *style); -zval *php_gtk_box_child_new(GtkBoxChild *box_child); -zval *php_gtk_fixed_child_new(GtkFixedChild *fixed_child); -zval *php_gtk_clist_row_new(GtkCListRow *clist_row); /* Utility functions. */ int php_gtk_parse_args(int argc, char *format, ...); @@ -182,16 +123,10 @@ } PHP_FUNCTION(wrap_no_constructor); +PHP_FUNCTION(wrap_no_direct_constructor); extern char *php_gtk_zval_type_name(zval *arg); #endif /* HAVE_PHP_GTK */ #endif /* _PHP_GTK_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ Index: php-gtk/src/php_gtk_module.h diff -u php-gtk/src/php_gtk_module.h:1.5 php-gtk/src/php_gtk_module.h:1.6 --- php-gtk/src/php_gtk_module.h:1.5 Tue Mar 13 12:59:27 2001 +++ php-gtk/src/php_gtk_module.h Tue Jul 10 14:27:51 2001 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk_module.h,v 1.5 2001/03/13 17:59:27 andrei Exp $: */ +/* $Id: php_gtk_module.h,v 1.6 2001/07/10 18:27:51 andrei Exp $: */ #ifndef _PHP_GTK_MODULE_H #define _PHP_GTK_MODULE_H @@ -71,10 +71,3 @@ #endif /* HAVE_PHP_GTK */ #endif /* _PHP_GTK_MODULE_H */ - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ Index: php-gtk/src/php_gtk_object.c diff -u php-gtk/src/php_gtk_object.c:1.40 php-gtk/src/php_gtk_object.c:1.41 --- php-gtk/src/php_gtk_object.c:1.40 Sat May 12 00:19:11 2001 +++ php-gtk/src/php_gtk_object.c Tue Jul 10 14:27:51 2001 @@ -18,13 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk_object.c,v 1.40 2001/05/12 04:19:11 andrei Exp $ */ +/* $Id: php_gtk_object.c,v 1.41 2001/07/10 18:27:51 andrei Exp $ */ #include "php_gtk.h" #if HAVE_PHP_GTK -int le_gtk; +#include "ext/gtk+/php_gtk+.h" + HashTable php_gtk_prop_getters; HashTable php_gtk_prop_setters; HashTable php_gtk_rsrc_hash; @@ -37,7 +38,7 @@ gtk_object_ref(obj); gtk_object_sink(obj); - php_gtk_set_object(wrapper, obj, le_gtk); + php_gtk_set_object(wrapper, obj, le_gtk_object); } void php_gtk_set_object(zval *wrapper, void *obj, int rsrc_type) @@ -50,7 +51,7 @@ Z_LVAL_P(handle) = zend_list_insert(obj, rsrc_type); zend_hash_index_update(Z_OBJPROP_P(wrapper), 0, &handle, sizeof(zval *), NULL); zval_add_ref(&wrapper); - if (rsrc_type == le_gtk) + if (rsrc_type == le_gtk_object) gtk_object_set_data_full(obj, php_gtk_wrapper_key, wrapper, php_gtk_destroy_notify); else zend_hash_index_update(&php_gtk_type_hash, (long)obj, (void *)&wrapper, sizeof(zval *), NULL); @@ -334,7 +335,7 @@ object_init_ex(wrapper, ce); gtk_object_ref(obj); - php_gtk_set_object(wrapper, obj, le_gtk); + php_gtk_set_object(wrapper, obj, le_gtk_object); return wrapper; } Index: php-gtk/src/php_gtk_util.c diff -u php-gtk/src/php_gtk_util.c:1.17 php-gtk/src/php_gtk_util.c:1.18 --- php-gtk/src/php_gtk_util.c:1.17 Tue May 22 12:40:43 2001 +++ php-gtk/src/php_gtk_util.c Tue Jul 10 14:27:52 2001 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: php_gtk_util.c,v 1.17 2001/05/22 16:40:43 fmk Exp $ */ +/* $Id: php_gtk_util.c,v 1.18 2001/07/10 18:27:52 andrei Exp $ */ #include "php_gtk.h" Index: php-gtk/build2/build.mk +++ php-gtk/build2/build.mk # $Id: build.mk,v 1.1 2001/07/10 18:27:45 andrei Exp $ # # # Makefile to generate build tools # STAMP = buildmk.stamp ALWAYS = generated_lists all: $(STAMP) $(ALWAYS) @$(MAKE) -s -f build2/build2.mk generated_lists: @echo config_m4_files = ext/*/config*.m4 >> $@ $(STAMP): phpize && touch $(STAMP) Index: php-gtk/build2/build2.mk +++ php-gtk/build2/build2.mk # $Id: build2.mk,v 1.1 2001/07/10 18:27:45 andrei Exp $ # include generated_lists all: configure config.h configure: aclocal.m4 config.m4 php_gtk.m4 configure.in $(config_m4_files) @echo rebuilding $@ @autoconf config.h: configure # explicitly remove target since autoheader does not seem to work # correctly otherwise (timestamps are not updated) @echo rebuilding $@ @rm -f $@ @autoheader Index: php-gtk/build2/genext.sh +++ php-gtk/build2/genext.sh #! /bin/sh # $Id: genext.sh,v 1.1 2001/07/10 18:27:45 andrei Exp $ # replacement for genif.pl infile="$1" shift srcdir="$1" shift extra_module_ptrs="$1" shift awk="$1" shift if test "$infile" = "" -o "$srcdir" = ""; then echo "please supply infile and srcdir" exit 1 fi module_ptrs="$extra_module_ptrs" header_list="" olddir=`pwd` cd $srcdir for ext in ${1+"$@"} ; do ext_canonical=`echo ${ext} | sed -e 's![^a-zA-Z0-9_]!_!'` module_ptrs=" php_gtk_ext_${ext_canonical}_ptr,@NEWLINE@$module_ptrs" header_list="$header_list ext/$ext/*.h" done includes=`$awk -f ./build2/print_include.awk $header_list` cd $olddir cat $infile | \ sed \ -e "s'@EXT_INCLUDE_CODE@'$includes'" \ -e "s'@EXT_PTRS@'$module_ptrs'" \ -e 's/@NEWLINE@/\ /g' Index: php-gtk/build2/print_include.awk +++ php-gtk/build2/print_include.awk /php_gtk_ext_/ { if (old_filename != FILENAME) { printf "#include \"" FILENAME "\"@NEWLINE@" old_filename = FILENAME } }