[niepce] split gegl usage to be more localized.



commit 1f31eb653a9e6ccf1a2139fcb98f7a2dede0ceea
Author: Hub Figuiere <hub figuiere net>
Date:   Sun Nov 6 15:58:31 2011 -0800

    split gegl usage to be more localized.

 src/ncr/Makefile.am                            |    1 +
 src/ncr/init.cpp                               |   32 ++++++++++++++++++
 src/ncr/init.hpp                               |   41 ++++++++++++++++++++++++
 src/ncr/ncr.cpp                                |    9 +-----
 src/ncr/ncr.hpp                                |    5 +--
 src/niepce/modules/darkroom/darkroommodule.cpp |    2 +-
 6 files changed, 78 insertions(+), 12 deletions(-)
---
diff --git a/src/ncr/Makefile.am b/src/ncr/Makefile.am
index 5d102a5..69ea102 100644
--- a/src/ncr/Makefile.am
+++ b/src/ncr/Makefile.am
@@ -12,6 +12,7 @@ noinst_LIBRARIES = libncr.a
 
 libncr_a_SOURCES = ncr.hpp ncr.cpp \
 	image.hpp image.cpp \
+	init.hpp init.cpp \
 	$(NULL)
 
 #libncr_la_SOURCES = ncr.h ncr.cpp
diff --git a/src/ncr/init.cpp b/src/ncr/init.cpp
new file mode 100644
index 0000000..21e71ca
--- /dev/null
+++ b/src/ncr/init.cpp
@@ -0,0 +1,32 @@
+/*
+ * niepce - ncr/init.cpp
+ *
+ * Copyright (C) 2011 Hub Figuiere
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see 
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include "init.hpp"
+
+#include <geglmm/init.h>
+
+namespace ncr {
+
+void init()
+{
+    Gegl::init(0, NULL);
+}
+
+}
diff --git a/src/ncr/init.hpp b/src/ncr/init.hpp
new file mode 100644
index 0000000..fa52605
--- /dev/null
+++ b/src/ncr/init.hpp
@@ -0,0 +1,41 @@
+/*
+ * niepce - ncr/init.hpp
+ *
+ * Copyright (C) 2011 Hub Figuiere
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, see 
+ * <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _NIEPCE_NCR_INIT_H
+#define _NIEPCE_NCR_INIT_H
+
+
+namespace ncr {
+
+void init();
+
+}
+
+#endif
+/*
+  Local Variables:
+  mode:c++
+  c-file-style:"stroustrup"
+  c-file-offsets:((innamespace . 0))
+  indent-tabs-mode:nil
+  fill-column:80
+  End:
+*/
diff --git a/src/ncr/ncr.cpp b/src/ncr/ncr.cpp
index a2dd645..9b708bf 100644
--- a/src/ncr/ncr.cpp
+++ b/src/ncr/ncr.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - ncr/ncr.cpp
  *
- * Copyright (C) 2008 Hubert Figuiere
+ * Copyright (C) 2008,2011 Hubert Figuiere
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -22,17 +22,10 @@ extern "C" {
 #include <babl/babl.h>
 }
 
-#include <geglmm/init.h>
-
 #include "ncr.hpp"
 
 namespace ncr {
 
-void init()
-{
-    Gegl::init(0, NULL);
-}
-
 Glib::RefPtr<Gegl::Buffer> load_rawdata(ORRawDataRef rawdata)
 {
     uint32_t x, y;
diff --git a/src/ncr/ncr.hpp b/src/ncr/ncr.hpp
index 7d06297..968a403 100644
--- a/src/ncr/ncr.hpp
+++ b/src/ncr/ncr.hpp
@@ -1,7 +1,7 @@
 /*
  * niepce - ncr/ncr.h
  *
- * Copyright (C) 2008 Hubert Figuiere
+ * Copyright (C) 2008,2011 Hubert Figuiere
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -22,13 +22,12 @@
 #ifndef _NIEPCE_NCR_H
 #define _NIEPCE_NCR_H
 
+#include <glibmm/refptr.h>
 #include <geglmm/buffer.h>
 #include <libopenraw/libopenraw.h>
 
 namespace ncr {
 
-void init();
-
 /** load RAW data into a buffer. */
 Glib::RefPtr<Gegl::Buffer> load_rawdata(ORRawDataRef rawdata); 
 
diff --git a/src/niepce/modules/darkroom/darkroommodule.cpp b/src/niepce/modules/darkroom/darkroommodule.cpp
index 505abee..526da9d 100644
--- a/src/niepce/modules/darkroom/darkroommodule.cpp
+++ b/src/niepce/modules/darkroom/darkroommodule.cpp
@@ -25,7 +25,7 @@
 #include "fwk/toolkit/application.hpp"
 #include "fwk/toolkit/configdatabinder.hpp"
 #include "fwk/toolkit/widgets/dock.hpp"
-#include "ncr/ncr.hpp"
+#include "ncr/init.hpp"
 #include "darkroommodule.hpp"
 
 namespace darkroom {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]