Module:    Win32-controls
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 "prsht.h"; do not edit.

define inline-only constant $MAXPROPPAGES               =  100;
define C-subtype <HPROPSHEETPAGE> ( <C-void*> ) end;

define C-subtype <LPFNPSPCALLBACKA> ( <C-function-pointer> ) end;
define macro <LPFNPSPCALLBACK>-callback-wrapper
 { <LPFNPSPCALLBACK>-callback-wrapper(?new:name,?old:name) } =>
 { define C-callable-wrapper ?new of ?old
  parameter hwnd       :: <HWND>;
  parameter uMsg       :: <UINT>;
  parameter ppsp       :: <LPPROPSHEETPAGEA>;
  result value :: <UINT>;
  c-modifiers: "__stdcall";
 end C-callable-wrapper }
end;
define inline constant <LPFNPSPCALLBACK> = <LPFNPSPCALLBACKA>;
define inline-only constant $PSP-DEFAULT                = #x00000000;
define inline-only constant $PSP-DLGINDIRECT            = #x00000001;
define inline-only constant $PSP-USEHICON               = #x00000002;
define inline-only constant $PSP-USEICONID              = #x00000004;
define inline-only constant $PSP-USETITLE               = #x00000008;
define inline-only constant $PSP-RTLREADING             = #x00000010;
define inline-only constant $PSP-HASHELP                = #x00000020;
define inline-only constant $PSP-USEREFPARENT           = #x00000040;
define inline-only constant $PSP-USECALLBACK            = #x00000080;
define inline-only constant $PSP-PREMATURE              = #x00000400;
define inline-only constant $PSPCB-RELEASE              =    1;
define inline-only constant $PSPCB-CREATE               =    2;
define C-union <DUMMYUNIONNAME%1>
  sealed inline-only slot pszTemplate-value :: <LPCSTR>;
  sealed inline-only slot pResource-value :: <LPCDLGTEMPLATE>;
end;
define C-union <DUMMYUNIONNAME2%2>
  sealed inline-only slot hIcon-value    :: <HICON>;
  sealed inline-only slot pszIcon-value  :: <LPCSTR>;
end;

define C-struct <PROPSHEETPAGEA>
  sealed inline-only slot dwSize-value   :: <DWORD>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot hInstance-value :: <HINSTANCE>;
  sealed inline-only slot u-value        :: <DUMMYUNIONNAME%1>;
  sealed inline-only slot u2-value       :: <DUMMYUNIONNAME2%2>;
  sealed inline-only slot pszTitle-value :: <LPCSTR>;
  sealed inline-only slot pfnDlgProc-value :: <DLGPROC>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  sealed inline-only slot pfnCallback-value :: <LPFNPSPCALLBACKA>;
  sealed inline-only slot pcRefParent-value :: <LPUINT>;
  pointer-type-name: <LPPROPSHEETPAGEA>;
  c-name: "struct _PROPSHEETPAGEA";
end C-struct <PROPSHEETPAGEA>;
define inline constant <LPCPROPSHEETPAGEA> =  /* const */ <LPPROPSHEETPAGEA>;
define inline constant <LPPROPSHEETPAGE> = <LPPROPSHEETPAGEA>;
define inline constant <LPCPROPSHEETPAGE> = <LPCPROPSHEETPAGEA>;
define inline-only constant $PSH-DEFAULT                = #x00000000;
define inline-only constant $PSH-PROPTITLE              = #x00000001;
define inline-only constant $PSH-USEHICON               = #x00000002;
define inline-only constant $PSH-USEICONID              = #x00000004;
define inline-only constant $PSH-PROPSHEETPAGE          = #x00000008;
define inline-only constant $PSH-WIZARDHASFINISH        = #x00000010;
define inline-only constant $PSH-WIZARD                 = #x00000020;
define inline-only constant $PSH-USEPSTARTPAGE          = #x00000040;
define inline-only constant $PSH-NOAPPLYNOW             = #x00000080;
define inline-only constant $PSH-USECALLBACK            = #x00000100;
define inline-only constant $PSH-HASHELP                = #x00000200;
define inline-only constant $PSH-MODELESS               = #x00000400;
define inline-only constant $PSH-RTLREADING             = #x00000800;
define inline-only constant $PSH-WIZARDCONTEXTHELP      = #x00001000;

