Clutter Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct ClutterModelIter; struct ClutterModelIterClass; ClutterModelIter * clutter_model_iter_copy (ClutterModelIter *iter
); void clutter_model_iter_get (ClutterModelIter *iter
,...
); void clutter_model_iter_get_valist (ClutterModelIter *iter
,va_list args
); void clutter_model_iter_get_value (ClutterModelIter *iter
,guint column
,GValue *value
); void clutter_model_iter_set (ClutterModelIter *iter
,...
); void clutter_model_iter_set_valist (ClutterModelIter *iter
,va_list args
); void clutter_model_iter_set_value (ClutterModelIter *iter
,guint column
,const GValue *value
); gboolean clutter_model_iter_is_first (ClutterModelIter *iter
); gboolean clutter_model_iter_is_last (ClutterModelIter *iter
); ClutterModelIter * clutter_model_iter_next (ClutterModelIter *iter
); ClutterModelIter * clutter_model_iter_prev (ClutterModelIter *iter
); ClutterModel * clutter_model_iter_get_model (ClutterModelIter *iter
); guint clutter_model_iter_get_row (ClutterModelIter *iter
);
ClutterModelIter is an object used for iterating through all the rows of a ClutterModel. It allows setting and getting values on the row which is currently pointing at.
A ClutterModelIter represents a position between two elements
of the sequence. For example, the iterator returned by
clutter_model_get_first_iter()
represents the gap immediately before
the first row of the ClutterModel, and the iterator returned by
clutter_model_get_last_iter()
represents the gap immediately after the
last row.
A ClutterModelIter can only be created by a ClutterModel implementation and it is valid as long as the model does not change.
ClutterModelIter is available since Clutter 0.6
struct ClutterModelIter;
Base class for list models iters. The ClutterModelIter structure contains only private data and should be manipulated using the provided API.
Since 0.6
struct ClutterModelIterClass { /* vtable not signals */ void (* get_value) (ClutterModelIter *iter, guint column, GValue *value); void (* set_value) (ClutterModelIter *iter, guint column, const GValue *value); gboolean (* is_first) (ClutterModelIter *iter); gboolean (* is_last) (ClutterModelIter *iter); ClutterModelIter *(* next) (ClutterModelIter *iter); ClutterModelIter *(* prev) (ClutterModelIter *iter); ClutterModel * (* get_model) (ClutterModelIter *iter); guint (* get_row) (ClutterModelIter *iter); ClutterModelIter *(* copy) (ClutterModelIter *iter); };
Class for ClutterModelIter instances.
Virtual function for retrieving the value at the given column of the row pointed by the iterator | |
Virtual function for setting the value at the given column of the row pointer by the iterator | |
Virtual function for knowing whether the iterator points at the first row in the model | |
Virtual function for knowing whether the iterator points at the last row in the model | |
Virtual function for moving the iterator to the following row in the model | |
Virtual function for moving the iterator toe the previous row in the model | |
Virtual function for getting the model to which the iterator belongs to | |
Virtual function for getting the row to which the iterator points | |
Virtual function for copying a ClutterModelIter. |
Since 0.6
ClutterModelIter * clutter_model_iter_copy (ClutterModelIter *iter
);
Copies the passed iterator.
|
a ClutterModelIter |
Returns : |
a copy of the iterator, or NULL . [transfer full]
|
Since 0.8
void clutter_model_iter_get (ClutterModelIter *iter
,...
);
Gets the value of one or more cells in the row referenced by iter
. The
variable argument list should contain integer column numbers, each column
column number followed by a place to store the value being retrieved. The
list is terminated by a -1.
For example, to get a value from column 0 with type G_TYPE_STRING
use:
1 |
clutter_model_iter_get (iter, 0, &place_string_here, -1); |
where place_string_here is a gchar* to be filled with the string. If appropriate, the returned values have to be freed or unreferenced.
|
a ClutterModelIter |
|
a list of column/return location pairs, terminated by -1 |
Since 0.6
void clutter_model_iter_get_valist (ClutterModelIter *iter
,va_list args
);
See clutter_model_iter_get()
. This version takes a va_list for language
bindings.
|
a ClutterModelIter |
|
a list of column/return location pairs, terminated by -1 |
Since 0.6
void clutter_model_iter_get_value (ClutterModelIter *iter
,guint column
,GValue *value
);
Sets an initializes value
to that at column
. When done with value
,
g_value_unset()
needs to be called to free any allocated memory.
|
a ClutterModelIter |
|
column number to retrieve the value from |
|
an empty GValue to set. [out] |
Since 0.6
void clutter_model_iter_set (ClutterModelIter *iter
,...
);
Sets the value of one or more cells in the row referenced by iter
. The
variable argument list should contain integer column numbers, each column
column number followed by the value to be set. The list is terminated by a
-1.
For example, to set column 0 with type G_TYPE_STRING
, use:
1 |
clutter_model_iter_set (iter, 0, "foo", -1); |
|
a ClutterModelIter |
|
a list of column/return location pairs, terminated by -1 |
Since 0.6
void clutter_model_iter_set_valist (ClutterModelIter *iter
,va_list args
);
See clutter_model_iter_set()
; this version takes a va_list for language
bindings.
|
a ClutterModelIter |
|
va_list of column/value pairs, terminiated by -1 |
Since 0.6
void clutter_model_iter_set_value (ClutterModelIter *iter
,guint column
,const GValue *value
);
Sets the data in the cell specified by iter
and column
. The type of
value
must be convertable to the type of the column.
|
a ClutterModelIter |
|
column number to retrieve the value from |
|
new value for the cell |
Since 0.6
gboolean clutter_model_iter_is_first (ClutterModelIter *iter
);
Gets whether the current iterator is at the beginning of the model to which it belongs.
|
a ClutterModelIter |
Returns : |
TRUE if iter is the first iter in the filtered model |
Since 0.6
gboolean clutter_model_iter_is_last (ClutterModelIter *iter
);
Gets whether the iterator is at the end of the model to which it belongs.
|
a ClutterModelIter |
Returns : |
TRUE if iter is the last iter in the filtered model. |
Since 0.6
ClutterModelIter * clutter_model_iter_next (ClutterModelIter *iter
);
Updates the iter
to point at the next position in the model.
The model implementation should take into account the presence of
a filter function.
|
a ClutterModelIter |
Returns : |
The passed iterator, updated to point at the next row in the model. [transfer none] |
Since 0.6
ClutterModelIter * clutter_model_iter_prev (ClutterModelIter *iter
);
Sets the iter
to point at the previous position in the model.
The model implementation should take into account the presence of
a filter function.
|
a ClutterModelIter |
Returns : |
The passed iterator, updated to point at the previous row in the model. [transfer none] |
Since 0.6
ClutterModel * clutter_model_iter_get_model (ClutterModelIter *iter
);
Retrieves a pointer to the ClutterModel that this iter is part of.
|
a ClutterModelIter |
Returns : |
a pointer to a ClutterModel. [transfer none] |
Since 0.6
guint clutter_model_iter_get_row (ClutterModelIter *iter
);
Retrieves the position of the row that the iter
points to.
|
a ClutterModelIter |
Returns : |
the position of the iter in the model |
Since 0.6
"model"
property"model" ClutterModel* : Read / Write
A reference to the ClutterModel that this iter belongs to.
Since 0.6