diff options
Diffstat (limited to 'src/util/ui.c')
| -rw-r--r-- | src/util/ui.c | 151 | 
1 files changed, 59 insertions, 92 deletions
| diff --git a/src/util/ui.c b/src/util/ui.c index 8a7e0d7..98f35de 100644 --- a/src/util/ui.c +++ b/src/util/ui.c @@ -1,4 +1,4 @@ -/* ui.c generated by valac 0.36.6, the Vala compiler +/* ui.c generated by valac 0.40.4, the Vala compiler   * generated from ui.vala, do not modify */  /* Copyright 2016 Software Freedom Conservancy Inc. @@ -7,6 +7,7 @@   * (version 2.1 or later).  See the COPYING file in this distribution.   */ +  #include <glib.h>  #include <glib-object.h>  #include "shotwell-plugin-dev-1.0.h" @@ -48,12 +49,18 @@ GType direction_get_type (void) G_GNUC_CONST;  SpitTransitionsDirection direction_to_transition_direction (Direction self);  const gchar* direction_to_string (Direction self);  void spin_event_loop (void); -AdjustmentRelation get_adjustment_relation (GtkAdjustment* adjustment, gint value); -void get_adjustment_page (GtkAdjustment* hadj, GtkAdjustment* vadj, GdkRectangle* result); -gboolean has_only_key_modifier (GdkModifierType field, GdkModifierType mask); - - -GType adjustment_relation_get_type (void) { +AdjustmentRelation get_adjustment_relation (GtkAdjustment* adjustment, +                                            gint value); +void get_adjustment_page (GtkAdjustment* hadj, +                          GtkAdjustment* vadj, +                          GdkRectangle* result); +gboolean has_only_key_modifier (GdkModifierType field, +                                GdkModifierType mask); + + +GType +adjustment_relation_get_type (void) +{  	static volatile gsize adjustment_relation_type_id__volatile = 0;  	if (g_once_init_enter (&adjustment_relation_type_id__volatile)) {  		static const GEnumValue values[] = {{ADJUSTMENT_RELATION_BELOW, "ADJUSTMENT_RELATION_BELOW", "below"}, {ADJUSTMENT_RELATION_IN_RANGE, "ADJUSTMENT_RELATION_IN_RANGE", "in-range"}, {ADJUSTMENT_RELATION_ABOVE, "ADJUSTMENT_RELATION_ABOVE", "above"}, {0, NULL, NULL}}; @@ -65,7 +72,9 @@ GType adjustment_relation_get_type (void) {  } -GType compass_point_get_type (void) { +GType +compass_point_get_type (void) +{  	static volatile gsize compass_point_type_id__volatile = 0;  	if (g_once_init_enter (&compass_point_type_id__volatile)) {  		static const GEnumValue values[] = {{COMPASS_POINT_NORTH, "COMPASS_POINT_NORTH", "north"}, {COMPASS_POINT_SOUTH, "COMPASS_POINT_SOUTH", "south"}, {COMPASS_POINT_EAST, "COMPASS_POINT_EAST", "east"}, {COMPASS_POINT_WEST, "COMPASS_POINT_WEST", "west"}, {0, NULL, NULL}}; @@ -77,29 +86,31 @@ GType compass_point_get_type (void) {  } -SpitTransitionsDirection direction_to_transition_direction (Direction self) { +SpitTransitionsDirection +direction_to_transition_direction (Direction self) +{  	SpitTransitionsDirection result = 0;  #line 25 "/home/jens/Source/shotwell/src/util/ui.vala"  	switch (self) {  #line 25 "/home/jens/Source/shotwell/src/util/ui.vala"  		case DIRECTION_FORWARD: -#line 87 "ui.c" +#line 98 "ui.c"  		{  #line 27 "/home/jens/Source/shotwell/src/util/ui.vala"  			result = SPIT_TRANSITIONS_DIRECTION_FORWARD;  #line 27 "/home/jens/Source/shotwell/src/util/ui.vala"  			return result; -#line 93 "ui.c" +#line 104 "ui.c"  		}  #line 25 "/home/jens/Source/shotwell/src/util/ui.vala"  		case DIRECTION_BACKWARD: -#line 97 "ui.c" +#line 108 "ui.c"  		{  #line 30 "/home/jens/Source/shotwell/src/util/ui.vala"  			result = SPIT_TRANSITIONS_DIRECTION_BACKWARD;  #line 30 "/home/jens/Source/shotwell/src/util/ui.vala"  			return result; -#line 103 "ui.c" +#line 114 "ui.c"  		}  		default:  		{ @@ -108,13 +119,15 @@ SpitTransitionsDirection direction_to_transition_direction (Direction self) {  			_tmp0_ = g_enum_get_value (g_type_class_ref (TYPE_DIRECTION), self);  #line 33 "/home/jens/Source/shotwell/src/util/ui.vala"  			g_error ("ui.vala:33: Unknown Direction %s", (_tmp0_ != NULL) ? _tmp0_->value_name : NULL); -#line 112 "ui.c" +#line 123 "ui.c"  		}  	}  } -GType direction_get_type (void) { +GType +direction_get_type (void) +{  	static volatile gsize direction_type_id__volatile = 0;  	if (g_once_init_enter (&direction_type_id__volatile)) {  		static const GEnumValue values[] = {{DIRECTION_FORWARD, "DIRECTION_FORWARD", "forward"}, {DIRECTION_BACKWARD, "DIRECTION_BACKWARD", "backward"}, {0, NULL, NULL}}; @@ -126,90 +139,63 @@ GType direction_get_type (void) {  } -void spin_event_loop (void) { +void +spin_event_loop (void) +{  #line 39 "/home/jens/Source/shotwell/src/util/ui.vala"  	while (TRUE) { -#line 133 "ui.c" -		gboolean _tmp0_;  #line 39 "/home/jens/Source/shotwell/src/util/ui.vala" -		_tmp0_ = gtk_events_pending (); -#line 39 "/home/jens/Source/shotwell/src/util/ui.vala" -		if (!_tmp0_) { +		if (!gtk_events_pending ()) {  #line 39 "/home/jens/Source/shotwell/src/util/ui.vala"  			break; -#line 141 "ui.c" +#line 152 "ui.c"  		}  #line 40 "/home/jens/Source/shotwell/src/util/ui.vala"  		gtk_main_iteration (); -#line 145 "ui.c" +#line 156 "ui.c"  	}  } -AdjustmentRelation get_adjustment_relation (GtkAdjustment* adjustment, gint value) { +AdjustmentRelation +get_adjustment_relation (GtkAdjustment* adjustment, +                         gint value) +{  	AdjustmentRelation result = 0; -	gint _tmp0_; -	GtkAdjustment* _tmp1_; -	gdouble _tmp2_;  #line 43 "/home/jens/Source/shotwell/src/util/ui.vala"  	g_return_val_if_fail (GTK_IS_ADJUSTMENT (adjustment), 0);  #line 44 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp0_ = value; -#line 44 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp1_ = adjustment; -#line 44 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp2_ = gtk_adjustment_get_value (_tmp1_); -#line 44 "/home/jens/Source/shotwell/src/util/ui.vala" -	if (_tmp0_ < ((gint) _tmp2_)) { +	if (value < ((gint) gtk_adjustment_get_value (adjustment))) {  #line 45 "/home/jens/Source/shotwell/src/util/ui.vala"  		result = ADJUSTMENT_RELATION_BELOW;  #line 45 "/home/jens/Source/shotwell/src/util/ui.vala"  		return result; -#line 169 "ui.c" +#line 174 "ui.c"  	} else { -		gint _tmp3_; -		GtkAdjustment* _tmp4_; -		gdouble _tmp5_; -		GtkAdjustment* _tmp6_; -		gdouble _tmp7_; -#line 46 "/home/jens/Source/shotwell/src/util/ui.vala" -		_tmp3_ = value; -#line 46 "/home/jens/Source/shotwell/src/util/ui.vala" -		_tmp4_ = adjustment; -#line 46 "/home/jens/Source/shotwell/src/util/ui.vala" -		_tmp5_ = gtk_adjustment_get_value (_tmp4_); -#line 46 "/home/jens/Source/shotwell/src/util/ui.vala" -		_tmp6_ = adjustment;  #line 46 "/home/jens/Source/shotwell/src/util/ui.vala" -		_tmp7_ = gtk_adjustment_get_page_size (_tmp6_); -#line 46 "/home/jens/Source/shotwell/src/util/ui.vala" -		if (_tmp3_ > ((gint) (_tmp5_ + _tmp7_))) { +		if (value > ((gint) (gtk_adjustment_get_value (adjustment) + gtk_adjustment_get_page_size (adjustment)))) {  #line 47 "/home/jens/Source/shotwell/src/util/ui.vala"  			result = ADJUSTMENT_RELATION_ABOVE;  #line 47 "/home/jens/Source/shotwell/src/util/ui.vala"  			return result; -#line 192 "ui.c" +#line 182 "ui.c"  		} else {  #line 49 "/home/jens/Source/shotwell/src/util/ui.vala"  			result = ADJUSTMENT_RELATION_IN_RANGE;  #line 49 "/home/jens/Source/shotwell/src/util/ui.vala"  			return result; -#line 198 "ui.c" +#line 188 "ui.c"  		}  	}  } -void get_adjustment_page (GtkAdjustment* hadj, GtkAdjustment* vadj, GdkRectangle* result) { +void +get_adjustment_page (GtkAdjustment* hadj, +                     GtkAdjustment* vadj, +                     GdkRectangle* result) +{  	GdkRectangle rect = {0}; -	GtkAdjustment* _tmp0_; -	gdouble _tmp1_; -	GtkAdjustment* _tmp2_; -	gdouble _tmp3_; -	GtkAdjustment* _tmp4_; -	gdouble _tmp5_; -	GtkAdjustment* _tmp6_; -	gdouble _tmp7_;  #line 52 "/home/jens/Source/shotwell/src/util/ui.vala"  	g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));  #line 52 "/home/jens/Source/shotwell/src/util/ui.vala" @@ -217,50 +203,31 @@ void get_adjustment_page (GtkAdjustment* hadj, GtkAdjustment* vadj, GdkRectangle  #line 53 "/home/jens/Source/shotwell/src/util/ui.vala"  	memset (&rect, 0, sizeof (GdkRectangle));  #line 54 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp0_ = hadj; -#line 54 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp1_ = gtk_adjustment_get_value (_tmp0_); -#line 54 "/home/jens/Source/shotwell/src/util/ui.vala" -	rect.x = (gint) _tmp1_; +	rect.x = (gint) gtk_adjustment_get_value (hadj);  #line 55 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp2_ = vadj; -#line 55 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp3_ = gtk_adjustment_get_value (_tmp2_); -#line 55 "/home/jens/Source/shotwell/src/util/ui.vala" -	rect.y = (gint) _tmp3_; -#line 56 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp4_ = hadj; +	rect.y = (gint) gtk_adjustment_get_value (vadj);  #line 56 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp5_ = gtk_adjustment_get_page_size (_tmp4_); -#line 56 "/home/jens/Source/shotwell/src/util/ui.vala" -	rect.width = (gint) _tmp5_; -#line 57 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp6_ = vadj; -#line 57 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp7_ = gtk_adjustment_get_page_size (_tmp6_); +	rect.width = (gint) gtk_adjustment_get_page_size (hadj);  #line 57 "/home/jens/Source/shotwell/src/util/ui.vala" -	rect.height = (gint) _tmp7_; +	rect.height = (gint) gtk_adjustment_get_page_size (vadj);  #line 59 "/home/jens/Source/shotwell/src/util/ui.vala"  	*result = rect;  #line 59 "/home/jens/Source/shotwell/src/util/ui.vala"  	return; -#line 248 "ui.c" +#line 218 "ui.c"  } -gboolean has_only_key_modifier (GdkModifierType field, GdkModifierType mask) { +gboolean +has_only_key_modifier (GdkModifierType field, +                       GdkModifierType mask) +{  	gboolean result = FALSE; -	GdkModifierType _tmp0_; -	GdkModifierType _tmp1_; -#line 77 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp0_ = field; -#line 77 "/home/jens/Source/shotwell/src/util/ui.vala" -	_tmp1_ = mask;  #line 77 "/home/jens/Source/shotwell/src/util/ui.vala" -	result = (_tmp0_ & ((((((((GDK_SHIFT_MASK | GDK_CONTROL_MASK) | GDK_MOD1_MASK) | GDK_MOD3_MASK) | GDK_MOD4_MASK) | GDK_MOD5_MASK) | GDK_SUPER_MASK) | GDK_HYPER_MASK) | GDK_META_MASK)) == _tmp1_; +	result = (field & ((((((((GDK_SHIFT_MASK | GDK_CONTROL_MASK) | GDK_MOD1_MASK) | GDK_MOD3_MASK) | GDK_MOD4_MASK) | GDK_MOD5_MASK) | GDK_SUPER_MASK) | GDK_HYPER_MASK) | GDK_META_MASK)) == mask;  #line 77 "/home/jens/Source/shotwell/src/util/ui.vala"  	return result; -#line 264 "ui.c" +#line 231 "ui.c"  } | 
