Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gdk::Screen Class Reference

A GdkScreen C++ wrapper class. More...

`#include <inti/gdk/screen.h>`

Inheritance diagram for Inti::Gdk::Screen:

List of all members.

## Public Member Functions

Constructors

- virtual ~Screen ()
    Destructor.

Accessors

- GdkScreen * gdk_screen () const
    Get a pointer to the GdkScreen structure.
- GdkScreenClass * gdk_screen_class () const
    Get a pointer to the GdkScreenClass structure.
- operator GdkScreen * () const
    Conversion operator; safely converts a Screen to a GdkScreen pointer.
- Colormap * get_default_colormap () const
    Gets the default colormap for the screen.
- Colormap * get_system_colormap () const
    Gets the system's default colormap for the screen.
- const Visual * get_system_visual () const
    Get the system's default visual for the screen.
- Window * get_root_window () const
    Gets the root window of the screen.
- Display * get_display () const
    Returns the display to which the screen belongs.
- int get_number () const
    Gets the index of the screen among the screens in the display to which it belongs (see get_display()).
- int get_width () const
    Gets the width of the screen in pixels.
- int get_height () const
    Gets the height of the screen in pixels.
- int get_width_mm () const
    Gets the width of screen in millimeters.
- int get_height_mm () const
    Gets the height of screen in millimeters.
- bool list_visuals (std::vector< const Visual * > &visuals) const
    Lists the available visuals for the specified screen.
- bool get_toplevels (std::vector< Window * > &toplevels) const
    Obtains a list of all toplevel windows known to GDK on the screen.
- String make_display_name () const
    Determines the name to pass to Gdk::Display::open() to get a display with this screen as the default screen.
- int get_n_monitors () const
    Returns the number of monitors that are part of the virtual screen.
- void get_monitor_geometry (int monitor_num, Rectangle &dest) const
    Retrieves the Gdk::Rectangle representing the size and start coordinates of the individual monitor within the the entire virtual screen.
- Rectangle get_monitor_geometry (int monitor_num) const
    Retrieves the Gdk::Rectangle representing the size and start coordinates of the individual monitor within the the entire virtual screen.
- int get_monitor_at_point (int x, int y) const
    Returns the monitor number in which the point (x,y) is located.
- int get_monitor_at_point (const Point &point) const
    Returns the monitor number in which the point is located.
- int get_monitor_at_window (const Window &window) const
    Returns the number of the monitor in which the largest area of the bounding rectangle of window resides.
- bool get_setting (const char *name, G::Value &value) const
    Retrieves a desktop-wide setting such as double-click time for the screen.

Methods

- void set_default_colormap (Colormap &colormap)
    Sets the default colormap for the screen.
- void broadcast_client_message (Event &event)
    Sends an X ClientMessage event to all toplevel windows on the screen.

Signal Proxies

- const SizeChangedSignalProxy sig_size_changed ()
    Connect to the size_changed_signal; emitted when the size of the screen changes.

## Static Public Member Functions

- Screen * get_default ()
    Gets the default screen.

## Protected Member Functions

Constructors

- Screen (GdkScreen *screen, bool reference=true)
    Construct a new Screen from an existing GdkScreen.

Signal Handlers

- virtual void on_size_changed ()
    Called when the size of the screen changes.

## Detailed Description

A GdkScreen C++ wrapper class.

Screen objects are the GDK representation of a physical screen. They are 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 (get_default_colormap()), the screen width (get_width()), etc. Note that a screen may consist of multiple monitors which are merged to form a large screen area.

## Constructor & Destructor Documentation

Inti::Gdk::Screen::Screen | ( | GdkScreen * | screen,
|  | bool | reference = true
| ) | `[explicit, protected]`

  | Construct a new Screen from an existing GdkScreen. Parameters:
  screen | A pointer to a GdkScreen.
  reference | Set false if the initial reference count is floating, set true if it's not.
The screen can be a newly created GdkScreen or an existing GdkScreen. (see G::Object::Object).

## Member Function Documentation

void Inti::Gdk::Screen::broadcast_client_message | ( | Event & | event | ) |

  | Sends an X ClientMessage event to all toplevel windows on the screen. Parameters:
  event | The Event.
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.

Screen* Inti::Gdk::Screen::get_default | ( |  | ) | `[static]`

| Gets the default screen. Returns: The default Screen, or null if there is no default display.

Colormap* Inti::Gdk::Screen::get_default_colormap | ( |  | ) | const

| Gets the default colormap for the screen. Returns: The default Colormap.

int Inti::Gdk::Screen::get_height | ( |  | ) | const

| Gets the height of the screen in pixels. Returns: The height of the screen in pixels.

