1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
7 # include "../config.h"
13 #include "bindings.hh"
21 //%template(ClientList) std::list<Client*>;
25 ob::Openbox *Openbox_instance() { return ob::openbox; }
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
95 %ignore ob::Screen::clients;
100 Client *client(int i) {
101 if (i < 0 || i >= (int)self->clients.size())
103 ob::Client::List::iterator it = self->clients.begin();
107 int clientCount() const {
108 return (int) self->clients.size();
112 %include "../otk/ustring.i"
114 %ignore otk::display;
116 otk::Display *Display_instance() { return otk::display; }
119 %ignore otk::Property::atoms;
121 const otk::Atoms& Property_atoms() { return otk::Property::atoms; }
124 %include "../otk/display.hh"
125 %include "../otk/point.hh"
126 %include "../otk/property.hh"
127 %include "../otk/rect.hh"
128 %include "../otk/screeninfo.hh"
129 %include "../otk/strut.hh"
131 %include "../otk/eventhandler.hh"
132 %include "../otk/eventdispatcher.hh"
134 %import "widgetbase.hh"
137 %include "openbox.hh"