X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-scrollable.h;h=c2d16dbdbff81987b293deaba7badacb5b38689f;hb=43720d393ceb644b08011fc1d8b34ebf3ba4d8cc;hp=e38803833561aabfb1110759bd68a97f135be1d1;hpb=9a7ebf2968206445836394a24d1710528c58c738;p=modest diff --git a/src/widgets/modest-scrollable.h b/src/widgets/modest-scrollable.h index e388038..c2d16db 100644 --- a/src/widgets/modest-scrollable.h +++ b/src/widgets/modest-scrollable.h @@ -53,21 +53,46 @@ struct _ModestScrollableIface GtkAdjustment * (*get_hadjustment) (ModestScrollable *self); void (*scroll_to) (ModestScrollable *self, const gint x, const gint y); void (*jump_to) (ModestScrollable *self, const gint x, const gint y); + GtkPolicyType (*get_vertical_policy) (ModestScrollable *self); + GtkPolicyType (*get_horizontal_policy) (ModestScrollable *self); + void (*set_vertical_policy) (ModestScrollable *self, GtkPolicyType policy); + void (*set_horizontal_policy) (ModestScrollable *self, GtkPolicyType policy); /* properties */ - /* hscrollbar-policy; */ - /* initial-hint; */ - /* vscrollbar-policy; */ + /* horizontal-policy; */ + /* vertical-policy; */ + /* movement-mode */ + /* horizontal-max-overshoot */ + /* vertical-max-overshoot */ + }; GType modest_scrollable_get_type (void); +typedef enum { + MODEST_MOVEMENT_MODE_HORIZONTAL = 1 << 1, + MODEST_MOVEMENT_MODE_VERTICAL = 1 << 2, + MODEST_MOVEMENT_MODE_BOTH = 0x000006 +} ModestMovementMode; + + +GType modest_movement_mode_get_type (void); +#define MODEST_TYPE_MOVEMENT_MODE (modest_movement_mode_get_type()) + + +/* virtual methods */ void modest_scrollable_add_with_viewport (ModestScrollable *self, GtkWidget *widget); GtkAdjustment * modest_scrollable_get_vadjustment (ModestScrollable *self); GtkAdjustment * modest_scrollable_get_hadjustment (ModestScrollable *self); void modest_scrollable_scroll_to (ModestScrollable *self, const gint x, const gint y); void modest_scrollable_jump_to (ModestScrollable *self, const gint x, const gint y); +GtkPolicyType modest_scrollable_get_vertical_policy (ModestScrollable *self); +GtkPolicyType modest_scrollable_get_horizontal_policy (ModestScrollable *self); +void modest_scrollable_set_vertical_policy (ModestScrollable *self, GtkPolicyType policy); +void modest_scrollable_set_horizontal_policy (ModestScrollable *self, GtkPolicyType policy); +/* utils */ +void modest_scrollable_scroll (ModestScrollable *self, gint horizontal, gint vertical); G_END_DECLS