summaryrefslogtreecommitdiff
path: root/src/book-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/book-view.c')
-rw-r--r--src/book-view.c125
1 files changed, 64 insertions, 61 deletions
diff --git a/src/book-view.c b/src/book-view.c
index 7c44f03..303ba61 100644
--- a/src/book-view.c
+++ b/src/book-view.c
@@ -1,4 +1,4 @@
-/* book-view.c generated by valac 0.26.2, the Vala compiler
+/* book-view.c generated by valac 0.28.0, the Vala compiler
* generated from book-view.vala, do not modify */
/*
@@ -3014,11 +3014,12 @@ static void book_view_set_cursor (BookView* self, GdkCursorType cursor) {
GdkCursorType _tmp0_ = 0;
GdkCursorType _tmp1_ = 0;
GdkCursorType _tmp2_ = 0;
- GdkCursorType _tmp3_ = 0;
- GdkCursor* _tmp4_ = NULL;
- GtkWidget* _tmp5_ = NULL;
- GdkWindow* _tmp6_ = NULL;
- GdkCursor* _tmp7_ = NULL;
+ GdkDisplay* _tmp3_ = NULL;
+ GdkCursorType _tmp4_ = 0;
+ GdkCursor* _tmp5_ = NULL;
+ GtkWidget* _tmp6_ = NULL;
+ GdkWindow* _tmp7_ = NULL;
+ GdkCursor* _tmp8_ = NULL;
#line 522 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
@@ -3031,31 +3032,33 @@ static void book_view_set_cursor (BookView* self, GdkCursorType cursor) {
_g_object_unref0 (c);
#line 527 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return;
-#line 3035 "book-view.c"
+#line 3036 "book-view.c"
}
#line 528 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = cursor;
#line 528 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->cursor = _tmp2_;
#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp3_ = cursor;
+ _tmp3_ = gtk_widget_get_display ((GtkWidget*) self);
#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp4_ = gdk_cursor_new (_tmp3_);
+ _tmp4_ = cursor;
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = gdk_cursor_new_for_display (_tmp3_, _tmp4_);
#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (c);
#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- c = _tmp4_;
+ c = _tmp5_;
#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp5_ = self->priv->drawing_area;
+ _tmp6_ = self->priv->drawing_area;
#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp6_ = gtk_widget_get_window (_tmp5_);
+ _tmp7_ = gtk_widget_get_window (_tmp6_);
#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp7_ = c;
+ _tmp8_ = c;
#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- gdk_window_set_cursor (_tmp6_, _tmp7_);
+ gdk_window_set_cursor (_tmp7_, _tmp8_);
#line 522 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (c);
-#line 3059 "book-view.c"
+#line 3062 "book-view.c"
}
@@ -3077,7 +3080,7 @@ static gboolean book_view_motion_cb (BookView* self, GtkWidget* widget, GdkEvent
_tmp1_ = self->priv->selected_page_view;
#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp1_ != NULL) {
-#line 3081 "book-view.c"
+#line 3084 "book-view.c"
GdkEventMotion* _tmp2_ = NULL;
GdkModifierType _tmp3_ = 0;
#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
@@ -3086,15 +3089,15 @@ static gboolean book_view_motion_cb (BookView* self, GtkWidget* widget, GdkEvent
_tmp3_ = _tmp2_->state;
#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = (_tmp3_ & GDK_BUTTON1_MASK) != 0;
-#line 3090 "book-view.c"
+#line 3093 "book-view.c"
} else {
#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = FALSE;
-#line 3094 "book-view.c"
+#line 3097 "book-view.c"
}
#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp0_) {
-#line 3098 "book-view.c"
+#line 3101 "book-view.c"
gint x = 0;
GdkEventMotion* _tmp4_ = NULL;
gdouble _tmp5_ = 0.0;
@@ -3159,7 +3162,7 @@ static gboolean book_view_motion_cb (BookView* self, GtkWidget* widget, GdkEvent
_tmp21_ = _tmp20_;
#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
cursor = _tmp21_;
-#line 3163 "book-view.c"
+#line 3166 "book-view.c"
} else {
gint x = 0;
gint y = 0;
@@ -3198,7 +3201,7 @@ static gboolean book_view_motion_cb (BookView* self, GtkWidget* widget, GdkEvent
_tmp31_ = over_page;
#line 550 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp31_ != NULL) {
-#line 3202 "book-view.c"
+#line 3205 "book-view.c"
PageView* _tmp32_ = NULL;
gint _tmp33_ = 0;
gint _tmp34_ = 0;
@@ -3221,11 +3224,11 @@ static gboolean book_view_motion_cb (BookView* self, GtkWidget* widget, GdkEvent
_tmp37_ = _tmp36_;
#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
cursor = _tmp37_;
-#line 3225 "book-view.c"
+#line 3228 "book-view.c"
}
#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (over_page);
-#line 3229 "book-view.c"
+#line 3232 "book-view.c"
}
#line 557 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp38_ = cursor;
@@ -3235,7 +3238,7 @@ static gboolean book_view_motion_cb (BookView* self, GtkWidget* widget, GdkEvent
result = FALSE;
#line 559 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3239 "book-view.c"
+#line 3242 "book-view.c"
}
@@ -3257,7 +3260,7 @@ static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey
switch (_tmp1_) {
#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
case 0xff50:
-#line 3261 "book-view.c"
+#line 3264 "book-view.c"
{
Book* _tmp2_ = NULL;
Page* _tmp3_ = NULL;
@@ -3276,11 +3279,11 @@ static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey
result = TRUE;
#line 568 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3280 "book-view.c"
+#line 3283 "book-view.c"
}
#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
case 0xff51:
-#line 3284 "book-view.c"
+#line 3287 "book-view.c"
{
PageView* _tmp5_ = NULL;
PageView* _tmp6_ = NULL;
@@ -3299,11 +3302,11 @@ static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey
result = TRUE;
#line 571 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3303 "book-view.c"
+#line 3306 "book-view.c"
}
#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
case 0xff53:
-#line 3307 "book-view.c"
+#line 3310 "book-view.c"
{
PageView* _tmp8_ = NULL;
PageView* _tmp9_ = NULL;
@@ -3322,11 +3325,11 @@ static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey
result = TRUE;
#line 574 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3326 "book-view.c"
+#line 3329 "book-view.c"
}
#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
case 0xFF57:
-#line 3330 "book-view.c"
+#line 3333 "book-view.c"
{
Book* _tmp11_ = NULL;
Book* _tmp12_ = NULL;
@@ -3354,7 +3357,7 @@ static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey
result = TRUE;
#line 577 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3358 "book-view.c"
+#line 3361 "book-view.c"
}
default:
{
@@ -3362,7 +3365,7 @@ static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey
result = FALSE;
#line 580 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3366 "book-view.c"
+#line 3369 "book-view.c"
}
}
}
@@ -3385,7 +3388,7 @@ static gboolean book_view_focus_cb (BookView* self, GtkWidget* widget, GdkEventF
result = FALSE;
#line 587 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3389 "book-view.c"
+#line 3392 "book-view.c"
}
@@ -3401,7 +3404,7 @@ static void book_view_scroll_cb (BookView* self, GtkAdjustment* adjustment) {
if (!_tmp0_) {
#line 593 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_redraw (self);
-#line 3405 "book-view.c"
+#line 3408 "book-view.c"
}
}
@@ -3414,7 +3417,7 @@ void book_view_redraw (BookView* self) {
_tmp0_ = self->priv->drawing_area;
#line 598 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_queue_draw (_tmp0_);
-#line 3418 "book-view.c"
+#line 3421 "book-view.c"
}
@@ -3434,7 +3437,7 @@ void book_view_select_next_page (BookView* self) {
book_view_select_page_view (self, _tmp2_);
#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (_tmp2_);
-#line 3438 "book-view.c"
+#line 3441 "book-view.c"
}
@@ -3454,7 +3457,7 @@ void book_view_select_prev_page (BookView* self) {
book_view_select_page_view (self, _tmp2_);
#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (_tmp2_);
-#line 3458 "book-view.c"
+#line 3461 "book-view.c"
}
@@ -3469,14 +3472,14 @@ Book* book_view_get_book (BookView* self) {
result = _tmp0_;
#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3473 "book-view.c"
+#line 3476 "book-view.c"
}
static gpointer _book_ref0 (gpointer self) {
#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return self ? book_ref (self) : NULL;
-#line 3480 "book-view.c"
+#line 3483 "book-view.c"
}
@@ -3495,7 +3498,7 @@ static void book_view_set_book (BookView* self, Book* value) {
self->priv->_book = _tmp1_;
#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_object_notify ((GObject *) self, "book");
-#line 3499 "book-view.c"
+#line 3502 "book-view.c"
}
@@ -3508,7 +3511,7 @@ Page* book_view_get_selected_page (BookView* self) {
_tmp0_ = self->priv->selected_page_view;
#line 32 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp0_ != NULL) {
-#line 3512 "book-view.c"
+#line 3515 "book-view.c"
PageView* _tmp1_ = NULL;
Page* _tmp2_ = NULL;
Page* _tmp3_ = NULL;
@@ -3522,13 +3525,13 @@ Page* book_view_get_selected_page (BookView* self) {
result = _tmp3_;
#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3526 "book-view.c"
+#line 3529 "book-view.c"
} else {
#line 35 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = NULL;
#line 35 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3532 "book-view.c"
+#line 3535 "book-view.c"
}
}
@@ -3550,13 +3553,13 @@ void book_view_set_selected_page (BookView* self, Page* value) {
if (_tmp1_ == _tmp2_) {
#line 40 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return;
-#line 3554 "book-view.c"
+#line 3557 "book-view.c"
}
#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = value;
#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp3_ != NULL) {
-#line 3560 "book-view.c"
+#line 3563 "book-view.c"
GHashTable* _tmp4_ = NULL;
Page* _tmp5_ = NULL;
gconstpointer _tmp6_ = NULL;
@@ -3568,15 +3571,15 @@ void book_view_set_selected_page (BookView* self, Page* value) {
_tmp6_ = g_hash_table_lookup (_tmp4_, _tmp5_);
#line 43 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_select_page_view (self, (PageView*) _tmp6_);
-#line 3572 "book-view.c"
+#line 3575 "book-view.c"
} else {
#line 45 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_select_page_view (self, NULL);
-#line 3576 "book-view.c"
+#line 3579 "book-view.c"
}
#line 37 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_object_notify ((GObject *) self, "selected-page");
-#line 3580 "book-view.c"
+#line 3583 "book-view.c"
}
@@ -3594,7 +3597,7 @@ gint book_view_get_x_offset (BookView* self) {
result = (gint) _tmp1_;
#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3598 "book-view.c"
+#line 3601 "book-view.c"
}
@@ -3611,7 +3614,7 @@ void book_view_set_x_offset (BookView* self, gint value) {
gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_);
#line 68 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_object_notify ((GObject *) self, "x-offset");
-#line 3615 "book-view.c"
+#line 3618 "book-view.c"
}
@@ -3630,19 +3633,19 @@ static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * ret
data1 = closure->data;
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
data2 = param_values->data[0].v_pointer;
-#line 3634 "book-view.c"
+#line 3637 "book-view.c"
} else {
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
data1 = param_values->data[0].v_pointer;
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
data2 = closure->data;
-#line 3640 "book-view.c"
+#line 3643 "book-view.c"
}
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
callback = (GMarshalFunc_VOID__PAGE) (marshal_data ? marshal_data : cc->callback);
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
callback (data1, value_get_page (param_values + 1), data2);
-#line 3646 "book-view.c"
+#line 3649 "book-view.c"
}
@@ -3669,7 +3672,7 @@ static void book_view_class_init (BookViewClass * klass) {
g_signal_new ("show_page", TYPE_BOOK_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__PAGE, G_TYPE_NONE, 1, TYPE_PAGE);
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_new ("show_menu", TYPE_BOOK_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-#line 3673 "book-view.c"
+#line 3676 "book-view.c"
}
@@ -3678,7 +3681,7 @@ static void book_view_instance_init (BookView * self) {
self->priv = BOOK_VIEW_GET_PRIVATE (self);
#line 27 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->selected_page_view = NULL;
-#line 3682 "book-view.c"
+#line 3685 "book-view.c"
}
@@ -3804,7 +3807,7 @@ static void book_view_finalize (GObject* obj) {
_g_object_unref0 (self->priv->adjustment);
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
G_OBJECT_CLASS (book_view_parent_class)->finalize (obj);
-#line 3808 "book-view.c"
+#line 3811 "book-view.c"
}
@@ -3843,13 +3846,13 @@ static void _vala_book_view_get_property (GObject * object, guint property_id, G
g_value_set_int (value, book_view_get_x_offset (self));
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 3847 "book-view.c"
+#line 3850 "book-view.c"
default:
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 3853 "book-view.c"
+#line 3856 "book-view.c"
}
}
@@ -3877,13 +3880,13 @@ static void _vala_book_view_set_property (GObject * object, guint property_id, c
book_view_set_x_offset (self, g_value_get_int (value));
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 3881 "book-view.c"
+#line 3884 "book-view.c"
default:
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 3887 "book-view.c"
+#line 3890 "book-view.c"
}
}