Module:    Win32-shell
Copyright:    Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
              All rights reserved.
License:      See License.txt in this distribution for details.
Warranty:     Distributed WITHOUT WARRANTY OF ANY KIND

// This file is automatically generated from "shellapi.h"; do not edit.


// Adapted from:
/*****************************************************************************\
*                                                                             *
* shellapi.h -  SHELL.DLL functions, types, and definitions                   *
*                                                                             *
* 
*                                                                             *
\*****************************************************************************/
define C-subtype <HDROP> ( <HANDLE> ) end;

define inline-only C-function DragQueryFile
  parameter hdrop1     :: <HDROP>;
  parameter uint2      :: <UINT>;
  parameter lpstr3     :: <LPSTR>;
  parameter uint4      :: <UINT>;
  result value :: <UINT>;
  c-name: "DragQueryFileA", c-modifiers: "__stdcall";
end;

define inline-only C-function DragQueryPoint
  parameter hdrop1     :: <HDROP>;
  parameter lppoint2   :: <LPPOINT>;
  result value :: <BOOL>;
  c-name: "DragQueryPoint", c-modifiers: "__stdcall";
end;

define inline-only C-function DragFinish
  parameter hdrop1     :: <HDROP>;
  c-name: "DragFinish", c-modifiers: "__stdcall";
end;

define inline-only C-function DragAcceptFiles
  parameter hwnd1      :: <HWND>;
  parameter bool2      :: <BOOL>;
  c-name: "DragAcceptFiles", c-modifiers: "__stdcall";
end;

define inline-only C-function ShellExecute
  parameter hwnd       :: <HWND>;
  parameter lpOperation :: <LPCSTR>;
  parameter lpFile     :: <LPCSTR>;
  parameter lpParameters :: <LPCSTR>;
  parameter lpDirectory :: <LPCSTR>;
  parameter nShowCmd   :: <INT>;
  result value :: <HINSTANCE>;
  c-name: "ShellExecuteA", c-modifiers: "__stdcall";
end;

define inline-only C-function FindExecutable
  parameter lpFile     :: <LPCSTR>;
  parameter lpDirectory :: <LPCSTR>;
  parameter lpResult   :: <LPSTR>;
  result value :: <HINSTANCE>;
  c-name: "FindExecutableA", c-modifiers: "__stdcall";
end;

define inline-only C-function ShellAbout
  parameter hWnd       :: <HWND>;
  parameter szApp      :: <LPCSTR>;
  parameter szOtherStuff :: <LPCSTR>;
  parameter hIcon      :: <HICON>;
  result value :: <INT>;
  c-name: "ShellAboutA", c-modifiers: "__stdcall";
end;

define inline-only C-function ExtractAssociatedIcon
  parameter hInst      :: <HINSTANCE>;
  parameter lpIconPath :: <LPSTR>;
  parameter lpiIcon    :: <LPWORD>;
  result value :: <HICON>;
  c-name: "ExtractAssociatedIconA", c-modifiers: "__stdcall";
end;

define inline-only C-function ExtractIcon
  parameter hInst      :: <HINSTANCE>;
  parameter lpszExeFileName :: <LPCSTR>;
  parameter nIconIndex :: <UINT>;
  result value :: <HICON>;
  c-name: "ExtractIconA", c-modifiers: "__stdcall";
end;
define inline-only constant $ABM-NEW                    = #x00000000;
define inline-only constant $ABM-REMOVE                 = #x00000001;
define inline-only constant $ABM-QUERYPOS               = #x00000002;
define inline-only constant $ABM-SETPOS                 = #x00000003;
define inline-only constant $ABM-GETSTATE               = #x00000004;
define inline-only constant $ABM-GETTASKBARPOS          = #x00000005;
define inline-only constant $ABM-ACTIVATE               = #x00000006;
define inline-only constant $ABM-GETAUTOHIDEBAR         = #x00000007;
define inline-only constant $ABM-SETAUTOHIDEBAR         = #x00000008;
define inline-only constant $ABM-WINDOWPOSCHANGED       = #x0000009;
define inline-only constant $ABN-STATECHANGE            = #x0000000;
define inline-only constant $ABN-POSCHANGED             = #x0000001;
define inline-only constant $ABN-FULLSCREENAPP          = #x0000002;
define inline-only constant $ABN-WINDOWARRANGE          = #x0000003;
define inline-only constant $ABS-AUTOHIDE               = #x0000001;
define inline-only constant $ABS-ALWAYSONTOP            = #x0000002;
define inline-only constant $ABE-LEFT                   =    0;
define inline-only constant $ABE-TOP                    =    1;
define inline-only constant $ABE-RIGHT                  =    2;
define inline-only constant $ABE-BOTTOM                 =    3;

