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 %ignore otk::display;
114 %include "../otk/ustring.i"
116 %include "../otk/display.hh"
117 %include "../otk/point.hh"
118 %include "../otk/property.hh"
119 %include "../otk/rect.hh"
120 %include "../otk/screeninfo.hh"
121 %include "../otk/strut.hh"
123 %include "../otk/eventhandler.hh"
124 %include "../otk/eventdispatcher.hh"
126 %import "widgetbase.hh"
129 %include "openbox.hh"