all repos — openbox @ 23a7f188297ba3cef1bf13f1be9407ff6eb9bd62

openbox fork - make it a bit more like ryudo

add a skeletal OBActions class for user actions
Dana Jansens danakj@orodu.net
commit

23a7f188297ba3cef1bf13f1be9407ff6eb9bd62

parent

24924367f9486b29b8b9fd024781ccb5f9e0e276

5 files changed, 59 insertions(+), 4 deletions(-)

jump to
M src/Makefile.amsrc/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
A 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() +{ +} + +}
A 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
M src/openbox.ccsrc/openbox.cc

@@ -8,6 +8,7 @@ #include "../version.h"

#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 @@ #include <algorithm>

namespace ob { -Openbox *Openbox::instance = (Openbox *) 0; +Openbox *Openbox::instance = (Openbox *) 0; +OBActions *Openbox::actions = (OBActions *) 0; void Openbox::signalHandler(int signal)

@@ -121,6 +123,8 @@ sigaction(SIGINT, &action, (struct sigaction *) 0);

sigaction(SIGHUP, &action, (struct sigaction *) 0); _property = new otk::OBProperty(); + + Openbox::actions = new OBActions(); // create the mouse cursors we'll use _cursors.session = XCreateFontCursor(otk::OBDisplay::display, XC_left_ptr);
M src/openbox.hhsrc/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,12 +44,15 @@ */

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 {