Re: Wait for gtk events with select?
- From: Steve Lawrence <kfjethro gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Wait for gtk events with select?
- Date: Sat, 03 Jan 2009 17:00:39 -0400
Till Harbaum / Lists wrote:
Hi,
is there a way to wait for gtk events via some file descriptor
given to a select call?
I am porting an application to gtk that calls some "gimme_input"
function every now and then and want's me to do some waiting
for net sockets there. Now i'd like to use the same select call
i am using for the network sockets also to wait for gtk events.
Is this possible? What's the name of the file descriptor to use?
Thanks,
Till
Till:
I think you could use GIOChannels. A callback can be setup when data is
waiting to be read
from an iochannel. An iochannel is created from a file descriptor.
Hopefully this link will
point you in the right direction:
http://library.gnome.org/devel/glib/stable/glib-IO-Channels.html#g-io-add-watch
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]