define C-struct <APPBARDATA>
  sealed inline-only slot cbSize-value   :: <DWORD>;
  sealed inline-only slot hWnd-value     :: <HWND>;
  sealed inline-only slot uCallbackMessage-value :: <UINT>;
  sealed inline-only slot uEdge-value    :: <UINT>;
  sealed inline-only slot rc-value       :: <RECT>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  pack: 1;
  pointer-type-name: <LPAPPBARDATA>;
  c-name: "struct _AppBarData";
end C-struct <APPBARDATA>;
define inline constant <PAPPBARDATA> = <LPAPPBARDATA>;

define inline-only C-function SHAppBarMessage
  parameter dwMessage  :: <DWORD>;
  parameter pData      :: <PAPPBARDATA>;
  result value :: <UINT>;
  c-name: "SHAppBarMessage", c-modifiers: "__stdcall";
end;

define inline-only C-function ExtractIconEx
  parameter lpszFile   :: <LPCSTR>;
  parameter nIconIndex :: <C-int>;
  parameter phiconLarge :: <LPHICON>;
  parameter phiconSmall :: <LPHICON>;
  parameter nIcons     :: <UINT>;
  result value :: <UINT>;
  c-name: "ExtractIconExA", c-modifiers: "__stdcall";
end;
define inline-only constant $FO-MOVE                    = #x0001;
define inline-only constant $FO-COPY                    = #x0002;
define inline-only constant $FO-DELETE                  = #x0003;
define inline-only constant $FO-RENAME                  = #x0004;
define inline-only constant $FOF-MULTIDESTFILES         = #x0001;
define inline-only constant $FOF-CONFIRMMOUSE           = #x0002;
define inline-only constant $FOF-SILENT                 = #x0004;
define inline-only constant $FOF-RENAMEONCOLLISION      = #x0008;
define inline-only constant $FOF-NOCONFIRMATION         = #x0010;
define inline-only constant $FOF-WANTMAPPINGHANDLE      = #x0020;
define inline-only constant $FOF-ALLOWUNDO              = #x0040;
define inline-only constant $FOF-FILESONLY              = #x0080;
define inline-only constant $FOF-SIMPLEPROGRESS         = #x0100;
define inline-only constant $FOF-NOCONFIRMMKDIR         = #x0200;
define inline-only constant $FOF-NOERRORUI              = #x0400;
define inline-only constant $FOF-NOCOPYSECURITYATTRIBS  = #x0800;
define inline constant <FILEOP-FLAGS> = <WORD>;
define inline-only constant $PO-DELETE                  = #x0013;
define inline-only constant $PO-RENAME                  = #x0014;
define inline-only constant $PO-PORTCHANGE              = #x0020;
define inline-only constant $PO-REN-PORT                = #x0034;
define inline constant <PRINTEROP-FLAGS> = <WORD>;

define C-struct <SHFILEOPSTRUCTA>
  sealed inline-only slot hWnd-value     :: <HWND>;
  sealed inline-only slot wFunc-value    :: <UINT>;
  sealed inline-only slot pFrom-value    :: <LPCSTR>;
  sealed inline-only slot pTo-value      :: <LPCSTR>;
  sealed inline-only slot fFlags-value   :: <FILEOP-FLAGS>;
  sealed inline-only slot fAnyOperationsAborted-value :: <BOOL>;
  sealed inline-only slot hNameMappings-value :: <LPVOID>;
  sealed inline-only slot lpszProgressTitle-value :: <LPCSTR>;
  pack: 1;
  pointer-type-name: <LPSHFILEOPSTRUCTA>;
  c-name: "struct _SHFILEOPSTRUCTA";
end C-struct <SHFILEOPSTRUCTA>;
define inline constant <SHFILEOPSTRUCT> = <SHFILEOPSTRUCTA>;
define inline constant <LPSHFILEOPSTRUCT> = <LPSHFILEOPSTRUCTA>;

define inline-only C-function SHFileOperation
  parameter lpFileOp   :: <LPSHFILEOPSTRUCTA>;
  result value :: <C-int>;
  c-name: "SHFileOperationA", c-modifiers: "__stdcall";
end;

define inline-only C-function SHFreeNameMappings
  parameter hNameMappings :: <HANDLE>;
  c-name: "SHFreeNameMappings", c-modifiers: "__stdcall";
end;

define C-struct <SHNAMEMAPPINGA>
  sealed inline-only slot pszOldPath-value :: <LPSTR>;
  sealed inline-only slot pszNewPath-value :: <LPSTR>;
  sealed inline-only slot cchOldPath-value :: <C-int>;
  sealed inline-only slot cchNewPath-value :: <C-int>;
  pack: 1;
  pointer-type-name: <LPSHNAMEMAPPINGA>;
  c-name: "struct _SHNAMEMAPPINGA";
