Back to index

python3.2  3.2.2
Classes | Defines | Variables
py_curses.h File Reference
#include <curses.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PyCursesWindowObject

Defines

#define PyCurses_API_pointers   4
#define PyCursesWindow_Check(v)   (Py_TYPE(v) == &PyCursesWindow_Type)
#define PyCurses_CAPSULE_NAME   "_curses._C_API"
#define PyCursesWindow_Type   (*(PyTypeObject *) PyCurses_API[0])
#define PyCursesSetupTermCalled   {if (! ((int (*)(void))PyCurses_API[1]) () ) return NULL;}
#define PyCursesInitialised   {if (! ((int (*)(void))PyCurses_API[2]) () ) return NULL;}
#define PyCursesInitialisedColor   {if (! ((int (*)(void))PyCurses_API[3]) () ) return NULL;}
#define import_curses()   PyCurses_API = (void **)PyCapsule_Import(PyCurses_CAPSULE_NAME, 1);
#define NoArgNoReturnFunction(X)
#define NoArgOrFlagNoReturnFunction(X)
#define NoArgReturnIntFunction(X)
#define NoArgReturnStringFunction(X)
#define NoArgTrueFalseFunction(X)
#define NoArgNoReturnVoidFunction(X)

Variables

static void ** PyCurses_API
static char * catchall_ERR = "curses function returned ERR"
static char * catchall_NULL = "curses function returned NULL"

Class Documentation

struct PyCursesWindowObject

Definition at line 76 of file py_curses.h.

Class Members
PyObject_HEAD WINDOW * win

Define Documentation

Definition at line 99 of file py_curses.h.

#define NoArgNoReturnFunction (   X)
Value:
static PyObject *PyCurses_ ## X (PyObject *self) \
{ \
  PyCursesInitialised \
  return PyCursesCheckERR(X(), # X); }

Definition at line 116 of file py_curses.h.

#define NoArgNoReturnVoidFunction (   X)
Value:
static PyObject *PyCurses_ ## X (PyObject *self) \
{ \
  PyCursesInitialised \
  X(); \
  Py_INCREF(Py_None); \
  return Py_None; }

Definition at line 162 of file py_curses.h.

#define NoArgOrFlagNoReturnFunction (   X)
Value:
static PyObject *PyCurses_ ## X (PyObject *self, PyObject *args) \
{ \
  int flag = 0; \
  PyCursesInitialised \
  switch(PyTuple_Size(args)) { \
  case 0: \
    return PyCursesCheckERR(X(), # X); \
  case 1: \
    if (!PyArg_ParseTuple(args, "i;True(1) or False(0)", &flag)) return NULL; \
    if (flag) return PyCursesCheckERR(X(), # X); \
    else return PyCursesCheckERR(no ## X (), # X); \
  default: \
    PyErr_SetString(PyExc_TypeError, # X " requires 0 or 1 arguments"); \
    return NULL; } }

Definition at line 122 of file py_curses.h.

#define NoArgReturnIntFunction (   X)
Value:
static PyObject *PyCurses_ ## X (PyObject *self) \
{ \
 PyCursesInitialised \
 return PyLong_FromLong((long) X()); }

Definition at line 138 of file py_curses.h.

#define NoArgReturnStringFunction (   X)
Value:
static PyObject *PyCurses_ ## X (PyObject *self) \
{ \
  PyCursesInitialised \
  return PyBytes_FromString(X()); }

Definition at line 145 of file py_curses.h.

#define NoArgTrueFalseFunction (   X)
Value:
static PyObject *PyCurses_ ## X (PyObject *self) \
{ \
  PyCursesInitialised \
  if (X () == FALSE) { \
    Py_INCREF(Py_False); \
    return Py_False; \
  } \
  Py_INCREF(Py_True); \
  return Py_True; }

Definition at line 151 of file py_curses.h.

#define PyCurses_API_pointers   4

Definition at line 72 of file py_curses.h.

#define PyCurses_CAPSULE_NAME   "_curses._C_API"

Definition at line 83 of file py_curses.h.

#define PyCursesInitialised   {if (! ((int (*)(void))PyCurses_API[2]) () ) return NULL;}

Definition at line 96 of file py_curses.h.

#define PyCursesInitialisedColor   {if (! ((int (*)(void))PyCurses_API[3]) () ) return NULL;}

Definition at line 97 of file py_curses.h.

#define PyCursesSetupTermCalled   {if (! ((int (*)(void))PyCurses_API[1]) () ) return NULL;}

Definition at line 95 of file py_curses.h.

#define PyCursesWindow_Check (   v)    (Py_TYPE(v) == &PyCursesWindow_Type)

Definition at line 81 of file py_curses.h.

Definition at line 94 of file py_curses.h.


Variable Documentation

char* catchall_ERR = "curses function returned ERR" [static]

Definition at line 105 of file py_curses.h.

char* catchall_NULL = "curses function returned NULL" [static]

Definition at line 106 of file py_curses.h.

void** PyCurses_API [static]

Definition at line 92 of file py_curses.h.