Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
AppChooser
is an interface that can be implemented by widgets which
allow the user to choose an application (typically for the purpose of
opening a file). The main objects that implement this interface are
AppChooserWidget
, AppChooserDialog
and AppChooserButton
.
Applications are represented by GIO AppInfo
objects here.
GIO has a concept of recommended and fallback applications for a
given content type. Recommended applications are those that claim
to handle the content type itself, while fallback also includes
applications that handle a more generic content type. GIO also
knows the default and last-used application for a given content
type. The AppChooserWidget
provides detailed control over
whether the shown list of applications should include default,
recommended or fallback applications.
To obtain the application that has been selected in a AppChooser
,
use appChooserGetAppInfo
.
Synopsis
- newtype AppChooser = AppChooser (ManagedPtr AppChooser)
- class (GObject o, IsDescendantOf AppChooser o) => IsAppChooser o
- toAppChooser :: (MonadIO m, IsAppChooser o) => o -> m AppChooser
- appChooserGetAppInfo :: (HasCallStack, MonadIO m, IsAppChooser a) => a -> m (Maybe AppInfo)
- appChooserGetContentType :: (HasCallStack, MonadIO m, IsAppChooser a) => a -> m Text
- appChooserRefresh :: (HasCallStack, MonadIO m, IsAppChooser a) => a -> m ()
- constructAppChooserContentType :: (IsAppChooser o, MonadIO m) => Text -> m (GValueConstruct o)
- getAppChooserContentType :: (MonadIO m, IsAppChooser o) => o -> m (Maybe Text)
Exported types
newtype AppChooser Source #
Memory-managed wrapper type.
AppChooser (ManagedPtr AppChooser) |
Instances
Eq AppChooser Source # | |
Defined in GI.Gtk.Interfaces.AppChooser (==) :: AppChooser -> AppChooser -> Bool # (/=) :: AppChooser -> AppChooser -> Bool # | |
GObject AppChooser Source # | |
Defined in GI.Gtk.Interfaces.AppChooser | |
ManagedPtrNewtype AppChooser Source # | |
Defined in GI.Gtk.Interfaces.AppChooser toManagedPtr :: AppChooser -> ManagedPtr AppChooser | |
TypedObject AppChooser Source # | |
Defined in GI.Gtk.Interfaces.AppChooser | |
HasParentTypes AppChooser Source # | |
Defined in GI.Gtk.Interfaces.AppChooser | |
IsGValue (Maybe AppChooser) Source # | Convert |
Defined in GI.Gtk.Interfaces.AppChooser gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe AppChooser -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe AppChooser) | |
type ParentTypes AppChooser Source # | |
Defined in GI.Gtk.Interfaces.AppChooser |
class (GObject o, IsDescendantOf AppChooser o) => IsAppChooser o Source #
Type class for types which can be safely cast to AppChooser
, for instance with toAppChooser
.
Instances
(GObject o, IsDescendantOf AppChooser o) => IsAppChooser o Source # | |
Defined in GI.Gtk.Interfaces.AppChooser |
toAppChooser :: (MonadIO m, IsAppChooser o) => o -> m AppChooser Source #
Cast to AppChooser
, 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
activate, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, childFocus, childNotify, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forceFloating, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, refresh, regionIntersect, registerWindow, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppInfo, getAppPaintable, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getClip, getClipboard, getCompositeName, getContentType, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAllocation, setAppPaintable, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReceivesDefault, setRedrawOnAllocate, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
getAppInfo
:: (HasCallStack, MonadIO m, IsAppChooser a) | |
=> a |
|
-> m (Maybe AppInfo) | Returns: a |
Returns the currently selected application.
Since: 3.0
getContentType
appChooserGetContentType Source #
:: (HasCallStack, MonadIO m, IsAppChooser a) | |
=> a |
|
-> m Text | Returns: the content type of |
Returns the current value of the AppChooser
:content-type
property.
Since: 3.0
refresh
:: (HasCallStack, MonadIO m, IsAppChooser a) | |
=> a |
|
-> m () |
Reloads the list of applications.
Since: 3.0
Properties
contentType
The content type of the AppChooser
object.
See [GContentType][gio-GContentType] for more information about content types.
constructAppChooserContentType :: (IsAppChooser o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “content-type
” property. This is rarely needed directly, but it is used by new
.
getAppChooserContentType :: (MonadIO m, IsAppChooser o) => o -> m (Maybe Text) Source #
Get the value of the “content-type
” property.
When overloading is enabled, this is equivalent to
get
appChooser #contentType