int Inti::Gdk::Screen::get_height_mm | ( |  | ) | const

| Gets the height of screen in millimeters. Returns: The height of the screen in millimeters. Note that on some X servers this value will not be correct.

int Inti::Gdk::Screen::get_monitor_at_point | ( | const Point & | point | ) | const

  | Returns the monitor number in which the point is located. Parameters:
  point | The X and Y coordinates in the virtual screen.
Returns: The monitor number in which the point lies, or a monitor close to point if the point is not in any monitor.

int Inti::Gdk::Screen::get_monitor_at_point | ( | int | x,
|  | int | y
| ) | const

  | Returns the monitor number in which the point (x,y) is located. Parameters:
  x | The X coordinate in the virtual screen.
  y | The Y coordinate in the virtual screen.
Returns: The monitor number in which the point (x,y) lies, or a monitor close to (x,y) if the point is not in any monitor.

int Inti::Gdk::Screen::get_monitor_at_window | ( | const Window & | window | ) | const

  | Returns the number of the monitor in which the largest area of the bounding rectangle of window resides. Parameters:
  window | A Window.
Returns: The monitor number in which most of window is located, or if window does not intersect any monitors, a monitor close to window.

Rectangle Inti::Gdk::Screen::get_monitor_geometry | ( | int | monitor_num | ) | const

  | Retrieves the Gdk::Rectangle representing the size and start coordinates of the individual monitor within the the entire virtual screen. Parameters:
  monitor_num | The monitor number.
Returns: A Rectangle filled with the monitor geometry. Note that the virtual screen coordinates can be retrieved via get_width() and get_height().

void Inti::Gdk::Screen::get_monitor_geometry | ( | int | monitor_num,
|  | Rectangle & | dest
| ) | const

  | Retrieves the Gdk::Rectangle representing the size and start coordinates of the individual monitor within the the entire virtual screen. Parameters:
  monitor_num | The monitor number.
  dest | A Rectangle to be filled with the monitor geometry.
Note that the virtual screen coordinates can be retrieved via get_width() and get_height().

int Inti::Gdk::Screen::get_n_monitors | ( |  | ) | const

| Returns the number of monitors that are part of the virtual screen. Returns: The number of monitors part of the virtual screen, or 0 if screen is not in virtual screen mode.

int Inti::Gdk::Screen::get_number | ( |  | ) | const

| Gets the index of the screen among the screens in the display to which it belongs (see get_display()). Returns: The index

Window* Inti::Gdk::Screen::get_root_window | ( |  | ) | const

| Gets the root window of the screen. Returns: The root window.

bool Inti::Gdk::Screen::get_setting | ( | const char * | name,
|  | G::Value & | value
| ) | const

  | Retrieves a desktop-wide setting such as double-click time for the screen. Parameters:
  name | The name of the setting.
  value | The location to store the value of the setting.
Returns: true if the setting existed and a value was stored in value, false otherwise.

Colormap* Inti::Gdk::Screen::get_system_colormap | ( |  | ) | const

| Gets the system's default colormap for the screen. Returns: The default colormap for the screen.

const Visual* Inti::Gdk::Screen::get_system_visual | ( |  | ) | const

| Get the system's default visual for the screen. Returns: The system visual. This is the visual for the root window of the display. The return value should not be unreferenced.

bool Inti::Gdk::Screen::get_toplevels | ( | std::vector< Window * > & | toplevels | ) | const

  | Obtains a list of all toplevel windows known to GDK on the screen. Parameters:
  toplevels | A reference to a vector of Window* to hold the list of toplevel windows.
Returns: true if the vector is not empty. A toplevel window is a child of the root window (see get_default_root_window()).

int Inti::Gdk::Screen::get_width | ( |  | ) | const

| Gets the width of the screen in pixels. Returns: The width of the screen in pixels.

int Inti::Gdk::Screen::get_width_mm | ( |  | ) | const

| Gets the width of screen in millimeters. Returns: The width of the screen in millimeters. Note that on some X servers this value will not be correct.

bool Inti::Gdk::Screen::list_visuals | ( | std::vector< const Visual * > & | visuals | ) | const

  | Lists the available visuals for the specified screen. Parameters:
  visuals | A reference to a vector of const Visual* to hold the list of visuals.
Returns: true if the vector is not empty. A 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.

String Inti::Gdk::Screen::make_display_name | ( |  | ) | const

| Determines the name to pass to Gdk::Display::open() to get a display with this screen as the default screen. Returns: A String.

void Inti::Gdk::Screen::set_default_colormap | ( | Colormap & | colormap | ) |

  | Sets the default colormap for the screen. Parameters:
  colormap | A Colormap.

The documentation for this class was generated from the following file:

- screen.h

Main Page - Footer