Browse Source

use namespace

CPP-GTK4
yggverse 3 months ago
parent
commit
a67b5ad018
  1. 8
      src/Yoda/Browser.cpp
  2. 7
      src/Yoda/Browser.h
  3. 2
      src/main.cpp

8
src/Yoda/Browser.cpp

@ -1,6 +1,6 @@
#include "Browser.h" #include "Browser.h"
YodaBrowser::YodaBrowser( Yoda::Browser::Browser(
GtkApplication *application GtkApplication *application
) { ) {
this->gtk = gtk_application_window_new( this->gtk = gtk_application_window_new(
@ -13,15 +13,15 @@ YodaBrowser::YodaBrowser(
GTK_WINDOW( GTK_WINDOW(
this->gtk this->gtk
), ),
YodaBrowser::TITLE Browser::TITLE
); );
gtk_window_set_default_size( gtk_window_set_default_size(
GTK_WINDOW( GTK_WINDOW(
this->gtk this->gtk
), ),
YodaBrowser::WIDTH, Browser::WIDTH,
YodaBrowser::HEIGHT Browser::HEIGHT
); );
GtkWidget *label = gtk_label_new( GtkWidget *label = gtk_label_new(

7
src/Yoda/Browser.h

@ -3,7 +3,9 @@
#include "../main.h" #include "../main.h"
class YodaBrowser namespace Yoda
{
class Browser
{ {
public: public:
@ -13,9 +15,10 @@ class YodaBrowser
const guint HEIGHT = 480; const guint HEIGHT = 480;
const gchar* TITLE = "Yoda"; const gchar* TITLE = "Yoda";
YodaBrowser( Browser(
GtkApplication *application GtkApplication *application
); );
}; };
};
#endif #endif

2
src/main.cpp

@ -4,7 +4,7 @@ void activate(
GtkApplication *application GtkApplication *application
) { ) {
// Init default component // Init default component
new YodaBrowser( new Yoda::Browser(
application application
); );
} }

Loading…
Cancel
Save