Home | All Classes | Grouped Classes | Index | Search

Class CL_Display

Top level display class. More...

Derived from: none
Derived by: none
Group: Display (Display 2D)

#include <ClanLib/display.h>

Attributes:

get_current_window

Returns the currently selected window.

get_width

Returns the current width of the window.

get_height

Returns the current height of the window.

is_fullscreen

Returns true if window is currently running fullscreen.

has_focus

Returns true if window has focus.

get_buffer

Returns the pixel buffer for the specified flipping buffer.

get_buffer_count

Returns the amount of flipping buffers being used.

get_front_buffer

Returns the current flipping buffer being used as the front buffer.

get_back_buffer

Returns the current flipping buffer being used as the back buffer.

get_cliprect

Returns the current clipping rectangle used on the graphic context.

get_translate_x

Returns the current effective x-axis translation offset.

get_translate_y

Returns the current effective y-axis translation offset.

Operations:

set_current_window

Sets the currently selected window.

set_fullscreen

Change window to running fullscreen mode.

set_windowed

Change window to running windowed mode.

set_title

Change window title.

set_position

Set window position and size.

set_size

Resize window.

set_buffer_count

Changes the amount of surface buffers used in the flipping system. (2 = double buffer, 3 = triple buffer)

update

Copy the specified rectangle area from back buffer to front buffer.

flip

Flip back buffer to front, making changes visible on screen.

begin_3d

Begin window 3D rendering mode.

end_3d

End windows 3D rendering mode.

draw_pixel

Draw a pixel at (x, y) using the specified color.

draw_line

Draw a line from (x1, y1) to (x2, y2) using the specified color.

draw_rect

Draw a rectangle using the specified color.

fill_rect

Draw a filled rectangle using the specified color.

clear

Clears the whole window using the specified color.

set_cliprect

Set the current clipping rectangle.

push_cliprect

Push current clipping rectangle to stack.

pop_cliprect

Pop current clipping rectangle from the stack.

set_translate_offset

Sets the translate offset.

push_translate_offset

Push translation offset onto translation stack.

pop_translate_offset

Pops the last pushed translation offset from the translation offset stack.

Signals:

sig_resize

Signal emitted when window is resized.

sig_paint

Signal emitted when an area of the window is invalidated.

sig_lost_focus

Signal emitted when window lost focus.

sig_got_focus

Signal emitted when window gain focus.

Detailed description:

The display class provides a static function interface to CL_DisplayWindow and other clanDisplay classes. It uses a selected display window (by default the first created window) to call the equalent functions in CL_DisplayWindow, CL_GraphicContext and such.

The entire point of this is to allow applications with only one window to not pass around a pointer to the display window.



Questions or comments, write to the
ClanLib mailing list.