2
* Copyright (c) 1999 Alfredo K. Kojima
3
* Copyright (c) 2001, 2002 Seiichi SATO <ssato@sh.rim.or.jp>
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 deal
7
* in the Software without restriction, including without limitation the rights
8
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
* copies of the Software, and to permit persons to whom the Software is
10
* furnished to do so, subject to the following conditions:
12
* The above copyright notice and this permission notice shall be included in
13
* all copies or substantial portions of the Software.
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
* AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
* This code is based on libdockapp-0.4.0
23
* modified by Seiichi SATO <ssato@sh.rim.or.jp>
32
#include <X11/extensions/shape.h>
46
# if !STDC_HEADERS && HAVE_MEMORY_H
56
# include <sys/select.h>
59
#if TIME_WITH_SYS_TIME
60
# include <sys/time.h>
64
# include <sys/time.h>
73
/* We are in trouble. */
76
extern Display *display;
77
extern Bool dockapp_iswindowed;
78
extern Bool dockapp_isbrokenwm;
81
void dockapp_open_window(char *display_specified, char *appname,
82
unsigned w, unsigned h, int argc, char **argv);
83
void dockapp_set_eventmask(long mask);
84
void dockapp_set_background(Pixmap pixmap);
85
void dockapp_show(void);
86
Bool dockapp_xpm2pixmap(char **data, Pixmap * pixmap, Pixmap * mask,
87
XpmColorSymbol * colorSymbol,
88
unsigned int nsymbols);
89
Pixmap dockapp_XCreatePixmap(int w, int h);
90
void dockapp_setshape(Pixmap mask, int x_ofs, int y_ofs);
91
void dockapp_copyarea(Pixmap src, Pixmap dist, int x_src, int y_src,
92
int w, int h, int x_dist, int y_dist);
93
void dockapp_copy2window(Pixmap src);
94
Bool dockapp_nextevent_or_timeout(XEvent * event, unsigned long miliseconds);
95
unsigned long dockapp_getcolor(char *color);
96
unsigned long dockapp_blendedcolor(char *color, int r, int g, int b, float fac);