Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- Overloaded methods
- close
- destroy
- fullscreen
- fullscreenOnMonitor
- getApplication
- getChild
- getDecorated
- getDefaultIconName
- getDefaultSize
- getDefaultWidget
- getDeletable
- getDestroyWithParent
- getFocus
- getFocusVisible
- getGroup
- getHideOnClose
- getIconName
- getMnemonicsVisible
- getModal
- getResizable
- getSize
- getTitle
- getTitlebar
- getToplevels
- getTransientFor
- hasGroup
- isActive
- isMaximized
- listToplevels
- maximize
- minimize
- new
- present
- presentWithTime
- resize
- setApplication
- setAutoStartupNotification
- setChild
- setDecorated
- setDefaultIconName
- setDefaultSize
- setDefaultWidget
- setDeletable
- setDestroyWithParent
- setDisplay
- setFocus
- setFocusVisible
- setHideOnClose
- setIconName
- setInteractiveDebugging
- setMnemonicsVisible
- setModal
- setResizable
- setStartupId
- setTitle
- setTitlebar
- setTransientFor
- unfullscreen
- unmaximize
- unminimize
- Properties
- Signals
A GtkWindow is a toplevel window which can contain other widgets. Windows normally have decorations that are under the control of the windowing system and allow the user to manipulate the window (resize it, move it, close it,...).
GtkWindow as GtkBuildable
The GtkWindow implementation of the Buildable
interface supports a
custom <accel-groups> element, which supports any number of <group>
elements representing the GtkAccelGroup
objects you want to add to
your window (synonymous with gtk_window_add_accel_group()
.
An example of a UI definition fragment with accel groups: > >class="GtkWindow" > accel-groups > name="accelgroup1"/ > /accel-groups >/object > >... > >class="GtkAccelGroup" id="accelgroup1"/
The GtkWindow implementation of the Buildable
interface supports
setting a child as the titlebar by specifying “titlebar” as the “type”
attribute of a <child> element.
CSS nodes
plain code
window.background ├── decoration ├── <titlebar child>.titlebar [.default-decoration] ╰── <child>
GtkWindow has a main CSS node with name window and style class .background, and a subnode with name decoration.
Style classes that are typically used with the main CSS node are .csd (when client-side decorations are in use), .solid-csd (for client-side decorations without invisible borders), .ssd (used by mutter when rendering server-side decorations). GtkWindow also represents window states with the following style classes on the main node: .tiled, .maximized, .fullscreen. Specialized types of window often add their own discriminating style classes, such as .popup or .tooltip.
GtkWindow adds the .titlebar and .default-decoration style classes to the widget that is added as a titlebar child.
Synopsis
- newtype Window = Window (ManagedPtr Window)
- class (GObject o, IsDescendantOf Window o) => IsWindow o
- toWindow :: (MonadIO m, IsWindow o) => o -> m Window
- windowClose :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowDestroy :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowFullscreen :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowFullscreenOnMonitor :: (HasCallStack, MonadIO m, IsWindow a, IsMonitor b) => a -> b -> m ()
- windowGetApplication :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Application)
- windowGetChild :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Widget)
- windowGetDecorated :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetDefaultIconName :: (HasCallStack, MonadIO m) => m Text
- windowGetDefaultSize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Int32, Int32)
- windowGetDefaultWidget :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Widget)
- windowGetDeletable :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetDestroyWithParent :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetFocus :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Widget)
- windowGetFocusVisible :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetGroup :: (HasCallStack, MonadIO m, IsWindow a) => a -> m WindowGroup
- windowGetHideOnClose :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetIconName :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Text)
- windowGetMnemonicsVisible :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetModal :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetResizable :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetSize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Int32, Int32)
- windowGetTitle :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Text)
- windowGetTitlebar :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Widget)
- windowGetToplevels :: (HasCallStack, MonadIO m) => m ListModel
- windowGetTransientFor :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Window)
- windowHasGroup :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowIsActive :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowIsMaximized :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowListToplevels :: (HasCallStack, MonadIO m) => m [Widget]
- windowMaximize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowMinimize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowNew :: (HasCallStack, MonadIO m) => m Window
- windowPresent :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowPresentWithTime :: (HasCallStack, MonadIO m, IsWindow a) => a -> Word32 -> m ()
- windowResize :: (HasCallStack, MonadIO m, IsWindow a) => a -> Int32 -> Int32 -> m ()
- windowSetApplication :: (HasCallStack, MonadIO m, IsWindow a, IsApplication b) => a -> Maybe b -> m ()
- windowSetAutoStartupNotification :: (HasCallStack, MonadIO m) => Bool -> m ()
- windowSetChild :: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) => a -> Maybe b -> m ()
- windowSetDecorated :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetDefaultIconName :: (HasCallStack, MonadIO m) => Text -> m ()
- windowSetDefaultSize :: (HasCallStack, MonadIO m, IsWindow a) => a -> Int32 -> Int32 -> m ()
- windowSetDefaultWidget :: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) => a -> Maybe b -> m ()
- windowSetDeletable :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetDestroyWithParent :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetDisplay :: (HasCallStack, MonadIO m, IsWindow a, IsDisplay b) => a -> b -> m ()
- windowSetFocus :: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) => a -> Maybe b -> m ()
- windowSetFocusVisible :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetHideOnClose :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetIconName :: (HasCallStack, MonadIO m, IsWindow a) => a -> Maybe Text -> m ()
- windowSetInteractiveDebugging :: (HasCallStack, MonadIO m) => Bool -> m ()
- windowSetMnemonicsVisible :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetModal :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetResizable :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetStartupId :: (HasCallStack, MonadIO m, IsWindow a) => a -> Text -> m ()
- windowSetTitle :: (HasCallStack, MonadIO m, IsWindow a) => a -> Text -> m ()
- windowSetTitlebar :: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) => a -> Maybe b -> m ()
- windowSetTransientFor :: (HasCallStack, MonadIO m, IsWindow a, IsWindow b) => a -> Maybe b -> m ()
- windowUnfullscreen :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowUnmaximize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowUnminimize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- clearWindowApplication :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowApplication :: (IsWindow o, MonadIO m, IsApplication a) => a -> m (GValueConstruct o)
- getWindowApplication :: (MonadIO m, IsWindow o) => o -> m (Maybe Application)
- setWindowApplication :: (MonadIO m, IsWindow o, IsApplication a) => o -> a -> m ()
- clearWindowChild :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowChild :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getWindowChild :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget)
- setWindowChild :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m ()
- constructWindowDecorated :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowDecorated :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowDecorated :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowDefaultHeight :: (IsWindow o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWindowDefaultHeight :: (MonadIO m, IsWindow o) => o -> m Int32
- setWindowDefaultHeight :: (MonadIO m, IsWindow o) => o -> Int32 -> m ()
- clearWindowDefaultWidget :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowDefaultWidget :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getWindowDefaultWidget :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget)
- setWindowDefaultWidget :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m ()
- constructWindowDefaultWidth :: (IsWindow o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWindowDefaultWidth :: (MonadIO m, IsWindow o) => o -> m Int32
- setWindowDefaultWidth :: (MonadIO m, IsWindow o) => o -> Int32 -> m ()
- constructWindowDeletable :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowDeletable :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowDeletable :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowDestroyWithParent :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowDestroyWithParent :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowDestroyWithParent :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowDisplay :: (IsWindow o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o)
- getWindowDisplay :: (MonadIO m, IsWindow o) => o -> m (Maybe Display)
- setWindowDisplay :: (MonadIO m, IsWindow o, IsDisplay a) => o -> a -> m ()
- constructWindowFocusVisible :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowFocusVisible :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowFocusVisible :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- clearWindowFocusWidget :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowFocusWidget :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getWindowFocusWidget :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget)
- setWindowFocusWidget :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m ()
- constructWindowHideOnClose :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowHideOnClose :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowHideOnClose :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- clearWindowIconName :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowIconName :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o)
- getWindowIconName :: (MonadIO m, IsWindow o) => o -> m (Maybe Text)
- setWindowIconName :: (MonadIO m, IsWindow o) => o -> Text -> m ()
- getWindowIsActive :: (MonadIO m, IsWindow o) => o -> m Bool
- getWindowIsMaximized :: (MonadIO m, IsWindow o) => o -> m Bool
- constructWindowMnemonicsVisible :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowMnemonicsVisible :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowMnemonicsVisible :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowModal :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowModal :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowModal :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowResizable :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowResizable :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowResizable :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowStartupId :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o)
- setWindowStartupId :: (MonadIO m, IsWindow o) => o -> Text -> m ()
- constructWindowTitle :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o)
- getWindowTitle :: (MonadIO m, IsWindow o) => o -> m (Maybe Text)
- setWindowTitle :: (MonadIO m, IsWindow o) => o -> Text -> m ()
- clearWindowTransientFor :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowTransientFor :: (IsWindow o, MonadIO m, IsWindow a) => a -> m (GValueConstruct o)
- getWindowTransientFor :: (MonadIO m, IsWindow o) => o -> m (Maybe Window)
- setWindowTransientFor :: (MonadIO m, IsWindow o, IsWindow a) => o -> a -> m ()
- type C_WindowActivateDefaultCallback = Ptr () -> Ptr () -> IO ()
- type WindowActivateDefaultCallback = IO ()
- afterWindowActivateDefault :: (IsWindow a, MonadIO m) => a -> WindowActivateDefaultCallback -> m SignalHandlerId
- genClosure_WindowActivateDefault :: MonadIO m => WindowActivateDefaultCallback -> m (GClosure C_WindowActivateDefaultCallback)
- mk_WindowActivateDefaultCallback :: C_WindowActivateDefaultCallback -> IO (FunPtr C_WindowActivateDefaultCallback)
- noWindowActivateDefaultCallback :: Maybe WindowActivateDefaultCallback
- onWindowActivateDefault :: (IsWindow a, MonadIO m) => a -> WindowActivateDefaultCallback -> m SignalHandlerId
- wrap_WindowActivateDefaultCallback :: WindowActivateDefaultCallback -> C_WindowActivateDefaultCallback
- type C_WindowActivateFocusCallback = Ptr () -> Ptr () -> IO ()
- type WindowActivateFocusCallback = IO ()
- afterWindowActivateFocus :: (IsWindow a, MonadIO m) => a -> WindowActivateFocusCallback -> m SignalHandlerId
- genClosure_WindowActivateFocus :: MonadIO m => WindowActivateFocusCallback -> m (GClosure C_WindowActivateFocusCallback)
- mk_WindowActivateFocusCallback :: C_WindowActivateFocusCallback -> IO (FunPtr C_WindowActivateFocusCallback)
- noWindowActivateFocusCallback :: Maybe WindowActivateFocusCallback
- onWindowActivateFocus :: (IsWindow a, MonadIO m) => a -> WindowActivateFocusCallback -> m SignalHandlerId
- wrap_WindowActivateFocusCallback :: WindowActivateFocusCallback -> C_WindowActivateFocusCallback
- type C_WindowCloseRequestCallback = Ptr () -> Ptr () -> IO CInt
- type WindowCloseRequestCallback = IO Bool
- afterWindowCloseRequest :: (IsWindow a, MonadIO m) => a -> WindowCloseRequestCallback -> m SignalHandlerId
- genClosure_WindowCloseRequest :: MonadIO m => WindowCloseRequestCallback -> m (GClosure C_WindowCloseRequestCallback)
- mk_WindowCloseRequestCallback :: C_WindowCloseRequestCallback -> IO (FunPtr C_WindowCloseRequestCallback)
- noWindowCloseRequestCallback :: Maybe WindowCloseRequestCallback
- onWindowCloseRequest :: (IsWindow a, MonadIO m) => a -> WindowCloseRequestCallback -> m SignalHandlerId
- wrap_WindowCloseRequestCallback :: WindowCloseRequestCallback -> C_WindowCloseRequestCallback
- type C_WindowEnableDebuggingCallback = Ptr () -> CInt -> Ptr () -> IO CInt
- type WindowEnableDebuggingCallback = Bool -> IO Bool
- afterWindowEnableDebugging :: (IsWindow a, MonadIO m) => a -> WindowEnableDebuggingCallback -> m SignalHandlerId
- genClosure_WindowEnableDebugging :: MonadIO m => WindowEnableDebuggingCallback -> m (GClosure C_WindowEnableDebuggingCallback)
- mk_WindowEnableDebuggingCallback :: C_WindowEnableDebuggingCallback -> IO (FunPtr C_WindowEnableDebuggingCallback)
- noWindowEnableDebuggingCallback :: Maybe WindowEnableDebuggingCallback
- onWindowEnableDebugging :: (IsWindow a, MonadIO m) => a -> WindowEnableDebuggingCallback -> m SignalHandlerId
- wrap_WindowEnableDebuggingCallback :: WindowEnableDebuggingCallback -> C_WindowEnableDebuggingCallback
- type C_WindowKeysChangedCallback = Ptr () -> Ptr () -> IO ()
- type WindowKeysChangedCallback = IO ()
- afterWindowKeysChanged :: (IsWindow a, MonadIO m) => a -> WindowKeysChangedCallback -> m SignalHandlerId
- genClosure_WindowKeysChanged :: MonadIO m => WindowKeysChangedCallback -> m (GClosure C_WindowKeysChangedCallback)
- mk_WindowKeysChangedCallback :: C_WindowKeysChangedCallback -> IO (FunPtr C_WindowKeysChangedCallback)
- noWindowKeysChangedCallback :: Maybe WindowKeysChangedCallback
- onWindowKeysChanged :: (IsWindow a, MonadIO m) => a -> WindowKeysChangedCallback -> m SignalHandlerId
- wrap_WindowKeysChangedCallback :: WindowKeysChangedCallback -> C_WindowKeysChangedCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Window Source # | |
IsGValue Window Source # | Convert |
ManagedPtrNewtype Window Source # | |
Defined in GI.Gtk.Objects.Window toManagedPtr :: Window -> ManagedPtr Window # | |
TypedObject Window Source # | |
Defined in GI.Gtk.Objects.Window | |
GObject Window Source # | |
Defined in GI.Gtk.Objects.Window | |
HasParentTypes Window Source # | |
Defined in GI.Gtk.Objects.Window | |
type ParentTypes Window Source # | |
Defined in GI.Gtk.Objects.Window type ParentTypes Window = '[Widget, Object, ImplementorIface, Buildable, ConstraintTarget, Native, Root, ShortcutManager] |
class (GObject o, IsDescendantOf Window o) => IsWindow o Source #
Instances
(GObject o, IsDescendantOf Window o) => IsWindow o Source # | |
Defined in GI.Gtk.Objects.Window |
Methods
Overloaded methods
close
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m () |
Requests that the window is closed, similar to what happens when a window manager close button is clicked.
This function can be used with close buttons in custom titlebars.
destroy
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m () |
Drop the internal reference GTK holds on toplevel windows.
fullscreen
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m () |
Asks to place window
in the fullscreen state. Note that you
shouldn’t assume the window is definitely full screen afterward,
because other entities (e.g. the user or
[window manager][gtk-X11-arch]) could unfullscreen it
again, and not all window managers honor requests to fullscreen
windows. But normally the window will end up fullscreen. Just
don’t write code that crashes if not.
You can track iconification via the Toplevel
:state
property
fullscreenOnMonitor
windowFullscreenOnMonitor Source #
:: (HasCallStack, MonadIO m, IsWindow a, IsMonitor b) | |
=> a |
|
-> b |
|
-> m () |
Asks to place window
in the fullscreen state. Note that you shouldn't assume
the window is definitely full screen afterward.
You can track iconification via the Toplevel
:state
property
getApplication
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Application) | Returns: a |
Gets the Application
associated with the window (if any).
getChild
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the child widget of |
Gets the child widget of window
.
getDecorated
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the window has been set to have decorations
such as a title bar via windowSetDecorated
.
getDefaultIconName
windowGetDefaultIconName Source #
:: (HasCallStack, MonadIO m) | |
=> m Text | Returns: the fallback icon name for windows |
Returns the fallback icon name for windows that has been set
with windowSetDefaultIconName
. The returned
string is owned by GTK+ and should not be modified. It
is only valid until the next call to
windowSetDefaultIconName
.
getDefaultSize
Gets the default size of the window. A value of -1 for the width or height indicates that a default size has not been explicitly set for that dimension, so the “natural” size of the window will be used.
getDefaultWidget
windowGetDefaultWidget Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the default widget, or |
Returns the default widget for window
. See
gtk_window_set_default()
for more details.
getDeletable
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the window has been set to have a close button
via windowSetDeletable
.
getDestroyWithParent
windowGetDestroyWithParent Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the window will be destroyed with its transient parent. See gtk_window_set_destroy_with_parent ().
getFocus
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the currently focused widget,
or |
Retrieves the current focused widget within the window.
Note that this is the widget that would have the focus
if the toplevel window focused; if the toplevel window
is not focused then gtk_widget_has_focus (widget)
will
not be True
for the widget.
getFocusVisible
windowGetFocusVisible Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Gets the value of the Window
:focus-visible
property.
getGroup
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a | |
-> m WindowGroup | Returns: the |
Returns the group for window
or the default group, if
window
is Nothing
or if window
does not have an explicit
window group.
getHideOnClose
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the window will be hidden when the close button is clicked.
getIconName
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Text) | Returns: the icon name or |
Returns the name of the themed icon for the window,
see windowSetIconName
.
getMnemonicsVisible
windowGetMnemonicsVisible Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Gets the value of the Window
:mnemonics-visible
property.
getModal
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the window is modal. See windowSetModal
.
getResizable
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Gets the value set by windowSetResizable
.
getSize
Obtains the current size of window
.
If window
is not visible on screen, this function return the size GTK+
will suggest to the [window manager][gtk-X11-arch] for the initial window
size (but this is not reliably the same as the size the window manager
will actually select). See: windowSetDefaultSize
.
Depending on the windowing system and the window manager constraints,
the size returned by this function may not match the size set using
windowResize
; additionally, since windowResize
may be
implemented as an asynchronous operation, GTK+ cannot guarantee in any
way that this code:
C code
GtkWindow *window = GTK_WINDOW (gtk_window_new ()); int width = 500; int height = 300; gtk_window_resize (window, width, height); int new_width, new_height; gtk_window_get_size (window, &new_width, &new_height);
will result in new_width
and new_height
matching width
and
height
, respectively.
This function will return the logical size of the Window
,
excluding the widgets used in client side decorations; there is,
however, no guarantee that the result will be completely accurate
because client side decoration may include widgets that depend on
the user preferences and that may not be visibile at the time you
call this function.
The dimensions returned by this function are suitable for being
stored across sessions; use windowSetDefaultSize
to
restore them when before showing the window.
C code
static void on_size_allocate (GtkWidget *widget, const GtkAllocation *allocation, int baseline) { int new_width, new_height; gtk_window_get_size (GTK_WINDOW (widget), &new_width, &new_height); // ... }
If you are getting a window size in order to position the window
on the screen, you should, instead, simply set the window’s semantic
type with gtk_window_set_type_hint()
, which allows the window manager
to e.g. center dialogs. Also, if you set the transient parent of
dialogs with windowSetTransientFor
window managers will
often center the dialog over its parent window. It's much preferred
to let the window manager handle these cases rather than doing it
yourself, because all apps will behave consistently and according to
user or system preferences, if the window manager handles it. Also,
the window manager can take into account the size of the window
decorations and border that it may add, and of which GTK+ has no
knowledge. Additionally, positioning windows in global screen coordinates
may not be allowed by the windowing system. For more information,
see: gtk_window_set_position()
.
getTitle
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Text) | Returns: the title of the window, or |
Retrieves the title of the window. See windowSetTitle
.
getTitlebar
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the custom titlebar, or |
Returns the custom titlebar that has been set with
windowSetTitlebar
.
getToplevels
:: (HasCallStack, MonadIO m) | |
=> m ListModel | Returns: the list of toplevel widgets |
Returns a list of all existing toplevel windows.
If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets or add new ones, be aware that the list of toplevels will change and emit the "items-changed" signal.
getTransientFor
windowGetTransientFor Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Window) | Returns: the transient parent for this
window, or |
Fetches the transient parent for this window. See
windowSetTransientFor
.
hasGroup
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether window
has an explicit window group.
isActive
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the window is part of the current active toplevel.
(That is, the toplevel window receiving keystrokes.)
The return value is True
if the window is active toplevel itself.
You might use this function if you wanted to draw a widget
differently in an active window from a widget in an inactive window.
isMaximized
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m Bool | Returns: whether the window has a maximized state. |
Retrieves the current maximized state of window
.
Note that since maximization is ultimately handled by the window
manager and happens asynchronously to an application request, you
shouldn’t assume the return value of this function changing
immediately (or at all), as an effect of calling
windowMaximize
or windowUnmaximize
.
listToplevels
:: (HasCallStack, MonadIO m) | |
=> m [Widget] | Returns: list of toplevel widgets |
Returns a list of all existing toplevel windows. The widgets
in the list are not individually referenced. If you want
to iterate through the list and perform actions involving
callbacks that might destroy the widgets, you must call
g_list_foreach (result, (GFunc)g_object_ref, NULL)
first, and
then unref all the widgets afterwards.
maximize
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m () |
Asks to maximize window
, so that it becomes full-screen. Note that
you shouldn’t assume the window is definitely maximized afterward,
because other entities (e.g. the user or
[window manager][gtk-X11-arch]) could unmaximize it
again, and not all window managers support maximization. But
normally the window will end up maximized. Just don’t write code
that crashes if not.
It’s permitted to call this function before showing a window, in which case the window will be maximized when it appears onscreen initially.
You can track the result of this operation via the Toplevel
:state
property, or by listening to notifications on the Window
:is-maximized
property.
minimize
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m () |
Asks to minimize the specified window
.
Note that you shouldn’t assume the window is definitely minimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the [window manager][gtk-X11-arch]) could unminimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.
It’s permitted to call this function before showing a window, in which case the window will be minimized before it ever appears onscreen.
You can track result of this operation via the Toplevel
:state
property.
new
:: (HasCallStack, MonadIO m) | |
=> m Window | Returns: a new |
Creates a new Window
, which is a toplevel window that can
contain other widgets.
To get an undecorated window (no window borders), use
windowSetDecorated
.
All top-level windows created by windowNew
are stored in
an internal top-level window list. This list can be obtained from
windowListToplevels
. Due to Gtk+ keeping a reference to
the window internally, windowNew
does not return a reference
to the caller.
To delete a Window
, call windowDestroy
.
present
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m () |
Presents a window to the user. This function should not be used as when it is called, it is too late to gather a valid timestamp to allow focus stealing prevention to work correctly.
presentWithTime
windowPresentWithTime Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Word32 |
|
-> m () |
Presents a window to the user. This may mean raising the window in the stacking order, unminimizing it, moving it to the current desktop, and/or giving it the keyboard focus, possibly dependent on the user’s platform, window manager, and preferences.
If window
is hidden, this function calls widgetShow
as well.
This function should be used when the user tries to open a window
that’s already open. Say for example the preferences dialog is
currently open, and the user chooses Preferences from the menu
a second time; use windowPresent
to move the already-open dialog
where the user can see it.
Presents a window to the user in response to a user interaction. The timestamp should be gathered when the window was requested to be shown (when clicking a link for example), rather than once the window is ready to be shown.
resize
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Resizes the window as if the user had done so, obeying geometry
constraints. The default geometry constraint is that windows may
not be smaller than their size request; to override this
constraint, call widgetSetSizeRequest
to set the window's
request to a smaller value.
If windowResize
is called before showing a window for the
first time, it overrides any default size set with
windowSetDefaultSize
.
Windows may not be resized smaller than 1 by 1 pixels.
When using client side decorations, GTK+ will do its best to adjust
the given size so that the resulting window size matches the
requested size without the title bar, borders and shadows added for
the client side decorations, but there is no guarantee that the
result will be totally accurate because these widgets added for
client side decorations depend on the theme and may not be realized
or visible at the time windowResize
is issued.
If the GtkWindow has a titlebar widget (see windowSetTitlebar
), then
typically, windowResize
will compensate for the height of the titlebar
widget only if the height is known when the resulting GtkWindow configuration
is issued.
For example, if new widgets are added after the GtkWindow configuration
and cause the titlebar widget to grow in height, this will result in a
window content smaller that specified by windowResize
and not
a larger window.
setApplication
:: (HasCallStack, MonadIO m, IsWindow a, IsApplication b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets or unsets the Application
associated with the window.
The application will be kept alive for at least as long as it has any windows
associated with it (see applicationHold
for a way to keep it alive
without windows).
Normally, the connection between the application and the window will remain
until the window is destroyed, but you can explicitly remove it by setting
the application
to Nothing
.
This is equivalent to calling applicationRemoveWindow
and/or
applicationAddWindow
on the old/new applications as relevant.
setAutoStartupNotification
windowSetAutoStartupNotification Source #
:: (HasCallStack, MonadIO m) | |
=> Bool |
|
-> m () |
By default, after showing the first Window
, GTK+ calls
gdk_notify_startup_complete()
. Call this function to disable
the automatic startup notification. You might do this if your
first window is a splash screen, and you want to delay notification
until after your real main window has been shown, for example.
In that example, you would disable startup notification temporarily, show your splash screen, then re-enable it so that showing the main window would automatically result in notification.
setChild
:: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the child widget of window
.
setDecorated
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Bool |
|
-> m () |
By default, windows are decorated with a title bar, resize
controls, etc. Some [window managers][gtk-X11-arch]
allow GTK+ to disable these decorations, creating a
borderless window. If you set the decorated property to False
using this function, GTK+ will do its best to convince the window
manager not to decorate the window. Depending on the system, this
function may not have any effect when called on a window that is
already visible, so you should call it before calling widgetShow
.
On Windows, this function always works, since there’s no window manager policy involved.
setDefaultIconName
windowSetDefaultIconName Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m () |
Sets an icon to be used as fallback for windows that haven't
had gtk_window_set_icon_list()
called on them from a named
themed icon, see windowSetIconName
.
setDefaultSize
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Sets the default size of a window. If the window’s “natural” size (its size request) is larger than the default, the default will be ignored.
Unlike widgetSetSizeRequest
, which sets a size request for
a widget and thus would keep users from shrinking the window, this
function only sets the initial size, just as if the user had
resized the window themselves. Users can still shrink the window
again as they normally would. Setting a default size of -1 means to
use the “natural” default size (the size request of the window).
For some uses, windowResize
is a more appropriate function.
windowResize
changes the current size of the window, rather
than the size to be used on initial display. windowResize
always
affects the window itself, not the geometry widget.
The default size of a window only affects the first time a window is shown; if a window is hidden and re-shown, it will remember the size it had prior to hiding, rather than using the default size.
Windows can’t actually be 0x0 in size, they must be at least 1x1, but
passing 0 for width
and height
is OK, resulting in a 1x1 default size.
If you use this function to reestablish a previously saved window size,
note that the appropriate size to save is the one returned by
windowGetSize
. Using the window allocation directly will not
work in all circumstances and can lead to growing or shrinking windows.
setDefaultWidget
windowSetDefaultWidget Source #
:: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
The default widget is the widget that’s activated when the user
presses Enter in a dialog (for example). This function sets or
unsets the default widget for a Window
.
setDeletable
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Bool |
|
-> m () |
By default, windows have a close button in the window frame. Some
[window managers][gtk-X11-arch] allow GTK+ to
disable this button. If you set the deletable property to False
using this function, GTK+ will do its best to convince the window
manager not to show a close button. Depending on the system, this
function may not have any effect when called on a window that is
already visible, so you should call it before calling widgetShow
.
On Windows, this function always works, since there’s no window manager policy involved.
setDestroyWithParent
windowSetDestroyWithParent Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Bool |
|
-> m () |
If setting
is True
, then destroying the transient parent of window
will also destroy window
itself. This is useful for dialogs that
shouldn’t persist beyond the lifetime of the main window they're
associated with, for example.
setDisplay
:: (HasCallStack, MonadIO m, IsWindow a, IsDisplay b) | |
=> a |
|
-> b |
|
-> m () |
Sets the Display
where the window
is displayed; if
the window is already mapped, it will be unmapped, and
then remapped on the new display.
setFocus
:: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
If focus
is not the current focus widget, and is focusable, sets
it as the focus widget for the window. If focus
is Nothing
, unsets
the focus widget for this window. To set the focus to a particular
widget in the toplevel, it is usually more convenient to use
widgetGrabFocus
instead of this function.
setFocusVisible
windowSetFocusVisible Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the Window
:focus-visible
property.
setHideOnClose
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Bool |
|
-> m () |
If setting
is True
, then clicking the close button on the window
will not destroy it, but only hide it.
setIconName
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the icon for the window from a named themed icon.
See the docs for IconTheme
for more details.
On some platforms, the window icon is not used at all.
Note that this has nothing to do with the WM_ICON_NAME property which is mentioned in the ICCCM.
setInteractiveDebugging
windowSetInteractiveDebugging Source #
:: (HasCallStack, MonadIO m) | |
=> Bool |
|
-> m () |
Opens or closes the [interactive debugger][interactive-debugging], which offers access to the widget hierarchy of the application and to useful debugging tools.
setMnemonicsVisible
windowSetMnemonicsVisible Source #
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the Window
:mnemonics-visible
property.
setModal
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets a window modal or non-modal. Modal windows prevent interaction
with other windows in the same application. To keep modal dialogs
on top of main application windows, use
windowSetTransientFor
to make the dialog transient for the
parent; most [window managers][gtk-X11-arch]
will then disallow lowering the dialog below the parent.
setResizable
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the user can resize a window. Windows are user resizable by default.
setStartupId
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Text |
|
-> m () |
Startup notification identifiers are used by desktop environment to
track application startup, to provide user feedback and other
features. This function changes the corresponding property on the
underlying GdkSurface. Normally, startup identifier is managed
automatically and you should only use this function in special cases
like transferring focus from other processes. You should use this
function before calling windowPresent
or any equivalent
function generating a window map event.
This function is only useful on X11, not with other GTK+ targets.
setTitle
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the title of the Window
. The title of a window will be
displayed in its title bar; on the X Window System, the title bar
is rendered by the [window manager][gtk-X11-arch],
so exactly how the title appears to users may vary
according to a user’s exact configuration. The title should help a
user distinguish this window from other windows they may have
open. A good title might include the application name and current
document filename, for example.
setTitlebar
:: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets a custom titlebar for window
.
A typical widget used here is HeaderBar
, as it provides various features
expected of a titlebar while allowing the addition of child widgets to it.
If you set a custom titlebar, GTK+ will do its best to convince
the window manager not to put its own titlebar on the window.
Depending on the system, this function may not work for a window
that is already visible, so you set the titlebar before calling
widgetShow
.
setTransientFor
windowSetTransientFor Source #
:: (HasCallStack, MonadIO m, IsWindow a, IsWindow b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Dialog windows should be set transient for the main application
window they were spawned from. This allows
[window managers][gtk-X11-arch] to e.g. keep the
dialog on top of the main window, or center the dialog over the
main window. gtk_dialog_new_with_buttons()
and other convenience
functions in GTK+ will sometimes call
windowSetTransientFor
on your behalf.
Passing Nothing
for parent
unsets the current transient window.
On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.
unfullscreen
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m () |
Asks to toggle off the fullscreen state for window
. Note that you
shouldn’t assume the window is definitely not full screen
afterward, because other entities (e.g. the user or
[window manager][gtk-X11-arch]) could fullscreen it
again, and not all window managers honor requests to unfullscreen
windows. But normally the window will end up restored to its normal
state. Just don’t write code that crashes if not.
You can track iconification via the Toplevel
:state
property
unmaximize
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m () |
Asks to unmaximize window
. Note that you shouldn’t assume the
window is definitely unmaximized afterward, because other entities
(e.g. the user or [window manager][gtk-X11-arch])
could maximize it again, and not all window
managers honor requests to unmaximize. But normally the window will
end up unmaximized. Just don’t write code that crashes if not.
You can track the result of this operation via the Toplevel
:state
property, or by listening to notifications on the Window
:is-maximized
property.
unminimize
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m () |
Asks to unminimize the specified window
.
Note that you shouldn’t assume the window is definitely unminimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the [window manager][gtk-X11-arch]) could minimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.
You can track result of this operation via the Toplevel
:state
property.
Properties
application
The Application
associated with the window.
The application will be kept alive for at least as long as it
has any windows associated with it (see applicationHold
for a way to keep it alive without windows).
Normally, the connection between the application and the window
will remain until the window is destroyed, but you can explicitly
remove it by setting the :application property to Nothing
.
clearWindowApplication :: (MonadIO m, IsWindow o) => o -> m () Source #
Set the value of the “application
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#application
constructWindowApplication :: (IsWindow o, MonadIO m, IsApplication a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “application
” property. This is rarely needed directly, but it is used by new
.
getWindowApplication :: (MonadIO m, IsWindow o) => o -> m (Maybe Application) Source #
Get the value of the “application
” property.
When overloading is enabled, this is equivalent to
get
window #application
setWindowApplication :: (MonadIO m, IsWindow o, IsApplication a) => o -> a -> m () Source #
Set the value of the “application
” property.
When overloading is enabled, this is equivalent to
set
window [ #application:=
value ]
child
No description available in the introspection data.
clearWindowChild :: (MonadIO m, IsWindow o) => o -> m () Source #
Set the value of the “child
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#child
constructWindowChild :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “child
” property. This is rarely needed directly, but it is used by new
.
getWindowChild :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget) Source #
Get the value of the “child
” property.
When overloading is enabled, this is equivalent to
get
window #child
setWindowChild :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m () Source #
Set the value of the “child
” property.
When overloading is enabled, this is equivalent to
set
window [ #child:=
value ]
decorated
Whether the window should be decorated by the window manager.
constructWindowDecorated :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “decorated
” property. This is rarely needed directly, but it is used by new
.
getWindowDecorated :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “decorated
” property.
When overloading is enabled, this is equivalent to
get
window #decorated
setWindowDecorated :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #
Set the value of the “decorated
” property.
When overloading is enabled, this is equivalent to
set
window [ #decorated:=
value ]
defaultHeight
No description available in the introspection data.
constructWindowDefaultHeight :: (IsWindow o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “default-height
” property. This is rarely needed directly, but it is used by new
.
getWindowDefaultHeight :: (MonadIO m, IsWindow o) => o -> m Int32 Source #
Get the value of the “default-height
” property.
When overloading is enabled, this is equivalent to
get
window #defaultHeight
setWindowDefaultHeight :: (MonadIO m, IsWindow o) => o -> Int32 -> m () Source #
Set the value of the “default-height
” property.
When overloading is enabled, this is equivalent to
set
window [ #defaultHeight:=
value ]
defaultWidget
No description available in the introspection data.
clearWindowDefaultWidget :: (MonadIO m, IsWindow o) => o -> m () Source #
Set the value of the “default-widget
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#defaultWidget
constructWindowDefaultWidget :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “default-widget
” property. This is rarely needed directly, but it is used by new
.
getWindowDefaultWidget :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget) Source #
Get the value of the “default-widget
” property.
When overloading is enabled, this is equivalent to
get
window #defaultWidget
setWindowDefaultWidget :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m () Source #
Set the value of the “default-widget
” property.
When overloading is enabled, this is equivalent to
set
window [ #defaultWidget:=
value ]
defaultWidth
No description available in the introspection data.
constructWindowDefaultWidth :: (IsWindow o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “default-width
” property. This is rarely needed directly, but it is used by new
.
getWindowDefaultWidth :: (MonadIO m, IsWindow o) => o -> m Int32 Source #
Get the value of the “default-width
” property.
When overloading is enabled, this is equivalent to
get
window #defaultWidth
setWindowDefaultWidth :: (MonadIO m, IsWindow o) => o -> Int32 -> m () Source #
Set the value of the “default-width
” property.
When overloading is enabled, this is equivalent to
set
window [ #defaultWidth:=
value ]
deletable
Whether the window frame should have a close button.
constructWindowDeletable :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “deletable
” property. This is rarely needed directly, but it is used by new
.
getWindowDeletable :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “deletable
” property.
When overloading is enabled, this is equivalent to
get
window #deletable
setWindowDeletable :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #
Set the value of the “deletable
” property.
When overloading is enabled, this is equivalent to
set
window [ #deletable:=
value ]
destroyWithParent
No description available in the introspection data.
constructWindowDestroyWithParent :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “destroy-with-parent
” property. This is rarely needed directly, but it is used by new
.
getWindowDestroyWithParent :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “destroy-with-parent
” property.
When overloading is enabled, this is equivalent to
get
window #destroyWithParent
setWindowDestroyWithParent :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #
Set the value of the “destroy-with-parent
” property.
When overloading is enabled, this is equivalent to
set
window [ #destroyWithParent:=
value ]
display
No description available in the introspection data.
constructWindowDisplay :: (IsWindow o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “display
” property. This is rarely needed directly, but it is used by new
.
getWindowDisplay :: (MonadIO m, IsWindow o) => o -> m (Maybe Display) Source #
Get the value of the “display
” property.
When overloading is enabled, this is equivalent to
get
window #display
setWindowDisplay :: (MonadIO m, IsWindow o, IsDisplay a) => o -> a -> m () Source #
Set the value of the “display
” property.
When overloading is enabled, this is equivalent to
set
window [ #display:=
value ]
focusVisible
Whether 'focus rectangles' are currently visible in this window.
This property is maintained by GTK+ based on user input and should not be set by applications.
constructWindowFocusVisible :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “focus-visible
” property. This is rarely needed directly, but it is used by new
.
getWindowFocusVisible :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “focus-visible
” property.
When overloading is enabled, this is equivalent to
get
window #focusVisible
setWindowFocusVisible :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #
Set the value of the “focus-visible
” property.
When overloading is enabled, this is equivalent to
set
window [ #focusVisible:=
value ]
focusWidget
No description available in the introspection data.
clearWindowFocusWidget :: (MonadIO m, IsWindow o) => o -> m () Source #
Set the value of the “focus-widget
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#focusWidget
constructWindowFocusWidget :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “focus-widget
” property. This is rarely needed directly, but it is used by new
.
getWindowFocusWidget :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget) Source #
Get the value of the “focus-widget
” property.
When overloading is enabled, this is equivalent to
get
window #focusWidget
setWindowFocusWidget :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m () Source #
Set the value of the “focus-widget
” property.
When overloading is enabled, this is equivalent to
set
window [ #focusWidget:=
value ]
hideOnClose
No description available in the introspection data.
constructWindowHideOnClose :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “hide-on-close
” property. This is rarely needed directly, but it is used by new
.
getWindowHideOnClose :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “hide-on-close
” property.
When overloading is enabled, this is equivalent to
get
window #hideOnClose
setWindowHideOnClose :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #
Set the value of the “hide-on-close
” property.
When overloading is enabled, this is equivalent to
set
window [ #hideOnClose:=
value ]
iconName
The :icon-name property specifies the name of the themed icon to
use as the window icon. See IconTheme
for more details.
clearWindowIconName :: (MonadIO m, IsWindow o) => o -> m () Source #
Set the value of the “icon-name
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#iconName
constructWindowIconName :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “icon-name
” property. This is rarely needed directly, but it is used by new
.
getWindowIconName :: (MonadIO m, IsWindow o) => o -> m (Maybe Text) Source #
Get the value of the “icon-name
” property.
When overloading is enabled, this is equivalent to
get
window #iconName
setWindowIconName :: (MonadIO m, IsWindow o) => o -> Text -> m () Source #
Set the value of the “icon-name
” property.
When overloading is enabled, this is equivalent to
set
window [ #iconName:=
value ]
isActive
No description available in the introspection data.
getWindowIsActive :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “is-active
” property.
When overloading is enabled, this is equivalent to
get
window #isActive
isMaximized
No description available in the introspection data.
getWindowIsMaximized :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “is-maximized
” property.
When overloading is enabled, this is equivalent to
get
window #isMaximized
mnemonicsVisible
Whether mnemonics are currently visible in this window.
This property is maintained by GTK+ based on user input, and should not be set by applications.
constructWindowMnemonicsVisible :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “mnemonics-visible
” property. This is rarely needed directly, but it is used by new
.
getWindowMnemonicsVisible :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “mnemonics-visible
” property.
When overloading is enabled, this is equivalent to
get
window #mnemonicsVisible
setWindowMnemonicsVisible :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #
Set the value of the “mnemonics-visible
” property.
When overloading is enabled, this is equivalent to
set
window [ #mnemonicsVisible:=
value ]
modal
No description available in the introspection data.
constructWindowModal :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “modal
” property. This is rarely needed directly, but it is used by new
.
getWindowModal :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “modal
” property.
When overloading is enabled, this is equivalent to
get
window #modal
setWindowModal :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #
Set the value of the “modal
” property.
When overloading is enabled, this is equivalent to
set
window [ #modal:=
value ]
resizable
No description available in the introspection data.
constructWindowResizable :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “resizable
” property. This is rarely needed directly, but it is used by new
.
getWindowResizable :: (MonadIO m, IsWindow o) => o -> m Bool Source #
Get the value of the “resizable
” property.
When overloading is enabled, this is equivalent to
get
window #resizable
setWindowResizable :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #
Set the value of the “resizable
” property.
When overloading is enabled, this is equivalent to
set
window [ #resizable:=
value ]
startupId
The :startup-id is a write-only property for setting window's
startup notification identifier. See windowSetStartupId
for more details.
constructWindowStartupId :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “startup-id
” property. This is rarely needed directly, but it is used by new
.
setWindowStartupId :: (MonadIO m, IsWindow o) => o -> Text -> m () Source #
Set the value of the “startup-id
” property.
When overloading is enabled, this is equivalent to
set
window [ #startupId:=
value ]
title
No description available in the introspection data.
constructWindowTitle :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “title
” property. This is rarely needed directly, but it is used by new
.
getWindowTitle :: (MonadIO m, IsWindow o) => o -> m (Maybe Text) Source #
Get the value of the “title
” property.
When overloading is enabled, this is equivalent to
get
window #title
setWindowTitle :: (MonadIO m, IsWindow o) => o -> Text -> m () Source #
Set the value of the “title
” property.
When overloading is enabled, this is equivalent to
set
window [ #title:=
value ]
transientFor
The transient parent of the window. See windowSetTransientFor
for
more details about transient windows.
clearWindowTransientFor :: (MonadIO m, IsWindow o) => o -> m () Source #
Set the value of the “transient-for
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#transientFor
constructWindowTransientFor :: (IsWindow o, MonadIO m, IsWindow a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “transient-for
” property. This is rarely needed directly, but it is used by new
.
getWindowTransientFor :: (MonadIO m, IsWindow o) => o -> m (Maybe Window) Source #
Get the value of the “transient-for
” property.
When overloading is enabled, this is equivalent to
get
window #transientFor
setWindowTransientFor :: (MonadIO m, IsWindow o, IsWindow a) => o -> a -> m () Source #
Set the value of the “transient-for
” property.
When overloading is enabled, this is equivalent to
set
window [ #transientFor:=
value ]
Signals
activateDefault
type C_WindowActivateDefaultCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type WindowActivateDefaultCallback = IO () Source #
The activateDefault signal is a
[keybinding signal][GtkBindingSignal]
which gets emitted when the user activates the default widget
of window
.
afterWindowActivateDefault :: (IsWindow a, MonadIO m) => a -> WindowActivateDefaultCallback -> m SignalHandlerId Source #
Connect a signal handler for the activateDefault signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
window #activateDefault callback
genClosure_WindowActivateDefault :: MonadIO m => WindowActivateDefaultCallback -> m (GClosure C_WindowActivateDefaultCallback) Source #
Wrap the callback into a GClosure
.
mk_WindowActivateDefaultCallback :: C_WindowActivateDefaultCallback -> IO (FunPtr C_WindowActivateDefaultCallback) Source #
Generate a function pointer callable from C code, from a C_WindowActivateDefaultCallback
.
noWindowActivateDefaultCallback :: Maybe WindowActivateDefaultCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WindowActivateDefaultCallback
onWindowActivateDefault :: (IsWindow a, MonadIO m) => a -> WindowActivateDefaultCallback -> m SignalHandlerId Source #
Connect a signal handler for the activateDefault signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
window #activateDefault callback
wrap_WindowActivateDefaultCallback :: WindowActivateDefaultCallback -> C_WindowActivateDefaultCallback Source #
Wrap a WindowActivateDefaultCallback
into a C_WindowActivateDefaultCallback
.
activateFocus
type C_WindowActivateFocusCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type WindowActivateFocusCallback = IO () Source #
The activateFocus signal is a
[keybinding signal][GtkBindingSignal]
which gets emitted when the user activates the currently
focused widget of window
.
afterWindowActivateFocus :: (IsWindow a, MonadIO m) => a -> WindowActivateFocusCallback -> m SignalHandlerId Source #
Connect a signal handler for the activateFocus signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
window #activateFocus callback
genClosure_WindowActivateFocus :: MonadIO m => WindowActivateFocusCallback -> m (GClosure C_WindowActivateFocusCallback) Source #
Wrap the callback into a GClosure
.
mk_WindowActivateFocusCallback :: C_WindowActivateFocusCallback -> IO (FunPtr C_WindowActivateFocusCallback) Source #
Generate a function pointer callable from C code, from a C_WindowActivateFocusCallback
.
noWindowActivateFocusCallback :: Maybe WindowActivateFocusCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WindowActivateFocusCallback
onWindowActivateFocus :: (IsWindow a, MonadIO m) => a -> WindowActivateFocusCallback -> m SignalHandlerId Source #
Connect a signal handler for the activateFocus signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
window #activateFocus callback
wrap_WindowActivateFocusCallback :: WindowActivateFocusCallback -> C_WindowActivateFocusCallback Source #
Wrap a WindowActivateFocusCallback
into a C_WindowActivateFocusCallback
.
closeRequest
type C_WindowCloseRequestCallback = Ptr () -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type WindowCloseRequestCallback Source #
The closeRequest signal is emitted when the user clicks on the close button of the window.
afterWindowCloseRequest :: (IsWindow a, MonadIO m) => a -> WindowCloseRequestCallback -> m SignalHandlerId Source #
Connect a signal handler for the closeRequest signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
window #closeRequest callback
genClosure_WindowCloseRequest :: MonadIO m => WindowCloseRequestCallback -> m (GClosure C_WindowCloseRequestCallback) Source #
Wrap the callback into a GClosure
.
mk_WindowCloseRequestCallback :: C_WindowCloseRequestCallback -> IO (FunPtr C_WindowCloseRequestCallback) Source #
Generate a function pointer callable from C code, from a C_WindowCloseRequestCallback
.
noWindowCloseRequestCallback :: Maybe WindowCloseRequestCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WindowCloseRequestCallback
onWindowCloseRequest :: (IsWindow a, MonadIO m) => a -> WindowCloseRequestCallback -> m SignalHandlerId Source #
Connect a signal handler for the closeRequest signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
window #closeRequest callback
wrap_WindowCloseRequestCallback :: WindowCloseRequestCallback -> C_WindowCloseRequestCallback Source #
Wrap a WindowCloseRequestCallback
into a C_WindowCloseRequestCallback
.
enableDebugging
type C_WindowEnableDebuggingCallback = Ptr () -> CInt -> Ptr () -> IO CInt Source #
Type for the callback on the (unwrapped) C side.
type WindowEnableDebuggingCallback Source #
The enableDebugging signal is a [keybinding signal][GtkBindingSignal]
which gets emitted when the user enables or disables interactive
debugging. When toggle
is True
, interactive debugging is toggled
on or off, when it is False
, the debugger will be pointed at the
widget under the pointer.
The default bindings for this signal are Ctrl-Shift-I and Ctrl-Shift-D.
afterWindowEnableDebugging :: (IsWindow a, MonadIO m) => a -> WindowEnableDebuggingCallback -> m SignalHandlerId Source #
Connect a signal handler for the enableDebugging signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
window #enableDebugging callback
genClosure_WindowEnableDebugging :: MonadIO m => WindowEnableDebuggingCallback -> m (GClosure C_WindowEnableDebuggingCallback) Source #
Wrap the callback into a GClosure
.
mk_WindowEnableDebuggingCallback :: C_WindowEnableDebuggingCallback -> IO (FunPtr C_WindowEnableDebuggingCallback) Source #
Generate a function pointer callable from C code, from a C_WindowEnableDebuggingCallback
.
noWindowEnableDebuggingCallback :: Maybe WindowEnableDebuggingCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WindowEnableDebuggingCallback
onWindowEnableDebugging :: (IsWindow a, MonadIO m) => a -> WindowEnableDebuggingCallback -> m SignalHandlerId Source #
Connect a signal handler for the enableDebugging signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
window #enableDebugging callback
wrap_WindowEnableDebuggingCallback :: WindowEnableDebuggingCallback -> C_WindowEnableDebuggingCallback Source #
Wrap a WindowEnableDebuggingCallback
into a C_WindowEnableDebuggingCallback
.
keysChanged
type C_WindowKeysChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type WindowKeysChangedCallback = IO () Source #
The keysChanged signal gets emitted when the set of accelerators
or mnemonics that are associated with window
changes.
afterWindowKeysChanged :: (IsWindow a, MonadIO m) => a -> WindowKeysChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the keysChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
window #keysChanged callback
genClosure_WindowKeysChanged :: MonadIO m => WindowKeysChangedCallback -> m (GClosure C_WindowKeysChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_WindowKeysChangedCallback :: C_WindowKeysChangedCallback -> IO (FunPtr C_WindowKeysChangedCallback) Source #
Generate a function pointer callable from C code, from a C_WindowKeysChangedCallback
.
noWindowKeysChangedCallback :: Maybe WindowKeysChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
WindowKeysChangedCallback
onWindowKeysChanged :: (IsWindow a, MonadIO m) => a -> WindowKeysChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the keysChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
window #keysChanged callback