FreeCalypso > hg > tcs211-c139
comparison g23m/condat/ms/src/bmi/AUIEditor.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 #ifndef MMI_AUIEDITOR_H | |
2 #define MMI_AUIEDITOR_H | |
3 | |
4 /******************************************************************************* | |
5 | |
6 CONDAT (UK) | |
7 | |
8 ******************************************************************************** | |
9 | |
10 This software product is the property of Condat (UK) Ltd and may not be | |
11 disclosed to any third party without the express permission of the owner. | |
12 | |
13 ******************************************************************************** | |
14 | |
15 $Project name: Basic MMI | |
16 $Project code: BMI (6349) | |
17 $Module: MMI | |
18 $File: AUIEditor.h | |
19 $Revision: 1.0 | |
20 | |
21 $Author: Condat(UK) | |
22 $Date: 30/01/02 | |
23 | |
24 ******************************************************************************** | |
25 | |
26 Description: Global header file for AUI Editor | |
27 | |
28 REQUIRES: ATBCommon.h, ATBDisplay.h, ATBEditor.h | |
29 | |
30 ******************************************************************************** | |
31 $History: AUIEditor.h | |
32 | |
33 30/01/02 Original Condat(UK) BMI version. | |
34 | |
35 $End | |
36 | |
37 *******************************************************************************/ | |
38 | |
39 | |
40 | |
41 | |
42 /******************************************************************************* | |
43 | |
44 Type definitions | |
45 | |
46 *******************************************************************************/ | |
47 | |
48 /* | |
49 * Definitions from common editor function | |
50 */ | |
51 #define INFO_TIMEOUT 1 | |
52 #define INFO_KCD_LEFT 2 | |
53 #define INFO_KCD_RIGHT 3 | |
54 #define INFO_KCD_HUP 4 | |
55 #define INFO_KCD_UP 5 | |
56 #define INFO_KCD_DOWN 6 | |
57 #define INFO_KCD_0_9 7 | |
58 #define INFO_KCD_ALTERNATELEFT 8 | |
59 #define INFO_KCD_STAR 9 | |
60 #define INFO_KCD_SELECT 10 | |
61 #define INFO_EMERGENCY 99 | |
62 | |
63 #define ED_PREDTEXT_MAX 16 /* Maximum length of predicted text string */ | |
64 #define ED_SCROLLBAR_WIDTH 4 /* Width of scrollbar */ | |
65 | |
66 #define MAX_RO_EDITOR_LEN 1000 | |
67 | |
68 #ifndef FOREVER | |
69 #define TIMER_EXIT 0x0BB8 /* Default SMS timer period - 3 secs. */ | |
70 #define SHORT_SECS 0x01F4 /* Information dialogue display times. */ | |
71 #define THREE_SECS 0x0BB8 /* 3000 milliseconds. */ | |
72 #define FIVE_SECS 0x1388 /* 5000 milliseconds. */ | |
73 #define TEN_SECS 0x2710 /* 10000 milliseconds. */ | |
74 #define TWO_MIN 0x1D4C0 /* 2 min */ | |
75 #define FOREVER 0xFFFF /* Infinite time period. */ | |
76 #endif /* FOREVER */ | |
77 | |
78 | |
79 /****************************************************************************/ | |
80 /* */ | |
81 /* TYPES */ | |
82 /* */ | |
83 /****************************************************************************/ | |
84 | |
85 /* External & internal events */ | |
86 | |
87 typedef enum | |
88 { | |
89 E_ED_INIT, | |
90 E_ED_DESTROY,/*MC SPR 1752*/ | |
91 E_ED_DEINIT, | |
92 E_ED_UPDATE, | |
93 E_ED_INSERT | |
94 } E_ED_EVENTS; | |
95 | |
96 /* Callback type */ | |
97 | |
98 typedef void (*T_AUI_EDIT_CB) (T_MFW_HND, USHORT, SHORT); | |
99 | |
100 | |
101 /****************************************************************************/ | |
102 /* */ | |
103 /* STRUCTURES */ | |
104 /* */ | |
105 /****************************************************************************/ | |
106 | |
107 /* T_AUI_EDITOR_DATA */ | |
108 | |
109 typedef struct | |
110 { | |
111 T_ED_ATTR editor_attr; /* The editor attributes */ | |
112 int zone_id; /* Type of editor window */ | |
113 | |
114 USHORT Identifier; /* Identifier passed on to callback function */ | |
115 ULONG timeout; /* Time before editor calls callback */ | |
116 T_AUI_EDIT_CB Callback; /* Callback function */ | |
117 BOOL destroyEditor; /* TRUE if editor is to be destroyed on exit */ | |
118 UBYTE min_enter; /* Minimum number of characters necessary to enter */ | |
119 BOOL change_rsk_on_empty; /* TRUE if text of right soft key changes when buffer is empty*/ | |
120 | |
121 USHORT TitleId; /* Text ID for the title of the editor */ | |
122 UBYTE *TitleString; /* String for title of editor (ignored if TitleId is non-null) */ | |
123 USHORT LeftSoftKey; /* Text ID for left soft key */ | |
124 USHORT AltLeftSoftKey; /* Text ID for soft key to appear before min_enter characters entered */ | |
125 USHORT RightSoftKey; /* Text ID for right soft key */ | |
126 USHORT AltRightSoftKey; /* Text ID for soft key to appear when buffer is empty */ | |
127 /* SPR#2672 - SH - Removed array */ | |
128 } T_AUI_EDITOR_DATA; | |
129 | |
130 | |
131 /****************************************************************************/ | |
132 /* */ | |
133 /* FUNCTION PROTOTYPES */ | |
134 /* */ | |
135 /****************************************************************************/ | |
136 | |
137 /* General-purpose Editor */ | |
138 | |
139 T_MFW_HND AUI_edit_Start(T_MFW_HND parent, T_AUI_EDITOR_DATA *editor_data); | |
140 T_MFW_HND AUI_edit_QuickStart(T_MFW_HND win, USHORT TitleId, UBYTE *TitleString, USHORT *buffer, USHORT len, T_AUI_EDITOR_DATA *editor_info, T_AUI_EDIT_CB editor_cb); | |
141 void AUI_edit_Destroy(T_MFW_HND window); | |
142 void AUI_edit_InsertString(T_MFW_HND win, UBYTE *string, T_ATB_DCS dcs); | |
143 void AUI_edit_InsertChar(T_MFW_HND win, USHORT character); | |
144 | |
145 /* AUI Editor tools */ | |
146 | |
147 void AUI_edit_GetSpecificWindowSize(T_ED_ATTR* attr, int zone_id ); | |
148 void AUI_edit_CalculateWindow(T_ED_ATTR* attr, int *zone_id ); /* SPR#1559 - SH - Change zone_id to a pointer to int */ | |
149 void AUI_edit_SetDefault(T_AUI_EDITOR_DATA *editor_data); | |
150 void AUI_edit_SetDisplay(T_AUI_EDITOR_DATA *editor_data, int zone_id, int colour, UBYTE font ); | |
151 void AUI_edit_SetEvents(T_AUI_EDITOR_DATA *editor_data, USHORT Identifier, BOOL destroyEditor, ULONG timeout, T_AUI_EDIT_CB Callback); | |
152 void AUI_edit_SetMode(T_AUI_EDITOR_DATA *editor_data, USHORT mode, USHORT cursor ); | |
153 void AUI_edit_SetBuffer(T_AUI_EDITOR_DATA *editor_data, UBYTE dcs, UBYTE *text, USHORT size); | |
154 void AUI_edit_SetTextStr(T_AUI_EDITOR_DATA *editor_data, USHORT LeftSoftKey, USHORT RightSoftKey, USHORT TitleId, UBYTE *TitleString); | |
155 void AUI_edit_SetAltTextStr(T_AUI_EDITOR_DATA *editor_data, UBYTE min_enter, USHORT AltLeftSoftKey, BOOL change_rsk_on_empty, USHORT AltRightSoftKey); | |
156 void AUI_edit_SetFormatStr(T_AUI_EDITOR_DATA *editor_data, char *formatstr, BOOL preformat, char filler); | |
157 void AUI_edit_SetFormatAttr(T_AUI_EDITOR_DATA *editor_data, UBYTE attr); | |
158 void AUI_edit_SetAttr(T_ED_ATTR *attr, int zone_id, ULONG colour, UBYTE font, USHORT mode, USHORT cursor, T_ATB_DCS dcs, UBYTE *text, USHORT size); | |
159 void AUI_Edit_Display_Only(T_MFW_HND win, int LSK, int RSK, char *string1, char *string2, int Title); | |
160 #endif /* _DEF_MMI_ED_EDITOR */ |