Main Page Widgets Namespaces Book

# Gdk::Visual Class Reference

Inheritance diagram for Gdk::Visual:

[legend]
List of all members.

## Public Methods
virtual | ~Visual ()
GdkVisual* | gobj ()
| Provides access to the underlying C GObject.
const GdkVisual* | gobj () const
| Provides access to the underlying C GObject.
GdkVisual* | gobj_copy ()
Glib::RefPtr<Screen> | get_screen ()
| Gets the screen to which this visual belongs.
Glib::RefPtr<const Screen> | get_screen () const
| Gets the screen to which this visual belongs.
## Static Public Methods
Glib::RefPtr<Visual> | get_system ()
| Get the system'sdefault visual for the default GDK screen.
Glib::RefPtr<Visual> | get_best ()
| Get the visual with the most available colors for the default GDK screen.
Glib::RefPtr<Visual> | get_best (int depth)
| Get the best visual with depth depth for the default GDK screen.
Glib::RefPtr<Visual> | get_best (VisualType visual_type)
| Get the best visual of the given visual_type for the default GDK screen.
Glib::RefPtr<Visual> | get_best (int depth, VisualType visual_type)
| Combines gdk_visual_get_best_with_depth() and gdk_visual_get_best_with_type().
int | get_best_depth ()
| Get the best available depth for the default GDK screen.
VisualType | get_best_type ()
| Return the best available visual type for the default GDK screen.
## Protected Methods
| Visual ()
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr<Gdk::Visual> | wrap (GdkVisual* object, bool take_copy=false)

## Constructor & Destructor Documentation

virtual Gdk::Visual::~Visual | ( |  | ) | `[virtual]`

Gdk::Visual::Visual | ( |  | ) | `[protected]`

## Member Function Documentation

Glib::RefPtr<Visual> Gdk::Visual::get_best | ( | int | depth,
|  | VisualType | visual_type
| ) | `[static]`

  | Combines gdk_visual_get_best_with_depth() and gdk_visual_get_best_with_type(). Parameters:
  depth | A bit depth.
  visual_type | A visual type.
Returns: Best visual with both depth and visual_type , or `0` if none.

Glib::RefPtr<Visual> Gdk::Visual::get_best | ( | VisualType | visual_type | ) | `[static]`

  | Get the best visual of the given visual_type for the default GDK screen. Visuals with higher color depths are considered better. The return value should not be freed. `0` may be returned if no visual has type visual_type . Parameters:
  visual_type | A visual type.
Returns: Best visual of the given type.

Glib::RefPtr<Visual> Gdk::Visual::get_best | ( | int | depth | ) | `[static]`

  | Get the best visual with depth depth for the default GDK screen. Color visuals and visuals with mutable colormaps are preferred over grayscale or fixed-colormap visuals. The return value should not be freed. `0` may be returned if no visual supports depth . Parameters:
  depth | A bit depth.
Returns: Best visual for the given depth.

Glib::RefPtr<Visual> Gdk::Visual::get_best | ( |  | ) | `[static]`

| Get the visual with the most available colors for the default GDK screen. The return value should not be freed. Returns: Best visual.

int Gdk::Visual::get_best_depth | ( |  | ) | `[static]`

| Get the best available depth for the default GDK screen. "Best" means "largest," i.e. 32 preferred over 24 preferred over 8 bits per pixel. Returns: Best available depth.

VisualType Gdk::Visual::get_best_type | ( |  | ) | `[static]`

| Return the best available visual type for the default GDK screen. Returns: Best visual type.

Glib::RefPtr<const Screen> Gdk::Visual::get_screen | ( |  | ) |

| Gets the screen to which this visual belongs. Returns: The screen to which this visual belongs. Since: 2.2.

Glib::RefPtr<Screen> Gdk::Visual::get_screen | ( |  | ) |

| Gets the screen to which this visual belongs. Returns: The screen to which this visual belongs. Since: 2.2.

Glib::RefPtr<Visual> Gdk::Visual::get_system | ( |  | ) | `[static]`

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

const GdkVisual* Gdk::Visual::gobj | ( |  | ) | const`[inline]`

| Provides access to the underlying C GObject. Reimplemented from Glib::ObjectBase.

GdkVisual* Gdk::Visual::gobj | ( |  | ) | `[inline]`

| Provides access to the underlying C GObject. Reimplemented from Glib::ObjectBase.

GdkVisual* Gdk::Visual::gobj_copy | ( |  | ) |

## Friends And Related Function Documentation

Glib::RefPtr<Gdk::Visual> wrap | ( | GdkVisual* | object,
|  | bool | take_copy = false
| ) | `[related]`

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

- visual.h