{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) /No description available in the introspection data./ -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.GtkSource.Objects.Gutter ( -- * Exported types Gutter(..) , IsGutter , toGutter , noGutter , -- * Methods -- ** getPadding #method:getPadding# #if ENABLE_OVERLOADING GutterGetPaddingMethodInfo , #endif gutterGetPadding , -- ** getRendererAtPos #method:getRendererAtPos# #if ENABLE_OVERLOADING GutterGetRendererAtPosMethodInfo , #endif gutterGetRendererAtPos , -- ** getView #method:getView# #if ENABLE_OVERLOADING GutterGetViewMethodInfo , #endif gutterGetView , -- ** getWindow #method:getWindow# #if ENABLE_OVERLOADING GutterGetWindowMethodInfo , #endif gutterGetWindow , -- ** getWindowType #method:getWindowType# #if ENABLE_OVERLOADING GutterGetWindowTypeMethodInfo , #endif gutterGetWindowType , -- ** insert #method:insert# #if ENABLE_OVERLOADING GutterInsertMethodInfo , #endif gutterInsert , -- ** queueDraw #method:queueDraw# #if ENABLE_OVERLOADING GutterQueueDrawMethodInfo , #endif gutterQueueDraw , -- ** remove #method:remove# #if ENABLE_OVERLOADING GutterRemoveMethodInfo , #endif gutterRemove , -- ** reorder #method:reorder# #if ENABLE_OVERLOADING GutterReorderMethodInfo , #endif gutterReorder , -- ** setPadding #method:setPadding# #if ENABLE_OVERLOADING GutterSetPaddingMethodInfo , #endif gutterSetPadding , -- * Properties -- ** view #attr:view# {- | The 'GI.GtkSource.Objects.View.View' of the gutter. -} #if ENABLE_OVERLOADING GutterViewPropertyInfo , #endif constructGutterView , getGutterView , #if ENABLE_OVERLOADING gutterView , #endif -- ** windowType #attr:windowType# {- | The text window type on which the window is placed. -} #if ENABLE_OVERLOADING GutterWindowTypePropertyInfo , #endif constructGutterWindowType , getGutterWindowType , #if ENABLE_OVERLOADING gutterWindowType , #endif -- ** xpad #attr:xpad# {- | The x-padding. -} #if ENABLE_OVERLOADING GutterXpadPropertyInfo , #endif constructGutterXpad , getGutterXpad , #if ENABLE_OVERLOADING gutterXpad , #endif setGutterXpad , -- ** ypad #attr:ypad# {- | The y-padding. -} #if ENABLE_OVERLOADING GutterYpadPropertyInfo , #endif constructGutterYpad , getGutterYpad , #if ENABLE_OVERLOADING gutterYpad , #endif setGutterYpad , ) 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 qualified GI.Gdk.Objects.Window as Gdk.Window import qualified GI.Gtk.Enums as Gtk.Enums import {-# SOURCE #-} qualified GI.GtkSource.Objects.GutterRenderer as GtkSource.GutterRenderer import {-# SOURCE #-} qualified GI.GtkSource.Objects.View as GtkSource.View -- | Memory-managed wrapper type. newtype Gutter = Gutter (ManagedPtr Gutter) foreign import ccall "gtk_source_gutter_get_type" c_gtk_source_gutter_get_type :: IO GType instance GObject Gutter where gobjectType = c_gtk_source_gutter_get_type -- | Type class for types which can be safely cast to `Gutter`, for instance with `toGutter`. class (GObject o, O.IsDescendantOf Gutter o) => IsGutter o instance (GObject o, O.IsDescendantOf Gutter o) => IsGutter o instance O.HasParentTypes Gutter type instance O.ParentTypes Gutter = '[GObject.Object.Object] -- | Cast to `Gutter`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`. toGutter :: (MonadIO m, IsGutter o) => o -> m Gutter toGutter = liftIO . unsafeCastTo Gutter -- | A convenience alias for `Nothing` :: `Maybe` `Gutter`. noGutter :: Maybe Gutter noGutter = Nothing #if ENABLE_OVERLOADING type family ResolveGutterMethod (t :: Symbol) (o :: *) :: * where ResolveGutterMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolveGutterMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolveGutterMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo ResolveGutterMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo ResolveGutterMethod "getv" o = GObject.Object.ObjectGetvMethodInfo ResolveGutterMethod "insert" o = GutterInsertMethodInfo ResolveGutterMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo ResolveGutterMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo ResolveGutterMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo ResolveGutterMethod "queueDraw" o = GutterQueueDrawMethodInfo ResolveGutterMethod "ref" o = GObject.Object.ObjectRefMethodInfo ResolveGutterMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo ResolveGutterMethod "remove" o = GutterRemoveMethodInfo ResolveGutterMethod "reorder" o = GutterReorderMethodInfo ResolveGutterMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo ResolveGutterMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo ResolveGutterMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo ResolveGutterMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo ResolveGutterMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo ResolveGutterMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo ResolveGutterMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo ResolveGutterMethod "getPadding" o = GutterGetPaddingMethodInfo ResolveGutterMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo ResolveGutterMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo ResolveGutterMethod "getRendererAtPos" o = GutterGetRendererAtPosMethodInfo ResolveGutterMethod "getView" o = GutterGetViewMethodInfo ResolveGutterMethod "getWindow" o = GutterGetWindowMethodInfo ResolveGutterMethod "getWindowType" o = GutterGetWindowTypeMethodInfo ResolveGutterMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo ResolveGutterMethod "setPadding" o = GutterSetPaddingMethodInfo ResolveGutterMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo ResolveGutterMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolveGutterMethod t Gutter, O.MethodInfo info Gutter p) => OL.IsLabel t (Gutter -> 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 -- VVV Prop "view" -- Type: TInterface (Name {namespace = "GtkSource", name = "View"}) -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] -- Nullable: (Just False,Nothing) {- | Get the value of the “@view@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' gutter #view @ -} getGutterView :: (MonadIO m, IsGutter o) => o -> m GtkSource.View.View getGutterView obj = liftIO $ checkUnexpectedNothing "getGutterView" $ B.Properties.getObjectPropertyObject obj "view" GtkSource.View.View {- | Construct a `GValueConstruct` with valid value for the “@view@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructGutterView :: (IsGutter o, GtkSource.View.IsView a) => a -> IO (GValueConstruct o) constructGutterView val = B.Properties.constructObjectPropertyObject "view" (Just val) #if ENABLE_OVERLOADING data GutterViewPropertyInfo instance AttrInfo GutterViewPropertyInfo where type AttrAllowedOps GutterViewPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear] type AttrSetTypeConstraint GutterViewPropertyInfo = GtkSource.View.IsView type AttrBaseTypeConstraint GutterViewPropertyInfo = IsGutter type AttrGetType GutterViewPropertyInfo = GtkSource.View.View type AttrLabel GutterViewPropertyInfo = "view" type AttrOrigin GutterViewPropertyInfo = Gutter attrGet _ = getGutterView attrSet _ = undefined attrConstruct _ = constructGutterView attrClear _ = undefined #endif -- VVV Prop "window-type" -- Type: TInterface (Name {namespace = "Gtk", name = "TextWindowType"}) -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] -- Nullable: (Just False,Nothing) {- | Get the value of the “@window-type@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' gutter #windowType @ -} getGutterWindowType :: (MonadIO m, IsGutter o) => o -> m Gtk.Enums.TextWindowType getGutterWindowType obj = liftIO $ B.Properties.getObjectPropertyEnum obj "window-type" {- | Construct a `GValueConstruct` with valid value for the “@window-type@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructGutterWindowType :: (IsGutter o) => Gtk.Enums.TextWindowType -> IO (GValueConstruct o) constructGutterWindowType val = B.Properties.constructObjectPropertyEnum "window-type" val #if ENABLE_OVERLOADING data GutterWindowTypePropertyInfo instance AttrInfo GutterWindowTypePropertyInfo where type AttrAllowedOps GutterWindowTypePropertyInfo = '[ 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint GutterWindowTypePropertyInfo = (~) Gtk.Enums.TextWindowType type AttrBaseTypeConstraint GutterWindowTypePropertyInfo = IsGutter type AttrGetType GutterWindowTypePropertyInfo = Gtk.Enums.TextWindowType type AttrLabel GutterWindowTypePropertyInfo = "window-type" type AttrOrigin GutterWindowTypePropertyInfo = Gutter attrGet _ = getGutterWindowType attrSet _ = undefined attrConstruct _ = constructGutterWindowType attrClear _ = undefined #endif -- VVV Prop "xpad" -- Type: TBasicType TInt -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] -- Nullable: (Nothing,Nothing) {- | Get the value of the “@xpad@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' gutter #xpad @ -} getGutterXpad :: (MonadIO m, IsGutter o) => o -> m Int32 getGutterXpad obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "xpad" {- | Set the value of the “@xpad@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' gutter [ #xpad 'Data.GI.Base.Attributes.:=' value ] @ -} setGutterXpad :: (MonadIO m, IsGutter o) => o -> Int32 -> m () setGutterXpad obj val = liftIO $ B.Properties.setObjectPropertyInt32 obj "xpad" val {- | Construct a `GValueConstruct` with valid value for the “@xpad@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructGutterXpad :: (IsGutter o) => Int32 -> IO (GValueConstruct o) constructGutterXpad val = B.Properties.constructObjectPropertyInt32 "xpad" val #if ENABLE_OVERLOADING data GutterXpadPropertyInfo instance AttrInfo GutterXpadPropertyInfo where type AttrAllowedOps GutterXpadPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint GutterXpadPropertyInfo = (~) Int32 type AttrBaseTypeConstraint GutterXpadPropertyInfo = IsGutter type AttrGetType GutterXpadPropertyInfo = Int32 type AttrLabel GutterXpadPropertyInfo = "xpad" type AttrOrigin GutterXpadPropertyInfo = Gutter attrGet _ = getGutterXpad attrSet _ = setGutterXpad attrConstruct _ = constructGutterXpad attrClear _ = undefined #endif -- VVV Prop "ypad" -- Type: TBasicType TInt -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] -- Nullable: (Nothing,Nothing) {- | Get the value of the “@ypad@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' gutter #ypad @ -} getGutterYpad :: (MonadIO m, IsGutter o) => o -> m Int32 getGutterYpad obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "ypad" {- | Set the value of the “@ypad@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' gutter [ #ypad 'Data.GI.Base.Attributes.:=' value ] @ -} setGutterYpad :: (MonadIO m, IsGutter o) => o -> Int32 -> m () setGutterYpad obj val = liftIO $ B.Properties.setObjectPropertyInt32 obj "ypad" val {- | Construct a `GValueConstruct` with valid value for the “@ypad@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructGutterYpad :: (IsGutter o) => Int32 -> IO (GValueConstruct o) constructGutterYpad val = B.Properties.constructObjectPropertyInt32 "ypad" val #if ENABLE_OVERLOADING data GutterYpadPropertyInfo instance AttrInfo GutterYpadPropertyInfo where type AttrAllowedOps GutterYpadPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint GutterYpadPropertyInfo = (~) Int32 type AttrBaseTypeConstraint GutterYpadPropertyInfo = IsGutter type AttrGetType GutterYpadPropertyInfo = Int32 type AttrLabel GutterYpadPropertyInfo = "ypad" type AttrOrigin GutterYpadPropertyInfo = Gutter attrGet _ = getGutterYpad attrSet _ = setGutterYpad attrConstruct _ = constructGutterYpad attrClear _ = undefined #endif #if ENABLE_OVERLOADING instance O.HasAttributeList Gutter type instance O.AttributeList Gutter = GutterAttributeList type GutterAttributeList = ('[ '("view", GutterViewPropertyInfo), '("windowType", GutterWindowTypePropertyInfo), '("xpad", GutterXpadPropertyInfo), '("ypad", GutterYpadPropertyInfo)] :: [(Symbol, *)]) #endif #if ENABLE_OVERLOADING gutterView :: AttrLabelProxy "view" gutterView = AttrLabelProxy gutterWindowType :: AttrLabelProxy "windowType" gutterWindowType = AttrLabelProxy gutterXpad :: AttrLabelProxy "xpad" gutterXpad = AttrLabelProxy gutterYpad :: AttrLabelProxy "ypad" gutterYpad = AttrLabelProxy #endif #if ENABLE_OVERLOADING type instance O.SignalList Gutter = GutterSignalList type GutterSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)]) #endif -- method Gutter::get_padding -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "xpad", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ypad", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_get_padding" gtk_source_gutter_get_padding :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) Int32 -> -- xpad : TBasicType TInt Int32 -> -- ypad : TBasicType TInt IO () {-# DEPRECATED gutterGetPadding ["(Since version 3.12)","Use 'GI.GtkSource.Objects.GutterRenderer.gutterRendererGetPadding' instead."] #-} {- | /No description available in the introspection data./ -} gutterGetPadding :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a) => a -> Int32 -> Int32 -> m () gutterGetPadding gutter xpad ypad = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter gtk_source_gutter_get_padding gutter' xpad ypad touchManagedPtr gutter return () #if ENABLE_OVERLOADING data GutterGetPaddingMethodInfo instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsGutter a) => O.MethodInfo GutterGetPaddingMethodInfo a signature where overloadedMethod _ = gutterGetPadding #endif -- method Gutter::get_renderer_at_pos -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GtkSourceGutter.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The x position to get identified.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The y position to get identified.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GtkSource", name = "GutterRenderer"})) -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_get_renderer_at_pos" gtk_source_gutter_get_renderer_at_pos :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) Int32 -> -- x : TBasicType TInt Int32 -> -- y : TBasicType TInt IO (Ptr GtkSource.GutterRenderer.GutterRenderer) {- | Finds the 'GI.GtkSource.Objects.GutterRenderer.GutterRenderer' at (x, y). -} gutterGetRendererAtPos :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a) => a {- ^ /@gutter@/: A 'GI.GtkSource.Objects.Gutter.Gutter'. -} -> Int32 {- ^ /@x@/: The x position to get identified. -} -> Int32 {- ^ /@y@/: The y position to get identified. -} -> m (Maybe GtkSource.GutterRenderer.GutterRenderer) {- ^ __Returns:__ the renderer at (x, y) or 'Nothing'. -} gutterGetRendererAtPos gutter x y = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter result <- gtk_source_gutter_get_renderer_at_pos gutter' x y maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newObject GtkSource.GutterRenderer.GutterRenderer) result' return result'' touchManagedPtr gutter return maybeResult #if ENABLE_OVERLOADING data GutterGetRendererAtPosMethodInfo instance (signature ~ (Int32 -> Int32 -> m (Maybe GtkSource.GutterRenderer.GutterRenderer)), MonadIO m, IsGutter a) => O.MethodInfo GutterGetRendererAtPosMethodInfo a signature where overloadedMethod _ = gutterGetRendererAtPos #endif -- method Gutter::get_view -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceGutter.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "GtkSource", name = "View"})) -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_get_view" gtk_source_gutter_get_view :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) IO (Ptr GtkSource.View.View) {- | /No description available in the introspection data./ /Since: 3.24/ -} gutterGetView :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a) => a {- ^ /@gutter@/: a 'GI.GtkSource.Objects.Gutter.Gutter'. -} -> m GtkSource.View.View {- ^ __Returns:__ the associated 'GI.GtkSource.Objects.View.View'. -} gutterGetView gutter = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter result <- gtk_source_gutter_get_view gutter' checkUnexpectedReturnNULL "gutterGetView" result result' <- (newObject GtkSource.View.View) result touchManagedPtr gutter return result' #if ENABLE_OVERLOADING data GutterGetViewMethodInfo instance (signature ~ (m GtkSource.View.View), MonadIO m, IsGutter a) => O.MethodInfo GutterGetViewMethodInfo a signature where overloadedMethod _ = gutterGetView #endif -- method Gutter::get_window -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceGutter.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Window"})) -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_get_window" gtk_source_gutter_get_window :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) IO (Ptr Gdk.Window.Window) {-# DEPRECATED gutterGetWindow ["(Since version 3.12)","Use 'GI.Gtk.Objects.TextView.textViewGetWindow' instead."] #-} {- | Get the 'GI.Gdk.Objects.Window.Window' of the gutter. The window will only be available when the gutter has at least one, non-zero width, cell renderer packed. /Since: 2.8/ -} gutterGetWindow :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a) => a {- ^ /@gutter@/: a 'GI.GtkSource.Objects.Gutter.Gutter'. -} -> m Gdk.Window.Window {- ^ __Returns:__ the 'GI.Gdk.Objects.Window.Window' of the gutter, or 'Nothing' if the gutter has no window. -} gutterGetWindow gutter = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter result <- gtk_source_gutter_get_window gutter' checkUnexpectedReturnNULL "gutterGetWindow" result result' <- (newObject Gdk.Window.Window) result touchManagedPtr gutter return result' #if ENABLE_OVERLOADING data GutterGetWindowMethodInfo instance (signature ~ (m Gdk.Window.Window), MonadIO m, IsGutter a) => O.MethodInfo GutterGetWindowMethodInfo a signature where overloadedMethod _ = gutterGetWindow #endif -- method Gutter::get_window_type -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceGutter.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gtk", name = "TextWindowType"})) -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_get_window_type" gtk_source_gutter_get_window_type :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) IO CUInt {- | /No description available in the introspection data./ /Since: 3.24/ -} gutterGetWindowType :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a) => a {- ^ /@gutter@/: a 'GI.GtkSource.Objects.Gutter.Gutter'. -} -> m Gtk.Enums.TextWindowType {- ^ __Returns:__ the 'GI.Gtk.Enums.TextWindowType' of /@gutter@/. -} gutterGetWindowType gutter = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter result <- gtk_source_gutter_get_window_type gutter' let result' = (toEnum . fromIntegral) result touchManagedPtr gutter return result' #if ENABLE_OVERLOADING data GutterGetWindowTypeMethodInfo instance (signature ~ (m Gtk.Enums.TextWindowType), MonadIO m, IsGutter a) => O.MethodInfo GutterGetWindowTypeMethodInfo a signature where overloadedMethod _ = gutterGetWindowType #endif -- method Gutter::insert -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceGutter.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "GtkSource", name = "GutterRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a gutter renderer (must inherit from #GtkSourceGutterRenderer).", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "position", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the renderer position.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_insert" gtk_source_gutter_insert :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) Ptr GtkSource.GutterRenderer.GutterRenderer -> -- renderer : TInterface (Name {namespace = "GtkSource", name = "GutterRenderer"}) Int32 -> -- position : TBasicType TInt IO CInt {- | Insert /@renderer@/ into the gutter. If /@renderer@/ is yet unowned then gutter claims its ownership. Otherwise just increases renderer\'s reference count. /@renderer@/ cannot be already inserted to another gutter. /Since: 3.0/ -} gutterInsert :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a, GtkSource.GutterRenderer.IsGutterRenderer b) => a {- ^ /@gutter@/: a 'GI.GtkSource.Objects.Gutter.Gutter'. -} -> b {- ^ /@renderer@/: a gutter renderer (must inherit from 'GI.GtkSource.Objects.GutterRenderer.GutterRenderer'). -} -> Int32 {- ^ /@position@/: the renderer position. -} -> m Bool {- ^ __Returns:__ 'True' if operation succeeded. Otherwise 'False'. -} gutterInsert gutter renderer position = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter renderer' <- unsafeManagedPtrCastPtr renderer result <- gtk_source_gutter_insert gutter' renderer' position let result' = (/= 0) result touchManagedPtr gutter touchManagedPtr renderer return result' #if ENABLE_OVERLOADING data GutterInsertMethodInfo instance (signature ~ (b -> Int32 -> m Bool), MonadIO m, IsGutter a, GtkSource.GutterRenderer.IsGutterRenderer b) => O.MethodInfo GutterInsertMethodInfo a signature where overloadedMethod _ = gutterInsert #endif -- method Gutter::queue_draw -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceGutter.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_queue_draw" gtk_source_gutter_queue_draw :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) IO () {- | Invalidates the drawable area of the gutter. You can use this to force a redraw of the gutter if something has changed and needs to be redrawn. /Since: 2.8/ -} gutterQueueDraw :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a) => a {- ^ /@gutter@/: a 'GI.GtkSource.Objects.Gutter.Gutter'. -} -> m () gutterQueueDraw gutter = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter gtk_source_gutter_queue_draw gutter' touchManagedPtr gutter return () #if ENABLE_OVERLOADING data GutterQueueDrawMethodInfo instance (signature ~ (m ()), MonadIO m, IsGutter a) => O.MethodInfo GutterQueueDrawMethodInfo a signature where overloadedMethod _ = gutterQueueDraw #endif -- method Gutter::remove -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceGutter.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "GtkSource", name = "GutterRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceGutterRenderer.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_remove" gtk_source_gutter_remove :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) Ptr GtkSource.GutterRenderer.GutterRenderer -> -- renderer : TInterface (Name {namespace = "GtkSource", name = "GutterRenderer"}) IO () {- | Removes /@renderer@/ from /@gutter@/. /Since: 2.8/ -} gutterRemove :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a, GtkSource.GutterRenderer.IsGutterRenderer b) => a {- ^ /@gutter@/: a 'GI.GtkSource.Objects.Gutter.Gutter'. -} -> b {- ^ /@renderer@/: a 'GI.GtkSource.Objects.GutterRenderer.GutterRenderer'. -} -> m () gutterRemove gutter renderer = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter renderer' <- unsafeManagedPtrCastPtr renderer gtk_source_gutter_remove gutter' renderer' touchManagedPtr gutter touchManagedPtr renderer return () #if ENABLE_OVERLOADING data GutterRemoveMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsGutter a, GtkSource.GutterRenderer.IsGutterRenderer b) => O.MethodInfo GutterRemoveMethodInfo a signature where overloadedMethod _ = gutterRemove #endif -- method Gutter::reorder -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkSourceGutterRenderer.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "GtkSource", name = "GutterRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellRenderer.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "position", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new renderer position.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_reorder" gtk_source_gutter_reorder :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) Ptr GtkSource.GutterRenderer.GutterRenderer -> -- renderer : TInterface (Name {namespace = "GtkSource", name = "GutterRenderer"}) Int32 -> -- position : TBasicType TInt IO () {- | Reorders /@renderer@/ in /@gutter@/ to new /@position@/. /Since: 2.8/ -} gutterReorder :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a, GtkSource.GutterRenderer.IsGutterRenderer b) => a {- ^ /@gutter@/: a 'GI.GtkSource.Objects.GutterRenderer.GutterRenderer'. -} -> b {- ^ /@renderer@/: a 'GI.Gtk.Objects.CellRenderer.CellRenderer'. -} -> Int32 {- ^ /@position@/: the new renderer position. -} -> m () gutterReorder gutter renderer position = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter renderer' <- unsafeManagedPtrCastPtr renderer gtk_source_gutter_reorder gutter' renderer' position touchManagedPtr gutter touchManagedPtr renderer return () #if ENABLE_OVERLOADING data GutterReorderMethodInfo instance (signature ~ (b -> Int32 -> m ()), MonadIO m, IsGutter a, GtkSource.GutterRenderer.IsGutterRenderer b) => O.MethodInfo GutterReorderMethodInfo a signature where overloadedMethod _ = gutterReorder #endif -- method Gutter::set_padding -- method type : OrdinaryMethod -- Args : [Arg {argCName = "gutter", argType = TInterface (Name {namespace = "GtkSource", name = "Gutter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "xpad", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ypad", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Nothing, sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gtk_source_gutter_set_padding" gtk_source_gutter_set_padding :: Ptr Gutter -> -- gutter : TInterface (Name {namespace = "GtkSource", name = "Gutter"}) Int32 -> -- xpad : TBasicType TInt Int32 -> -- ypad : TBasicType TInt IO () {-# DEPRECATED gutterSetPadding ["(Since version 3.12)","Use 'GI.GtkSource.Objects.GutterRenderer.gutterRendererSetPadding' instead."] #-} {- | /No description available in the introspection data./ -} gutterSetPadding :: (B.CallStack.HasCallStack, MonadIO m, IsGutter a) => a -> Int32 -> Int32 -> m () gutterSetPadding gutter xpad ypad = liftIO $ do gutter' <- unsafeManagedPtrCastPtr gutter gtk_source_gutter_set_padding gutter' xpad ypad touchManagedPtr gutter return () #if ENABLE_OVERLOADING data GutterSetPaddingMethodInfo instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsGutter a) => O.MethodInfo GutterSetPaddingMethodInfo a signature where overloadedMethod _ = gutterSetPadding #endif