define C-subtype <PFNPROPSHEETCALLBACK> ( <C-function-pointer> ) end;
define macro <PFNPROPSHEETCALLBACK>-callback-wrapper
 { <PFNPROPSHEETCALLBACK>-callback-wrapper(?new:name,?old:name) } =>
 { define C-callable-wrapper ?new of ?old
  parameter hwnd1      :: <HWND>;
  parameter uint2      :: <UINT>;
  parameter lparam3    :: <LPARAM>;
  result value :: <C-int>;
  c-modifiers: "__stdcall";
 end C-callable-wrapper }
end;
define C-union <DUMMYUNIONNAME%3>
  sealed inline-only slot hIcon-value    :: <HICON>;
  sealed inline-only slot pszIcon-value  :: <LPCSTR>;
end;
define C-union <DUMMYUNIONNAME2%4>
  sealed inline-only slot nStartPage-value :: <UINT>;
  sealed inline-only slot pStartPage-value :: <LPCSTR>;
end;
define C-union <DUMMYUNIONNAME3%5>
  sealed inline-only slot ppsp-value     :: <LPCPROPSHEETPAGEA>;
  sealed inline-only slot phpage-value   :: <LPHPROPSHEETPAGE>;
end;

define C-struct <PROPSHEETHEADERA>
  sealed inline-only slot dwSize-value   :: <DWORD>;
  sealed inline-only slot dwFlags-value  :: <DWORD>;
  sealed inline-only slot hwndParent-value :: <HWND>;
  sealed inline-only slot hInstance-value :: <HINSTANCE>;
  sealed inline-only slot u-value        :: <DUMMYUNIONNAME%3>;
  sealed inline-only slot pszCaption-value :: <LPCSTR>;
  sealed inline-only slot nPages-value   :: <UINT>;
  sealed inline-only slot u2-value       :: <DUMMYUNIONNAME2%4>;
  sealed inline-only slot u3-value       :: <DUMMYUNIONNAME3%5>;
  sealed inline-only slot pfnCallback-value :: <PFNPROPSHEETCALLBACK>;
  pointer-type-name: <LPPROPSHEETHEADERA>;
  c-name: "struct _PROPSHEETHEADERA";
end C-struct <PROPSHEETHEADERA>;
define inline constant <LPCPROPSHEETHEADERA> =  /* const */ <LPPROPSHEETHEADERA>;
define inline constant <LPPROPSHEETHEADER> = <LPPROPSHEETHEADERA>;
define inline constant <LPCPROPSHEETHEADER> = <LPCPROPSHEETHEADERA>;
define inline-only constant $PSCB-INITIALIZED           =    1;
define inline-only constant $PSCB-PRECREATE             =    2;

define inline-only C-function CreatePropertySheetPage
  parameter lpcpropsheetpagea1 :: <LPCPROPSHEETPAGEA>;
  result value :: <HPROPSHEETPAGE>;
  c-name: "CreatePropertySheetPageA", c-modifiers: "__stdcall";
end;

define inline-only C-function DestroyPropertySheetPage
  parameter hpropsheetpage1 :: <HPROPSHEETPAGE>;
  result value :: <BOOL>;
  c-name: "DestroyPropertySheetPage", c-modifiers: "__stdcall";
end;

define inline-only C-function PropertySheet
  parameter lpcpropsheetheadera1 :: <LPCPROPSHEETHEADERA>;
  result value :: <C-int>;
  c-name: "PropertySheetA", c-modifiers: "__stdcall";
end;

define C-subtype <LPFNADDPROPSHEETPAGE> ( <C-function-pointer> ) end;
define macro <LPFNADDPROPSHEETPAGE>-callback-wrapper
 { <LPFNADDPROPSHEETPAGE>-callback-wrapper(?new:name,?old:name) } =>
 { define C-callable-wrapper ?new of ?old
  parameter hpropsheetpage1 :: <HPROPSHEETPAGE>;
  parameter lparam2    :: <LPARAM>;
  result value :: <BOOL>;
  c-modifiers: "__stdcall";
 end C-callable-wrapper }
end;

define C-subtype <LPFNADDPROPSHEETPAGES> ( <C-function-pointer> ) end;
define macro <LPFNADDPROPSHEETPAGES>-callback-wrapper
 { <LPFNADDPROPSHEETPAGES>-callback-wrapper(?new:name,?old:name) } =>
 { define C-callable-wrapper ?new of ?old
  parameter lpvoid1    :: <LPVOID>;
  parameter lpfnaddpropsheetpage2 :: <LPFNADDPROPSHEETPAGE>;
  parameter lparam3    :: <LPARAM>;
  result value :: <BOOL>;
  c-modifiers: "__stdcall";
 end C-callable-wrapper }
end;

define C-struct <PSHNOTIFY>
  sealed inline-only slot hdr-value      :: <NMHDR>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  pointer-type-name: <LPPSHNOTIFY>;
  c-name: "struct _PSHNOTIFY";
end C-struct <PSHNOTIFY>;
define inline-only constant $PSN-FIRST                  = -200;
define inline-only constant $PSN-LAST                   = -299;
define inline-only constant $PSN-SETACTIVE              = -200;
define inline-only constant $PSN-KILLACTIVE             = -201;
define inline-only constant $PSN-APPLY                  = -202;
define inline-only constant $PSN-RESET                  = -203;
define inline-only constant $PSN-HELP                   = -205;
define inline-only constant $PSN-WIZBACK                = -206;
define inline-only constant $PSN-WIZNEXT                = -207;
define inline-only constant $PSN-WIZFINISH              = -208;
define inline-only constant $PSN-QUERYCANCEL            = -209;
define inline-only constant $PSNRET-NOERROR             =    0;
define inline-only constant $PSNRET-INVALID             =    1;
define inline-only constant $PSNRET-INVALID-NOCHANGEPAGE =    2;
define inline-only constant $PSM-SETCURSEL              = #x465;

define inline-only function PropSheet-SetCurSel (hDlg, hpage, index);
   SendMessage(hDlg, $PSM-SETCURSEL, index, hpage)
end;
define inline-only constant $PSM-REMOVEPAGE             = #x466;

define inline-only function PropSheet-RemovePage (hDlg, index, hpage);
   SendMessage(hDlg, $PSM-REMOVEPAGE, index, hpage)
end;
define inline-only constant $PSM-ADDPAGE                = #x467;

define inline-only function PropSheet-AddPage (hDlg, hpage);
   SendMessage(hDlg, $PSM-ADDPAGE, 0, hpage)
end;
define inline-only constant $PSM-CHANGED                = #x468;

define inline-only function PropSheet-Changed (hDlg, hwnd);
   SendMessage(hDlg, $PSM-CHANGED, hwnd, 0)
end;
define inline-only constant $PSM-RESTARTWINDOWS         = #x469;

define inline-only function PropSheet-RestartWindows (hDlg);
   SendMessage(hDlg, $PSM-RESTARTWINDOWS, 0, 0)
end;
define inline-only constant $PSM-REBOOTSYSTEM           = #x46A;

define inline-only function PropSheet-RebootSystem (hDlg);
   SendMessage(hDlg, $PSM-REBOOTSYSTEM, 0, 0)
end;
define inline-only constant $PSM-CANCELTOCLOSE          = #x46B;

define inline-only function PropSheet-CancelToClose (hDlg);
   PostMessage(hDlg, $PSM-CANCELTOCLOSE, 0, 0)
end;
define inline-only constant $PSM-QUERYSIBLINGS          = #x46C;

define inline-only function PropSheet-QuerySiblings (hDlg, wParam, lParam);
   SendMessage(hDlg, $PSM-QUERYSIBLINGS, wParam, lParam)
end;
define inline-only constant $PSM-UNCHANGED              = #x46D;

define inline-only function PropSheet-UnChanged (hDlg, hwnd);
   SendMessage(hDlg, $PSM-UNCHANGED, hwnd, 0)
end;
define inline-only constant $PSM-APPLY                  = #x46E;

