| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
GI.Gtk.Objects.ShortcutsWindow
Description
A GtkShortcutsWindow shows brief information about the keyboard shortcuts and gestures of an application. The shortcuts can be grouped, and you can have multiple sections in this window, corresponding to the major modes of your application.
Additionally, the shortcuts can be filtered by the current view, to avoid showing information that is not relevant in the current application context.
The recommended way to construct a GtkShortcutsWindow is with GtkBuilder,
 by populating a ShortcutsWindow with one or more ShortcutsSection
 objects, which contain GtkShortcutsGroups that in turn contain objects of
 class ShortcutsShortcut.
A simple example:

This example has as single section. As you can see, the shortcut groups are arranged in columns, and spread across several pages if there are too many to find on a single page.
The .ui file for this example can be found here.
An example with multiple views:

This example shows a ShortcutsWindow that has been configured to show only
 the shortcuts relevant to the "stopwatch" view.
The .ui file for this example can be found here.
An example with multiple sections:

This example shows a ShortcutsWindow with two sections, "Editor Shortcuts"
 and "Terminal Shortcuts".
The .ui file for this example can be found here.
Synopsis
- newtype ShortcutsWindow = ShortcutsWindow (ManagedPtr ShortcutsWindow)
- class (GObject o, IsDescendantOf ShortcutsWindow o) => IsShortcutsWindow o
- toShortcutsWindow :: (MonadIO m, IsShortcutsWindow o) => o -> m ShortcutsWindow
- clearShortcutsWindowSectionName :: (MonadIO m, IsShortcutsWindow o) => o -> m ()
- constructShortcutsWindowSectionName :: (IsShortcutsWindow o, MonadIO m) => Text -> m (GValueConstruct o)
- getShortcutsWindowSectionName :: (MonadIO m, IsShortcutsWindow o) => o -> m (Maybe Text)
- setShortcutsWindowSectionName :: (MonadIO m, IsShortcutsWindow o) => o -> Text -> m ()
- clearShortcutsWindowViewName :: (MonadIO m, IsShortcutsWindow o) => o -> m ()
- constructShortcutsWindowViewName :: (IsShortcutsWindow o, MonadIO m) => Text -> m (GValueConstruct o)
- getShortcutsWindowViewName :: (MonadIO m, IsShortcutsWindow o) => o -> m (Maybe Text)
- setShortcutsWindowViewName :: (MonadIO m, IsShortcutsWindow o) => o -> Text -> m ()
- type C_ShortcutsWindowCloseCallback = Ptr () -> Ptr () -> IO ()
- type ShortcutsWindowCloseCallback = IO ()
- afterShortcutsWindowClose :: (IsShortcutsWindow a, MonadIO m) => a -> ShortcutsWindowCloseCallback -> m SignalHandlerId
- genClosure_ShortcutsWindowClose :: MonadIO m => ShortcutsWindowCloseCallback -> m (GClosure C_ShortcutsWindowCloseCallback)
- mk_ShortcutsWindowCloseCallback :: C_ShortcutsWindowCloseCallback -> IO (FunPtr C_ShortcutsWindowCloseCallback)
- noShortcutsWindowCloseCallback :: Maybe ShortcutsWindowCloseCallback
- onShortcutsWindowClose :: (IsShortcutsWindow a, MonadIO m) => a -> ShortcutsWindowCloseCallback -> m SignalHandlerId
- wrap_ShortcutsWindowCloseCallback :: ShortcutsWindowCloseCallback -> C_ShortcutsWindowCloseCallback
- type C_ShortcutsWindowSearchCallback = Ptr () -> Ptr () -> IO ()
- type ShortcutsWindowSearchCallback = IO ()
- afterShortcutsWindowSearch :: (IsShortcutsWindow a, MonadIO m) => a -> ShortcutsWindowSearchCallback -> m SignalHandlerId
- genClosure_ShortcutsWindowSearch :: MonadIO m => ShortcutsWindowSearchCallback -> m (GClosure C_ShortcutsWindowSearchCallback)
- mk_ShortcutsWindowSearchCallback :: C_ShortcutsWindowSearchCallback -> IO (FunPtr C_ShortcutsWindowSearchCallback)
- noShortcutsWindowSearchCallback :: Maybe ShortcutsWindowSearchCallback
- onShortcutsWindowSearch :: (IsShortcutsWindow a, MonadIO m) => a -> ShortcutsWindowSearchCallback -> m SignalHandlerId
- wrap_ShortcutsWindowSearchCallback :: ShortcutsWindowSearchCallback -> C_ShortcutsWindowSearchCallback
Exported types
newtype ShortcutsWindow Source #
Memory-managed wrapper type.
Constructors
| ShortcutsWindow (ManagedPtr ShortcutsWindow) | 
Instances
class (GObject o, IsDescendantOf ShortcutsWindow o) => IsShortcutsWindow o Source #
Type class for types which can be safely cast to ShortcutsWindow, for instance with toShortcutsWindow.
Instances
| (GObject o, IsDescendantOf ShortcutsWindow o) => IsShortcutsWindow o Source # | |
| Defined in GI.Gtk.Objects.ShortcutsWindow | |
toShortcutsWindow :: (MonadIO m, IsShortcutsWindow o) => o -> m ShortcutsWindow Source #
Cast to ShortcutsWindow, for types for which this is known to be safe. For general casts, use castTo.
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, close, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, destroy, dragCheckThreshold, errorBell, forceFloating, freezeNotify, fullscreen, fullscreenOnMonitor, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasGroup, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isActive, isAncestor, isDrawable, isFloating, isFocus, isFullscreen, isMaximized, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, maximize, measure, minimize, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, present, presentWithTime, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unfullscreen, unmap, unmaximize, unminimize, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getApplication, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDecorated, getDefaultSize, getDefaultWidget, getDeletable, getDestroyWithParent, getDirection, getDisplay, getFirstChild, getFocus, getFocusChild, getFocusOnClick, getFocusVisible, getFocusable, getFontMap, getFontOptions, getFrameClock, getGroup, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHideOnClose, getIconName, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMnemonicsVisible, getModal, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRenderer, getRequestMode, getResizable, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getSurface, getSurfaceTransform, getTemplateChild, getTitle, getTitlebar, getTooltipMarkup, getTooltipText, getTransientFor, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setApplication, setCanFocus, setCanTarget, setChild, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDecorated, setDefaultSize, setDefaultWidget, setDeletable, setDestroyWithParent, setDirection, setDisplay, setFocus, setFocusChild, setFocusOnClick, setFocusVisible, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setHideOnClose, setIconName, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMnemonicsVisible, setModal, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setResizable, setSensitive, setSizeRequest, setStartupId, setStateFlags, setTitle, setTitlebar, setTooltipMarkup, setTooltipText, setTransientFor, setValign, setVexpand, setVexpandSet, setVisible.
Properties
sectionName
The name of the section to show.
This should be the section-name of one of the ShortcutsSection
 objects that are in this shortcuts window.
