module Graphics.UI.Gtk.Printing.PrintSettings (
PrintSettings,
PrintSettingsClass,
castToPrintSettings,
toPrintSettings,
PageOrientation(..),
NumberUpLayout(..),
PrintQuality(..),
PrintDuplex(..),
PrintPages(..),
PageSet(..),
printSettingsNew,
printSettingsNewFromFile,
printSettingsCopy,
printSettingsHasKey,
printSettingsGet,
printSettingsSet,
printSettingsUnset,
printSettingsForeach,
printSettingsGetBool,
printSettingsSetBool,
printSettingsGetDouble,
printSettingsGetDoubleWithDefault,
printSettingsSetDouble,
printSettingsGetLength,
printSettingsSetLength,
printSettingsGetInt,
printSettingsGetIntWithDefault,
printSettingsSetInt,
printSettingsGetPaperWidth,
printSettingsSetPaperWidth,
printSettingsGetPaperHeight,
printSettingsSetPaperHeight,
printSettingsSetResolutionXy,
printSettingsGetResolutionX,
printSettingsGetResolutionY,
printSettingsLoadFile,
printSettingsToFile,
printSettingsPrinter,
printSettingsOrientation,
printSettingsPaperSize,
printSettingsUseColor,
printSettingsCollate,
printSettingsReverse,
printSettingsDuplex,
printSettingsQuality,
printSettingsNCopies,
printSettingsNumberUp,
printSettingsResolution,
printSettingsScale,
printSettingsPrintPages,
printSettingsPageSet,
printSettingsDefaultSource,
printSettingsMediaType,
printSettingsDither,
printSettingsFinishings,
printSettingsOutputBin,
printSettingsNumberUpLayout,
printSettingsPrinterLpi,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Attributes
import System.Glib.UTFString
import System.Glib.GError
import Graphics.UI.Gtk.Types
import Graphics.UI.Gtk.Printing.PaperSize (PaperSize(PaperSize), mkPaperSize, Unit(..))
data PageOrientation = PageOrientationPortrait
| PageOrientationLandscape
| PageOrientationReversePortrait
| PageOrientationReverseLandscape
deriving (Enum,Bounded,Eq,Show)
data PrintQuality = PrintQualityLow
| PrintQualityNormal
| PrintQualityHigh
| PrintQualityDraft
deriving (Enum,Bounded,Eq,Show)
data PrintDuplex = PrintDuplexSimplex
| PrintDuplexHorizontal
| PrintDuplexVertical
deriving (Enum,Bounded,Eq,Show)
data PrintPages = PrintPagesAll
| PrintPagesCurrent
| PrintPagesRanges
| PrintPagesSelection
deriving (Enum,Bounded,Eq,Show)
data PageSet = PageSetAll
| PageSetEven
| PageSetOdd
deriving (Enum,Bounded,Eq,Show)
data NumberUpLayout = NumberUpLayoutLeftToRightTopToBottom
| NumberUpLayoutLeftToRightBottomToTop
| NumberUpLayoutRightToLeftTopToBottom
| NumberUpLayoutRightToLeftBottomToTop
| NumberUpLayoutTopToBottomLeftToRight
| NumberUpLayoutTopToBottomRightToLeft
| NumberUpLayoutBottomToTopLeftToRight
| NumberUpLayoutBottomToTopRightToLeft
deriving (Enum,Bounded,Eq,Show)
printSettingsNew :: IO PrintSettings
printSettingsNew =
wrapNewGObject mkPrintSettings $
gtk_print_settings_new
printSettingsNewFromFile :: GlibFilePath fp
=> fp
-> IO PrintSettings
printSettingsNewFromFile fileName =
wrapNewGObject mkPrintSettings $
propagateGError $ \errorPtr ->
withUTFFilePath fileName $ \fileNamePtr ->
gtk_print_settings_new_from_file
fileNamePtr
errorPtr
printSettingsCopy :: PrintSettingsClass self => self
-> IO PrintSettings
printSettingsCopy self =
wrapNewGObject mkPrintSettings $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_copy argPtr1)
(toPrintSettings self)
printSettingsHasKey :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO Bool
printSettingsHasKey self key =
liftM toBool $
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_has_key argPtr1 arg2)
(toPrintSettings self)
keyPtr
printSettingsGet :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO string
printSettingsGet self key =
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get argPtr1 arg2)
(toPrintSettings self)
keyPtr
>>= peekUTFString
printSettingsSet :: (PrintSettingsClass self, GlibString string) => self
-> string
-> string
-> IO ()
printSettingsSet self key value =
withUTFString value $ \valuePtr ->
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set argPtr1 arg2 arg3)
(toPrintSettings self)
keyPtr
valuePtr
printSettingsUnset :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO ()
printSettingsUnset self key =
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_unset argPtr1 arg2)
(toPrintSettings self)
keyPtr
printSettingsForeach :: PrintSettingsClass self => self
-> (String -> IO ())
-> IO ()
printSettingsForeach self func = do
funcPtr <- mkPrintSettingsFunc $ \_ strPtr _ -> do
str <- peekCString strPtr
func str
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_foreach argPtr1 arg2 arg3)
(toPrintSettings self)
funcPtr
(castFunPtrToPtr funcPtr)
type PrintSettingsFunc = FunPtr (((Ptr CChar) -> ((Ptr CChar) -> ((Ptr ()) -> (IO ())))))
foreign import ccall "wrapper" mkPrintSettingsFunc ::
(CString -> CString -> Ptr () -> IO ())
-> IO PrintSettingsFunc
printSettingsGetBool :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO Bool
printSettingsGetBool self key =
liftM toBool $
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_bool argPtr1 arg2)
(toPrintSettings self)
keyPtr
printSettingsSetBool :: (PrintSettingsClass self, GlibString string) => self
-> string
-> Bool
-> IO ()
printSettingsSetBool self key value =
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_bool argPtr1 arg2 arg3)
(toPrintSettings self)
keyPtr
(fromBool value)
printSettingsGetDouble :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO Double
printSettingsGetDouble self key =
liftM realToFrac $
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_double argPtr1 arg2)
(toPrintSettings self)
keyPtr
printSettingsGetDoubleWithDefault :: (PrintSettingsClass self, GlibString string) => self
-> string
-> Double
-> IO Double
printSettingsGetDoubleWithDefault self key def =
liftM realToFrac $
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_double_with_default argPtr1 arg2 arg3)
(toPrintSettings self)
keyPtr
(realToFrac def)
printSettingsSetDouble :: (PrintSettingsClass self, GlibString string) => self
-> string
-> Double
-> IO ()
printSettingsSetDouble self key value =
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_double argPtr1 arg2 arg3)
(toPrintSettings self)
keyPtr
(realToFrac value)
printSettingsGetLength :: (PrintSettingsClass self, GlibString string) => self
-> string
-> Unit
-> IO Double
printSettingsGetLength self key unit =
liftM realToFrac $
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_length argPtr1 arg2 arg3)
(toPrintSettings self)
keyPtr
((fromIntegral . fromEnum) unit)
printSettingsSetLength :: (PrintSettingsClass self, GlibString string) => self
-> string
-> Double
-> Unit
-> IO ()
printSettingsSetLength self key value unit =
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_length argPtr1 arg2 arg3 arg4)
(toPrintSettings self)
keyPtr
(realToFrac value)
((fromIntegral . fromEnum) unit)
printSettingsGetInt :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO Int
printSettingsGetInt self key =
liftM fromIntegral $
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_int argPtr1 arg2)
(toPrintSettings self)
keyPtr
printSettingsGetIntWithDefault :: (PrintSettingsClass self, GlibString string) => self
-> string
-> Int
-> IO Int
printSettingsGetIntWithDefault self key def =
liftM fromIntegral $
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_int_with_default argPtr1 arg2 arg3)
(toPrintSettings self)
keyPtr
(fromIntegral def)
printSettingsSetInt :: (PrintSettingsClass self, GlibString string) => self
-> string
-> Int
-> IO ()
printSettingsSetInt self key value =
withUTFString key $ \keyPtr ->
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_int argPtr1 arg2 arg3)
(toPrintSettings self)
keyPtr
(fromIntegral value)
printSettingsGetPrinter :: (PrintSettingsClass self, GlibString string) => self
-> IO string
printSettingsGetPrinter self =
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_printer argPtr1)
(toPrintSettings self)
>>= peekUTFString
printSettingsSetPrinter :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO ()
printSettingsSetPrinter self printer =
withUTFString printer $ \printerPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_printer argPtr1 arg2)
(toPrintSettings self)
printerPtr
printSettingsGetOrientation :: PrintSettingsClass self => self
-> IO PageOrientation
printSettingsGetOrientation self =
liftM (toEnum . fromIntegral) $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_orientation argPtr1)
(toPrintSettings self)
printSettingsSetOrientation :: PrintSettingsClass self => self
-> PageOrientation
-> IO ()
printSettingsSetOrientation self orientation =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_orientation argPtr1 arg2)
(toPrintSettings self)
((fromIntegral . fromEnum) orientation)
printSettingsGetPaperSize :: PrintSettingsClass self => self
-> IO PaperSize
printSettingsGetPaperSize self =
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_paper_size argPtr1)
(toPrintSettings self)
>>= mkPaperSize . castPtr
printSettingsSetPaperSize :: PrintSettingsClass self => self
-> PaperSize
-> IO ()
printSettingsSetPaperSize self (PaperSize paperSize) =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_paper_size argPtr1 arg2)
(toPrintSettings self)
(castPtr $ unsafeForeignPtrToPtr $ paperSize)
printSettingsGetPaperWidth :: PrintSettingsClass self => self
-> Unit
-> IO Double
printSettingsGetPaperWidth self unit =
liftM realToFrac $
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_paper_width argPtr1 arg2)
(toPrintSettings self)
((fromIntegral . fromEnum) unit)
printSettingsSetPaperWidth :: PrintSettingsClass self => self
-> Double
-> Unit
-> IO ()
printSettingsSetPaperWidth self width unit =
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_paper_width argPtr1 arg2 arg3)
(toPrintSettings self)
(realToFrac width)
((fromIntegral . fromEnum) unit)
printSettingsGetPaperHeight :: PrintSettingsClass self => self
-> Unit
-> IO Double
printSettingsGetPaperHeight self unit =
liftM realToFrac $
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_paper_height argPtr1 arg2)
(toPrintSettings self)
((fromIntegral . fromEnum) unit)
printSettingsSetPaperHeight :: PrintSettingsClass self => self
-> Double
-> Unit
-> IO ()
printSettingsSetPaperHeight self height unit =
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_paper_height argPtr1 arg2 arg3)
(toPrintSettings self)
(realToFrac height)
((fromIntegral . fromEnum) unit)
printSettingsGetUseColor :: PrintSettingsClass self => self
-> IO Bool
printSettingsGetUseColor self =
liftM toBool $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_use_color argPtr1)
(toPrintSettings self)
printSettingsSetUseColor :: PrintSettingsClass self => self
-> Bool
-> IO ()
printSettingsSetUseColor self useColor =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_use_color argPtr1 arg2)
(toPrintSettings self)
(fromBool useColor)
printSettingsGetCollate :: PrintSettingsClass self => self
-> IO Bool
printSettingsGetCollate self =
liftM toBool $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_collate argPtr1)
(toPrintSettings self)
printSettingsSetCollate :: PrintSettingsClass self => self
-> Bool
-> IO ()
printSettingsSetCollate self collate =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_collate argPtr1 arg2)
(toPrintSettings self)
(fromBool collate)
printSettingsGetReverse :: PrintSettingsClass self => self
-> IO Bool
printSettingsGetReverse self =
liftM toBool $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_reverse argPtr1)
(toPrintSettings self)
printSettingsSetReverse :: PrintSettingsClass self => self
-> Bool
-> IO ()
printSettingsSetReverse self reverse =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_reverse argPtr1 arg2)
(toPrintSettings self)
(fromBool reverse)
printSettingsGetDuplex :: PrintSettingsClass self => self
-> IO PrintDuplex
printSettingsGetDuplex self =
liftM (toEnum . fromIntegral) $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_duplex argPtr1)
(toPrintSettings self)
printSettingsSetDuplex :: PrintSettingsClass self => self
-> PrintDuplex
-> IO ()
printSettingsSetDuplex self duplex =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_duplex argPtr1 arg2)
(toPrintSettings self)
((fromIntegral . fromEnum) duplex)
printSettingsGetQuality :: PrintSettingsClass self => self
-> IO PrintQuality
printSettingsGetQuality self =
liftM (toEnum . fromIntegral) $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_quality argPtr1)
(toPrintSettings self)
printSettingsSetQuality :: PrintSettingsClass self => self
-> PrintQuality
-> IO ()
printSettingsSetQuality self quality =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_quality argPtr1 arg2)
(toPrintSettings self)
((fromIntegral . fromEnum) quality)
printSettingsGetNCopies :: PrintSettingsClass self => self
-> IO Int
printSettingsGetNCopies self =
liftM fromIntegral $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_n_copies argPtr1)
(toPrintSettings self)
printSettingsSetNCopies :: PrintSettingsClass self => self
-> Int
-> IO ()
printSettingsSetNCopies self numCopies =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_n_copies argPtr1 arg2)
(toPrintSettings self)
(fromIntegral numCopies)
printSettingsGetNumberUp :: PrintSettingsClass self => self
-> IO Int
printSettingsGetNumberUp self =
liftM fromIntegral $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_number_up argPtr1)
(toPrintSettings self)
printSettingsSetNumberUp :: PrintSettingsClass self => self
-> Int
-> IO ()
printSettingsSetNumberUp self numberUp =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_number_up argPtr1 arg2)
(toPrintSettings self)
(fromIntegral numberUp)
printSettingsGetNumberUpLayout :: PrintSettingsClass self => self
-> IO NumberUpLayout
printSettingsGetNumberUpLayout self =
liftM (toEnum . fromIntegral) $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_number_up_layout argPtr1)
(toPrintSettings self)
printSettingsSetNumberUpLayout :: PrintSettingsClass self => self
-> NumberUpLayout
-> IO ()
printSettingsSetNumberUpLayout self numberUpLayout =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_number_up_layout argPtr1 arg2)
(toPrintSettings self)
((fromIntegral . fromEnum) numberUpLayout)
printSettingsGetResolution :: PrintSettingsClass self => self
-> IO Int
printSettingsGetResolution self =
liftM fromIntegral $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_resolution argPtr1)
(toPrintSettings self)
printSettingsSetResolution :: PrintSettingsClass self => self
-> Int
-> IO ()
printSettingsSetResolution self resolution =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_resolution argPtr1 arg2)
(toPrintSettings self)
(fromIntegral resolution)
printSettingsSetResolutionXy :: PrintSettingsClass self => self
-> Int
-> Int
-> IO ()
printSettingsSetResolutionXy self resolutionX resolutionY =
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_resolution_xy argPtr1 arg2 arg3)
(toPrintSettings self)
(fromIntegral resolutionX)
(fromIntegral resolutionY)
printSettingsGetResolutionX :: PrintSettingsClass self => self
-> IO Int
printSettingsGetResolutionX self =
liftM fromIntegral $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_resolution_x argPtr1)
(toPrintSettings self)
printSettingsGetResolutionY :: PrintSettingsClass self => self
-> IO Int
printSettingsGetResolutionY self =
liftM fromIntegral $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_resolution_y argPtr1)
(toPrintSettings self)
printSettingsGetPrinterLpi :: PrintSettingsClass self => self
-> IO Double
printSettingsGetPrinterLpi self =
liftM realToFrac $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_printer_lpi argPtr1)
(toPrintSettings self)
printSettingsSetPrinterLpi :: PrintSettingsClass self => self
-> Double
-> IO ()
printSettingsSetPrinterLpi self lpi =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_printer_lpi argPtr1 arg2)
(toPrintSettings self)
(realToFrac lpi)
printSettingsGetScale :: PrintSettingsClass self => self
-> IO Double
printSettingsGetScale self =
liftM realToFrac $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_scale argPtr1)
(toPrintSettings self)
printSettingsSetScale :: PrintSettingsClass self => self
-> Double
-> IO ()
printSettingsSetScale self scale =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_scale argPtr1 arg2)
(toPrintSettings self)
(realToFrac scale)
printSettingsGetPrintPages :: PrintSettingsClass self => self
-> IO PrintPages
printSettingsGetPrintPages self =
liftM (toEnum . fromIntegral) $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_print_pages argPtr1)
(toPrintSettings self)
printSettingsSetPrintPages :: PrintSettingsClass self => self
-> PrintPages
-> IO ()
printSettingsSetPrintPages self pages =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_print_pages argPtr1 arg2)
(toPrintSettings self)
((fromIntegral . fromEnum) pages)
printSettingsGetPageSet :: PrintSettingsClass self => self
-> IO PageSet
printSettingsGetPageSet self =
liftM (toEnum . fromIntegral) $
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_page_set argPtr1)
(toPrintSettings self)
printSettingsSetPageSet :: PrintSettingsClass self => self
-> PageSet
-> IO ()
printSettingsSetPageSet self pageSet =
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_page_set argPtr1 arg2)
(toPrintSettings self)
((fromIntegral . fromEnum) pageSet)
printSettingsGetDefaultSource :: (PrintSettingsClass self, GlibString string) => self
-> IO string
printSettingsGetDefaultSource self =
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_default_source argPtr1)
(toPrintSettings self)
>>= peekUTFString
printSettingsSetDefaultSource :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO ()
printSettingsSetDefaultSource self defaultSource =
withUTFString defaultSource $ \defaultSourcePtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_default_source argPtr1 arg2)
(toPrintSettings self)
defaultSourcePtr
printSettingsGetMediaType :: (PrintSettingsClass self, GlibString string) => self
-> IO string
printSettingsGetMediaType self =
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_media_type argPtr1)
(toPrintSettings self)
>>= peekUTFString
printSettingsSetMediaType :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO ()
printSettingsSetMediaType self mediaType =
withUTFString mediaType $ \mediaTypePtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_media_type argPtr1 arg2)
(toPrintSettings self)
mediaTypePtr
printSettingsGetDither :: (PrintSettingsClass self, GlibString string) => self
-> IO string
printSettingsGetDither self =
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_dither argPtr1)
(toPrintSettings self)
>>= peekUTFString
printSettingsSetDither :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO ()
printSettingsSetDither self dither =
withUTFString dither $ \ditherPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_dither argPtr1 arg2)
(toPrintSettings self)
ditherPtr
printSettingsGetFinishings :: (PrintSettingsClass self, GlibString string) => self
-> IO string
printSettingsGetFinishings self =
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_finishings argPtr1)
(toPrintSettings self)
>>= peekUTFString
printSettingsSetFinishings :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO ()
printSettingsSetFinishings self finishings =
withUTFString finishings $ \finishingsPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_finishings argPtr1 arg2)
(toPrintSettings self)
finishingsPtr
printSettingsGetOutputBin :: (PrintSettingsClass self, GlibString string) => self
-> IO string
printSettingsGetOutputBin self =
(\(PrintSettings arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_get_output_bin argPtr1)
(toPrintSettings self)
>>= peekUTFString
printSettingsSetOutputBin :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO ()
printSettingsSetOutputBin self outputBin =
withUTFString outputBin $ \outputBinPtr ->
(\(PrintSettings arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_set_output_bin argPtr1 arg2)
(toPrintSettings self)
outputBinPtr
printSettingsLoadFile :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO Bool
printSettingsLoadFile self fileName =
liftM toBool $
propagateGError $ \errorPtr ->
withUTFString fileName $ \fileNamePtr ->
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_load_file argPtr1 arg2 arg3)
(toPrintSettings self)
fileNamePtr
errorPtr
printSettingsToFile :: (PrintSettingsClass self, GlibString string) => self
-> string
-> IO Bool
printSettingsToFile self fileName =
liftM toBool $
propagateGError $ \errorPtr ->
withUTFString fileName $ \fileNamePtr ->
(\(PrintSettings arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_print_settings_to_file argPtr1 arg2 arg3)
(toPrintSettings self)
fileNamePtr
errorPtr
printSettingsPrinter :: (PrintSettingsClass self, GlibString string) => Attr self string
printSettingsPrinter = newAttr
printSettingsGetPrinter
printSettingsSetPrinter
printSettingsOrientation :: PrintSettingsClass self => Attr self PageOrientation
printSettingsOrientation = newAttr
printSettingsGetOrientation
printSettingsSetOrientation
printSettingsPaperSize :: PrintSettingsClass self => Attr self PaperSize
printSettingsPaperSize = newAttr
printSettingsGetPaperSize
printSettingsSetPaperSize
printSettingsUseColor :: PrintSettingsClass self => Attr self Bool
printSettingsUseColor = newAttr
printSettingsGetUseColor
printSettingsSetUseColor
printSettingsCollate :: PrintSettingsClass self => Attr self Bool
printSettingsCollate = newAttr
printSettingsGetCollate
printSettingsSetCollate
printSettingsReverse :: PrintSettingsClass self => Attr self Bool
printSettingsReverse = newAttr
printSettingsGetReverse
printSettingsSetReverse
printSettingsDuplex :: PrintSettingsClass self => Attr self PrintDuplex
printSettingsDuplex = newAttr
printSettingsGetDuplex
printSettingsSetDuplex
printSettingsQuality :: PrintSettingsClass self => Attr self PrintQuality
printSettingsQuality = newAttr
printSettingsGetQuality
printSettingsSetQuality
printSettingsNCopies :: PrintSettingsClass self => Attr self Int
printSettingsNCopies = newAttr
printSettingsGetNCopies
printSettingsSetNCopies
printSettingsNumberUp :: PrintSettingsClass self => Attr self Int
printSettingsNumberUp = newAttr
printSettingsGetNumberUp
printSettingsSetNumberUp
printSettingsResolution :: PrintSettingsClass self => Attr self Int
printSettingsResolution = newAttr
printSettingsGetResolution
printSettingsSetResolution
printSettingsScale :: PrintSettingsClass self => Attr self Double
printSettingsScale = newAttr
printSettingsGetScale
printSettingsSetScale
printSettingsPrintPages :: PrintSettingsClass self => Attr self PrintPages
printSettingsPrintPages = newAttr
printSettingsGetPrintPages
printSettingsSetPrintPages
printSettingsPageSet :: PrintSettingsClass self => Attr self PageSet
printSettingsPageSet = newAttr
printSettingsGetPageSet
printSettingsSetPageSet
printSettingsDefaultSource :: (PrintSettingsClass self, GlibString string) => Attr self string
printSettingsDefaultSource = newAttr
printSettingsGetDefaultSource
printSettingsSetDefaultSource
printSettingsMediaType :: (PrintSettingsClass self, GlibString string) => Attr self string
printSettingsMediaType = newAttr
printSettingsGetMediaType
printSettingsSetMediaType
printSettingsDither :: (PrintSettingsClass self, GlibString string) => Attr self string
printSettingsDither = newAttr
printSettingsGetDither
printSettingsSetDither
printSettingsFinishings :: (PrintSettingsClass self, GlibString string) => Attr self string
printSettingsFinishings = newAttr
printSettingsGetFinishings
printSettingsSetFinishings
printSettingsOutputBin :: (PrintSettingsClass self, GlibString string) => Attr self string
printSettingsOutputBin = newAttr
printSettingsGetOutputBin
printSettingsSetOutputBin
printSettingsNumberUpLayout :: PrintSettingsClass self => Attr self NumberUpLayout
printSettingsNumberUpLayout = newAttr
printSettingsGetNumberUpLayout
printSettingsSetNumberUpLayout
printSettingsPrinterLpi :: PrintSettingsClass self => Attr self Double
printSettingsPrinterLpi = newAttr
printSettingsGetPrinterLpi
printSettingsSetPrinterLpi
foreign import ccall safe "gtk_print_settings_new"
gtk_print_settings_new :: (IO (Ptr PrintSettings))
foreign import ccall safe "gtk_print_settings_new_from_file"
gtk_print_settings_new_from_file :: ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO (Ptr PrintSettings))))
foreign import ccall safe "gtk_print_settings_copy"
gtk_print_settings_copy :: ((Ptr PrintSettings) -> (IO (Ptr PrintSettings)))
foreign import ccall safe "gtk_print_settings_has_key"
gtk_print_settings_has_key :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "gtk_print_settings_get"
gtk_print_settings_get :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO (Ptr CChar))))
foreign import ccall safe "gtk_print_settings_set"
gtk_print_settings_set :: ((Ptr PrintSettings) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ()))))
foreign import ccall safe "gtk_print_settings_unset"
gtk_print_settings_unset :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_settings_foreach"
gtk_print_settings_foreach :: ((Ptr PrintSettings) -> ((FunPtr ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ()))))
foreign import ccall safe "gtk_print_settings_get_bool"
gtk_print_settings_get_bool :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "gtk_print_settings_set_bool"
gtk_print_settings_set_bool :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_print_settings_get_double"
gtk_print_settings_get_double :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO CDouble)))
foreign import ccall safe "gtk_print_settings_get_double_with_default"
gtk_print_settings_get_double_with_default :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (CDouble -> (IO CDouble))))
foreign import ccall safe "gtk_print_settings_set_double"
gtk_print_settings_set_double :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (CDouble -> (IO ()))))
foreign import ccall safe "gtk_print_settings_get_length"
gtk_print_settings_get_length :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (CInt -> (IO CDouble))))
foreign import ccall safe "gtk_print_settings_set_length"
gtk_print_settings_set_length :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (CDouble -> (CInt -> (IO ())))))
foreign import ccall safe "gtk_print_settings_get_int"
gtk_print_settings_get_int :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "gtk_print_settings_get_int_with_default"
gtk_print_settings_get_int_with_default :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (CInt -> (IO CInt))))
foreign import ccall safe "gtk_print_settings_set_int"
gtk_print_settings_set_int :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_print_settings_get_printer"
gtk_print_settings_get_printer :: ((Ptr PrintSettings) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_print_settings_set_printer"
gtk_print_settings_set_printer :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_orientation"
gtk_print_settings_get_orientation :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_orientation"
gtk_print_settings_set_orientation :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_paper_size"
gtk_print_settings_get_paper_size :: ((Ptr PrintSettings) -> (IO (Ptr ())))
foreign import ccall safe "gtk_print_settings_set_paper_size"
gtk_print_settings_set_paper_size :: ((Ptr PrintSettings) -> ((Ptr ()) -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_paper_width"
gtk_print_settings_get_paper_width :: ((Ptr PrintSettings) -> (CInt -> (IO CDouble)))
foreign import ccall safe "gtk_print_settings_set_paper_width"
gtk_print_settings_set_paper_width :: ((Ptr PrintSettings) -> (CDouble -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_print_settings_get_paper_height"
gtk_print_settings_get_paper_height :: ((Ptr PrintSettings) -> (CInt -> (IO CDouble)))
foreign import ccall safe "gtk_print_settings_set_paper_height"
gtk_print_settings_set_paper_height :: ((Ptr PrintSettings) -> (CDouble -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_print_settings_get_use_color"
gtk_print_settings_get_use_color :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_use_color"
gtk_print_settings_set_use_color :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_collate"
gtk_print_settings_get_collate :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_collate"
gtk_print_settings_set_collate :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_reverse"
gtk_print_settings_get_reverse :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_reverse"
gtk_print_settings_set_reverse :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_duplex"
gtk_print_settings_get_duplex :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_duplex"
gtk_print_settings_set_duplex :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_quality"
gtk_print_settings_get_quality :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_quality"
gtk_print_settings_set_quality :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_n_copies"
gtk_print_settings_get_n_copies :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_n_copies"
gtk_print_settings_set_n_copies :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_number_up"
gtk_print_settings_get_number_up :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_number_up"
gtk_print_settings_set_number_up :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_number_up_layout"
gtk_print_settings_get_number_up_layout :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_number_up_layout"
gtk_print_settings_set_number_up_layout :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_resolution"
gtk_print_settings_get_resolution :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_resolution"
gtk_print_settings_set_resolution :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_set_resolution_xy"
gtk_print_settings_set_resolution_xy :: ((Ptr PrintSettings) -> (CInt -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_print_settings_get_resolution_x"
gtk_print_settings_get_resolution_x :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_get_resolution_y"
gtk_print_settings_get_resolution_y :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_get_printer_lpi"
gtk_print_settings_get_printer_lpi :: ((Ptr PrintSettings) -> (IO CDouble))
foreign import ccall safe "gtk_print_settings_set_printer_lpi"
gtk_print_settings_set_printer_lpi :: ((Ptr PrintSettings) -> (CDouble -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_scale"
gtk_print_settings_get_scale :: ((Ptr PrintSettings) -> (IO CDouble))
foreign import ccall safe "gtk_print_settings_set_scale"
gtk_print_settings_set_scale :: ((Ptr PrintSettings) -> (CDouble -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_print_pages"
gtk_print_settings_get_print_pages :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_print_pages"
gtk_print_settings_set_print_pages :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_page_set"
gtk_print_settings_get_page_set :: ((Ptr PrintSettings) -> (IO CInt))
foreign import ccall safe "gtk_print_settings_set_page_set"
gtk_print_settings_set_page_set :: ((Ptr PrintSettings) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_default_source"
gtk_print_settings_get_default_source :: ((Ptr PrintSettings) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_print_settings_set_default_source"
gtk_print_settings_set_default_source :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_media_type"
gtk_print_settings_get_media_type :: ((Ptr PrintSettings) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_print_settings_set_media_type"
gtk_print_settings_set_media_type :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_dither"
gtk_print_settings_get_dither :: ((Ptr PrintSettings) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_print_settings_set_dither"
gtk_print_settings_set_dither :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_finishings"
gtk_print_settings_get_finishings :: ((Ptr PrintSettings) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_print_settings_set_finishings"
gtk_print_settings_set_finishings :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_settings_get_output_bin"
gtk_print_settings_get_output_bin :: ((Ptr PrintSettings) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_print_settings_set_output_bin"
gtk_print_settings_set_output_bin :: ((Ptr PrintSettings) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_print_settings_load_file"
gtk_print_settings_load_file :: ((Ptr PrintSettings) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "gtk_print_settings_to_file"
gtk_print_settings_to_file :: ((Ptr PrintSettings) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO CInt))))