Re: Deprecated calls in libzvt
- From: jacob berkman <jacob ximian com>
- To: Deepa <deepa chacko wipro com>
- Cc: desktop-devel-list <desktop-devel-list gnome org>
- Subject: Re: Deprecated calls in libzvt
- Date: 11 Feb 2002 12:06:29 -0500
On Mon, 2002-02-11 at 10:08, Deepa wrote:
> Jacob,
>
> > > * gdk_input_add() - This in turn calls gdk_input_add_full() which is also
> > > deprecated. I was not able to find a replacement for this as yet.
> >
> > if you look at the implementation of gdk_input_add_full() you will see
> > it calls g_io_add_watch_full() which is what you will want to use.
>
> This is not a one-one replacement. In fact you need to rewrite the functionality of
> gdk_input_add () into your code.
you actually don't. gdk_input_add() just provides the old api
behaviour, which you don't really need.
you should be able to do something like:
static gboolean handle_io (GIOChannel *ioc, GIOCondition condition,
gpointer data);
GIOChannel *ioc;
int fd;
fd = foo_get_fd ();
ioc = g_io_channel_unix_new (fd);
g_io_add_watch (ioc, G_IO_IN | G_IO_HUP,
handle_io, NULL);
g_io_channel_unref (ioc);
and not do all the closure / callback stuff.
jacob
--
"In fact, can you imagine anything more terrifying than a zombie clown?"
-- moby
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]