Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gdk::Screen Class Reference

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

#include <xfc/gdk/screen.hh>

Inheritance diagram for Xfc::Gdk::Screen:

Xfc::G::Object Xfc::G::TypeInstance Xfc::Trackable List of all members.

Signal Prototypes

Public Member Functions

Accessors
Methods
Signal Proxies

Static Public Member Functions

Accessors

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

Xfc::Gdk::Screen::Screen ( GdkScreen *  screen,
bool  owns_reference = true 
) [explicit, protected]

Construct a new Screen from an existing GdkScreen.

Parameters:
screen A pointer to a GdkScreen.
owns_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).

Xfc::Gdk::Screen::Screen ( GdkScreen *  screen,
bool  owns_reference = true 
) [explicit, protected]

Construct a new Screen from an existing GdkScreen.

Parameters:
screen A pointer to a GdkScreen.
owns_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

Colormap* Xfc::Gdk::Screen::get_default_colormap (  )  const

Gets the default colormap for the screen.

Returns:
The default Colormap.

Colormap* Xfc::Gdk::Screen::get_system_colormap (  )  const

Gets the system's default colormap for the screen.

Returns:
The default colormap for the screen.

const Visual* Xfc::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.

Window* Xfc::Gdk::Screen::get_root_window (  )  const

Gets the root window of the screen.

Returns:
The root window.

int Xfc::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

int Xfc::Gdk::Screen::get_width (  )  const

Gets the width of the screen in pixels.

Returns:
The width of the screen in pixels.

int Xfc::Gdk::Screen::get_height (  )  const

Gets the height of the screen in pixels.

Returns:
The height of the screen in pixels.

int Xfc::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.

int Xfc::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.

bool Xfc::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.

bool Xfc::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()).

String Xfc::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.

int Xfc::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.

void Xfc::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().

Rectangle Xfc::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().

int Xfc::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 Xfc::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 Xfc::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.

bool Xfc::Gdk::Screen::get_setting ( const String 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.

static Screen* Xfc::Gdk::Screen::get_default (  )  [static]

Gets the default screen.

Returns:
The default Screen, or null if there is no default display.

void Xfc::Gdk::Screen::set_default_colormap ( Colormap colormap  ) 

Sets the default colormap for the screen.

Parameters:
colormap A Colormap.

void Xfc::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.


Member Data Documentation

const SizeChangedSignalType Xfc::Gdk::Screen::size_changed_signal [static, protected]

Size changed signal (see signal_size_changed()).

Calls a slot with the signature:

< void function();
<


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3