From a009cc06a3dcd61e59152c755ba6c70c1fb5c503 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Wed, 22 Jun 2011 08:50:56 -0700 Subject: [PATCH] Added C declarations for GIO; created gtk/Includes/gio/. Also created gtk/Includes/glib/. Moved randoms out of gtk.cdecl into their "home" files, e.g. Includes/gtkscrolledwindow.cdecl. --- src/gtk/Includes/gdk.cdecl | 12 -- src/gtk/Includes/gio/gcancellable.cdecl | 10 ++ src/gtk/Includes/gio/gfile.cdecl | 35 ++++++ src/gtk/Includes/gio/ginputstream.cdecl | 33 ++++++ src/gtk/Includes/gio/gio.cdecl | 108 ++++++++++++++++++ src/gtk/Includes/gio/giotypes.cdecl | 9 ++ src/gtk/Includes/glib-object.cdecl | 20 ++++ src/gtk/Includes/glib.cdecl | 15 ++- src/gtk/Includes/{ => glib}/gerror.cdecl | 0 src/gtk/Includes/{ => glib}/gquark.cdecl | 0 src/gtk/Includes/glib/gtypes.cdecl | 38 ++++++ src/gtk/Includes/glib/gvariant.cdecl | 41 +++++++ src/gtk/Includes/{ => gobject}/genums.cdecl | 2 +- src/gtk/Includes/{ => gobject}/gobject.cdecl | 8 +- src/gtk/Includes/{ => gobject}/gparam.cdecl | 0 .../Includes/{ => gobject}/gparamspecs.cdecl | 6 +- src/gtk/Includes/{ => gobject}/gsignal.cdecl | 4 +- src/gtk/Includes/{ => gobject}/gtype.cdecl | 2 +- src/gtk/Includes/{ => gobject}/gvalue.cdecl | 0 .../Includes/{ => gobject}/gvaluetypes.cdecl | 2 +- src/gtk/Includes/gtk.cdecl | 6 +- src/gtk/Includes/gtkcontainer.cdecl | 18 +++ src/gtk/Includes/gtkscrolledwindow.cdecl | 19 +++ src/gtk/Includes/gtktogglebutton.cdecl | 12 ++ src/gtk/Includes/gtypes.cdecl | 59 ---------- src/gtk/Makefile-fragment | 22 +++- src/gtk/gtk.cdecl | 90 +++++---------- 27 files changed, 418 insertions(+), 153 deletions(-) create mode 100644 src/gtk/Includes/gio/gcancellable.cdecl create mode 100644 src/gtk/Includes/gio/gfile.cdecl create mode 100644 src/gtk/Includes/gio/ginputstream.cdecl create mode 100644 src/gtk/Includes/gio/gio.cdecl create mode 100644 src/gtk/Includes/gio/giotypes.cdecl create mode 100644 src/gtk/Includes/glib-object.cdecl rename src/gtk/Includes/{ => glib}/gerror.cdecl (100%) rename src/gtk/Includes/{ => glib}/gquark.cdecl (100%) create mode 100644 src/gtk/Includes/glib/gtypes.cdecl create mode 100644 src/gtk/Includes/glib/gvariant.cdecl rename src/gtk/Includes/{ => gobject}/genums.cdecl (94%) rename src/gtk/Includes/{ => gobject}/gobject.cdecl (97%) rename src/gtk/Includes/{ => gobject}/gparam.cdecl (100%) rename src/gtk/Includes/{ => gobject}/gparamspecs.cdecl (97%) rename src/gtk/Includes/{ => gobject}/gsignal.cdecl (88%) rename src/gtk/Includes/{ => gobject}/gtype.cdecl (97%) rename src/gtk/Includes/{ => gobject}/gvalue.cdecl (100%) rename src/gtk/Includes/{ => gobject}/gvaluetypes.cdecl (97%) create mode 100644 src/gtk/Includes/gtkcontainer.cdecl create mode 100644 src/gtk/Includes/gtkscrolledwindow.cdecl create mode 100644 src/gtk/Includes/gtktogglebutton.cdecl delete mode 100644 src/gtk/Includes/gtypes.cdecl diff --git a/src/gtk/Includes/gdk.cdecl b/src/gtk/Includes/gdk.cdecl index 7bc7cbd4d..8e30e3def 100644 --- a/src/gtk/Includes/gdk.cdecl +++ b/src/gtk/Includes/gdk.cdecl @@ -2,18 +2,6 @@ gtk-2.0/gdk/gdk.h |# -(include "gtypes") -;; gtypes.scm does not seem to be the place for this. -(include "gtype") -(include "gquark") -(include "genums") -(include "gobject") -(include "gvalue") -(include "gvaluetypes") -(include "gparam") -(include "gparamspecs") -(include "gsignal") - (include "gdkcairo") (include "gdkcolor") (include "gdkcursor") diff --git a/src/gtk/Includes/gio/gcancellable.cdecl b/src/gtk/Includes/gio/gcancellable.cdecl new file mode 100644 index 000000000..b05c1b002 --- /dev/null +++ b/src/gtk/Includes/gio/gcancellable.cdecl @@ -0,0 +1,10 @@ +#| -*-Scheme-*- + +glib-2.0/gio/gcancellable.h |# + +(extern (* GCancellable) + g_cancellable_new) + +(extern void + g_cancellable_cancel + (cancellable (* GCancellable))) \ No newline at end of file diff --git a/src/gtk/Includes/gio/gfile.cdecl b/src/gtk/Includes/gio/gfile.cdecl new file mode 100644 index 000000000..8cdc9e090 --- /dev/null +++ b/src/gtk/Includes/gio/gfile.cdecl @@ -0,0 +1,35 @@ +#| -*-Scheme-*- + +glib-2.0/gio/gfile.h |# + +(extern (* GFile) + g_file_new_for_uri + (uri (* gchar))) + +(extern void + g_file_read_async + (file (* GFile)) + (io_priority int) + (cancellable (* GCancellable)) + (CALLBACK GAsyncReadyCallback) + (ID gpointer)) + +(extern (* GFileInputStream) + g_file_read_finish + (file (* GFile)) + (res (* GAsyncResult)) + (error (* (* GError)))) + +(extern void + g_file_open_readwrite_async + (file (* GFile)) + (io_priority int) + (cancellable (* GCancellable)) + (CALLBACK GAsyncReadyCallback) + (ID gpointer)) + +(extern (* GFileIOStream) + g_file_open_readwrite_finish + (file (* GFile)) + (res (* GAsyncResult)) + (error (* (* GError)))) \ No newline at end of file diff --git a/src/gtk/Includes/gio/ginputstream.cdecl b/src/gtk/Includes/gio/ginputstream.cdecl new file mode 100644 index 000000000..1c69ed58d --- /dev/null +++ b/src/gtk/Includes/gio/ginputstream.cdecl @@ -0,0 +1,33 @@ +#| -*-Scheme-*- + +glib-2.0/gio/ginputstream.h |# + +(extern void + g_input_stream_close_async + (stream (* GInputStream)) + (io_priority int) + (cancellable (* GCancellable)) + (callback GAsyncReadyCallback) + (user_data gpointer)) + +(extern gboolean + g_input_stream_close_finish + (stream (* GInputStream)) + (result (* GAsyncResult)) + (error (* (* GError)))) + +(extern void + g_input_stream_read_async + (stream (* GInputStream)) + (buffer (* void)) + (count gsize) + (io_priority int) + (cancellable (* GCancellable)) + (CALLBACK GAsyncReadyCallback) + (ID gpointer)) + +(extern gssize + g_input_stream_read_finish + (stream (* GInputStream)) + (result (* GAsyncResult)) + (error (* (* GError)))) \ No newline at end of file diff --git a/src/gtk/Includes/gio/gio.cdecl b/src/gtk/Includes/gio/gio.cdecl new file mode 100644 index 000000000..a4b1b4a77 --- /dev/null +++ b/src/gtk/Includes/gio/gio.cdecl @@ -0,0 +1,108 @@ +#| -*-Scheme-*- + +glib-2.0/gio/gio.h |# + +(include "giotypes") + +;(include "gappinfo") +;(include "gaction") +;(include "gsimpleaction") +;(include "gactiongroup") +;(include "gsimpleactiongroup") +;(include "gapplication") +;(include "gapplicationcommandline") +;(include "gasyncinitable") +;(include "gasyncresult") +;(include "gbufferedinputstream") +;(include "gbufferedoutputstream") +(include "gcancellable") +;(include "gcharsetconverter") +;(include "gcontenttype") +;(include "gconverter") +;(include "gconverterinputstream") +;(include "gconverteroutputstream") +;(include "gcredentials") +;(include "gdatainputstream") +;(include "gdataoutputstream") +;(include "gdbusaddress") +;(include "gdbusauthobserver") +;(include "gdbusconnection") +;(include "gdbuserror") +;(include "gdbusintrospection") +;(include "gdbusmessage") +;(include "gdbusmethodinvocation") +;(include "gdbusnameowning") +;(include "gdbusnamewatching") +;(include "gdbusproxy") +;(include "gdbusserver") +;(include "gdbusutils") +;(include "gdrive") +;(include "gemblemedicon") +;(include "gfileattribute") +;(include "gfileenumerator") +(include "gfile") +;(include "gfileicon") +;(include "gfileinfo") +;(include "gfileinputstream") +;(include "gfileiostream") +;(include "gfilemonitor") +;(include "gfilenamecompleter") +;(include "gfileoutputstream") +;(include "gfilterinputstream") +;(include "gfilteroutputstream") +;(include "gicon") +;(include "ginetaddress") +;(include "ginetsocketaddress") +;(include "ginitable") +(include "ginputstream") +;(include "gioenums") +;(include "gioenumtypes") +;(include "gioerror") +;(include "giomodule") +;(include "gioscheduler") +;(include "giostream") +;(include "gloadableicon") +;(include "gmemoryinputstream") +;(include "gmemoryoutputstream") +;(include "gmount") +;(include "gmountoperation") +;(include "gnativevolumemonitor") +;(include "gnetworkaddress") +;(include "gnetworkservice") +;(include "goutputstream") +;(include "gpermission") +;(include "gpollableinputstream") +;(include "gpollableoutputstream") +;(include "gproxy") +;(include "gproxyaddress") +;(include "gproxyaddressenumerator") +;(include "gproxyresolver") +;(include "gresolver") +;(include "gseekable") +;(include "gsettings") +;(include "gsimpleasyncresult") +;(include "gsimplepermission") +;(include "gsocketaddressenumerator") +;(include "gsocketaddress") +;(include "gsocketclient") +;(include "gsocketconnectable") +;(include "gsocketconnection") +;(include "gsocketcontrolmessage") +;(include "gsocket") +;(include "gsocketlistener") +;(include "gsocketservice") +;(include "gsrvtarget") +;(include "gtcpconnection") +;(include "gtcpwrapperconnection") +;(include "gthemedicon") +;(include "gthreadedsocketservice") +;(include "gtlsbackend") +;(include "gtlscertificate") +;(include "gtlsclientconnection") +;(include "gtlsconnection") +;(include "gtlsserverconnection") +;(include "gvfs") +;(include "gvolume") +;(include "gvolumemonitor") +;(include "gzlibcompressor") +;(include "gzlibdecompressor") \ No newline at end of file diff --git a/src/gtk/Includes/gio/giotypes.cdecl b/src/gtk/Includes/gio/giotypes.cdecl new file mode 100644 index 000000000..f3c875b5a --- /dev/null +++ b/src/gtk/Includes/gio/giotypes.cdecl @@ -0,0 +1,9 @@ +#| -*-Scheme-*- + +glib-2.0/gio/giotypes.h |# + +(typedef GAsyncReadyCallback + (* (function void + (source_object (* GObject)) + (res (* GAsyncResult)) + (user_data gpointer)))) \ No newline at end of file diff --git a/src/gtk/Includes/glib-object.cdecl b/src/gtk/Includes/glib-object.cdecl new file mode 100644 index 000000000..554508f9c --- /dev/null +++ b/src/gtk/Includes/glib-object.cdecl @@ -0,0 +1,20 @@ +#| -*-Scheme-*- + +glib-2.0/glib-object.h |# + +;;; topmost include file for GObject header files + +;(include "gobject/gbinding") +;(include "gobject/gboxed") +(include "gobject/genums") +(include "gobject/gobject") +(include "gobject/gparam") +(include "gobject/gparamspecs") +(include "gobject/gsignal") +;(include "gobject/gsourceclosure") +(include "gobject/gtype") +;(include "gobject/gtypemodule") +;(include "gobject/gtypeplugin") +(include "gobject/gvalue") +;(include "gobject/gvaluearray") +(include "gobject/gvaluetypes") \ No newline at end of file diff --git a/src/gtk/Includes/glib.cdecl b/src/gtk/Includes/glib.cdecl index 289d3a81a..9287bb501 100644 --- a/src/gtk/Includes/glib.cdecl +++ b/src/gtk/Includes/glib.cdecl @@ -8,17 +8,21 @@ glib-2.0/glib.h |# ;(include "glib/gatomic") ;(include "glib/gbacktrace") ;(include "glib/gbase64") +;(include "glib/gbitlock") ;(include "glib/gbookmarkfile") ;(include "glib/gcache") +;(include "glib/gchecksum") ;(include "glib/gcompletion") ;(include "glib/gconvert") ;(include "glib/gdataset") ;(include "glib/gdate") +;(include "glib/gdatetime") ;(include "glib/gdir") -(include "gerror") +(include "glib/gerror") ;(include "glib/gfileutils") ;(include "glib/ghash") ;(include "glib/ghook") +;(include "glib/ghostutils") ;(include "glib/giochannel") ;(include "glib/gkeyfile") ;(include "glib/glist") @@ -31,9 +35,10 @@ glib-2.0/glib.h |# ;(include "glib/gnode") ;(include "glib/goption") ;(include "glib/gpattern") +;(include "glib/gpoll") ;(include "glib/gprimes") ;(include "glib/gqsort") -(include "gquark") +(include "glib/gquark") ;(include "glib/gqueue") ;(include "glib/grand") ;(include "glib/grel") @@ -41,14 +46,18 @@ glib-2.0/glib.h |# ;(include "glib/gscanner") ;(include "glib/gsequence") ;(include "glib/gshell") +;(include "glib/gslice") ;(include "glib/gslist") ;(include "glib/gspawn") ;(include "glib/gstrfuncs") ;(include "glib/gstring") +;(include "glib/gtestutils") ;(include "glib/gthread") ;(include "glib/gthreadpool") ;(include "glib/gtimer") ;(include "glib/gtree") -(include "gtypes") +(include "glib/gtypes") ;(include "glib/gunicode") +;(include "glib/gurifuncs") ;(include "glib/gutils") +(include "glib/gvariant") \ No newline at end of file diff --git a/src/gtk/Includes/gerror.cdecl b/src/gtk/Includes/glib/gerror.cdecl similarity index 100% rename from src/gtk/Includes/gerror.cdecl rename to src/gtk/Includes/glib/gerror.cdecl diff --git a/src/gtk/Includes/gquark.cdecl b/src/gtk/Includes/glib/gquark.cdecl similarity index 100% rename from src/gtk/Includes/gquark.cdecl rename to src/gtk/Includes/glib/gquark.cdecl diff --git a/src/gtk/Includes/glib/gtypes.cdecl b/src/gtk/Includes/glib/gtypes.cdecl new file mode 100644 index 000000000..993b6df7f --- /dev/null +++ b/src/gtk/Includes/glib/gtypes.cdecl @@ -0,0 +1,38 @@ +#| -*-Scheme-*- + +glib-2.0/glib/gtypes.h |# + +;(include "glibconfig") +(typedef gint8 char) +(typedef gint16 short) +(typedef gint32 int) +(typedef gint64 long) +(typedef guint8 uchar) +(typedef guint16 ushort) +(typedef guint32 uint) +;(typedef guint64 ulonglong) +(typedef gssize int) +(typedef gsize uint) + +(typedef gchar char) +(typedef gshort short) +(typedef glong long) +(typedef gint int) +(typedef gboolean gint) + +(typedef guchar uchar) +(typedef gushort ushort) +(typedef gulong ulong) +(typedef guint uint) + +(typedef gfloat float) +(typedef gdouble double) + +(typedef gpointer (* void)) +(typedef gconstpointer (const (* void))) + +(typedef GTimeVal (struct _GTimeVal)) + +(struct _GTimeVal + (tv_sec glong) + (tv_usec glong)) \ No newline at end of file diff --git a/src/gtk/Includes/glib/gvariant.cdecl b/src/gtk/Includes/glib/gvariant.cdecl new file mode 100644 index 000000000..b108ec5c7 --- /dev/null +++ b/src/gtk/Includes/glib/gvariant.cdecl @@ -0,0 +1,41 @@ +#| -*-Scheme-*- + +glib-2.0/glib/gvariant.h |# + +(include "gquark") +;(include "gvarianttype") +;(include "gstring") + +;(typedef GVariant (struct _GVariant)) + +(typedef GVariantClass + (enum + (G_VARIANT_CLASS_BOOLEAN) + (G_VARIANT_CLASS_BYTE) + (G_VARIANT_CLASS_INT16) + (G_VARIANT_CLASS_UINT16) + (G_VARIANT_CLASS_INT32) + (G_VARIANT_CLASS_UINT32) + (G_VARIANT_CLASS_INT64) + (G_VARIANT_CLASS_UINT64) + (G_VARIANT_CLASS_HANDLE) + (G_VARIANT_CLASS_DOUBLE) + (G_VARIANT_CLASS_STRING) + (G_VARIANT_CLASS_OBJECT_PATH) + (G_VARIANT_CLASS_SIGNATURE) + (G_VARIANT_CLASS_VARIANT) + (G_VARIANT_CLASS_MAYBE) + (G_VARIANT_CLASS_ARRAY) + (G_VARIANT_CLASS_TUPLE) + (G_VARIANT_CLASS_DICT_ENTRY))) + +(extern void g_variant_unref (value (* GVariant))) +(extern (* GVariant) g_variant_ref (value (* GVariant))) +(extern (* GVariant) g_variant_ref_sink (value (* GVariant))) +(extern gboolean g_variant_is_floating (value (* GVariant))) + +;(extern (const (* GVariantType)) g_variant_get_type (value (* GVariant))) +(extern (const (* gchar)) g_variant_get_type_string (value (* GVariant))) +#;(extern gboolean g_variant_is_of_type + (value (* GVariant)) + (type (const (* GVariantType)))) \ No newline at end of file diff --git a/src/gtk/Includes/genums.cdecl b/src/gtk/Includes/gobject/genums.cdecl similarity index 94% rename from src/gtk/Includes/genums.cdecl rename to src/gtk/Includes/gobject/genums.cdecl index da7eb7b60..51f15cde4 100644 --- a/src/gtk/Includes/genums.cdecl +++ b/src/gtk/Includes/gobject/genums.cdecl @@ -2,7 +2,7 @@ glib-2.0/gobject/genums.h |# -;(include "gtype") +(include "gtype") (typedef GEnumClass (struct _GEnumClass)) (typedef GFlagsClass (struct _GFlagsClass)) diff --git a/src/gtk/Includes/gobject.cdecl b/src/gtk/Includes/gobject/gobject.cdecl similarity index 97% rename from src/gtk/Includes/gobject.cdecl rename to src/gtk/Includes/gobject/gobject.cdecl index e00c9d54b..208927f61 100644 --- a/src/gtk/Includes/gobject.cdecl +++ b/src/gtk/Includes/gobject/gobject.cdecl @@ -2,11 +2,11 @@ glib-2.0/gobject/gobject.h |# -;(include "gtype") -;(include "gvalue") -;(include "gparam") +(include "gtype") +(include "gvalue") +(include "gparam") ;(include "gclosure") -;(include "gsignal") +(include "gsignal") (typedef GObject (struct _GObject)) (typedef GObjectClass (struct _GObjectClass)) diff --git a/src/gtk/Includes/gparam.cdecl b/src/gtk/Includes/gobject/gparam.cdecl similarity index 100% rename from src/gtk/Includes/gparam.cdecl rename to src/gtk/Includes/gobject/gparam.cdecl diff --git a/src/gtk/Includes/gparamspecs.cdecl b/src/gtk/Includes/gobject/gparamspecs.cdecl similarity index 97% rename from src/gtk/Includes/gparamspecs.cdecl rename to src/gtk/Includes/gobject/gparamspecs.cdecl index 6e70e4c88..d5deb19d1 100644 --- a/src/gtk/Includes/gparamspecs.cdecl +++ b/src/gtk/Includes/gobject/gparamspecs.cdecl @@ -2,10 +2,10 @@ glib-2.0/gobject/gparamspecs.h |# -;(include "gvalue") -;(include "genums") +(include "gvalue") +(include "genums") ;(include "gboxed") -;(include "gobject") +(include "gobject") (typedef GParamSpecChar (struct _GParamSpecChar)) (typedef GParamSpecUChar (struct _GParamSpecUChar)) diff --git a/src/gtk/Includes/gsignal.cdecl b/src/gtk/Includes/gobject/gsignal.cdecl similarity index 88% rename from src/gtk/Includes/gsignal.cdecl rename to src/gtk/Includes/gobject/gsignal.cdecl index 81903defa..e77a12611 100644 --- a/src/gtk/Includes/gsignal.cdecl +++ b/src/gtk/Includes/gobject/gsignal.cdecl @@ -3,8 +3,8 @@ glib-2.0/gobject/gsignal.h |# ;(include "gclosure") -;(include "gvalue") -;(include "gparam") +(include "gvalue") +(include "gparam") ;(include "gmarshal") (extern gulong g_signal_connect_data diff --git a/src/gtk/Includes/gtype.cdecl b/src/gtk/Includes/gobject/gtype.cdecl similarity index 97% rename from src/gtk/Includes/gtype.cdecl rename to src/gtk/Includes/gobject/gtype.cdecl index 4c953e18a..6855b35c3 100644 --- a/src/gtk/Includes/gtype.cdecl +++ b/src/gtk/Includes/gobject/gtype.cdecl @@ -2,7 +2,7 @@ glib-2.0/gobject/gtype.h |# -(include "glib") +(include "../glib") (enum GFundamentalType (G_TYPE_INVALID) diff --git a/src/gtk/Includes/gvalue.cdecl b/src/gtk/Includes/gobject/gvalue.cdecl similarity index 100% rename from src/gtk/Includes/gvalue.cdecl rename to src/gtk/Includes/gobject/gvalue.cdecl diff --git a/src/gtk/Includes/gvaluetypes.cdecl b/src/gtk/Includes/gobject/gvaluetypes.cdecl similarity index 97% rename from src/gtk/Includes/gvaluetypes.cdecl rename to src/gtk/Includes/gobject/gvaluetypes.cdecl index b23e15e87..4e2292636 100644 --- a/src/gtk/Includes/gvaluetypes.cdecl +++ b/src/gtk/Includes/gobject/gvaluetypes.cdecl @@ -2,7 +2,7 @@ glib-2.0/gobject/gvaluetypes.h |# -;(include "gvalue") +(include "gvalue") (extern void g_value_set_char (value (* GValue)) diff --git a/src/gtk/Includes/gtk.cdecl b/src/gtk/Includes/gtk.cdecl index 3821478a6..c6ae1f275 100644 --- a/src/gtk/Includes/gtk.cdecl +++ b/src/gtk/Includes/gtk.cdecl @@ -38,7 +38,7 @@ gtk-2.0/gtk/gtk.h |# ;(include "gtkcombo") ;(include "gtkcombobox") ;(include "gtkcomboboxentry") -;(include "gtkcontainer") +(include "gtkcontainer") ;(include "gtkctree") ;(include "gtkcurve") ;(include "gtkdialog") @@ -113,7 +113,7 @@ gtk-2.0/gtk/gtk.h |# ;(include "gtkruler") ;(include "gtkscale") ;(include "gtkscrollbar") -;(include "gtkscrolledwindow") +(include "gtkscrolledwindow") ;(include "gtkselection") ;(include "gtkseparator") ;(include "gtkseparatormenuitem") @@ -133,7 +133,7 @@ gtk-2.0/gtk/gtk.h |# ;(include "gtktextview") ;(include "gtktipsquery") ;(include "gtktoggleaction") -;(include "gtktogglebutton") +(include "gtktogglebutton") ;(include "gtktoggletoolbutton") ;(include "gtktoolbar") ;(include "gtktoolbar") diff --git a/src/gtk/Includes/gtkcontainer.cdecl b/src/gtk/Includes/gtkcontainer.cdecl new file mode 100644 index 000000000..faf5cf016 --- /dev/null +++ b/src/gtk/Includes/gtkcontainer.cdecl @@ -0,0 +1,18 @@ +#| -*-Scheme-*- + +gtk+-2.4.0/gtk/gtkcontainer.h |# + +(extern void + gtk_container_add + (container (* GtkContainer)) + (widget (* GtkWidget))) + +(extern void + gtk_container_remove + (container (* GtkContainer)) + (widget (* GtkWidget))) + +(extern void + gtk_container_set_border_width + (container (* GtkContainer)) + (border_width guint)) \ No newline at end of file diff --git a/src/gtk/Includes/gtkscrolledwindow.cdecl b/src/gtk/Includes/gtkscrolledwindow.cdecl new file mode 100644 index 000000000..599a4898e --- /dev/null +++ b/src/gtk/Includes/gtkscrolledwindow.cdecl @@ -0,0 +1,19 @@ +#| -*-Scheme-*- + +gtk-2.0/gtk/gtkscrolledwindow.h |# + +(extern (* GtkWidget) + gtk_scrolled_window_new + (hadjustment (* GtkAdjustment)) + (vadjustment (* GtkAdjustment))) + +(extern void + gtk_scrolled_window_set_policy + (scrolled_window (* GtkScrolledWindow)) + (hscrollbar_policy GtkPolicyType) + (vscrollbar_policy GtkPolicyType)) + +(extern void + gtk_scrolled_window_set_placement + (scrolled_window (* GtkScrolledWindow)) + (window_placement GtkCornerType)) \ No newline at end of file diff --git a/src/gtk/Includes/gtktogglebutton.cdecl b/src/gtk/Includes/gtktogglebutton.cdecl new file mode 100644 index 000000000..2a24310a3 --- /dev/null +++ b/src/gtk/Includes/gtktogglebutton.cdecl @@ -0,0 +1,12 @@ +#| -*-Scheme-*- + +gtk-2.0/gtk/gtktogglebutton.h |# + +(extern void + gtk_toggle_button_set_active + (toggle_button (* GtkToggleButton)) + (is_active gboolean)) + +(extern gboolean + gtk_toggle_button_get_active + (toggle_button (* GtkToggleButton))) \ No newline at end of file diff --git a/src/gtk/Includes/gtypes.cdecl b/src/gtk/Includes/gtypes.cdecl deleted file mode 100644 index 82c82454f..000000000 --- a/src/gtk/Includes/gtypes.cdecl +++ /dev/null @@ -1,59 +0,0 @@ -#| -*-Scheme-*- - -glib-2.0/glib/gtypes.h |# - -;(include "glibconfig") -(typedef gint8 char) -(typedef gint16 short) -(typedef gint32 int) -(typedef gint64 long) -(typedef guint8 uchar) -(typedef guint16 ushort) -(typedef guint32 uint) -;(typedef guint64 ulonglong) -(typedef gssize int) -(typedef gsize uint) - -(typedef gchar char) -(typedef gshort short) -(typedef glong long) -(typedef gint int) -(typedef gboolean gint) - -(typedef guchar uchar) -(typedef gushort ushort) -(typedef gulong ulong) -(typedef guint uint) - -(typedef gfloat float) -(typedef gdouble double) - -(typedef gpointer (* void)) -(typedef gconstpointer (const (* void))) - -#| - -typedef gint (*GCompareFunc) (gconstpointer a, - gconstpointer b); -typedef gint (*GCompareDataFunc) (gconstpointer a, - gconstpointer b, - gpointer user_data); -typedef gboolean (*GEqualFunc) (gconstpointer a, - gconstpointer b); -typedef void (*GDestroyNotify) (gpointer data); -typedef void (*GFunc) (gpointer data, - gpointer user_data); -typedef guint (*GHashFunc) (gconstpointer key); -typedef void (*GHFunc) (gpointer key, - gpointer value, - gpointer user_data); -typedef void (*GFreeFunc) (gpointer data); -typedef const gchar * (*GTranslateFunc) (const gchar *str, - gpointer data); -|# - -(typedef GTimeVal (struct _GTimeVal)) - -(struct _GTimeVal - (tv_sec glong) - (tv_usec glong)) \ No newline at end of file diff --git a/src/gtk/Makefile-fragment b/src/gtk/Makefile-fragment index 0da5333a3..8428f3fec 100644 --- a/src/gtk/Makefile-fragment +++ b/src/gtk/Makefile-fragment @@ -1,5 +1,24 @@ #-*-Makefile-*- # gtk/Makefile-fragment +# +# Copyright (C) 2011 Matthew Birkholz +# +# This file is part of MIT/GNU Scheme. +# +# MIT/GNU Scheme is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# MIT/GNU Scheme is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with MIT/GNU Scheme; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +# 02110-1301, USA. TARGET_DIR = $(AUXDIR)/gtk @@ -60,7 +79,8 @@ gtkio.c: gtkio.c.stay gtk-shim.o: gtk-shim.c gtk-shim.h ../lib/mit-scheme.h $(COMPILE_SHIM) `pkg-config --cflags gtk+-2.0` -o $@ -c $< -gtk-shim.c gtk-const.c gtk-types.bin: gtk.cdecl Includes/*.cdecl +gtk-shim.c gtk-const.c gtk-types.bin: gtk-shim.h gtk.cdecl \ + Includes/*.cdecl Includes/*/*.cdecl ( echo "(load-option 'FFI)"; \ echo '(C-generate "gtk" "#include \"gtk-shim.h\"")' ) \ | ../microcode/scheme --library ../lib --batch-mode diff --git a/src/gtk/gtk.cdecl b/src/gtk/gtk.cdecl index c00c17762..d12ddbcbd 100644 --- a/src/gtk/gtk.cdecl +++ b/src/gtk/gtk.cdecl @@ -1,6 +1,6 @@ #| -*-Scheme-*- -Copyright (C) 2007, 2008, 2009, 2010 Matthew Birkholz +Copyright (C) 2007, 2008, 2009, 2010, 2011 Matthew Birkholz This file is part of MIT/GNU Scheme. @@ -23,16 +23,26 @@ USA. ;;;; C declarations for gtk.so. - -(include "Includes/gdkkeysyms") +(include "Includes/glib") +(include "Includes/glib-object") +(include "Includes/gio/gio") (include "Includes/gdk-pixbuf") +(include "Includes/gdkkeysyms") (include "Includes/gtk") (include "Includes/pango") (include "Includes/cairo") ;;(include "Includes/cairo-xlib") Needs definitions for Drawable, Display... (include "Includes/pangocairo") -;;; GtkIO +;;; gio.scm + +(callback void + async_ready + (source (* GObject)) + (res (* GAsyncResult)) + (ID gpointer)) + +;;; gtkio.c (extern gboolean start_gtk (argc_loc (* int)) (argv_loc (* (* (* char))))) (extern void stop_gtk) @@ -42,15 +52,25 @@ USA. (extern gboolean gtk_select_trace_p) (extern void gtk_select_trace (trace_p gboolean)) -;;; ScmWidget +;;; scmwidget.c (typedef ScmWidget (struct _ScmWidget (widget GtkWidget))) (extern (* GtkWidget) scm_widget_new) - +;;; miscellaneous + +(extern void g_free ;glib-2.8.6/glib/gmem.h + (mem gpointer)) + +(extern (* GtkWidget) ;gtk+-2.4.0/gtk/gtkbutton.h + gtk_button_new) + +(extern (* GtkWidget) ;gtk+-2.20.1/gtk/gtkcheckbutton.h + gtk_check_button_new) + ;;; Signal handlers. (callback void destroy @@ -114,60 +134,4 @@ USA. (y gint) (width gint) (height gint) - (ID gpointer)) - - -;;; Random - -(extern void g_free ;glib-2.8.6/glib/gmem.h - (mem gpointer)) - -(extern gboolean gtk_init_check - (argc (* int)) - (argv (* (* (* char))))) - -(extern void ;gtk+-2.4.0/gtk/gtkcontainer.h - gtk_container_add - (container (* GtkContainer)) - (widget (* GtkWidget))) - -(extern void ;gtk+-2.4.0/gtk/gtkcontainer.h - gtk_container_remove - (container (* GtkContainer)) - (widget (* GtkWidget))) - -(extern void ;gtk+-2.4.0/gtk/gtkcontainer.h - gtk_container_set_border_width - (container (* GtkContainer)) - (border_width guint)) - -(extern (* GtkWidget) ;gtk+-2.4.0/gtk/gtkbutton.h - gtk_button_new) - -(extern (* GtkWidget) ;gtk+-2.20.1/gtk/gtkcheckbutton.h - gtk_check_button_new) - -(extern void ;gtk+-2.20.1/gtk/gtktogglebutton.h - gtk_toggle_button_set_active - (toggle_button (* GtkToggleButton)) - (is_active gboolean)) - -(extern gboolean ;gtk+-2.20.1/gtk/gtktogglebutton.h - gtk_toggle_button_get_active - (toggle_button (* GtkToggleButton))) - -(extern (* GtkWidget) ;gtk+-2.8.20/gtk/gtkscrolledwindow.h - gtk_scrolled_window_new - (hadjustment (* GtkAdjustment)) - (vadjustment (* GtkAdjustment))) - -(extern void ;gtk+-2.8.20/gtk/gtkscrolledwindow.h - gtk_scrolled_window_set_policy - (scrolled_window (* GtkScrolledWindow)) - (hscrollbar_policy GtkPolicyType) - (vscrollbar_policy GtkPolicyType)) - -(extern void ;gtk+-2.8.20/gtk/gtkscrolledwindow.h - gtk_scrolled_window_set_placement - (scrolled_window (* GtkScrolledWindow)) - (window_placement GtkCornerType)) \ No newline at end of file + (ID gpointer)) \ No newline at end of file -- 2.25.1