]> icculus.org git repositories - mikachu/openbox.git/blob - src/python.hh
new code for bindings/callbacks. much sexier. now passes python classes back to the...
[mikachu/openbox.git] / src / python.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef   __python_hh
3 #define   __python_hh
4
5 /*! @file python.hh
6   @brief wee
7 */
8
9 #include "actions.hh"
10 #include "widget.hh"
11 #include "bindings.hh"
12
13 extern "C" {
14 #include <Python.h>
15 }
16
17 #include <string>
18
19 namespace ob {
20
21 void python_init(char *argv0);
22 void python_destroy();
23 bool python_exec(const std::string &path);
24                  
25 void python_callback(PyObject *func, OBActions::ActionType action,
26                      Window window, OBWidget::WidgetType type,
27                      unsigned int state, unsigned int button,
28                      int xroot, int yroot, Time time);
29
30 void python_callback(PyObject *func, Window window, unsigned int state,
31                      unsigned int key, Time time);
32
33
34 bool python_get_string(const char *name, std::string *value);
35 bool python_getstringlist(const char *name, std::vector<std::string> *value);
36
37 }
38
39 #endif // __python_hh