2002-12-19 23:54:41 +00:00
|
|
|
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "../config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "python.hh"
|
2002-12-20 15:38:49 +00:00
|
|
|
#include "client.hh"
|
2002-12-19 23:54:41 +00:00
|
|
|
#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");
|
|
|
|
|
2002-12-21 12:19:29 +00:00
|
|
|
Py_INCREF(Py_None);
|
2002-12-19 23:54:41 +00:00
|
|
|
return Py_None;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static PyMethodDef OBMethods[] = {
|
|
|
|
{"shit", shit, METH_VARARGS,
|
|
|
|
"Do some shit, yo!"},
|
|
|
|
|
2002-12-20 15:38:49 +00:00
|
|
|
/* {"get_client_dict", get_client_dict, METH_VARARGS,
|
|
|
|
"Get the list of all clients"},*/
|
2002-12-19 23:54:41 +00:00
|
|
|
|
|
|
|
{NULL, NULL, 0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
void initopenbox()
|
|
|
|
{
|
2002-12-21 12:19:29 +00:00
|
|
|
OBClient_Type.ob_type = &PyType_Type;
|
2002-12-19 23:54:41 +00:00
|
|
|
|
|
|
|
Py_InitModule("openbox", OBMethods);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|