add a skeletal OBActions class for user actions

This commit is contained in:
Dana Jansens 2002-12-04 04:11:24 +00:00
parent 24924367f9
commit 23a7f18829
5 changed files with 59 additions and 4 deletions

View file

@ -15,7 +15,7 @@ bin_PROGRAMS= openbox3
openbox3_LDADD=../otk/libotk.a @LIBINTL@ 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 main.cc rootwindow.cc
MAINTAINERCLEANFILES= Makefile.in MAINTAINERCLEANFILES= Makefile.in

20
src/actions.cc Normal file
View file

@ -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()
{
}
}

27
src/actions.hh Normal file
View file

@ -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

View file

@ -8,6 +8,7 @@
#include "openbox.hh" #include "openbox.hh"
#include "client.hh" #include "client.hh"
#include "screen.hh" #include "screen.hh"
#include "actions.hh"
#include "otk/property.hh" #include "otk/property.hh"
#include "otk/display.hh" #include "otk/display.hh"
#include "otk/assassin.hh" #include "otk/assassin.hh"
@ -49,7 +50,8 @@ extern "C" {
namespace ob { namespace ob {
Openbox *Openbox::instance = (Openbox *) 0; Openbox *Openbox::instance = (Openbox *) 0;
OBActions *Openbox::actions = (OBActions *) 0;
void Openbox::signalHandler(int signal) void Openbox::signalHandler(int signal)
@ -122,6 +124,8 @@ Openbox::Openbox(int argc, char **argv)
_property = new otk::OBProperty(); _property = new otk::OBProperty();
Openbox::actions = new OBActions();
// create the mouse cursors we'll use // create the mouse cursors we'll use
_cursors.session = XCreateFontCursor(otk::OBDisplay::display, XC_left_ptr); _cursors.session = XCreateFontCursor(otk::OBDisplay::display, XC_left_ptr);
_cursors.move = XCreateFontCursor(otk::OBDisplay::display, XC_fleur); _cursors.move = XCreateFontCursor(otk::OBDisplay::display, XC_fleur);

View file

@ -29,8 +29,9 @@ namespace ob {
class OBScreen; class OBScreen;
class OBClient; 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 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 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 class Openbox : public otk::OtkEventDispatcher, public otk::OtkEventHandler
{ {
public: 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 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. class does not need to be passed around to any of the other classes.
*/ */
static Openbox *instance; static Openbox *instance;
//! The action interface through which all user-available actions occur
static OBActions *actions;
//! The posible running states of the window manager //! The posible running states of the window manager
enum RunState { enum RunState {
State_Starting, //!< The window manager is starting up (being created) State_Starting, //!< The window manager is starting up (being created)