{-# LINE 1 "libraries\\Win32\\Graphics\\Win32\\GDI\\Palette.hsc" #-}
{-# LINE 2 "libraries\\Win32\\Graphics\\Win32\\GDI\\Palette.hsc" #-}
{-# LANGUAGE Safe #-}
{-# LINE 6 "libraries\\Win32\\Graphics\\Win32\\GDI\\Palette.hsc" #-}
module Graphics.Win32.GDI.Palette where
import System.Win32.Types
import Graphics.Win32.GDI.Types
#include "windows_cconv.h"
type StockPalette = WORD
dEFAULT_PALETTE :: StockPalette
dEFAULT_PALETTE = 15
{-# LINE 37 "libraries\\Win32\\Graphics\\Win32\\GDI\\Palette.hsc" #-}
getStockPalette :: StockPalette -> IO HPALETTE
getStockPalette sp =
failIfNull "GetStockPalette" $ c_GetStockPalette sp
foreign import WINDOWS_CCONV unsafe "windows.h GetStockObject"
c_GetStockPalette :: StockPalette -> IO HPALETTE
deletePalette :: HPALETTE -> IO ()
deletePalette p =
failIfFalse_ "DeletePalette" $ c_DeletePalette p
foreign import WINDOWS_CCONV unsafe "windows.h DeleteObject"
c_DeletePalette :: HPALETTE -> IO Bool