gi-gdk4-4.0.10: Gdk 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.Gdk.Structs.ContentFormatsBuilder

Contents

- Exported types
- Methods
  - addFormats
  - addGtype
  - addMimeType
  - new
  - ref
  - toFormats
  - unref

Description

Creates `GdkContentFormats` objects.

Synopsis

- newtype ContentFormatsBuilder = ContentFormatsBuilder (ManagedPtr ContentFormatsBuilder)
- contentFormatsBuilderAddFormats :: (HasCallStack, MonadIO m) => ContentFormatsBuilder -> ContentFormats -> m ()
- contentFormatsBuilderAddGtype :: (HasCallStack, MonadIO m) => ContentFormatsBuilder -> GType -> m ()
- contentFormatsBuilderAddMimeType :: (HasCallStack, MonadIO m) => ContentFormatsBuilder -> Text -> m ()
- contentFormatsBuilderNew :: (HasCallStack, MonadIO m) => m ContentFormatsBuilder
- contentFormatsBuilderRef :: (HasCallStack, MonadIO m) => ContentFormatsBuilder -> m ContentFormatsBuilder
- contentFormatsBuilderToFormats :: (HasCallStack, MonadIO m) => ContentFormatsBuilder -> m ContentFormats
- contentFormatsBuilderUnref :: (HasCallStack, MonadIO m) => ContentFormatsBuilder -> m ()

# Exported types

newtype ContentFormatsBuilder Source #

Memory-managed wrapper type.

Constructors

ContentFormatsBuilder (ManagedPtr ContentFormatsBuilder) |

#### Instances

Instances details

Eq ContentFormatsBuilder Source # |
Instance details Defined in GI.Gdk.Structs.ContentFormatsBuilder Methods (==) :: ContentFormatsBuilder -> ContentFormatsBuilder -> Bool Source # (/=) :: ContentFormatsBuilder -> ContentFormatsBuilder -> Bool Source #
GBoxed ContentFormatsBuilder Source # |
Instance details Defined in GI.Gdk.Structs.ContentFormatsBuilder
ManagedPtrNewtype ContentFormatsBuilder Source # |
Instance details Defined in GI.Gdk.Structs.ContentFormatsBuilder Methods toManagedPtr :: ContentFormatsBuilder -> ManagedPtr ContentFormatsBuilder Source #
TypedObject ContentFormatsBuilder Source # |
Instance details Defined in GI.Gdk.Structs.ContentFormatsBuilder Methods glibType :: IO GType Source #
HasParentTypes ContentFormatsBuilder Source # |
Instance details Defined in GI.Gdk.Structs.ContentFormatsBuilder
IsGValue (Maybe ContentFormatsBuilder) Source # | Convert `ContentFormatsBuilder` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gdk.Structs.ContentFormatsBuilder Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe ContentFormatsBuilder -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe ContentFormatsBuilder) Source #
type ParentTypes ContentFormatsBuilder Source # |
Instance details Defined in GI.Gdk.Structs.ContentFormatsBuilder type ParentTypes ContentFormatsBuilder = '[] :: [Type]

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

addFormats, addGtype, addMimeType, ref, toFormats, unref.

#### Getters

None.

#### Setters

None.

## addFormats

contentFormatsBuilderAddFormats Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ContentFormatsBuilder | `builder`: a `GdkContentFormatsBuilder`
-> ContentFormats | `formats`: the formats to add
-> m () |

Appends all formats from `formats` to `builder`, skipping those that already exist.

## addGtype

contentFormatsBuilderAddGtype Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ContentFormatsBuilder | `builder`: a `GdkContentFormats`Builder
-> GType | `type`: a `GType`
-> m () |

Appends `type` to `builder` if it has not already been added.

## addMimeType

contentFormatsBuilderAddMimeType Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ContentFormatsBuilder | `builder`: a `GdkContentFormatsBuilder`
-> Text | `mimeType`: a mime type
-> m () |

Appends `mimeType` to `builder` if it has not already been added.

## new

contentFormatsBuilderNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m ContentFormatsBuilder | Returns: a new `GdkContentFormatsBuilder`

Create a new `GdkContentFormatsBuilder` object.

The resulting builder would create an empty `GdkContentFormats`. Use addition functions to add types to it.

## ref

contentFormatsBuilderRef Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ContentFormatsBuilder | `builder`: a `GdkContentFormatsBuilder`
-> m ContentFormatsBuilder | Returns: the given `GdkContentFormatsBuilder` with its reference count increased

Acquires a reference on the given `builder`.

This function is intended primarily for bindings. `GdkContentFormatsBuilder` objects should not be kept around.

## toFormats

contentFormatsBuilderToFormats Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ContentFormatsBuilder | `builder`: a `GdkContentFormats`Builder
-> m ContentFormats | Returns: the newly created `GdkContentFormats` with all the formats added to `builder`

Creates a new `GdkContentFormats` from the given `builder`.

The given `GdkContentFormatsBuilder` is reset once this function returns; you cannot call this function multiple times on the same `builder` instance.

This function is intended primarily for bindings. C code should use `ContentFormatsBuilder`.`free_to_formats`().

## unref

contentFormatsBuilderUnref Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ContentFormatsBuilder | `builder`: a `GdkContentFormatsBuilder`
-> m () |

Releases a reference on the given `builder`.