1 /*
2  * Copyright (c) 1999 by The XFree86 Project, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
19  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20  * SOFTWARE.
21  *
22  * Except as contained in this notice, the name of the XFree86 Project shall
23  * not be used in advertising or otherwise to promote the sale, use or other
24  * dealings in this Software without prior written authorization from the
25  * XFree86 Project.
26  *
27  * Author: Paulo C�sar Pereira de Andrade
28  */
29 
30 /* $XFree86: xc/lib/Xaw/Tip.h,v 1.1 1999/06/27 14:07:35 dawes Exp $ */
31 
32 #ifndef _XawTip_h
33 #define _XawTip_h
34 
35 /*
36  * Tip Widget
37  */
38 
39 #include "Xaw3dP.h"
40 #include <X11/Xaw3d/Simple.h>
41 
42 /* Resources:
43 
44   Name		    Class		RepType		Default Value
45   ----		    -----		-------		-------------
46   background	    Background		Pixel		XtDefaultBackground
47   backgroundPixmap  BackgroundPixmap	Pixmap		XtUnspecifiedPixmap
48   border	    BorderColor		Pixel		XtDefaultForeground
49   borderWidth	    BorderWidth		Dimension	1
50   destroyCallback   Callback		XtCallbackList	NULL
51   font		    Font		XFontStruct*	XtDefaultFont
52   foreground	    Foreground		Pixel		XtDefaultForeground
53   height	    Height		Dimension	text height
54   internalHeight    Height		Dimension	2
55   internalWidth     Width		Dimension	2
56   label		    Label		String		NULL
57   timeout	    Timeout		Int		500
58   width		    Width		Dimension	text width
59   x		    Position		Position	0
60   y		    Position		Position	0
61 
62 */
63 
64 typedef struct _TipClassRec *TipWidgetClass;
65 typedef struct _TipRec *TipWidget;
66 
67 extern WidgetClass tipWidgetClass;
68 
69 #define XawTextEncoding8bit	0
70 #define XawTextEncodingChar2b	1
71 
72 #define XtNencoding "encoding"
73 #define XtNtimeout "timeout"
74 #define XtNtip "tip"
75 
76 #ifdef XAW_INTERNATIONALIZATION
77 #ifndef XtNfontSet
78 #define XtNfontSet "fontSet"
79 #endif
80 #ifndef XtCFontSet
81 #define XtCFontSet "FontSet"
82 #endif
83 #endif
84 
85 #define XtCEncoding "Encoding"
86 #define XtCTimeout "Timeout"
87 #define XtCTip "Tip"
88 
89 #ifndef _XtStringDefs_h_
90 #define XtNforeground "foreground"
91 #define XtNlabel "label"
92 #define XtNfont "font"
93 #define XtNinternalWidth "internalWidth"
94 #define XtNinternalHeight "internalHeight"
95 #endif
96 
97 /*
98  * Public Functions
99  */
100 
101 /*
102  * Function:
103  *	XawTipEnable
104  *
105  * Parameters:
106  *	Widget - widget for tooltip
107  *	String - tooltip label
108  *
109  * Description:
110  *	Enables the tip event handler for this widget.
111  */
112 void XawTipEnable(
113 #if NeedFunctionPrototypes
114  Widget,
115  String
116 #endif
117 );
118 
119 /*
120  * Function:
121  *	XawTipDisable
122  *
123  * Parameters:
124  *	Widget - widget for tooltip
125  *
126  * Description:
127  *	Disables the tip event handler for this widget.
128  */
129 void XawTipDisable(
130 #if NeedFunctionPrototypes
131  Widget
132 #endif
133 );
134 
135 #endif /* _XawTip_h */
136