1 /*----------------------------------------------------------------------------
2 --
3 --  Module:           xtmSchedMain
4 --
5 --  Project:          Xdiary
6 --  System:           xtm - X Desktop Calendar
7 --    Subsystem:      <>
8 --    Function block: <>
9 --
10 --  Description:
11 --    Interface file for xtmSchedMain.c.
12 --
13 --  Filename:         xtmSchedMain.h
14 --
15 --  Authors:          Roger Larsson, Ulrika Bornetun
16 --  Creation date:    1992-04-04
17 --
18 --
19 --  (C) Copyright Ulrika Bornetun, Roger Larsson (1995)
20 --      All rights reserved
21 --
22 --  Permission to use, copy, modify, and distribute this software and its
23 --  documentation for any purpose and without fee is hereby granted,
24 --  provided that the above copyright notice appear in all copies. Ulrika
25 --  Bornetun and Roger Larsson make no representations about the usability
26 --  of this software for any purpose. It is provided "as is" without express
27 --  or implied warranty.
28 ----------------------------------------------------------------------------*/
29 
30 /* SCCS module identifier. */
31 /* SCCSID = @(#) Module: xtmSchedMain.h, Version: 1.1, Date: 95/02/18 15:52:45 */
32 
33 
34 /* Only include this module once. */
35 #ifndef define_xtmSchedMain_h
36 #  define define_xtmSchedMain_h
37 
38 
39 /*----------------------------------------------------------------------------
40 --  Include files
41 ----------------------------------------------------------------------------*/
42 
43 #include "xtmGlobal.h"
44 #include "TimDate.h"
45 
46 
47 /*----------------------------------------------------------------------------
48 --  Macro definitions
49 ----------------------------------------------------------------------------*/
50 
51 /* Internal schedule flags. */
52 #define XTM_SM_USE_GRID        (1<<0)
53 #define XTM_SM_CONFIRM         (1<<1)
54 #define XTM_SM_LIST_LAYOUT     (1<<2)
55 #define XTM_SM_ALL_STANDING    (1<<3)
56 #define XTM_SM_AUTO_NAV_CAL    (1<<4)
57 #define XTM_SM_ENTRY_HANDLES   (1<<5)
58 #define XTM_SM_ENTRY_FLAGS     (1<<6)
59 #define XTM_SM_READ_ONLY       (1<<7)
60 #define XTM_SM_ONLY_ONE        (1<<8)
61 #define XTM_SM_TRUE_COLOR_INC  (1<<9)
62 
63 
64 /*----------------------------------------------------------------------------
65 --  Type declarations
66 ----------------------------------------------------------------------------*/
67 
68 /* Reasons when the action routine is called. */
69 typedef enum {
70   XTM_SM_REASON_DESTROY,
71   XTM_SM_REASON_EXIT
72 } XTM_SM_REASON;
73 
74 /* Parameter for initialization. */
75 typedef struct {
76   TIM_TIME_REF  entry_start;
77   TIM_TIME_REF  entry_stop;
78   int           entry_delta;
79   UINT32        default_flags;
80 } XTM_SM_INIT_REC, *XTM_SM_INIT_REF;
81 
82 /* Handle to use when comminucating with the schedule window. */
83 typedef  void  *XTM_SM_HANDLE;
84 
85 /* Callback when the calendar window is cahnged. */
86 typedef void ( *XTM_SM_ACTION_CB ) ( XTM_SM_REASON, void * );
87 
88 
89 /*----------------------------------------------------------------------------
90 --  Global definitions
91 ----------------------------------------------------------------------------*/
92 
93 
94 /*----------------------------------------------------------------------------
95 --  Function prototypes
96 ----------------------------------------------------------------------------*/
97 
98 void
99   xtmSmDestroy( XTM_SM_HANDLE  sched_handle );
100 
101 void
102   xtmSmEmptyCache();
103 
104 XTM_SM_HANDLE
105   xtmSmInitialize( XTM_GL_BASE_DATA_REF  appl_data_ref,
106                    Widget                toplevel,
107                    char                  *db_name,
108                    XTM_SM_INIT_REF       init_ref,
109                    XTM_SM_ACTION_CB      actionCB,
110                    void                  *user_data );
111 
112 void
113   xtmSmSetFlags( XTM_SM_HANDLE  sched_handle,
114                  UINT32         flags );
115 
116 Boolean
117   xtmSmViewLastUsed( TIM_TIME_REF   start_date );
118 
119 void
120   xtmSmViewSchedule( XTM_SM_HANDLE  sched_handle,
121                      TIM_TIME_REF   start_date,
122                      Boolean        iconic );
123 
124 #endif
125