1 /*---------------------------------------------------------------------------- 2 -- 3 -- Module: xtmEditEntry 4 -- 5 -- Project: Xdiary 6 -- System: xtm - X Desktop Calendar 7 -- Subsystem: <> 8 -- Function block: <> 9 -- 10 -- Description: 11 -- Interface file for xtmEditEntry.c. 12 -- 13 -- Filename: xtmEditEntry.h 14 -- 15 -- Authors: Roger Larsson, Ulrika Bornetun 16 -- Creation date: 1990-12-18 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: xtmEditEntry.h, Version: 1.1, Date: 95/02/18 15:52:16 */ 32 33 34 /* Only include this module once. */ 35 #ifndef define_xtmEditEntry_h 36 # define define_xtmEditEntry_h 37 38 39 /*---------------------------------------------------------------------------- 40 -- Include files 41 ----------------------------------------------------------------------------*/ 42 43 #include "xtmGlobal.h" 44 45 46 /*---------------------------------------------------------------------------- 47 -- Macro definitions 48 ----------------------------------------------------------------------------*/ 49 50 /* Flags to use with xtmEdSetValues. */ 51 #define XTM_ED_SET_DATE (1<<0) 52 #define XTM_ED_SET_TIME (1<<1) 53 #define XTM_ED_SET_DURATION (1<<2) 54 #define XTM_ED_SET_TEXT (1<<3) 55 #define XTM_ED_SET_IS_NOTE (1<<4) 56 #define XTM_ED_SET_IS_APP (1<<5) 57 58 59 /*---------------------------------------------------------------------------- 60 -- Type declarations 61 ----------------------------------------------------------------------------*/ 62 63 /* Reasons when the action routine is called. */ 64 typedef enum { 65 XTM_ED_REASON_DESTROY, 66 XTM_ED_REASON_UPDATE 67 } XTM_ED_REASON; 68 69 /* Callback when the editor window is destroyed. */ 70 typedef void ( *XTM_ED_ACTION_CB ) ( XTM_ED_REASON, void * ); 71 72 /* Handle to use when comminucating with the editor. */ 73 typedef void *XTM_ED_HANDLE; 74 75 76 /*---------------------------------------------------------------------------- 77 -- Global definitions 78 ----------------------------------------------------------------------------*/ 79 80 81 /*---------------------------------------------------------------------------- 82 -- Function prototypes 83 ----------------------------------------------------------------------------*/ 84 85 void 86 xtmEdDestroy( XTM_ED_HANDLE editor_handle ); 87 88 void 89 xtmEdEmptyCache(); 90 91 XTM_ED_HANDLE 92 xtmEdInitialize( XTM_GL_BASE_DATA_REF appl_data_ref, 93 Widget parent, 94 int default_duration, 95 int earliest_hour, 96 int latest_hour, 97 int min_delta, 98 XTM_ED_ACTION_CB actionCB, 99 void *user_data ); 100 101 void 102 xtmEdEditEntry( XTM_ED_HANDLE editor_handle, 103 char *db_name, 104 UINT32 entry_id, 105 TIM_TIME_REF use_date, 106 TIM_TIME_REF use_time ); 107 108 void 109 xtmEdSetValues( XTM_ED_HANDLE editor_handle, 110 UINT32 flags, 111 TIM_TIME_REF use_date, 112 TIM_TIME_REF use_time, 113 UINT32 duration, 114 char *text ); 115 116 #endif 117 118