1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "python.hh"
#include "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");
Py_INCREF(Py_None);
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()
{
Py_InitModule("openbox", OBMethods);
}
}
}
|