Top | ![]() |
![]() |
![]() |
![]() |
#define | FMA_OBJECT_ITEM() |
#define | FMA_IS_OBJECT_ITEM() |
gboolean | fma_object_item_is_finally_writable () |
void | fma_object_item_set_writability_status () |
FMAObjectId * | fma_object_item_get_item () |
gint | fma_object_item_get_position () |
void | fma_object_item_append_item () |
void | fma_object_item_insert_at () |
void | fma_object_item_insert_item () |
void | fma_object_item_remove_item () |
guint | fma_object_item_get_items_count () |
void | fma_object_item_count_items () |
GList * | fma_object_item_copyref_items () |
GList * | fma_object_item_free_items () |
void | fma_object_item_rebuild_children_slist () |
void | fma_object_item_deals_with_version () |
This is a pure virtual class, i.e. not an instantiatable one, but serves as the base class for FMAObjectAction and FMAObjectMenu.
#define FMA_OBJECT_ITEM( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_OBJECT_ITEM, FMAObjectItem ))
#define FMA_IS_OBJECT_ITEM( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_OBJECT_ITEM ))
gboolean fma_object_item_is_finally_writable (const FMAObjectItem *item
,guint *reason
);
item |
this FMAObjectItem -derived object. |
|
reason |
if not |
Since: 3.1
void fma_object_item_set_writability_status (FMAObjectItem *item
,gboolean writable
,guint reason
);
Set the writability status of the item
.
item |
this FMAObjectItem -derived object. |
|
writable |
whether the item is finally writable. |
|
reason |
the reason code. |
Since: 3.1
FMAObjectId * fma_object_item_get_item (const FMAObjectItem *item
,const gchar *id
);
item |
the FMAObjectItem from which we want retrieve a subitem. |
|
id |
the id of the searched subitem. |
a pointer to the FMAObjectId -derived child with the required id.
The returned FMAObjectId is owned by the item
object ; the
caller should not try to g_free()
nor g_object_unref()
it.
Since: 2.30
gint fma_object_item_get_position (const FMAObjectItem *item
,const FMAObjectId *child
);
the position of child
in the subitems list of item
,
starting from zero, or -1 if not found.
Since: 2.30
void fma_object_item_append_item (FMAObjectItem *item
,const FMAObjectId *child
);
Appends a new child
to the list of subitems of item
,
and setup the parent pointer of the child to its new parent.
Doesn't modify the reference count on object
.
item |
the FMAObjectItem to which add the subitem. |
|
child |
a FMAObjectId to be added to list of subitems. |
Since: 2.30
void fma_object_item_insert_at (FMAObjectItem *item
,const FMAObjectId *child
,gint pos
);
Inserts a new child
in the list of subitems of item
.
Doesn't modify the reference count on child
.
item |
the FMAObjectItem in which add the subitem. |
|
child |
a FMAObjectId -derived to be inserted in the list of subitems. |
|
pos |
the position at which the |
Since: 2.30
void fma_object_item_insert_item (FMAObjectItem *item
,const FMAObjectId *child
,const FMAObjectId *before
);
Inserts a new child
in the list of subitems of item
.
Doesn't modify the reference count on child
.
item |
the FMAObjectItem to which add the subitem. |
|
child |
a FMAObjectId to be inserted in the list of subitems. |
|
before |
the FMAObjectId before which the |
Since: 2.30
void fma_object_item_remove_item (FMAObjectItem *item
,const FMAObjectId *child
);
Removes a child
from the list of subitems of item
.
Doesn't modify the reference count on child
.
item |
the FMAObjectItem from which the subitem must be removed. |
|
child |
a FMAObjectId -derived to be removed from the list of subitems. |
Since: 2.30
guint
fma_object_item_get_items_count (const FMAObjectItem *item
);
Since: 2.30
void fma_object_item_count_items (GList *items
,gint *menus
,gint *actions
,gint *profiles
,gboolean recurse
);
items |
a list if FMAObject -derived to be counted. |
|
menus |
will be set to the count of menus. |
|
actions |
will be set to the count of actions. |
|
profiles |
will be set to the count of profiles. |
|
recurse |
whether to recursively count all items, or only those in level zero of the list. |
the count the numbers of items if the provided list.
As this function is recursive, the counters should be initialized by the caller before calling it.
Since: 2.30
GList *
fma_object_item_copyref_items (GList *items
);
Creates a copy of the provided list, recursively incrementing the reference count of FMAObjects.
Since: 3.1
GList *
fma_object_item_free_items (GList *items
);
Free the items list.
Since: 3.1
void
fma_object_item_rebuild_children_slist
(FMAObjectItem *item
);
Rebuild the string list of children.
Since: 2.30
void
fma_object_item_deals_with_version (FMAObjectItem *item
);
Just after the item
has been read from FMAIFactoryProvider, setup
the version. This is needed because some conversions may occur in
this object.
Note that there is only some 2.x versions where the version string
was not systematically written. If item
has been read from a
.desktop file, then iversion is already set to (at least) 3.
Since: 2.30
The FMAItemTarget mode is driven by the file manager. It determines in which part of the file manager UI our actions will be displayed.