File: constants.pas

package info (click to toggle)
vmg 3.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,528 kB
  • sloc: pascal: 5,160; cpp: 605; sh: 278; lex: 105; ansic: 68; makefile: 37
file content (343 lines) | stat: -rw-r--r-- 9,466 bytes parent folder | download
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
{%encoding utf-8}
{
contants.pas

Stores global constants and type declarations

Copyright (C) 1998 - 2010 Harri Pyy, Chris O'Donnell, Felipe Monteiro de Carvalho

This file is part of Virtual Magnifying Glass.

Virtual Magnifying Glass is free software;
you can redistribute it and/or modify it under the
terms of the GNU General Public License version 2
as published by the Free Software Foundation.

Virtual Magnifying Glass 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.

Please note that the General Public License version 2 does not permit
incorporating Virtual Magnifying Glass into proprietary
programs.

AUTHORS: Chris O'Donnell, Felipe Monteiro de Carvalho and Harri Pyy
}
unit constants;

{$IFDEF FPC}
  {$MODE DELPHI}{$H+}
{$ENDIF}

{$IFDEF Win32}
  {$DEFINE Windows}
{$ENDIF}

interface

uses
{$IFDEF Windows}
  Windows, Messages,
{$ELSE}
  LMessages,
{$ENDIF}
  Classes, SysUtils;

{*******************************************************************
*  Resource file constants
*******************************************************************}
const
  IDI_ICON1         = 101;
  IDI_ICON2         = 115;

  IDB_TOPLEFT       = 201;
  IDB_TOPRIGHT      = 202;
  IDB_BOTTOMLEFT    = 203;
  IDB_BOTTOMRIGHT   = 204;
  IDB_TOP           = 205;
  IDB_LEFT          = 206;
  IDB_BOTTOM        = 207;
  IDB_RIGHT         = 208;

  IDB_CECAE         = 301;
  IDB_FEUSP         = 302;
  IDB_VMG           = 303;
  IDB_LUPA          = 304;
  IDB_USPLEGAL      = 305;

{*******************************************************************
*  Indexes of the HotKey options on the dialog
*******************************************************************}
const
  ID_HOTKEY_NO_HOTKEY  = 0;
  ID_HOTKEY_CTRLALTKEY = 1;
  ID_HOTKEY_DISABLE_ASDW = 2;

  ID_DEFAULT_HOTKEY    = 'm';

