gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Gdk.DrawWindow

Contents

- Class Hierarchy
- Types
- Methods

Description

A `DrawWindow` is a rectangular region on the screen.

Synopsis

- data DrawWindow
- class GObjectClass o => DrawWindowClass o
- castToDrawWindow :: GObjectClass obj => obj -> DrawWindow
- gTypeDrawWindow :: GType
- data WindowState
  - = WindowStateWithdrawn
  - | WindowStateIconified
  - | WindowStateMaximized
  - | WindowStateSticky
  - | WindowStateFullscreen
  - | WindowStateAbove
  - | WindowStateBelow
  - | WindowStateFocused
  - | WindowStateTiled
  - | WindowStateTopTiled
  - | WindowStateTopResizable
  - | WindowStateRightTiled
  - | WindowStateRightResizable
  - | WindowStateBottomTiled
  - | WindowStateBottomResizable
  - | WindowStateLeftTiled
  - | WindowStateLeftResizable
- data NativeWindowId
- toNativeWindowId :: Integral a => a -> NativeWindowId
- fromNativeWindowId :: Integral a => NativeWindowId -> a
- drawWindowGetState :: DrawWindowClass self => self -> IO [WindowState]
- drawWindowScroll :: DrawWindowClass self => self -> Int -> Int -> IO ()
- drawWindowRaise :: DrawWindowClass self => self -> IO ()
- drawWindowLower :: DrawWindowClass self => self -> IO ()
- drawWindowRegisterDnd :: DrawWindowClass self => self -> IO ()
- drawWindowBeginPaintRect :: DrawWindowClass self => self -> Rectangle -> IO ()
- drawWindowEndPaint :: DrawWindowClass self => self -> IO ()
- drawWindowInvalidateRect :: DrawWindowClass self => self -> Rectangle -> Bool -> IO ()
- drawWindowFreezeUpdates :: DrawWindowClass self => self -> IO ()
- drawWindowThawUpdates :: DrawWindowClass self => self -> IO ()
- drawWindowProcessUpdates :: DrawWindowClass self => self -> Bool -> IO ()
- drawWindowSetAcceptFocus :: DrawWindowClass self => self -> Bool -> IO ()
- drawWindowSetChildShapes :: DrawWindowClass self => self -> IO ()
- drawWindowMergeChildShapes :: DrawWindowClass self => self -> IO ()
- drawWindowGetPointer :: DrawWindowClass self => self -> IO (Maybe (Bool, Int, Int, [Modifier]))
- drawWindowGetPointerPos :: DrawWindowClass self => self -> IO (Maybe DrawWindow, Int, Int, [Modifier])
- drawWindowGetOrigin :: DrawWindow -> IO (Int, Int)
- drawWindowSetCursor :: DrawWindow -> Maybe Cursor -> IO ()
- drawWindowGetDefaultRootWindow :: IO DrawWindow
- drawWindowGetWidth :: DrawWindow -> IO Int
- drawWindowGetHeight :: DrawWindow -> IO Int

# Class Hierarchy

    | GObject
    | +----Drawable
    | +----DrawWindow

# Types

data DrawWindow Source #

#### Instances

Instances details

Eq DrawWindow Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: DrawWindow -> DrawWindow -> Bool Source # (/=) :: DrawWindow -> DrawWindow -> Bool Source #
Ord DrawWindow Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: DrawWindow -> DrawWindow -> Ordering Source #

(<) :: DrawWindow -> DrawWindow -> Bool Source #

(<=) :: DrawWindow -> DrawWindow -> Bool Source #

(>) :: DrawWindow -> DrawWindow -> Bool Source #

(>=) :: DrawWindow -> DrawWindow -> Bool Source #

max :: DrawWindow -> DrawWindow -> DrawWindow Source #

min :: DrawWindow -> DrawWindow -> DrawWindow Source #

GObjectClass DrawWindow Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: DrawWindow -> GObject Source # unsafeCastGObject :: GObject -> DrawWindow Source #
DrawWindowClass DrawWindow Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class GObjectClass o => DrawWindowClass o Source #

#### Instances

Instances details

DrawWindowClass DrawWindow Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToDrawWindow :: GObjectClass obj => obj -> DrawWindow Source #

gTypeDrawWindow :: GType Source #

data WindowState Source #

The state a `DrawWindow` is in.

Constructors

WindowStateWithdrawn |
WindowStateIconified |
WindowStateMaximized |
WindowStateSticky |
WindowStateFullscreen |
WindowStateAbove |
WindowStateBelow |
WindowStateFocused |
WindowStateTiled |
WindowStateTopTiled |
WindowStateTopResizable |
WindowStateRightTiled |
WindowStateRightResizable |
WindowStateBottomTiled |
WindowStateBottomResizable |
WindowStateLeftTiled |
WindowStateLeftResizable |

#### Instances

Instances details

