1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
2001-09-08 04:39:53 +00:00
|
|
|
Main loop and Events
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2001-09-08 04:39:53 +00:00
|
|
|
Library initialization, main event loop, and events
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
2001-09-08 04:39:53 +00:00
|
|
|
|
|
|
|
<para>
|
|
|
|
Before using GTK+, you need to initialize it; initialization connects
|
|
|
|
to the window system display, and parses some standard command line
|
|
|
|
arguments. The gtk_init() function initializes GTK+. gtk_init() exits
|
|
|
|
the application if errors occur; to avoid this, use gtk_init_check().
|
|
|
|
gtk_init_check() allows you to recover from a failed GTK+
|
|
|
|
initialization - you might start up your application in text mode instead.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Like all GUI toolkits, GTK+ uses an event-driven programming
|
|
|
|
model. When the user is doing nothing, GTK+ sits in the
|
|
|
|
<firstterm>main loop</firstterm> and waits for input. If the user
|
|
|
|
performs some action - say, a mouse click - then the main loop "wakes
|
|
|
|
up" and delivers an event to GTK+. GTK+ forwards the event to one or
|
|
|
|
more widgets.
|
|
|
|
</para>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2001-09-08 04:39:53 +00:00
|
|
|
When widgets receive an event, they frequently emit one or more
|
|
|
|
<firstterm>signals</firstterm>. Signals notify your program that
|
|
|
|
"something interesting happened" by invoking functions you've
|
|
|
|
connected to the signal with g_signal_connect(). Functions connected
|
|
|
|
to a signal are often termed <firstterm>callbacks</firstterm>.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
When your callbacks are invoked, you would typically take some action
|
|
|
|
- for example, when an Open button is clicked you might display a
|
|
|
|
#GtkFileSelectionDialog. After a callback finishes, GTK+ will return
|
|
|
|
to the main loop and await more user input.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
1999-12-19 21:08:48 +00:00
|
|
|
<example>
|
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
|
|
|
<title>Typical <function>main</function> function for a GTK+ application</title>
|
1999-12-19 21:08:48 +00:00
|
|
|
<programlisting>
|
|
|
|
int
|
|
|
|
main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
/* Initialize i18n support */
|
2002-04-18 22:04:46 +00:00
|
|
|
gtk_set_locale (<!-- -->);
|
1999-12-19 21:08:48 +00:00
|
|
|
|
|
|
|
/* Initialize the widget set */
|
|
|
|
gtk_init (&argc, &argv);
|
|
|
|
|
|
|
|
/* Create the main window */
|
|
|
|
mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
|
|
|
|
|
|
/* Set up our GUI elements */
|
|
|
|
...
|
|
|
|
|
|
|
|
/* Show the application window */
|
2001-09-08 04:39:53 +00:00
|
|
|
gtk_widget_show_all (mainwin);
|
1999-12-19 21:08:48 +00:00
|
|
|
|
2001-09-08 04:39:53 +00:00
|
|
|
/* Enter the main event loop, and wait for user interaction */
|
2002-04-18 22:04:46 +00:00
|
|
|
gtk_main (<!-- -->);
|
1999-12-19 21:08:48 +00:00
|
|
|
|
|
|
|
/* The user lost interest */
|
2001-09-08 04:39:53 +00:00
|
|
|
return 0;
|
1999-12-19 21:08:48 +00:00
|
|
|
}
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2001-09-08 04:39:53 +00:00
|
|
|
It's OK to use the GLib main loop directly instead of gtk_main(),
|
|
|
|
though it involves slightly more typing. See #GMainLoop in the GLib
|
|
|
|
documentation.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-09-08 04:39:53 +00:00
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2001-09-08 04:39:53 +00:00
|
|
|
See the GLib manual, especially #GMainLoop and signal-related
|
|
|
|
functions such as g_signal_connect().
|
1999-12-19 21:08:48 +00:00
|
|
|
</para>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
2001-09-08 04:39:53 +00:00
|
|
|
<!-- ##### FUNCTION gtk_set_locale ##### -->
|
|
|
|
|
|
|
|
<para>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-09-08 04:39:53 +00:00
|
|
|
@Returns:
|
2000-09-07 18:17:06 +00:00
|
|
|
|
|
|
|
|
2001-11-21 21:43:47 +00:00
|
|
|
<!-- ##### FUNCTION gtk_disable_setlocale ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-09-07 18:17:06 +00:00
|
|
|
<!-- ##### FUNCTION gtk_get_default_language ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2004-07-18 15:14:05 +00:00
|
|
|
<!-- ##### FUNCTION gtk_parse_args ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@argc:
|
|
|
|
@argv:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_init ##### -->
|
|
|
|
<para>
|
1999-12-19 21:08:48 +00:00
|
|
|
</para>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
1999-12-19 21:08:48 +00:00
|
|
|
<note>
|
|
|
|
<para>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
1999-12-19 21:08:48 +00:00
|
|
|
</note>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
2002-06-20 23:29:19 +00:00
|
|
|
@argc:
|
|
|
|
@argv:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_init_check ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-10-14 23:22:58 +00:00
|
|
|
@argc:
|
|
|
|
@argv:
|
2002-06-20 23:29:19 +00:00
|
|
|
@Returns:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2004-10-24 07:05:00 +00:00
|
|
|
<!-- ##### FUNCTION gtk_init_with_args ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@argc:
|
|
|
|
@argv:
|
|
|
|
@parameter_string:
|
|
|
|
@entries:
|
|
|
|
@translation_domain:
|
|
|
|
@error:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_get_option_group ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@open_default_display:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_exit ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Terminates the program and returns the given exit code to the caller.
|
1999-12-19 21:08:48 +00:00
|
|
|
This function will shut down the GUI and free all resources allocated
|
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
|
|
|
for GTK+.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-12-30 04:58:41 +00:00
|
|
|
@error_code: Return value to pass to the caller. This is dependent on the
|
|
|
|
target system but at least on Unix systems %0 means success.
|
|
|
|
@Deprecated: Use the standard exit() function instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_events_pending ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Checks if any events are pending. This can be used to update the GUI
|
1999-12-19 21:08:48 +00:00
|
|
|
and invoke timeouts etc. while doing some time intensive computation.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
1999-12-19 21:08:48 +00:00
|
|
|
<example>
|
Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
* gdk-pixbuf-io.c: Markup fixes.
* gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
|
|
|
<title>Updating the GUI during a long computation.</title>
|
1999-12-19 21:08:48 +00:00
|
|
|
<programlisting>
|
|
|
|
/* computation going on */
|
|
|
|
...
|
2002-04-18 22:04:46 +00:00
|
|
|
while (gtk_events_pending (<!-- -->))
|
|
|
|
gtk_main_iteration (<!-- -->);
|
1999-12-19 21:08:48 +00:00
|
|
|
...
|
|
|
|
/* computation continued */
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
|
|
|
|
@Returns: %TRUE if any events are pending, %FALSE otherwise.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_main ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Runs the main loop until gtk_main_quit() is called. You can nest calls to
|
2001-12-09 21:34:39 +00:00
|
|
|
gtk_main(). In that case gtk_main_quit() will make the innermost invocation
|
2000-04-09 20:23:49 +00:00
|
|
|
of the main loop return.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_main_level ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Asks for the current nesting level of the main loop. This can be useful
|
|
|
|
when calling gtk_quit_add().
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@Returns: the nesting level of the current invocation of the main loop.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_main_quit ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Makes the innermost invocation of the main loop return when it regains
|
|
|
|
control.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_main_iteration ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Runs a single iteration of the mainloop. If no events are waiting to be
|
|
|
|
processed GTK+ will block until the next event is noticed. If you don't
|
2001-12-09 21:34:39 +00:00
|
|
|
want to block look at gtk_main_iteration_do() or check if any events are
|
|
|
|
pending with gtk_events_pending() first.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-09 21:34:39 +00:00
|
|
|
@Returns: %TRUE if gtk_main_quit() has been called for the innermost mainloop.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_main_iteration_do ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Runs a single iteration of the mainloop. If no events are available either
|
|
|
|
return or block dependent on the value of @blocking.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@blocking: %TRUE if you want GTK+ to block if no events are pending.
|
2001-12-09 21:34:39 +00:00
|
|
|
@Returns: %TRUE if gtk_main_quit() has been called for the innermost mainloop.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_main_do_event ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Processes a single GDK event. This is public only to allow filtering of events
|
|
|
|
between GDK and GTK+. You will not usually need to call this function directly.
|
2000-04-09 20:23:49 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
While you should not call this function directly, you might want to know
|
|
|
|
how exactly events are handled. So here is what this function does with
|
|
|
|
the event:
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<orderedlist>
|
|
|
|
<listitem><para>
|
|
|
|
Compress enter/leave notify events. If the event passed build an
|
2001-12-09 21:34:39 +00:00
|
|
|
enter/leave pair together with the next event (peeked from GDK)
|
2000-04-09 20:23:49 +00:00
|
|
|
both events are thrown away. This is to avoid a backlog of (de-)highlighting
|
|
|
|
widgets crossed by the pointer.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
Find the widget which got the event. If the widget can't be determined
|
|
|
|
the event is thrown away unless it belongs to a INCR transaction. In that
|
2001-12-09 21:34:39 +00:00
|
|
|
case it is passed to gtk_selection_incr_event().
|
2000-04-09 20:23:49 +00:00
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
Then the event is passed on a stack so you can query the currently handled
|
2001-12-09 21:34:39 +00:00
|
|
|
event with gtk_get_current_event().
|
2000-04-09 20:23:49 +00:00
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
The event is sent to a widget. If a grab is active all events for
|
|
|
|
widgets that are not in the contained in the grab widget are sent to the
|
|
|
|
latter with a few exceptions:
|
|
|
|
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem><para>
|
|
|
|
Deletion and destruction events are still sent to the event widget for
|
|
|
|
obvious reasons.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
Events which directly relate to the visual representation of the event
|
|
|
|
widget.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
Leave events are delivered to the event widget if there was an enter
|
|
|
|
event delivered to it before without the paired leave event.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
Drag events are not redirected because it is unclear what the semantics
|
|
|
|
of that would be.
|
|
|
|
</para></listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2001-12-30 22:56:05 +00:00
|
|
|
Another point of interest might be that all key events are first passed
|
2000-04-09 20:23:49 +00:00
|
|
|
through the key snooper functions if there are any. Read the description
|
|
|
|
of gtk_key_snooper_install() if you need this feature.
|
|
|
|
</para></listitem>
|
|
|
|
<listitem><para>
|
|
|
|
After finishing the delivery the event is popped from the event stack.
|
|
|
|
</para></listitem>
|
|
|
|
</orderedlist>
|
2000-09-07 18:17:06 +00:00
|
|
|
|
2001-12-09 21:34:39 +00:00
|
|
|
@event: An event to process (normally) passed by GDK.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### USER_FUNCTION GtkModuleInitFunc ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Each GTK+ module must have a function gtk_module_init() with this prototype.
|
|
|
|
This function is called after loading the module with the @argc and @argv
|
2000-04-09 20:23:49 +00:00
|
|
|
cleaned from any arguments that GTK+ handles itself.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-09 21:34:39 +00:00
|
|
|
@argc: Pointer to the number of arguments remaining after gtk_init().
|
2000-09-07 18:17:06 +00:00
|
|
|
@argv: Points to the argument vector.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
<!-- ##### USER_FUNCTION GtkModuleDisplayInitFunc ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@display:
|
2002-12-06 00:10:20 +00:00
|
|
|
@Since: 2.2
|
Documentation fixes.
Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
gtktreemodel.sgml,gtktable.sgml, gtktable.c:
Documentation fixes.
#85719, #90759, #95169, Owen Taylor;
#89221, Yao Zhang, Matthias Clasen;
#95592, Joost Faassen;
#92637, Vitaly Tishkov;
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_true ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
All this function does it to return %TRUE. This can be useful for example
|
1999-12-19 21:08:48 +00:00
|
|
|
if you want to inhibit the deletion of a window. Of course you should
|
|
|
|
not do this as the user expects a reaction from clicking the close
|
|
|
|
icon of the window...
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
1999-12-19 21:08:48 +00:00
|
|
|
<example>
|
2001-12-09 21:34:39 +00:00
|
|
|
<title>A persistent window</title>
|
1999-12-19 21:08:48 +00:00
|
|
|
<programlisting>
|
|
|
|
##include <gtk/gtk.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
GtkWidget *win, *but;
|
|
|
|
|
|
|
|
gtk_init( &argc, &argv );
|
|
|
|
|
|
|
|
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
2004-04-23 19:48:08 +00:00
|
|
|
g_signal_connect (win, "delete-event",
|
Small additions.
* gtk/tmpl/gtktextview.sgml: Small additions.
* gtk/tmpl/gtksignal.sgml: Explain what to use instead.
* gtk/question_index.sgml, gtk/text_widget.sgml, gtk/tree_widget.sgml,
gtk/changes-1.2.sgml, gtk/changes-2.0.sgml,
gtk/framebuffer.sgml: SGML fixes and additions.
* gtk/tmpl/gtksignal.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkeditable.sgml, gtk/tmpl/gtkfilesel.sgml,
gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkrc.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkwindow.sgml:
Replace references to deprecated functions.
2002-01-03 23:04:44 +00:00
|
|
|
G_CALLBACK (gtk_true), NULL);
|
2004-04-23 19:48:08 +00:00
|
|
|
g_signal_connect (win, "destroy",
|
Small additions.
* gtk/tmpl/gtktextview.sgml: Small additions.
* gtk/tmpl/gtksignal.sgml: Explain what to use instead.
* gtk/question_index.sgml, gtk/text_widget.sgml, gtk/tree_widget.sgml,
gtk/changes-1.2.sgml, gtk/changes-2.0.sgml,
gtk/framebuffer.sgml: SGML fixes and additions.
* gtk/tmpl/gtksignal.sgml, gtk/tmpl/gtkdialog.sgml,
gtk/tmpl/gtkeditable.sgml, gtk/tmpl/gtkfilesel.sgml,
gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkrc.sgml,
gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtkspinbutton.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkwindow.sgml:
Replace references to deprecated functions.
2002-01-03 23:04:44 +00:00
|
|
|
G_CALLBACK (gtk_main_quit), NULL);
|
1999-12-19 21:08:48 +00:00
|
|
|
|
|
|
|
but = gtk_button_new_with_label ("Close yourself. I mean it!");
|
2004-04-23 19:48:08 +00:00
|
|
|
g_signal_connect_swapped (but, "clicked",
|
|
|
|
G_CALLBACK (gtk_object_destroy), win);
|
1999-12-19 21:08:48 +00:00
|
|
|
gtk_container_add (GTK_CONTAINER (win), but);
|
|
|
|
|
|
|
|
gtk_widget_show_all (win);
|
2002-04-18 22:04:46 +00:00
|
|
|
gtk_main (<!-- -->);
|
1999-12-19 21:08:48 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
|
|
|
|
@Returns: %TRUE
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_false ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Analogical to gtk_true() this function does nothing
|
1999-12-19 21:08:48 +00:00
|
|
|
but always returns %FALSE.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
1999-12-19 21:08:48 +00:00
|
|
|
@Returns: %FALSE
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_grab_add ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Makes @widget the current grabbed widget. This means that interaction with
|
2000-04-09 20:23:49 +00:00
|
|
|
other widgets in the same application is blocked and mouse as well as
|
2001-12-09 21:34:39 +00:00
|
|
|
keyboard events are delivered to this widget.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@widget: The widget that grabs keyboard and pointer events.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_grab_get_current ##### -->
|
|
|
|
<para>
|
2005-07-05 22:34:07 +00:00
|
|
|
Queries the current grab of the default window group.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@Returns: The widget which currently has the grab or %NULL if no grab is active.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_grab_remove ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Removes the grab from the given widget. You have to pair calls to gtk_grab_add()
|
|
|
|
and gtk_grab_remove().
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@widget: The widget which gives up the grab.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_init_add ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Registers a function to be called when the mainloop is started.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-09 21:34:39 +00:00
|
|
|
@function: Function to invoke when gtk_main() is called next.
|
2000-04-09 20:23:49 +00:00
|
|
|
@data: Data to pass to that function.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_quit_add_destroy ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Trigger destruction of @object in case the mainloop at level @main_level
|
2000-04-09 20:23:49 +00:00
|
|
|
is quit.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@main_level: Level of the mainloop which shall trigger the destruction.
|
|
|
|
@object: Object to be destroyed.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_quit_add ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Registers a function to be called when an instance of the mainloop is left.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@main_level: Level at which termination the function shall be called. You
|
|
|
|
can pass 0 here to have the function run at the termination of the current
|
|
|
|
mainloop.
|
|
|
|
@function: The function to call. This should return 0 to be removed from the
|
|
|
|
list of quit handlers. Otherwise the function might be called again.
|
2001-12-09 21:34:39 +00:00
|
|
|
@data: Pointer to pass when calling @function.
|
2000-04-09 20:23:49 +00:00
|
|
|
@Returns: A handle for this quit handler (you need this for gtk_quit_remove())
|
2001-12-09 21:34:39 +00:00
|
|
|
or 0 if you passed a %NULL pointer in @function.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_quit_add_full ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Registers a function to be called when an instance of the mainloop is left.
|
|
|
|
In comparison to gtk_quit_add() this function adds the possibility to
|
|
|
|
pass a marshaller and a function to be called when the quit handler is freed.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The former can be used to run interpreted code instead of a compiled function
|
2001-12-09 21:34:39 +00:00
|
|
|
while the latter can be used to free the information stored in @data (while
|
|
|
|
you can do this in @function as well)... So this function will mostly be
|
2000-04-09 20:23:49 +00:00
|
|
|
used by GTK+ wrappers for languages other than C.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@main_level: Level at which termination the function shall be called. You
|
|
|
|
can pass 0 here to have the function run at the termination of the current
|
|
|
|
mainloop.
|
|
|
|
@function: The function to call. This should return 0 to be removed from the
|
|
|
|
list of quit handlers. Otherwise the function might be called again.
|
2001-12-09 21:34:39 +00:00
|
|
|
@marshal: The marshaller to be used. If this is non-%NULL, @function is
|
2000-04-09 20:23:49 +00:00
|
|
|
ignored.
|
2001-12-09 21:34:39 +00:00
|
|
|
@data: Pointer to pass when calling @function.
|
|
|
|
@destroy: Function to call to destruct @data. Gets @data as argument.
|
2000-04-09 20:23:49 +00:00
|
|
|
@Returns: A handle for this quit handler (you need this for gtk_quit_remove())
|
2001-12-09 21:34:39 +00:00
|
|
|
or 0 if you passed a %NULL pointer in @function.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_quit_remove ##### -->
|
|
|
|
<para>
|
2003-04-07 00:16:43 +00:00
|
|
|
Removes a quit handler by its identifier.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@quit_handler_id: Identifier for the handler returned when installing it.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_quit_remove_by_data ##### -->
|
|
|
|
<para>
|
2003-04-07 00:16:43 +00:00
|
|
|
Removes a quit handler identified by its @data field.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-09 21:34:39 +00:00
|
|
|
@data: The pointer passed as @data to gtk_quit_add() or gtk_quit_add_full().
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_timeout_add_full ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Registers a function to be called periodically. The function will be called
|
2001-12-09 21:34:39 +00:00
|
|
|
repeatedly after @interval milliseconds until it returns %FALSE at which
|
2000-04-09 20:23:49 +00:00
|
|
|
point the timeout is destroyed and will not be called again.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@interval: The time between calls to the function, in milliseconds
|
|
|
|
(1/1000ths of a second.)
|
|
|
|
@function: The function to call periodically.
|
2001-12-09 21:34:39 +00:00
|
|
|
@marshal: The marshaller to use instead of the function (if non-%NULL).
|
2000-04-09 20:23:49 +00:00
|
|
|
@data: The data to pass to the function.
|
2001-12-09 21:34:39 +00:00
|
|
|
@destroy: Function to call when the timeout is destroyed or %NULL.
|
2000-04-09 20:23:49 +00:00
|
|
|
@Returns: A unique id for the event source.
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_timeout_add_full() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
handle rtl code.
Sun Mar 2 23:35:57 2003 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_get_size):
handle rtl code.
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_get_size): ditto
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): ditto
* gtk/gtktreeview.c: (invalidate_column),
(invalidate_last_column),
(gtk_tree_view_get_real_requested_width_from_column),
(gtk_tree_view_size_allocate_columns),
(gtk_tree_view_size_allocate), (gtk_tree_view_button_press),
(gtk_tree_view_button_release_drag_column),
(gtk_tree_view_update_current_reorder),
(gtk_tree_view_motion_drag_column), (gtk_tree_view_bin_expose),
(gtk_tree_view_key_press), (gtk_tree_view_header_focus),
(gtk_tree_view_get_background_xrange),
(gtk_tree_view_get_arrow_xrange),
(gtk_tree_view_is_expander_column),
(gtk_tree_view_set_column_drag_info),
(gtk_tree_view_move_cursor_left_right):
Add RTL support.
* gtk/gtktreeviewcolumn.h (struct _GtkTreeViewColumn): add an
expand flag.
* gtk/gtktreeviewcolumn.c:
(gtk_tree_view_column_class_init),
(gtk_tree_view_column_set_property),
(gtk_tree_view_column_get_property),
(gtk_tree_view_column_set_expand),
(gtk_tree_view_column_get_expand),
(gtk_tree_view_column_cell_process_action):
Add support for expand flag
2003-03-03 04:51:42 +00:00
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_timeout_add ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Registers a function to be called periodically. The function will be called
|
2001-12-09 21:34:39 +00:00
|
|
|
repeatedly after @interval milliseconds until it returns %FALSE at which
|
2000-04-09 20:23:49 +00:00
|
|
|
point the timeout is destroyed and will not be called again.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@interval: The time between calls to the function, in milliseconds
|
|
|
|
(1/1000ths of a second.)
|
|
|
|
@function: The function to call periodically.
|
|
|
|
@data: The data to pass to the function.
|
|
|
|
@Returns: A unique id for the event source.
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_timeout_add() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
handle rtl code.
Sun Mar 2 23:35:57 2003 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_get_size):
handle rtl code.
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_get_size): ditto
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): ditto
* gtk/gtktreeview.c: (invalidate_column),
(invalidate_last_column),
(gtk_tree_view_get_real_requested_width_from_column),
(gtk_tree_view_size_allocate_columns),
(gtk_tree_view_size_allocate), (gtk_tree_view_button_press),
(gtk_tree_view_button_release_drag_column),
(gtk_tree_view_update_current_reorder),
(gtk_tree_view_motion_drag_column), (gtk_tree_view_bin_expose),
(gtk_tree_view_key_press), (gtk_tree_view_header_focus),
(gtk_tree_view_get_background_xrange),
(gtk_tree_view_get_arrow_xrange),
(gtk_tree_view_is_expander_column),
(gtk_tree_view_set_column_drag_info),
(gtk_tree_view_move_cursor_left_right):
Add RTL support.
* gtk/gtktreeviewcolumn.h (struct _GtkTreeViewColumn): add an
expand flag.
* gtk/gtktreeviewcolumn.c:
(gtk_tree_view_column_class_init),
(gtk_tree_view_column_set_property),
(gtk_tree_view_column_get_property),
(gtk_tree_view_column_set_expand),
(gtk_tree_view_column_get_expand),
(gtk_tree_view_column_cell_process_action):
Add support for expand flag
2003-03-03 04:51:42 +00:00
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_timeout_remove ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Removes the given timeout destroying all information about it.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@timeout_handler_id: The identifier returned when installing the timeout.
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_source_remove() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_idle_add ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Causes the mainloop to call the given function whenever no events with
|
|
|
|
higher priority are to be processed. The default priority is
|
2001-12-09 21:34:39 +00:00
|
|
|
%GTK_PRIORITY_DEFAULT, which is rather low.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@function: The function to call.
|
|
|
|
@data: The information to pass to the function.
|
|
|
|
@Returns: a unique handle for this registration.
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_idle_add() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_idle_add_priority ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Like gtk_idle_add() this function allows you to have a function called
|
|
|
|
when the event loop is idle. The difference is that you can give a
|
2001-12-09 21:34:39 +00:00
|
|
|
priority different from %GTK_PRIORITY_DEFAULT to the idle function.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-09 21:34:39 +00:00
|
|
|
@priority: The priority which should not be above %G_PRIORITY_HIGH_IDLE.
|
|
|
|
Note that you will interfere with GTK+ if you use a priority above
|
|
|
|
%GTK_PRIORITY_RESIZE.
|
2000-04-09 20:23:49 +00:00
|
|
|
@function: The function to call.
|
|
|
|
@data: Data to pass to that function.
|
|
|
|
@Returns: A unique id for the event source.
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_idle_add_full() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
handle rtl code.
Sun Mar 2 23:35:57 2003 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_get_size):
handle rtl code.
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_get_size): ditto
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): ditto
* gtk/gtktreeview.c: (invalidate_column),
(invalidate_last_column),
(gtk_tree_view_get_real_requested_width_from_column),
(gtk_tree_view_size_allocate_columns),
(gtk_tree_view_size_allocate), (gtk_tree_view_button_press),
(gtk_tree_view_button_release_drag_column),
(gtk_tree_view_update_current_reorder),
(gtk_tree_view_motion_drag_column), (gtk_tree_view_bin_expose),
(gtk_tree_view_key_press), (gtk_tree_view_header_focus),
(gtk_tree_view_get_background_xrange),
(gtk_tree_view_get_arrow_xrange),
(gtk_tree_view_is_expander_column),
(gtk_tree_view_set_column_drag_info),
(gtk_tree_view_move_cursor_left_right):
Add RTL support.
* gtk/gtktreeviewcolumn.h (struct _GtkTreeViewColumn): add an
expand flag.
* gtk/gtktreeviewcolumn.c:
(gtk_tree_view_column_class_init),
(gtk_tree_view_column_set_property),
(gtk_tree_view_column_get_property),
(gtk_tree_view_column_set_expand),
(gtk_tree_view_column_get_expand),
(gtk_tree_view_column_cell_process_action):
Add support for expand flag
2003-03-03 04:51:42 +00:00
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_idle_add_full ##### -->
|
|
|
|
<para>
|
2001-12-09 21:34:39 +00:00
|
|
|
Like gtk_idle_add() this function allows you to have a function called
|
|
|
|
when the event loop is idle. The difference is that you can give a
|
|
|
|
priority different from %GTK_PRIORITY_DEFAULT to the idle function.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-09 21:34:39 +00:00
|
|
|
@priority: The priority which should not be above %G_PRIORITY_HIGH_IDLE.
|
|
|
|
Note that you will interfere with GTK+ if you use a priority above
|
|
|
|
%GTK_PRIORITY_RESIZE.
|
|
|
|
@function: The function to call.
|
|
|
|
@marshal: The marshaller to use instead of the function (if non-%NULL).
|
|
|
|
@data: Data to pass to that function.
|
|
|
|
@destroy: Function to call when the timeout is destroyed or %NULL.
|
|
|
|
@Returns: A unique id for the event source.
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_idle_add_full() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_idle_remove ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Removes the idle function with the given id.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@idle_handler_id: Identifies the idle function to remove.
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_source_remove() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_idle_remove_by_data ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Removes the idle function identified by the user data.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-04-09 20:23:49 +00:00
|
|
|
@data: remove the idle function which was registered with this user data.
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_idle_remove_by_data() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_input_add_full ##### -->
|
|
|
|
<para>
|
2001-12-30 22:56:05 +00:00
|
|
|
Registers a function to be called when a condition becomes true
|
|
|
|
on a file descriptor.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-30 22:56:05 +00:00
|
|
|
@source: a file descriptor.
|
|
|
|
@condition: the condition.
|
|
|
|
@function: The function to call.
|
|
|
|
@marshal: The marshaller to use instead of the function (if non-%NULL).
|
|
|
|
@data: callback data passed to @function.
|
|
|
|
@destroy: callback function to call with @data when the input
|
|
|
|
handler is removed, or %NULL.
|
|
|
|
@Returns: A unique id for the event source; to be used with gtk_input_remove().
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_io_add_watch_full() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
handle rtl code.
Sun Mar 2 23:35:57 2003 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_get_size):
handle rtl code.
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_get_size): ditto
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): ditto
* gtk/gtktreeview.c: (invalidate_column),
(invalidate_last_column),
(gtk_tree_view_get_real_requested_width_from_column),
(gtk_tree_view_size_allocate_columns),
(gtk_tree_view_size_allocate), (gtk_tree_view_button_press),
(gtk_tree_view_button_release_drag_column),
(gtk_tree_view_update_current_reorder),
(gtk_tree_view_motion_drag_column), (gtk_tree_view_bin_expose),
(gtk_tree_view_key_press), (gtk_tree_view_header_focus),
(gtk_tree_view_get_background_xrange),
(gtk_tree_view_get_arrow_xrange),
(gtk_tree_view_is_expander_column),
(gtk_tree_view_set_column_drag_info),
(gtk_tree_view_move_cursor_left_right):
Add RTL support.
* gtk/gtktreeviewcolumn.h (struct _GtkTreeViewColumn): add an
expand flag.
* gtk/gtktreeviewcolumn.c:
(gtk_tree_view_column_class_init),
(gtk_tree_view_column_set_property),
(gtk_tree_view_column_get_property),
(gtk_tree_view_column_set_expand),
(gtk_tree_view_column_get_expand),
(gtk_tree_view_column_cell_process_action):
Add support for expand flag
2003-03-03 04:51:42 +00:00
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_input_remove ##### -->
|
|
|
|
<para>
|
2001-12-30 22:56:05 +00:00
|
|
|
Removes the function with the given id.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-30 22:56:05 +00:00
|
|
|
@input_handler_id: Identifies the function to remove.
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: Use g_source_remove() instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GTK_PRIORITY_REDRAW ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Use this priority for redrawing related stuff. It is used internally by
|
|
|
|
GTK+ to do pending redraws. This priority is lower than %GTK_PRIORITY_RESIZE
|
|
|
|
to avoid redrawing a widget just before resizing (and therefore redrawing
|
|
|
|
it again).
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
2005-12-20 05:47:43 +00:00
|
|
|
|
|
|
|
@Deprecated: 2.4: This macro is deprecated. You should use %GDK_PRIORITY_REDRAW instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GTK_PRIORITY_RESIZE ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Use this priority for resizing related stuff. It is used internally by
|
|
|
|
GTK+ to compute the sizes of widgets. This priority is higher than
|
|
|
|
%GTK_PRIORITY_REDRAW to avoid resizing a widget which was just redrawn.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GTK_PRIORITY_HIGH ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Use this for high priority timeouts. This priority is never used inside
|
|
|
|
GTK+ so everything running at this priority will be running before anything
|
|
|
|
inside the toolkit.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: This macro is deprecated. You should use %G_PRIORITY_HIGH instead.
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GTK_PRIORITY_INTERNAL ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
This priority is for GTK+ internal stuff. Don't use it in your applications.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GTK_PRIORITY_DEFAULT ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Default priority for idle functions.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: This macro is deprecated. You should use %G_PRIORITY_DEFAULT_IDLE instead.
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GTK_PRIORITY_LOW ##### -->
|
|
|
|
<para>
|
2000-04-09 20:23:49 +00:00
|
|
|
Priority for very unimportant background tasks.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2005-12-20 05:47:43 +00:00
|
|
|
@Deprecated: 2.4: This macro is deprecated. You should use %G_PRIORITY_LOW instead.
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_key_snooper_install ##### -->
|
|
|
|
<para>
|
2001-12-30 22:56:05 +00:00
|
|
|
Installs a key snooper function, which will get called on all key events
|
|
|
|
before delivering them normally.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2002-01-01 23:51:00 +00:00
|
|
|
@snooper: a #GtkKeySnoopFunc.
|
2001-12-30 22:56:05 +00:00
|
|
|
@func_data: data to pass to @snooper.
|
|
|
|
@Returns: a unique id for this key snooper for use with gtk_key_snooper_remove().
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### USER_FUNCTION GtkKeySnoopFunc ##### -->
|
|
|
|
<para>
|
2001-12-30 22:56:05 +00:00
|
|
|
Key snooper functions are called before normal event delivery.
|
|
|
|
They can be used to implement custom key event handling.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2002-01-01 23:51:00 +00:00
|
|
|
@grab_widget: the widget to which the event will be delivered.
|
2001-12-30 22:56:05 +00:00
|
|
|
@event: the key event.
|
|
|
|
@func_data: the @func_data supplied to gtk_key_snooper_install().
|
|
|
|
@Returns: %TRUE to stop further processing of @event, %FALSE to continue.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_key_snooper_remove ##### -->
|
|
|
|
<para>
|
2001-12-30 22:56:05 +00:00
|
|
|
Removes the key snooper function with the given id.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-30 22:56:05 +00:00
|
|
|
@snooper_handler_id: Identifies the key snooper to remove.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_get_current_event ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-11-14 16:36:20 +00:00
|
|
|
<!-- ##### FUNCTION gtk_get_current_event_time ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2001-01-09 16:41:17 +00:00
|
|
|
<!-- ##### FUNCTION gtk_get_current_event_state ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@state:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gtk_get_event_widget ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@event:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_propagate_event ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@widget:
|
|
|
|
@event:
|
|
|
|
|
|
|
|
|