Re: [gtk-list] does gdk_input_add work at all?
- From: Jeremy Wise <jwise pathwaynet com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] does gdk_input_add work at all?
- Date: Sat, 29 Aug 1998 14:32:41 -0400 (EDT)
On Sat, 29 Aug 1998, Tommi Leino wrote:
> Once upon a time I got gdk_input_add to work with sockets, but now as I try
> to make it work with a normal file descriptor, it crashes. The code is
> something like this,
>
> int fd;
>
> fd = open ("/somepath/somefile.txt", O_RDONLY);
> gdk_input_add (fd, GDK_INPUT_READ, "input_callback", NULL);
>
> gtk_main();
> close (fd);
>
> It seems like it crashes right after the system realizes that there is data
> to read in the fd and doesn't even reach the input_callback, so there can't
> be problem with that.
I am using gdk_input_add just fine with sockets, and I assume files will
work just as well. Are you putting "input_callback" in quotes? That
argument is a GdkInputFunction, NOT a char *. Try the following:
gdk_input_add( fd, GDK_INPUT_READ, (GdkInputFunction) input_callback, NULL );
and see if that fixes your problem.
Later,
Jeremy Wise
jwise@pathwaynet.com
> --
> Tommi Leino
> namhas@netmill.fi http://majik.netti.fi
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]