chiark / gitweb /
Imported Upstream version 1.0.0
[e16] / src / backgrounds.h
1 /*
2  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3  * Copyright (C) 2004-2007 Kim Woelders
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to
7  * deal in the Software without restriction, including without limitation the
8  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9  * sell copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies of the Software, its documentation and marketing & publicity
14  * materials, and acknowledgment shall be given in the documentation, materials
15  * and software packages that this Software was used.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _BACKGROUNDS_H_
25 #define _BACKGROUNDS_H_
26
27 /* backgrounds.c */
28 Background         *BackgroundFind(const char *name);
29
30 char               *BackgroundGetUniqueString(const Background * bg);
31 void                BackgroundPixmapSet(Background * bg, Pixmap pmap);
32 void                BackgroundDestroyByName(const char *name);
33 void                BackgroundRealize(Background * bg, Win win, Drawable draw,
34                                       unsigned int rw, unsigned int rh,
35                                       int is_win, Pixmap * ppmap,
36                                       unsigned long *ppixel);
37 void                BackgroundApplyPmap(Background * bg, Win win, Drawable draw,
38                                         unsigned int rw, unsigned int rh);
39 void                BackgroundSet(Background * bg, Win win, unsigned int rw,
40                                   unsigned int rh);
41 void                BackgroundIncRefcount(Background * bg);
42 void                BackgroundDecRefcount(Background * bg);
43
44 void                BackgroundTouch(Background * bg);
45 const char         *BackgroundGetName(const Background * bg);
46 Pixmap              BackgroundGetPixmap(const Background * bg);
47 unsigned int        BackgroundGetSeqNo(const Background * bg);
48 int                 BackgroundIsNone(const Background * bg);
49 Background         *BrackgroundCreateFromImage(const char *bgid,
50                                                const char *file, char *thumb,
51                                                int thlen);
52
53 void                BackgroundSetForDesk(Background * bg, unsigned int desk);
54 Background         *BackgroundGetForDesk(unsigned int desk);
55
56 void                BackgroundsInvalidate(int refresh);
57 int                 BackgroundsConfigLoad(FILE * fs);
58
59 void                ScanBackgroundMenu(void);
60
61 #endif /* _BACKGROUNDS_H_ */