Screen access is made through this class.
More...
#include <screen.h>
List of all members.
Static Public Member Functions |
static void | set_video_mode (u_int16 nl, u_int16 nh, u_int8 depth=0, bool dbl=false, bool fscreen=false) |
| Sets the video mode.
|
static u_int16 | length () |
| Returns the length of the screen.
|
static u_int16 | height () |
| Returns the height of the screen.
|
static u_int8 | bytes_per_pixel () |
| Returns the screen depth, in bytes per pixel.
|
static u_int32 | trans_col () |
| Returns the translucent color in screen's depth format.
|
static void | clear () |
| Totally clears the screen with black.
|
static void | show () |
| Ensure the framebuffer is copied to the physical screen.
|
static bool | is_fullscreen () |
| Returns whether the current mode is fullscreen or windowed.
|
static bool | set_fullscreen (bool m) |
| Sets fullscreen/windowed mode.
|
static string | info () |
| Returns information about the current screen settings, suitable for being displayed to the user.
|
static bool | dbl_mode () |
static void | transition (u_int16 i) |
| Make a nice transition effect.
|
Static Public Attributes |
static surface | display |
| The actual screen surface.
|
Detailed Description
Screen access is made through this class.
This static class sets video modes, flush the frame buffer to the physical screen and make abstraction of the real screen depth to ease the graphic programmer's task.
Definition at line 41 of file screen.h.
Member Function Documentation
void screen::set_video_mode |
( |
u_int16 |
nl, |
|
|
u_int16 |
nh, |
|
|
u_int8 |
depth = 0 , |
|
|
bool |
dbl = false , |
|
|
bool |
fscreen = false | |
|
) |
| | [static] |
Sets the video mode.
- Parameters:
-
| nl | X screen resolution. |
| nh | Y screen resolution. |
| depth | desired screen depth. |
Definition at line 39 of file screen.cc.
static u_int16 screen::length |
( |
|
) |
[inline, static] |
Returns the length of the screen.
- Returns:
- length of the screen.
Definition at line 63 of file screen.h.
static u_int16 screen::height |
( |
|
) |
[inline, static] |
Returns the height of the screen.
- Returns:
- height of the screen.
Definition at line 71 of file screen.h.
static u_int8 screen::bytes_per_pixel |
( |
|
) |
[inline, static] |
Returns the screen depth, in bytes per pixel.
- Returns:
- screen depth, in bytes per pixel.
Definition at line 79 of file screen.h.
static u_int32 screen::trans_col |
( |
|
) |
[inline, static] |
Returns the translucent color in screen's depth format.
For manipulation on images that will only be displayed, this is the right function to call for getting the translucent color.
- Returns:
- the translucent color in screen's depth format.
Definition at line 89 of file screen.h.
static void screen::clear |
( |
|
) |
[inline, static] |
Totally clears the screen with black.
Definition at line 98 of file screen.h.
void screen::show |
( |
|
) |
[static] |
Ensure the framebuffer is copied to the physical screen.
Definition at line 110 of file screen.cc.
static bool screen::is_fullscreen |
( |
|
) |
[inline, static] |
Returns whether the current mode is fullscreen or windowed.
- Returns:
- true: fullscreen.
- false: windowed.
Definition at line 112 of file screen.h.
bool screen::set_fullscreen |
( |
bool |
m |
) |
[static] |
Sets fullscreen/windowed mode.
- Parameters:
-
| mode |
- true: fullscreen mode.
- false: windowed mode.
|
- Returns:
- true if the operation succeed.
- false if the mode is already set, or the system doesn't support this mode.
Definition at line 149 of file screen.cc.
string screen::info |
( |
|
) |
[static] |
Returns information about the current screen settings, suitable for being displayed to the user.
- Returns:
- printable information about the current screen settings.
Definition at line 115 of file screen.cc.
void screen::transition |
( |
u_int16 |
i |
) |
[static] |
Make a nice transition effect.
- Parameters:
-
| i | advancement of the transition (finished when i == screen::length () / 2) |
Definition at line 160 of file screen.cc.
Member Data Documentation
The actual screen surface.
It is publicly available so you can do fast operations on the screen. Manipulate it just as a classic surface.
Definition at line 51 of file screen.h.
The documentation for this class was generated from the following files: