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

« back to all changes in this revision

Viewing changes to libdockapp/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
/* $Id: dockapp.h,v 1.1.1.1 2002/10/14 09:31:17 sch Exp $ */
 
2
 
 
3
/*
 
4
 * Copyright (c) 1999 Alfredo K. Kojima
 
5
 *
 
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:
 
12
 *
 
13
 * The above copyright notice and this permission notice shall be included in
 
14
 * all copies or substantial portions of the Software.
 
15
 *
 
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.
 
22
 
 
23
 * This code is based on libdockapp-0.4.0
 
24
 * modified by Seiichi SATO <ssato@sh.rim.or.jp>
 
25
 */
 
26
 
 
27
#ifndef __DOCKAPP_H
 
28
#define __DOCKAPP_H
 
29
 
 
30
 
 
31
#ifdef HAVE_CONFIG_H
 
32
#include "config.h"
 
33
#endif
 
34
 
 
35
#include <X11/Xlib.h>
 
36
#include <X11/xpm.h>
 
37
#include <X11/extensions/shape.h>
 
38
 
 
39
#include <stdio.h>
 
40
 
 
41
#if STDC_HEADERS
 
42
# include <stdlib.h>
 
43
# include <stddef.h>
 
44
#else
 
45
# if HAVE_STDLIB_H
 
46
#  include <stdlib.h>
 
47
# endif
 
48
#endif
 
49
 
 
50
#if HAVE_STRING_H
 
51
# if !STDC_HEADERS && HAVE_MEMORY_H
 
52
#  include <memory.h>
 
53
# endif
 
54
# include <string.h>
 
55
#endif
 
56
#if HAVE_STRINGS_H
 
57
# include <strings.h>
 
58
#endif
 
59
 
 
60
#if HAVE_SELECT
 
61
# include <sys/select.h>
 
62
#endif
 
63
 
 
64
#if TIME_WITH_SYS_TIME
 
65
# include <sys/time.h>
 
66
# include <time.h>
 
67
#else
 
68
# if HAVE_SYS_TIME_H
 
69
#  include <sys/time.h>
 
70
# else
 
71
#  include <time.h>
 
72
# endif
 
73
#endif
 
74
 
 
75
#if HAVE_UNISTD_H
 
76
# include <unistd.h>
 
77
#else
 
78
/* We are in trouble. */
 
79
#endif
 
80
 
 
81
typedef enum _dockapp_status {
 
82
    DOCKABLE_ICON,          /* normal dockapp mode                  */
 
83
    WINDOWED,               /* windowed mode                        */
 
84
    WINDOWED_WITH_PANEL     /* windowed mode with background panel  */
 
85
} dockapp_status;
 
86
 
 
87
extern Display          *display;
 
88
extern Bool             dockapp_isbrokenwm;
 
89
extern dockapp_status   dockapp_stat;
 
90
 
 
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);
 
105
 
 
106
 
 
107
unsigned long dockapp_getcolor_pixel(char *color_name);
 
108
 
 
109
unsigned long dockapp_blendedcolor(char *color_name,
 
110
                                   int r,
 
111
                                   int g,
 
112
                                   int b,
 
113
                                   float fac
 
114
                                   );
 
115
 
 
116
 
 
117
#endif