1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
General
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2000-02-01 04:27:56 +00:00
|
|
|
library initialization and miscellaneous functions.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
This section describes the GDK initialization functions and miscellaneous
|
|
|
|
utility functions.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_init ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Initializes the GDK library and connects to the X server.
|
|
|
|
If initialization fails, a warning message is output and the application
|
2001-11-28 19:05:58 +00:00
|
|
|
terminates with a call to <literal>exit(1)</literal>.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Any arguments used by GDK are removed from the array and @argc and @argv are
|
|
|
|
updated accordingly.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
|
|
|
by GTK+ applications.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@argc: the number of command line arguments.
|
|
|
|
@argv: the array of command line arguments.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_init_check ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2001-11-28 19:05:58 +00:00
|
|
|
Initializes the GDK library and connects to the X server, returning %TRUE on
|
2000-02-01 04:27:56 +00:00
|
|
|
success.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Any arguments used by GDK are removed from the array and @argc and @argv are
|
|
|
|
updated accordingly.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
|
|
|
by GTK+ applications.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@argc: the number of command line arguments.
|
|
|
|
@argv: the array of command line arguments.
|
2001-11-28 19:05:58 +00:00
|
|
|
@Returns: %TRUE if initialization succeeded.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_set_locale ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2001-11-28 19:05:58 +00:00
|
|
|
Initializes the support for internationalization by calling the <function>setlocale()</function>
|
2000-02-01 04:27:56 +00:00
|
|
|
system call. This function is called by gtk_set_locale() and so GTK+
|
|
|
|
applications should use that instead.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
Markup fixes.
* gdk-pixbuf/tmpl/creating.sgml,
gdk-pixbuf/tmpl/gdk-pixbuf-xlib-from-drawables.sgml,
gdk-pixbuf/tmpl/gdk-pixbuf-xlib-init.sgml,
gdk-pixbuf/tmpl/gdk-pixbuf-xlib-rendering.sgml,
gdk-pixbuf/tmpl/refcounting.sgml: Markup fixes.
* gtk/building.sgml, gtk/resources.sgml: Markup fixes.
* gtk/gtk.types: Remove gtk_text_layout_get_type(). (???)
* gdk/tmpl/general.sgml: Use <envar>, not <envvar>.
* gdk-pixbuf-io.c, gdk-pixbuf-animation.c, gdk-pixbuf-data.c,
gdk-pixbuf-loader.c, gdk-pixbuf-scale.c, gdk-pixbuf-util.c,
gdk-pixdata.c: Markup fixes.
2001-12-17 23:06:47 +00:00
|
|
|
The locale to use is determined by the <envar>LANG</envar> environment variable,
|
2000-02-01 04:27:56 +00:00
|
|
|
so to run an application in a certain locale you can do something like this:
|
|
|
|
<informalexample>
|
|
|
|
<programlisting>
|
|
|
|
export LANG="fr"
|
|
|
|
... run application ...
|
|
|
|
</programlisting>
|
|
|
|
</informalexample>
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
If the locale is not supported by X then it is reset to the standard "C"
|
|
|
|
locale.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@Returns: the resulting locale.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_set_sm_client_id ##### -->
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2002-04-25 22:29:14 +00:00
|
|
|
@sm_client_id:
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2001-02-20 05:21:44 +00:00
|
|
|
<!-- ##### FUNCTION gdk_exit ##### -->
|
|
|
|
<para>
|
2001-11-28 19:05:58 +00:00
|
|
|
Exits the application using the <function>exit()</function> system call.
|
2001-02-20 05:21:44 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
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
|
|
|
This routine is provided mainly for backwards compatibility, since it used to
|
2001-02-20 05:21:44 +00:00
|
|
|
perform tasks necessary to exit the application cleanly. Those tasks are now
|
|
|
|
performed in a function which is automatically called on exit (via the use
|
|
|
|
of g_atexit()).
|
|
|
|
</para>
|
|
|
|
|
2001-11-28 19:05:58 +00:00
|
|
|
@error_code: the error code to pass to the <function>exit()</function> call.
|
2001-02-20 05:21:44 +00:00
|
|
|
|
|
|
|
|
2001-10-03 18:19:48 +00:00
|
|
|
<!-- ##### FUNCTION gdk_get_program_class ##### -->
|
|
|
|
<para>
|
2001-10-07 18:59:46 +00:00
|
|
|
Gets the program class. Unless the program class has explicitly
|
|
|
|
been set with gdk_set_program_class() or with the <option>--class</option>
|
|
|
|
commandline option, the default value is the program name (determined
|
|
|
|
with g_get_prgname()) with the first character converted to uppercase.
|
2001-10-03 18:19:48 +00:00
|
|
|
</para>
|
|
|
|
|
2001-10-13 05:52:14 +00:00
|
|
|
@Returns: the program class.
|
2001-10-03 18:19:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_set_program_class ##### -->
|
|
|
|
<para>
|
2002-01-11 22:39:03 +00:00
|
|
|
Sets the program class. The X11 backend uses the program class to set
|
|
|
|
the class name part of the <literal>WM_CLASS</literal> property on
|
|
|
|
toplevel windows; see the ICCCM.
|
2001-10-03 18:19:48 +00:00
|
|
|
</para>
|
|
|
|
|
2001-10-07 18:59:46 +00:00
|
|
|
@program_class: a string.
|
2001-10-03 18:19:48 +00:00
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_get_display ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
Markup fixes.
* gdk-pixbuf/tmpl/creating.sgml,
gdk-pixbuf/tmpl/gdk-pixbuf-xlib-from-drawables.sgml,
gdk-pixbuf/tmpl/gdk-pixbuf-xlib-init.sgml,
gdk-pixbuf/tmpl/gdk-pixbuf-xlib-rendering.sgml,
gdk-pixbuf/tmpl/refcounting.sgml: Markup fixes.
* gtk/building.sgml, gtk/resources.sgml: Markup fixes.
* gtk/gtk.types: Remove gtk_text_layout_get_type(). (???)
* gdk/tmpl/general.sgml: Use <envar>, not <envvar>.
* gdk-pixbuf-io.c, gdk-pixbuf-animation.c, gdk-pixbuf-data.c,
gdk-pixbuf-loader.c, gdk-pixbuf-scale.c, gdk-pixbuf-util.c,
gdk-pixdata.c: Markup fixes.
2001-12-17 23:06:47 +00:00
|
|
|
Gets the name of the display, which usually comes from the <envar>DISPLAY</envar>
|
2001-11-28 19:05:58 +00:00
|
|
|
environment variable or the <option>--display</option> command line option.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@Returns: the name of the display.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_flush ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Flushes the X output buffer and waits until all requests have been processed
|
|
|
|
by the server. This is rarely needed by applications. It's main use is for
|
|
|
|
trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_screen_width ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Returns the width of the screen in pixels.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@Returns: the width of the screen in pixels.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_screen_height ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Returns the height of the screen in pixels.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@Returns: the height of the screen in pixels.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_screen_width_mm ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Returns the width of the screen in millimeters.
|
|
|
|
Note that on many X servers this value will not be correct.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@Returns: the width of the screen in millimeters, though it is not always
|
|
|
|
correct.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_screen_height_mm ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Returns the height of the screen in millimeters.
|
|
|
|
Note that on many X servers this value will not be correct.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@Returns: the height of the screen in millimeters, though it is not always
|
|
|
|
correct.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_pointer_grab ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Grabs the pointer (usually a mouse) so that all events are passed to this
|
|
|
|
application until the pointer is ungrabbed with gdk_pointer_ungrab(), or
|
|
|
|
the grab window becomes unviewable.
|
|
|
|
This overrides any previous pointer grab by this client.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Pointer grabs are used for operations which need complete control over mouse
|
|
|
|
events, even if the mouse leaves the application.
|
|
|
|
For example in GTK+ it is used for Drag and Drop, for dragging the handle in
|
|
|
|
the #GtkHPaned and #GtkVPaned widgets, and for resizing columns in #GtkCList
|
|
|
|
widgets.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Note that if the event mask of an X window has selected both button press and
|
|
|
|
button release events, then a button press event will cause an automatic
|
|
|
|
pointer grab until the button is released.
|
|
|
|
X does this automatically since most applications expect to receive button
|
|
|
|
press and release events in pairs.
|
|
|
|
It is equivalent to a pointer grab on the window with @owner_events set to
|
2001-11-28 19:05:58 +00:00
|
|
|
%TRUE.
|
2000-02-01 04:27:56 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
@window: the #GdkWindow which will own the grab (the grab window).
|
2001-11-28 19:05:58 +00:00
|
|
|
@owner_events: if %FALSE then all pointer events are reported with respect to
|
|
|
|
@window and are only reported if selected by @event_mask. If %TRUE then pointer
|
2000-02-01 04:27:56 +00:00
|
|
|
events for this application are reported as normal, but pointer events outside
|
|
|
|
this application are reported with respect to @window and only if selected by
|
|
|
|
@event_mask. In either mode, unreported events are discarded.
|
|
|
|
@event_mask: specifies the event mask, which is used in accordance with
|
|
|
|
@owner_events.
|
2000-06-05 15:18:20 +00:00
|
|
|
@confine_to: If non-%NULL, the pointer will be confined to this
|
|
|
|
window during the grab. If the pointer is outside @confine_to, it will
|
|
|
|
automatically be moved to the closest edge of @confine_to and enter
|
|
|
|
and leave events will be generated as necessary.
|
2001-11-28 19:05:58 +00:00
|
|
|
@cursor: the cursor to display while the grab is active. If this is %NULL then
|
2000-02-01 04:27:56 +00:00
|
|
|
the normal cursors are used for @window and its descendants, and the cursor
|
|
|
|
for @window is used for all other windows.
|
|
|
|
@time: the timestamp of the event which led to this pointer grab. This usually
|
2001-11-28 19:05:58 +00:00
|
|
|
comes from a #GdkEventButton struct, though %GDK_CURRENT_TIME can be used if
|
2000-02-01 04:27:56 +00:00
|
|
|
the time isn't known.
|
2001-11-28 19:05:58 +00:00
|
|
|
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
|
2000-02-01 04:27:56 +00:00
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
|
2000-09-07 18:17:06 +00:00
|
|
|
<!-- ##### ENUM GdkGrabStatus ##### -->
|
|
|
|
<para>
|
2001-11-28 19:05:58 +00:00
|
|
|
Returned by gdk_pointer_grab() and gdk_keyboard_grab() to indicate
|
|
|
|
success or the reason for the failure of the grab attempt.
|
2000-09-07 18:17:06 +00:00
|
|
|
</para>
|
|
|
|
|
2001-12-23 22:55:17 +00:00
|
|
|
@GDK_GRAB_SUCCESS: the resource was successfully grabbed.
|
2001-11-28 19:05:58 +00:00
|
|
|
@GDK_GRAB_ALREADY_GRABBED: the resource is actively grabbed by another client.
|
|
|
|
@GDK_GRAB_INVALID_TIME: the resource was grabbed more recently than the
|
2001-12-23 22:55:17 +00:00
|
|
|
specified time.
|
2001-11-28 19:05:58 +00:00
|
|
|
@GDK_GRAB_NOT_VIEWABLE: the grab window or the @confine_to window are not
|
|
|
|
viewable.
|
|
|
|
@GDK_GRAB_FROZEN: the resource is frozen by an active grab of another client.
|
2000-09-07 18:17:06 +00:00
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_pointer_ungrab ##### -->
|
|
|
|
<para>
|
|
|
|
Ungrabs the pointer, if it is grabbed by this application.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-11-28 19:05:58 +00:00
|
|
|
@time: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
2000-02-01 04:27:56 +00:00
|
|
|
available.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_pointer_is_grabbed ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2001-11-28 19:05:58 +00:00
|
|
|
Returns %TRUE if the pointer is currently grabbed by this application.
|
2000-02-01 04:27:56 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Note that the return value is not completely reliable since the X server may
|
|
|
|
automatically ungrab the pointer, without informing the application, if the
|
|
|
|
grab window becomes unviewable. It also does not take passive pointer grabs
|
|
|
|
into account.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-11-28 19:05:58 +00:00
|
|
|
@Returns: %TRUE if the pointer is currently grabbed by this application.
|
2000-02-01 04:27:56 +00:00
|
|
|
Though this value is not always correct.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2001-04-17 18:12:46 +00:00
|
|
|
<!-- ##### FUNCTION gdk_set_double_click_time ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@msec:
|
|
|
|
|
|
|
|
|
1999-08-16 18:51:52 +00:00
|
|
|
<!-- ##### FUNCTION gdk_keyboard_grab ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Grabs the keyboard so that all events are passed to this
|
|
|
|
application until the keyboard is ungrabbed with gdk_keyboard_ungrab().
|
|
|
|
This overrides any previous keyboard grab by this client.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@window: the #GdkWindow which will own the grab (the grab window).
|
2001-11-28 19:05:58 +00:00
|
|
|
@owner_events: if %FALSE then all keyboard events are reported with respect to
|
|
|
|
@window. If %TRUE then keyboard events for this application are reported as
|
2000-02-01 04:27:56 +00:00
|
|
|
normal, but keyboard events outside this application are reported with respect
|
2000-04-09 20:23:49 +00:00
|
|
|
to @window. Both key press and key release events are always reported,
|
2000-02-01 04:27:56 +00:00
|
|
|
independant of the event mask set by the application.
|
2001-11-28 19:05:58 +00:00
|
|
|
@time: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
2000-02-01 04:27:56 +00:00
|
|
|
available.
|
2001-11-28 19:05:58 +00:00
|
|
|
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_keyboard_ungrab ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Ungrabs the keyboard, if it is grabbed by this application.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-11-28 19:05:58 +00:00
|
|
|
@time: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
2000-02-01 04:27:56 +00:00
|
|
|
available.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_beep ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Emits a short beep.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_get_use_xshm ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2001-11-28 19:05:58 +00:00
|
|
|
Returns %TRUE if GDK will attempt to use the MIT-SHM shared memory extension.
|
2000-02-01 04:27:56 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The shared memory extension is used for #GdkImage, and consequently for
|
|
|
|
<link linkend="gdk-GdkRGB">GdkRGB</link>.
|
|
|
|
It enables much faster drawing by communicating with the X server through
|
|
|
|
SYSV shared memory calls. However, it can only be used if the X client and
|
|
|
|
server are on the same machine and the server supports it.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-11-28 19:05:58 +00:00
|
|
|
@Returns: %TRUE if use of the MIT shared memory extension will be attempted.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
<!-- ##### FUNCTION gdk_set_use_xshm ##### -->
|
1999-08-16 18:51:52 +00:00
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Sets whether the use of the MIT shared memory extension should be attempted.
|
|
|
|
This function is mainly for internal use. It is only safe for an application
|
2001-11-28 19:05:58 +00:00
|
|
|
to set this to %FALSE, since if it is set to %TRUE and the server does not
|
2000-02-01 04:27:56 +00:00
|
|
|
support the extension it may cause warning messages to be output.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2001-11-28 19:05:58 +00:00
|
|
|
@use_xshm: %TRUE if use of the MIT shared memory extension should be attempted.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_error_trap_push ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
This function allows X errors to be trapped instead of the normal behavior
|
|
|
|
of exiting the application. It should only be used if it is not possible to
|
|
|
|
avoid the X error in any other way.
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
2000-02-01 04:27:56 +00:00
|
|
|
<example>
|
|
|
|
<title>Trapping an X error.</title>
|
|
|
|
<programlisting>
|
2002-04-18 22:04:46 +00:00
|
|
|
gdk_error_trap_push (<!-- -->);
|
2000-02-01 04:27:56 +00:00
|
|
|
|
|
|
|
/* ... Call the X function which may cause an error here ... */
|
|
|
|
|
|
|
|
/* Flush the X queue to catch errors now. */
|
2002-04-18 22:04:46 +00:00
|
|
|
gdk_flush (<!-- -->);
|
2000-02-01 04:27:56 +00:00
|
|
|
|
2002-04-18 22:04:46 +00:00
|
|
|
if (gdk_error_trap_pop (<!-- -->))
|
2000-02-01 04:27:56 +00:00
|
|
|
{
|
|
|
|
/* ... Handle the error here ... */
|
|
|
|
}
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_error_trap_pop ##### -->
|
|
|
|
<para>
|
2000-02-01 04:27:56 +00:00
|
|
|
Removes the X error trap installed with gdk_error_trap_push().
|
1999-08-16 18:51:52 +00:00
|
|
|
</para>
|
|
|
|
|
2000-02-01 04:27:56 +00:00
|
|
|
@Returns: the X error code, or 0 if no error occurred.
|
1999-08-16 18:51:52 +00:00
|
|
|
|
|
|
|
|
2000-09-07 18:17:06 +00:00
|
|
|
<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
|
|
|
|
<para>
|
2001-10-17 21:41:47 +00:00
|
|
|
This macro is defined if GDK is configured to use the X backend.
|
2000-09-07 18:17:06 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GDK_WINDOWING_WIN32 ##### -->
|
|
|
|
<para>
|
2001-10-17 21:41:47 +00:00
|
|
|
This macro is defined if GDK is configured to use the Win32 backend.
|
2000-09-07 18:17:06 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GDK_WINDOWING_FB ##### -->
|
|
|
|
<para>
|
2001-10-17 21:41:47 +00:00
|
|
|
This macro is defined if GDK is configured to use the Linux framebuffer backend.
|
2000-09-07 18:17:06 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|