summaryrefslogtreecommitdiff
path: root/src/book-view.c
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2012-04-04 21:01:19 +0200
committerAlessio Treglia <alessio@debian.org>2012-04-04 21:01:19 +0200
commitdf5e703852dbf7f1da95b3d73414280affd4f556 (patch)
treebcf5e0532558083d88846568009ce97b600c1bdb /src/book-view.c
parent341fc38f623905237c4bef4bd49c43a669e4376b (diff)
parent3423cc86f86a823a318ea72981dc8eb889fc7987 (diff)
Merge tag 'upstream/3.4.0'
Upstream version 3.4.0
Diffstat (limited to 'src/book-view.c')
-rw-r--r--src/book-view.c192
1 files changed, 98 insertions, 94 deletions
diff --git a/src/book-view.c b/src/book-view.c
index d7d52e1..b2b33f9 100644
--- a/src/book-view.c
+++ b/src/book-view.c
@@ -1,4 +1,4 @@
-/* book-view.c generated by valac 0.14.0, the Vala compiler
+/* book-view.c generated by valac 0.15.2, the Vala compiler
* generated from book-view.vala, do not modify */
/*
@@ -86,7 +86,7 @@ struct _BookViewPrivate {
gboolean show_selected_page;
PageView* selected_page;
GtkWidget* drawing_area;
- GtkHScrollbar* scroll;
+ GtkScrollbar* scroll;
GtkAdjustment* adjustment;
GdkCursorType cursor;
};
@@ -318,12 +318,12 @@ BookView* book_view_construct (GType object_type, Book* book) {
GtkWidget* _tmp26_;
GtkWidget* _tmp27_;
GtkWidget* _tmp28_;
- GtkHScrollbar* _tmp29_;
- GtkHScrollbar* _tmp30_;
- GtkHScrollbar* _tmp31_;
+ GtkScrollbar* _tmp29_;
+ GtkScrollbar* _tmp30_;
+ GtkScrollbar* _tmp31_;
GtkAdjustment* _tmp32_ = NULL;
GtkAdjustment* _tmp33_;
- GtkHScrollbar* _tmp34_;
+ GtkScrollbar* _tmp34_;
GtkWidget* _tmp35_;
GtkWidget* _tmp36_;
GtkWidget* _tmp37_;
@@ -413,7 +413,7 @@ BookView* book_view_construct (GType object_type, Book* book) {
gtk_widget_set_events (_tmp27_, (gint) (((((GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK) | GDK_BUTTON_RELEASE_MASK) | GDK_FOCUS_CHANGE_MASK) | GDK_STRUCTURE_MASK) | GDK_SCROLL_MASK));
_tmp28_ = self->priv->drawing_area;
gtk_box_pack_start ((GtkBox*) self, _tmp28_, TRUE, TRUE, (guint) 0);
- _tmp29_ = (GtkHScrollbar*) gtk_hscrollbar_new (NULL);
+ _tmp29_ = (GtkScrollbar*) gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, NULL);
_tmp30_ = g_object_ref_sink (_tmp29_);
_g_object_unref0 (self->priv->scroll);
self->priv->scroll = _tmp30_;
@@ -793,7 +793,7 @@ static void book_view_show_page_view (BookView* self, PageView* page) {
if (_tmp1_ == NULL) {
_tmp0_ = TRUE;
} else {
- GtkHScrollbar* _tmp2_;
+ GtkScrollbar* _tmp2_;
gboolean _tmp3_ = FALSE;
_tmp2_ = self->priv->scroll;
_tmp3_ = gtk_widget_get_visible ((GtkWidget*) _tmp2_);
@@ -1418,7 +1418,7 @@ static void book_view_layout (BookView* self) {
gboolean _tmp37_ = FALSE;
gboolean _tmp38_;
gboolean _tmp41_;
- GtkHScrollbar* _tmp43_;
+ GtkScrollbar* _tmp43_;
_tmp22_ = allocation;
_tmp23_ = _tmp22_.height;
height = _tmp23_;
@@ -1459,7 +1459,7 @@ static void book_view_layout (BookView* self) {
_tmp43_ = self->priv->scroll;
gtk_widget_show ((GtkWidget*) _tmp43_);
} else {
- GtkHScrollbar* _tmp44_;
+ GtkScrollbar* _tmp44_;
gint _tmp45_;
GtkAllocation _tmp46_;
gint _tmp47_;
@@ -1620,7 +1620,7 @@ static gboolean book_view_draw_cb (BookView* self, GtkWidget* widget, cairo_t* c
_tmp36_ = page_view_get_selected (_tmp35_);
if (_tmp36_) {
GtkWidget* _tmp37_;
- GtkStyle* _tmp38_ = NULL;
+ GtkStyleContext* _tmp38_ = NULL;
cairo_t* _tmp39_;
PageView* _tmp40_;
gint _tmp41_ = 0;
@@ -1632,7 +1632,7 @@ static gboolean book_view_draw_cb (BookView* self, GtkWidget* widget, cairo_t* c
PageView* _tmp47_;
gint _tmp48_ = 0;
_tmp37_ = self->priv->drawing_area;
- _tmp38_ = gtk_widget_get_style (_tmp37_);
+ _tmp38_ = gtk_widget_get_style_context (_tmp37_);
_tmp39_ = context;
_tmp40_ = page;
_tmp41_ = page_view_get_x_offset (_tmp40_);
@@ -1643,7 +1643,7 @@ static gboolean book_view_draw_cb (BookView* self, GtkWidget* widget, cairo_t* c
_tmp46_ = page_view_get_width (_tmp45_);
_tmp47_ = page;
_tmp48_ = page_view_get_height (_tmp47_);
- gtk_paint_focus (_tmp38_, _tmp39_, GTK_STATE_SELECTED, NULL, NULL, _tmp41_ - _tmp42_, _tmp44_, _tmp46_, _tmp48_);
+ gtk_render_focus (_tmp38_, _tmp39_, (gdouble) (_tmp41_ - _tmp42_), (gdouble) _tmp44_, (gdouble) _tmp46_, (gdouble) _tmp48_);
}
_page_view_unref0 (page);
}
@@ -1658,116 +1658,120 @@ static PageView* book_view_get_page_at (BookView* self, gint x, gint y, gint* x_
gint _vala_x_ = 0;
gint _vala_y_ = 0;
PageView* result = NULL;
+ gint _tmp0_;
g_return_val_if_fail (self != NULL, NULL);
+ _vala_y_ = 0;
+ _tmp0_ = _vala_y_;
+ _vala_x_ = _tmp0_;
{
gint i;
i = 0;
{
- gboolean _tmp0_;
- _tmp0_ = TRUE;
+ gboolean _tmp1_;
+ _tmp1_ = TRUE;
while (TRUE) {
- gboolean _tmp1_;
- gint _tmp3_;
- Book* _tmp4_;
- guint _tmp5_ = 0U;
- gint _tmp6_;
- PageView* _tmp7_ = NULL;
+ gboolean _tmp2_;
+ gint _tmp4_;
+ Book* _tmp5_;
+ guint _tmp6_ = 0U;
+ gint _tmp7_;
+ PageView* _tmp8_ = NULL;
PageView* page;
- PageView* _tmp8_;
- gint _tmp9_ = 0;
+ PageView* _tmp9_;
+ gint _tmp10_ = 0;
gint left;
- gint _tmp10_;
- PageView* _tmp11_;
- gint _tmp12_ = 0;
+ gint _tmp11_;
+ PageView* _tmp12_;
+ gint _tmp13_ = 0;
gint right;
- PageView* _tmp13_;
- gint _tmp14_ = 0;
+ PageView* _tmp14_;
+ gint _tmp15_ = 0;
gint top;
- gint _tmp15_;
- PageView* _tmp16_;
- gint _tmp17_ = 0;
+ gint _tmp16_;
+ PageView* _tmp17_;
+ gint _tmp18_ = 0;
gint bottom;
- gboolean _tmp18_ = FALSE;
gboolean _tmp19_ = FALSE;
gboolean _tmp20_ = FALSE;
- gint _tmp21_;
+ gboolean _tmp21_ = FALSE;
gint _tmp22_;
- gboolean _tmp25_;
- gboolean _tmp28_;
- gboolean _tmp31_;
- _tmp1_ = _tmp0_;
- if (!_tmp1_) {
- gint _tmp2_;
- _tmp2_ = i;
- i = _tmp2_ + 1;
+ gint _tmp23_;
+ gboolean _tmp26_;
+ gboolean _tmp29_;
+ gboolean _tmp32_;
+ _tmp2_ = _tmp1_;
+ if (!_tmp2_) {
+ gint _tmp3_;
+ _tmp3_ = i;
+ i = _tmp3_ + 1;
}
- _tmp0_ = FALSE;
- _tmp3_ = i;
- _tmp4_ = self->priv->book;
- _tmp5_ = book_get_n_pages (_tmp4_);
- if (!(((guint) _tmp3_) < _tmp5_)) {
+ _tmp1_ = FALSE;
+ _tmp4_ = i;
+ _tmp5_ = self->priv->book;
+ _tmp6_ = book_get_n_pages (_tmp5_);
+ if (!(((guint) _tmp4_) < _tmp6_)) {
break;
}
- _tmp6_ = i;
- _tmp7_ = book_view_get_nth_page (self, _tmp6_);
- page = _tmp7_;
- _tmp8_ = page;
- _tmp9_ = page_view_get_x_offset (_tmp8_);
- left = _tmp9_;
- _tmp10_ = left;
- _tmp11_ = page;
- _tmp12_ = page_view_get_width (_tmp11_);
- right = _tmp10_ + _tmp12_;
- _tmp13_ = page;
- _tmp14_ = page_view_get_y_offset (_tmp13_);
- top = _tmp14_;
- _tmp15_ = top;
- _tmp16_ = page;
- _tmp17_ = page_view_get_height (_tmp16_);
- bottom = _tmp15_ + _tmp17_;
- _tmp21_ = x;
- _tmp22_ = left;
- if (_tmp21_ >= _tmp22_) {
- gint _tmp23_;
+ _tmp7_ = i;
+ _tmp8_ = book_view_get_nth_page (self, _tmp7_);
+ page = _tmp8_;
+ _tmp9_ = page;
+ _tmp10_ = page_view_get_x_offset (_tmp9_);
+ left = _tmp10_;
+ _tmp11_ = left;
+ _tmp12_ = page;
+ _tmp13_ = page_view_get_width (_tmp12_);
+ right = _tmp11_ + _tmp13_;
+ _tmp14_ = page;
+ _tmp15_ = page_view_get_y_offset (_tmp14_);
+ top = _tmp15_;
+ _tmp16_ = top;
+ _tmp17_ = page;
+ _tmp18_ = page_view_get_height (_tmp17_);
+ bottom = _tmp16_ + _tmp18_;
+ _tmp22_ = x;
+ _tmp23_ = left;
+ if (_tmp22_ >= _tmp23_) {
gint _tmp24_;
- _tmp23_ = x;
- _tmp24_ = right;
- _tmp20_ = _tmp23_ <= _tmp24_;
+ gint _tmp25_;
+ _tmp24_ = x;
+ _tmp25_ = right;
+ _tmp21_ = _tmp24_ <= _tmp25_;
} else {
- _tmp20_ = FALSE;
+ _tmp21_ = FALSE;
}
- _tmp25_ = _tmp20_;
- if (_tmp25_) {
- gint _tmp26_;
+ _tmp26_ = _tmp21_;
+ if (_tmp26_) {
gint _tmp27_;
- _tmp26_ = y;
- _tmp27_ = top;
- _tmp19_ = _tmp26_ >= _tmp27_;
+ gint _tmp28_;
+ _tmp27_ = y;
+ _tmp28_ = top;
+ _tmp20_ = _tmp27_ >= _tmp28_;
} else {
- _tmp19_ = FALSE;
+ _tmp20_ = FALSE;
}
- _tmp28_ = _tmp19_;
- if (_tmp28_) {
- gint _tmp29_;
+ _tmp29_ = _tmp20_;
+ if (_tmp29_) {
gint _tmp30_;
- _tmp29_ = y;
- _tmp30_ = bottom;
- _tmp18_ = _tmp29_ <= _tmp30_;
+ gint _tmp31_;
+ _tmp30_ = y;
+ _tmp31_ = bottom;
+ _tmp19_ = _tmp30_ <= _tmp31_;
} else {
- _tmp18_ = FALSE;
+ _tmp19_ = FALSE;
}
- _tmp31_ = _tmp18_;
- if (_tmp31_) {
- gint _tmp32_;
+ _tmp32_ = _tmp19_;
+ if (_tmp32_) {
gint _tmp33_;
gint _tmp34_;
gint _tmp35_;
- _tmp32_ = x;
- _tmp33_ = left;
- _vala_x_ = _tmp32_ - _tmp33_;
- _tmp34_ = y;
- _tmp35_ = top;
- _vala_y_ = _tmp34_ - _tmp35_;
+ gint _tmp36_;
+ _tmp33_ = x;
+ _tmp34_ = left;
+ _vala_x_ = _tmp33_ - _tmp34_;
+ _tmp35_ = y;
+ _tmp36_ = top;
+ _vala_y_ = _tmp35_ - _tmp36_;
result = page;
if (x_) {
*x_ = _vala_x_;