gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash ChangeLog gui/gtk.cpp gui/gtksup.h


From: Bastiaan Jacques
Subject: Re: [Gnash-commit] gnash ChangeLog gui/gtk.cpp gui/gtksup.h
Date: Fri, 28 Sep 2007 17:28:39 +0200 (CEST)



On Fri, 28 Sep 2007, strk wrote:

On Fri, Sep 28, 2007 at 12:50:05PM +0200, Bastiaan Jacques wrote:

+    /// Add a listener with default priority that listens for IN and
HUP
+    /// events on a file descriptor.

+    /// @param callback A pointer to a callback function with the
following
+    ///                 signature:
+    ///        bool func(void*, int, void* data)
+    ///        The first and second arguments should be ignored.
+    ///        The last argument is a user-specified pointer. The
+    ///        callback should return false if the listener is to be
removed.

The first and second arguments should be ignored ??

Yes. Since the first two arguments are data types from Glib, it is
probably
undesirable to use them in GUI-neutral code.
When we have a generic interface
in the GUI (base) class, we can do better. For now, though, this should
get
the job done.

What is the job, btw ?

--strk;


To add a listener with default priority that listens for IN and HUP
events on a file descriptor.

Are we running in circle ?

I do get the distinct feeling.

I'm willing to add a listener, what do I get to listen to ?

The specified callback will be called when there is data to be read
from the specified file descriptor. The end. :)

Only a void pointer i passed to the listener registration function ?

I don't follow you here.

If so I'd rather not take two additional args.
If those two additional args give me some other information I'd like to
know what this information is.

As I tried to explain, the first two arguments are GTK-specific and will
most likely be removed when there is a generalized interface for adding
file descriptor listeners in the parent GUI class. Until then, people who
want to use the GTK FD listener will have to create a callback which
takes thee arguments, where the first two will be useless to them.

Bastiaan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]