2007-06-18 18:18:35 +04:00
|
|
|
/*
|
|
|
|
* $Id$
|
|
|
|
*
|
2008-10-02 13:42:19 +04:00
|
|
|
* ede-desktop, desktop and icon manager
|
2007-06-18 18:18:35 +04:00
|
|
|
* Part of Equinox Desktop Environment (EDE).
|
2009-03-26 20:05:44 +03:00
|
|
|
* Copyright (c) 2006-2009 EDE Authors.
|
2007-06-18 18:18:35 +04:00
|
|
|
*
|
|
|
|
* This program is licensed under terms of the
|
|
|
|
* GNU General Public License version 2 or newer.
|
|
|
|
* See COPYING for details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WALLPAPER_H__
|
|
|
|
#define __WALLPAPER_H__
|
|
|
|
|
2007-06-20 14:58:07 +04:00
|
|
|
#include <X11/Xlib.h> // XImage, Pixmap
|
2008-10-02 13:42:19 +04:00
|
|
|
#include <FL/Fl_Box.H>
|
2007-06-20 14:58:07 +04:00
|
|
|
|
2009-03-26 20:05:44 +03:00
|
|
|
enum WallpaperState {
|
|
|
|
WALLPAPER_CENTER,
|
|
|
|
WALLPAPER_STRETCH,
|
|
|
|
WALLPAPER_TILE
|
|
|
|
};
|
|
|
|
|
2009-05-19 15:10:23 +04:00
|
|
|
class Fl_Image;
|
|
|
|
|
2007-06-18 18:18:35 +04:00
|
|
|
class Wallpaper : public Fl_Box {
|
2009-02-26 14:15:27 +03:00
|
|
|
private:
|
2009-03-26 20:05:44 +03:00
|
|
|
Pixmap rootpmap_pixmap;
|
|
|
|
WallpaperState state;
|
2009-05-19 15:10:23 +04:00
|
|
|
Fl_Image* stretched_alloc; /* FLTK issue */
|
2007-06-18 18:18:35 +04:00
|
|
|
|
2009-03-26 20:05:44 +03:00
|
|
|
void set_rootpmap(void);
|
2009-02-26 14:15:27 +03:00
|
|
|
public:
|
2009-05-19 15:10:23 +04:00
|
|
|
Wallpaper(int X, int Y, int W, int H) : Fl_Box(X, Y, W, H),
|
|
|
|
rootpmap_pixmap(0), state(WALLPAPER_CENTER), stretched_alloc(NULL) { }
|
|
|
|
|
2009-02-26 14:15:27 +03:00
|
|
|
~Wallpaper();
|
2007-06-18 18:18:35 +04:00
|
|
|
|
2009-03-26 20:05:44 +03:00
|
|
|
bool load(const char* path, WallpaperState s);
|
|
|
|
|
2009-02-26 14:15:27 +03:00
|
|
|
virtual void draw(void);
|
|
|
|
virtual int handle(int event);
|
2007-06-18 18:18:35 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|