[gtk-list] ANNOUNCE: C++ wrapper for glib (sorta)
- From: Some Guy <guy mikepery pr mcs net>
- To: gtk-list redhat com
- Subject: [gtk-list] ANNOUNCE: C++ wrapper for glib (sorta)
- Date: Mon, 8 Jun 1998 23:31:20 -0500 (CDT)
A couple days ago I saw a message asking about a C++ wrapper (or port?)
for glib, like gtk--. I took the liberty of writing a simple C program
that reads a (somewhat modified) glib.h file, parses the basic structures
(like GList) then creates a header and a source file per new class
(G_List.cc, G_List.h). Here is a sample from hdr and src file G_List.h +
G_List.cc to clarify:
G_List.h (only part):
class G_List {
GList *pobj
public:
GList* alloc(void);
void free(GList *list);
void free_1(GList *list);
GList* append(GList *list, gpointer data);
GList* prepend(GList *list, gpointer data);
...
G_List.cc (only part):
GList* G_List::alloc(void)
{ return g_list_alloc(); }
void G_List::free(GList *list)
{ g_list_free(list); }
void G_List::free_1(GList *list)
{ g_list_free_1(list); }
GList* G_List::append(GList *list, gpointer data)
{ return g_list_append(list, data); }
GList* G_List::prepend(GList *list, gpointer data)
{ return g_list_prepend(list, data); }
Granted this is pretty sloppy (alloc/free should be contructor/destructor,
maybe others) but if anyone wants to test it out, talk to me. I only
understand how to use GList and GSList, so I wouldn't do very good testing
it:).
Thanks
---
Matt Perry [guy@mikepery.linuxos.org]
A conference is a gathering of important people who singly can do nothing
but together can decide that nothing can be done.
-- Fred Allen
---
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]