2002-08-12 Rachel Hestilow <hestilow@ximian.com>
[ Patch from Ricardo Fernandez Pascual <rfp1@ono.com> for libglade support (slightly modified) ] * configure.in: Conditionally compile glade support. * makefile: Add glade directory. * glade/: Added. * sample/makefile.in: Add (conditional) glade example. * sample/GladeViewer.cs: Added. * glue/gladexml.c: Added. * glue/Makefile.am: Updated. * parser/build.pl: Parse libglade-2.0.0. * parser/README: Update requirements. 2002-08-12 Rachel Hestilow <hestilow@ximian.com> * parser/gapi_pp.pl: Handle "typedef struct {...}" construct. * glue/canvaspoints.c: Added. * glue/Makefile.am: Updated. * gnome/CanvasPoints.custom: Added. (Doesn't seem to work right yet, looking into this.) svn path=/trunk/gtk-sharp/; revision=6601
This commit is contained in:
parent
a5d2c9f567
commit
e6ea0015b5
16 changed files with 616 additions and 43 deletions
26
ChangeLog
26
ChangeLog
|
@ -1,3 +1,29 @@
|
|||
2002-08-12 Rachel Hestilow <hestilow@ximian.com>
|
||||
|
||||
[ Patch from Ricardo Fernandez Pascual <rfp1@ono.com> for
|
||||
libglade support (slightly modified) ]
|
||||
|
||||
* configure.in: Conditionally compile glade support.
|
||||
* makefile: Add glade directory.
|
||||
* glade/: Added.
|
||||
* sample/makefile.in: Add (conditional) glade example.
|
||||
* sample/GladeViewer.cs: Added.
|
||||
* glue/gladexml.c: Added.
|
||||
* glue/Makefile.am: Updated.
|
||||
|
||||
* parser/build.pl: Parse libglade-2.0.0.
|
||||
* parser/README: Update requirements.
|
||||
|
||||
2002-08-12 Rachel Hestilow <hestilow@ximian.com>
|
||||
|
||||
* parser/gapi_pp.pl: Handle "typedef struct {...}" construct.
|
||||
|
||||
* glue/canvaspoints.c: Added.
|
||||
* glue/Makefile.am: Updated.
|
||||
|
||||
* gnome/CanvasPoints.custom: Added. (Doesn't seem to work right yet,
|
||||
looking into this.)
|
||||
|
||||
2002-08-10 Rachel Hestilow <hestilow@ximian.com>
|
||||
|
||||
* sample/TreeViewDemo.cs (Main, DeleteCB): Update to use correct
|
||||
|
|
12
configure.in
12
configure.in
|
@ -67,15 +67,18 @@ if test "x$enable_gnome" = "xno"; then
|
|||
PKG_CHECK_MODULES(BASE_DEPENDENCIES, gtk+-2.0 >= $GTK_REQUIRED_VERSION gmodule-2.0 >= $GTK_REQUIRED_VERSION)
|
||||
fi
|
||||
|
||||
#GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
|
||||
#GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
|
||||
#GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
|
||||
#GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
|
||||
GLADE_REQUIRED_VERSION=2.0.0
|
||||
PKG_CHECK_MODULES(GLADE_DEPENDENCIES, libglade-2.0 >= $GLADE_REQUIRED_VERSION, enable_glade=yes, enable_glade=no)
|
||||
if test "x$enable_glade" = "xyes"; then
|
||||
BASE_DEPENDENCIES_CFLAGS="$BASE_DEPENDENCIES_CFLAGS $GLADE_DEPENDENCIES_CFLAGS"
|
||||
BASE_DEPENDENCIES_LIBS="$BASE_DEPENDENCIES_LIBS $GLADE_DEPENDENCIES_LIBS"
|
||||
fi
|
||||
|
||||
AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
|
||||
AC_SUBST(BASE_DEPENDENCIES_LIBS)
|
||||
|
||||
AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_gnome" = "xyes")
|
||||
AM_CONDITIONAL(ENABLE_GLADE, test "x$enable_glade" = "xyes")
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
|
@ -86,6 +89,7 @@ pango/Makefile
|
|||
atk/Makefile
|
||||
gdk/Makefile
|
||||
gtk/Makefile
|
||||
glade/Makefile
|
||||
gnome/Makefile
|
||||
sample/Makefile
|
||||
])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<api>
|
||||
<namespace name="Gnome" library="gnomecanvas-2">
|
||||
<object name="Canvas" cname="GnomeCanvas" parent="GtkLayout">
|
||||
|
@ -55,12 +55,6 @@
|
|||
<parameter type="GnomeCanvasBuf*" name="buf"/>
|
||||
</parameters>
|
||||
</signal>
|
||||
<method name="BufEnsureBuf" cname="gnome_canvas_buf_ensure_buf" shared="true">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GnomeCanvasBuf*" name="buf"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="C2w" cname="gnome_canvas_c2w">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
|
@ -160,27 +154,6 @@
|
|||
</method>
|
||||
<constructor cname="gnome_canvas_new"/>
|
||||
<constructor cname="gnome_canvas_new_aa"/>
|
||||
<method name="PointsFree" cname="gnome_canvas_points_free" shared="true">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GnomeCanvasPoints*" name="points"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="PointsGetType" cname="gnome_canvas_points_get_type" shared="true">
|
||||
<return-type type="GType"/>
|
||||
</method>
|
||||
<method name="PointsNew" cname="gnome_canvas_points_new" shared="true">
|
||||
<return-type type="GnomeCanvasPoints*"/>
|
||||
<parameters>
|
||||
<parameter type="int" name="num_points"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="PointsRef" cname="gnome_canvas_points_ref" shared="true">
|
||||
<return-type type="GnomeCanvasPoints*"/>
|
||||
<parameters>
|
||||
<parameter type="GnomeCanvasPoints*" name="points"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="RenderSvp" cname="gnome_canvas_render_svp" shared="true">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
|
@ -818,6 +791,17 @@
|
|||
</method>
|
||||
</object>
|
||||
<struct name="CanvasBpathPriv" cname="GnomeCanvasBpathPriv" opaque="true"/>
|
||||
<struct name="CanvasBuf" cname="GnomeCanvasBuf">
|
||||
<field cname="buf" type="guchar*"/>
|
||||
<field cname="rect" type="ArtIRect"/>
|
||||
<field cname="buf_rowstride" type="int"/>
|
||||
<field cname="bg_color" type="guint32"/>
|
||||
<field cname="is_bg" bits="1" type="unsigned"/>
|
||||
<field cname="is_buf" bits="1" type="unsigned"/>
|
||||
<method name="EnsureBuf" cname="gnome_canvas_buf_ensure_buf">
|
||||
<return-type type="void"/>
|
||||
</method>
|
||||
</struct>
|
||||
<struct name="CanvasPathDef" cname="GnomeCanvasPathDef" opaque="true">
|
||||
<method name="AllClosed" cname="gnome_canvas_path_def_all_closed">
|
||||
<return-type type="gboolean"/>
|
||||
|
@ -960,6 +944,25 @@
|
|||
<return-type type="void"/>
|
||||
</method>
|
||||
</struct>
|
||||
<boxed name="CanvasPoints" cname="GnomeCanvasPoints">
|
||||
<field cname="coords" type="double*"/>
|
||||
<field cname="num_points" type="int"/>
|
||||
<field cname="ref_count" type="int"/>
|
||||
<method name="Free" cname="gnome_canvas_points_free">
|
||||
<return-type type="void"/>
|
||||
</method>
|
||||
<method name="GetType" cname="gnome_canvas_points_get_type" shared="true">
|
||||
<return-type type="GType"/>
|
||||
</method>
|
||||
<constructor cname="gnome_canvas_points_new">
|
||||
<parameters>
|
||||
<parameter type="int" name="num_points"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<method name="Ref" cname="gnome_canvas_points_ref">
|
||||
<return-type type="GnomeCanvasPoints*"/>
|
||||
</method>
|
||||
</boxed>
|
||||
<struct name="CanvasShapePriv" cname="GnomeCanvasShapePriv" opaque="true"/>
|
||||
</namespace>
|
||||
<namespace name="Gdk" library="gdk_pixbuf-2.0">
|
||||
|
@ -3577,6 +3580,19 @@
|
|||
<return-type type="void"/>
|
||||
</method>
|
||||
</object>
|
||||
<struct name="_BRESINFO" cname="BRESINFO">
|
||||
<field cname="minor_axis" type="int"/>
|
||||
<field cname="d" type="int"/>
|
||||
<field cname="m" type="int"/>
|
||||
<field cname="m1" type="int"/>
|
||||
<field cname="incr1" type="int"/>
|
||||
<field cname="incr2" type="int"/>
|
||||
</struct>
|
||||
<struct name="_EdgeTable" cname="EdgeTable">
|
||||
<field cname="ymax" type="int"/>
|
||||
<field cname="ymin" type="int"/>
|
||||
<field cname="scanlines" type="ScanLineList"/>
|
||||
</struct>
|
||||
<object name="Bitmap" cname="GdkBitmap" parent="GdkDrawable">
|
||||
<field cname="parent_instance" type="GObject"/>
|
||||
<method name="CreateFromData" cname="gdk_bitmap_create_from_data" shared="true">
|
||||
|
@ -15771,6 +15787,266 @@
|
|||
<static-string cname="GTK_STOCK_ZOOM_OUT" name="ZoomOut" value="gtk-zoom-out"/>
|
||||
</object>
|
||||
</namespace>
|
||||
<namespace name="Glade" library="glade-2.0">
|
||||
<callback name="ApplyCustomPropFunc" cname="GladeApplyCustomPropFunc">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml"/>
|
||||
<parameter type="GtkWidget*" name="widget"/>
|
||||
<parameter type="const-gchar*" name="propname"/>
|
||||
<parameter type="const-gchar*" name="value"/>
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="BuildChildrenFunc" cname="GladeBuildChildrenFunc">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml"/>
|
||||
<parameter type="GtkWidget*" name="parent"/>
|
||||
<parameter type="GladeWidgetInfo*" name="info"/>
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="FindInternalChildFunc" cname="GladeFindInternalChildFunc">
|
||||
<return-type type="GtkWidget*"/>
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml"/>
|
||||
<parameter type="GtkWidget*" name="parent"/>
|
||||
<parameter type="const-gchar*" name="childname"/>
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="NewFunc" cname="GladeNewFunc">
|
||||
<return-type type="GtkWidget*"/>
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml"/>
|
||||
<parameter type="GType" name="widget_type"/>
|
||||
<parameter type="GladeWidgetInfo*" name="info"/>
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="XMLConnectFunc" cname="GladeXMLConnectFunc">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="handler_name"/>
|
||||
<parameter type="GObject*" name="object"/>
|
||||
<parameter type="const-gchar*" name="signal_name"/>
|
||||
<parameter type="const-gchar*" name="signal_data"/>
|
||||
<parameter type="GObject*" name="connect_object"/>
|
||||
<parameter type="gboolean" name="after"/>
|
||||
<parameter type="gpointer" name="user_data"/>
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="XMLCustomWidgetHandler" cname="GladeXMLCustomWidgetHandler">
|
||||
<return-type type="GtkWidget*"/>
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml"/>
|
||||
<parameter type="gchar*" name="func_name"/>
|
||||
<parameter type="gchar*" name="name"/>
|
||||
<parameter type="gchar*" name="string1"/>
|
||||
<parameter type="gchar*" name="string2"/>
|
||||
<parameter type="gint" name="int1"/>
|
||||
<parameter type="gint" name="int2"/>
|
||||
<parameter type="gpointer" name="user_data"/>
|
||||
</parameters>
|
||||
</callback>
|
||||
<object name="XML" cname="GladeXML" parent="GObject">
|
||||
<field cname="filename" type="char*"/>
|
||||
<field cname="priv" type="GladeXMLPrivate*"/>
|
||||
<method name="BuildWidget" cname="glade_xml_build_widget">
|
||||
<return-type type="GtkWidget*"/>
|
||||
<parameters>
|
||||
<parameter type="GladeWidgetInfo*" name="info"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="Construct" cname="glade_xml_construct">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="fname"/>
|
||||
<parameter type="const-char*" name="root"/>
|
||||
<parameter type="const-char*" name="domain"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="EnsureAccel" cname="glade_xml_ensure_accel">
|
||||
<return-type type="GtkAccelGroup*"/>
|
||||
</method>
|
||||
<method name="GetType" cname="glade_xml_get_type" shared="true">
|
||||
<return-type type="GType"/>
|
||||
</method>
|
||||
<method name="GetWidget" cname="glade_xml_get_widget">
|
||||
<return-type type="GtkWidget*"/>
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="name"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="GetWidgetPrefix" cname="glade_xml_get_widget_prefix">
|
||||
<return-type type="GList*"/>
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="name"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="HandleInternalChild" cname="glade_xml_handle_internal_child">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="parent"/>
|
||||
<parameter type="GladeChildInfo*" name="child_info"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="HandleWidgetProp" cname="glade_xml_handle_widget_prop">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="widget"/>
|
||||
<parameter type="const-gchar*" name="prop_name"/>
|
||||
<parameter type="const-gchar*" name="value_name"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor cname="glade_xml_new">
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="fname"/>
|
||||
<parameter type="const-char*" name="root"/>
|
||||
<parameter type="const-char*" name="domain"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<constructor cname="glade_xml_new_from_buffer">
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="buffer"/>
|
||||
<parameter type="int" name="size"/>
|
||||
<parameter type="const-char*" name="root"/>
|
||||
<parameter type="const-char*" name="domain"/>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<method name="RelativeFile" cname="glade_xml_relative_file">
|
||||
<return-type type="gchar*"/>
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="filename"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SetCommonParams" cname="glade_xml_set_common_params">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="widget"/>
|
||||
<parameter type="GladeWidgetInfo*" name="info"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SetPackingProperty" cname="glade_xml_set_packing_property">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="parent"/>
|
||||
<parameter type="GtkWidget*" name="child"/>
|
||||
<parameter type="const-char*" name="name"/>
|
||||
<parameter type="const-char*" name="value"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SetToplevel" cname="glade_xml_set_toplevel">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GtkWindow*" name="window"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SetValueFromString" cname="glade_xml_set_value_from_string">
|
||||
<return-type type="gboolean"/>
|
||||
<parameters>
|
||||
<parameter type="GParamSpec*" name="pspec"/>
|
||||
<parameter type="const-gchar*" name="string"/>
|
||||
<parameter type="GValue*" name="value"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SignalAutoconnect" cname="glade_xml_signal_autoconnect">
|
||||
<return-type type="void"/>
|
||||
</method>
|
||||
<method name="SignalAutoconnectFull" cname="glade_xml_signal_autoconnect_full">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="GladeXMLConnectFunc" name="func"/>
|
||||
<parameter type="gpointer" name="user_data"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SignalConnect" cname="glade_xml_signal_connect">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="handlername"/>
|
||||
<parameter type="GCallback" name="func"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SignalConnectData" cname="glade_xml_signal_connect_data">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="handlername"/>
|
||||
<parameter type="GCallback" name="func"/>
|
||||
<parameter type="gpointer" name="user_data"/>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SignalConnectFull" cname="glade_xml_signal_connect_full">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="handler_name"/>
|
||||
<parameter type="GladeXMLConnectFunc" name="func"/>
|
||||
<parameter type="gpointer" name="user_data"/>
|
||||
</parameters>
|
||||
</method>
|
||||
</object>
|
||||
<struct name="AccelInfo" cname="GladeAccelInfo">
|
||||
<field cname="key" type="guint"/>
|
||||
<field cname="modifiers" type="GdkModifierType"/>
|
||||
<field cname="signal" type="gchar*"/>
|
||||
</struct>
|
||||
<struct name="AtkActionInfo" cname="GladeAtkActionInfo">
|
||||
<field cname="action_name" type="gchar*"/>
|
||||
<field cname="description" type="gchar*"/>
|
||||
</struct>
|
||||
<struct name="AtkRelationInfo" cname="GladeAtkRelationInfo">
|
||||
<field cname="target" type="gchar*"/>
|
||||
<field cname="type" type="gchar*"/>
|
||||
</struct>
|
||||
<struct name="ChildInfo" cname="GladeChildInfo">
|
||||
<field cname="properties" type="GladeProperty*"/>
|
||||
<field cname="n_properties" type="guint"/>
|
||||
<field cname="child" type="GladeWidgetInfo*"/>
|
||||
<field cname="internal_child" type="gchar*"/>
|
||||
</struct>
|
||||
<struct name="Interface" cname="GladeInterface">
|
||||
<field cname="requires" type="gchar**"/>
|
||||
<field cname="n_requires" type="guint"/>
|
||||
<field cname="toplevels" type="GladeWidgetInfo**"/>
|
||||
<field cname="n_toplevels" type="guint"/>
|
||||
<field cname="names" type="GHashTable*"/>
|
||||
<field cname="strings" type="GHashTable*"/>
|
||||
<method name="Destroy" cname="glade_interface_destroy">
|
||||
<return-type type="void"/>
|
||||
</method>
|
||||
<method name="Dump" cname="glade_interface_dump">
|
||||
<return-type type="void"/>
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="filename"/>
|
||||
</parameters>
|
||||
</method>
|
||||
</struct>
|
||||
<struct name="Property" cname="GladeProperty">
|
||||
<field cname="name" type="gchar*"/>
|
||||
<field cname="value" type="gchar*"/>
|
||||
</struct>
|
||||
<struct name="SignalInfo" cname="GladeSignalInfo">
|
||||
<field cname="name" type="gchar*"/>
|
||||
<field cname="handler" type="gchar*"/>
|
||||
<field cname="object" type="gchar*"/>
|
||||
<field cname="after" bits="1" type="guint"/>
|
||||
</struct>
|
||||
<struct name="WidgetInfo" cname="GladeWidgetInfo">
|
||||
<field cname="parent" type="GladeWidgetInfo*"/>
|
||||
<field cname="classname" type="gchar*"/>
|
||||
<field cname="name" type="gchar*"/>
|
||||
<field cname="properties" type="GladeProperty*"/>
|
||||
<field cname="n_properties" type="guint"/>
|
||||
<field cname="atk_props" type="GladeProperty*"/>
|
||||
<field cname="n_atk_props" type="guint"/>
|
||||
<field cname="signals" type="GladeSignalInfo*"/>
|
||||
<field cname="n_signals" type="guint"/>
|
||||
<field cname="atk_actions" type="GladeAtkActionInfo*"/>
|
||||
<field cname="n_atk_actions" type="guint"/>
|
||||
<field cname="relations" type="GladeAtkRelationInfo*"/>
|
||||
<field cname="n_relations" type="guint"/>
|
||||
<field cname="accels" type="GladeAccelInfo*"/>
|
||||
<field cname="n_accels" type="guint"/>
|
||||
<field cname="children" type="GladeChildInfo*"/>
|
||||
<field cname="n_children" type="guint"/>
|
||||
</struct>
|
||||
</namespace>
|
||||
<namespace name="Gnome" library="gnomeui-2">
|
||||
<enum name="ClientFlags" cname="GnomeClientFlags" type="flags">
|
||||
<member cname="GNOME_CLIENT_IS_CONNECTED" name="IsConnected" value="1 << 0"/>
|
||||
|
@ -18074,6 +18350,25 @@
|
|||
<field cname="relay_func" type="GtkCallbackMarshal"/>
|
||||
<field cname="destroy_func" type="GtkDestroyNotify"/>
|
||||
</struct>
|
||||
<struct name="UIInfo" cname="GnomeUIInfo">
|
||||
<field cname="type" type="GnomeUIInfoType"/>
|
||||
<field cname="label" type="const-gchar*"/>
|
||||
<field cname="hint" type="const-gchar*"/>
|
||||
<field cname="moreinfo" type="gpointer"/>
|
||||
<field cname="user_data" type="gpointer"/>
|
||||
<field cname="unused_data" type="gpointer"/>
|
||||
<field cname="pixmap_type" type="GnomeUIPixmapType"/>
|
||||
<field cname="pixmap_info" type="gconstpointer"/>
|
||||
<field cname="accelerator_key" type="guint"/>
|
||||
<field cname="ac_mods" type="GdkModifierType"/>
|
||||
<field cname="widget" type="GtkWidget*"/>
|
||||
<method name="ConfigurableTypesGetType" cname="gnome_ui_info_configurable_types_get_type" shared="true">
|
||||
<return-type type="GType"/>
|
||||
</method>
|
||||
<method name="TypeGetType" cname="gnome_ui_info_type_get_type" shared="true">
|
||||
<return-type type="GType"/>
|
||||
</method>
|
||||
</struct>
|
||||
<object name="Stock" cname="GnomeStock">
|
||||
<static-string cname="GNOME_STOCK_ABOUT" name="About" value="gnome-stock-about"/>
|
||||
<static-string cname="GNOME_STOCK_ATTACH" name="Attach" value="gnome-stock-attach"/>
|
||||
|
|
21
glade/Makefile.in
Executable file
21
glade/Makefile.in
Executable file
|
@ -0,0 +1,21 @@
|
|||
MCS=mcs
|
||||
DESTDIR=
|
||||
|
||||
@ENABLE_GLADE_TRUE@ all: linux
|
||||
@ENABLE_GLADE_FALSE@ all:
|
||||
|
||||
windows:
|
||||
$(CSC) /unsafe /target:library /r:../glib/glib-sharp.dll /r:../pango/pango-sharp.dll /r:../atk/atk-sharp.dll /r:../gdk/gdk-sharp.dll /r:../gtk/gtk-sharp.dll /out:glade-sharp.dll /recurse:*.cs
|
||||
|
||||
linux: glade-sharp.dll
|
||||
|
||||
glade-sharp.dll: generated/*.cs
|
||||
$(MCS) --unsafe --target library -r System.Drawing -L ../glib -L ../pango -L ../atk -L ../gdk -L ../gtk -r glib-sharp.dll -r pango-sharp.dll -r atk-sharp.dll -r gdk-sharp.dll -r gtk-sharp.dll -o glade-sharp.dll --recurse '*.cs'
|
||||
|
||||
clean:
|
||||
rm -f *.dll
|
||||
rm -f generated/*
|
||||
|
||||
install: all
|
||||
@ENABLE_GLADE_TRUE@ cp glade-sharp.dll $(DESTDIR)@prefix@/lib
|
||||
|
48
glade/XML.custom
Normal file
48
glade/XML.custom
Normal file
|
@ -0,0 +1,48 @@
|
|||
// XML.custom
|
||||
//
|
||||
// Author: Ricardo Fern<72>ndez Pascual <ric@users.sourceforge.net>
|
||||
//
|
||||
// (c) 2002 Ricardo Fern<72>ndez Pascual
|
||||
//
|
||||
// This code is inserted after the automatically generated code.
|
||||
|
||||
|
||||
[DllImport("gtksharpglue")]
|
||||
static extern string gtksharp_glade_xml_get_filename (IntPtr raw);
|
||||
|
||||
/// <summary>Filename Property</summary>
|
||||
/// <remarks>Gets the filename used to create this GladeXML object
|
||||
/// </remarks>
|
||||
public string Filename {
|
||||
get {
|
||||
string ret = gtksharp_glade_xml_get_filename (Handle);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Indexer of widgets</summary>
|
||||
/// <remarks>Acts like GetWidget</remarks>
|
||||
public Gtk.Widget this [string name] {
|
||||
get {
|
||||
return GetWidget (name);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("glade-2.0")]
|
||||
static extern string glade_get_widget_name (IntPtr widget);
|
||||
|
||||
static public string GetWidgetName (Gtk.Widget w) {
|
||||
string ret = glade_get_widget_name (w.Handle);
|
||||
return ret;
|
||||
}
|
||||
|
||||
[DllImport("glade-2.0")]
|
||||
static extern IntPtr glade_get_widget_tree (IntPtr widget);
|
||||
|
||||
static public Glade.XML GetWidgetTree (Gtk.Widget w) {
|
||||
IntPtr ret_raw = glade_get_widget_tree (w.Handle);
|
||||
Glade.XML ret = GLib.Object.GetObject (ret_raw) as Glade.XML;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -12,19 +12,42 @@ BASESOURCES = \
|
|||
paned.c \
|
||||
style.c \
|
||||
type.c \
|
||||
widget.c \
|
||||
canvasitem.c
|
||||
widget.c
|
||||
|
||||
GNOMESOURCES = \
|
||||
canvasitem.c \
|
||||
canvaspoints.c \
|
||||
program.c
|
||||
|
||||
# fixme: Makefile.am = THE SUCK
|
||||
if ENABLE_GNOME
|
||||
|
||||
if ENABLE_GLADE
|
||||
libgtksharpglue_la_SOURCES = \
|
||||
$(BASESOURCES) \
|
||||
program.c \
|
||||
$(GNOMESOURCES) \
|
||||
gladexml.c
|
||||
#
|
||||
else
|
||||
libgtksharpglue_la_SOURCES = \
|
||||
$(BASESOURCES) \
|
||||
$(GNOMESOURCES) \
|
||||
#
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
if ENABLE_GLADE
|
||||
libgtksharpglue_la_SOURCES = \
|
||||
$(BASESOURCES) \
|
||||
gladexml.c
|
||||
else
|
||||
libgtksharpglue_la_SOURCES = \
|
||||
$(BASESOURCES)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
INCLUDES = @BASE_DEPENDENCIES_CFLAGS@ -I$(top_srcdir)
|
||||
|
||||
|
||||
|
|
28
glue/canvaspoints.c
Normal file
28
glue/canvaspoints.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
/* canvaspoints.c : Custom ctor for a CanvasPoints struct.
|
||||
*
|
||||
* Author: Rachel Hestilow <hestilow@ximian.com>
|
||||
*
|
||||
* <c> 2002 Rachel Hestilow
|
||||
*/
|
||||
|
||||
#include <libgnomecanvas/gnome-canvas.h>
|
||||
#include <libgnomecanvas/gnome-canvas-util.h>
|
||||
|
||||
GnomeCanvasPoints*
|
||||
gtksharp_gnome_canvas_points_new_from_array (guint num_points, double *coords)
|
||||
{
|
||||
int i, len;
|
||||
GnomeCanvasPoints *pts = gnome_canvas_points_new (num_points);
|
||||
|
||||
g_print ("{");
|
||||
|
||||
len = num_points * 2;
|
||||
for (i = 0; i < len; i++) {
|
||||
pts->coords[i] = coords[i];
|
||||
g_print ("%f ", pts->coords[i]);
|
||||
}
|
||||
g_print ("}\n");
|
||||
|
||||
return pts;
|
||||
}
|
||||
|
18
glue/gladexml.c
Normal file
18
glue/gladexml.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* gladexml.c : Glue to access GladeXML fields
|
||||
*
|
||||
* Author: Ricardo Fern<EFBFBD>ndez Pascual <ric@users.sourceforge.net>
|
||||
*
|
||||
* <c> 2002 Ricardo Fern<EFBFBD>ndez Pascual
|
||||
*/
|
||||
|
||||
#include <glade/glade.h>
|
||||
|
||||
const gchar * gtksharp_glade_xml_get_filename (GladeXML *gxml);
|
||||
|
||||
|
||||
const gchar *
|
||||
gtksharp_glade_xml_get_filename (GladeXML *gxml)
|
||||
{
|
||||
return gxml->filename;
|
||||
}
|
||||
|
19
gnome/CanvasPoints.custom
Normal file
19
gnome/CanvasPoints.custom
Normal file
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// Gnome.CanvasPoints.custom - Gnome CanvasPoints class customizations
|
||||
//
|
||||
// Author: Rachel Hestilow <hestilow@ximian.com>
|
||||
//
|
||||
// Copyright (C) 2002 Rachel Hestilow
|
||||
//
|
||||
// This code is inserted after the automatically generated code.
|
||||
//
|
||||
|
||||
[DllImport("gtksharpglue")]
|
||||
static extern System.IntPtr
|
||||
gtksharp_gnome_canvas_points_new_from_array (uint num_points, double[] coords);
|
||||
|
||||
public static Gnome.CanvasPoints New (double[] coords)
|
||||
{
|
||||
return New (gtksharp_gnome_canvas_points_new_from_array ((uint) coords.Length / 2, coords));
|
||||
}
|
||||
|
2
makefile
2
makefile
|
@ -1,6 +1,6 @@
|
|||
EXTRA_DIRS =
|
||||
|
||||
DIRS=generator glib pango atk gdk gtk gnome sample
|
||||
DIRS=generator glib pango atk gdk gtk glade gnome sample
|
||||
ROOT=/cygdrive/$(subst \,/,$(subst :\,/,$(SYSTEMROOT)))
|
||||
CSC=$(ROOT)/microsoft.net/framework/v1.0.3705/csc.exe
|
||||
MCS=mcs
|
||||
|
|
|
@ -12,3 +12,5 @@ libgnomecanvas-2.0.1
|
|||
libgnomeui-2.0.1
|
||||
gtkhtml: cvs branch gnome-2-port files gtkhtml.[ch], gtkhtml-types.h,
|
||||
gtkhtml-enums.h, gtkhtml-stream.[ch]
|
||||
libglade-2.0.0
|
||||
|
||||
|
|
|
@ -11,8 +11,9 @@ unlink ($file);
|
|||
"gtk+-2.0.5/gtk" => "Gtk:gtk-x11-2.0",
|
||||
"libgnome-2.0.1/libgnome" => "Gnome:gnome-2",
|
||||
"libgnomecanvas-2.0.1/libgnomecanvas" => "Gnome:gnomecanvas-2",
|
||||
"libgnomeui-2.0.1/libgnomeui" => "Gnome:gnomeui-2",
|
||||
"gtkhtml/src" => "Gtk:gtkhtml-3.0");
|
||||
"libgnomeui-2.0.1/libgnomeui" => "Gnome:gnomeui-2",
|
||||
"gtkhtml/src" => "Gtk:gtkhtml-3.0",
|
||||
"libglade-2.0.0/glade" => "Glade:glade-2.0");
|
||||
|
||||
foreach $dir (keys %srcs) {
|
||||
($ns, $lib) = split (/:/, $srcs{$dir});
|
||||
|
|
|
@ -62,8 +62,26 @@ foreach $fname (@hdrs) {
|
|||
}
|
||||
} elsif ($line =~ /^#\s*ifn?\s*\!?def/) {
|
||||
#warn "Ignored #if:\n$line";
|
||||
} elsif ($line =~ /typedef\s+struct\s+\w*\s*\{/) {
|
||||
while ($line !~ /^}\s*\w+;/) {$line = <INFILE>;}
|
||||
} elsif ($line =~ /typedef struct\s*\{/) {
|
||||
my $first_line = $line;
|
||||
my @lines = ();
|
||||
$line = <INFILE>;
|
||||
while ($line !~ /^}\s*(\w+);/) {
|
||||
push @lines, $line;
|
||||
$line = <INFILE>;
|
||||
}
|
||||
$line =~ /^}\s*(\w+);/;
|
||||
my $name = $1;
|
||||
print "typedef struct _$name $name;\n";
|
||||
print "struct _$name {\n";
|
||||
foreach $line (@lines) {
|
||||
if ($line =~ /(\s*.+\;)/) {
|
||||
$field = $1;
|
||||
$field =~ s/(\w+) const/const $1/;
|
||||
print "$field\n";
|
||||
}
|
||||
}
|
||||
print "};\n";
|
||||
} elsif ($line =~ /^enum\s+\{/) {
|
||||
while ($line !~ /^};/) {$line = <INFILE>;}
|
||||
} elsif ($line =~ /(\s+)union\s*{/) {
|
||||
|
|
61
sample/GladeViewer.cs
Normal file
61
sample/GladeViewer.cs
Normal file
|
@ -0,0 +1,61 @@
|
|||
// GladeViewer.cs - Silly tests for LibGlade in C#
|
||||
//
|
||||
// Author: Ricardo Fern<72>ndez Pascual <ric@users.sourceforge.net>
|
||||
//
|
||||
// (c) 2002 Ricardo Fern<72>ndez Pascual
|
||||
|
||||
namespace GladeSamples {
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using Gtk;
|
||||
using Gnome;
|
||||
using Glade;
|
||||
|
||||
public class GladeDemo {
|
||||
|
||||
// temporary hack until GList is wrapped
|
||||
[DllImport("glib-2.0")]
|
||||
static extern IntPtr g_list_nth_data (IntPtr l, int i);
|
||||
[DllImport("glib-2.0")]
|
||||
static extern int g_list_length (IntPtr l);
|
||||
|
||||
public static void Main (string[] args)
|
||||
{
|
||||
if (args.Length < 2) {
|
||||
Console.WriteLine ("Use: mono ./glade-viewer.exe \"fname\" \"root\"");
|
||||
return;
|
||||
}
|
||||
|
||||
Program viewer = new Program ("GladeViewer", "0.1", Modules.UI, args);
|
||||
|
||||
string fname = args [0];
|
||||
string root = args [1];
|
||||
|
||||
Glade.XML gxml = new Glade.XML (fname, root, null);
|
||||
Widget wid = gxml [root];
|
||||
wid.Show ();
|
||||
|
||||
Console.WriteLine ("The filename: {0}", gxml.Filename);
|
||||
Console.WriteLine ("A relative filename: {0}", gxml.RelativeFile ("image.png"));
|
||||
|
||||
Console.WriteLine ("The name of the root widget: {0}", Glade.XML.GetWidgetName (wid));
|
||||
Console.WriteLine ("BTW, it's {0} that it was created using from a Glade.XML object",
|
||||
Glade.XML.GetWidgetTree (wid) != null);
|
||||
|
||||
Console.WriteLine ("\nList of created widgets:");
|
||||
// this is a hack, until GList is wrapped
|
||||
IntPtr l = gxml.GetWidgetPrefix ("");
|
||||
int len = g_list_length (l);
|
||||
for (int i = 0; i < len; ++i) {
|
||||
Widget w = GLib.Object.GetObject (g_list_nth_data (l, i)) as Widget;
|
||||
Console.WriteLine ("{0} {1}",
|
||||
w.GetType (),
|
||||
Glade.XML.GetWidgetName (w));
|
||||
}
|
||||
|
||||
viewer.Run ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -4,8 +4,12 @@ MCS=mcs
|
|||
@ENABLE_GNOME_TRUE@ GNOME_ASSEMBLY=-r gnome-sharp.dll
|
||||
@ENABLE_GNOME_TRUE@ GNOME_TARGETS=gnome-hello-world.exe canvas-example.exe fifteen.exe
|
||||
|
||||
local_paths=-L ../glib -L ../pango -L ../atk -L ../gdk -L ../gtk $(GNOME_PATH)
|
||||
all_assemblies=-r glib-sharp.dll -r pango-sharp.dll -r atk-sharp.dll -r gdk-sharp.dll -r gtk-sharp.dll $(GNOME_ASSEMBLY) -r System.Drawing
|
||||
@ENABLE_GLADE_TRUE@ GLADE_PATH=-L ../glade
|
||||
@ENABLE_GLADE_TRUE@ GLADE_ASSEMBLY=-r glade-sharp.dll
|
||||
@ENABLE_GLADE_TRUE@ GLADE_TARGETS=glade-viewer.exe
|
||||
|
||||
local_paths=-L ../glib -L ../pango -L ../atk -L ../gdk -L ../gtk $(GNOME_PATH) $(GLADE_PATH)
|
||||
all_assemblies=-r glib-sharp.dll -r pango-sharp.dll -r atk-sharp.dll -r gdk-sharp.dll -r gtk-sharp.dll $(GNOME_ASSEMBLY) $(GLADE_ASSEMBLY) -r System.Drawing
|
||||
|
||||
|
||||
all: linux
|
||||
|
@ -14,7 +18,7 @@ windows:
|
|||
$(CSC) /unsafe /out:gtk-hello-world.exe /r:../glib/glib-sharp.dll /r:../gtk/gtk-sharp.dll /r:../gdk/gdk-sharp.dll HelloWorld.cs
|
||||
$(CSC) /unsafe /out:button.exe /r:../glib/glib-sharp.dll /r:../gtk/gtk-sharp.dll ButtonApp.cs
|
||||
|
||||
linux: gtk-hello-world.exe button.exe menu.exe size.exe scribble.exe treeviewdemo.exe $(GNOME_TARGETS)
|
||||
linux: gtk-hello-world.exe button.exe menu.exe size.exe scribble.exe treeviewdemo.exe $(GNOME_TARGETS) $(GLADE_TARGETS)
|
||||
|
||||
gtk-hello-world.exe: HelloWorld.cs
|
||||
$(MCS) --unsafe -o gtk-hello-world.exe $(local_paths) $(all_assemblies) HelloWorld.cs
|
||||
|
@ -43,6 +47,9 @@ scribble.exe: Scribble.cs
|
|||
treeviewdemo.exe: TreeViewDemo.cs
|
||||
$(MCS) --unsafe -o treeviewdemo.exe $(local_paths) $(all_assemblies) TreeViewDemo.cs
|
||||
|
||||
glade-viewer.exe: GladeViewer.cs
|
||||
$(MCS) --unsafe -o glade-viewer.exe $(local_paths) $(all_assemblies) GladeViewer.cs
|
||||
|
||||
clean:
|
||||
rm -f *.exe
|
||||
|
||||
|
|
|
@ -12,3 +12,5 @@ libgnomecanvas-2.0.1
|
|||
libgnomeui-2.0.1
|
||||
gtkhtml: cvs branch gnome-2-port files gtkhtml.[ch], gtkhtml-types.h,
|
||||
gtkhtml-enums.h, gtkhtml-stream.[ch]
|
||||
libglade-2.0.0
|
||||
|
||||
|
|
Loading…
Reference in a new issue