news download themes documentation links










FbAtoms.cc

00001 // FbAtom.cc
00002 // Copyright (c) 2002 - 2003 Henrik Kinnunen (fluxgen(at)linuxmail.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.cc,v 1.9 2003/09/24 14:02:25 rathnor Exp $
00023 
00024 #include "FbAtoms.hh"
00025 #include "App.hh"
00026 
00027 #include <string>
00028 #include <cassert>
00029 
00030 using namespace std;
00031 
00032 FbAtoms *FbAtoms::s_singleton = 0;
00033 
00034 FbAtoms::FbAtoms():m_init(false) {
00035     if (s_singleton != 0)
00036         throw string("You can only create one instance of FbAtoms");
00037 
00038     s_singleton = this;
00039     initAtoms();
00040 }
00041 
00042 FbAtoms::~FbAtoms() {
00043 
00044 }
00045 
00046 FbAtoms *FbAtoms::instance() {
00047     if (s_singleton == 0)
00048         throw string("Create one instance of FbAtoms first!");
00049     return s_singleton;
00050 }
00051 
00052 void FbAtoms::initAtoms() {
00053     Display *display = FbTk::App::instance()->display();
00054     if (display == 0)
00055         return;
00056 
00057     xa_wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False);
00058     xa_wm_state = XInternAtom(display, "WM_STATE", False);
00059     xa_wm_change_state = XInternAtom(display, "WM_CHANGE_STATE", False);
00060     xa_wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", False);
00061     xa_wm_take_focus = XInternAtom(display, "WM_TAKE_FOCUS", False);
00062     motif_wm_hints = XInternAtom(display, "_MOTIF_WM_HINTS", False);
00063 
00064     blackbox_hints = XInternAtom(display, "_BLACKBOX_HINTS", False);
00065     blackbox_attributes = XInternAtom(display, "_BLACKBOX_ATTRIBUTES", False);
00066     blackbox_change_attributes =
00067         XInternAtom(display, "_BLACKBOX_CHANGE_ATTRIBUTES", False);
00068 
00069     blackbox_structure_messages =
00070         XInternAtom(display, "_BLACKBOX_STRUCTURE_MESSAGES", False);
00071     blackbox_notify_startup =
00072         XInternAtom(display, "_BLACKBOX_NOTIFY_STARTUP", False);
00073     blackbox_notify_window_add =
00074         XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_ADD", False);
00075     blackbox_notify_window_del =
00076         XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_DEL", False);
00077     blackbox_notify_current_workspace =
00078         XInternAtom(display, "_BLACKBOX_NOTIFY_CURRENT_WORKSPACE", False);
00079     blackbox_notify_workspace_count =
00080         XInternAtom(display, "_BLACKBOX_NOTIFY_WORKSPACE_COUNT", False);
00081     blackbox_notify_window_focus =
00082         XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_FOCUS", False);
00083     blackbox_notify_window_raise =
00084         XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_RAISE", False);
00085     blackbox_notify_window_lower =
00086         XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_LOWER", False);
00087 
00088     blackbox_change_workspace =
00089         XInternAtom(display, "_BLACKBOX_CHANGE_WORKSPACE", False);
00090     blackbox_change_window_focus =
00091         XInternAtom(display, "_BLACKBOX_CHANGE_WINDOW_FOCUS", False);
00092     blackbox_cycle_window_focus =
00093         XInternAtom(display, "_BLACKBOX_CYCLE_WINDOW_FOCUS", False);
00094 
00095 }

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