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

Rename HdyPaginatorBox into HdyCarouselBox

parent 8d88d7cb
......@@ -15,6 +15,21 @@ libhandy-1.so.0 libhandy-1-0 #MINVER#
hdy_action_row_set_subtitle@LIBHANDY_1_0 0.0.6
hdy_action_row_set_title@LIBHANDY_1_0 0.0.6
hdy_action_row_set_use_underline@LIBHANDY_1_0 0.0.6
hdy_carousel_box_animate@LIBHANDY_1_0 0.9.90
hdy_carousel_box_get_distance@LIBHANDY_1_0 0.9.90
hdy_carousel_box_get_n_pages@LIBHANDY_1_0 0.9.90
hdy_carousel_box_get_nth_child@LIBHANDY_1_0 0.9.90
hdy_carousel_box_get_position@LIBHANDY_1_0 0.9.90
hdy_carousel_box_get_spacing@LIBHANDY_1_0 0.9.90
hdy_carousel_box_get_type@LIBHANDY_1_0 0.9.90
hdy_carousel_box_insert@LIBHANDY_1_0 0.9.90
hdy_carousel_box_is_animating@LIBHANDY_1_0 0.9.90
hdy_carousel_box_new@LIBHANDY_1_0 0.9.90
hdy_carousel_box_reorder@LIBHANDY_1_0 0.9.90
hdy_carousel_box_scroll_to@LIBHANDY_1_0 0.9.90
hdy_carousel_box_set_position@LIBHANDY_1_0 0.9.90
hdy_carousel_box_set_spacing@LIBHANDY_1_0 0.9.90
hdy_carousel_box_stop_animation@LIBHANDY_1_0 0.9.90
hdy_centering_policy_get_type@LIBHANDY_1_0 0.0.10
hdy_column_get_linear_growth_width@LIBHANDY_1_0 0.0.3
hdy_column_get_maximum_width@LIBHANDY_1_0 0.0.1
......@@ -123,21 +138,6 @@ libhandy-1.so.0 libhandy-1-0 #MINVER#
hdy_leaflet_transition_type_get_type@LIBHANDY_1_0 0.0.12
hdy_lerp@LIBHANDY_1_0 0.0.11
hdy_list_box_separator_header@LIBHANDY_1_0 0.0.6
hdy_paginator_box_animate@LIBHANDY_1_0 0.0.11
hdy_paginator_box_get_distance@LIBHANDY_1_0 0.0.11
hdy_paginator_box_get_n_pages@LIBHANDY_1_0 0.0.11
hdy_paginator_box_get_nth_child@LIBHANDY_1_0 0.0.12
hdy_paginator_box_get_position@LIBHANDY_1_0 0.0.11
hdy_paginator_box_get_spacing@LIBHANDY_1_0 0.0.11
hdy_paginator_box_get_type@LIBHANDY_1_0 0.0.11
hdy_paginator_box_insert@LIBHANDY_1_0 0.0.11
hdy_paginator_box_is_animating@LIBHANDY_1_0 0.0.11
hdy_paginator_box_new@LIBHANDY_1_0 0.0.11
hdy_paginator_box_reorder@LIBHANDY_1_0 0.0.11
hdy_paginator_box_scroll_to@LIBHANDY_1_0 0.0.11
hdy_paginator_box_set_position@LIBHANDY_1_0 0.0.11
hdy_paginator_box_set_spacing@LIBHANDY_1_0 0.0.11
hdy_paginator_box_stop_animation@LIBHANDY_1_0 0.0.11
hdy_paginator_get_allow_mouse_drag@LIBHANDY_1_0 0.0.12
hdy_paginator_get_animation_duration@LIBHANDY_1_0 0.0.11
hdy_paginator_get_center_content@LIBHANDY_1_0 0.0.11
......
......@@ -14,41 +14,41 @@
G_BEGIN_DECLS
#define HDY_TYPE_PAGINATOR_BOX (hdy_paginator_box_get_type())
#define HDY_TYPE_CAROUSEL_BOX (hdy_carousel_box_get_type())
G_DECLARE_FINAL_TYPE (HdyPaginatorBox, hdy_paginator_box, HDY, PAGINATOR_BOX, GtkContainer)
G_DECLARE_FINAL_TYPE (HdyCarouselBox, hdy_carousel_box, HDY, CAROUSEL_BOX, GtkContainer)
HdyPaginatorBox *hdy_paginator_box_new (void);
HdyCarouselBox *hdy_carousel_box_new (void);
void hdy_paginator_box_insert (HdyPaginatorBox *self,
GtkWidget *child,
gint position);
void hdy_paginator_box_reorder (HdyPaginatorBox *self,
GtkWidget *child,
gint position);
void hdy_carousel_box_insert (HdyCarouselBox *self,
GtkWidget *child,
gint position);
void hdy_carousel_box_reorder (HdyCarouselBox *self,
GtkWidget *child,
gint position);
void hdy_paginator_box_animate (HdyPaginatorBox *self,
gdouble position,
gint64 duration);
gboolean hdy_paginator_box_is_animating (HdyPaginatorBox *self);
void hdy_paginator_box_stop_animation (HdyPaginatorBox *self);
void hdy_carousel_box_animate (HdyCarouselBox *self,
gdouble position,
gint64 duration);
gboolean hdy_carousel_box_is_animating (HdyCarouselBox *self);
void hdy_carousel_box_stop_animation (HdyCarouselBox *self);
void hdy_paginator_box_scroll_to (HdyPaginatorBox *self,
GtkWidget *widget,
gint64 duration);
void hdy_carousel_box_scroll_to (HdyCarouselBox *self,
GtkWidget *widget,
gint64 duration);
guint hdy_paginator_box_get_n_pages (HdyPaginatorBox *self);
gdouble hdy_paginator_box_get_distance (HdyPaginatorBox *self);
guint hdy_carousel_box_get_n_pages (HdyCarouselBox *self);
gdouble hdy_carousel_box_get_distance (HdyCarouselBox *self);
gdouble hdy_paginator_box_get_position (HdyPaginatorBox *self);
void hdy_paginator_box_set_position (HdyPaginatorBox *self,
gdouble position);
gdouble hdy_carousel_box_get_position (HdyCarouselBox *self);
void hdy_carousel_box_set_position (HdyCarouselBox *self,
gdouble position);
guint hdy_paginator_box_get_spacing (HdyPaginatorBox *self);
void hdy_paginator_box_set_spacing (HdyPaginatorBox *self,
guint spacing);
guint hdy_carousel_box_get_spacing (HdyCarouselBox *self);
void hdy_carousel_box_set_spacing (HdyCarouselBox *self,
guint spacing);
GtkWidget *hdy_paginator_box_get_nth_child (HdyPaginatorBox *self,
guint n);
GtkWidget *hdy_carousel_box_get_nth_child (HdyCarouselBox *self,
guint n);
G_END_DECLS
This diff is collapsed.
......@@ -59,7 +59,7 @@ struct _HdyPaginator
GtkBox *box;
GtkBox *empty_box;
HdyPaginatorBox *scrolling_box;
HdyCarouselBox *scrolling_box;
GtkDrawingArea *indicators;
HdySwipeTracker *tracker;
......@@ -113,9 +113,9 @@ hdy_paginator_switch_child (HdySwipeable *swipeable,
HdyPaginator *self = HDY_PAGINATOR (swipeable);
GtkWidget *child;
child = hdy_paginator_box_get_nth_child (self->scrolling_box, index);
child = hdy_carousel_box_get_nth_child (self->scrolling_box, index);
hdy_paginator_box_scroll_to (self->scrolling_box, child, duration);
hdy_carousel_box_scroll_to (self->scrolling_box, child, duration);
}
static void
......@@ -128,9 +128,9 @@ hdy_paginator_begin_swipe (HdySwipeable *swipeable,
guint i, n_pages;
gdouble *points;
hdy_paginator_box_stop_animation (self->scrolling_box);
hdy_carousel_box_stop_animation (self->scrolling_box);
distance = hdy_paginator_box_get_distance (self->scrolling_box);
distance = hdy_carousel_box_get_distance (self->scrolling_box);
g_object_get (self->scrolling_box,
"position", &position,
"n-pages", &n_pages,
......@@ -151,7 +151,7 @@ hdy_paginator_update_swipe (HdySwipeable *swipeable,
{
HdyPaginator *self = HDY_PAGINATOR (swipeable);
hdy_paginator_box_set_position (self->scrolling_box, value);
hdy_carousel_box_set_position (self->scrolling_box, value);
}
static void
......@@ -162,11 +162,11 @@ hdy_paginator_end_swipe (HdySwipeable *swipeable,
HdyPaginator *self = HDY_PAGINATOR (swipeable);
if (duration == 0) {
hdy_paginator_box_set_position (self->scrolling_box, to);
hdy_carousel_box_set_position (self->scrolling_box, to);
return;
}
hdy_paginator_box_animate (self->scrolling_box, to, duration);
hdy_carousel_box_animate (self->scrolling_box, to, duration);
}
static void
......@@ -197,12 +197,12 @@ notify_spacing_cb (HdyPaginator *self,
static void
animation_stopped_cb (HdyPaginator *self,
HdyPaginatorBox *box)
HdyCarouselBox *box)
{
gdouble position;
gint index;
position = hdy_paginator_box_get_position (self->scrolling_box);
position = hdy_carousel_box_get_position (self->scrolling_box);
index = round (position);
g_signal_emit (self, signals[SIGNAL_PAGE_CHANGED], 0, index);
......@@ -528,7 +528,7 @@ handle_discrete_scroll_event (HdyPaginator *self,
index += (gint) round (hdy_paginator_get_position (self));
index = CLAMP (index, 0, (gint) hdy_paginator_get_n_pages (self) - 1);
hdy_paginator_scroll_to (self, hdy_paginator_box_get_nth_child (self->scrolling_box, index));
hdy_paginator_scroll_to (self, hdy_carousel_box_get_nth_child (self->scrolling_box, index));
/* Don't allow the delay to go lower than 250ms */
duration = MIN (self->animation_duration, DEFAULT_DURATION);
......@@ -963,7 +963,7 @@ hdy_paginator_class_init (HdyPaginatorClass *klass)
static void
hdy_paginator_init (HdyPaginator *self)
{
g_type_ensure (HDY_TYPE_PAGINATOR_BOX);
g_type_ensure (HDY_TYPE_CAROUSEL_BOX);
gtk_widget_init_template (GTK_WIDGET (self));
self->animation_duration = DEFAULT_DURATION;
......@@ -1010,7 +1010,7 @@ hdy_paginator_prepend (HdyPaginator *self,
{
g_return_if_fail (HDY_IS_PAGINATOR (self));
hdy_paginator_box_insert (self->scrolling_box, widget, 0);
hdy_carousel_box_insert (self->scrolling_box, widget, 0);
}
/**
......@@ -1033,7 +1033,7 @@ hdy_paginator_insert (HdyPaginator *self,
{
g_return_if_fail (HDY_IS_PAGINATOR (self));
hdy_paginator_box_insert (self->scrolling_box, widget, position);
hdy_carousel_box_insert (self->scrolling_box, widget, position);
}
/**
* hdy_paginator_reorder:
......@@ -1056,7 +1056,7 @@ hdy_paginator_reorder (HdyPaginator *self,
g_return_if_fail (HDY_IS_PAGINATOR (self));
g_return_if_fail (GTK_IS_WIDGET (child));
hdy_paginator_box_reorder (self->scrolling_box, child, position);
hdy_carousel_box_reorder (self->scrolling_box, child, position);
}
/**
......@@ -1103,7 +1103,7 @@ hdy_paginator_scroll_to_full (HdyPaginator *self,
n = g_list_index (children, widget);
g_list_free (children);
hdy_paginator_box_scroll_to (self->scrolling_box, widget,
hdy_carousel_box_scroll_to (self->scrolling_box, widget,
duration);
hdy_swipeable_emit_switch_child (HDY_SWIPEABLE (self), n, duration);
}
......@@ -1123,7 +1123,7 @@ hdy_paginator_get_n_pages (HdyPaginator *self)
{
g_return_val_if_fail (HDY_IS_PAGINATOR (self), 0);
return hdy_paginator_box_get_n_pages (self->scrolling_box);
return hdy_carousel_box_get_n_pages (self->scrolling_box);
}
/**
......@@ -1141,7 +1141,7 @@ hdy_paginator_get_position (HdyPaginator *self)
{
g_return_val_if_fail (HDY_IS_PAGINATOR (self), 0);
return hdy_paginator_box_get_position (self->scrolling_box);
return hdy_carousel_box_get_position (self->scrolling_box);
}
/**
......@@ -1337,7 +1337,7 @@ hdy_paginator_get_spacing (HdyPaginator *self)
{
g_return_val_if_fail (HDY_IS_PAGINATOR (self), 0);
return hdy_paginator_box_get_spacing (self->scrolling_box);
return hdy_carousel_box_get_spacing (self->scrolling_box);
}
/**
......@@ -1355,7 +1355,7 @@ hdy_paginator_set_spacing (HdyPaginator *self,
{
g_return_if_fail (HDY_IS_PAGINATOR (self));
hdy_paginator_box_set_spacing (self->scrolling_box, spacing);
hdy_carousel_box_set_spacing (self->scrolling_box, spacing);
}
/**
......
......@@ -14,7 +14,7 @@
</object>
</child>
<child>
<object class="HdyPaginatorBox" id="scrolling_box">
<object class="HdyCarouselBox" id="scrolling_box">
<property name="visible">True</property>
<property name="expand">True</property>
<signal name="notify::n-pages" handler="notify_n_pages_cb" swapped="true"/>
......
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