2002-03-18 15:23:08 +00:00
|
|
|
// FbAtom.hh
|
2006-02-16 06:53:05 +00:00
|
|
|
// Copyright (c) 2002 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
2002-03-18 15:23:08 +00:00
|
|
|
//
|
|
|
|
// 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,
|
2003-04-15 11:59:02 +00:00
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
2002-03-18 15:23:08 +00:00
|
|
|
// 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.
|
|
|
|
|
2002-03-18 20:28:24 +00:00
|
|
|
#ifndef FBATOMS_HH
|
|
|
|
#define FBATOMS_HH
|
|
|
|
|
2002-03-18 15:23:08 +00:00
|
|
|
#include <X11/Xlib.h>
|
2002-08-14 21:53:07 +00:00
|
|
|
|
2003-04-26 18:56:02 +00:00
|
|
|
/// atom handler for basic X atoms
|
2002-08-14 21:53:07 +00:00
|
|
|
class FbAtoms {
|
2002-03-18 15:23:08 +00:00
|
|
|
public:
|
2003-04-15 11:59:02 +00:00
|
|
|
FbAtoms();
|
|
|
|
~FbAtoms();
|
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
static FbAtoms *instance();
|
2002-08-12 19:25:35 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
Atom getWMChangeStateAtom() const { return xa_wm_change_state; }
|
|
|
|
Atom getWMStateAtom() const { return xa_wm_state; }
|
|
|
|
Atom getWMDeleteAtom() const { return xa_wm_delete_window; }
|
|
|
|
Atom getWMProtocolsAtom() const { return xa_wm_protocols; }
|
|
|
|
Atom getWMTakeFocusAtom() const { return xa_wm_take_focus; }
|
2002-03-18 15:23:08 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
Atom getMWMHintsAtom() const { return motif_wm_hints; }
|
2002-03-18 15:23:08 +00:00
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
// these atoms are for normal app->WM interaction beyond the scope of the
|
|
|
|
// ICCCM...
|
2007-12-29 21:38:53 +00:00
|
|
|
Atom getFluxboxAttributesAtom() const { return blackbox_attributes; }
|
2002-03-18 15:23:08 +00:00
|
|
|
|
|
|
|
private:
|
2003-04-15 11:59:02 +00:00
|
|
|
void initAtoms();
|
2002-03-18 15:23:08 +00:00
|
|
|
// NETAttributes
|
2007-10-13 21:51:37 +00:00
|
|
|
Atom blackbox_attributes;
|
2003-09-24 14:02:25 +00:00
|
|
|
Atom motif_wm_hints;
|
|
|
|
|
2003-04-26 18:56:02 +00:00
|
|
|
Atom xa_wm_protocols, xa_wm_state,
|
2003-04-15 11:59:02 +00:00
|
|
|
xa_wm_delete_window, xa_wm_take_focus, xa_wm_change_state;
|
2007-12-29 21:38:53 +00:00
|
|
|
|
2002-12-01 13:42:15 +00:00
|
|
|
bool m_init;
|
|
|
|
static FbAtoms *s_singleton;
|
2002-03-18 15:23:08 +00:00
|
|
|
};
|
2002-03-18 20:28:24 +00:00
|
|
|
|
|
|
|
#endif //FBATOMS_HH
|