1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
7 # include "../config.h"
13 #include "bindings.hh"
21 //%template(ClientList) std::list<OBClient*>;
23 %ignore ob::Openbox::instance;
25 ob::Openbox *Openbox_instance() { return ob::Openbox::instance; }
30 void python_callback(PyObject *func, MouseData *data)
35 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
36 SWIGTYPE_p_ob__MouseData,
40 result = PyEval_CallObject(func, arglist);
41 if (!result || PyErr_Occurred()) {
42 // an exception occured in the script, display it
50 void python_callback(PyObject *func, EventData *data)
55 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
56 SWIGTYPE_p_ob__EventData,
60 result = PyEval_CallObject(func, arglist);
61 if (!result || PyErr_Occurred()) {
62 // an exception occured in the script, display it
70 void python_callback(PyObject *func, KeyData *data)
75 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
76 SWIGTYPE_p_ob__KeyData,
80 result = PyEval_CallObject(func, arglist);
81 if (!result || PyErr_Occurred()) {
82 // an exception occured in the script, display it
93 %ignore ob::OBScreen::clients;
97 %extend ob::OBScreen {
98 OBClient *client(int i) {
99 if (i >= (int)self->clients.size())
101 ob::OBClient::List::iterator it = self->clients.begin();
105 int clientCount() const {
106 return (int) self->clients.size();
110 %ignore otk::OBDisplay::display;
112 Display *OBDisplay_display() { return otk::OBDisplay::display; }
115 %include "../otk/display.hh"
116 %include "../otk/point.hh"
117 %include "../otk/property.hh"
118 %include "../otk/rect.hh"
119 %include "../otk/screeninfo.hh"
120 %include "../otk/strut.hh"
122 %rename(itostring_unsigned) itostring(unsigned int);
123 %rename(itostring_long) itostring(long);
124 %rename(itostring_unsigned_long) itostring(unsigned long);
125 %include "../otk/util.hh"
127 %include "../otk/eventhandler.hh"
128 %include "../otk/eventdispatcher.hh"
130 %import "widgetbase.hh"
133 %include "openbox.hh"