diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-12-19 23:54:41 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-12-19 23:54:41 +0000 |
| commit | 700984bd150d98a6876c117c2e1b1b3c72cffce1 (patch) | |
| tree | a4e89a9a84b4e1c76d83f1764404c3598f505789 /src/python.cc | |
| parent | 977ecf1f1e82f385a542648b545a0d0877febaf0 (diff) | |
python has begun!
Diffstat (limited to 'src/python.cc')
| -rw-r--r-- | src/python.cc | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/python.cc b/src/python.cc new file mode 100644 index 00000000..e338b02c --- /dev/null +++ b/src/python.cc @@ -0,0 +1,45 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + +#include "python.hh" +#include "python_client.hh" +#include "openbox.hh" + +namespace ob { + +extern "C" { + +static PyObject *shit(PyObject *self, PyObject *args) +{ + if (!PyArg_ParseTuple(args, ":shit")) + return NULL; + + printf("SHIT CALLED!@!\n"); + + return Py_None; +} + + + +static PyMethodDef OBMethods[] = { + {"shit", shit, METH_VARARGS, + "Do some shit, yo!"}, + + {"get_client_dict", get_client_dict, METH_VARARGS, + "Get the list of all clients"}, + + {NULL, NULL, 0, NULL} +}; + +void initopenbox() +{ + PyClient_Type.ob_type = &PyType_Type; + + Py_InitModule("openbox", OBMethods); +} +} + +} |
