Re: [gtk-list] gmodule
- From: Havoc Pennington <rhpennin midway uchicago edu>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] gmodule
- Date: Mon, 14 Sep 1998 22:23:17 -0500 (CDT)
On Mon, 14 Sep 1998, Marcus Brubaker wrote:
> Are there any places were documentation or example code is available for
> this? Are there any programs currently using this? Plus, if someone
> could give me a basic idea of what it is for and how it might be used I
> would appreciate it. Thanks.
>
The 'testgmodule' program in the gmodule directory is pretty much a
comprehensive example.
It's a dlopen wrapper, so the dlopen man page would probably be
enlightening. Basically you open a shared library and you can access
symbols in the library. For example, if you opened libgtk.so you could
ask for "gtk_widget_new" by name, get a pointer back, and call the
function via the pointer.
It's useful to write plugins, for example. Each plugin can be a shared
lib. I'm using it in Guppi (http://www.gnome.org/guppi) version 0.0.2
which will be out RSN. (the one currently on the web site does not use
it.)
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]