From 413958b676ee9fad5357652a21f507bcc1017e96 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sat, 22 Jul 2017 00:29:50 +1000 Subject: [PATCH] Wrap gtkutil/frame --- libs/gtkutil/frame.cpp | 6 +++--- libs/gtkutil/frame.h | 6 +++--- libs/gtkutil/paned.cpp | 6 +++--- libs/gtkutil/paned.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libs/gtkutil/frame.cpp b/libs/gtkutil/frame.cpp index 87f75f36..a11ae16b 100644 --- a/libs/gtkutil/frame.cpp +++ b/libs/gtkutil/frame.cpp @@ -24,9 +24,9 @@ #include #include -GtkFrame* create_framed_widget( GtkWidget* widget ){ - GtkFrame* frame = ui::Frame(); - gtk_widget_show( GTK_WIDGET( frame ) ); +ui::Frame create_framed_widget( ui::Widget widget ){ + auto frame = ui::Frame(); + frame.show(); gtk_frame_set_shadow_type( frame, GTK_SHADOW_IN ); gtk_container_add( GTK_CONTAINER( frame ), widget ); gtk_widget_show( GTK_WIDGET( widget ) ); diff --git a/libs/gtkutil/frame.h b/libs/gtkutil/frame.h index ebeccc28..ecdd7fcc 100644 --- a/libs/gtkutil/frame.h +++ b/libs/gtkutil/frame.h @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #if !defined( INCLUDED_GTKUTIL_FRAME_H ) #define INCLUDED_GTKUTIL_FRAME_H -typedef struct _GtkWidget GtkWidget; -typedef struct _GtkFrame GtkFrame; -GtkFrame* create_framed_widget( GtkWidget* widget ); +ui::Frame create_framed_widget( ui::Widget widget ); #endif diff --git a/libs/gtkutil/paned.cpp b/libs/gtkutil/paned.cpp index 446a8bb4..f409fd1f 100644 --- a/libs/gtkutil/paned.cpp +++ b/libs/gtkutil/paned.cpp @@ -61,9 +61,9 @@ PanedState g_hpaned = { 0.5f, -1, }; PanedState g_vpaned1 = { 0.5f, -1, }; PanedState g_vpaned2 = { 0.5f, -1, }; -GtkHPaned* create_split_views( GtkWidget* topleft, GtkWidget* topright, GtkWidget* botleft, GtkWidget* botright ){ - GtkHPaned* hsplit = ui::HPaned(); - gtk_widget_show( GTK_WIDGET( hsplit ) ); +ui::HPaned create_split_views( ui::Widget topleft, ui::Widget topright, ui::Widget botleft, ui::Widget botright ){ + auto hsplit = ui::HPaned(); + hsplit.show(); g_signal_connect( G_OBJECT( hsplit ), "size_allocate", G_CALLBACK( hpaned_allocate ), &g_hpaned ); g_signal_connect( G_OBJECT( hsplit ), "notify::position", G_CALLBACK( paned_position ), &g_hpaned ); diff --git a/libs/gtkutil/paned.h b/libs/gtkutil/paned.h index 8b79f931..842996ef 100644 --- a/libs/gtkutil/paned.h +++ b/libs/gtkutil/paned.h @@ -19,11 +19,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + #if !defined( INCLUDED_GTKUTIL_PANED_H ) #define INCLUDED_GTKUTIL_PANED_H -typedef struct _GtkWidget GtkWidget; -typedef struct _GtkHPaned GtkHPaned; -GtkHPaned* create_split_views( GtkWidget* topleft, GtkWidget* topright, GtkWidget* botleft, GtkWidget* botright ); +ui::HPaned create_split_views( ui::Widget topleft, ui::Widget topright, ui::Widget botleft, ui::Widget botright ); #endif -- 2.39.2