summaryrefslogtreecommitdiff
path: root/plugins/WebView/src/webview.h
blob: d78adc247c11605ba7e9c7d6b5e185aec97e7233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
/*
 * A plugin for Miranda IM which displays web page text in a window Copyright
 * (C) 2005 Vincent Joyce.
 *
 * Miranda IM: the free icq client for MS Windows  Copyright (C) 2000-2
 * Richard Hughes, Roland Rabien & Tristan Van de Vreede
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#define Xpos_WIN_KEY     "win_Xpos"
#define Ypos_WIN_KEY     "win_Ypos"
#define BG_COLOR_KEY     "BgColor"
#define TXT_COLOR_KEY    "TxtColor"
#define WIN_HEIGHT_KEY   "Height"
#define SUPPRESS_ERR_KEY "Suppress error messages"
#define WIN_WIDTH_KEY    "Width"
#define FILE_KEY         "Filename"
#define APPEND_KEY       "Append"
#define UPDATE_ONSTART_KEY  "update_onboot"
#define UPDATE_ON_OPEN_KEY  "update_on_Window_open"
#define FONT_FACE_KEY    "FontFace"
#define FONT_BOLD_KEY    "FontBold"
#define FONT_ITALIC_KEY  "FontItalic"
#define FONT_UNDERLINE_KEY  "FontUnderline"
#define FONT_SIZE_KEY    "FontSize"
#define ERROR_POPUP_KEY  "UsePopupPlugin"
#define ENABLE_ALERTS_KEY "EnableAlerts"
#define ALERT_STRING_KEY "ALERTSTRING"
#define ALERT_TYPE_KEY   "Alert_Type"
#define APND_DATE_NAME_KEY  "AppendDateContact"
#define POP_DELAY_KEY    "PopUpDelay"
#define POP_BG_CLR_KEY   "PopBGClr"
#define POP_TXT_CLR_KEY  "PopTxtClr"
#define POP_USEWINCLRS_KEY  "PopUseWinClrs"
#define CONTACT_PREFIX_KEY  "PrefixDateContact"
#define USE_24_HOUR_KEY  "Use24hourformat"
#define POP_USESAMECLRS_KEY "PopUseSameClrs"
#define POP_USECUSTCLRS_KEY "PopUseCustomClrs"
#define LCLK_WINDOW_KEY  "LeftClkWindow"
#define LCLK_WEB_PGE_KEY "LeftClkWebPage"
#define LCLK_DISMISS_KEY "LeftClkDismiss"
#define RCLK_WINDOW_KEY  "RightClkWindow"
#define RCLK_WEB_PGE_KEY "RightClkWebPage"
#define RCLK_DISMISS_KEY "RightClkDismiss"
//#define INBUILTPOP_KEY   "UseInbuiltPopupAlert"

#define TIME  60
#define Def_color_bg     0x00ffffff
#define Def_color_txt    0x00000000
#define HK_SHOWHIDE      3001

#define MAXSIZE1         250000
#define MAXSIZE2         500000
#define MAXSIZE3         1000000

static UINT     expertOnlyControls[] =
{IDC_ADV_GRP,
   IDC_NO_PROTECT,
IDC_NOT_RECOMND_TXT};

//lets get rid of some warnings
void ErrorMsgs(char *contactname, char *displaytext);
void CodetoSymbol(char *truncated);
static void     GetData(void *hContact);
BOOL CALLBACK   DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void FillFontListThread(HWND hwndDlg);
static BOOL CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int DataWndAlertCommand(void *AContact);


 // ///////////////////////
// characters and symbols//
// ///////////////////////

#define AMOUNT3  164

char*CharacterCodes[AMOUNT3] =
{

   """,
   "&",
   "<",
   ">",
   " ",
   "¡",
   "¢",
   "£",
   "¤",
   "¥",
   "&brvbar",
   "§",
   "¨",
   "©",
   "ª",
   "«",
   "¬",
   "­",
   "®",
   "¯",
   "°",
   "±",
   "²",
   "³",
   "´",
   "µ",
   "¶",
   "·",
   "¸",
   "¹",
   "º",
   "»",
   "¼",
   "½",
   "¾",
   "¿",
   "À",
   "Á",
   "Â",
   "Ã",
   "Ä",
   "Å",
   "Æ",
   "Ç",
   "È",
   "É",
   "Ê",
   "Ë",
   "Ì",
   "Í",
   "Î",
   "Ï",
   "Ð",
   "Ñ",
   "Ò",
   "Ó",
   "Ô",
   "Õ",
   "Ö",
   "×",
   "Ø",
   "Ù",
   "Ú",
   "Û",
   "Ü",
   "Ý",
   "Þ",
   "ß",
   "à",
   "á",
   "â",
   "ã",
   "ä",
   "å",
   "æ",
   "ç",
   "è",
   "é",
   "ê",
   "ë",
   "ì",
   "í",
   "î",
   "ï",
   "ð",
   "ñ",
   "ò",
   "ó",
   "ô",
   "õ",
   "ö",
   "÷",
   "ø",
   "ù",
   "ú",
   "û",
   "ü",
   "ý",
   "þ",
   "&yumil;",
   "Œ",        // greater that 255, extra latin characters
    "œ",
   "Š",
   "š",
   "Ÿ",
   "ƒ",
   "ˆ",
   "˜",
   "Œ",
   "œ",
   "Š",
   "š",
   "Ÿ",
   "ƒ",
   "ˆ",
   "˜",
   "–",       // Misc other characters
    "—",
   "‘",
   "’",
   "‚",
   "“",
   "”",
   "„",
   "†",
   "‡",
   "•",
   "…",
   "‰",
   "‹",
   "›",
   "€",
   "ℑ",
   "ℜ",
   "™",
   "–",
   "—",
   "‘",
   "’",
   "‚",
   "“",
   "”",
   "„",
   "†",
   "‡",
   "•",
   "…",
   "‰",
   "‹",
   "›",
   "€",
   "ℑ",
   "ℜ",
   "™",
   " ",
   " ",
   " ",
   " ",
   " ",
   " ",
   "õ",      // symbols without numeric code
    "¿",
   "¦",
"¯"};

char Characters[AMOUNT3] =
{
   '\"',
   '&',
   '<',
   '>',
   ' ',
   '¡',
   '¢',
   '£',
   '¤',
   '¥',
   '¦',
   '§',
   '¨',
   '©',
   'ª',
   '«',
   '¬',
   '­',
   '®',
   '¯',
   '°',
   '±',
   '²',
   '³',
   '´',
   'µ',
   '¶',
   '·',
   '¸',
   '¹',
   'º',
   '»',
   '¼',
   '½',
   '¾',
   '¿',
   'À',
   'Á',
   'Â',
   'Ã',
   'Ä',
   'Å',
   'Æ',
   'Ç',
   'È',
   'É',
   'Ê',
   'Ë',
   'Ì',
   'Í',
   'Î',
   'Ï',
   'Ð',
   'Ñ',
   'Ò',
   'Ó',
   'Ô',
   'Õ',
   'Ö',
   '×',
   'Ø',
   'Ù',
   'Ú',
   'Û',
   'Ü',
   'Ý',
   'Þ',
   'ß',
   'à',
   'á',
   'â',
   'ã',
   'ä',
   'å',
   'æ',
   'ç',
   'è',
   'é',
   'ê',
   'ë',
   'ì',
   'í',
   'î',
   'ï',
   'ð',
   'ñ',
   'ò',
   'ó',
   'ô',
   'õ',
   'ö',
   '÷',
   'ø',
   'ù',
   'ú',
   'û',
   'ü',
   'ý',
   'þ',
   'ÿ',
   'Œ',  // greater than 255 extra latin characters
    'œ',
   'Š',
   'š',
   'Ÿ',
   'ƒ',
   'ˆ',
   '˜',
   'Œ',
   'œ',
   'Š',
   'š',
   'Ÿ',
   'ƒ',
   'ˆ',
   '˜',
   '–',
   '—',  // misc other characters
    '‘',
   '’',
   '‚',
   '“',
   '”',
   '„',
   '†',
   '‡',
   '•',
   '…',
   '‰',
   '‹',
   '›',
   '€',
   'I',
   'R',
   '™',
   '–',
   '—',
   '‘',
   '’',
   '‚',
   '“',
   '”',
   '„',
   '†',
   '‡',
   '•',
   '…',
   '‰',
   '‹',
   '›',
   '€',
   'I',
   'R',
   '™',
   ' ',
   ' ',
   ' ',
   ' ',
   ' ',
   ' ',
   'õ',
   '¿',
   '¦',
'¯'};