Add windows word to shell32
parent
ddd55ac4fa
commit
583b3abd74
|
@ -79,18 +79,15 @@ IN: windows.shell32
|
||||||
|
|
||||||
LIBRARY: shell32
|
LIBRARY: shell32
|
||||||
|
|
||||||
TYPEDEF: void* PIDLIST_ABSOLUTE
|
|
||||||
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 ) ;
|
||||||
! SHGetSpecialFolderLocation
|
: SHGetFolderPath SHGetFolderPathW ; inline
|
||||||
! SHGetSpecialFolderPath
|
|
||||||
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 ) ;
|
||||||
: ShellExecute ShellExecuteW ; inline
|
: ShellExecute ShellExecuteW ; inline
|
||||||
|
|
||||||
: open-in-explorer ( dir -- )
|
: open-in-explorer ( dir -- )
|
||||||
f "open" rot f f SW_SHOWNORMAL ShellExecute drop ;
|
f "open" rot f f SW_SHOWNORMAL ShellExecute drop ;
|
||||||
|
|
||||||
: SHGetFolderPath SHGetFolderPathW ; inline
|
|
||||||
|
|
||||||
: shell32-error ( n -- )
|
: shell32-error ( n -- )
|
||||||
dup S_OK = [
|
dup S_OK = [
|
||||||
drop
|
drop
|
||||||
|
@ -116,6 +113,9 @@ FUNCTION: HINSTANCE ShellExecuteW ( HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFi
|
||||||
: application-data ( -- str )
|
: application-data ( -- str )
|
||||||
CSIDL_APPDATA shell32-directory ;
|
CSIDL_APPDATA shell32-directory ;
|
||||||
|
|
||||||
|
: windows ( -- str )
|
||||||
|
CSIDL_WINDOWS shell32-directory ;
|
||||||
|
|
||||||
: programs ( -- str )
|
: programs ( -- str )
|
||||||
CSIDL_PROGRAMS shell32-directory ;
|
CSIDL_PROGRAMS shell32-directory ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue