1 /*----------------------------------------------------------------------------
2 --
3 --  Module:           xtmEditPref
4 --
5 --  Project:          Xdiary
6 --  System:           xtm - X Desktop Calendar
7 --    Subsystem:      <>
8 --    Function block: <>
9 --
10 --  Description:
11 --    Interface file for xtmEditPref.c.
12 --
13 --  Filename:         xtmEditPref.h
14 --
15 --  Authors:          Roger Larsson, Ulrika Bornetun
16 --  Creation date:    1992-10-10
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: xtmEditPref.h, Version: 1.1, Date: 95/02/18 15:52:16 */
32 
33 
34 /* Only include this module once. */
35 #ifndef define_xtmEditPref_h
36 #  define define_xtmEditPref_h
37 
38 
39 /*----------------------------------------------------------------------------
40 --  Include files
41 ----------------------------------------------------------------------------*/
42 
43 #include "xtmGlobal.h"
44 
45 
46 /*----------------------------------------------------------------------------
47 --  Macro definitions
48 ----------------------------------------------------------------------------*/
49 
50 
51 /*----------------------------------------------------------------------------
52 --  Type declarations
53 ----------------------------------------------------------------------------*/
54 
55 /* Values passed to the preference window. */
56 typedef struct {
57   int                     alarm_lines;
58   int                     bg_color_index;
59   int                     day_list_lines;
60   int                     fg_color_index;
61   UINT32                  flags;
62   XTM_DB_ALL_ENTRY_TYPES  entry_type;
63 } XTM_EP_SET_PREF_DATA;
64 
65 /* Result values passed from the preference window. */
66 typedef struct {
67   int     alarm_lines;
68   int     bg_color_index;
69   int     day_list_lines;
70   int     fg_color_index;
71   UINT32  flags;
72 } XTM_EP_GET_PREF_DATA;
73 
74 
75 /* Reasons when the action routine is called. */
76 typedef enum {
77   XTM_EP_REASON_CANCEL,
78   XTM_EP_REASON_DESTROY,
79   XTM_EP_REASON_OK
80 } XTM_EP_REASON;
81 
82 /* Callback when the alarm window is destroyed. */
83 typedef void ( *XTM_EP_ACTION_CB ) ( XTM_EP_REASON,
84                                      void *, XTM_EP_GET_PREF_DATA * );
85 
86 /* Handle to use when comminucating with the window. */
87 typedef  void  *XTM_EP_HANDLE;
88 
89 
90 /*----------------------------------------------------------------------------
91 --  Global definitions
92 ----------------------------------------------------------------------------*/
93 
94 
95 /*----------------------------------------------------------------------------
96 --  Function prototypes
97 ----------------------------------------------------------------------------*/
98 
99 void
100   xtmEpDestroy( XTM_EP_HANDLE  pref_handle );
101 
102 void
103   xtmEpEditPreferences( XTM_EP_HANDLE         pref_handle,
104                         XTM_EP_SET_PREF_DATA  *values_ref );
105 
106 XTM_EP_HANDLE
107   xtmEpInitialize( XTM_GL_BASE_DATA_REF  appl_data_ref,
108                    Widget                parent,
109                    XTM_EP_ACTION_CB      actionCB,
110                    void                  *user_data );
111 
112 #endif
113 
114