add windowed and fullscreen support to the gdi backend. Other backend are only fullscreen.

SVN revision: 38539
This commit is contained in:
Vincent Torri 2009-01-10 17:33:19 +00:00
parent b0525ae2fe
commit a5695ae333
4 changed files with 20 additions and 20 deletions

View File

@ -14,11 +14,12 @@ struct _Evas_Engine_Info_Software_16_WinCE
Evas_Engine_Info magic;
struct {
HWND window;
int width;
int height;
int backend; /* 0: auto, 1: raw, 2: gapi, 3: ddraw, 4: gdi */
int rotation;
HWND window;
int width;
int height;
int backend; /* 0: auto, 1: raw, 2: gapi, 3: ddraw, 4: gdi */
int rotation;
unsigned int fullscreen : 1;
} info;
/* engine specific function calls to query stuff about messages */
struct {

View File

@ -220,7 +220,7 @@ eng_setup(Evas *e, void *in)
break;
case 4: /* GDI */
re->backend = EVAS_ENGINE_WINCE_GDI;
re->backend_priv = evas_software_wince_gdi_init(info->info.window, info->info.width, info->info.height);
re->backend_priv = evas_software_wince_gdi_init(info->info.window, info->info.width, info->info.height, info->info.fullscreen);
if (!re->backend_priv)
{
free(re);
@ -295,7 +295,7 @@ eng_setup(Evas *e, void *in)
break;
case 4: /* GDI */
re->backend = EVAS_ENGINE_WINCE_GDI;
re->backend_priv = evas_software_wince_gdi_init(info->info.window, info->info.width, info->info.height);
re->backend_priv = evas_software_wince_gdi_init(info->info.window, info->info.width, info->info.height, info->info.fullscreen);
if (!re->backend_priv)
{
free(re);

View File

@ -81,7 +81,8 @@ void evas_software_wince_ddraw_surface_resize(FB_Output_Buffer *fbo
void *evas_software_wince_gdi_init (HWND window,
int width,
int height);
int height,
int fullscreen);
FB_Output_Buffer *evas_software_wince_gdi_output_buffer_new (void *priv,
int width,
int height);

View File

@ -24,7 +24,8 @@ struct Evas_Engine_WinCE_GDI_Priv
void *
evas_software_wince_gdi_init(HWND window,
int width,
int height)
int height,
int fullscreen)
{
Evas_Engine_WinCE_GDI_Priv *priv;
@ -41,18 +42,15 @@ evas_software_wince_gdi_init(HWND window,
return NULL;
}
priv->width = GetSystemMetrics(SM_CXSCREEN);
priv->height = GetSystemMetrics(SM_CYSCREEN);
if ((priv->width != width) ||
(priv->height != height))
if (fullscreen)
{
fprintf (stderr, "[Evas] [Engine] [WinCE GDI] Size mismatch\n");
fprintf (stderr, "[Evas] [Engine] [WinCE GDI] asked: %dx%d\n", width, height);
fprintf (stderr, "[Evas] [Engine] [WinCE GDI] got : %dx%d\n", priv->width, priv->height);
ReleaseDC(window, priv->dc);
free(priv);
return NULL;
priv->width = GetSystemMetrics(SM_CXSCREEN);
priv->height = GetSystemMetrics(SM_CYSCREEN);
}
else
{
priv->width = width;
priv->height = height;
}
priv->bitmap_info = (BITMAPINFO_16bpp *)malloc(sizeof(BITMAPINFO_16bpp));