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; Evas_Engine_Info magic;
struct { struct {
HWND window; HWND window;
int width; int width;
int height; int height;
int backend; /* 0: auto, 1: raw, 2: gapi, 3: ddraw, 4: gdi */ int backend; /* 0: auto, 1: raw, 2: gapi, 3: ddraw, 4: gdi */
int rotation; int rotation;
unsigned int fullscreen : 1;
} info; } info;
/* engine specific function calls to query stuff about messages */ /* engine specific function calls to query stuff about messages */
struct { struct {

View File

@ -220,7 +220,7 @@ eng_setup(Evas *e, void *in)
break; break;
case 4: /* GDI */ case 4: /* GDI */
re->backend = EVAS_ENGINE_WINCE_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) if (!re->backend_priv)
{ {
free(re); free(re);
@ -295,7 +295,7 @@ eng_setup(Evas *e, void *in)
break; break;
case 4: /* GDI */ case 4: /* GDI */
re->backend = EVAS_ENGINE_WINCE_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) if (!re->backend_priv)
{ {
free(re); 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, void *evas_software_wince_gdi_init (HWND window,
int width, int width,
int height); int height,
int fullscreen);
FB_Output_Buffer *evas_software_wince_gdi_output_buffer_new (void *priv, FB_Output_Buffer *evas_software_wince_gdi_output_buffer_new (void *priv,
int width, int width,
int height); int height);

View File

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