end C-struct <SHNAMEMAPPINGA>;
define inline constant <SHNAMEMAPPING> = <SHNAMEMAPPINGA>;
define inline constant <LPSHNAMEMAPPING> = <LPSHNAMEMAPPINGA>;
define inline-only constant $SE-ERR-FNF                 =    2;
define inline-only constant $SE-ERR-PNF                 =    3;
define inline-only constant $SE-ERR-ACCESSDENIED        =    5;
define inline-only constant $SE-ERR-OOM                 =    8;
define inline-only constant $SE-ERR-DLLNOTFOUND         =   32;
define inline-only constant $SE-ERR-SHARE               =   26;
define inline-only constant $SE-ERR-ASSOCINCOMPLETE     =   27;
define inline-only constant $SE-ERR-DDETIMEOUT          =   28;
define inline-only constant $SE-ERR-DDEFAIL             =   29;
define inline-only constant $SE-ERR-DDEBUSY             =   30;
define inline-only constant $SE-ERR-NOASSOC             =   31;
define inline-only constant $SEE-MASK-CLASSNAME         = #x00000001;
define inline-only constant $SEE-MASK-CLASSKEY          = #x00000003;
define inline-only constant $SEE-MASK-IDLIST            = #x00000004;
define inline-only constant $SEE-MASK-INVOKEIDLIST      = #x0000000c;
define inline-only constant $SEE-MASK-ICON              = #x00000010;
define inline-only constant $SEE-MASK-HOTKEY            = #x00000020;
define inline-only constant $SEE-MASK-NOCLOSEPROCESS    = #x00000040;
define inline-only constant $SEE-MASK-CONNECTNETDRV     = #x00000080;
define inline-only constant $SEE-MASK-FLAG-DDEWAIT      = #x00000100;
define inline-only constant $SEE-MASK-DOENVSUBST        = #x00000200;
define inline-only constant $SEE-MASK-FLAG-NO-UI        = #x00000400;
define inline-only constant $SEE-MASK-UNICODE           = #x00004000;
define inline-only constant $SEE-MASK-NO-CONSOLE        = #x00008000;
define inline-only constant $SEE-MASK-ASYNCOK           = #x00100000;
define inline-only constant $SEE-MASK-HMONITOR          = #x00200000;
define C-union <u%1>
  sealed inline-only slot hIcon-value    :: <HANDLE>;
  sealed inline-only slot hMonitor-value :: <HANDLE>;
  pack: 1;
end;

define C-struct <SHELLEXECUTEINFOA>
  sealed inline-only slot cbSize-value   :: <DWORD>;
  sealed inline-only slot fMask-value    :: <ULONG>;
  sealed inline-only slot hWnd-value     :: <HWND>;
  sealed inline-only slot lpVerb-value   :: <LPCSTR>;
  sealed inline-only slot lpFile-value   :: <LPCSTR>;
  sealed inline-only slot lpParameters-value :: <LPCSTR>;
  sealed inline-only slot lpDirectory-value :: <LPCSTR>;
  sealed inline-only slot nShow-value    :: <C-int>;
  sealed inline-only slot hInstApp-value :: <HINSTANCE>;
  sealed inline-only slot lpIDList-value :: <LPVOID>;
  sealed inline-only slot lpClass-value  :: <LPCSTR>;
  sealed inline-only slot hkeyClass-value :: <HKEY>;
  sealed inline-only slot dwHotKey-value :: <DWORD>;
  sealed inline-only slot u-value        :: <u%1>;
  sealed inline-only slot hProcess-value :: <HANDLE>;
  pack: 1;
  pointer-type-name: <LPSHELLEXECUTEINFOA>;
  c-name: "struct _SHELLEXECUTEINFOA";
end C-struct <SHELLEXECUTEINFOA>;
define inline constant <SHELLEXECUTEINFO> = <SHELLEXECUTEINFOA>;
define inline constant <LPSHELLEXECUTEINFO> = <LPSHELLEXECUTEINFOA>;

define inline-only C-function ShellExecuteEx
  parameter lpExecInfo :: <LPSHELLEXECUTEINFOA>;
  result value :: <BOOL>;
  c-name: "ShellExecuteExA", c-modifiers: "__stdcall";
end;

define C-struct <NOTIFYICONDATAA>
  sealed inline-only slot cbSize-value   :: <DWORD>;
  sealed inline-only slot hWnd-value     :: <HWND>;
  sealed inline-only slot uID-value      :: <UINT>;
  sealed inline-only slot uFlags-value   :: <UINT>;
  sealed inline-only slot uCallbackMessage-value :: <UINT>;
  sealed inline-only slot hIcon-value    :: <HICON>;
  sealed inline-only array slot szTip-array :: <CHAR>, length: 64,
	address-getter: szTip-value;
  pack: 1;
  pointer-type-name: <LPNOTIFYICONDATAA>;
  c-name: "struct _NOTIFYICONDATAA";
