Graphics.Win32.Menu

Win32-2.6.2.1: A binding to Windows Win32 API.

Copyright | (c) Alastair Reid 1997-2003
License | BSD-style (see the file libraries/base/LICENSE)
Maintainer | Esa Ilari Vuokko <ei@vuokko.info>
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Graphics.Win32.Menu

Description

A collection of FFI declarations for interfacing with Win32.

# Documentation

type MenuName = LPCTSTR #

checkMenuItem :: HMENU -> MenuItem -> MenuFlag -> IO Bool #

c_CheckMenuItem :: HMENU -> UINT -> UINT -> IO DWORD #

checkMenuRadioItem :: HMENU -> MenuItem -> MenuItem -> MenuItem -> MenuFlag -> IO () #

c_CheckMenuRadioItem :: HMENU -> UINT -> UINT -> UINT -> UINT -> IO Bool #

createMenu :: IO HMENU #

c_CreateMenu :: IO HMENU #

createPopupMenu :: IO HMENU #

c_CreatePopupMenu :: IO HMENU #

drawMenuBar :: HWND -> IO () #

c_DrawMenuBar :: HWND -> IO Bool #

type MenuState = MenuFlag #

enableMenuItem :: HMENU -> MenuItem -> MenuFlag -> IO MenuState #

c_EnableMenuItem :: HMENU -> UINT -> UINT -> IO MenuState #

type GMDIFlag = UINT #

type MenuFlag = UINT #

gMDI_USEDISABLED :: GMDIFlag #

gMDI_GOINTOPOPUPS :: GMDIFlag #

mF_BYCOMMAND :: MenuFlag #

mF_BYPOSITION :: MenuFlag #

mF_CHECKED :: MenuFlag #

type MenuItem = UINT #

mF_INSERT :: MenuItem #

mF_CHANGE :: MenuItem #

mF_APPEND :: MenuItem #

mF_DELETE :: MenuItem #

mF_REMOVE :: MenuItem #

mF_USECHECKBITMAPS :: MenuItem #

mF_POPUP :: MenuItem #

mFT_STRING :: MenuFlag #

mF_SYSMENU :: MenuItem #

mFT_BITMAP :: MenuFlag #

mF_HELP :: MenuItem #

mFT_MENUBARBREAK :: MenuFlag #

mF_MOUSESELECT :: MenuItem #

mFT_MENUBREAK :: MenuFlag #

mF_END :: MenuItem #

mFT_OWNERDRAW :: MenuFlag #

mFT_RADIOCHECK :: MenuFlag #

mFT_SEPARATOR :: MenuFlag #

mFS_GRAYED :: MenuState #

mFT_RIGHTORDER :: MenuFlag #

mFS_DISABLED :: MenuState #

mFT_RIGHTJUSTIFY :: MenuFlag #

mFS_CHECKED :: MenuState #

mFS_HILITE :: MenuState #

mFS_ENABLED :: MenuState #

mFS_UNCHECKED :: MenuState #

type TrackMenuFlag = UINT #

mFS_UNHILITE :: MenuState #

tPM_LEFTBUTTON :: TrackMenuFlag #

mFS_DEFAULT :: MenuState #

tPM_RIGHTBUTTON :: TrackMenuFlag #

tPM_LEFTALIGN :: TrackMenuFlag #

tPM_CENTERALIGN :: TrackMenuFlag #

tPM_RIGHTALIGN :: TrackMenuFlag #

tPM_TOPALIGN :: TrackMenuFlag #

tPM_VCENTERALIGN :: TrackMenuFlag #

tPM_BOTTOMALIGN :: TrackMenuFlag #

type SystemMenuCommand = UINT #

tPM_HORIZONTAL :: TrackMenuFlag #

sC_SIZE :: SystemMenuCommand #

tPM_VERTICAL :: TrackMenuFlag #

sC_MOVE :: SystemMenuCommand #

tPM_NONOTIFY :: TrackMenuFlag #

sC_MINIMIZE :: SystemMenuCommand #

tPM_RETURNCMD :: TrackMenuFlag #

sC_MAXIMIZE :: SystemMenuCommand #

sC_NEXTWINDOW :: SystemMenuCommand #

sC_PREVWINDOW :: SystemMenuCommand #

sC_CLOSE :: SystemMenuCommand #

sC_VSCROLL :: SystemMenuCommand #

sC_HSCROLL :: SystemMenuCommand #

sC_MOUSEMENU :: SystemMenuCommand #

sC_KEYMENU :: SystemMenuCommand #

sC_ARRANGE :: SystemMenuCommand #

isMenu :: HMENU -> IO Bool #

sC_RESTORE :: SystemMenuCommand #

getSystemMenu :: HWND -> Bool -> IO (Maybe HMENU) #

sC_TASKLIST :: SystemMenuCommand #

sC_SCREENSAVE :: SystemMenuCommand #

c_GetSystemMenu :: HWND -> Bool -> IO HMENU #

sC_HOTKEY :: SystemMenuCommand #

getMenu :: HWND -> IO (Maybe HMENU) #

sC_DEFAULT :: SystemMenuCommand #

sC_MONITORPOWER :: SystemMenuCommand #

c_GetMenu :: HWND -> IO HMENU #

sC_CONTEXTHELP :: SystemMenuCommand #

getMenuDefaultItem :: HMENU -> Bool -> GMDIFlag -> IO MenuItem #

sC_SEPARATOR :: SystemMenuCommand #

c_GetMenuDefaultItem :: HMENU -> Bool -> UINT -> IO UINT #

