2
This file is part of the Free Pascal run time library.
3
Copyright (c) 2007-2008 Free Pascal development team.
5
See the file COPYING.FPC, included in this distribution,
6
for details about the copyright.
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
**********************************************************************
14
Automatically converted by H2Pas 1.0.0 from notify.h
15
The following command line parameters were used:
31
NOTIFICATION_EVENT_NONE = 0;
32
NOTIFICATION_EVENT_TIME_CHANGE = 1;
33
NOTIFICATION_EVENT_SYNC_END = 2;
34
NOTIFICATION_EVENT_ON_AC_POWER = 3;
35
NOTIFICATION_EVENT_OFF_AC_POWER = 4;
36
NOTIFICATION_EVENT_NET_CONNECT = 5;
37
NOTIFICATION_EVENT_NET_DISCONNECT = 6;
38
NOTIFICATION_EVENT_DEVICE_CHANGE = 7;
39
NOTIFICATION_EVENT_IR_DISCOVERED = 8;
40
NOTIFICATION_EVENT_RS232_DETECTED = 9;
41
NOTIFICATION_EVENT_RESTORE_END = 10;
42
NOTIFICATION_EVENT_WAKEUP = 11;
43
NOTIFICATION_EVENT_TZ_CHANGE = 12;
44
NOTIFICATION_EVENT_MACHINE_NAME_CHANGE = 13;
45
NOTIFICATION_EVENT_LAST = NOTIFICATION_EVENT_MACHINE_NAME_CHANGE;
47
* String passed on the command line when an app is run as the result
48
* of a call to CeRunAppAtTime().
50
APP_RUN_AT_TIME = 'AppRunAtTime';
52
* Prefix of the command line when the user requests to run the application
53
* that "owns" a notification. It is followed by a space, and the
54
* stringized version of the notification handle.
56
APP_RUN_TO_HANDLE_NOTIFICATION = 'AppRunToHandleNotification';
58
* Strings passed on the command line when an event occurs that the
59
* app has requested via CeRunAppAtEvent. Note that some of these
60
* strings will be used as the command line *prefix*, since the rest
61
* of the command line will be used as a parameter.
63
APP_RUN_AFTER_TIME_CHANGE = 'AppRunAfterTimeChange';
64
APP_RUN_AFTER_SYNC = 'AppRunAfterSync';
65
APP_RUN_AT_AC_POWER_ON = 'AppRunAtAcPowerOn';
66
APP_RUN_AT_AC_POWER_OFF = 'AppRunAtAcPowerOff';
67
APP_RUN_AT_NET_CONNECT = 'AppRunAtNetConnect';
68
APP_RUN_AT_NET_DISCONNECT = 'AppRunAtNetDisconnect';
69
APP_RUN_AT_DEVICE_CHANGE = 'AppRunDeviceChange';
70
APP_RUN_AT_IR_DISCOVERY = 'AppRunAtIrDiscovery';
71
APP_RUN_AT_RS232_DETECT = 'AppRunAtRs232Detect';
72
APP_RUN_AFTER_RESTORE = 'AppRunAfterRestore';
73
APP_RUN_AFTER_WAKEUP = 'AppRunAfterWakeup';
74
APP_RUN_AFTER_TZ_CHANGE = 'AppRunAfterTzChange';
75
APP_RUN_AFTER_EXTENDED_EVENT = 'AppRunAfterExtendedEvent';
77
* Strings passed on the end of the command line for the event,
78
* NOTIFICATION_EVENT_DEVICE_CHANGE. The general form will be
79
* "/op devicename" for instance "/ADD COM2:"
81
NOTIFY_DEVICE_ADD = '/ADD';
82
NOTIFY_DEVICE_REMOVE = '/REMOVE';
84
* @struct CE_USER_NOTIFICATION | User Notification Structure
86
* @comm This structure is passed in to <f CeGetUserNotificationPreferences>.
87
* Initial settings are used to populate the dialog. If the function
88
* returns TRUE, the returned settings should be saved, and considered when
89
* calling <f CeSetUserNotification>. Settings for hardware not on the
90
* current device will be ignored.
92
* It is also used when calling <f CeSetUserNotification>, to describe
93
* what should happen when the notification time is reached.
95
{ PUN_* flags. Flags not valid on a given }
96
{ hardware platform will be ignored. }
97
PUN_LED = 1; {@flag PUN_LED | LED flag. Set if the LED should be }
98
{ flashed when the notification occurs. }
99
PUN_VIBRATE = 2; {@flag PUN_VIBRATE | Vibrate flag. Set if the device should }
101
PUN_DIALOG = 4; {@flag PUN_DIALOG | Dialog flag. Set if a dialog should be }
102
{ displayed (the app must provide title and text }
103
{ when calling <f CeSetUserNotification>). }
104
PUN_SOUND = 8; {@flag PUN_SOUND | Sound flag. Set if the sound specified }
105
{ in pwszSound should be played. }
106
PUN_REPEAT = 16; {@flag PUN_REPEAT | Sound repeat flag. Set if the sound }
107
{ specified in pwszSound should be repeated progressively. }
108
PUN_PRIVATE = 32; {@flag PUN_PRIVATE | Dialog box z-order flag. Set if the }
109
{ notification dialog box should come up behind the password. }
110
{@field Action Flags. Any combination of the }
111
{@field Dialog Title. Required if PUN_DIALOG is set, ignored }
112
{ otherwise. Ignored by CeGetUserNotificationPreferences(). }
113
{@field Dialog Text. Required if PUN_DIALOG is set, ignored }
114
{ otherwise. Ignored by CeGetUserNotificationPreferences(). }
115
{@field Sound string as supplied to sndPlaySound. }
116
{ CeSetUserNotification() ignores it if PUN_SOUND is not set. }
117
{@field Max Sound string length. Specifies the }
118
{ maximum length of the string that can be copied }
119
{ into the pwszSound buffer by }
120
{ CeGetUserNotificationPreferences(). }
121
{ Should be at least MAX_PATH * sizeof(TCHAR). }
122
{ Ignored by CeSetUserNotification(). }
124
{@field Reserved. Must be NULL or a pointer to }
125
{ platform-defined expansion structure. }
126
{ The first dword of the structure }
127
{ indicates the size of the structure. }
128
{ void *pExpansion; }
131
UserNotificationType = record
133
pwszDialogTitle : ^TCHAR;
134
pwszDialogText : ^TCHAR;
139
CE_USER_NOTIFICATION = UserNotificationType;
140
PCE_USER_NOTIFICATION = ^UserNotificationType;
143
CNT_EVENT = 1; {@flag CNT_EVENT | System event notification }
144
CNT_TIME = 2; {@flag CNT_TIME | Time-based notification }
145
CNT_PERIOD = 3; {@flag CNT_PERIOD | Time-based notification is active for }
146
{ time period between stStart and stEnd }
147
CNT_CLASSICTIME = 4; {@flag CNT_CLASSICTIME | equivalent to using (obsolete) }
148
{ CeSetUserNotification function - standard command line is }
149
{ supplied. lpszArguments must be NULL }
150
{@field dwType Notification type }
151
{@field dwEvent - type of event if dwType == CNT_EVENT }
152
{@field lpszApplication - name of application to execute }
153
{@field lpszArguments - command line (sans app name) }
154
{@field stStartTime - begin of notification period }
155
{@field stEndTime - end of notification period }
157
UserNotificationTrigger = record
161
lpszApplication : ^TCHAR;
162
lpszArguments : ^TCHAR;
163
stStartTime : SYSTEMTIME;
164
stEndTime : SYSTEMTIME;
166
CE_NOTIFICATION_TRIGGER = UserNotificationTrigger;
167
PCE_NOTIFICATION_TRIGGER = ^UserNotificationTrigger;
169
{ Application name can be prefixed with the following strings to specify different }
170
{ named objects rather than an application. The action varies depending on the prefix. }
171
{ In case of named event, the event gets signaled. }
175
NAMED_EVENT_PREFIX_TEXT = '\\.\Notifications\NamedEvents\';
176
NAMED_EVENT_PREFIX_LEN = 30;
180
UserNotificationInfoHeader = record
181
hNotification : HANDLE;
183
pcent : ^CE_NOTIFICATION_TRIGGER;
184
pceun : ^CE_USER_NOTIFICATION;
186
CE_NOTIFICATION_INFO_HEADER = UserNotificationInfoHeader;
187
PCE_NOTIFICATION_INFO_HEADER = ^UserNotificationInfoHeader;
188
{ Declarations of User Notification APIs. }
189
{ C++ extern C conditionnal removed }
191
{ @CESYSGEN IF GWES_NOTIFY }
193
function CeGetUserNotificationPreferences(hWndParent:HWND; lpNotification:PCE_USER_NOTIFICATION):BOOL;external KernelDLL name 'CeGetUserNotificationPreferences';
194
function CeSetUserNotificationEx(hNotification:HANDLE; pcnt:PCE_NOTIFICATION_TRIGGER; pceun:PCE_USER_NOTIFICATION):HANDLE;external KernelDLL name 'CeSetUserNotificationEx';
195
function CeClearUserNotification(hNotification:HANDLE):BOOL;external KernelDLL name 'CeClearUserNotification';
196
function CeGetUserNotification(hNotification:HANDLE; cBufferSize:DWORD; pcBytesNeeded:LPDWORD; pBuffer:LPBYTE):BOOL;external KernelDLL name 'CeGetUserNotification';
197
function CeGetUserNotificationHandles(rghNotifications:PHANDLE; cHandles:DWORD; pcHandlesNeeded:LPDWORD):BOOL;external KernelDLL name 'CeGetUserNotificationHandles';
198
{ Obsolete; provided to maintain compatibility only }
199
function CeSetUserNotification(hNotification:HANDLE; pwszAppName:pTCHAR; var lpTime:SYSTEMTIME; lpUserNotification:PCE_USER_NOTIFICATION):HANDLE;external KernelDLL name 'CeSetUserNotification';
200
function CeRunAppAtTime(pwszAppName:pTCHAR; var lpTime:SYSTEMTIME):BOOL;external KernelDLL name 'CeRunAppAtTime';
201
function CeRunAppAtEvent(pwszAppName:pTCHAR; lWhichEvent:LONG):BOOL;external KernelDLL name 'CeRunAppAtEvent';
202
function CeHandleAppNotifications(pwszAppName:pTCHAR):BOOL;external KernelDLL name 'CeHandleAppNotifications';