-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | DSL for producing Windows Installer using NSIS.
--   
--   NSIS (Nullsoft Scriptable Install System,
--   <a>http://nsis.sourceforge.net/</a>) is a tool that allows programmers
--   to create installers for Windows. This library provides an alternative
--   syntax for NSIS scripts, as an embedded Haskell language, removing
--   much of the hard work in developing an install script. Simple NSIS
--   installers should look mostly the same, complex ones should be
--   significantly more maintainable.
@package nsis
@version 0.3.2


-- | List of common Windows Messages
--   
--   2005 Shengalts Aleksander aka Instructor <a>Shengalts@mail.ru</a>
--   
--   For usage example see <tt>Examples/WinMessages.hs</tt>.
--   
--   <pre>
--   Prefix  Message category
--   -------------------------
--   SW      ShowWindow Commands
--   BM      Button control
--   CB      Combo box control
--   EM      Edit control
--   LB      List box control
--   WM      General window
--   ABM     Application desktop toolbar
--   DBT     Device
--   DM      Default push button control
--   HDM     Header control
--   LVM     List view control
--   SB      Status bar window
--   SBM     Scroll bar control
--   STM     Static control
--   TCM     Tab control
--   PBM     Progress bar
--   </pre>
--   
--   <pre>
--   NOT included messages (WM_USER + X)
--   -----------------------------------
--   CBEM    Extended combo box control
--   CDM     Common dialog box
--   DL      Drag list box
--   DTM     Date and time picker control
--   HKM     Hot key control
--   IPM     IP address control
--   MCM     Month calendar control
--   PGM     Pager control
--   PSM     Property sheet
--   RB      Rebar control
--   TB      Toolbar
--   TBM     Trackbar
--   TTM     Tooltip control
--   TVM     Tree-view control
--   UDM     Up-down control
--   </pre>
module Development.NSIS.Plugins.WinMessages
hwnd_BROADCAST :: Num p => p
sw_HIDE :: Num p => p
sw_SHOWNORMAL :: Num p => p
sw_NORMAL :: Num p => p
sw_SHOWMINIMIZED :: Num p => p
sw_SHOWMAXIMIZED :: Num p => p
sw_MAXIMIZE :: Num p => p
sw_SHOWNOACTIVATE :: Num p => p
sw_SHOW :: Num p => p
sw_MINIMIZE :: Num p => p
sw_SHOWMINNOACTIVE :: Num p => p
sw_SHOWNA :: Num p => p
sw_RESTORE :: Num p => p
sw_SHOWDEFAULT :: Num p => p
sw_FORCEMINIMIZE :: Num p => p
sw_MAX :: Num p => p
bm_CLICK :: Num p => p
bm_GETCHECK :: Num p => p
bm_GETIMAGE :: Num p => p
bm_GETSTATE :: Num p => p
bm_SETCHECK :: Num p => p
bm_SETIMAGE :: Num p => p
bm_SETSTATE :: Num p => p
bm_SETSTYLE :: Num p => p
bst_UNCHECKED :: Num p => p
bst_CHECKED :: Num p => p
bst_INDETERMINATE :: Num p => p
bst_PUSHED :: Num p => p
bst_FOCUS :: Num p => p
cb_ADDSTRING :: Num p => p
cb_DELETESTRING :: Num p => p
cb_DIR :: Num p => p
cb_FINDSTRING :: Num p => p
cb_FINDSTRINGEXACT :: Num p => p
cb_GETCOUNT :: Num p => p
cb_GETCURSEL :: Num p => p
cb_GETDROPPEDCONTROLRECT :: Num p => p
cb_GETDROPPEDSTATE :: Num p => p
cb_GETDROPPEDWIDTH :: Num p => p
cb_GETEDITSEL :: Num p => p
cb_GETEXTENDEDUI :: Num p => p
cb_GETHORIZONTALEXTENT :: Num p => p
cb_GETITEMDATA :: Num p => p
cb_GETITEMHEIGHT :: Num p => p
cb_GETLBTEXT :: Num p => p
cb_GETLBTEXTLEN :: Num p => p
cb_GETLOCALE :: Num p => p
cb_GETTOPINDEX :: Num p => p
cb_INITSTORAGE :: Num p => p
cb_INSERTSTRING :: Num p => p
cb_LIMITTEXT :: Num p => p
cb_MSGMAX :: Num p => p
cb_MULTIPLEADDSTRING :: Num p => p
cb_RESETCONTENT :: Num p => p
cb_SELECTSTRING :: Num p => p
cb_SETCURSEL :: Num p => p
cb_SETDROPPEDWIDTH :: Num p => p
cb_SETEDITSEL :: Num p => p
cb_SETEXTENDEDUI :: Num p => p
cb_SETHORIZONTALEXTENT :: Num p => p
cb_SETITEMDATA :: Num p => p
cb_SETITEMHEIGHT :: Num p => p
cb_SETLOCALE :: Num p => p
cb_SETTOPINDEX :: Num p => p
cb_SHOWDROPDOWN :: Num p => p
cb_ERR :: Num a => a
em_CANUNDO :: Num p => p
em_CHARFROMPOS :: Num p => p
em_EMPTYUNDOBUFFER :: Num p => p
em_EXLIMITTEXT :: Num p => p
em_FMTLINES :: Num p => p
em_GETFIRSTVISIBLELINE :: Num p => p
em_GETHANDLE :: Num p => p
em_GETIMESTATUS :: Num p => p
em_GETLIMITTEXT :: Num p => p
em_GETLINE :: Num p => p
em_GETLINECOUNT :: Num p => p
em_GETMARGINS :: Num p => p
em_GETMODIFY :: Num p => p
em_GETPASSWORDCHAR :: Num p => p
em_GETRECT :: Num p => p
em_GETSEL :: Num p => p
em_GETTHUMB :: Num p => p
em_GETWORDBREAKPROC :: Num p => p
em_LIMITTEXT :: Num p => p
em_LINEFROMCHAR :: Num p => p
em_LINEINDEX :: Num p => p
em_LINELENGTH :: Num p => p
em_LINESCROLL :: Num p => p
em_POSFROMCHAR :: Num p => p
em_REPLACESEL :: Num p => p
em_SCROLL :: Num p => p
em_SCROLLCARET :: Num p => p
em_SETHANDLE :: Num p => p
em_SETIMESTATUS :: Num p => p
em_SETLIMITTEXT :: Num p => p
em_SETMARGINS :: Num p => p
em_SETMODIFY :: Num p => p
em_SETPASSWORDCHAR :: Num p => p
em_SETREADONLY :: Num p => p
em_SETRECT :: Num p => p
em_SETRECTNP :: Num p => p
em_SETSEL :: Num p => p
em_SETTABSTOPS :: Num p => p
em_SETWORDBREAKPROC :: Num p => p
em_UNDO :: Num p => p
lb_ADDFILE :: Num p => p
lb_ADDSTRING :: Num p => p
lb_DELETESTRING :: Num p => p
lb_DIR :: Num p => p
lb_FINDSTRING :: Num p => p
lb_FINDSTRINGEXACT :: Num p => p
lb_GETANCHORINDEX :: Num p => p
lb_GETCARETINDEX :: Num p => p
lb_GETCOUNT :: Num p => p
lb_GETCURSEL :: Num p => p
lb_GETHORIZONTALEXTENT :: Num p => p
lb_GETITEMDATA :: Num p => p
lb_GETITEMHEIGHT :: Num p => p
lb_GETITEMRECT :: Num p => p
lb_GETLOCALE :: Num p => p
lb_GETSEL :: Num p => p
lb_GETSELCOUNT :: Num p => p
lb_GETSELITEMS :: Num p => p
lb_GETTEXT :: Num p => p
lb_GETTEXTLEN :: Num p => p
lb_GETTOPINDEX :: Num p => p
lb_INITSTORAGE :: Num p => p
lb_INSERTSTRING :: Num p => p
lb_ITEMFROMPOINT :: Num p => p
lb_MSGMAX :: Num p => p
lb_MULTIPLEADDSTRING :: Num p => p
lb_RESETCONTENT :: Num p => p
lb_SELECTSTRING :: Num p => p
lb_SELITEMRANGE :: Num p => p
lb_SELITEMRANGEEX :: Num p => p
lb_SETANCHORINDEX :: Num p => p
lb_SETCARETINDEX :: Num p => p
lb_SETCOLUMNWIDTH :: Num p => p
lb_SETCOUNT :: Num p => p
lb_SETCURSEL :: Num p => p
lb_SETHORIZONTALEXTENT :: Num p => p
lb_SETITEMDATA :: Num p => p
lb_SETITEMHEIGHT :: Num p => p
lb_SETLOCALE :: Num p => p
lb_SETSEL :: Num p => p
lb_SETTABSTOPS :: Num p => p
lb_SETTOPINDEX :: Num p => p
lb_ERR :: Num a => a
wm_ACTIVATE :: Num p => p
wm_ACTIVATEAPP :: Num p => p
wm_AFXFIRST :: Num p => p
wm_AFXLAST :: Num p => p
wm_APP :: Num p => p
wm_APPCOMMAND :: Num p => p
wm_ASKCBFORMATNAME :: Num p => p
wm_CANCELJOURNAL :: Num p => p
wm_CANCELMODE :: Num p => p
wm_CAPTURECHANGED :: Num p => p
wm_CHANGECBCHAIN :: Num p => p
wm_CHANGEUISTATE :: Num p => p
wm_CHAR :: Num p => p
wm_CHARTOITEM :: Num p => p
wm_CHILDACTIVATE :: Num p => p
wm_CLEAR :: Num p => p
wm_CLOSE :: Num p => p
wm_COMMAND :: Num p => p
wm_COMMNOTIFY :: Num p => p
wm_COMPACTING :: Num p => p
wm_COMPAREITEM :: Num p => p
wm_CONTEXTMENU :: Num p => p
wm_CONVERTREQUESTEX :: Num p => p
wm_COPY :: Num p => p
wm_COPYDATA :: Num p => p
wm_CREATE :: Num p => p
wm_CTLCOLOR :: Num p => p
wm_CTLCOLORBTN :: Num p => p
wm_CTLCOLORDLG :: Num p => p
wm_CTLCOLOREDIT :: Num p => p
wm_CTLCOLORLISTBOX :: Num p => p
wm_CTLCOLORMSGBOX :: Num p => p
wm_CTLCOLORSCROLLBAR :: Num p => p
wm_CTLCOLORSTATIC :: Num p => p
wm_CUT :: Num p => p
wm_DDE_FIRST :: Num p => p
wm_DEADCHAR :: Num p => p
wm_DELETEITEM :: Num p => p
wm_DESTROY :: Num p => p
wm_DESTROYCLIPBOARD :: Num p => p
wm_DEVICECHANGE :: Num p => p
wm_DEVMODECHANGE :: Num p => p
wm_DISPLAYCHANGE :: Num p => p
wm_DRAWCLIPBOARD :: Num p => p
wm_DRAWITEM :: Num p => p
wm_DROPFILES :: Num p => p
wm_ENABLE :: Num p => p
wm_ENDSESSION :: Num p => p
wm_ENTERIDLE :: Num p => p
wm_ENTERMENULOOP :: Num p => p
wm_ENTERSIZEMOVE :: Num p => p
wm_ERASEBKGND :: Num p => p
wm_EXITMENULOOP :: Num p => p
wm_EXITSIZEMOVE :: Num p => p
wm_FONTCHANGE :: Num p => p
wm_GETDLGCODE :: Num p => p
wm_GETFONT :: Num p => p
wm_GETHOTKEY :: Num p => p
wm_GETICON :: Num p => p
wm_GETMINMAXINFO :: Num p => p
wm_GETOBJECT :: Num p => p
wm_GETTEXT :: Num p => p
wm_GETTEXTLENGTH :: Num p => p
wm_HANDHELDFIRST :: Num p => p
wm_HANDHELDLAST :: Num p => p
wm_HELP :: Num p => p
wm_HOTKEY :: Num p => p
wm_HSCROLL :: Num p => p
wm_HSCROLLCLIPBOARD :: Num p => p
wm_ICONERASEBKGND :: Num p => p
wm_IME_CHAR :: Num p => p
wm_IME_COMPOSITION :: Num p => p
wm_IME_COMPOSITIONFULL :: Num p => p
wm_IME_CONTROL :: Num p => p
wm_IME_ENDCOMPOSITION :: Num p => p
wm_IME_KEYDOWN :: Num p => p
wm_IME_KEYLAST :: Num p => p
wm_IME_KEYUP :: Num p => p
wm_IME_NOTIFY :: Num p => p
wm_IME_REQUEST :: Num p => p
wm_IME_SELECT :: Num p => p
wm_IME_SETCONTEXT :: Num p => p
wm_IME_STARTCOMPOSITION :: Num p => p
wm_INITDIALOG :: Num p => p
wm_INITMENU :: Num p => p
wm_INITMENUPOPUP :: Num p => p
wm_INPUT :: Num p => p
wm_INPUTLANGCHANGE :: Num p => p
wm_INPUTLANGCHANGEREQUEST :: Num p => p
wm_KEYDOWN :: Num p => p
wm_KEYFIRST :: Num p => p
wm_KEYLAST :: Num p => p
wm_KEYUP :: Num p => p
wm_KILLFOCUS :: Num p => p
wm_LBUTTONDBLCLK :: Num p => p
wm_LBUTTONDOWN :: Num p => p
wm_LBUTTONUP :: Num p => p
wm_MBUTTONDBLCLK :: Num p => p
wm_MBUTTONDOWN :: Num p => p
wm_MBUTTONUP :: Num p => p
wm_MDIACTIVATE :: Num p => p
wm_MDICASCADE :: Num p => p
wm_MDICREATE :: Num p => p
wm_MDIDESTROY :: Num p => p
wm_MDIGETACTIVE :: Num p => p
wm_MDIICONARRANGE :: Num p => p
wm_MDIMAXIMIZE :: Num p => p
wm_MDINEXT :: Num p => p
wm_MDIREFRESHMENU :: Num p => p
wm_MDIRESTORE :: Num p => p
wm_MDISETMENU :: Num p => p
wm_MDITILE :: Num p => p
wm_MEASUREITEM :: Num p => p
wm_MENUCHAR :: Num p => p
wm_MENUCOMMAND :: Num p => p
wm_MENUDRAG :: Num p => p
wm_MENUGETOBJECT :: Num p => p
wm_MENURBUTTONUP :: Num p => p
wm_MENUSELECT :: Num p => p
wm_MOUSEACTIVATE :: Num p => p
wm_MOUSEFIRST :: Num p => p
wm_MOUSEHOVER :: Num p => p
wm_MOUSELAST :: Num p => p
wm_MOUSELEAVE :: Num p => p
wm_MOUSEMOVE :: Num p => p
wm_MOUSEWHEEL :: Num p => p
wm_MOVE :: Num p => p
wm_MOVING :: Num p => p
wm_NCACTIVATE :: Num p => p
wm_NCCALCSIZE :: Num p => p
wm_NCCREATE :: Num p => p
wm_NCDESTROY :: Num p => p
wm_NCHITTEST :: Num p => p
wm_NCLBUTTONDBLCLK :: Num p => p
wm_NCLBUTTONDOWN :: Num p => p
wm_NCLBUTTONUP :: Num p => p
wm_NCMBUTTONDBLCLK :: Num p => p
wm_NCMBUTTONDOWN :: Num p => p
wm_NCMBUTTONUP :: Num p => p
wm_NCMOUSEHOVER :: Num p => p
wm_NCMOUSELEAVE :: Num p => p
wm_NCMOUSEMOVE :: Num p => p
wm_NCPAINT :: Num p => p
wm_NCRBUTTONDBLCLK :: Num p => p
wm_NCRBUTTONDOWN :: Num p => p
wm_NCRBUTTONUP :: Num p => p
wm_NCXBUTTONDBLCLK :: Num p => p
wm_NCXBUTTONDOWN :: Num p => p
wm_NCXBUTTONUP :: Num p => p
wm_NEXTDLGCTL :: Num p => p
wm_NEXTMENU :: Num p => p
wm_NOTIFY :: Num p => p
wm_NOTIFYFORMAT :: Num p => p
wm_NULL :: Num p => p
wm_PAINT :: Num p => p
wm_PAINTCLIPBOARD :: Num p => p
wm_PAINTICON :: Num p => p
wm_PALETTECHANGED :: Num p => p
wm_PALETTEISCHANGING :: Num p => p
wm_PARENTNOTIFY :: Num p => p
wm_PASTE :: Num p => p
wm_PENWINFIRST :: Num p => p
wm_PENWINLAST :: Num p => p
wm_POWER :: Num p => p
wm_POWERBROADCAST :: Num p => p
wm_PRINT :: Num p => p
wm_PRINTCLIENT :: Num p => p
wm_QUERYDRAGICON :: Num p => p
wm_QUERYENDSESSION :: Num p => p
wm_QUERYNEWPALETTE :: Num p => p
wm_QUERYOPEN :: Num p => p
wm_QUERYUISTATE :: Num p => p
wm_QUEUESYNC :: Num p => p
wm_QUIT :: Num p => p
wm_RBUTTONDBLCLK :: Num p => p
wm_RBUTTONDOWN :: Num p => p
wm_RBUTTONUP :: Num p => p
wm_RASDIALEVENT :: Num p => p
wm_RENDERALLFORMATS :: Num p => p
wm_RENDERFORMAT :: Num p => p
wm_SETCURSOR :: Num p => p
wm_SETFOCUS :: Num p => p
wm_SETFONT :: Num p => p
wm_SETHOTKEY :: Num p => p
wm_SETICON :: Num p => p
wm_SETREDRAW :: Num p => p
wm_SETTEXT :: Num p => p
wm_SETTINGCHANGE :: Num p => p
wm_SHOWWINDOW :: Num p => p
wm_SIZE :: Num p => p
wm_SIZECLIPBOARD :: Num p => p
wm_SIZING :: Num p => p
wm_SPOOLERSTATUS :: Num p => p
wm_STYLECHANGED :: Num p => p
wm_STYLECHANGING :: Num p => p
wm_SYNCPAINT :: Num p => p
wm_SYSCHAR :: Num p => p
wm_SYSCOLORCHANGE :: Num p => p
wm_SYSCOMMAND :: Num p => p
wm_SYSDEADCHAR :: Num p => p
wm_SYSKEYDOWN :: Num p => p
wm_SYSKEYUP :: Num p => p
wm_TABLET_FIRST :: Num p => p
wm_TABLET_LAST :: Num p => p
wm_THEMECHANGED :: Num p => p
wm_TCARD :: Num p => p
wm_TIMECHANGE :: Num p => p
wm_TIMER :: Num p => p
wm_UNDO :: Num p => p
wm_UNICHAR :: Num p => p
wm_UNINITMENUPOPUP :: Num p => p
wm_UPDATEUISTATE :: Num p => p
wm_USER :: Num p => p
wm_USERCHANGED :: Num p => p
wm_VKEYTOITEM :: Num p => p
wm_VSCROLL :: Num p => p
wm_VSCROLLCLIPBOARD :: Num p => p
wm_WINDOWPOSCHANGED :: Num p => p
wm_WINDOWPOSCHANGING :: Num p => p
wm_WININICHANGE :: Num p => p
wm_WTSSESSION_CHANGE :: Num p => p
wm_XBUTTONDBLCLK :: Num p => p
wm_XBUTTONDOWN :: Num p => p
wm_XBUTTONUP :: Num p => p
abm_ACTIVATE :: Num p => p
abm_GETAUTOHIDEBAR :: Num p => p
abm_GETSTATE :: Num p => p
abm_GETTASKBARPOS :: Num p => p
abm_NEW :: Num p => p
abm_QUERYPOS :: Num p => p
abm_REMOVE :: Num p => p
abm_SETAUTOHIDEBAR :: Num p => p
abm_SETPOS :: Num p => p
abm_WINDOWPOSCHANGED :: Num p => p
dbt_APPYBEGIN :: Num p => p
dbt_APPYEND :: Num p => p
dbt_CONFIGCHANGECANCELED :: Num p => p
dbt_CONFIGCHANGED :: Num p => p
dbt_CONFIGMGAPI32 :: Num p => p
dbt_CONFIGMGPRIVATE :: Num p => p
dbt_CUSTOMEVENT :: Num p => p
dbt_DEVICEARRIVAL :: Num p => p
dbt_DEVICEQUERYREMOVE :: Num p => p
dbt_DEVICEQUERYREMOVEFAILED :: Num p => p
dbt_DEVICEREMOVECOMPLETE :: Num p => p
dbt_DEVICEREMOVEPENDING :: Num p => p
dbt_DEVICETYPESPECIFIC :: Num p => p
dbt_DEVNODES_CHANGED :: Num p => p
dbt_DEVTYP_DEVICEINTERFACE :: Num p => p
dbt_DEVTYP_DEVNODE :: Num p => p
dbt_DEVTYP_HANDLE :: Num p => p
dbt_DEVTYP_NET :: Num p => p
dbt_DEVTYP_OEM :: Num p => p
dbt_DEVTYP_PORT :: Num p => p
dbt_DEVTYP_VOLUME :: Num p => p
dbt_LOW_DISK_SPACE :: Num p => p
dbt_MONITORCHANGE :: Num p => p
dbt_NO_DISK_SPACE :: Num p => p
dbt_QUERYCHANGECONFIG :: Num p => p
dbt_SHELLLOGGEDON :: Num p => p
dbt_USERDEFINED :: Num p => p
dbt_VOLLOCKLOCKFAILED :: Num p => p
dbt_VOLLOCKLOCKRELEASED :: Num p => p
dbt_VOLLOCKLOCKTAKEN :: Num p => p
dbt_VOLLOCKQUERYLOCK :: Num p => p
dbt_VOLLOCKQUERYUNLOCK :: Num p => p
dbt_VOLLOCKUNLOCKFAILED :: Num p => p
dbt_VPOWERDAPI :: Num p => p
dbt_VXDINITCOMPLETE :: Num p => p
dm_BITSPERPEL :: Num p => p
dm_COLLATE :: Num p => p
dm_COLOR :: Num p => p
dm_COPIES :: Num p => p
dm_DEFAULTSOURCE :: Num p => p
dm_DISPLAYFLAGS :: Num p => p
dm_DISPLAYFREQUENCY :: Num p => p
dm_DITHERTYPE :: Num p => p
dm_DUPLEX :: Num p => p
dm_FORMNAME :: Num p => p
dm_GRAYSCALE :: Num p => p
dm_ICMINTENT :: Num p => p
dm_ICMMETHOD :: Num p => p
dm_INTERLACED :: Num p => p
dm_LOGPIXELS :: Num p => p
dm_MEDIATYPE :: Num p => p
dm_NUP :: Num p => p
dm_ORIENTATION :: Num p => p
dm_PANNINGHEIGHT :: Num p => p
dm_PANNINGWIDTH :: Num p => p
dm_PAPERLENGTH :: Num p => p
dm_PAPERSIZE :: Num p => p
dm_PAPERWIDTH :: Num p => p
dm_PELSHEIGHT :: Num p => p
dm_PELSWIDTH :: Num p => p
dm_POSITION :: Num p => p
dm_PRINTQUALITY :: Num p => p
dm_SCALE :: Num p => p
dm_SPECVERSION :: Num p => p
dm_TTOPTION :: Num p => p
dm_YRESOLUTION :: Num p => p
hdm_FIRST :: Num p => p
lvm_FIRST :: Num p => p
sb_CONST_ALPHA :: Num p => p
sb_GRAD_RECT :: Num p => p
sb_GRAD_TRI :: Num p => p
sb_NONE :: Num p => p
sb_PIXEL_ALPHA :: Num p => p
sb_PREMULT_ALPHA :: Num p => p
sb_SIMPLEID :: Num p => p
sbm_ENABLE_ARROWS :: Num p => p
sbm_GETPOS :: Num p => p
sbm_GETRANGE :: Num p => p
sbm_GETSCROLLINFO :: Num p => p
sbm_SETPOS :: Num p => p
sbm_SETRANGE :: Num p => p
sbm_SETRANGEREDRAW :: Num p => p
sbm_SETSCROLLINFO :: Num p => p
stm_GETICON :: Num p => p
stm_GETIMAGE :: Num p => p
stm_MSGMAX :: Num p => p
stm_ONLY_THIS_INTERFACE :: Num p => p
stm_ONLY_THIS_NAME :: Num p => p
stm_ONLY_THIS_PROTOCOL :: Num p => p
stm_ONLY_THIS_TYPE :: Num p => p
stm_SETICON :: Num p => p
stm_SETIMAGE :: Num p => p
tcm_FIRST :: Num p => p
pbm_SETRANGE :: Num p => p
pbm_SETPOS :: Num p => p
pbm_DELTAPOS :: Num p => p
pbm_SETSTEP :: Num p => p
pbm_STEPIT :: Num p => p
pbm_GETPOS :: Num p => p
pbm_SETMARQUEE :: Num p => p


-- | NSIS (Nullsoft Scriptable Install System,
--   <a>http://nsis.sourceforge.net/</a>) is a tool that allows programmers
--   to create installers for Windows. This library provides an alternative
--   syntax for NSIS scripts, as an embedded Haskell language, removing
--   much of the hard work in developing an install script. Simple NSIS
--   installers should look mostly the same, complex ones should be
--   significantly more maintainable.
--   
--   As a simple example of using this library:
--   
--   <pre>
--   import <a>Development.NSIS</a>
--   
--   main = writeFile "example1.nsi" $ <a>nsis</a> $ do
--        <a>name</a> "Example1"                  -- The name of the installer
--        <a>outFile</a> "example1.exe"           -- Where to produce the installer
--        <a>installDir</a> "$DESKTOP/Example1"   -- The default installation directory
--        <a>requestExecutionLevel</a> <a>User</a>       -- Request application privileges for Windows Vista
--        -- Pages to display
--        <a>page</a> <a>Directory</a>                   -- Pick where to install
--        <a>page</a> <a>InstFiles</a>                   -- Give a progress bar while installing
--        -- Groups fo files to install
--        <a>section</a> "" [] $ do
--            <a>setOutPath</a> "$INSTDIR"        -- Where to install files in this section
--            <a>file</a> [] "Example1.hs"        -- File to put into this section
--    
--   </pre>
--   
--   The file <tt>example1.nsi</tt> can now be processed with
--   <tt>makensis</tt> to produce the installer <tt>example1.exe</tt>. For
--   more examples, see the <tt>Examples</tt> source directory.
--   
--   Much of the documentation from the Installer section is taken from the
--   NSIS documentation.
module Development.NSIS

-- | Create the contents of an NSIS script from an installer specification.
--   
--   Beware, <a>unsafeInject</a> and <a>unsafeInjectGlobal</a> may break
--   <a>nsis</a>. The optimizer relies on invariants that may not hold when
--   arbitrary lines are injected. Consider using <a>nsisNoOptimise</a> if
--   problems arise.
nsis :: Action a -> String

-- | Like <a>nsis</a>, but don't try and optimise the resulting NSIS
--   script.
--   
--   Useful to figure out how the underlying installer works, or if you
--   believe the optimisations are introducing bugs. Please do report any
--   such bugs, especially if you aren't using <a>unsafeInject</a> or
--   <a>unsafeInjectGlobal</a>!
nsisNoOptimise :: Action a -> String

-- | Monad in which installers are defined. A useful command to start with
--   is <a>section</a>.
data Action a

-- | The type of expressions - namely an <a>Action</a> producing a
--   <a>Value</a>. There are instances for <a>Num</a> and <a>IsString</a>,
--   and turning on <tt>{-# LANGUAGE OverloadedStrings #-}</tt> is strongly
--   recommended.
--   
--   The <a>fromString</a> function converts any embedded <tt>$VAR</tt>
--   into a variable lookup, which may refer to one of the builtin NSIS
--   variables (e.g. <tt>$SMPROGRAMS</tt>, <tt>$TEMP</tt>,
--   <tt>$PROGRAMFILES</tt>), or a named variable created with
--   <a>constant</a> or <a>mutable</a>. The string <tt>$$</tt> is used to
--   escape <tt>$</tt> values. Bracket the variables to put text characters
--   afterwards (e.g. <tt>$(SMPROGRAMS)XXX</tt>). In contrast to standard
--   strings, <tt>/</tt> is treated as <tt>\</tt> and <tt>//</tt> is
--   treated as <tt>/</tt>. Remember to escape any slashes occuring in
--   URLs.
--   
--   If the string is <tt><a>Exp</a> <a>String</a></tt> then any <a>Int</a>
--   variables used will be automatically shown (see <a>strShow</a>). If
--   the string is <tt><a>Exp</a> ty</tt> then it must be of the form
--   <tt>"$VAR"</tt> where <tt>$VAR</tt> is a variable of type <tt>ty</tt>.
--   
--   The <a>Eq</a> and <a>Ord</a> instances for <a>Exp</a> throw errors for
--   all comparisons (use <a>%==</a>, <a>%&lt;=</a> etc), but <a>min</a>
--   and <a>max</a> are defined. The <a>Num</a> (arithmetic) and
--   <a>Monoid</a> (string concatenation) instances are both fully
--   implemented. From <a>Integral</a> and <a>Fractional</a>, only
--   <a>/</a>, <a>mod</a> and <a>div</a> are implemented, and all as
--   integer arithmetic. No functions from <a>Enum</a> or <a>Real</a> are
--   implemented.
--   
--   When using a single expression multiple times, to ensure it is not
--   evaluated repeatedly, use <a>share</a>.
type Exp ty = Action (Value ty)

-- | A <a>Value</a>, only used by <a>Exp</a>, which can be produced using
--   <a>return</a>. The <tt>ty</tt> argument should be one of
--   <a>String</a>, <a>Int</a> or <a>Bool</a>.
data Value ty

-- | The <a>Exp</a> language is call-by-name, meaning you must use share to
--   avoid evaluating an exression multiple times. Using <a>share</a>, if
--   the expression has any side effects they will be run immediately, but
--   not on subsequent uses. When defining functions operating on
--   <a>Exp</a>, if you use the same input expression twice, you should
--   share it. For example:
--   
--   <pre>
--   strPalindrom x = <a>share</a> x $ \x -&gt; x <a>%==</a> strReverse x
--   </pre>
--   
--   If the expression was not shared, and <tt>x</tt> read from a file,
--   then the file would be read twice.
share :: Exp t -> (Exp t -> Action a) -> Action a

-- | Introduce a variable scope. Scopes are automatically introduced by
--   operations such as <a>iff</a>, <a>loop</a>, <a>while</a> etc. Inside a
--   scope you may define new variables whose names may clash with
--   variables outside the scope, but the local versions will be used.
--   
--   If you have any non-evaluated expressions, before introducing any
--   potentially clashing variables in the scope you should <a>share</a>
--   them or use <a>constant_</a> on them. For example:
--   
--   <pre>
--   operate x = do
--       x &lt;- <a>constant_</a> x
--       <a>scope</a> $ do
--           <a>constant</a> "TEST" 0
--   </pre>
--   
--   It is important to turn <tt>x</tt> into a <a>constant_</a> before
--   defining a new constant <tt>$TEST</tt>, since if <tt>x</tt> refers to
--   <tt>$TEST</tt> after the new definition, it will pick up the wrong
--   variable.
scope :: Action a -> Action a

-- | Create a constant with a name, ensuring the expression is shared.
--   After defining the expression, you can refer to it with <tt>$NAME</tt>
--   in a <a>String</a>. To introduce a new scope, see <a>scope</a>.
--   
--   <pre>
--   <a>constant</a> "HELLO" "Hello World"
--   <a>alert</a> "$HELLO!"
--   </pre>
constant :: Typeable t => String -> Exp t -> Action (Exp t)

-- | Create a constant with no name, ensuring the expression is shared.
--   Equivalent to <tt><a>share</a> <a>return</a></tt>.
constant_ :: Exp t -> Action (Exp t)

-- | Create a mutable variable a name, which can be modified with
--   <a>@=</a>. After defining the expression, you can refer to it with
--   <tt>$NAME</tt> in a <a>String</a>. To introduce a new scope, see
--   <a>scope</a>.
--   
--   <pre>
--   h &lt;- <a>mutable</a> "HELLO" "Hello World"
--   "$HELLO" <a>@=</a> "$HELLO!"
--   h        <a>@=</a> "$HELLO!" -- equivalent to the above
--   <a>alert</a> "$HELLO"        -- with 2 exclamation marks
--   </pre>
mutable :: Typeable t => String -> Exp t -> Action (Exp t)

-- | Create an unnamed mutable variable, which can be modified with
--   <a>@=</a>.
--   
--   <pre>
--   h &lt;- <a>mutable</a> "Hello World"
--   h <a>@=</a> <tt>h</tt> <a>&amp;</a> "!"
--   <a>alert</a> h
--   </pre>
mutable_ :: Exp t -> Action (Exp t)

-- | Assign a value to a mutable variable. The variable must have been
--   originally created with <a>mutable</a> or <a>mutable_</a>, or there
--   will be an error when generating the install file.
(@=) :: Exp t -> Exp t -> Action ()
infix 1 @=

-- | Versions of <a>mutable</a> and <a>constant</a> restricted to
--   <a>Exp</a> <a>Int</a>, used to avoid ambiguous type errors.
mutableInt :: String -> Exp Int -> Action (Exp Int)

-- | Versions of <a>mutable</a> and <a>constant</a> restricted to
--   <a>Exp</a> <a>Int</a>, used to avoid ambiguous type errors.
constantInt :: String -> Exp Int -> Action (Exp Int)

-- | Versions of <a>mutable_</a> and <a>constant_</a> restricted to
--   <a>Exp</a> <a>Int</a>, used to avoid ambiguous type errors.
mutableInt_ :: Exp Int -> Action (Exp Int)

-- | Versions of <a>mutable_</a> and <a>constant_</a> restricted to
--   <a>Exp</a> <a>Int</a>, used to avoid ambiguous type errors.
constantInt_ :: Exp Int -> Action (Exp Int)

-- | Versions of <a>mutable</a> and <a>constant</a> restricted to
--   <a>Exp</a> <a>String</a>, used to avoid ambiguous type errors.
mutableStr :: String -> Exp String -> Action (Exp String)

-- | Versions of <a>mutable</a> and <a>constant</a> restricted to
--   <a>Exp</a> <a>String</a>, used to avoid ambiguous type errors.
constantStr :: String -> Exp String -> Action (Exp String)

-- | Versions of <a>mutable_</a> and <a>constant_</a> restricted to
--   <a>Exp</a> <a>String</a>, used to avoid ambiguous type errors.
mutableStr_ :: Exp String -> Action (Exp String)

-- | Versions of <a>mutable_</a> and <a>constant_</a> restricted to
--   <a>Exp</a> <a>String</a>, used to avoid ambiguous type errors.
constantStr_ :: Exp String -> Action (Exp String)

-- | Test a boolean expression, reunning the first action if it is
--   <a>true</a> and the second if it is <a>false</a>. The appropriate
--   branch action will be run within a <a>scope</a>. See <a>?</a> for an
--   expression orientated version.
--   
--   <pre>
--   <a>iff</a> (x <a>%==</a> 12) (<a>alert</a> "is 12") (<a>alert</a> "is not 12")
--   </pre>
iff :: Exp Bool -> Action () -> Action () -> Action ()

-- | A version of <a>iff</a> where there is no else action.
iff_ :: Exp Bool -> Action () -> Action ()

-- | A while loop, run the second argument while the first argument is
--   true. The action is run in a <a>scope</a>. See also <a>loop</a>.
--   
--   <pre>
--   x &lt;- <a>mutable_</a> x
--   <a>while</a> (x <a>%&lt;</a> 10) $ do
--      x <a>@=</a> x <a>+</a> 1
--   </pre>
while :: Exp Bool -> Action () -> Action ()

-- | A loop with a <tt>break</tt> command. Run the action repeatedly until
--   the breaking action is called. The action is run in a <a>scope</a>.
--   See also <a>while</a>.
--   
--   <pre>
--   x &lt;- <a>mutable_</a> x
--   <a>loop</a> $ \break -&gt; do
--       <a>iff_</a> (x <a>%&gt;=</a> 10) break
--       x <a>@=</a> x <a>+</a> 1
--   </pre>
loop :: (Action () -> Action ()) -> Action ()

-- | Run an intitial action, and if that action causes an error, run the
--   second action. Unlike other programming languages, any uncaught errors
--   are silently ignored. All actions are run in <a>scope</a>.
--   
--   <pre>
--   <a>onError</a> (<a>exec</a> "\"$WINDIR/notepad.exe\"") (<a>alert</a> "Failed to run notepad")
--   </pre>
onError :: Action () -> Action () -> Action ()

-- | An expression orientated version of <a>iff</a>, returns the first
--   component if the first argument is <a>true</a> or the second if it is
--   <a>false</a>.
--   
--   <pre>
--   x <a>%==</a> 12 <a>?</a> (x, x <a>+</a> 5)
--   </pre>
(?) :: Exp Bool -> (Exp t, Exp t) -> Exp t
infix 2 ?

-- | Short circuiting boolean operators, equivalent to <a>&amp;&amp;</a>
--   and <a>||</a> but on <a>Exp</a>.
(%&&) :: Exp Bool -> Exp Bool -> Exp Bool
infixr 3 %&&

-- | Short circuiting boolean operators, equivalent to <a>&amp;&amp;</a>
--   and <a>||</a> but on <a>Exp</a>.
(%||) :: Exp Bool -> Exp Bool -> Exp Bool
infixr 2 %||

-- | A code label, used for <tt>goto</tt> programming, see <a>newLabel</a>.
data Label

-- | Create a new label, used with <a>goto</a> and <a>label</a> to write
--   line jump based programming. Where possible you should use structured
--   alternatives, such as <a>iff</a>, <a>while</a> and <a>loop</a>. Each
--   created label must be used with one call to <a>label</a>, and any
--   number of calls to <a>goto</a>. As an example:
--   
--   <pre>
--   abort &lt;- <a>newLabel</a>
--   <a>while</a> var $ do
--       <a>iff_</a> cond1 $ <a>goto</a> abort
--       <a>iff_</a> cond2 $ <a>goto</a> abort
--       var <a>@=</a> <a>strDrop</a> 1 var 
--   <a>label</a> abort
--   </pre>
--   
--   Note that the above example could have been written in a simpler
--   manner with <a>loop</a>.
newLabel :: Action Label

-- | Define the location of a <a>label</a>, see <a>newLabel</a> for
--   details. This function will fail if the same <a>Label</a> is passed to
--   <a>label</a> more than once.
label :: Label -> Action ()

-- | Jump to a <a>label</a>, see <a>newLabel</a> for details. This function
--   will fail if <a>label</a> is not used on the <a>Label</a>.
goto :: Label -> Action ()

-- | Lift a <a>String</a> into an <a>Exp</a>
str :: String -> Exp String

-- | Lift an <a>Int</a> into an <a>Exp</a>
int :: Int -> Exp Int

-- | Lift a <a>Bool</a> into an <a>Exp</a>
bool :: Bool -> Exp Bool

-- | The standard equality operators, lifted to <a>Exp</a>.
(%==) :: Exp a -> Exp a -> Exp Bool
infix 4 %==

-- | The standard equality operators, lifted to <a>Exp</a>.
(%/=) :: Exp a -> Exp a -> Exp Bool
infix 4 %/=

-- | The standard comparison operators, lifted to <a>Exp</a>.
(%<=) :: Exp Int -> Exp Int -> Exp Bool
infix 4 %<=

-- | The standard comparison operators, lifted to <a>Exp</a>.
(%<) :: Exp Int -> Exp Int -> Exp Bool
infix 4 %<

-- | The standard comparison operators, lifted to <a>Exp</a>.
(%>=) :: Exp Int -> Exp Int -> Exp Bool
infix 4 %>=

-- | The standard comparison operators, lifted to <a>Exp</a>.
(%>) :: Exp Int -> Exp Int -> Exp Bool
infix 4 %>

-- | Boolean constants corresponding to <a>True</a> and <a>False</a>
true :: Exp Bool

-- | Boolean constants corresponding to <a>True</a> and <a>False</a>
false :: Exp Bool

-- | Boolean negation.
not_ :: Exp Bool -> Exp Bool

-- | Convert a <a>String</a> to an <a>Int</a>, any errors are silently
--   ignored.
strRead :: Exp String -> Exp Int

-- | Convert an <a>Int</a> to a <a>String</a> by showing it.
strShow :: Exp Int -> Exp String

-- | Concatenate two strings, for example <tt>"$FOO" &amp; "$BAR"</tt> is
--   equivalent to <tt>"$FOO$BAR"</tt>.
(&) :: Exp String -> Exp String -> Exp String
infixr 5 &

-- | Perform string concatenation on a list of expressions.
strConcat :: [Exp String] -> Exp String

-- | Return the length of a string, <tt>strLength "test" <a>%==</a> 4</tt>.
strLength :: Exp String -> Exp Int

-- | Take the first <tt>n</tt> characters from a string, <tt>strTake 2
--   "test" <a>%==</a> "te"</tt>.
strTake :: Exp Int -> Exp String -> Exp String

-- | Drop the first <tt>n</tt> characters from a string, <tt>strDrop 2
--   "test" <a>%==</a> "st"</tt>.
strDrop :: Exp Int -> Exp String -> Exp String

-- | Replace one string with another string, in a target string. As some
--   examples:
--   
--   <pre>
--   strReplace "t" "XX" "test" %== "XXesXX"
--   strReplace "ell" "" "hello world" %== "ho world"
--   </pre>
strReplace :: Exp String -> Exp String -> Exp String -> Exp String

-- | Is the first string a prefix of the second.
strIsPrefixOf :: Exp String -> Exp String -> Exp Bool

-- | Is the first string a prefix of the second.
strIsSuffixOf :: Exp String -> Exp String -> Exp Bool

-- | Join together a list of strings with <tt>\r\n</tt> after each line.
--   Note that unlike standard <a>unlines</a>, we use the Windows
--   convention line separator.
strUnlines :: [Exp String] -> Exp String

-- | NSIS (the underlying installer, not this library) uses fixed length
--   string buffers, defaulting to 1024 bytes. Any strings longer than the
--   limit may cause truncation or segfaults. You can get builds supporting
--   longer strings from <a>http://nsis.sourceforge.net/Special_Builds</a>.
--   
--   Given <tt>strCheck msg val</tt>, if <tt>val</tt> exceeds the limit it
--   will <a>abort</a> with <tt>msg</tt>, otherwise it will return
--   <a>val</a>.
strCheck :: Exp String -> Exp String -> Exp String

-- | The type of a file handle, created by <a>fileOpen</a>.
data FileHandle

-- | Open a file, which must be closed explicitly with <a>fileClose</a>.
--   Often it is better to use <a>writeFile'</a> or <a>withFile</a>
--   instead.
--   
--   <pre>
--   h &lt;- <a>fileOpen</a> <a>ModeWrite</a> "C:/log.txt"
--   <a>fileWrite</a> h "Hello world!"
--   <a>fileClose</a> h
--   </pre>
fileOpen :: FileMode -> Exp FilePath -> Action (Exp FileHandle)

-- | Write a string to a file openned with <a>fileOpen</a>.
fileWrite :: Exp FileHandle -> Exp String -> Action ()

-- | Close a file file openned with <a>fileOpen</a>.
fileClose :: Exp FileHandle -> Action ()

-- | With a <a>fileOpen</a> perform some action, then automatically call
--   <a>fileClose</a>. If the action argument jumps out of the section then
--   the <a>fileClose</a> call will be missed.
withFile' :: FileMode -> Exp FilePath -> (Exp FileHandle -> Action ()) -> Action ()

-- | Write a file, like <a>writeFile</a>.
writeFile' :: Exp FilePath -> Exp String -> Action ()

-- | Write a file comprising of a set of lines.
writeFileLines :: Exp FilePath -> [Exp String] -> Action ()

-- | Remove the specified directory (fully qualified path with no
--   wildcards). Without <a>Recursive</a>, the directory will only be
--   removed if it is completely empty. If <a>Recursive</a> is specified,
--   the directory will be removed recursively, so all directories and
--   files in the specified directory will be removed. If <a>RebootOK</a>
--   is specified, any file or directory which could not have been removed
--   during the process will be removed on reboot -- if any file or
--   directory will be removed on a reboot, the reboot flag will be set.
--   The error flag is set if any file or directory cannot be removed.
--   
--   <pre>
--   rmdir [] "$INSTDIR"
--   rmdir [] "$INSTDIR/data"
--   rmdir [Recursive, RebootOK] "$INSTDIR"
--   rmdir [RebootOK] "$INSTDIR/DLLs"
--   </pre>
--   
--   Note that the current working directory can not be deleted. The
--   current working directory is set by <a>setOutPath</a>. For example,
--   the following example will not delete the directory.
--   
--   <pre>
--   setOutPath "$TEMP/dir"
--   rmdir [] "$TEMP/dir"
--   </pre>
--   
--   The next example will succeed in deleting the directory.
--   
--   <pre>
--   setOutPath "$TEMP/dir"
--   setOutPath "$TEMP"
--   rmdir [] "$TEMP/dir"
--   </pre>
--   
--   Warning: using <tt>rmdir [Recursive] "$INSTDIR"</tt> in
--   <a>uninstall</a> is not safe. Though it is unlikely, the user might
--   select to install to the Program Files folder and so this command will
--   wipe out the entire Program Files folder, including other programs
--   that has nothing to do with the uninstaller. The user can also put
--   other files but the program's files and would expect them to get
--   deleted with the program. Solutions are available for easily
--   uninstalling only files which were installed by the installer.
rmdir :: [Attrib] -> Exp FilePath -> Action ()

-- | Delete file (which can be a file or wildcard, but should be specified
--   with a full path) from the target system. If <a>RebootOK</a> is
--   specified and the file cannot be deleted then the file is deleted when
--   the system reboots -- if the file will be deleted on a reboot, the
--   reboot flag will be set. The error flag is set if files are found and
--   cannot be deleted. The error flag is not set from trying to delete a
--   file that does not exist.
--   
--   <pre>
--   delete [] "$INSTDIR/somefile.dat"
--   </pre>
delete :: [Attrib] -> Exp FilePath -> Action ()

-- | Both file paths are on the installing system. Do not use relative
--   paths.
copyFiles :: [Attrib] -> Exp FilePath -> Exp FilePath -> Action ()

-- | Gets the last write time of the file, you should only use the result
--   to compare for equality with other results from <a>getFileTime</a>. On
--   failure the error flag is set.
getFileTime :: Exp FilePath -> Exp String

-- | Checks for existence of file(s) (which can be a wildcard, or a
--   directory). If you want to check to see if a file is a directory, use
--   <tt>fileExists "DIRECTORY/*.*"</tt>.
--   
--   <pre>
--   iff_ (fileExists "$WINDIR/notepad.exe") $
--       messageBox [MB_OK] "notepad is installed"
--   </pre>
fileExists :: Exp FilePath -> Exp Bool

-- | Performs a search for filespec, running the action with each file
--   found. If no files are found the error flag is set. Note that the
--   filename output is without path.
--   
--   <pre>
--   findEach "$INSTDIR/*.txt" $ \x -&gt;
--       detailPrint x
--   </pre>
--   
--   If you jump from inside the loop to after the loop then you may leak a
--   search handle.
findEach :: Exp FilePath -> (Exp FilePath -> Action ()) -> Action ()

-- | Creates (recursively if necessary) the specified directory. Errors can
--   be caught using <a>onError</a>. You should always specify an absolute
--   path.
--   
--   <pre>
--   createDirectory "$INSTDIR/some/directory"
--   </pre>
createDirectory :: Exp FilePath -> Action ()

-- | Creates a shortcut file that links to a <tt>Traget</tt> file, with
--   optional <a>Parameters</a>. The icon used for the shortcut is
--   <a>IconFile</a>,<a>IconIndex</a>. <a>StartOptions</a> should be one
--   of: SW_SHOWNORMAL, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED.
--   <a>KeyboardShortcut</a> should be in the form of 'flag|c' where flag
--   can be a combination (using |) of: ALT, CONTROL, EXT, or SHIFT. c is
--   the character to use (a-z, A-Z, 0-9, F1-F24, etc). Note that no spaces
--   are allowed in this string. A good example is "ALT|CONTROL|F8".
--   <tt>$OUTDIR</tt> is used for the working directory. You can change it
--   by using <a>setOutPath</a> before creating the Shortcut.
--   <a>Description</a> should be the description of the shortcut, or
--   comment as it is called under XP. The error flag is set if the
--   shortcut cannot be created (i.e. either of the paths (link or target)
--   does not exist, or some other error).
--   
--   <pre>
--   createDirectory "$SMPROGRAMS/My Company"
--   createShortcut "$SMPROGRAMS/My Company/My Program.lnk"
--      [Target "$INSTDIR/My Program.exe"
--      ,Parameters "some command line parameters"
--      ,IconFile "$INSTDIR/My Program.exe", IconIndex 2
--      ,StartOptions "SW_SHOWNORMAL"
--      ,KeyboardShortcut "ALT|CONTROL|SHIFT|F5"
--      ,Description "a description"]
--   </pre>
createShortcut :: Exp FilePath -> [Attrib] -> Action ()
readRegStr :: HKEY -> Exp String -> Exp String -> Exp String
deleteRegKey :: HKEY -> Exp String -> Action ()
deleteRegValue :: HKEY -> Exp String -> Exp String -> Action ()
writeRegStr :: HKEY -> Exp String -> Exp String -> Exp String -> Action ()
writeRegExpandStr :: HKEY -> Exp String -> Exp String -> Exp String -> Action ()
writeRegDWORD :: HKEY -> Exp String -> Exp String -> Exp Int -> Action ()
envVar :: Exp String -> Exp String

-- | Execute the specified program and continue immediately. Note that the
--   file specified must exist on the target system, not the compiling
--   system. <tt>$OUTDIR</tt> is used for the working directory. Errors can
--   be caught using <a>onError</a>. Note, if the command could have
--   spaces, you should put it in quotes to delimit it from parameters.
--   e.g.: <tt>exec "\"$INSTDIR/command.exe\" parameters"</tt>. If you
--   don't put it in quotes it will not work on Windows 9x with or without
--   parameters.
--   
--   <pre>
--   exec "\"$INSTDIR/someprogram.exe\""
--   exec "\"$INSTDIR/someprogram.exe\" some parameters"
--   </pre>
exec :: Exp String -> Action ()
execWait :: Exp String -> Action ()
execShell :: [ShowWindow] -> Exp String -> Action ()

-- | Sleep time in milliseconds
sleep :: Exp Int -> Action ()
abort :: Exp String -> Action ()
type HWND = Exp Int
hwndParent :: HWND
findWindow :: Exp String -> Exp String -> Maybe HWND -> Action HWND
getDlgItem :: HWND -> Exp Int -> Action HWND
sendMessage :: [Attrib] -> HWND -> Exp Int -> Exp a -> Exp b -> Action (Exp Int)

-- | Call a plugin. If the arguments are of different types use
--   <a>exp_</a>. As an example:
--   
--   <pre>
--   encrypt x = <a>share</a> x $ \x -&gt; do
--       <a>plugin</a> "Base64" "Encrypt" [<a>exp_</a> x, <a>exp_</a> $ <a>strLength</a> x]
--   </pre>
--   
--   The only thing to be careful about is that we use the <tt>x</tt>
--   parameter twice, so should <a>share</a> it to ensure it is only
--   evaluated once.
plugin :: String -> String -> [Exp a] -> Action ()

-- | Push a value onto the stack. Only useful with <a>plugin</a>.
push :: Exp a -> Action ()

-- | Pop a value off the stack, will set an error if there is nothing on
--   the stack. Only useful with <a>plugin</a>.
pop :: Exp String

-- | Erase the type of an Exp, only useful with <a>plugin</a>.
exp_ :: Exp a -> Exp ()

-- | Add a plugin directory
addPluginDir :: Exp String -> Action ()

-- | Sets the name of the installer. The name is usually simply the product
--   name such as 'MyApp' or 'Company MyApp'.
--   
--   <pre>
--   name "MyApp"
--   </pre>
name :: Exp String -> Action ()

-- | Specifies the output file that <tt>MakeNSIS</tt> should write the
--   installer to. This is just the file that MakeNSIS writes, it doesn't
--   affect the contents of the installer. Usually should end with
--   <tt>.exe</tt>.
--   
--   <pre>
--   outFile "installer.exe"
--   </pre>
outFile :: Exp FilePath -> Action ()

-- | Sets the default installation directory. Note that the part of this
--   string following the last <tt>\</tt> will be used if the user selects
--   <tt>browse</tt>, and may be appended back on to the string at install
--   time (to disable this, end the directory with a <tt>\</tt>). If this
--   doesn't make any sense, play around with the browse button a bit.
--   
--   <pre>
--   installDir "$PROGRAMFILES/MyApp"
--   </pre>
installDir :: Exp FilePath -> Action ()
setCompressor :: Compressor -> [Attrib] -> Action ()

-- | Set the icon used for the installer/uninstaller.
--   
--   <pre>
--   installIcon "$NSISDIR/Contrib/Graphics/Icons/modern-install.ico"
--   </pre>
installIcon :: Exp FilePath -> Action ()

-- | Set the icon used for the installer/uninstaller.
--   
--   <pre>
--   installIcon "$NSISDIR/Contrib/Graphics/Icons/modern-install.ico"
--   </pre>
uninstallIcon :: Exp FilePath -> Action ()

-- | Set the image used for the header splash. Pass <a>Nothing</a> to use
--   the default header image.
--   
--   <pre>
--   headerImage $ Just "$NSISDIR/Contrib/Graphics/Header/win.bmp"
--   </pre>
headerImage :: Maybe (Exp FilePath) -> Action ()

-- | This attribute tells the installer to check a string in the registry,
--   and use it for the install dir if that string is valid. If this
--   attribute is present, it will override the <a>installDir</a> attribute
--   if the registry key is valid, otherwise it will fall back to the
--   <a>installDir</a> default. When querying the registry, this command
--   will automatically remove any quotes. If the string ends in ".exe", it
--   will automatically remove the filename component of the string (i.e.
--   if the string is "C:<i>program files</i>foo/foo.exe", it will know to
--   use "C:<i>program files</i>foo").
--   
--   <pre>
--   installDirRegKey HKLM "Software/NSIS" ""
--   installDirRegKey HKLM "Software/ACME/Thingy" "InstallLocation"
--   </pre>
installDirRegKey :: HKEY -> Exp String -> Exp String -> Action ()
allowRootDirInstall :: Bool -> Action ()
caption :: Exp String -> Action ()
showInstDetails :: Visibility -> Action ()
showUninstDetails :: Visibility -> Action ()

-- | Note: Requires NSIS 3.0
unicode :: Bool -> Action ()
requestExecutionLevel :: Level -> Action ()
data SectionId
section :: Exp String -> [Attrib] -> Action () -> Action SectionId
sectionGroup :: Exp String -> [Attrib] -> Action () -> Action SectionId
newSectionId :: Action SectionId
sectionSetText :: SectionId -> Exp String -> Action ()
sectionGetText :: SectionId -> Exp String
sectionSet :: SectionId -> SectionFlag -> Exp Bool -> Action ()
sectionGet :: SectionId -> SectionFlag -> Exp Bool
uninstall :: Action () -> Action ()
page :: Page -> Action ()
unpage :: Page -> Action ()
finishOptions :: FinishOptions

-- | Create a function, useful for registering actions
event :: String -> Action () -> Action ()
onSelChange :: Action () -> Action ()
onPageShow :: Page -> Action () -> Action ()
onPagePre :: Page -> Action () -> Action ()
onPageLeave :: Page -> Action () -> Action ()
file :: [Attrib] -> Exp FilePath -> Action ()

-- | Set all <a>file</a> actions to automatically take <a>NonFatal</a>.
alwaysNonFatal :: Action () -> Action ()

-- | Writes the uninstaller to the filename (and optionally path)
--   specified. Only valid from within an install section, and requires
--   that you have an <a>uninstall</a> section in your script. You can call
--   this one or more times to write out one or more copies of the
--   uninstaller.
--   
--   <pre>
--   writeUninstaller "$INSTDIR/uninstaller.exe"
--   </pre>
writeUninstaller :: Exp FilePath -> Action ()

-- | Show an alert, equivalent to <tt>messageBox [MB_ICONEXCLAMATION]</tt>.
alert :: Exp String -> Action ()

-- | Sets the output path (<tt>$OUTDIR</tt>) and creates it (recursively if
--   necessary), if it does not exist. Must be a full pathname, usually is
--   just <tt>$INSTDIR</tt>.
--   
--   <pre>
--   setOutPath "$INSTDIR"
--   </pre>
setOutPath :: Exp FilePath -> Action ()
messageBox :: [MessageBoxType] -> Exp String -> Action (Exp String)

-- | While the action is executing, do not update the progress bar. Useful
--   for functions which do a large amount of computation, or have loops.
hideProgress :: Action a -> Action a
detailPrint :: Exp String -> Action ()
setDetailsPrint :: DetailsPrint -> Action ()

-- | Inject arbitrary text into a non-global section of the script.
unsafeInject :: String -> Action ()

-- | Inject arbitrary text into the script's global header section.
unsafeInjectGlobal :: String -> Action ()
data Compressor
LZMA :: Compressor
ZLIB :: Compressor
BZIP2 :: Compressor
data HKEY
HKCR :: HKEY
HKEY_CLASSES_ROOT :: HKEY
HKLM :: HKEY
HKEY_LOCAL_MACHINE :: HKEY
HKCU :: HKEY
HKEY_CURRENT_USER :: HKEY
HKU :: HKEY
HKEY_USERS :: HKEY
HKCC :: HKEY
HKEY_CURRENT_CONFIG :: HKEY
HKDD :: HKEY
HKEY_DYN_DATA :: HKEY
HKPD :: HKEY
HKEY_PERFORMANCE_DATA :: HKEY
SHCTX :: HKEY
SHELL_CONTEXT :: HKEY
data MessageBoxType

-- | Display with an OK button
MB_OK :: MessageBoxType

-- | Display with an OK and a cancel button
MB_OKCANCEL :: MessageBoxType

-- | Display with abort, retry, ignore buttons
MB_ABORTRETRYIGNORE :: MessageBoxType

-- | Display with retry and cancel buttons
MB_RETRYCANCEL :: MessageBoxType

-- | Display with yes and no buttons
MB_YESNO :: MessageBoxType

-- | Display with yes, no, cancel buttons
MB_YESNOCANCEL :: MessageBoxType

-- | Display with exclamation icon
MB_ICONEXCLAMATION :: MessageBoxType

-- | Display with information icon
MB_ICONINFORMATION :: MessageBoxType

-- | Display with question mark icon
MB_ICONQUESTION :: MessageBoxType

-- | Display with stop icon
MB_ICONSTOP :: MessageBoxType

-- | Display with installer's icon
MB_USERICON :: MessageBoxType

-- | Make messagebox topmost
MB_TOPMOST :: MessageBoxType

-- | Set foreground
MB_SETFOREGROUND :: MessageBoxType

-- | Right align text
MB_RIGHT :: MessageBoxType

-- | RTL reading order
MB_RTLREADING :: MessageBoxType

-- | Button 1 is default
MB_DEFBUTTON1 :: MessageBoxType

-- | Button 2 is default
MB_DEFBUTTON2 :: MessageBoxType

-- | Button 3 is default
MB_DEFBUTTON3 :: MessageBoxType

-- | Button 4 is default
MB_DEFBUTTON4 :: MessageBoxType
data Attrib
Solid :: Attrib
Final :: Attrib
RebootOK :: Attrib
Silent :: Attrib
FilesOnly :: Attrib
NonFatal :: Attrib
Recursive :: Attrib
Unselected :: Attrib
Expanded :: Attrib
Description :: (Exp String) -> Attrib
Required :: Attrib
Target :: (Exp String) -> Attrib
Parameters :: (Exp String) -> Attrib
IconFile :: (Exp String) -> Attrib
IconIndex :: (Exp Int) -> Attrib
StartOptions :: String -> Attrib
KeyboardShortcut :: String -> Attrib
Id :: SectionId -> Attrib
Timeout :: Int -> Attrib
OName :: (Exp String) -> Attrib
data Page
License :: FilePath -> Page
Components :: Page
Directory :: Page
InstFiles :: Page
Confirm :: Page
Finish :: FinishOptions -> Page
data Level
None :: Level
User :: Level
Highest :: Level
Admin :: Level
data Visibility
Hide :: Visibility
Show :: Visibility
NeverShow :: Visibility

-- | Mode to use with 'Development.
data FileMode

-- | Read a file.
ModeRead :: FileMode
ModeWrite :: FileMode

-- | Opened for both read and write, contents preserved.
ModeAppend :: FileMode
data SectionFlag
SF_Selected :: SectionFlag
SF_SectionGroup :: SectionFlag
SF_SectionGroupEnd :: SectionFlag
SF_Bold :: SectionFlag
SF_ReadOnly :: SectionFlag
SF_Expand :: SectionFlag
SF_PartiallySelected :: SectionFlag
data ShowWindow
SW_SHOWDEFAULT :: ShowWindow
SW_SHOWNORMAL :: ShowWindow
SW_SHOWMAXIMIZED :: ShowWindow
SW_SHOWMINIMIZED :: ShowWindow
SW_HIDE :: ShowWindow
data FinishOptions
FinishOptions :: String -> String -> String -> Bool -> String -> String -> Bool -> String -> String -> FinishOptions
[finRun] :: FinishOptions -> String
[finRunText] :: FinishOptions -> String
[finRunParamters] :: FinishOptions -> String
[finRunChecked] :: FinishOptions -> Bool
[finReadme] :: FinishOptions -> String
[finReadmeText] :: FinishOptions -> String
[finReadmeChecked] :: FinishOptions -> Bool
[finLink] :: FinishOptions -> String
[finLinkText] :: FinishOptions -> String

-- | Value to use with <tt>setDetailsPrint</tt>.
data DetailsPrint
NoDetailsPrint :: DetailsPrint
ListOnly :: DetailsPrint
TextOnly :: DetailsPrint
Both :: DetailsPrint
LastUsed :: DetailsPrint


-- | Windows 7 Taskbar Progress plugin:
--   <a>http://nsis.sourceforge.net/TaskbarProgress_plug-in</a>
module Development.NSIS.Plugins.Taskbar

-- | Enable Windows 7 taskbar plugin, called anywhere.
taskbar :: Action ()


-- | Plugin to change how many sections can be selected at once.
module Development.NSIS.Plugins.Sections
atMostOneSection :: [SectionId] -> Action ()
exactlyOneSection :: [SectionId] -> Action ()


-- | Module for updating environment variables. All functions take either
--   <a>HKLM</a> to modify the variable for the machine, or <a>HKCU</a> to
--   modify for the user.
--   
--   <i>Warning:</i> If you are modifying PATH, make sure you use a special
--   build of NSIS which can cope with longer strings, or you will corrupt
--   your users path.
module Development.NSIS.Plugins.EnvVarUpdate

-- | Read a variable from the registry. If you are not modifying the
--   variable you should use <a>envVar</a> instead.
getEnvVar :: HKEY -> Exp String -> Exp String

-- | Set an environment variable by writing to the registry.
setEnvVar :: HKEY -> Exp String -> Exp String -> Action ()

-- | Delete the environment variable in the registry.
deleteEnvVar :: HKEY -> Exp String -> Action ()
setEnvVarAppend :: HKEY -> Exp String -> Exp String -> Action ()
setEnvVarPrepend :: HKEY -> Exp String -> Exp String -> Action ()
setEnvVarRemove :: HKEY -> Exp String -> Exp String -> Action ()


-- | Base64 plugin: <a>http://nsis.sourceforge.net/Base64_plug-in</a>
module Development.NSIS.Plugins.Base64

-- | Base64 data encryption.
encrypt :: Exp String -> Exp String

-- | Base64 decryption. Reverse of <a>encrypt</a>.
decrypt :: Exp String -> Exp String
