1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
11 %include "otk_ustring.i"
12 %include "std_string.i"
16 %immutable Client::frame;
18 %ignore Client::event_mask;
19 %ignore Client::no_propagate_mask;
20 %ignore Client::ignore_unmaps;
21 %ignore Client::Client(int, Window);
22 %ignore Client::~Client();
23 %ignore Client::icon(const otk::Size &) const;
24 %ignore Client::pixmapIcon() const;
25 %ignore Client::pixmapIconMask() const;
26 %ignore Client::showhide();
27 %ignore Client::focus();
28 %ignore Client::unfocus() const;
29 %ignore Client::validate() const;
30 %ignore Client::installColormap(bool) const;
31 %ignore Client::focusHandler(const XFocusChangeEvent &);
32 %ignore Client::unfocusHandler(const XFocusChangeEvent &);
33 %ignore Client::propertyHandler(const XPropertyEvent &);
34 %ignore Client::clientMessageHandler(const XClientMessageEvent &);
35 %ignore Client::configureRequestHandler(const XConfigureRequestEvent &);
36 %ignore Client::unmapHandler(const XUnmapEvent &);
37 %ignore Client::destroyHandler(const XDestroyWindowEvent &);
38 %ignore Client::reparentHandler(const XReparentEvent &);
39 %ignore Client::mapRequestHandler(const XMapRequestEvent &);
40 %ignore Client::shapeHandler(const XShapeEvent &);
44 void focus(bool unshade = false, bool raise = false) {
45 Window root = otk::display->screenInfo(self->screen())->rootWindow();
46 send_client_msg(root, otk::Property::atoms.openbox_active_window,
47 self->window(), unshade ? 1 : 0, raise ? 1 : 0);
50 bool __cmp__(const Client *o) { return self->window() != o->window(); }
53 Window root = RootWindow(**otk::display, self->screen());
54 send_client_msg(root, otk::Property::atoms.openbox_restack_window,
58 Window root = RootWindow(**otk::display, self->screen());
59 send_client_msg(root, otk::Property::atoms.openbox_restack_window,
63 void setDesktop(unsigned int desktop) {
64 Window root = RootWindow(**otk::display, self->screen());
65 send_client_msg(root, otk::Property::atoms.net_wm_desktop,
66 self->window(), desktop);
69 void iconify(bool icon = true) {
70 Window root = RootWindow(**otk::display, self->screen());
71 send_client_msg(root, otk::Property::atoms.wm_change_state,
72 self->window(), icon ? IconicState : NormalState);
76 Window root = RootWindow(**otk::display, self->screen());
77 send_client_msg(root, otk::Property::atoms.net_close_window,
81 void shade(bool shade = true) {
82 Window root = RootWindow(**otk::display, self->screen());
83 send_client_msg(root, otk::Property::atoms.net_wm_state,
85 (shade ? otk::Property::atoms.net_wm_state_add :
86 otk::Property::atoms.net_wm_state_remove),
87 otk::Property::atoms.net_wm_state_shaded);
90 void maximize(bool max = true) {
91 Window root = RootWindow(**otk::display, self->screen());
92 send_client_msg(root, otk::Property::atoms.net_wm_state,
94 (max ? otk::Property::atoms.net_wm_state_add :
95 otk::Property::atoms.net_wm_state_remove),
96 otk::Property::atoms.net_wm_state_maximized_horz,
97 otk::Property::atoms.net_wm_state_maximized_vert);
100 void maximizeHorizontal(bool max = true) {
101 Window root = RootWindow(**otk::display, self->screen());
102 send_client_msg(root, otk::Property::atoms.net_wm_state,
104 (max ? otk::Property::atoms.net_wm_state_add :
105 otk::Property::atoms.net_wm_state_remove),
106 otk::Property::atoms.net_wm_state_maximized_horz);
109 void maximizeVertical(bool max = true) {
110 Window root = RootWindow(**otk::display, self->screen());
111 send_client_msg(root, otk::Property::atoms.net_wm_state,
113 (max ? otk::Property::atoms.net_wm_state_add :
114 otk::Property::atoms.net_wm_state_remove),
115 otk::Property::atoms.net_wm_state_maximized_vert);
118 void setSkipTaskbar(bool skip = true) {
119 Window root = RootWindow(**otk::display, self->screen());
120 send_client_msg(root, otk::Property::atoms.net_wm_state,
122 (skip ? otk::Property::atoms.net_wm_state_add :
123 otk::Property::atoms.net_wm_state_remove),
124 otk::Property::atoms.net_wm_state_skip_taskbar);
127 void setSkipPager(bool skip = true) {
128 Window root = RootWindow(**otk::display, self->screen());
129 send_client_msg(root, otk::Property::atoms.net_wm_state,
131 (skip ? otk::Property::atoms.net_wm_state_add :
132 otk::Property::atoms.net_wm_state_remove),
133 otk::Property::atoms.net_wm_state_skip_pager);
136 void setAbove(bool above = true) {
137 Window root = RootWindow(**otk::display, self->screen());
138 send_client_msg(root, otk::Property::atoms.net_wm_state,
140 (above ? otk::Property::atoms.net_wm_state_add :
141 otk::Property::atoms.net_wm_state_remove),
142 otk::Property::atoms.net_wm_state_above);
145 void setBelow(bool below = true) {
146 Window root = RootWindow(**otk::display, self->screen());
147 send_client_msg(root, otk::Property::atoms.net_wm_state,
149 (below ? otk::Property::atoms.net_wm_state_add :
150 otk::Property::atoms.net_wm_state_remove),
151 otk::Property::atoms.net_wm_state_below);
157 %import "../otk/eventhandler.hh"