Re: GnomeSelectPaper Widget
- From: Dirk Luetjens <dirk luedi oche de>
- To: robert havoc pennington <rhpennin midway uchicago edu>
- cc: gnome-list gnome org
- Subject: Re: GnomeSelectPaper Widget
- Date: Thu, 14 May 1998 01:38:11 +0200 (CEST)
Hi,
On Wed, 13 May 1998, robert havoc pennington wrote:
> > One programming question: It is necessary for libpaper to have a
> > paperinit() function call in the beginning and a paperdone() function at
> > the end of using it. I though about calling paperinit() in the
> > gnome_select_paper_init() function and paperdone() in the destroy handler
> > of the widget.
> >
> > 1.) What happens if one opens two gnome_select_paper widgets?
> > 2.) Who to write the destroy function handler for a widget?
> > 3.) Where should the function calls be placed correctly?
> > (Sorry, I'm a beginner in writing widgets myself)
>
> What do the functions do?
I haven't looked into the library code yet. I think that it will setup a
internal list of all known papersizes.
> Maybe you could keep a count of created widgets, and call paperdone()
> whenever it goes from 1 to 0 and paperinit() whenever it goes from 0 to 1.
> Or you could require users to call them; what if the main program also
> uses libpaper and your widget does paperdone() on it? All depends on how
> these functions work, I guess.
I studied the libgtk-documentation once more and learned that there is a
class initialisation and a instance initialisation function. I don't know
when the class initialisation function is called, but when this is only
one time, this could be for the paperinit() function. The paperdone()
function would go into the class destruction code (where is it?)
(supposing that only the widget is using the library). In the other case a
wrapper around the paperinit() and paperdone() function with refcounting
will be better. I'll have to look into the library.
Dirk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]