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

« back to all changes in this revision

Viewing changes to khotkeys/libkhotkeysprivate/windows_handler.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
/* Copyright (C) 1999-2001 Lubos Lunak <l.lunak@kde.org>
 
2
 
 
3
   This program is free software; you can redistribute it and/or
 
4
   modify it under the terms of the GNU General Public License
 
5
   Version 2 as published by the Free Software Foundation;
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
15
*/
 
16
 
 
17
#ifndef WINDOWS_HANDLER_H
 
18
#define WINDOWS_HANDLER_H
 
19
 
 
20
#include <kdemacros.h>
 
21
 
 
22
#include <QtCore/QObject>
 
23
#include <QtGui/qwindowdefs.h>
 
24
 
 
25
#include <netwm.h>
 
26
 
 
27
namespace KHotKeys
 
28
{
 
29
 
 
30
const int SUPPORTED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
 
31
    | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask
 
32
    | NET::UtilityMask | NET::SplashMask;
 
33
 
 
34
 
 
35
class Windowdef_list;
 
36
 
 
37
class KDE_EXPORT WindowsHandler : public QObject
 
38
                                  #include <QtGui/qwindowdefs.h>
 
39
    {
 
40
    Q_OBJECT
 
41
    public:
 
42
        WindowsHandler( bool enable_signals_P, QObject* parent_P );
 
43
        virtual ~WindowsHandler();
 
44
        QString get_window_class( WId id_P );
 
45
        QString get_window_role( WId id_P );
 
46
        WId active_window();
 
47
        void set_action_window( WId window );
 
48
        WId action_window();
 
49
        WId find_window( const Windowdef_list* window_P );
 
50
        static WId window_at_position( int x, int y );
 
51
        static void activate_window( WId id_P );
 
52
    Q_SIGNALS:
 
53
        void window_added( WId window_P );
 
54
        void window_removed( WId window_P );
 
55
        void active_window_changed( WId window_P );
 
56
        void window_changed( WId window_P );
 
57
        void window_changed( WId window_P, unsigned int flags_P );
 
58
    protected Q_SLOTS:
 
59
        void window_added_slot( WId window_P );
 
60
        void window_removed_slot( WId window_P );
 
61
        void active_window_changed_slot( WId window_P );
 
62
        void window_changed_slot( WId window_P );
 
63
        void window_changed_slot( WId window_P, unsigned int flags_P );
 
64
    private:
 
65
        bool signals_enabled;
 
66
        WId _action_window;
 
67
    };
 
68
 
 
69
 
 
70
} // namespace KHotKeys
 
71
 
 
72
#endif