![]() |
![]() |
![]() |
GDK 3 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gdk/gdkx.h> #define GDK_ROOT_WINDOW #define GDK_WINDOW_XID (win) #define GDK_DISPLAY_XDISPLAY (display) #define GDK_SCREEN_XDISPLAY (screen) #define GDK_SCREEN_XNUMBER (screen) #define GDK_SCREEN_XSCREEN (screen) #define GDK_CURSOR_XCURSOR (cursor) #define GDK_CURSOR_XDISPLAY (cursor) #define GDK_POINTER_TO_XID (pointer) #define GDK_XID_TO_POINTER (pointer) GdkDisplay * gdk_x11_lookup_xdisplay (Display *xdisplay
); guint32 gdk_x11_get_server_time (GdkWindow *window
); gint gdk_x11_device_get_id (GdkDevice *device
); GdkDevice * gdk_x11_device_manager_lookup (GdkDeviceManager *device_manager
,gint device_id
); guint32 gdk_x11_display_get_user_time (GdkDisplay *display
); void gdk_x11_display_broadcast_startup_message (GdkDisplay *display
,const char *message_type
,...
); const gchar * gdk_x11_display_get_startup_notification_id (GdkDisplay *display
); void gdk_x11_display_set_startup_notification_id (GdkDisplay *display
,const gchar *startup_id
); Display * gdk_x11_display_get_xdisplay (GdkDisplay *display
); void gdk_x11_display_grab (GdkDisplay *display
); void gdk_x11_display_ungrab (GdkDisplay *display
); void gdk_x11_display_error_trap_push (GdkDisplay *display
); void gdk_x11_display_error_trap_pop_ignored (GdkDisplay *display
); void gdk_x11_display_set_cursor_theme (GdkDisplay *display
,const gchar *theme
,const gint size
); void gdk_x11_register_standard_event_type (GdkDisplay *display
,gint event_base
,gint n_events
); int gdk_x11_screen_get_screen_number (GdkScreen *screen
); Screen * gdk_x11_screen_get_xscreen (GdkScreen *screen
); const char * gdk_x11_screen_get_window_manager_name (GdkScreen *screen
); XID gdk_x11_screen_get_monitor_output (GdkScreen *screen
,gint monitor_num
); GdkVisual * gdk_x11_screen_lookup_visual (GdkScreen *screen
,VisualID xvisualid
); gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen
,GdkAtom property
); GdkWindow * gdk_x11_window_foreign_new_for_display (GdkDisplay *display
,Window window
); GdkWindow * gdk_x11_window_lookup_for_display (GdkDisplay *display
,Window window
); Window gdk_x11_window_get_xid (GdkWindow *window
); void gdk_x11_window_set_theme_variant (GdkWindow *window
,char *variant
); void gdk_x11_window_set_user_time (GdkWindow *window
,guint32 timestamp
); void gdk_x11_window_move_to_current_desktop (GdkWindow *window
); Window gdk_x11_get_default_root_xwindow (void
); gint gdk_x11_get_default_screen (void
); Display * gdk_x11_get_default_xdisplay (void
); void gdk_x11_grab_server (void
); void gdk_x11_ungrab_server (void
); Cursor gdk_x11_cursor_get_xcursor (GdkCursor *cursor
); Display * gdk_x11_cursor_get_xdisplay (GdkCursor *cursor
); Visual * gdk_x11_visual_get_xvisual (GdkVisual *visual
); Atom gdk_x11_atom_to_xatom (GdkAtom atom
); Atom gdk_x11_atom_to_xatom_for_display (GdkDisplay *display
,GdkAtom atom
); GdkAtom gdk_x11_xatom_to_atom (Atom xatom
); GdkAtom gdk_x11_xatom_to_atom_for_display (GdkDisplay *display
,Atom xatom
); Atom gdk_x11_get_xatom_by_name (const gchar *atom_name
); Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display
,const gchar *atom_name
); const gchar * gdk_x11_get_xatom_name (Atom xatom
); const gchar * gdk_x11_get_xatom_name_for_display (GdkDisplay *display
,Atom xatom
); void gdk_x11_set_sm_client_id (const gchar *sm_client_id
); gint gdk_x11_display_text_property_to_text_list (GdkDisplay *display
,GdkAtom encoding
,gint format
,const guchar *text
,gint length
,gchar ***list
); void gdk_x11_free_text_list (gchar **list
); gint gdk_x11_display_string_to_compound_text (GdkDisplay *display
,const gchar *str
,GdkAtom *encoding
,gint *format
,guchar **ctext
,gint *length
); gboolean gdk_x11_display_utf8_to_compound_text (GdkDisplay *display
,const gchar *str
,GdkAtom *encoding
,gint *format
,guchar **ctext
,gint *length
); void gdk_x11_free_compound_text (guchar *ctext
);
The functions in this section are specific to the GDK X11 backend.
To use them, you need to include the <gdk/gdkx.h>
header and use the X11-specific pkg-config files to build your
application (either gdk-x11-3.0
or
gtk+-x11-3.0
).
To make your code compile with other GDK backends, guard backend-specific
calls by an ifdef as follows. Since GDK may be built with multiple
backends, you should also check for the backend that is in use (e.g. by
using the GDK_IS_X11_DISPLAY()
macro).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#ifdef GDK_WINDOWING_X11 if (GDK_IS_X11_DISPLAY (display)) { /* make X11-specific calls here */ } else #endif #ifdef GDK_WINDOWING_QUARTZ if (GDK_IS_QUARTZ_DISPLAY (display)) { /* make Quartz-specific calls here &ast/ } else #endif g_error ("Unsupported GDK backend"); |
#define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ())
Obtains the Xlib window id of the root window of the current screen.
#define GDK_WINDOW_XID(win)
Returns the X window belonging to a GdkWindow.
|
a GdkWindow. |
Returns : |
the Xlib Window of win . |
#define GDK_SCREEN_XDISPLAY(screen)
Returns the display of a X11 GdkScreen.
|
a GdkScreen |
Returns : |
an Xlib Display* |
#define GDK_SCREEN_XNUMBER(screen) (gdk_x11_screen_get_screen_number (screen))
Returns the index of a X11 GdkScreen.
|
a GdkScreen |
Returns : |
the position of screen among the screens of its display |
#define GDK_SCREEN_XSCREEN(screen) (gdk_x11_screen_get_xscreen (screen))
Returns the screen of a X11 GdkScreen.
|
a GdkScreen |
Returns : |
an Xlib Screen* |
#define GDK_CURSOR_XCURSOR(cursor) (gdk_x11_cursor_get_xcursor (cursor))
Returns the X cursor belonging to a GdkCursor.
|
a GdkCursor. |
Returns : |
an Xlib Cursor. |
#define GDK_CURSOR_XDISPLAY(cursor) (gdk_x11_cursor_get_xdisplay (cursor))
Returns the display of a GdkCursor.
|
a GdkCursor. |
Returns : |
an Xlib Display*. |
#define GDK_POINTER_TO_XID(pointer) GPOINTER_TO_UINT(pointer)
Converts a gpointer
back to an XID that was previously converted
using GDK_XID_TO_POINTER()
.
#define GDK_XID_TO_POINTER(pointer) GUINT_TO_POINTER(pointer)
Converts an XID into a gpointer
. This is useful with data structures
that use pointer arguments such as GHashTable. Use GDK_POINTER_TO_XID()
to convert the argument back to an XID.
GdkDisplay * gdk_x11_lookup_xdisplay (Display *xdisplay
);
Find the GdkDisplay corresponding to display
, if any exists.
|
a pointer to an X Display |
Returns : |
the GdkDisplay, if found, otherwise NULL . [transfer none]
|
Since 2.2
guint32 gdk_x11_get_server_time (GdkWindow *window
);
Routine to get the current X server time stamp.
|
a GdkWindow, used for communication with the server. The window must have GDK_PROPERTY_CHANGE_MASK in its events mask or a hang will result. [type GdkX11Window] |
Returns : |
the time stamp. |
gint gdk_x11_device_get_id (GdkDevice *device
);
Returns the device ID as seen by XInput2.
gdk_disable_multidevice()
has been called, this function
will respectively return 2/3 for the core pointer and keyboard,
(matching the IDs for the Virtual Core Pointer and Keyboard in
XInput 2), but calling this function on any slave devices (i.e.
those managed via XInput 1.x), will return 0.
|
a GdkDevice |
Returns : |
the XInput2 device ID. |
Since 3.2
GdkDevice * gdk_x11_device_manager_lookup (GdkDeviceManager *device_manager
,gint device_id
);
Returns the GdkDevice that wraps the given device ID.
|
a GdkDeviceManager |
|
a device ID, as understood by the XInput2 protocol |
Returns : |
(allow-none): The GdkDevice wrapping the device ID,
or NULL if the given ID doesn't currently represent a device. [transfer none]
|
Since 3.2
guint32 gdk_x11_display_get_user_time (GdkDisplay *display
);
Returns the timestamp of the last user interaction on
display
. The timestamp is taken from events caused
by user interaction such as key presses or pointer
movements. See gdk_x11_window_set_user_time()
.
|
a GdkDisplay. [type GdkX11Display] |
Returns : |
the timestamp of the last user interaction |
Since 2.8
void gdk_x11_display_broadcast_startup_message (GdkDisplay *display
,const char *message_type
,...
);
Sends a startup notification message of type message_type
to
display
.
This is a convenience function for use by code that implements the freedesktop startup notification specification. Applications should not normally need to call it directly. See the Startup Notification Protocol specification for definitions of the message types and keys that can be used.
|
a GdkDisplay. [type GdkX11Display] |
|
startup notification message type ("new", "change", or "remove") |
|
a list of key/value pairs (as strings), terminated by a
NULL key. (A NULL value for a key will cause that key to be
skipped in the output.) |
Since 2.12
const gchar * gdk_x11_display_get_startup_notification_id
(GdkDisplay *display
);
Gets the startup notification ID for a display.
|
a GdkDisplay. [type GdkX11Display] |
Returns : |
the startup notification ID for display
|
Since 2.12
void gdk_x11_display_set_startup_notification_id (GdkDisplay *display
,const gchar *startup_id
);
Sets the startup notification ID for a display.
This is usually taken from the value of the DESKTOP_STARTUP_ID
environment variable, but in some cases (such as the application not
being launched using exec()
) it can come from other sources.
If the ID contains the string "_TIME" then the portion following that string is taken to be the X11 timestamp of the event that triggered the application to be launched and the GDK current event time is set accordingly.
The startup ID is also what is used to signal that the startup is
complete (for example, when opening a window or when calling
gdk_notify_startup_complete()
).
|
a GdkDisplay. [type GdkX11Display] |
|
the startup notification ID (must be valid utf8) |
Since 3.0
Display * gdk_x11_display_get_xdisplay (GdkDisplay *display
);
Returns the X display of a GdkDisplay.
|
a GdkDisplay. [type GdkX11Display] |
|
an X display. [transfer none] |
Since 2.2
void gdk_x11_display_grab (GdkDisplay *display
);
Call XGrabServer()
on display
.
To ungrab the display again, use gdk_x11_display_ungrab()
.
gdk_x11_display_grab()
/gdk_x11_display_ungrab()
calls can be nested.
|
a GdkDisplay. [type GdkX11Display] |
Since 2.2
void gdk_x11_display_ungrab (GdkDisplay *display
);
Ungrab display
after it has been grabbed with
gdk_x11_display_grab()
.
|
a GdkDisplay. [type GdkX11Display] |
Since 2.2
void gdk_x11_display_error_trap_push (GdkDisplay *display
);
Begins a range of X requests on display
for which X error events
will be ignored. Unignored errors (when no trap is pushed) will abort
the application. Use gdk_x11_display_error_trap_pop()
or
gdk_x11_display_error_trap_pop_ignored()
to lift a trap pushed
with this function.
See also gdk_error_trap_push()
to push a trap on all displays.
|
a GdkDisplay. [type GdkX11Display] |
Since 3.0
void gdk_x11_display_error_trap_pop_ignored
(GdkDisplay *display
);
Pops the error trap pushed by gdk_x11_display_error_trap_push()
.
Does not block to see if an error occurred; merely records the
range of requests to ignore errors for, and ignores those errors
if they arrive asynchronously.
See gdk_error_trap_pop_ignored()
for the all-displays-at-once
equivalent.
|
the display. [type GdkX11Display] |
Since 3.0
void gdk_x11_display_set_cursor_theme (GdkDisplay *display
,const gchar *theme
,const gint size
);
Sets the cursor theme from which the images for cursor should be taken.
If the windowing system supports it, existing cursors created
with gdk_cursor_new()
, gdk_cursor_new_for_display()
and
gdk_cursor_new_for_name()
are updated to reflect the theme
change. Custom cursors constructed with
gdk_cursor_new_from_pixbuf()
will have to be handled
by the application (GTK+ applications can learn about
cursor theme changes by listening for change notification
for the corresponding GtkSetting).
|
a GdkDisplay. [type GdkX11Display] |
|
the name of the cursor theme to use, or NULL to unset
a previously set value |
|
the cursor size to use, or 0 to keep the previous size |
Since 2.8
void gdk_x11_register_standard_event_type (GdkDisplay *display
,gint event_base
,gint n_events
);
Registers interest in receiving extension events with type codes
between event_base
and event_base + n_events - 1
.
The registered events must have the window field in the same place
as core X events (this is not the case for e.g. XKB extension events).
If an event type is registered, events of this type will go through
global and window-specific filters (see gdk_window_add_filter()
).
Unregistered events will only go through global filters.
GDK may register the events of some X extensions on its own.
This function should only be needed in unusual circumstances, e.g. when filtering XInput extension events on the root window.
|
a GdkDisplay |
|
first event type code to register |
|
number of event type codes to register |
Since 2.4
int gdk_x11_screen_get_screen_number (GdkScreen *screen
);
Returns the index of a GdkScreen.
|
a GdkScreen. [type GdkX11Screen] |
|
the position of screen among the screens of
its display. |
Since 2.2
Screen * gdk_x11_screen_get_xscreen (GdkScreen *screen
);
Returns the screen of a GdkScreen.
|
a GdkScreen. [type GdkX11Screen] |
|
an Xlib Screen*. [transfer none] |
Since 2.2
const char * gdk_x11_screen_get_window_manager_name
(GdkScreen *screen
);
Returns the name of the window manager for screen
.
|
a GdkScreen. [type GdkX11Screen] |
Returns : |
the name of the window manager screen screen , or
"unknown" if the window manager is unknown. The string is owned by GDK
and should not be freed. |
Since 2.2
XID gdk_x11_screen_get_monitor_output (GdkScreen *screen
,gint monitor_num
);
Gets the XID of the specified output/monitor. If the X server does not support version 1.2 of the RANDR extension, 0 is returned.
|
a GdkScreen. [type GdkX11Screen] |
|
number of the monitor, between 0 and gdk_screen_get_n_monitors (screen) |
Returns : |
the XID of the monitor |
Since 2.14
GdkVisual * gdk_x11_screen_lookup_visual (GdkScreen *screen
,VisualID xvisualid
);
Looks up the GdkVisual for a particular screen and X Visual ID.
|
a GdkScreen. [type GdkX11Screen] |
|
an X Visual ID. |
Returns : |
the GdkVisual (owned by the screen
object), or NULL if the visual ID wasn't found. [transfer none]
|
Since 2.2
gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen
,GdkAtom property
);
This function is specific to the X11 backend of GDK, and indicates whether the window manager supports a certain hint from the Extended Window Manager Hints Specification. You can find this specification on http://www.freedesktop.org.
When using this function, keep in mind that the window manager
can change over time; so you shouldn't use this function in
a way that impacts persistent application state. A common bug
is that your application can start up before the window manager
does when the user logs in, and before the window manager starts
gdk_x11_screen_supports_net_wm_hint()
will return FALSE
for every property.
You can monitor the window_manager_changed signal on GdkScreen to detect
a window manager change.
|
the relevant GdkScreen. [type GdkX11Screen] |
|
a property atom. |
Returns : |
TRUE if the window manager supports property
|
Since 2.2
GdkWindow * gdk_x11_window_foreign_new_for_display (GdkDisplay *display
,Window window
);
Wraps a native window in a GdkWindow. The function will try to
look up the window using gdk_x11_window_lookup_for_display()
first.
If it does not find it there, it will create a new window.
This may fail if the window has been destroyed. If the window was already known to GDK, a new reference to the existing GdkWindow is returned.
|
the GdkDisplay where the window handle comes from. |
|
an XLib Window |
Returns : |
a GdkWindow wrapper for the native
window, or NULL if the window has been destroyed. The wrapper
will be newly created, if one doesn't exist already. [transfer full]
|
Since 2.24
GdkWindow * gdk_x11_window_lookup_for_display (GdkDisplay *display
,Window window
);
Looks up the GdkWindow that wraps the given native window handle.
|
the GdkDisplay corresponding to the window handle. [type GdkX11Window] |
|
an XLib Window |
Returns : |
the GdkWindow wrapper for the native
window, or NULL if there is none. [transfer none]
|
Since 2.24
Window gdk_x11_window_get_xid (GdkWindow *window
);
Returns the X resource (window) belonging to a GdkWindow.
|
a native GdkWindow. [type GdkX11Window] |
Returns : |
the ID of drawable 's X resource. |
void gdk_x11_window_set_theme_variant (GdkWindow *window
,char *variant
);
GTK+ applications can request a dark theme variant. In order to make other applications - namely window managers using GTK+ for themeing - aware of this choice, GTK+ uses this function to export the requested theme variant as _GTK_THEME_VARIANT property on toplevel windows.
Note that this property is automatically updated by GTK+, so this function should only be used by applications which do not use GTK+ to create toplevel windows.
|
a GdkWindow. [type GdkX11Window] |
|
the theme variant to export |
Since 3.2
void gdk_x11_window_set_user_time (GdkWindow *window
,guint32 timestamp
);
The application can use this call to update the _NET_WM_USER_TIME property on a toplevel window. This property stores an Xserver time which represents the time of the last user input event received for this window. This property may be used by the window manager to alter the focus, stacking, and/or placement behavior of windows when they are mapped depending on whether the new window was created by a user action or is a "pop-up" window activated by a timer or some other event.
Note that this property is automatically updated by GDK, so this function should only be used by applications which handle input events bypassing GDK.
|
A toplevel GdkWindow. [type GdkX11Window] |
|
An XServer timestamp to which the property should be set |
Since 2.6
void gdk_x11_window_move_to_current_desktop
(GdkWindow *window
);
Moves the window to the correct workspace when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints. Will not do anything if the window is already on all workspaces.
|
a GdkWindow. [type GdkX11Window] |
Since 2.8
Window gdk_x11_get_default_root_xwindow (void
);
Gets the root window of the default screen
(see gdk_x11_get_default_screen()
).
Returns : |
an Xlib Window. |
gint gdk_x11_get_default_screen (void
);
Gets the default GTK+ screen number.
Returns : |
returns the screen number specified by
the --display command line option or the DISPLAY environment
variable when gdk_init() calls XOpenDisplay() . |
Display * gdk_x11_get_default_xdisplay (void
);
Gets the default GTK+ display.
Returns : |
the Xlib Display* for
the display specified in the --display command
line option or the DISPLAY environment variable. [transfer none]
|
void gdk_x11_grab_server (void
);
Call gdk_x11_display_grab()
on the default display.
To ungrab the server again, use gdk_x11_ungrab_server()
.
gdk_x11_grab_server()
/gdk_x11_ungrab_server()
calls can be nested.
void gdk_x11_ungrab_server (void
);
Ungrab the default display after it has been grabbed with
gdk_x11_grab_server()
.
Cursor gdk_x11_cursor_get_xcursor (GdkCursor *cursor
);
Returns the X cursor belonging to a GdkCursor.
|
a GdkCursor. [type GdkX11Cursor] |
Returns : |
an Xlib Cursor. |
Display * gdk_x11_cursor_get_xdisplay (GdkCursor *cursor
);
Returns the display of a GdkCursor.
|
a GdkCursor. [type GdkX11Cursor] |
Returns : |
an Xlib Display*. [transfer none] |
Visual * gdk_x11_visual_get_xvisual (GdkVisual *visual
);
Returns the X visual belonging to a GdkVisual.
|
a GdkVisual. |
Returns : |
an Xlib Visual*. [transfer none] |
Atom gdk_x11_atom_to_xatom (GdkAtom atom
);
Converts from a GdkAtom to the X atom for the default GDK display with the same string value.
|
A GdkAtom |
Returns : |
the X atom corresponding to atom . |
Atom gdk_x11_atom_to_xatom_for_display (GdkDisplay *display
,GdkAtom atom
);
Converts from a GdkAtom to the X atom for a GdkDisplay
with the same string value. The special value GDK_NONE
is converted to None
.
|
A GdkDisplay |
|
A GdkAtom, or GDK_NONE
|
Returns : |
the X atom corresponding to atom , or None
|
Since 2.2
GdkAtom gdk_x11_xatom_to_atom (Atom xatom
);
Convert from an X atom for the default display to the corresponding GdkAtom.
|
an X atom for the default GDK display |
Returns : |
the corresponding GdkAtom. [transfer none] |
GdkAtom gdk_x11_xatom_to_atom_for_display (GdkDisplay *display
,Atom xatom
);
Convert from an X atom for a GdkDisplay to the corresponding GdkAtom.
|
A GdkDisplay |
|
an X atom |
Returns : |
the corresponding GdkAtom. [transfer none] |
Since 2.2
Atom gdk_x11_get_xatom_by_name (const gchar *atom_name
);
Returns the X atom for GDK's default display corresponding to atom_name
.
This function caches the result, so if called repeatedly it is much
faster than XInternAtom()
, which is a round trip to the server each time.
|
a string |
Returns : |
a X atom for GDK's default display. |
Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display
,const gchar *atom_name
);
Returns the X atom for a GdkDisplay corresponding to atom_name
.
This function caches the result, so if called repeatedly it is much
faster than XInternAtom()
, which is a round trip to the server each time.
|
a GdkDisplay |
|
a string |
Returns : |
a X atom for a GdkDisplay |
Since 2.2
const gchar * gdk_x11_get_xatom_name (Atom xatom
);
Returns the name of an X atom for GDK's default display. This
function is meant mainly for debugging, so for convenience, unlike
and XAtomName()
gdk_atom_name()
, the result
doesn't need to be freed. Also, this function will never return NULL
,
even if xatom
is invalid.
|
an X atom for GDK's default display |
Returns : |
name of the X atom; this string is owned by GTK+, so it shouldn't be modifed or freed. |
const gchar * gdk_x11_get_xatom_name_for_display (GdkDisplay *display
,Atom xatom
);
Returns the name of an X atom for its display. This
function is meant mainly for debugging, so for convenience, unlike
XAtomName()
and gdk_atom_name()
, the result doesn't need to
be freed.
|
the GdkDisplay where xatom is defined |
|
an X atom |
Returns : |
name of the X atom; this string is owned by GDK, so it shouldn't be modifed or freed. |
Since 2.2
void gdk_x11_set_sm_client_id (const gchar *sm_client_id
);
Sets the SM_CLIENT_ID
property on the application's leader window so that
the window manager can save the application's state using the X11R6 ICCCM
session management protocol.
See the X Session Management Library documentation for more information on session management and the Inter-Client Communication Conventions Manual
|
the client id assigned by the session manager when the
connection was opened, or NULL to remove the property. |
Since 2.24
gint gdk_x11_display_text_property_to_text_list (GdkDisplay *display
,GdkAtom encoding
,gint format
,const guchar *text
,gint length
,gchar ***list
);
Convert a text string from the encoding as it is stored in a property into an array of strings in the encoding of the current locale. (The elements of the array represent the nul-separated elements of the original text string.)
|
The GdkDisplay where the encoding is defined. [type GdkX11Display] |
|
an atom representing the encoding. The most common values for this are STRING, or COMPOUND_TEXT. This is value used as the type for the property |
|
the format of the property |
|
The text data |
|
The number of items to transform |
|
location to store an array of strings in
the encoding of the current locale. This array should be
freed using gdk_free_text_list() . |
Returns : |
the number of strings stored in list, or 0, if the conversion failed |
Since 2.24
void gdk_x11_free_text_list (gchar **list
);
Frees the array of strings created by
gdk_x11_display_text_property_to_text_list()
.
|
the value stored in the list parameter by
a call to gdk_x11_display_text_property_to_text_list() . |
Since 2.24
gint gdk_x11_display_string_to_compound_text (GdkDisplay *display
,const gchar *str
,GdkAtom *encoding
,gint *format
,guchar **ctext
,gint *length
);
Convert a string from the encoding of the current locale into a form suitable for storing in a window property.
|
the GdkDisplay where the encoding is defined. [type GdkX11Display] |
|
a nul-terminated string |
|
location to store the encoding atom (to be used as the type for the property). [out][transfer none] |
|
location to store the format of the property. [out] |
|
location to store newly allocated data for the property. [out][array length=length] |
|
the length of ctext , in bytes |
Returns : |
0 upon success, non-zero upon failure |
Since 2.24
gboolean gdk_x11_display_utf8_to_compound_text (GdkDisplay *display
,const gchar *str
,GdkAtom *encoding
,gint *format
,guchar **ctext
,gint *length
);
Converts from UTF-8 to compound text.
|
a GdkDisplay. [type GdkX11Display] |
|
a UTF-8 string |
|
location to store resulting encoding. [out] |
|
location to store format of the result. [out] |
|
location to store the data of the result. [out][array length=length] |
|
location to store the length of the data
stored in ctext
|
Returns : |
TRUE if the conversion succeeded,
otherwise FALSE
|
Since 2.24
void gdk_x11_free_compound_text (guchar *ctext
);
Frees the data returned from gdk_x11_display_string_to_compound_text()
.
|
The pointer stored in ctext from a call to
gdk_x11_display_string_to_compound_text() . |
Since 2.24