{*******************************************************************
*  Menu Item constants
*******************************************************************}
const
  ID_MENU_ACTIVATE              = 0;
  ID_MENU_WIDTH                 = 1;
  ID_MENU_HEIGHT                = 2;
  ID_MENU_MAGNIFICATION         = 3;
  ID_MENU_TOOLS                 = 4;
  ID_MENU_GRAPHICAL_BORDER      = 5;
  ID_MENU_INVERT_COLORS         = 6;
  ID_MENU_ANTIALIASING          = 7;
  // Separator
  ID_MENU_CONFIG_DIALOG         = 9;
  ID_MENU_TRANSLATIONS          = 10;
  ID_MENU_SAVE                  = 11;
  ID_MENU_USE_PLUGIN            = 12;
  ID_MENU_CLOSE_PLUGIN          = 13;
  // Separator
  ID_MENU_HOMEPAGE              = 15;
  ID_MENU_ABOUT                 = 16;
  ID_MENU_HELP                  = 17;
  ID_MENU_CANCEL                = 18;
  ID_MENU_TERMINATE             = 19;

  { Separators }
  ID_SEPARATOR_ONE              = 8;
  ID_SEPARATOR_TWO              = 14;

  ID_MENU_WIDTH_64              = 0;
  ID_MENU_WIDTH_96              = 1;
  ID_MENU_WIDTH_128             = 2;
  ID_MENU_WIDTH_192             = 3;
  ID_MENU_WIDTH_256             = 4;
  ID_MENU_WIDTH_320             = 5;
  ID_MENU_WIDTH_416             = 6;
  ID_MENU_WIDTH_512             = 7;
  ID_MENU_WIDTH_640             = 8;
  ID_MENU_WIDTH_768             = 9;
  ID_MENU_WIDTH_1024            = 10;
  ID_MENU_WIDTH_1280            = 11;
  ID_MENU_WIDTH_1600            = 12;

  ID_MENU_HEIGHT_64             = 0;
  ID_MENU_HEIGHT_96             = 1;
  ID_MENU_HEIGHT_128            = 2;
  ID_MENU_HEIGHT_160            = 3;
  ID_MENU_HEIGHT_192            = 4;
  ID_MENU_HEIGHT_256            = 5;
  ID_MENU_HEIGHT_320            = 6;
  ID_MENU_HEIGHT_512            = 7;
  ID_MENU_HEIGHT_768            = 8;
  ID_MENU_HEIGHT_1024           = 9;

  ID_MENU_MAGNIFICATION_1X      = 0;
  ID_MENU_MAGNIFICATION_1_5X    = 1;
  ID_MENU_MAGNIFICATION_2X      = 2;
  ID_MENU_MAGNIFICATION_3X      = 3;
  ID_MENU_MAGNIFICATION_4X      = 4;
  ID_MENU_MAGNIFICATION_8X      = 5;
  ID_MENU_MAGNIFICATION_16X     = 6;

  ID_MENU_ENGLISH               = 0;
  ID_MENU_PORTUGUESE            = 1;
  ID_MENU_SPANISH               = 2;
  ID_MENU_FRENCH                = 3;
  ID_MENU_GERMAN                = 4;
  ID_MENU_ITALIAN               = 5;
  ID_MENU_RUSSIAN               = 6;
  ID_MENU_POLISH                = 7;
  ID_MENU_JAPANESE              = 8;
  ID_MENU_TURKISH               = 9;
  ID_MENU_CHINESE               =10;

{----------------------------------------------
  Versões do Windows
 ----------------------------------------------}
const
  VER_PLATFORM_WIN32_CE = 3;

type
  TOSVersion =
   (
    vwDesconhecida,
    {*******************************************************************}
    { Desktop Windows }
    {*******************************************************************}
    // Informações simplificadas
    Serie9x, // 32s em 3.11, 95, 98 e Me
    SerieNT, // NT 3.51, NT, 2000 e XP
    SerieCE, // Windows CE
    // Informações completas
    vwWin32sEm311,
    vwWinNT351,
    vwWin95,
    vwWinNT,
    vwWin98,
    vwWinMe,
    vwWin2000,
    vwWinXP,
    vwWin2003,
    vwWinVista,  // Ou superior
    vwWinLongHorn,  // Ou superior
    {*******************************************************************}
    { Windows CE }
    {*******************************************************************}
    vwWinCE1,
    vwWinCE2,
    vwWinCE3,
    vwWinCE4,
    vwWinCE5,
    vwWinCE6,
    vwWinCE6_5,
    vwWinCE7// Ou superior
   );

{*******************************************************************
*  Extra Windows API Constants for newer Windows Versions
*******************************************************************}
const
  CAPTUREBLT = $40000000;

const
  SM_XVIRTUALSCREEN = 76;
  SM_YVIRTUALSCREEN = 77;
  SM_CXVIRTUALSCREEN = 78;
  SM_CYVIRTUALSCREEN = 79;

{ Windows Key constants for Delphi }  
{$IFNDEF FPC}

  VK_0 = 48;
  VK_1 = 49;
  VK_2 = 50;
  VK_3 = 51;
  VK_4 = 52;
  VK_5 = 53;
  VK_6 = 54;
  VK_7 = 55;
  VK_8 = 56;
  VK_9 = 57;
  VK_A = $41;
  VK_B = $42;
  VK_D = $44;
  VK_E = $45;
  VK_Q = $51;
  VK_S = $53;
  VK_W = $57;

{$ENDIF}

