summaryrefslogtreecommitdiffstats
path: root/src/bind
diff options
context:
space:
mode:
authorAndrew Higginson <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
committerAndrew <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
commit80960b623a99aae1402ab651b2974ef544ed3b03 (patch)
treeba49d42c2789e9e11f805e2d5263e10f9fedeef8 /src/bind
parenttry to fix bug (diff)
parentGDL: Cherry-pick upstream patch 73852 (2011-03-23) - Add missing return value. (diff)
downloadinkscape-80960b623a99aae1402ab651b2974ef544ed3b03.tar.gz
inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.zip
merged with trunk so I can build again...
(bzr r10092.1.36)
Diffstat (limited to 'src/bind')
-rw-r--r--src/bind/CMakeLists.txt23
-rw-r--r--src/bind/dobinding.cpp5
-rw-r--r--src/bind/javabind-private.h9
-rw-r--r--src/bind/javabind.cpp28
-rw-r--r--src/bind/javabind.h9
-rw-r--r--src/bind/javainc/jni.h2
6 files changed, 44 insertions, 32 deletions
diff --git a/src/bind/CMakeLists.txt b/src/bind/CMakeLists.txt
index a6b5b6883..9b6abad4f 100644
--- a/src/bind/CMakeLists.txt
+++ b/src/bind/CMakeLists.txt
@@ -1,7 +1,18 @@
-SET(bind_SRC
-dobinding.cpp
-javabind.cpp
+
+set(bind_SRC
+ dobinding.cpp
+ javabind.cpp
+
+
+ # -------
+ # Headers
+ javabind-private.h
+ javabind.h
+ javainc/jni.h
+ javainc/linux/jni_md.h
+ javainc/solaris/jni_md.h
+ javainc/win32/jni_md.h
)
-ADD_LIBRARY(bind STATIC ${bind_SRC})
-TARGET_LINK_LIBRARIES(bind
-${INKSCAPE_LIBS}) \ No newline at end of file
+
+# add_inkscape_lib(bind_LIB "${bind_SRC}")
+add_inkscape_source("${bind_SRC}")
diff --git a/src/bind/dobinding.cpp b/src/bind/dobinding.cpp
index 1ba708ed7..5e783e59d 100644
--- a/src/bind/dobinding.cpp
+++ b/src/bind/dobinding.cpp
@@ -1,6 +1,5 @@
-/**
- * @file
- * @brief This is a simple mechanism to bind Inkscape to Java, and thence
+/*
+ * This is a simple mechanism to bind Inkscape to Java, and thence
* to all of the nice things that can be layered upon that.
*
* Authors:
diff --git a/src/bind/javabind-private.h b/src/bind/javabind-private.h
index a03f0c1a2..56ff2e2ff 100644
--- a/src/bind/javabind-private.h
+++ b/src/bind/javabind-private.h
@@ -2,7 +2,8 @@
* @file
* @brief This is a simple mechanism to bind Inkscape to Java, and thence
* to all of the nice things that can be layered upon that.
- *
+ */
+/*
* Authors:
* Bob Jamison
*
@@ -23,8 +24,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __JAVABIND_PRIVATE_H__
-#define __JAVABIND_PRIVATE_H__
+#ifndef SEEN_JAVABIND_PRIVATE_H
+#define SEEN_JAVABIND_PRIVATE_H
#include <jni.h>
#include "javabind.h"
@@ -139,7 +140,7 @@ void setString(JNIEnv *env, jobject obj, const char *name, const String &val);
} // namespace Bind
} // namespace Inkscape
-#endif /* __JAVABIND_PRIVATE_H__ */
+#endif // SEEN_JAVABIND_PRIVATE_H
//########################################################################
//# E N D O F F I L E
//########################################################################
diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp
index 6dc8c9a9b..d2091eb1b 100644
--- a/src/bind/javabind.cpp
+++ b/src/bind/javabind.cpp
@@ -1,8 +1,18 @@
/**
* @file
- * @brief This is a simple mechanism to bind Inkscape to Java, and thence
+ * This is a simple mechanism to bind Inkscape to Java, and thence
* to all of the nice things that can be layered upon that.
*
+ * Note: We must limit Java or JVM-specific code to this file
+ * and to dobinding.cpp. It should be hidden from javabind.h
+ *
+ * This file is mostly about getting things up and running, and
+ * providing the basic C-to-Java hooks.
+ *
+ * dobinding.cpp will have the rote and repetitious
+ * class-by-class binding
+ */
+/*
* Authors:
* Bob Jamison
*
@@ -52,23 +62,13 @@
#include "javabind-private.h"
#include <path-prefix.h>
#include <prefix.h>
-#include <glib/gmessages.h>
+#include <glib.h>
//For repr and document
#include <document.h>
#include <inkscape.h>
#include <xml/repr.h>
-/**
- * Note: We must limit Java or JVM-specific code to this file
- * and to dobinding.cpp. It should be hidden from javabind.h
- *
- * This file is mostly about getting things up and running, and
- * providing the basic C-to-Java hooks.
- *
- * dobinding.cpp will have the rote and repetitious
- * class-by-class binding
- */
namespace Inkscape
@@ -568,7 +568,7 @@ static const char *commonJavaPaths[] =
static bool findJVM(String &result)
{
std::vector<String> results;
- int found = false;
+ bool found = false;
/* Is there one specified by the user? */
const char *javaHome = getenv("JAVA_HOME");
@@ -586,7 +586,7 @@ static bool findJVM(String &result)
{
return false;
}
- if (results.size() == 0)
+ if (results.empty())
return false;
//Look first for a Client VM
for (unsigned int i=0 ; i<results.size() ; i++)
diff --git a/src/bind/javabind.h b/src/bind/javabind.h
index 894f52d5d..254548bfb 100644
--- a/src/bind/javabind.h
+++ b/src/bind/javabind.h
@@ -2,7 +2,8 @@
* @file
* @brief This is a simple mechanism to bind Inkscape to Java, and thence
* to all of the nice things that can be layered upon that.
- *
+ */
+/*
* Authors:
* Bob Jamison
*
@@ -23,8 +24,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __JAVABIND_H__
-#define __JAVABIND_H__
+#ifndef SEEN_JAVABIND_H
+#define SEEN_JAVABIND_H
#include <glibmm.h>
#include <vector>
@@ -397,7 +398,7 @@ protected:
} // namespace Bind
} // namespace Inkscape
-#endif /* __JAVABIND_H__ */
+#endif // SEEN_JAVABIND_H
//########################################################################
//# E N D O F F I L E
//########################################################################
diff --git a/src/bind/javainc/jni.h b/src/bind/javainc/jni.h
index a10aaea72..5989c043f 100644
--- a/src/bind/javainc/jni.h
+++ b/src/bind/javainc/jni.h
@@ -28,7 +28,7 @@
* point of our design and implementation.
*/
-/******************************************************************************
+/* ***************************************************************************
* Java Runtime Interface
* Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
*****************************************************************************/