Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scripter2_base.cpp
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #include "cmdvar.h"
00008 
00009 #include "scribusstructs.h"
00010 
00011 using namespace boost::python;
00012 
00013 // Declare the export functions from the implementation
00014 extern void export_QString();
00015 extern void export_QObject();
00016 extern void export_QWidget();
00017 extern void export_QFrame();
00018 extern void export_QScrollView();
00019 extern void export_QMainWindow();
00020 extern void export_QApplication();
00021 
00022 extern void export_ScribusStructs();
00023 extern void export_PageItem();
00024 extern void export_ScribusMainWindow();
00025 extern void export_ScribusQApp();
00026 extern void export_ScribusWin();
00027 extern void export_ScribusDoc();
00028 extern void export_ScribusView();
00029 
00030 extern void export_styles();
00031 
00035 int add_five(int x)
00036 {
00037        return x+5;
00038 }
00039 
00043 BOOST_PYTHON_MODULE(scribus2)
00044 {
00045        qDebug("Exporting scribus2");
00046 
00047        // Export our basic testing function
00048        def("add_five", add_five);
00049 
00050        // Export type converters
00051        export_QString();
00052 
00053        // And Qt classes
00054        export_QObject();
00055        export_QApplication();
00056        export_QWidget();
00057        export_QFrame();
00058        export_QScrollView();
00059        export_QMainWindow();
00060 
00061        // Export Scribus types
00062        export_ScribusStructs();
00063        export_ScribusQApp();
00064        export_ScribusDoc();
00065        export_ScribusView();
00066        export_ScribusWin();
00067        export_ScribusMainWindow();
00068        export_PageItem();
00069 
00070        // Export access functions and dirty hacks
00071        export_styles();
00072 
00073        qDebug("Done");
00074 }
00075 
00082 void scripter2_init()
00083 {
00084        initscribus2();
00085 }