dtcm: Resolve CID 87408
[oweals/cde.git] / cde / programs / dtcm / dtcm / todo.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 **  todo.h
26 **
27 **  static char sccsid[] = "@(#)todo.h 1.24 94/11/07 Copyr 1991 Sun Microsystems, Inc.";
28 **
29 **  $XConsortium: todo.h /main/4 1996/05/23 11:17:27 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 _TODO_H
53 #define _TODO_H
54
55 #include <csa.h>
56 #include "ansi_c.h"
57 #include "calendar.h"
58 #include "misc.h"
59 #include "dssw.h"
60 #include "rfp.h"
61 #include "reminders.h"
62
63 /*******************************************************************************
64 **
65 **  ToDo structures
66 **
67 *******************************************************************************/
68 struct TodoView {
69         Widget          view_item_number;
70         Widget          view_item_toggle;
71         Boolean         modified;
72         CSA_entry_handle        appt;
73         struct TodoView *next;
74 };
75 typedef struct TodoView TodoView;
76
77 typedef enum { VIEW_ALL, VIEW_PENDING, VIEW_COMPLETED } todo_view_op;
78         
79 typedef struct {
80         Widget                  base_form_mgr;
81         Calendar                *cal;
82         Widget                  change_button;
83         Widget                  clear_button;
84         Widget                  close_button;
85         Widget                  completed_toggle;
86         Boolean                 completed_val;
87         Widget                  delete_button;
88         DSSW                    dssw;
89         Widget                  expand_ui_button;
90         Widget                  frame;
91         Widget                  help_button;
92         Widget                  insert_button;
93         Widget                  list_label;
94         Widget                  message_text;
95         Reminders               reminders;
96         RFP                     rfp;
97         int                     rfpFlags;
98         Widget                  separator1;
99         Widget                  separator2;
100         CSA_entry_handle        *todo_head;
101         int                     todo_count;
102         Widget                  todo_list;
103         Widget                  todo_list_sw;
104         Boolean                 todo_is_up;
105         Glance                  view_list_glance;
106         Tick                    view_list_date;
107         Boolean                 todo_view_is_up;
108         todo_view_op            view_filter;
109         Widget                  view_form_mgr;
110         Widget                  view_form;
111         Widget                  view_frame;
112         Widget                  view_filter_menu;
113         Widget                  view_list_label;
114         TodoView                *view_list;
115         Widget                  view_sw_mgr;
116         Boolean                 view_list_modified;
117         Widget                  view_apply_button;
118         Widget                  view_ok_button;
119         Widget                  view_cancel_button;
120         Widget                  view_help_button;
121         Widget                  drag_icon;
122         Widget                  drag_source;
123         int                     initialX;
124         int                     initialY;
125         Boolean                 doing_drag;
126 } ToDo;
127
128 /*******************************************************************************
129 **
130 **  ToDo external function declarations
131 **
132 *******************************************************************************/
133 extern void     add_to_todo_list        P((CSA_entry_handle, ToDo*));
134 extern void     add_all_todo            P((ToDo*));
135 extern void     build_todo_list         P((ToDo*, Tick, Glance, CSA_entry_handle**,
136                                            CSA_uint32*, todo_view_op));
137 extern int      build_todo_view         P((ToDo*, Glance, Boolean));
138 extern void     get_todo_vals           P((ToDo*));
139 extern void     todo_hide               P((ToDo*));
140 extern void     set_todo_defaults       P((ToDo*));
141 extern void     set_todo_title          P((ToDo*, char*));
142 extern void     set_todo_vals           P((ToDo*));
143 extern void     show_todo               P((Calendar*));
144 extern void     t_make_todo             P((Calendar*));
145 extern void     show_todo_view          P((Calendar*, todo_view_op));
146 extern void     todo_clean_up           P((ToDo*));
147 extern Boolean  todo_showing            P((ToDo*));
148 extern Boolean  todo_view_showing       P((ToDo*));
149 extern CSA_entry_handle t_nth_appt      P((ToDo*, int));
150 extern Boolean  todo_insert           P((Dtcm_appointment*, CSA_entry_handle*,
151                                         Calendar*));
152
153 #endif