gtk.gdk.Screen — an object representing a physical screen
class gtk.gdk.Screen(gobject.GObject): |
Functions |
This object is available in PyGTK 2.2 and above.
gtk.gdk.Screen objects are the PyGTK representation of a physical screen. It is used throughout PyGTK 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 (the get_default_colormap() method), the screen width (the get_width() method), etc.
a screen may consist of multiple monitors that are merged to form a large screen area.
|
Returns : | the default gtk.gdk.Colormap. |
This method is available in PyGTK 2.2 and above.
The get_default_colormap() method returns the default gtk.gdk.Colormap for the screen.
|
colormap : | a gtk.gdk.Colormap |
This method is available in PyGTK 2.2 and above.
The set_default_colormap() method sets the gtk.gdk.Colormap specified by colormap as the default colormap for the screen.
|
Returns : | the default colormap for the screen. Since: 2.2 |
This method is available in PyGTK 2.2 and above.
The get_system_colormap() method returns the system's default colormap for the screen
|
Returns : | the system gtk.gdk.Visual |
This method is available in PyGTK 2.2 and above.
The get_system_visual() method returns the system's default gtk.gdk.Visual for the screen. This is the visual for the root window of the display.
|
Returns : | a gtk.gdk.Colormap |
This method is available in PyGTK 2.2 and above.
The get_rgb_colormap() method returns the preferred colormap for rendering image data on the screen. Not a very useful function; historically, GDK could only render RGB image data to one colormap and visual, but in the current version it can render to any colormap and visual. So there's no need to call this function.
|
Returns : | a gtk.gdk.Visual |
This method is available in PyGTK 2.2 and above.
The get_rgb_visual() method returns a "preferred visual" chosen for rendering RGB image data on the screen.
|
Returns : | the root gtk.gdk.Window |
This method is available in PyGTK 2.2 and above.
The get_root_window() method returns the root gtk.gdk.Window of the screen.
|
Returns : | the display that the screen belongs to |
This method is available in PyGTK 2.2 and above.
The get_display() method returns the gtk.gdk.Display that the screen belongs to.
|
Returns : | the index |
This method is available in PyGTK 2.2 and above.
The get_number() method returns the index of the screen among the screens in its display. (See the get_display() method)
|
Returns : | the width of the screen in pixels. |
This method is available in PyGTK 2.2 and above.
The get_width() method returns the width of the screen in pixels
|
Returns : | the height of the screen in pixels. |
This method is available in PyGTK 2.2 and above.
The get_height() method returns the height of the screen in pixels
|
Returns : | the width of the screen in millimeters. |
This method is available in PyGTK 2.2 and above.
The get_width_mm() method returns the width of the screen in millimeters. Note that on some X servers this value will not be correct.
|
Returns : | the height of the screen in pixels. Since: 2.2 |
This method is available in PyGTK 2.2 and above.
The get_height_mm() method returns the height of the screen in millimeters. Note that on some X servers this value will not be correct.
|
Returns : | a list of gtk.gdk.Visual |
This method is available in PyGTK 2.2 and above.
The list_visuals() method returns a list of the available visuals for the screen. A gtk.gdk.Visual describes a hardware image data format. For example, a visual might support 24-bit color, or 8-bit color, and might expect pixels to be in a certain format.
|
Returns : | a list of the toplevel gtk.gdk.Window objects |
This method is available in PyGTK 2.2 and above.
The get_toplevel_windows() method returns a list of all toplevel gtk.gdk.Window objects known to PyGTK on the screen. A toplevel window is a child of the root window (see the gtk.gdk.get_default_root_window() function).
|
Returns : | a generated nae |
This method is available in PyGTK 2.2 and above.
The make_display_name() method determines the name to pass to gtk.gdk.Display() to get a gtk.gdk.Display with this screen as the default screen.
|
Returns : | the number of monitors that the screen consists of. |
This method is available in PyGTK 2.2 and above.
The get_n_monitors() method returns the number of monitors that the screen consists of.
|
monitor_num : | the monitor number. |
Returns : | a gtk.gdk.Rectangle containing the monitor geometry |
This method is available in PyGTK 2.2 and above.
The get_monitor_geometry() method returns a gtk.gdk.Rectangle representing the size and position of the individual monitor within the the entire screen area.
Note that the size of the entire screen area can be retrieved via the get_width() and get_height(). methods.
|
x : | an x coordinate in the virtual screen. |
y : | a y coordinate in the virtual screen. |
Returns : | the number of the monitor that the point (x,y) lies in, or a monitor close to (x,y) if the point is not in any monitor. |
This method is available in PyGTK 2.2 and above.
The get_monitor_at_point() method returns the number of the monitor in which the point (x,y) is located or the closest monitor if not in a monitor.
|
window : | a gtk.gdk.Window |
Returns : | the number of the monitor that most of window is located. Since: 2.2 |
This method is available in PyGTK 2.2 and above.
The get_monitor_at_window() method returns the number of the monitor that most of the gtk.gdk.Window specified by window is in. If window does not intersect any monitors, the closest monitor to the main bounding rectangle of window is returned.
|
event : | the gtk.gdk.Event. |
This method is available in PyGTK 2.2 and above.
The broadcast_client_message() method sends a message to all top level windows. On X11, sends an X ClientMessage event to all toplevel windows on the screen.
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.
|
name : | the name of the setting |
Returns : | the value of setting |
This method is available in PyGTK 2.2 and above.
The get_setting() method returns the value of the desktop-wide setting (specified by setting) such as double-click time for the screen.
|
Returns : | a gtk.gdk.Colormap for use with windows with an alpha channel or None if the capability is not available. |
This method is available in PyGTK 2.10 and above.
The get_rgba_colormap() method returns a colormap to use for creating windows or pixmaps with an alpha channel. The windowing system on which PyGTK is running may not support this capability, in which case None will be returned. Even if a non-None value is returned, it's possible that the window's alpha channel won't be honored when displaying the window on the screen: in particular, for X an appropriate windowing manager and compositing manager must be running to provide appropriate display.
|
Returns : | a gtk.gdk.Visual to use for windows with an alpha channel or None if the capability is not available. |
This method is available in PyGTK 2.10 and above.
The get_rgba_visual() method returns a visual to use for creating windows or pixmaps with an alpha channel. See the get_rgba_colormap() method for caveats.
|
Returns : | the width of the default screen in pixels. |
The gtk.gdk.screen_width() function returns the width of the default screen in pixels.
|
Returns : | the height of the default screen in pixels. |
The gtk.gdk.screen_height() function returns the height of the default screen in pixels.
|
Returns : | the width of the default screen in millimeters, though it is not always correct. |
The gtk.gdk.screen_width_mm() function returns the width of the default screen in millimeters. Note that on many X servers this value will not be correct.
|
Returns : | the height of the default screen in millimeters, though it is not always correct. |
The gtk.gdk.screen_height_mm() function returns the height of the default screen in millimeters. Note that on many X servers this value will not be correct.
|
Returns : | a gtk.gdk.Screen, or None if there is no default display. |
This function is available in PyGTK 2.2 and above.
The gtk.gdk.screen_get_default() function returns the default gtk.gdk.Screen for the default gtk.gdk.Display. (See the gtk.gdk.display_get_default() function).
|
screen : | the screen that received the signal |
user_param1 : | the first user parameter (if any) specified with the connect() method |
... : | additional user parameters (if any) |
The "size-changed" signal is emitted when the pixel width or height of a screen changes.