end C-struct <NOTIFYICONDATAA>;
define inline constant <PNOTIFYICONDATAA> = <LPNOTIFYICONDATAA>;
define inline constant <NOTIFYICONDATA> = <NOTIFYICONDATAA>;
define inline constant <PNOTIFYICONDATA> = <PNOTIFYICONDATAA>;
define inline-only constant $NIM-ADD                    = #x00000000;
define inline-only constant $NIM-MODIFY                 = #x00000001;
define inline-only constant $NIM-DELETE                 = #x00000002;
define inline-only constant $NIF-MESSAGE                = #x00000001;
define inline-only constant $NIF-ICON                   = #x00000002;
define inline-only constant $NIF-TIP                    = #x00000004;

define inline-only C-function Shell-NotifyIcon
  parameter dwMessage  :: <DWORD>;
  parameter lpData     :: <PNOTIFYICONDATAA>;
  result value :: <BOOL>;
  c-name: "Shell_NotifyIconA", c-modifiers: "__stdcall";
end;

define C-struct <SHFILEINFOA>
  sealed inline-only slot hIcon-value    :: <HICON>;
  sealed inline-only slot iIcon-value    :: <C-int>;
  sealed inline-only slot dwAttributes-value :: <DWORD>;
  sealed inline-only array slot szDisplayName-array :: <CHAR>,
	length: $MAX-PATH, address-getter: szDisplayName-value;
  sealed inline-only array slot szTypeName-array :: <CHAR>,
	length: 80, address-getter: szTypeName-value;
  pack: 1;
  pointer-type-name: <LPSHFILEINFOA>;
  c-name: "struct _SHFILEINFOA";
end C-struct <SHFILEINFOA>;
define inline constant <SHFILEINFO> = <SHFILEINFOA>;
define inline-only constant $SHGFI-ICON                 =
	#x000000100;
define inline-only constant $SHGFI-DISPLAYNAME          =
	#x000000200;
define inline-only constant $SHGFI-TYPENAME             =
	#x000000400;
define inline-only constant $SHGFI-ATTRIBUTES           =
	#x000000800;
define inline-only constant $SHGFI-ICONLOCATION         =
	#x000001000;
define inline-only constant $SHGFI-EXETYPE              =
	#x000002000;
define inline-only constant $SHGFI-SYSICONINDEX         =
	#x000004000;
define inline-only constant $SHGFI-LINKOVERLAY          =
	#x000008000;
define inline-only constant $SHGFI-SELECTED             =
	#x000010000;
define inline-only constant $SHGFI-ATTR-SPECIFIED       =
	#x000020000;
define inline-only constant $SHGFI-LARGEICON            =
	#x000000000;
define inline-only constant $SHGFI-SMALLICON            =
	#x000000001;
define inline-only constant $SHGFI-OPENICON             =
	#x000000002;
define inline-only constant $SHGFI-SHELLICONSIZE        =
	#x000000004;
define inline-only constant $SHGFI-PIDL                 =
	#x000000008;
define inline-only constant $SHGFI-USEFILEATTRIBUTES    =
	#x000000010;

define inline-only C-function SHGetFileInfo
  parameter pszPath    :: <LPCSTR>;
  parameter dwFileAttributes :: <DWORD>;
  parameter psfi       :: <LPSHFILEINFOA>;
  parameter cbFileInfo :: <UINT>;
  parameter uFlags     :: <UINT>;
  result value :: <DWORD>;
  c-name: "SHGetFileInfoA", c-modifiers: "__stdcall";
end;
define inline-only constant $SHGNLI-PIDL                =
	#x000000001;
define inline-only constant $SHGNLI-PREFIXNAME          =
	#x000000002;
define inline-only constant $SHGNLI-NOUNIQUE            =
	#x000000004;

define sealed domain make (singleton(<LPAPPBARDATA>));
define sealed domain initialize (<LPAPPBARDATA>);
define sealed domain make (singleton(<LPSHFILEOPSTRUCTA>));
define sealed domain initialize (<LPSHFILEOPSTRUCTA>);
define sealed domain make (singleton(<LPSHNAMEMAPPINGA>));
define sealed domain initialize (<LPSHNAMEMAPPINGA>);
define sealed domain make (singleton(<LPSHELLEXECUTEINFOA>));
define sealed domain initialize (<LPSHELLEXECUTEINFOA>);
define sealed domain make (singleton(<LPNOTIFYICONDATAA>));
define sealed domain initialize (<LPNOTIFYICONDATAA>);
define sealed domain make (singleton(<LPSHFILEINFOA>));
define sealed domain initialize (<LPSHFILEINFOA>);
