[libhandy/wip/haecker-felix/flap-widget: 82/98] update casts
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/wip/haecker-felix/flap-widget: 82/98] update casts
- Date: Mon, 3 Aug 2020 16:27:56 +0000 (UTC)
commit 6770a7e4c4801e7392d66bf660260ae12f0865ea
Author: Felix Häcker <haeckerfelix gnome org>
Date: Tue Jul 28 18:13:24 2020 +0200
update casts
src/hdy-flap.c | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/src/hdy-flap.c b/src/hdy-flap.c
index 9d437a42..66731127 100644
--- a/src/hdy-flap.c
+++ b/src/hdy-flap.c
@@ -197,7 +197,7 @@ overlay_tick_cb (HdyFlap *self,
self->overlay_progress = self->overlay ? 1 : 0;
self->overlay_tick_cb_id = 0;
- gtk_widget_queue_resize ((GtkWidget*) self);
+ gtk_widget_queue_resize (GTK_WIDGET (self));
return FALSE;
}
@@ -207,7 +207,7 @@ overlay_tick_cb (HdyFlap *self,
if (!self->overlay)
self->overlay_progress = 1 - self->overlay_progress;
- gtk_widget_queue_resize ((GtkWidget*) self);
+ gtk_widget_queue_resize (GTK_WIDGET (self));
return TRUE;
}
@@ -215,39 +215,39 @@ overlay_tick_cb (HdyFlap *self,
static void
animate_overlay (HdyFlap *self)
{
- if (!hdy_get_enable_animations ((GtkWidget*) self) || !gtk_widget_get_mapped ((GtkWidget*) self)) {
+ if (!hdy_get_enable_animations (GTK_WIDGET (self)) || !gtk_widget_get_mapped (GTK_WIDGET (self))) {
self->overlay_progress = self->overlay ? 1 : 0;
- gtk_widget_queue_resize ((GtkWidget*) self);
+ gtk_widget_queue_resize (GTK_WIDGET (self));
return;
}
if (self->overlay_tick_cb_id != 0) {
- gtk_widget_remove_tick_callback ((GtkWidget*) self, self->overlay_tick_cb_id);
+ gtk_widget_remove_tick_callback (GTK_WIDGET (self), self->overlay_tick_cb_id);
self->overlay_tick_cb_id = 0;
}
- self->overlay_start_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock ((GtkWidget*) self))
/ 1000;
+ self->overlay_start_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (GTK_WIDGET (self)))
/ 1000;
self->overlay_progress = self->overlay ? 0 : 1;
- self->overlay_tick_cb_id = gtk_widget_add_tick_callback ((GtkWidget*) self, (GtkTickCallback)
overlay_tick_cb, &self, g_object_unref);
+ self->overlay_tick_cb_id = gtk_widget_add_tick_callback (GTK_WIDGET (self), (GtkTickCallback)
overlay_tick_cb, &self, g_object_unref);
}
static void
animate_reveal (HdyFlap *self)
{
- if (!hdy_get_enable_animations ((GtkWidget*) self) || !gtk_widget_get_mapped ((GtkWidget*) self)) {
+ if (!hdy_get_enable_animations (GTK_WIDGET (self)) || !gtk_widget_get_mapped (GTK_WIDGET (self))) {
self->reveal_progress = self->reveal_flap ? 1 : 0;
- gtk_widget_queue_resize ((GtkWidget*) self);
+ gtk_widget_queue_resize (GTK_WIDGET (self));
return;
}
if (self->reveal_tick_cb_id != 0) {
- gtk_widget_remove_tick_callback ((GtkWidget*) self, self->reveal_tick_cb_id);
+ gtk_widget_remove_tick_callback (GTK_WIDGET (self), self->reveal_tick_cb_id);
self->reveal_tick_cb_id = 0;
}
- self->reveal_start_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock ((GtkWidget*) self))
/ 1000;
+ self->reveal_start_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (GTK_WIDGET (self)))
/ 1000;
self->reveal_progress = self->reveal_flap ? 0 : 1;
- self->reveal_tick_cb_id = gtk_widget_add_tick_callback ((GtkWidget*) self, (GtkTickCallback)
reveal_tick_cb, &self, g_object_unref);
+ self->reveal_tick_cb_id = gtk_widget_add_tick_callback (GTK_WIDGET (self), (GtkTickCallback)
reveal_tick_cb, &self, g_object_unref);
}
static gint
@@ -262,7 +262,7 @@ static GtkPackType
adjust_for_text_direction (HdyFlap *self,
GtkPackType pack_type)
{
- if (gtk_widget_get_direction ((GtkWidget*) self) == GTK_TEXT_DIR_RTL) {
+ if (gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL) {
if (pack_type == GTK_PACK_START) {
return GTK_PACK_END;
} else {
@@ -285,7 +285,7 @@ hdy_flap_measure (GtkWidget *widget,
int *natural_baseline)
{
HdyFlap *self = HDY_FLAP (widget);
- GtkWidget *content = gtk_bin_get_child ((GtkBin*) self);
+ GtkWidget *content = gtk_bin_get_child ( GTK_BIN (self));
gint content_min = 0, content_nat = 0;
gint flap_min = 0, flap_nat = 0;
@@ -408,7 +408,7 @@ static void
allocate_content (HdyFlap *self,
GtkAllocation *widget_alloc)
{
- GtkWidget *content = gtk_bin_get_child ((GtkBin*) self);
+ GtkWidget *content = gtk_bin_get_child (GTK_BIN (self));
gint content_x = 0, content_y = 0;
GtkRequisition flap_min, flap_nat;
GtkRequisition content_min, content_nat;
@@ -465,7 +465,7 @@ hdy_flap_size_allocate (GtkWidget *widget,
GtkAllocation *alloc)
{
HdyFlap *self = HDY_FLAP (widget);
- GtkWidget *content = gtk_bin_get_child ((GtkBin*) self);
+ GtkWidget *content = gtk_bin_get_child (GTK_BIN (self));
gtk_widget_set_allocation (widget, alloc);
@@ -526,9 +526,9 @@ hdy_flap_forall (GtkContainer* base,
HdyFlap * self;
GtkWidget* content;
GtkWidget* flap;
- self = (HdyFlap*) base;
+ self = HDY_FLAP (base);
- content = gtk_bin_get_child ((GtkBin*) self);
+ content = gtk_bin_get_child (GTK_BIN (self));
if (content != NULL) {
callback (content, callback_target);
}
@@ -545,7 +545,7 @@ hdy_flap_remove (GtkContainer* base,
{
HdyFlap * self;
GtkWidget* flap;
- self = (HdyFlap*) base;
+ self = HDY_FLAP (base);
g_return_if_fail (widget != NULL);
@@ -676,7 +676,7 @@ hdy_flap_class_init (HdyFlapClass *klass)
static void
hdy_flap_init (HdyFlap *self)
{
- gtk_widget_set_has_window ((GtkWidget*) self, FALSE);
+ gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
self->flap_position = GTK_PACK_START;
self->orientation = GTK_ORIENTATION_HORIZONTAL;
self->overlay_duration = 250;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]