DhKeywordModel

DhKeywordModel — A custom GtkTreeModel implementation for searching a keyword

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── DhKeywordModel

Implemented Interfaces

DhKeywordModel implements GtkTreeModel.

Includes

#include <devhelp/devhelp.h>

Description

DhKeywordModel is a custom GtkTreeModel implementation (as a list, not a tree) for searching a keyword.

The dh_keyword_model_filter() function is used to set the search criteria.

Functions

dh_keyword_model_new ()

DhKeywordModel *
dh_keyword_model_new (void);

Returns

a new DhKeywordModel object.


dh_keyword_model_filter ()

DhLink *
dh_keyword_model_filter (DhKeywordModel *model,
                         const gchar *search_string,
                         const gchar *book_id,
                         const gchar *language);

Searches in the DhBookManager the list of DhLink's that correspond to search_string , and fills the model with that list.

Parameters

model

a DhKeywordModel.

 

search_string

a search query.

 

book_id

the ID of the book currently selected, or NULL.

[nullable]

language

.

[nullable]

Returns

the DhLink that matches exactly search_string , or NULL if there is no such DhLink.

[nullable][transfer none]

Types and Values

struct DhKeywordModel

struct DhKeywordModel;