#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Poppler.Objects.AnnotLine
(
AnnotLine(..) ,
IsAnnotLine ,
toAnnotLine ,
noAnnotLine ,
annotLineNew ,
#if ENABLE_OVERLOADING
AnnotLineSetVerticesMethodInfo ,
#endif
annotLineSetVertices ,
) 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.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.Objects.Annot as Poppler.Annot
import {-# SOURCE #-} qualified GI.Poppler.Objects.AnnotMarkup as Poppler.AnnotMarkup
import {-# SOURCE #-} qualified GI.Poppler.Objects.Document as Poppler.Document
import {-# SOURCE #-} qualified GI.Poppler.Structs.Point as Poppler.Point
import {-# SOURCE #-} qualified GI.Poppler.Structs.Rectangle as Poppler.Rectangle
newtype AnnotLine = AnnotLine (ManagedPtr AnnotLine)
foreign import ccall "poppler_annot_line_get_type"
c_poppler_annot_line_get_type :: IO GType
instance GObject AnnotLine where
gobjectType = c_poppler_annot_line_get_type
class (GObject o, O.IsDescendantOf AnnotLine o) => IsAnnotLine o
instance (GObject o, O.IsDescendantOf AnnotLine o) => IsAnnotLine o
instance O.HasParentTypes AnnotLine
type instance O.ParentTypes AnnotLine = '[Poppler.AnnotMarkup.AnnotMarkup, Poppler.Annot.Annot, GObject.Object.Object]
toAnnotLine :: (MonadIO m, IsAnnotLine o) => o -> m AnnotLine
toAnnotLine = liftIO . unsafeCastTo AnnotLine
noAnnotLine :: Maybe AnnotLine
noAnnotLine = Nothing
#if ENABLE_OVERLOADING
type family ResolveAnnotLineMethod (t :: Symbol) (o :: *) :: * where
ResolveAnnotLineMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAnnotLineMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAnnotLineMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAnnotLineMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAnnotLineMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAnnotLineMethod "hasPopup" o = Poppler.AnnotMarkup.AnnotMarkupHasPopupMethodInfo
ResolveAnnotLineMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAnnotLineMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAnnotLineMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAnnotLineMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAnnotLineMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAnnotLineMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAnnotLineMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAnnotLineMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAnnotLineMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAnnotLineMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveAnnotLineMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAnnotLineMethod "getAnnotType" o = Poppler.Annot.AnnotGetAnnotTypeMethodInfo
ResolveAnnotLineMethod "getColor" o = Poppler.Annot.AnnotGetColorMethodInfo
ResolveAnnotLineMethod "getContents" o = Poppler.Annot.AnnotGetContentsMethodInfo
ResolveAnnotLineMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAnnotLineMethod "getDate" o = Poppler.AnnotMarkup.AnnotMarkupGetDateMethodInfo
ResolveAnnotLineMethod "getExternalData" o = Poppler.AnnotMarkup.AnnotMarkupGetExternalDataMethodInfo
ResolveAnnotLineMethod "getFlags" o = Poppler.Annot.AnnotGetFlagsMethodInfo
ResolveAnnotLineMethod "getLabel" o = Poppler.AnnotMarkup.AnnotMarkupGetLabelMethodInfo
ResolveAnnotLineMethod "getModified" o = Poppler.Annot.AnnotGetModifiedMethodInfo
ResolveAnnotLineMethod "getName" o = Poppler.Annot.AnnotGetNameMethodInfo
ResolveAnnotLineMethod "getOpacity" o = Poppler.AnnotMarkup.AnnotMarkupGetOpacityMethodInfo
ResolveAnnotLineMethod "getPageIndex" o = Poppler.Annot.AnnotGetPageIndexMethodInfo
ResolveAnnotLineMethod "getPopupIsOpen" o = Poppler.AnnotMarkup.AnnotMarkupGetPopupIsOpenMethodInfo
ResolveAnnotLineMethod "getPopupRectangle" o = Poppler.AnnotMarkup.AnnotMarkupGetPopupRectangleMethodInfo
ResolveAnnotLineMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAnnotLineMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAnnotLineMethod "getRectangle" o = Poppler.Annot.AnnotGetRectangleMethodInfo
ResolveAnnotLineMethod "getReplyTo" o = Poppler.AnnotMarkup.AnnotMarkupGetReplyToMethodInfo
ResolveAnnotLineMethod "getSubject" o = Poppler.AnnotMarkup.AnnotMarkupGetSubjectMethodInfo
ResolveAnnotLineMethod "setColor" o = Poppler.Annot.AnnotSetColorMethodInfo
ResolveAnnotLineMethod "setContents" o = Poppler.Annot.AnnotSetContentsMethodInfo
ResolveAnnotLineMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAnnotLineMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAnnotLineMethod "setFlags" o = Poppler.Annot.AnnotSetFlagsMethodInfo
ResolveAnnotLineMethod "setLabel" o = Poppler.AnnotMarkup.AnnotMarkupSetLabelMethodInfo
ResolveAnnotLineMethod "setOpacity" o = Poppler.AnnotMarkup.AnnotMarkupSetOpacityMethodInfo
ResolveAnnotLineMethod "setPopup" o = Poppler.AnnotMarkup.AnnotMarkupSetPopupMethodInfo
ResolveAnnotLineMethod "setPopupIsOpen" o = Poppler.AnnotMarkup.AnnotMarkupSetPopupIsOpenMethodInfo
ResolveAnnotLineMethod "setPopupRectangle" o = Poppler.AnnotMarkup.AnnotMarkupSetPopupRectangleMethodInfo
ResolveAnnotLineMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAnnotLineMethod "setRectangle" o = Poppler.Annot.AnnotSetRectangleMethodInfo
ResolveAnnotLineMethod "setVertices" o = AnnotLineSetVerticesMethodInfo
ResolveAnnotLineMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAnnotLineMethod t AnnotLine, O.MethodInfo info AnnotLine p) => OL.IsLabel t (AnnotLine -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList AnnotLine
type instance O.AttributeList AnnotLine = AnnotLineAttributeList
type AnnotLineAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList AnnotLine = AnnotLineSignalList
type AnnotLineSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "poppler_annot_line_new" poppler_annot_line_new ::
Ptr Poppler.Document.Document ->
Ptr Poppler.Rectangle.Rectangle ->
Ptr Poppler.Point.Point ->
Ptr Poppler.Point.Point ->
IO (Ptr AnnotLine)
annotLineNew ::
(B.CallStack.HasCallStack, MonadIO m, Poppler.Document.IsDocument a) =>
a
-> Poppler.Rectangle.Rectangle
-> Poppler.Point.Point
-> Poppler.Point.Point
-> m AnnotLine
annotLineNew doc rect start end = liftIO $ do
doc' <- unsafeManagedPtrCastPtr doc
rect' <- unsafeManagedPtrGetPtr rect
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
result <- poppler_annot_line_new doc' rect' start' end'
checkUnexpectedReturnNULL "annotLineNew" result
result' <- (wrapObject AnnotLine) result
touchManagedPtr doc
touchManagedPtr rect
touchManagedPtr start
touchManagedPtr end
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "poppler_annot_line_set_vertices" poppler_annot_line_set_vertices ::
Ptr AnnotLine ->
Ptr Poppler.Point.Point ->
Ptr Poppler.Point.Point ->
IO ()
annotLineSetVertices ::
(B.CallStack.HasCallStack, MonadIO m, IsAnnotLine a) =>
a
-> Poppler.Point.Point
-> Poppler.Point.Point
-> m ()
annotLineSetVertices popplerAnnot start end = liftIO $ do
popplerAnnot' <- unsafeManagedPtrCastPtr popplerAnnot
start' <- unsafeManagedPtrGetPtr start
end' <- unsafeManagedPtrGetPtr end
poppler_annot_line_set_vertices popplerAnnot' start' end'
touchManagedPtr popplerAnnot
touchManagedPtr start
touchManagedPtr end
return ()
#if ENABLE_OVERLOADING
data AnnotLineSetVerticesMethodInfo
instance (signature ~ (Poppler.Point.Point -> Poppler.Point.Point -> m ()), MonadIO m, IsAnnotLine a) => O.MethodInfo AnnotLineSetVerticesMethodInfo a signature where
overloadedMethod _ = annotLineSetVertices
#endif