{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.PrintSettings
(
PrintSettings(..) ,
IsPrintSettings ,
toPrintSettings ,
#if defined(ENABLE_OVERLOADING)
ResolvePrintSettingsMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
PrintSettingsCopyMethodInfo ,
#endif
printSettingsCopy ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsForeachMethodInfo ,
#endif
printSettingsForeach ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetMethodInfo ,
#endif
printSettingsGet ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetBoolMethodInfo ,
#endif
printSettingsGetBool ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetCollateMethodInfo ,
#endif
printSettingsGetCollate ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetDefaultSourceMethodInfo ,
#endif
printSettingsGetDefaultSource ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetDitherMethodInfo ,
#endif
printSettingsGetDither ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetDoubleMethodInfo ,
#endif
printSettingsGetDouble ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetDoubleWithDefaultMethodInfo,
#endif
printSettingsGetDoubleWithDefault ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetDuplexMethodInfo ,
#endif
printSettingsGetDuplex ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetFinishingsMethodInfo ,
#endif
printSettingsGetFinishings ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetIntMethodInfo ,
#endif
printSettingsGetInt ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetIntWithDefaultMethodInfo,
#endif
printSettingsGetIntWithDefault ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetLengthMethodInfo ,
#endif
printSettingsGetLength ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetMediaTypeMethodInfo ,
#endif
printSettingsGetMediaType ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetNCopiesMethodInfo ,
#endif
printSettingsGetNCopies ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetNumberUpMethodInfo ,
#endif
printSettingsGetNumberUp ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetNumberUpLayoutMethodInfo,
#endif
printSettingsGetNumberUpLayout ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetOrientationMethodInfo ,
#endif
printSettingsGetOrientation ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetOutputBinMethodInfo ,
#endif
printSettingsGetOutputBin ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetPageRangesMethodInfo ,
#endif
printSettingsGetPageRanges ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetPageSetMethodInfo ,
#endif
printSettingsGetPageSet ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetPaperHeightMethodInfo ,
#endif
printSettingsGetPaperHeight ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetPaperSizeMethodInfo ,
#endif
printSettingsGetPaperSize ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetPaperWidthMethodInfo ,
#endif
printSettingsGetPaperWidth ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetPrintPagesMethodInfo ,
#endif
printSettingsGetPrintPages ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetPrinterMethodInfo ,
#endif
printSettingsGetPrinter ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetPrinterLpiMethodInfo ,
#endif
printSettingsGetPrinterLpi ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetQualityMethodInfo ,
#endif
printSettingsGetQuality ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetResolutionMethodInfo ,
#endif
printSettingsGetResolution ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetResolutionXMethodInfo ,
#endif
printSettingsGetResolutionX ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetResolutionYMethodInfo ,
#endif
printSettingsGetResolutionY ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetReverseMethodInfo ,
#endif
printSettingsGetReverse ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetScaleMethodInfo ,
#endif
printSettingsGetScale ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsGetUseColorMethodInfo ,
#endif
printSettingsGetUseColor ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsHasKeyMethodInfo ,
#endif
printSettingsHasKey ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsLoadFileMethodInfo ,
#endif
printSettingsLoadFile ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsLoadKeyFileMethodInfo ,
#endif
printSettingsLoadKeyFile ,
printSettingsNew ,
printSettingsNewFromFile ,
printSettingsNewFromGvariant ,
printSettingsNewFromKeyFile ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetMethodInfo ,
#endif
printSettingsSet ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetBoolMethodInfo ,
#endif
printSettingsSetBool ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetCollateMethodInfo ,
#endif
printSettingsSetCollate ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetDefaultSourceMethodInfo ,
#endif
printSettingsSetDefaultSource ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetDitherMethodInfo ,
#endif
printSettingsSetDither ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetDoubleMethodInfo ,
#endif
printSettingsSetDouble ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetDuplexMethodInfo ,
#endif
printSettingsSetDuplex ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetFinishingsMethodInfo ,
#endif
printSettingsSetFinishings ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetIntMethodInfo ,
#endif
printSettingsSetInt ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetLengthMethodInfo ,
#endif
printSettingsSetLength ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetMediaTypeMethodInfo ,
#endif
printSettingsSetMediaType ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetNCopiesMethodInfo ,
#endif
printSettingsSetNCopies ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetNumberUpMethodInfo ,
#endif
printSettingsSetNumberUp ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetNumberUpLayoutMethodInfo,
#endif
printSettingsSetNumberUpLayout ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetOrientationMethodInfo ,
#endif
printSettingsSetOrientation ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetOutputBinMethodInfo ,
#endif
printSettingsSetOutputBin ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetPageRangesMethodInfo ,
#endif
printSettingsSetPageRanges ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetPageSetMethodInfo ,
#endif
printSettingsSetPageSet ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetPaperHeightMethodInfo ,
#endif
printSettingsSetPaperHeight ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetPaperSizeMethodInfo ,
#endif
printSettingsSetPaperSize ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetPaperWidthMethodInfo ,
#endif
printSettingsSetPaperWidth ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetPrintPagesMethodInfo ,
#endif
printSettingsSetPrintPages ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetPrinterMethodInfo ,
#endif
printSettingsSetPrinter ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetPrinterLpiMethodInfo ,
#endif
printSettingsSetPrinterLpi ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetQualityMethodInfo ,
#endif
printSettingsSetQuality ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetResolutionMethodInfo ,
#endif
printSettingsSetResolution ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetResolutionXyMethodInfo ,
#endif
printSettingsSetResolutionXy ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetReverseMethodInfo ,
#endif
printSettingsSetReverse ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetScaleMethodInfo ,
#endif
printSettingsSetScale ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsSetUseColorMethodInfo ,
#endif
printSettingsSetUseColor ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsToFileMethodInfo ,
#endif
printSettingsToFile ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsToGvariantMethodInfo ,
#endif
printSettingsToGvariant ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsToKeyFileMethodInfo ,
#endif
printSettingsToKeyFile ,
#if defined(ENABLE_OVERLOADING)
PrintSettingsUnsetMethodInfo ,
#endif
printSettingsUnset ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GLib.Structs.KeyFile as GLib.KeyFile
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Structs.PageRange as Gtk.PageRange
import {-# SOURCE #-} qualified GI.Gtk.Structs.PaperSize as Gtk.PaperSize
newtype PrintSettings = PrintSettings (SP.ManagedPtr PrintSettings)
deriving (PrintSettings -> PrintSettings -> Bool
(PrintSettings -> PrintSettings -> Bool)
-> (PrintSettings -> PrintSettings -> Bool) -> Eq PrintSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PrintSettings -> PrintSettings -> Bool
$c/= :: PrintSettings -> PrintSettings -> Bool
== :: PrintSettings -> PrintSettings -> Bool
$c== :: PrintSettings -> PrintSettings -> Bool
Eq)
instance SP.ManagedPtrNewtype PrintSettings where
toManagedPtr :: PrintSettings -> ManagedPtr PrintSettings
toManagedPtr (PrintSettings ManagedPtr PrintSettings
p) = ManagedPtr PrintSettings
p
foreign import ccall "gtk_print_settings_get_type"
c_gtk_print_settings_get_type :: IO B.Types.GType
instance B.Types.TypedObject PrintSettings where
glibType :: IO GType
glibType = IO GType
c_gtk_print_settings_get_type
instance B.Types.GObject PrintSettings
class (SP.GObject o, O.IsDescendantOf PrintSettings o) => IsPrintSettings o
instance (SP.GObject o, O.IsDescendantOf PrintSettings o) => IsPrintSettings o
instance O.HasParentTypes PrintSettings
type instance O.ParentTypes PrintSettings = '[GObject.Object.Object]
toPrintSettings :: (MIO.MonadIO m, IsPrintSettings o) => o -> m PrintSettings
toPrintSettings :: forall (m :: * -> *) o.
(MonadIO m, IsPrintSettings o) =>
o -> m PrintSettings
toPrintSettings = IO PrintSettings -> m PrintSettings
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO PrintSettings -> m PrintSettings)
-> (o -> IO PrintSettings) -> o -> m PrintSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr PrintSettings -> PrintSettings)
-> o -> IO PrintSettings
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr PrintSettings -> PrintSettings
PrintSettings
instance B.GValue.IsGValue (Maybe PrintSettings) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_print_settings_get_type
gvalueSet_ :: Ptr GValue -> Maybe PrintSettings -> IO ()
gvalueSet_ Ptr GValue
gv Maybe PrintSettings
P.Nothing = Ptr GValue -> Ptr PrintSettings -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr PrintSettings
forall a. Ptr a
FP.nullPtr :: FP.Ptr PrintSettings)
gvalueSet_ Ptr GValue
gv (P.Just PrintSettings
obj) = PrintSettings -> (Ptr PrintSettings -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr PrintSettings
obj (Ptr GValue -> Ptr PrintSettings -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe PrintSettings)
gvalueGet_ Ptr GValue
gv = do
Ptr PrintSettings
ptr <- Ptr GValue -> IO (Ptr PrintSettings)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr PrintSettings)
if Ptr PrintSettings
ptr Ptr PrintSettings -> Ptr PrintSettings -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr PrintSettings
forall a. Ptr a
FP.nullPtr
then PrintSettings -> Maybe PrintSettings
forall a. a -> Maybe a
P.Just (PrintSettings -> Maybe PrintSettings)
-> IO PrintSettings -> IO (Maybe PrintSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr PrintSettings -> PrintSettings)
-> Ptr PrintSettings -> IO PrintSettings
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr PrintSettings -> PrintSettings
PrintSettings Ptr PrintSettings
ptr
else Maybe PrintSettings -> IO (Maybe PrintSettings)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe PrintSettings
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolvePrintSettingsMethod (t :: Symbol) (o :: *) :: * where
ResolvePrintSettingsMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolvePrintSettingsMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolvePrintSettingsMethod "copy" o = PrintSettingsCopyMethodInfo
ResolvePrintSettingsMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolvePrintSettingsMethod "foreach" o = PrintSettingsForeachMethodInfo
ResolvePrintSettingsMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolvePrintSettingsMethod "get" o = PrintSettingsGetMethodInfo
ResolvePrintSettingsMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolvePrintSettingsMethod "hasKey" o = PrintSettingsHasKeyMethodInfo
ResolvePrintSettingsMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolvePrintSettingsMethod "loadFile" o = PrintSettingsLoadFileMethodInfo
ResolvePrintSettingsMethod "loadKeyFile" o = PrintSettingsLoadKeyFileMethodInfo
ResolvePrintSettingsMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolvePrintSettingsMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolvePrintSettingsMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolvePrintSettingsMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolvePrintSettingsMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolvePrintSettingsMethod "set" o = PrintSettingsSetMethodInfo
ResolvePrintSettingsMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolvePrintSettingsMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolvePrintSettingsMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolvePrintSettingsMethod "toFile" o = PrintSettingsToFileMethodInfo
ResolvePrintSettingsMethod "toGvariant" o = PrintSettingsToGvariantMethodInfo
ResolvePrintSettingsMethod "toKeyFile" o = PrintSettingsToKeyFileMethodInfo
ResolvePrintSettingsMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolvePrintSettingsMethod "unset" o = PrintSettingsUnsetMethodInfo
ResolvePrintSettingsMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolvePrintSettingsMethod "getBool" o = PrintSettingsGetBoolMethodInfo
ResolvePrintSettingsMethod "getCollate" o = PrintSettingsGetCollateMethodInfo
ResolvePrintSettingsMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolvePrintSettingsMethod "getDefaultSource" o = PrintSettingsGetDefaultSourceMethodInfo
ResolvePrintSettingsMethod "getDither" o = PrintSettingsGetDitherMethodInfo
ResolvePrintSettingsMethod "getDouble" o = PrintSettingsGetDoubleMethodInfo
ResolvePrintSettingsMethod "getDoubleWithDefault" o = PrintSettingsGetDoubleWithDefaultMethodInfo
ResolvePrintSettingsMethod "getDuplex" o = PrintSettingsGetDuplexMethodInfo
ResolvePrintSettingsMethod "getFinishings" o = PrintSettingsGetFinishingsMethodInfo
ResolvePrintSettingsMethod "getInt" o = PrintSettingsGetIntMethodInfo
ResolvePrintSettingsMethod "getIntWithDefault" o = PrintSettingsGetIntWithDefaultMethodInfo
ResolvePrintSettingsMethod "getLength" o = PrintSettingsGetLengthMethodInfo
ResolvePrintSettingsMethod "getMediaType" o = PrintSettingsGetMediaTypeMethodInfo
ResolvePrintSettingsMethod "getNCopies" o = PrintSettingsGetNCopiesMethodInfo
ResolvePrintSettingsMethod "getNumberUp" o = PrintSettingsGetNumberUpMethodInfo
ResolvePrintSettingsMethod "getNumberUpLayout" o = PrintSettingsGetNumberUpLayoutMethodInfo
ResolvePrintSettingsMethod "getOrientation" o = PrintSettingsGetOrientationMethodInfo
ResolvePrintSettingsMethod "getOutputBin" o = PrintSettingsGetOutputBinMethodInfo
ResolvePrintSettingsMethod "getPageRanges" o = PrintSettingsGetPageRangesMethodInfo
ResolvePrintSettingsMethod "getPageSet" o = PrintSettingsGetPageSetMethodInfo
ResolvePrintSettingsMethod "getPaperHeight" o = PrintSettingsGetPaperHeightMethodInfo
ResolvePrintSettingsMethod "getPaperSize" o = PrintSettingsGetPaperSizeMethodInfo
ResolvePrintSettingsMethod "getPaperWidth" o = PrintSettingsGetPaperWidthMethodInfo
ResolvePrintSettingsMethod "getPrintPages" o = PrintSettingsGetPrintPagesMethodInfo
ResolvePrintSettingsMethod "getPrinter" o = PrintSettingsGetPrinterMethodInfo
ResolvePrintSettingsMethod "getPrinterLpi" o = PrintSettingsGetPrinterLpiMethodInfo
ResolvePrintSettingsMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolvePrintSettingsMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolvePrintSettingsMethod "getQuality" o = PrintSettingsGetQualityMethodInfo
ResolvePrintSettingsMethod "getResolution" o = PrintSettingsGetResolutionMethodInfo
ResolvePrintSettingsMethod "getResolutionX" o = PrintSettingsGetResolutionXMethodInfo
ResolvePrintSettingsMethod "getResolutionY" o = PrintSettingsGetResolutionYMethodInfo
ResolvePrintSettingsMethod "getReverse" o = PrintSettingsGetReverseMethodInfo
ResolvePrintSettingsMethod "getScale" o = PrintSettingsGetScaleMethodInfo
ResolvePrintSettingsMethod "getUseColor" o = PrintSettingsGetUseColorMethodInfo
ResolvePrintSettingsMethod "setBool" o = PrintSettingsSetBoolMethodInfo
ResolvePrintSettingsMethod "setCollate" o = PrintSettingsSetCollateMethodInfo
ResolvePrintSettingsMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolvePrintSettingsMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolvePrintSettingsMethod "setDefaultSource" o = PrintSettingsSetDefaultSourceMethodInfo
ResolvePrintSettingsMethod "setDither" o = PrintSettingsSetDitherMethodInfo
ResolvePrintSettingsMethod "setDouble" o = PrintSettingsSetDoubleMethodInfo
ResolvePrintSettingsMethod "setDuplex" o = PrintSettingsSetDuplexMethodInfo
ResolvePrintSettingsMethod "setFinishings" o = PrintSettingsSetFinishingsMethodInfo
ResolvePrintSettingsMethod "setInt" o = PrintSettingsSetIntMethodInfo
ResolvePrintSettingsMethod "setLength" o = PrintSettingsSetLengthMethodInfo
ResolvePrintSettingsMethod "setMediaType" o = PrintSettingsSetMediaTypeMethodInfo
ResolvePrintSettingsMethod "setNCopies" o = PrintSettingsSetNCopiesMethodInfo
ResolvePrintSettingsMethod "setNumberUp" o = PrintSettingsSetNumberUpMethodInfo
ResolvePrintSettingsMethod "setNumberUpLayout" o = PrintSettingsSetNumberUpLayoutMethodInfo
ResolvePrintSettingsMethod "setOrientation" o = PrintSettingsSetOrientationMethodInfo
ResolvePrintSettingsMethod "setOutputBin" o = PrintSettingsSetOutputBinMethodInfo
ResolvePrintSettingsMethod "setPageRanges" o = PrintSettingsSetPageRangesMethodInfo
ResolvePrintSettingsMethod "setPageSet" o = PrintSettingsSetPageSetMethodInfo
ResolvePrintSettingsMethod "setPaperHeight" o = PrintSettingsSetPaperHeightMethodInfo
ResolvePrintSettingsMethod "setPaperSize" o = PrintSettingsSetPaperSizeMethodInfo
ResolvePrintSettingsMethod "setPaperWidth" o = PrintSettingsSetPaperWidthMethodInfo
ResolvePrintSettingsMethod "setPrintPages" o = PrintSettingsSetPrintPagesMethodInfo
ResolvePrintSettingsMethod "setPrinter" o = PrintSettingsSetPrinterMethodInfo
ResolvePrintSettingsMethod "setPrinterLpi" o = PrintSettingsSetPrinterLpiMethodInfo
ResolvePrintSettingsMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolvePrintSettingsMethod "setQuality" o = PrintSettingsSetQualityMethodInfo
ResolvePrintSettingsMethod "setResolution" o = PrintSettingsSetResolutionMethodInfo
ResolvePrintSettingsMethod "setResolutionXy" o = PrintSettingsSetResolutionXyMethodInfo
ResolvePrintSettingsMethod "setReverse" o = PrintSettingsSetReverseMethodInfo
ResolvePrintSettingsMethod "setScale" o = PrintSettingsSetScaleMethodInfo
ResolvePrintSettingsMethod "setUseColor" o = PrintSettingsSetUseColorMethodInfo
ResolvePrintSettingsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePrintSettingsMethod t PrintSettings, O.OverloadedMethod info PrintSettings p) => OL.IsLabel t (PrintSettings -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolvePrintSettingsMethod t PrintSettings, O.OverloadedMethod info PrintSettings p, R.HasField t PrintSettings p) => R.HasField t PrintSettings p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolvePrintSettingsMethod t PrintSettings, O.OverloadedMethodInfo info PrintSettings) => OL.IsLabel t (O.MethodProxy info PrintSettings) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PrintSettings
type instance O.AttributeList PrintSettings = PrintSettingsAttributeList
type PrintSettingsAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList PrintSettings = PrintSettingsSignalList
type PrintSettingsSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_print_settings_new" gtk_print_settings_new ::
IO (Ptr PrintSettings)
printSettingsNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m PrintSettings
printSettingsNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m PrintSettings
printSettingsNew = IO PrintSettings -> m PrintSettings
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintSettings -> m PrintSettings)
-> IO PrintSettings -> m PrintSettings
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
result <- IO (Ptr PrintSettings)
gtk_print_settings_new
Text -> Ptr PrintSettings -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsNew" Ptr PrintSettings
result
PrintSettings
result' <- ((ManagedPtr PrintSettings -> PrintSettings)
-> Ptr PrintSettings -> IO PrintSettings
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PrintSettings -> PrintSettings
PrintSettings) Ptr PrintSettings
result
PrintSettings -> IO PrintSettings
forall (m :: * -> *) a. Monad m => a -> m a
return PrintSettings
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_print_settings_new_from_file" gtk_print_settings_new_from_file ::
CString ->
Ptr (Ptr GError) ->
IO (Ptr PrintSettings)
printSettingsNewFromFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
[Char]
-> m PrintSettings
printSettingsNewFromFile :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[Char] -> m PrintSettings
printSettingsNewFromFile [Char]
fileName = IO PrintSettings -> m PrintSettings
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintSettings -> m PrintSettings)
-> IO PrintSettings -> m PrintSettings
forall a b. (a -> b) -> a -> b
$ do
CString
fileName' <- [Char] -> IO CString
stringToCString [Char]
fileName
IO PrintSettings -> IO () -> IO PrintSettings
forall a b. IO a -> IO b -> IO a
onException (do
Ptr PrintSettings
result <- (Ptr (Ptr GError) -> IO (Ptr PrintSettings))
-> IO (Ptr PrintSettings)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr PrintSettings))
-> IO (Ptr PrintSettings))
-> (Ptr (Ptr GError) -> IO (Ptr PrintSettings))
-> IO (Ptr PrintSettings)
forall a b. (a -> b) -> a -> b
$ CString -> Ptr (Ptr GError) -> IO (Ptr PrintSettings)
gtk_print_settings_new_from_file CString
fileName'
Text -> Ptr PrintSettings -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsNewFromFile" Ptr PrintSettings
result
PrintSettings
result' <- ((ManagedPtr PrintSettings -> PrintSettings)
-> Ptr PrintSettings -> IO PrintSettings
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PrintSettings -> PrintSettings
PrintSettings) Ptr PrintSettings
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fileName'
PrintSettings -> IO PrintSettings
forall (m :: * -> *) a. Monad m => a -> m a
return PrintSettings
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fileName'
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_print_settings_new_from_gvariant" gtk_print_settings_new_from_gvariant ::
Ptr GVariant ->
IO (Ptr PrintSettings)
printSettingsNewFromGvariant ::
(B.CallStack.HasCallStack, MonadIO m) =>
GVariant
-> m PrintSettings
printSettingsNewFromGvariant :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GVariant -> m PrintSettings
printSettingsNewFromGvariant GVariant
variant = IO PrintSettings -> m PrintSettings
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintSettings -> m PrintSettings)
-> IO PrintSettings -> m PrintSettings
forall a b. (a -> b) -> a -> b
$ do
Ptr GVariant
variant' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
variant
Ptr PrintSettings
result <- Ptr GVariant -> IO (Ptr PrintSettings)
gtk_print_settings_new_from_gvariant Ptr GVariant
variant'
Text -> Ptr PrintSettings -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsNewFromGvariant" Ptr PrintSettings
result
PrintSettings
result' <- ((ManagedPtr PrintSettings -> PrintSettings)
-> Ptr PrintSettings -> IO PrintSettings
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PrintSettings -> PrintSettings
PrintSettings) Ptr PrintSettings
result
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
variant
PrintSettings -> IO PrintSettings
forall (m :: * -> *) a. Monad m => a -> m a
return PrintSettings
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_print_settings_new_from_key_file" gtk_print_settings_new_from_key_file ::
Ptr GLib.KeyFile.KeyFile ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr PrintSettings)
printSettingsNewFromKeyFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
GLib.KeyFile.KeyFile
-> Maybe (T.Text)
-> m PrintSettings
printSettingsNewFromKeyFile :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
KeyFile -> Maybe Text -> m PrintSettings
printSettingsNewFromKeyFile KeyFile
keyFile Maybe Text
groupName = IO PrintSettings -> m PrintSettings
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintSettings -> m PrintSettings)
-> IO PrintSettings -> m PrintSettings
forall a b. (a -> b) -> a -> b
$ do
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
maybeGroupName <- case Maybe Text
groupName of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jGroupName -> do
CString
jGroupName' <- Text -> IO CString
textToCString Text
jGroupName
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jGroupName'
IO PrintSettings -> IO () -> IO PrintSettings
forall a b. IO a -> IO b -> IO a
onException (do
Ptr PrintSettings
result <- (Ptr (Ptr GError) -> IO (Ptr PrintSettings))
-> IO (Ptr PrintSettings)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr PrintSettings))
-> IO (Ptr PrintSettings))
-> (Ptr (Ptr GError) -> IO (Ptr PrintSettings))
-> IO (Ptr PrintSettings)
forall a b. (a -> b) -> a -> b
$ Ptr KeyFile
-> CString -> Ptr (Ptr GError) -> IO (Ptr PrintSettings)
gtk_print_settings_new_from_key_file Ptr KeyFile
keyFile' CString
maybeGroupName
Text -> Ptr PrintSettings -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsNewFromKeyFile" Ptr PrintSettings
result
PrintSettings
result' <- ((ManagedPtr PrintSettings -> PrintSettings)
-> Ptr PrintSettings -> IO PrintSettings
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PrintSettings -> PrintSettings
PrintSettings) Ptr PrintSettings
result
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
PrintSettings -> IO PrintSettings
forall (m :: * -> *) a. Monad m => a -> m a
return PrintSettings
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_print_settings_copy" gtk_print_settings_copy ::
Ptr PrintSettings ->
IO (Ptr PrintSettings)
printSettingsCopy ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m PrintSettings
printSettingsCopy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m PrintSettings
printSettingsCopy a
other = IO PrintSettings -> m PrintSettings
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintSettings -> m PrintSettings)
-> IO PrintSettings -> m PrintSettings
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
other' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
other
Ptr PrintSettings
result <- Ptr PrintSettings -> IO (Ptr PrintSettings)
gtk_print_settings_copy Ptr PrintSettings
other'
Text -> Ptr PrintSettings -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsCopy" Ptr PrintSettings
result
PrintSettings
result' <- ((ManagedPtr PrintSettings -> PrintSettings)
-> Ptr PrintSettings -> IO PrintSettings
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PrintSettings -> PrintSettings
PrintSettings) Ptr PrintSettings
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
other
PrintSettings -> IO PrintSettings
forall (m :: * -> *) a. Monad m => a -> m a
return PrintSettings
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsCopyMethodInfo
instance (signature ~ (m PrintSettings), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsCopyMethodInfo a signature where
overloadedMethod = printSettingsCopy
instance O.OverloadedMethodInfo PrintSettingsCopyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsCopy",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsCopy"
}
#endif
foreign import ccall "gtk_print_settings_foreach" gtk_print_settings_foreach ::
Ptr PrintSettings ->
FunPtr Gtk.Callbacks.C_PrintSettingsFunc ->
Ptr () ->
IO ()
printSettingsForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.Callbacks.PrintSettingsFunc
-> m ()
printSettingsForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> PrintSettingsFunc -> m ()
printSettingsForeach a
settings PrintSettingsFunc
func = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
FunPtr C_PrintSettingsFunc
func' <- C_PrintSettingsFunc -> IO (FunPtr C_PrintSettingsFunc)
Gtk.Callbacks.mk_PrintSettingsFunc (Maybe (Ptr (FunPtr C_PrintSettingsFunc))
-> PrintSettingsFunc_WithClosures -> C_PrintSettingsFunc
Gtk.Callbacks.wrap_PrintSettingsFunc Maybe (Ptr (FunPtr C_PrintSettingsFunc))
forall a. Maybe a
Nothing (PrintSettingsFunc -> PrintSettingsFunc_WithClosures
Gtk.Callbacks.drop_closures_PrintSettingsFunc PrintSettingsFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr PrintSettings -> FunPtr C_PrintSettingsFunc -> Ptr () -> IO ()
gtk_print_settings_foreach Ptr PrintSettings
settings' FunPtr C_PrintSettingsFunc
func' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_PrintSettingsFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_PrintSettingsFunc
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsForeachMethodInfo
instance (signature ~ (Gtk.Callbacks.PrintSettingsFunc -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsForeachMethodInfo a signature where
overloadedMethod = printSettingsForeach
instance O.OverloadedMethodInfo PrintSettingsForeachMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsForeach",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsForeach"
}
#endif
foreign import ccall "gtk_print_settings_get" gtk_print_settings_get ::
Ptr PrintSettings ->
CString ->
IO CString
printSettingsGet ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m T.Text
printSettingsGet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m Text
printSettingsGet a
settings Text
key = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
CString
result <- Ptr PrintSettings -> CString -> IO CString
gtk_print_settings_get Ptr PrintSettings
settings' CString
key'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsGet" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetMethodInfo a signature where
overloadedMethod = printSettingsGet
instance O.OverloadedMethodInfo PrintSettingsGetMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGet",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGet"
}
#endif
foreign import ccall "gtk_print_settings_get_bool" gtk_print_settings_get_bool ::
Ptr PrintSettings ->
CString ->
IO CInt
printSettingsGetBool ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m Bool
printSettingsGetBool :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m Bool
printSettingsGetBool a
settings Text
key = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
CInt
result <- Ptr PrintSettings -> CString -> IO CInt
gtk_print_settings_get_bool Ptr PrintSettings
settings' CString
key'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetBoolMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetBoolMethodInfo a signature where
overloadedMethod = printSettingsGetBool
instance O.OverloadedMethodInfo PrintSettingsGetBoolMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetBool",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetBool"
}
#endif
foreign import ccall "gtk_print_settings_get_collate" gtk_print_settings_get_collate ::
Ptr PrintSettings ->
IO CInt
printSettingsGetCollate ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Bool
printSettingsGetCollate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Bool
printSettingsGetCollate a
settings = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CInt
result <- Ptr PrintSettings -> IO CInt
gtk_print_settings_get_collate Ptr PrintSettings
settings'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetCollateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetCollateMethodInfo a signature where
overloadedMethod = printSettingsGetCollate
instance O.OverloadedMethodInfo PrintSettingsGetCollateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetCollate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetCollate"
}
#endif
foreign import ccall "gtk_print_settings_get_default_source" gtk_print_settings_get_default_source ::
Ptr PrintSettings ->
IO CString
printSettingsGetDefaultSource ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m T.Text
printSettingsGetDefaultSource :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Text
printSettingsGetDefaultSource a
settings = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
result <- Ptr PrintSettings -> IO CString
gtk_print_settings_get_default_source Ptr PrintSettings
settings'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsGetDefaultSource" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetDefaultSourceMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetDefaultSourceMethodInfo a signature where
overloadedMethod = printSettingsGetDefaultSource
instance O.OverloadedMethodInfo PrintSettingsGetDefaultSourceMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetDefaultSource",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetDefaultSource"
}
#endif
foreign import ccall "gtk_print_settings_get_dither" gtk_print_settings_get_dither ::
Ptr PrintSettings ->
IO CString
printSettingsGetDither ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m T.Text
printSettingsGetDither :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Text
printSettingsGetDither a
settings = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
result <- Ptr PrintSettings -> IO CString
gtk_print_settings_get_dither Ptr PrintSettings
settings'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsGetDither" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetDitherMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetDitherMethodInfo a signature where
overloadedMethod = printSettingsGetDither
instance O.OverloadedMethodInfo PrintSettingsGetDitherMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetDither",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetDither"
}
#endif
foreign import ccall "gtk_print_settings_get_double" gtk_print_settings_get_double ::
Ptr PrintSettings ->
CString ->
IO CDouble
printSettingsGetDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m Double
printSettingsGetDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m Double
printSettingsGetDouble a
settings Text
key = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
CDouble
result <- Ptr PrintSettings -> CString -> IO CDouble
gtk_print_settings_get_double Ptr PrintSettings
settings' CString
key'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetDoubleMethodInfo
instance (signature ~ (T.Text -> m Double), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetDoubleMethodInfo a signature where
overloadedMethod = printSettingsGetDouble
instance O.OverloadedMethodInfo PrintSettingsGetDoubleMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetDouble",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetDouble"
}
#endif
foreign import ccall "gtk_print_settings_get_double_with_default" gtk_print_settings_get_double_with_default ::
Ptr PrintSettings ->
CString ->
CDouble ->
IO CDouble
printSettingsGetDoubleWithDefault ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> Double
-> m Double
printSettingsGetDoubleWithDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> Double -> m Double
printSettingsGetDoubleWithDefault a
settings Text
key Double
def = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
let def' :: CDouble
def' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
def
CDouble
result <- Ptr PrintSettings -> CString -> CDouble -> IO CDouble
gtk_print_settings_get_double_with_default Ptr PrintSettings
settings' CString
key' CDouble
def'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetDoubleWithDefaultMethodInfo
instance (signature ~ (T.Text -> Double -> m Double), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetDoubleWithDefaultMethodInfo a signature where
overloadedMethod = printSettingsGetDoubleWithDefault
instance O.OverloadedMethodInfo PrintSettingsGetDoubleWithDefaultMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetDoubleWithDefault",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetDoubleWithDefault"
}
#endif
foreign import ccall "gtk_print_settings_get_duplex" gtk_print_settings_get_duplex ::
Ptr PrintSettings ->
IO CUInt
printSettingsGetDuplex ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Gtk.Enums.PrintDuplex
printSettingsGetDuplex :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m PrintDuplex
printSettingsGetDuplex a
settings = IO PrintDuplex -> m PrintDuplex
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintDuplex -> m PrintDuplex)
-> IO PrintDuplex -> m PrintDuplex
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CUInt
result <- Ptr PrintSettings -> IO CUInt
gtk_print_settings_get_duplex Ptr PrintSettings
settings'
let result' :: PrintDuplex
result' = (Int -> PrintDuplex
forall a. Enum a => Int -> a
toEnum (Int -> PrintDuplex) -> (CUInt -> Int) -> CUInt -> PrintDuplex
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
PrintDuplex -> IO PrintDuplex
forall (m :: * -> *) a. Monad m => a -> m a
return PrintDuplex
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetDuplexMethodInfo
instance (signature ~ (m Gtk.Enums.PrintDuplex), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetDuplexMethodInfo a signature where
overloadedMethod = printSettingsGetDuplex
instance O.OverloadedMethodInfo PrintSettingsGetDuplexMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetDuplex",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetDuplex"
}
#endif
foreign import ccall "gtk_print_settings_get_finishings" gtk_print_settings_get_finishings ::
Ptr PrintSettings ->
IO CString
printSettingsGetFinishings ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m T.Text
printSettingsGetFinishings :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Text
printSettingsGetFinishings a
settings = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
result <- Ptr PrintSettings -> IO CString
gtk_print_settings_get_finishings Ptr PrintSettings
settings'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsGetFinishings" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetFinishingsMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetFinishingsMethodInfo a signature where
overloadedMethod = printSettingsGetFinishings
instance O.OverloadedMethodInfo PrintSettingsGetFinishingsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetFinishings",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetFinishings"
}
#endif
foreign import ccall "gtk_print_settings_get_int" gtk_print_settings_get_int ::
Ptr PrintSettings ->
CString ->
IO Int32
printSettingsGetInt ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m Int32
printSettingsGetInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m Int32
printSettingsGetInt a
settings Text
key = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
Int32
result <- Ptr PrintSettings -> CString -> IO Int32
gtk_print_settings_get_int Ptr PrintSettings
settings' CString
key'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetIntMethodInfo
instance (signature ~ (T.Text -> m Int32), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetIntMethodInfo a signature where
overloadedMethod = printSettingsGetInt
instance O.OverloadedMethodInfo PrintSettingsGetIntMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetInt",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetInt"
}
#endif
foreign import ccall "gtk_print_settings_get_int_with_default" gtk_print_settings_get_int_with_default ::
Ptr PrintSettings ->
CString ->
Int32 ->
IO Int32
printSettingsGetIntWithDefault ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> Int32
-> m Int32
printSettingsGetIntWithDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> Int32 -> m Int32
printSettingsGetIntWithDefault a
settings Text
key Int32
def = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
Int32
result <- Ptr PrintSettings -> CString -> Int32 -> IO Int32
gtk_print_settings_get_int_with_default Ptr PrintSettings
settings' CString
key' Int32
def
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetIntWithDefaultMethodInfo
instance (signature ~ (T.Text -> Int32 -> m Int32), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetIntWithDefaultMethodInfo a signature where
overloadedMethod = printSettingsGetIntWithDefault
instance O.OverloadedMethodInfo PrintSettingsGetIntWithDefaultMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetIntWithDefault",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetIntWithDefault"
}
#endif
foreign import ccall "gtk_print_settings_get_length" gtk_print_settings_get_length ::
Ptr PrintSettings ->
CString ->
CUInt ->
IO CDouble
printSettingsGetLength ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> Gtk.Enums.Unit
-> m Double
printSettingsGetLength :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> Unit -> m Double
printSettingsGetLength a
settings Text
key Unit
unit = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
let unit' :: CUInt
unit' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Unit -> Int) -> Unit -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Unit -> Int
forall a. Enum a => a -> Int
fromEnum) Unit
unit
CDouble
result <- Ptr PrintSettings -> CString -> CUInt -> IO CDouble
gtk_print_settings_get_length Ptr PrintSettings
settings' CString
key' CUInt
unit'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetLengthMethodInfo
instance (signature ~ (T.Text -> Gtk.Enums.Unit -> m Double), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetLengthMethodInfo a signature where
overloadedMethod = printSettingsGetLength
instance O.OverloadedMethodInfo PrintSettingsGetLengthMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetLength",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetLength"
}
#endif
foreign import ccall "gtk_print_settings_get_media_type" gtk_print_settings_get_media_type ::
Ptr PrintSettings ->
IO CString
printSettingsGetMediaType ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m T.Text
printSettingsGetMediaType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Text
printSettingsGetMediaType a
settings = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
result <- Ptr PrintSettings -> IO CString
gtk_print_settings_get_media_type Ptr PrintSettings
settings'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsGetMediaType" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetMediaTypeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetMediaTypeMethodInfo a signature where
overloadedMethod = printSettingsGetMediaType
instance O.OverloadedMethodInfo PrintSettingsGetMediaTypeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetMediaType",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetMediaType"
}
#endif
foreign import ccall "gtk_print_settings_get_n_copies" gtk_print_settings_get_n_copies ::
Ptr PrintSettings ->
IO Int32
printSettingsGetNCopies ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Int32
printSettingsGetNCopies :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Int32
printSettingsGetNCopies a
settings = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Int32
result <- Ptr PrintSettings -> IO Int32
gtk_print_settings_get_n_copies Ptr PrintSettings
settings'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetNCopiesMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetNCopiesMethodInfo a signature where
overloadedMethod = printSettingsGetNCopies
instance O.OverloadedMethodInfo PrintSettingsGetNCopiesMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetNCopies",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetNCopies"
}
#endif
foreign import ccall "gtk_print_settings_get_number_up" gtk_print_settings_get_number_up ::
Ptr PrintSettings ->
IO Int32
printSettingsGetNumberUp ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Int32
printSettingsGetNumberUp :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Int32
printSettingsGetNumberUp a
settings = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Int32
result <- Ptr PrintSettings -> IO Int32
gtk_print_settings_get_number_up Ptr PrintSettings
settings'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetNumberUpMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetNumberUpMethodInfo a signature where
overloadedMethod = printSettingsGetNumberUp
instance O.OverloadedMethodInfo PrintSettingsGetNumberUpMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetNumberUp",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetNumberUp"
}
#endif
foreign import ccall "gtk_print_settings_get_number_up_layout" gtk_print_settings_get_number_up_layout ::
Ptr PrintSettings ->
IO CUInt
printSettingsGetNumberUpLayout ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Gtk.Enums.NumberUpLayout
printSettingsGetNumberUpLayout :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m NumberUpLayout
printSettingsGetNumberUpLayout a
settings = IO NumberUpLayout -> m NumberUpLayout
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO NumberUpLayout -> m NumberUpLayout)
-> IO NumberUpLayout -> m NumberUpLayout
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CUInt
result <- Ptr PrintSettings -> IO CUInt
gtk_print_settings_get_number_up_layout Ptr PrintSettings
settings'
let result' :: NumberUpLayout
result' = (Int -> NumberUpLayout
forall a. Enum a => Int -> a
toEnum (Int -> NumberUpLayout)
-> (CUInt -> Int) -> CUInt -> NumberUpLayout
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
NumberUpLayout -> IO NumberUpLayout
forall (m :: * -> *) a. Monad m => a -> m a
return NumberUpLayout
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetNumberUpLayoutMethodInfo
instance (signature ~ (m Gtk.Enums.NumberUpLayout), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetNumberUpLayoutMethodInfo a signature where
overloadedMethod = printSettingsGetNumberUpLayout
instance O.OverloadedMethodInfo PrintSettingsGetNumberUpLayoutMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetNumberUpLayout",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetNumberUpLayout"
}
#endif
foreign import ccall "gtk_print_settings_get_orientation" gtk_print_settings_get_orientation ::
Ptr PrintSettings ->
IO CUInt
printSettingsGetOrientation ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Gtk.Enums.PageOrientation
printSettingsGetOrientation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m PageOrientation
printSettingsGetOrientation a
settings = IO PageOrientation -> m PageOrientation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PageOrientation -> m PageOrientation)
-> IO PageOrientation -> m PageOrientation
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CUInt
result <- Ptr PrintSettings -> IO CUInt
gtk_print_settings_get_orientation Ptr PrintSettings
settings'
let result' :: PageOrientation
result' = (Int -> PageOrientation
forall a. Enum a => Int -> a
toEnum (Int -> PageOrientation)
-> (CUInt -> Int) -> CUInt -> PageOrientation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
PageOrientation -> IO PageOrientation
forall (m :: * -> *) a. Monad m => a -> m a
return PageOrientation
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetOrientationMethodInfo
instance (signature ~ (m Gtk.Enums.PageOrientation), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetOrientationMethodInfo a signature where
overloadedMethod = printSettingsGetOrientation
instance O.OverloadedMethodInfo PrintSettingsGetOrientationMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetOrientation",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetOrientation"
}
#endif
foreign import ccall "gtk_print_settings_get_output_bin" gtk_print_settings_get_output_bin ::
Ptr PrintSettings ->
IO CString
printSettingsGetOutputBin ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m T.Text
printSettingsGetOutputBin :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Text
printSettingsGetOutputBin a
settings = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
result <- Ptr PrintSettings -> IO CString
gtk_print_settings_get_output_bin Ptr PrintSettings
settings'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsGetOutputBin" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetOutputBinMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetOutputBinMethodInfo a signature where
overloadedMethod = printSettingsGetOutputBin
instance O.OverloadedMethodInfo PrintSettingsGetOutputBinMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetOutputBin",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetOutputBin"
}
#endif
foreign import ccall "gtk_print_settings_get_page_ranges" gtk_print_settings_get_page_ranges ::
Ptr PrintSettings ->
Ptr Int32 ->
IO (Ptr Gtk.PageRange.PageRange)
printSettingsGetPageRanges ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m [Gtk.PageRange.PageRange]
a
settings = IO [PageRange] -> m [PageRange]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [PageRange] -> m [PageRange])
-> IO [PageRange] -> m [PageRange]
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr Int32
numRanges <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr PageRange
result <- Ptr PrintSettings -> Ptr Int32 -> IO (Ptr PageRange)
gtk_print_settings_get_page_ranges Ptr PrintSettings
settings' Ptr Int32
numRanges
Int32
numRanges' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
numRanges
Text -> Ptr PageRange -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsGetPageRanges" Ptr PageRange
result
[Ptr PageRange]
result' <- (Int -> Int32 -> Ptr PageRange -> IO [Ptr PageRange]
forall a b. Integral a => Int -> a -> Ptr b -> IO [Ptr b]
unpackBlockArrayWithLength Int
8 Int32
numRanges') Ptr PageRange
result
[PageRange]
result'' <- (Ptr PageRange -> IO PageRange)
-> [Ptr PageRange] -> IO [PageRange]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr PageRange -> PageRange)
-> Ptr PageRange -> IO PageRange
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr PageRange -> PageRange
Gtk.PageRange.PageRange) [Ptr PageRange]
result'
Ptr PageRange -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr PageRange
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
numRanges
[PageRange] -> IO [PageRange]
forall (m :: * -> *) a. Monad m => a -> m a
return [PageRange]
result''
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetPageRangesMethodInfo
instance (signature ~ (m [Gtk.PageRange.PageRange]), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetPageRangesMethodInfo a signature where
overloadedMethod = printSettingsGetPageRanges
instance O.OverloadedMethodInfo PrintSettingsGetPageRangesMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetPageRanges",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetPageRanges"
}
#endif
foreign import ccall "gtk_print_settings_get_page_set" gtk_print_settings_get_page_set ::
Ptr PrintSettings ->
IO CUInt
printSettingsGetPageSet ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Gtk.Enums.PageSet
printSettingsGetPageSet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m PageSet
printSettingsGetPageSet a
settings = IO PageSet -> m PageSet
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PageSet -> m PageSet) -> IO PageSet -> m PageSet
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CUInt
result <- Ptr PrintSettings -> IO CUInt
gtk_print_settings_get_page_set Ptr PrintSettings
settings'
let result' :: PageSet
result' = (Int -> PageSet
forall a. Enum a => Int -> a
toEnum (Int -> PageSet) -> (CUInt -> Int) -> CUInt -> PageSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
PageSet -> IO PageSet
forall (m :: * -> *) a. Monad m => a -> m a
return PageSet
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetPageSetMethodInfo
instance (signature ~ (m Gtk.Enums.PageSet), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetPageSetMethodInfo a signature where
overloadedMethod = printSettingsGetPageSet
instance O.OverloadedMethodInfo PrintSettingsGetPageSetMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetPageSet",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetPageSet"
}
#endif
foreign import ccall "gtk_print_settings_get_paper_height" gtk_print_settings_get_paper_height ::
Ptr PrintSettings ->
CUInt ->
IO CDouble
printSettingsGetPaperHeight ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.Enums.Unit
-> m Double
printSettingsGetPaperHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Unit -> m Double
printSettingsGetPaperHeight a
settings Unit
unit = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let unit' :: CUInt
unit' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Unit -> Int) -> Unit -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Unit -> Int
forall a. Enum a => a -> Int
fromEnum) Unit
unit
CDouble
result <- Ptr PrintSettings -> CUInt -> IO CDouble
gtk_print_settings_get_paper_height Ptr PrintSettings
settings' CUInt
unit'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetPaperHeightMethodInfo
instance (signature ~ (Gtk.Enums.Unit -> m Double), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetPaperHeightMethodInfo a signature where
overloadedMethod = printSettingsGetPaperHeight
instance O.OverloadedMethodInfo PrintSettingsGetPaperHeightMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetPaperHeight",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetPaperHeight"
}
#endif
foreign import ccall "gtk_print_settings_get_paper_size" gtk_print_settings_get_paper_size ::
Ptr PrintSettings ->
IO (Ptr Gtk.PaperSize.PaperSize)
printSettingsGetPaperSize ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Gtk.PaperSize.PaperSize
printSettingsGetPaperSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m PaperSize
printSettingsGetPaperSize a
settings = IO PaperSize -> m PaperSize
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PaperSize -> m PaperSize) -> IO PaperSize -> m PaperSize
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr PaperSize
result <- Ptr PrintSettings -> IO (Ptr PaperSize)
gtk_print_settings_get_paper_size Ptr PrintSettings
settings'
Text -> Ptr PaperSize -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsGetPaperSize" Ptr PaperSize
result
PaperSize
result' <- ((ManagedPtr PaperSize -> PaperSize)
-> Ptr PaperSize -> IO PaperSize
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr PaperSize -> PaperSize
Gtk.PaperSize.PaperSize) Ptr PaperSize
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
PaperSize -> IO PaperSize
forall (m :: * -> *) a. Monad m => a -> m a
return PaperSize
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetPaperSizeMethodInfo
instance (signature ~ (m Gtk.PaperSize.PaperSize), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetPaperSizeMethodInfo a signature where
overloadedMethod = printSettingsGetPaperSize
instance O.OverloadedMethodInfo PrintSettingsGetPaperSizeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetPaperSize",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetPaperSize"
}
#endif
foreign import ccall "gtk_print_settings_get_paper_width" gtk_print_settings_get_paper_width ::
Ptr PrintSettings ->
CUInt ->
IO CDouble
printSettingsGetPaperWidth ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.Enums.Unit
-> m Double
printSettingsGetPaperWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Unit -> m Double
printSettingsGetPaperWidth a
settings Unit
unit = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let unit' :: CUInt
unit' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Unit -> Int) -> Unit -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Unit -> Int
forall a. Enum a => a -> Int
fromEnum) Unit
unit
CDouble
result <- Ptr PrintSettings -> CUInt -> IO CDouble
gtk_print_settings_get_paper_width Ptr PrintSettings
settings' CUInt
unit'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetPaperWidthMethodInfo
instance (signature ~ (Gtk.Enums.Unit -> m Double), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetPaperWidthMethodInfo a signature where
overloadedMethod = printSettingsGetPaperWidth
instance O.OverloadedMethodInfo PrintSettingsGetPaperWidthMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetPaperWidth",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetPaperWidth"
}
#endif
foreign import ccall "gtk_print_settings_get_print_pages" gtk_print_settings_get_print_pages ::
Ptr PrintSettings ->
IO CUInt
printSettingsGetPrintPages ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Gtk.Enums.PrintPages
printSettingsGetPrintPages :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m PrintPages
printSettingsGetPrintPages a
settings = IO PrintPages -> m PrintPages
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintPages -> m PrintPages) -> IO PrintPages -> m PrintPages
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CUInt
result <- Ptr PrintSettings -> IO CUInt
gtk_print_settings_get_print_pages Ptr PrintSettings
settings'
let result' :: PrintPages
result' = (Int -> PrintPages
forall a. Enum a => Int -> a
toEnum (Int -> PrintPages) -> (CUInt -> Int) -> CUInt -> PrintPages
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
PrintPages -> IO PrintPages
forall (m :: * -> *) a. Monad m => a -> m a
return PrintPages
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetPrintPagesMethodInfo
instance (signature ~ (m Gtk.Enums.PrintPages), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetPrintPagesMethodInfo a signature where
overloadedMethod = printSettingsGetPrintPages
instance O.OverloadedMethodInfo PrintSettingsGetPrintPagesMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetPrintPages",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetPrintPages"
}
#endif
foreign import ccall "gtk_print_settings_get_printer" gtk_print_settings_get_printer ::
Ptr PrintSettings ->
IO CString
printSettingsGetPrinter ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m T.Text
printSettingsGetPrinter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Text
printSettingsGetPrinter a
settings = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
result <- Ptr PrintSettings -> IO CString
gtk_print_settings_get_printer Ptr PrintSettings
settings'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsGetPrinter" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetPrinterMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetPrinterMethodInfo a signature where
overloadedMethod = printSettingsGetPrinter
instance O.OverloadedMethodInfo PrintSettingsGetPrinterMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetPrinter",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetPrinter"
}
#endif
foreign import ccall "gtk_print_settings_get_printer_lpi" gtk_print_settings_get_printer_lpi ::
Ptr PrintSettings ->
IO CDouble
printSettingsGetPrinterLpi ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Double
printSettingsGetPrinterLpi :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Double
printSettingsGetPrinterLpi a
settings = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CDouble
result <- Ptr PrintSettings -> IO CDouble
gtk_print_settings_get_printer_lpi Ptr PrintSettings
settings'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetPrinterLpiMethodInfo
instance (signature ~ (m Double), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetPrinterLpiMethodInfo a signature where
overloadedMethod = printSettingsGetPrinterLpi
instance O.OverloadedMethodInfo PrintSettingsGetPrinterLpiMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetPrinterLpi",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetPrinterLpi"
}
#endif
foreign import ccall "gtk_print_settings_get_quality" gtk_print_settings_get_quality ::
Ptr PrintSettings ->
IO CUInt
printSettingsGetQuality ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Gtk.Enums.PrintQuality
printSettingsGetQuality :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m PrintQuality
printSettingsGetQuality a
settings = IO PrintQuality -> m PrintQuality
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintQuality -> m PrintQuality)
-> IO PrintQuality -> m PrintQuality
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CUInt
result <- Ptr PrintSettings -> IO CUInt
gtk_print_settings_get_quality Ptr PrintSettings
settings'
let result' :: PrintQuality
result' = (Int -> PrintQuality
forall a. Enum a => Int -> a
toEnum (Int -> PrintQuality) -> (CUInt -> Int) -> CUInt -> PrintQuality
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
PrintQuality -> IO PrintQuality
forall (m :: * -> *) a. Monad m => a -> m a
return PrintQuality
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetQualityMethodInfo
instance (signature ~ (m Gtk.Enums.PrintQuality), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetQualityMethodInfo a signature where
overloadedMethod = printSettingsGetQuality
instance O.OverloadedMethodInfo PrintSettingsGetQualityMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetQuality",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetQuality"
}
#endif
foreign import ccall "gtk_print_settings_get_resolution" gtk_print_settings_get_resolution ::
Ptr PrintSettings ->
IO Int32
printSettingsGetResolution ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Int32
printSettingsGetResolution :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Int32
printSettingsGetResolution a
settings = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Int32
result <- Ptr PrintSettings -> IO Int32
gtk_print_settings_get_resolution Ptr PrintSettings
settings'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetResolutionMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetResolutionMethodInfo a signature where
overloadedMethod = printSettingsGetResolution
instance O.OverloadedMethodInfo PrintSettingsGetResolutionMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetResolution",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetResolution"
}
#endif
foreign import ccall "gtk_print_settings_get_resolution_x" gtk_print_settings_get_resolution_x ::
Ptr PrintSettings ->
IO Int32
printSettingsGetResolutionX ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Int32
printSettingsGetResolutionX :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Int32
printSettingsGetResolutionX a
settings = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Int32
result <- Ptr PrintSettings -> IO Int32
gtk_print_settings_get_resolution_x Ptr PrintSettings
settings'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetResolutionXMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetResolutionXMethodInfo a signature where
overloadedMethod = printSettingsGetResolutionX
instance O.OverloadedMethodInfo PrintSettingsGetResolutionXMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetResolutionX",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetResolutionX"
}
#endif
foreign import ccall "gtk_print_settings_get_resolution_y" gtk_print_settings_get_resolution_y ::
Ptr PrintSettings ->
IO Int32
printSettingsGetResolutionY ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Int32
printSettingsGetResolutionY :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Int32
printSettingsGetResolutionY a
settings = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Int32
result <- Ptr PrintSettings -> IO Int32
gtk_print_settings_get_resolution_y Ptr PrintSettings
settings'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetResolutionYMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetResolutionYMethodInfo a signature where
overloadedMethod = printSettingsGetResolutionY
instance O.OverloadedMethodInfo PrintSettingsGetResolutionYMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetResolutionY",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetResolutionY"
}
#endif
foreign import ccall "gtk_print_settings_get_reverse" gtk_print_settings_get_reverse ::
Ptr PrintSettings ->
IO CInt
printSettingsGetReverse ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Bool
printSettingsGetReverse :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Bool
printSettingsGetReverse a
settings = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CInt
result <- Ptr PrintSettings -> IO CInt
gtk_print_settings_get_reverse Ptr PrintSettings
settings'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetReverseMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetReverseMethodInfo a signature where
overloadedMethod = printSettingsGetReverse
instance O.OverloadedMethodInfo PrintSettingsGetReverseMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetReverse",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetReverse"
}
#endif
foreign import ccall "gtk_print_settings_get_scale" gtk_print_settings_get_scale ::
Ptr PrintSettings ->
IO CDouble
printSettingsGetScale ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Double
printSettingsGetScale :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Double
printSettingsGetScale a
settings = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CDouble
result <- Ptr PrintSettings -> IO CDouble
gtk_print_settings_get_scale Ptr PrintSettings
settings'
let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetScaleMethodInfo
instance (signature ~ (m Double), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetScaleMethodInfo a signature where
overloadedMethod = printSettingsGetScale
instance O.OverloadedMethodInfo PrintSettingsGetScaleMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetScale",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetScale"
}
#endif
foreign import ccall "gtk_print_settings_get_use_color" gtk_print_settings_get_use_color ::
Ptr PrintSettings ->
IO CInt
printSettingsGetUseColor ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m Bool
printSettingsGetUseColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m Bool
printSettingsGetUseColor a
settings = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CInt
result <- Ptr PrintSettings -> IO CInt
gtk_print_settings_get_use_color Ptr PrintSettings
settings'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsGetUseColorMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsGetUseColorMethodInfo a signature where
overloadedMethod = printSettingsGetUseColor
instance O.OverloadedMethodInfo PrintSettingsGetUseColorMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsGetUseColor",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsGetUseColor"
}
#endif
foreign import ccall "gtk_print_settings_has_key" gtk_print_settings_has_key ::
Ptr PrintSettings ->
CString ->
IO CInt
printSettingsHasKey ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m Bool
printSettingsHasKey :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m Bool
printSettingsHasKey a
settings Text
key = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
CInt
result <- Ptr PrintSettings -> CString -> IO CInt
gtk_print_settings_has_key Ptr PrintSettings
settings' CString
key'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsHasKeyMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsHasKeyMethodInfo a signature where
overloadedMethod = printSettingsHasKey
instance O.OverloadedMethodInfo PrintSettingsHasKeyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsHasKey",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsHasKey"
}
#endif
foreign import ccall "gtk_print_settings_load_file" gtk_print_settings_load_file ::
Ptr PrintSettings ->
CString ->
Ptr (Ptr GError) ->
IO CInt
printSettingsLoadFile ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> [Char]
-> m ()
printSettingsLoadFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> [Char] -> m ()
printSettingsLoadFile a
settings [Char]
fileName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
fileName' <- [Char] -> IO CString
stringToCString [Char]
fileName
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr PrintSettings -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_print_settings_load_file Ptr PrintSettings
settings' CString
fileName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fileName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fileName'
)
#if defined(ENABLE_OVERLOADING)
data PrintSettingsLoadFileMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsLoadFileMethodInfo a signature where
overloadedMethod = printSettingsLoadFile
instance O.OverloadedMethodInfo PrintSettingsLoadFileMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsLoadFile",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsLoadFile"
}
#endif
foreign import ccall "gtk_print_settings_load_key_file" gtk_print_settings_load_key_file ::
Ptr PrintSettings ->
Ptr GLib.KeyFile.KeyFile ->
CString ->
Ptr (Ptr GError) ->
IO CInt
printSettingsLoadKeyFile ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> GLib.KeyFile.KeyFile
-> Maybe (T.Text)
-> m ()
printSettingsLoadKeyFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> KeyFile -> Maybe Text -> m ()
printSettingsLoadKeyFile a
settings KeyFile
keyFile Maybe Text
groupName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
maybeGroupName <- case Maybe Text
groupName of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jGroupName -> do
CString
jGroupName' <- Text -> IO CString
textToCString Text
jGroupName
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jGroupName'
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr PrintSettings
-> Ptr KeyFile -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_print_settings_load_key_file Ptr PrintSettings
settings' Ptr KeyFile
keyFile' CString
maybeGroupName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
)
#if defined(ENABLE_OVERLOADING)
data PrintSettingsLoadKeyFileMethodInfo
instance (signature ~ (GLib.KeyFile.KeyFile -> Maybe (T.Text) -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsLoadKeyFileMethodInfo a signature where
overloadedMethod = printSettingsLoadKeyFile
instance O.OverloadedMethodInfo PrintSettingsLoadKeyFileMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsLoadKeyFile",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsLoadKeyFile"
}
#endif
foreign import ccall "gtk_print_settings_set" gtk_print_settings_set ::
Ptr PrintSettings ->
CString ->
CString ->
IO ()
printSettingsSet ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> Maybe (T.Text)
-> m ()
printSettingsSet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> Maybe Text -> m ()
printSettingsSet a
settings Text
key Maybe Text
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
CString
maybeValue <- case Maybe Text
value of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jValue -> do
CString
jValue' <- Text -> IO CString
textToCString Text
jValue
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jValue'
Ptr PrintSettings -> CString -> CString -> IO ()
gtk_print_settings_set Ptr PrintSettings
settings' CString
key' CString
maybeValue
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeValue
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetMethodInfo
instance (signature ~ (T.Text -> Maybe (T.Text) -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetMethodInfo a signature where
overloadedMethod = printSettingsSet
instance O.OverloadedMethodInfo PrintSettingsSetMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSet",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSet"
}
#endif
foreign import ccall "gtk_print_settings_set_bool" gtk_print_settings_set_bool ::
Ptr PrintSettings ->
CString ->
CInt ->
IO ()
printSettingsSetBool ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> Bool
-> m ()
printSettingsSetBool :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> Bool -> m ()
printSettingsSetBool a
settings Text
key Bool
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
let value' :: CInt
value' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
value
Ptr PrintSettings -> CString -> CInt -> IO ()
gtk_print_settings_set_bool Ptr PrintSettings
settings' CString
key' CInt
value'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetBoolMethodInfo
instance (signature ~ (T.Text -> Bool -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetBoolMethodInfo a signature where
overloadedMethod = printSettingsSetBool
instance O.OverloadedMethodInfo PrintSettingsSetBoolMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetBool",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetBool"
}
#endif
foreign import ccall "gtk_print_settings_set_collate" gtk_print_settings_set_collate ::
Ptr PrintSettings ->
CInt ->
IO ()
printSettingsSetCollate ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Bool
-> m ()
printSettingsSetCollate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Bool -> m ()
printSettingsSetCollate a
settings Bool
collate = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let collate' :: CInt
collate' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
collate
Ptr PrintSettings -> CInt -> IO ()
gtk_print_settings_set_collate Ptr PrintSettings
settings' CInt
collate'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetCollateMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetCollateMethodInfo a signature where
overloadedMethod = printSettingsSetCollate
instance O.OverloadedMethodInfo PrintSettingsSetCollateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetCollate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetCollate"
}
#endif
foreign import ccall "gtk_print_settings_set_default_source" gtk_print_settings_set_default_source ::
Ptr PrintSettings ->
CString ->
IO ()
printSettingsSetDefaultSource ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m ()
printSettingsSetDefaultSource :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m ()
printSettingsSetDefaultSource a
settings Text
defaultSource = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
defaultSource' <- Text -> IO CString
textToCString Text
defaultSource
Ptr PrintSettings -> CString -> IO ()
gtk_print_settings_set_default_source Ptr PrintSettings
settings' CString
defaultSource'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
defaultSource'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetDefaultSourceMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetDefaultSourceMethodInfo a signature where
overloadedMethod = printSettingsSetDefaultSource
instance O.OverloadedMethodInfo PrintSettingsSetDefaultSourceMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetDefaultSource",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetDefaultSource"
}
#endif
foreign import ccall "gtk_print_settings_set_dither" gtk_print_settings_set_dither ::
Ptr PrintSettings ->
CString ->
IO ()
printSettingsSetDither ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m ()
printSettingsSetDither :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m ()
printSettingsSetDither a
settings Text
dither = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
dither' <- Text -> IO CString
textToCString Text
dither
Ptr PrintSettings -> CString -> IO ()
gtk_print_settings_set_dither Ptr PrintSettings
settings' CString
dither'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
dither'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetDitherMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetDitherMethodInfo a signature where
overloadedMethod = printSettingsSetDither
instance O.OverloadedMethodInfo PrintSettingsSetDitherMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetDither",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetDither"
}
#endif
foreign import ccall "gtk_print_settings_set_double" gtk_print_settings_set_double ::
Ptr PrintSettings ->
CString ->
CDouble ->
IO ()
printSettingsSetDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> Double
-> m ()
printSettingsSetDouble :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> Double -> m ()
printSettingsSetDouble a
settings Text
key Double
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
let value' :: CDouble
value' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
value
Ptr PrintSettings -> CString -> CDouble -> IO ()
gtk_print_settings_set_double Ptr PrintSettings
settings' CString
key' CDouble
value'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetDoubleMethodInfo
instance (signature ~ (T.Text -> Double -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetDoubleMethodInfo a signature where
overloadedMethod = printSettingsSetDouble
instance O.OverloadedMethodInfo PrintSettingsSetDoubleMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetDouble",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetDouble"
}
#endif
foreign import ccall "gtk_print_settings_set_duplex" gtk_print_settings_set_duplex ::
Ptr PrintSettings ->
CUInt ->
IO ()
printSettingsSetDuplex ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.Enums.PrintDuplex
-> m ()
printSettingsSetDuplex :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> PrintDuplex -> m ()
printSettingsSetDuplex a
settings PrintDuplex
duplex = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let duplex' :: CUInt
duplex' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PrintDuplex -> Int) -> PrintDuplex -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PrintDuplex -> Int
forall a. Enum a => a -> Int
fromEnum) PrintDuplex
duplex
Ptr PrintSettings -> CUInt -> IO ()
gtk_print_settings_set_duplex Ptr PrintSettings
settings' CUInt
duplex'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetDuplexMethodInfo
instance (signature ~ (Gtk.Enums.PrintDuplex -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetDuplexMethodInfo a signature where
overloadedMethod = printSettingsSetDuplex
instance O.OverloadedMethodInfo PrintSettingsSetDuplexMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetDuplex",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetDuplex"
}
#endif
foreign import ccall "gtk_print_settings_set_finishings" gtk_print_settings_set_finishings ::
Ptr PrintSettings ->
CString ->
IO ()
printSettingsSetFinishings ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m ()
printSettingsSetFinishings :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m ()
printSettingsSetFinishings a
settings Text
finishings = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
finishings' <- Text -> IO CString
textToCString Text
finishings
Ptr PrintSettings -> CString -> IO ()
gtk_print_settings_set_finishings Ptr PrintSettings
settings' CString
finishings'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
finishings'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetFinishingsMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetFinishingsMethodInfo a signature where
overloadedMethod = printSettingsSetFinishings
instance O.OverloadedMethodInfo PrintSettingsSetFinishingsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetFinishings",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetFinishings"
}
#endif
foreign import ccall "gtk_print_settings_set_int" gtk_print_settings_set_int ::
Ptr PrintSettings ->
CString ->
Int32 ->
IO ()
printSettingsSetInt ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> Int32
-> m ()
printSettingsSetInt :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> Int32 -> m ()
printSettingsSetInt a
settings Text
key Int32
value = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr PrintSettings -> CString -> Int32 -> IO ()
gtk_print_settings_set_int Ptr PrintSettings
settings' CString
key' Int32
value
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetIntMethodInfo
instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetIntMethodInfo a signature where
overloadedMethod = printSettingsSetInt
instance O.OverloadedMethodInfo PrintSettingsSetIntMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetInt",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetInt"
}
#endif
foreign import ccall "gtk_print_settings_set_length" gtk_print_settings_set_length ::
Ptr PrintSettings ->
CString ->
CDouble ->
CUInt ->
IO ()
printSettingsSetLength ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> Double
-> Gtk.Enums.Unit
-> m ()
printSettingsSetLength :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> Double -> Unit -> m ()
printSettingsSetLength a
settings Text
key Double
value Unit
unit = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
let value' :: CDouble
value' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
value
let unit' :: CUInt
unit' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Unit -> Int) -> Unit -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Unit -> Int
forall a. Enum a => a -> Int
fromEnum) Unit
unit
Ptr PrintSettings -> CString -> CDouble -> CUInt -> IO ()
gtk_print_settings_set_length Ptr PrintSettings
settings' CString
key' CDouble
value' CUInt
unit'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetLengthMethodInfo
instance (signature ~ (T.Text -> Double -> Gtk.Enums.Unit -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetLengthMethodInfo a signature where
overloadedMethod = printSettingsSetLength
instance O.OverloadedMethodInfo PrintSettingsSetLengthMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetLength",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetLength"
}
#endif
foreign import ccall "gtk_print_settings_set_media_type" gtk_print_settings_set_media_type ::
Ptr PrintSettings ->
CString ->
IO ()
printSettingsSetMediaType ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m ()
printSettingsSetMediaType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m ()
printSettingsSetMediaType a
settings Text
mediaType = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
mediaType' <- Text -> IO CString
textToCString Text
mediaType
Ptr PrintSettings -> CString -> IO ()
gtk_print_settings_set_media_type Ptr PrintSettings
settings' CString
mediaType'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
mediaType'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetMediaTypeMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetMediaTypeMethodInfo a signature where
overloadedMethod = printSettingsSetMediaType
instance O.OverloadedMethodInfo PrintSettingsSetMediaTypeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetMediaType",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetMediaType"
}
#endif
foreign import ccall "gtk_print_settings_set_n_copies" gtk_print_settings_set_n_copies ::
Ptr PrintSettings ->
Int32 ->
IO ()
printSettingsSetNCopies ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Int32
-> m ()
printSettingsSetNCopies :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Int32 -> m ()
printSettingsSetNCopies a
settings Int32
numCopies = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr PrintSettings -> Int32 -> IO ()
gtk_print_settings_set_n_copies Ptr PrintSettings
settings' Int32
numCopies
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetNCopiesMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetNCopiesMethodInfo a signature where
overloadedMethod = printSettingsSetNCopies
instance O.OverloadedMethodInfo PrintSettingsSetNCopiesMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetNCopies",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetNCopies"
}
#endif
foreign import ccall "gtk_print_settings_set_number_up" gtk_print_settings_set_number_up ::
Ptr PrintSettings ->
Int32 ->
IO ()
printSettingsSetNumberUp ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Int32
-> m ()
printSettingsSetNumberUp :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Int32 -> m ()
printSettingsSetNumberUp a
settings Int32
numberUp = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr PrintSettings -> Int32 -> IO ()
gtk_print_settings_set_number_up Ptr PrintSettings
settings' Int32
numberUp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetNumberUpMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetNumberUpMethodInfo a signature where
overloadedMethod = printSettingsSetNumberUp
instance O.OverloadedMethodInfo PrintSettingsSetNumberUpMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetNumberUp",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetNumberUp"
}
#endif
foreign import ccall "gtk_print_settings_set_number_up_layout" gtk_print_settings_set_number_up_layout ::
Ptr PrintSettings ->
CUInt ->
IO ()
printSettingsSetNumberUpLayout ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.Enums.NumberUpLayout
-> m ()
printSettingsSetNumberUpLayout :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> NumberUpLayout -> m ()
printSettingsSetNumberUpLayout a
settings NumberUpLayout
numberUpLayout = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let numberUpLayout' :: CUInt
numberUpLayout' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (NumberUpLayout -> Int) -> NumberUpLayout -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NumberUpLayout -> Int
forall a. Enum a => a -> Int
fromEnum) NumberUpLayout
numberUpLayout
Ptr PrintSettings -> CUInt -> IO ()
gtk_print_settings_set_number_up_layout Ptr PrintSettings
settings' CUInt
numberUpLayout'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetNumberUpLayoutMethodInfo
instance (signature ~ (Gtk.Enums.NumberUpLayout -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetNumberUpLayoutMethodInfo a signature where
overloadedMethod = printSettingsSetNumberUpLayout
instance O.OverloadedMethodInfo PrintSettingsSetNumberUpLayoutMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetNumberUpLayout",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetNumberUpLayout"
}
#endif
foreign import ccall "gtk_print_settings_set_orientation" gtk_print_settings_set_orientation ::
Ptr PrintSettings ->
CUInt ->
IO ()
printSettingsSetOrientation ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.Enums.PageOrientation
-> m ()
printSettingsSetOrientation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> PageOrientation -> m ()
printSettingsSetOrientation a
settings PageOrientation
orientation = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let orientation' :: CUInt
orientation' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (PageOrientation -> Int) -> PageOrientation -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PageOrientation -> Int
forall a. Enum a => a -> Int
fromEnum) PageOrientation
orientation
Ptr PrintSettings -> CUInt -> IO ()
gtk_print_settings_set_orientation Ptr PrintSettings
settings' CUInt
orientation'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetOrientationMethodInfo
instance (signature ~ (Gtk.Enums.PageOrientation -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetOrientationMethodInfo a signature where
overloadedMethod = printSettingsSetOrientation
instance O.OverloadedMethodInfo PrintSettingsSetOrientationMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetOrientation",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetOrientation"
}
#endif
foreign import ccall "gtk_print_settings_set_output_bin" gtk_print_settings_set_output_bin ::
Ptr PrintSettings ->
CString ->
IO ()
printSettingsSetOutputBin ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m ()
printSettingsSetOutputBin :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m ()
printSettingsSetOutputBin a
settings Text
outputBin = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
outputBin' <- Text -> IO CString
textToCString Text
outputBin
Ptr PrintSettings -> CString -> IO ()
gtk_print_settings_set_output_bin Ptr PrintSettings
settings' CString
outputBin'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
outputBin'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetOutputBinMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetOutputBinMethodInfo a signature where
overloadedMethod = printSettingsSetOutputBin
instance O.OverloadedMethodInfo PrintSettingsSetOutputBinMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetOutputBin",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetOutputBin"
}
#endif
foreign import ccall "gtk_print_settings_set_page_ranges" gtk_print_settings_set_page_ranges ::
Ptr PrintSettings ->
Ptr Gtk.PageRange.PageRange ->
Int32 ->
IO ()
printSettingsSetPageRanges ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> [Gtk.PageRange.PageRange]
-> m ()
a
settings [PageRange]
pageRanges = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let numRanges :: Int32
numRanges = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [PageRange] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [PageRange]
pageRanges
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
[Ptr PageRange]
pageRanges' <- (PageRange -> IO (Ptr PageRange))
-> [PageRange] -> IO [Ptr PageRange]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM PageRange -> IO (Ptr PageRange)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [PageRange]
pageRanges
Ptr PageRange
pageRanges'' <- Int -> [Ptr PageRange] -> IO (Ptr PageRange)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
8 [Ptr PageRange]
pageRanges'
Ptr PrintSettings -> Ptr PageRange -> Int32 -> IO ()
gtk_print_settings_set_page_ranges Ptr PrintSettings
settings' Ptr PageRange
pageRanges'' Int32
numRanges
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
(PageRange -> IO ()) -> [PageRange] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ PageRange -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [PageRange]
pageRanges
Ptr PageRange -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr PageRange
pageRanges''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetPageRangesMethodInfo
instance (signature ~ ([Gtk.PageRange.PageRange] -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetPageRangesMethodInfo a signature where
overloadedMethod = printSettingsSetPageRanges
instance O.OverloadedMethodInfo PrintSettingsSetPageRangesMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetPageRanges",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetPageRanges"
}
#endif
foreign import ccall "gtk_print_settings_set_page_set" gtk_print_settings_set_page_set ::
Ptr PrintSettings ->
CUInt ->
IO ()
printSettingsSetPageSet ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.Enums.PageSet
-> m ()
printSettingsSetPageSet :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> PageSet -> m ()
printSettingsSetPageSet a
settings PageSet
pageSet = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let pageSet' :: CUInt
pageSet' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PageSet -> Int) -> PageSet -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PageSet -> Int
forall a. Enum a => a -> Int
fromEnum) PageSet
pageSet
Ptr PrintSettings -> CUInt -> IO ()
gtk_print_settings_set_page_set Ptr PrintSettings
settings' CUInt
pageSet'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetPageSetMethodInfo
instance (signature ~ (Gtk.Enums.PageSet -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetPageSetMethodInfo a signature where
overloadedMethod = printSettingsSetPageSet
instance O.OverloadedMethodInfo PrintSettingsSetPageSetMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetPageSet",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetPageSet"
}
#endif
foreign import ccall "gtk_print_settings_set_paper_height" gtk_print_settings_set_paper_height ::
Ptr PrintSettings ->
CDouble ->
CUInt ->
IO ()
printSettingsSetPaperHeight ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Double
-> Gtk.Enums.Unit
-> m ()
printSettingsSetPaperHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Double -> Unit -> m ()
printSettingsSetPaperHeight a
settings Double
height Unit
unit = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let height' :: CDouble
height' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
height
let unit' :: CUInt
unit' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Unit -> Int) -> Unit -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Unit -> Int
forall a. Enum a => a -> Int
fromEnum) Unit
unit
Ptr PrintSettings -> CDouble -> CUInt -> IO ()
gtk_print_settings_set_paper_height Ptr PrintSettings
settings' CDouble
height' CUInt
unit'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetPaperHeightMethodInfo
instance (signature ~ (Double -> Gtk.Enums.Unit -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetPaperHeightMethodInfo a signature where
overloadedMethod = printSettingsSetPaperHeight
instance O.OverloadedMethodInfo PrintSettingsSetPaperHeightMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetPaperHeight",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetPaperHeight"
}
#endif
foreign import ccall "gtk_print_settings_set_paper_size" gtk_print_settings_set_paper_size ::
Ptr PrintSettings ->
Ptr Gtk.PaperSize.PaperSize ->
IO ()
printSettingsSetPaperSize ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.PaperSize.PaperSize
-> m ()
printSettingsSetPaperSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> PaperSize -> m ()
printSettingsSetPaperSize a
settings PaperSize
paperSize = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr PaperSize
paperSize' <- PaperSize -> IO (Ptr PaperSize)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr PaperSize
paperSize
Ptr PrintSettings -> Ptr PaperSize -> IO ()
gtk_print_settings_set_paper_size Ptr PrintSettings
settings' Ptr PaperSize
paperSize'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
PaperSize -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr PaperSize
paperSize
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetPaperSizeMethodInfo
instance (signature ~ (Gtk.PaperSize.PaperSize -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetPaperSizeMethodInfo a signature where
overloadedMethod = printSettingsSetPaperSize
instance O.OverloadedMethodInfo PrintSettingsSetPaperSizeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetPaperSize",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetPaperSize"
}
#endif
foreign import ccall "gtk_print_settings_set_paper_width" gtk_print_settings_set_paper_width ::
Ptr PrintSettings ->
CDouble ->
CUInt ->
IO ()
printSettingsSetPaperWidth ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Double
-> Gtk.Enums.Unit
-> m ()
printSettingsSetPaperWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Double -> Unit -> m ()
printSettingsSetPaperWidth a
settings Double
width Unit
unit = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let width' :: CDouble
width' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
width
let unit' :: CUInt
unit' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Unit -> Int) -> Unit -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Unit -> Int
forall a. Enum a => a -> Int
fromEnum) Unit
unit
Ptr PrintSettings -> CDouble -> CUInt -> IO ()
gtk_print_settings_set_paper_width Ptr PrintSettings
settings' CDouble
width' CUInt
unit'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetPaperWidthMethodInfo
instance (signature ~ (Double -> Gtk.Enums.Unit -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetPaperWidthMethodInfo a signature where
overloadedMethod = printSettingsSetPaperWidth
instance O.OverloadedMethodInfo PrintSettingsSetPaperWidthMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetPaperWidth",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetPaperWidth"
}
#endif
foreign import ccall "gtk_print_settings_set_print_pages" gtk_print_settings_set_print_pages ::
Ptr PrintSettings ->
CUInt ->
IO ()
printSettingsSetPrintPages ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.Enums.PrintPages
-> m ()
printSettingsSetPrintPages :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> PrintPages -> m ()
printSettingsSetPrintPages a
settings PrintPages
pages = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let pages' :: CUInt
pages' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PrintPages -> Int) -> PrintPages -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PrintPages -> Int
forall a. Enum a => a -> Int
fromEnum) PrintPages
pages
Ptr PrintSettings -> CUInt -> IO ()
gtk_print_settings_set_print_pages Ptr PrintSettings
settings' CUInt
pages'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetPrintPagesMethodInfo
instance (signature ~ (Gtk.Enums.PrintPages -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetPrintPagesMethodInfo a signature where
overloadedMethod = printSettingsSetPrintPages
instance O.OverloadedMethodInfo PrintSettingsSetPrintPagesMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetPrintPages",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetPrintPages"
}
#endif
foreign import ccall "gtk_print_settings_set_printer" gtk_print_settings_set_printer ::
Ptr PrintSettings ->
CString ->
IO ()
printSettingsSetPrinter ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m ()
printSettingsSetPrinter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m ()
printSettingsSetPrinter a
settings Text
printer = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
printer' <- Text -> IO CString
textToCString Text
printer
Ptr PrintSettings -> CString -> IO ()
gtk_print_settings_set_printer Ptr PrintSettings
settings' CString
printer'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
printer'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetPrinterMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetPrinterMethodInfo a signature where
overloadedMethod = printSettingsSetPrinter
instance O.OverloadedMethodInfo PrintSettingsSetPrinterMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetPrinter",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetPrinter"
}
#endif
foreign import ccall "gtk_print_settings_set_printer_lpi" gtk_print_settings_set_printer_lpi ::
Ptr PrintSettings ->
CDouble ->
IO ()
printSettingsSetPrinterLpi ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Double
-> m ()
printSettingsSetPrinterLpi :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Double -> m ()
printSettingsSetPrinterLpi a
settings Double
lpi = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let lpi' :: CDouble
lpi' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
lpi
Ptr PrintSettings -> CDouble -> IO ()
gtk_print_settings_set_printer_lpi Ptr PrintSettings
settings' CDouble
lpi'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetPrinterLpiMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetPrinterLpiMethodInfo a signature where
overloadedMethod = printSettingsSetPrinterLpi
instance O.OverloadedMethodInfo PrintSettingsSetPrinterLpiMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetPrinterLpi",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetPrinterLpi"
}
#endif
foreign import ccall "gtk_print_settings_set_quality" gtk_print_settings_set_quality ::
Ptr PrintSettings ->
CUInt ->
IO ()
printSettingsSetQuality ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Gtk.Enums.PrintQuality
-> m ()
printSettingsSetQuality :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> PrintQuality -> m ()
printSettingsSetQuality a
settings PrintQuality
quality = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let quality' :: CUInt
quality' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PrintQuality -> Int) -> PrintQuality -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PrintQuality -> Int
forall a. Enum a => a -> Int
fromEnum) PrintQuality
quality
Ptr PrintSettings -> CUInt -> IO ()
gtk_print_settings_set_quality Ptr PrintSettings
settings' CUInt
quality'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetQualityMethodInfo
instance (signature ~ (Gtk.Enums.PrintQuality -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetQualityMethodInfo a signature where
overloadedMethod = printSettingsSetQuality
instance O.OverloadedMethodInfo PrintSettingsSetQualityMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetQuality",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetQuality"
}
#endif
foreign import ccall "gtk_print_settings_set_resolution" gtk_print_settings_set_resolution ::
Ptr PrintSettings ->
Int32 ->
IO ()
printSettingsSetResolution ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Int32
-> m ()
printSettingsSetResolution :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Int32 -> m ()
printSettingsSetResolution a
settings Int32
resolution = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr PrintSettings -> Int32 -> IO ()
gtk_print_settings_set_resolution Ptr PrintSettings
settings' Int32
resolution
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetResolutionMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetResolutionMethodInfo a signature where
overloadedMethod = printSettingsSetResolution
instance O.OverloadedMethodInfo PrintSettingsSetResolutionMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetResolution",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetResolution"
}
#endif
foreign import ccall "gtk_print_settings_set_resolution_xy" gtk_print_settings_set_resolution_xy ::
Ptr PrintSettings ->
Int32 ->
Int32 ->
IO ()
printSettingsSetResolutionXy ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Int32
-> Int32
-> m ()
printSettingsSetResolutionXy :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Int32 -> Int32 -> m ()
printSettingsSetResolutionXy a
settings Int32
resolutionX Int32
resolutionY = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr PrintSettings -> Int32 -> Int32 -> IO ()
gtk_print_settings_set_resolution_xy Ptr PrintSettings
settings' Int32
resolutionX Int32
resolutionY
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetResolutionXyMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetResolutionXyMethodInfo a signature where
overloadedMethod = printSettingsSetResolutionXy
instance O.OverloadedMethodInfo PrintSettingsSetResolutionXyMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetResolutionXy",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetResolutionXy"
}
#endif
foreign import ccall "gtk_print_settings_set_reverse" gtk_print_settings_set_reverse ::
Ptr PrintSettings ->
CInt ->
IO ()
printSettingsSetReverse ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Bool
-> m ()
printSettingsSetReverse :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Bool -> m ()
printSettingsSetReverse a
settings Bool
reverse = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let reverse' :: CInt
reverse' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
reverse
Ptr PrintSettings -> CInt -> IO ()
gtk_print_settings_set_reverse Ptr PrintSettings
settings' CInt
reverse'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetReverseMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetReverseMethodInfo a signature where
overloadedMethod = printSettingsSetReverse
instance O.OverloadedMethodInfo PrintSettingsSetReverseMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetReverse",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetReverse"
}
#endif
foreign import ccall "gtk_print_settings_set_scale" gtk_print_settings_set_scale ::
Ptr PrintSettings ->
CDouble ->
IO ()
printSettingsSetScale ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Double
-> m ()
printSettingsSetScale :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Double -> m ()
printSettingsSetScale a
settings Double
scale = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let scale' :: CDouble
scale' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
scale
Ptr PrintSettings -> CDouble -> IO ()
gtk_print_settings_set_scale Ptr PrintSettings
settings' CDouble
scale'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetScaleMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetScaleMethodInfo a signature where
overloadedMethod = printSettingsSetScale
instance O.OverloadedMethodInfo PrintSettingsSetScaleMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetScale",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetScale"
}
#endif
foreign import ccall "gtk_print_settings_set_use_color" gtk_print_settings_set_use_color ::
Ptr PrintSettings ->
CInt ->
IO ()
printSettingsSetUseColor ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> Bool
-> m ()
printSettingsSetUseColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Bool -> m ()
printSettingsSetUseColor a
settings Bool
useColor = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
let useColor' :: CInt
useColor' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
useColor
Ptr PrintSettings -> CInt -> IO ()
gtk_print_settings_set_use_color Ptr PrintSettings
settings' CInt
useColor'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsSetUseColorMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsSetUseColorMethodInfo a signature where
overloadedMethod = printSettingsSetUseColor
instance O.OverloadedMethodInfo PrintSettingsSetUseColorMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsSetUseColor",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsSetUseColor"
}
#endif
foreign import ccall "gtk_print_settings_to_file" gtk_print_settings_to_file ::
Ptr PrintSettings ->
CString ->
Ptr (Ptr GError) ->
IO CInt
printSettingsToFile ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> [Char]
-> m ()
printSettingsToFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> [Char] -> m ()
printSettingsToFile a
settings [Char]
fileName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
fileName' <- [Char] -> IO CString
stringToCString [Char]
fileName
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr PrintSettings -> CString -> Ptr (Ptr GError) -> IO CInt
gtk_print_settings_to_file Ptr PrintSettings
settings' CString
fileName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fileName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fileName'
)
#if defined(ENABLE_OVERLOADING)
data PrintSettingsToFileMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsToFileMethodInfo a signature where
overloadedMethod = printSettingsToFile
instance O.OverloadedMethodInfo PrintSettingsToFileMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsToFile",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsToFile"
}
#endif
foreign import ccall "gtk_print_settings_to_gvariant" gtk_print_settings_to_gvariant ::
Ptr PrintSettings ->
IO (Ptr GVariant)
printSettingsToGvariant ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> m GVariant
printSettingsToGvariant :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> m GVariant
printSettingsToGvariant a
settings = IO GVariant -> m GVariant
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr GVariant
result <- Ptr PrintSettings -> IO (Ptr GVariant)
gtk_print_settings_to_gvariant Ptr PrintSettings
settings'
Text -> Ptr GVariant -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"printSettingsToGvariant" Ptr GVariant
result
GVariant
result' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
GVariant -> IO GVariant
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
result'
#if defined(ENABLE_OVERLOADING)
data PrintSettingsToGvariantMethodInfo
instance (signature ~ (m GVariant), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsToGvariantMethodInfo a signature where
overloadedMethod = printSettingsToGvariant
instance O.OverloadedMethodInfo PrintSettingsToGvariantMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsToGvariant",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsToGvariant"
}
#endif
foreign import ccall "gtk_print_settings_to_key_file" gtk_print_settings_to_key_file ::
Ptr PrintSettings ->
Ptr GLib.KeyFile.KeyFile ->
CString ->
IO ()
printSettingsToKeyFile ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> GLib.KeyFile.KeyFile
-> Maybe (T.Text)
-> m ()
printSettingsToKeyFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> KeyFile -> Maybe Text -> m ()
printSettingsToKeyFile a
settings KeyFile
keyFile Maybe Text
groupName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
Ptr KeyFile
keyFile' <- KeyFile -> IO (Ptr KeyFile)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr KeyFile
keyFile
CString
maybeGroupName <- case Maybe Text
groupName of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jGroupName -> do
CString
jGroupName' <- Text -> IO CString
textToCString Text
jGroupName
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jGroupName'
Ptr PrintSettings -> Ptr KeyFile -> CString -> IO ()
gtk_print_settings_to_key_file Ptr PrintSettings
settings' Ptr KeyFile
keyFile' CString
maybeGroupName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
KeyFile -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr KeyFile
keyFile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeGroupName
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsToKeyFileMethodInfo
instance (signature ~ (GLib.KeyFile.KeyFile -> Maybe (T.Text) -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsToKeyFileMethodInfo a signature where
overloadedMethod = printSettingsToKeyFile
instance O.OverloadedMethodInfo PrintSettingsToKeyFileMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsToKeyFile",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsToKeyFile"
}
#endif
foreign import ccall "gtk_print_settings_unset" gtk_print_settings_unset ::
Ptr PrintSettings ->
CString ->
IO ()
printSettingsUnset ::
(B.CallStack.HasCallStack, MonadIO m, IsPrintSettings a) =>
a
-> T.Text
-> m ()
printSettingsUnset :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsPrintSettings a) =>
a -> Text -> m ()
printSettingsUnset a
settings Text
key = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr PrintSettings
settings' <- a -> IO (Ptr PrintSettings)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
settings
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr PrintSettings -> CString -> IO ()
gtk_print_settings_unset Ptr PrintSettings
settings' CString
key'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
settings
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PrintSettingsUnsetMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsPrintSettings a) => O.OverloadedMethod PrintSettingsUnsetMethodInfo a signature where
overloadedMethod = printSettingsUnset
instance O.OverloadedMethodInfo PrintSettingsUnsetMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.PrintSettings.printSettingsUnset",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-PrintSettings.html#v:printSettingsUnset"
}
#endif