From 56294d30a82ec2da6f9ce399740c1ef65a9ddef4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 17:18:46 +0200 Subject: Adding upstream version 3.38.1. Signed-off-by: Daniel Baumann --- lib/gs-category.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 lib/gs-category.h (limited to 'lib/gs-category.h') diff --git a/lib/gs-category.h b/lib/gs-category.h new file mode 100644 index 0000000..e60bef2 --- /dev/null +++ b/lib/gs-category.h @@ -0,0 +1,51 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * vi:set noexpandtab tabstop=8 shiftwidth=8: + * + * Copyright (C) 2013-2016 Richard Hughes + * Copyright (C) 2013 Matthias Clasen + * Copyright (C) 2015 Kalev Lember + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#pragma once + +#include +#include + +G_BEGIN_DECLS + +#define GS_TYPE_CATEGORY (gs_category_get_type ()) + +G_DECLARE_FINAL_TYPE (GsCategory, gs_category, GS, CATEGORY, GObject) + +GsCategory *gs_category_new (const gchar *id); +const gchar *gs_category_get_id (GsCategory *category); +GsCategory *gs_category_get_parent (GsCategory *category); + +const gchar *gs_category_get_name (GsCategory *category); +void gs_category_set_name (GsCategory *category, + const gchar *name); +const gchar *gs_category_get_icon (GsCategory *category); +void gs_category_set_icon (GsCategory *category, + const gchar *icon); +gint gs_category_get_score (GsCategory *category); +void gs_category_set_score (GsCategory *category, + gint score); + +GPtrArray *gs_category_get_desktop_groups (GsCategory *category); +gboolean gs_category_has_desktop_group (GsCategory *category, + const gchar *desktop_group); +void gs_category_add_desktop_group (GsCategory *category, + const gchar *desktop_group); + +GsCategory *gs_category_find_child (GsCategory *category, + const gchar *id); +GPtrArray *gs_category_get_children (GsCategory *category); +void gs_category_add_child (GsCategory *category, + GsCategory *subcategory); + +guint gs_category_get_size (GsCategory *category); +void gs_category_increment_size (GsCategory *category); + +G_END_DECLS -- cgit v1.2.3