Wrap gtkutil/frame
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 21 Jul 2017 14:29:50 +0000 (00:29 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 31 Jul 2017 12:35:47 +0000 (22:35 +1000)
libs/gtkutil/frame.cpp
libs/gtkutil/frame.h
libs/gtkutil/paned.cpp
libs/gtkutil/paned.h

index 87f75f3..a11ae16 100644 (file)
@@ -24,9 +24,9 @@
 #include <gtk/gtk.h>
 #include <uilib/uilib.h>
 
-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 ) );
index ebeccc2..ecdd7fc 100644 (file)
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <uilib/uilib.h>
+
 #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
index 446a8bb..f409fd1 100644 (file)
@@ -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 );
index 8b79f93..842996e 100644 (file)
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <uilib/uilib.h>
+
 #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