| Libfm Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
#define FM_BOOKMARKS_TYPE struct FmBookmarkItem; struct FmBookmarks; struct FmBookmarksClass; #define fm_bookmarks_append (bookmarks, path, name) FmBookmarks * fm_bookmarks_dup (void); FmBookmarkItem * fm_bookmarks_insert (FmBookmarks *bookmarks,FmPath *path,const char *name,int pos); const GList * fm_bookmarks_list_all (FmBookmarks *bookmarks); void fm_bookmarks_remove (FmBookmarks *bookmarks,FmBookmarkItem *item); void fm_bookmarks_rename (FmBookmarks *bookmarks,FmBookmarkItem *item,const char *new_name); void fm_bookmarks_reorder (FmBookmarks *bookmarks,FmBookmarkItem *item,int pos);
include: libfm/fm-bookmarks.h
The application that uses libfm can use user-wide bookmark list via class FmBookmarks.
struct FmBookmarkItem {
char* name;
FmPath* path;
};
| display name of bookmark | |
FmPath * |
path to bookmarked directory |
struct FmBookmarksClass {
GObjectClass parent_class;
void (*changed)(FmBookmarks*);
};
| the parent class | |
| the class closure for "changed" signal |
#define fm_bookmarks_append(bookmarks, path, name) fm_bookmarks_insert(bookmarks, path, name, -1)
FmBookmarks * fm_bookmarks_dup (void);
Returns reference to bookmarks list singleton descriptor.
Returns : |
a reference to bookmarks list. [transfer full] |
Since 0.1.99
FmBookmarkItem * fm_bookmarks_insert (FmBookmarks *bookmarks,FmPath *path,const char *name,int pos);
Adds a bookmark into bookmark list. Returned structure is managed by bookmarks list and should not be freed by caller.
|
bookmarks list |
|
path requested to add to bookmarks |
|
name new bookmark will be seen in list with |
|
where to insert a bookmark into list |
Returns : |
new created bookmark item. [transfer none] |
Since 0.1.0
const GList * fm_bookmarks_list_all (FmBookmarks *bookmarks);
Returns list of FmBookmarkItem retrieved from bookmarks list. Returned list is owned by bookmarks list and should not be freed by caller.
|
bookmarks list |
Returns : |
(element-type FmBookmarkItem): list of bookmark items. [transfer none] |
Since 0.1.0
void fm_bookmarks_remove (FmBookmarks *bookmarks,FmBookmarkItem *item);
Removes a bookmark from bookmark list.
|
bookmarks list |
|
bookmark item for deletion |
Since 0.1.0
void fm_bookmarks_rename (FmBookmarks *bookmarks,FmBookmarkItem *item,const char *new_name);
Changes name of existing bookmark item.
|
bookmarks list |
|
bookmark item which will be changed |
|
new name for bookmark item to be seen in list |
Since 0.1.0
void fm_bookmarks_reorder (FmBookmarks *bookmarks,FmBookmarkItem *item,int pos);
Changes position of existing bookmark item.
|
bookmarks list |
|
bookmark item which will be changed |
|
new position for bookmark item in list |
Since 0.1.0
"changed" signalvoid user_function (FmBookmarks *bookmarks,
gpointer user_data) : Run First
The "changed" signal is emitted when some bookmark item is changed, added, or removed.
|
pointer to bookmarks list singleton descriptor |
|
user data set when the signal handler was connected. |
Since 0.1.0