Debian Codegraph @

lib/json/font-manager-json.h

raw
1 /* font-manager-json.h
2 *
3 * Copyright (C) 2009-2022 Jerry Casiano
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program.
17 *
18 * If not, see <http://www.gnu.org/licenses/gpl-3.0.txt>.
19 */
20
21 #pragma once
22
23 #include <glib.h>
24 #include <json-glib/json-glib.h>
25
26 #include "font-manager-utils.h"
27
28 gint font_manager_compare_json_int_member (const gchar *member_name,
29 JsonObject *a,
30 JsonObject *b);
31
32 gint font_manager_compare_json_string_member (const gchar *member_name,
33 JsonObject *a,
34 JsonObject *b);
35
36 gint font_manager_compare_json_font_node (JsonNode *node_a,
37 JsonNode *node_b);
38
39 gchar * font_manager_print_json_array (JsonArray *json_arr,
40 gboolean pretty);
41
42 gchar * font_manager_print_json_object(JsonObject *json_obj,
43 gboolean pretty);
44
45 gboolean font_manager_write_json_file (JsonNode *root,
46 const gchar *filepath,
47 gboolean pretty);
48
49 JsonNode * font_manager_load_json_file (const gchar *filepath);
50 JsonArray * font_manager_str_list_to_json_array (GList *slist);
51