summaryrefslogtreecommitdiffstats
path: root/src/gs-context-dialog-row.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-context-dialog-row.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-context-dialog-row.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/gs-context-dialog-row.h b/src/gs-context-dialog-row.h
new file mode 100644
index 0000000..d5d68fd
--- /dev/null
+++ b/src/gs-context-dialog-row.h
@@ -0,0 +1,69 @@
+/* -*- 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 <adwaita.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GsContextDialogRowImportance:
+ * @GS_CONTEXT_DIALOG_ROW_IMPORTANCE_NEUTRAL: neutral or unknown importance
+ * @GS_CONTEXT_DIALOG_ROW_IMPORTANCE_UNIMPORTANT: unimportant
+ * @GS_CONTEXT_DIALOG_ROW_IMPORTANCE_WARNING: a bit important
+ * @GS_CONTEXT_DIALOG_ROW_IMPORTANCE_IMPORTANT: definitely important
+ *
+ * The importance of the information in a #GsContextDialogRow. The values
+ * increase from less important to more important.
+ *
+ * Since: 41
+ */
+typedef enum
+{
+ /* The code in this file relies on the fact that these enum values
+ * numerically increase as they get more important. */
+ GS_CONTEXT_DIALOG_ROW_IMPORTANCE_NEUTRAL,
+ GS_CONTEXT_DIALOG_ROW_IMPORTANCE_UNIMPORTANT,
+ GS_CONTEXT_DIALOG_ROW_IMPORTANCE_WARNING,
+ GS_CONTEXT_DIALOG_ROW_IMPORTANCE_IMPORTANT,
+} GsContextDialogRowImportance;
+
+#define GS_TYPE_CONTEXT_DIALOG_ROW (gs_context_dialog_row_get_type ())
+
+G_DECLARE_FINAL_TYPE (GsContextDialogRow, gs_context_dialog_row, GS, CONTEXT_DIALOG_ROW, AdwActionRow)
+
+GtkListBoxRow *gs_context_dialog_row_new (const gchar *icon_name,
+ GsContextDialogRowImportance importance,
+ const gchar *title,
+ const gchar *description);
+GtkListBoxRow *gs_context_dialog_row_new_text (const gchar *content,
+ GsContextDialogRowImportance importance,
+ const gchar *title,
+ const gchar *description);
+
+const gchar *gs_context_dialog_row_get_icon_name (GsContextDialogRow *self);
+const gchar *gs_context_dialog_row_get_content (GsContextDialogRow *self);
+GsContextDialogRowImportance gs_context_dialog_row_get_importance (GsContextDialogRow *self);
+gboolean gs_context_dialog_row_get_content_is_markup
+ (GsContextDialogRow *self);
+void gs_context_dialog_row_set_content_markup
+ (GsContextDialogRow *self,
+ const gchar *markup);
+
+void gs_context_dialog_row_set_size_groups (GsContextDialogRow *self,
+ GtkSizeGroup *lozenge,
+ GtkSizeGroup *title,
+ GtkSizeGroup *description);
+
+G_END_DECLS