Devhelp.Book

g Devhelp.Book Devhelp.Book GObject.Object GObject.Object GObject.Object->Devhelp.Book

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (index_file)

cmp_by_id (b)

cmp_by_title (b)

get_completion ()

get_id ()

get_index_file ()

get_language ()

get_links ()

get_title ()

get_tree ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

deleted

The ::deleted signal is emitted when the index file has been deleted from the filesystem.

updated

The ::updated signal is emitted when the index file has been modified (but the file still exists).

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Devhelp.Book(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Devhelp.BookClass

classmethod new(index_file)
Parameters:

index_file (Gio.File) – the index file.

Returns:

a new Devhelp.Book object, or None if parsing the index file failed.

Return type:

Devhelp.Book or None

cmp_by_id(b)
Parameters:

b (Devhelp.Book) – a Devhelp.Book.

Returns:

an integer less than, equal to, or greater than zero, if self is <, == or > than b.

Return type:

int

Compares the Devhelp.Book's by their IDs, with GLib.ascii_strcasecmp().

cmp_by_title(b)
Parameters:

b (Devhelp.Book) – a Devhelp.Book.

Returns:

an integer less than, equal to, or greater than zero, if self is <, == or > than b.

Return type:

int

Compares the Devhelp.Book's by their title.

get_completion()
Returns:

the Devhelp.Completion of self.

Return type:

Devhelp.Completion

New in version 3.28.

get_id()
Returns:

the book ID.

Return type:

str

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.

get_index_file()
Returns:

the index file.

Return type:

Gio.File

get_language()
Returns:

the programming language used in self.

Return type:

str

Returns:

the list of all Devhelp.Link's part of self.

Return type:

[Devhelp.Link]

get_title()
Returns:

the book title.

Return type:

str

get_tree()
Returns:

the tree of Devhelp.Link's part of self.

Return type:

GLib.Node

Gets the general structure of the book, as a tree. The tree contains only Devhelp.Link's of type Devhelp.LinkType.BOOK or Devhelp.LinkType.PAGE. The other Devhelp.Link's are not contained in the tree. To have a list of all Devhelp.Link's part of the book, you need to call Devhelp.Book.get_links().

Signal Details

Devhelp.Book.signals.deleted(book)
Signal Name:

deleted

Flags:

RUN_LAST

Parameters:

book (Devhelp.Book) – The object which received the signal

The ::deleted signal is emitted when the index file has been deleted from the filesystem.

Devhelp.Book.signals.updated(book)
Signal Name:

updated

Flags:

RUN_LAST

Parameters:

book (Devhelp.Book) – The object which received the signal

The ::updated signal is emitted when the index file has been modified (but the file still exists).