summaryrefslogtreecommitdiffstats
path: root/src/gs-age-rating-context-dialog.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:57:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:57:27 +0000
commit6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18 (patch)
treed423850ae901365e582137bdf2b5cbdffd7ca266 /src/gs-age-rating-context-dialog.h
parentInitial commit. (diff)
downloadgnome-software-6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18.tar.xz
gnome-software-6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18.zip
Adding upstream version 43.5.upstream/43.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/gs-age-rating-context-dialog.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/gs-age-rating-context-dialog.h b/src/gs-age-rating-context-dialog.h
new file mode 100644
index 0000000..f619004
--- /dev/null
+++ b/src/gs-age-rating-context-dialog.h
@@ -0,0 +1,49 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ * vi:set noexpandtab tabstop=8 shiftwidth=8:
+ *
+ * Copyright (C) 2021 Endless OS Foundation LLC
+ *
+ * Author: Philip Withnall <pwithnall@endlessos.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#pragma once
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
+#include "gs-app.h"
+#include "gs-info-window.h"
+#include "gs-lozenge.h"
+
+G_BEGIN_DECLS
+
+#define GS_TYPE_AGE_RATING_CONTEXT_DIALOG (gs_age_rating_context_dialog_get_type ())
+
+G_DECLARE_FINAL_TYPE (GsAgeRatingContextDialog, gs_age_rating_context_dialog, GS, AGE_RATING_CONTEXT_DIALOG, GsInfoWindow)
+
+GsAgeRatingContextDialog *gs_age_rating_context_dialog_new (GsApp *app);
+
+GsApp *gs_age_rating_context_dialog_get_app (GsAgeRatingContextDialog *self);
+void gs_age_rating_context_dialog_set_app (GsAgeRatingContextDialog *self,
+ GsApp *app);
+
+gchar *gs_age_rating_context_dialog_format_age_short (AsContentRatingSystem system,
+ guint age);
+void gs_age_rating_context_dialog_update_lozenge (GsApp *app,
+ GsLozenge *lozenge,
+ gboolean *is_unknown_out);
+
+
+typedef void (*GsAgeRatingContextDialogAttributeFunc) (const gchar *attribute,
+ AsContentRatingValue value,
+ gpointer user_data);
+
+void gs_age_rating_context_dialog_process_attributes (AsContentRating *content_rating,
+ gboolean show_worst_only,
+ GsAgeRatingContextDialogAttributeFunc callback,
+ gpointer user_data);
+
+G_END_DECLS