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

#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
       && !defined(__HADDOCK_VERSION__))

module GI.Wnck.Flags
    (

 -- * Flags
-- ** WindowActions #flag:WindowActions#

    WindowActions(..)                       ,


-- ** WindowMoveResizeMask #flag:WindowMoveResizeMask#

    WindowMoveResizeMask(..)                ,


-- ** WindowState #flag:WindowState#

    WindowState(..)                         ,




    ) 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


-- Flags WindowState
{- |
Type used as a bitmask to describe the state of a 'GI.Wnck.Objects.Window.Window'.
-}
data WindowState =
      WindowStateMinimized
    {- ^
    the window is minimized.
    -}
    | WindowStateMaximizedHorizontally
    {- ^
    the window is horizontically
    maximized.
    -}
    | WindowStateMaximizedVertically
    {- ^
    the window is vertically maximized.
    -}
    | WindowStateShaded
    {- ^
    the window is shaded.
    -}
    | WindowStateSkipPager
    {- ^
    the window should not be included on pagers.
    -}
    | WindowStateSkipTasklist
    {- ^
    the window should not be included on
    tasklists.
    -}
    | WindowStateSticky
    {- ^
    the window is sticky (see
    'GI.Wnck.Objects.Window.windowIsSticky').
    -}
    | WindowStateHidden
    {- ^
    the window is not visible on its 'GI.Wnck.Objects.Workspace.Workspace'
    and viewport (when minimized, for example).
    -}
    | WindowStateFullscreen
    {- ^
    the window is fullscreen.
    -}
    | WindowStateDemandsAttention
    {- ^
    the window needs attention (because
    the window requested activation but the window manager refused it, for
    example).
    -}
    | WindowStateUrgent
    {- ^
    the window requires a response from the user.
    -}
    | WindowStateAbove
    {- ^
    the window is above other windows (see
    'GI.Wnck.Objects.Window.windowMakeAbove').
    -}
    | WindowStateBelow
    {- ^
    the window is below other windows (see
    'GI.Wnck.Objects.Window.windowMakeBelow').
    -}
    | AnotherWindowState Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum WindowState where
    fromEnum WindowStateMinimized = 1
    fromEnum WindowStateMaximizedHorizontally = 2
    fromEnum WindowStateMaximizedVertically = 4
    fromEnum WindowStateShaded = 8
    fromEnum WindowStateSkipPager = 16
    fromEnum WindowStateSkipTasklist = 32
    fromEnum WindowStateSticky = 64
    fromEnum WindowStateHidden = 128
    fromEnum WindowStateFullscreen = 256
    fromEnum WindowStateDemandsAttention = 512
    fromEnum WindowStateUrgent = 1024
    fromEnum WindowStateAbove = 2048
    fromEnum WindowStateBelow = 4096
    fromEnum (AnotherWindowState k) = k

    toEnum 1 = WindowStateMinimized
    toEnum 2 = WindowStateMaximizedHorizontally
    toEnum 4 = WindowStateMaximizedVertically
    toEnum 8 = WindowStateShaded
    toEnum 16 = WindowStateSkipPager
    toEnum 32 = WindowStateSkipTasklist
    toEnum 64 = WindowStateSticky
    toEnum 128 = WindowStateHidden
    toEnum 256 = WindowStateFullscreen
    toEnum 512 = WindowStateDemandsAttention
    toEnum 1024 = WindowStateUrgent
    toEnum 2048 = WindowStateAbove
    toEnum 4096 = WindowStateBelow
    toEnum k = AnotherWindowState k

instance P.Ord WindowState where
    compare a b = P.compare (P.fromEnum a) (P.fromEnum b)

foreign import ccall "wnck_window_state_get_type" c_wnck_window_state_get_type ::
    IO GType

instance BoxedFlags WindowState where
    boxedFlagsType _ = c_wnck_window_state_get_type

instance IsGFlag WindowState

-- Flags WindowMoveResizeMask
{- |
Flag used as a bitmask when changing the geometry of a 'GI.Wnck.Objects.Window.Window'. This
indicates which part of the geometry should be changed.

/Since: 2.16/
-}
data WindowMoveResizeMask =
      WindowMoveResizeMaskX
    {- ^
    X coordinate of the window should be changed.
    -}
    | WindowMoveResizeMaskY
    {- ^
    Y coordinate of the window should be changed.
    -}
    | WindowMoveResizeMaskWidth
    {- ^
    width of the window should be changed.
    -}
    | WindowMoveResizeMaskHeight
    {- ^
    height of the window should be changed.
    -}
    | AnotherWindowMoveResizeMask Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum WindowMoveResizeMask where
    fromEnum WindowMoveResizeMaskX = 1
    fromEnum WindowMoveResizeMaskY = 2
    fromEnum WindowMoveResizeMaskWidth = 4
    fromEnum WindowMoveResizeMaskHeight = 8
    fromEnum (AnotherWindowMoveResizeMask k) = k

    toEnum 1 = WindowMoveResizeMaskX
    toEnum 2 = WindowMoveResizeMaskY
    toEnum 4 = WindowMoveResizeMaskWidth
    toEnum 8 = WindowMoveResizeMaskHeight
    toEnum k = AnotherWindowMoveResizeMask k

