diff --git a/include/minigui.h b/include/minigui.h index 14353d78..c0cffb98 100644 --- a/include/minigui.h +++ b/include/minigui.h @@ -81,16 +81,26 @@ extern "C" { */ /** - * \var RECT g_rcScr - * \brief Contains the rectangle of the whole screen. + * \fn RECT GUIAPI GetScreenRect (void); + * \brief Return the rectangle of the physical screen. + * + * Since 4.2.0 */ -extern MG_EXPORT RECT g_rcScr; +MG_EXPORT RECT GUIAPI GetScreenRect (void); + +/** + * \def g_rcScr + * \brief Contains the rectangle of the whole screen. + * + * \note Since 4.2.0, g_rcScr is defined a macro to call \a GetScreenRect. + */ +#define g_rcScr (GetScreenRect()) /** * \def g_rcDesktop * \brief Contains the rectangle of desktop of the application. * - * \a g_rcDesktop is defined as an alias (macro) of \a g_rcScr. + * \note This global variable is defined as an alias (macro) of \a g_rcScr. * * \sa g_rcScr */ diff --git a/src/newgal/newgal.c b/src/newgal/newgal.c index d8da413a..00bd9bcd 100644 --- a/src/newgal/newgal.c +++ b/src/newgal/newgal.c @@ -65,6 +65,12 @@ GAL_Surface* __gal_screen; +RECT GUIAPI GetScreenRect (void) +{ + RECT rc = { 0, 0, __gal_screen->w, __gal_screen->h }; + return rc; +} + BOOL GAL_ParseVideoMode (const char* mode, int* w, int* h, int* depth) { const char* tmp;