module GI.Gtk.Objects.Misc
(
Misc(..) ,
MiscK ,
toMisc ,
noMisc ,
miscGetAlignment ,
miscGetPadding ,
miscSetAlignment ,
miscSetPadding ,
MiscXalignPropertyInfo ,
constructMiscXalign ,
getMiscXalign ,
setMiscXalign ,
MiscXpadPropertyInfo ,
constructMiscXpad ,
getMiscXpad ,
setMiscXpad ,
MiscYalignPropertyInfo ,
constructMiscYalign ,
getMiscYalign ,
setMiscYalign ,
MiscYpadPropertyInfo ,
constructMiscYpad ,
getMiscYpad ,
setMiscYpad ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.Atk as Atk
import qualified GI.GObject as GObject
newtype Misc = Misc (ForeignPtr Misc)
foreign import ccall "gtk_misc_get_type"
c_gtk_misc_get_type :: IO GType
type instance ParentTypes Misc = MiscParentTypes
type MiscParentTypes = '[Widget, GObject.Object, Atk.ImplementorIface, Buildable]
instance GObject Misc where
gobjectIsInitiallyUnowned _ = True
gobjectType _ = c_gtk_misc_get_type
class GObject o => MiscK o
instance (GObject o, IsDescendantOf Misc o) => MiscK o
toMisc :: MiscK o => o -> IO Misc
toMisc = unsafeCastTo Misc
noMisc :: Maybe Misc
noMisc = Nothing
getMiscXalign :: (MonadIO m, MiscK o) => o -> m Float
getMiscXalign obj = liftIO $ getObjectPropertyFloat obj "xalign"
setMiscXalign :: (MonadIO m, MiscK o) => o -> Float -> m ()
setMiscXalign obj val = liftIO $ setObjectPropertyFloat obj "xalign" val
constructMiscXalign :: Float -> IO ([Char], GValue)
constructMiscXalign val = constructObjectPropertyFloat "xalign" val
data MiscXalignPropertyInfo
instance AttrInfo MiscXalignPropertyInfo where
type AttrAllowedOps MiscXalignPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint MiscXalignPropertyInfo = (~) Float
type AttrBaseTypeConstraint MiscXalignPropertyInfo = MiscK
type AttrGetType MiscXalignPropertyInfo = Float
type AttrLabel MiscXalignPropertyInfo = "Misc::xalign"
attrGet _ = getMiscXalign
attrSet _ = setMiscXalign
attrConstruct _ = constructMiscXalign
getMiscXpad :: (MonadIO m, MiscK o) => o -> m Int32
getMiscXpad obj = liftIO $ getObjectPropertyCInt obj "xpad"
setMiscXpad :: (MonadIO m, MiscK o) => o -> Int32 -> m ()
setMiscXpad obj val = liftIO $ setObjectPropertyCInt obj "xpad" val
constructMiscXpad :: Int32 -> IO ([Char], GValue)
constructMiscXpad val = constructObjectPropertyCInt "xpad" val
data MiscXpadPropertyInfo
instance AttrInfo MiscXpadPropertyInfo where
type AttrAllowedOps MiscXpadPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint MiscXpadPropertyInfo = (~) Int32
type AttrBaseTypeConstraint MiscXpadPropertyInfo = MiscK
type AttrGetType MiscXpadPropertyInfo = Int32
type AttrLabel MiscXpadPropertyInfo = "Misc::xpad"
attrGet _ = getMiscXpad
attrSet _ = setMiscXpad
attrConstruct _ = constructMiscXpad
getMiscYalign :: (MonadIO m, MiscK o) => o -> m Float
getMiscYalign obj = liftIO $ getObjectPropertyFloat obj "yalign"
setMiscYalign :: (MonadIO m, MiscK o) => o -> Float -> m ()
setMiscYalign obj val = liftIO $ setObjectPropertyFloat obj "yalign" val
constructMiscYalign :: Float -> IO ([Char], GValue)
constructMiscYalign val = constructObjectPropertyFloat "yalign" val
data MiscYalignPropertyInfo
instance AttrInfo MiscYalignPropertyInfo where
type AttrAllowedOps MiscYalignPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint MiscYalignPropertyInfo = (~) Float
type AttrBaseTypeConstraint MiscYalignPropertyInfo = MiscK
type AttrGetType MiscYalignPropertyInfo = Float
type AttrLabel MiscYalignPropertyInfo = "Misc::yalign"
attrGet _ = getMiscYalign
attrSet _ = setMiscYalign
attrConstruct _ = constructMiscYalign
getMiscYpad :: (MonadIO m, MiscK o) => o -> m Int32
getMiscYpad obj = liftIO $ getObjectPropertyCInt obj "ypad"
setMiscYpad :: (MonadIO m, MiscK o) => o -> Int32 -> m ()
setMiscYpad obj val = liftIO $ setObjectPropertyCInt obj "ypad" val
constructMiscYpad :: Int32 -> IO ([Char], GValue)
constructMiscYpad val = constructObjectPropertyCInt "ypad" val
data MiscYpadPropertyInfo
instance AttrInfo MiscYpadPropertyInfo where
type AttrAllowedOps MiscYpadPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint MiscYpadPropertyInfo = (~) Int32
type AttrBaseTypeConstraint MiscYpadPropertyInfo = MiscK
type AttrGetType MiscYpadPropertyInfo = Int32
type AttrLabel MiscYpadPropertyInfo = "Misc::ypad"
attrGet _ = getMiscYpad
attrSet _ = setMiscYpad
attrConstruct _ = constructMiscYpad
type instance AttributeList Misc = MiscAttributeList
type MiscAttributeList = ('[ '("app-paintable", WidgetAppPaintablePropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo), '("xalign", MiscXalignPropertyInfo), '("xpad", MiscXpadPropertyInfo), '("yalign", MiscYalignPropertyInfo), '("ypad", MiscYpadPropertyInfo)] :: [(Symbol, *)])
type instance SignalList Misc = MiscSignalList
type MiscSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "gtk_misc_get_alignment" gtk_misc_get_alignment ::
Ptr Misc ->
Ptr CFloat ->
Ptr CFloat ->
IO ()
miscGetAlignment ::
(MonadIO m, MiscK a) =>
a ->
m (Float,Float)
miscGetAlignment _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
xalign <- allocMem :: IO (Ptr CFloat)
yalign <- allocMem :: IO (Ptr CFloat)
gtk_misc_get_alignment _obj' xalign yalign
xalign' <- peek xalign
let xalign'' = realToFrac xalign'
yalign' <- peek yalign
let yalign'' = realToFrac yalign'
touchManagedPtr _obj
freeMem xalign
freeMem yalign
return (xalign'', yalign'')
foreign import ccall "gtk_misc_get_padding" gtk_misc_get_padding ::
Ptr Misc ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
miscGetPadding ::
(MonadIO m, MiscK a) =>
a ->
m (Int32,Int32)
miscGetPadding _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
xpad <- allocMem :: IO (Ptr Int32)
ypad <- allocMem :: IO (Ptr Int32)
gtk_misc_get_padding _obj' xpad ypad
xpad' <- peek xpad
ypad' <- peek ypad
touchManagedPtr _obj
freeMem xpad
freeMem ypad
return (xpad', ypad')
foreign import ccall "gtk_misc_set_alignment" gtk_misc_set_alignment ::
Ptr Misc ->
CFloat ->
CFloat ->
IO ()
miscSetAlignment ::
(MonadIO m, MiscK a) =>
a ->
Float ->
Float ->
m ()
miscSetAlignment _obj xalign yalign = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let xalign' = realToFrac xalign
let yalign' = realToFrac yalign
gtk_misc_set_alignment _obj' xalign' yalign'
touchManagedPtr _obj
return ()
foreign import ccall "gtk_misc_set_padding" gtk_misc_set_padding ::
Ptr Misc ->
Int32 ->
Int32 ->
IO ()
miscSetPadding ::
(MonadIO m, MiscK a) =>
a ->
Int32 ->
Int32 ->
m ()
miscSetPadding _obj xpad ypad = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
gtk_misc_set_padding _obj' xpad ypad
touchManagedPtr _obj
return ()