util.h revision 329eaa64
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 52/*********************************************************************** 53 * 54 * utility routines header file 55 * 56 * 28-Oct-87 Thomas E. LaStrange File created 57 * 58 ***********************************************************************/ 59 60#ifndef _UTIL_ 61#define _UTIL_ 62 63#include "twm.h" 64 65extern void MoveOutline(Window root, int x, int y, int width, int height, 66 int bw, int th); 67extern void Zoom(Window wf, Window wt); 68extern char *ExpandFilename(const char *name); 69extern void GetUnknownIcon(const char *name); 70extern Pixmap FindBitmap(const char *name, unsigned int *widthp, 71 unsigned int *heightp); 72extern Pixmap GetBitmap(const char *name); 73extern void InsertRGBColormap(Atom a, XStandardColormap *maps, int nmaps, 74 Bool replace); 75extern void RemoveRGBColormap(Atom a); 76extern void LocateStandardColormaps(void); 77extern void GetColor(int kind, Pixel *what, const char *name); 78extern void GetColorValue(int kind, XColor *what, const char *name); 79extern void GetFont(MyFont *font); 80extern int MyFont_TextWidth(MyFont *font, const char *string, int len); 81extern void MyFont_DrawImageString(Display *dpy, Drawable d, MyFont *font, 82 GC gc, int x, int y, const char *string, 83 int len); 84extern void MyFont_DrawString(Display *dpy, Drawable d, MyFont *font, GC gc, 85 int x, int y, const char *string, int len); 86extern void MyFont_ChangeGC(unsigned long fix_fore, unsigned long fix_back, 87 MyFont *fix_font); 88extern Status I18N_FetchName(Display *dpy, Window win, char **winname); 89extern Status I18N_GetIconName(Display *dpy, Window win, char **iconname); 90extern void SetFocus(TwmWindow *tmp_win, Time time); 91extern void Bell(int type, int percent, Window win); 92 93extern int HotX, HotY; 94 95#define WM_BELL 0 96#define MINOR_ERROR_BELL 1 97#define MAJOR_ERROR_BELL 2 98#define INFO_BELL 3 99#define NUM_BELLS 4 100 101#define QUIET_BELL -100 102#define MODERATE_BELL 0 103#define LOUD_BELL 100 104 105#ifdef XKB 106#include <X11/extensions/XKBbells.h> 107#else 108#define XkbBI_Info 0 109#define XkbBI_MinorError 1 110#define XkbBI_MajorError 2 111#endif 112 113#endif /* _UTIL_ */ 114