Bounded WindowState Source # |
Instance details Defined in Graphics.UI.Gtk.Gdk.Enums Methods minBound :: WindowState Source # maxBound :: WindowState Source #
Enum WindowState Source # | Defines the reference point of a window and the meaning of coordinates passed to `windowMove`. See `windowMove` and the "implementation notes" section of the extended window manager hints specification for more details.

Instance details

Defined in Graphics.UI.Gtk.Gdk.Enums

Methods

succ :: WindowState -> WindowState Source #

pred :: WindowState -> WindowState Source #

toEnum :: Int -> WindowState Source #

fromEnum :: WindowState -> Int Source #

enumFrom :: WindowState -> [WindowState] Source #

enumFromThen :: WindowState -> WindowState -> [WindowState] Source #

enumFromTo :: WindowState -> WindowState -> [WindowState] Source #

enumFromThenTo :: WindowState -> WindowState -> WindowState -> [WindowState] Source #

Show WindowState Source # |
Instance details Defined in Graphics.UI.Gtk.Gdk.Enums Methods showsPrec :: Int -> WindowState -> ShowS Source # show :: WindowState -> String Source # showList :: [WindowState] -> ShowS Source #
Eq WindowState Source # |
Instance details Defined in Graphics.UI.Gtk.Gdk.Enums Methods (==) :: WindowState -> WindowState -> Bool Source # (/=) :: WindowState -> WindowState -> Bool Source #
Flags WindowState Source # |
Instance details Defined in Graphics.UI.Gtk.Gdk.Enums

data NativeWindowId Source #

The identifier of a window of the underlying windowing system.

#### Instances

Instances details

Show NativeWindowId Source # |
Instance details Defined in Graphics.UI.Gtk.General.Structs Methods showsPrec :: Int -> NativeWindowId -> ShowS Source # show :: NativeWindowId -> String Source # showList :: [NativeWindowId] -> ShowS Source #
Eq NativeWindowId Source # |
Instance details Defined in Graphics.UI.Gtk.General.Structs Methods (==) :: NativeWindowId -> NativeWindowId -> Bool Source # (/=) :: NativeWindowId -> NativeWindowId -> Bool Source #

toNativeWindowId :: Integral a => a -> NativeWindowId Source #

fromNativeWindowId :: Integral a => NativeWindowId -> a Source #

# Methods

drawWindowGetState Source #

Arguments

:: DrawWindowClass self |
=> self |
-> IO [WindowState] | returns `DrawWindow` flags

Gets the bitwise OR of the currently active drawWindow state flags, from the `WindowState` enumeration.

drawWindowScroll Source #

Arguments

:: DrawWindowClass self |
=> self |
-> Int | `dx` - Amount to scroll in the X direction
-> Int | `dy` - Amount to scroll in the Y direction
-> IO () |

Scroll the contents of `DrawWindow`.

