~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to khotkeys/libkhotkeysprivate/windows_helper/window_selection_interface.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef WINDOW_SELECTION_INTERFACE_H
 
2
#define WINDOW_SELECTION_INTERFACE_H
 
3
/* Copyright (C) 1999-2001 Lubos Lunak <l.lunak@kde.org>
 
4
   Copyright (C) 2008 Michael Jansen <kde@michael-jansen.biz>
 
5
 
 
6
   This program is free software; you can redistribute it and/or
 
7
   modify it under the terms of the GNU General Public License
 
8
   Version 2 as published by the Free Software Foundation;
 
9
 
 
10
   This program is distributed in the hope that it will be useful,
 
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
   GNU General Public License for more details.
 
14
 
 
15
   You should have received a copy of the GNU General Public License
 
16
   along with this program; if not, write to the Free Software
 
17
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
*/
 
19
 
 
20
 
 
21
#include <QtCore/QString>
 
22
 
 
23
#include "KConfigGroup"
 
24
 
 
25
#include <QtGui/qwindowdefs.h>
 
26
 
 
27
#include <netwm_def.h>
 
28
 
 
29
namespace KHotKeys {
 
30
 
 
31
struct KDE_EXPORT Window_data
 
32
    {
 
33
    Window_data( WId id_P );
 
34
    QString title; // _NET_WM_NAME or WM_NAME
 
35
    QString role; // WM_WINDOW_ROLE
 
36
    QString wclass; // WM_CLASS
 
37
    NET::WindowType type;
 
38
    };
 
39
 
 
40
class KDE_EXPORT Windowdef
 
41
    {
 
42
    Q_DISABLE_COPY( Windowdef )
 
43
 
 
44
    public:
 
45
        Windowdef( const QString& comment_P );
 
46
        Windowdef( KConfigGroup& cfg_P );
 
47
        virtual ~Windowdef();
 
48
        const QString& comment() const;
 
49
        void set_comment(const QString &comment);
 
50
        virtual bool match( const Window_data& window_P ) = 0;
 
51
        static Windowdef* create_cfg_read( KConfigGroup& cfg_P/*, ActionDataBase* data_P*/ );
 
52
        virtual void cfg_write( KConfigGroup& cfg_P ) const = 0;
 
53
        virtual Windowdef* copy( /*ActionDataBase* data_P*/ ) const = 0;
 
54
        virtual const QString description() const = 0;
 
55
    private:
 
56
        QString _comment;
 
57
    };
 
58
 
 
59
} // namespace KHotKeys
 
60
 
 
61
#endif /* #ifndef WINDOW_SELECTION_INTERFACE_H */