summaryrefslogtreecommitdiffstats
path: root/subprojects/libhandy/src/hdy-carousel.h
blob: 4318b653f8798bb1aa485e357f1dba5a0d76c1f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
 * Copyright (C) 2019 Alexander Mikhaylenko <exalm7659@gmail.com>
 *
 * 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_CAROUSEL (hdy_carousel_get_type())

HDY_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (HdyCarousel, hdy_carousel, HDY, CAROUSEL, GtkEventBox)

HDY_AVAILABLE_IN_ALL
GtkWidget      *hdy_carousel_new (void);

HDY_AVAILABLE_IN_ALL
void            hdy_carousel_prepend (HdyCarousel *self,
                                      GtkWidget   *child);
HDY_AVAILABLE_IN_ALL
void            hdy_carousel_insert (HdyCarousel *self,
                                     GtkWidget   *child,
                                     gint         position);
HDY_AVAILABLE_IN_ALL
void            hdy_carousel_reorder (HdyCarousel *self,
                                      GtkWidget   *child,
                                      gint         position);

HDY_AVAILABLE_IN_ALL
void            hdy_carousel_scroll_to (HdyCarousel *self,
                                        GtkWidget   *widget);
HDY_AVAILABLE_IN_ALL
void            hdy_carousel_scroll_to_full (HdyCarousel *self,
                                             GtkWidget   *widget,
                                             gint64       duration);

HDY_AVAILABLE_IN_ALL
guint           hdy_carousel_get_n_pages (HdyCarousel *self);
HDY_AVAILABLE_IN_ALL
gdouble         hdy_carousel_get_position (HdyCarousel *self);

HDY_AVAILABLE_IN_ALL
gboolean        hdy_carousel_get_interactive (HdyCarousel *self);
HDY_AVAILABLE_IN_ALL
void            hdy_carousel_set_interactive (HdyCarousel *self,
                                              gboolean     interactive);

HDY_AVAILABLE_IN_ALL
guint           hdy_carousel_get_spacing (HdyCarousel *self);
HDY_AVAILABLE_IN_ALL
void            hdy_carousel_set_spacing (HdyCarousel *self,
                                          guint        spacing);

HDY_AVAILABLE_IN_ALL
guint           hdy_carousel_get_animation_duration (HdyCarousel *self);
HDY_AVAILABLE_IN_ALL
void            hdy_carousel_set_animation_duration (HdyCarousel *self,
                                                     guint        duration);

HDY_AVAILABLE_IN_ALL
gboolean        hdy_carousel_get_allow_mouse_drag (HdyCarousel *self);
HDY_AVAILABLE_IN_ALL
void            hdy_carousel_set_allow_mouse_drag (HdyCarousel *self,
                                                   gboolean     allow_mouse_drag);

HDY_AVAILABLE_IN_ALL
guint           hdy_carousel_get_reveal_duration (HdyCarousel *self);
HDY_AVAILABLE_IN_ALL
void            hdy_carousel_set_reveal_duration (HdyCarousel *self,
                                                  guint        reveal_duration);
G_END_DECLS