1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
7 # include "../config.h"
14 #include "bindings.hh"
22 //%template(ClientList) std::list<Client*>;
26 ob::Openbox *Openbox_instance() { return ob::openbox; }
31 void python_callback(PyObject *func, MouseData *data)
33 PyObject *arglist, *result, *pdata;
35 pdata = SWIG_NewPointerObj((void *) data, SWIGTYPE_p_ob__MouseData, 0);
36 arglist = Py_BuildValue("(O)", pdata);
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)
52 PyObject *arglist, *result, *pdata;
54 pdata = SWIG_NewPointerObj((void *) data, SWIGTYPE_p_ob__EventData, 0);
55 arglist = Py_BuildValue("(O)", pdata);
59 result = PyEval_CallObject(func, arglist);
60 if (!result || PyErr_Occurred()) {
61 // an exception occured in the script, display it
69 void python_callback(PyObject *func, KeyData *data)
71 PyObject *arglist, *result, *pdata;
73 pdata = SWIG_NewPointerObj((void *) data, SWIGTYPE_p_ob__KeyData, 0);
74 arglist = Py_BuildValue("(O)", pdata);
78 result = PyEval_CallObject(func, arglist);
79 if (!result || PyErr_Occurred()) {
80 // an exception occured in the script, display it
93 %ignore ob::Screen::clients;
98 Client *client(int i) {
99 if (i < 0 || i >= (int)self->clients.size())
101 ob::Client::List::iterator it = self->clients.begin();
105 int clientCount() const {
106 return (int) self->clients.size();
111 %include "../otk/ustring.i"
113 %ignore otk::display;
115 otk::Display *Display_instance() { return otk::display; }
118 %ignore otk::Property::atoms;
120 const otk::Atoms& Property_atoms() { return otk::Property::atoms; }
123 %include "../otk/display.hh"
124 %include "../otk/point.hh"
125 %include "../otk/property.hh"
126 %include "../otk/rect.hh"
127 %include "../otk/screeninfo.hh"
128 %include "../otk/strut.hh"
130 %include "../otk/eventhandler.hh"
131 %include "../otk/eventdispatcher.hh"
133 %import "../otk/widget.hh"
135 %import "../otk/otk.i"
137 %import "widgetbase.hh"
140 %include "openbox.hh"