int height,
DWORD style)
{
- RECT rect;
- struct _Ecore_Win32_Window *w;
- int minimal_width;
- int minimal_height;
+ RECT rect;
+ Ecore_Win32_Window *w;
+ int minimal_width;
+ int minimal_height;
- w = (struct _Ecore_Win32_Window *)calloc(1, sizeof(struct _Ecore_Win32_Window));
+ w = (Ecore_Win32_Window *)calloc(1, sizeof(Ecore_Win32_Window));
if (!w)
{
ERR("malloc() failed");
x, y,
rect.right - rect.left,
rect.bottom - rect.top,
- parent ? ((struct _Ecore_Win32_Window *)parent)->window : NULL,
+ parent ? ((Ecore_Win32_Window *)parent)->window : NULL,
NULL, _ecore_win32_instance, NULL);
if (!w->window)
{
EAPI void
ecore_win32_window_free(Ecore_Win32_Window *window)
{
- struct _Ecore_Win32_Window *wnd = window;
+ Ecore_Win32_Window *wnd = window;
if (!window) return;
if (wnd->shape.mask)
free(wnd->shape.mask);
- DestroyWindow(((struct _Ecore_Win32_Window *)window)->window);
+ DestroyWindow(((Ecore_Win32_Window *)window)->window);
free(window);
}
{
if (!window) return NULL;
- return ((struct _Ecore_Win32_Window *)window)->window;
+ return ((Ecore_Win32_Window *)window)->window;
}
/*
default:
return;
}
- SetWindowPos((struct _Ecore_Win32_Window *)window->window, w, x, y, width, height, ???);
+ SetWindowPos((Ecore_Win32_Window *)window->window, w, x, y, width, height, ???);
}
*/
INF("moving window (%dx%d)", x, y);
- w = ((struct _Ecore_Win32_Window *)window)->window;
+ w = ((Ecore_Win32_Window *)window)->window;
if (!GetWindowRect(w, &rect))
{
ERR("GetWindowRect() failed");
int width,
int height)
{
- RECT rect;
- struct _Ecore_Win32_Window *w;
- DWORD style;
- int x;
- int y;
- int minimal_width;
- int minimal_height;
+ RECT rect;
+ Ecore_Win32_Window *w;
+ DWORD style;
+ int x;
+ int y;
+ int minimal_width;
+ int minimal_height;
/* FIXME: on fullscreen, should not resize it */
if (!window) return;
INF("resizing window (%dx%d)", width, height);
- w = (struct _Ecore_Win32_Window *)window;
+ w = (Ecore_Win32_Window *)window;
minimal_width = MAX(GetSystemMetrics(SM_CXMIN), (int)w->min_width);
minimal_height = MAX(GetSystemMetrics(SM_CYMIN), (int)w->min_height);
int width,
int height)
{
- RECT rect;
- struct _Ecore_Win32_Window *w;
- DWORD style;
- int minimal_width;
- int minimal_height;
+ RECT rect;
+ Ecore_Win32_Window *w;
+ DWORD style;
+ int minimal_width;
+ int minimal_height;
/* FIXME: on fullscreen, should not move/resize it */
if (!window) return;
INF("moving and resizing window (%dx%d %dx%d)", x, y, width, height);
- w = ((struct _Ecore_Win32_Window *)window);
+ w = ((Ecore_Win32_Window *)window);
minimal_width = MAX(GetSystemMetrics(SM_CXMIN), (int)w->min_width);
minimal_height = MAX(GetSystemMetrics(SM_CYMIN), (int)w->min_height);
return;
}
- if (!GetClientRect(((struct _Ecore_Win32_Window *)window)->window,
+ if (!GetClientRect(((Ecore_Win32_Window *)window)->window,
&rect))
{
ERR("GetClientRect() failed");
w = rect.right - rect.left;
h = rect.bottom - rect.top;
- if (!GetWindowRect(((struct _Ecore_Win32_Window *)window)->window,
+ if (!GetWindowRect(((Ecore_Win32_Window *)window)->window,
&rect))
{
ERR("GetWindowRect() failed");
return;
}
- if (!GetClientRect(((struct _Ecore_Win32_Window *)window)->window,
+ if (!GetClientRect(((Ecore_Win32_Window *)window)->window,
&rect))
{
ERR("GetClientRect() failed");
unsigned int min_width,
unsigned int min_height)
{
- struct _Ecore_Win32_Window *w;
+ Ecore_Win32_Window *w;
if (!window) return;
printf ("ecore_win32_window_size_min_set : %p %d %d\n", window, min_width, min_height);
- w = (struct _Ecore_Win32_Window *)window;
+ w = (Ecore_Win32_Window *)window;
w->min_width = min_width;
w->min_height = min_height;
}
unsigned int *min_width,
unsigned int *min_height)
{
- struct _Ecore_Win32_Window *w;
+ Ecore_Win32_Window *w;
if (!window) return;
- w = (struct _Ecore_Win32_Window *)window;
+ w = (Ecore_Win32_Window *)window;
printf ("ecore_win32_window_size_min_get : %p %d %d\n", window, w->min_width, w->min_height);
if (min_width) *min_width = w->min_width;
if (min_height) *min_height = w->min_height;
unsigned int max_width,
unsigned int max_height)
{
- struct _Ecore_Win32_Window *w;
+ Ecore_Win32_Window *w;
if (!window) return;
printf ("ecore_win32_window_size_max_set : %p %d %d\n", window, max_width, max_height);
- w = (struct _Ecore_Win32_Window *)window;
+ w = (Ecore_Win32_Window *)window;
w->max_width = max_width;
w->max_height = max_height;
}
unsigned int *max_width,
unsigned int *max_height)
{
- struct _Ecore_Win32_Window *w;
+ Ecore_Win32_Window *w;
if (!window) return;
- w = (struct _Ecore_Win32_Window *)window;
+ w = (Ecore_Win32_Window *)window;
printf ("ecore_win32_window_size_max_get : %p %d %d\n", window, w->max_width, w->max_height);
if (max_width) *max_width = w->max_width;
if (max_height) *max_height = w->max_height;
unsigned int base_width,
unsigned int base_height)
{
- struct _Ecore_Win32_Window *w;
+ Ecore_Win32_Window *w;
printf ("ecore_win32_window_size_base_set : %p %d %d\n", window, base_width, base_height);
if (!window) return;
- w = (struct _Ecore_Win32_Window *)window;
+ w = (Ecore_Win32_Window *)window;
w->base_width = base_width;
w->base_height = base_height;
}
unsigned int *base_width,
unsigned int *base_height)
{
- struct _Ecore_Win32_Window *w;
+ Ecore_Win32_Window *w;
if (!window) return;
- w = (struct _Ecore_Win32_Window *)window;
+ w = (Ecore_Win32_Window *)window;
printf ("ecore_win32_window_size_base_get : %p %d %d\n", window, w->base_width, w->base_height);
if (base_width) *base_width = w->base_width;
if (base_height) *base_height = w->base_height;
unsigned int step_width,
unsigned int step_height)
{
- struct _Ecore_Win32_Window *w;
+ Ecore_Win32_Window *w;
printf ("ecore_win32_window_size_step_set : %p %d %d\n", window, step_width, step_height);
if (!window) return;
- w = (struct _Ecore_Win32_Window *)window;
+ w = (Ecore_Win32_Window *)window;
w->step_width = step_width;
w->step_height = step_height;
}
unsigned int *step_width,
unsigned int *step_height)
{
- struct _Ecore_Win32_Window *w;
+ Ecore_Win32_Window *w;
if (!window) return;
- w = (struct _Ecore_Win32_Window *)window;
+ w = (Ecore_Win32_Window *)window;
printf ("ecore_win32_window_size_step_get : %p %d %d\n", window, w->step_width, w->step_height);
if (step_width) *step_width = w->step_width;
if (step_height) *step_height = w->step_height;
unsigned short height,
unsigned char *mask)
{
- struct _Ecore_Win32_Window *wnd;
+ Ecore_Win32_Window *wnd;
HRGN rgn;
int x;
int y;
if (!window)
return;
- wnd = (struct _Ecore_Win32_Window *)window;
+ wnd = (Ecore_Win32_Window *)window;
if (!mask)
{
INF("showing window");
- ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL);
- if (!UpdateWindow(((struct _Ecore_Win32_Window *)window)->window))
+ ShowWindow(((Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL);
+ if (!UpdateWindow(((Ecore_Win32_Window *)window)->window))
{
ERR("UpdateWindow() failed");
}
INF("hiding window");
- ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE);
+ ShowWindow(((Ecore_Win32_Window *)window)->window, SW_HIDE);
}
/**
INF("raising window");
- if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
+ if (!SetWindowPos(((Ecore_Win32_Window *)window)->window,
HWND_TOP, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
{
INF("lowering window");
- if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
+ if (!SetWindowPos(((Ecore_Win32_Window *)window)->window,
HWND_BOTTOM, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
{
INF("setting window title");
- if (!SetWindowText(((struct _Ecore_Win32_Window *)window)->window, title))
+ if (!SetWindowText(((Ecore_Win32_Window *)window)->window, title))
{
ERR("SetWindowText() failed");
}
INF("focusing window");
- if (!SetFocus(((struct _Ecore_Win32_Window *)window)->window))
+ if (!SetFocus(((Ecore_Win32_Window *)window)->window))
{
ERR("SetFocus() failed");
}
ecore_win32_window_iconified_set(Ecore_Win32_Window *window,
Eina_Bool on)
{
- struct _Ecore_Win32_Window *ew;
+ Ecore_Win32_Window *ew;
if (!window) return;
- ew = (struct _Ecore_Win32_Window *)window;
+ ew = (Ecore_Win32_Window *)window;
if (((ew->iconified) && (on)) ||
((!ew->iconified) && (!on)))
return;
ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
Eina_Bool on)
{
- RECT rect;
- DWORD style;
- struct _Ecore_Win32_Window *ew;
- HWND w;
+ RECT rect;
+ DWORD style;
+ Ecore_Win32_Window *ew;
+ HWND w;
if (!window) return;
- ew = (struct _Ecore_Win32_Window *)window;
+ ew = (Ecore_Win32_Window *)window;
if (((ew->borderless) && (on)) ||
((!ew->borderless) && (!on)))
return;
ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
Eina_Bool on)
{
- struct _Ecore_Win32_Window *ew;
+ Ecore_Win32_Window *ew;
HWND w;
if (!window) return;
- ew = (struct _Ecore_Win32_Window *)window;
+ ew = (Ecore_Win32_Window *)window;
if (((ew->fullscreen) && (on)) ||
((!ew->fullscreen) && (!on)))
return;
if (!window || !cursor)
return;
- if (!SetClassLongPtr(((struct _Ecore_Win32_Window *)window)->window,
+ if (!SetClassLongPtr(((Ecore_Win32_Window *)window)->window,
GCL_HCURSOR, (LONG_PTR)cursor))
{
ERR("SetClassLong() failed");
switch (state[i])
{
case ECORE_WIN32_WINDOW_STATE_ICONIFIED:
- ((struct _Ecore_Win32_Window *)window)->state.iconified = 1;
+ ((Ecore_Win32_Window *)window)->state.iconified = 1;
break;
case ECORE_WIN32_WINDOW_STATE_MODAL:
- ((struct _Ecore_Win32_Window *)window)->state.modal = 1;
+ ((Ecore_Win32_Window *)window)->state.modal = 1;
break;
case ECORE_WIN32_WINDOW_STATE_STICKY:
- ((struct _Ecore_Win32_Window *)window)->state.sticky = 1;
+ ((Ecore_Win32_Window *)window)->state.sticky = 1;
break;
case ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT:
- ((struct _Ecore_Win32_Window *)window)->state.maximized_vert = 1;
+ ((Ecore_Win32_Window *)window)->state.maximized_vert = 1;
break;
case ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ:
- ((struct _Ecore_Win32_Window *)window)->state.maximized_horz = 1;
+ ((Ecore_Win32_Window *)window)->state.maximized_horz = 1;
break;
case ECORE_WIN32_WINDOW_STATE_MAXIMIZED:
- ((struct _Ecore_Win32_Window *)window)->state.maximized_horz = 1;
- ((struct _Ecore_Win32_Window *)window)->state.maximized_vert = 1;
+ ((Ecore_Win32_Window *)window)->state.maximized_horz = 1;
+ ((Ecore_Win32_Window *)window)->state.maximized_vert = 1;
break;
case ECORE_WIN32_WINDOW_STATE_SHADED:
- ((struct _Ecore_Win32_Window *)window)->state.shaded = 1;
+ ((Ecore_Win32_Window *)window)->state.shaded = 1;
break;
case ECORE_WIN32_WINDOW_STATE_HIDDEN:
- ((struct _Ecore_Win32_Window *)window)->state.hidden = 1;
+ ((Ecore_Win32_Window *)window)->state.hidden = 1;
break;
case ECORE_WIN32_WINDOW_STATE_FULLSCREEN:
- ((struct _Ecore_Win32_Window *)window)->state.fullscreen = 1;
+ ((Ecore_Win32_Window *)window)->state.fullscreen = 1;
break;
case ECORE_WIN32_WINDOW_STATE_ABOVE:
- ((struct _Ecore_Win32_Window *)window)->state.above = 1;
+ ((Ecore_Win32_Window *)window)->state.above = 1;
break;
case ECORE_WIN32_WINDOW_STATE_BELOW:
- ((struct _Ecore_Win32_Window *)window)->state.below = 1;
+ ((Ecore_Win32_Window *)window)->state.below = 1;
break;
case ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION:
- ((struct _Ecore_Win32_Window *)window)->state.demands_attention = 1;
+ ((Ecore_Win32_Window *)window)->state.demands_attention = 1;
break;
case ECORE_WIN32_WINDOW_STATE_UNKNOWN:
/* nothing to be done */
Ecore_Win32_Window_State state,
unsigned int set)
{
- struct _Ecore_Win32_Window *ew;
- HWND w;
+ Ecore_Win32_Window *ew;
+ HWND w;
if (!window) return;
- ew = (struct _Ecore_Win32_Window *)window;
+ ew = (Ecore_Win32_Window *)window;
w = ew->window;
INF("sending cursor state");
switch (type)
{
case ECORE_WIN32_WINDOW_TYPE_DESKTOP:
- ((struct _Ecore_Win32_Window *)window)->type.desktop = 1;
+ ((Ecore_Win32_Window *)window)->type.desktop = 1;
break;
case ECORE_WIN32_WINDOW_TYPE_DOCK:
- ((struct _Ecore_Win32_Window *)window)->type.dock = 1;
+ ((Ecore_Win32_Window *)window)->type.dock = 1;
break;
case ECORE_WIN32_WINDOW_TYPE_TOOLBAR:
- ((struct _Ecore_Win32_Window *)window)->type.toolbar = 1;
+ ((Ecore_Win32_Window *)window)->type.toolbar = 1;
break;
case ECORE_WIN32_WINDOW_TYPE_MENU:
- ((struct _Ecore_Win32_Window *)window)->type.menu = 1;
+ ((Ecore_Win32_Window *)window)->type.menu = 1;
break;
case ECORE_WIN32_WINDOW_TYPE_UTILITY:
- ((struct _Ecore_Win32_Window *)window)->type.utility = 1;
+ ((Ecore_Win32_Window *)window)->type.utility = 1;
break;
case ECORE_WIN32_WINDOW_TYPE_SPLASH:
- ((struct _Ecore_Win32_Window *)window)->type.splash = 1;
+ ((Ecore_Win32_Window *)window)->type.splash = 1;
break;
case ECORE_WIN32_WINDOW_TYPE_DIALOG:
- ((struct _Ecore_Win32_Window *)window)->type.dialog = 1;
+ ((Ecore_Win32_Window *)window)->type.dialog = 1;
break;
case ECORE_WIN32_WINDOW_TYPE_NORMAL:
- ((struct _Ecore_Win32_Window *)window)->type.normal = 1;
+ ((Ecore_Win32_Window *)window)->type.normal = 1;
break;
case ECORE_WIN32_WINDOW_TYPE_UNKNOWN:
- ((struct _Ecore_Win32_Window *)window)->type.normal = 1;
+ ((Ecore_Win32_Window *)window)->type.normal = 1;
break;
}
}
int width,
int height)
{
- struct _Ecore_WinCE_Window *w;
- HWND window;
- RECT rect;
+ Ecore_WinCE_Window *w;
+ HWND window;
+ RECT rect;
INF("creating window");
- w = (struct _Ecore_WinCE_Window *)calloc(1, sizeof(struct _Ecore_WinCE_Window));
+ w = (Ecore_WinCE_Window *)calloc(1, sizeof(Ecore_WinCE_Window));
if (!w)
{
ERR("malloc() failed");
WS_CAPTION | WS_SYSMENU | WS_VISIBLE,
x, y,
rect.right - rect.left, rect.bottom - rect.top,
- parent ? ((struct _Ecore_WinCE_Window *)parent)->window : NULL,
+ parent ? ((Ecore_WinCE_Window *)parent)->window : NULL,
NULL, _ecore_wince_instance, NULL);
if (!window)
{
INF("destroying window");
- DestroyWindow(((struct _Ecore_WinCE_Window *)window)->window);
+ DestroyWindow(((Ecore_WinCE_Window *)window)->window);
free(window);
}
if (!window)
return NULL;
- return ((struct _Ecore_WinCE_Window *)window)->window;
+ return ((Ecore_WinCE_Window *)window)->window;
}
/**
RECT rect;
HWND w;
- if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
+ if (!window || ((Ecore_WinCE_Window *)window)->fullscreen)
return;
INF("moving window (%dx%d)", x, y);
- w = ((struct _Ecore_WinCE_Window *)window)->window;
+ w = ((Ecore_WinCE_Window *)window)->window;
if (!GetWindowRect(w, &rect))
{
ERR("GetWindowRect() failed");
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)
+ RECT rect;
+ Ecore_WinCE_Window *w;
+ DWORD style;
+ DWORD exstyle;
+ int x;
+ int y;
+
+ if (!window || ((Ecore_WinCE_Window *)window)->fullscreen)
return;
INF("resizing window (%dx%d)", width, height);
- w = (struct _Ecore_WinCE_Window *)window;
+ w = (Ecore_WinCE_Window *)window;
if (!GetWindowRect(w->window, &rect))
{
ERR("GetWindowRect() failed");
int width,
int height)
{
- RECT rect;
- struct _Ecore_WinCE_Window *w;
- DWORD style;
- DWORD exstyle;
+ RECT rect;
+ Ecore_WinCE_Window *w;
+ DWORD style;
+ DWORD exstyle;
- if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
+ if (!window || ((Ecore_WinCE_Window *)window)->fullscreen)
return;
INF("moving and resizing window (%dx%d %dx%d)", x, y, width, height);
- w = ((struct _Ecore_WinCE_Window *)window);
+ w = ((Ecore_WinCE_Window *)window);
rect.left = 0;
rect.top = 0;
rect.right = width;
INF("showing window");
- if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_SHOWNORMAL))
+ if (!ShowWindow(((Ecore_WinCE_Window *)window)->window, SW_SHOWNORMAL))
{
ERR("ShowWindow() failed");
return;
}
- if (!UpdateWindow(((struct _Ecore_WinCE_Window *)window)->window))
+ if (!UpdateWindow(((Ecore_WinCE_Window *)window)->window))
{
ERR("UpdateWindow() failed");
}
- if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 1, 0))
+ if (!SendMessage(((Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 1, 0))
{
ERR("SendMessage() failed");
}
INF("hiding window");
- if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_HIDE))
+ if (!ShowWindow(((Ecore_WinCE_Window *)window)->window, SW_HIDE))
{
ERR("ShowWindow() failed");
return;
}
- if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 0, 0))
+ if (!SendMessage(((Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 0, 0))
{
ERR("SendMessage() failed");
}
wtitle = evil_char_to_wchar(title);
if (!wtitle) return;
- if (!SetWindowText(((struct _Ecore_WinCE_Window *)window)->window, wtitle))
+ if (!SetWindowText(((Ecore_WinCE_Window *)window)->window, wtitle))
{
ERR("SetWindowText() failed");
}
ecore_wince_window_backend_set(Ecore_WinCE_Window *window,
int backend)
{
- struct _Ecore_WinCE_Window *w;
+ Ecore_WinCE_Window *w;
if (!window)
return;
INF("setting backend");
- w = (struct _Ecore_WinCE_Window *)window;
+ w = (Ecore_WinCE_Window *)window;
w->backend = backend;
}
EAPI void
ecore_wince_window_suspend_cb_set(Ecore_WinCE_Window *window, int (*suspend_cb)(int))
{
- struct _Ecore_WinCE_Window *w;
+ Ecore_WinCE_Window *w;
if (!window)
return;
INF("setting suspend callback");
- w = (struct _Ecore_WinCE_Window *)window;
+ w = (Ecore_WinCE_Window *)window;
w->suspend_cb = suspend_cb;
}
EAPI void
ecore_wince_window_resume_cb_set(Ecore_WinCE_Window *window, int (*resume_cb)(int))
{
- struct _Ecore_WinCE_Window *w;
+ Ecore_WinCE_Window *w;
if (!window)
return;
INF("setting resume callback");
- w = (struct _Ecore_WinCE_Window *)window;
+ w = (Ecore_WinCE_Window *)window;
w->resume_cb = resume_cb;
}
return;
}
- if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
+ if (!GetClientRect(((Ecore_WinCE_Window *)window)->window,
&rect))
{
ERR("GetClientRect() failed");
w = rect.right - rect.left;
h = rect.bottom - rect.top;
- if (!GetWindowRect(((struct _Ecore_WinCE_Window *)window)->window,
+ if (!GetWindowRect(((Ecore_WinCE_Window *)window)->window,
&rect))
{
ERR("GetWindowRect() failed");
return;
}
- if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
+ if (!GetClientRect(((Ecore_WinCE_Window *)window)->window,
&rect))
{
ERR("GetClientRect() failed");
ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
Eina_Bool on)
{
- struct _Ecore_WinCE_Window *ew;
- HWND w;
- HWND task_bar;
+ Ecore_WinCE_Window *ew;
+ HWND w;
+ HWND task_bar;
if (!window) return;
- ew = (struct _Ecore_WinCE_Window *)window;
+ ew = (Ecore_WinCE_Window *)window;
if (((ew->fullscreen) && (on)) ||
((!ew->fullscreen) && (!on)))
return;