clearShortcutsWindowSectionName :: (MonadIO m, IsShortcutsWindow o) => o -> m () Source #
Set the value of the “section-name” property to Nothing.
 When overloading is enabled, this is equivalent to
clear #sectionName
constructShortcutsWindowSectionName :: (IsShortcutsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “section-name” property. This is rarely needed directly, but it is used by new.
getShortcutsWindowSectionName :: (MonadIO m, IsShortcutsWindow o) => o -> m (Maybe Text) Source #
Get the value of the “section-name” property.
 When overloading is enabled, this is equivalent to
get shortcutsWindow #sectionName
setShortcutsWindowSectionName :: (MonadIO m, IsShortcutsWindow o) => o -> Text -> m () Source #
Set the value of the “section-name” property.
 When overloading is enabled, this is equivalent to
setshortcutsWindow [ #sectionName:=value ]
viewName
The view name by which to filter the contents.
This should correspond to the ShortcutsGroup:view property of some of
 the ShortcutsGroup objects that are inside this shortcuts window.
Set this to Nothing to show all groups.
clearShortcutsWindowViewName :: (MonadIO m, IsShortcutsWindow o) => o -> m () Source #
Set the value of the “view-name” property to Nothing.
 When overloading is enabled, this is equivalent to
clear #viewName
constructShortcutsWindowViewName :: (IsShortcutsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “view-name” property. This is rarely needed directly, but it is used by new.
getShortcutsWindowViewName :: (MonadIO m, IsShortcutsWindow o) => o -> m (Maybe Text) Source #
Get the value of the “view-name” property.
 When overloading is enabled, this is equivalent to
get shortcutsWindow #viewName
setShortcutsWindowViewName :: (MonadIO m, IsShortcutsWindow o) => o -> Text -> m () Source #
Set the value of the “view-name” property.
 When overloading is enabled, this is equivalent to
setshortcutsWindow [ #viewName:=value ]
Signals
close
type C_ShortcutsWindowCloseCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ShortcutsWindowCloseCallback = IO () Source #
The close signal is a [keybinding signal][GtkSignalAction] which gets emitted when the user uses a keybinding to close the window.
The default binding for this signal is the Escape key.
afterShortcutsWindowClose :: (IsShortcutsWindow a, MonadIO m) => a -> ShortcutsWindowCloseCallback -> m SignalHandlerId Source #
Connect a signal handler for the close signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after shortcutsWindow #close callback
genClosure_ShortcutsWindowClose :: MonadIO m => ShortcutsWindowCloseCallback -> m (GClosure C_ShortcutsWindowCloseCallback) Source #
Wrap the callback into a GClosure.
mk_ShortcutsWindowCloseCallback :: C_ShortcutsWindowCloseCallback -> IO (FunPtr C_ShortcutsWindowCloseCallback) Source #
Generate a function pointer callable from C code, from a C_ShortcutsWindowCloseCallback.
noShortcutsWindowCloseCallback :: Maybe ShortcutsWindowCloseCallback Source #
A convenience synonym for Nothing :: Maybe ShortcutsWindowCloseCallback
onShortcutsWindowClose :: (IsShortcutsWindow a, MonadIO m) => a -> ShortcutsWindowCloseCallback -> m SignalHandlerId Source #
Connect a signal handler for the close signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on shortcutsWindow #close callback
wrap_ShortcutsWindowCloseCallback :: ShortcutsWindowCloseCallback -> C_ShortcutsWindowCloseCallback Source #
Wrap a ShortcutsWindowCloseCallback into a C_ShortcutsWindowCloseCallback.
search
type C_ShortcutsWindowSearchCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ShortcutsWindowSearchCallback = IO () Source #
The search signal is a [keybinding signal][GtkSignalAction] which gets emitted when the user uses a keybinding to start a search.
The default binding for this signal is Control-F.
afterShortcutsWindowSearch :: (IsShortcutsWindow a, MonadIO m) => a -> ShortcutsWindowSearchCallback -> m SignalHandlerId Source #
Connect a signal handler for the search signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after shortcutsWindow #search callback
genClosure_ShortcutsWindowSearch :: MonadIO m => ShortcutsWindowSearchCallback -> m (GClosure C_ShortcutsWindowSearchCallback) Source #
Wrap the callback into a GClosure.
mk_ShortcutsWindowSearchCallback :: C_ShortcutsWindowSearchCallback -> IO (FunPtr C_ShortcutsWindowSearchCallback) Source #
Generate a function pointer callable from C code, from a C_ShortcutsWindowSearchCallback.
noShortcutsWindowSearchCallback :: Maybe ShortcutsWindowSearchCallback Source #
A convenience synonym for Nothing :: Maybe ShortcutsWindowSearchCallback
onShortcutsWindowSearch :: (IsShortcutsWindow a, MonadIO m) => a -> ShortcutsWindowSearchCallback -> m SignalHandlerId Source #
Connect a signal handler for the search signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on shortcutsWindow #search callback