1
/* $Id: dockapp.h,v 1.1.1.1 2002/10/14 09:31:17 sch Exp $ */
4
* Copyright (c) 1999 Alfredo K. Kojima
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to deal
8
* in the Software without restriction, including without limitation the rights
9
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
* copies of the Software, and to permit persons to whom the Software is
11
* furnished to do so, subject to the following conditions:
13
* The above copyright notice and this permission notice shall be included in
14
* all copies or substantial portions of the Software.
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
* AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
* This code is based on libdockapp-0.4.0
24
* modified by Seiichi SATO <ssato@sh.rim.or.jp>
37
#include <X11/extensions/shape.h>
51
# if !STDC_HEADERS && HAVE_MEMORY_H
61
# include <sys/select.h>
64
#if TIME_WITH_SYS_TIME
65
# include <sys/time.h>
69
# include <sys/time.h>
78
/* We are in trouble. */
81
typedef enum _dockapp_status {
82
DOCKABLE_ICON, /* normal dockapp mode */
83
WINDOWED, /* windowed mode */
84
WINDOWED_WITH_PANEL /* windowed mode with background panel */
87
extern Display *display;
88
extern Bool dockapp_isbrokenwm;
89
extern dockapp_status dockapp_stat;
91
void dockapp_open_window(char *display_specified, char *appname,
92
unsigned w, unsigned h, int argc, char **argv);
93
void dockapp_set_eventmask(long mask);
94
void dockapp_set_background(Pixmap pixmap);
95
void dockapp_show(void);
96
Bool dockapp_xpm2pixmap(char **data, Pixmap * pixmap, Pixmap * mask,
97
XpmColorSymbol * colorSymbol,
98
unsigned int nsymbols);
99
Pixmap dockapp_XCreatePixmap(int w, int h);
100
void dockapp_setshape(Pixmap mask, int x_ofs, int y_ofs);
101
void dockapp_copyarea(Pixmap src, Pixmap dist, int x_src, int y_src,
102
int w, int h, int x_dist, int y_dist);
103
void dockapp_copy2window(Pixmap src);
104
Bool dockapp_nextevent_or_timeout(XEvent * event, unsigned long miliseconds);
107
unsigned long dockapp_getcolor_pixel(char *color_name);
109
unsigned long dockapp_blendedcolor(char *color_name,