25 #ifndef tbx_MODEINFO_H_ 26 #define tbx_MODEINFO_H_ 130 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 3, &colours);
131 if (colours == 63) colours = 255;
138 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 4, &x);
139 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 5, &y);
146 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 4, &x);
147 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 5, &y);
148 return Size((1<<x),(1<<y));
154 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 11, &x);
155 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 12, &y);
156 return Size(x+1,y+1);
162 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 4, &eig);
163 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 11, &x);
165 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 5, &eig);
166 _swix(OS_ReadModeVariable,_IN(0) | _IN(1) | _OUT(2),
_mode, 12, &y);
175 _swix(OS_ScreenMode, _IN(0)|_OUT(1), 1, &mode);
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
Class to represent a two-dimensional size.
Definition: size.h:34
ModeInfo()
Constructor to retrieve information about the current screen mode.
Definition: modeinfo.h:49
Size screen_size() const
Get the screen size in OS units.
Definition: modeinfo.h:159
Point eig() const
Return the eigen factors for the mode.
Definition: modeinfo.h:135
int _mode
Screen mode number interrogated for details.
Definition: modeinfo.h:124
int mode() const
Get the mode number information will be returned about.
Definition: modeinfo.h:79
Size pixel_size() const
Get the screen size in pixels.
Definition: modeinfo.h:151
static int screen_mode()
Get to current sreen mode.
Definition: modeinfo.h:172
Class to represent a position in two dimensional space.
Definition: point.h:36
Class to return information on a screen mode.
Definition: modeinfo.h:43
Size screen_unit() const
Get the size of one pixel in OS units.
Definition: modeinfo.h:143
int colours() const
Return the number of colours for the mode.
Definition: modeinfo.h:127
void mode(int mode=-1)
Set the mode to return information about.
Definition: modeinfo.h:62
ModeInfo(int mode)
Constructor to retrieve information about the given screen mode.
Definition: modeinfo.h:55