1 /*---------------------------------------------------------------------------- 2 -- 3 -- Module: xtmFormat 4 -- 5 -- Project: Xdiary 6 -- System: xtm - X Desktop Calendar 7 -- Subsystem: <> 8 -- Function block: <> 9 -- 10 -- Description: 11 -- Interface file for the xtmFormat module. 12 -- 13 -- Filename: xtmFormat.h 14 -- 15 -- Authors: Roger Larsson, Ulrika Bornetun 16 -- Creation date: 1991-01-07 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: xtmFormat.h, Version: 1.1, Date: 95/02/18 15:52:21 */ 32 33 34 /* Only include this file once. */ 35 #ifndef define_xtmFormat_h 36 # define define_xtmFormat_h 37 38 39 /*---------------------------------------------------------------------------- 40 -- Include files 41 ----------------------------------------------------------------------------*/ 42 43 #include "xtmGlobal.h" 44 #include "xtmDbTools.h" 45 #include "TimDate.h" 46 47 48 /*---------------------------------------------------------------------------- 49 -- Macro definitions 50 ----------------------------------------------------------------------------*/ 51 52 53 /*---------------------------------------------------------------------------- 54 -- Type declarations 55 ----------------------------------------------------------------------------*/ 56 57 /* Fetch what date and time. */ 58 typedef enum { 59 XTM_FO_START_DATE, 60 XTM_FO_END_DATE, 61 XTM_FO_START_TIME, 62 XTM_FO_END_TIME 63 } XTM_FO_FETCH_WHAT; 64 65 66 /*---------------------------------------------------------------------------- 67 -- Global definitions 68 ----------------------------------------------------------------------------*/ 69 70 71 /*---------------------------------------------------------------------------- 72 -- Function prototypes 73 ----------------------------------------------------------------------------*/ 74 75 Boolean 76 xtmFoFetchDate( Widget parentW, 77 Widget dateW, 78 XTM_FO_FETCH_WHAT fetch_what, 79 Boolean empty_allowed, 80 TIM_TIME_REF *use_time ); 81 82 Boolean 83 xtmFoFetchMinuteTime( char *char_ref, 84 Boolean empty_allowed, 85 Widget parent, 86 int max_minutes, 87 int *minutes ); 88 89 Boolean 90 xtmFoFetchTime( Widget parentW, 91 Widget timeW, 92 XTM_FO_FETCH_WHAT fetch_what, 93 Boolean empty_allowed, 94 TIM_TIME_REF *use_time ); 95 96 void 97 xtmFoFormatDate( TIM_TIME_REF use_time, 98 char *buffer, 99 int buffer_size ); 100 101 void 102 xtmFoFormatEntryFlags( XTM_GL_CUSTOM_DATA_REF custom_data, 103 XTM_DB_ALL_ENTRY_REF entry_record, 104 char *flags_buffer, 105 int flags_buffer_size ); 106 107 void 108 xtmFoFormatEntryTimes( XTM_DB_ALL_ENTRY_REF entry_record, 109 char *time_buffer, 110 int time_buffer_size ); 111 112 void 113 xtmFoFormatFullTime( TIM_TIME_REF use_time, 114 char *buffer, 115 int buffer_size ); 116 117 char 118 *xtmFoFormatText( char *format_text, 119 int indent, 120 int max_lines, 121 int max_line_length ); 122 123 void 124 xtmFoFormatTime( TIM_TIME_REF use_time, 125 char *buffer, 126 int buffer_size ); 127 128 #endif 129