// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-// blackbox.hh for Blackbox - an X11 Window manager
-// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org>
-// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the "Software"),
-// to deal in the Software without restriction, including without limitation
-// the rights to use, copy, modify, merge, publish, distribute, sublicense,
-// and/or sell copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// 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
-// 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 __blackbox_hh
#define __blackbox_hh
#include <map>
#include <string>
-#include "basedisplay.hh"
-#include "configuration.hh"
+#include "otk/timer.hh"
+#include "otk/property.hh"
+#include "openbox.hh"
+#include "otk/configuration.hh"
#include "timer.hh"
-#include "xatom.hh"
#define AttribShaded (1l << 0)
#define AttribMaxHoriz (1l << 1)
#define DecorTiny (2)
#define DecorTool (3)
+namespace ob {
+
struct BlackboxHints {
unsigned long flags, attrib, workspace, stack, decoration;
};
class BlackboxWindow;
class BWindowGroup;
-class Blackbox : public BaseDisplay, public TimeoutHandler {
+class Blackbox : public Openbox {
private:
struct BCursor {
Cursor session, move, ll_angle, lr_angle, ul_angle, ur_angle;
BScreen *active_screen;
BlackboxWindow *focused_window, *changing_window;
- BTimer *timer;
- Configuration config;
- XAtom *xatom;
+ otk::OBTimer *timer;
+ otk::Configuration config;
+ otk::OBProperty *xatom;
bool no_focus, reconfigure_wait;
Time last_time;
public:
- Blackbox(char **m_argv, char *dpy_name = 0, char *rc = 0);
+ Blackbox(int argc, char **m_argv, char *rc = 0);
virtual ~Blackbox(void);
BWindowGroup *searchGroup(Window window);
void removeWindowSearch(Window window);
void removeGroupSearch(Window window);
- inline XAtom *getXAtom(void) { return xatom; }
+ inline otk::OBProperty *getXAtom(void) { return xatom; }
inline BlackboxWindow *getFocusedWindow(void) { return focused_window; }
inline BlackboxWindow *getChangingWindow(void) { return changing_window; }
- inline Configuration *getConfig() { return &config; }
+ inline otk::Configuration *getConfig() { return &config; }
inline const Time &getDoubleClickInterval(void) const
{ return resource.double_click_interval; }
inline const Time &getLastTime(void) const { return last_time; }
virtual bool handleSignal(int sig);
- virtual void timeout(void);
+ static void timeout(Blackbox *t);
enum { B_AmericanDate = 1, B_EuropeanDate };
};
+}
#endif // __blackbox_hh