getMenuState :: HMENU -> MenuItem -> MenuFlag -> IO MenuState #

c_GetMenuState :: HMENU -> UINT -> UINT -> IO MenuState #

getSubMenu :: HMENU -> MenuItem -> IO (Maybe HMENU) #

c_GetSubMenu :: HMENU -> UINT -> IO HMENU #

setMenu :: HWND -> HMENU -> IO () #

c_SetMenu :: HWND -> HMENU -> IO Bool #

getMenuItemCount :: HMENU -> IO Int #

c_GetMenuItemCount :: HMENU -> IO Int #

type MenuID = UINT #

getMenuItemID :: HMENU -> MenuItem -> IO MenuID #

c_GetMenuItemID :: HMENU -> UINT -> IO MenuID #

data MenuItemInfo #

Constructors

MenuItemInfo |
Fields menuItemType :: MenuFlag menuItemState :: MenuState menuItemID :: UINT menuItemSubMenu :: HMENU menuItemBitmapChecked :: HBITMAP menuItemBitmapUnchecked :: HBITMAP menuItemData :: DWORD menuItemTypeData :: String

peekMenuItemInfo :: Ptr MenuItemInfo -> IO MenuItemInfo #

allocaMenuItemInfo :: (Ptr MenuItemInfo -> IO a) -> IO a #

withMenuItemInfo :: MenuItemInfo -> (Ptr MenuItemInfo -> IO a) -> IO a #

type MenuItemMask = UINT #

mIIM_CHECKMARKS :: MenuItemMask #

mIIM_DATA :: MenuItemMask #

mIIM_ID :: MenuItemMask #

mIIM_STATE :: MenuItemMask #

mIIM_SUBMENU :: MenuItemMask #

pokeFMask :: Ptr MenuItemInfo -> MenuItemMask -> IO () #

mIIM_TYPE :: MenuItemMask #

getMenuItemInfo :: HMENU -> MenuItem -> Bool -> MenuItemMask -> IO MenuItemInfo #

c_GetMenuItemInfo :: HMENU -> UINT -> Bool -> Ptr MenuItemInfo -> IO Bool #

getMenuItemRect :: HWND -> HMENU -> MenuItem -> IO RECT #

c_GetMenuItemRect :: HWND -> HMENU -> UINT -> LPRECT -> IO Bool #

hiliteMenuItem :: HWND -> HMENU -> MenuItem -> MenuFlag -> IO Bool #

insertMenuItem :: HMENU -> MenuItem -> Bool -> MenuItemInfo -> IO () #

c_InsertMenuItem :: HMENU -> UINT -> Bool -> Ptr MenuItemInfo -> IO Bool #

type Menu = LPCTSTR #

loadMenu :: Maybe HINSTANCE -> Menu -> IO HMENU #

c_LoadMenu :: HINSTANCE -> Menu -> IO HMENU #

menuItemFromPoint :: HWND -> HMENU -> POINT -> IO UINT #

setMenuDefaultItem :: HMENU -> MenuItem -> Bool -> IO () #

c_SetMenuDefaultItem :: HMENU -> MenuItem -> Bool -> IO Bool #

setMenuItemBitmaps :: HMENU -> MenuItem -> MenuFlag -> HBITMAP -> HBITMAP -> IO () #

c_SetMenuItemBitmaps :: HMENU -> UINT -> UINT -> HBITMAP -> HBITMAP -> IO Bool #

destroyMenu :: HMENU -> IO () #

c_DestroyMenu :: HMENU -> IO Bool #

deleteMenu :: HMENU -> MenuItem -> MenuFlag -> IO () #

c_DeleteMenu :: HMENU -> UINT -> UINT -> IO Bool #

setMenuItemInfo :: HMENU -> MenuItem -> Bool -> MenuItemMask -> MenuItemInfo -> IO () #

c_SetMenuItemInfo :: HMENU -> UINT -> Bool -> Ptr MenuItemInfo -> IO Bool #

trackPopupMenu :: HMENU -> TrackMenuFlag -> Int -> Int -> HWND -> RECT -> IO () #

c_TrackPopupMenu :: HMENU -> TrackMenuFlag -> Int -> Int -> Int -> HWND -> LPRECT -> IO Bool #

type TPMPARAMS = () #

withTPMPARAMS :: Ptr RECT -> (Ptr TPMPARAMS -> IO a) -> IO a #

trackPopupMenuEx :: HMENU -> TrackMenuFlag -> Int -> Int -> HWND -> Maybe (Ptr RECT) -> IO () #

c_TrackPopupMenuEx :: HMENU -> TrackMenuFlag -> Int -> Int -> HWND -> Ptr TPMPARAMS -> IO Bool #

appendMenu :: HMENU -> MenuFlag -> MenuID -> Maybe String -> IO () #

c_AppendMenu :: HMENU -> UINT -> MenuID -> LPCTSTR -> IO Bool #

insertMenu :: HMENU -> MenuItem -> MenuFlag -> MenuID -> Maybe String -> IO () #

c_InsertMenu :: HMENU -> UINT -> UINT -> MenuID -> LPCTSTR -> IO Bool #

modifyMenu :: HMENU -> MenuItem -> MenuFlag -> MenuID -> Maybe String -> IO () #

c_ModifyMenu :: HMENU -> UINT -> UINT -> MenuID -> LPCTSTR -> IO Bool #

removeMenu :: HMENU -> MenuItem -> MenuFlag -> IO () #

c_RemoveMenu :: HMENU -> UINT -> UINT -> IO Bool #