CL_Display - ClanLib Game SDK

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_modelview | Returns the current effective modelview.

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.
flush | Flushes current rendering batch.
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_lines | Draw multiple lines using the specified color.
draw_rect | Draw a rectangle using the specified color.
fill_rect | Draw a gradient rectangle using the specified gradient.
draw_quad | Draw a quad using the specified color.
fill_quad | Draw a gradient quad using the specified gradient.
draw_triangle | Draw a triangle using the specified color.
fill_triangle | Draw a gradient filled triangle.
draw_triangles | Draw triangles with color array (optionally textured).
draw_trianglesd | Draw triangle array with color array (optionally textured).
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_modelview | Sets the model view matrix to a new matrix.
add_modelview | Multiplies the passed matrix onto the model view matrix.
push_modelview | Pushes current model view matrix onto the model view stack.
set_translate | Sets a translate offset matrix, ignoring any earlier modelview settings.
add_translate | Adds the translate offset.
push_translate | Push translation offset onto model view stack.
set_rotate | Sets a rotation matrix, ignoring any earlier model view settings.
add_rotate | Adds a rotation matrix to existing model view.
push_rotate | Pushes a rotation matrix onto model view stack.
set_scale | Sets a scale matrix, ignoring any earlier model view settings.
add_scale | Adds a scale matrix to existing model view.
push_scale | Pushes a scale matrix onto model view stack.
pop_modelview | Pops last pushed model view matrix off the stack and makes it the active one.

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.
sig_window_close | Signal emitted when window is closed.

Detailed description:

!group=Display/Display 2D! !header=display.h!

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.