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)
36 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
37 SWIGTYPE_p_ob__MouseData,
41 result = PyEval_CallObject(func, arglist);
42 if (!result || PyErr_Occurred()) {
43 // an exception occured in the script, display it
51 void python_callback(PyObject *func, EventData *data)
56 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
57 SWIGTYPE_p_ob__EventData,
61 result = PyEval_CallObject(func, arglist);
62 if (!result || PyErr_Occurred()) {
63 // an exception occured in the script, display it
71 void python_callback(PyObject *func, KeyData *data)
76 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
77 SWIGTYPE_p_ob__KeyData,
81 result = PyEval_CallObject(func, arglist);
82 if (!result || PyErr_Occurred()) {
83 // an exception occured in the script, display it
96 %ignore ob::Screen::clients;
101 Client *client(int i) {
102 if (i < 0 || i >= (int)self->clients.size())
104 ob::Client::List::iterator it = self->clients.begin();
108 int clientCount() const {
109 return (int) self->clients.size();
113 %include "../otk/ustring.i"
115 %ignore otk::display;
117 otk::Display *Display_instance() { return otk::display; }
120 %ignore otk::Property::atoms;
122 const otk::Atoms& Property_atoms() { return otk::Property::atoms; }
125 %include "../otk/display.hh"
126 %include "../otk/point.hh"
127 %include "../otk/property.hh"
128 %include "../otk/rect.hh"
129 %include "../otk/screeninfo.hh"
130 %include "../otk/strut.hh"
132 %include "../otk/eventhandler.hh"
133 %include "../otk/eventdispatcher.hh"
135 %import "../otk/widget.hh"
136 %import "widgetbase.hh"
139 %include "openbox.hh"