aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/SignalHandler.cc12
-rw-r--r--src/FbTk/SignalHandler.hh13
2 files changed, 13 insertions, 12 deletions
diff --git a/src/FbTk/SignalHandler.cc b/src/FbTk/SignalHandler.cc
index adbcbc0..6dbbf49 100644
--- a/src/FbTk/SignalHandler.cc
+++ b/src/FbTk/SignalHandler.cc
@@ -1,5 +1,5 @@
1// SignalHandler.cc for Fluxbox Window Manager 1// SignalHandler.cc for FbTk - Fluxbox ToolKit
2// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org) 2// Copyright (c) 2002 - 2003 Henrik Kinnunen (fluxgen(at)users.sourceforge.net)
3// 3//
4// Permission is hereby granted, free of charge, to any person obtaining a 4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"), 5// copy of this software and associated documentation files (the "Software"),
@@ -13,13 +13,13 @@
13// 13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: SignalHandler.cc,v 1.3 2002/12/01 13:42:14 rathnor Exp $ 22// $Id: SignalHandler.cc,v 1.4 2003/05/13 11:41:29 fluxgen Exp $
23 23
24#include "SignalHandler.hh" 24#include "SignalHandler.hh"
25 25
@@ -33,9 +33,9 @@ SignalHandler::SignalHandler() {
33 s_signal_handler[i] = 0; 33 s_signal_handler[i] = 0;
34} 34}
35 35
36SignalHandler *SignalHandler::instance() { 36SignalHandler &SignalHandler::instance() {
37 static SignalHandler singleton; 37 static SignalHandler singleton;
38 return &singleton; 38 return singleton;
39} 39}
40 40
41bool SignalHandler::registerHandler(int signum, SignalEventHandler *eh, 41bool SignalHandler::registerHandler(int signum, SignalEventHandler *eh,
diff --git a/src/FbTk/SignalHandler.hh b/src/FbTk/SignalHandler.hh
index 0e649a5..c9deeb9 100644
--- a/src/FbTk/SignalHandler.hh
+++ b/src/FbTk/SignalHandler.hh
@@ -1,5 +1,5 @@
1// SignalHandler.hh for FbTk 1// SignalHandler.hh for FbTk
2// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org) 2// Copyright (c) 2002 - 2003 Henrik Kinnunen (fluxgen(at)users.sourceforge.net)
3// 3//
4// Permission is hereby granted, free of charge, to any person obtaining a 4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"), 5// copy of this software and associated documentation files (the "Software"),
@@ -13,13 +13,13 @@
13// 13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: SignalHandler.hh,v 1.4 2003/01/05 23:34:38 fluxgen Exp $ 22// $Id: SignalHandler.hh,v 1.5 2003/05/13 11:41:29 fluxgen Exp $
23 23
24#ifndef FBTK_SIGNALHANDLER_HH 24#ifndef FBTK_SIGNALHANDLER_HH
25#define FBTK_SIGNALHANDLER_HH 25#define FBTK_SIGNALHANDLER_HH
@@ -28,14 +28,15 @@
28 28
29namespace FbTk { 29namespace FbTk {
30 30
31 31/// Base class that SignalHandler calls when it gets a signal
32/// Use this to catch system signals
32class SignalEventHandler { 33class SignalEventHandler {
33public: 34public:
34 virtual void handleSignal(int signum) = 0; 35 virtual void handleSignal(int signum) = 0;
35}; 36};
36 37
38/// Handles system signals, singleton.
37/** 39/**
38 Handles system signals, singleton.
39 Usage: inherit the class SignalEventHandler and then register 40 Usage: inherit the class SignalEventHandler and then register
40 it to SignalHandler by calling registerHandler with 41 it to SignalHandler by calling registerHandler with
41 a signal number 42 a signal number
@@ -43,7 +44,7 @@ public:
43class SignalHandler { 44class SignalHandler {
44public: 45public:
45 /// get singleton object 46 /// get singleton object
46 static SignalHandler *instance(); 47 static SignalHandler &instance();
47 /** 48 /**
48 Register an event handler 49 Register an event handler
49 @return true on success else false 50 @return true on success else false