2001-10-25 Mike Kestner <mkestner@speakeasy.net>
* codegen/get-props-from-source.pl : Temporary (possibly) defs generator for props. Will probably kill this when the official defs support props. * codegen/defs-parse.pl : Added object-based aggregation of defs. Generate the class shells, methods, and props. * codegen/gdk-types.defs : ripped from pygtk. * codegen/gtk.defs : ripped from pygtk. * codegen/gtk-props.defs : some props defs. * codegen/makefile : add the new defs files. svn path=/trunk/gtk-sharp/; revision=1203
This commit is contained in:
parent
bd567cdd45
commit
d7df5fa0ca
7 changed files with 17005 additions and 23 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2001-10-25 Mike Kestner <mkestner@speakeasy.net>
|
||||
|
||||
* codegen/get-props-from-source.pl : Temporary (possibly) defs
|
||||
generator for props. Will probably kill this when the official
|
||||
defs support props.
|
||||
* codegen/defs-parse.pl : Added object-based aggregation of
|
||||
defs. Generate the class shells, methods, and props.
|
||||
* codegen/gdk-types.defs : ripped from pygtk.
|
||||
* codegen/gtk.defs : ripped from pygtk.
|
||||
* codegen/gtk-props.defs : some props defs.
|
||||
* codegen/makefile : add the new defs files.
|
||||
|
||||
2001-10-11 Mike Kestner <mkestner@speakeasy.net>
|
||||
|
||||
* makefile : Add the codegen directory
|
||||
|
|
|
@ -1,56 +1,126 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# defs-parse.pl : Gtk+ defs format parser and code generator.
|
||||
#
|
||||
# Author: Mike Kestner <mkestner@speakeasy.net>
|
||||
#
|
||||
# <c> 2001 Mike Kestner
|
||||
|
||||
while ($line = <STDIN>) {
|
||||
%maptypes = (
|
||||
'none', "void", 'gboolean', "bool", 'gint', "int", 'guint', "uint",
|
||||
'guint32', "uint", 'const-gchar', "String", 'GObject', "GLib.Object",
|
||||
'gchar', "String");
|
||||
|
||||
if ($line =~ /^\(define-(enum|flags)/) {
|
||||
parse_enum_flags ();
|
||||
%marshaltypes = (
|
||||
'none', "void", 'gboolean', "bool", 'gint', "int", 'guint', "uint",
|
||||
'guint32', "uint", 'const-gchar', "IntPtr", 'GObject', "IntPtr",
|
||||
'gchar', "IntPtr");
|
||||
|
||||
while ($def = get_def()) {
|
||||
|
||||
if ($def =~ /^\(define-(enum|flags)/) {
|
||||
gen_enum (split (/\n/, $def));
|
||||
} elsif ($def =~ /^\(define-object (\w+)/) {
|
||||
$name = $1;
|
||||
$def =~ /c-name "(\w+)"/;
|
||||
$cname=$1;
|
||||
$def =~ s/\n\s*//g;
|
||||
$objects{$cname} = $def;
|
||||
$maptypes{$cname} = $name;
|
||||
$marshaltypes{$cname} = "IntPtr";
|
||||
} elsif ($def =~ /^\(define-(prop|event|method)/) {
|
||||
$def =~ /of-object "(\w+)"/;
|
||||
$cname=$1;
|
||||
$def =~ s/\n\s*//g;
|
||||
$objects{$cname} .= "\n$def";
|
||||
} elsif ($def =~ /^\(define-(interface)/) {
|
||||
# Nothing much to do here, I think.
|
||||
} elsif ($def =~ /^\(define-(boxed|function)/) {
|
||||
# Probably need to handle these though...
|
||||
} else {
|
||||
die "Unexpected definition $def\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sub parse_enum_flags ()
|
||||
foreach $key (sort (keys (%objects))) {
|
||||
next if ($key !~ /(GtkBin|GtkButton|GtkContainer|GtkObject|GtkWidget|GtkWindow)$/);
|
||||
gen_object (split (/\n/, $objects{$key}));
|
||||
}
|
||||
|
||||
###############
|
||||
# subroutines
|
||||
###############
|
||||
|
||||
# Gets a single definition from the input stream.
|
||||
sub get_def
|
||||
{
|
||||
while ($line = <STDIN>) {
|
||||
next if ($line !~ /^\(define/);
|
||||
$expr = $line;
|
||||
do {
|
||||
$line = <STDIN>;
|
||||
$expr .= $line;
|
||||
} until ($line =~ /^\)/);
|
||||
return $expr;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
# Converts a dash or underscore separated name to StudlyCaps.
|
||||
sub StudCaps
|
||||
{
|
||||
my ($symb) = @_;
|
||||
$symb =~ s/^([a-z])/\u\1/;
|
||||
$symb =~ s/[-_]([a-z])/\u\1/g;
|
||||
$symb =~ s/[-_](\d)/\1/g;
|
||||
return $symb;
|
||||
}
|
||||
|
||||
# Code generation for the enum and flags definitions.
|
||||
sub gen_enum
|
||||
{
|
||||
my (@lines) = @_;
|
||||
$line = $lines[$pos=0];
|
||||
$line =~ /^\(define-(enum|flags) (\w+)/;
|
||||
$type = $1;
|
||||
$typename = $2;
|
||||
|
||||
$line = <STDIN>;
|
||||
$line = $lines[++$pos];
|
||||
$line =~ /\(in-module "(\w+)"/;
|
||||
$namespace = $1;
|
||||
|
||||
do { $line = <STDIN>; } until ($line =~ /\(values/);
|
||||
$maptypes{"$namespace$typename"} = $typename;
|
||||
$marshaltypes{"$namespace$typename"} = "int";
|
||||
|
||||
do { $line = $lines[++$pos]; } until ($line =~ /\(values/);
|
||||
|
||||
@enums = ();
|
||||
while ($line = <STDIN>) {
|
||||
while ($line = $lines[++$pos]) {
|
||||
last if ($line =~ /^\s*\)/);
|
||||
|
||||
if ($line =~ /\((.+)\)/) {
|
||||
($name, $dontcare, $val) = split (/ /, $1);
|
||||
$name =~ s/\"//g;
|
||||
$name =~ s/^([a-z])/\u\1/;
|
||||
$name =~ s/\-([a-z])/\u\1/g;
|
||||
$name =~ s/\-(\d)/\1/g;
|
||||
$name = StudCaps ($name);
|
||||
@enums = (@enums, "$name:$val");
|
||||
} else {
|
||||
die $line;
|
||||
}
|
||||
}
|
||||
|
||||
$dir = lc ($namespace);
|
||||
if (! -e "../$dir") {
|
||||
`mkdir ../$dir`;
|
||||
}
|
||||
$dir = "../generated/" . lc ($namespace);
|
||||
`mkdir -p $dir`;
|
||||
|
||||
open (OUTFILE, ">../$dir/$typename.cs") || die "can't open file";
|
||||
open (OUTFILE, ">$dir/$typename.cs") || die "can't open file";
|
||||
|
||||
print OUTFILE "// Generated file: Do not modify\n\n";
|
||||
print OUTFILE "namespace $namespace {\n\n";
|
||||
print OUTFILE "\t/// <summary> $typename Enumeration </summary>\n";
|
||||
print OUTFILE "\t/// <remarks>\n\t///\t Valid values:\n";
|
||||
print OUTFILE "\t/// <remarks> Valid values:\n";
|
||||
print OUTFILE "\t///\t<list type = \"bullet\">\n";
|
||||
foreach $enum (@enums) {
|
||||
($name) = split (/:/, $enum);
|
||||
print OUTFILE "\t///\t\t$name\n"
|
||||
print OUTFILE "\t///\t\t<item> $name </item>\n"
|
||||
}
|
||||
print OUTFILE "\t/// </remarks>\n\n";
|
||||
print OUTFILE "\t///\t</list>\n\t/// </remarks>\n\n";
|
||||
|
||||
if ($type eq "flags") {
|
||||
print OUTFILE "\tusing System;\n\n\t[Flags]\n";
|
||||
|
@ -71,7 +141,190 @@ sub parse_enum_flags ()
|
|||
}
|
||||
|
||||
print OUTFILE "\t}\n\n}\n";
|
||||
|
||||
close (OUTFILE);
|
||||
}
|
||||
|
||||
# Code generation for objects.
|
||||
sub gen_object
|
||||
{
|
||||
my ($objdef, @defs) = @_;
|
||||
my ($key, $typename, $parent, $dir, $namespace, $abstract, $def);
|
||||
|
||||
$objdef =~ /define-object (\w+)/;
|
||||
$typename = $1;
|
||||
|
||||
$objdef =~ /parent "(\w+)"/;
|
||||
$parent = $maptypes{$1};
|
||||
|
||||
$objdef =~ /in-module "(\w+)"/;
|
||||
$dir = "../generated/" . lc ($namespace = $1);
|
||||
`mkdir -p $dir`;
|
||||
|
||||
%props = ();
|
||||
%events = ();
|
||||
%methods = ();
|
||||
foreach $def (@defs) {
|
||||
if ($def =~ /define-property (\w+)/) {
|
||||
$props{StudCaps($1)} = $def;
|
||||
}elsif ($def =~ /define-event (\w+)/) {
|
||||
$events{StudCaps($1)} = $def;
|
||||
}elsif ($def =~ /define-method (\w+)/) {
|
||||
$methods{StudCaps($1)} = $def;
|
||||
}
|
||||
}
|
||||
|
||||
print "Generating Class $typename in ../$dir/$typename.cs\n";
|
||||
open (OUTFILE, ">$dir/$typename.cs") || die "can't open file";
|
||||
|
||||
print OUTFILE "// Generated file: Do not modify\n\n";
|
||||
print OUTFILE "namespace $namespace {\n\n";
|
||||
print OUTFILE "\t/// <summary> $typename Class </summary>\n";
|
||||
print OUTFILE "\t/// <remarks>\n\t///\t FIXME: Generate docs\n";
|
||||
print OUTFILE "\t/// </remarks>\n\n";
|
||||
print OUTFILE "\tpublic ";
|
||||
if ($abstract) {
|
||||
print OUTFILE "abstract ";
|
||||
}
|
||||
print OUTFILE "class $typename : $parent {\n\n";
|
||||
|
||||
foreach $key (sort (keys (%props))) {
|
||||
print OUTFILE gen_prop ($key, $props{$key}, "gtk-1.3.dll");
|
||||
}
|
||||
|
||||
foreach $key (sort (keys (%methods))) {
|
||||
print OUTFILE gen_method ($key, $methods{$key}, "gtk-1.3.dll");
|
||||
}
|
||||
|
||||
print OUTFILE "\t}\n}\n";
|
||||
close (OUTFILE);
|
||||
print "done\n";
|
||||
}
|
||||
|
||||
sub gen_prop ()
|
||||
{
|
||||
my ($name, $def, $dll) = @_;
|
||||
my ($cname, $mode, $sret, $mret, $docs, $code);
|
||||
|
||||
$def =~ /define-property (\w+)/;
|
||||
$cname = $1;
|
||||
|
||||
$def =~ /prop-type "(\w+)/;
|
||||
if (exists ($objects{$1})) {
|
||||
$sret = $maptypes{$1};
|
||||
$mret = "GLib.Object";
|
||||
} elsif (exists ($maptypes{$1})) {
|
||||
$sret = $maptypes{$1};
|
||||
$mret = $marshaltypes{$1};
|
||||
} else {
|
||||
$sret = $mret = $1;
|
||||
}
|
||||
|
||||
$def =~ /doc-string "(.+)"\)/;
|
||||
$docs = $1;
|
||||
|
||||
$mode = 0;
|
||||
if ($def =~ /\(readable #t\)/) {
|
||||
$mode = 1;
|
||||
}
|
||||
|
||||
if (($def =~ /\(writeable #t\)/) && ($def !~ /\(construct-only #t\)/)) {
|
||||
$mode += 2;
|
||||
}
|
||||
|
||||
$code = "\t\t/// <summary> $name Property </summary>\n";
|
||||
$code .= "\t\t/// <remarks>\n\t\t///\t$docs\n";
|
||||
$code .= "\t\t/// </remarks>\n\n";
|
||||
$code .= "\t\tpublic $sret $name {\n";
|
||||
if ($mode & 1) {
|
||||
$code .= "\t\t\tget {\n\t\t\t\t$mret val;\n";
|
||||
$code .= "\t\t\t\tGetProperty (\"$cname\", out val);\n";
|
||||
$code .= "\t\t\t\treturn ";
|
||||
if ($sret ne $mret) {
|
||||
$code .= "($sret) ";
|
||||
}
|
||||
$code .= "val;\n\t\t\t}\n";
|
||||
}
|
||||
if ($mode & 2) {
|
||||
$code .= "\t\t\tset {\n";
|
||||
$code .= "\t\t\t\tSetProperty (\"$cname\", ($mret) value);\n";
|
||||
$code .= "\t\t\t}\n";
|
||||
}
|
||||
$code .= "\t\t}\n\n";
|
||||
return $code;
|
||||
}
|
||||
|
||||
# Generate the code for a method definition.
|
||||
sub gen_method
|
||||
{
|
||||
my ($name, $def, $dll) = @_;
|
||||
my ($cname, $sret, $ret, $mret, $sig, $call, $pinv, $code);
|
||||
|
||||
$def =~ /\(c-name "(\w+)"/;
|
||||
$cname = $1;
|
||||
|
||||
$def =~ /return-type "(\w+)/;
|
||||
if (exists ($maptypes{$1})) {
|
||||
$sret = $maptypes{$1};
|
||||
$mret = $marshaltypes{$1};
|
||||
$ret = $1;
|
||||
} else {
|
||||
$sret = $mret = $ret = $1;
|
||||
}
|
||||
|
||||
($call, $pinv, $sig) = gen_param_strings($def);
|
||||
|
||||
$code = "\t\t/// <summary> $name Method </summary>\n";
|
||||
$code .= "\t\t/// <remarks>\n\t\t///\t FIXME: Generate docs\n";
|
||||
$code .= "\t\t/// </remarks>\n\n";
|
||||
$code .= "\t\t[DllImport(\"$dll\", CharSet=CharSet.Ansi,\n";
|
||||
$code .= "\t\t\t CallingConvention=CallingConvention.Cdecl)]\n";
|
||||
$code .= "\t\tstatic extern $mret $cname (IntPtr obj$pinv);\n\n";
|
||||
$code .= "\t\tpublic $sret $name ($sig)\n";
|
||||
$code .= "\t\t{\n\t\t\t";
|
||||
if ($sret ne "void") { $code .= "return "; }
|
||||
$call = "$cname (RawObject$call)";
|
||||
if ($sret eq $mret) {
|
||||
$code .= "$call";
|
||||
} elsif ($sret eq "String") {
|
||||
$code .= "Marshal.PtrToStringAnsi($call)";
|
||||
} elsif ($mret eq "int") {
|
||||
$code .= "($sret) $call";
|
||||
} elsif (exists ($objects{$ret})) {
|
||||
$code .= "($sret) GLib.Object.GetObject($call)";
|
||||
} else {
|
||||
die "Unexpected return type match $sret:$mret\n";
|
||||
}
|
||||
$code .= ";\n\t\t}\n\n";
|
||||
return $code;
|
||||
}
|
||||
|
||||
# Generate the DllImport, signature, and call parameter strings.
|
||||
sub gen_param_strings
|
||||
{
|
||||
my ($def) = @_;
|
||||
my ($call, $parm, $pinv, $sig);
|
||||
|
||||
$call = $pinv = $sig = "";
|
||||
if ($def =~ /parameters'\((.*)\)\)\)/) {
|
||||
foreach $parm (split(/\)'\(/, $1)) {
|
||||
$parm =~ s/\*//g;
|
||||
$parm =~ /"(.*)" "(.*)"/;
|
||||
$pinv .= ", $marshaltypes{$1} $2";
|
||||
if ($sig) { $sig .= ', '; }
|
||||
$sig .= "$maptypes{$1} $2";
|
||||
if ($maptypes{$1} eq $marshaltypes{$1}) {
|
||||
$call .= ", $2";
|
||||
} elsif (exists ($objects{$1})) {
|
||||
$call .= ", $2.Handle";
|
||||
} elsif ($1 =~ /gchar/) {
|
||||
$call .= ", Marshal.StringToHGlobalAnsi($2)";
|
||||
} elsif ($marshaltypes{$1} = "int") {
|
||||
$call .= ", (int) $2";
|
||||
} else {
|
||||
die "Unexpected type encountered $1\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return ($call, $pinv, $sig);
|
||||
}
|
||||
|
||||
|
|
912
codegen/gdk-types.defs
Normal file
912
codegen/gdk-types.defs
Normal file
|
@ -0,0 +1,912 @@
|
|||
;; -*- scheme -*-
|
||||
; object definitions ...
|
||||
(define-object Colormap
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkColormap")
|
||||
(gtype-id "GDK_TYPE_COLORMAP")
|
||||
)
|
||||
|
||||
(define-object Device
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkDevice")
|
||||
(gtype-id "GDK_TYPE_DEVICE")
|
||||
(fields
|
||||
'("gchar*" "name")
|
||||
'("GdkInputSource" "source")
|
||||
'("GdkInputMode" "mode")
|
||||
'("gboolean" "has_cursor")
|
||||
'("gint" "num_axes")
|
||||
'("GdkDeviceAxis*" "axes")
|
||||
'("gint" "num_keys")
|
||||
'("GdkDeviceKey*" "keys")
|
||||
)
|
||||
)
|
||||
|
||||
(define-object DragContext
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkDragContext")
|
||||
(gtype-id "GDK_TYPE_DRAG_CONTEXT")
|
||||
(fields
|
||||
'("GdkDragProtocol" "protocol")
|
||||
'("gboolean" "is_source")
|
||||
'("GdkWindow*" "source_window")
|
||||
'("GdkWindow*" "dest_window")
|
||||
'("GList*" "targets")
|
||||
'("GdkDragAction" "actions")
|
||||
'("GdkDragAction" "suggested_action")
|
||||
'("GdkDragAction" "action")
|
||||
'("guint32" "start_time")
|
||||
)
|
||||
)
|
||||
|
||||
(define-object Drawable
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkDrawable")
|
||||
(gtype-id "GDK_TYPE_DRAWABLE")
|
||||
)
|
||||
|
||||
(define-object Window
|
||||
(in-module "Gdk")
|
||||
(parent "GdkDrawable")
|
||||
(c-name "GdkWindow")
|
||||
(gtype-id "GDK_TYPE_WINDOW")
|
||||
)
|
||||
|
||||
(define-object Pixmap
|
||||
(in-module "Gdk")
|
||||
(parent "GdkDrawable")
|
||||
(c-name "GdkPixmap")
|
||||
(gtype-id "GDK_TYPE_PIXMAP")
|
||||
)
|
||||
|
||||
(define-object GC
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkGC")
|
||||
(gtype-id "GDK_TYPE_GC")
|
||||
)
|
||||
|
||||
(define-object Image
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkImage")
|
||||
(gtype-id "GDK_TYPE_IMAGE")
|
||||
)
|
||||
|
||||
(define-object Pixbuf
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkPixbuf")
|
||||
(gtype-id "GDK_TYPE_PIXBUF")
|
||||
)
|
||||
|
||||
(define-object PixbufAnimation
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkPixbufAnimation")
|
||||
(gtype-id "GDK_TYPE_PIXBUF_ANIMATION")
|
||||
)
|
||||
|
||||
(define-object PixbufAnimationIter
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkPixbufAnimationIter")
|
||||
(gtype-id "GDK_TYPE_PIXBUF_ANIMATION_ITER")
|
||||
)
|
||||
|
||||
(define-object Visual
|
||||
(in-module "Gdk")
|
||||
(parent "GObject")
|
||||
(c-name "GdkVisual")
|
||||
(gtype-id "GDK_TYPE_VISUAL")
|
||||
(fields
|
||||
'("GdkVisualType" "type")
|
||||
'("gint" "depth")
|
||||
'("GdkByteOrder" "byte_order")
|
||||
'("gint" "colormap_size")
|
||||
'("gint" "bits_per_rgb")
|
||||
'("guint32" "red_mask")
|
||||
'("gint" "red_shift")
|
||||
'("gint" "red_prec")
|
||||
'("guint32" "green_mask")
|
||||
'("gint" "green_shift")
|
||||
'("gint" "green_prec")
|
||||
'("guint32" "blue_mask")
|
||||
'("gint" "blue_shift")
|
||||
'("gint" "blue_prec")
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; Boxed types ...
|
||||
|
||||
(define-boxed Event
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkEvent")
|
||||
(gtype-id "GDK_TYPE_EVENT")
|
||||
(copy-func "gdk_event_copy")
|
||||
(release-func "gdk_event_free")
|
||||
)
|
||||
|
||||
(define-boxed Font
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkFont")
|
||||
(gtype-id "GDK_TYPE_FONT")
|
||||
(copy-func "gdk_font_ref")
|
||||
(release-func "gdk_font_unref")
|
||||
(fields
|
||||
'("GdkFontType" "type")
|
||||
'("gint" "ascent")
|
||||
'("gint" "descent")
|
||||
)
|
||||
)
|
||||
|
||||
(define-boxed Color
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkColor")
|
||||
(gtype-id "GDK_TYPE_COLOR")
|
||||
(copy-func "gdk_color_copy")
|
||||
(release-func "gdk_color_free")
|
||||
(fields
|
||||
'("guint32" "pixel")
|
||||
'("guint16" "red")
|
||||
'("guint16" "green")
|
||||
'("guint16" "blue")
|
||||
)
|
||||
)
|
||||
|
||||
(define-boxed Cursor
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkCursor")
|
||||
(gtype-id "GDK_TYPE_CURSOR")
|
||||
(copy-func "gdk_cursor_ref")
|
||||
(release-func "gdk_cursor_unref")
|
||||
(fields
|
||||
'("GdkCursorType" "type")
|
||||
)
|
||||
)
|
||||
|
||||
(define-boxed Rectangle
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkRectangle")
|
||||
(gtype-id "GDK_TYPE_RECTANGLE")
|
||||
(copy-func "gdk_rectangle_copy")
|
||||
(release-func "g_free")
|
||||
(fields
|
||||
'("gint" "x")
|
||||
'("gint" "y")
|
||||
'("gint" "width")
|
||||
'("gint" "height")
|
||||
)
|
||||
)
|
||||
|
||||
;; Enumerations and flags ...
|
||||
|
||||
(define-enum CursorType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkCursorType")
|
||||
(gtype-id "GDK_TYPE_CURSOR_TYPE")
|
||||
; (value (name #include) (c-name #include))
|
||||
(values
|
||||
'("gdk-cursor-is-pixmap" "GDK_CURSOR_IS_PIXMAP")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags DragAction
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkDragAction")
|
||||
(gtype-id "GDK_TYPE_DRAG_ACTION")
|
||||
(values
|
||||
'("default" "GDK_ACTION_DEFAULT")
|
||||
'("copy" "GDK_ACTION_COPY")
|
||||
'("move" "GDK_ACTION_MOVE")
|
||||
'("link" "GDK_ACTION_LINK")
|
||||
'("private" "GDK_ACTION_PRIVATE")
|
||||
'("ask" "GDK_ACTION_ASK")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum DragProtocol
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkDragProtocol")
|
||||
(gtype-id "GDK_TYPE_DRAG_PROTOCOL")
|
||||
(values
|
||||
'("motif" "GDK_DRAG_PROTO_MOTIF")
|
||||
'("xdnd" "GDK_DRAG_PROTO_XDND")
|
||||
'("rootwin" "GDK_DRAG_PROTO_ROOTWIN")
|
||||
'("none" "GDK_DRAG_PROTO_NONE")
|
||||
'("win32-dropfiles" "GDK_DRAG_PROTO_WIN32_DROPFILES")
|
||||
'("ole2" "GDK_DRAG_PROTO_OLE2")
|
||||
'("local" "GDK_DRAG_PROTO_LOCAL")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum FilterReturn
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkFilterReturn")
|
||||
(gtype-id "GDK_TYPE_FILTER_RETURN")
|
||||
(values
|
||||
'("continue" "GDK_FILTER_CONTINUE")
|
||||
'("translate" "GDK_FILTER_TRANSLATE")
|
||||
'("remove" "GDK_FILTER_REMOVE")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum EventType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkEventType")
|
||||
(gtype-id "GDK_TYPE_EVENT_TYPE")
|
||||
(values
|
||||
'("nothing" "GDK_NOTHING")
|
||||
'("delete" "GDK_DELETE")
|
||||
'("destroy" "GDK_DESTROY")
|
||||
'("expose" "GDK_EXPOSE")
|
||||
'("motion-notify" "GDK_MOTION_NOTIFY")
|
||||
'("button-press" "GDK_BUTTON_PRESS")
|
||||
'("2button-press" "GDK_2BUTTON_PRESS")
|
||||
'("3button-press" "GDK_3BUTTON_PRESS")
|
||||
'("button-release" "GDK_BUTTON_RELEASE")
|
||||
'("key-press" "GDK_KEY_PRESS")
|
||||
'("key-release" "GDK_KEY_RELEASE")
|
||||
'("enter-notify" "GDK_ENTER_NOTIFY")
|
||||
'("leave-notify" "GDK_LEAVE_NOTIFY")
|
||||
'("focus-change" "GDK_FOCUS_CHANGE")
|
||||
'("configure" "GDK_CONFIGURE")
|
||||
'("map" "GDK_MAP")
|
||||
'("unmap" "GDK_UNMAP")
|
||||
'("property-notify" "GDK_PROPERTY_NOTIFY")
|
||||
'("selection-clear" "GDK_SELECTION_CLEAR")
|
||||
'("selection-request" "GDK_SELECTION_REQUEST")
|
||||
'("selection-notify" "GDK_SELECTION_NOTIFY")
|
||||
'("proximity-in" "GDK_PROXIMITY_IN")
|
||||
'("proximity-out" "GDK_PROXIMITY_OUT")
|
||||
'("drag-enter" "GDK_DRAG_ENTER")
|
||||
'("drag-leave" "GDK_DRAG_LEAVE")
|
||||
'("drag-motion" "GDK_DRAG_MOTION")
|
||||
'("drag-status" "GDK_DRAG_STATUS")
|
||||
'("drop-start" "GDK_DROP_START")
|
||||
'("drop-finished" "GDK_DROP_FINISHED")
|
||||
'("client-event" "GDK_CLIENT_EVENT")
|
||||
'("visibility-notify" "GDK_VISIBILITY_NOTIFY")
|
||||
'("no-expose" "GDK_NO_EXPOSE")
|
||||
'("scroll" "GDK_SCROLL")
|
||||
'("window-state" "GDK_WINDOW_STATE")
|
||||
'("setting" "GDK_SETTING")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags EventMask
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkEventMask")
|
||||
(gtype-id "GDK_TYPE_EVENT_MASK")
|
||||
(values
|
||||
'("exposure-mask" "GDK_EXPOSURE_MASK")
|
||||
'("pointer-motion-mask" "GDK_POINTER_MOTION_MASK")
|
||||
'("pointer-motion-hint-mask" "GDK_POINTER_MOTION_HINT_MASK")
|
||||
'("button-motion-mask" "GDK_BUTTON_MOTION_MASK")
|
||||
'("button1-motion-mask" "GDK_BUTTON1_MOTION_MASK")
|
||||
'("button2-motion-mask" "GDK_BUTTON2_MOTION_MASK")
|
||||
'("button3-motion-mask" "GDK_BUTTON3_MOTION_MASK")
|
||||
'("button-press-mask" "GDK_BUTTON_PRESS_MASK")
|
||||
'("button-release-mask" "GDK_BUTTON_RELEASE_MASK")
|
||||
'("key-press-mask" "GDK_KEY_PRESS_MASK")
|
||||
'("key-release-mask" "GDK_KEY_RELEASE_MASK")
|
||||
'("enter-notify-mask" "GDK_ENTER_NOTIFY_MASK")
|
||||
'("leave-notify-mask" "GDK_LEAVE_NOTIFY_MASK")
|
||||
'("focus-change-mask" "GDK_FOCUS_CHANGE_MASK")
|
||||
'("structure-mask" "GDK_STRUCTURE_MASK")
|
||||
'("property-change-mask" "GDK_PROPERTY_CHANGE_MASK")
|
||||
'("visibility-notify-mask" "GDK_VISIBILITY_NOTIFY_MASK")
|
||||
'("proximity-in-mask" "GDK_PROXIMITY_IN_MASK")
|
||||
'("proximity-out-mask" "GDK_PROXIMITY_OUT_MASK")
|
||||
'("substructure-mask" "GDK_SUBSTRUCTURE_MASK")
|
||||
'("scroll-mask" "GDK_SCROLL_MASK")
|
||||
'("all-events-mask" "GDK_ALL_EVENTS_MASK")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum VisibilityState
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkVisibilityState")
|
||||
(gtype-id "GDK_TYPE_VISIBILITY_STATE")
|
||||
(values
|
||||
'("unobscured" "GDK_VISIBILITY_UNOBSCURED")
|
||||
'("partial" "GDK_VISIBILITY_PARTIAL")
|
||||
'("fully-obscured" "GDK_VISIBILITY_FULLY_OBSCURED")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum ScrollDirection
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkScrollDirection")
|
||||
(gtype-id "GDK_TYPE_SCROLL_DIRECTION")
|
||||
(values
|
||||
'("up" "GDK_SCROLL_UP")
|
||||
'("down" "GDK_SCROLL_DOWN")
|
||||
'("left" "GDK_SCROLL_LEFT")
|
||||
'("right" "GDK_SCROLL_RIGHT")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum NotifyType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkNotifyType")
|
||||
(gtype-id "GDK_TYPE_NOTIFY_TYPE")
|
||||
(values
|
||||
'("ancestor" "GDK_NOTIFY_ANCESTOR")
|
||||
'("virtual" "GDK_NOTIFY_VIRTUAL")
|
||||
'("inferior" "GDK_NOTIFY_INFERIOR")
|
||||
'("nonlinear" "GDK_NOTIFY_NONLINEAR")
|
||||
'("nonlinear-virtual" "GDK_NOTIFY_NONLINEAR_VIRTUAL")
|
||||
'("unknown" "GDK_NOTIFY_UNKNOWN")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum CrossingMode
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkCrossingMode")
|
||||
(gtype-id "GDK_TYPE_CROSSING_MODE")
|
||||
(values
|
||||
'("normal" "GDK_CROSSING_NORMAL")
|
||||
'("grab" "GDK_CROSSING_GRAB")
|
||||
'("ungrab" "GDK_CROSSING_UNGRAB")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum PropertyState
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkPropertyState")
|
||||
(gtype-id "GDK_TYPE_PROPERTY_STATE")
|
||||
(values
|
||||
'("new-value" "GDK_PROPERTY_NEW_VALUE")
|
||||
'("delete" "GDK_PROPERTY_DELETE")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags WindowState
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkWindowState")
|
||||
(gtype-id "GDK_TYPE_WINDOW_STATE")
|
||||
(values
|
||||
'("withdrawn" "GDK_WINDOW_STATE_WITHDRAWN")
|
||||
'("iconified" "GDK_WINDOW_STATE_ICONIFIED")
|
||||
'("maximized" "GDK_WINDOW_STATE_MAXIMIZED")
|
||||
'("sticky" "GDK_WINDOW_STATE_STICKY")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum SettingAction
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkSettingAction")
|
||||
(gtype-id "GDK_TYPE_SETTING_ACTION")
|
||||
(values
|
||||
'("new" "GDK_SETTING_ACTION_NEW")
|
||||
'("changed" "GDK_SETTING_ACTION_CHANGED")
|
||||
'("deleted" "GDK_SETTING_ACTION_DELETED")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum FontType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkFontType")
|
||||
(gtype-id "GDK_TYPE_FONT_TYPE")
|
||||
(values
|
||||
'("font" "GDK_FONT_FONT")
|
||||
'("fontset" "GDK_FONT_FONTSET")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum CapStyle
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkCapStyle")
|
||||
(gtype-id "GDK_TYPE_CAP_STYLE")
|
||||
(values
|
||||
'("not-last" "GDK_CAP_NOT_LAST")
|
||||
'("butt" "GDK_CAP_BUTT")
|
||||
'("round" "GDK_CAP_ROUND")
|
||||
'("projecting" "GDK_CAP_PROJECTING")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum Fill
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkFill")
|
||||
(gtype-id "GDK_TYPE_FILL")
|
||||
(values
|
||||
'("solid" "GDK_SOLID")
|
||||
'("tiled" "GDK_TILED")
|
||||
'("stippled" "GDK_STIPPLED")
|
||||
'("opaque-stippled" "GDK_OPAQUE_STIPPLED")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum Function
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkFunction")
|
||||
(gtype-id "GDK_TYPE_FUNCTION")
|
||||
(values
|
||||
'("copy" "GDK_COPY")
|
||||
'("invert" "GDK_INVERT")
|
||||
'("xor" "GDK_XOR")
|
||||
'("clear" "GDK_CLEAR")
|
||||
'("and" "GDK_AND")
|
||||
'("and-reverse" "GDK_AND_REVERSE")
|
||||
'("and-invert" "GDK_AND_INVERT")
|
||||
'("noop" "GDK_NOOP")
|
||||
'("or" "GDK_OR")
|
||||
'("equiv" "GDK_EQUIV")
|
||||
'("or-reverse" "GDK_OR_REVERSE")
|
||||
'("copy-invert" "GDK_COPY_INVERT")
|
||||
'("or-invert" "GDK_OR_INVERT")
|
||||
'("nand" "GDK_NAND")
|
||||
'("nor" "GDK_NOR")
|
||||
'("set" "GDK_SET")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum JoinStyle
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkJoinStyle")
|
||||
(gtype-id "GDK_TYPE_JOIN_STYLE")
|
||||
(values
|
||||
'("miter" "GDK_JOIN_MITER")
|
||||
'("round" "GDK_JOIN_ROUND")
|
||||
'("bevel" "GDK_JOIN_BEVEL")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum LineStyle
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkLineStyle")
|
||||
(gtype-id "GDK_TYPE_LINE_STYLE")
|
||||
(values
|
||||
'("solid" "GDK_LINE_SOLID")
|
||||
'("on-off-dash" "GDK_LINE_ON_OFF_DASH")
|
||||
'("double-dash" "GDK_LINE_DOUBLE_DASH")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum SubwindowMode
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkSubwindowMode")
|
||||
(gtype-id "GDK_TYPE_SUBWINDOW_MODE")
|
||||
(values
|
||||
'("clip-by-children" "GDK_CLIP_BY_CHILDREN")
|
||||
'("include-inferiors" "GDK_INCLUDE_INFERIORS")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags GCValuesMask
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkGCValuesMask")
|
||||
(gtype-id "GDK_TYPE_GC_VALUES_MASK")
|
||||
(values
|
||||
'("foreground" "GDK_GC_FOREGROUND")
|
||||
'("background" "GDK_GC_BACKGROUND")
|
||||
'("font" "GDK_GC_FONT")
|
||||
'("function" "GDK_GC_FUNCTION")
|
||||
'("fill" "GDK_GC_FILL")
|
||||
'("tile" "GDK_GC_TILE")
|
||||
'("stipple" "GDK_GC_STIPPLE")
|
||||
'("clip-mask" "GDK_GC_CLIP_MASK")
|
||||
'("subwindow" "GDK_GC_SUBWINDOW")
|
||||
'("ts-x-origin" "GDK_GC_TS_X_ORIGIN")
|
||||
'("ts-y-origin" "GDK_GC_TS_Y_ORIGIN")
|
||||
'("clip-x-origin" "GDK_GC_CLIP_X_ORIGIN")
|
||||
'("clip-y-origin" "GDK_GC_CLIP_Y_ORIGIN")
|
||||
'("exposures" "GDK_GC_EXPOSURES")
|
||||
'("line-width" "GDK_GC_LINE_WIDTH")
|
||||
'("line-style" "GDK_GC_LINE_STYLE")
|
||||
'("cap-style" "GDK_GC_CAP_STYLE")
|
||||
'("join-style" "GDK_GC_JOIN_STYLE")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum ImageType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkImageType")
|
||||
(gtype-id "GDK_TYPE_IMAGE_TYPE")
|
||||
(values
|
||||
'("normal" "GDK_IMAGE_NORMAL")
|
||||
'("shared" "GDK_IMAGE_SHARED")
|
||||
'("fastest" "GDK_IMAGE_FASTEST")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum ExtensionMode
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkExtensionMode")
|
||||
(gtype-id "GDK_TYPE_EXTENSION_MODE")
|
||||
(values
|
||||
'("none" "GDK_EXTENSION_EVENTS_NONE")
|
||||
'("all" "GDK_EXTENSION_EVENTS_ALL")
|
||||
'("cursor" "GDK_EXTENSION_EVENTS_CURSOR")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum InputSource
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkInputSource")
|
||||
(gtype-id "GDK_TYPE_INPUT_SOURCE")
|
||||
(values
|
||||
'("mouse" "GDK_SOURCE_MOUSE")
|
||||
'("pen" "GDK_SOURCE_PEN")
|
||||
'("eraser" "GDK_SOURCE_ERASER")
|
||||
'("cursor" "GDK_SOURCE_CURSOR")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum InputMode
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkInputMode")
|
||||
(gtype-id "GDK_TYPE_INPUT_MODE")
|
||||
(values
|
||||
'("disabled" "GDK_MODE_DISABLED")
|
||||
'("screen" "GDK_MODE_SCREEN")
|
||||
'("window" "GDK_MODE_WINDOW")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum AxisUse
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkAxisUse")
|
||||
(gtype-id "GDK_TYPE_AXIS_USE")
|
||||
(values
|
||||
'("ignore" "GDK_AXIS_IGNORE")
|
||||
'("x" "GDK_AXIS_X")
|
||||
'("y" "GDK_AXIS_Y")
|
||||
'("pressure" "GDK_AXIS_PRESSURE")
|
||||
'("xtilt" "GDK_AXIS_XTILT")
|
||||
'("ytilt" "GDK_AXIS_YTILT")
|
||||
'("wheel" "GDK_AXIS_WHEEL")
|
||||
'("last" "GDK_AXIS_LAST")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum PropMode
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkPropMode")
|
||||
(gtype-id "GDK_TYPE_PROP_MODE")
|
||||
(values
|
||||
'("replace" "GDK_PROP_MODE_REPLACE")
|
||||
'("prepend" "GDK_PROP_MODE_PREPEND")
|
||||
'("append" "GDK_PROP_MODE_APPEND")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum FillRule
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkFillRule")
|
||||
(gtype-id "GDK_TYPE_FILL_RULE")
|
||||
(values
|
||||
'("even-odd-rule" "GDK_EVEN_ODD_RULE")
|
||||
'("winding-rule" "GDK_WINDING_RULE")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum OverlapType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkOverlapType")
|
||||
(gtype-id "GDK_TYPE_OVERLAP_TYPE")
|
||||
(values
|
||||
'("in" "GDK_OVERLAP_RECTANGLE_IN")
|
||||
'("out" "GDK_OVERLAP_RECTANGLE_OUT")
|
||||
'("part" "GDK_OVERLAP_RECTANGLE_PART")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum RgbDither
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkRgbDither")
|
||||
(gtype-id "GDK_TYPE_RGB_DITHER")
|
||||
(values
|
||||
'("none" "GDK_RGB_DITHER_NONE")
|
||||
'("normal" "GDK_RGB_DITHER_NORMAL")
|
||||
'("max" "GDK_RGB_DITHER_MAX")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum Selection
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkSelection")
|
||||
(gtype-id "GDK_TYPE_SELECTION")
|
||||
(values
|
||||
'("primary" "GDK_SELECTION_PRIMARY")
|
||||
'("secondary" "GDK_SELECTION_SECONDARY")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum Target
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkTarget")
|
||||
(gtype-id "GDK_TYPE_TARGET")
|
||||
(values
|
||||
'("bitmap" "GDK_TARGET_BITMAP")
|
||||
'("colormap" "GDK_TARGET_COLORMAP")
|
||||
'("drawable" "GDK_TARGET_DRAWABLE")
|
||||
'("pixmap" "GDK_TARGET_PIXMAP")
|
||||
'("string" "GDK_TARGET_STRING")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum SelectionType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkSelectionType")
|
||||
(gtype-id "GDK_TYPE_SELECTION_TYPE")
|
||||
(values
|
||||
'("atom" "GDK_SELECTION_TYPE_ATOM")
|
||||
'("bitmap" "GDK_SELECTION_TYPE_BITMAP")
|
||||
'("colormap" "GDK_SELECTION_TYPE_COLORMAP")
|
||||
'("drawable" "GDK_SELECTION_TYPE_DRAWABLE")
|
||||
'("integer" "GDK_SELECTION_TYPE_INTEGER")
|
||||
'("pixmap" "GDK_SELECTION_TYPE_PIXMAP")
|
||||
'("window" "GDK_SELECTION_TYPE_WINDOW")
|
||||
'("string" "GDK_SELECTION_TYPE_STRING")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum ByteOrder
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkByteOrder")
|
||||
(gtype-id "GDK_TYPE_BYTE_ORDER")
|
||||
(values
|
||||
'("lsb-first" "GDK_LSB_FIRST")
|
||||
'("msb-first" "GDK_MSB_FIRST")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags ModifierType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkModifierType")
|
||||
(gtype-id "GDK_TYPE_MODIFIER_TYPE")
|
||||
(values
|
||||
'("shift-mask" "GDK_SHIFT_MASK")
|
||||
'("lock-mask" "GDK_LOCK_MASK")
|
||||
'("control-mask" "GDK_CONTROL_MASK")
|
||||
'("mod1-mask" "GDK_MOD1_MASK")
|
||||
'("mod2-mask" "GDK_MOD2_MASK")
|
||||
'("mod3-mask" "GDK_MOD3_MASK")
|
||||
'("mod4-mask" "GDK_MOD4_MASK")
|
||||
'("mod5-mask" "GDK_MOD5_MASK")
|
||||
'("button1-mask" "GDK_BUTTON1_MASK")
|
||||
'("button2-mask" "GDK_BUTTON2_MASK")
|
||||
'("button3-mask" "GDK_BUTTON3_MASK")
|
||||
'("button4-mask" "GDK_BUTTON4_MASK")
|
||||
'("button5-mask" "GDK_BUTTON5_MASK")
|
||||
'("release-mask" "GDK_RELEASE_MASK")
|
||||
'("modifier-mask" "GDK_MODIFIER_MASK")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags InputCondition
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkInputCondition")
|
||||
(gtype-id "GDK_TYPE_INPUT_CONDITION")
|
||||
(values
|
||||
'("read" "GDK_INPUT_READ")
|
||||
'("write" "GDK_INPUT_WRITE")
|
||||
'("exception" "GDK_INPUT_EXCEPTION")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum Status
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkStatus")
|
||||
(gtype-id "GDK_TYPE_STATUS")
|
||||
(values
|
||||
'("ok" "GDK_OK")
|
||||
'("error" "GDK_ERROR")
|
||||
'("error-param" "GDK_ERROR_PARAM")
|
||||
'("error-file" "GDK_ERROR_FILE")
|
||||
'("error-mem" "GDK_ERROR_MEM")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum GrabStatus
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkGrabStatus")
|
||||
(gtype-id "GDK_TYPE_GRAB_STATUS")
|
||||
(values
|
||||
'("success" "GDK_GRAB_SUCCESS")
|
||||
'("already-grabbed" "GDK_GRAB_ALREADY_GRABBED")
|
||||
'("invalid-time" "GDK_GRAB_INVALID_TIME")
|
||||
'("not-viewable" "GDK_GRAB_NOT_VIEWABLE")
|
||||
'("frozen" "GDK_GRAB_FROZEN")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum VisualType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkVisualType")
|
||||
(gtype-id "GDK_TYPE_VISUAL_TYPE")
|
||||
(values
|
||||
'("static-gray" "GDK_VISUAL_STATIC_GRAY")
|
||||
'("grayscale" "GDK_VISUAL_GRAYSCALE")
|
||||
'("static-color" "GDK_VISUAL_STATIC_COLOR")
|
||||
'("pseudo-color" "GDK_VISUAL_PSEUDO_COLOR")
|
||||
'("true-color" "GDK_VISUAL_TRUE_COLOR")
|
||||
'("direct-color" "GDK_VISUAL_DIRECT_COLOR")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum WindowClass
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkWindowClass")
|
||||
(gtype-id "GDK_TYPE_WINDOW_CLASS")
|
||||
(values
|
||||
'("utput" "GDK_INPUT_OUTPUT")
|
||||
'("nly" "GDK_INPUT_ONLY")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum WindowType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkWindowType")
|
||||
(gtype-id "GDK_TYPE_WINDOW_TYPE")
|
||||
(values
|
||||
'("root" "GDK_WINDOW_ROOT")
|
||||
'("toplevel" "GDK_WINDOW_TOPLEVEL")
|
||||
'("child" "GDK_WINDOW_CHILD")
|
||||
'("dialog" "GDK_WINDOW_DIALOG")
|
||||
'("temp" "GDK_WINDOW_TEMP")
|
||||
'("foreign" "GDK_WINDOW_FOREIGN")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags WindowAttributesType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkWindowAttributesType")
|
||||
(gtype-id "GDK_TYPE_WINDOW_ATTRIBUTES_TYPE")
|
||||
(values
|
||||
'("title" "GDK_WA_TITLE")
|
||||
'("x" "GDK_WA_X")
|
||||
'("y" "GDK_WA_Y")
|
||||
'("cursor" "GDK_WA_CURSOR")
|
||||
'("colormap" "GDK_WA_COLORMAP")
|
||||
'("visual" "GDK_WA_VISUAL")
|
||||
'("wmclass" "GDK_WA_WMCLASS")
|
||||
'("noredir" "GDK_WA_NOREDIR")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags WindowHints
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkWindowHints")
|
||||
(gtype-id "GDK_TYPE_WINDOW_HINTS")
|
||||
(values
|
||||
'("pos" "GDK_HINT_POS")
|
||||
'("min-size" "GDK_HINT_MIN_SIZE")
|
||||
'("max-size" "GDK_HINT_MAX_SIZE")
|
||||
'("base-size" "GDK_HINT_BASE_SIZE")
|
||||
'("aspect" "GDK_HINT_ASPECT")
|
||||
'("resize-inc" "GDK_HINT_RESIZE_INC")
|
||||
'("win-gravity" "GDK_HINT_WIN_GRAVITY")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum WindowTypeHint
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkWindowTypeHint")
|
||||
(gtype-id "GDK_TYPE_WINDOW_TYPE_HINT")
|
||||
(values
|
||||
'("normal" "GDK_WINDOW_TYPE_HINT_NORMAL")
|
||||
'("dialog" "GDK_WINDOW_TYPE_HINT_DIALOG")
|
||||
'("menu" "GDK_WINDOW_TYPE_HINT_MENU")
|
||||
'("toolbar" "GDK_WINDOW_TYPE_HINT_TOOLBAR")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags WMDecoration
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkWMDecoration")
|
||||
(gtype-id "GDK_TYPE_WM_DECORATION")
|
||||
(values
|
||||
'("all" "GDK_DECOR_ALL")
|
||||
'("border" "GDK_DECOR_BORDER")
|
||||
'("resizeh" "GDK_DECOR_RESIZEH")
|
||||
'("title" "GDK_DECOR_TITLE")
|
||||
'("menu" "GDK_DECOR_MENU")
|
||||
'("minimize" "GDK_DECOR_MINIMIZE")
|
||||
'("maximize" "GDK_DECOR_MAXIMIZE")
|
||||
)
|
||||
)
|
||||
|
||||
(define-flags WMFunction
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkWMFunction")
|
||||
(gtype-id "GDK_TYPE_WM_FUNCTION")
|
||||
(values
|
||||
'("all" "GDK_FUNC_ALL")
|
||||
'("resize" "GDK_FUNC_RESIZE")
|
||||
'("move" "GDK_FUNC_MOVE")
|
||||
'("minimize" "GDK_FUNC_MINIMIZE")
|
||||
'("maximize" "GDK_FUNC_MAXIMIZE")
|
||||
'("close" "GDK_FUNC_CLOSE")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum Gravity
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkGravity")
|
||||
(gtype-id "GDK_TYPE_GRAVITY")
|
||||
(values
|
||||
'("north-west" "GDK_GRAVITY_NORTH_WEST")
|
||||
'("north" "GDK_GRAVITY_NORTH")
|
||||
'("north-east" "GDK_GRAVITY_NORTH_EAST")
|
||||
'("west" "GDK_GRAVITY_WEST")
|
||||
'("center" "GDK_GRAVITY_CENTER")
|
||||
'("east" "GDK_GRAVITY_EAST")
|
||||
'("south-west" "GDK_GRAVITY_SOUTH_WEST")
|
||||
'("south" "GDK_GRAVITY_SOUTH")
|
||||
'("south-east" "GDK_GRAVITY_SOUTH_EAST")
|
||||
'("static" "GDK_GRAVITY_STATIC")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum WindowEdge
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkWindowEdge")
|
||||
(gtype-id "GDK_TYPE_WINDOW_EDGE")
|
||||
(values
|
||||
'("north-west" "GDK_WINDOW_EDGE_NORTH_WEST")
|
||||
'("north" "GDK_WINDOW_EDGE_NORTH")
|
||||
'("north-east" "GDK_WINDOW_EDGE_NORTH_EAST")
|
||||
'("west" "GDK_WINDOW_EDGE_WEST")
|
||||
'("east" "GDK_WINDOW_EDGE_EAST")
|
||||
'("south-west" "GDK_WINDOW_EDGE_SOUTH_WEST")
|
||||
'("south" "GDK_WINDOW_EDGE_SOUTH")
|
||||
'("south-east" "GDK_WINDOW_EDGE_SOUTH_EAST")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum PixbufAlphaMode
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkPixbufAlphaMode")
|
||||
(gtype-id "GDK_TYPE_PIXBUF_ALPHA_MODE")
|
||||
(values
|
||||
'("bilevel" "GDK_PIXBUF_ALPHA_BILEVEL")
|
||||
'("full" "GDK_PIXBUF_ALPHA_FULL")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum Colorspace
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkColorspace")
|
||||
(gtype-id "GDK_TYPE_COLORSPACE")
|
||||
(values
|
||||
'("b" "GDK_COLORSPACE_RGB")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum PixbufError
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkPixbufError")
|
||||
(gtype-id "GDK_TYPE_PIXBUF_ERROR")
|
||||
(values
|
||||
'("header-corrupt" "GDK_PIXBUF_ERROR_HEADER_CORRUPT")
|
||||
'("pixel-corrupt" "GDK_PIXBUF_ERROR_PIXEL_CORRUPT")
|
||||
'("unknown-format" "GDK_PIXBUF_ERROR_UNKNOWN_FORMAT")
|
||||
'("corrupt-image" "GDK_PIXBUF_ERROR_CORRUPT_IMAGE")
|
||||
'("insufficient-memory" "GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY")
|
||||
'("bad-option-value" "GDK_PIXBUF_ERROR_BAD_OPTION_VALUE")
|
||||
'("unknown-type" "GDK_PIXBUF_ERROR_UNKNOWN_TYPE")
|
||||
'("unsupported-operation" "GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION")
|
||||
'("failed" "GDK_PIXBUF_ERROR_FAILED")
|
||||
)
|
||||
)
|
||||
|
||||
(define-enum InterpType
|
||||
(in-module "Gdk")
|
||||
(c-name "GdkInterpType")
|
||||
(gtype-id "GDK_TYPE_INTERP_TYPE")
|
||||
(values
|
||||
'("nearest" "GDK_INTERP_NEAREST")
|
||||
'("tiles" "GDK_INTERP_TILES")
|
||||
'("bilinear" "GDK_INTERP_BILINEAR")
|
||||
'("hyper" "GDK_INTERP_HYPER")
|
||||
)
|
||||
)
|
144
codegen/get-props-from-source.pl
Executable file
144
codegen/get-props-from-source.pl
Executable file
|
@ -0,0 +1,144 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
open (SRCFILE, $ARGV[0]) || die "Could open $ARGV[0]";
|
||||
|
||||
@lines = <SRCFILE>;
|
||||
$linenum = 0;
|
||||
|
||||
while ($linenum < @lines) {
|
||||
|
||||
$line = $lines[$linenum];
|
||||
|
||||
if ($line =~ /^(\w+)_class_init/) {
|
||||
$typename = StudCaps($1);
|
||||
$fstr = "";
|
||||
|
||||
do {
|
||||
$fstr .= $lines[$linenum++];
|
||||
} until ($lines[$linenum] =~ /^}/);
|
||||
|
||||
parse_init_func ($typename, $fstr);
|
||||
}
|
||||
|
||||
$linenum++;
|
||||
}
|
||||
|
||||
sub parse_init_func
|
||||
{
|
||||
my ($class, $func) = @_;
|
||||
my @init_lines = split (/\n/, $func);
|
||||
|
||||
my $linenum = 0;
|
||||
while ($linenum < @init_lines) {
|
||||
|
||||
my $line = $init_lines[$linenum];
|
||||
|
||||
while ($linenum < @init_lines) {
|
||||
$line = $init_lines[$linenum];
|
||||
if ($line =~ /g_object_class_install_prop/) {
|
||||
my $prop = $line;
|
||||
do {
|
||||
$prop .= $init_lines[++$linenum];
|
||||
} until ($init_lines[$linenum] =~ /;/);
|
||||
print_prop ($prop, $class);
|
||||
} elsif ($line =~ /g_signal_new/) {
|
||||
my $sig = $line;
|
||||
do {
|
||||
$sig .= $init_lines[++$linenum];
|
||||
} until ($init_lines[$linenum] =~ /;/);
|
||||
print_signal ($sig, $class);
|
||||
}
|
||||
$linenum++;
|
||||
}
|
||||
|
||||
$linenum++;
|
||||
}
|
||||
}
|
||||
|
||||
sub print_signal
|
||||
{
|
||||
my ($spec, $class) = @_;
|
||||
$spec =~ s/\n\s*//g;
|
||||
|
||||
$spec =~ /\((.*)\);/;
|
||||
my @args = split (/,\s*/, $1);
|
||||
|
||||
$args[0] =~ /\w+/;
|
||||
my $name = $&;
|
||||
|
||||
my $ret = $args[8];
|
||||
if ($ret =~ /G_TYPE_(\w+)/) {
|
||||
$ret = lc ($1);
|
||||
}
|
||||
|
||||
my $param_cnt = $args[9];
|
||||
|
||||
my $pstr = "\t<signal name=\"$name\">\n";
|
||||
$pstr .= "\t\t<return> $ret </return>\n";
|
||||
if ($param_cnt) {
|
||||
$pstr .= "\t\t<parameters>\n";
|
||||
for ($i=0; $i < $param_cnt; $i++) {
|
||||
if ($args[$i+10] =~ /G_TYPE_(\w+)/) {
|
||||
$args[$i+10] = lc ($1);
|
||||
}
|
||||
$pstr .= "\t\t\t<param> $args[$i+10] </param>\n";
|
||||
}
|
||||
$pstr .= "\t\t</parameters>\n";
|
||||
}
|
||||
$pstr .= "\t</signal>\n\n";
|
||||
|
||||
$signals{$name} = $pstr;
|
||||
}
|
||||
|
||||
sub print_prop
|
||||
{
|
||||
my ($spec, $class) = @_;
|
||||
|
||||
$spec =~ /g_param_spec_(\w+)\s*\((.*)/;
|
||||
$type = $1;
|
||||
$params = $2;
|
||||
|
||||
if ($type =~ /boolean|^u*int|pointer/) {
|
||||
$params =~ /\"(.+)\",.+\".+\".+\"(.+)\".*(,\s*G_PARAM_\w+.*)\)\s*\)/;
|
||||
$name = $1; $docs = $2; $mode = $3;
|
||||
$type = "g$type";
|
||||
} elsif ($type =~ /string/) {
|
||||
$params =~ /\"(.+)\",.+\".+\".+\"(.+)\".*(,\s*G_PARAM_\w+.*)\)\s*\)/;
|
||||
$name = $1; $docs = $2; $mode = $3;
|
||||
$type = "gchar*";
|
||||
} elsif ($type =~ /enum|flags/) {
|
||||
$params =~ /\"(.+)\",.+,.+\"(.+)\".*,\s+(\w+),.*,(\s*G_PARAM_\w+.*)\)\s*\)/;
|
||||
$name = $1; $docs = $2; $type = $3; $mode = $4;
|
||||
$type =~ s/TYPE_//;
|
||||
$type = StudCaps(lc($type));
|
||||
} elsif ($type =~ /object/) {
|
||||
$params =~ /\"(.+)\",.+,.+\"(.+)\".*,\s+(\w+),(\s*G_PARAM_\w+.*)\)\s*\)/;
|
||||
$name = $1; $docs = $2; $type = $3; $mode = $4;
|
||||
$type =~ s/TYPE_//;
|
||||
$type = StudCaps(lc($type));
|
||||
}
|
||||
|
||||
|
||||
print "(define-property $name\n";
|
||||
print " (of-object \"$class\")\n";
|
||||
print " (prop-type \"$type\")\n";
|
||||
print " (doc-string \"$docs\")\n";
|
||||
|
||||
if ($mode =~ /READ/) { print " (readable #t)\n"; }
|
||||
if ($mode =~ /WRIT/) { print " (writeable #t)\n"; }
|
||||
if ($mode =~ /CONS/) { print " (construct-only #t)\n"; }
|
||||
|
||||
print ")\n\n";
|
||||
|
||||
$props{$name} = $pstr;
|
||||
}
|
||||
|
||||
sub StudCaps
|
||||
{
|
||||
my ($str) = @_;
|
||||
|
||||
$str =~ s/^(\w)/\u\1/;
|
||||
$str =~ s/[_-]([a-z])/\u\1/g;
|
||||
$str =~ s/[_-](\d)/\1/g;
|
||||
return $str;
|
||||
}
|
282
codegen/gtk-props.defs
Normal file
282
codegen/gtk-props.defs
Normal file
|
@ -0,0 +1,282 @@
|
|||
(define-property name
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gchar*")
|
||||
(doc-string "The name of the widget")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property parent
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "GtkContainer")
|
||||
(doc-string "The parent widget of this widget. Must be a Container widget.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property width_request
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gint")
|
||||
(doc-string "Override for width request of the widget, or -1 if natural request should be used.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property height_request
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gint")
|
||||
(doc-string "Override for height request of the widget, or -1 if natural request should be used.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property visible
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "Whether the widget is visible")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property sensitive
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "Whether the widget responds to input")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property app_paintable
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "Whether the application will paint directly on the widget")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property can_focus
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "Whether the widget can accept the input focus")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property has_focus
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "Whether the widget has the input focus")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property can_default
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "Whether the widget can be the default widget")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property has_default
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "Whether the widget is the default widget")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property receives_default
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "If TRUE, the widget will receive the default action when it is focused.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property composite_child
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "Whether the widget is composed of other widgets")
|
||||
(readable #t)
|
||||
)
|
||||
|
||||
(define-property style
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "GtkStyle")
|
||||
(doc-string "The style of the widget, which contains information about how it will look (colors etc).")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property events
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "GdkEventMask")
|
||||
(doc-string "The event mask that decides what kind of GdkEvents this widget gets.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property extension_events
|
||||
(of-object "GtkWidget")
|
||||
(prop-type "GdkExtensionMode")
|
||||
(doc-string "The mask that decides what kind of extension events this widget gets.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property user_data
|
||||
(of-object "GtkObject")
|
||||
(prop-type "gpointer")
|
||||
(doc-string "Anonymous User Data Pointer")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property resize_mode
|
||||
(of-object "GtkContainer")
|
||||
(prop-type "GtkResizeMode")
|
||||
(doc-string "Specify how resize events are handled")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property border_width
|
||||
(of-object "GtkContainer")
|
||||
(prop-type "guint")
|
||||
(doc-string "The width of the empty border outside the containers children.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property child
|
||||
(of-object "GtkContainer")
|
||||
(prop-type "GtkWidget")
|
||||
(doc-string "Can be used to add a new child to the container.")
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property type
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "GtkWindowType")
|
||||
(doc-string "The type of the window")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
(construct-only #t)
|
||||
)
|
||||
|
||||
(define-property title
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "gchar*")
|
||||
(doc-string "The title of the window")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property allow_shrink
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "If TRUE, the window has no mimimum size. Setting this to TRUE is 99% of the time a bad idea.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property allow_grow
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "If TRUE, users can expand the window beyond its minimum size.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property resizable
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "If TRUE, users can resize the window.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property modal
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "If TRUE, the window is modal (other windows are not usable while this one is up).")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property window_position
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "GtkWindowPosition")
|
||||
(doc-string "The initial position of the window.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property default_width
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "gint")
|
||||
(doc-string "The default width of the window, used when initially showing the window.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property default_height
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "gint")
|
||||
(doc-string "The default height of the window, used when initially showing the window.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property destroy_with_parent
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "If this window should be destroyed when the parent is destroyed")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property icon
|
||||
(of-object "GtkWindow")
|
||||
(prop-type "GdkPixbuf")
|
||||
(doc-string "Icon for this window")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
||||
(define-property label
|
||||
(of-object "GtkButton")
|
||||
(prop-type "gchar*")
|
||||
(doc-string "Text of the label widget inside the button, if the button contains a label widget.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
(construct-only #t)
|
||||
)
|
||||
|
||||
(define-property use_underline
|
||||
(of-object "GtkButton")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
(construct-only #t)
|
||||
)
|
||||
|
||||
(define-property use_stock
|
||||
(of-object "GtkButton")
|
||||
(prop-type "gboolean")
|
||||
(doc-string "If set, the label is used to pick a stock item instead of being displayed")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
(construct-only #t)
|
||||
)
|
||||
|
||||
(define-property relief
|
||||
(of-object "GtkButton")
|
||||
(prop-type "GtkReliefStyle")
|
||||
(doc-string "The border relief style.")
|
||||
(readable #t)
|
||||
(writeable #t)
|
||||
)
|
||||
|
15379
codegen/gtk.defs
Normal file
15379
codegen/gtk.defs
Normal file
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@ all:
|
|||
@echo "'make unix' is broken for now."
|
||||
|
||||
windows:
|
||||
./defs-parse.pl < gtk-types.defs
|
||||
cat gdk-types.defs gtk-types.defs gtk-props.defs gtk.defs | ./defs-parse.pl
|
||||
|
||||
unix:
|
||||
@echo "'make unix' is broken for now."
|
||||
|
|
Loading…
Reference in a new issue