{*******************************************************************
*  Strings not to be translated
*******************************************************************}
const

  szAppTitle = 'Magnifying Glass';
  szAppTitleLong = 'Virtual Magnifying Glass';
  szAppVersion = '3.7.1';

  VMG_WEBSITE = 'http://magnifier.sourceforge.net';

  lpSeparator = '-';
  lpSpace = ' ';

{$ifdef fpc}
  lpEspanol   = 'Español';
  lpEnglish   = 'English';
  lpPortugues = 'Português';
  lpFrancais  = 'Français';
  lpGerman    = 'Deutsch';
  lpItaliano  = 'Italiano';
  lpRussian   = 'Русский';
  lpPolish    = 'Polski';
  lpJapanese  = '日本語';
  lpTurkish   = 'Türkçe';
  lpChinese   = '中文';
{$else}
  lpEspanol   = 'Espaol';
  lpEnglish   = 'English';
  lpPortugues = 'Portugus';
  lpFrancais  = 'Franais';
  lpGerman    = 'Deutsch';
  lpItaliano  = 'Italiano';
  lpRussian   = 'Русский';
  lpPolish    = 'Polski';
  lpJapanese  = 'Japanese';
  lpTurkish   = 'Turkish';
  lpChinese   = 'Chinese';
{$endif}

// Constant which Delphi lacks
{$ifndef fpc}
  LineEnding = #13#10;
{$endif}

  lpContributors =
   'Carlos Eduardo Reinaldo Gimenes - Distribution' + LineEnding +
   'Giovanni Ferreira - Spanish Translation' + LineEnding +
   'jkedarnath - Web Designer' + LineEnding +
   'Rafael Sodre Craice - Images' + LineEnding +
   'William W. Wells - Beta Tester' + LineEnding +
   'Jean-Claude - French Translation' + LineEnding +
   'Michele Catalano - German Translation'  + LineEnding +
   'David Guadagnini - Italian Translation' + LineEnding +
   'Alexey Misharev - Russian Translation' + LineEnding +
   'Katarzyna Plak - Polish Translation' + LineEnding +
   'Gonzalo Ferreira da Silva - Spanish Translation' + LineEnding +
   'Monica - French Translation' + LineEnding +
   'Michał Trzebiatowski - Polish Translation' + LineEnding +
   'Asabukuro - Japanese Translation' + LineEnding +
   'K. Deniz Yilmaz - Turkish Translation'
   ;

  ErrorLoading = ' *Error*';

  lpCannotLoadPlugin = 'An error occured while loading the plugin dll.';
  lpPluginError = 'Plugin error';

{$ifdef GoboLinux}
  DefaultDirectory = '/Programs/Magnifier/' + szAppVersion + '/';
{$else}
  DefaultDirectory = '/usr/share/magnifier/';
{$endif}
  BundleResourcesDirectory = '/Contents/Resources/';

  SectionGeneral = 'General';
  SectionUnix = 'UNIX';
  SectionWindows = 'Windows';
  SectionPlugins = 'Plugins';

  IdentgraphicalBorder = 'graphicalBorder';
  IdentxSquare = 'xSquare';
  IdentySquare = 'Square';
  IdentiMagnification = 'iMagnification';
  IdentTools = 'GraphicsTools';
  IdentAutoRun = 'AutoRun';
  IdentLanguage = 'Language';
  IdentShowWhenExecuted = 'ShowWhenExecuted';
  IdentInvertColors = 'InvertColors';
  IdentAntiAliasing = 'AntiAliasing';
  IdentExtraAntiAliasing = 'ExtraAntiAliasing';
  IdentFirstRun = 'FirstRun';
  IdentContrast = 'Contrast';

  IdentMyDirectory = 'MyDirectory';

  IdentHotKeyMode = 'HotKeyMode';
  IdentHotKeyKey = 'HotKeyKey';

  IdentUsePlugins = 'UsePlugins';
  IdentPluginName = 'PluginName';
  IdentPluginData = 'PluginData';

{*******************************************************************
*  Custom Signals
*******************************************************************}
const
  MYWM_NOTIFYICON = WM_USER + 77;
  MYWM_SHOWGLASS = WM_USER + 78;

implementation

end.