aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interface-gtk.h5
-rw-r--r--src/interface-ncurses.h5
-rw-r--r--src/interface.h3
-rw-r--r--src/main.cpp6
4 files changed, 8 insertions, 11 deletions
diff --git a/src/interface-gtk.h b/src/interface-gtk.h
index ed2cabe..e2d1589 100644
--- a/src/interface-gtk.h
+++ b/src/interface-gtk.h
@@ -28,8 +28,7 @@
#include "interface.h"
-/* object declared in main.cpp */
-extern class InterfaceGtk : public Interface {
+typedef class InterfaceGtk : public Interface {
GtkWidget *window;
GtkWidget *editor_widget;
GtkWidget *cmdline_widget;
@@ -86,6 +85,6 @@ public:
private:
static void widget_set_font(GtkWidget *widget, const gchar *font_name);
-} interface;
+} InterfaceCurrent;
#endif
diff --git a/src/interface-ncurses.h b/src/interface-ncurses.h
index 30f73f6..2526318 100644
--- a/src/interface-ncurses.h
+++ b/src/interface-ncurses.h
@@ -29,8 +29,7 @@
#include "interface.h"
-/* object declared in main.cpp */
-extern class InterfaceNCurses : public Interface {
+typedef class InterfaceNCurses : public Interface {
SCREEN *screen;
FILE *screen_tty;
@@ -95,6 +94,6 @@ private:
void draw_info(void);
friend void event_loop_iter();
-} interface;
+} InterfaceCurrent;
#endif
diff --git a/src/interface.h b/src/interface.h
index 6f7bc84..b5be547 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -137,4 +137,7 @@ public:
#error No interface selected!
#endif
+/* object defined in main.cpp */
+extern InterfaceCurrent interface;
+
#endif
diff --git a/src/main.cpp b/src/main.cpp
index 01e2594..c332671 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -53,11 +53,7 @@
* a ctor/dtor order without depending on the
* GCC init_priority() attribute
*/
-#ifdef INTERFACE_GTK
-InterfaceGtk interface;
-#elif defined(INTERFACE_NCURSES)
-InterfaceNCurses interface;
-#endif
+InterfaceCurrent interface;
/*
* Scintilla will be initialized after these