instance P.Ord WindowMoveResizeMask where
    compare a b = P.compare (P.fromEnum a) (P.fromEnum b)

foreign import ccall "wnck_window_move_resize_mask_get_type" c_wnck_window_move_resize_mask_get_type ::
    IO GType

instance BoxedFlags WindowMoveResizeMask where
    boxedFlagsType _ = c_wnck_window_move_resize_mask_get_type

instance IsGFlag WindowMoveResizeMask

-- Flags WindowActions
{- |
Type used as a bitmask to describe the actions that can be done for a
'GI.Wnck.Objects.Window.Window'.
-}
data WindowActions =
      WindowActionsMove
    {- ^
    the window may be moved around the screen.
    -}
    | WindowActionsResize
    {- ^
    the window may be resized.
    -}
    | WindowActionsShade
    {- ^
    the window may be shaded.
    -}
    | WindowActionsStick
    {- ^
    the window may be sticked.
    -}
    | WindowActionsMaximizeHorizontally
    {- ^
    the window may be maximized
    horizontally.
    -}
    | WindowActionsMaximizeVertically
    {- ^
    the window may be maximized
    vertically.
    -}
    | WindowActionsChangeWorkspace
    {- ^
    the window may be moved between
    workspaces, or (un)pinned.
    -}
    | WindowActionsClose
    {- ^
    the window may be closed.
    -}
    | WindowActionsUnmaximizeHorizontally
    {- ^
    the window may be unmaximized
    horizontally.
    -}
    | WindowActionsUnmaximizeVertically
    {- ^
    the window may be maximized
    vertically.
    -}
    | WindowActionsUnshade
    {- ^
    the window may be unshaded.
    -}
    | WindowActionsUnstick
    {- ^
    the window may be unsticked.
    -}
    | WindowActionsMinimize
    {- ^
    the window may be minimized.
    -}
    | WindowActionsUnminimize
    {- ^
    the window may be unminimized.
    -}
    | WindowActionsMaximize
    {- ^
    the window may be maximized.
    -}
    | WindowActionsUnmaximize
    {- ^
    the window may be unmaximized.
    -}
    | WindowActionsFullscreen
    {- ^
    the window may be brought to fullscreen.
    -}
    | WindowActionsAbove
    {- ^
    the window may be made above other windows.
    -}
    | WindowActionsBelow
    {- ^
    the window may be made below other windows.
    -}
    | AnotherWindowActions Int
    -- ^ Catch-all for unknown values
    deriving (Show, Eq)

instance P.Enum WindowActions where
    fromEnum WindowActionsMove = 1
    fromEnum WindowActionsResize = 2
    fromEnum WindowActionsShade = 4
    fromEnum WindowActionsStick = 8
    fromEnum WindowActionsMaximizeHorizontally = 16
    fromEnum WindowActionsMaximizeVertically = 32
    fromEnum WindowActionsChangeWorkspace = 64
    fromEnum WindowActionsClose = 128
    fromEnum WindowActionsUnmaximizeHorizontally = 256
    fromEnum WindowActionsUnmaximizeVertically = 512
    fromEnum WindowActionsUnshade = 1024
    fromEnum WindowActionsUnstick = 2048
    fromEnum WindowActionsMinimize = 4096
    fromEnum WindowActionsUnminimize = 8192
    fromEnum WindowActionsMaximize = 16384
    fromEnum WindowActionsUnmaximize = 32768
    fromEnum WindowActionsFullscreen = 65536
    fromEnum WindowActionsAbove = 131072
    fromEnum WindowActionsBelow = 262144
    fromEnum (AnotherWindowActions k) = k

    toEnum 1 = WindowActionsMove
    toEnum 2 = WindowActionsResize
    toEnum 4 = WindowActionsShade
    toEnum 8 = WindowActionsStick
    toEnum 16 = WindowActionsMaximizeHorizontally
    toEnum 32 = WindowActionsMaximizeVertically
    toEnum 64 = WindowActionsChangeWorkspace
    toEnum 128 = WindowActionsClose
    toEnum 256 = WindowActionsUnmaximizeHorizontally
    toEnum 512 = WindowActionsUnmaximizeVertically
    toEnum 1024 = WindowActionsUnshade
    toEnum 2048 = WindowActionsUnstick
    toEnum 4096 = WindowActionsMinimize
    toEnum 8192 = WindowActionsUnminimize
    toEnum 16384 = WindowActionsMaximize
    toEnum 32768 = WindowActionsUnmaximize
    toEnum 65536 = WindowActionsFullscreen
    toEnum 131072 = WindowActionsAbove
    toEnum 262144 = WindowActionsBelow
    toEnum k = AnotherWindowActions k

instance P.Ord WindowActions where
    compare a b = P.compare (P.fromEnum a) (P.fromEnum b)

foreign import ccall "wnck_window_actions_get_type" c_wnck_window_actions_get_type ::
    IO GType

instance BoxedFlags WindowActions where
    boxedFlagsType _ = c_wnck_window_actions_get_type

instance IsGFlag WindowActions