]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wxSWIG/Modules/python.h
   1 /******************************************************************************* 
   2  * Simplified Wrapper and Interface Generator  (SWIG) 
   4  * Author : David Beazley 
   6  * Department of Computer Science         
   7  * University of Chicago 
  10  * beazley@cs.uchicago.edu 
  12  * Please read the file LICENSE for the copyright and terms by which SWIG 
  13  * can be used and distributed. 
  14  *******************************************************************************/ 
  16 /************************************************************************** 
  21  * Header file for Python module.   Warning ; this is work in progress. 
  22  **************************************************************************/ 
  24 class PYTHON 
: public Language 
{ 
  26   char   *module;               // Module name 
  27   char   *path
;                 // Pathname of where to look for library files 
  28   char   *methods
;              // Method table name 
  29   char   *global_name
;          // Name of global variables. 
  30   void    get_pointer(char *iname
, char *srcname
, char *src
, char *dest
, DataType 
*t
, String 
&f
, char *ret
); 
  37   struct Method 
{               // Methods list.  Needed to build methods 
  38     char   *name
;               // Array at very end. 
  51   void add_method(char *name
, char *function
); 
  53   char *usage_var(char *, DataType 
*); 
  54   char *usage_func(char *, DataType 
*, ParmList 
*); 
  55   char *usage_const(char *, DataType 
*, char *); 
  56   char *add_docstring(DocEntry 
*de
); 
  58   // Add for Python-COM support 
  59   virtual void initialize_cmodule(); 
  60   virtual void close_cmodule(); 
  61   virtual void emit_function_header(WrapperFunction 
&emit_to
, char *wname
); 
  62   virtual char *convert_self(WrapperFunction 
&f
); 
  63   virtual char *make_funcname_wrapper(char *fnName
); 
  64   void emitAddPragmas(String
& output
, char* name
, char* spacing
); 
  68     path 
= "python";     // Set this to subdirectory where language 
  69                                   // Dependent library files will be stored 
  70     head 
= 0;                     // Head of method list 
  78   // Don't change any of this 
  79   void parse_args(int, char *argv
[]); 
  81   void create_function(char *, char *, DataType 
*, ParmList 
*); 
  82   void link_variable(char *, char *, DataType 
*); 
  83   void declare_const(char *, char *, DataType 
*, char *); 
  84   void initialize(void); 
  87   void set_module(char *, char **); 
  88   void set_init(char *); 
  89   void add_native(char *, char *); 
  90   void create_command(char *, char *); 
  93   // C++ extensions---for creating shadow classes 
  95   void cpp_member_func(char *name
, char *iname
, DataType 
*t
, ParmList 
*l
); 
  96   void cpp_constructor(char *name
, char *iname
, ParmList 
*l
); 
  97   void cpp_destructor(char *name
, char *newname
); 
  98   void cpp_open_class(char *classname
, char *rname
, char *ctype
, int strip
); 
  99   void cpp_close_class(); 
 101   void cpp_inherit(char **baseclass
, int mode 
= INHERIT_ALL
); 
 102   void cpp_variable(char *name
, char *iname
, DataType 
*t
); 
 103   void cpp_declare_const(char *name
, char *iname
, DataType 
*type
, char *value
); 
 104   void cpp_class_decl(char *, char *,char *); 
 105   void pragma(char *, char *, char *); 
 106   void cpp_pragma(Pragma 
*); 
 107   void add_typedef(DataType 
*t
, char *name
); 
 110 #define PYSHADOW_MEMBER  0x2