1 /**
2  *
3  * $Id: CommandP.h,v 1.1 2004/08/28 19:23:24 dannybackx Exp $
4  *
5  * Copyright (C) 1995 Free Software Foundation, Inc.
6  * Copyright (C) 1995-2000 LessTif Development Team
7  *
8  * This file is part of the GNU LessTif Library.
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Library General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Library General Public License for more details.
19  *
20  * You should have received a copy of the GNU Library General Public
21  * License along with this library; if not, write to the Free
22  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  *
24  **/
25 
26 #ifndef _XM_COMMANDP_H
27 #define _XM_COMMANDP_H
28 
29 #include <Xm/Command.h>
30 #include <Xm/SelectioBP.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /* Define the command instance part */
37 typedef struct {
38     XtCallbackList callback;
39     XtCallbackList value_changed_callback;
40     int history_max_items;
41     Boolean error;
42 } XmCommandPart;
43 
44 /* Define the full instance record */
45 typedef struct _XmCommandRec {
46     CorePart core;
47     CompositePart composite;
48     ConstraintPart constraint;
49     XmManagerPart manager;
50     XmBulletinBoardPart bulletin_board;
51     XmSelectionBoxPart selection_box;
52     XmCommandPart command;
53 } XmCommandRec;
54 
55 /* Define class part structure */
56 typedef struct {
57     XtPointer extension;
58 } XmCommandClassPart;
59 
60 /* Define the full class record */
61 typedef struct _XmCommandClassRec {
62     CoreClassPart core_class;
63     CompositeClassPart composite_class;
64     ConstraintClassPart constraint_class;
65     XmManagerClassPart manager_class;
66     XmBulletinBoardClassPart bulletin_board_class;
67     XmSelectionBoxClassPart selection_box_class;
68     XmCommandClassPart command_class;
69 } XmCommandClassRec;
70 
71 XMLIBEXPORT extern XmCommandClassRec xmCommandClassRec;
72 
73 /*
74  * actions
75  */
76 void _XmCommandReturn(Widget wid, XEvent *event,
77 		      String *params, Cardinal *numParams);
78 void _XmCommandUpOrDown(Widget wid, XEvent *event,
79 			String *argv, Cardinal *argc);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* _XM_COMMANDP_H */
86