define inline-only function PropSheet-Apply (hDlg);
   SendMessage(hDlg, $PSM-APPLY, 0, 0)
end;
define inline-only constant $PSM-SETTITLE               = #x46F;
define inline-only constant $PSM-SETWIZBUTTONS          = #x470;

define inline-only function PropSheet-SetWizButtons (hDlg, dwFlags);
   PostMessage(hDlg, $PSM-SETWIZBUTTONS, 0, dwFlags)
end;
define inline-only constant $PSWIZB-BACK                = #x00000001;
define inline-only constant $PSWIZB-NEXT                = #x00000002;
define inline-only constant $PSWIZB-FINISH              = #x00000004;
define inline-only constant $PSWIZB-DISABLEDFINISH      = #x00000008;
define inline-only constant $PSM-PRESSBUTTON            = #x471;

define inline-only function PropSheet-PressButton (hDlg, iButton);
   PostMessage(hDlg, $PSM-PRESSBUTTON, iButton, 0)
end;
define inline-only constant $PSBTN-BACK                 =    0;
define inline-only constant $PSBTN-NEXT                 =    1;
define inline-only constant $PSBTN-FINISH               =    2;
define inline-only constant $PSBTN-OK                   =    3;
define inline-only constant $PSBTN-APPLYNOW             =    4;
define inline-only constant $PSBTN-CANCEL               =    5;
define inline-only constant $PSBTN-HELP                 =    6;
define inline-only constant $PSBTN-MAX                  =    6;
define inline-only constant $PSM-SETCURSELID            = #x472;

define inline-only function PropSheet-SetCurSelByID (hDlg, id);
   SendMessage(hDlg, $PSM-SETCURSELID, 0, id)
end;
define inline-only constant $PSM-SETFINISHTEXT          = #x473;

define inline-only function PropSheet-SetFinishText (hDlg, lpszText);
   SendMessage(hDlg, $PSM-SETFINISHTEXT, 0, lpszText)
end;
define inline-only constant $PSM-GETTABCONTROL          = #x474;

define inline-only function PropSheet-GetTabControl (hDlg);
   c-type-cast(<HWND>, SendMessage(hDlg, $PSM-GETTABCONTROL, 0, 0))
end;
define inline-only constant $PSM-ISDIALOGMESSAGE        = #x475;

define inline-only function PropSheet-IsDialogMessage (hDlg, pMsg);
   ~ zero?(SendMessage(hDlg, $PSM-ISDIALOGMESSAGE, 0, pMsg))
end;
define inline-only constant $PSM-GETCURRENTPAGEHWND     = #x476;

define inline-only function PropSheet-GetCurrentPageHwnd (hDlg);
   c-type-cast(<HWND>, SendMessage(hDlg, $PSM-GETCURRENTPAGEHWND, 0, 0))
end;
define inline-only constant $ID-PSRESTARTWINDOWS        =  #x2;
define inline-only constant $ID-PSREBOOTSYSTEM          =
	logior($ID-PSRESTARTWINDOWS, #x1);
define inline-only constant $WIZ-CXDLG                  =  276;
define inline-only constant $WIZ-CYDLG                  =  140;
define inline-only constant $WIZ-CXBMP                  =   80;
define inline-only constant $WIZ-BODYX                  =   92;
define inline-only constant $WIZ-BODYCX                 =  184;
define inline-only constant $PROP-SM-CXDLG              =  212;
define inline-only constant $PROP-SM-CYDLG              =  188;
define inline-only constant $PROP-MED-CXDLG             =  227;
define inline-only constant $PROP-MED-CYDLG             =  215;
define inline-only constant $PROP-LG-CXDLG              =  252;
define inline-only constant $PROP-LG-CYDLG              =  218;

define sealed domain make (singleton(<LPPROPSHEETPAGEA>));
define sealed domain initialize (<LPPROPSHEETPAGEA>);
define sealed domain make (singleton(<LPPROPSHEETHEADERA>));
define sealed domain initialize (<LPPROPSHEETHEADERA>);
define sealed domain make (singleton(<LPPSHNOTIFY>));
define sealed domain initialize (<LPPSHNOTIFY>);
