Top | ![]() |
![]() |
![]() |
![]() |
DhBookListDirectoryDhBookListDirectory — Subclass of DhBookList containing the DhBook's in one directory |
DhBookListDirectory is a subclass of DhBookList containing the DhBook's in “directory”. In that directory, each book must be in a direct sub-directory, with the Devhelp index file as a direct child of that sub-directory.
For example if “directory” is "/usr/share/gtk-doc/html/", and if there is an index file at "/usr/share/gtk-doc/html/glib/glib.devhelp2", DhBookListDirectory will contain a DhBook for that index file.
Additionally the name of (1) the sub-directory and (2) the index file minus its extension, must match ("glib" in the example).
See DhBook for the list of allowed Devhelp index file extensions ("*.devhelp2" in the example).
DhBookListDirectory listens to the DhBook “deleted” and “updated” signals, to remove the DhBook or to re-create it. And DhBookListDirectory contains a GFileMonitor on the “directory” to add new DhBook's when they are installed. But note that those GFileMonitor's are not guaranteed to work perfectly, recreating the DhBookListDirectory (or restarting the application) may be needed to see all the index files after filesystem changes in “directory”.
DhBookListDirectory *
dh_book_list_directory_new (GFile *directory
);
Returns a DhBookListDirectory for directory
.
If a DhBookListDirectory instance is still alive for directory
(according
to g_file_equal()
), the same instance is returned with the reference count
increased by one, to avoid data duplication. If no DhBookListDirectory
instance already exists for directory
, this function returns a new instance
with a reference count of one (so it's the responsibility of the caller to
keep the object alive if wanted, to avoid destroying and re-creating the same
DhBookListDirectory repeatedly).
Since: 3.30
GFile *
dh_book_list_directory_get_directory (DhBookListDirectory *list_directory
);
Since: 3.30
“directory”
property “directory” GFile *
The directory, as a GFile, containing a set of Devhelp books.
Owner: DhBookListDirectory
Flags: Read / Write / Construct Only
Since: 3.30