2007-08-26 04:17:21 -07:00
|
|
|
/*
|
|
|
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
|
|
|
*/
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
2007-11-16 11:31:32 -08:00
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h> /* for printf */
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2008-11-27 11:30:39 -08:00
|
|
|
#define _WIN32_WINNT 0x0500 // For WS_EX_LAYERED
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
|
|
|
#undef WIN32_LEAN_AND_MEAN
|
|
|
|
|
2009-02-21 14:50:45 -08:00
|
|
|
#include <Eina.h>
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
#include "Ecore_Win32.h"
|
2007-08-26 04:17:21 -07:00
|
|
|
#include "ecore_win32_private.h"
|
|
|
|
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
/***** Private declarations *****/
|
|
|
|
|
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
typedef enum _Ecore_Win32_Window_Z_Order Ecore_Win32_Window_Z_Order;
|
|
|
|
enum _Ecore_Win32_Window_Z_Order
|
|
|
|
{
|
|
|
|
ECORE_WIN32_WINDOW_Z_ORDER_BOTTOM,
|
|
|
|
ECORE_WIN32_WINDOW_Z_ORDER_NOTOPMOST,
|
|
|
|
ECORE_WIN32_WINDOW_Z_ORDER_TOP,
|
|
|
|
ECORE_WIN32_WINDOW_Z_ORDER_TOPMOST
|
|
|
|
};
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
static Ecore_Win32_Window *ecore_win32_window_internal_new(Ecore_Win32_Window *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
DWORD style);
|
2007-08-26 04:17:21 -07:00
|
|
|
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
/***** API *****/
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
Ecore_Win32_Window *
|
2007-11-16 11:31:32 -08:00
|
|
|
ecore_win32_window_new(Ecore_Win32_Window *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height)
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("creating window with border\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-11-16 11:31:32 -08:00
|
|
|
return ecore_win32_window_internal_new(parent,
|
|
|
|
x, y,
|
|
|
|
width, height,
|
|
|
|
WS_OVERLAPPEDWINDOW | WS_SIZEBOX);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* simulate X11 override windows */
|
2008-06-25 22:11:16 -07:00
|
|
|
Ecore_Win32_Window *
|
2007-11-16 11:31:32 -08:00
|
|
|
ecore_win32_window_override_new(Ecore_Win32_Window *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height)
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("creating window without border\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-11-16 11:31:32 -08:00
|
|
|
return ecore_win32_window_internal_new(parent,
|
|
|
|
x, y,
|
|
|
|
width, height,
|
|
|
|
WS_POPUP);
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2009-04-10 01:46:41 -07:00
|
|
|
ecore_win32_window_free(Ecore_Win32_Window *window)
|
2007-08-26 04:17:21 -07:00
|
|
|
{
|
2008-11-27 11:30:39 -08:00
|
|
|
struct _Ecore_Win32_Window *wnd = window;
|
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
if (!window) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("destroying window\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2008-11-27 11:30:39 -08:00
|
|
|
if (wnd->shape.mask != NULL)
|
|
|
|
free(wnd->shape.mask);
|
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
DestroyWindow(((struct _Ecore_Win32_Window *)window)->window);
|
|
|
|
free(window);
|
|
|
|
}
|
|
|
|
|
2008-06-29 07:12:16 -07:00
|
|
|
void *
|
|
|
|
ecore_win32_window_hwnd_get(Ecore_Win32_Window *window)
|
|
|
|
{
|
|
|
|
if (!window) return NULL;
|
|
|
|
|
|
|
|
return ((struct _Ecore_Win32_Window *)window)->window;
|
|
|
|
}
|
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
/*
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_configure(Ecore_Win32_Window *window,
|
|
|
|
Ecore_Win32_Window_Z_Order order,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height)
|
|
|
|
{
|
|
|
|
HWND w;
|
|
|
|
|
|
|
|
switch (order)
|
|
|
|
{
|
|
|
|
case ECORE_WIN32_WINDOW_Z_ORDER_BOTTOM:
|
|
|
|
w = HWND_BOTTOM;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_Z_ORDER_NOTOPMOST:
|
|
|
|
w = HWND_NOTOPMOST;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_Z_ORDER_TOP:
|
|
|
|
w = HWND_TOP;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_Z_ORDER_TOPMOST:
|
|
|
|
w = HWND_TOPMOST;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
SetWindowPos((struct _Ecore_Win32_Window *)window->window, w, x, y, width, height, ???);
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_move(Ecore_Win32_Window *window,
|
|
|
|
int x,
|
|
|
|
int y)
|
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
HWND w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("moving window (%dx%d)\n", x, y);
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
w = ((struct _Ecore_Win32_Window *)window)->window;
|
|
|
|
if (!GetWindowRect(w, &rect))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetWindowRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!MoveWindow(w, x, y,
|
|
|
|
rect.right - rect.left,
|
|
|
|
rect.bottom - rect.top,
|
|
|
|
TRUE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("MoveWindow() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_resize(Ecore_Win32_Window *window,
|
|
|
|
int width,
|
|
|
|
int height)
|
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
DWORD style;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("resizing window (%dx%d)\n", width, height);
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2009-02-21 14:50:45 -08:00
|
|
|
w = (struct _Ecore_Win32_Window *)window;
|
|
|
|
if (!GetWindowRect(w->window, &rect))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetWindowRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2007-11-16 11:31:32 -08:00
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
x = rect.left;
|
|
|
|
y = rect.top;
|
|
|
|
rect.left = 0;
|
|
|
|
rect.top = 0;
|
2007-11-16 11:31:32 -08:00
|
|
|
/* if (width < w->min_width) width = w->min_width; */
|
|
|
|
/* if (width > w->max_width) width = w->max_width; */
|
|
|
|
/* printf ("ecore_win32_window_resize 1 : %d %d %d\n", w->min_height, w->max_height, height); */
|
|
|
|
/* if (height < w->min_height) height = w->min_height; */
|
|
|
|
/* printf ("ecore_win32_window_resize 2 : %d %d\n", w->max_height, height); */
|
|
|
|
/* if (height > w->max_height) height = w->max_height; */
|
|
|
|
/* printf ("ecore_win32_window_resize 3 : %d %d\n", w->max_height, height); */
|
2007-08-26 04:17:21 -07:00
|
|
|
rect.right = width;
|
|
|
|
rect.bottom = height;
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!(style = GetWindowLong(w->window, GWL_STYLE)))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetWindowLong() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
if (!AdjustWindowRect(&rect, style, FALSE))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("AdjustWindowRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2007-11-16 11:31:32 -08:00
|
|
|
if (!MoveWindow(w->window, x, y,
|
|
|
|
rect.right - rect.left,
|
|
|
|
rect.bottom - rect.top,
|
2009-06-05 10:14:56 -07:00
|
|
|
TRUE))
|
2007-11-16 11:31:32 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("MoveWindow() failed\n");
|
2007-11-16 11:31:32 -08:00
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_move_resize(Ecore_Win32_Window *window,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height)
|
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
DWORD style;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("moving and resizing window (%dx%d %dx%d)\n", x, y, width, height);
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
w = ((struct _Ecore_Win32_Window *)window);
|
|
|
|
rect.left = 0;
|
|
|
|
rect.top = 0;
|
2008-06-25 22:11:16 -07:00
|
|
|
if ((unsigned int)width < w->min_width) width = w->min_width;
|
|
|
|
if ((unsigned int)width > w->max_width) width = w->max_width;
|
|
|
|
if ((unsigned int)height < w->min_height) height = w->min_height;
|
|
|
|
if ((unsigned int)height > w->max_height) height = w->max_height;
|
2007-08-26 04:17:21 -07:00
|
|
|
rect.right = width;
|
|
|
|
rect.bottom = height;
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!(style = GetWindowLong(w->window, GWL_STYLE)))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetWindowLong() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2009-01-16 11:03:57 -08:00
|
|
|
if (!AdjustWindowRect(&rect, style, FALSE))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("AdjustWindowRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!MoveWindow(w->window, x, y,
|
|
|
|
rect.right - rect.left,
|
|
|
|
rect.bottom - rect.top,
|
|
|
|
TRUE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("MoveWindow() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-09-23 04:08:52 -07:00
|
|
|
ecore_win32_window_geometry_get(Ecore_Win32_Window *window,
|
|
|
|
int *x,
|
|
|
|
int *y,
|
|
|
|
int *width,
|
|
|
|
int *height)
|
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("getting window geometry\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-09-23 04:08:52 -07:00
|
|
|
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_Win32_Window *)window)->window,
|
|
|
|
&rect))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetClientRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-09-23 04:08:52 -07:00
|
|
|
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_Win32_Window *)window)->window,
|
|
|
|
&rect))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetWindowRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-09-23 04:08:52 -07:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_size_get(Ecore_Win32_Window *window,
|
|
|
|
int *width,
|
|
|
|
int *height)
|
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("getting window size\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-09-23 04:08:52 -07:00
|
|
|
if (!window)
|
|
|
|
{
|
|
|
|
if (width) *width = GetSystemMetrics(SM_CXSCREEN);
|
|
|
|
if (height) *height = GetSystemMetrics(SM_CYSCREEN);
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
|
|
|
|
if (!GetClientRect(((struct _Ecore_Win32_Window *)window)->window,
|
|
|
|
&rect))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetClientRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
if (width) *width = 0;
|
|
|
|
if (height) *height = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (width) *width = rect.right - rect.left;
|
|
|
|
if (height) *height = rect.bottom - rect.top;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_size_min_set(Ecore_Win32_Window *window,
|
2007-11-16 11:31:32 -08:00
|
|
|
unsigned int min_width,
|
|
|
|
unsigned int min_height)
|
2007-08-26 04:17:21 -07:00
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
2007-11-16 11:31:32 -08:00
|
|
|
printf ("ecore_win32_window_size_min_set : %p %d %d\n", window, min_width, min_height);
|
2007-08-26 04:17:21 -07:00
|
|
|
w = (struct _Ecore_Win32_Window *)window;
|
|
|
|
w->min_width = min_width;
|
|
|
|
w->min_height = min_height;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-11-16 11:31:32 -08:00
|
|
|
ecore_win32_window_size_min_get(Ecore_Win32_Window *window,
|
|
|
|
unsigned int *min_width,
|
|
|
|
unsigned int *min_height)
|
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
w = (struct _Ecore_Win32_Window *)window;
|
2008-06-10 15:12:12 -07:00
|
|
|
printf ("ecore_win32_window_size_min_get : %p %d %d\n", window, w->min_width, w->min_height);
|
2007-11-16 11:31:32 -08:00
|
|
|
if (min_width) *min_width = w->min_width;
|
|
|
|
if (min_height) *min_height = w->min_height;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_size_max_set(Ecore_Win32_Window *window,
|
2007-11-16 11:31:32 -08:00
|
|
|
unsigned int max_width,
|
|
|
|
unsigned int max_height)
|
2007-08-26 04:17:21 -07:00
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
2007-11-16 11:31:32 -08:00
|
|
|
printf ("ecore_win32_window_size_max_set : %p %d %d\n", window, max_width, max_height);
|
2007-08-26 04:17:21 -07:00
|
|
|
w = (struct _Ecore_Win32_Window *)window;
|
|
|
|
w->max_width = max_width;
|
|
|
|
w->max_height = max_height;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-11-16 11:31:32 -08:00
|
|
|
ecore_win32_window_size_max_get(Ecore_Win32_Window *window,
|
|
|
|
unsigned int *max_width,
|
|
|
|
unsigned int *max_height)
|
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
w = (struct _Ecore_Win32_Window *)window;
|
2008-06-10 15:12:12 -07:00
|
|
|
printf ("ecore_win32_window_size_max_get : %p %d %d\n", window, w->max_width, w->max_height);
|
2007-11-16 11:31:32 -08:00
|
|
|
if (max_width) *max_width = w->max_width;
|
|
|
|
if (max_height) *max_height = w->max_height;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_size_base_set(Ecore_Win32_Window *window,
|
2007-11-16 11:31:32 -08:00
|
|
|
unsigned int base_width,
|
|
|
|
unsigned int base_height)
|
2007-08-26 04:17:21 -07:00
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
|
2007-11-16 11:31:32 -08:00
|
|
|
printf ("ecore_win32_window_size_base_set : %p %d %d\n", window, base_width, base_height);
|
2007-08-26 04:17:21 -07:00
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
w = (struct _Ecore_Win32_Window *)window;
|
|
|
|
w->base_width = base_width;
|
|
|
|
w->base_height = base_height;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-11-16 11:31:32 -08:00
|
|
|
ecore_win32_window_size_base_get(Ecore_Win32_Window *window,
|
|
|
|
unsigned int *base_width,
|
|
|
|
unsigned int *base_height)
|
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
w = (struct _Ecore_Win32_Window *)window;
|
2008-06-10 15:12:12 -07:00
|
|
|
printf ("ecore_win32_window_size_base_get : %p %d %d\n", window, w->base_width, w->base_height);
|
2007-11-16 11:31:32 -08:00
|
|
|
if (base_width) *base_width = w->base_width;
|
|
|
|
if (base_height) *base_height = w->base_height;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_size_step_set(Ecore_Win32_Window *window,
|
2007-11-16 11:31:32 -08:00
|
|
|
unsigned int step_width,
|
|
|
|
unsigned int step_height)
|
2007-08-26 04:17:21 -07:00
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
|
2007-11-16 11:31:32 -08:00
|
|
|
printf ("ecore_win32_window_size_step_set : %p %d %d\n", window, step_width, step_height);
|
2007-08-26 04:17:21 -07:00
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
w = (struct _Ecore_Win32_Window *)window;
|
|
|
|
w->step_width = step_width;
|
|
|
|
w->step_height = step_height;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-11-16 11:31:32 -08:00
|
|
|
ecore_win32_window_size_step_get(Ecore_Win32_Window *window,
|
|
|
|
unsigned int *step_width,
|
|
|
|
unsigned int *step_height)
|
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
w = (struct _Ecore_Win32_Window *)window;
|
2008-06-10 15:12:12 -07:00
|
|
|
printf ("ecore_win32_window_size_step_get : %p %d %d\n", window, w->step_width, w->step_height);
|
2007-11-16 11:31:32 -08:00
|
|
|
if (step_width) *step_width = w->step_width;
|
|
|
|
if (step_height) *step_height = w->step_height;
|
|
|
|
}
|
|
|
|
|
2008-11-27 11:30:39 -08:00
|
|
|
void
|
|
|
|
ecore_win32_window_shape_set(Ecore_Win32_Window *window,
|
|
|
|
unsigned short width,
|
|
|
|
unsigned short height,
|
|
|
|
unsigned char *mask)
|
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *wnd;
|
|
|
|
HRGN rgn;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
OSVERSIONINFO version_info;
|
|
|
|
|
|
|
|
if (window == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
wnd = (struct _Ecore_Win32_Window *)window;
|
|
|
|
|
|
|
|
if (mask == NULL)
|
|
|
|
{
|
2009-02-21 14:50:45 -08:00
|
|
|
wnd->shape.enabled = 0;
|
|
|
|
if (wnd->shape.layered != 0)
|
|
|
|
{
|
|
|
|
wnd->shape.layered = 0;
|
2008-11-27 11:30:39 -08:00
|
|
|
#if defined(WS_EX_LAYERED)
|
2009-04-24 12:37:09 -07:00
|
|
|
SetLastError(0);
|
|
|
|
if (!SetWindowLongPtr(wnd->window, GWL_EXSTYLE,
|
|
|
|
GetWindowLong(wnd->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)) &&
|
|
|
|
(GetLastError() != 0))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowLongPtr() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!RedrawWindow(wnd->window, NULL, NULL,
|
|
|
|
RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("RedrawWindow() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2008-11-27 11:30:39 -08:00
|
|
|
#endif
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
if (!SetWindowRgn(wnd->window, NULL, TRUE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowRgn() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
|
|
|
return;
|
2008-11-27 11:30:39 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (width == 0 || height == 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
wnd->shape.enabled = 1;
|
|
|
|
|
|
|
|
if (width != wnd->shape.width || height != wnd->shape.height)
|
|
|
|
{
|
|
|
|
wnd->shape.width = width;
|
|
|
|
wnd->shape.height = height;
|
|
|
|
if (wnd->shape.mask != NULL)
|
|
|
|
{
|
|
|
|
free(wnd->shape.mask);
|
|
|
|
wnd->shape.mask = NULL;
|
|
|
|
}
|
|
|
|
wnd->shape.mask = malloc(width * height);
|
|
|
|
}
|
|
|
|
memcpy(wnd->shape.mask, mask, width * height);
|
|
|
|
|
|
|
|
wnd->shape.layered = 0;
|
|
|
|
|
|
|
|
#if defined(WS_EX_LAYERED)
|
|
|
|
version_info.dwOSVersionInfoSize = sizeof(version_info);
|
|
|
|
if (GetVersionEx(&version_info) == TRUE && version_info.dwMajorVersion == 5)
|
|
|
|
{
|
2009-04-24 12:37:09 -07:00
|
|
|
SetLastError(0);
|
|
|
|
if (!SetWindowLongPtr(wnd->window, GWL_EXSTYLE,
|
|
|
|
GetWindowLong(wnd->window, GWL_EXSTYLE) | WS_EX_LAYERED) &&
|
|
|
|
(GetLastError() != 0))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowLongPtr() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2008-11-27 11:30:39 -08:00
|
|
|
wnd->shape.layered = 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!(rgn = CreateRectRgn(0, 0, 0, 0)))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("CreateRectRgn() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2008-11-27 11:30:39 -08:00
|
|
|
for (y = 0; y < height; y++)
|
|
|
|
{
|
2009-02-21 14:50:45 -08:00
|
|
|
HRGN rgnLine;
|
|
|
|
|
|
|
|
if (!(rgnLine = CreateRectRgn(0, 0, 0, 0)))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("CreateRectRgn() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
for (x = 0; x < width; x++)
|
|
|
|
{
|
|
|
|
if (mask[y * width + x] > 0)
|
|
|
|
{
|
|
|
|
HRGN rgnDot;
|
|
|
|
|
|
|
|
if (!(rgnDot = CreateRectRgn(x, y, x + 1, y + 1)))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("CreateRectRgn() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (CombineRgn(rgnLine, rgnLine, rgnDot, RGN_OR) == ERROR)
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("CombineRgn() has not created a new region\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
|
|
|
if (!DeleteObject(rgnDot))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("DeleteObject() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (CombineRgn(rgn, rgn, rgnLine, RGN_OR) == ERROR)
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("CombineRgn() has not created a new region\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
|
|
|
if (!DeleteObject(rgnLine))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("DeleteObject() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!SetWindowRgn(wnd->window, rgn, TRUE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowRgn() failed\n");
|
2008-11-27 11:30:39 -08:00
|
|
|
}
|
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_show(Ecore_Win32_Window *window)
|
|
|
|
{
|
|
|
|
if (!window) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("showing window\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2009-04-24 12:37:09 -07:00
|
|
|
ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL);
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!UpdateWindow(((struct _Ecore_Win32_Window *)window)->window))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("UpdateWindow() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/* FIXME: seems to block the taskbar */
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_hide(Ecore_Win32_Window *window)
|
|
|
|
{
|
|
|
|
if (!window) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("hiding window\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2009-04-24 12:37:09 -07:00
|
|
|
ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE);
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_raise(Ecore_Win32_Window *window)
|
|
|
|
{
|
|
|
|
if (!window) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("raising window\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
|
|
|
if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
|
|
|
|
HWND_TOP, 0, 0, 0, 0,
|
|
|
|
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowPos() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_lower(Ecore_Win32_Window *window)
|
|
|
|
{
|
|
|
|
if (!window) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("lowering window\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
|
|
|
if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
|
|
|
|
HWND_BOTTOM, 0, 0, 0, 0,
|
|
|
|
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowPos() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_title_set(Ecore_Win32_Window *window,
|
|
|
|
const char *title)
|
|
|
|
{
|
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
if (!title || !title[0]) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("setting window title\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
|
|
|
if (!SetWindowText(((struct _Ecore_Win32_Window *)window)->window, title))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowText() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_focus_set(Ecore_Win32_Window *window)
|
|
|
|
{
|
|
|
|
if (!window) return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("focusing window\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
|
|
|
if (!SetFocus(((struct _Ecore_Win32_Window *)window)->window))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetFocus() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_iconified_set(Ecore_Win32_Window *window,
|
|
|
|
int on)
|
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *ew;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
ew = (struct _Ecore_Win32_Window *)window;
|
|
|
|
if (((ew->iconified) && (on)) ||
|
|
|
|
((!ew->iconified) && (!on)))
|
|
|
|
return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("iconifying window: %s\n", on ? "yes" : "no");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2009-04-24 12:37:09 -07:00
|
|
|
ShowWindow(ew->window, on ? SW_MINIMIZE : SW_RESTORE);
|
2007-08-26 04:17:21 -07:00
|
|
|
ew->iconified = on;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
|
|
|
|
int on)
|
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
DWORD style;
|
|
|
|
struct _Ecore_Win32_Window *ew;
|
|
|
|
HWND w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
ew = (struct _Ecore_Win32_Window *)window;
|
|
|
|
if (((ew->borderless) && (on)) ||
|
|
|
|
((!ew->borderless) && (!on)))
|
|
|
|
return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("setting window without border: %s\n", on ? "yes" : "no");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-08-26 04:17:21 -07:00
|
|
|
w = ew->window;
|
|
|
|
|
|
|
|
style = GetWindowLong(w, GWL_STYLE);
|
|
|
|
if (on)
|
|
|
|
{
|
2009-04-24 12:37:09 -07:00
|
|
|
if (!GetClientRect(w, &rect))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetClientRect() failed\n");
|
2009-04-24 12:37:09 -07:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
SetLastError(0);
|
2009-04-29 10:50:44 -07:00
|
|
|
if (!SetWindowLongPtr(w, GWL_STYLE, style & ~(WS_CAPTION | WS_THICKFRAME)) && (GetLastError() != 0))
|
2009-04-24 12:37:09 -07:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowLongPtr() failed\n");
|
2009-04-24 12:37:09 -07:00
|
|
|
return;
|
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!GetWindowRect(w, &rect))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetWindowRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2009-04-29 10:50:44 -07:00
|
|
|
style |= WS_CAPTION | WS_THICKFRAME;
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!AdjustWindowRect (&rect, style, FALSE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("AdjustWindowRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2009-04-24 12:37:09 -07:00
|
|
|
SetLastError(0);
|
|
|
|
if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowLongPtr() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!SetWindowPos(w, HWND_TOPMOST,
|
|
|
|
rect.left, rect.top,
|
|
|
|
rect.right - rect.left, rect.bottom - rect.top,
|
|
|
|
SWP_NOMOVE | SWP_FRAMECHANGED))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowPos() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
ew->borderless = on;
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-08-26 04:17:21 -07:00
|
|
|
ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
|
|
|
|
int on)
|
|
|
|
{
|
|
|
|
struct _Ecore_Win32_Window *ew;
|
|
|
|
HWND w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
ew = (struct _Ecore_Win32_Window *)window;
|
|
|
|
if (((ew->fullscreen) && (on)) ||
|
|
|
|
((!ew->fullscreen) && (!on)))
|
|
|
|
return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("setting fullscreen: %s\n", on ? "yes" : "no");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2008-12-20 06:37:04 -08:00
|
|
|
ew->fullscreen = !!on;
|
2007-08-26 04:17:21 -07:00
|
|
|
w = ew->window;
|
|
|
|
|
|
|
|
if (on)
|
|
|
|
{
|
2008-12-20 06:37:04 -08:00
|
|
|
DWORD style;
|
|
|
|
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!GetWindowRect(w, &ew->rect))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetWindowRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!(ew->style = GetWindowLong(w, GWL_STYLE)))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetWindowLong() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2008-12-20 06:37:04 -08:00
|
|
|
style = ew->style & ~WS_OVERLAPPEDWINDOW & ~WS_SIZEBOX;
|
|
|
|
style |= WS_VISIBLE | WS_POPUP;
|
2009-04-24 12:37:09 -07:00
|
|
|
SetLastError(0);
|
|
|
|
if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowLongPtr() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2009-04-24 12:37:09 -07:00
|
|
|
SetLastError(0);
|
|
|
|
if (!SetWindowLongPtr(w, GWL_EXSTYLE, WS_EX_TOPMOST) && (GetLastError() != 0))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowLongPtr() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!SetWindowPos(w, HWND_TOPMOST, 0, 0,
|
|
|
|
GetSystemMetrics (SM_CXSCREEN), GetSystemMetrics (SM_CYSCREEN),
|
|
|
|
SWP_NOCOPYBITS | SWP_SHOWWINDOW))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowPos() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-04-24 12:37:09 -07:00
|
|
|
SetLastError(0);
|
|
|
|
if (!SetWindowLongPtr(w, GWL_STYLE, ew->style) && (GetLastError() != 0))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowLongPtr() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2009-04-24 12:37:09 -07:00
|
|
|
SetLastError(0);
|
|
|
|
if (!SetWindowLongPtr(w, GWL_EXSTYLE, 0) && (GetLastError() != 0))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowLongPtr() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (!SetWindowPos(w, HWND_NOTOPMOST,
|
|
|
|
ew->rect.left,
|
|
|
|
ew->rect.top,
|
|
|
|
ew->rect.right - ew->rect.left,
|
|
|
|
ew->rect.bottom - ew->rect.top,
|
|
|
|
SWP_NOCOPYBITS | SWP_SHOWWINDOW))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowPos() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return;
|
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
2007-09-23 04:08:52 -07:00
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-09-23 04:08:52 -07:00
|
|
|
ecore_win32_window_cursor_set(Ecore_Win32_Window *window,
|
|
|
|
Ecore_Win32_Cursor *cursor)
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("setting cursor\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
|
|
|
if (!SetClassLong(((struct _Ecore_Win32_Window *)window)->window,
|
|
|
|
GCL_HCURSOR, (LONG)cursor))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetClassLong() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
2007-08-26 04:17:21 -07:00
|
|
|
}
|
2007-11-16 11:31:32 -08:00
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-11-16 11:31:32 -08:00
|
|
|
ecore_win32_window_state_set(Ecore_Win32_Window *window,
|
|
|
|
Ecore_Win32_Window_State *state,
|
|
|
|
unsigned int num)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!window || !state || !num)
|
2007-11-16 11:31:32 -08:00
|
|
|
return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("setting cursor state\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-11-16 11:31:32 -08:00
|
|
|
for (i = 0; i < num; i++)
|
|
|
|
{
|
|
|
|
switch (state[i])
|
|
|
|
{
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_ICONIFIED:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->state.iconified = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_MODAL:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->state.modal = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_STICKY:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->state.sticky = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT:
|
|
|
|
((struct _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;
|
|
|
|
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;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_SHADED:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->state.shaded = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_HIDDEN:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->state.hidden = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_FULLSCREEN:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->state.fullscreen = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_ABOVE:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->state.above = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_BELOW:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->state.below = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->state.demands_attention = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_UNKNOWN:
|
|
|
|
/* nothing to be done */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-11-16 11:31:32 -08:00
|
|
|
ecore_win32_window_state_request_send(Ecore_Win32_Window *window,
|
|
|
|
Ecore_Win32_Window_State state,
|
|
|
|
unsigned int set)
|
|
|
|
{
|
2009-08-26 08:34:49 -07:00
|
|
|
struct _Ecore_Win32_Window *ew;
|
|
|
|
HWND w;
|
|
|
|
|
|
|
|
if (!window) return;
|
|
|
|
|
|
|
|
ew = (struct _Ecore_Win32_Window *)window;
|
|
|
|
w = ew->window;
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("sending cursor state\n");
|
2007-11-16 11:31:32 -08:00
|
|
|
|
|
|
|
switch (state)
|
|
|
|
{
|
2009-02-21 14:50:45 -08:00
|
|
|
case ECORE_WIN32_WINDOW_STATE_ICONIFIED:
|
2009-08-26 08:34:49 -07:00
|
|
|
if (ew->state.iconified)
|
2009-02-21 14:50:45 -08:00
|
|
|
ecore_win32_window_iconified_set(window, set);
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_MODAL:
|
2009-08-26 08:34:49 -07:00
|
|
|
ew->state.modal = 1;
|
2009-02-21 14:50:45 -08:00
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_STICKY:
|
2009-08-26 08:34:49 -07:00
|
|
|
ew->state.sticky = 1;
|
2009-02-21 14:50:45 -08:00
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT:
|
2009-08-26 08:34:49 -07:00
|
|
|
if (ew->state.maximized_vert)
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
int y;
|
|
|
|
int height;
|
|
|
|
|
|
|
|
if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
|
|
|
|
&rect, 0))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SystemParametersInfo() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
y = rect.top;
|
|
|
|
height = rect.bottom - rect.top;
|
|
|
|
|
2009-08-26 08:34:49 -07:00
|
|
|
if (!GetClientRect(w, &rect))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetClientRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-08-26 08:34:49 -07:00
|
|
|
if (!MoveWindow(w, rect.left, y,
|
2009-02-21 14:50:45 -08:00
|
|
|
rect.right - rect.left,
|
|
|
|
height,
|
|
|
|
TRUE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("MoveWindow() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ:
|
2009-08-26 08:34:49 -07:00
|
|
|
if (ew->state.maximized_horz)
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
|
2009-08-26 08:34:49 -07:00
|
|
|
if (!GetClientRect(w, &rect))
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("GetClientRect() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-08-26 08:34:49 -07:00
|
|
|
if (!MoveWindow(w, 0, rect.top,
|
2009-02-21 14:50:45 -08:00
|
|
|
GetSystemMetrics(SM_CXSCREEN),
|
|
|
|
rect.bottom - rect.top,
|
|
|
|
TRUE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("MoveWindow() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_MAXIMIZED:
|
2009-08-26 08:34:49 -07:00
|
|
|
if (ew->state.maximized_vert && ew->state.maximized_horz)
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
|
|
|
|
if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
|
|
|
|
&rect, 0))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SystemParametersInfo() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2009-08-26 08:34:49 -07:00
|
|
|
if (!MoveWindow(w, 0, 0,
|
2009-02-21 14:50:45 -08:00
|
|
|
GetSystemMetrics(SM_CXSCREEN),
|
|
|
|
rect.bottom - rect.top,
|
|
|
|
TRUE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("MoveWindow() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_SHADED:
|
2009-08-26 08:34:49 -07:00
|
|
|
ew->state.shaded = 1;
|
2009-02-21 14:50:45 -08:00
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_HIDDEN:
|
2009-08-26 08:34:49 -07:00
|
|
|
ew->state.hidden = 1;
|
2009-02-21 14:50:45 -08:00
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_FULLSCREEN:
|
2009-08-26 08:34:49 -07:00
|
|
|
if (ew->state.fullscreen)
|
2009-02-21 14:50:45 -08:00
|
|
|
ecore_win32_window_fullscreen_set(window, set);
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_ABOVE:
|
2009-08-26 08:34:49 -07:00
|
|
|
if (ew->state.above)
|
|
|
|
if (!SetWindowPos(w, HWND_TOP,
|
2009-02-21 14:50:45 -08:00
|
|
|
0, 0,
|
|
|
|
0, 0,
|
|
|
|
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowPos() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_BELOW:
|
2009-08-26 08:34:49 -07:00
|
|
|
if (ew->state.below)
|
|
|
|
if (!SetWindowPos(w, HWND_BOTTOM,
|
2009-02-21 14:50:45 -08:00
|
|
|
0, 0,
|
|
|
|
0, 0,
|
|
|
|
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowPos() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION:
|
2009-08-26 08:34:49 -07:00
|
|
|
ew->state.demands_attention = 1;
|
2009-02-21 14:50:45 -08:00
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_STATE_UNKNOWN:
|
|
|
|
/* nothing to be done */
|
|
|
|
break;
|
2007-11-16 11:31:32 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-06-25 22:11:16 -07:00
|
|
|
void
|
2007-11-16 11:31:32 -08:00
|
|
|
ecore_win32_window_type_set(Ecore_Win32_Window *window,
|
|
|
|
Ecore_Win32_Window_Type type)
|
|
|
|
{
|
2009-02-21 14:50:45 -08:00
|
|
|
if (!window)
|
|
|
|
return;
|
|
|
|
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_INFO("setting window type\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
|
2007-11-16 11:31:32 -08:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case ECORE_WIN32_WINDOW_TYPE_DESKTOP:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->type.desktop = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_TYPE_DOCK:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->type.dock = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_TYPE_TOOLBAR:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->type.toolbar = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_TYPE_MENU:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->type.menu = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_TYPE_UTILITY:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->type.utility = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_TYPE_SPLASH:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->type.splash = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_TYPE_DIALOG:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->type.dialog = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_TYPE_NORMAL:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->type.normal = 1;
|
|
|
|
break;
|
|
|
|
case ECORE_WIN32_WINDOW_TYPE_UNKNOWN:
|
|
|
|
((struct _Ecore_Win32_Window *)window)->type.normal = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2008-06-25 22:11:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
/***** Private functions definitions *****/
|
|
|
|
|
|
|
|
static Ecore_Win32_Window *
|
|
|
|
ecore_win32_window_internal_new(Ecore_Win32_Window *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
DWORD style)
|
|
|
|
{
|
|
|
|
RECT rect;
|
|
|
|
struct _Ecore_Win32_Window *w;
|
|
|
|
int minimal_width;
|
|
|
|
int minimal_height;
|
|
|
|
|
|
|
|
w = (struct _Ecore_Win32_Window *)calloc(1, sizeof(struct _Ecore_Win32_Window));
|
|
|
|
if (!w)
|
2009-02-21 14:50:45 -08:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("malloc() failed\n");
|
2009-02-21 14:50:45 -08:00
|
|
|
return NULL;
|
|
|
|
}
|
2008-06-25 22:11:16 -07:00
|
|
|
|
|
|
|
rect.left = 0;
|
|
|
|
rect.top = 0;
|
|
|
|
rect.right = width;
|
|
|
|
rect.bottom = height;
|
|
|
|
if (!AdjustWindowRect(&rect, style, FALSE))
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("AdjustWindowRect() failed\n");
|
2008-06-25 22:11:16 -07:00
|
|
|
free(w);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
minimal_width = GetSystemMetrics(SM_CXMIN);
|
|
|
|
minimal_height = GetSystemMetrics(SM_CYMIN);
|
|
|
|
/* if (((rect.right - rect.left) < minimal_width) || */
|
|
|
|
/* ((rect.bottom - rect.top) < minimal_height)) */
|
|
|
|
/* { */
|
|
|
|
/* fprintf (stderr, "[Ecore] [Win32] ERROR !!\n"); */
|
|
|
|
/* fprintf (stderr, " Wrong size %ld\n", rect.right - rect.left); */
|
|
|
|
/* free(w); */
|
|
|
|
/* return NULL; */
|
|
|
|
/* } */
|
|
|
|
if ((rect.right - rect.left) < minimal_width)
|
|
|
|
{
|
|
|
|
rect.right = rect.left + minimal_width;
|
|
|
|
}
|
|
|
|
|
2008-12-20 06:37:04 -08:00
|
|
|
w->window = CreateWindowEx(0,
|
|
|
|
ECORE_WIN32_WINDOW_CLASS, "",
|
|
|
|
style,
|
|
|
|
x, y,
|
|
|
|
rect.right - rect.left,
|
|
|
|
rect.bottom - rect.top,
|
|
|
|
parent ? ((struct _Ecore_Win32_Window *)parent)->window : NULL,
|
|
|
|
NULL, _ecore_win32_instance, NULL);
|
2008-06-25 22:11:16 -07:00
|
|
|
if (!w->window)
|
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("CreateWindowEx() failed\n");
|
2008-06-25 22:11:16 -07:00
|
|
|
free(w);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
SetLastError(0);
|
2009-04-24 12:37:09 -07:00
|
|
|
if (!SetWindowLongPtr(w->window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
|
2008-06-25 22:11:16 -07:00
|
|
|
{
|
2009-09-05 01:39:34 -07:00
|
|
|
MESSAGE_ERR("SetWindowLongPtr() failed\n");
|
2008-06-25 22:11:16 -07:00
|
|
|
DestroyWindow(w->window);
|
|
|
|
free(w);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
w->min_width = 0;
|
|
|
|
w->min_height = 0;
|
|
|
|
w->max_width = 32767;
|
|
|
|
w->max_height = 32767;
|
|
|
|
w->base_width = -1;
|
|
|
|
w->base_height = -1;
|
|
|
|
w->step_width = -1;
|
|
|
|
w->step_height = -1;
|
|
|
|
|
|
|
|
w->state.iconified = 0;
|
|
|
|
w->state.modal = 0;
|
|
|
|
w->state.sticky = 0;
|
|
|
|
w->state.maximized_vert = 0;
|
|
|
|
w->state.maximized_horz = 0;
|
|
|
|
w->state.shaded = 0;
|
|
|
|
w->state.hidden = 0;
|
|
|
|
w->state.fullscreen = 0;
|
|
|
|
w->state.above = 0;
|
|
|
|
w->state.below = 0;
|
|
|
|
w->state.demands_attention = 0;
|
|
|
|
|
|
|
|
w->type.desktop = 0;
|
|
|
|
w->type.dock = 0;
|
|
|
|
w->type.toolbar = 0;
|
|
|
|
w->type.menu = 0;
|
|
|
|
w->type.utility = 0;
|
|
|
|
w->type.splash = 0;
|
|
|
|
w->type.dialog = 0;
|
|
|
|
w->type.normal = 0;
|
|
|
|
|
|
|
|
w->pointer_is_in = 0;
|
|
|
|
w->borderless = 0;
|
|
|
|
w->iconified = 0;
|
|
|
|
w->fullscreen = 0;
|
|
|
|
|
|
|
|
return w;
|
|
|
|
}
|