aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-gtk.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-11 04:14:01 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-11 04:14:01 +0100
commit7206f6d1249da0dd8e879d0c0b26185fc6ef89d9 (patch)
tree9f570b266ee49c06290c048b600346ab8b0dbddd /src/interface-gtk.cpp
parent0987ca8b5b1a6ff50bfc8c3b171fdaf6cfff3a2b (diff)
downloadsciteco-7206f6d1249da0dd8e879d0c0b26185fc6ef89d9.tar.gz
added all of SciTECO's declarations to the "SciTECO" namespace
normally, since SciTECO is not a library, this is not strictly necessary since every library should use proper name prefixes or namespaces for all global declarations to avoid name clashes. However * you cannot always rely on that * Scintilla does violate the practice of using prefixes or namespaces. The public APIs are OK, but it does define global functions/methods, e.g. for "Document" that clashed with SciTECO's "TECODocument" class at link-time. Scintilla can put its definitions in a namespace, but this feature cannot be easily enabled without patching Scintilla. * a "SciTECO" namespace will be necessary if "SciTECO" is ever to be turned into a library. Even if this library will have only a C-linkage API, it must ensure it doesn't clutter the global namespace. So the old "TECODocument" class was renamed back to "Document" (SciTECO::Document).
Diffstat (limited to 'src/interface-gtk.cpp')
-rw-r--r--src/interface-gtk.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interface-gtk.cpp b/src/interface-gtk.cpp
index d4ae096..2b47019 100644
--- a/src/interface-gtk.cpp
+++ b/src/interface-gtk.cpp
@@ -41,6 +41,8 @@
#include "interface.h"
#include "interface-gtk.h"
+namespace SciTECO {
+
extern "C" {
static void scintilla_notify(ScintillaObject *sci, uptr_t idFrom,
SCNotification *notify, gpointer user_data);
@@ -305,3 +307,5 @@ exit_app(GtkWidget *w, GdkEventAny *e, gpointer p)
gtk_main_quit();
return TRUE;
}
+
+} /* namespace SciTECO */