Commit c1016c7d authored by Adrien Plazas's avatar Adrien Plazas
Browse files

Add GtkHdyViewSwitcher

This is imported from HdyViewSwitcher from libhandy 0.0.10.
parent c07be1d8
......@@ -363,7 +363,8 @@ gtk_semi_private_h_sources = \
gtk_private_type_h_sources = \
gtkcsstypesprivate.h \
gtktexthandleprivate.h
gtktexthandleprivate.h \
hdy-view-switcher-private.h
# GTK+ header files that don't get installed
......@@ -602,6 +603,7 @@ gtk_private_h_sources = \
gtktreemenu.h \
gdkpixbufutilsprivate.h \
hdy-style-private.h \
hdy-view-switcher-private.h \
hdy-view-switcher-button-private.h \
open-type-layout.h \
language-names.h \
......@@ -978,6 +980,7 @@ gtk_base_c_sources = \
gtkwin32draw.c \
gtkwin32theme.c \
gdkpixbufutils.c \
hdy-view-switcher.c \
hdy-view-switcher-button.c \
language-names.c \
script-names.c
......
......@@ -30,6 +30,7 @@
#include "gtkcsstypesprivate.h"
#include "gtktexthandleprivate.h"
#include "hdy-view-switcher-private.h"
G_BEGIN_DECLS
......
/*
* Copyright (C) 2019 Zander Brown <zbrown@gnome.org>
* Copyright (C) 2019 Purism SPC
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include "gtkbox.h"
#include "gtkhdytype.h"
#include "gtkstack.h"
G_BEGIN_DECLS
#define GTK_TYPE_HDY_VIEW_SWITCHER (gtk_hdy_view_switcher_get_type())
struct _GtkHdyViewSwitcherClass {
GtkBoxClass parent_class;
};
GTK_HDY_DECLARE_DERIVABLE_TYPE (GtkHdyViewSwitcher, gtk_hdy_view_switcher, GTK, HDY_VIEW_SWITCHER, GtkBox)
typedef enum {
GTK_HDY_VIEW_SWITCHER_POLICY_AUTO,
GTK_HDY_VIEW_SWITCHER_POLICY_NARROW,
GTK_HDY_VIEW_SWITCHER_POLICY_WIDE,
} GtkHdyViewSwitcherPolicy;
GtkHdyViewSwitcher *gtk_hdy_view_switcher_new (void);
GtkHdyViewSwitcherPolicy gtk_hdy_view_switcher_get_policy (GtkHdyViewSwitcher *self);
void gtk_hdy_view_switcher_set_policy (GtkHdyViewSwitcher *self,
GtkHdyViewSwitcherPolicy policy);
GtkIconSize gtk_hdy_view_switcher_get_icon_size (GtkHdyViewSwitcher *self);
void gtk_hdy_view_switcher_set_icon_size (GtkHdyViewSwitcher *self,
GtkIconSize icon_size);
PangoEllipsizeMode gtk_hdy_view_switcher_get_narrow_ellipsize (GtkHdyViewSwitcher *self);
void gtk_hdy_view_switcher_set_narrow_ellipsize (GtkHdyViewSwitcher *self,
PangoEllipsizeMode mode);
GtkStack *gtk_hdy_view_switcher_get_stack (GtkHdyViewSwitcher *self);
void gtk_hdy_view_switcher_set_stack (GtkHdyViewSwitcher *self,
GtkStack *stack);
G_END_DECLS
This diff is collapsed.
hdyviewswitcher {
margin: 0;
padding: 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment