forked from enlightenment/efl
* add _move, _resize and _move_resize to ecore_wince and ecore_evas_wince
* small fix for ecore_win32 SVN revision: 38609
This commit is contained in:
parent
2023d9749f
commit
f26751a57c
|
@ -520,81 +520,81 @@ _ecore_evas_wince_callback_delete_request_set(Ecore_Evas *ee,
|
|||
ee->func.fn_delete_request = func;
|
||||
}
|
||||
|
||||
/* static void */
|
||||
/* _ecore_evas_wince_move(Ecore_Evas *ee, int x, int y) */
|
||||
/* { */
|
||||
/* if ((x != ee->x) || (y != ee->y)) */
|
||||
/* { */
|
||||
/* ee->x = x; */
|
||||
/* ee->y = y; */
|
||||
/* ecore_wince_window_move(ee->engine.wince.window, x, y); */
|
||||
/* if (ee->func.fn_move) ee->func.fn_move(ee); */
|
||||
/* } */
|
||||
/* } */
|
||||
static void
|
||||
_ecore_evas_wince_move(Ecore_Evas *ee, int x, int y)
|
||||
{
|
||||
if ((x != ee->x) || (y != ee->y))
|
||||
{
|
||||
ee->x = x;
|
||||
ee->y = y;
|
||||
ecore_wince_window_move(ee->engine.wince.window, x, y);
|
||||
if (ee->func.fn_move) ee->func.fn_move(ee);
|
||||
}
|
||||
}
|
||||
|
||||
/* static void */
|
||||
/* _ecore_evas_wince_resize(Ecore_Evas *ee, int width, int height) */
|
||||
/* { */
|
||||
/* printf (" * _ecore_evas_wince_resize %d %d\n", width, height); */
|
||||
/* if ((ee->w != width) || (ee->h != height)) */
|
||||
/* { */
|
||||
/* ee->w = width; */
|
||||
/* ee->h = height; */
|
||||
/* ecore_wince_window_resize(ee->engine.wince.window, width, height); */
|
||||
/* if ((ee->rotation == 90) || (ee->rotation == 270)) */
|
||||
/* { */
|
||||
/* evas_output_size_set(ee->evas, ee->h, ee->w); */
|
||||
/* evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); */
|
||||
/* } */
|
||||
/* else */
|
||||
/* { */
|
||||
/* evas_output_size_set(ee->evas, ee->w, ee->h); */
|
||||
/* evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); */
|
||||
/* } */
|
||||
/* /\* FIXME: damage and shape *\/ */
|
||||
static void
|
||||
_ecore_evas_wince_resize(Ecore_Evas *ee, int width, int height)
|
||||
{
|
||||
printf (" * _ecore_evas_wince_resize %d %d\n", width, height);
|
||||
if ((ee->w != width) || (ee->h != height))
|
||||
{
|
||||
ee->w = width;
|
||||
ee->h = height;
|
||||
ecore_wince_window_resize(ee->engine.wince.window, width, height);
|
||||
if ((ee->rotation == 90) || (ee->rotation == 270))
|
||||
{
|
||||
evas_output_size_set(ee->evas, ee->h, ee->w);
|
||||
evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_output_size_set(ee->evas, ee->w, ee->h);
|
||||
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
|
||||
}
|
||||
/* FIXME: damage and shape */
|
||||
|
||||
/* if (ee->func.fn_resize) ee->func.fn_resize(ee); */
|
||||
/* } */
|
||||
/* } */
|
||||
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||
}
|
||||
}
|
||||
|
||||
/* static void */
|
||||
/* _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int height) */
|
||||
/* { */
|
||||
/* printf (" * _ecore_evas_wince_resize\n"); */
|
||||
/* if ((ee->w != width) || (ee->h != height) || (x != ee->x) || (y != ee->y)) */
|
||||
/* { */
|
||||
/* int change_size = 0; */
|
||||
/* int change_pos = 0; */
|
||||
static void
|
||||
_ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int height)
|
||||
{
|
||||
printf (" * _ecore_evas_wince_resize\n");
|
||||
if ((ee->w != width) || (ee->h != height) || (x != ee->x) || (y != ee->y))
|
||||
{
|
||||
int change_size = 0;
|
||||
int change_pos = 0;
|
||||
|
||||
/* if ((ee->w != width) || (ee->h != height)) change_size = 1; */
|
||||
/* if ((x != ee->x) || (y != ee->y)) change_pos = 1; */
|
||||
if ((ee->w != width) || (ee->h != height)) change_size = 1;
|
||||
if ((x != ee->x) || (y != ee->y)) change_pos = 1;
|
||||
|
||||
/* ee->x = x; */
|
||||
/* ee->y = y; */
|
||||
/* ee->w = width; */
|
||||
/* ee->h = height; */
|
||||
/* ecore_wince_window_move_resize(ee->engine.wince.window, x, y, width, height); */
|
||||
/* if ((ee->rotation == 90) || (ee->rotation == 270)) */
|
||||
/* { */
|
||||
/* evas_output_size_set(ee->evas, ee->h, ee->w); */
|
||||
/* evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); */
|
||||
/* } */
|
||||
/* else */
|
||||
/* { */
|
||||
/* evas_output_size_set(ee->evas, ee->w, ee->h); */
|
||||
/* evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); */
|
||||
/* } */
|
||||
/* /\* FIXME: damage and shape *\/ */
|
||||
/* if (change_pos) */
|
||||
/* { */
|
||||
/* if (ee->func.fn_move) ee->func.fn_move(ee); */
|
||||
/* } */
|
||||
/* if (change_size) */
|
||||
/* { */
|
||||
/* if (ee->func.fn_resize) ee->func.fn_resize(ee); */
|
||||
/* } */
|
||||
/* } */
|
||||
/* } */
|
||||
ee->x = x;
|
||||
ee->y = y;
|
||||
ee->w = width;
|
||||
ee->h = height;
|
||||
ecore_wince_window_move_resize(ee->engine.wince.window, x, y, width, height);
|
||||
if ((ee->rotation == 90) || (ee->rotation == 270))
|
||||
{
|
||||
evas_output_size_set(ee->evas, ee->h, ee->w);
|
||||
evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_output_size_set(ee->evas, ee->w, ee->h);
|
||||
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
|
||||
}
|
||||
/* FIXME: damage and shape */
|
||||
if (change_pos)
|
||||
{
|
||||
if (ee->func.fn_move) ee->func.fn_move(ee);
|
||||
}
|
||||
if (change_size)
|
||||
{
|
||||
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* static void */
|
||||
/* _ecore_evas_wince_rotation_set(Ecore_Evas *ee, int rotation) */
|
||||
|
@ -892,10 +892,10 @@ static const Ecore_Evas_Engine_Func _ecore_wince_engine_func =
|
|||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL, //_ecore_evas_wince_move,
|
||||
_ecore_evas_wince_move,
|
||||
NULL,
|
||||
NULL, //_ecore_evas_wince_resize,
|
||||
NULL, //_ecore_evas_wince_move_resize,
|
||||
_ecore_evas_wince_resize,
|
||||
_ecore_evas_wince_move_resize,
|
||||
NULL, //_ecore_evas_wince_rotation_set,
|
||||
NULL, /* _ecore_evas_x_shaped_set */
|
||||
_ecore_evas_wince_show,
|
||||
|
|
|
@ -221,7 +221,7 @@ ecore_win32_window_move_resize(Ecore_Win32_Window *window,
|
|||
rect.right = width;
|
||||
rect.bottom = height;
|
||||
style = GetWindowLong(w->window, GWL_STYLE);
|
||||
if (!AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, FALSE))
|
||||
if (!AdjustWindowRect(&rect, style, FALSE))
|
||||
return;
|
||||
|
||||
MoveWindow(w->window, x, y,
|
||||
|
|
|
@ -211,6 +211,22 @@ EAPI Ecore_WinCE_Window *ecore_wince_window_new(Ecore_WinCE_Window *parent,
|
|||
|
||||
EAPI void ecore_wince_window_del(Ecore_WinCE_Window *window);
|
||||
|
||||
EAPI void *ecore_wince_window_hwnd_get(Ecore_WinCE_Window *window);
|
||||
|
||||
EAPI void ecore_wince_window_move(Ecore_WinCE_Window *window,
|
||||
int x,
|
||||
int y);
|
||||
|
||||
EAPI void ecore_wince_window_resize(Ecore_WinCE_Window *window,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
EAPI void ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
EAPI void ecore_wince_window_show(Ecore_WinCE_Window *window);
|
||||
|
||||
EAPI void ecore_wince_window_hide(Ecore_WinCE_Window *window);
|
||||
|
@ -234,8 +250,6 @@ EAPI void ecore_wince_window_size_get(Ecore_WinCE_Window *window,
|
|||
int *width,
|
||||
int *height);
|
||||
|
||||
EAPI void *ecore_wince_window_window_get(Ecore_WinCE_Window *window);
|
||||
|
||||
EAPI void ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
|
||||
int on);
|
||||
|
||||
|
|
|
@ -98,6 +98,116 @@ ecore_wince_window_del(Ecore_WinCE_Window *window)
|
|||
fprintf (stderr, "ecore_wince_window_del\n");
|
||||
}
|
||||
|
||||
void *
|
||||
ecore_wince_window_hwnd_get(Ecore_WinCE_Window *window)
|
||||
{
|
||||
struct _Ecore_WinCE_Window *w;
|
||||
|
||||
if (!window)
|
||||
return NULL;
|
||||
|
||||
return ((struct _Ecore_WinCE_Window *)window)->window;
|
||||
}
|
||||
|
||||
void
|
||||
ecore_wince_window_move(Ecore_WinCE_Window *window,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
RECT rect;
|
||||
HWND w;
|
||||
|
||||
if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
|
||||
return;
|
||||
|
||||
printf ("ecore_wince_window_move %p : %d %d\n", window, x, y);
|
||||
w = ((struct _Ecore_WinCE_Window *)window)->window;
|
||||
if (!GetWindowRect(w, &rect))
|
||||
return;
|
||||
|
||||
MoveWindow(w, x, y,
|
||||
rect.right - rect.left,
|
||||
rect.bottom - rect.top,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
ecore_wince_window_resize(Ecore_WinCE_Window *window,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
RECT rect;
|
||||
struct _Ecore_WinCE_Window *w;
|
||||
DWORD style;
|
||||
DWORD exstyle;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
|
||||
return;
|
||||
|
||||
w = (struct _Ecore_WinCE_Window *)window;
|
||||
if (!GetWindowRect(w->window, &rect)) return;
|
||||
|
||||
printf ("ecore_wince_window_resize 0 : %p (%d %d)\n",
|
||||
w,
|
||||
width,
|
||||
height);
|
||||
|
||||
x = rect.left;
|
||||
y = rect.top;
|
||||
rect.left = 0;
|
||||
rect.top = 0;
|
||||
rect.right = width;
|
||||
rect.bottom = height;
|
||||
style = GetWindowLong(w->window, GWL_STYLE);
|
||||
exstyle = GetWindowLong(w->window, GWL_EXSTYLE);
|
||||
if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
|
||||
return;
|
||||
|
||||
if (!MoveWindow(w->window, x, y,
|
||||
rect.right - rect.left,
|
||||
rect.bottom - rect.top,
|
||||
FALSE))
|
||||
{
|
||||
printf (" MEEERDE !!!\n");
|
||||
}
|
||||
printf ("ecore_wince_window_resize 4 : %d %d\n", width, height);
|
||||
}
|
||||
|
||||
void
|
||||
ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
RECT rect;
|
||||
struct _Ecore_WinCE_Window *w;
|
||||
DWORD style;
|
||||
DWORD exstyle;
|
||||
|
||||
if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
|
||||
return;
|
||||
|
||||
printf ("ecore_wince_window_move_resize 0 : %p %d %d\n", window, width, height);
|
||||
w = ((struct _Ecore_WinCE_Window *)window);
|
||||
rect.left = 0;
|
||||
rect.top = 0;
|
||||
printf ("ecore_wince_window_move_resize 1 : %d %d\n", width, height);
|
||||
rect.right = width;
|
||||
rect.bottom = height;
|
||||
style = GetWindowLong(w->window, GWL_STYLE);
|
||||
exstyle = GetWindowLong(w->window, GWL_EXSTYLE);
|
||||
if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
|
||||
return;
|
||||
|
||||
MoveWindow(w->window, x, y,
|
||||
rect.right - rect.left,
|
||||
rect.bottom - rect.top,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
ecore_wince_window_show(Ecore_WinCE_Window *window)
|
||||
{
|
||||
|
@ -251,17 +361,6 @@ ecore_wince_window_size_get(Ecore_WinCE_Window *window,
|
|||
if (height) *height = rect.bottom - rect.top;
|
||||
}
|
||||
|
||||
void *
|
||||
ecore_wince_window_window_get(Ecore_WinCE_Window *window)
|
||||
{
|
||||
struct _Ecore_WinCE_Window *w;
|
||||
|
||||
if (!window)
|
||||
return NULL;
|
||||
|
||||
return ((struct _Ecore_WinCE_Window *)window)->window;
|
||||
}
|
||||
|
||||
void
|
||||
ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
|
||||
int on)
|
||||
|
|
Loading…
Reference in New Issue