Top | ![]() |
![]() |
![]() |
![]() |
DhBook * | dh_book_new () |
GFile * | dh_book_get_index_file () |
const gchar * | dh_book_get_id () |
const gchar * | dh_book_get_title () |
const gchar * | dh_book_get_language () |
GList * | dh_book_get_links () |
GNode * | dh_book_get_tree () |
DhCompletion * | dh_book_get_completion () |
gint | dh_book_cmp_by_id () |
gint | dh_book_cmp_by_title () |
A DhBook usually contains the documentation for one library (or
application), for example GLib or GTK. A DhBook corresponds to one index
file. An index file is a file with the extension *.devhelp
, *.devhelp2
,
*.devhelp.gz
or *.devhelp2.gz
.
DhBook creates a GFileMonitor on the index file, and emits the “updated” or “deleted” signal in case the index file has changed on the filesystem. DhBookListDirectory listens to those DhBook signals, and emits in turn the DhBookList “remove-book” and “add-book” signals.
const gchar *
dh_book_get_id (DhBook *book
);
Gets the book ID. In the Devhelp index file format version 2, it is actually the “name”, not the ID, but “book ID” is clearer, “book name” can be confused with the title.
GNode *
dh_book_get_tree (DhBook *book
);
Gets the general structure of the book, as a tree. The tree contains only
DhLink's of type DH_LINK_TYPE_BOOK
or DH_LINK_TYPE_PAGE
. The other
DhLink's are not contained in the tree. To have a list of
all DhLink's part of the book, you need to call
dh_book_get_links()
.
gint dh_book_cmp_by_id (DhBook *a
,DhBook *b
);
Compares the DhBook's by their IDs, with g_ascii_strcasecmp()
.
“deleted”
signalvoid user_function (DhBook *book, gpointer user_data)
The ::deleted signal is emitted when the index file has been deleted from the filesystem.
book |
the DhBook emitting the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“updated”
signalvoid user_function (DhBook *book, gpointer user_data)
The ::updated signal is emitted when the index file has been modified (but the file still exists).
book |
the DhBook emitting the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last