Rapicorn - Experimental UI Toolkit - Source Code 10.08.1
py-rope.hh
Go to the documentation of this file.
00001 /* Rapicorn-Python Bindings
00002  * Copyright (C) 2008 Tim Janik
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * A copy of the GNU Lesser General Public License should ship along
00015  * with this library; if not, see http://www.gnu.org/copyleft/.
00016  */
00017 #ifndef __RAPICORN_PY_ROPE_HH__
00018 #define __RAPICORN_PY_ROPE_HH__
00019 
00020 #include <Python.h> // must be included first to configure std headers
00021 
00022 #include <rapicorn.hh>
00023 using namespace Rapicorn;
00024 
00025 // convenience casts
00026 #define PYCF(func)      ((PyCFunction) func)
00027 #define PYTO(ooo)       ({ union { PyTypeObject *t; PyObject *o; } u; u.t = (ooo); u.o; })
00028 #define PYWO(ooo)       ({ union { PyWindow *w; PyObject *o; } u; u.w = (ooo); u.o; })
00029 #define PYS(cchr)       const_cast<char*> (cchr)
00030 
00031 
00032 // convenience functions
00033 #define None_INCREF()   ({ Py_INCREF (Py_None); Py_None; })
00034 
00035 
00036 #endif /* __RAPICORN_PY_ROPE_HH__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines