]> icculus.org git repositories - mikachu/openbox.git/blob - src/python.hh
trasitioning for new button event handling
[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 enum MouseContext {
22   MC_Frame,
23   MC_Titlebar,
24   MC_Window,
25   MC_MaximizeButton,
26   MC_CloseButton,
27   MC_IconifyButton,
28   MC_StickyButton,
29   MC_Grip,
30   MC_Root,
31   MC_MenuItem,
32   MC_All,
33   NUM_MOUSE_CONTEXT
34 }
35 enum KeyContext {
36   KC_Menu,
37   KC_All,
38   NUM_KEY_CONTEXT
39 }
40
41 #ifndef SWIG
42 void python_init(char *argv0);
43 void python_destroy();
44 bool python_exec(const std::string &path);
45                  
46 void python_callback(PyObject *func, OBActions::ActionType action,
47                      Window window, OBWidget::WidgetType type,
48                      unsigned int state, unsigned int button,
49                      int xroot, int yroot, Time time);
50
51 void python_callback(PyObject *func, Window window, unsigned int state,
52                      unsigned int key, Time time);
53
54
55 bool python_get_string(const char *name, std::string *value);
56 bool python_get_stringlist(const char *name, std::vector<std::string> *value);
57 #endif
58
59 }
60
61 #endif // __python_hh