util.h revision 3e747e6d
1/*****************************************************************************/
2/*
3
4Copyright 1989, 1998  The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26*/
27/**       Copyright 1988 by Evans & Sutherland Computer Corporation,        **/
28/**                          Salt Lake City, Utah                           **/
29/**                        Cambridge, Massachusetts                         **/
30/**                                                                         **/
31/**                           All Rights Reserved                           **/
32/**                                                                         **/
33/**    Permission to use, copy, modify, and distribute this software and    **/
34/**    its documentation  for  any  purpose  and  without  fee is hereby    **/
35/**    granted, provided that the above copyright notice appear  in  all    **/
36/**    copies and that both  that  copyright  notice  and  this  permis-    **/
37/**    sion  notice appear in supporting  documentation,  and  that  the    **/
38/**    name of Evans & Sutherland not be used in advertising    **/
39/**    in publicity pertaining to distribution of the  software  without    **/
40/**    specific, written prior permission.                                  **/
41/**                                                                         **/
42/**    EVANS & SUTHERLAND DISCLAIMs ALL WARRANTIES WITH REGARD    **/
43/**    TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES  OF  MERCHANT-    **/
44/**    ABILITY  AND  FITNESS,  IN  NO  EVENT SHALL EVANS & SUTHERLAND    **/
45/**    BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL  DAM-    **/
46/**    AGES OR  ANY DAMAGES WHATSOEVER  RESULTING FROM LOSS OF USE, DATA    **/
47/**    OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER    **/
48/**    TORTIOUS ACTION, ARISING OUT OF OR IN  CONNECTION  WITH  THE  USE    **/
49/**    OR PERFORMANCE OF THIS SOFTWARE.                                     **/
50/*****************************************************************************/
51/* $XFree86: xc/programs/twm/util.h,v 1.6 2001/01/17 23:45:08 dawes Exp $ */
52
53
54/***********************************************************************
55 *
56 * $Xorg: util.h,v 1.4 2001/02/09 02:05:37 xorgcvs Exp $
57 *
58 * utility routines header file
59 *
60 * 28-Oct-87 Thomas E. LaStrange		File created
61 *
62 ***********************************************************************/
63
64#ifndef _UTIL_
65#define _UTIL_
66
67extern void MoveOutline ( Window root, int x, int y, int width, int height,
68			  int bw, int th );
69extern void Zoom ( Window wf, Window wt );
70extern char * ExpandFilename ( char *name );
71extern void GetUnknownIcon ( char *name );
72extern Pixmap FindBitmap ( char *name, unsigned int *widthp,
73			   unsigned int *heightp );
74extern Pixmap GetBitmap ( char *name );
75extern void InsertRGBColormap ( Atom a, XStandardColormap *maps, int nmaps,
76			       Bool replace );
77extern void RemoveRGBColormap ( Atom a );
78extern void LocateStandardColormaps ( void );
79extern void GetColor ( int kind, Pixel *what, char *name );
80extern void GetColorValue ( int kind, XColor *what, char *name );
81extern void GetFont ( MyFont *font );
82extern int MyFont_TextWidth( MyFont *font, char *string, int len);
83extern void MyFont_DrawImageString( Display *dpy, Drawable d, MyFont *font,
84				    GC gc, int x, int y, char * string,
85				    int len);
86extern void MyFont_DrawString( Display *dpy, Drawable d, MyFont *font,
87			       GC gc, int x, int y, char * string, int len);
88extern void MyFont_ChangeGC( unsigned long fix_fore, unsigned long fix_back,
89			     MyFont *fix_font);
90extern Status I18N_FetchName( Display *dpy, Window win, char **winname);
91extern Status I18N_GetIconName( Display *dpy, Window win, char **iconname);
92extern void SetFocus ( TwmWindow *tmp_win, Time time );
93extern void Bell ( int type, int percent, Window win );
94
95extern int HotX, HotY;
96
97#define	WM_BELL			0
98#define	MINOR_ERROR_BELL	1
99#define	MAJOR_ERROR_BELL	2
100#define	INFO_BELL		3
101#define	NUM_BELLS		4
102
103#define	QUIET_BELL		-100
104#define	MODERATE_BELL		0
105#define	LOUD_BELL		100
106
107#ifdef XKB
108#include <X11/extensions/XKBbells.h>
109#else
110#define	XkbBI_Info			0
111#define	XkbBI_MinorError		1
112#define	XkbBI_MajorError		2
113#endif
114
115#endif /* _UTIL_ */
116