{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.WebKit.Objects.DOMScreen
    ( 

-- * Exported types
    DOMScreen(..)                           ,
    DOMScreenK                              ,
    toDOMScreen                             ,
    noDOMScreen                             ,


 -- * Methods
-- ** dOMScreenGetAvailHeight
    dOMScreenGetAvailHeight                 ,


-- ** dOMScreenGetAvailLeft
    dOMScreenGetAvailLeft                   ,


-- ** dOMScreenGetAvailTop
    dOMScreenGetAvailTop                    ,


-- ** dOMScreenGetAvailWidth
    dOMScreenGetAvailWidth                  ,


-- ** dOMScreenGetColorDepth
    dOMScreenGetColorDepth                  ,


-- ** dOMScreenGetHeight
    dOMScreenGetHeight                      ,


-- ** dOMScreenGetPixelDepth
    dOMScreenGetPixelDepth                  ,


-- ** dOMScreenGetWidth
    dOMScreenGetWidth                       ,




 -- * Properties
-- ** AvailHeight
    DOMScreenAvailHeightPropertyInfo        ,
    getDOMScreenAvailHeight                 ,


-- ** AvailLeft
    DOMScreenAvailLeftPropertyInfo          ,
    getDOMScreenAvailLeft                   ,


-- ** AvailTop
    DOMScreenAvailTopPropertyInfo           ,
    getDOMScreenAvailTop                    ,


-- ** AvailWidth
    DOMScreenAvailWidthPropertyInfo         ,
    getDOMScreenAvailWidth                  ,


-- ** ColorDepth
    DOMScreenColorDepthPropertyInfo         ,
    getDOMScreenColorDepth                  ,


-- ** Height
    DOMScreenHeightPropertyInfo             ,
    getDOMScreenHeight                      ,


-- ** PixelDepth
    DOMScreenPixelDepthPropertyInfo         ,
    getDOMScreenPixelDepth                  ,


-- ** Width
    DOMScreenWidthPropertyInfo              ,
    getDOMScreenWidth                       ,




    ) 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.WebKit.Types
import GI.WebKit.Callbacks
import qualified GI.GObject as GObject

newtype DOMScreen = DOMScreen (ForeignPtr DOMScreen)
foreign import ccall "webkit_dom_screen_get_type"
    c_webkit_dom_screen_get_type :: IO GType

type instance ParentTypes DOMScreen = DOMScreenParentTypes
type DOMScreenParentTypes = '[DOMObject, GObject.Object]

instance GObject DOMScreen where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_dom_screen_get_type
    

class GObject o => DOMScreenK o
instance (GObject o, IsDescendantOf DOMScreen o) => DOMScreenK o

toDOMScreen :: DOMScreenK o => o -> IO DOMScreen
toDOMScreen = unsafeCastTo DOMScreen

noDOMScreen :: Maybe DOMScreen
noDOMScreen = Nothing

-- VVV Prop "avail-height"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable]

getDOMScreenAvailHeight :: (MonadIO m, DOMScreenK o) => o -> m Word64
getDOMScreenAvailHeight obj = liftIO $ getObjectPropertyUInt64 obj "avail-height"

data DOMScreenAvailHeightPropertyInfo
instance AttrInfo DOMScreenAvailHeightPropertyInfo where
    type AttrAllowedOps DOMScreenAvailHeightPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMScreenAvailHeightPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMScreenAvailHeightPropertyInfo = DOMScreenK
    type AttrGetType DOMScreenAvailHeightPropertyInfo = Word64
    type AttrLabel DOMScreenAvailHeightPropertyInfo = "DOMScreen::avail-height"
    attrGet _ = getDOMScreenAvailHeight
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "avail-left"
   -- Type: TBasicType TInt64
   -- Flags: [PropertyReadable]

getDOMScreenAvailLeft :: (MonadIO m, DOMScreenK o) => o -> m Int64
getDOMScreenAvailLeft obj = liftIO $ getObjectPropertyInt64 obj "avail-left"

data DOMScreenAvailLeftPropertyInfo
instance AttrInfo DOMScreenAvailLeftPropertyInfo where
    type AttrAllowedOps DOMScreenAvailLeftPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMScreenAvailLeftPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMScreenAvailLeftPropertyInfo = DOMScreenK
    type AttrGetType DOMScreenAvailLeftPropertyInfo = Int64
    type AttrLabel DOMScreenAvailLeftPropertyInfo = "DOMScreen::avail-left"
    attrGet _ = getDOMScreenAvailLeft
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "avail-top"
   -- Type: TBasicType TInt64
   -- Flags: [PropertyReadable]

