1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
9 #include "otk/point.hh"
10 #include "otk/rect.hh"
11 #include "otk/property.hh"
65 // *** MotionData can be (and is) cast ButtonData!! (in actions.cc) *** //
81 int press_clientwidth;
82 int press_clientheight;
85 // *** MotionData can be (and is) cast ButtonData!! (in actions.cc) *** //
114 void python_init(char *argv0);
115 void python_destroy();
116 bool python_exec(const std::string &path);
118 MotionData *new_motion_data(int screen, Window window, Time time,
119 unsigned int state, unsigned int button,
120 MouseContext context, MouseAction action,
121 int xroot, int yroot, const otk::Point &initpos,
122 const otk::Rect &initarea);
123 ButtonData *new_button_data(int screen, Window window, Time time,
124 unsigned int state, unsigned int button,
125 MouseContext context, MouseAction action);
126 EventData *new_event_data(int screen, Window window, EventAction action,
128 KeyData *new_key_data(int screen, Window window, Time time, unsigned int state,
131 void python_callback(PyObject *func, PyObject *data);
133 bool python_get_long(const char *name, long *value);
134 bool python_get_string(const char *name, std::string *value);
135 bool python_get_stringlist(const char *name, std::vector<std::string> *value);
138 PyObject *mbind(const std::string &button, ob::MouseContext context,
139 ob::MouseAction action, PyObject *func);
141 PyObject *kbind(PyObject *keylist, ob::KeyContext context, PyObject *func);
143 PyObject *ebind(ob::EventAction action, PyObject *func);
145 void set_reset_key(const std::string &key);
147 PyObject *send_client_msg(Window target, int type, Window about,
148 long data, long data1 = 0, long data2 = 0,
149 long data3 = 0, long data4 = 0);
153 #endif // __python_hh