~ubuntu-branches/ubuntu/karmic/wmcpuload/karmic

« back to all changes in this revision

Viewing changes to src/dockapp.h

  • Committer: Bazaar Package Importer
  • Author(s): Christian Aichinger
  • Date: 2005-02-13 18:42:41 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050213184241-yk2o743d8rkp23t9
Tags: 1.0.1-2
* New Maintainer
* Added proper Linux 2.6 support, thanks to Peter Colberg for the patch.
  (Closes: #238684)
* debian/control: Standards-Version to 3.6.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (c) 1999 Alfredo K. Kojima
3
 
 * Copyright (c) 2001, 2002 Seiichi SATO <ssato@sh.rim.or.jp>
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 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:
11
 
 *
12
 
 * The above copyright notice and this permission notice shall be included in
13
 
 * all copies or substantial portions of the Software.
14
 
 *
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.
21
 
 
22
 
 * This code is based on libdockapp-0.4.0
23
 
 * modified by Seiichi SATO <ssato@sh.rim.or.jp>
24
 
 */
25
 
 
26
 
#ifdef HAVE_CONFIG_H
27
 
#include "config.h"
28
 
#endif
29
 
 
30
 
#include <X11/Xlib.h>
31
 
#include <X11/xpm.h>
32
 
#include <X11/extensions/shape.h>
33
 
 
34
 
#include <stdio.h>
35
 
 
36
 
#if STDC_HEADERS
37
 
# include <stdlib.h>
38
 
# include <stddef.h>
39
 
#else
40
 
# if HAVE_STDLIB_H
41
 
#  include <stdlib.h>
42
 
# endif
43
 
#endif
44
 
 
45
 
#if HAVE_STRING_H
46
 
# if !STDC_HEADERS && HAVE_MEMORY_H
47
 
#  include <memory.h>
48
 
# endif
49
 
# include <string.h>
50
 
#endif
51
 
#if HAVE_STRINGS_H
52
 
# include <strings.h>
53
 
#endif
54
 
 
55
 
#if HAVE_SELECT
56
 
# include <sys/select.h>
57
 
#endif
58
 
 
59
 
#if TIME_WITH_SYS_TIME
60
 
# include <sys/time.h>
61
 
# include <time.h>
62
 
#else
63
 
# if HAVE_SYS_TIME_H
64
 
#  include <sys/time.h>
65
 
# else
66
 
#  include <time.h>
67
 
# endif
68
 
#endif
69
 
 
70
 
#if HAVE_UNISTD_H
71
 
# include <unistd.h>
72
 
#else
73
 
/* We are in trouble. */
74
 
#endif
75
 
 
76
 
extern Display *display;
77
 
extern Bool dockapp_iswindowed;
78
 
extern Bool dockapp_isbrokenwm;
79
 
 
80
 
 
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);