• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

cplplotcanvasmodule.c

Go to the documentation of this file.
00001 // cplplotcanvasmodule - C python wrapper for the plplotcanvas
00002 //
00003 // Copyright (C) 2004, 2005 Thomas J. Duck
00004 // All rights reserved.
00005 //
00006 // Thomas J. Duck <tom.duck@dal.ca>
00007 // Department of Physics and Atmospheric Science,
00008 // Dalhousie University, Halifax, Nova Scotia, Canada, B3H 3J5
00009 //
00010 //
00011 // NOTICE
00012 //
00013 // This library is free software; you can redistribute it and/or
00014 // modify it under the terms of the GNU Lesser General Public
00015 // License as published by the Free Software Foundation; either
00016 // version 2.1 of the License, or (at your option) any later version.
00017 //
00018 // This library is distributed in the hope that it will be useful,
00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021 // Lesser General Public License for more details.
00022 //
00023 // You should have received a copy of the GNU Lesser General Public
00024 // License along with this library; if not, write to the Free Software
00025 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
00026 // USA
00027 //
00028 
00029 #include <pygobject.h>
00030 
00031 #define PY_ARRAY_UNIQUE_SYMBOL    plplotcanvasapi
00032 #include "arrayobject.h"
00033 
00034 #include "plplot.h"
00035 
00036 void cplplotcanvas_register_classes( PyObject *d );
00037 extern PyMethodDef cplplotcanvas_functions[];
00038 
00039 PLDLLIMPEXP_CPLPLOTCANVASMODULE DL_EXPORT( void )
00040 initcplplotcanvas( void )
00041 {
00042     PyObject *m, *d;
00043 
00044     init_pygobject();
00045 
00046     m = Py_InitModule( "cplplotcanvas", cplplotcanvas_functions );
00047     d = PyModule_GetDict( m );
00048 
00049     cplplotcanvas_register_classes( d );
00050 
00051     import_array();
00052 
00053     if ( PyErr_Occurred() )
00054     {
00055         Py_FatalError( "can't initialise module cplplotcanvas" );
00056     }
00057 }

Generated on Wed Oct 12 2011 20:42:21 for PLplot by  doxygen 1.7.1