From 6f0f7d1b40a8fa8d46a2d6f4317600001cdbbb18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:57:27 +0200 Subject: Adding upstream version 43.5. Signed-off-by: Daniel Baumann --- src/gs-shell.h | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/gs-shell.h (limited to 'src/gs-shell.h') diff --git a/src/gs-shell.h b/src/gs-shell.h new file mode 100644 index 0000000..7689777 --- /dev/null +++ b/src/gs-shell.h @@ -0,0 +1,92 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * vi:set noexpandtab tabstop=8 shiftwidth=8: + * + * Copyright (C) 2013 Richard Hughes + * Copyright (C) 2014-2017 Kalev Lember + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#pragma once + +#include +#include + +#include "gnome-software-private.h" + +G_BEGIN_DECLS + +#define GS_TYPE_SHELL (gs_shell_get_type ()) + +G_DECLARE_FINAL_TYPE (GsShell, gs_shell, GS, SHELL, AdwApplicationWindow) + +typedef enum { + GS_SHELL_MODE_UNKNOWN, + GS_SHELL_MODE_OVERVIEW, + GS_SHELL_MODE_INSTALLED, + GS_SHELL_MODE_SEARCH, + GS_SHELL_MODE_UPDATES, + GS_SHELL_MODE_DETAILS, + GS_SHELL_MODE_CATEGORY, + GS_SHELL_MODE_EXTRAS, + GS_SHELL_MODE_MODERATE, + GS_SHELL_MODE_LOADING, + GS_SHELL_MODE_LAST +} GsShellMode; + +typedef enum { + GS_SHELL_INTERACTION_NONE = (0u), + GS_SHELL_INTERACTION_NOTIFY = (1u << 0), + GS_SHELL_INTERACTION_FULL = (1u << 1) | GS_SHELL_INTERACTION_NOTIFY, + GS_SHELL_INTERACTION_LAST +} GsShellInteraction; + +GsShell *gs_shell_new (void); +void gs_shell_activate (GsShell *shell); +void gs_shell_change_mode (GsShell *shell, + GsShellMode mode, + gpointer data, + gboolean scroll_up); +void gs_shell_reset_state (GsShell *shell); +void gs_shell_set_mode (GsShell *shell, + GsShellMode mode); +void gs_shell_modal_dialog_present (GsShell *shell, + GtkWindow *window); +GsShellMode gs_shell_get_mode (GsShell *shell); +const gchar *gs_shell_get_mode_string (GsShell *shell); +void gs_shell_install (GsShell *shell, + GsApp *app, + GsShellInteraction interaction); +void gs_shell_uninstall (GsShell *shell, + GsApp *app); +void gs_shell_show_installed_updates(GsShell *shell); +void gs_shell_show_sources (GsShell *shell); +void gs_shell_show_prefs (GsShell *shell); +void gs_shell_show_app (GsShell *shell, + GsApp *app); +void gs_shell_show_category (GsShell *shell, + GsCategory *category); +void gs_shell_show_search (GsShell *shell, + const gchar *search); +void gs_shell_show_local_file (GsShell *shell, + GFile *file); +void gs_shell_show_search_result (GsShell *shell, + const gchar *id, + const gchar *search); +void gs_shell_show_extras_search (GsShell *shell, + const gchar *mode, + gchar **resources, + const gchar *desktop_id, + const gchar *ident); +void gs_shell_show_uri (GsShell *shell, + const gchar *url); +void gs_shell_setup (GsShell *shell, + GsPluginLoader *plugin_loader, + GCancellable *cancellable); +void gs_shell_show_notification (GsShell *shell, + const gchar *title); +gboolean gs_shell_get_is_narrow (GsShell *shell); +void gs_shell_show_metainfo (GsShell *shell, + GFile *file); + +G_END_DECLS -- cgit v1.2.3