! Copyright (C) 2006, 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.data alien.strings
-alien.syntax classes.struct combinators io.backend io.files
-io.pathnames kernel math sequences specialized-arrays
-ui.backend.windows windows windows.com windows.com.syntax
-windows.errors windows.kernel32 windows.ole32 windows.types
-windows.user32 ;
-SPECIALIZED-ARRAY: ushort
+alien.syntax classes.struct io.backend kernel
+specialized-arrays
+specialized-arrays.instances.alien.c-types.ushort windows
+windows.com windows.com.syntax windows.kernel32 windows.ole32
+windows.types ;
IN: windows.shell32
CONSTANT: CSIDL_DESKTOP 0x00
LIBRARY: shell32
-FUNCTION: HRESULT SHGetFolderPathW ( HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPTSTR pszPath ) ;
+FUNCTION: HRESULT SHGetFolderPathW ( HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPTSTR pszPath )
ALIAS: SHGetFolderPath SHGetFolderPathW
-FUNCTION: HINSTANCE ShellExecuteW ( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd ) ;
+FUNCTION: HINSTANCE ShellExecuteW ( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd )
ALIAS: ShellExecute ShellExecuteW
CONSTANT: SHGFI_ICON 0x000000100
SHFILEINFO *psfi,
UINT cbFileInfo,
UINT uFlags
-) ;
+)
: shell32-file-info ( path -- err struct )
normalize-path
: program-files-common-x86 ( -- str )
CSIDL_PROGRAM_FILES_COMMONX86 shell32-directory ;
-
+
CONSTANT: SHCONTF_FOLDERS 32
CONSTANT: SHCONTF_NONFOLDERS 64
HRESULT GetDisplayNameOf ( LPCITEMIDLIST pidl, SHGDNF uFlags, STRRET* lpName )
HRESULT SetNameOf ( HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR lpszName, SHGDNF uFlags, LPITEMIDLIST* ppidlOut ) ;
-FUNCTION: HRESULT SHGetDesktopFolder ( IShellFolder** ppshf ) ;
+FUNCTION: HRESULT SHGetDesktopFolder ( IShellFolder** ppshf )
-FUNCTION: UINT DragQueryFileW ( HDROP hDrop, UINT iFile, LPWSTR lpszFile, UINT cch ) ;
+FUNCTION: UINT DragQueryFileW ( HDROP hDrop, UINT iFile, LPWSTR lpszFile, UINT cch )
ALIAS: DragQueryFile DragQueryFileW
-FUNCTION: BOOL IsUserAnAdmin ( ) ;
+FUNCTION: BOOL IsUserAnAdmin ( )