news download themes documentation links










Gnome.hh

00001 // Gnome.hh for fluxbox
00002 // Copyright (c) 2002 Henrik Kinnunen (fluxgen@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: Gnome.hh,v 1.10 2003/07/28 15:06:33 rathnor Exp $
00023 
00024 #ifndef GNOME_HH
00025 #define GNOME_HH
00026 
00027 #include "AtomHandler.hh"
00028 
00029 #include <X11/Xatom.h>
00030 #include <vector>
00031 
00032 class Gnome:public AtomHandler {
00033 public:
00034     enum GnomeLayer { 
00035         WIN_LAYER_DESKTOP = 0,
00036         WIN_LAYER_BELOW = 2,
00037         WIN_LAYER_NORMAL = 4,
00038         WIN_LAYER_ONTOP = 6,
00039         WIN_LAYER_DOCK = 8,
00040         WIN_LAYER_ABOVE_DOCK = 10,
00041         WIN_LAYER_MENU = 12
00042     };
00043 
00044     enum GnomeState {
00045         WIN_STATE_STICKY          = (1<<0), // everyone knows sticky
00046         WIN_STATE_MINIMIZED       = (1<<1), // Reserved - definition is unclear
00047         WIN_STATE_MAXIMIZED_VERT  = (1<<2), // window in maximized V state
00048         WIN_STATE_MAXIMIZED_HORIZ = (1<<3), // window in maximized H state
00049         WIN_STATE_HIDDEN          = (1<<4), // not on taskbar but window visible
00050         WIN_STATE_SHADED          = (1<<5), // shaded (MacOS / Afterstep style)
00051         WIN_STATE_HID_WORKSPACE   = (1<<6), // not on current desktop
00052         WIN_STATE_HID_TRANSIENT   = (1<<7), // owner of transient is hidden
00053         WIN_STATE_FIXED_POSITION  = (1<<8), // window is fixed in position even
00054         WIN_STATE_ARRANGE_IGNORE  = (1<<9)  // ignore for auto arranging
00055     };
00056 
00057     enum GnomeHints {
00058         WIN_HINTS_SKIP_FOCUS      = (1<<0), // skip this window
00059         WIN_HINTS_SKIP_WINLIST    = (1<<1), // do not show in window list
00060         WIN_HINTS_SKIP_TASKBAR    = (1<<2), // do not show on taskbar
00061         WIN_HINTS_GROUP_TRANSIENT = (1<<3), // Reserved - definition is unclear
00062         WIN_HINTS_FOCUS_ON_CLICK  = (1<<4)  // app only accepts focus if clicked
00063     };
00064     
00065     Gnome();
00066     ~Gnome();
00067     void initForScreen(BScreen &screen);
00068     void setupFrame(FluxboxWindow &win);
00069     void setupClient(WinClient &winclient) {}
00070 
00071     void updateClientList(BScreen &screen);
00072     void updateWorkspaceNames(BScreen &screen);
00073     void updateCurrentWorkspace(BScreen &screen);
00074     void updateWorkspaceCount(BScreen &screen);
00075 
00076     void updateState(FluxboxWindow &win);
00077     void updateLayer(FluxboxWindow &win);
00078     void updateHints(FluxboxWindow &win);
00079     void updateWorkspace(FluxboxWindow &win);
00080 
00081     bool checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient);
00082     
00083     // ignore these ones
00084     void updateFrameClose(FluxboxWindow &win) {}
00085     void updateClientClose(WinClient &winclient) {}
00086     bool propertyNotify(WinClient &winclient, Atom the_property) { return false; }
00087 
00088 private:
00089     void setLayer(FluxboxWindow *win, int layer);
00090     void setState(FluxboxWindow *win, int state);
00091     void setLayer(int layer);
00092     void createAtoms();
00093     Atom m_gnome_wm_win_layer, m_gnome_wm_win_state, m_gnome_wm_win_hints,
00094         m_gnome_wm_win_app_state, m_gnome_wm_win_expanded_size,
00095         m_gnome_wm_win_icons, m_gnome_wm_win_workspace,
00096         m_gnome_wm_win_workspace_count, m_gnome_wm_win_workspace_names,
00097         m_gnome_wm_win_client_list;
00098     Atom m_gnome_wm_prot;
00099     Atom m_gnome_wm_supporting_wm_check;    
00100     std::vector<Window> m_gnomewindows;
00101 };
00102 
00103 #endif // GNOME_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