forked from enlightenment/efl
* add _size_get() and _geometry_get() methods
* fix use of resume() and suspend() functions when dealing with GAPI SVN revision: 34741
This commit is contained in:
parent
5b73f44fd1
commit
30fc2a9064
|
@ -213,9 +213,19 @@ EAPI void ecore_wince_window_show(Ecore_WinCE_Window *window);
|
|||
|
||||
EAPI void ecore_wince_window_hide(Ecore_WinCE_Window *window);
|
||||
|
||||
EAPI void ecore_wince_window_suspend_set(Ecore_WinCE_Window *window, int (*suspend)(void));
|
||||
EAPI void ecore_wince_window_suspend_set(Ecore_WinCE_Window *window, int (*suspend)(int), int backend);
|
||||
|
||||
EAPI void ecore_wince_window_resume_set(Ecore_WinCE_Window *window, int (*resume)(void));
|
||||
EAPI void ecore_wince_window_resume_set(Ecore_WinCE_Window *window, int (*resume)(int), int backend);
|
||||
|
||||
EAPI void ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
|
||||
int *x,
|
||||
int *y,
|
||||
int *width,
|
||||
int *height);
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
@ -355,7 +355,7 @@ _ecore_wince_event_handle_focus_in(Ecore_WinCE_Callback_Data *msg)
|
|||
}
|
||||
|
||||
if (window->resume)
|
||||
window->resume();
|
||||
window->resume(window->backend);
|
||||
|
||||
e->window = window;
|
||||
|
||||
|
@ -381,7 +381,7 @@ _ecore_wince_event_handle_focus_out(Ecore_WinCE_Callback_Data *msg)
|
|||
return;
|
||||
}
|
||||
if (window->suspend)
|
||||
window->suspend();
|
||||
window->suspend(window->backend);
|
||||
|
||||
e->window = window;
|
||||
|
||||
|
|
|
@ -24,14 +24,15 @@ struct _Ecore_WinCE_Callback_Data
|
|||
};
|
||||
|
||||
|
||||
typedef int (*ecore_wince_suspend) (void);
|
||||
typedef int (*ecore_wince_resume) (void);
|
||||
typedef int (*ecore_wince_suspend) (int);
|
||||
typedef int (*ecore_wince_resume) (int);
|
||||
|
||||
|
||||
struct _Ecore_WinCE_Window
|
||||
{
|
||||
HWND window;
|
||||
|
||||
int backend;
|
||||
ecore_wince_suspend suspend;
|
||||
ecore_wince_resume resume;
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ ecore_wince_window_hide(Ecore_WinCE_Window *window)
|
|||
}
|
||||
|
||||
void
|
||||
ecore_wince_window_suspend_set(Ecore_WinCE_Window *window, int (*suspend)(void))
|
||||
ecore_wince_window_suspend_set(Ecore_WinCE_Window *window, int (*suspend)(int), int backend)
|
||||
{
|
||||
struct _Ecore_WinCE_Window *w;
|
||||
|
||||
|
@ -146,11 +146,12 @@ ecore_wince_window_suspend_set(Ecore_WinCE_Window *window, int (*suspend)(void))
|
|||
return;
|
||||
|
||||
w = (struct _Ecore_WinCE_Window *)window;
|
||||
w->backend = backend;
|
||||
w->suspend = suspend;
|
||||
}
|
||||
|
||||
void
|
||||
ecore_wince_window_resume_set(Ecore_WinCE_Window *window, int (*resume)(void))
|
||||
ecore_wince_window_resume_set(Ecore_WinCE_Window *window, int (*resume)(int), int backend)
|
||||
{
|
||||
struct _Ecore_WinCE_Window *w;
|
||||
|
||||
|
@ -158,9 +159,90 @@ ecore_wince_window_resume_set(Ecore_WinCE_Window *window, int (*resume)(void))
|
|||
return;
|
||||
|
||||
w = (struct _Ecore_WinCE_Window *)window;
|
||||
w->backend = backend;
|
||||
w->resume = resume;
|
||||
}
|
||||
|
||||
void
|
||||
ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
|
||||
int *x,
|
||||
int *y,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
RECT rect;
|
||||
int w;
|
||||
int h;
|
||||
|
||||
printf ("ecore_wince_window_geometry_get %p\n", window);
|
||||
if (!window)
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (width) *width = GetSystemMetrics(SM_CXSCREEN);
|
||||
if (height) *height = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
|
||||
&rect))
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (width) *width = 0;
|
||||
if (height) *height = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
w = rect.right - rect.left;
|
||||
h = rect.bottom - rect.top;
|
||||
|
||||
if (!GetWindowRect(((struct _Ecore_WinCE_Window *)window)->window,
|
||||
&rect))
|
||||
{
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (width) *width = 0;
|
||||
if (height) *height = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (x) *x = rect.left;
|
||||
if (y) *y = rect.top;
|
||||
if (width) *width = w;
|
||||
if (height) *height = h;
|
||||
}
|
||||
|
||||
void
|
||||
ecore_wince_window_size_get(Ecore_WinCE_Window *window,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
RECT rect;
|
||||
|
||||
printf ("ecore_wince_window_size_get %p\n", window);
|
||||
if (!window)
|
||||
{
|
||||
if (width) *width = GetSystemMetrics(SM_CXSCREEN);
|
||||
if (height) *height = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
|
||||
&rect))
|
||||
{
|
||||
if (width) *width = 0;
|
||||
if (height) *height = 0;
|
||||
}
|
||||
|
||||
if (width) *width = rect.right - rect.left;
|
||||
if (height) *height = rect.bottom - rect.top;
|
||||
}
|
||||
|
||||
void *
|
||||
ecore_wince_window_window_get(Ecore_WinCE_Window *window)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue