Top | ![]() |
![]() |
![]() |
![]() |
FontManagerDatabase * | font_manager_database_new () |
void | font_manager_database_open () |
void | font_manager_database_close () |
void | font_manager_database_begin_transaction () |
void | font_manager_database_commit_transaction () |
void | font_manager_database_execute_query () |
void | font_manager_database_end_query () |
sqlite3_stmt * | font_manager_database_get_cursor () |
void | font_manager_database_vacuum () |
void | font_manager_database_initialize () |
JsonObject * | font_manager_database_get_object () |
void | font_manager_update_database () |
gboolean | font_manager_update_database_finish () |
void | font_manager_get_matching_families_and_fonts () |
void font_manager_database_open (FontManagerDatabase *self
,GError **error
);
Open database.
Note: It is not necessary to call this function in normal usage. The methods provided by this class will open the database if needed.
void font_manager_database_close (FontManagerDatabase *self
,GError **error
);
Close database. It is not necessary to call this function in normal usage.
void font_manager_database_begin_transaction (FontManagerDatabase *self
,GError **error
);
Begin a transaction, this should be paired with
font_manager_database_commit_transaction()
.
void font_manager_database_commit_transaction (FontManagerDatabase *self
,GError **error
);
End a transaction. It is an error to call this function without having
previously called font_manager_database_begin_transaction()
.
void font_manager_database_execute_query (FontManagerDatabase *self
,const gchar *sql
,GError **error
);
Calls to this function must be paired with a call to font_manager_database_end_query
void
font_manager_database_end_query (FontManagerDatabase *self
);
Finalize the prepared statement created by a previous call to font_manager_database_execute_query
sqlite3_stmt *
font_manager_database_get_cursor (FontManagerDatabase *self
);
[skip]
void font_manager_database_vacuum (FontManagerDatabase *self
,GError **error
);
Run sqlite3 VACUUM command on currently selected database.
void font_manager_database_initialize (FontManagerDatabase *self
,GError **error
);
Ensures database is at latest schema version. Creates required tables if needed.
JsonObject * font_manager_database_get_object (FontManagerDatabase *self
,const gchar *sql
,GError **error
);
JsonObject representation of first result,
NULL
if there were no results or there was an error.
[transfer full][nullable]
void font_manager_update_database (FontManagerDatabase *db
,JsonArray *available_fonts
,FontManagerProgressCallback progress
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Update application database as needed.
db |
FontManagerDatabase instance |
|
available_fonts |
JsonArray returned by font_manager_sort_json_listing |
|
progress |
[scope call][nullable] | |
cancellable |
GCancellable or |
[nullable] |
callback |
GAsyncReadyCallback or |
[nullable][scope async] |
user_data |
user data passed to callback or |
[nullable] |
gboolean font_manager_update_database_finish (GAsyncResult *result
,GError **error
);
void font_manager_get_matching_families_and_fonts (FontManagerDatabase *db
,FontManagerStringSet *families
,FontManagerStringSet *fonts
,const gchar *sql
,GError **error
);
Query MUST return two result columns. The first containing the family name and the second containing the font description.