From 8fbf7ec5f7addaafe932bec835f8f46964891e03 Mon Sep 17 00:00:00 2001 From: caro Date: Sat, 10 Jan 2009 17:33:19 +0000 Subject: [PATCH] add windowed and fullscreen support to the gdi backend. Other backend are only fullscreen. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@38539 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- .../Evas_Engine_Software_16_WinCE.h | 11 ++++++----- .../engines/software_16_wince/evas_engine.c | 4 ++-- .../engines/software_16_wince/evas_engine.h | 3 ++- .../software_16_wince/evas_wince_gdi_buffer.c | 22 ++++++++++------------ 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/modules/engines/software_16_wince/Evas_Engine_Software_16_WinCE.h b/src/modules/engines/software_16_wince/Evas_Engine_Software_16_WinCE.h index b782d1b..d9d45a5 100644 --- a/src/modules/engines/software_16_wince/Evas_Engine_Software_16_WinCE.h +++ b/src/modules/engines/software_16_wince/Evas_Engine_Software_16_WinCE.h @@ -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 { diff --git a/src/modules/engines/software_16_wince/evas_engine.c b/src/modules/engines/software_16_wince/evas_engine.c index b8a5ad4..97ed21f 100644 --- a/src/modules/engines/software_16_wince/evas_engine.c +++ b/src/modules/engines/software_16_wince/evas_engine.c @@ -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); diff --git a/src/modules/engines/software_16_wince/evas_engine.h b/src/modules/engines/software_16_wince/evas_engine.h index 20febdf..a11d512 100644 --- a/src/modules/engines/software_16_wince/evas_engine.h +++ b/src/modules/engines/software_16_wince/evas_engine.h @@ -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); diff --git a/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c b/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c index 75bee5c..38a043c 100644 --- a/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c +++ b/src/modules/engines/software_16_wince/evas_wince_gdi_buffer.c @@ -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)); -- 2.7.4