getDOMScreenAvailTop :: (MonadIO m, DOMScreenK o) => o -> m Int64
getDOMScreenAvailTop obj = liftIO $ getObjectPropertyInt64 obj "avail-top"

data DOMScreenAvailTopPropertyInfo
instance AttrInfo DOMScreenAvailTopPropertyInfo where
    type AttrAllowedOps DOMScreenAvailTopPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMScreenAvailTopPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMScreenAvailTopPropertyInfo = DOMScreenK
    type AttrGetType DOMScreenAvailTopPropertyInfo = Int64
    type AttrLabel DOMScreenAvailTopPropertyInfo = "DOMScreen::avail-top"
    attrGet _ = getDOMScreenAvailTop
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "avail-width"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable]

getDOMScreenAvailWidth :: (MonadIO m, DOMScreenK o) => o -> m Word64
getDOMScreenAvailWidth obj = liftIO $ getObjectPropertyUInt64 obj "avail-width"

data DOMScreenAvailWidthPropertyInfo
instance AttrInfo DOMScreenAvailWidthPropertyInfo where
    type AttrAllowedOps DOMScreenAvailWidthPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMScreenAvailWidthPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMScreenAvailWidthPropertyInfo = DOMScreenK
    type AttrGetType DOMScreenAvailWidthPropertyInfo = Word64
    type AttrLabel DOMScreenAvailWidthPropertyInfo = "DOMScreen::avail-width"
    attrGet _ = getDOMScreenAvailWidth
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "color-depth"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable]

getDOMScreenColorDepth :: (MonadIO m, DOMScreenK o) => o -> m Word64
getDOMScreenColorDepth obj = liftIO $ getObjectPropertyUInt64 obj "color-depth"

data DOMScreenColorDepthPropertyInfo
instance AttrInfo DOMScreenColorDepthPropertyInfo where
    type AttrAllowedOps DOMScreenColorDepthPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMScreenColorDepthPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMScreenColorDepthPropertyInfo = DOMScreenK
    type AttrGetType DOMScreenColorDepthPropertyInfo = Word64
    type AttrLabel DOMScreenColorDepthPropertyInfo = "DOMScreen::color-depth"
    attrGet _ = getDOMScreenColorDepth
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "height"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable]

getDOMScreenHeight :: (MonadIO m, DOMScreenK o) => o -> m Word64
getDOMScreenHeight obj = liftIO $ getObjectPropertyUInt64 obj "height"

data DOMScreenHeightPropertyInfo
instance AttrInfo DOMScreenHeightPropertyInfo where
    type AttrAllowedOps DOMScreenHeightPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMScreenHeightPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMScreenHeightPropertyInfo = DOMScreenK
    type AttrGetType DOMScreenHeightPropertyInfo = Word64
    type AttrLabel DOMScreenHeightPropertyInfo = "DOMScreen::height"
    attrGet _ = getDOMScreenHeight
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "pixel-depth"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable]

getDOMScreenPixelDepth :: (MonadIO m, DOMScreenK o) => o -> m Word64
getDOMScreenPixelDepth obj = liftIO $ getObjectPropertyUInt64 obj "pixel-depth"

data DOMScreenPixelDepthPropertyInfo
instance AttrInfo DOMScreenPixelDepthPropertyInfo where
    type AttrAllowedOps DOMScreenPixelDepthPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMScreenPixelDepthPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMScreenPixelDepthPropertyInfo = DOMScreenK
    type AttrGetType DOMScreenPixelDepthPropertyInfo = Word64
    type AttrLabel DOMScreenPixelDepthPropertyInfo = "DOMScreen::pixel-depth"
    attrGet _ = getDOMScreenPixelDepth
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "width"
   -- Type: TBasicType TUInt64
   -- Flags: [PropertyReadable]

getDOMScreenWidth :: (MonadIO m, DOMScreenK o) => o -> m Word64
getDOMScreenWidth obj = liftIO $ getObjectPropertyUInt64 obj "width"

data DOMScreenWidthPropertyInfo
instance AttrInfo DOMScreenWidthPropertyInfo where
    type AttrAllowedOps DOMScreenWidthPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMScreenWidthPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMScreenWidthPropertyInfo = DOMScreenK
    type AttrGetType DOMScreenWidthPropertyInfo = Word64
    type AttrLabel DOMScreenWidthPropertyInfo = "DOMScreen::width"
    attrGet _ = getDOMScreenWidth
    attrSet _ = undefined
    attrConstruct _ = undefined

