gi-clutter-1.0.5: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Objects.Model

Description

Base class for list models. The Model structure contains only private data and should be manipulated using the provided API.

Since: 0.6

Synopsis

Exported types

newtype Model Source #

Memory-managed wrapper type.

Constructors

Model (ManagedPtr Model) 

Instances

Instances details
Eq Model Source # 
Instance details

Defined in GI.Clutter.Objects.Model

Methods

(==) :: Model -> Model -> Bool #

(/=) :: Model -> Model -> Bool #

GObject Model Source # 
Instance details

Defined in GI.Clutter.Objects.Model

ManagedPtrNewtype Model Source # 
Instance details

Defined in GI.Clutter.Objects.Model

Methods

toManagedPtr :: Model -> ManagedPtr Model

TypedObject Model Source # 
Instance details

Defined in GI.Clutter.Objects.Model

Methods

glibType :: IO GType

HasParentTypes Model Source # 
Instance details

Defined in GI.Clutter.Objects.Model

IsGValue (Maybe Model) Source #

Convert Model to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Clutter.Objects.Model

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Model -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Model)

type ParentTypes Model Source # 
Instance details

Defined in GI.Clutter.Objects.Model

type ParentTypes Model = '[Object, Scriptable]

class (GObject o, IsDescendantOf Model o) => IsModel o Source #

Type class for types which can be safely cast to Model, for instance with toModel.

Instances

Instances details
(GObject o, IsDescendantOf Model o) => IsModel o Source # 
Instance details

Defined in GI.Clutter.Objects.Model

toModel :: (MonadIO m, IsModel o) => o -> m Model Source #

Cast to Model, for types for which this is known to be safe. For general casts, use castTo.

Methods

appendv

modelAppendv Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> [Word32]

columns: a vector with the columns to set

-> [GValue]

values: a vector with the values

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Creates and appends a new row to the Model, setting the row values for the given columns upon creation.

Since: 0.6

filterIter

modelFilterIter Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a, IsModelIter b) 
=> a

model: a Model

-> b

iter: the row to filter

-> m Bool

Returns: True if the row should be displayed, False otherwise

Deprecated: (Since version 1.24)Use ListModel instead

Checks whether the row pointer by iter should be filtered or not using the filtering function set on model.

This function should be used only by subclasses of Model.

Since: 0.6

filterRow

modelFilterRow Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> Word32

row: the row to filter

-> m Bool

Returns: True if the row should be displayed, False otherwise

Deprecated: (Since version 1.24)Use ListModel instead

Checks whether row should be filtered or not using the filtering function set on model.

This function should be used only by subclasses of Model.

Since: 0.6

foreach

modelForeach Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> ModelForeachFunc

func: a ModelForeachFunc

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Calls func for each row in the model.

Since: 0.6

getColumnName

modelGetColumnName Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: Model

-> Word32

column: the column number

-> m Text

Returns: the name of the column. The model holds the returned string, and it should not be modified or freed

Deprecated: (Since version 1.24)Use ListModel instead

Retrieves the name of the column

Since: 0.6

getColumnType

modelGetColumnType Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: Model

-> Word32

column: the column number

-> m GType

Returns: the type of the column.

Deprecated: (Since version 1.24)Use ListModel instead

Retrieves the type of the column.

Since: 0.6

getFilterSet

modelGetFilterSet Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> m Bool

Returns: True if a filter is set

Deprecated: (Since version 1.24)Use ListModel instead

Returns whether the model has a filter in place, set using modelSetFilter

Since: 1.0

getFirstIter

modelGetFirstIter Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> m ModelIter

Returns: A new ModelIter. Call objectUnref when done using it

Deprecated: (Since version 1.24)Use ListModel instead

Retrieves a ModelIter representing the first non-filtered row in model.

Since: 0.6

getIterAtRow

modelGetIterAtRow Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> Word32

row: position of the row to retrieve

-> m ModelIter

Returns: A new ModelIter, or Nothing if row was out of bounds. When done using the iterator object, call objectUnref to deallocate its resources

Deprecated: (Since version 1.24)Use ListModel instead

Retrieves a ModelIter representing the row at the given index.

If a filter function has been set using modelSetFilter then the model implementation will return the first non filtered row.

Since: 0.6

getLastIter

modelGetLastIter Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> m ModelIter

Returns: A new ModelIter. Call objectUnref when done using it

Deprecated: (Since version 1.24)Use ListModel instead

Retrieves a ModelIter representing the last non-filtered row in model.

Since: 0.6

getNColumns

modelGetNColumns Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> m Word32

Returns: the number of columns

Deprecated: (Since version 1.24)Use ListModel instead

Retrieves the number of columns inside model.

Since: 0.6

getNRows

modelGetNRows Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> m Word32

Returns: The length of the model. If there is a filter set, then the length of the filtered model is returned.

Deprecated: (Since version 1.24)Use ListModel instead

Retrieves the number of rows inside model, eventually taking into account any filtering function set using modelSetFilter.

Since: 0.6

getSortingColumn

modelGetSortingColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> m Int32

Returns: a column number, or -1 if the model is not sorted

