{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Poppler.Objects.FormField
(
FormField(..) ,
IsFormField ,
toFormField ,
#if defined(ENABLE_OVERLOADING)
ResolveFormFieldMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FormFieldButtonGetButtonTypeMethodInfo ,
#endif
formFieldButtonGetButtonType ,
#if defined(ENABLE_OVERLOADING)
FormFieldButtonGetStateMethodInfo ,
#endif
formFieldButtonGetState ,
#if defined(ENABLE_OVERLOADING)
FormFieldButtonSetStateMethodInfo ,
#endif
formFieldButtonSetState ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceCanSelectMultipleMethodInfo,
#endif
formFieldChoiceCanSelectMultiple ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceCommitOnChangeMethodInfo ,
#endif
formFieldChoiceCommitOnChange ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceDoSpellCheckMethodInfo ,
#endif
formFieldChoiceDoSpellCheck ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceGetChoiceTypeMethodInfo ,
#endif
formFieldChoiceGetChoiceType ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceGetItemMethodInfo ,
#endif
formFieldChoiceGetItem ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceGetNItemsMethodInfo ,
#endif
formFieldChoiceGetNItems ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceGetTextMethodInfo ,
#endif
formFieldChoiceGetText ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceIsEditableMethodInfo ,
#endif
formFieldChoiceIsEditable ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceIsItemSelectedMethodInfo ,
#endif
formFieldChoiceIsItemSelected ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceSelectItemMethodInfo ,
#endif
formFieldChoiceSelectItem ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceSetTextMethodInfo ,
#endif
formFieldChoiceSetText ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceToggleItemMethodInfo ,
#endif
formFieldChoiceToggleItem ,
#if defined(ENABLE_OVERLOADING)
FormFieldChoiceUnselectAllMethodInfo ,
#endif
formFieldChoiceUnselectAll ,
#if defined(ENABLE_OVERLOADING)
FormFieldGetActionMethodInfo ,
#endif
formFieldGetAction ,
#if defined(ENABLE_OVERLOADING)
FormFieldGetAdditionalActionMethodInfo ,
#endif
formFieldGetAdditionalAction ,
#if defined(ENABLE_OVERLOADING)
FormFieldGetFieldTypeMethodInfo ,
#endif
formFieldGetFieldType ,
#if defined(ENABLE_OVERLOADING)
FormFieldGetFontSizeMethodInfo ,
#endif
formFieldGetFontSize ,
#if defined(ENABLE_OVERLOADING)
FormFieldGetIdMethodInfo ,
#endif
formFieldGetId ,
#if defined(ENABLE_OVERLOADING)
FormFieldGetMappingNameMethodInfo ,
#endif
formFieldGetMappingName ,
#if defined(ENABLE_OVERLOADING)
FormFieldGetNameMethodInfo ,
#endif
formFieldGetName ,
#if defined(ENABLE_OVERLOADING)
FormFieldGetPartialNameMethodInfo ,
#endif
formFieldGetPartialName ,
#if defined(ENABLE_OVERLOADING)
FormFieldIsReadOnlyMethodInfo ,
#endif
formFieldIsReadOnly ,
#if defined(ENABLE_OVERLOADING)
FormFieldTextDoScrollMethodInfo ,
#endif
formFieldTextDoScroll ,
#if defined(ENABLE_OVERLOADING)
FormFieldTextDoSpellCheckMethodInfo ,
#endif
formFieldTextDoSpellCheck ,
#if defined(ENABLE_OVERLOADING)
FormFieldTextGetMaxLenMethodInfo ,
#endif
formFieldTextGetMaxLen ,
#if defined(ENABLE_OVERLOADING)
FormFieldTextGetTextMethodInfo ,
#endif
formFieldTextGetText ,
#if defined(ENABLE_OVERLOADING)
FormFieldTextGetTextTypeMethodInfo ,
#endif
formFieldTextGetTextType ,
#if defined(ENABLE_OVERLOADING)
FormFieldTextIsPasswordMethodInfo ,
#endif
formFieldTextIsPassword ,
#if defined(ENABLE_OVERLOADING)
FormFieldTextIsRichTextMethodInfo ,
#endif
formFieldTextIsRichText ,
#if defined(ENABLE_OVERLOADING)
FormFieldTextSetTextMethodInfo ,
#endif
formFieldTextSetText ,
) 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.ManagedPtr as B.ManagedPtr
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 GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Poppler.Enums as Poppler.Enums
import {-# SOURCE #-} qualified GI.Poppler.Unions.Action as Poppler.Action
newtype FormField = FormField (ManagedPtr FormField)
deriving (FormField -> FormField -> Bool
(FormField -> FormField -> Bool)
-> (FormField -> FormField -> Bool) -> Eq FormField
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FormField -> FormField -> Bool
$c/= :: FormField -> FormField -> Bool
== :: FormField -> FormField -> Bool
$c== :: FormField -> FormField -> Bool
Eq)
foreign import ccall "poppler_form_field_get_type"
c_poppler_form_field_get_type :: IO GType
instance GObject FormField where
gobjectType :: IO GType
gobjectType = IO GType
c_poppler_form_field_get_type
instance B.GValue.IsGValue FormField where
toGValue :: FormField -> IO GValue
toGValue FormField
o = do
GType
gtype <- IO GType
c_poppler_form_field_get_type
FormField -> (Ptr FormField -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FormField
o (GType
-> (GValue -> Ptr FormField -> IO ()) -> Ptr FormField -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr FormField -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO FormField
fromGValue GValue
gv = do
Ptr FormField
ptr <- GValue -> IO (Ptr FormField)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr FormField)
(ManagedPtr FormField -> FormField)
-> Ptr FormField -> IO FormField
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr FormField -> FormField
FormField Ptr FormField
ptr
class (GObject o, O.IsDescendantOf FormField o) => IsFormField o
instance (GObject o, O.IsDescendantOf FormField o) => IsFormField o
instance O.HasParentTypes FormField
type instance O.ParentTypes FormField = '[GObject.Object.Object]
toFormField :: (MonadIO m, IsFormField o) => o -> m FormField
toFormField :: o -> m FormField
toFormField = IO FormField -> m FormField
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FormField -> m FormField)
-> (o -> IO FormField) -> o -> m FormField
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr FormField -> FormField) -> o -> IO FormField
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr FormField -> FormField
FormField
#if defined(ENABLE_OVERLOADING)
type family ResolveFormFieldMethod (t :: Symbol) (o :: *) :: * where
ResolveFormFieldMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveFormFieldMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveFormFieldMethod "buttonGetButtonType" o = FormFieldButtonGetButtonTypeMethodInfo
ResolveFormFieldMethod "buttonGetState" o = FormFieldButtonGetStateMethodInfo
ResolveFormFieldMethod "buttonSetState" o = FormFieldButtonSetStateMethodInfo
ResolveFormFieldMethod "choiceCanSelectMultiple" o = FormFieldChoiceCanSelectMultipleMethodInfo
ResolveFormFieldMethod "choiceCommitOnChange" o = FormFieldChoiceCommitOnChangeMethodInfo
ResolveFormFieldMethod "choiceDoSpellCheck" o = FormFieldChoiceDoSpellCheckMethodInfo
ResolveFormFieldMethod "choiceGetChoiceType" o = FormFieldChoiceGetChoiceTypeMethodInfo
ResolveFormFieldMethod "choiceGetItem" o = FormFieldChoiceGetItemMethodInfo
ResolveFormFieldMethod "choiceGetNItems" o = FormFieldChoiceGetNItemsMethodInfo
ResolveFormFieldMethod "choiceGetText" o = FormFieldChoiceGetTextMethodInfo
ResolveFormFieldMethod "choiceIsEditable" o = FormFieldChoiceIsEditableMethodInfo
ResolveFormFieldMethod "choiceIsItemSelected" o = FormFieldChoiceIsItemSelectedMethodInfo
ResolveFormFieldMethod "choiceSelectItem" o = FormFieldChoiceSelectItemMethodInfo
ResolveFormFieldMethod "choiceSetText" o = FormFieldChoiceSetTextMethodInfo
ResolveFormFieldMethod "choiceToggleItem" o = FormFieldChoiceToggleItemMethodInfo
ResolveFormFieldMethod "choiceUnselectAll" o = FormFieldChoiceUnselectAllMethodInfo
ResolveFormFieldMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveFormFieldMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveFormFieldMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveFormFieldMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveFormFieldMethod "isReadOnly" o = FormFieldIsReadOnlyMethodInfo
ResolveFormFieldMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveFormFieldMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveFormFieldMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveFormFieldMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveFormFieldMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveFormFieldMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveFormFieldMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveFormFieldMethod "textDoScroll" o = FormFieldTextDoScrollMethodInfo
ResolveFormFieldMethod "textDoSpellCheck" o = FormFieldTextDoSpellCheckMethodInfo
ResolveFormFieldMethod "textGetMaxLen" o = FormFieldTextGetMaxLenMethodInfo
ResolveFormFieldMethod "textGetText" o = FormFieldTextGetTextMethodInfo
ResolveFormFieldMethod "textGetTextType" o = FormFieldTextGetTextTypeMethodInfo
ResolveFormFieldMethod "textIsPassword" o = FormFieldTextIsPasswordMethodInfo
ResolveFormFieldMethod "textIsRichText" o = FormFieldTextIsRichTextMethodInfo
ResolveFormFieldMethod "textSetText" o = FormFieldTextSetTextMethodInfo
ResolveFormFieldMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveFormFieldMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveFormFieldMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveFormFieldMethod "getAction" o = FormFieldGetActionMethodInfo
ResolveFormFieldMethod "getAdditionalAction" o = FormFieldGetAdditionalActionMethodInfo
ResolveFormFieldMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveFormFieldMethod "getFieldType" o = FormFieldGetFieldTypeMethodInfo
ResolveFormFieldMethod "getFontSize" o = FormFieldGetFontSizeMethodInfo
ResolveFormFieldMethod "getId" o = FormFieldGetIdMethodInfo
ResolveFormFieldMethod "getMappingName" o = FormFieldGetMappingNameMethodInfo
ResolveFormFieldMethod "getName" o = FormFieldGetNameMethodInfo
ResolveFormFieldMethod "getPartialName" o = FormFieldGetPartialNameMethodInfo
ResolveFormFieldMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveFormFieldMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveFormFieldMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveFormFieldMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveFormFieldMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveFormFieldMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFormFieldMethod t FormField, O.MethodInfo info FormField p) => OL.IsLabel t (FormField -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FormField
type instance O.AttributeList FormField = FormFieldAttributeList
type FormFieldAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FormField = FormFieldSignalList
type FormFieldSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "poppler_form_field_button_get_button_type" poppler_form_field_button_get_button_type ::
Ptr FormField ->
IO CUInt
formFieldButtonGetButtonType ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Poppler.Enums.FormButtonType
formFieldButtonGetButtonType :: a -> m FormButtonType
formFieldButtonGetButtonType a
field = IO FormButtonType -> m FormButtonType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FormButtonType -> m FormButtonType)
-> IO FormButtonType -> m FormButtonType
forall a b. (a -> b) -> a -> b
$ do
Ptr FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CUInt
result <- Ptr FormField -> IO CUInt
poppler_form_field_button_get_button_type Ptr FormField
field'
let result' :: FormButtonType
result' = (Int -> FormButtonType
forall a. Enum a => Int -> a
toEnum (Int -> FormButtonType)
-> (CUInt -> Int) -> CUInt -> FormButtonType
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
field
FormButtonType -> IO FormButtonType
forall (m :: * -> *) a. Monad m => a -> m a
return FormButtonType
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldButtonGetButtonTypeMethodInfo
instance (signature ~ (m Poppler.Enums.FormButtonType), MonadIO m, IsFormField a) => O.MethodInfo FormFieldButtonGetButtonTypeMethodInfo a signature where
overloadedMethod = formFieldButtonGetButtonType
#endif
foreign import ccall "poppler_form_field_button_get_state" poppler_form_field_button_get_state ::
Ptr FormField ->
IO CInt
formFieldButtonGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldButtonGetState :: a -> m Bool
formFieldButtonGetState a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_button_get_state Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldButtonGetStateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldButtonGetStateMethodInfo a signature where
overloadedMethod = formFieldButtonGetState
#endif
foreign import ccall "poppler_form_field_button_set_state" poppler_form_field_button_set_state ::
Ptr FormField ->
CInt ->
IO ()
formFieldButtonSetState ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> Bool
-> m ()
formFieldButtonSetState :: a -> Bool -> m ()
formFieldButtonSetState a
field Bool
state = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
let state' :: CInt
state' = (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
state
Ptr FormField -> CInt -> IO ()
poppler_form_field_button_set_state Ptr FormField
field' CInt
state'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FormFieldButtonSetStateMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFormField a) => O.MethodInfo FormFieldButtonSetStateMethodInfo a signature where
overloadedMethod = formFieldButtonSetState
#endif
foreign import ccall "poppler_form_field_choice_can_select_multiple" poppler_form_field_choice_can_select_multiple ::
Ptr FormField ->
IO CInt
formFieldChoiceCanSelectMultiple ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldChoiceCanSelectMultiple :: a -> m Bool
formFieldChoiceCanSelectMultiple a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_choice_can_select_multiple Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceCanSelectMultipleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceCanSelectMultipleMethodInfo a signature where
overloadedMethod = formFieldChoiceCanSelectMultiple
#endif
foreign import ccall "poppler_form_field_choice_commit_on_change" poppler_form_field_choice_commit_on_change ::
Ptr FormField ->
IO CInt
formFieldChoiceCommitOnChange ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldChoiceCommitOnChange :: a -> m Bool
formFieldChoiceCommitOnChange a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_choice_commit_on_change Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceCommitOnChangeMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceCommitOnChangeMethodInfo a signature where
overloadedMethod = formFieldChoiceCommitOnChange
#endif
foreign import ccall "poppler_form_field_choice_do_spell_check" poppler_form_field_choice_do_spell_check ::
Ptr FormField ->
IO CInt
formFieldChoiceDoSpellCheck ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldChoiceDoSpellCheck :: a -> m Bool
formFieldChoiceDoSpellCheck a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_choice_do_spell_check Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceDoSpellCheckMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceDoSpellCheckMethodInfo a signature where
overloadedMethod = formFieldChoiceDoSpellCheck
#endif
foreign import ccall "poppler_form_field_choice_get_choice_type" poppler_form_field_choice_get_choice_type ::
Ptr FormField ->
IO CUInt
formFieldChoiceGetChoiceType ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Poppler.Enums.FormChoiceType
formFieldChoiceGetChoiceType :: a -> m FormChoiceType
formFieldChoiceGetChoiceType a
field = IO FormChoiceType -> m FormChoiceType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FormChoiceType -> m FormChoiceType)
-> IO FormChoiceType -> m FormChoiceType
forall a b. (a -> b) -> a -> b
$ do
Ptr FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CUInt
result <- Ptr FormField -> IO CUInt
poppler_form_field_choice_get_choice_type Ptr FormField
field'
let result' :: FormChoiceType
result' = (Int -> FormChoiceType
forall a. Enum a => Int -> a
toEnum (Int -> FormChoiceType)
-> (CUInt -> Int) -> CUInt -> FormChoiceType
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
field
FormChoiceType -> IO FormChoiceType
forall (m :: * -> *) a. Monad m => a -> m a
return FormChoiceType
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceGetChoiceTypeMethodInfo
instance (signature ~ (m Poppler.Enums.FormChoiceType), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceGetChoiceTypeMethodInfo a signature where
overloadedMethod = formFieldChoiceGetChoiceType
#endif
foreign import ccall "poppler_form_field_choice_get_item" poppler_form_field_choice_get_item ::
Ptr FormField ->
Int32 ->
IO CString
formFieldChoiceGetItem ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> Int32
-> m T.Text
formFieldChoiceGetItem :: a -> Int32 -> m Text
formFieldChoiceGetItem a
field Int32
index = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CString
result <- Ptr FormField -> Int32 -> IO CString
poppler_form_field_choice_get_item Ptr FormField
field' Int32
index
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"formFieldChoiceGetItem" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceGetItemMethodInfo
instance (signature ~ (Int32 -> m T.Text), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceGetItemMethodInfo a signature where
overloadedMethod = formFieldChoiceGetItem
#endif
foreign import ccall "poppler_form_field_choice_get_n_items" poppler_form_field_choice_get_n_items ::
Ptr FormField ->
IO Int32
formFieldChoiceGetNItems ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Int32
formFieldChoiceGetNItems :: a -> m Int32
formFieldChoiceGetNItems a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
Int32
result <- Ptr FormField -> IO Int32
poppler_form_field_choice_get_n_items Ptr FormField
field'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceGetNItemsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceGetNItemsMethodInfo a signature where
overloadedMethod = formFieldChoiceGetNItems
#endif
foreign import ccall "poppler_form_field_choice_get_text" poppler_form_field_choice_get_text ::
Ptr FormField ->
IO CString
formFieldChoiceGetText ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m T.Text
formFieldChoiceGetText :: a -> m Text
formFieldChoiceGetText a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CString
result <- Ptr FormField -> IO CString
poppler_form_field_choice_get_text Ptr FormField
field'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"formFieldChoiceGetText" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceGetTextMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceGetTextMethodInfo a signature where
overloadedMethod = formFieldChoiceGetText
#endif
foreign import ccall "poppler_form_field_choice_is_editable" poppler_form_field_choice_is_editable ::
Ptr FormField ->
IO CInt
formFieldChoiceIsEditable ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldChoiceIsEditable :: a -> m Bool
formFieldChoiceIsEditable a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_choice_is_editable Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceIsEditableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceIsEditableMethodInfo a signature where
overloadedMethod = formFieldChoiceIsEditable
#endif
foreign import ccall "poppler_form_field_choice_is_item_selected" poppler_form_field_choice_is_item_selected ::
Ptr FormField ->
Int32 ->
IO CInt
formFieldChoiceIsItemSelected ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> Int32
-> m Bool
formFieldChoiceIsItemSelected :: a -> Int32 -> m Bool
formFieldChoiceIsItemSelected a
field Int32
index = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> Int32 -> IO CInt
poppler_form_field_choice_is_item_selected Ptr FormField
field' Int32
index
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceIsItemSelectedMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceIsItemSelectedMethodInfo a signature where
overloadedMethod = formFieldChoiceIsItemSelected
#endif
foreign import ccall "poppler_form_field_choice_select_item" poppler_form_field_choice_select_item ::
Ptr FormField ->
Int32 ->
IO ()
formFieldChoiceSelectItem ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> Int32
-> m ()
formFieldChoiceSelectItem :: a -> Int32 -> m ()
formFieldChoiceSelectItem a
field Int32
index = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
Ptr FormField -> Int32 -> IO ()
poppler_form_field_choice_select_item Ptr FormField
field' Int32
index
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceSelectItemMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceSelectItemMethodInfo a signature where
overloadedMethod = formFieldChoiceSelectItem
#endif
foreign import ccall "poppler_form_field_choice_set_text" poppler_form_field_choice_set_text ::
Ptr FormField ->
CString ->
IO ()
formFieldChoiceSetText ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> T.Text
-> m ()
formFieldChoiceSetText :: a -> Text -> m ()
formFieldChoiceSetText a
field Text
text = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CString
text' <- Text -> IO CString
textToCString Text
text
Ptr FormField -> CString -> IO ()
poppler_form_field_choice_set_text Ptr FormField
field' CString
text'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
text'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceSetTextMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceSetTextMethodInfo a signature where
overloadedMethod = formFieldChoiceSetText
#endif
foreign import ccall "poppler_form_field_choice_toggle_item" poppler_form_field_choice_toggle_item ::
Ptr FormField ->
Int32 ->
IO ()
formFieldChoiceToggleItem ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> Int32
-> m ()
formFieldChoiceToggleItem :: a -> Int32 -> m ()
formFieldChoiceToggleItem a
field Int32
index = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
Ptr FormField -> Int32 -> IO ()
poppler_form_field_choice_toggle_item Ptr FormField
field' Int32
index
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceToggleItemMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceToggleItemMethodInfo a signature where
overloadedMethod = formFieldChoiceToggleItem
#endif
foreign import ccall "poppler_form_field_choice_unselect_all" poppler_form_field_choice_unselect_all ::
Ptr FormField ->
IO ()
formFieldChoiceUnselectAll ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m ()
formFieldChoiceUnselectAll :: a -> m ()
formFieldChoiceUnselectAll a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
Ptr FormField -> IO ()
poppler_form_field_choice_unselect_all Ptr FormField
field'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FormFieldChoiceUnselectAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsFormField a) => O.MethodInfo FormFieldChoiceUnselectAllMethodInfo a signature where
overloadedMethod = formFieldChoiceUnselectAll
#endif
foreign import ccall "poppler_form_field_get_action" poppler_form_field_get_action ::
Ptr FormField ->
IO (Ptr Poppler.Action.Action)
formFieldGetAction ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Poppler.Action.Action
formFieldGetAction :: a -> m Action
formFieldGetAction a
field = IO Action -> m Action
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Action -> m Action) -> IO Action -> m Action
forall a b. (a -> b) -> a -> b
$ do
Ptr FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
Ptr Action
result <- Ptr FormField -> IO (Ptr Action)
poppler_form_field_get_action Ptr FormField
field'
Text -> Ptr Action -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"formFieldGetAction" Ptr Action
result
Action
result' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Action -> Action
Poppler.Action.Action) Ptr Action
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Action -> IO Action
forall (m :: * -> *) a. Monad m => a -> m a
return Action
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldGetActionMethodInfo
instance (signature ~ (m Poppler.Action.Action), MonadIO m, IsFormField a) => O.MethodInfo FormFieldGetActionMethodInfo a signature where
overloadedMethod = formFieldGetAction
#endif
foreign import ccall "poppler_form_field_get_additional_action" poppler_form_field_get_additional_action ::
Ptr FormField ->
CUInt ->
IO (Ptr Poppler.Action.Action)
formFieldGetAdditionalAction ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> Poppler.Enums.AdditionalActionType
-> m Poppler.Action.Action
formFieldGetAdditionalAction :: a -> AdditionalActionType -> m Action
formFieldGetAdditionalAction a
field AdditionalActionType
type_ = IO Action -> m Action
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Action -> m Action) -> IO Action -> m Action
forall a b. (a -> b) -> a -> b
$ do
Ptr FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
let type_' :: CUInt
type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (AdditionalActionType -> Int) -> AdditionalActionType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. AdditionalActionType -> Int
forall a. Enum a => a -> Int
fromEnum) AdditionalActionType
type_
Ptr Action
result <- Ptr FormField -> CUInt -> IO (Ptr Action)
poppler_form_field_get_additional_action Ptr FormField
field' CUInt
type_'
Text -> Ptr Action -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"formFieldGetAdditionalAction" Ptr Action
result
Action
result' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Action -> Action
Poppler.Action.Action) Ptr Action
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Action -> IO Action
forall (m :: * -> *) a. Monad m => a -> m a
return Action
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldGetAdditionalActionMethodInfo
instance (signature ~ (Poppler.Enums.AdditionalActionType -> m Poppler.Action.Action), MonadIO m, IsFormField a) => O.MethodInfo FormFieldGetAdditionalActionMethodInfo a signature where
overloadedMethod = formFieldGetAdditionalAction
#endif
foreign import ccall "poppler_form_field_get_field_type" poppler_form_field_get_field_type ::
Ptr FormField ->
IO CUInt
formFieldGetFieldType ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Poppler.Enums.FormFieldType
formFieldGetFieldType :: a -> m FormFieldType
formFieldGetFieldType a
field = IO FormFieldType -> m FormFieldType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FormFieldType -> m FormFieldType)
-> IO FormFieldType -> m FormFieldType
forall a b. (a -> b) -> a -> b
$ do
Ptr FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CUInt
result <- Ptr FormField -> IO CUInt
poppler_form_field_get_field_type Ptr FormField
field'
let result' :: FormFieldType
result' = (Int -> FormFieldType
forall a. Enum a => Int -> a
toEnum (Int -> FormFieldType) -> (CUInt -> Int) -> CUInt -> FormFieldType
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
field
FormFieldType -> IO FormFieldType
forall (m :: * -> *) a. Monad m => a -> m a
return FormFieldType
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldGetFieldTypeMethodInfo
instance (signature ~ (m Poppler.Enums.FormFieldType), MonadIO m, IsFormField a) => O.MethodInfo FormFieldGetFieldTypeMethodInfo a signature where
overloadedMethod = formFieldGetFieldType
#endif
foreign import ccall "poppler_form_field_get_font_size" poppler_form_field_get_font_size ::
Ptr FormField ->
IO CDouble
formFieldGetFontSize ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Double
formFieldGetFontSize :: a -> m Double
formFieldGetFontSize a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CDouble
result <- Ptr FormField -> IO CDouble
poppler_form_field_get_font_size Ptr FormField
field'
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
field
Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldGetFontSizeMethodInfo
instance (signature ~ (m Double), MonadIO m, IsFormField a) => O.MethodInfo FormFieldGetFontSizeMethodInfo a signature where
overloadedMethod = formFieldGetFontSize
#endif
foreign import ccall "poppler_form_field_get_id" poppler_form_field_get_id ::
Ptr FormField ->
IO Int32
formFieldGetId ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Int32
formFieldGetId :: a -> m Int32
formFieldGetId a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
Int32
result <- Ptr FormField -> IO Int32
poppler_form_field_get_id Ptr FormField
field'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data FormFieldGetIdMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsFormField a) => O.MethodInfo FormFieldGetIdMethodInfo a signature where
overloadedMethod = formFieldGetId
#endif
foreign import ccall "poppler_form_field_get_mapping_name" poppler_form_field_get_mapping_name ::
Ptr FormField ->
IO CString
formFieldGetMappingName ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m T.Text
formFieldGetMappingName :: a -> m Text
formFieldGetMappingName a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CString
result <- Ptr FormField -> IO CString
poppler_form_field_get_mapping_name Ptr FormField
field'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"formFieldGetMappingName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldGetMappingNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFormField a) => O.MethodInfo FormFieldGetMappingNameMethodInfo a signature where
overloadedMethod = formFieldGetMappingName
#endif
foreign import ccall "poppler_form_field_get_name" poppler_form_field_get_name ::
Ptr FormField ->
IO CString
formFieldGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m T.Text
formFieldGetName :: a -> m Text
formFieldGetName a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CString
result <- Ptr FormField -> IO CString
poppler_form_field_get_name Ptr FormField
field'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"formFieldGetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFormField a) => O.MethodInfo FormFieldGetNameMethodInfo a signature where
overloadedMethod = formFieldGetName
#endif
foreign import ccall "poppler_form_field_get_partial_name" poppler_form_field_get_partial_name ::
Ptr FormField ->
IO CString
formFieldGetPartialName ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m T.Text
formFieldGetPartialName :: a -> m Text
formFieldGetPartialName a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CString
result <- Ptr FormField -> IO CString
poppler_form_field_get_partial_name Ptr FormField
field'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"formFieldGetPartialName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldGetPartialNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFormField a) => O.MethodInfo FormFieldGetPartialNameMethodInfo a signature where
overloadedMethod = formFieldGetPartialName
#endif
foreign import ccall "poppler_form_field_is_read_only" poppler_form_field_is_read_only ::
Ptr FormField ->
IO CInt
formFieldIsReadOnly ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldIsReadOnly :: a -> m Bool
formFieldIsReadOnly a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_is_read_only Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldIsReadOnlyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldIsReadOnlyMethodInfo a signature where
overloadedMethod = formFieldIsReadOnly
#endif
foreign import ccall "poppler_form_field_text_do_scroll" poppler_form_field_text_do_scroll ::
Ptr FormField ->
IO CInt
formFieldTextDoScroll ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldTextDoScroll :: a -> m Bool
formFieldTextDoScroll a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_text_do_scroll Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldTextDoScrollMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldTextDoScrollMethodInfo a signature where
overloadedMethod = formFieldTextDoScroll
#endif
foreign import ccall "poppler_form_field_text_do_spell_check" poppler_form_field_text_do_spell_check ::
Ptr FormField ->
IO CInt
formFieldTextDoSpellCheck ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldTextDoSpellCheck :: a -> m Bool
formFieldTextDoSpellCheck a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_text_do_spell_check Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldTextDoSpellCheckMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldTextDoSpellCheckMethodInfo a signature where
overloadedMethod = formFieldTextDoSpellCheck
#endif
foreign import ccall "poppler_form_field_text_get_max_len" poppler_form_field_text_get_max_len ::
Ptr FormField ->
IO Int32
formFieldTextGetMaxLen ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Int32
formFieldTextGetMaxLen :: a -> m Int32
formFieldTextGetMaxLen a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
Int32
result <- Ptr FormField -> IO Int32
poppler_form_field_text_get_max_len Ptr FormField
field'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data FormFieldTextGetMaxLenMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsFormField a) => O.MethodInfo FormFieldTextGetMaxLenMethodInfo a signature where
overloadedMethod = formFieldTextGetMaxLen
#endif
foreign import ccall "poppler_form_field_text_get_text" poppler_form_field_text_get_text ::
Ptr FormField ->
IO CString
formFieldTextGetText ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m T.Text
formFieldTextGetText :: a -> m Text
formFieldTextGetText a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CString
result <- Ptr FormField -> IO CString
poppler_form_field_text_get_text Ptr FormField
field'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"formFieldTextGetText" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldTextGetTextMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFormField a) => O.MethodInfo FormFieldTextGetTextMethodInfo a signature where
overloadedMethod = formFieldTextGetText
#endif
foreign import ccall "poppler_form_field_text_get_text_type" poppler_form_field_text_get_text_type ::
Ptr FormField ->
IO CUInt
formFieldTextGetTextType ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Poppler.Enums.FormTextType
formFieldTextGetTextType :: a -> m FormTextType
formFieldTextGetTextType a
field = IO FormTextType -> m FormTextType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FormTextType -> m FormTextType)
-> IO FormTextType -> m FormTextType
forall a b. (a -> b) -> a -> b
$ do
Ptr FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CUInt
result <- Ptr FormField -> IO CUInt
poppler_form_field_text_get_text_type Ptr FormField
field'
let result' :: FormTextType
result' = (Int -> FormTextType
forall a. Enum a => Int -> a
toEnum (Int -> FormTextType) -> (CUInt -> Int) -> CUInt -> FormTextType
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
field
FormTextType -> IO FormTextType
forall (m :: * -> *) a. Monad m => a -> m a
return FormTextType
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldTextGetTextTypeMethodInfo
instance (signature ~ (m Poppler.Enums.FormTextType), MonadIO m, IsFormField a) => O.MethodInfo FormFieldTextGetTextTypeMethodInfo a signature where
overloadedMethod = formFieldTextGetTextType
#endif
foreign import ccall "poppler_form_field_text_is_password" poppler_form_field_text_is_password ::
Ptr FormField ->
IO CInt
formFieldTextIsPassword ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldTextIsPassword :: a -> m Bool
formFieldTextIsPassword a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_text_is_password Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldTextIsPasswordMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldTextIsPasswordMethodInfo a signature where
overloadedMethod = formFieldTextIsPassword
#endif
foreign import ccall "poppler_form_field_text_is_rich_text" poppler_form_field_text_is_rich_text ::
Ptr FormField ->
IO CInt
formFieldTextIsRichText ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> m Bool
formFieldTextIsRichText :: a -> m Bool
formFieldTextIsRichText a
field = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CInt
result <- Ptr FormField -> IO CInt
poppler_form_field_text_is_rich_text Ptr FormField
field'
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
field
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FormFieldTextIsRichTextMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFormField a) => O.MethodInfo FormFieldTextIsRichTextMethodInfo a signature where
overloadedMethod = formFieldTextIsRichText
#endif
foreign import ccall "poppler_form_field_text_set_text" poppler_form_field_text_set_text ::
Ptr FormField ->
CString ->
IO ()
formFieldTextSetText ::
(B.CallStack.HasCallStack, MonadIO m, IsFormField a) =>
a
-> T.Text
-> m ()
formFieldTextSetText :: a -> Text -> m ()
formFieldTextSetText a
field Text
text = 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 FormField
field' <- a -> IO (Ptr FormField)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
field
CString
text' <- Text -> IO CString
textToCString Text
text
Ptr FormField -> CString -> IO ()
poppler_form_field_text_set_text Ptr FormField
field' CString
text'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
field
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
text'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FormFieldTextSetTextMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFormField a) => O.MethodInfo FormFieldTextSetTextMethodInfo a signature where
overloadedMethod = formFieldTextSetText
#endif