]> gitweb.factorcode.org Git - factor.git/commitdiff
some windows dwm api calls to play with
authorJoe Groff <arcata@gmail.com>
Thu, 24 Sep 2009 05:10:53 +0000 (00:10 -0500)
committerJoe Groff <arcata@gmail.com>
Thu, 24 Sep 2009 05:10:53 +0000 (00:10 -0500)
basis/windows/dwmapi/authors.txt [new file with mode: 0755]
basis/windows/dwmapi/dwmapi.factor [new file with mode: 0755]
basis/windows/dwmapi/summary.txt [new file with mode: 0755]
basis/windows/dwmapi/tags.txt [new file with mode: 0755]

diff --git a/basis/windows/dwmapi/authors.txt b/basis/windows/dwmapi/authors.txt
new file mode 100755 (executable)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/basis/windows/dwmapi/dwmapi.factor b/basis/windows/dwmapi/dwmapi.factor
new file mode 100755 (executable)
index 0000000..e7e0b4b
--- /dev/null
@@ -0,0 +1,28 @@
+! (c)2009 Joe Groff bsd license
+USING: alien.c-types alien.libraries alien.syntax classes.struct windows.types ;
+IN: windows.dwmapi
+
+STRUCT: MARGINS
+    { cxLeftWidth    int }
+    { cxRightWidth   int }
+    { cyTopHeight    int }
+    { cyBottomHeight int } ;
+
+STRUCT: DWM_BLURBEHIND
+    { dwFlags                DWORD   }
+    { fEnable                BOOL    }
+    { hRgnBlur               HANDLE  }
+    { fTransitionOnMaximized BOOL    } ;
+
+: <MARGINS> ( l r t b -- MARGINS )
+    MARGINS <struct-boa> ; inline
+
+: full-window-margins ( -- MARGINS )
+    -1 -1 -1 -1 <MARGINS> ; inline
+
+<< "dwmapi" "dwmapi.dll" "stdcall" add-library >>
+
+LIBRARY: dwmapi
+
+FUNCTION: HRESULT DwmExtendFrameIntoClientArea ( HWND hWnd, MARGINS* pMarInset ) ;
+FUNCTION: HRESULT DwmEnableBlurBehindWindow ( HWND hWnd, DWM_BLURBEHIND* pBlurBehind ) ;
diff --git a/basis/windows/dwmapi/summary.txt b/basis/windows/dwmapi/summary.txt
new file mode 100755 (executable)
index 0000000..9aa451d
--- /dev/null
@@ -0,0 +1 @@
+Windows Vista Desktop Window Manager API functions
diff --git a/basis/windows/dwmapi/tags.txt b/basis/windows/dwmapi/tags.txt
new file mode 100755 (executable)
index 0000000..43bc035
--- /dev/null
@@ -0,0 +1,2 @@
+windows
+unportable