Deprecated: (Since version 1.24)Use ListModel instead

Retrieves the number of column used for sorting the model.

Since: 0.6

insertValue

modelInsertValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> Word32

row: position of the row to modify

-> Word32

column: column to modify

-> GValue

value: new value for the cell

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Sets the data in the cell specified by iter and column. The type of value must be convertable to the type of the column. If the row does not exist then it is created.

Since: 0.6

insertv

modelInsertv Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> Word32

row: row index

-> [Word32]

columns: a vector containing the columns to set

-> [GValue]

values: a vector containing the values for the cells

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Inserts data at row into the Model, setting the row values for the given columns upon creation.

Since: 0.6

prependv

modelPrependv Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> [Word32]

columns: a vector containing the columns to set

-> [GValue]

values: a vector containing the values for the cells

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Creates and prepends a new row to the Model, setting the row values for the given columns upon creation.

Since: 0.6

remove

modelRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> Word32

row: position of row to remove

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Removes the row at the given position from the model.

Since: 0.6

resort

modelResort Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Force a resort on the model. This function should only be used by subclasses of Model.

Since: 0.6

setFilter

modelSetFilter Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> Maybe ModelFilterFunc

func: a ModelFilterFunc, or NULL

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Filters the model using the given filtering function.

Since: 0.6

setNames

modelSetNames Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> [Text]

names: an array of strings

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Assigns a name to the columns of a Model.

This function is meant primarily for GObjects that inherit from Model, and should only be used when contructing a Model. It will not work after the initial creation of the Model.

Since: 0.6

setSort

modelSetSort Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> Int32

column: the column to sort on

-> Maybe ModelSortFunc

func: a ModelSortFunc, or NULL

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Sorts model using the given sorting function.

Since: 0.6

setSortingColumn

modelSetSortingColumn Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> Int32

column: the column of the model to sort, or -1

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Sets the model to sort by column. If column is a negative value the sorting column will be unset.

Since: 0.6

setTypes

modelSetTypes Source #

Arguments

:: (HasCallStack, MonadIO m, IsModel a) 
=> a

model: a Model

-> [GType]

types: an array of GType types

-> m () 

Deprecated: (Since version 1.24)Use ListModel instead

Sets the types of the columns inside a Model.

This function is meant primarily for GObjects that inherit from Model, and should only be used when contructing a Model. It will not work after the initial creation of the Model.

Since: 0.6

Properties

filterSet

Whether the Model has a filter set

This property is set to True if a filter function has been set using modelSetFilter

Since: 1.0

getModelFilterSet :: (MonadIO m, IsModel o) => o -> m Bool Source #

Get the value of the “filter-set” property. When overloading is enabled, this is equivalent to

get model #filterSet

Signals

filterChanged

type ModelFilterChangedCallback = IO () Source #

Deprecated: (Since version 1.24)Use ListModel instead

The filterChanged signal is emitted when a new filter has been applied

Since: 0.6

afterModelFilterChanged :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelFilterChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the filterChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after model #filterChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onModelFilterChanged :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelFilterChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the filterChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on model #filterChanged callback

rowAdded

type ModelRowAddedCallback Source #

Arguments

 = ModelIter

iter: a ModelIter pointing to the new row

-> IO () 

Deprecated: (Since version 1.24)Use ListModel instead

The rowAdded signal is emitted when a new row has been added. The data on the row has already been set when the rowAdded signal has been emitted.

Since: 0.6

afterModelRowAdded :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelRowAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the rowAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after model #rowAdded callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onModelRowAdded :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelRowAddedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the rowAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on model #rowAdded callback

rowChanged

type ModelRowChangedCallback Source #

Arguments

 = ModelIter

iter: a ModelIter pointing to the changed row

-> IO () 

Deprecated: (Since version 1.24)Use ListModel instead

The rowRemoved signal is emitted when a row has been changed. The data on the row has already been updated when the rowChanged signal has been emitted.

Since: 0.6

afterModelRowChanged :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelRowChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the rowChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after model #rowChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onModelRowChanged :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelRowChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the rowChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on model #rowChanged callback

rowRemoved

type ModelRowRemovedCallback Source #

Arguments

 = ModelIter

iter: a ModelIter pointing to the removed row

-> IO () 

Deprecated: (Since version 1.24)Use ListModel instead

The rowRemoved signal is emitted when a row has been removed. The data on the row pointed by the passed iterator is still valid when the rowRemoved signal has been emitted.

Since: 0.6

afterModelRowRemoved :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelRowRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the rowRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after model #rowRemoved callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onModelRowRemoved :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelRowRemovedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the rowRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on model #rowRemoved callback

sortChanged

type ModelSortChangedCallback = IO () Source #

Deprecated: (Since version 1.24)Use ListModel instead

The sortChanged signal is emitted after the model has been sorted

Since: 0.6

afterModelSortChanged :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelSortChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the sortChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after model #sortChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onModelSortChanged :: (IsModel a, MonadIO m) => a -> ((?self :: a) => ModelSortChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the sortChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on model #sortChanged callback