- Scroll both, pixels and children, by the given amount. `DrawWindow` itself does not move. Portions of the window that the scroll operation brings inm from offscreen areas are invalidated. The invalidated region may be bigger than what would strictly be necessary. (For X11, a minimum area will be invalidated if the window has no subwindows, or if the edges of the window's parent do not extend beyond the edges of the drawWindow. In other cases, a multi-step process is used to scroll the window which may produce temporary visual artifacts and unnecessary invalidations.)

drawWindowRaise :: DrawWindowClass self => self -> IO () Source #

Raises `DrawWindow` to the top of the Z-order (stacking order), so that other drawWindows with the same parent drawWindow appear below `DrawWindow`. This is true whether or not the drawWindows are visible.

If `DrawWindow` is a toplevel, the window manager may choose to deny the request to move the drawWindow in the Z-order, `drawWindowRaise` only requests the restack, does not guarantee it.

drawWindowLower :: DrawWindowClass self => self -> IO () Source #

Lowers `DrawWindow` to the bottom of the Z-order (stacking order), so that other windows with the same parent window appear above `DrawWindow`. This is true whether or not the other windows are visible.

If `DrawWindow` is a toplevel, the window manager may choose to deny the request to move the drawWindow in the Z-order, `drawWindowLower` only requests the restack, does not guarantee it.

Note that a widget is raised automatically when it is mapped, thus you need to call `drawWindowLower` after `widgetShow` if the window should not appear above other windows.

drawWindowRegisterDnd :: DrawWindowClass self => self -> IO () Source #

Registers a drawWindow as a potential drop destination.

drawWindowBeginPaintRect Source #

Arguments

:: DrawWindowClass self |
=> self |
-> Rectangle | `rectangle` - rectangle you intend to draw to
-> IO () |

A convenience wrapper around `drawWindowBeginPaintRegion` which creates a rectangular region for you.

- See `drawWindowBeginPaintRegion` for details.

drawWindowEndPaint :: DrawWindowClass self => self -> IO () Source #

Signal that drawing has finished.

- Indicates that the backing store created by the most recent call to `drawWindowBeginPaintRegion` should be copied onscreen and deleted, leaving the next-most-recent backing store or no backing store at all as the active paint region. See `drawWindowBeginPaintRegion` for full details. It is an error to call this function without a matching `drawWindowBeginPaintRegion` first.

drawWindowInvalidateRect Source #

Arguments

:: DrawWindowClass self |
=> self |
-> Rectangle | `rect` - rectangle to invalidate
-> Bool | `invalidateChildren` - whether to also invalidate child drawWindows
-> IO () |

A convenience wrapper around `drawWindowInvalidateRegion` which invalidates a rectangular region. See `drawWindowInvalidateRegion` for details.

drawWindowFreezeUpdates :: DrawWindowClass self => self -> IO () Source #

Temporarily freezes a drawWindow such that it won't receive expose events. * The drawWindow will begin receiving expose events again when `drawWindowThawUpdates` is called. If `drawWindowFreezeUpdates` has been called more than once, `drawWindowThawUpdates` must be called an equal number of times to begin processing exposes.

drawWindowThawUpdates :: DrawWindowClass self => self -> IO () Source #

Thaws a drawWindow frozen with `drawWindowFreezeUpdates`.

drawWindowProcessUpdates Source #

Arguments

:: DrawWindowClass self |
=> self |
-> Bool | `updateChildren` - whether to also process updates for child drawWindows
-> IO () |

Sends one or more expose events to `DrawWindow`.

- The areas in each expose event will cover the entire update area for the window (see `drawWindowInvalidateRegion` for details). Normally Gtk calls `drawWindowProcessUpdates` on your behalf, so there's no need to call this function unless you want to force expose events to be delivered immediately and synchronously (vs. the usual case, where Gtk delivers them in an idle handler). Occasionally this is useful to produce nicer scrolling behavior, for example.

drawWindowSetAcceptFocus Source #

Arguments

:: DrawWindowClass self |
=> self |
-> Bool | `acceptFocus` - `True` if the drawWindow should receive input focus
-> IO () |

Setting `acceptFocus` to `False` hints the desktop environment that the window doesn't want to receive input focus.

On X, it is the responsibility of the drawWindow manager to interpret this hint. ICCCM-compliant drawWindow manager usually respect it.

- Available since Gdk version 2.4

drawWindowSetChildShapes :: DrawWindowClass self => self -> IO () Source #

Sets the shape mask of `DrawWindow` to the union of shape masks for all children of `DrawWindow`, ignoring the shape mask of `DrawWindow` itself. Contrast with `drawWindowMergeChildShapes` which includes the shape mask of `DrawWindow` in the masks to be merged.

drawWindowMergeChildShapes :: DrawWindowClass self => self -> IO () Source #

Merges the shape masks for any child drawWindows into the shape mask for `DrawWindow`. i.e. the union of all masks for `DrawWindow` and its children will become the new mask for `DrawWindow`. See `drawWindowShapeCombineMask`.

This function is distinct from `drawWindowSetChildShapes` because it includes `DrawWindow`'s shape mask in the set of shapes to be merged.

drawWindowGetPointer :: DrawWindowClass self => self -> IO (Maybe (Bool, Int, Int, [Modifier])) Source #

drawWindowGetPointerPos :: DrawWindowClass self => self -> IO (Maybe DrawWindow, Int, Int, [Modifier]) Source #

Obtains the current pointer position and modifier state.

- The position is given in coordinates relative to the given window.
- The return value is `(Just win, x, y, mod)` where `win` is the window over which the mouse currently resides and `mod` denotes the keyboard modifiers currently being depressed.
- The return value is `Nothing` for the window if the mouse cursor is not over a known window.

drawWindowGetOrigin Source #

Arguments

:: DrawWindow |

-> IO (Int, Int)

    (x, y)

Obtains the position of a window in screen coordinates.

You can use this to help convert a position between screen coordinates and local `DrawWindow` relative coordinates.

drawWindowSetCursor :: DrawWindow -> Maybe Cursor -> IO () Source #

Sets the mouse pointer for a `DrawWindow`.

Use `cursorNewForDisplay` or `cursorNewFromPixmap` to create the cursor. To make the cursor invisible, use `BlankCursor`. Passing `Nothing` means that the `DrawWindow` will use the cursor of its parent `DrawWindow`. Most `DrawWindow` should use this default.

drawWindowGetDefaultRootWindow Source #

Arguments

:: IO DrawWindow | returns the default root window

Obtains the root window (parent all other windows are inside) for the default display and screen.

drawWindowGetWidth :: DrawWindow -> IO Int Source #

Returns the width of the window.

On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server.

drawWindowGetHeight :: DrawWindow -> IO Int Source #

Returns the height of the window.

On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server.