~ubuntu-branches/ubuntu/trusty/kdeplasma-addons/trusty

« back to all changes in this revision

Viewing changes to applets/lancelot/app/src/QtDisplay.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2010-05-25 09:50:14 UTC
  • mfrom: (1.1.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100525095014-6mlrm9z9bkws0zkt
Tags: 4:4.4.80-0ubuntu1
* New upstream beta release:
  - Bump kde-sc-dev-latest build-dep version to 4.4.80
  - Refresh kubuntu_04_kimpanel_disable_scim.diff
  - Update various .install files
  - Drop liblancelot0a and liblancelot-dev packages; Upstream has broken ABI
    without an .so version bump, and after discussion with Debian it was
    decided it was not worth it to ship an unstable library.
  - Add liblancelot files to plasma-widget-lancelot, adding appropriate
    Replaces: entries
* Switch to source format 3.0 (quilt):
  - Bump debhelper build-depend version to 7.3.16 or greater

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *   Copyright (C) 2005,2006,2007 by Siraj Razick <siraj@kde.org>
3
 
 *   Copyright (C) 2007 by Ivan Cukic <ivan.cukic(at)kde.org>
4
 
 *
5
 
 *   This program is free software; you can redistribute it and/or modify
6
 
 *   it under the terms of the GNU General Public License version 2,
7
 
 *   or (at your option) any later version, as published by the Free
8
 
 *   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
16
 
 *   License along with this program; if not, write to the
17
 
 *   Free Software Foundation, Inc.,
18
 
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19
 
 */
20
 
 
21
 
#ifndef QT_DISPLAY
22
 
#define QT_DISPLAY
23
 
 
24
 
#include <config-lancelot.h>
25
 
 
26
 
#ifdef LANCELOT_HAVE_COMPOSITING
27
 
 
28
 
#include <QImage>
29
 
#include <QLabel>
30
 
#include <QMainWindow>
31
 
#include <QPaintDevice>
32
 
#include <QPixmap>
33
 
#include <QTextStream>
34
 
#include <QTimer>
35
 
 
36
 
#include <X11/extensions/Xrender.h>
37
 
 
38
 
/**
39
 
 About QtDisplay Class
40
 
 This is  simple class to initialize a
41
 
 X session and open the display. The class
42
 
 has two member functions to find out
43
 
 the visuals and the color map of the
44
 
 display
45
 
 **/
46
 
 
47
 
class QtDisplay {
48
 
public:
49
 
    explicit QtDisplay(char * display = 0, int screen = 0);
50
 
    virtual ~QtDisplay();
51
 
    virtual void testDisplay();
52
 
    void setupXRender();
53
 
 
54
 
    Qt::HANDLE visual() {return Qt::HANDLE(_visualPtr); }
55
 
    Qt::HANDLE colormap() {return Qt::HANDLE(_colormap); }
56
 
    Display * display() {return _dpyPtr; }
57
 
 
58
 
private:
59
 
    int _alpha;
60
 
    int _screen;
61
 
    char * _displayPtr;
62
 
    Colormap _colormap;
63
 
    Visual * _visualPtr;
64
 
    Display * _dpyPtr;
65
 
 
66
 
};
67
 
 
68
 
#endif // LANCELOT_HAVE_COMPOSITING
69
 
 
70
 
#endif // QT_DISPLAY
71