From 355b3341b3db08b756020e349ca09ca9d06b4358 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 24 Feb 2012 00:41:53 +0000 Subject: [PATCH] that win32 shape set func has been deprecated since before ecore 1.0 - it should have never been used, so remove. cruft. and no- no chlog as it isnt something that should affect a user SVN revision: 68366 --- .../ecore/src/lib/ecore_win32/Ecore_Win32.h | 5 - .../src/lib/ecore_win32/ecore_win32_window.c | 134 ------------------ 2 files changed, 139 deletions(-) diff --git a/legacy/ecore/src/lib/ecore_win32/Ecore_Win32.h b/legacy/ecore/src/lib/ecore_win32/Ecore_Win32.h index 95e37497e5..50856c2fbb 100644 --- a/legacy/ecore/src/lib/ecore_win32/Ecore_Win32.h +++ b/legacy/ecore/src/lib/ecore_win32/Ecore_Win32.h @@ -471,11 +471,6 @@ EAPI void ecore_win32_window_borderless_set(Ecore_Win32_Window *window, EAPI void ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window, Eina_Bool on); -EINA_DEPRECATED EAPI void ecore_win32_window_shape_set(Ecore_Win32_Window *window, - unsigned short width, - unsigned short height, - unsigned char *mask); - EAPI void ecore_win32_window_cursor_set(Ecore_Win32_Window *window, Ecore_Win32_Cursor *cursor); diff --git a/legacy/ecore/src/lib/ecore_win32/ecore_win32_window.c b/legacy/ecore/src/lib/ecore_win32/ecore_win32_window.c index 459f0518e1..910c46fb88 100644 --- a/legacy/ecore/src/lib/ecore_win32/ecore_win32_window.c +++ b/legacy/ecore/src/lib/ecore_win32/ecore_win32_window.c @@ -755,140 +755,6 @@ ecore_win32_window_size_step_get(Ecore_Win32_Window *window, if (step_height) *step_height = window->step_height; } -EAPI void -ecore_win32_window_shape_set(Ecore_Win32_Window *window, - unsigned short width, - unsigned short height, - unsigned char *mask) -{ - HRGN rgn; - int x; - int y; - OSVERSIONINFO version_info; - - if (!window) - return; - - if (!mask) - { - window->shape.enabled = 0; - if (window->shape.layered != 0) - { - window->shape.layered = 0; -#if defined(WS_EX_LAYERED) - SetLastError(0); - if (!SetWindowLongPtr(window->window, GWL_EXSTYLE, - GetWindowLong(window->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)) && - (GetLastError() != 0)) - { - ERR("SetWindowLongPtr() failed"); - return; - } - if (!RedrawWindow(window->window, NULL, NULL, - RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN)) - { - ERR("RedrawWindow() failed"); - return; - } -#endif - } - else - if (!SetWindowRgn(window->window, NULL, TRUE)) - { - ERR("SetWindowRgn() failed"); - } - return; - } - - if (width == 0 || height == 0) - return; - - window->shape.enabled = 1; - - if (width != window->shape.width || height != window->shape.height) - { - window->shape.width = width; - window->shape.height = height; - if (window->shape.mask) - { - free(window->shape.mask); - window->shape.mask = NULL; - } - window->shape.mask = malloc(width * height); - } - memcpy(window->shape.mask, mask, width * height); - - window->shape.layered = 0; - -#if defined(WS_EX_LAYERED) - version_info.dwOSVersionInfoSize = sizeof(version_info); - if (GetVersionEx(&version_info) == TRUE && version_info.dwMajorVersion == 5) - { - SetLastError(0); - if (!SetWindowLongPtr(window->window, GWL_EXSTYLE, - GetWindowLong(window->window, GWL_EXSTYLE) | WS_EX_LAYERED) && - (GetLastError() != 0)) - { - ERR("SetWindowLongPtr() failed"); - return; - } - window->shape.layered = 1; - return; - } -#endif - - if (!(rgn = CreateRectRgn(0, 0, 0, 0))) - { - ERR("CreateRectRgn() failed"); - return; - } - for (y = 0; y < height; y++) - { - HRGN rgnLine; - - if (!(rgnLine = CreateRectRgn(0, 0, 0, 0))) - { - ERR("CreateRectRgn() failed"); - return; - } - for (x = 0; x < width; x++) - { - if (mask[y * width + x] > 0) - { - HRGN rgnDot; - - if (!(rgnDot = CreateRectRgn(x, y, x + 1, y + 1))) - { - ERR("CreateRectRgn() failed"); - return; - } - if (CombineRgn(rgnLine, rgnLine, rgnDot, RGN_OR) == ERROR) - { - ERR("CombineRgn() has not created a new region"); - } - if (!DeleteObject(rgnDot)) - { - ERR("DeleteObject() failed"); - return; - } - } - } - if (CombineRgn(rgn, rgn, rgnLine, RGN_OR) == ERROR) - { - ERR("CombineRgn() has not created a new region"); - } - if (!DeleteObject(rgnLine)) - { - ERR("DeleteObject() failed"); - return; - } - } - if (!SetWindowRgn(window->window, rgn, TRUE)) - { - ERR("SetWindowRgn() failed"); - } -} - /** * @brief Show the given window. *