1/*
2 * Author:      William Chia-Wei Cheng (bill.cheng@acm.org)
3 *
4 * Copyright (C) 2001-2009, William Chia-Wei Cheng.
5 *
6 * This file may be distributed under the terms of the Q Public License
7 * as defined by Trolltech AS of Norway and appearing in the file
8 * LICENSE.QPL included in the packaging of this file.
9 *
10 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING
11 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12 * PURPOSE.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
13 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
14 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
15 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
16 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
18 * @(#)$Header: /mm2/home/cvs/bc-src/tgif/tdgtmsg.e,v 1.6 2011/05/16 16:22:00 william Exp $
19 */
20
21#ifndef _TDGTMSG_E_
22#define _TDGTMSG_E_
23
24#include "tidget.h"
25
26#define TDGTMSG_DEF_H_PAD 4
27#define TDGTMSG_DEF_V_PAD 2
28
29/*
30 * A message tidget displays a string.
31 */
32typedef struct tagTdgtMsg {
33   TidgetInfo *pti;
34
35   int just; /* JUST_L, JUST_C, or JUST_R */
36} TdgtMsg;
37
38#ifdef _INCLUDE_FROM_TDGTMSG_C_
39#undef extern
40#define extern
41#endif /*_INCLUDE_FROM_TDGTMSG_C_*/
42
43extern void	TdgtMsgReset ARGS_DECL((TdgtMsg*));
44extern TdgtMsg	*CreateTdgtMsg ARGS_DECL((Window parent_win,
45				TidgetInfo *parent_tidgetinfo, int ctl_id,
46				int x, int y, int h_pad, int v_pad, int state,
47				char *caption, int just));
48
49extern int	TdgtMsgSetText ARGS_DECL((TdgtMsg*, char *str));
50extern char	*TdgtMsgGetText ARGS_DECL((TdgtMsg*));
51extern int	TdgtMsgSetState ARGS_DECL((TdgtMsg*, int));
52extern int	TdgtMsgGetState ARGS_DECL((TdgtMsg*));
53
54extern int	InitTdgtMsg ARGS_DECL((void));
55extern void	CleanUpTdgtMsg ARGS_DECL((void));
56
57#ifdef _INCLUDE_FROM_TDGTMSG_C_
58#undef extern
59#ifndef _NO_RECURSIVE_EXTERN
60#define extern extern
61#endif /* ~_NO_RECURSIVE_EXTERN */
62#endif /*_INCLUDE_FROM_TDGTMSG_C_*/
63
64#endif /*_TDGTMSG_E_*/
65