dtcm: Resolve CID 87562
[oweals/cde.git] / cde / programs / dtcm / dtcm / blist.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /*******************************************************************************
24 **
25 **  blist.h
26 **
27 **  static char sccsid[] = "@(#)blist.h 1.19 94/11/07 Copyr 1991 Sun Microsystems, Inc."; 
28 **
29 **  $XConsortium: blist.h /main/3 1995/11/03 10:18:18 rswiston $
30 **
31 **  RESTRICTED CONFIDENTIAL INFORMATION:
32 **
33 **  The information in this document is subject to special
34 **  restrictions in a confidential disclosure agreement between
35 **  HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
36 **  document outside HP, IBM, Sun, USL, SCO, or Univel without
37 **  Sun's specific written approval.  This document and all copies
38 **  and derivative works thereof must be returned or destroyed at
39 **  Sun's request.
40 **
41 **  Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
42 **
43 *******************************************************************************/
44
45 /*                                                                      *
46  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
47  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
48  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
49  * (c) Copyright 1993, 1994 Novell, Inc.                                *
50  */
51
52 #ifndef _BLIST_H
53 #define _BLIST_H
54
55 #include "ansi_c.h"
56 #include "util.h"
57
58 /*
59  * The list of names we can typically browse is used in three spots - the
60  * browse list editor, the multi browser (compare calendars), and the main
61  * window to build the browse menu.
62  *
63  * The list of names actually is a list of the BlistData structures.  The
64  * multi browser uses the cal_handle item and therefore, we can't delete the
65  * entry from this list until the multi browser is no longer using that pointer.
66  */
67 typedef enum {
68         BLIST_INSERT, BLIST_DELETE, BLIST_ACTIVE
69 } BlistTag;
70
71 typedef struct {
72         char                    *name;
73         BlistTag                tag;
74         CSA_session_handle      cal_handle;
75         unsigned int            user_access;
76         int                     version;
77         Paint_cache             *cache;
78         int                     cache_size;
79 } BlistData;
80
81 typedef struct {
82         Widget          button_rc_mgr;
83         Widget          edit_rc_mgr;
84         Widget          frame;
85         Widget          form;
86         Widget          username;
87         Widget          username_label;
88         Widget          add_button;
89         Widget          list_label;
90         Widget          browse_list;
91         Widget          browse_list_sw;
92         Widget          remove_button;
93         Widget          ok_button;
94         Widget          apply_button;
95         Widget          reset_button;
96         Widget          cancel_button;
97         Widget          help_button;
98         Widget          message;
99         CmDataList      *blist_data;
100         Boolean         bl_pending_message_up;
101         Boolean         bl_list_changed;
102 } Browselist;
103
104 typedef struct browser_state {
105         char                    *cname;
106         Pixmap                  *glyph;
107         struct browser_state    *next;
108 } BrowserState;
109
110 extern void     blist_clean             P((Browselist*, Boolean));
111 extern void     blist_init_names        P((Calendar*));
112 extern void     blist_init_ui           P((Calendar*));
113 extern void     blist_reset             P((Calendar*));
114 extern void     make_browselist         P((Calendar*));
115 extern void     show_browselist         P((Calendar*));
116
117 #endif