Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Dee.filter_new(map_func, map_notify, *userdata)¶
- Parameters:
map_func (
Dee.FilterMapFunc
) – TheDee.FilterMapFunc
to use for the filtermap_notify (
Dee.FilterMapNotify
) – TheDee.FilterMapNotify
to use for the filteruserdata (
object
orNone
) – The user data to pass to map_func and map_notify
- Returns:
A pointer to an uninitialized
Dee.Filter
struct. This struct will zeroed and configured with the filter parameters- Return type:
out_filter:
Dee.Filter
Create a new
Dee.Filter
with the given parameters. This call will zero the out_filter struct.
- Dee.filter_new_collator(column)¶
- Parameters:
column (
int
) – The index of a column containing the strings to sort after- Returns:
A pointer to an uninitialized
Dee.Filter
struct. This struct will zeroed and configured with the filter parameters- Return type:
out_filter:
Dee.Filter
Create a
Dee.Filter
that takes string values from a column in the model and builds aDee.FilterModel
with the rows sorted according to the collation rules of the current locale.
- Dee.filter_new_collator_desc(column)¶
- Parameters:
column (
int
) – The index of a column containing the strings to sort after- Returns:
A pointer to an uninitialized
Dee.Filter
struct. This struct will zeroed and configured with the filter parameters- Return type:
out_filter:
Dee.Filter
Create a
Dee.Filter
that takes string values from a column in the model and builds aDee.FilterModel
with the rows sorted descending according to the collation rules of the current locale.
- Dee.filter_new_for_any_column(column, value)¶
- Parameters:
column (
int
) – The index of a column containing the string to matchvalue (
GLib.Variant
) – AGLib.Variant
value columns must match exactly. The matching semantics are those ofGLib.Variant.equal
(). If value is floating the ownership will be transfered to the filter
- Returns:
A pointer to an uninitialized
Dee.Filter
struct. This struct will zeroed and configured with the filter parameters- Return type:
out_filter:
Dee.Filter
Create a
Dee.Filter
that only includes rows from the original model which match a variant value in a given column. ADee.FilterModel
created with this filter will be ordered in accordance with its parent model.This method will work on any column, disregarding its schema, since the value comparison is done using
GLib.Variant.equal
(). This means you can use this filter as a convenient fallback when there is no predefined filter for your column type if raw performance is not paramount.
- Dee.filter_new_for_key_column(column, key)¶
- Parameters:
- Returns:
A pointer to an uninitialized
Dee.Filter
struct. This struct will zeroed and configured with the filter parameters- Return type:
out_filter:
Dee.Filter
Create a
Dee.Filter
that only includes rows from the original model which has an exact match on some string column. ADee.FilterModel
created with this filter will be ordered in accordance with its parent model.
- Dee.filter_new_regex(column, regex)¶
- Parameters:
column (
int
) – The index of a column containing the string to matchregex (
GLib.Regex
) – The regular expression column must match
- Returns:
A pointer to an uninitialized
Dee.Filter
struct. This struct will zeroed and configured with the filter parameters- Return type:
out_filter:
Dee.Filter
Create a
Dee.Filter
that only includes rows from the original model which match a regular expression on some string column. ADee.FilterModel
created with this filter will be ordered in accordance with its parent model.
- Dee.filter_new_sort(cmp_row, *cmp_user_data)¶
- Parameters:
cmp_row (
Dee.CompareRowFunc
) – ADee.CompareRowFunc
to use for sortingcmp_user_data (
object
orNone
) – User data passed to cmp_row
- Returns:
A pointer to an uninitialized
Dee.Filter
struct. This struct will zeroed and configured with the filter parameters- Return type:
out_filter:
Dee.Filter
Create a new
Dee.Filter
sorting a model according to aDee.CompareRowFunc
.
- Dee.model_reader_new(reader_func, *userdata)¶
- Parameters:
reader_func (
Dee.ModelReaderFunc
) – TheDee.ModelReaderFunc
to use for the readeruserdata (
object
orNone
) – The user data to pass to reader_func
- Returns:
A pointer to an uninitialized
Dee.ModelReader
struct- Return type:
out_reader:
Dee.ModelReader
Create a new
Dee.ModelReader
with the given parameters. This call will zero the out_reader struct.
- Dee.model_reader_new_for_int32_column(column)¶
- Parameters:
column (
int
) – The column index to read a %gint32 from- Returns:
A pointer to a
Dee.ModelReader
instance which will have all fields initialized appropriately- Return type:
out_reader:
Dee.ModelReader
A
Dee.ModelReader
reading a %gint32 from aDee.Model
at a given column
- Dee.model_reader_new_for_string_column(column)¶
- Parameters:
column (
int
) – The column index to read a string from- Returns:
A pointer to a
Dee.ModelReader
instance which will have all fields initialized appropriately- Return type:
out_reader:
Dee.ModelReader
A
Dee.ModelReader
reading a string from aDee.Model
at a given column
- Dee.model_reader_new_for_uint32_column(column)¶
- Parameters:
column (
int
) – The column index to read a %guint32 from- Returns:
A pointer to a
Dee.ModelReader
instance which will have all fields initialized appropriately- Return type:
out_reader:
Dee.ModelReader
A
Dee.ModelReader
reading a %guint32 from aDee.Model
at a given column
- Dee.resource_manager_get_default()¶
- Returns:
The default resource manager for the platform. Do not unreference. If you need to keep the instance around you must manually reference it.
- Return type:
Get a pointer to the platform default
Dee.ResourceManager
.
- Dee.serializable_parse(data, type)¶
- Parameters:
data (
GLib.Variant
) – TheGLib.Variant
data to parse. If this is a floating reference it will be consumedtype (
GObject.GType
) – TheGObject.GType
of the class to instantiate from data
- Returns:
A newly constructed
GObject.Object
build from data orNone
in case no parser has been registered for the givenGObject.GType
or variant signature. Free withGObject.Object.unref
().- Return type:
Reconstruct a
Dee.Serializable
fromGLib.Variant
data. For this function to work you need to register a parser with dee_serializable_register_parser(). Any native Dee class will do so automatically.This method only works on data created with
Dee.Serializable.serialize
() and not with data fromDee.Serializable.externalize
().Since a
Dee.SerializableParseFunc
is not allowed to fail - by contract - it can be guaranteed that this function only returnsNone
in case there is no known parser for type andGLib.Variant
signature of data.
- Dee.serializable_parse_external(data)¶
- Parameters:
data (
GLib.Variant
) – TheGLib.Variant
data to parse- Returns:
A newly constructed
GObject.Object
build from data orNone
in case no parser has been registered for the givenGObject.GType
or variant signature. Free withGObject.Object.unref
().- Return type:
Reconstruct a
Dee.Serializable
fromGLib.Variant
data. For this function to work you need to register a parser with dee_serializable_register_parser(). Any native Dee class will do so automatically.This method only works on data created with
Dee.Serializable.externalize
() and not with data fromDee.Serializable.serialize
().Since a
Dee.SerializableParseFunc
is not allowed to fail - by contract - it can be guaranteed that this function only returnsNone
in case there is no known parser for theGObject.GType
orGLib.Variant
signature of data.