#include <client.h>
Inherits Thing.
Inheritance diagram for Client:
Public Types | |
enum | Mode { FLOAT, MAX, STICKY } |
Public Member Functions | |
Client (Monitor *monitor, Window window, XWindowAttributes *attr) | |
~Client () | |
void | setTransient (Client *client) |
Client * | transient () const |
long | eventMask () const |
string | className () const |
string | instanceName () const |
string | iconName () const |
void | sendConfiguration () |
virtual void | resize () |
void | handleConfigureRequest (XConfigureRequestEvent *event) |
void | handleMapNotify (XMapEvent *event) |
void | handlePropertyNotify (XPropertyEvent *event) |
void | handleUnmapNotify (XUnmapEvent *event) |
virtual void | show () |
virtual void | hide () |
int | protocols () const |
bool | isCentered () const |
void | initICCCM () |
void | setMode (Mode mode) |
Mode | mode () const |
int | state () const |
virtual void | illuminate () |
virtual bool | isFocused () |
virtual void | handleButtonPress (XButtonEvent *event) |
virtual void | handleButtonRelease (XButtonEvent *event) |
virtual Cursor | cursorForXY (int pointerX, int pointerY) |
virtual Window | window () |
Window | frameWindow () const |
Window | clientWindow () const |
void | setDestroyed (bool isDestroyed) |
bool | isDestroyed () const |
void | createFrame () |
void | reparent (Window parentWindow, int x, int y) |
string | id () |
Frame * | frame () const |
void | setFrame (Frame *frame) |
Workspace * | attached () const |
void | setAttached (Workspace *workspace) |
bool | requestsFocus () const |
void | setRequestsFocus (bool requestsFocus) |
string | hooked () const |
void | setHooked (string hooked) |
Private Member Functions | |
void | gravitate (bool invert) |
void | updateSize () |
void | updateTransient () |
Private Attributes | |
Window | clientWindow_ |
string | className_ |
string | instanceName_ |
string | iconName_ |
string | hooked_ |
Workspace * | workspace_ |
Client * | transient_ |
Frame * | frame_ |
unsigned int | clientBorderWidth_ |
int | protocols_ |
int | state_ |
long | eventMask_ |
bool | isCentered_ |
bool | hasFrame_ |
bool | requestsFocus_ |
bool | isDestroyed_ |
Mode | mode_ |
string | id_ |
Definition at line 29 of file client.h.
enum Client::Mode |
Client::Client | ( | Monitor * | monitor, | |
Window | window, | |||
XWindowAttributes * | attr | |||
) |
Definition at line 33 of file client.cpp.
References Thing::borderWidth_, className_, clientWindow_, eventMask_, FLOAT, frame_, Util::get(), hasFrame_, Rectangle::height(), hooked_, iconName_, id_, instanceName_, isCentered_, isDestroyed_, KERNEL, LOGDEBUG, MAX, mode_, Thing::monitor(), Monitor::nextClientId(), protocols_, requestsFocus_, Rectangle::setHeight(), Rectangle::setWidth(), Rectangle::setX(), Rectangle::setY(), state_, STICKY, transient_, updateTransient(), Rectangle::width(), workspace_, Rectangle::x(), XCORE, and Rectangle::y().
Here is the call graph for this function:
Client::~Client | ( | ) |
Definition at line 118 of file client.cpp.
void Client::setTransient | ( | Client * | client | ) |
Returns if this client is transient.
Client * Client::transient | ( | ) | const |
Definition at line 159 of file client.cpp.
References transient_.
Referenced by Monitor::attachClient(), and Monitor::cleanup().
long Client::eventMask | ( | ) | const |
string Client::className | ( | ) | const |
string Client::instanceName | ( | ) | const |
string Client::iconName | ( | ) | const |
void Client::sendConfiguration | ( | ) |
Definition at line 163 of file client.cpp.
References Thing::clientAreaRect_, clientBorderWidth_, clientWindow_, frame(), hasFrame_, Rectangle::height(), LOGDEBUG, Rectangle::width(), Rectangle::x(), XCORE, and Rectangle::y().
Referenced by handleConfigureRequest(), and resize().
Here is the call graph for this function:
void Client::resize | ( | ) | [virtual] |
Implements Thing.
Definition at line 196 of file client.cpp.
References Thing::borderWidth_, Thing::clientAreaRect_, clientWindow_, Rectangle::copy(), Thing::fitClientArea(), frame(), frameWindow(), hasFrame_, Rectangle::height(), illuminate(), Thing::label_, LOGDEBUG, sendConfiguration(), Rectangle::setHeight(), Rectangle::setWidth(), Rectangle::setX(), Rectangle::setY(), Rectangle::width(), Rectangle::x(), XCORE, and Rectangle::y().
Referenced by Workspace::attachClient(), Frame::matchClientSize(), Workspace::moveClient(), and Workspace::resizeClient().
Here is the call graph for this function:
void Client::handleConfigureRequest | ( | XConfigureRequestEvent * | event | ) |
event handler.
Definition at line 266 of file client.cpp.
References attached(), Thing::borderWidth_, Thing::clientAreaRect_, clientBorderWidth_, clientWindow_, Rectangle::copy(), Thing::fitClientArea(), frame(), frameWindow(), gravitate(), hasFrame_, Rectangle::height(), illuminate(), isFocused(), LOGDEBUG, mode_, Thing::monitor(), requestsFocus_, sendConfiguration(), Rectangle::setHeight(), Workspace::setRequestsFocus(), Rectangle::setWidth(), Rectangle::setX(), Rectangle::setY(), Thing::titleBarHeight_, Rectangle::width(), Rectangle::x(), XCORE, and Rectangle::y().
Referenced by Kernel::handleConfigureRequest().
Here is the call graph for this function:
void Client::handleMapNotify | ( | XMapEvent * | event | ) |
void Client::handlePropertyNotify | ( | XPropertyEvent * | event | ) |
Definition at line 372 of file client.cpp.
References Monitor::clientBar(), clientWindow_, frameWindow(), Thing::hasDecoration_, Rectangle::height(), iconName_, id_, illuminate(), StatusBar::illuminate(), ClientBar::illuminate(), LOGDEBUG, Thing::monitor(), Atoms::MWM_HINTS, protocols_, Thing::setName(), Monitor::statusBar(), updateSize(), updateTransient(), Rectangle::width(), Atoms::WM_PROTOCOLS, Rectangle::x(), XCORE, and Rectangle::y().
Referenced by Kernel::handlePropertyNotify().
Here is the call graph for this function:
void Client::handleUnmapNotify | ( | XUnmapEvent * | event | ) |
Definition at line 424 of file client.cpp.
References attached(), clientWindow_, Workspace::detachClient(), frameWindow(), Thing::isVisible_, LOGDEBUG, Thing::name(), and XCORE.
Referenced by Kernel::handleUnmapNotify().
Here is the call graph for this function:
void Client::show | ( | ) | [virtual] |
Reimplemented from Thing.
Definition at line 444 of file client.cpp.
References clientWindow_, frameWindow(), hasFrame_, isDestroyed_, Thing::isVisible_, KERNEL, Cursors::NORMAL_CURSOR, state_, and XCORE.
Referenced by Frame::attach(), and Workspace::attachClient().
Here is the call graph for this function:
void Client::hide | ( | ) | [virtual] |
Reimplemented from Thing.
Definition at line 458 of file client.cpp.
References clientWindow_, frameWindow(), hasFrame_, isDestroyed_, Thing::isVisible_, LOGDEBUG, state_, and XCORE.
Referenced by Frame::detach(), and Workspace::detachClient().
Here is the call graph for this function:
int Client::protocols | ( | ) | const |
Definition at line 520 of file client.cpp.
References protocols_.
Referenced by Kernel::killClient().
bool Client::isCentered | ( | ) | const |
Definition at line 526 of file client.cpp.
References isCentered_.
Referenced by Workspace::attachClient().
void Client::initICCCM | ( | ) |
Definition at line 125 of file client.cpp.
References clientWindow_, frameWindow(), Thing::hasDecoration_, iconName_, id_, Thing::name(), protocols_, Thing::setName(), state_, updateSize(), updateTransient(), and XCORE.
Referenced by Monitor::attachClient(), and Workspace::sendClient().
Here is the call graph for this function:
void Client::setMode | ( | Mode | mode | ) |
Definition at line 473 of file client.cpp.
References className_, FLOAT, instanceName_, KERNEL, MAX, mode_, STICKY, and transient_.
Referenced by Workspace::changeClientMode().
Client::Mode Client::mode | ( | ) | const |
Definition at line 530 of file client.cpp.
References mode_.
Referenced by Workspace::attachClient(), Monitor::attachClient(), Workspace::detachClient(), Monitor::removeClient(), Workspace::toggleClientSticky(), and ClientBar::updateClientInfo().
int Client::state | ( | ) | const |
Definition at line 534 of file client.cpp.
References state_.
Referenced by Monitor::attachClient().
void Client::illuminate | ( | ) | [virtual] |
Illuminates this frame.
Implements Thing.
Definition at line 574 of file client.cpp.
References Label::adjustWidth(), Thing::areButtonsVisible_, Thing::borderWidth_, Monitor::buttonWidth(), Draw::drawFloatBorderAnchors(), Draw::drawStickyNotifier(), Theme::FOCUSREQ_BACKGROUND, Theme::FOCUSREQ_SHADOW, Theme::FOCUSREQ_SHINE, Theme::FOCUSREQ_TEXT, frame(), Theme::FRAME_SHADOW_FOCUSSED, Theme::FRAME_SHINE_FOCUSSED, frameWindow(), Thing::gc_, hasFrame_, Frame::illuminate(), Thing::illuminateBorder(), isFocused(), Thing::isVisible_, Thing::label_, LOGDEBUG, mode_, Thing::monitor(), Thing::name(), requestsFocus_, Label::setText(), Rectangle::setWidth(), Rectangle::setX(), STICKY, Theme::TAB_BACKGROUND_ACTIVE_FOCUSSED, Theme::TAB_BACKGROUND_ACTIVE_NORMAL, Theme::TAB_BACKGROUND_INACTIVE_NORMAL, Theme::TAB_SHADOW_ACTIVE_FOCUSSED, Theme::TAB_SHADOW_ACTIVE_NORMAL, Theme::TAB_SHADOW_INACTIVE_NORMAL, Theme::TAB_SHINE_ACTIVE_FOCUSSED, Theme::TAB_SHINE_ACTIVE_NORMAL, Theme::TAB_SHINE_INACTIVE_NORMAL, Theme::TAB_TEXT_ACTIVE_FOCUSSED, Theme::TAB_TEXT_ACTIVE_NORMAL, Theme::TAB_TEXT_INACTIVE_NORMAL, Thing::theme_, Thing::titleBarHeight_, Label::update(), Rectangle::width(), Rectangle::x(), and XCORE.
Referenced by handleButtonPress(), handleConfigureRequest(), handlePropertyNotify(), and resize().
Here is the call graph for this function:
bool Client::isFocused | ( | ) | [virtual] |
Implements Thing.
Definition at line 562 of file client.cpp.
References attached(), Container< P, LT, LTI, T >::focused(), frame(), Frame::isFocused(), and Workspace::topClient().
Referenced by handleButtonPress(), handleConfigureRequest(), and illuminate().
Here is the call graph for this function:
void Client::handleButtonPress | ( | XButtonEvent * | event | ) | [virtual] |
Implements Thing.
Definition at line 655 of file client.cpp.
References Thing::areButtonsVisible_, attached(), Thing::borderWidth_, Thing::buttonState_, Thing::CLOSE, Thing::cursor_, Thing::DEMAX, DOWN, Workspace::focus(), Monitor::focusClient(), frame(), illuminate(), isFocused(), KERNEL, LEFT, LOGDEBUG, Thing::MINCLIENT, mode_, Thing::monitor(), Thing::NONE, Cursors::NORMAL_CURSOR, NORTH_EAST, NORTH_WEST, Cursors::RESIZE_DOWN_CURSOR, Cursors::RESIZE_LEFT_CURSOR, Cursors::RESIZE_NORTH_EAST_CURSOR, Cursors::RESIZE_NORTH_WEST_CURSOR, Cursors::RESIZE_RIGHT_CURSOR, Cursors::RESIZE_SOUTH_EAST_CURSOR, Cursors::RESIZE_SOUTH_WEST_CURSOR, Cursors::RESIZE_UP_CURSOR, RIGHT, SOUTH_EAST, SOUTH_WEST, Thing::titleBarHeight_, UP, Rectangle::width(), window(), and XCORE.
Referenced by Kernel::handleButtonPress().
Here is the call graph for this function:
void Client::handleButtonRelease | ( | XButtonEvent * | event | ) | [virtual] |
Implements Thing.
Definition at line 742 of file client.cpp.
References attached(), Thing::buttonState_, clientWindow_, Thing::CLOSE, Thing::cursor_, Thing::DEMAX, Monitor::detachClient(), Thing::MINCLIENT, Thing::monitor(), Thing::NONE, Cursors::NORMAL_CURSOR, protocols_, Thing::titleBarHeight_, Workspace::toggleClientMode(), Monitor::toggleThingMaximization(), and XCORE.
Here is the call graph for this function:
Cursor Client::cursorForXY | ( | int | pointerX, | |
int | pointerY | |||
) | [virtual] |
Implements Thing.
Definition at line 772 of file client.cpp.
References Thing::borderWidth_, Thing::clientAreaRect_, frame(), Rectangle::height(), Cursors::NORMAL_CURSOR, Cursors::RESIZE_DOWN_CURSOR, Cursors::RESIZE_LEFT_CURSOR, Cursors::RESIZE_NORTH_EAST_CURSOR, Cursors::RESIZE_NORTH_WEST_CURSOR, Cursors::RESIZE_RIGHT_CURSOR, Cursors::RESIZE_SOUTH_EAST_CURSOR, Cursors::RESIZE_SOUTH_WEST_CURSOR, Cursors::RESIZE_UP_CURSOR, Thing::titleBarHeight_, Rectangle::width(), Rectangle::x(), and Rectangle::y().
Here is the call graph for this function:
Window Client::window | ( | ) | [virtual] |
Implements Thing.
Definition at line 538 of file client.cpp.
References clientWindow_, Thing::frameWindow_, and hasFrame_.
Referenced by Workspace::focus(), Kernel::grabMove(), and handleButtonPress().
Window Client::frameWindow | ( | ) | const |
Definition at line 846 of file client.cpp.
References Thing::frameWindow_.
Referenced by Workspace::attachClient(), handleConfigureRequest(), handlePropertyNotify(), handleUnmapNotify(), hide(), illuminate(), initICCCM(), reparent(), resize(), and show().
Window Client::clientWindow | ( | ) | const |
Definition at line 850 of file client.cpp.
References clientWindow_.
Referenced by Monitor::addClient(), Monitor::cleanup(), Binder::emulateKeyPress(), Workspace::focus(), Frame::focus(), Menu::handleButtonPress(), Kernel::handleDestroyNotify(), Kernel::killClient(), and Monitor::removeClient().
void Client::setDestroyed | ( | bool | isDestroyed | ) |
Definition at line 878 of file client.cpp.
References isDestroyed_.
Referenced by Kernel::handleDestroyNotify().
bool Client::isDestroyed | ( | ) | const |
void Client::createFrame | ( | ) |
Definition at line 556 of file client.cpp.
References Thing::fitClientArea(), Thing::initFrameWindow(), and XCORE.
Referenced by Workspace::attachClient().
Here is the call graph for this function:
void Client::reparent | ( | Window | parentWindow, | |
int | x, | |||
int | y | |||
) |
Definition at line 547 of file client.cpp.
References clientWindow_, frameWindow(), hasFrame_, isDestroyed_, and XCORE.
Referenced by Frame::attach(), Workspace::attachClient(), Frame::detach(), and Workspace::detachClient().
Here is the call graph for this function:
string Client::id | ( | ) |
Definition at line 121 of file client.cpp.
References id_.
Referenced by Monitor::focusClientById().
Frame * Client::frame | ( | ) | const |
Definition at line 830 of file client.cpp.
References frame_.
Referenced by Frame::attach(), cursorForXY(), Workspace::detachClient(), Workspace::focus(), Workspace::focusedThing(), Kernel::grabMove(), handleButtonPress(), handleConfigureRequest(), illuminate(), Validators::isClientFrameFocused(), isFocused(), resize(), sendConfiguration(), and setFrame().
void Client::setFrame | ( | Frame * | frame | ) |
Definition at line 834 of file client.cpp.
References frame(), and frame_.
Referenced by Frame::attach(), and Frame::detach().
Here is the call graph for this function:
Workspace * Client::attached | ( | ) | const |
Definition at line 838 of file client.cpp.
References workspace_.
Referenced by Monitor::attachClient(), Monitor::detachClient(), Monitor::focusClient(), handleButtonPress(), handleButtonRelease(), handleConfigureRequest(), Kernel::handleMapRequest(), handleUnmapNotify(), isFocused(), and Monitor::removeClient().
void Client::setAttached | ( | Workspace * | workspace | ) |
Definition at line 842 of file client.cpp.
References workspace_.
Referenced by Workspace::attachClient(), and Workspace::detachClient().
bool Client::requestsFocus | ( | ) | const |
void Client::setRequestsFocus | ( | bool | requestsFocus | ) |
Definition at line 858 of file client.cpp.
References requestsFocus_.
Referenced by Workspace::focus(), and Kernel::handleMapRequest().
string Client::hooked | ( | ) | const |
Defines where this client prefers to be attached to. Must be a valid workspace or slot tab name.
Definition at line 874 of file client.cpp.
References hooked_.
Referenced by Monitor::attachClient(), and Validators::validateUnhookClient().
void Client::setHooked | ( | string | hooked | ) |
Definition at line 862 of file client.cpp.
References className_, hooked_, instanceName_, KERNEL, and Util::remove().
Referenced by Monitor::hookClient(), and Monitor::unhookClient().
Here is the call graph for this function:
void Client::gravitate | ( | bool | invert | ) | [private] |
Definition at line 224 of file client.cpp.
References Thing::borderWidth_, clientWindow_, Rectangle::setX(), Rectangle::setY(), Thing::titleBarHeight_, Rectangle::x(), XCORE, and Rectangle::y().
Referenced by handleConfigureRequest().
Here is the call graph for this function:
void Client::updateSize | ( | ) | [private] |
Updates the size of this client.
Definition at line 145 of file client.cpp.
References clientWindow_, isCentered_, and XCORE.
Referenced by handlePropertyNotify(), and initICCCM().
void Client::updateTransient | ( | ) | [private] |
Updates transient for this client.
Definition at line 153 of file client.cpp.
References clientWindow_, KERNEL, transient_, and XCORE.
Referenced by Client(), handlePropertyNotify(), and initICCCM().
Window Client::clientWindow_ [private] |
Definition at line 129 of file client.h.
Referenced by Client(), clientWindow(), gravitate(), handleButtonRelease(), handleConfigureRequest(), handlePropertyNotify(), handleUnmapNotify(), hide(), initICCCM(), reparent(), resize(), sendConfiguration(), show(), updateSize(), updateTransient(), and window().
string Client::className_ [private] |
Definition at line 131 of file client.h.
Referenced by className(), Client(), setHooked(), and setMode().
string Client::instanceName_ [private] |
Definition at line 132 of file client.h.
Referenced by Client(), instanceName(), setHooked(), and setMode().
string Client::iconName_ [private] |
Definition at line 133 of file client.h.
Referenced by Client(), handlePropertyNotify(), iconName(), and initICCCM().
string Client::hooked_ [private] |
Workspace* Client::workspace_ [private] |
Client* Client::transient_ [private] |
Definition at line 137 of file client.h.
Referenced by Client(), setMode(), transient(), and updateTransient().
Frame* Client::frame_ [private] |
unsigned int Client::clientBorderWidth_ [private] |
Definition at line 140 of file client.h.
Referenced by handleConfigureRequest(), and sendConfiguration().
int Client::protocols_ [private] |
Definition at line 142 of file client.h.
Referenced by Client(), handleButtonRelease(), handlePropertyNotify(), initICCCM(), and protocols().
int Client::state_ [private] |
long Client::eventMask_ [private] |
bool Client::isCentered_ [private] |
bool Client::hasFrame_ [private] |
Definition at line 147 of file client.h.
Referenced by Client(), handleConfigureRequest(), hide(), illuminate(), reparent(), resize(), sendConfiguration(), show(), and window().
bool Client::requestsFocus_ [private] |
Definition at line 148 of file client.h.
Referenced by Client(), handleConfigureRequest(), illuminate(), requestsFocus(), and setRequestsFocus().
bool Client::isDestroyed_ [private] |
Definition at line 149 of file client.h.
Referenced by Client(), hide(), isDestroyed(), reparent(), setDestroyed(), and show().
Mode Client::mode_ [private] |
Definition at line 151 of file client.h.
Referenced by Client(), handleButtonPress(), handleConfigureRequest(), illuminate(), mode(), and setMode().
string Client::id_ [private] |
Definition at line 152 of file client.h.
Referenced by Client(), handlePropertyNotify(), id(), and initICCCM().