summaryrefslogtreecommitdiffstats
path: root/client/myrootpixmap.h
blob: 62695375cc96c94f59b36e7fb8e1025937288fe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/* vi: ts=8 sts=4 sw=4
 *
 * $Id: krootpixmap.h,v 1.15 2003/05/19 08:02:48 coolo Exp $
 * This file is part of the KDE project, module kdesktop.
 * Copyright (C) 1999,2000 Geert Jansen <[email protected]>
 *
 * You can Freely distribute this program under the GNU Library General
 * Public License. See the file "COPYING.LIB" for the exact licensing terms.
 */

/* Modified by Sascha Hlusiak */
/* Further modified 11/18/2014 by Timothy Pearson <[email protected]> */

#ifndef __KRootPixmap_h_Included__
#define __KRootPixmap_h_Included__

#include <tqobject.h>
#include <tqwidget.h>
#include <tqcolor.h>

#ifndef TQ_WS_TQWS //FIXME

class TQRect;
class TQTimer;
class TDESharedPixmap;
class KMyRootPixmapData;

class DesktopWallpaperWatcher : public TQWidget
{
	Q_OBJECT

	public:
		DesktopWallpaperWatcher();
		~DesktopWallpaperWatcher();

		bool x11Event( XEvent * ev );

	signals:
		void currentDesktopChanged( int desktop);

	private:
		int m_old_current_desktop;
};

class KMyRootPixmap: public TQObject
{
    Q_OBJECT

public:
    KMyRootPixmap( TQWidget *target=NULL, const char *name=0 );

    KMyRootPixmap( TQWidget *target, TQObject *parent, const char *name=0 );

    virtual ~KMyRootPixmap();

    bool isAvailable();

    bool isActive() const { return m_bActive; }

    int currentDesktop() const;

//    bool customPainting() const { return m_bCustomPaint; }

#ifndef KDE_NO_COMPAT

    bool checkAvailable(bool) { return isAvailable(); }
#endif

public slots:
    virtual void start();

    virtual void stop();

//    void setFadeEffect(double strength, const TQColor &color);

    void repaint( bool force );

    void repaint();

//    void setCustomPainting( bool enable ) { m_bCustomPaint = enable; }

    void enableExports();

    static TQString pixmapName(int desk);
    
signals:
    void backgroundUpdated( const TQImage *pm );

protected:
//    virtual bool eventFilter(TQObject *, TQEvent *);

    virtual void updateBackground( TDESharedPixmap * );

private slots:
//    void slotBackgroundChanged(int);
    void slotDone(bool);
    void desktopChanged(int desktop);

private:
    bool m_bActive, m_bInit/*, m_bCustomPaint*/;
    int m_Desk;

//    double m_Fade;
//    TQColor m_FadeColor;

    TQRect m_Rect;
//    TQWidget *m_pWidget;
//    TQTimer *m_pTimer;
    TDESharedPixmap *m_pPixmap;
    KMyRootPixmapData *d;

    void init();
};

#endif // ! TQ_WS_TQWS
#endif // __KRootPixmap_h_Included__