Socket i/o from within Gtk::main()?
| From: | Yermo Lamers | Date: | Sat, 26 Aug 2006 12:57:35 +0000 |
| Subject: | Socket i/o from within Gtk::main()? | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-7115@lists.php.net to get a copy of this message | ||
So I've whipped up a quick glade based UI, added a timer callback and now
have a nice little textbox updating with a counter. GUI development under
PHP using a GUI builder. Pretty seriously cool.
Unfortunately I know next to nothing about Gtk development. I have worked
with wxWindows (wxWidgets) in C++ so it's not too foreign.
The project at hand is a quick and dirty test Jabber/XMPP client.
One thing I can't seem to find is how to manage a socket connection within
Gtk::main(). I'd like to avoid having to poll if possible. So I imagine
there has to be a way to establish a connection, add it to some kind of
list and have it generate an asychronous callback whenever there's data to
read, right?
(And I understand php-gtk2 is alpha .. so the answer may very well be
"it's not done yet".)
Any pointers would be greatly appreciated.
(BTW, are you guys interested in core dump reports? I'm assuming the goal
here is to never have PHP dump core as a result of undefined methods, etc.
For instance selecting some dynamically added text in a textbox causes a
coredump Gtk-CRITICAL**: gtk_text_buffer_get_iter_at_mark: assertion
'!gtk_text_mark_get_deleted(mark)' failed ... causes a segmentation fault)
----------------------------------------------------------------------------
DTLink Software http://www.dtlink.com
Business and Finance Software Engineering
----------------------------------------------------------------------------