Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype FileChooserRequest = FileChooserRequest (ManagedPtr FileChooserRequest)
- class (GObject o, IsDescendantOf FileChooserRequest o) => IsFileChooserRequest o
- toFileChooserRequest :: (MonadIO m, IsFileChooserRequest o) => o -> m FileChooserRequest
- noFileChooserRequest :: Maybe FileChooserRequest
- fileChooserRequestCancel :: (HasCallStack, MonadIO m, IsFileChooserRequest a) => a -> m ()
- fileChooserRequestGetMimeTypes :: (HasCallStack, MonadIO m, IsFileChooserRequest a) => a -> m [Text]
- fileChooserRequestGetMimeTypesFilter :: (HasCallStack, MonadIO m, IsFileChooserRequest a) => a -> m (Maybe FileFilter)
- fileChooserRequestGetSelectMultiple :: (HasCallStack, MonadIO m, IsFileChooserRequest a) => a -> m Bool
- fileChooserRequestGetSelectedFiles :: (HasCallStack, MonadIO m, IsFileChooserRequest a) => a -> m (Maybe [Text])
- fileChooserRequestSelectFiles :: (HasCallStack, MonadIO m, IsFileChooserRequest a) => a -> [Text] -> m ()
- getFileChooserRequestFilter :: (MonadIO m, IsFileChooserRequest o) => o -> m (Maybe FileFilter)
- getFileChooserRequestMimeTypes :: (MonadIO m, IsFileChooserRequest o) => o -> m [Text]
- getFileChooserRequestSelectMultiple :: (MonadIO m, IsFileChooserRequest o) => o -> m Bool
- getFileChooserRequestSelectedFiles :: (MonadIO m, IsFileChooserRequest o) => o -> m (Maybe [Text])
Exported types
newtype FileChooserRequest Source #
Memory-managed wrapper type.
FileChooserRequest (ManagedPtr FileChooserRequest) |
Instances
GObject FileChooserRequest Source # | |
Defined in GI.WebKit2.Objects.FileChooserRequest gobjectType :: IO GType | |
HasParentTypes FileChooserRequest Source # | |
Defined in GI.WebKit2.Objects.FileChooserRequest | |
type ParentTypes FileChooserRequest Source # | |
Defined in GI.WebKit2.Objects.FileChooserRequest |
class (GObject o, IsDescendantOf FileChooserRequest o) => IsFileChooserRequest o Source #
Type class for types which can be safely cast to FileChooserRequest
, for instance with toFileChooserRequest
.
Instances
(GObject o, IsDescendantOf FileChooserRequest o) => IsFileChooserRequest o Source # | |
Defined in GI.WebKit2.Objects.FileChooserRequest |
toFileChooserRequest :: (MonadIO m, IsFileChooserRequest o) => o -> m FileChooserRequest Source #
Cast to FileChooserRequest
, for types for which this is known to be safe. For general casts, use castTo
.
noFileChooserRequest :: Maybe FileChooserRequest Source #
A convenience alias for Nothing
:: Maybe
FileChooserRequest
.
Methods
cancel
fileChooserRequestCancel Source #
:: (HasCallStack, MonadIO m, IsFileChooserRequest a) | |
=> a |
|
-> m () |
Ask WebKit to cancel the request. It's important to do this in case no selection has been made in the client, otherwise the request won't be properly completed and the browser will keep the request pending forever, which might cause the browser to hang.
getMimeTypes
fileChooserRequestGetMimeTypes Source #
:: (HasCallStack, MonadIO m, IsFileChooserRequest a) | |
=> a |
|
-> m [Text] | Returns: a
|
Get the list of MIME types the file chooser dialog should handle, in the format specified in RFC 2046 for "media types". Its contents depend on the value of the 'accept' attribute for HTML input elements. This function should normally be called before presenting the file chooser dialog to the user, to decide whether to allow the user to select multiple files at once or only one.
getMimeTypesFilter
fileChooserRequestGetMimeTypesFilter Source #
:: (HasCallStack, MonadIO m, IsFileChooserRequest a) | |
=> a |
|
-> m (Maybe FileFilter) | Returns: a |
Get the filter currently associated with the request, ready to be
used by FileChooser
. This function should normally be called
before presenting the file chooser dialog to the user, to decide
whether to apply a filter so the user would not be allowed to
select files with other MIME types.
See fileChooserRequestGetMimeTypes
if you are
interested in getting the list of accepted MIME types.
getSelectMultiple
fileChooserRequestGetSelectMultiple Source #
:: (HasCallStack, MonadIO m, IsFileChooserRequest a) | |
=> a |
|
-> m Bool | Returns: |
Determine whether the file chooser associated to this
FileChooserRequest
should allow selecting multiple files,
which depends on the HTML input element having a 'multiple'
attribute defined.
getSelectedFiles
fileChooserRequestGetSelectedFiles Source #
:: (HasCallStack, MonadIO m, IsFileChooserRequest a) | |
=> a |
|
-> m (Maybe [Text]) | Returns: a
|
Get the list of selected files currently associated to the request. Initially, the return value of this method contains any files selected in previous file chooser requests for this HTML input element. Once webkit_file_chooser_request_select_files, the value will reflect whatever files are given.
This function should normally be called only before presenting the file chooser dialog to the user, to decide whether to perform some extra action, like pre-selecting the files from a previous request.
selectFiles
fileChooserRequestSelectFiles Source #
:: (HasCallStack, MonadIO m, IsFileChooserRequest a) | |
=> a |
|
-> [Text] |
|
-> m () |
Ask WebKit to select local files for upload and complete the request.
Properties
filter
The filter currently associated with the request. See
fileChooserRequestGetMimeTypesFilter
for more
details.
getFileChooserRequestFilter :: (MonadIO m, IsFileChooserRequest o) => o -> m (Maybe FileFilter) Source #
Get the value of the “filter
” property.
When overloading is enabled, this is equivalent to
get
fileChooserRequest #filter
mimeTypes
A Nothing
-terminated array of strings containing the list of MIME
types the file chooser dialog should handle. See
fileChooserRequestGetMimeTypes
for more details.
getFileChooserRequestMimeTypes :: (MonadIO m, IsFileChooserRequest o) => o -> m [Text] Source #
Get the value of the “mime-types
” property.
When overloading is enabled, this is equivalent to
get
fileChooserRequest #mimeTypes
selectMultiple
Whether the file chooser should allow selecting multiple
files. See
fileChooserRequestGetSelectMultiple
for
more details.
getFileChooserRequestSelectMultiple :: (MonadIO m, IsFileChooserRequest o) => o -> m Bool Source #
Get the value of the “select-multiple
” property.
When overloading is enabled, this is equivalent to
get
fileChooserRequest #selectMultiple
selectedFiles
A Nothing
-terminated array of strings containing the list of
selected files associated to the current request. See
fileChooserRequestGetSelectedFiles
for more details.
getFileChooserRequestSelectedFiles :: (MonadIO m, IsFileChooserRequest o) => o -> m (Maybe [Text]) Source #
Get the value of the “selected-files
” property.
When overloading is enabled, this is equivalent to
get
fileChooserRequest #selectedFiles