]> icculus.org git repositories - mikachu/openbox.git/blob - src/python.cc
python has begun!
[mikachu/openbox.git] / src / python.cc
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 #ifdef HAVE_CONFIG_H
4 # include "../config.h"
5 #endif
6
7 #include "python.hh"
8 #include "python_client.hh"
9 #include "openbox.hh"
10
11 namespace ob {
12
13 extern "C" {
14
15 static PyObject *shit(PyObject *self, PyObject *args)
16 {
17   if (!PyArg_ParseTuple(args, ":shit"))
18     return NULL;
19
20   printf("SHIT CALLED!@!\n");
21
22   return Py_None;
23 }
24   
25
26
27 static PyMethodDef OBMethods[] = {
28   {"shit", shit, METH_VARARGS,
29    "Do some shit, yo!"},
30
31   {"get_client_dict", get_client_dict, METH_VARARGS,
32    "Get the list of all clients"},
33
34   {NULL, NULL, 0, NULL}
35 };
36
37 void initopenbox()
38 {
39   PyClient_Type.ob_type = &PyType_Type;
40   
41   Py_InitModule("openbox", OBMethods);
42 }
43 }
44
45 }