]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
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 87f75f3654669309a02e80deb8ffe6db87c47fd3..a11ae16bb0b699a428d6cb64b50d7868a4753426 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 ebeccc28d2f3d60588487dbab05c00a76c429cd8..ecdd7fcc78b5ec90e88be08acc68a30f61076341 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 446a8bb4f2d409984cbf79101d29bda5402ebaef..f409fd1fd9328ef40a40a55e0eb66c1d18578626 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 8b79f931ff62ab28d2c7dc5eda433cd620a1f28c..842996efb5e3db6097b3cfa1899766e50c99cecd 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