gi-gio-2.0.38: Gio bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gio.Objects.FileIcon

Contents

- Exported types
- Methods
  - getFile
  - new
- Properties
  - file

Description

`GFileIcon` specifies an icon by pointing to an image file to be used as icon.

It implements `LoadableIcon`.

Synopsis

- newtype FileIcon = FileIcon (ManagedPtr FileIcon)
- class (GObject o, IsDescendantOf FileIcon o) => IsFileIcon o
- toFileIcon :: (MonadIO m, IsFileIcon o) => o -> m FileIcon
- fileIconGetFile :: (HasCallStack, MonadIO m, IsFileIcon a) => a -> m File
- fileIconNew :: (HasCallStack, MonadIO m, IsFile a) => a -> m FileIcon
- constructFileIconFile :: (IsFileIcon o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getFileIconFile :: (MonadIO m, IsFileIcon o) => o -> m File

# Exported types

newtype FileIcon Source #

Memory-managed wrapper type.

Constructors

FileIcon (ManagedPtr FileIcon) |

#### Instances

Instances details

Eq FileIcon Source # |
Instance details Defined in GI.Gio.Objects.FileIcon Methods (==) :: FileIcon -> FileIcon -> Bool Source # (/=) :: FileIcon -> FileIcon -> Bool Source #
GObject FileIcon Source # |
Instance details Defined in GI.Gio.Objects.FileIcon
ManagedPtrNewtype FileIcon Source # |
Instance details Defined in GI.Gio.Objects.FileIcon Methods toManagedPtr :: FileIcon -> ManagedPtr FileIcon Source #
TypedObject FileIcon Source # |
Instance details Defined in GI.Gio.Objects.FileIcon Methods glibType :: IO GType Source #
HasParentTypes FileIcon Source # |
Instance details Defined in GI.Gio.Objects.FileIcon
IsGValue (Maybe FileIcon) Source # | Convert `FileIcon` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.FileIcon Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe FileIcon -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe FileIcon) Source #
type ParentTypes FileIcon Source # |
Instance details Defined in GI.Gio.Objects.FileIcon type ParentTypes FileIcon = '[Object, Icon, LoadableIcon]

class (GObject o, IsDescendantOf FileIcon o) => IsFileIcon o Source #

Type class for types which can be safely cast to `FileIcon`, for instance with `toFileIcon`.

#### Instances

Instances details

(GObject o, IsDescendantOf FileIcon o) => IsFileIcon o Source # |
Instance details Defined in GI.Gio.Objects.FileIcon

toFileIcon :: (MonadIO m, IsFileIcon o) => o -> m FileIcon Source #

Cast to `FileIcon`, 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

Expand

#### Methods

bindProperty, bindPropertyFull, equal, forceFloating, freezeNotify, getv, hash, isFloating, load, loadAsync, loadFinish, notify, notifyByPspec, ref, refSink, runDispose, serialize, stealData, stealQdata, thawNotify, toString, unref, watchClosure.

#### Getters

getData, getFile, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## getFile

fileIconGetFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileIcon a) |
=> a | `icon`: a `Icon`.
-> m File | Returns: a `File`.

Gets the `File` associated with the given `icon`.

## new

fileIconNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) |
=> a | `file`: a `File`.
-> m FileIcon | Returns: a `Icon` for the given `file`, or `Nothing` on error.

Creates a new icon for a file.

# Properties

## file

The file containing the icon.

constructFileIconFile :: (IsFileIcon o, MonadIO m, IsFile a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`file`” property. This is rarely needed directly, but it is used by `new`.

getFileIconFile :: (MonadIO m, IsFileIcon o) => o -> m File Source #

Get the value of the “`file`” property. When overloading is enabled, this is equivalent to

    get fileIcon #file