RE: Message Loop on GTK+ ?
- From: "Rastatter, Ken (OH32)" <Ken Rastatter Honeywell com>
- To: "'gtk-list gnome org'" <gtk-list gnome org>
- Subject: RE: Message Loop on GTK+ ?
- Date: Thu, 8 Jul 2004 12:23:21 -0700
Dipak G Patil wrote:
> Can anybody tell me how I can achieve message loop functionality as
> like in windows on linux ?
> As on windows there is single windows procedure, which handles all
> events for all objects, so can I achieve this on linux using GTK+
> rather than writting callbacks per object per event?
If your program is running on Win32, is your goal to get at the
Microsoft Windows messages before they are processed by GTK+?
Then take a look at gdk_window_add_filter().
Is your goal to have all of the buttons of your application use the same
callback function for, say, the "clicked" signal? A single callback
function can be connected to more than a single widget. For example,
you could define a function such as...
void on_any_button_clicked(GtkButton *button, gpointer data);
...which can be connected to any number of widgets that you derive from
GtkButton.
Do you have another reason to place all of your event handling into a
single function?
--
Ken Rastatter, Senior Design Engineer
Honeywell
Sensotec Sensors
2080 Arlingate Lane, Columbus, Ohio, 43228-4112 USA
Home Page: http://www.honeywell.com/sensotec
"These opinions are mine and not necessarily those of Honeywell."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]