#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gdk.Structs.EventPadGroupMode
(
EventPadGroupMode(..) ,
newZeroEventPadGroupMode ,
noEventPadGroupMode ,
#if ENABLE_OVERLOADING
eventPadGroupMode_group ,
#endif
getEventPadGroupModeGroup ,
setEventPadGroupModeGroup ,
#if ENABLE_OVERLOADING
eventPadGroupMode_mode ,
#endif
getEventPadGroupModeMode ,
setEventPadGroupModeMode ,
#if ENABLE_OVERLOADING
eventPadGroupMode_sendEvent ,
#endif
getEventPadGroupModeSendEvent ,
setEventPadGroupModeSendEvent ,
#if ENABLE_OVERLOADING
eventPadGroupMode_time ,
#endif
getEventPadGroupModeTime ,
setEventPadGroupModeTime ,
#if ENABLE_OVERLOADING
eventPadGroupMode_type ,
#endif
getEventPadGroupModeType ,
setEventPadGroupModeType ,
clearEventPadGroupModeWindow ,
#if ENABLE_OVERLOADING
eventPadGroupMode_window ,
#endif
getEventPadGroupModeWindow ,
setEventPadGroupModeWindow ,
) 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 {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window
newtype EventPadGroupMode = EventPadGroupMode (ManagedPtr EventPadGroupMode)
instance WrappedPtr EventPadGroupMode where
wrappedPtrCalloc = callocBytes 32
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 32 >=> wrapPtr EventPadGroupMode)
wrappedPtrFree = Just ptr_to_g_free
newZeroEventPadGroupMode :: MonadIO m => m EventPadGroupMode
newZeroEventPadGroupMode = liftIO $ wrappedPtrCalloc >>= wrapPtr EventPadGroupMode
instance tag ~ 'AttrSet => Constructible EventPadGroupMode tag where
new _ attrs = do
o <- newZeroEventPadGroupMode
GI.Attributes.set o attrs
return o
noEventPadGroupMode :: Maybe EventPadGroupMode
noEventPadGroupMode = Nothing
getEventPadGroupModeType :: MonadIO m => EventPadGroupMode -> m Gdk.Enums.EventType
getEventPadGroupModeType s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CInt
let val' = (toEnum . fromIntegral) val
return val'
setEventPadGroupModeType :: MonadIO m => EventPadGroupMode -> Gdk.Enums.EventType -> m ()
setEventPadGroupModeType s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = (fromIntegral . fromEnum) val
poke (ptr `plusPtr` 0) (val' :: CInt)
#if ENABLE_OVERLOADING
data EventPadGroupModeTypeFieldInfo
instance AttrInfo EventPadGroupModeTypeFieldInfo where
type AttrAllowedOps EventPadGroupModeTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventPadGroupModeTypeFieldInfo = (~) Gdk.Enums.EventType
type AttrBaseTypeConstraint EventPadGroupModeTypeFieldInfo = (~) EventPadGroupMode
type AttrGetType EventPadGroupModeTypeFieldInfo = Gdk.Enums.EventType
type AttrLabel EventPadGroupModeTypeFieldInfo = "type"
type AttrOrigin EventPadGroupModeTypeFieldInfo = EventPadGroupMode
attrGet _ = getEventPadGroupModeType
attrSet _ = setEventPadGroupModeType
attrConstruct = undefined
attrClear _ = undefined
eventPadGroupMode_type :: AttrLabelProxy "type"
eventPadGroupMode_type = AttrLabelProxy
#endif
getEventPadGroupModeWindow :: MonadIO m => EventPadGroupMode -> m (Maybe Gdk.Window.Window)
getEventPadGroupModeWindow s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO (Ptr Gdk.Window.Window)
result <- SP.convertIfNonNull val $ \val' -> do
val'' <- (newObject Gdk.Window.Window) val'
return val''
return result
setEventPadGroupModeWindow :: MonadIO m => EventPadGroupMode -> Ptr Gdk.Window.Window -> m ()
setEventPadGroupModeWindow s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: Ptr Gdk.Window.Window)
clearEventPadGroupModeWindow :: MonadIO m => EventPadGroupMode -> m ()
clearEventPadGroupModeWindow s = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (FP.nullPtr :: Ptr Gdk.Window.Window)
#if ENABLE_OVERLOADING
data EventPadGroupModeWindowFieldInfo
instance AttrInfo EventPadGroupModeWindowFieldInfo where
type AttrAllowedOps EventPadGroupModeWindowFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint EventPadGroupModeWindowFieldInfo = (~) (Ptr Gdk.Window.Window)
type AttrBaseTypeConstraint EventPadGroupModeWindowFieldInfo = (~) EventPadGroupMode
type AttrGetType EventPadGroupModeWindowFieldInfo = Maybe Gdk.Window.Window
type AttrLabel EventPadGroupModeWindowFieldInfo = "window"
type AttrOrigin EventPadGroupModeWindowFieldInfo = EventPadGroupMode
attrGet _ = getEventPadGroupModeWindow
attrSet _ = setEventPadGroupModeWindow
attrConstruct = undefined
attrClear _ = clearEventPadGroupModeWindow
eventPadGroupMode_window :: AttrLabelProxy "window"
eventPadGroupMode_window = AttrLabelProxy
#endif
getEventPadGroupModeSendEvent :: MonadIO m => EventPadGroupMode -> m Int8
getEventPadGroupModeSendEvent s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO Int8
return val
setEventPadGroupModeSendEvent :: MonadIO m => EventPadGroupMode -> Int8 -> m ()
setEventPadGroupModeSendEvent s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: Int8)
#if ENABLE_OVERLOADING
data EventPadGroupModeSendEventFieldInfo
instance AttrInfo EventPadGroupModeSendEventFieldInfo where
type AttrAllowedOps EventPadGroupModeSendEventFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventPadGroupModeSendEventFieldInfo = (~) Int8
type AttrBaseTypeConstraint EventPadGroupModeSendEventFieldInfo = (~) EventPadGroupMode
type AttrGetType EventPadGroupModeSendEventFieldInfo = Int8
type AttrLabel EventPadGroupModeSendEventFieldInfo = "send_event"
type AttrOrigin EventPadGroupModeSendEventFieldInfo = EventPadGroupMode
attrGet _ = getEventPadGroupModeSendEvent
attrSet _ = setEventPadGroupModeSendEvent
attrConstruct = undefined
attrClear _ = undefined
eventPadGroupMode_sendEvent :: AttrLabelProxy "sendEvent"
eventPadGroupMode_sendEvent = AttrLabelProxy
#endif
getEventPadGroupModeTime :: MonadIO m => EventPadGroupMode -> m Word32
getEventPadGroupModeTime s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 20) :: IO Word32
return val
setEventPadGroupModeTime :: MonadIO m => EventPadGroupMode -> Word32 -> m ()
setEventPadGroupModeTime s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 20) (val :: Word32)
#if ENABLE_OVERLOADING
data EventPadGroupModeTimeFieldInfo
instance AttrInfo EventPadGroupModeTimeFieldInfo where
type AttrAllowedOps EventPadGroupModeTimeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventPadGroupModeTimeFieldInfo = (~) Word32
type AttrBaseTypeConstraint EventPadGroupModeTimeFieldInfo = (~) EventPadGroupMode
type AttrGetType EventPadGroupModeTimeFieldInfo = Word32
type AttrLabel EventPadGroupModeTimeFieldInfo = "time"
type AttrOrigin EventPadGroupModeTimeFieldInfo = EventPadGroupMode
attrGet _ = getEventPadGroupModeTime
attrSet _ = setEventPadGroupModeTime
attrConstruct = undefined
attrClear _ = undefined
eventPadGroupMode_time :: AttrLabelProxy "time"
eventPadGroupMode_time = AttrLabelProxy
#endif
getEventPadGroupModeGroup :: MonadIO m => EventPadGroupMode -> m Word32
getEventPadGroupModeGroup s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO Word32
return val
setEventPadGroupModeGroup :: MonadIO m => EventPadGroupMode -> Word32 -> m ()
setEventPadGroupModeGroup s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (val :: Word32)
#if ENABLE_OVERLOADING
data EventPadGroupModeGroupFieldInfo
instance AttrInfo EventPadGroupModeGroupFieldInfo where
type AttrAllowedOps EventPadGroupModeGroupFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventPadGroupModeGroupFieldInfo = (~) Word32
type AttrBaseTypeConstraint EventPadGroupModeGroupFieldInfo = (~) EventPadGroupMode
type AttrGetType EventPadGroupModeGroupFieldInfo = Word32
type AttrLabel EventPadGroupModeGroupFieldInfo = "group"
type AttrOrigin EventPadGroupModeGroupFieldInfo = EventPadGroupMode
attrGet _ = getEventPadGroupModeGroup
attrSet _ = setEventPadGroupModeGroup
attrConstruct = undefined
attrClear _ = undefined
eventPadGroupMode_group :: AttrLabelProxy "group"
eventPadGroupMode_group = AttrLabelProxy
#endif
getEventPadGroupModeMode :: MonadIO m => EventPadGroupMode -> m Word32
getEventPadGroupModeMode s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 28) :: IO Word32
return val
setEventPadGroupModeMode :: MonadIO m => EventPadGroupMode -> Word32 -> m ()
setEventPadGroupModeMode s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 28) (val :: Word32)
#if ENABLE_OVERLOADING
data EventPadGroupModeModeFieldInfo
instance AttrInfo EventPadGroupModeModeFieldInfo where
type AttrAllowedOps EventPadGroupModeModeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint EventPadGroupModeModeFieldInfo = (~) Word32
type AttrBaseTypeConstraint EventPadGroupModeModeFieldInfo = (~) EventPadGroupMode
type AttrGetType EventPadGroupModeModeFieldInfo = Word32
type AttrLabel EventPadGroupModeModeFieldInfo = "mode"
type AttrOrigin EventPadGroupModeModeFieldInfo = EventPadGroupMode
attrGet _ = getEventPadGroupModeMode
attrSet _ = setEventPadGroupModeMode
attrConstruct = undefined
attrClear _ = undefined
eventPadGroupMode_mode :: AttrLabelProxy "mode"
eventPadGroupMode_mode = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList EventPadGroupMode
type instance O.AttributeList EventPadGroupMode = EventPadGroupModeAttributeList
type EventPadGroupModeAttributeList = ('[ '("type", EventPadGroupModeTypeFieldInfo), '("window", EventPadGroupModeWindowFieldInfo), '("sendEvent", EventPadGroupModeSendEventFieldInfo), '("time", EventPadGroupModeTimeFieldInfo), '("group", EventPadGroupModeGroupFieldInfo), '("mode", EventPadGroupModeModeFieldInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
type family ResolveEventPadGroupModeMethod (t :: Symbol) (o :: *) :: * where
ResolveEventPadGroupModeMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEventPadGroupModeMethod t EventPadGroupMode, O.MethodInfo info EventPadGroupMode p) => OL.IsLabel t (EventPadGroupMode -> 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