type instance AttributeList DOMScreen = DOMScreenAttributeList
type DOMScreenAttributeList = ('[ '("avail-height", DOMScreenAvailHeightPropertyInfo), '("avail-left", DOMScreenAvailLeftPropertyInfo), '("avail-top", DOMScreenAvailTopPropertyInfo), '("avail-width", DOMScreenAvailWidthPropertyInfo), '("color-depth", DOMScreenColorDepthPropertyInfo), '("core-object", DOMObjectCoreObjectPropertyInfo), '("height", DOMScreenHeightPropertyInfo), '("pixel-depth", DOMScreenPixelDepthPropertyInfo), '("width", DOMScreenWidthPropertyInfo)] :: [(Symbol, *)])

type instance SignalList DOMScreen = DOMScreenSignalList
type DOMScreenSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method DOMScreen::get_avail_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_screen_get_avail_height" webkit_dom_screen_get_avail_height :: 
    Ptr DOMScreen ->                        -- _obj : TInterface "WebKit" "DOMScreen"
    IO Word64


dOMScreenGetAvailHeight ::
    (MonadIO m, DOMScreenK a) =>
    a ->                                    -- _obj
    m Word64
dOMScreenGetAvailHeight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_screen_get_avail_height _obj'
    touchManagedPtr _obj
    return result

-- method DOMScreen::get_avail_left
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_screen_get_avail_left" webkit_dom_screen_get_avail_left :: 
    Ptr DOMScreen ->                        -- _obj : TInterface "WebKit" "DOMScreen"
    IO Int64


dOMScreenGetAvailLeft ::
    (MonadIO m, DOMScreenK a) =>
    a ->                                    -- _obj
    m Int64
dOMScreenGetAvailLeft _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_screen_get_avail_left _obj'
    touchManagedPtr _obj
    return result

-- method DOMScreen::get_avail_top
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_screen_get_avail_top" webkit_dom_screen_get_avail_top :: 
    Ptr DOMScreen ->                        -- _obj : TInterface "WebKit" "DOMScreen"
    IO Int64


dOMScreenGetAvailTop ::
    (MonadIO m, DOMScreenK a) =>
    a ->                                    -- _obj
    m Int64
dOMScreenGetAvailTop _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_screen_get_avail_top _obj'
    touchManagedPtr _obj
    return result

-- method DOMScreen::get_avail_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_screen_get_avail_width" webkit_dom_screen_get_avail_width :: 
    Ptr DOMScreen ->                        -- _obj : TInterface "WebKit" "DOMScreen"
    IO Word64


dOMScreenGetAvailWidth ::
    (MonadIO m, DOMScreenK a) =>
    a ->                                    -- _obj
    m Word64
dOMScreenGetAvailWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_screen_get_avail_width _obj'
    touchManagedPtr _obj
    return result

-- method DOMScreen::get_color_depth
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_screen_get_color_depth" webkit_dom_screen_get_color_depth :: 
    Ptr DOMScreen ->                        -- _obj : TInterface "WebKit" "DOMScreen"
    IO Word64


dOMScreenGetColorDepth ::
    (MonadIO m, DOMScreenK a) =>
    a ->                                    -- _obj
    m Word64
dOMScreenGetColorDepth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_screen_get_color_depth _obj'
    touchManagedPtr _obj
    return result

-- method DOMScreen::get_height
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_screen_get_height" webkit_dom_screen_get_height :: 
    Ptr DOMScreen ->                        -- _obj : TInterface "WebKit" "DOMScreen"
    IO Word64


dOMScreenGetHeight ::
    (MonadIO m, DOMScreenK a) =>
    a ->                                    -- _obj
    m Word64
dOMScreenGetHeight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_screen_get_height _obj'
    touchManagedPtr _obj
    return result

-- method DOMScreen::get_pixel_depth
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_screen_get_pixel_depth" webkit_dom_screen_get_pixel_depth :: 
    Ptr DOMScreen ->                        -- _obj : TInterface "WebKit" "DOMScreen"
    IO Word64


dOMScreenGetPixelDepth ::
    (MonadIO m, DOMScreenK a) =>
    a ->                                    -- _obj
    m Word64
dOMScreenGetPixelDepth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_screen_get_pixel_depth _obj'
    touchManagedPtr _obj
    return result

-- method DOMScreen::get_width
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMScreen", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_screen_get_width" webkit_dom_screen_get_width :: 
    Ptr DOMScreen ->                        -- _obj : TInterface "WebKit" "DOMScreen"
    IO Word64


dOMScreenGetWidth ::
    (MonadIO m, DOMScreenK a) =>
    a ->                                    -- _obj
    m Word64
dOMScreenGetWidth _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_dom_screen_get_width _obj'
    touchManagedPtr _obj
    return result