module GI.WebKit2.Objects.WindowProperties
(
WindowProperties(..) ,
WindowPropertiesK ,
toWindowProperties ,
noWindowProperties ,
windowPropertiesGetFullscreen ,
windowPropertiesGetGeometry ,
windowPropertiesGetLocationbarVisible ,
windowPropertiesGetMenubarVisible ,
windowPropertiesGetResizable ,
windowPropertiesGetScrollbarsVisible ,
windowPropertiesGetStatusbarVisible ,
windowPropertiesGetToolbarVisible ,
WindowPropertiesFullscreenPropertyInfo ,
constructWindowPropertiesFullscreen ,
getWindowPropertiesFullscreen ,
WindowPropertiesGeometryPropertyInfo ,
constructWindowPropertiesGeometry ,
getWindowPropertiesGeometry ,
WindowPropertiesLocationbarVisiblePropertyInfo,
constructWindowPropertiesLocationbarVisible,
getWindowPropertiesLocationbarVisible ,
WindowPropertiesMenubarVisiblePropertyInfo,
constructWindowPropertiesMenubarVisible ,
getWindowPropertiesMenubarVisible ,
WindowPropertiesResizablePropertyInfo ,
constructWindowPropertiesResizable ,
getWindowPropertiesResizable ,
WindowPropertiesScrollbarsVisiblePropertyInfo,
constructWindowPropertiesScrollbarsVisible,
getWindowPropertiesScrollbarsVisible ,
WindowPropertiesStatusbarVisiblePropertyInfo,
constructWindowPropertiesStatusbarVisible,
getWindowPropertiesStatusbarVisible ,
WindowPropertiesToolbarVisiblePropertyInfo,
constructWindowPropertiesToolbarVisible ,
getWindowPropertiesToolbarVisible ,
) 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.WebKit2.Types
import GI.WebKit2.Callbacks
import qualified GI.GObject as GObject
import qualified GI.Gdk as Gdk
newtype WindowProperties = WindowProperties (ForeignPtr WindowProperties)
foreign import ccall "webkit_window_properties_get_type"
c_webkit_window_properties_get_type :: IO GType
type instance ParentTypes WindowProperties = WindowPropertiesParentTypes
type WindowPropertiesParentTypes = '[GObject.Object]
instance GObject WindowProperties where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_window_properties_get_type
class GObject o => WindowPropertiesK o
instance (GObject o, IsDescendantOf WindowProperties o) => WindowPropertiesK o
toWindowProperties :: WindowPropertiesK o => o -> IO WindowProperties
toWindowProperties = unsafeCastTo WindowProperties
noWindowProperties :: Maybe WindowProperties
noWindowProperties = Nothing
getWindowPropertiesFullscreen :: (MonadIO m, WindowPropertiesK o) => o -> m Bool
getWindowPropertiesFullscreen obj = liftIO $ getObjectPropertyBool obj "fullscreen"
constructWindowPropertiesFullscreen :: Bool -> IO ([Char], GValue)
constructWindowPropertiesFullscreen val = constructObjectPropertyBool "fullscreen" val
data WindowPropertiesFullscreenPropertyInfo
instance AttrInfo WindowPropertiesFullscreenPropertyInfo where
type AttrAllowedOps WindowPropertiesFullscreenPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint WindowPropertiesFullscreenPropertyInfo = (~) Bool
type AttrBaseTypeConstraint WindowPropertiesFullscreenPropertyInfo = WindowPropertiesK
type AttrGetType WindowPropertiesFullscreenPropertyInfo = Bool
type AttrLabel WindowPropertiesFullscreenPropertyInfo = "WindowProperties::fullscreen"
attrGet _ = getWindowPropertiesFullscreen
attrSet _ = undefined
attrConstruct _ = constructWindowPropertiesFullscreen
getWindowPropertiesGeometry :: (MonadIO m, WindowPropertiesK o) => o -> m Gdk.Rectangle
getWindowPropertiesGeometry obj = liftIO $ getObjectPropertyBoxed obj "geometry" Gdk.Rectangle
constructWindowPropertiesGeometry :: Gdk.Rectangle -> IO ([Char], GValue)
constructWindowPropertiesGeometry val = constructObjectPropertyBoxed "geometry" val
data WindowPropertiesGeometryPropertyInfo
instance AttrInfo WindowPropertiesGeometryPropertyInfo where
type AttrAllowedOps WindowPropertiesGeometryPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint WindowPropertiesGeometryPropertyInfo = (~) Gdk.Rectangle
type AttrBaseTypeConstraint WindowPropertiesGeometryPropertyInfo = WindowPropertiesK
type AttrGetType WindowPropertiesGeometryPropertyInfo = Gdk.Rectangle
type AttrLabel WindowPropertiesGeometryPropertyInfo = "WindowProperties::geometry"
attrGet _ = getWindowPropertiesGeometry
attrSet _ = undefined
attrConstruct _ = constructWindowPropertiesGeometry
getWindowPropertiesLocationbarVisible :: (MonadIO m, WindowPropertiesK o) => o -> m Bool
getWindowPropertiesLocationbarVisible obj = liftIO $ getObjectPropertyBool obj "locationbar-visible"
constructWindowPropertiesLocationbarVisible :: Bool -> IO ([Char], GValue)
constructWindowPropertiesLocationbarVisible val = constructObjectPropertyBool "locationbar-visible" val
data WindowPropertiesLocationbarVisiblePropertyInfo
instance AttrInfo WindowPropertiesLocationbarVisiblePropertyInfo where
type AttrAllowedOps WindowPropertiesLocationbarVisiblePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint WindowPropertiesLocationbarVisiblePropertyInfo = (~) Bool
type AttrBaseTypeConstraint WindowPropertiesLocationbarVisiblePropertyInfo = WindowPropertiesK
type AttrGetType WindowPropertiesLocationbarVisiblePropertyInfo = Bool
type AttrLabel WindowPropertiesLocationbarVisiblePropertyInfo = "WindowProperties::locationbar-visible"
attrGet _ = getWindowPropertiesLocationbarVisible
attrSet _ = undefined
attrConstruct _ = constructWindowPropertiesLocationbarVisible
getWindowPropertiesMenubarVisible :: (MonadIO m, WindowPropertiesK o) => o -> m Bool
getWindowPropertiesMenubarVisible obj = liftIO $ getObjectPropertyBool obj "menubar-visible"
constructWindowPropertiesMenubarVisible :: Bool -> IO ([Char], GValue)
constructWindowPropertiesMenubarVisible val = constructObjectPropertyBool "menubar-visible" val
data WindowPropertiesMenubarVisiblePropertyInfo
instance AttrInfo WindowPropertiesMenubarVisiblePropertyInfo where
type AttrAllowedOps WindowPropertiesMenubarVisiblePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint WindowPropertiesMenubarVisiblePropertyInfo = (~) Bool
type AttrBaseTypeConstraint WindowPropertiesMenubarVisiblePropertyInfo = WindowPropertiesK
type AttrGetType WindowPropertiesMenubarVisiblePropertyInfo = Bool
type AttrLabel WindowPropertiesMenubarVisiblePropertyInfo = "WindowProperties::menubar-visible"
attrGet _ = getWindowPropertiesMenubarVisible
attrSet _ = undefined
attrConstruct _ = constructWindowPropertiesMenubarVisible
getWindowPropertiesResizable :: (MonadIO m, WindowPropertiesK o) => o -> m Bool
getWindowPropertiesResizable obj = liftIO $ getObjectPropertyBool obj "resizable"
constructWindowPropertiesResizable :: Bool -> IO ([Char], GValue)
constructWindowPropertiesResizable val = constructObjectPropertyBool "resizable" val
data WindowPropertiesResizablePropertyInfo
instance AttrInfo WindowPropertiesResizablePropertyInfo where
type AttrAllowedOps WindowPropertiesResizablePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint WindowPropertiesResizablePropertyInfo = (~) Bool
type AttrBaseTypeConstraint WindowPropertiesResizablePropertyInfo = WindowPropertiesK
type AttrGetType WindowPropertiesResizablePropertyInfo = Bool
type AttrLabel WindowPropertiesResizablePropertyInfo = "WindowProperties::resizable"
attrGet _ = getWindowPropertiesResizable
attrSet _ = undefined
attrConstruct _ = constructWindowPropertiesResizable
getWindowPropertiesScrollbarsVisible :: (MonadIO m, WindowPropertiesK o) => o -> m Bool
getWindowPropertiesScrollbarsVisible obj = liftIO $ getObjectPropertyBool obj "scrollbars-visible"
constructWindowPropertiesScrollbarsVisible :: Bool -> IO ([Char], GValue)
constructWindowPropertiesScrollbarsVisible val = constructObjectPropertyBool "scrollbars-visible" val
data WindowPropertiesScrollbarsVisiblePropertyInfo
instance AttrInfo WindowPropertiesScrollbarsVisiblePropertyInfo where
type AttrAllowedOps WindowPropertiesScrollbarsVisiblePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint WindowPropertiesScrollbarsVisiblePropertyInfo = (~) Bool
type AttrBaseTypeConstraint WindowPropertiesScrollbarsVisiblePropertyInfo = WindowPropertiesK
type AttrGetType WindowPropertiesScrollbarsVisiblePropertyInfo = Bool
type AttrLabel WindowPropertiesScrollbarsVisiblePropertyInfo = "WindowProperties::scrollbars-visible"
attrGet _ = getWindowPropertiesScrollbarsVisible
attrSet _ = undefined
attrConstruct _ = constructWindowPropertiesScrollbarsVisible
getWindowPropertiesStatusbarVisible :: (MonadIO m, WindowPropertiesK o) => o -> m Bool
getWindowPropertiesStatusbarVisible obj = liftIO $ getObjectPropertyBool obj "statusbar-visible"
constructWindowPropertiesStatusbarVisible :: Bool -> IO ([Char], GValue)
constructWindowPropertiesStatusbarVisible val = constructObjectPropertyBool "statusbar-visible" val
data WindowPropertiesStatusbarVisiblePropertyInfo
instance AttrInfo WindowPropertiesStatusbarVisiblePropertyInfo where
type AttrAllowedOps WindowPropertiesStatusbarVisiblePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint WindowPropertiesStatusbarVisiblePropertyInfo = (~) Bool
type AttrBaseTypeConstraint WindowPropertiesStatusbarVisiblePropertyInfo = WindowPropertiesK
type AttrGetType WindowPropertiesStatusbarVisiblePropertyInfo = Bool
type AttrLabel WindowPropertiesStatusbarVisiblePropertyInfo = "WindowProperties::statusbar-visible"
attrGet _ = getWindowPropertiesStatusbarVisible
attrSet _ = undefined
attrConstruct _ = constructWindowPropertiesStatusbarVisible
getWindowPropertiesToolbarVisible :: (MonadIO m, WindowPropertiesK o) => o -> m Bool
getWindowPropertiesToolbarVisible obj = liftIO $ getObjectPropertyBool obj "toolbar-visible"
constructWindowPropertiesToolbarVisible :: Bool -> IO ([Char], GValue)
constructWindowPropertiesToolbarVisible val = constructObjectPropertyBool "toolbar-visible" val
data WindowPropertiesToolbarVisiblePropertyInfo
instance AttrInfo WindowPropertiesToolbarVisiblePropertyInfo where
type AttrAllowedOps WindowPropertiesToolbarVisiblePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint WindowPropertiesToolbarVisiblePropertyInfo = (~) Bool
type AttrBaseTypeConstraint WindowPropertiesToolbarVisiblePropertyInfo = WindowPropertiesK
type AttrGetType WindowPropertiesToolbarVisiblePropertyInfo = Bool
type AttrLabel WindowPropertiesToolbarVisiblePropertyInfo = "WindowProperties::toolbar-visible"
attrGet _ = getWindowPropertiesToolbarVisible
attrSet _ = undefined
attrConstruct _ = constructWindowPropertiesToolbarVisible
type instance AttributeList WindowProperties = WindowPropertiesAttributeList
type WindowPropertiesAttributeList = ('[ '("fullscreen", WindowPropertiesFullscreenPropertyInfo), '("geometry", WindowPropertiesGeometryPropertyInfo), '("locationbar-visible", WindowPropertiesLocationbarVisiblePropertyInfo), '("menubar-visible", WindowPropertiesMenubarVisiblePropertyInfo), '("resizable", WindowPropertiesResizablePropertyInfo), '("scrollbars-visible", WindowPropertiesScrollbarsVisiblePropertyInfo), '("statusbar-visible", WindowPropertiesStatusbarVisiblePropertyInfo), '("toolbar-visible", WindowPropertiesToolbarVisiblePropertyInfo)] :: [(Symbol, *)])
type instance SignalList WindowProperties = WindowPropertiesSignalList
type WindowPropertiesSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_window_properties_get_fullscreen" webkit_window_properties_get_fullscreen ::
Ptr WindowProperties ->
IO CInt
windowPropertiesGetFullscreen ::
(MonadIO m, WindowPropertiesK a) =>
a ->
m Bool
windowPropertiesGetFullscreen _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_window_properties_get_fullscreen _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_window_properties_get_geometry" webkit_window_properties_get_geometry ::
Ptr WindowProperties ->
Ptr Gdk.Rectangle ->
IO ()
windowPropertiesGetGeometry ::
(MonadIO m, WindowPropertiesK a) =>
a ->
m (Gdk.Rectangle)
windowPropertiesGetGeometry _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
geometry <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle)
webkit_window_properties_get_geometry _obj' geometry
geometry' <- (wrapBoxed Gdk.Rectangle) geometry
touchManagedPtr _obj
return geometry'
foreign import ccall "webkit_window_properties_get_locationbar_visible" webkit_window_properties_get_locationbar_visible ::
Ptr WindowProperties ->
IO CInt
windowPropertiesGetLocationbarVisible ::
(MonadIO m, WindowPropertiesK a) =>
a ->
m Bool
windowPropertiesGetLocationbarVisible _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_window_properties_get_locationbar_visible _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_window_properties_get_menubar_visible" webkit_window_properties_get_menubar_visible ::
Ptr WindowProperties ->
IO CInt
windowPropertiesGetMenubarVisible ::
(MonadIO m, WindowPropertiesK a) =>
a ->
m Bool
windowPropertiesGetMenubarVisible _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_window_properties_get_menubar_visible _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_window_properties_get_resizable" webkit_window_properties_get_resizable ::
Ptr WindowProperties ->
IO CInt
windowPropertiesGetResizable ::
(MonadIO m, WindowPropertiesK a) =>
a ->
m Bool
windowPropertiesGetResizable _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_window_properties_get_resizable _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_window_properties_get_scrollbars_visible" webkit_window_properties_get_scrollbars_visible ::
Ptr WindowProperties ->
IO CInt
windowPropertiesGetScrollbarsVisible ::
(MonadIO m, WindowPropertiesK a) =>
a ->
m Bool
windowPropertiesGetScrollbarsVisible _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_window_properties_get_scrollbars_visible _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_window_properties_get_statusbar_visible" webkit_window_properties_get_statusbar_visible ::
Ptr WindowProperties ->
IO CInt
windowPropertiesGetStatusbarVisible ::
(MonadIO m, WindowPropertiesK a) =>
a ->
m Bool
windowPropertiesGetStatusbarVisible _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_window_properties_get_statusbar_visible _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_window_properties_get_toolbar_visible" webkit_window_properties_get_toolbar_visible ::
Ptr WindowProperties ->
IO CInt
windowPropertiesGetToolbarVisible ::
(MonadIO m, WindowPropertiesK a) =>
a ->
m Bool
windowPropertiesGetToolbarVisible _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_window_properties_get_toolbar_visible _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'