예제 #1
0
        public static int SetWindowRgn(IHandle hwnd, Gdi32.HRGN hrgn, BOOL fRedraw)
        {
            int result = SetWindowRgn(hwnd.Handle, hrgn.Handle, fRedraw);

            GC.KeepAlive(hwnd);
            return(result);
        }
예제 #2
0
        public static RegionType GetWindowRgn(IHandle hwnd, Gdi32.HRGN hrgn)
        {
            RegionType result = GetWindowRgn(hwnd.Handle, hrgn);

            GC.KeepAlive(hwnd);
            return(result);
        }
예제 #3
0
 public static extern HRESULT GetThemeBackgroundRegion(
     IntPtr hTheme,
     Gdi32.HDC hdc,
     int iPartId,
     int iStateId,
     ref RECT pRect,
     out Gdi32.HRGN pRegion);
예제 #4
0
        public static BOOL InvalidateRgn(IHandle hWnd, Gdi32.HRGN hrgn, BOOL erase)
        {
            BOOL result = InvalidateRgn(hWnd.Handle, hrgn, erase);

            GC.KeepAlive(hWnd);
            return(result);
        }
예제 #5
0
        public static HRESULT GetThemeBackgroundRegion(
            IHandle hTheme,
            Gdi32.HDC hdc,
            int iPartId,
            int iStateId,
            ref RECT pRect,
            out Gdi32.HRGN pRegion)
        {
            HRESULT hr = GetThemeBackgroundRegion(hTheme.Handle, hdc, iPartId, iStateId, ref pRect, out pRegion);

            GC.KeepAlive(hTheme);
            return(hr);
        }
예제 #6
0
        public unsafe static        RECT[] GetRectsFromRegion(Gdi32.HRGN handle)
        {
            uint regionDataSize = Gdi32.GetRegionData(handle.Handle, 0, IntPtr.Zero);

            if (regionDataSize == 0)
            {
                return(Array.Empty <RECT>());
            }

            byte[] buffer = ArrayPool <byte> .Shared.Rent((int)regionDataSize);

            fixed(byte *b = buffer)
            {
                if (Gdi32.GetRegionData(handle.Handle, regionDataSize, (IntPtr)b) != regionDataSize)
                {
                    return(Array.Empty <RECT>());
                }

                RECT[] result = GetRectsFromRegion((Gdi32.RGNDATAHEADER *)b);
                ArrayPool <byte> .Shared.Return(buffer);

                return(result);
            }
        }
예제 #7
0
 private static extern RegionType GetWindowRgn(IntPtr hwnd, Gdi32.HRGN hrgn);
예제 #8
0
 private static extern int GetRandomRgn(Gdi32.HDC hdc, Gdi32.HRGN hrgn, int i);
예제 #9
0
 public static partial RegionType GetUpdateRgn(IntPtr hWnd, Gdi32.HRGN hRgn, BOOL bErase);
예제 #10
0
 private static partial RegionType GetWindowRgn(IntPtr hwnd, Gdi32.HRGN hrgn);
예제 #11
0
 private static partial BOOL InvalidateRgn(IntPtr hWnd, Gdi32.HRGN hrgn, BOOL erase);
예제 #12
0
        public unsafe static BOOL RedrawWindow(IHandle hWnd, RECT *lprcUpdate = default, Gdi32.HRGN hrgnUpdate = default, RDW flags = default)
        {
            BOOL result = RedrawWindow(hWnd.Handle, lprcUpdate, hrgnUpdate, flags);

            GC.KeepAlive(hWnd);
            return(result);
        }
예제 #13
0
 public static unsafe partial BOOL RedrawWindow(IntPtr hWnd, RECT *lprcUpdate = default, Gdi32.HRGN hrgnUpdate = default, RDW flags = default);
예제 #14
0
 public unsafe static BOOL RedrawWindow(HandleRef hWnd, RECT *lprcUpdate, Gdi32.HRGN hrgnUpdate, RDW flags)
 => RedrawWindow(hWnd, lprcUpdate, hrgnUpdate.Handle, flags);
예제 #15
0
 private static extern BOOL InvalidateRgn(IntPtr hWnd, Gdi32.HRGN hrgn, BOOL erase);