Synopsis#include <gdk/gdk.h> GdkScreen; GdkScreen* gdk_screen_get_default (void); GdkColormap* gdk_screen_get_default_colormap (GdkScreen *screen); void gdk_screen_set_default_colormap (GdkScreen *screen, GdkColormap *colormap); GdkColormap* gdk_screen_get_system_colormap (GdkScreen *screen); GdkVisual* gdk_screen_get_system_visual (GdkScreen *screen); GdkColormap* gdk_screen_get_rgb_colormap (GdkScreen *screen); GdkVisual* gdk_screen_get_rgb_visual (GdkScreen *screen); GdkColormap* gdk_screen_get_rgba_colormap (GdkScreen *screen); GdkVisual* gdk_screen_get_rgba_visual (GdkScreen *screen); gboolean gdk_screen_is_composited (GdkScreen *screen); GdkWindow* gdk_screen_get_root_window (GdkScreen *screen); GdkDisplay* gdk_screen_get_display (GdkScreen *screen); gint gdk_screen_get_number (GdkScreen *screen); gint gdk_screen_get_width (GdkScreen *screen); gint gdk_screen_get_height (GdkScreen *screen); gint gdk_screen_get_width_mm (GdkScreen *screen); gint gdk_screen_get_height_mm (GdkScreen *screen); GList* gdk_screen_list_visuals (GdkScreen *screen); GList* gdk_screen_get_toplevel_windows (GdkScreen *screen); gchar* gdk_screen_make_display_name (GdkScreen *screen); gint gdk_screen_get_n_monitors (GdkScreen *screen); void gdk_screen_get_monitor_geometry (GdkScreen *screen, gint monitor_num, GdkRectangle *dest); gint gdk_screen_get_monitor_at_point (GdkScreen *screen, gint x, gint y); gint gdk_screen_get_monitor_at_window (GdkScreen *screen, GdkWindow *window); gint gdk_screen_get_monitor_height_mm (GdkScreen *screen, gint monitor_num); gint gdk_screen_get_monitor_width_mm (GdkScreen *screen, gint monitor_num); gchar* gdk_screen_get_monitor_plug_name (GdkScreen *screen, gint monitor_num); void gdk_screen_broadcast_client_message (GdkScreen *screen, GdkEvent *event); gboolean gdk_screen_get_setting (GdkScreen *screen, const gchar *name, GValue *value); const cairo_font_options_t* gdk_screen_get_font_options (GdkScreen *screen); void gdk_screen_set_font_options (GdkScreen *screen, const cairo_font_options_t *options); gdouble gdk_screen_get_resolution (GdkScreen *screen); void gdk_screen_set_resolution (GdkScreen *screen, gdouble dpi); GdkWindow* gdk_screen_get_active_window (GdkScreen *screen); GList* gdk_screen_get_window_stack (GdkScreen *screen); gboolean gdk_spawn_on_screen (GdkScreen *screen, const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, gpointer user_data, gint *child_pid, GError **error); gboolean gdk_spawn_on_screen_with_pipes (GdkScreen *screen, const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, gpointer user_data, gint *child_pid, gint *standard_input, gint *standard_output, gint *standard_error, GError **error); gboolean gdk_spawn_command_line_on_screen (GdkScreen *screen, const gchar *command_line, GError **error); Description
GdkScreen objects are the GDK representation of a physical screen. It is used
throughout GDK and GTK+ to specify which screen the top level windows
are to be displayed on.
It is also used to query the screen specification and default settings such as
the default colormap ( Note that a screen may consist of multiple monitors which are merged to form a large screen area. DetailsGdkScreentypedef struct _GdkScreen GdkScreen;
This is a currently just a placeholder typedef for the first argument of
the Since 2.2 gdk_screen_get_default ()GdkScreen* gdk_screen_get_default (void);
Gets the default screen for the default display. (See
Since 2.2 gdk_screen_get_default_colormap ()GdkColormap* gdk_screen_get_default_colormap (GdkScreen *screen);
Gets the default colormap for
Since 2.2 gdk_screen_set_default_colormap ()void gdk_screen_set_default_colormap (GdkScreen *screen, GdkColormap *colormap);
Sets the default
Since 2.2 gdk_screen_get_system_colormap ()GdkColormap* gdk_screen_get_system_colormap (GdkScreen *screen);
Gets the system's default colormap for
Since 2.2 gdk_screen_get_system_visual ()GdkVisual* gdk_screen_get_system_visual (GdkScreen *screen);
Get the system's default visual for
Since 2.2 gdk_screen_get_rgb_colormap ()GdkColormap* gdk_screen_get_rgb_colormap (GdkScreen *screen);
Gets the preferred colormap for rendering image data on
Since 2.2 gdk_screen_get_rgb_visual ()GdkVisual* gdk_screen_get_rgb_visual (GdkScreen *screen);
Gets a "preferred visual" chosen by GdkRGB for rendering image data
on
Since 2.2 gdk_screen_get_rgba_colormap ()GdkColormap* gdk_screen_get_rgba_colormap (GdkScreen *screen);
Gets a colormap to use for creating windows or pixmaps with an
alpha channel. The windowing system on which GTK+ is running
may not support this capability, in which case This functionality is not implemented in the Windows backend.
For setting an overall opacity for a top-level window, see
Since 2.8 gdk_screen_get_rgba_visual ()GdkVisual* gdk_screen_get_rgba_visual (GdkScreen *screen);
Gets a visual to use for creating windows or pixmaps with an
alpha channel. See the docs for
Since 2.8 gdk_screen_is_composited ()gboolean gdk_screen_is_composited (GdkScreen *screen); Returns whether windows with an RGBA visual can reasonably be expected to have their alpha channel drawn correctly on the screen.
On X11 this function returns whether a compositing manager is
compositing
Since 2.10 gdk_screen_get_root_window ()GdkWindow* gdk_screen_get_root_window (GdkScreen *screen);
Gets the root window of
Since 2.2 gdk_screen_get_display ()GdkDisplay* gdk_screen_get_display (GdkScreen *screen);
Gets the display to which the
Since 2.2 gdk_screen_get_number ()gint gdk_screen_get_number (GdkScreen *screen);
Gets the index of
Since 2.2 gdk_screen_get_width ()gint gdk_screen_get_width (GdkScreen *screen);
Gets the width of
Since 2.2 gdk_screen_get_height ()gint gdk_screen_get_height (GdkScreen *screen);
Gets the height of
Since 2.2 gdk_screen_get_width_mm ()gint gdk_screen_get_width_mm (GdkScreen *screen);
Gets the width of
Since 2.2 gdk_screen_get_height_mm ()gint gdk_screen_get_height_mm (GdkScreen *screen);
Returns the height of
Since 2.2 gdk_screen_list_visuals ()GList* gdk_screen_list_visuals (GdkScreen *screen);
Lists the available visuals for the specified
Call
Since 2.2 gdk_screen_get_toplevel_windows ()GList* gdk_screen_get_toplevel_windows (GdkScreen *screen);
Obtains a list of all toplevel windows known to GDK on the screen
The returned list should be freed with
Since 2.2 gdk_screen_make_display_name ()gchar* gdk_screen_make_display_name (GdkScreen *screen);
Determines the name to pass to
Since 2.2 gdk_screen_get_n_monitors ()gint gdk_screen_get_n_monitors (GdkScreen *screen);
Returns the number of monitors which
Since 2.2 gdk_screen_get_monitor_geometry ()void gdk_screen_get_monitor_geometry (GdkScreen *screen, gint monitor_num, GdkRectangle *dest); Retrieves the GdkRectangle representing the size and position of the individual monitor within the entire screen area.
Note that the size of the entire screen area can be retrieved via
Since 2.2 gdk_screen_get_monitor_at_point ()gint gdk_screen_get_monitor_at_point (GdkScreen *screen, gint x, gint y);
Returns the monitor number in which the point (
Since 2.2 gdk_screen_get_monitor_at_window ()gint gdk_screen_get_monitor_at_window (GdkScreen *screen, GdkWindow *window);
Returns the number of the monitor in which the largest area of the
bounding rectangle of
Since 2.2 gdk_screen_get_monitor_height_mm ()gint gdk_screen_get_monitor_height_mm (GdkScreen *screen, gint monitor_num); Gets the height in millimeters of the specified monitor.
Since 2.14 gdk_screen_get_monitor_width_mm ()gint gdk_screen_get_monitor_width_mm (GdkScreen *screen, gint monitor_num); Gets the width in millimeters of the specified monitor, if available.
Since 2.14 gdk_screen_get_monitor_plug_name ()gchar* gdk_screen_get_monitor_plug_name (GdkScreen *screen, gint monitor_num); Returns the output name of the specified monitor. Usually something like VGA, DVI, or TV, not the actual product name of the display device.
Since 2.14 gdk_screen_broadcast_client_message ()void gdk_screen_broadcast_client_message (GdkScreen *screen, GdkEvent *event);
On X11, sends an X ClientMessage event to all toplevel windows on
Toplevel windows are determined by checking for the WM_STATE property, as described in the Inter-Client Communication Conventions Manual (ICCCM). If no windows are found with the WM_STATE property set, the message is sent to all children of the root window. On Windows, broadcasts a message registered with the name GDK_WIN32_CLIENT_MESSAGE to all top-level windows. The amount of data is limited to one long, i.e. four bytes.
Since 2.2 gdk_screen_get_setting ()gboolean gdk_screen_get_setting (GdkScreen *screen, const gchar *name, GValue *value);
Retrieves a desktop-wide setting such as double-click time
for the GdkScreen FIXME needs a list of valid settings here, or a link to more information.
Since 2.2 gdk_screen_get_font_options ()const cairo_font_options_t* gdk_screen_get_font_options (GdkScreen *screen);
Gets any options previously set with
Since 2.10 gdk_screen_set_font_options ()void gdk_screen_set_font_options (GdkScreen *screen, const cairo_font_options_t *options);
Sets the default font options for the screen. These
options will be set on any PangoContext's newly created
with
Since 2.10 gdk_screen_get_resolution ()gdouble gdk_screen_get_resolution (GdkScreen *screen);
Gets the resolution for font handling on the screen; see
Since 2.10 gdk_screen_set_resolution ()void gdk_screen_set_resolution (GdkScreen *screen, gdouble dpi); Sets the resolution for font handling on the screen. This is a scale factor between points specified in a PangoFontDescription and cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).
Since 2.10 gdk_screen_get_active_window ()GdkWindow* gdk_screen_get_active_window (GdkScreen *screen); Returns the screen's currently active window.
On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property
on the root window, as described in the Extended Window
Manager Hints. If there is no currently currently active
window, or the window manager does not support the
_NET_ACTIVE_WINDOW hint, this function returns
On other platforms, this function may return
The returned window should be unrefed using
Since 2.10 gdk_screen_get_window_stack ()GList* gdk_screen_get_window_stack (GdkScreen *screen); Returns a GList of GdkWindows representing the current window stack.
On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING
property on the root window, as described in the Extended Window
Manager Hints. If the window manager does not support the
_NET_CLIENT_LIST_STACKING hint, this function returns
On other platforms, this function may return
The returned list is newly allocated and owns references to the
windows it contains, so it should be freed using
Since 2.10 gdk_spawn_on_screen ()gboolean gdk_spawn_on_screen (GdkScreen *screen, const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, gpointer user_data, gint *child_pid, GError **error);
Like This is useful for applications which wish to launch an application on a specific screen.
Since 2.4 gdk_spawn_on_screen_with_pipes ()gboolean gdk_spawn_on_screen_with_pipes (GdkScreen *screen, const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, gpointer user_data, gint *child_pid, gint *standard_input, gint *standard_output, gint *standard_error, GError **error);
Like This is useful for applications which wish to launch an application on a specific screen.
Since 2.4 gdk_spawn_command_line_on_screen ()gboolean gdk_spawn_command_line_on_screen (GdkScreen *screen, const gchar *command_line, GError **error);
Like This is useful for applications which wish to launch an application on a specific screen.
Since 2.4 Property DetailsThe
|
|
the object on which the signal is emitted |
|
user data set when the signal handler was connected. |
Since 2.10
"monitors-changed"
signalvoid user_function (GdkScreen *screen, gpointer user_data) : Run Last
The ::monitors-changed signal is emitted when the number, size or position of the monitors attached to the screen change.
Only for X for now. Future implementations for Win32 and OS X may be a possibility.
|
the object on which the signal is emitted |
|
user data set when the signal handler was connected. |
Since 2.14
"size-changed"
signalvoid user_function (GdkScreen *screen, gpointer user_data) : Run Last
The ::size-changed signal is emitted when the pixel width or height of a screen changes.
|
the object on which the signal is emitted |
|
user data set when the signal handler was connected. |
Since 2.2