| Libfm Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | ||||
enum FmPlacesCol; FmPlacesItem; FmPlacesModel; FmPlacesModelClass; enum FmPlacesType; FmBookmarkItem * fm_places_item_get_bookmark_item (FmPlacesItem *item); FmIcon * fm_places_item_get_icon (FmPlacesItem *item); FmFileInfo * fm_places_item_get_info (FmPlacesItem *item); GMount * fm_places_item_get_mount (FmPlacesItem *item); FmPath * fm_places_item_get_path (FmPlacesItem *item); GVolume * fm_places_item_get_volume (FmPlacesItem *item); gboolean fm_places_item_is_mounted (FmPlacesItem *item); FmBookmarks * fm_places_model_get_bookmarks (FmPlacesModel *model); gboolean fm_places_model_get_iter_by_fm_path (FmPlacesModel *model,GtkTreeIter *iter,FmPath *path); GtkTreePath * fm_places_model_get_separator_path (FmPlacesModel *model); gboolean fm_places_model_iter_is_separator (FmPlacesModel *model,GtkTreeIter *it); void fm_places_model_mount_indicator_cell_data_func (GtkCellLayout *cell_layout,GtkCellRenderer *render,GtkTreeModel *tree_model,GtkTreeIter *it,gpointer user_data); FmPlacesModel * fm_places_model_new (void); gboolean fm_places_model_path_is_bookmark (FmPlacesModel *model,GtkTreePath *tp); gboolean fm_places_model_path_is_places (FmPlacesModel *model,GtkTreePath *tp); gboolean fm_places_model_path_is_separator (FmPlacesModel *model,GtkTreePath *tp);
FmPlacesModel implements GtkTreeModel, GtkTreeDragSource, GtkTreeDragDest, GtkTreeSortable and GtkBuildable.
include: libfm/fm-gtk.h
The FmPlacesModel represents list of pseudo-folders which contains such items as Home directory, Trash bin, mounted removable drives, bookmarks, etc. It is used by FmPlacesView to display them in the side panel.
typedef enum {
FM_PLACES_MODEL_COL_ICON,
FM_PLACES_MODEL_COL_LABEL,
FM_PLACES_MODEL_COL_INFO,
} FmPlacesCol;
Data of the row in the FmPlacesModel.
| (GdkPixbuf *) icon if the row | |
| (char *) name of the row | |
| (FmPlacesItem *) internal representation |
typedef enum {
FM_PLACES_ITEM_NONE,
FM_PLACES_ITEM_PATH,
FM_PLACES_ITEM_VOLUME,
FM_PLACES_ITEM_MOUNT
} FmPlacesType;
FmBookmarkItem * fm_places_item_get_bookmark_item (FmPlacesItem *item);
Retrieves bookmark descriptor for the row. Returned data are owned by places model and should not be freed by caller.
|
a places model item |
Returns : |
bookmark descriptor or NULL if item isn't
a bookmark. [transfer none]
|
Since 1.0.0
FmIcon * fm_places_item_get_icon (FmPlacesItem *item);
Retrieves icom image for the row. Returned data are owned by places model and should not be freed by caller.
|
a places model item |
Returns : |
icon descriptor. [transfer none] |
Since 1.0.0
FmFileInfo * fm_places_item_get_info (FmPlacesItem *item);
Retrieves file info for the row. Returned data are owned by places model and should not be freed by caller.
|
a places model item |
Returns : |
file info descriptor. [transfer none] |
Since 1.0.0
GMount * fm_places_item_get_mount (FmPlacesItem *item);
Rertieves mount descriptor for the row. Returned data are owned by places model and should not be freed by caller.
|
a places model item |
Returns : |
mount descriptor or NULL if item isn't a
mounted path. [transfer none]
|
Since 1.0.0
FmPath * fm_places_item_get_path (FmPlacesItem *item);
Retrieves path for the row. Returned data are owned by places model and should not be freed by caller.
|
a places model item |
Returns : |
item path. [transfer none] |
Since 1.0.0
GVolume * fm_places_item_get_volume (FmPlacesItem *item);
Retrieves volume descriptor for the row. Returned data are owned by places model and should not be freed by caller.
|
a places model item |
Returns : |
volume descriptor or NULL if item isn't a
mountable volume. [transfer none]
|
Since 1.0.0
gboolean fm_places_item_is_mounted (FmPlacesItem *item);
Checks if the row is a mounted volume.
|
a places model item |
Returns : |
TRUE if the row is a mounted volume. |
Since 1.0.0
FmBookmarks * fm_places_model_get_bookmarks (FmPlacesModel *model);
Retrieves list of bookmarks that is used by the model. Returned data
are owned by places model and should not be freed by caller.
|
a places model instance |
Returns : |
list of bookmarks. [transfer none] |
Since 1.0.0
gboolean fm_places_model_get_iter_by_fm_path (FmPlacesModel *model,GtkTreeIter *iter,FmPath *path);
Tries to find an item in the model by the path. If item was found
within model then sets iter to match the found item.
|
a places model instance |
|
the row iterator pointer |
|
a file path to search |
Returns : |
TRUE if item was found. |
Since 1.0.0
GtkTreePath * fm_places_model_get_separator_path (FmPlacesModel *model);
Retrieves path to separator between places and bookmark items. Returned
path should be freed with gtk_tree_path_free() after usage.
|
a places model instance |
Returns : |
the path to separator. [transfer full] |
Since 0.1.14
gboolean fm_places_model_iter_is_separator (FmPlacesModel *model,GtkTreeIter *it);
Checks if the row described in it is a separator.
|
a places model instance |
|
model iterator to inspect |
Returns : |
TRUE if the row is a separator. |
Since 0.1.14
void fm_places_model_mount_indicator_cell_data_func (GtkCellLayout *cell_layout,GtkCellRenderer *render,GtkTreeModel *tree_model,GtkTreeIter *it,gpointer user_data);
|
the cell layout |
|
the cell renderer |
|
a places model instance |
|
the row iterator |
|
unused |
Since 0.1.15
FmPlacesModel * fm_places_model_new (void);
Creates new places model.
Returns : |
a new FmPlacesModel object. [transfer full] |
Since 0.1.14
gboolean fm_places_model_path_is_bookmark (FmPlacesModel *model,GtkTreePath *tp);
Checks if the row by tp lies within bookmark items.
|
a places model instance |
|
the row path to inspect |
Returns : |
TRUE if the row is a bookmark item. |
Since 0.1.14
gboolean fm_places_model_path_is_places (FmPlacesModel *model,GtkTreePath *tp);
Checks if the row by tp lies above separator, i.e. within "places".
|
a places model instance |
|
the row path to inspect |
Returns : |
TRUE if the row is a places item. |
Since 0.1.14
gboolean fm_places_model_path_is_separator (FmPlacesModel *model,GtkTreePath *tp);
Checks if the row by tp is a separator between places and bookmarks.
|
a places model instance |
|
the row path to inspect |
Returns : |
TRUE if the row is a separator. |
Since 0.1.14