Browse Source

Update c bindings

Antialize 15 years ago
parent
commit
b8431b678c

+ 7 - 1
include/wkhtmltox/converter.hh

@@ -14,9 +14,15 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
-
 #ifndef __CONVERTER_HH__
 #define __CONVERTER_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QObject>
 
 #include <wkhtmltox/dllbegin.inc>

+ 2 - 1
include/wkhtmltox/image.h

@@ -31,9 +31,10 @@ typedef void (*wkhtmltoimage_str_callback)(wkhtmltoimage_converter * converter,
 typedef void (*wkhtmltoimage_int_callback)(wkhtmltoimage_converter * converter, const int val);
 typedef void (*wkhtmltoimage_void_callback)(wkhtmltoimage_converter * converter);
 
-CAPI int wkhtmltoimage_init(int useGraphics);
+CAPI int wkhtmltoimage_init(int use_graphics);
 CAPI int wkhtmltoimage_deinit();
 CAPI int wkhtmltoimage_extended_qt();
+CAPI const char * wkhtmltoimage_version();
 
 CAPI wkhtmltoimage_global_settings * wkhtmltoinage_create_global_settings();
 

+ 7 - 0
include/wkhtmltox/imageconverter.hh

@@ -17,6 +17,13 @@
 
 #ifndef __IMAGECONVERTER_HH__
 #define __IMAGECONVERTER_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/imagesettings.hh>
 

+ 7 - 0
include/wkhtmltox/imagesettings.hh

@@ -17,6 +17,13 @@
 
 #ifndef __IMAGESETTINGS_HH__
 #define __IMAGESETTINGS_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QString>
 #include <wkhtmltox/loadsettings.hh>
 #include <wkhtmltox/websettings.hh>

+ 7 - 0
include/wkhtmltox/loadsettings.hh

@@ -17,6 +17,13 @@
 
 #ifndef __LOADSETTINGS_HH__
 #define __LOADSETTINGS_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QNetworkProxy>
 #include <QString>
 

+ 7 - 0
include/wkhtmltox/multipageloader.hh

@@ -17,6 +17,13 @@
 
 #ifndef __MULTIPAGELOADER_HH__
 #define __MULTIPAGELOADER_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QFile>
 #include <QObject>
 #include <QUrl>

+ 1 - 3
include/wkhtmltox/pdf.h

@@ -1,6 +1,4 @@
-/* -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
- * vi:set ts=4 sts=4 sw=4 noet :
- *
+/*
  * Copyright 2010 wkhtmltopdf authors
  *
  * This file is part of wkhtmltopdf.

+ 7 - 0
include/wkhtmltox/pdfconverter.hh

@@ -17,6 +17,13 @@
 
 #ifndef __PDFCONVERTER_HH__
 #define __PDFCONVERTER_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/pdfsettings.hh>
 

+ 7 - 0
include/wkhtmltox/pdfsettings.hh

@@ -17,6 +17,13 @@
 
 #ifndef __PDFSETTINGS_HH__
 #define __PDFSETTINGS_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QNetworkProxy>
 #include <QPrinter>
 #include <QString>

+ 7 - 0
include/wkhtmltox/utilities.hh

@@ -17,6 +17,13 @@
 
 #ifndef __UTILITIES_HH__
 #define __UTILITIES_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QCleanlooksStyle>
 #include <QCommonStyle>
 #include <QFile>

+ 7 - 0
include/wkhtmltox/websettings.hh

@@ -17,6 +17,13 @@
 
 #ifndef __WEBSETTINGS_HH__
 #define __WEBSETTINGS_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QNetworkProxy>
 #include <QString>
 

+ 1 - 0
src/lib/image.h

@@ -36,6 +36,7 @@ typedef void (*wkhtmltoimage_void_callback)(wkhtmltoimage_converter * converter)
 CAPI int wkhtmltoimage_init(int use_graphics);
 CAPI int wkhtmltoimage_deinit();
 CAPI int wkhtmltoimage_extended_qt();
+CAPI const char * wkhtmltoimage_version();
 
 CAPI wkhtmltoimage_global_settings * wkhtmltoinage_create_global_settings();
 

+ 9 - 4
src/lib/image_c_bindings.cc

@@ -17,6 +17,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+
 #ifdef __WKHTMLTOX_UNDEF_QT_DLL__
 #ifdef QT_DLL
 #undef QT_DLL
@@ -64,6 +65,14 @@ MyImageConverter::~MyImageConverter() {
 	delete globalSettings;
 }
 
+CAPI int wkhtmltoimage_extended_qt() {
+	return wkhtmltopdf_extended_qt();
+}
+
+CAPI const char * wkhtmltoimage_version() {
+	return "NOT IMPLEMENTED";
+}
+
 CAPI int wkhtmltoimage_init(int use_graphics) {
 	return wkhtmltopdf_init(use_graphics);
 }
@@ -72,10 +81,6 @@ CAPI int wkhtmltoimage_deinit() {
 	return wkhtmltopdf_deinit();
 }
 
-CAPI int wkhtmltoimage_extended_qt() {
-	return wkhtmltopdf_extended_qt();
-}
-
 CAPI wkhtmltoimage_global_settings * wkhtmltoimage_create_global_settings() {
 	return reinterpret_cast<wkhtmltoimage_global_settings *>(new settings::ImageGlobal());
 }

+ 1 - 1
src/lib/pdf_c_bindings.cc

@@ -17,6 +17,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+
 #ifdef __WKHTMLTOX_UNDEF_QT_DLL__
 #ifdef QT_DLL
 #undef QT_DLL
@@ -90,7 +91,6 @@ CAPI int wkhtmltopdf_extended_qt() {
 #endif
 }
 
-
 CAPI const char * wkhtmltopdf_version() {
 	return "NOT IMPLEMENTED";
 }