diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 14:36:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 14:36:24 +0000 |
commit | 9b6d8e63db85c30007b463e91f91a791969fa83f (patch) | |
tree | 0899af51d73c1bf986f73ae39a03c4436083018a /subprojects/libhandy/src/hdy-header-bar.h | |
parent | Initial commit. (diff) | |
download | gnome-control-center-9b6d8e63db85c30007b463e91f91a791969fa83f.tar.xz gnome-control-center-9b6d8e63db85c30007b463e91f91a791969fa83f.zip |
Adding upstream version 1:3.38.4.upstream/1%3.38.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | subprojects/libhandy/src/hdy-header-bar.h | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/subprojects/libhandy/src/hdy-header-bar.h b/subprojects/libhandy/src/hdy-header-bar.h new file mode 100644 index 0000000..066d847 --- /dev/null +++ b/subprojects/libhandy/src/hdy-header-bar.h @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2013 Red Hat, Inc. + * Copyright (C) 2019 Purism SPC + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * SPDX-License-Identifier: LGPL-2.1+ + */ + +#pragma once + +#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION) +#error "Only <handy.h> can be included directly." +#endif + +#include "hdy-version.h" + +#include <gtk/gtk.h> + +G_BEGIN_DECLS + +#define HDY_TYPE_HEADER_BAR (hdy_header_bar_get_type()) + +HDY_AVAILABLE_IN_ALL +G_DECLARE_DERIVABLE_TYPE (HdyHeaderBar, hdy_header_bar, HDY, HEADER_BAR, GtkContainer) + +typedef enum { + HDY_CENTERING_POLICY_LOOSE, + HDY_CENTERING_POLICY_STRICT, +} HdyCenteringPolicy; + +/** + * HdyHeaderBarClass + * @parent_class: The parent class + */ +struct _HdyHeaderBarClass +{ + GtkContainerClass parent_class; + + /*< private >*/ + gpointer padding[4]; +}; + +HDY_AVAILABLE_IN_ALL +GtkWidget *hdy_header_bar_new (void); + +HDY_AVAILABLE_IN_ALL +const gchar *hdy_header_bar_get_title (HdyHeaderBar *self); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_set_title (HdyHeaderBar *self, + const gchar *title); + +HDY_AVAILABLE_IN_ALL +const gchar *hdy_header_bar_get_subtitle (HdyHeaderBar *self); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_set_subtitle (HdyHeaderBar *self, + const gchar *subtitle); + +HDY_AVAILABLE_IN_ALL +GtkWidget *hdy_header_bar_get_custom_title (HdyHeaderBar *self); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_set_custom_title (HdyHeaderBar *self, + GtkWidget *title_widget); + +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_pack_start (HdyHeaderBar *self, + GtkWidget *child); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_pack_end (HdyHeaderBar *self, + GtkWidget *child); + +HDY_AVAILABLE_IN_ALL +gboolean hdy_header_bar_get_show_close_button (HdyHeaderBar *self); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_set_show_close_button (HdyHeaderBar *self, + gboolean setting); + +HDY_AVAILABLE_IN_ALL +gboolean hdy_header_bar_get_has_subtitle (HdyHeaderBar *self); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_set_has_subtitle (HdyHeaderBar *self, + gboolean setting); + +HDY_AVAILABLE_IN_ALL +const gchar *hdy_header_bar_get_decoration_layout (HdyHeaderBar *self); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_set_decoration_layout (HdyHeaderBar *self, + const gchar *layout); + +HDY_AVAILABLE_IN_ALL +HdyCenteringPolicy hdy_header_bar_get_centering_policy (HdyHeaderBar *self); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_set_centering_policy (HdyHeaderBar *self, + HdyCenteringPolicy centering_policy); + +HDY_AVAILABLE_IN_ALL +guint hdy_header_bar_get_transition_duration (HdyHeaderBar *self); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_set_transition_duration (HdyHeaderBar *self, + guint duration); + +HDY_AVAILABLE_IN_ALL +gboolean hdy_header_bar_get_transition_running (HdyHeaderBar *self); + +HDY_AVAILABLE_IN_ALL +gboolean hdy_header_bar_get_interpolate_size (HdyHeaderBar *self); +HDY_AVAILABLE_IN_ALL +void hdy_header_bar_set_interpolate_size (HdyHeaderBar *self, + gboolean interpolate_size); + +G_END_DECLS |