diff options
author | Stefano Karapetsas <[email protected]> | 2012-01-13 23:18:04 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-01-13 23:18:04 +0100 |
commit | ca0a8f4d6cc24707bc07c3013bff321e2f0c24fd (patch) | |
tree | 4c4d47f249603be3cb816b1456a9dc71c0b48999 /src/caja-python.h | |
download | python-caja-ca0a8f4d6cc24707bc07c3013bff321e2f0c24fd.tar.bz2 python-caja-ca0a8f4d6cc24707bc07c3013bff321e2f0c24fd.tar.xz |
initial import from Mate-Extra repo
Diffstat (limited to 'src/caja-python.h')
-rw-r--r-- | src/caja-python.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/caja-python.h b/src/caja-python.h new file mode 100644 index 0000000..a57f499 --- /dev/null +++ b/src/caja-python.h @@ -0,0 +1,79 @@ +/* + * caja-python.c - Caja Python extension + * + * Copyright (C) 2004 Johan Dahlin + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#ifndef CAJA_PYTHON_H +#define CAJA_PYTHON_H + +#include <glib-object.h> +#include <glib/gprintf.h> +#include <Python.h> + +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +#define PY_SSIZE_T_MAX INT_MAX +#define PY_SSIZE_T_MIN INT_MIN +#endif + +typedef enum { + CAJA_PYTHON_DEBUG_MISC = 1 << 0, +} CajaPythonDebug; + +extern CajaPythonDebug caja_python_debug; + +#define debug(x) { if (caja_python_debug & CAJA_PYTHON_DEBUG_MISC) \ + g_printf( "caja-python:" x "\n"); } +#define debug_enter() { if (caja_python_debug & CAJA_PYTHON_DEBUG_MISC) \ + g_printf("%s: entered\n", __FUNCTION__); } +#define debug_enter_args(x, y) { if (caja_python_debug & CAJA_PYTHON_DEBUG_MISC) \ + g_printf("%s: entered " x "\n", __FUNCTION__, y); } + + +PyTypeObject *_PyGtkWidget_Type; +#define PyGtkWidget_Type (*_PyGtkWidget_Type) + +PyTypeObject *_PyCajaColumn_Type; +#define PyCajaColumn_Type (*_PyCajaColumn_Type) + +PyTypeObject *_PyCajaColumnProvider_Type; +#define PyCajaColumnProvider_Type (*_PyCajaColumnProvider_Type) + +PyTypeObject *_PyCajaInfoProvider_Type; +#define PyCajaInfoProvider_Type (*_PyCajaInfoProvider_Type) + +PyTypeObject *_PyCajaLocationWidgetProvider_Type; +#define PyCajaLocationWidgetProvider_Type (*_PyCajaLocationWidgetProvider_Type) + +PyTypeObject *_PyCajaMenu_Type; +#define PyCajaMenu_Type (*_PyCajaMenu_Type) + +PyTypeObject *_PyCajaMenuItem_Type; +#define PyCajaMenuItem_Type (*_PyCajaMenuItem_Type) + +PyTypeObject *_PyCajaMenuProvider_Type; +#define PyCajaMenuProvider_Type (*_PyCajaMenuProvider_Type) + +PyTypeObject *_PyCajaPropertyPage_Type; +#define PyCajaPropertyPage_Type (*_PyCajaPropertyPage_Type) + +PyTypeObject *_PyCajaPropertyPageProvider_Type; +#define PyCajaPropertyPageProvider_Type (*_PyCajaPropertyPageProvider_Type) + +#endif /* CAJA_PYTHON_H */ |