if (c)
screen = c->screen();
else
- screen = otk::Display::findScreen(e.root)->screen();
+ screen = otk::display->findScreen(e.root)->screen();
MouseData data(screen, c, e.time, state, e.button, w->mcontext(),
MousePress);
openbox->bindings()->fireButton(&data);
// find the area of the window
XWindowAttributes attr;
- if (!XGetWindowAttributes(otk::Display::display, e.window, &attr)) return;
+ if (!XGetWindowAttributes(**otk::display, e.window, &attr)) return;
// if not on the window any more, it isnt a CLICK
if (!(e.same_screen && e.x >= 0 && e.y >= 0 &&
if (c)
screen = c->screen();
else
- screen = otk::Display::findScreen(e.root)->screen();
+ screen = otk::display->findScreen(e.root)->screen();
MouseData data(screen, c, e.time, state, e.button, w->mcontext(),
MouseClick);
openbox->bindings()->fireButton(&data);
if (c)
screen = c->screen();
else
- screen = otk::Display::findScreen(e.root)->screen();
+ screen = otk::display->findScreen(e.root)->screen();
EventData data(screen, c, EventEnterWindow, e.state);
openbox->bindings()->fireEvent(&data);
}
if (c)
screen = c->screen();
else
- screen = otk::Display::findScreen(e.root)->screen();
+ screen = otk::display->findScreen(e.root)->screen();
EventData data(screen, c, EventLeaveWindow, e.state);
openbox->bindings()->fireEvent(&data);
}
unsigned int state = e.state & (ControlMask | ShiftMask | Mod1Mask |
Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask);
openbox->bindings()->
- fireKey(otk::Display::findScreen(e.root)->screen(),
+ fireKey(otk::display->findScreen(e.root)->screen(),
state, e.keycode, e.time);
}
// compress changes to a window into a single change
XEvent ce;
- while (XCheckTypedEvent(otk::Display::display, e.type, &ce)) {
+ while (XCheckTypedEvent(**otk::display, e.type, &ce)) {
if (ce.xmotion.window != e.window) {
- XPutBackEvent(otk::Display::display, &ce);
+ XPutBackEvent(**otk::display, &ce);
break;
} else {
x_root = e.x_root;
if (c)
screen = c->screen();
else
- screen = otk::Display::findScreen(e.root)->screen();
+ screen = otk::display->findScreen(e.root)->screen();
MouseData data(screen, c, e.time, state, button, w->mcontext(), MouseMotion,
x_root, y_root, _posqueue[0]->pos, _posqueue[0]->clientarea);
openbox->bindings()->fireButton(&data);
printf(_("Invalid Key name in key binding: %s\n"), key.c_str());
return false;
}
- if (!(b.key = XKeysymToKeycode(otk::Display::display, sym)))
+ if (!(b.key = XKeysymToKeycode(**otk::display, sym)))
printf(_("No valid keycode for Key in key binding: %s\n"), key.c_str());
return b.key != 0;
} else {
destroytree(tree);
} else {
// grab the server here to make sure no key pressed go missed
- otk::Display::grab();
+ otk::display->grab();
grabKeys(false);
// assimilate this built tree into the main tree
assimilate(tree); // assimilation destroys/uses the tree
grabKeys(true);
- otk::Display::ungrab();
+ otk::display->ungrab();
}
Py_INCREF(callback);
callback);
if (it != t->callbacks.end()) {
// grab the server here to make sure no key pressed go missed
- otk::Display::grab();
+ otk::display->grab();
grabKeys(false);
_curpos = &_keytree;
Py_XDECREF(*it);
grabKeys(true);
- otk::Display::ungrab();
+ otk::display->ungrab();
return true;
}
Binding b(0, 0);
if (translate(key, b)) {
// grab the server here to make sure no key pressed go missed
- otk::Display::grab();
+ otk::display->grab();
grabKeys(false);
_resetkey.key = b.key;
_resetkey.modifiers = b.modifiers;
grabKeys(true);
- otk::Display::ungrab();
+ otk::display->ungrab();
}
}
void Bindings::grabKeys(bool grab)
{
for (int i = 0; i < openbox->screenCount(); ++i) {
- Window root = otk::Display::screenInfo(i)->rootWindow();
+ Window root = otk::display->screenInfo(i)->rootWindow();
KeyBindingTree *p = _curpos->first_child;
while (p) {
if (grab) {
- otk::Display::grabKey(p->binding.key, p->binding.modifiers,
+ otk::display->grabKey(p->binding.key, p->binding.modifiers,
root, false, GrabModeAsync, GrabModeAsync,
false);
}
else
- otk::Display::ungrabKey(p->binding.key, p->binding.modifiers,
+ otk::display->ungrabKey(p->binding.key, p->binding.modifiers,
root);
p = p->next_sibling;
}
if (_resetkey.key)
if (grab)
- otk::Display::grabKey(_resetkey.key, _resetkey.modifiers,
+ otk::display->grabKey(_resetkey.key, _resetkey.modifiers,
root, false, GrabModeAsync, GrabModeAsync,
false);
else
- otk::Display::ungrabKey(_resetkey.key, _resetkey.modifiers,
+ otk::display->ungrabKey(_resetkey.key, _resetkey.modifiers,
root);
}
}
if (p->chain) {
_timer.start(); // start/restart the timer
// grab the server here to make sure no key pressed go missed
- otk::Display::grab();
+ otk::display->grab();
grabKeys(false);
_curpos = p;
grabKeys(true);
- otk::Display::ungrab();
+ otk::display->ungrab();
} else {
Client *c = openbox->focusedClient();
KeyData data(screen, c, time, modifiers, key);
{
self->_timer.stop();
// grab the server here to make sure no key pressed go missed
- otk::Display::grab();
+ otk::display->grab();
self->grabKeys(false);
self->_curpos = &self->_keytree;
self->grabKeys(true);
- otk::Display::ungrab();
+ otk::display->ungrab();
}
return;
}
if (grab)
- otk::Display::grabButton(b.key, b.modifiers, win, false, mask, mode,
- GrabModeAsync, None, None, false);
+ otk::display->grabButton(b.key, b.modifiers, win, false, mask, mode,
+ GrabModeAsync, None, None, false);
else
- otk::Display::ungrabButton(b.key, b.modifiers, win);
+ otk::display->ungrabButton(b.key, b.modifiers, win);
}
void Bindings::grabButtons(bool grab, Client *client)
{
if (data->context == MC_Window) {
// Replay the event, so it goes to the client, and ungrab the device.
- XAllowEvents(otk::Display::display, ReplayPointer, data->time);
+ XAllowEvents(**otk::display, ReplayPointer, data->time);
}
ButtonBindingList::iterator it, end = _buttons[data->context].end();
}
#ifdef XKB
if (action == EventBell && _eventlist[action].empty())
- XkbSelectEvents(otk::Display::display, XkbUseCoreKbd,
+ XkbSelectEvents(**otk::display, XkbUseCoreKbd,
XkbBellNotifyMask, XkbBellNotifyMask);
#endif // XKB
_eventlist[action].push_back(callback);
_eventlist[action].erase(it);
#ifdef XKB
if (action == EventBell && _eventlist[action].empty())
- XkbSelectEvents(otk::Display::display, XkbUseCoreKbd,
+ XkbSelectEvents(**otk::display, XkbUseCoreKbd,
XkbBellNotifyMask, 0);
#endif // XKB
return true;
*_style->getButtonPicUnfocus());
// set the clip region
- XSetClipMask(otk::Display::display, pen.gc(), pm->mask);
- XSetClipOrigin(otk::Display::display, pen.gc(),
+ XSetClipMask(**otk::display, pen.gc(), pm->mask);
+ XSetClipOrigin(**otk::display, pen.gc(),
(width - pm->w)/2, (width - pm->h)/2);
// fill in the clipped region
- XFillRectangle(otk::Display::display, _window, pen.gc(),
+ XFillRectangle(**otk::display, _window, pen.gc(),
(width - pm->w)/2, (width - pm->h)/2,
(width + pm->w)/2, (width + pm->h)/2);
// unset the clip region
- XSetClipMask(otk::Display::display, pen.gc(), None);
- XSetClipOrigin(otk::Display::display, pen.gc(), 0, 0);
+ XSetClipMask(**otk::display, pen.gc(), None);
+ XSetClipOrigin(**otk::display, pen.gc(), 0, 0);
}
}
XWindowAttributes wattrib;
Status ret;
- ret = XGetWindowAttributes(otk::Display::display, _window, &wattrib);
+ ret = XGetWindowAttributes(**otk::display, _window, &wattrib);
assert(ret != BadWindow);
_area.setRect(wattrib.x, wattrib.y, wattrib.width, wattrib.height);
{
_shaped = false;
#ifdef SHAPE
- if (otk::Display::shape()) {
+ if (otk::display->shape()) {
int foo;
unsigned int ufoo;
int s;
- XShapeSelectInput(otk::Display::display, _window, ShapeNotifyMask);
+ XShapeSelectInput(**otk::display, _window, ShapeNotifyMask);
- XShapeQueryExtents(otk::Display::display, _window, &s, &foo,
+ XShapeQueryExtents(**otk::display, _window, &s, &foo,
&foo, &ufoo, &ufoo, &foo, &foo, &foo, &ufoo, &ufoo);
_shaped = (s != 0);
}
_decorations &= ~Decor_Close;
_functions &= ~Func_Close;
- if (XGetWMProtocols(otk::Display::display, _window, &proto, &num_return)) {
+ if (XGetWMProtocols(**otk::display, _window, &proto, &num_return)) {
for (int i = 0; i < num_return; ++i) {
if (proto[i] == property->atom(otk::Property::wm_delete_window)) {
_decorations |= Decor_Close;
// point..
// get the hints from the window
- if (XGetWMNormalHints(otk::Display::display, _window, &size, &ret)) {
+ if (XGetWMNormalHints(**otk::display, _window, &size, &ret)) {
_positioned = (size.flags & (PPosition|USPosition));
if (size.flags & PWinGravity)
_can_focus = true;
_urgent = false;
- if ((hints = XGetWMHints(otk::Display::display, _window)) != NULL) {
+ if ((hints = XGetWMHints(**otk::display, _window)) != NULL) {
if (hints->flags & InputHint)
_can_focus = hints->input;
Window t = 0;
Client *c = 0;
- if (XGetTransientForHint(otk::Display::display, _window, &t) &&
+ if (XGetTransientForHint(**otk::display, _window, &t) &&
t != _window) { // cant be transient to itself!
c = openbox->findClient(t);
assert(c != this); // if this happens then we need to check for it
// not transient to a client, see if it is transient for a group
if (//t == _group->leader() ||
t == None ||
- t == otk::Display::screenInfo(_screen)->rootWindow()) {
+ t == otk::display->screenInfo(_screen)->rootWindow()) {
// window is a transient for its group!
// XXX: for now this is treated as non-transient.
// this needs to be fixed!
// compress changes to a single property into a single change
XEvent ce;
- while (XCheckTypedEvent(otk::Display::display, e.type, &ce)) {
+ while (XCheckTypedEvent(**otk::display, e.type, &ce)) {
// XXX: it would be nice to compress ALL changes to a property, not just
// changes in a row without other props between.
if (ce.xproperty.atom != e.atom) {
- XPutBackEvent(otk::Display::display, &ce);
+ XPutBackEvent(**otk::display, &ce);
break;
}
}
_area.setPos(x, y);
if (addborder) {
- XSetWindowBorderWidth(otk::Display::display, _window, _border_width);
+ XSetWindowBorderWidth(**otk::display, _window, _border_width);
// move the client so it is back it the right spot _with_ its border!
- XMoveWindow(otk::Display::display, _window, x, y);
+ XMoveWindow(**otk::display, _window, x, y);
} else
- XSetWindowBorderWidth(otk::Display::display, _window, 0);
+ XSetWindowBorderWidth(**otk::display, _window, 0);
}
// compress changes into a single change
bool compress = false;
XEvent ce;
- while (XCheckTypedEvent(otk::Display::display, e.type, &ce)) {
+ while (XCheckTypedEvent(**otk::display, e.type, &ce)) {
// XXX: it would be nice to compress ALL messages of a type, not just
// messages in a row without other message types between.
if (ce.xclient.message_type != e.message_type) {
- XPutBackEvent(otk::Display::display, &ce);
+ XPutBackEvent(**otk::display, &ce);
break;
}
compress = true;
// compress changes into a single change
bool compress = false;
XEvent ce;
- while (XCheckTypedEvent(otk::Display::display, e.type, &ce)) {
+ while (XCheckTypedEvent(**otk::display, e.type, &ce)) {
// XXX: it would be nice to compress ALL messages of a type, not just
// messages in a row without other message types between.
if (ce.xclient.message_type != e.message_type) {
- XPutBackEvent(otk::Display::display, &ce);
+ XPutBackEvent(**otk::display, &ce);
break;
}
compress = true;
_area.setSize(w, h);
- XResizeWindow(otk::Display::display, _window, w, h);
+ XResizeWindow(**otk::display, _window, w, h);
// resize the frame to match the request
frame->adjustSize();
// yet)
XEvent event;
event.type = ConfigureNotify;
- event.xconfigure.display = otk::Display::display;
+ event.xconfigure.display = **otk::display;
event.xconfigure.event = _window;
event.xconfigure.window = _window;
event.xconfigure.x = x;
ce.xclient.type = ClientMessage;
ce.xclient.message_type = property->atom(otk::Property::wm_protocols);
- ce.xclient.display = otk::Display::display;
+ ce.xclient.display = **otk::display;
ce.xclient.window = _window;
ce.xclient.format = 32;
ce.xclient.data.l[0] = property->atom(otk::Property::wm_delete_window);
ce.xclient.data.l[2] = 0l;
ce.xclient.data.l[3] = 0l;
ce.xclient.data.l[4] = 0l;
- XSendEvent(otk::Display::display, _window, false, NoEventMask, &ce);
+ XSendEvent(**otk::display, _window, false, NoEventMask, &ce);
}
if (_focused) return true;
if (_can_focus)
- XSetInputFocus(otk::Display::display, _window,
+ XSetInputFocus(**otk::display, _window,
RevertToNone, CurrentTime);
if (_focus_notify) {
ce.xclient.type = ClientMessage;
ce.xclient.message_type = property->atom(otk::Property::wm_protocols);
- ce.xclient.display = otk::Display::display;
+ ce.xclient.display = **otk::display;
ce.xclient.window = _window;
ce.xclient.format = 32;
ce.xclient.data.l[0] = property->atom(otk::Property::wm_take_focus);
ce.xclient.data.l[2] = 0l;
ce.xclient.data.l[3] = 0l;
ce.xclient.data.l[4] = 0l;
- XSendEvent(otk::Display::display, _window, False, NoEventMask, &ce);
+ XSendEvent(**otk::display, _window, False, NoEventMask, &ce);
}
return true;
// server to deal with after we unmanage the window
XEvent ev;
ev.xreparent = e;
- XPutBackEvent(otk::Display::display, &ev);
+ XPutBackEvent(**otk::display, &ev);
// this deletes us etc
openbox->screen(_screen)->unmanageWindow(this);
: otk::Widget(openbox, style, Horizontal, 0, 1, true),
WidgetBase(WidgetBase::Type_Frame),
_client(client),
- _screen(otk::Display::screenInfo(client->screen())),
+ _screen(otk::display->screenInfo(client->screen())),
_plate(this, WidgetBase::Type_Plate),
_titlebar(this, WidgetBase::Type_Titlebar),
_button_close(&_titlebar, WidgetBase::Type_CloseButton),
assert(client);
assert(style);
- XSelectInput(otk::Display::display, _window, Frame::event_mask);
+ XSelectInput(**otk::display, _window, Frame::event_mask);
_grip_left.setCursor(openbox->cursors().ll_angle);
_grip_right.setCursor(openbox->cursors().lr_angle);
if (!_client->shaped()) {
// clear the shape on the frame window
- XShapeCombineMask(otk::Display::display, _window, ShapeBounding,
+ XShapeCombineMask(**otk::display, _window, ShapeBounding,
_innersize.left,
_innersize.top,
None, ShapeSet);
} else {
// make the frame's shape match the clients
- XShapeCombineShape(otk::Display::display, _window, ShapeBounding,
+ XShapeCombineShape(**otk::display, _window, ShapeBounding,
_innersize.left,
_innersize.top,
_client->window(), ShapeBounding, ShapeSet);
++num;
}
- XShapeCombineRectangles(otk::Display::display, window(),
+ XShapeCombineRectangles(**otk::display, window(),
ShapeBounding, 0, 0, xrect, num,
ShapeUnion, Unsorted);
}
void Frame::grabClient()
{
// reparent the client to the frame
- XReparentWindow(otk::Display::display, _client->window(),
+ XReparentWindow(**otk::display, _client->window(),
_plate.window(), 0, 0);
/*
When reparenting the client window, it is usually not mapped yet, since
_client->ignore_unmaps += 2;
// select the event mask on the client's parent (to receive config req's)
- XSelectInput(otk::Display::display, _plate.window(),
+ XSelectInput(**otk::display, _plate.window(),
SubstructureRedirectMask);
// map the client so it maps when the frame does
- XMapWindow(otk::Display::display, _client->window());
+ XMapWindow(**otk::display, _client->window());
adjustSize();
adjustPosition();
XEvent ev;
// check if the app has already reparented its window away
- if (XCheckTypedWindowEvent(otk::Display::display, _client->window(),
+ if (XCheckTypedWindowEvent(**otk::display, _client->window(),
ReparentNotify, &ev)) {
- XPutBackEvent(otk::Display::display, &ev);
+ XPutBackEvent(**otk::display, &ev);
// re-map the window since the unmanaging process unmaps it
- XMapWindow(otk::Display::display, _client->window());
+ XMapWindow(**otk::display, _client->window());
} else {
// according to the ICCCM - if the client doesn't reparent itself, then we
// will reparent the window to root for them
- XReparentWindow(otk::Display::display, _client->window(),
+ XReparentWindow(**otk::display, _client->window(),
_screen->rootWindow(),
_client->area().x(), _client->area().y());
}
: otk::Widget(parent),
WidgetBase(type)
{
- const otk::ScreenInfo *info = otk::Display::screenInfo(_screen);
- _xftdraw = XftDrawCreate(otk::Display::display, _window, info->visual(),
+ const otk::ScreenInfo *info = otk::display->screenInfo(_screen);
+ _xftdraw = XftDrawCreate(**otk::display, _window, info->visual(),
info->colormap());
}
#include "bindings.hh"
#include "python.hh"
#include "otk/property.hh"
-#include "otk/display.hh"
#include "otk/assassin.hh"
#include "otk/util.hh"
Openbox::Openbox(int argc, char **argv)
: otk::EventDispatcher(),
- otk::EventHandler()
+ otk::EventHandler(),
+ _display()
{
struct sigaction action;
parseCommandLine(argc, argv);
- // open the X display (and gets some info about it, and its screens)
- otk::Display::initialize(_displayreq);
- assert(otk::Display::display);
-
- XSynchronize(otk::Display::display, _sync);
+ XSynchronize(**otk::display, _sync);
// set up the signal handler
action.sa_handler = Openbox::signalHandler;
setMasterHandler(_actions); // set as the master event handler
// create the mouse cursors we'll use
- _cursors.session = XCreateFontCursor(otk::Display::display, XC_left_ptr);
- _cursors.move = XCreateFontCursor(otk::Display::display, XC_fleur);
- _cursors.ll_angle = XCreateFontCursor(otk::Display::display, XC_ll_angle);
- _cursors.lr_angle = XCreateFontCursor(otk::Display::display, XC_lr_angle);
- _cursors.ul_angle = XCreateFontCursor(otk::Display::display, XC_ul_angle);
- _cursors.ur_angle = XCreateFontCursor(otk::Display::display, XC_ur_angle);
+ _cursors.session = XCreateFontCursor(**otk::display, XC_left_ptr);
+ _cursors.move = XCreateFontCursor(**otk::display, XC_fleur);
+ _cursors.ll_angle = XCreateFontCursor(**otk::display, XC_ll_angle);
+ _cursors.lr_angle = XCreateFontCursor(**otk::display, XC_lr_angle);
+ _cursors.ul_angle = XCreateFontCursor(**otk::display, XC_ul_angle);
+ _cursors.ur_angle = XCreateFontCursor(**otk::display, XC_ur_angle);
// initialize scripting
python_init(argv[0]);
// initialize all the screens
Screen *screen;
- int i = _single ? DefaultScreen(otk::Display::display) : 0;
- int max = _single ? i + 1 : ScreenCount(otk::Display::display);
+ int i = _single ? DefaultScreen(**otk::display) : 0;
+ int max = _single ? i + 1 : ScreenCount(**otk::display);
for (; i < max; ++i) {
screen = new Screen(i);
if (screen->managed())
python_destroy();
- XSetInputFocus(otk::Display::display, PointerRoot, RevertToNone,
+ XSetInputFocus(**otk::display, PointerRoot, RevertToNone,
CurrentTime);
- XSync(otk::Display::display, false);
+ XSync(**otk::display, false);
// this tends to block.. i honestly am not sure why. causing an x error in
// the shutdown process unblocks it. blackbox simply did a ::exit(0), so
// all im gunna do is the same.
- //otk::Display::destroy();
+ //otk::display->destroy();
if (_restart) {
if (!_restart_prog.empty()) {
const std::string &dstr =
- otk::Display::screenInfo(first_screen)->displayString();
+ otk::display->screenInfo(first_screen)->displayString();
otk::putenv(const_cast<char *>(dstr.c_str()));
execlp(_restart_prog.c_str(), _restart_prog.c_str(), NULL);
perror(_restart_prog.c_str());
{
while (true) {
dispatchEvents(); // from otk::EventDispatcher
- XFlush(otk::Display::display); // flush here before we go wait for timers
+ XFlush(**otk::display); // flush here before we go wait for timers
// don't wait if we're to shutdown
if (_shutdown) break;
_timermanager.fire(!_sync); // wait if not in sync mode
_focused_screen = _screens[c->screen()];
} else {
assert(_focused_screen);
- XSetInputFocus(otk::Display::display, _focused_screen->focuswindow(),
+ XSetInputFocus(**otk::display, _focused_screen->focuswindow(),
RevertToNone, CurrentTime);
}
// set the NET_ACTIVE_WINDOW hint for all screens
ScreenList::iterator it, end = _screens.end();
for (it = _screens.begin(); it != end; ++it) {
int num = (*it)->number();
- Window root = otk::Display::screenInfo(num)->rootWindow();
+ Window root = otk::display->screenInfo(num)->rootWindow();
_property->set(root, otk::Property::net_active_window,
otk::Property::Atom_Window,
(c && _focused_screen == *it) ? c->window() : None);
void Openbox::execute(int screen, const std::string &bin)
{
- if (screen >= ScreenCount(otk::Display::display))
+ if (screen >= ScreenCount(**otk::display))
screen = 0;
- otk::bexec(bin, otk::Display::screenInfo(screen)->displayString());
+ otk::bexec(bin, otk::display->screenInfo(screen)->displayString());
}
}
#include <vector>
#include <map>
+#include "otk/display.hh"
#include "otk/screeninfo.hh"
#include "otk/timerqueuemanager.hh"
#include "otk/property.hh"
typedef std::vector<Screen *> ScreenList;
private:
+ //! The display on which Openbox is running
+ otk::Display _display;
+
// stuff that can be passed on the command line
//! Path to the config file to use/in use
/*!
}
%}
+#ignore ob::openbox;
+
%ignore ob::Screen::clients;
%{
#include <iterator>
}
};
-%ignore otk::Display::display;
-%inline %{
- Display *Display_display() { return otk::Display::display; }
-%};
+%ignore otk::display;
%include "../otk/ustring.i"
Openbox_instance = _openbox.Openbox_instance
-Display_display = _openbox.Display_display
-
class Display(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, Display, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, Display, name)
- __swig_getmethods__["initialize"] = lambda x: _openbox.Display_initialize
- if _newclass:initialize = staticmethod(_openbox.Display_initialize)
- __swig_getmethods__["destroy"] = lambda x: _openbox.Display_destroy
- if _newclass:destroy = staticmethod(_openbox.Display_destroy)
- __swig_getmethods__["gcCache"] = lambda x: _openbox.Display_gcCache
- if _newclass:gcCache = staticmethod(_openbox.Display_gcCache)
- __swig_getmethods__["screenInfo"] = lambda x: _openbox.Display_screenInfo
- if _newclass:screenInfo = staticmethod(_openbox.Display_screenInfo)
- __swig_getmethods__["findScreen"] = lambda x: _openbox.Display_findScreen
- if _newclass:findScreen = staticmethod(_openbox.Display_findScreen)
- __swig_getmethods__["xkb"] = lambda x: _openbox.Display_xkb
- if _newclass:xkb = staticmethod(_openbox.Display_xkb)
- __swig_getmethods__["xkbEventBase"] = lambda x: _openbox.Display_xkbEventBase
- if _newclass:xkbEventBase = staticmethod(_openbox.Display_xkbEventBase)
- __swig_getmethods__["shape"] = lambda x: _openbox.Display_shape
- if _newclass:shape = staticmethod(_openbox.Display_shape)
- __swig_getmethods__["shapeEventBase"] = lambda x: _openbox.Display_shapeEventBase
- if _newclass:shapeEventBase = staticmethod(_openbox.Display_shapeEventBase)
- __swig_getmethods__["xinerama"] = lambda x: _openbox.Display_xinerama
- if _newclass:xinerama = staticmethod(_openbox.Display_xinerama)
- __swig_getmethods__["numLockMask"] = lambda x: _openbox.Display_numLockMask
- if _newclass:numLockMask = staticmethod(_openbox.Display_numLockMask)
- __swig_getmethods__["scrollLockMask"] = lambda x: _openbox.Display_scrollLockMask
- if _newclass:scrollLockMask = staticmethod(_openbox.Display_scrollLockMask)
- __swig_getmethods__["grab"] = lambda x: _openbox.Display_grab
- if _newclass:grab = staticmethod(_openbox.Display_grab)
- __swig_getmethods__["ungrab"] = lambda x: _openbox.Display_ungrab
- if _newclass:ungrab = staticmethod(_openbox.Display_ungrab)
- __swig_getmethods__["grabButton"] = lambda x: _openbox.Display_grabButton
- if _newclass:grabButton = staticmethod(_openbox.Display_grabButton)
- __swig_getmethods__["ungrabButton"] = lambda x: _openbox.Display_ungrabButton
- if _newclass:ungrabButton = staticmethod(_openbox.Display_ungrabButton)
- __swig_getmethods__["grabKey"] = lambda x: _openbox.Display_grabKey
- if _newclass:grabKey = staticmethod(_openbox.Display_grabKey)
- __swig_getmethods__["ungrabKey"] = lambda x: _openbox.Display_ungrabKey
- if _newclass:ungrabKey = staticmethod(_openbox.Display_ungrabKey)
- def __init__(self): raise RuntimeError, "No constructor defined"
+ def __init__(self,*args):
+ self.this = apply(_openbox.new_Display,args)
+ self.thisown = 1
+ def __del__(self, destroy= _openbox.delete_Display):
+ try:
+ if self.thisown: destroy(self)
+ except: pass
+ def gcCache(*args): return apply(_openbox.Display_gcCache,args)
+ def screenInfo(*args): return apply(_openbox.Display_screenInfo,args)
+ def findScreen(*args): return apply(_openbox.Display_findScreen,args)
+ def xkb(*args): return apply(_openbox.Display_xkb,args)
+ def xkbEventBase(*args): return apply(_openbox.Display_xkbEventBase,args)
+ def shape(*args): return apply(_openbox.Display_shape,args)
+ def shapeEventBase(*args): return apply(_openbox.Display_shapeEventBase,args)
+ def xinerama(*args): return apply(_openbox.Display_xinerama,args)
+ def numLockMask(*args): return apply(_openbox.Display_numLockMask,args)
+ def scrollLockMask(*args): return apply(_openbox.Display_scrollLockMask,args)
+ def __mul__(*args): return apply(_openbox.Display___mul__,args)
+ def grab(*args): return apply(_openbox.Display_grab,args)
+ def ungrab(*args): return apply(_openbox.Display_ungrab,args)
+ def grabButton(*args): return apply(_openbox.Display_grabButton,args)
+ def ungrabButton(*args): return apply(_openbox.Display_ungrabButton,args)
+ def grabKey(*args): return apply(_openbox.Display_grabKey,args)
+ def ungrabKey(*args): return apply(_openbox.Display_ungrabKey,args)
def __repr__(self):
return "<C Display instance at %s>" % (self.this,)
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = Display
_openbox.Display_swigregister(DisplayPtr)
-Display_initialize = _openbox.Display_initialize
-
-Display_destroy = _openbox.Display_destroy
-
-Display_gcCache = _openbox.Display_gcCache
-
-Display_screenInfo = _openbox.Display_screenInfo
-
-Display_findScreen = _openbox.Display_findScreen
-
-Display_xkb = _openbox.Display_xkb
-
-Display_xkbEventBase = _openbox.Display_xkbEventBase
-
-Display_shape = _openbox.Display_shape
-
-Display_shapeEventBase = _openbox.Display_shapeEventBase
-
-Display_xinerama = _openbox.Display_xinerama
-
-Display_numLockMask = _openbox.Display_numLockMask
-
-Display_scrollLockMask = _openbox.Display_scrollLockMask
-
-Display_grab = _openbox.Display_grab
-
-Display_ungrab = _openbox.Display_ungrab
-
-Display_grabButton = _openbox.Display_grabButton
-
-Display_ungrabButton = _openbox.Display_ungrabButton
-
-Display_grabKey = _openbox.Display_grabKey
-
-Display_ungrabKey = _openbox.Display_ungrabKey
-
class Point(_object):
__swig_setmethods__ = {}
#define SWIGTYPE_p_otk__ustring swig_types[31]
#define SWIGTYPE_p_std__string swig_types[32]
#define SWIGTYPE_p_XCrossingEvent swig_types[33]
-#define SWIGTYPE_p_Display swig_types[34]
-#define SWIGTYPE_p_otk__Display swig_types[35]
+#define SWIGTYPE_p_otk__Display swig_types[34]
+#define SWIGTYPE_p_Display swig_types[35]
#define SWIGTYPE_p_XMappingEvent swig_types[36]
#define SWIGTYPE_p_otk__Style swig_types[37]
#define SWIGTYPE_p_otk__EventHandler swig_types[38]
#include <iterator>
- Display *Display_display() { return otk::Display::display; }
-
-
#include "ustring.hh"
ob::Client *ob_Screen_client(ob::Screen *self,int i){
}
-static PyObject *_wrap_Display_display(PyObject *self, PyObject *args) {
- PyObject *resultobj;
- Display *result;
-
- if(!PyArg_ParseTuple(args,(char *)":Display_display")) goto fail;
- result = (Display *)Display_display();
-
- resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Display, 0);
- return resultobj;
- fail:
- return NULL;
-}
-
-
-static PyObject *_wrap_Display_initialize(PyObject *self, PyObject *args) {
+static PyObject *_wrap_new_Display(PyObject *self, PyObject *args) {
PyObject *resultobj;
- char *arg1 ;
+ otk::Display *result;
- if(!PyArg_ParseTuple(args,(char *)"s:Display_initialize",&arg1)) goto fail;
- otk::Display::initialize(arg1);
+ if(!PyArg_ParseTuple(args,(char *)":new_Display")) goto fail;
+ result = (otk::Display *)new otk::Display();
- Py_INCREF(Py_None); resultobj = Py_None;
+ resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__Display, 1);
return resultobj;
fail:
return NULL;
}
-static PyObject *_wrap_Display_destroy(PyObject *self, PyObject *args) {
+static PyObject *_wrap_delete_Display(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_destroy")) goto fail;
- otk::Display::destroy();
+ if(!PyArg_ParseTuple(args,(char *)"O:delete_Display",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ delete arg1;
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
static PyObject *_wrap_Display_gcCache(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
otk::GCCache *result;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_gcCache")) goto fail;
- result = (otk::GCCache *)otk::Display::gcCache();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_gcCache",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (otk::GCCache *)((otk::Display const *)arg1)->gcCache();
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__GCCache, 0);
return resultobj;
static PyObject *_wrap_Display_screenInfo(PyObject *self, PyObject *args) {
PyObject *resultobj;
- int arg1 ;
+ otk::Display *arg1 = (otk::Display *) 0 ;
+ int arg2 ;
otk::ScreenInfo *result;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)"i:Display_screenInfo",&arg1)) goto fail;
- result = (otk::ScreenInfo *)otk::Display::screenInfo(arg1);
+ if(!PyArg_ParseTuple(args,(char *)"Oi:Display_screenInfo",&obj0,&arg2)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (otk::ScreenInfo *)(arg1)->screenInfo(arg2);
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__ScreenInfo, 0);
return resultobj;
static PyObject *_wrap_Display_findScreen(PyObject *self, PyObject *args) {
PyObject *resultobj;
- Window arg1 ;
+ otk::Display *arg1 = (otk::Display *) 0 ;
+ Window arg2 ;
otk::ScreenInfo *result;
PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)"O:Display_findScreen",&obj0)) goto fail;
- arg1 = (Window) PyInt_AsLong(obj0);
+ if(!PyArg_ParseTuple(args,(char *)"OO:Display_findScreen",&obj0,&obj1)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ arg2 = (Window) PyInt_AsLong(obj1);
if (PyErr_Occurred()) SWIG_fail;
- result = (otk::ScreenInfo *)otk::Display::findScreen(arg1);
+ result = (otk::ScreenInfo *)(arg1)->findScreen(arg2);
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__ScreenInfo, 0);
return resultobj;
static PyObject *_wrap_Display_xkb(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
bool result;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_xkb")) goto fail;
- result = (bool)otk::Display::xkb();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_xkb",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (bool)((otk::Display const *)arg1)->xkb();
resultobj = PyInt_FromLong((long)result);
return resultobj;
static PyObject *_wrap_Display_xkbEventBase(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
int result;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_xkbEventBase")) goto fail;
- result = (int)otk::Display::xkbEventBase();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_xkbEventBase",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (int)((otk::Display const *)arg1)->xkbEventBase();
resultobj = PyInt_FromLong((long)result);
return resultobj;
static PyObject *_wrap_Display_shape(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
bool result;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_shape")) goto fail;
- result = (bool)otk::Display::shape();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_shape",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (bool)((otk::Display const *)arg1)->shape();
resultobj = PyInt_FromLong((long)result);
return resultobj;
static PyObject *_wrap_Display_shapeEventBase(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
int result;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_shapeEventBase")) goto fail;
- result = (int)otk::Display::shapeEventBase();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_shapeEventBase",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (int)((otk::Display const *)arg1)->shapeEventBase();
resultobj = PyInt_FromLong((long)result);
return resultobj;
static PyObject *_wrap_Display_xinerama(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
bool result;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_xinerama")) goto fail;
- result = (bool)otk::Display::xinerama();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_xinerama",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (bool)((otk::Display const *)arg1)->xinerama();
resultobj = PyInt_FromLong((long)result);
return resultobj;
static PyObject *_wrap_Display_numLockMask(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
unsigned int result;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_numLockMask")) goto fail;
- result = (unsigned int)otk::Display::numLockMask();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_numLockMask",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (unsigned int)((otk::Display const *)arg1)->numLockMask();
resultobj = PyInt_FromLong((long)result);
return resultobj;
static PyObject *_wrap_Display_scrollLockMask(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
unsigned int result;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_scrollLockMask")) goto fail;
- result = (unsigned int)otk::Display::scrollLockMask();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_scrollLockMask",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (unsigned int)((otk::Display const *)arg1)->scrollLockMask();
resultobj = PyInt_FromLong((long)result);
return resultobj;
}
+static PyObject *_wrap_Display___mul__(PyObject *self, PyObject *args) {
+ PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
+ Display *result;
+ PyObject * obj0 = 0 ;
+
+ if(!PyArg_ParseTuple(args,(char *)"O:Display___mul__",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ result = (Display *)((otk::Display const *)arg1)->operator *();
+
+ resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Display, 0);
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
static PyObject *_wrap_Display_grab(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_grab")) goto fail;
- otk::Display::grab();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_grab",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ (arg1)->grab();
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
static PyObject *_wrap_Display_ungrab(PyObject *self, PyObject *args) {
PyObject *resultobj;
+ otk::Display *arg1 = (otk::Display *) 0 ;
+ PyObject * obj0 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)":Display_ungrab")) goto fail;
- otk::Display::ungrab();
+ if(!PyArg_ParseTuple(args,(char *)"O:Display_ungrab",&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+ (arg1)->ungrab();
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
static PyObject *_wrap_Display_grabButton(PyObject *self, PyObject *args) {
PyObject *resultobj;
- unsigned int arg1 ;
+ otk::Display *arg1 = (otk::Display *) 0 ;
unsigned int arg2 ;
- Window arg3 ;
- bool arg4 ;
- unsigned int arg5 ;
- int arg6 ;
+ unsigned int arg3 ;
+ Window arg4 ;
+ bool arg5 ;
+ unsigned int arg6 ;
int arg7 ;
- Window arg8 ;
- Cursor arg9 ;
- bool arg10 ;
+ int arg8 ;
+ Window arg9 ;
+ Cursor arg10 ;
+ bool arg11 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
- PyObject * obj7 = 0 ;
+ PyObject * obj5 = 0 ;
PyObject * obj8 = 0 ;
PyObject * obj9 = 0 ;
+ PyObject * obj10 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)"OOOOOiiOOO:Display_grabButton",&obj0,&obj1,&obj2,&obj3,&obj4,&arg6,&arg7,&obj7,&obj8,&obj9)) goto fail;
- arg1 = (unsigned int) PyInt_AsLong(obj0);
- if (PyErr_Occurred()) SWIG_fail;
+ if(!PyArg_ParseTuple(args,(char *)"OOOOOOiiOOO:Display_grabButton",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&arg7,&arg8,&obj8,&obj9,&obj10)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
arg2 = (unsigned int) PyInt_AsLong(obj1);
if (PyErr_Occurred()) SWIG_fail;
- arg3 = (Window) PyInt_AsLong(obj2);
+ arg3 = (unsigned int) PyInt_AsLong(obj2);
if (PyErr_Occurred()) SWIG_fail;
- arg4 = (bool) PyInt_AsLong(obj3);
+ arg4 = (Window) PyInt_AsLong(obj3);
if (PyErr_Occurred()) SWIG_fail;
- arg5 = (unsigned int) PyInt_AsLong(obj4);
+ arg5 = (bool) PyInt_AsLong(obj4);
if (PyErr_Occurred()) SWIG_fail;
- arg8 = (Window) PyInt_AsLong(obj7);
+ arg6 = (unsigned int) PyInt_AsLong(obj5);
if (PyErr_Occurred()) SWIG_fail;
- arg9 = (Cursor) PyInt_AsLong(obj8);
+ arg9 = (Window) PyInt_AsLong(obj8);
if (PyErr_Occurred()) SWIG_fail;
- arg10 = (bool) PyInt_AsLong(obj9);
+ arg10 = (Cursor) PyInt_AsLong(obj9);
if (PyErr_Occurred()) SWIG_fail;
- otk::Display::grabButton(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
+ arg11 = (bool) PyInt_AsLong(obj10);
+ if (PyErr_Occurred()) SWIG_fail;
+ ((otk::Display const *)arg1)->grabButton(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
static PyObject *_wrap_Display_ungrabButton(PyObject *self, PyObject *args) {
PyObject *resultobj;
- unsigned int arg1 ;
+ otk::Display *arg1 = (otk::Display *) 0 ;
unsigned int arg2 ;
- Window arg3 ;
+ unsigned int arg3 ;
+ Window arg4 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
+ PyObject * obj3 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)"OOO:Display_ungrabButton",&obj0,&obj1,&obj2)) goto fail;
- arg1 = (unsigned int) PyInt_AsLong(obj0);
- if (PyErr_Occurred()) SWIG_fail;
+ if(!PyArg_ParseTuple(args,(char *)"OOOO:Display_ungrabButton",&obj0,&obj1,&obj2,&obj3)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
arg2 = (unsigned int) PyInt_AsLong(obj1);
if (PyErr_Occurred()) SWIG_fail;
- arg3 = (Window) PyInt_AsLong(obj2);
+ arg3 = (unsigned int) PyInt_AsLong(obj2);
+ if (PyErr_Occurred()) SWIG_fail;
+ arg4 = (Window) PyInt_AsLong(obj3);
if (PyErr_Occurred()) SWIG_fail;
- otk::Display::ungrabButton(arg1,arg2,arg3);
+ ((otk::Display const *)arg1)->ungrabButton(arg2,arg3,arg4);
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
static PyObject *_wrap_Display_grabKey(PyObject *self, PyObject *args) {
PyObject *resultobj;
- unsigned int arg1 ;
+ otk::Display *arg1 = (otk::Display *) 0 ;
unsigned int arg2 ;
- Window arg3 ;
- bool arg4 ;
- int arg5 ;
+ unsigned int arg3 ;
+ Window arg4 ;
+ bool arg5 ;
int arg6 ;
- bool arg7 ;
+ int arg7 ;
+ bool arg8 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
- PyObject * obj6 = 0 ;
+ PyObject * obj4 = 0 ;
+ PyObject * obj7 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)"OOOOiiO:Display_grabKey",&obj0,&obj1,&obj2,&obj3,&arg5,&arg6,&obj6)) goto fail;
- arg1 = (unsigned int) PyInt_AsLong(obj0);
- if (PyErr_Occurred()) SWIG_fail;
+ if(!PyArg_ParseTuple(args,(char *)"OOOOOiiO:Display_grabKey",&obj0,&obj1,&obj2,&obj3,&obj4,&arg6,&arg7,&obj7)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
arg2 = (unsigned int) PyInt_AsLong(obj1);
if (PyErr_Occurred()) SWIG_fail;
- arg3 = (Window) PyInt_AsLong(obj2);
+ arg3 = (unsigned int) PyInt_AsLong(obj2);
if (PyErr_Occurred()) SWIG_fail;
- arg4 = (bool) PyInt_AsLong(obj3);
+ arg4 = (Window) PyInt_AsLong(obj3);
if (PyErr_Occurred()) SWIG_fail;
- arg7 = (bool) PyInt_AsLong(obj6);
+ arg5 = (bool) PyInt_AsLong(obj4);
if (PyErr_Occurred()) SWIG_fail;
- otk::Display::grabKey(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
+ arg8 = (bool) PyInt_AsLong(obj7);
+ if (PyErr_Occurred()) SWIG_fail;
+ ((otk::Display const *)arg1)->grabKey(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
static PyObject *_wrap_Display_ungrabKey(PyObject *self, PyObject *args) {
PyObject *resultobj;
- unsigned int arg1 ;
+ otk::Display *arg1 = (otk::Display *) 0 ;
unsigned int arg2 ;
- Window arg3 ;
+ unsigned int arg3 ;
+ Window arg4 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
+ PyObject * obj3 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)"OOO:Display_ungrabKey",&obj0,&obj1,&obj2)) goto fail;
- arg1 = (unsigned int) PyInt_AsLong(obj0);
- if (PyErr_Occurred()) SWIG_fail;
+ if(!PyArg_ParseTuple(args,(char *)"OOOO:Display_ungrabKey",&obj0,&obj1,&obj2,&obj3)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
arg2 = (unsigned int) PyInt_AsLong(obj1);
if (PyErr_Occurred()) SWIG_fail;
- arg3 = (Window) PyInt_AsLong(obj2);
+ arg3 = (unsigned int) PyInt_AsLong(obj2);
if (PyErr_Occurred()) SWIG_fail;
- otk::Display::ungrabKey(arg1,arg2,arg3);
+ arg4 = (Window) PyInt_AsLong(obj3);
+ if (PyErr_Occurred()) SWIG_fail;
+ ((otk::Display const *)arg1)->ungrabKey(arg2,arg3,arg4);
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
static PyMethodDef SwigMethods[] = {
{ (char *)"Openbox_instance", _wrap_Openbox_instance, METH_VARARGS },
- { (char *)"Display_display", _wrap_Display_display, METH_VARARGS },
- { (char *)"Display_initialize", _wrap_Display_initialize, METH_VARARGS },
- { (char *)"Display_destroy", _wrap_Display_destroy, METH_VARARGS },
+ { (char *)"new_Display", _wrap_new_Display, METH_VARARGS },
+ { (char *)"delete_Display", _wrap_delete_Display, METH_VARARGS },
{ (char *)"Display_gcCache", _wrap_Display_gcCache, METH_VARARGS },
{ (char *)"Display_screenInfo", _wrap_Display_screenInfo, METH_VARARGS },
{ (char *)"Display_findScreen", _wrap_Display_findScreen, METH_VARARGS },
{ (char *)"Display_xinerama", _wrap_Display_xinerama, METH_VARARGS },
{ (char *)"Display_numLockMask", _wrap_Display_numLockMask, METH_VARARGS },
{ (char *)"Display_scrollLockMask", _wrap_Display_scrollLockMask, METH_VARARGS },
+ { (char *)"Display___mul__", _wrap_Display___mul__, METH_VARARGS },
{ (char *)"Display_grab", _wrap_Display_grab, METH_VARARGS },
{ (char *)"Display_ungrab", _wrap_Display_ungrab, METH_VARARGS },
{ (char *)"Display_grabButton", _wrap_Display_grabButton, METH_VARARGS },
static swig_type_info _swigt__p_otk__ustring[] = {{"_p_otk__ustring", 0, "otk::ustring *", 0},{"_p_otk__ustring"},{0}};
static swig_type_info _swigt__p_std__string[] = {{"_p_std__string", 0, "std::string *", 0},{"_p_std__string"},{0}};
static swig_type_info _swigt__p_XCrossingEvent[] = {{"_p_XCrossingEvent", 0, "XCrossingEvent *", 0},{"_p_XCrossingEvent"},{0}};
-static swig_type_info _swigt__p_Display[] = {{"_p_Display", 0, "Display *", 0},{"_p_Display"},{0}};
static swig_type_info _swigt__p_otk__Display[] = {{"_p_otk__Display", 0, "otk::Display *", 0},{"_p_otk__Display"},{0}};
+static swig_type_info _swigt__p_Display[] = {{"_p_Display", 0, "Display *", 0},{"_p_Display"},{0}};
static swig_type_info _swigt__p_XMappingEvent[] = {{"_p_XMappingEvent", 0, "XMappingEvent *", 0},{"_p_XMappingEvent"},{0}};
static swig_type_info _swigt__p_otk__Style[] = {{"_p_otk__Style", 0, "otk::Style *", 0},{"_p_otk__Style"},{0}};
static swig_type_info _swigt__p_otk__EventHandler[] = {{"_p_otk__EventHandler", 0, "otk::EventHandler *", 0},{"_p_ob__Client", _p_ob__ClientTo_p_otk__EventHandler},{"_p_ob__Actions", _p_ob__ActionsTo_p_otk__EventHandler},{"_p_otk__EventHandler"},{"_p_ob__Openbox", _p_ob__OpenboxTo_p_otk__EventHandler},{"_p_ob__Screen", _p_ob__ScreenTo_p_otk__EventHandler},{0}};
_swigt__p_otk__ustring,
_swigt__p_std__string,
_swigt__p_XCrossingEvent,
-_swigt__p_Display,
_swigt__p_otk__Display,
+_swigt__p_Display,
_swigt__p_XMappingEvent,
_swigt__p_otk__Style,
_swigt__p_otk__EventHandler,
e.xclient.data.l[3] = data3;
e.xclient.data.l[4] = data4;
- XSendEvent(otk::Display::display, target, false,
+ XSendEvent(**otk::display, target, false,
SubstructureRedirectMask | SubstructureNotifyMask,
&e);
Py_INCREF(Py_None); return Py_None;
this->client = client;
this->time = time;
this->state = state;
- this->key = XKeysymToString(XKeycodeToKeysym(otk::Display::display,
+ this->key = XKeysymToString(XKeycodeToKeysym(**otk::display,
key, 0));
}
};
: WidgetBase(WidgetBase::Type_Root),
_number(screen)
{
- assert(screen >= 0); assert(screen < ScreenCount(otk::Display::display));
- _info = otk::Display::screenInfo(screen);
+ assert(screen >= 0); assert(screen < ScreenCount(**otk::display));
+ _info = otk::display->screenInfo(screen);
::running = false;
XErrorHandler old = XSetErrorHandler(::anotherWMRunning);
- XSelectInput(otk::Display::display, _info->rootWindow(),
+ XSelectInput(**otk::display, _info->rootWindow(),
Screen::event_mask);
- XSync(otk::Display::display, false);
+ XSync(**otk::display, false);
XSetErrorHandler(old);
_managed = !::running;
(unsigned long) getpid());
// set the mouse cursor for the root window (the default cursor)
- XDefineCursor(otk::Display::display, _info->rootWindow(),
+ XDefineCursor(**otk::display, _info->rootWindow(),
openbox->cursors().session);
// initialize the shit that is used for all drawing on the screen
// create the window which gets focus when no clients get it
XSetWindowAttributes attr;
attr.override_redirect = true;
- _focuswindow = XCreateWindow(otk::Display::display, _info->rootWindow(),
+ _focuswindow = XCreateWindow(**otk::display, _info->rootWindow(),
-100, -100, 1, 1, 0, 0, InputOnly,
_info->visual(), CWOverrideRedirect, &attr);
- XMapWindow(otk::Display::display, _focuswindow);
+ XMapWindow(**otk::display, _focuswindow);
// these may be further updated if any pre-existing windows are found in
// the manageExising() function
{
if (! _managed) return;
- XSelectInput(otk::Display::display, _info->rootWindow(), NoEventMask);
+ XSelectInput(**otk::display, _info->rootWindow(), NoEventMask);
// unmanage all windows
while (!clients.empty())
EventData data(_number, 0, EventShutdown, 0);
openbox->bindings()->fireEvent(&data);
- XDestroyWindow(otk::Display::display, _focuswindow);
- XDestroyWindow(otk::Display::display, _supportwindow);
+ XDestroyWindow(**otk::display, _focuswindow);
+ XDestroyWindow(**otk::display, _supportwindow);
delete _image_control;
}
{
unsigned int i, j, nchild;
Window r, p, *children;
- XQueryTree(otk::Display::display, _info->rootWindow(), &r, &p,
+ XQueryTree(**otk::display, _info->rootWindow(), &r, &p,
&children, &nchild);
// preen the window list of all icon windows... for better dockapp support
for (i = 0; i < nchild; i++) {
if (children[i] == None) continue;
- XWMHints *wmhints = XGetWMHints(otk::Display::display,
+ XWMHints *wmhints = XGetWMHints(**otk::display,
children[i]);
if (wmhints) {
continue;
XWindowAttributes attrib;
- if (XGetWindowAttributes(otk::Display::display, children[i], &attrib)) {
+ if (XGetWindowAttributes(**otk::display, children[i], &attrib)) {
if (attrib.override_redirect) continue;
if (attrib.map_state != IsUnmapped) {
void Screen::changeSupportedAtoms()
{
// create the netwm support window
- _supportwindow = XCreateSimpleWindow(otk::Display::display,
+ _supportwindow = XCreateSimpleWindow(**otk::display,
_info->rootWindow(),
0, 0, 1, 1, 0, 0, 0);
XWMHints *wmhint;
XSetWindowAttributes attrib_set;
- otk::Display::grab();
+ otk::display->grab();
// is the window a docking app
- if ((wmhint = XGetWMHints(otk::Display::display, window))) {
+ if ((wmhint = XGetWMHints(**otk::display, window))) {
if ((wmhint->flags & StateHint) &&
wmhint->initial_state == WithdrawnState) {
//slit->addClient(w); // XXX: make dock apps work!
- otk::Display::ungrab();
+ otk::display->ungrab();
XFree(wmhint);
return;
// choose the events we want to receive on the CLIENT window
attrib_set.event_mask = Client::event_mask;
attrib_set.do_not_propagate_mask = Client::no_propagate_mask;
- XChangeWindowAttributes(otk::Display::display, window,
+ XChangeWindowAttributes(**otk::display, window,
CWEventMask|CWDontPropagate, &attrib_set);
// create the Client class, which gets all of the hints on the window
// specify that if we exit, the window should not be destroyed and should be
// reparented back to root automatically
- XChangeSaveSet(otk::Display::display, window, SetModeInsert);
+ XChangeSaveSet(**otk::display, window, SetModeInsert);
if (!(openbox->state() == Openbox::State_Starting ||
client->positionRequested())) {
// XXX: handle any requested states such as maximized
- otk::Display::ungrab();
+ otk::display->ungrab();
// add to the screen's list
clients.push_back(client);
openbox->clearHandler(client->window());
// remove the window from our save set
- XChangeSaveSet(otk::Display::display, client->window(), SetModeDelete);
+ XChangeSaveSet(**otk::display, client->window(), SetModeDelete);
// we dont want events no more
- XSelectInput(otk::Display::display, client->window(), NoEventMask);
+ XSelectInput(**otk::display, client->window(), NoEventMask);
frame->hide();
for (; it != end; ++it)
wins.push_back((*it)->frame->window());
- XRestackWindows(otk::Display::display, &wins[0], wins.size());
+ XRestackWindows(**otk::display, &wins[0], wins.size());
changeStackingList();
}
// compress changes to a single property into a single change
XEvent ce;
- while (XCheckTypedEvent(otk::Display::display, e.type, &ce)) {
+ while (XCheckTypedEvent(**otk::display, e.type, &ce)) {
// XXX: it would be nice to compress ALL changes to a property, not just
// changes in a row without other props between.
if (ce.xproperty.atom != e.atom) {
- XPutBackEvent(otk::Display::display, &ce);
+ XPutBackEvent(**otk::display, &ce);
break;
}
}
ce.xclient.type = ClientMessage;
ce.xclient.message_type =
openbox->property()->atom(otk::Property::net_active_window);
- ce.xclient.display = otk::Display::display;
+ ce.xclient.display = **otk::display;
ce.xclient.window = c->window();
ce.xclient.format = 32;
ce.xclient.data.l[0] = 0l;
ce.xclient.data.l[2] = 0l;
ce.xclient.data.l[3] = 0l;
ce.xclient.data.l[4] = 0l;
- XSendEvent(otk::Display::display, _info->rootWindow(), false,
+ XSendEvent(**otk::display, _info->rootWindow(), false,
SubstructureRedirectMask | SubstructureNotifyMask,
&ce);
} else