Wrapping my own widgets
- From: Chris Seaton <chris chrisseaton com>
- To: gtkmm-list gnome org
- Subject: Wrapping my own widgets
- Date: Fri, 16 Sep 2005 04:40:58 +0100
Hi,
I'm writing a widget in C with a C++ wrapper.
I don't think I want to use the gtkmm generators, as it's only one class
and I don't want to make people download the sources of gtkmm just to
build my widget's bindings, so I'm writing it by hand.
I'm looking at the Gtk::DrawingArea widget as an example, as my widget
was based (just based in the copy-and-paste sense, not inherited or
anything) on that when I was writing the C code for the widget, but the
code makes no sense!
I know that it's generated so it'll be a bit of a mess, but nothing adds up!
For example, DrawingArea_Class is declared with no members at all, but
then there is code for DrawingArea_Class::init().
The destructor calls some function called _destroy(), but I have no idea
what's providing this. It doesn't seem to be Glib::Object or
Glib::ObjectBase.
What's the point in the typedefs
typedef struct _GtkDrawingArea GtkDrawingArea;
typedef struct _GtkDrawingAreaClass GtkDrawingAreaClass;
that are already defined by the C code header?
Why is (GObject*) used instead of G_OBJECT()
Could someone take the time to explain how to write a gtkmm style
language binding for my widget?
Thanks very much
Chris Seaton
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]