From 23a7f188297ba3cef1bf13f1be9407ff6eb9bd62 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 4 Dec 2002 04:11:24 +0000 Subject: [PATCH] add a skeletal OBActions class for user actions --- src/Makefile.am | 2 +- src/actions.cc | 20 ++++++++++++++++++++ src/actions.hh | 27 +++++++++++++++++++++++++++ src/openbox.cc | 6 +++++- src/openbox.hh | 8 ++++++-- 5 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 src/actions.cc create mode 100644 src/actions.hh diff --git a/src/Makefile.am b/src/Makefile.am index ac4534c6..bc83bb6f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ bin_PROGRAMS= openbox3 openbox3_LDADD=../otk/libotk.a @LIBINTL@ -openbox3_SOURCES= client.cc frame.cc openbox.cc screen.cc \ +openbox3_SOURCES= actions.cc client.cc frame.cc openbox.cc screen.cc \ main.cc rootwindow.cc MAINTAINERCLEANFILES= Makefile.in diff --git a/src/actions.cc b/src/actions.cc new file mode 100644 index 00000000..2ee6bc57 --- /dev/null +++ b/src/actions.cc @@ -0,0 +1,20 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + +#include "actions.hh" + +namespace ob { + +OBActions::OBActions() +{ +} + + +OBActions::~OBActions() +{ +} + +} diff --git a/src/actions.hh b/src/actions.hh new file mode 100644 index 00000000..1013e527 --- /dev/null +++ b/src/actions.hh @@ -0,0 +1,27 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +#ifndef __actions_hh +#define __actions_hh + +/*! @file actions.hh + @brief The action interface for user-available actions +*/ + +namespace ob { + +//! The action interface for user-available actions +/*! +*/ +class OBActions { +public: + +private: + +public: + OBActions(); + virtual ~OBActions(); + +}; + +} + +#endif // __actions_hh diff --git a/src/openbox.cc b/src/openbox.cc index 44d3b8c4..d17a5500 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -8,6 +8,7 @@ #include "openbox.hh" #include "client.hh" #include "screen.hh" +#include "actions.hh" #include "otk/property.hh" #include "otk/display.hh" #include "otk/assassin.hh" @@ -49,7 +50,8 @@ extern "C" { namespace ob { -Openbox *Openbox::instance = (Openbox *) 0; +Openbox *Openbox::instance = (Openbox *) 0; +OBActions *Openbox::actions = (OBActions *) 0; void Openbox::signalHandler(int signal) @@ -122,6 +124,8 @@ Openbox::Openbox(int argc, char **argv) _property = new otk::OBProperty(); + Openbox::actions = new OBActions(); + // create the mouse cursors we'll use _cursors.session = XCreateFontCursor(otk::OBDisplay::display, XC_left_ptr); _cursors.move = XCreateFontCursor(otk::OBDisplay::display, XC_fleur); diff --git a/src/openbox.hh b/src/openbox.hh index 75a3a2e0..b6c3d6d1 100644 --- a/src/openbox.hh +++ b/src/openbox.hh @@ -29,8 +29,9 @@ namespace ob { class OBScreen; class OBClient; +class OBActions; -//! The main class for the Openbox window manager. +//! The main class for the Openbox window manager /*! Only a single instance of the Openbox class may be used in the application. A pointer to this instance is held in the Openbox::instance static member @@ -43,13 +44,16 @@ class OBClient; class Openbox : public otk::OtkEventDispatcher, public otk::OtkEventHandler { public: - //! The single instance of the Openbox class for the application. + //! The single instance of the Openbox class for the application /*! Since this variable is globally available in the application, the Openbox class does not need to be passed around to any of the other classes. */ static Openbox *instance; + //! The action interface through which all user-available actions occur + static OBActions *actions; + //! The posible running states of the window manager enum RunState { State_Starting, //!< The window manager is starting up (being created) -- 2.39.2