use the new non-static display
This commit is contained in:
parent
c34f2a5241
commit
cdcc526a02
14 changed files with 312 additions and 313 deletions
|
@ -84,7 +84,7 @@ void Actions::buttonPressHandler(const XButtonEvent &e)
|
||||||
if (c)
|
if (c)
|
||||||
screen = c->screen();
|
screen = c->screen();
|
||||||
else
|
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(),
|
MouseData data(screen, c, e.time, state, e.button, w->mcontext(),
|
||||||
MousePress);
|
MousePress);
|
||||||
openbox->bindings()->fireButton(&data);
|
openbox->bindings()->fireButton(&data);
|
||||||
|
@ -122,7 +122,7 @@ void Actions::buttonReleaseHandler(const XButtonEvent &e)
|
||||||
|
|
||||||
// find the area of the window
|
// find the area of the window
|
||||||
XWindowAttributes attr;
|
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 not on the window any more, it isnt a CLICK
|
||||||
if (!(e.same_screen && e.x >= 0 && e.y >= 0 &&
|
if (!(e.same_screen && e.x >= 0 && e.y >= 0 &&
|
||||||
|
@ -138,7 +138,7 @@ void Actions::buttonReleaseHandler(const XButtonEvent &e)
|
||||||
if (c)
|
if (c)
|
||||||
screen = c->screen();
|
screen = c->screen();
|
||||||
else
|
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(),
|
MouseData data(screen, c, e.time, state, e.button, w->mcontext(),
|
||||||
MouseClick);
|
MouseClick);
|
||||||
openbox->bindings()->fireButton(&data);
|
openbox->bindings()->fireButton(&data);
|
||||||
|
@ -179,7 +179,7 @@ void Actions::enterHandler(const XCrossingEvent &e)
|
||||||
if (c)
|
if (c)
|
||||||
screen = c->screen();
|
screen = c->screen();
|
||||||
else
|
else
|
||||||
screen = otk::Display::findScreen(e.root)->screen();
|
screen = otk::display->findScreen(e.root)->screen();
|
||||||
EventData data(screen, c, EventEnterWindow, e.state);
|
EventData data(screen, c, EventEnterWindow, e.state);
|
||||||
openbox->bindings()->fireEvent(&data);
|
openbox->bindings()->fireEvent(&data);
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ void Actions::leaveHandler(const XCrossingEvent &e)
|
||||||
if (c)
|
if (c)
|
||||||
screen = c->screen();
|
screen = c->screen();
|
||||||
else
|
else
|
||||||
screen = otk::Display::findScreen(e.root)->screen();
|
screen = otk::display->findScreen(e.root)->screen();
|
||||||
EventData data(screen, c, EventLeaveWindow, e.state);
|
EventData data(screen, c, EventLeaveWindow, e.state);
|
||||||
openbox->bindings()->fireEvent(&data);
|
openbox->bindings()->fireEvent(&data);
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ void Actions::keyPressHandler(const XKeyEvent &e)
|
||||||
unsigned int state = e.state & (ControlMask | ShiftMask | Mod1Mask |
|
unsigned int state = e.state & (ControlMask | ShiftMask | Mod1Mask |
|
||||||
Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask);
|
Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask);
|
||||||
openbox->bindings()->
|
openbox->bindings()->
|
||||||
fireKey(otk::Display::findScreen(e.root)->screen(),
|
fireKey(otk::display->findScreen(e.root)->screen(),
|
||||||
state, e.keycode, e.time);
|
state, e.keycode, e.time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,9 +224,9 @@ void Actions::motionHandler(const XMotionEvent &e)
|
||||||
|
|
||||||
// compress changes to a window into a single change
|
// compress changes to a window into a single change
|
||||||
XEvent ce;
|
XEvent ce;
|
||||||
while (XCheckTypedEvent(otk::Display::display, e.type, &ce)) {
|
while (XCheckTypedEvent(**otk::display, e.type, &ce)) {
|
||||||
if (ce.xmotion.window != e.window) {
|
if (ce.xmotion.window != e.window) {
|
||||||
XPutBackEvent(otk::Display::display, &ce);
|
XPutBackEvent(**otk::display, &ce);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
x_root = e.x_root;
|
x_root = e.x_root;
|
||||||
|
@ -248,7 +248,7 @@ void Actions::motionHandler(const XMotionEvent &e)
|
||||||
if (c)
|
if (c)
|
||||||
screen = c->screen();
|
screen = c->screen();
|
||||||
else
|
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,
|
MouseData data(screen, c, e.time, state, button, w->mcontext(), MouseMotion,
|
||||||
x_root, y_root, _posqueue[0]->pos, _posqueue[0]->clientarea);
|
x_root, y_root, _posqueue[0]->pos, _posqueue[0]->clientarea);
|
||||||
openbox->bindings()->fireButton(&data);
|
openbox->bindings()->fireButton(&data);
|
||||||
|
|
|
@ -98,7 +98,7 @@ bool Bindings::translate(const std::string &str, Binding &b,bool askey) const
|
||||||
printf(_("Invalid Key name in key binding: %s\n"), key.c_str());
|
printf(_("Invalid Key name in key binding: %s\n"), key.c_str());
|
||||||
return false;
|
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());
|
printf(_("No valid keycode for Key in key binding: %s\n"), key.c_str());
|
||||||
return b.key != 0;
|
return b.key != 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -244,14 +244,14 @@ bool Bindings::addKey(const StringVect &keylist, PyObject *callback)
|
||||||
destroytree(tree);
|
destroytree(tree);
|
||||||
} else {
|
} else {
|
||||||
// grab the server here to make sure no key pressed go missed
|
// grab the server here to make sure no key pressed go missed
|
||||||
otk::Display::grab();
|
otk::display->grab();
|
||||||
grabKeys(false);
|
grabKeys(false);
|
||||||
|
|
||||||
// assimilate this built tree into the main tree
|
// assimilate this built tree into the main tree
|
||||||
assimilate(tree); // assimilation destroys/uses the tree
|
assimilate(tree); // assimilation destroys/uses the tree
|
||||||
|
|
||||||
grabKeys(true);
|
grabKeys(true);
|
||||||
otk::Display::ungrab();
|
otk::display->ungrab();
|
||||||
}
|
}
|
||||||
|
|
||||||
Py_INCREF(callback);
|
Py_INCREF(callback);
|
||||||
|
@ -277,7 +277,7 @@ bool Bindings::removeKey(const StringVect &keylist, PyObject *callback)
|
||||||
callback);
|
callback);
|
||||||
if (it != t->callbacks.end()) {
|
if (it != t->callbacks.end()) {
|
||||||
// grab the server here to make sure no key pressed go missed
|
// grab the server here to make sure no key pressed go missed
|
||||||
otk::Display::grab();
|
otk::display->grab();
|
||||||
grabKeys(false);
|
grabKeys(false);
|
||||||
|
|
||||||
_curpos = &_keytree;
|
_curpos = &_keytree;
|
||||||
|
@ -286,7 +286,7 @@ bool Bindings::removeKey(const StringVect &keylist, PyObject *callback)
|
||||||
Py_XDECREF(*it);
|
Py_XDECREF(*it);
|
||||||
|
|
||||||
grabKeys(true);
|
grabKeys(true);
|
||||||
otk::Display::ungrab();
|
otk::display->ungrab();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -300,12 +300,12 @@ void Bindings::setResetKey(const std::string &key)
|
||||||
Binding b(0, 0);
|
Binding b(0, 0);
|
||||||
if (translate(key, b)) {
|
if (translate(key, b)) {
|
||||||
// grab the server here to make sure no key pressed go missed
|
// grab the server here to make sure no key pressed go missed
|
||||||
otk::Display::grab();
|
otk::display->grab();
|
||||||
grabKeys(false);
|
grabKeys(false);
|
||||||
_resetkey.key = b.key;
|
_resetkey.key = b.key;
|
||||||
_resetkey.modifiers = b.modifiers;
|
_resetkey.modifiers = b.modifiers;
|
||||||
grabKeys(true);
|
grabKeys(true);
|
||||||
otk::Display::ungrab();
|
otk::display->ungrab();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,28 +342,28 @@ void Bindings::removeAllKeys()
|
||||||
void Bindings::grabKeys(bool grab)
|
void Bindings::grabKeys(bool grab)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < openbox->screenCount(); ++i) {
|
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;
|
KeyBindingTree *p = _curpos->first_child;
|
||||||
while (p) {
|
while (p) {
|
||||||
if (grab) {
|
if (grab) {
|
||||||
otk::Display::grabKey(p->binding.key, p->binding.modifiers,
|
otk::display->grabKey(p->binding.key, p->binding.modifiers,
|
||||||
root, false, GrabModeAsync, GrabModeAsync,
|
root, false, GrabModeAsync, GrabModeAsync,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
otk::Display::ungrabKey(p->binding.key, p->binding.modifiers,
|
otk::display->ungrabKey(p->binding.key, p->binding.modifiers,
|
||||||
root);
|
root);
|
||||||
p = p->next_sibling;
|
p = p->next_sibling;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_resetkey.key)
|
if (_resetkey.key)
|
||||||
if (grab)
|
if (grab)
|
||||||
otk::Display::grabKey(_resetkey.key, _resetkey.modifiers,
|
otk::display->grabKey(_resetkey.key, _resetkey.modifiers,
|
||||||
root, false, GrabModeAsync, GrabModeAsync,
|
root, false, GrabModeAsync, GrabModeAsync,
|
||||||
false);
|
false);
|
||||||
else
|
else
|
||||||
otk::Display::ungrabKey(_resetkey.key, _resetkey.modifiers,
|
otk::display->ungrabKey(_resetkey.key, _resetkey.modifiers,
|
||||||
root);
|
root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -381,11 +381,11 @@ void Bindings::fireKey(int screen, unsigned int modifiers, unsigned int key,
|
||||||
if (p->chain) {
|
if (p->chain) {
|
||||||
_timer.start(); // start/restart the timer
|
_timer.start(); // start/restart the timer
|
||||||
// grab the server here to make sure no key pressed go missed
|
// grab the server here to make sure no key pressed go missed
|
||||||
otk::Display::grab();
|
otk::display->grab();
|
||||||
grabKeys(false);
|
grabKeys(false);
|
||||||
_curpos = p;
|
_curpos = p;
|
||||||
grabKeys(true);
|
grabKeys(true);
|
||||||
otk::Display::ungrab();
|
otk::display->ungrab();
|
||||||
} else {
|
} else {
|
||||||
Client *c = openbox->focusedClient();
|
Client *c = openbox->focusedClient();
|
||||||
KeyData data(screen, c, time, modifiers, key);
|
KeyData data(screen, c, time, modifiers, key);
|
||||||
|
@ -405,11 +405,11 @@ void Bindings::resetChains(Bindings *self)
|
||||||
{
|
{
|
||||||
self->_timer.stop();
|
self->_timer.stop();
|
||||||
// grab the server here to make sure no key pressed go missed
|
// grab the server here to make sure no key pressed go missed
|
||||||
otk::Display::grab();
|
otk::display->grab();
|
||||||
self->grabKeys(false);
|
self->grabKeys(false);
|
||||||
self->_curpos = &self->_keytree;
|
self->_curpos = &self->_keytree;
|
||||||
self->grabKeys(true);
|
self->grabKeys(true);
|
||||||
otk::Display::ungrab();
|
otk::display->ungrab();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -500,10 +500,10 @@ void Bindings::grabButton(bool grab, const Binding &b, MouseContext context,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (grab)
|
if (grab)
|
||||||
otk::Display::grabButton(b.key, b.modifiers, win, false, mask, mode,
|
otk::display->grabButton(b.key, b.modifiers, win, false, mask, mode,
|
||||||
GrabModeAsync, None, None, false);
|
GrabModeAsync, None, None, false);
|
||||||
else
|
else
|
||||||
otk::Display::ungrabButton(b.key, b.modifiers, win);
|
otk::display->ungrabButton(b.key, b.modifiers, win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bindings::grabButtons(bool grab, Client *client)
|
void Bindings::grabButtons(bool grab, Client *client)
|
||||||
|
@ -519,7 +519,7 @@ void Bindings::fireButton(MouseData *data)
|
||||||
{
|
{
|
||||||
if (data->context == MC_Window) {
|
if (data->context == MC_Window) {
|
||||||
// Replay the event, so it goes to the client, and ungrab the device.
|
// 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();
|
ButtonBindingList::iterator it, end = _buttons[data->context].end();
|
||||||
|
@ -541,7 +541,7 @@ bool Bindings::addEvent(EventAction action, PyObject *callback)
|
||||||
}
|
}
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
if (action == EventBell && _eventlist[action].empty())
|
if (action == EventBell && _eventlist[action].empty())
|
||||||
XkbSelectEvents(otk::Display::display, XkbUseCoreKbd,
|
XkbSelectEvents(**otk::display, XkbUseCoreKbd,
|
||||||
XkbBellNotifyMask, XkbBellNotifyMask);
|
XkbBellNotifyMask, XkbBellNotifyMask);
|
||||||
#endif // XKB
|
#endif // XKB
|
||||||
_eventlist[action].push_back(callback);
|
_eventlist[action].push_back(callback);
|
||||||
|
@ -563,7 +563,7 @@ bool Bindings::removeEvent(EventAction action, PyObject *callback)
|
||||||
_eventlist[action].erase(it);
|
_eventlist[action].erase(it);
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
if (action == EventBell && _eventlist[action].empty())
|
if (action == EventBell && _eventlist[action].empty())
|
||||||
XkbSelectEvents(otk::Display::display, XkbUseCoreKbd,
|
XkbSelectEvents(**otk::display, XkbUseCoreKbd,
|
||||||
XkbBellNotifyMask, 0);
|
XkbBellNotifyMask, 0);
|
||||||
#endif // XKB
|
#endif // XKB
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -114,18 +114,18 @@ void ButtonWidget::update()
|
||||||
*_style->getButtonPicUnfocus());
|
*_style->getButtonPicUnfocus());
|
||||||
|
|
||||||
// set the clip region
|
// set the clip region
|
||||||
XSetClipMask(otk::Display::display, pen.gc(), pm->mask);
|
XSetClipMask(**otk::display, pen.gc(), pm->mask);
|
||||||
XSetClipOrigin(otk::Display::display, pen.gc(),
|
XSetClipOrigin(**otk::display, pen.gc(),
|
||||||
(width - pm->w)/2, (width - pm->h)/2);
|
(width - pm->w)/2, (width - pm->h)/2);
|
||||||
|
|
||||||
// fill in the clipped region
|
// 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,
|
||||||
(width + pm->w)/2, (width + pm->h)/2);
|
(width + pm->w)/2, (width + pm->h)/2);
|
||||||
|
|
||||||
// unset the clip region
|
// unset the clip region
|
||||||
XSetClipMask(otk::Display::display, pen.gc(), None);
|
XSetClipMask(**otk::display, pen.gc(), None);
|
||||||
XSetClipOrigin(otk::Display::display, pen.gc(), 0, 0);
|
XSetClipOrigin(**otk::display, pen.gc(), 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ void Client::getArea()
|
||||||
XWindowAttributes wattrib;
|
XWindowAttributes wattrib;
|
||||||
Status ret;
|
Status ret;
|
||||||
|
|
||||||
ret = XGetWindowAttributes(otk::Display::display, _window, &wattrib);
|
ret = XGetWindowAttributes(**otk::display, _window, &wattrib);
|
||||||
assert(ret != BadWindow);
|
assert(ret != BadWindow);
|
||||||
|
|
||||||
_area.setRect(wattrib.x, wattrib.y, wattrib.width, wattrib.height);
|
_area.setRect(wattrib.x, wattrib.y, wattrib.width, wattrib.height);
|
||||||
|
@ -332,14 +332,14 @@ void Client::getShaped()
|
||||||
{
|
{
|
||||||
_shaped = false;
|
_shaped = false;
|
||||||
#ifdef SHAPE
|
#ifdef SHAPE
|
||||||
if (otk::Display::shape()) {
|
if (otk::display->shape()) {
|
||||||
int foo;
|
int foo;
|
||||||
unsigned int ufoo;
|
unsigned int ufoo;
|
||||||
int s;
|
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);
|
&foo, &ufoo, &ufoo, &foo, &foo, &foo, &ufoo, &ufoo);
|
||||||
_shaped = (s != 0);
|
_shaped = (s != 0);
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ void Client::updateProtocols()
|
||||||
_decorations &= ~Decor_Close;
|
_decorations &= ~Decor_Close;
|
||||||
_functions &= ~Func_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) {
|
for (int i = 0; i < num_return; ++i) {
|
||||||
if (proto[i] == property->atom(otk::Property::wm_delete_window)) {
|
if (proto[i] == property->atom(otk::Property::wm_delete_window)) {
|
||||||
_decorations |= Decor_Close;
|
_decorations |= Decor_Close;
|
||||||
|
@ -419,7 +419,7 @@ void Client::updateNormalHints()
|
||||||
// point..
|
// point..
|
||||||
|
|
||||||
// get the hints from the window
|
// 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));
|
_positioned = (size.flags & (PPosition|USPosition));
|
||||||
|
|
||||||
if (size.flags & PWinGravity)
|
if (size.flags & PWinGravity)
|
||||||
|
@ -457,7 +457,7 @@ void Client::updateWMHints()
|
||||||
_can_focus = true;
|
_can_focus = true;
|
||||||
_urgent = false;
|
_urgent = false;
|
||||||
|
|
||||||
if ((hints = XGetWMHints(otk::Display::display, _window)) != NULL) {
|
if ((hints = XGetWMHints(**otk::display, _window)) != NULL) {
|
||||||
if (hints->flags & InputHint)
|
if (hints->flags & InputHint)
|
||||||
_can_focus = hints->input;
|
_can_focus = hints->input;
|
||||||
|
|
||||||
|
@ -572,7 +572,7 @@ void Client::updateTransientFor()
|
||||||
Window t = 0;
|
Window t = 0;
|
||||||
Client *c = 0;
|
Client *c = 0;
|
||||||
|
|
||||||
if (XGetTransientForHint(otk::Display::display, _window, &t) &&
|
if (XGetTransientForHint(**otk::display, _window, &t) &&
|
||||||
t != _window) { // cant be transient to itself!
|
t != _window) { // cant be transient to itself!
|
||||||
c = openbox->findClient(t);
|
c = openbox->findClient(t);
|
||||||
assert(c != this); // if this happens then we need to check for it
|
assert(c != this); // if this happens then we need to check for it
|
||||||
|
@ -581,7 +581,7 @@ void Client::updateTransientFor()
|
||||||
// not transient to a client, see if it is transient for a group
|
// not transient to a client, see if it is transient for a group
|
||||||
if (//t == _group->leader() ||
|
if (//t == _group->leader() ||
|
||||||
t == None ||
|
t == None ||
|
||||||
t == otk::Display::screenInfo(_screen)->rootWindow()) {
|
t == otk::display->screenInfo(_screen)->rootWindow()) {
|
||||||
// window is a transient for its group!
|
// window is a transient for its group!
|
||||||
// XXX: for now this is treated as non-transient.
|
// XXX: for now this is treated as non-transient.
|
||||||
// this needs to be fixed!
|
// this needs to be fixed!
|
||||||
|
@ -610,11 +610,11 @@ void Client::propertyHandler(const XPropertyEvent &e)
|
||||||
|
|
||||||
// compress changes to a single property into a single change
|
// compress changes to a single property into a single change
|
||||||
XEvent ce;
|
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
|
// XXX: it would be nice to compress ALL changes to a property, not just
|
||||||
// changes in a row without other props between.
|
// changes in a row without other props between.
|
||||||
if (ce.xproperty.atom != e.atom) {
|
if (ce.xproperty.atom != e.atom) {
|
||||||
XPutBackEvent(otk::Display::display, &ce);
|
XPutBackEvent(**otk::display, &ce);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -850,12 +850,12 @@ void Client::toggleClientBorder(bool addborder)
|
||||||
_area.setPos(x, y);
|
_area.setPos(x, y);
|
||||||
|
|
||||||
if (addborder) {
|
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!
|
// 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
|
} else
|
||||||
XSetWindowBorderWidth(otk::Display::display, _window, 0);
|
XSetWindowBorderWidth(**otk::display, _window, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -871,11 +871,11 @@ void Client::clientMessageHandler(const XClientMessageEvent &e)
|
||||||
// compress changes into a single change
|
// compress changes into a single change
|
||||||
bool compress = false;
|
bool compress = false;
|
||||||
XEvent ce;
|
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
|
// XXX: it would be nice to compress ALL messages of a type, not just
|
||||||
// messages in a row without other message types between.
|
// messages in a row without other message types between.
|
||||||
if (ce.xclient.message_type != e.message_type) {
|
if (ce.xclient.message_type != e.message_type) {
|
||||||
XPutBackEvent(otk::Display::display, &ce);
|
XPutBackEvent(**otk::display, &ce);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
compress = true;
|
compress = true;
|
||||||
|
@ -889,11 +889,11 @@ void Client::clientMessageHandler(const XClientMessageEvent &e)
|
||||||
// compress changes into a single change
|
// compress changes into a single change
|
||||||
bool compress = false;
|
bool compress = false;
|
||||||
XEvent ce;
|
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
|
// XXX: it would be nice to compress ALL messages of a type, not just
|
||||||
// messages in a row without other message types between.
|
// messages in a row without other message types between.
|
||||||
if (ce.xclient.message_type != e.message_type) {
|
if (ce.xclient.message_type != e.message_type) {
|
||||||
XPutBackEvent(otk::Display::display, &ce);
|
XPutBackEvent(**otk::display, &ce);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
compress = true;
|
compress = true;
|
||||||
|
@ -998,7 +998,7 @@ void Client::resize(Corner anchor, int w, int h, int x, int y)
|
||||||
|
|
||||||
_area.setSize(w, h);
|
_area.setSize(w, h);
|
||||||
|
|
||||||
XResizeWindow(otk::Display::display, _window, w, h);
|
XResizeWindow(**otk::display, _window, w, h);
|
||||||
|
|
||||||
// resize the frame to match the request
|
// resize the frame to match the request
|
||||||
frame->adjustSize();
|
frame->adjustSize();
|
||||||
|
@ -1018,7 +1018,7 @@ void Client::move(int x, int y)
|
||||||
// yet)
|
// yet)
|
||||||
XEvent event;
|
XEvent event;
|
||||||
event.type = ConfigureNotify;
|
event.type = ConfigureNotify;
|
||||||
event.xconfigure.display = otk::Display::display;
|
event.xconfigure.display = **otk::display;
|
||||||
event.xconfigure.event = _window;
|
event.xconfigure.event = _window;
|
||||||
event.xconfigure.window = _window;
|
event.xconfigure.window = _window;
|
||||||
event.xconfigure.x = x;
|
event.xconfigure.x = x;
|
||||||
|
@ -1049,7 +1049,7 @@ void Client::close()
|
||||||
|
|
||||||
ce.xclient.type = ClientMessage;
|
ce.xclient.type = ClientMessage;
|
||||||
ce.xclient.message_type = property->atom(otk::Property::wm_protocols);
|
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.window = _window;
|
||||||
ce.xclient.format = 32;
|
ce.xclient.format = 32;
|
||||||
ce.xclient.data.l[0] = property->atom(otk::Property::wm_delete_window);
|
ce.xclient.data.l[0] = property->atom(otk::Property::wm_delete_window);
|
||||||
|
@ -1057,7 +1057,7 @@ void Client::close()
|
||||||
ce.xclient.data.l[2] = 0l;
|
ce.xclient.data.l[2] = 0l;
|
||||||
ce.xclient.data.l[3] = 0l;
|
ce.xclient.data.l[3] = 0l;
|
||||||
ce.xclient.data.l[4] = 0l;
|
ce.xclient.data.l[4] = 0l;
|
||||||
XSendEvent(otk::Display::display, _window, false, NoEventMask, &ce);
|
XSendEvent(**otk::display, _window, false, NoEventMask, &ce);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1123,7 +1123,7 @@ bool Client::focus() const
|
||||||
if (_focused) return true;
|
if (_focused) return true;
|
||||||
|
|
||||||
if (_can_focus)
|
if (_can_focus)
|
||||||
XSetInputFocus(otk::Display::display, _window,
|
XSetInputFocus(**otk::display, _window,
|
||||||
RevertToNone, CurrentTime);
|
RevertToNone, CurrentTime);
|
||||||
|
|
||||||
if (_focus_notify) {
|
if (_focus_notify) {
|
||||||
|
@ -1132,7 +1132,7 @@ bool Client::focus() const
|
||||||
|
|
||||||
ce.xclient.type = ClientMessage;
|
ce.xclient.type = ClientMessage;
|
||||||
ce.xclient.message_type = property->atom(otk::Property::wm_protocols);
|
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.window = _window;
|
||||||
ce.xclient.format = 32;
|
ce.xclient.format = 32;
|
||||||
ce.xclient.data.l[0] = property->atom(otk::Property::wm_take_focus);
|
ce.xclient.data.l[0] = property->atom(otk::Property::wm_take_focus);
|
||||||
|
@ -1140,7 +1140,7 @@ bool Client::focus() const
|
||||||
ce.xclient.data.l[2] = 0l;
|
ce.xclient.data.l[2] = 0l;
|
||||||
ce.xclient.data.l[3] = 0l;
|
ce.xclient.data.l[3] = 0l;
|
||||||
ce.xclient.data.l[4] = 0l;
|
ce.xclient.data.l[4] = 0l;
|
||||||
XSendEvent(otk::Display::display, _window, False, NoEventMask, &ce);
|
XSendEvent(**otk::display, _window, False, NoEventMask, &ce);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1308,7 +1308,7 @@ void Client::reparentHandler(const XReparentEvent &e)
|
||||||
// server to deal with after we unmanage the window
|
// server to deal with after we unmanage the window
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
ev.xreparent = e;
|
ev.xreparent = e;
|
||||||
XPutBackEvent(otk::Display::display, &ev);
|
XPutBackEvent(**otk::display, &ev);
|
||||||
|
|
||||||
// this deletes us etc
|
// this deletes us etc
|
||||||
openbox->screen(_screen)->unmanageWindow(this);
|
openbox->screen(_screen)->unmanageWindow(this);
|
||||||
|
|
24
src/frame.cc
24
src/frame.cc
|
@ -27,7 +27,7 @@ Frame::Frame(Client *client, otk::Style *style)
|
||||||
: otk::Widget(openbox, style, Horizontal, 0, 1, true),
|
: otk::Widget(openbox, style, Horizontal, 0, 1, true),
|
||||||
WidgetBase(WidgetBase::Type_Frame),
|
WidgetBase(WidgetBase::Type_Frame),
|
||||||
_client(client),
|
_client(client),
|
||||||
_screen(otk::Display::screenInfo(client->screen())),
|
_screen(otk::display->screenInfo(client->screen())),
|
||||||
_plate(this, WidgetBase::Type_Plate),
|
_plate(this, WidgetBase::Type_Plate),
|
||||||
_titlebar(this, WidgetBase::Type_Titlebar),
|
_titlebar(this, WidgetBase::Type_Titlebar),
|
||||||
_button_close(&_titlebar, WidgetBase::Type_CloseButton),
|
_button_close(&_titlebar, WidgetBase::Type_CloseButton),
|
||||||
|
@ -43,7 +43,7 @@ Frame::Frame(Client *client, otk::Style *style)
|
||||||
assert(client);
|
assert(client);
|
||||||
assert(style);
|
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_left.setCursor(openbox->cursors().ll_angle);
|
||||||
_grip_right.setCursor(openbox->cursors().lr_angle);
|
_grip_right.setCursor(openbox->cursors().lr_angle);
|
||||||
|
@ -361,13 +361,13 @@ void Frame::adjustShape()
|
||||||
|
|
||||||
if (!_client->shaped()) {
|
if (!_client->shaped()) {
|
||||||
// clear the shape on the frame window
|
// clear the shape on the frame window
|
||||||
XShapeCombineMask(otk::Display::display, _window, ShapeBounding,
|
XShapeCombineMask(**otk::display, _window, ShapeBounding,
|
||||||
_innersize.left,
|
_innersize.left,
|
||||||
_innersize.top,
|
_innersize.top,
|
||||||
None, ShapeSet);
|
None, ShapeSet);
|
||||||
} else {
|
} else {
|
||||||
// make the frame's shape match the clients
|
// make the frame's shape match the clients
|
||||||
XShapeCombineShape(otk::Display::display, _window, ShapeBounding,
|
XShapeCombineShape(**otk::display, _window, ShapeBounding,
|
||||||
_innersize.left,
|
_innersize.left,
|
||||||
_innersize.top,
|
_innersize.top,
|
||||||
_client->window(), ShapeBounding, ShapeSet);
|
_client->window(), ShapeBounding, ShapeSet);
|
||||||
|
@ -391,7 +391,7 @@ void Frame::adjustShape()
|
||||||
++num;
|
++num;
|
||||||
}
|
}
|
||||||
|
|
||||||
XShapeCombineRectangles(otk::Display::display, window(),
|
XShapeCombineRectangles(**otk::display, window(),
|
||||||
ShapeBounding, 0, 0, xrect, num,
|
ShapeBounding, 0, 0, xrect, num,
|
||||||
ShapeUnion, Unsorted);
|
ShapeUnion, Unsorted);
|
||||||
}
|
}
|
||||||
|
@ -402,7 +402,7 @@ void Frame::adjustShape()
|
||||||
void Frame::grabClient()
|
void Frame::grabClient()
|
||||||
{
|
{
|
||||||
// reparent the client to the frame
|
// reparent the client to the frame
|
||||||
XReparentWindow(otk::Display::display, _client->window(),
|
XReparentWindow(**otk::display, _client->window(),
|
||||||
_plate.window(), 0, 0);
|
_plate.window(), 0, 0);
|
||||||
/*
|
/*
|
||||||
When reparenting the client window, it is usually not mapped yet, since
|
When reparenting the client window, it is usually not mapped yet, since
|
||||||
|
@ -416,11 +416,11 @@ void Frame::grabClient()
|
||||||
_client->ignore_unmaps += 2;
|
_client->ignore_unmaps += 2;
|
||||||
|
|
||||||
// select the event mask on the client's parent (to receive config req's)
|
// 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);
|
SubstructureRedirectMask);
|
||||||
|
|
||||||
// map the client so it maps when the frame does
|
// map the client so it maps when the frame does
|
||||||
XMapWindow(otk::Display::display, _client->window());
|
XMapWindow(**otk::display, _client->window());
|
||||||
|
|
||||||
adjustSize();
|
adjustSize();
|
||||||
adjustPosition();
|
adjustPosition();
|
||||||
|
@ -432,15 +432,15 @@ void Frame::releaseClient()
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
||||||
// check if the app has already reparented its window away
|
// 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)) {
|
ReparentNotify, &ev)) {
|
||||||
XPutBackEvent(otk::Display::display, &ev);
|
XPutBackEvent(**otk::display, &ev);
|
||||||
// re-map the window since the unmanaging process unmaps it
|
// re-map the window since the unmanaging process unmaps it
|
||||||
XMapWindow(otk::Display::display, _client->window());
|
XMapWindow(**otk::display, _client->window());
|
||||||
} else {
|
} else {
|
||||||
// according to the ICCCM - if the client doesn't reparent itself, then we
|
// according to the ICCCM - if the client doesn't reparent itself, then we
|
||||||
// will reparent the window to root for them
|
// will reparent the window to root for them
|
||||||
XReparentWindow(otk::Display::display, _client->window(),
|
XReparentWindow(**otk::display, _client->window(),
|
||||||
_screen->rootWindow(),
|
_screen->rootWindow(),
|
||||||
_client->area().x(), _client->area().y());
|
_client->area().x(), _client->area().y());
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@ LabelWidget::LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type)
|
||||||
: otk::Widget(parent),
|
: otk::Widget(parent),
|
||||||
WidgetBase(type)
|
WidgetBase(type)
|
||||||
{
|
{
|
||||||
const otk::ScreenInfo *info = otk::Display::screenInfo(_screen);
|
const otk::ScreenInfo *info = otk::display->screenInfo(_screen);
|
||||||
_xftdraw = XftDrawCreate(otk::Display::display, _window, info->visual(),
|
_xftdraw = XftDrawCreate(**otk::display, _window, info->visual(),
|
||||||
info->colormap());
|
info->colormap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "bindings.hh"
|
#include "bindings.hh"
|
||||||
#include "python.hh"
|
#include "python.hh"
|
||||||
#include "otk/property.hh"
|
#include "otk/property.hh"
|
||||||
#include "otk/display.hh"
|
|
||||||
#include "otk/assassin.hh"
|
#include "otk/assassin.hh"
|
||||||
#include "otk/util.hh"
|
#include "otk/util.hh"
|
||||||
|
|
||||||
|
@ -80,7 +79,8 @@ void Openbox::signalHandler(int signal)
|
||||||
|
|
||||||
Openbox::Openbox(int argc, char **argv)
|
Openbox::Openbox(int argc, char **argv)
|
||||||
: otk::EventDispatcher(),
|
: otk::EventDispatcher(),
|
||||||
otk::EventHandler()
|
otk::EventHandler(),
|
||||||
|
_display()
|
||||||
{
|
{
|
||||||
struct sigaction action;
|
struct sigaction action;
|
||||||
|
|
||||||
|
@ -99,11 +99,7 @@ Openbox::Openbox(int argc, char **argv)
|
||||||
|
|
||||||
parseCommandLine(argc, argv);
|
parseCommandLine(argc, argv);
|
||||||
|
|
||||||
// open the X display (and gets some info about it, and its screens)
|
XSynchronize(**otk::display, _sync);
|
||||||
otk::Display::initialize(_displayreq);
|
|
||||||
assert(otk::Display::display);
|
|
||||||
|
|
||||||
XSynchronize(otk::Display::display, _sync);
|
|
||||||
|
|
||||||
// set up the signal handler
|
// set up the signal handler
|
||||||
action.sa_handler = Openbox::signalHandler;
|
action.sa_handler = Openbox::signalHandler;
|
||||||
|
@ -124,12 +120,12 @@ Openbox::Openbox(int argc, char **argv)
|
||||||
setMasterHandler(_actions); // set as the master event handler
|
setMasterHandler(_actions); // set as the master event handler
|
||||||
|
|
||||||
// create the mouse cursors we'll use
|
// create the mouse cursors we'll use
|
||||||
_cursors.session = XCreateFontCursor(otk::Display::display, XC_left_ptr);
|
_cursors.session = XCreateFontCursor(**otk::display, XC_left_ptr);
|
||||||
_cursors.move = XCreateFontCursor(otk::Display::display, XC_fleur);
|
_cursors.move = XCreateFontCursor(**otk::display, XC_fleur);
|
||||||
_cursors.ll_angle = XCreateFontCursor(otk::Display::display, XC_ll_angle);
|
_cursors.ll_angle = XCreateFontCursor(**otk::display, XC_ll_angle);
|
||||||
_cursors.lr_angle = XCreateFontCursor(otk::Display::display, XC_lr_angle);
|
_cursors.lr_angle = XCreateFontCursor(**otk::display, XC_lr_angle);
|
||||||
_cursors.ul_angle = XCreateFontCursor(otk::Display::display, XC_ul_angle);
|
_cursors.ul_angle = XCreateFontCursor(**otk::display, XC_ul_angle);
|
||||||
_cursors.ur_angle = XCreateFontCursor(otk::Display::display, XC_ur_angle);
|
_cursors.ur_angle = XCreateFontCursor(**otk::display, XC_ur_angle);
|
||||||
|
|
||||||
// initialize scripting
|
// initialize scripting
|
||||||
python_init(argv[0]);
|
python_init(argv[0]);
|
||||||
|
@ -144,8 +140,8 @@ Openbox::Openbox(int argc, char **argv)
|
||||||
|
|
||||||
// initialize all the screens
|
// initialize all the screens
|
||||||
Screen *screen;
|
Screen *screen;
|
||||||
int i = _single ? DefaultScreen(otk::Display::display) : 0;
|
int i = _single ? DefaultScreen(**otk::display) : 0;
|
||||||
int max = _single ? i + 1 : ScreenCount(otk::Display::display);
|
int max = _single ? i + 1 : ScreenCount(**otk::display);
|
||||||
for (; i < max; ++i) {
|
for (; i < max; ++i) {
|
||||||
screen = new Screen(i);
|
screen = new Screen(i);
|
||||||
if (screen->managed())
|
if (screen->managed())
|
||||||
|
@ -189,19 +185,19 @@ Openbox::~Openbox()
|
||||||
|
|
||||||
python_destroy();
|
python_destroy();
|
||||||
|
|
||||||
XSetInputFocus(otk::Display::display, PointerRoot, RevertToNone,
|
XSetInputFocus(**otk::display, PointerRoot, RevertToNone,
|
||||||
CurrentTime);
|
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
|
// 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
|
// the shutdown process unblocks it. blackbox simply did a ::exit(0), so
|
||||||
// all im gunna do is the same.
|
// all im gunna do is the same.
|
||||||
//otk::Display::destroy();
|
//otk::display->destroy();
|
||||||
|
|
||||||
if (_restart) {
|
if (_restart) {
|
||||||
if (!_restart_prog.empty()) {
|
if (!_restart_prog.empty()) {
|
||||||
const std::string &dstr =
|
const std::string &dstr =
|
||||||
otk::Display::screenInfo(first_screen)->displayString();
|
otk::display->screenInfo(first_screen)->displayString();
|
||||||
otk::putenv(const_cast<char *>(dstr.c_str()));
|
otk::putenv(const_cast<char *>(dstr.c_str()));
|
||||||
execlp(_restart_prog.c_str(), _restart_prog.c_str(), NULL);
|
execlp(_restart_prog.c_str(), _restart_prog.c_str(), NULL);
|
||||||
perror(_restart_prog.c_str());
|
perror(_restart_prog.c_str());
|
||||||
|
@ -321,7 +317,7 @@ void Openbox::eventLoop()
|
||||||
{
|
{
|
||||||
while (true) {
|
while (true) {
|
||||||
dispatchEvents(); // from otk::EventDispatcher
|
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
|
// don't wait if we're to shutdown
|
||||||
if (_shutdown) break;
|
if (_shutdown) break;
|
||||||
_timermanager.fire(!_sync); // wait if not in sync mode
|
_timermanager.fire(!_sync); // wait if not in sync mode
|
||||||
|
@ -363,14 +359,14 @@ void Openbox::setFocusedClient(Client *c)
|
||||||
_focused_screen = _screens[c->screen()];
|
_focused_screen = _screens[c->screen()];
|
||||||
} else {
|
} else {
|
||||||
assert(_focused_screen);
|
assert(_focused_screen);
|
||||||
XSetInputFocus(otk::Display::display, _focused_screen->focuswindow(),
|
XSetInputFocus(**otk::display, _focused_screen->focuswindow(),
|
||||||
RevertToNone, CurrentTime);
|
RevertToNone, CurrentTime);
|
||||||
}
|
}
|
||||||
// set the NET_ACTIVE_WINDOW hint for all screens
|
// set the NET_ACTIVE_WINDOW hint for all screens
|
||||||
ScreenList::iterator it, end = _screens.end();
|
ScreenList::iterator it, end = _screens.end();
|
||||||
for (it = _screens.begin(); it != end; ++it) {
|
for (it = _screens.begin(); it != end; ++it) {
|
||||||
int num = (*it)->number();
|
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,
|
_property->set(root, otk::Property::net_active_window,
|
||||||
otk::Property::Atom_Window,
|
otk::Property::Atom_Window,
|
||||||
(c && _focused_screen == *it) ? c->window() : None);
|
(c && _focused_screen == *it) ? c->window() : None);
|
||||||
|
@ -383,9 +379,9 @@ void Openbox::setFocusedClient(Client *c)
|
||||||
|
|
||||||
void Openbox::execute(int screen, const std::string &bin)
|
void Openbox::execute(int screen, const std::string &bin)
|
||||||
{
|
{
|
||||||
if (screen >= ScreenCount(otk::Display::display))
|
if (screen >= ScreenCount(**otk::display))
|
||||||
screen = 0;
|
screen = 0;
|
||||||
otk::bexec(bin, otk::Display::screenInfo(screen)->displayString());
|
otk::bexec(bin, otk::display->screenInfo(screen)->displayString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ extern "C" {
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
#include "otk/display.hh"
|
||||||
#include "otk/screeninfo.hh"
|
#include "otk/screeninfo.hh"
|
||||||
#include "otk/timerqueuemanager.hh"
|
#include "otk/timerqueuemanager.hh"
|
||||||
#include "otk/property.hh"
|
#include "otk/property.hh"
|
||||||
|
@ -74,6 +75,9 @@ public:
|
||||||
typedef std::vector<Screen *> ScreenList;
|
typedef std::vector<Screen *> ScreenList;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
//! The display on which Openbox is running
|
||||||
|
otk::Display _display;
|
||||||
|
|
||||||
// stuff that can be passed on the command line
|
// stuff that can be passed on the command line
|
||||||
//! Path to the config file to use/in use
|
//! Path to the config file to use/in use
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -90,6 +90,8 @@ void python_callback(PyObject *func, KeyData *data)
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
#ignore ob::openbox;
|
||||||
|
|
||||||
%ignore ob::Screen::clients;
|
%ignore ob::Screen::clients;
|
||||||
%{
|
%{
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
@ -107,10 +109,7 @@ void python_callback(PyObject *func, KeyData *data)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
%ignore otk::Display::display;
|
%ignore otk::display;
|
||||||
%inline %{
|
|
||||||
Display *Display_display() { return otk::Display::display; }
|
|
||||||
%};
|
|
||||||
|
|
||||||
%include "../otk/ustring.i"
|
%include "../otk/ustring.i"
|
||||||
|
|
||||||
|
|
|
@ -29,50 +29,35 @@ except AttributeError:
|
||||||
|
|
||||||
Openbox_instance = _openbox.Openbox_instance
|
Openbox_instance = _openbox.Openbox_instance
|
||||||
|
|
||||||
Display_display = _openbox.Display_display
|
|
||||||
|
|
||||||
class Display(_object):
|
class Display(_object):
|
||||||
__swig_setmethods__ = {}
|
__swig_setmethods__ = {}
|
||||||
__setattr__ = lambda self, name, value: _swig_setattr(self, Display, name, value)
|
__setattr__ = lambda self, name, value: _swig_setattr(self, Display, name, value)
|
||||||
__swig_getmethods__ = {}
|
__swig_getmethods__ = {}
|
||||||
__getattr__ = lambda self, name: _swig_getattr(self, Display, name)
|
__getattr__ = lambda self, name: _swig_getattr(self, Display, name)
|
||||||
__swig_getmethods__["initialize"] = lambda x: _openbox.Display_initialize
|
def __init__(self,*args):
|
||||||
if _newclass:initialize = staticmethod(_openbox.Display_initialize)
|
self.this = apply(_openbox.new_Display,args)
|
||||||
__swig_getmethods__["destroy"] = lambda x: _openbox.Display_destroy
|
self.thisown = 1
|
||||||
if _newclass:destroy = staticmethod(_openbox.Display_destroy)
|
def __del__(self, destroy= _openbox.delete_Display):
|
||||||
__swig_getmethods__["gcCache"] = lambda x: _openbox.Display_gcCache
|
try:
|
||||||
if _newclass:gcCache = staticmethod(_openbox.Display_gcCache)
|
if self.thisown: destroy(self)
|
||||||
__swig_getmethods__["screenInfo"] = lambda x: _openbox.Display_screenInfo
|
except: pass
|
||||||
if _newclass:screenInfo = staticmethod(_openbox.Display_screenInfo)
|
def gcCache(*args): return apply(_openbox.Display_gcCache,args)
|
||||||
__swig_getmethods__["findScreen"] = lambda x: _openbox.Display_findScreen
|
def screenInfo(*args): return apply(_openbox.Display_screenInfo,args)
|
||||||
if _newclass:findScreen = staticmethod(_openbox.Display_findScreen)
|
def findScreen(*args): return apply(_openbox.Display_findScreen,args)
|
||||||
__swig_getmethods__["xkb"] = lambda x: _openbox.Display_xkb
|
def xkb(*args): return apply(_openbox.Display_xkb,args)
|
||||||
if _newclass:xkb = staticmethod(_openbox.Display_xkb)
|
def xkbEventBase(*args): return apply(_openbox.Display_xkbEventBase,args)
|
||||||
__swig_getmethods__["xkbEventBase"] = lambda x: _openbox.Display_xkbEventBase
|
def shape(*args): return apply(_openbox.Display_shape,args)
|
||||||
if _newclass:xkbEventBase = staticmethod(_openbox.Display_xkbEventBase)
|
def shapeEventBase(*args): return apply(_openbox.Display_shapeEventBase,args)
|
||||||
__swig_getmethods__["shape"] = lambda x: _openbox.Display_shape
|
def xinerama(*args): return apply(_openbox.Display_xinerama,args)
|
||||||
if _newclass:shape = staticmethod(_openbox.Display_shape)
|
def numLockMask(*args): return apply(_openbox.Display_numLockMask,args)
|
||||||
__swig_getmethods__["shapeEventBase"] = lambda x: _openbox.Display_shapeEventBase
|
def scrollLockMask(*args): return apply(_openbox.Display_scrollLockMask,args)
|
||||||
if _newclass:shapeEventBase = staticmethod(_openbox.Display_shapeEventBase)
|
def __mul__(*args): return apply(_openbox.Display___mul__,args)
|
||||||
__swig_getmethods__["xinerama"] = lambda x: _openbox.Display_xinerama
|
def grab(*args): return apply(_openbox.Display_grab,args)
|
||||||
if _newclass:xinerama = staticmethod(_openbox.Display_xinerama)
|
def ungrab(*args): return apply(_openbox.Display_ungrab,args)
|
||||||
__swig_getmethods__["numLockMask"] = lambda x: _openbox.Display_numLockMask
|
def grabButton(*args): return apply(_openbox.Display_grabButton,args)
|
||||||
if _newclass:numLockMask = staticmethod(_openbox.Display_numLockMask)
|
def ungrabButton(*args): return apply(_openbox.Display_ungrabButton,args)
|
||||||
__swig_getmethods__["scrollLockMask"] = lambda x: _openbox.Display_scrollLockMask
|
def grabKey(*args): return apply(_openbox.Display_grabKey,args)
|
||||||
if _newclass:scrollLockMask = staticmethod(_openbox.Display_scrollLockMask)
|
def ungrabKey(*args): return apply(_openbox.Display_ungrabKey,args)
|
||||||
__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 __repr__(self):
|
def __repr__(self):
|
||||||
return "<C Display instance at %s>" % (self.this,)
|
return "<C Display instance at %s>" % (self.this,)
|
||||||
|
|
||||||
|
@ -82,42 +67,6 @@ class DisplayPtr(Display):
|
||||||
if not hasattr(self,"thisown"): self.thisown = 0
|
if not hasattr(self,"thisown"): self.thisown = 0
|
||||||
self.__class__ = Display
|
self.__class__ = Display
|
||||||
_openbox.Display_swigregister(DisplayPtr)
|
_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):
|
class Point(_object):
|
||||||
__swig_setmethods__ = {}
|
__swig_setmethods__ = {}
|
||||||
|
|
|
@ -679,8 +679,8 @@ SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
||||||
#define SWIGTYPE_p_otk__ustring swig_types[31]
|
#define SWIGTYPE_p_otk__ustring swig_types[31]
|
||||||
#define SWIGTYPE_p_std__string swig_types[32]
|
#define SWIGTYPE_p_std__string swig_types[32]
|
||||||
#define SWIGTYPE_p_XCrossingEvent swig_types[33]
|
#define SWIGTYPE_p_XCrossingEvent swig_types[33]
|
||||||
#define SWIGTYPE_p_Display swig_types[34]
|
#define SWIGTYPE_p_otk__Display swig_types[34]
|
||||||
#define SWIGTYPE_p_otk__Display swig_types[35]
|
#define SWIGTYPE_p_Display swig_types[35]
|
||||||
#define SWIGTYPE_p_XMappingEvent swig_types[36]
|
#define SWIGTYPE_p_XMappingEvent swig_types[36]
|
||||||
#define SWIGTYPE_p_otk__Style swig_types[37]
|
#define SWIGTYPE_p_otk__Style swig_types[37]
|
||||||
#define SWIGTYPE_p_otk__EventHandler swig_types[38]
|
#define SWIGTYPE_p_otk__EventHandler swig_types[38]
|
||||||
|
@ -883,9 +883,6 @@ void python_callback(PyObject *func, KeyData *data)
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
|
||||||
Display *Display_display() { return otk::Display::display; }
|
|
||||||
|
|
||||||
|
|
||||||
#include "ustring.hh"
|
#include "ustring.hh"
|
||||||
|
|
||||||
ob::Client *ob_Screen_client(ob::Screen *self,int i){
|
ob::Client *ob_Screen_client(ob::Screen *self,int i){
|
||||||
|
@ -915,39 +912,28 @@ static PyObject *_wrap_Openbox_instance(PyObject *self, PyObject *args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static PyObject *_wrap_Display_display(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_new_Display(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
Display *result;
|
otk::Display *result;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_display")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)":new_Display")) goto fail;
|
||||||
result = (Display *)Display_display();
|
result = (otk::Display *)new otk::Display();
|
||||||
|
|
||||||
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_Display, 0);
|
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__Display, 1);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
fail:
|
fail:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static PyObject *_wrap_Display_initialize(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_delete_Display(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
char *arg1 ;
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)"s:Display_initialize",&arg1)) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:delete_Display",&obj0)) goto fail;
|
||||||
otk::Display::initialize(arg1);
|
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;
|
|
||||||
fail:
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static PyObject *_wrap_Display_destroy(PyObject *self, PyObject *args) {
|
|
||||||
PyObject *resultobj;
|
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_destroy")) goto fail;
|
|
||||||
otk::Display::destroy();
|
|
||||||
|
|
||||||
Py_INCREF(Py_None); resultobj = Py_None;
|
Py_INCREF(Py_None); resultobj = Py_None;
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -958,10 +944,13 @@ static PyObject *_wrap_Display_destroy(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_gcCache(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_gcCache(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
otk::GCCache *result;
|
otk::GCCache *result;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_gcCache")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_gcCache",&obj0)) goto fail;
|
||||||
result = (otk::GCCache *)otk::Display::gcCache();
|
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);
|
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__GCCache, 0);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -972,11 +961,14 @@ static PyObject *_wrap_Display_gcCache(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_screenInfo(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_screenInfo(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
int arg1 ;
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
|
int arg2 ;
|
||||||
otk::ScreenInfo *result;
|
otk::ScreenInfo *result;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)"i:Display_screenInfo",&arg1)) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"Oi:Display_screenInfo",&obj0,&arg2)) goto fail;
|
||||||
result = (otk::ScreenInfo *)otk::Display::screenInfo(arg1);
|
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);
|
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__ScreenInfo, 0);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -987,14 +979,17 @@ static PyObject *_wrap_Display_screenInfo(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_findScreen(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_findScreen(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
Window arg1 ;
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
|
Window arg2 ;
|
||||||
otk::ScreenInfo *result;
|
otk::ScreenInfo *result;
|
||||||
PyObject * obj0 = 0 ;
|
PyObject * obj0 = 0 ;
|
||||||
|
PyObject * obj1 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)"O:Display_findScreen",&obj0)) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"OO:Display_findScreen",&obj0,&obj1)) goto fail;
|
||||||
arg1 = (Window) PyInt_AsLong(obj0);
|
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;
|
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);
|
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_otk__ScreenInfo, 0);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1005,10 +1000,13 @@ static PyObject *_wrap_Display_findScreen(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_xkb(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_xkb(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
bool result;
|
bool result;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_xkb")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_xkb",&obj0)) goto fail;
|
||||||
result = (bool)otk::Display::xkb();
|
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);
|
resultobj = PyInt_FromLong((long)result);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1019,10 +1017,13 @@ static PyObject *_wrap_Display_xkb(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_xkbEventBase(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_xkbEventBase(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
int result;
|
int result;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_xkbEventBase")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_xkbEventBase",&obj0)) goto fail;
|
||||||
result = (int)otk::Display::xkbEventBase();
|
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);
|
resultobj = PyInt_FromLong((long)result);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1033,10 +1034,13 @@ static PyObject *_wrap_Display_xkbEventBase(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_shape(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_shape(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
bool result;
|
bool result;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_shape")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_shape",&obj0)) goto fail;
|
||||||
result = (bool)otk::Display::shape();
|
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);
|
resultobj = PyInt_FromLong((long)result);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1047,10 +1051,13 @@ static PyObject *_wrap_Display_shape(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_shapeEventBase(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_shapeEventBase(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
int result;
|
int result;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_shapeEventBase")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_shapeEventBase",&obj0)) goto fail;
|
||||||
result = (int)otk::Display::shapeEventBase();
|
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);
|
resultobj = PyInt_FromLong((long)result);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1061,10 +1068,13 @@ static PyObject *_wrap_Display_shapeEventBase(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_xinerama(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_xinerama(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
bool result;
|
bool result;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_xinerama")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_xinerama",&obj0)) goto fail;
|
||||||
result = (bool)otk::Display::xinerama();
|
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);
|
resultobj = PyInt_FromLong((long)result);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1075,10 +1085,13 @@ static PyObject *_wrap_Display_xinerama(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_numLockMask(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_numLockMask(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
unsigned int result;
|
unsigned int result;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_numLockMask")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_numLockMask",&obj0)) goto fail;
|
||||||
result = (unsigned int)otk::Display::numLockMask();
|
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);
|
resultobj = PyInt_FromLong((long)result);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1089,10 +1102,13 @@ static PyObject *_wrap_Display_numLockMask(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_scrollLockMask(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_scrollLockMask(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
unsigned int result;
|
unsigned int result;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_scrollLockMask")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_scrollLockMask",&obj0)) goto fail;
|
||||||
result = (unsigned int)otk::Display::scrollLockMask();
|
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);
|
resultobj = PyInt_FromLong((long)result);
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1101,11 +1117,31 @@ static PyObject *_wrap_Display_scrollLockMask(PyObject *self, PyObject *args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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) {
|
static PyObject *_wrap_Display_grab(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_grab")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_grab",&obj0)) goto fail;
|
||||||
otk::Display::grab();
|
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;
|
Py_INCREF(Py_None); resultobj = Py_None;
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1116,9 +1152,12 @@ static PyObject *_wrap_Display_grab(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_ungrab(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_ungrab(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
|
PyObject * obj0 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)":Display_ungrab")) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"O:Display_ungrab",&obj0)) goto fail;
|
||||||
otk::Display::ungrab();
|
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;
|
Py_INCREF(Py_None); resultobj = Py_None;
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1129,43 +1168,46 @@ static PyObject *_wrap_Display_ungrab(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_grabButton(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_grabButton(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
unsigned int arg1 ;
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
unsigned int arg2 ;
|
unsigned int arg2 ;
|
||||||
Window arg3 ;
|
unsigned int arg3 ;
|
||||||
bool arg4 ;
|
Window arg4 ;
|
||||||
unsigned int arg5 ;
|
bool arg5 ;
|
||||||
int arg6 ;
|
unsigned int arg6 ;
|
||||||
int arg7 ;
|
int arg7 ;
|
||||||
Window arg8 ;
|
int arg8 ;
|
||||||
Cursor arg9 ;
|
Window arg9 ;
|
||||||
bool arg10 ;
|
Cursor arg10 ;
|
||||||
|
bool arg11 ;
|
||||||
PyObject * obj0 = 0 ;
|
PyObject * obj0 = 0 ;
|
||||||
PyObject * obj1 = 0 ;
|
PyObject * obj1 = 0 ;
|
||||||
PyObject * obj2 = 0 ;
|
PyObject * obj2 = 0 ;
|
||||||
PyObject * obj3 = 0 ;
|
PyObject * obj3 = 0 ;
|
||||||
PyObject * obj4 = 0 ;
|
PyObject * obj4 = 0 ;
|
||||||
PyObject * obj7 = 0 ;
|
PyObject * obj5 = 0 ;
|
||||||
PyObject * obj8 = 0 ;
|
PyObject * obj8 = 0 ;
|
||||||
PyObject * obj9 = 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;
|
if(!PyArg_ParseTuple(args,(char *)"OOOOOOiiOOO:Display_grabButton",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&arg7,&arg8,&obj8,&obj9,&obj10)) goto fail;
|
||||||
arg1 = (unsigned int) PyInt_AsLong(obj0);
|
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
|
||||||
arg2 = (unsigned int) PyInt_AsLong(obj1);
|
arg2 = (unsigned int) PyInt_AsLong(obj1);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg3 = (Window) PyInt_AsLong(obj2);
|
arg3 = (unsigned int) PyInt_AsLong(obj2);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg4 = (bool) PyInt_AsLong(obj3);
|
arg4 = (Window) PyInt_AsLong(obj3);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg5 = (unsigned int) PyInt_AsLong(obj4);
|
arg5 = (bool) PyInt_AsLong(obj4);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg8 = (Window) PyInt_AsLong(obj7);
|
arg6 = (unsigned int) PyInt_AsLong(obj5);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg9 = (Cursor) PyInt_AsLong(obj8);
|
arg9 = (Window) PyInt_AsLong(obj8);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg10 = (bool) PyInt_AsLong(obj9);
|
arg10 = (Cursor) PyInt_AsLong(obj9);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
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;
|
Py_INCREF(Py_None); resultobj = Py_None;
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1176,21 +1218,24 @@ static PyObject *_wrap_Display_grabButton(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_ungrabButton(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_ungrabButton(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
unsigned int arg1 ;
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
unsigned int arg2 ;
|
unsigned int arg2 ;
|
||||||
Window arg3 ;
|
unsigned int arg3 ;
|
||||||
|
Window arg4 ;
|
||||||
PyObject * obj0 = 0 ;
|
PyObject * obj0 = 0 ;
|
||||||
PyObject * obj1 = 0 ;
|
PyObject * obj1 = 0 ;
|
||||||
PyObject * obj2 = 0 ;
|
PyObject * obj2 = 0 ;
|
||||||
|
PyObject * obj3 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)"OOO:Display_ungrabButton",&obj0,&obj1,&obj2)) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"OOOO:Display_ungrabButton",&obj0,&obj1,&obj2,&obj3)) goto fail;
|
||||||
arg1 = (unsigned int) PyInt_AsLong(obj0);
|
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
|
||||||
arg2 = (unsigned int) PyInt_AsLong(obj1);
|
arg2 = (unsigned int) PyInt_AsLong(obj1);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg3 = (Window) PyInt_AsLong(obj2);
|
arg3 = (unsigned int) PyInt_AsLong(obj2);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
otk::Display::ungrabButton(arg1,arg2,arg3);
|
arg4 = (Window) PyInt_AsLong(obj3);
|
||||||
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
|
((otk::Display const *)arg1)->ungrabButton(arg2,arg3,arg4);
|
||||||
|
|
||||||
Py_INCREF(Py_None); resultobj = Py_None;
|
Py_INCREF(Py_None); resultobj = Py_None;
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1201,31 +1246,34 @@ static PyObject *_wrap_Display_ungrabButton(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_grabKey(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_grabKey(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
unsigned int arg1 ;
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
unsigned int arg2 ;
|
unsigned int arg2 ;
|
||||||
Window arg3 ;
|
unsigned int arg3 ;
|
||||||
bool arg4 ;
|
Window arg4 ;
|
||||||
int arg5 ;
|
bool arg5 ;
|
||||||
int arg6 ;
|
int arg6 ;
|
||||||
bool arg7 ;
|
int arg7 ;
|
||||||
|
bool arg8 ;
|
||||||
PyObject * obj0 = 0 ;
|
PyObject * obj0 = 0 ;
|
||||||
PyObject * obj1 = 0 ;
|
PyObject * obj1 = 0 ;
|
||||||
PyObject * obj2 = 0 ;
|
PyObject * obj2 = 0 ;
|
||||||
PyObject * obj3 = 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;
|
if(!PyArg_ParseTuple(args,(char *)"OOOOOiiO:Display_grabKey",&obj0,&obj1,&obj2,&obj3,&obj4,&arg6,&arg7,&obj7)) goto fail;
|
||||||
arg1 = (unsigned int) PyInt_AsLong(obj0);
|
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
|
||||||
arg2 = (unsigned int) PyInt_AsLong(obj1);
|
arg2 = (unsigned int) PyInt_AsLong(obj1);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg3 = (Window) PyInt_AsLong(obj2);
|
arg3 = (unsigned int) PyInt_AsLong(obj2);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg4 = (bool) PyInt_AsLong(obj3);
|
arg4 = (Window) PyInt_AsLong(obj3);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg7 = (bool) PyInt_AsLong(obj6);
|
arg5 = (bool) PyInt_AsLong(obj4);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
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;
|
Py_INCREF(Py_None); resultobj = Py_None;
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -1236,21 +1284,24 @@ static PyObject *_wrap_Display_grabKey(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyObject *_wrap_Display_ungrabKey(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_Display_ungrabKey(PyObject *self, PyObject *args) {
|
||||||
PyObject *resultobj;
|
PyObject *resultobj;
|
||||||
unsigned int arg1 ;
|
otk::Display *arg1 = (otk::Display *) 0 ;
|
||||||
unsigned int arg2 ;
|
unsigned int arg2 ;
|
||||||
Window arg3 ;
|
unsigned int arg3 ;
|
||||||
|
Window arg4 ;
|
||||||
PyObject * obj0 = 0 ;
|
PyObject * obj0 = 0 ;
|
||||||
PyObject * obj1 = 0 ;
|
PyObject * obj1 = 0 ;
|
||||||
PyObject * obj2 = 0 ;
|
PyObject * obj2 = 0 ;
|
||||||
|
PyObject * obj3 = 0 ;
|
||||||
|
|
||||||
if(!PyArg_ParseTuple(args,(char *)"OOO:Display_ungrabKey",&obj0,&obj1,&obj2)) goto fail;
|
if(!PyArg_ParseTuple(args,(char *)"OOOO:Display_ungrabKey",&obj0,&obj1,&obj2,&obj3)) goto fail;
|
||||||
arg1 = (unsigned int) PyInt_AsLong(obj0);
|
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_otk__Display,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
|
||||||
arg2 = (unsigned int) PyInt_AsLong(obj1);
|
arg2 = (unsigned int) PyInt_AsLong(obj1);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
if (PyErr_Occurred()) SWIG_fail;
|
||||||
arg3 = (Window) PyInt_AsLong(obj2);
|
arg3 = (unsigned int) PyInt_AsLong(obj2);
|
||||||
if (PyErr_Occurred()) SWIG_fail;
|
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;
|
Py_INCREF(Py_None); resultobj = Py_None;
|
||||||
return resultobj;
|
return resultobj;
|
||||||
|
@ -7902,9 +7953,8 @@ static PyObject *_wrap_send_client_msg(PyObject *self, PyObject *args) {
|
||||||
|
|
||||||
static PyMethodDef SwigMethods[] = {
|
static PyMethodDef SwigMethods[] = {
|
||||||
{ (char *)"Openbox_instance", _wrap_Openbox_instance, METH_VARARGS },
|
{ (char *)"Openbox_instance", _wrap_Openbox_instance, METH_VARARGS },
|
||||||
{ (char *)"Display_display", _wrap_Display_display, METH_VARARGS },
|
{ (char *)"new_Display", _wrap_new_Display, METH_VARARGS },
|
||||||
{ (char *)"Display_initialize", _wrap_Display_initialize, METH_VARARGS },
|
{ (char *)"delete_Display", _wrap_delete_Display, METH_VARARGS },
|
||||||
{ (char *)"Display_destroy", _wrap_Display_destroy, METH_VARARGS },
|
|
||||||
{ (char *)"Display_gcCache", _wrap_Display_gcCache, METH_VARARGS },
|
{ (char *)"Display_gcCache", _wrap_Display_gcCache, METH_VARARGS },
|
||||||
{ (char *)"Display_screenInfo", _wrap_Display_screenInfo, METH_VARARGS },
|
{ (char *)"Display_screenInfo", _wrap_Display_screenInfo, METH_VARARGS },
|
||||||
{ (char *)"Display_findScreen", _wrap_Display_findScreen, METH_VARARGS },
|
{ (char *)"Display_findScreen", _wrap_Display_findScreen, METH_VARARGS },
|
||||||
|
@ -7915,6 +7965,7 @@ static PyMethodDef SwigMethods[] = {
|
||||||
{ (char *)"Display_xinerama", _wrap_Display_xinerama, METH_VARARGS },
|
{ (char *)"Display_xinerama", _wrap_Display_xinerama, METH_VARARGS },
|
||||||
{ (char *)"Display_numLockMask", _wrap_Display_numLockMask, METH_VARARGS },
|
{ (char *)"Display_numLockMask", _wrap_Display_numLockMask, METH_VARARGS },
|
||||||
{ (char *)"Display_scrollLockMask", _wrap_Display_scrollLockMask, 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_grab", _wrap_Display_grab, METH_VARARGS },
|
||||||
{ (char *)"Display_ungrab", _wrap_Display_ungrab, METH_VARARGS },
|
{ (char *)"Display_ungrab", _wrap_Display_ungrab, METH_VARARGS },
|
||||||
{ (char *)"Display_grabButton", _wrap_Display_grabButton, METH_VARARGS },
|
{ (char *)"Display_grabButton", _wrap_Display_grabButton, METH_VARARGS },
|
||||||
|
@ -8257,8 +8308,8 @@ static swig_type_info _swigt__p_XRectangle[] = {{"_p_XRectangle", 0, "XRectangle
|
||||||
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_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_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_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_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_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__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}};
|
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}};
|
||||||
|
@ -8321,8 +8372,8 @@ _swigt__p_XRectangle,
|
||||||
_swigt__p_otk__ustring,
|
_swigt__p_otk__ustring,
|
||||||
_swigt__p_std__string,
|
_swigt__p_std__string,
|
||||||
_swigt__p_XCrossingEvent,
|
_swigt__p_XCrossingEvent,
|
||||||
_swigt__p_Display,
|
|
||||||
_swigt__p_otk__Display,
|
_swigt__p_otk__Display,
|
||||||
|
_swigt__p_Display,
|
||||||
_swigt__p_XMappingEvent,
|
_swigt__p_XMappingEvent,
|
||||||
_swigt__p_otk__Style,
|
_swigt__p_otk__Style,
|
||||||
_swigt__p_otk__EventHandler,
|
_swigt__p_otk__EventHandler,
|
||||||
|
|
|
@ -213,7 +213,7 @@ PyObject *send_client_msg(Window target, int type, Window about,
|
||||||
e.xclient.data.l[3] = data3;
|
e.xclient.data.l[3] = data3;
|
||||||
e.xclient.data.l[4] = data4;
|
e.xclient.data.l[4] = data4;
|
||||||
|
|
||||||
XSendEvent(otk::Display::display, target, false,
|
XSendEvent(**otk::display, target, false,
|
||||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||||
&e);
|
&e);
|
||||||
Py_INCREF(Py_None); return Py_None;
|
Py_INCREF(Py_None); return Py_None;
|
||||||
|
|
|
@ -154,7 +154,7 @@ public:
|
||||||
this->client = client;
|
this->client = client;
|
||||||
this->time = time;
|
this->time = time;
|
||||||
this->state = state;
|
this->state = state;
|
||||||
this->key = XKeysymToString(XKeycodeToKeysym(otk::Display::display,
|
this->key = XKeysymToString(XKeycodeToKeysym(**otk::display,
|
||||||
key, 0));
|
key, 0));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -49,14 +49,14 @@ Screen::Screen(int screen)
|
||||||
: WidgetBase(WidgetBase::Type_Root),
|
: WidgetBase(WidgetBase::Type_Root),
|
||||||
_number(screen)
|
_number(screen)
|
||||||
{
|
{
|
||||||
assert(screen >= 0); assert(screen < ScreenCount(otk::Display::display));
|
assert(screen >= 0); assert(screen < ScreenCount(**otk::display));
|
||||||
_info = otk::Display::screenInfo(screen);
|
_info = otk::display->screenInfo(screen);
|
||||||
|
|
||||||
::running = false;
|
::running = false;
|
||||||
XErrorHandler old = XSetErrorHandler(::anotherWMRunning);
|
XErrorHandler old = XSetErrorHandler(::anotherWMRunning);
|
||||||
XSelectInput(otk::Display::display, _info->rootWindow(),
|
XSelectInput(**otk::display, _info->rootWindow(),
|
||||||
Screen::event_mask);
|
Screen::event_mask);
|
||||||
XSync(otk::Display::display, false);
|
XSync(**otk::display, false);
|
||||||
XSetErrorHandler(old);
|
XSetErrorHandler(old);
|
||||||
|
|
||||||
_managed = !::running;
|
_managed = !::running;
|
||||||
|
@ -71,7 +71,7 @@ Screen::Screen(int screen)
|
||||||
(unsigned long) getpid());
|
(unsigned long) getpid());
|
||||||
|
|
||||||
// set the mouse cursor for the root window (the default cursor)
|
// 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);
|
openbox->cursors().session);
|
||||||
|
|
||||||
// initialize the shit that is used for all drawing on the screen
|
// initialize the shit that is used for all drawing on the screen
|
||||||
|
@ -126,10 +126,10 @@ Screen::Screen(int screen)
|
||||||
// create the window which gets focus when no clients get it
|
// create the window which gets focus when no clients get it
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
attr.override_redirect = true;
|
attr.override_redirect = true;
|
||||||
_focuswindow = XCreateWindow(otk::Display::display, _info->rootWindow(),
|
_focuswindow = XCreateWindow(**otk::display, _info->rootWindow(),
|
||||||
-100, -100, 1, 1, 0, 0, InputOnly,
|
-100, -100, 1, 1, 0, 0, InputOnly,
|
||||||
_info->visual(), CWOverrideRedirect, &attr);
|
_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
|
// these may be further updated if any pre-existing windows are found in
|
||||||
// the manageExising() function
|
// the manageExising() function
|
||||||
|
@ -149,7 +149,7 @@ Screen::~Screen()
|
||||||
{
|
{
|
||||||
if (! _managed) return;
|
if (! _managed) return;
|
||||||
|
|
||||||
XSelectInput(otk::Display::display, _info->rootWindow(), NoEventMask);
|
XSelectInput(**otk::display, _info->rootWindow(), NoEventMask);
|
||||||
|
|
||||||
// unmanage all windows
|
// unmanage all windows
|
||||||
while (!clients.empty())
|
while (!clients.empty())
|
||||||
|
@ -159,8 +159,8 @@ Screen::~Screen()
|
||||||
EventData data(_number, 0, EventShutdown, 0);
|
EventData data(_number, 0, EventShutdown, 0);
|
||||||
openbox->bindings()->fireEvent(&data);
|
openbox->bindings()->fireEvent(&data);
|
||||||
|
|
||||||
XDestroyWindow(otk::Display::display, _focuswindow);
|
XDestroyWindow(**otk::display, _focuswindow);
|
||||||
XDestroyWindow(otk::Display::display, _supportwindow);
|
XDestroyWindow(**otk::display, _supportwindow);
|
||||||
|
|
||||||
delete _image_control;
|
delete _image_control;
|
||||||
}
|
}
|
||||||
|
@ -170,14 +170,14 @@ void Screen::manageExisting()
|
||||||
{
|
{
|
||||||
unsigned int i, j, nchild;
|
unsigned int i, j, nchild;
|
||||||
Window r, p, *children;
|
Window r, p, *children;
|
||||||
XQueryTree(otk::Display::display, _info->rootWindow(), &r, &p,
|
XQueryTree(**otk::display, _info->rootWindow(), &r, &p,
|
||||||
&children, &nchild);
|
&children, &nchild);
|
||||||
|
|
||||||
// preen the window list of all icon windows... for better dockapp support
|
// preen the window list of all icon windows... for better dockapp support
|
||||||
for (i = 0; i < nchild; i++) {
|
for (i = 0; i < nchild; i++) {
|
||||||
if (children[i] == None) continue;
|
if (children[i] == None) continue;
|
||||||
|
|
||||||
XWMHints *wmhints = XGetWMHints(otk::Display::display,
|
XWMHints *wmhints = XGetWMHints(**otk::display,
|
||||||
children[i]);
|
children[i]);
|
||||||
|
|
||||||
if (wmhints) {
|
if (wmhints) {
|
||||||
|
@ -201,7 +201,7 @@ void Screen::manageExisting()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
XWindowAttributes attrib;
|
XWindowAttributes attrib;
|
||||||
if (XGetWindowAttributes(otk::Display::display, children[i], &attrib)) {
|
if (XGetWindowAttributes(**otk::display, children[i], &attrib)) {
|
||||||
if (attrib.override_redirect) continue;
|
if (attrib.override_redirect) continue;
|
||||||
|
|
||||||
if (attrib.map_state != IsUnmapped) {
|
if (attrib.map_state != IsUnmapped) {
|
||||||
|
@ -279,7 +279,7 @@ void Screen::calcArea()
|
||||||
void Screen::changeSupportedAtoms()
|
void Screen::changeSupportedAtoms()
|
||||||
{
|
{
|
||||||
// create the netwm support window
|
// create the netwm support window
|
||||||
_supportwindow = XCreateSimpleWindow(otk::Display::display,
|
_supportwindow = XCreateSimpleWindow(**otk::display,
|
||||||
_info->rootWindow(),
|
_info->rootWindow(),
|
||||||
0, 0, 1, 1, 0, 0, 0);
|
0, 0, 1, 1, 0, 0, 0);
|
||||||
|
|
||||||
|
@ -456,14 +456,14 @@ void Screen::manageWindow(Window window)
|
||||||
XWMHints *wmhint;
|
XWMHints *wmhint;
|
||||||
XSetWindowAttributes attrib_set;
|
XSetWindowAttributes attrib_set;
|
||||||
|
|
||||||
otk::Display::grab();
|
otk::display->grab();
|
||||||
|
|
||||||
// is the window a docking app
|
// is the window a docking app
|
||||||
if ((wmhint = XGetWMHints(otk::Display::display, window))) {
|
if ((wmhint = XGetWMHints(**otk::display, window))) {
|
||||||
if ((wmhint->flags & StateHint) &&
|
if ((wmhint->flags & StateHint) &&
|
||||||
wmhint->initial_state == WithdrawnState) {
|
wmhint->initial_state == WithdrawnState) {
|
||||||
//slit->addClient(w); // XXX: make dock apps work!
|
//slit->addClient(w); // XXX: make dock apps work!
|
||||||
otk::Display::ungrab();
|
otk::display->ungrab();
|
||||||
|
|
||||||
XFree(wmhint);
|
XFree(wmhint);
|
||||||
return;
|
return;
|
||||||
|
@ -474,7 +474,7 @@ void Screen::manageWindow(Window window)
|
||||||
// choose the events we want to receive on the CLIENT window
|
// choose the events we want to receive on the CLIENT window
|
||||||
attrib_set.event_mask = Client::event_mask;
|
attrib_set.event_mask = Client::event_mask;
|
||||||
attrib_set.do_not_propagate_mask = Client::no_propagate_mask;
|
attrib_set.do_not_propagate_mask = Client::no_propagate_mask;
|
||||||
XChangeWindowAttributes(otk::Display::display, window,
|
XChangeWindowAttributes(**otk::display, window,
|
||||||
CWEventMask|CWDontPropagate, &attrib_set);
|
CWEventMask|CWDontPropagate, &attrib_set);
|
||||||
|
|
||||||
// create the Client class, which gets all of the hints on the window
|
// create the Client class, which gets all of the hints on the window
|
||||||
|
@ -489,7 +489,7 @@ void Screen::manageWindow(Window window)
|
||||||
|
|
||||||
// specify that if we exit, the window should not be destroyed and should be
|
// specify that if we exit, the window should not be destroyed and should be
|
||||||
// reparented back to root automatically
|
// reparented back to root automatically
|
||||||
XChangeSaveSet(otk::Display::display, window, SetModeInsert);
|
XChangeSaveSet(**otk::display, window, SetModeInsert);
|
||||||
|
|
||||||
if (!(openbox->state() == Openbox::State_Starting ||
|
if (!(openbox->state() == Openbox::State_Starting ||
|
||||||
client->positionRequested())) {
|
client->positionRequested())) {
|
||||||
|
@ -526,7 +526,7 @@ void Screen::manageWindow(Window window)
|
||||||
|
|
||||||
// XXX: handle any requested states such as maximized
|
// XXX: handle any requested states such as maximized
|
||||||
|
|
||||||
otk::Display::ungrab();
|
otk::display->ungrab();
|
||||||
|
|
||||||
// add to the screen's list
|
// add to the screen's list
|
||||||
clients.push_back(client);
|
clients.push_back(client);
|
||||||
|
@ -575,10 +575,10 @@ void Screen::unmanageWindow(Client *client)
|
||||||
openbox->clearHandler(client->window());
|
openbox->clearHandler(client->window());
|
||||||
|
|
||||||
// remove the window from our save set
|
// 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
|
// we dont want events no more
|
||||||
XSelectInput(otk::Display::display, client->window(), NoEventMask);
|
XSelectInput(**otk::display, client->window(), NoEventMask);
|
||||||
|
|
||||||
frame->hide();
|
frame->hide();
|
||||||
|
|
||||||
|
@ -633,7 +633,7 @@ void Screen::restack(bool raise, Client *client)
|
||||||
for (; it != end; ++it)
|
for (; it != end; ++it)
|
||||||
wins.push_back((*it)->frame->window());
|
wins.push_back((*it)->frame->window());
|
||||||
|
|
||||||
XRestackWindows(otk::Display::display, &wins[0], wins.size());
|
XRestackWindows(**otk::display, &wins[0], wins.size());
|
||||||
changeStackingList();
|
changeStackingList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -733,11 +733,11 @@ void Screen::propertyHandler(const XPropertyEvent &e)
|
||||||
|
|
||||||
// compress changes to a single property into a single change
|
// compress changes to a single property into a single change
|
||||||
XEvent ce;
|
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
|
// XXX: it would be nice to compress ALL changes to a property, not just
|
||||||
// changes in a row without other props between.
|
// changes in a row without other props between.
|
||||||
if (ce.xproperty.atom != e.atom) {
|
if (ce.xproperty.atom != e.atom) {
|
||||||
XPutBackEvent(otk::Display::display, &ce);
|
XPutBackEvent(**otk::display, &ce);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -786,7 +786,7 @@ void Screen::mapRequestHandler(const XMapRequestEvent &e)
|
||||||
ce.xclient.type = ClientMessage;
|
ce.xclient.type = ClientMessage;
|
||||||
ce.xclient.message_type =
|
ce.xclient.message_type =
|
||||||
openbox->property()->atom(otk::Property::net_active_window);
|
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.window = c->window();
|
||||||
ce.xclient.format = 32;
|
ce.xclient.format = 32;
|
||||||
ce.xclient.data.l[0] = 0l;
|
ce.xclient.data.l[0] = 0l;
|
||||||
|
@ -794,7 +794,7 @@ void Screen::mapRequestHandler(const XMapRequestEvent &e)
|
||||||
ce.xclient.data.l[2] = 0l;
|
ce.xclient.data.l[2] = 0l;
|
||||||
ce.xclient.data.l[3] = 0l;
|
ce.xclient.data.l[3] = 0l;
|
||||||
ce.xclient.data.l[4] = 0l;
|
ce.xclient.data.l[4] = 0l;
|
||||||
XSendEvent(otk::Display::display, _info->rootWindow(), false,
|
XSendEvent(**otk::display, _info->rootWindow(), false,
|
||||||
SubstructureRedirectMask | SubstructureNotifyMask,
|
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||||
&ce);
|
&ce);
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in a new issue