1 /*---------------------------------------------------------------------------- 2 -- 3 -- Module: xtmEditAlarm 4 -- 5 -- Project: Xdiary 6 -- System: xtm - X Desktop Calendar 7 -- Subsystem: <> 8 -- Function block: <> 9 -- 10 -- Description: 11 -- Interface file for xtmEditAlarm.c. 12 -- 13 -- Filename: xtmEditAlarm.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: xtmEditAlarm.h, Version: 1.1, Date: 95/02/18 15:52:15 */ 32 33 34 /* Only include this module once. */ 35 #ifndef define_xtmEditAlarm_h 36 # define define_xtmEditAlarm_h 37 38 39 /*---------------------------------------------------------------------------- 40 -- Include files 41 ----------------------------------------------------------------------------*/ 42 43 #include "xtmGlobal.h" 44 45 46 /*---------------------------------------------------------------------------- 47 -- Macro definitions 48 ----------------------------------------------------------------------------*/ 49 50 #define XTM_EA_MAX_ALARMS 5 51 #define XTM_EA_MAX_TUNES 5 52 53 54 /*---------------------------------------------------------------------------- 55 -- Type declarations 56 ----------------------------------------------------------------------------*/ 57 58 /* Values passed to the alarm window. */ 59 typedef struct { 60 Boolean alarm_valid[ XTM_EA_MAX_ALARMS ]; 61 int alarm_melody; 62 int alarm_offset[ XTM_EA_MAX_ALARMS ]; 63 UINT32 alarm_action; 64 UINT32 what_action; 65 } XTM_EA_SET_ALARM_DATA; 66 67 /* Result values passed from the alarm window. */ 68 typedef struct { 69 Boolean alarm_valid[ XTM_EA_MAX_ALARMS ]; 70 int alarm_melody; 71 int alarm_offset[ XTM_EA_MAX_ALARMS ]; 72 UINT32 alarm_action; 73 UINT32 what_action; 74 } XTM_EA_GET_ALARM_DATA; 75 76 77 /* Reasons when the action routine is called. */ 78 typedef enum { 79 XTM_EA_REASON_CANCEL, 80 XTM_EA_REASON_DESTROY, 81 XTM_EA_REASON_OK 82 } XTM_EA_REASON; 83 84 /* Callback when the alarm window is destroyed. */ 85 typedef void ( *XTM_EA_ACTION_CB ) ( XTM_EA_REASON, 86 void *, XTM_EA_GET_ALARM_DATA * ); 87 88 /* Handle to use when comminucating with the alarm window. */ 89 typedef void *XTM_EA_HANDLE; 90 91 92 /*---------------------------------------------------------------------------- 93 -- Global definitions 94 ----------------------------------------------------------------------------*/ 95 96 97 /*---------------------------------------------------------------------------- 98 -- Function prototypes 99 ----------------------------------------------------------------------------*/ 100 101 void 102 xtmEaDestroy( XTM_EA_HANDLE alarm_handle ); 103 104 void 105 xtmEaEditAlarms( XTM_EA_HANDLE alarm_handle, 106 XTM_EA_SET_ALARM_DATA *values_ref ); 107 108 XTM_EA_HANDLE 109 xtmEaInitialize( XTM_GL_BASE_DATA_REF appl_data_ref, 110 Widget parent, 111 XTM_EA_ACTION_CB actionCB, 112 void *user_data ); 113 114 #endif 115 116