~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy-backports

« back to all changes in this revision

Viewing changes to kwin/clients/web/Web.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-09-05 20:45:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070905204514-632hhspl0nvrc84i
Tags: upstream-3.93.0
ImportĀ upstreamĀ versionĀ 3.93.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  'Web' kwin client
 
3
 
 
4
  Copyright (C) 2005 Sandro Giessl <sandro@giessl.com>
 
5
  Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
 
6
 
 
7
  This program is free software; you can redistribute it and/or
 
8
  modify it under the terms of the GNU General Public
 
9
  License as published by the Free Software Foundation; either
 
10
  version 2 of the License, or (at your option) any later version.
 
11
 
 
12
  This program is distributed in the hope that it will be useful,
 
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
  General Public License for more details.
 
16
 
 
17
  You should have received a copy of the GNU General Public License
 
18
  along with this program; see the file COPYING.  If not, write to
 
19
  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
20
  Boston, MA 02110-1301, USA.
 
21
*/
 
22
 
 
23
#ifndef KWIN_WEB_H
 
24
#define KWIN_WEB_H
 
25
 
 
26
#include "../../lib/kcommondecoration.h"
 
27
#include "../../lib/kdecorationfactory.h"
 
28
 
 
29
 
 
30
namespace Web
 
31
{
 
32
 
 
33
  
 
34
  class WebClient : public KCommonDecoration
 
35
  {
 
36
    public:
 
37
 
 
38
      WebClient(KDecorationBridge* bridge, KDecorationFactory* factory);
 
39
      ~WebClient();
 
40
 
 
41
      virtual QString visibleName() const;
 
42
      virtual QString defaultButtonsLeft() const;
 
43
      virtual QString defaultButtonsRight() const;
 
44
      virtual bool decorationBehaviour(DecorationBehaviour behaviour) const;
 
45
      virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const;
 
46
      virtual KCommonDecorationButton *createButton(ButtonType type);
 
47
 
 
48
      virtual void updateWindowShape();
 
49
 
 
50
      virtual void init();
 
51
 
 
52
    protected:
 
53
      virtual void reset( unsigned long changed );
 
54
 
 
55
      virtual void paintEvent(QPaintEvent *);
 
56
 
 
57
    private:
 
58
 
 
59
      int titleHeight_, borderSize_;
 
60
 
 
61
      bool shape_;
 
62
 
 
63
      QBitmap       _buttonBitmap(ButtonType t) const;
 
64
  };
 
65
 
 
66
  class WebFactory : public QObject, public KDecorationFactory
 
67
  {
 
68
    Q_OBJECT
 
69
 
 
70
    public:
 
71
 
 
72
      WebFactory() {}
 
73
      virtual ~WebFactory() {}
 
74
      virtual KDecoration* createDecoration( KDecorationBridge* );
 
75
      virtual bool reset( unsigned long changed );
 
76
      virtual bool supports( Ability ability );
 
77
      virtual QList< BorderSize > borderSizes() const;
 
78
  };
 
79
}
 
80
 
 
81
#endif
 
82
// vim:ts=2:sw=2:tw=78:set et:
 
83
// kate: indent-width 2; replace-tabs on; tab-width 2; space-indent on;