From b37a99672a432db58a9f011583ec5102761584d5 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 4 Feb 2002 07:02:52 +0000 Subject: indent --- src/Netizen.cc | 82 +++++++++++++++++++++++++++++----------------------------- src/Netizen.hh | 38 ++++++++++++--------------- 2 files changed, 58 insertions(+), 62 deletions(-) diff --git a/src/Netizen.cc b/src/Netizen.cc index f23ec13..8117ae1 100644 --- a/src/Netizen.cc +++ b/src/Netizen.cc @@ -13,7 +13,7 @@ // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER @@ -21,43 +21,44 @@ // stupid macros needed to access some functions in version 2 of the GNU C // library -#ifndef _GNU_SOURCE -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +#define _GNU_SOURCE #endif // _GNU_SOURCE -#ifdef HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H #include "../config.h" #endif // HAVE_CONFIG_H #include "Netizen.hh" -Netizen::Netizen(BScreen *scr, Window win) { - screen = scr; - basedisplay = screen->getBaseDisplay(); - window = win; +Netizen::Netizen(BScreen *scr, Window win): +screen(scr), +basedisplay(screen->getBaseDisplay()), +window(win) { + screen = scr; + basedisplay = screen->getBaseDisplay(); + window = win; - event.type = ClientMessage; - event.xclient.message_type = basedisplay->getFluxboxStructureMessagesAtom(); - event.xclient.display = basedisplay->getXDisplay(); - event.xclient.window = window; - event.xclient.format = 32; - event.xclient.data.l[0] = basedisplay->getFluxboxNotifyStartupAtom(); - event.xclient.data.l[1] = event.xclient.data.l[2] = - event.xclient.data.l[3] = event.xclient.data.l[4] = 0l; + event.type = ClientMessage; + event.xclient.message_type = basedisplay->getFluxboxStructureMessagesAtom(); + event.xclient.display = basedisplay->getXDisplay(); + event.xclient.window = window; + event.xclient.format = 32; + event.xclient.data.l[0] = basedisplay->getFluxboxNotifyStartupAtom(); + event.xclient.data.l[1] = event.xclient.data.l[2] = + event.xclient.data.l[3] = event.xclient.data.l[4] = 0l; - XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); + XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); } void Netizen::sendWorkspaceCount(void) { event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWorkspaceCountAtom(); - event.xclient.data.l[1] = screen->getCount(); + event.xclient.data.l[1] = screen->getCount(); - XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); - - + XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); } @@ -67,54 +68,53 @@ void Netizen::sendCurrentWorkspace(void) { event.xclient.data.l[1] = screen->getCurrentWorkspaceID(); XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); - } void Netizen::sendWindowFocus(Window w) { - event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowFocusAtom(); - event.xclient.data.l[1] = w; + event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowFocusAtom(); + event.xclient.data.l[1] = w; - XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); + XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); } void Netizen::sendWindowAdd(Window w, unsigned long p) { - event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowAddAtom(); - event.xclient.data.l[1] = w; - event.xclient.data.l[2] = p; + event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowAddAtom(); + event.xclient.data.l[1] = w; + event.xclient.data.l[2] = p; - XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); + XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); - event.xclient.data.l[2] = 0l; + event.xclient.data.l[2] = 0l; } void Netizen::sendWindowDel(Window w) { - event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowDelAtom(); - event.xclient.data.l[1] = w; + event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowDelAtom(); + event.xclient.data.l[1] = w; - XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); + XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); } void Netizen::sendWindowRaise(Window w) { - event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowRaiseAtom(); - event.xclient.data.l[1] = w; + event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowRaiseAtom(); + event.xclient.data.l[1] = w; - XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); + XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); } void Netizen::sendWindowLower(Window w) { - event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowLowerAtom(); - event.xclient.data.l[1] = w; + event.xclient.data.l[0] = basedisplay->getFluxboxNotifyWindowLowerAtom(); + event.xclient.data.l[1] = w; - XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); + XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event); } void Netizen::sendConfigNotify(XEvent *e) { - XSendEvent(basedisplay->getXDisplay(), window, False, - StructureNotifyMask, e); + XSendEvent(basedisplay->getXDisplay(), window, False, + StructureNotifyMask, e); } diff --git a/src/Netizen.hh b/src/Netizen.hh index 1c4a2b4..bb12735 100644 --- a/src/Netizen.hh +++ b/src/Netizen.hh @@ -13,14 +13,14 @@ // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -#ifndef _NETIZEN_HH_ -#define _NETIZEN_HH_ +#ifndef _NETIZEN_HH_ +#define _NETIZEN_HH_ // forward declaration class Netizen; @@ -33,30 +33,26 @@ class Netizen; class Netizen { private: - BaseDisplay *basedisplay; - BScreen *screen; - Window window; - XEvent event; - - -protected: - + BScreen *screen; + BaseDisplay *basedisplay; + Window window; + XEvent event; public: - Netizen(BScreen *, Window); + Netizen(BScreen *, Window); - inline const Window &getWindowID(void) const { return window; } + inline const Window &getWindowID(void) const { return window; } - void sendWorkspaceCount(void); - void sendCurrentWorkspace(void); + void sendWorkspaceCount(void); + void sendCurrentWorkspace(void); - void sendWindowFocus(Window); - void sendWindowAdd(Window, unsigned long); - void sendWindowDel(Window); - void sendWindowRaise(Window); - void sendWindowLower(Window); + void sendWindowFocus(Window); + void sendWindowAdd(Window, unsigned long); + void sendWindowDel(Window); + void sendWindowRaise(Window); + void sendWindowLower(Window); - void sendConfigNotify(XEvent *); + void sendConfigNotify(XEvent *); }; -- cgit v0.11.2