Browse Source

use namespace

CPP-GTK4
yggverse 4 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 @@ @@ -1,6 +1,6 @@
#include "Browser.h"
YodaBrowser::YodaBrowser(
Yoda::Browser::Browser(
GtkApplication *application
) {
this->gtk = gtk_application_window_new(
@ -13,15 +13,15 @@ YodaBrowser::YodaBrowser( @@ -13,15 +13,15 @@ YodaBrowser::YodaBrowser(
GTK_WINDOW(
this->gtk
),
YodaBrowser::TITLE
Browser::TITLE
);
gtk_window_set_default_size(
GTK_WINDOW(
this->gtk
),
YodaBrowser::WIDTH,
YodaBrowser::HEIGHT
Browser::WIDTH,
Browser::HEIGHT
);
GtkWidget *label = gtk_label_new(

7
src/Yoda/Browser.h

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

2
src/main.cpp

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

Loading…
Cancel
Save