]>
Dogcows Code - chaz/openbox/blob - src/python.hh
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"
12 #include "otk/display.hh"
83 int press_clientwidth
;
84 int press_clientheight
;
86 MouseData(int screen
, OBClient
*client
, Time time
, unsigned int state
,
87 unsigned int button
, MouseContext context
, MouseAction action
,
88 int xroot
, int yroot
, const otk::Point
&initpos
,
89 const otk::Rect
&initarea
) {
90 this->screen
= screen
;
91 this->client
= client
;
94 this->button
= button
;
95 this->context
= context
;
96 this->action
= action
;
99 this->pressx
= initpos
.x();
100 this->pressy
= initpos
.y();
101 this->press_clientx
= initarea
.x();
102 this->press_clienty
= initarea
.y();
103 this->press_clientwidth
= initarea
.width();
104 this->press_clientheight
= initarea
.height();
106 MouseData(int screen
, OBClient
*client
, Time time
, unsigned int state
,
107 unsigned int button
, MouseContext context
, MouseAction action
) {
108 this->screen
= screen
;
109 this->client
= client
;
112 this->button
= button
;
113 this->context
= context
;
114 this->action
= action
;
119 this->press_clientx
= 0;
120 this->press_clienty
= 0;
121 this->press_clientwidth
= 0;
122 this->press_clientheight
= 0;
133 EventData(int screen
, OBClient
*client
, EventAction action
,
134 unsigned int state
) {
135 this->screen
= screen
;
136 this->client
= client
;
137 this->action
= action
;
150 KeyData(int screen
, OBClient
*client
, Time time
, unsigned int state
,
152 this->screen
= screen
;
153 this->client
= client
;
156 this->key
= XKeysymToString(XKeycodeToKeysym(otk::OBDisplay::display
,
163 void python_init(char *argv0
);
164 void python_destroy();
165 bool python_exec(const std::string
&path
);
167 bool python_get_long(const char *name
, long *value
);
168 bool python_get_string(const char *name
, std::string
*value
);
169 bool python_get_stringlist(const char *name
, std::vector
<std::string
> *value
);
171 /***********************************************
172 * These are found in openbox.i, not python.cc *
173 ***********************************************/
174 void python_callback(PyObject
*func
, MouseData
*data
);
175 void python_callback(PyObject
*func
, EventData
*data
);
176 void python_callback(PyObject
*func
, KeyData
*data
);
180 PyObject
*mbind(const std::string
&button
, ob::MouseContext context
,
181 ob::MouseAction action
, PyObject
*func
);
183 PyObject
*kbind(PyObject
*keylist
, ob::KeyContext context
, PyObject
*func
);
185 PyObject
*ebind(ob::EventAction action
, PyObject
*func
);
187 void set_reset_key(const std::string
&key
);
189 PyObject
*send_client_msg(Window target
, int type
, Window about
,
190 long data
, long data1
= 0, long data2
= 0,
191 long data3
= 0, long data4
= 0);
195 #endif // __python_hh
This page took 0.0417 seconds and 4 git commands to generate.