X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbasedisplay.hh;h=aa1481ca5f004f9fc56d8dd62e2bbe2bdaa2c3a6;hb=977ecf1f1e82f385a542648b545a0d0877febaf0;hp=c42869550041f63463cc9f8ae7db56cfe8ffc79b;hpb=db451d95bf97b8a8e995f031ac98da50606fd3a0;p=chaz%2Fopenbox diff --git a/src/basedisplay.hh b/src/basedisplay.hh index c4286955..aa1481ca 100644 --- a/src/basedisplay.hh +++ b/src/basedisplay.hh @@ -1,82 +1,20 @@ // -*- mode: C++; indent-tabs-mode: nil; -*- -// BaseDisplay.hh for Blackbox - an X11 Window manager -// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry -// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) -// -// 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, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// 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. - #ifndef __BaseDisplay_hh #define __BaseDisplay_hh +#include "screeninfo.hh" +#include "timer.hh" + extern "C" { #include #include } #include -#include // forward declaration -class BaseDisplay; class BGCCache; -#include "timer.hh" -#include "util.hh" - -class ScreenInfo { -private: - BaseDisplay *basedisplay; - Visual *visual; - Window root_window; - Colormap colormap; - - int depth; - unsigned int screen_number; - std::string display_string; - Rect rect; -#ifdef XINERAMA - RectList xinerama_areas; - bool xinerama_active; -#endif - -public: - ScreenInfo(BaseDisplay *d, unsigned int num); - - inline BaseDisplay *getBaseDisplay(void) const { return basedisplay; } - inline Visual *getVisual(void) const { return visual; } - inline Window getRootWindow(void) const { return root_window; } - inline Colormap getColormap(void) const { return colormap; } - inline int getDepth(void) const { return depth; } - inline unsigned int getScreenNumber(void) const - { return screen_number; } - inline const Rect& getRect(void) const { return rect; } - inline unsigned int getWidth(void) const { return rect.width(); } - inline unsigned int getHeight(void) const { return rect.height(); } - inline const std::string& displayString(void) const - { return display_string; } -#ifdef XINERAMA - inline const RectList &getXineramaAreas(void) const { return xinerama_areas; } - inline bool isXineramaActive(void) const { return xinerama_active; } -#endif -}; - - class BaseDisplay: public TimerQueueManager { private: struct BShape {