summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-02-24 00:41:53 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-02-24 00:41:53 +0000
commit355b3341b3db08b756020e349ca09ca9d06b4358 (patch)
treea47d221f6fdedcf2cd24feb6ea8488df7c730fb7
parent4e5b9877dd3e82f130f4987839e2d02918c797c6 (diff)
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
-rw-r--r--legacy/ecore/src/lib/ecore_win32/Ecore_Win32.h5
-rw-r--r--legacy/ecore/src/lib/ecore_win32/ecore_win32_window.c134
2 files changed, 0 insertions, 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,
471EAPI void ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window, 471EAPI void ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
472 Eina_Bool on); 472 Eina_Bool on);
473 473
474EINA_DEPRECATED EAPI void ecore_win32_window_shape_set(Ecore_Win32_Window *window,
475 unsigned short width,
476 unsigned short height,
477 unsigned char *mask);
478
479EAPI void ecore_win32_window_cursor_set(Ecore_Win32_Window *window, 474EAPI void ecore_win32_window_cursor_set(Ecore_Win32_Window *window,
480 Ecore_Win32_Cursor *cursor); 475 Ecore_Win32_Cursor *cursor);
481 476
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,
755 if (step_height) *step_height = window->step_height; 755 if (step_height) *step_height = window->step_height;
756} 756}
757 757
758EAPI void
759ecore_win32_window_shape_set(Ecore_Win32_Window *window,
760 unsigned short width,
761 unsigned short height,
762 unsigned char *mask)
763{
764 HRGN rgn;
765 int x;
766 int y;
767 OSVERSIONINFO version_info;
768
769 if (!window)
770 return;
771
772 if (!mask)
773 {
774 window->shape.enabled = 0;
775 if (window->shape.layered != 0)
776 {
777 window->shape.layered = 0;
778#if defined(WS_EX_LAYERED)
779 SetLastError(0);
780 if (!SetWindowLongPtr(window->window, GWL_EXSTYLE,
781 GetWindowLong(window->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)) &&
782 (GetLastError() != 0))
783 {
784 ERR("SetWindowLongPtr() failed");
785 return;
786 }
787 if (!RedrawWindow(window->window, NULL, NULL,
788 RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN))
789 {
790 ERR("RedrawWindow() failed");
791 return;
792 }
793#endif
794 }
795 else
796 if (!SetWindowRgn(window->window, NULL, TRUE))
797 {
798 ERR("SetWindowRgn() failed");
799 }
800 return;
801 }
802
803 if (width == 0 || height == 0)
804 return;
805
806 window->shape.enabled = 1;
807
808 if (width != window->shape.width || height != window->shape.height)
809 {
810 window->shape.width = width;
811 window->shape.height = height;
812 if (window->shape.mask)
813 {
814 free(window->shape.mask);
815 window->shape.mask = NULL;
816 }
817 window->shape.mask = malloc(width * height);
818 }
819 memcpy(window->shape.mask, mask, width * height);
820
821 window->shape.layered = 0;
822
823#if defined(WS_EX_LAYERED)
824 version_info.dwOSVersionInfoSize = sizeof(version_info);
825 if (GetVersionEx(&version_info) == TRUE && version_info.dwMajorVersion == 5)
826 {
827 SetLastError(0);
828 if (!SetWindowLongPtr(window->window, GWL_EXSTYLE,
829 GetWindowLong(window->window, GWL_EXSTYLE) | WS_EX_LAYERED) &&
830 (GetLastError() != 0))
831 {
832 ERR("SetWindowLongPtr() failed");
833 return;
834 }
835 window->shape.layered = 1;
836 return;
837 }
838#endif
839
840 if (!(rgn = CreateRectRgn(0, 0, 0, 0)))
841 {
842 ERR("CreateRectRgn() failed");
843 return;
844 }
845 for (y = 0; y < height; y++)
846 {
847 HRGN rgnLine;
848
849 if (!(rgnLine = CreateRectRgn(0, 0, 0, 0)))
850 {
851 ERR("CreateRectRgn() failed");
852 return;
853 }
854 for (x = 0; x < width; x++)
855 {
856 if (mask[y * width + x] > 0)
857 {
858 HRGN rgnDot;
859
860 if (!(rgnDot = CreateRectRgn(x, y, x + 1, y + 1)))
861 {
862 ERR("CreateRectRgn() failed");
863 return;
864 }
865 if (CombineRgn(rgnLine, rgnLine, rgnDot, RGN_OR) == ERROR)
866 {
867 ERR("CombineRgn() has not created a new region");
868 }
869 if (!DeleteObject(rgnDot))
870 {
871 ERR("DeleteObject() failed");
872 return;
873 }
874 }
875 }
876 if (CombineRgn(rgn, rgn, rgnLine, RGN_OR) == ERROR)
877 {
878 ERR("CombineRgn() has not created a new region");
879 }
880 if (!DeleteObject(rgnLine))
881 {
882 ERR("DeleteObject() failed");
883 return;
884 }
885 }
886 if (!SetWindowRgn(window->window, rgn, TRUE))
887 {
888 ERR("SetWindowRgn() failed");
889 }
890}
891
892/** 758/**
893 * @brief Show the given window. 759 * @brief Show the given window.
894 * 760 *