news download themes documentation links










FbAtoms.hh

00001 // FbAtom.hh
00002 // Copyright (c) 2002 - 2003 Henrik Kinnunen (fluxgen(at)fluxbox.org)
00003 //
00004 // Permission is hereby granted, free of charge, to any person obtaining a
00005 // copy of this software and associated documentation files (the "Software"),
00006 // to deal in the Software without restriction, including without limitation
00007 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008 // and/or sell copies of the Software, and to permit persons to whom the
00009 // Software is furnished to do so, subject to the following conditions:
00010 //
00011 // The above copyright notice and this permission notice shall be included in
00012 // all copies or substantial portions of the Software.
00013 //
00014 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00017 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00018 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00019 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00020 // DEALINGS IN THE SOFTWARE.
00021 
00022 // $Id: FbAtoms.hh,v 1.11 2003/09/24 14:02:25 rathnor Exp $
00023 #ifndef FBATOMS_HH
00024 #define FBATOMS_HH
00025 
00026 #include <X11/Xlib.h>
00027 #include <X11/Xatom.h>
00028 
00030 class FbAtoms {
00031 public:
00032     FbAtoms();
00033     ~FbAtoms();
00034 
00035     static FbAtoms *instance();
00036 
00037     inline Atom getWMChangeStateAtom() const { return xa_wm_change_state; }
00038     inline Atom getWMStateAtom() const { return xa_wm_state; }
00039     inline Atom getWMDeleteAtom() const { return xa_wm_delete_window; }
00040     inline Atom getWMProtocolsAtom() const { return xa_wm_protocols; }
00041     inline Atom getWMTakeFocusAtom() const { return xa_wm_take_focus; }
00042 
00043     // this atom is for normal app->WM hints about decorations, stacking,
00044     // starting workspace etc...
00045     inline Atom getFluxboxHintsAtom() const { return blackbox_hints;}
00046     inline Atom getMWMHintsAtom() const { return motif_wm_hints; }
00047 
00048     // these atoms are for normal app->WM interaction beyond the scope of the
00049     // ICCCM...
00050     inline Atom getFluxboxAttributesAtom() const { return blackbox_attributes; }
00051     inline Atom getFluxboxChangeAttributesAtom() const { return blackbox_change_attributes; }
00052 
00053     // these atoms are for window->WM interaction, with more control and
00054     // information on window "structure"... common examples are
00055     // notifying apps when windows are raised/lowered... when the user changes
00056     // workspaces... i.e. "pager talk"
00057     inline Atom getFluxboxStructureMessagesAtom() const{ return blackbox_structure_messages; }
00058 
00059     // *Notify* portions of the NETStructureMessages protocol
00060     inline Atom getFluxboxNotifyStartupAtom() const { return blackbox_notify_startup; }
00061     inline Atom getFluxboxNotifyWindowAddAtom() const { return blackbox_notify_window_add; }
00062     inline Atom getFluxboxNotifyWindowDelAtom() const { return blackbox_notify_window_del; }
00063     inline Atom getFluxboxNotifyWindowFocusAtom() const { return blackbox_notify_window_focus; }
00064     inline Atom getFluxboxNotifyCurrentWorkspaceAtom() const { return blackbox_notify_current_workspace; }
00065     inline Atom getFluxboxNotifyWorkspaceCountAtom() const { return blackbox_notify_workspace_count; }
00066     inline Atom getFluxboxNotifyWindowRaiseAtom() const { return blackbox_notify_window_raise; }
00067     inline Atom getFluxboxNotifyWindowLowerAtom() const { return blackbox_notify_window_lower; }
00068 
00069     // atoms to change that request changes to the desktop environment during
00070     // runtime... these messages can be sent by any client... as the sending
00071     // client window id is not included in the ClientMessage event...
00072     inline Atom getFluxboxChangeWorkspaceAtom() const { return blackbox_change_workspace; }
00073     inline Atom getFluxboxChangeWindowFocusAtom() const { return blackbox_change_window_focus; }
00074     inline Atom getFluxboxCycleWindowFocusAtom() const { return blackbox_cycle_window_focus; }
00075 
00076 private:
00077     void initAtoms();
00078 // NETAttributes
00079     Atom blackbox_attributes, blackbox_change_attributes, blackbox_hints;
00080 
00081     Atom motif_wm_hints;
00082 
00083     // NETStructureMessages
00084     Atom blackbox_structure_messages, blackbox_notify_startup,
00085         blackbox_notify_window_add, blackbox_notify_window_del,
00086         blackbox_notify_window_focus, blackbox_notify_current_workspace,
00087         blackbox_notify_workspace_count, blackbox_notify_window_raise,
00088         blackbox_notify_window_lower;
00089 
00090     // message_types for client -> wm messages
00091     Atom blackbox_change_workspace, blackbox_change_window_focus,
00092         blackbox_cycle_window_focus;
00093 
00094     Atom xa_wm_protocols, xa_wm_state,
00095         xa_wm_delete_window, xa_wm_take_focus, xa_wm_change_state;
00096        
00097     bool m_init;
00098     static FbAtoms *s_singleton;
00099 };
00100 
00101 #endif //FBATOMS_HH

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA