diff --git a/.gitattributes b/.gitattributes index f54a8b5567..0c85a6d132 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4444,6 +4444,16 @@ packages/uuid/src/libuuid.pp svneol=native#text/plain packages/uuid/src/macuuid.pp svneol=native#text/plain packages/uuid/tests/testlibuid.pp svneol=native#text/plain packages/uuid/tests/testuid.pp svneol=native#text/plain +packages/winceunits/src/aygshell.inc svneol=native#text/plain +packages/winceunits/src/ceshell.inc svneol=native#text/plain +packages/winceunits/src/commctrl.inc svneol=native#text/plain +packages/winceunits/src/commdlg.inc svneol=native#text/plain +packages/winceunits/src/iphlpapi.inc svneol=native#text/plain +packages/winceunits/src/notify.inc svneol=native#text/plain +packages/winceunits/src/oleaut32.inc svneol=native#text/plain +packages/winceunits/src/power.inc svneol=native#text/plain +packages/winceunits/src/simmgr.inc svneol=native#text/plain +packages/winceunits/src/tapi.inc svneol=native#text/plain packages/winunits-base/Makefile svneol=native#text/plain packages/winunits-base/Makefile.fpc svneol=native#text/plain packages/winunits-base/fpmake.pp svneol=native#text/plain @@ -5981,25 +5991,15 @@ rtl/wince/system.pp svneol=native#text/plain rtl/wince/sysutils.pp svneol=native#text/plain rtl/wince/varutils.pp svneol=native#text/plain rtl/wince/windows.pp svneol=native#text/plain -rtl/wince/wininc/aygshell.inc svneol=native#text/plain rtl/wince/wininc/base.inc svneol=native#text/plain rtl/wince/wininc/cemiss.inc svneol=native#text/plain -rtl/wince/wininc/ceshell.inc svneol=native#text/plain -rtl/wince/wininc/commctrl.inc svneol=native#text/plain -rtl/wince/wininc/commdlg.inc svneol=native#text/plain rtl/wince/wininc/coredll.inc svneol=native#text/plain rtl/wince/wininc/defines.inc svneol=native#text/plain rtl/wince/wininc/errors.inc svneol=native#text/plain -rtl/wince/wininc/iphlpapi.inc svneol=native#text/plain rtl/wince/wininc/makefile.inc svneol=native#text/plain rtl/wince/wininc/messages.inc svneol=native#text/plain -rtl/wince/wininc/notify.inc -text -rtl/wince/wininc/oleaut32.inc svneol=native#text/plain -rtl/wince/wininc/power.inc -text rtl/wince/wininc/redef.inc svneol=native#text/plain -rtl/wince/wininc/simmgr.inc svneol=native#text/plain rtl/wince/wininc/struct.inc svneol=native#text/plain -rtl/wince/wininc/tapi.inc svneol=native#text/plain rtl/wince/winres.inc -text rtl/wince/winsock.pp svneol=native#text/plain rtl/wince/winsock2.pp svneol=native#text/plain diff --git a/rtl/wince/wininc/aygshell.inc b/packages/winceunits/src/aygshell.inc similarity index 100% rename from rtl/wince/wininc/aygshell.inc rename to packages/winceunits/src/aygshell.inc diff --git a/rtl/wince/wininc/ceshell.inc b/packages/winceunits/src/ceshell.inc similarity index 97% rename from rtl/wince/wininc/ceshell.inc rename to packages/winceunits/src/ceshell.inc index 6fc8bcb588..404e49936a 100644 --- a/rtl/wince/wininc/ceshell.inc +++ b/packages/winceunits/src/ceshell.inc @@ -220,7 +220,9 @@ type // functions //***************************************************************************** function SHFileOperation(lpFileOp:LPSHFILEOPSTRUCTW): longint; external ShellDLL name 'SHFileOperationW'; +function SHFileOperation(const lpFileOp:SHFILEOPSTRUCTW): longint; external ShellDLL name 'SHFileOperationW'; function SHFileOperationW(lpFileOp:LPSHFILEOPSTRUCTW): longint; external ShellDLL name 'SHFileOperationW'; +function SHFileOperationW(const lpFileOp:SHFILEOPSTRUCTW): longint; external ShellDLL name 'SHFileOperationW'; function SHGetPathFromIDList(_para1:LPCITEMIDLIST; _para2:LPTSTR):WINBOOL; external ShellDLL name 'SHGetPathFromIDList'; function SHGetPathFromIDListW(_para1:LPCITEMIDLIST; _para2:LPTSTR):WINBOOL; external ShellDLL name 'SHGetPathFromIDList'; function SHGetMalloc(var ppMalloc: LPMALLOC): HRESULT; external ShellDLL name 'SHGetMalloc'; diff --git a/rtl/wince/wininc/commctrl.inc b/packages/winceunits/src/commctrl.inc similarity index 98% rename from rtl/wince/wininc/commctrl.inc rename to packages/winceunits/src/commctrl.inc index 02813366ac..f0bb860eb4 100644 --- a/rtl/wince/wininc/commctrl.inc +++ b/packages/winceunits/src/commctrl.inc @@ -170,19 +170,6 @@ const NM_KEYDOWN = (NM_FIRST-15); NM_RECOGNIZEGESTURE = (NM_FIRST-50); - { Header control } - HDM_DELETEITEM = 4610; - HDM_GETITEMW = 4619; - HDM_INSERTITEMW = 4618; - HDM_SETITEMW = 4620; - - HDM_GETITEM = HDM_GETITEMW; - HDM_INSERTITEM = HDM_INSERTITEMW; - HDM_SETITEM = HDM_SETITEMW; - - HDM_GETITEMCOUNT = 4608; - HDM_HITTEST = 4614; - HDM_LAYOUT = 4613; { Header control notifications } HDN_BEGINTRACKW = HDN_FIRST-26; HDN_DIVIDERDBLCLICKW = HDN_FIRST-25; diff --git a/rtl/wince/wininc/commdlg.inc b/packages/winceunits/src/commdlg.inc similarity index 100% rename from rtl/wince/wininc/commdlg.inc rename to packages/winceunits/src/commdlg.inc diff --git a/rtl/wince/wininc/iphlpapi.inc b/packages/winceunits/src/iphlpapi.inc similarity index 100% rename from rtl/wince/wininc/iphlpapi.inc rename to packages/winceunits/src/iphlpapi.inc diff --git a/rtl/wince/wininc/notify.inc b/packages/winceunits/src/notify.inc similarity index 97% rename from rtl/wince/wininc/notify.inc rename to packages/winceunits/src/notify.inc index bef7821452..9fbbb4c2ec 100644 --- a/rtl/wince/wininc/notify.inc +++ b/packages/winceunits/src/notify.inc @@ -1,198 +1,198 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 2007 Free Pascal development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - 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. - - ********************************************************************** - - Automatically converted by H2Pas 1.0.0 from notify.h - The following command line parameters were used: - -d - -c - -w - notify.h -} - -{$ifdef read_interface} - -const - NOTIFICATION_EVENT_NONE = 0; - NOTIFICATION_EVENT_TIME_CHANGE = 1; - NOTIFICATION_EVENT_SYNC_END = 2; - NOTIFICATION_EVENT_ON_AC_POWER = 3; - NOTIFICATION_EVENT_OFF_AC_POWER = 4; - NOTIFICATION_EVENT_NET_CONNECT = 5; - NOTIFICATION_EVENT_NET_DISCONNECT = 6; - NOTIFICATION_EVENT_DEVICE_CHANGE = 7; - NOTIFICATION_EVENT_IR_DISCOVERED = 8; - NOTIFICATION_EVENT_RS232_DETECTED = 9; - NOTIFICATION_EVENT_RESTORE_END = 10; - NOTIFICATION_EVENT_WAKEUP = 11; - NOTIFICATION_EVENT_TZ_CHANGE = 12; - NOTIFICATION_EVENT_MACHINE_NAME_CHANGE = 13; - NOTIFICATION_EVENT_LAST = NOTIFICATION_EVENT_MACHINE_NAME_CHANGE; -{ - * String passed on the command line when an app is run as the result - * of a call to CeRunAppAtTime(). - } - APP_RUN_AT_TIME = 'AppRunAtTime'; -{ - * Prefix of the command line when the user requests to run the application - * that "owns" a notification. It is followed by a space, and the - * stringized version of the notification handle. - } - APP_RUN_TO_HANDLE_NOTIFICATION = 'AppRunToHandleNotification'; -{ - * Strings passed on the command line when an event occurs that the - * app has requested via CeRunAppAtEvent. Note that some of these - * strings will be used as the command line *prefix*, since the rest - * of the command line will be used as a parameter. - } - APP_RUN_AFTER_TIME_CHANGE = 'AppRunAfterTimeChange'; - APP_RUN_AFTER_SYNC = 'AppRunAfterSync'; - APP_RUN_AT_AC_POWER_ON = 'AppRunAtAcPowerOn'; - APP_RUN_AT_AC_POWER_OFF = 'AppRunAtAcPowerOff'; - APP_RUN_AT_NET_CONNECT = 'AppRunAtNetConnect'; - APP_RUN_AT_NET_DISCONNECT = 'AppRunAtNetDisconnect'; - APP_RUN_AT_DEVICE_CHANGE = 'AppRunDeviceChange'; - APP_RUN_AT_IR_DISCOVERY = 'AppRunAtIrDiscovery'; - APP_RUN_AT_RS232_DETECT = 'AppRunAtRs232Detect'; - APP_RUN_AFTER_RESTORE = 'AppRunAfterRestore'; - APP_RUN_AFTER_WAKEUP = 'AppRunAfterWakeup'; - APP_RUN_AFTER_TZ_CHANGE = 'AppRunAfterTzChange'; - APP_RUN_AFTER_EXTENDED_EVENT = 'AppRunAfterExtendedEvent'; -{ - * Strings passed on the end of the command line for the event, - * NOTIFICATION_EVENT_DEVICE_CHANGE. The general form will be - * "/op devicename" for instance "/ADD COM2:" - } - NOTIFY_DEVICE_ADD = '/ADD'; - NOTIFY_DEVICE_REMOVE = '/REMOVE'; -{ - * @struct CE_USER_NOTIFICATION | User Notification Structure - * - * @comm This structure is passed in to . - * Initial settings are used to populate the dialog. If the function - * returns TRUE, the returned settings should be saved, and considered when - * calling . Settings for hardware not on the - * current device will be ignored. - * - * It is also used when calling , to describe - * what should happen when the notification time is reached. - } -{ PUN_* flags. Flags not valid on a given } -{ hardware platform will be ignored. } - PUN_LED = 1; {@flag PUN_LED | LED flag. Set if the LED should be } -{ flashed when the notification occurs. } - PUN_VIBRATE = 2; {@flag PUN_VIBRATE | Vibrate flag. Set if the device should } -{ be vibrated. } - PUN_DIALOG = 4; {@flag PUN_DIALOG | Dialog flag. Set if a dialog should be } -{ displayed (the app must provide title and text } -{ when calling ). } - PUN_SOUND = 8; {@flag PUN_SOUND | Sound flag. Set if the sound specified } -{ in pwszSound should be played. } - PUN_REPEAT = 16; {@flag PUN_REPEAT | Sound repeat flag. Set if the sound } -{ specified in pwszSound should be repeated progressively. } - PUN_PRIVATE = 32; {@flag PUN_PRIVATE | Dialog box z-order flag. Set if the } -{ notification dialog box should come up behind the password. } -{@field Action Flags. Any combination of the } -{@field Dialog Title. Required if PUN_DIALOG is set, ignored } -{ otherwise. Ignored by CeGetUserNotificationPreferences(). } -{@field Dialog Text. Required if PUN_DIALOG is set, ignored } -{ otherwise. Ignored by CeGetUserNotificationPreferences(). } -{@field Sound string as supplied to sndPlaySound. } -{ CeSetUserNotification() ignores it if PUN_SOUND is not set. } -{@field Max Sound string length. Specifies the } -{ maximum length of the string that can be copied } -{ into the pwszSound buffer by } -{ CeGetUserNotificationPreferences(). } -{ Should be at least MAX_PATH * sizeof(TCHAR). } -{ Ignored by CeSetUserNotification(). } -{ union } -{@field Reserved. Must be NULL or a pointer to } -{ platform-defined expansion structure. } -{ The first dword of the structure } -{ indicates the size of the structure. } -{ void *pExpansion; } -{ ; } -type - UserNotificationType = record - ActionFlags : DWORD; - pwszDialogTitle : ^TCHAR; - pwszDialogText : ^TCHAR; - pwszSound : ^TCHAR; - nMaxSound : DWORD; - dwReserved : DWORD; - end; - CE_USER_NOTIFICATION = UserNotificationType; - PCE_USER_NOTIFICATION = ^UserNotificationType; - -const - CNT_EVENT = 1; {@flag CNT_EVENT | System event notification } - CNT_TIME = 2; {@flag CNT_TIME | Time-based notification } - CNT_PERIOD = 3; {@flag CNT_PERIOD | Time-based notification is active for } -{ time period between stStart and stEnd } - CNT_CLASSICTIME = 4; {@flag CNT_CLASSICTIME | equivalent to using (obsolete) } -{ CeSetUserNotification function - standard command line is } -{ supplied. lpszArguments must be NULL } -{@field dwType Notification type } -{@field dwEvent - type of event if dwType == CNT_EVENT } -{@field lpszApplication - name of application to execute } -{@field lpszArguments - command line (sans app name) } -{@field stStartTime - begin of notification period } -{@field stEndTime - end of notification period } -type - UserNotificationTrigger = record - dwSize : DWORD; - dwType : DWORD; - dwEvent : DWORD; - lpszApplication : ^TCHAR; - lpszArguments : ^TCHAR; - stStartTime : SYSTEMTIME; - stEndTime : SYSTEMTIME; - end; - CE_NOTIFICATION_TRIGGER = UserNotificationTrigger; - PCE_NOTIFICATION_TRIGGER = ^UserNotificationTrigger; -{ } -{ Application name can be prefixed with the following strings to specify different } -{ named objects rather than an application. The action varies depending on the prefix. } -{ In case of named event, the event gets signaled. } -{ } - -const - NAMED_EVENT_PREFIX_TEXT = '\\.\Notifications\NamedEvents\'; - NAMED_EVENT_PREFIX_LEN = 30; - CNS_SIGNALLED = 1; - -type - UserNotificationInfoHeader = record - hNotification : HANDLE; - dwStatus : DWORD; - pcent : ^CE_NOTIFICATION_TRIGGER; - pceun : ^CE_USER_NOTIFICATION; - end; - CE_NOTIFICATION_INFO_HEADER = UserNotificationInfoHeader; - PCE_NOTIFICATION_INFO_HEADER = ^UserNotificationInfoHeader; -{ Declarations of User Notification APIs. } -{ C++ extern C conditionnal removed } -{__cplusplus } -{ @CESYSGEN IF GWES_NOTIFY } - -function CeGetUserNotificationPreferences(hWndParent:HWND; lpNotification:PCE_USER_NOTIFICATION):BOOL;external KernelDLL name 'CeGetUserNotificationPreferences'; -function CeSetUserNotificationEx(hNotification:HANDLE; pcnt:PCE_NOTIFICATION_TRIGGER; pceun:PCE_USER_NOTIFICATION):HANDLE;external KernelDLL name 'CeSetUserNotificationEx'; -function CeClearUserNotification(hNotification:HANDLE):BOOL;external KernelDLL name 'CeClearUserNotification'; -function CeGetUserNotification(hNotification:HANDLE; cBufferSize:DWORD; pcBytesNeeded:LPDWORD; pBuffer:LPBYTE):BOOL;external KernelDLL name 'CeGetUserNotification'; -function CeGetUserNotificationHandles(rghNotifications:PHANDLE; cHandles:DWORD; pcHandlesNeeded:LPDWORD):BOOL;external KernelDLL name 'CeGetUserNotificationHandles'; -{ Obsolete; provided to maintain compatibility only } -function CeSetUserNotification(hNotification:HANDLE; pwszAppName:pTCHAR; var lpTime:SYSTEMTIME; lpUserNotification:PCE_USER_NOTIFICATION):HANDLE;external KernelDLL name 'CeSetUserNotification'; -function CeRunAppAtTime(pwszAppName:pTCHAR; var lpTime:SYSTEMTIME):BOOL;external KernelDLL name 'CeRunAppAtTime'; -function CeRunAppAtEvent(pwszAppName:pTCHAR; lWhichEvent:LONG):BOOL;external KernelDLL name 'CeRunAppAtEvent'; -function CeHandleAppNotifications(pwszAppName:pTCHAR):BOOL;external KernelDLL name 'CeHandleAppNotifications'; - -{$endif read_interface} +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2007 Free Pascal development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + 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. + + ********************************************************************** + + Automatically converted by H2Pas 1.0.0 from notify.h + The following command line parameters were used: + -d + -c + -w + notify.h +} + +{$ifdef read_interface} + +const + NOTIFICATION_EVENT_NONE = 0; + NOTIFICATION_EVENT_TIME_CHANGE = 1; + NOTIFICATION_EVENT_SYNC_END = 2; + NOTIFICATION_EVENT_ON_AC_POWER = 3; + NOTIFICATION_EVENT_OFF_AC_POWER = 4; + NOTIFICATION_EVENT_NET_CONNECT = 5; + NOTIFICATION_EVENT_NET_DISCONNECT = 6; + NOTIFICATION_EVENT_DEVICE_CHANGE = 7; + NOTIFICATION_EVENT_IR_DISCOVERED = 8; + NOTIFICATION_EVENT_RS232_DETECTED = 9; + NOTIFICATION_EVENT_RESTORE_END = 10; + NOTIFICATION_EVENT_WAKEUP = 11; + NOTIFICATION_EVENT_TZ_CHANGE = 12; + NOTIFICATION_EVENT_MACHINE_NAME_CHANGE = 13; + NOTIFICATION_EVENT_LAST = NOTIFICATION_EVENT_MACHINE_NAME_CHANGE; +{ + * String passed on the command line when an app is run as the result + * of a call to CeRunAppAtTime(). + } + APP_RUN_AT_TIME = 'AppRunAtTime'; +{ + * Prefix of the command line when the user requests to run the application + * that "owns" a notification. It is followed by a space, and the + * stringized version of the notification handle. + } + APP_RUN_TO_HANDLE_NOTIFICATION = 'AppRunToHandleNotification'; +{ + * Strings passed on the command line when an event occurs that the + * app has requested via CeRunAppAtEvent. Note that some of these + * strings will be used as the command line *prefix*, since the rest + * of the command line will be used as a parameter. + } + APP_RUN_AFTER_TIME_CHANGE = 'AppRunAfterTimeChange'; + APP_RUN_AFTER_SYNC = 'AppRunAfterSync'; + APP_RUN_AT_AC_POWER_ON = 'AppRunAtAcPowerOn'; + APP_RUN_AT_AC_POWER_OFF = 'AppRunAtAcPowerOff'; + APP_RUN_AT_NET_CONNECT = 'AppRunAtNetConnect'; + APP_RUN_AT_NET_DISCONNECT = 'AppRunAtNetDisconnect'; + APP_RUN_AT_DEVICE_CHANGE = 'AppRunDeviceChange'; + APP_RUN_AT_IR_DISCOVERY = 'AppRunAtIrDiscovery'; + APP_RUN_AT_RS232_DETECT = 'AppRunAtRs232Detect'; + APP_RUN_AFTER_RESTORE = 'AppRunAfterRestore'; + APP_RUN_AFTER_WAKEUP = 'AppRunAfterWakeup'; + APP_RUN_AFTER_TZ_CHANGE = 'AppRunAfterTzChange'; + APP_RUN_AFTER_EXTENDED_EVENT = 'AppRunAfterExtendedEvent'; +{ + * Strings passed on the end of the command line for the event, + * NOTIFICATION_EVENT_DEVICE_CHANGE. The general form will be + * "/op devicename" for instance "/ADD COM2:" + } + NOTIFY_DEVICE_ADD = '/ADD'; + NOTIFY_DEVICE_REMOVE = '/REMOVE'; +{ + * @struct CE_USER_NOTIFICATION | User Notification Structure + * + * @comm This structure is passed in to . + * Initial settings are used to populate the dialog. If the function + * returns TRUE, the returned settings should be saved, and considered when + * calling . Settings for hardware not on the + * current device will be ignored. + * + * It is also used when calling , to describe + * what should happen when the notification time is reached. + } +{ PUN_* flags. Flags not valid on a given } +{ hardware platform will be ignored. } + PUN_LED = 1; {@flag PUN_LED | LED flag. Set if the LED should be } +{ flashed when the notification occurs. } + PUN_VIBRATE = 2; {@flag PUN_VIBRATE | Vibrate flag. Set if the device should } +{ be vibrated. } + PUN_DIALOG = 4; {@flag PUN_DIALOG | Dialog flag. Set if a dialog should be } +{ displayed (the app must provide title and text } +{ when calling ). } + PUN_SOUND = 8; {@flag PUN_SOUND | Sound flag. Set if the sound specified } +{ in pwszSound should be played. } + PUN_REPEAT = 16; {@flag PUN_REPEAT | Sound repeat flag. Set if the sound } +{ specified in pwszSound should be repeated progressively. } + PUN_PRIVATE = 32; {@flag PUN_PRIVATE | Dialog box z-order flag. Set if the } +{ notification dialog box should come up behind the password. } +{@field Action Flags. Any combination of the } +{@field Dialog Title. Required if PUN_DIALOG is set, ignored } +{ otherwise. Ignored by CeGetUserNotificationPreferences(). } +{@field Dialog Text. Required if PUN_DIALOG is set, ignored } +{ otherwise. Ignored by CeGetUserNotificationPreferences(). } +{@field Sound string as supplied to sndPlaySound. } +{ CeSetUserNotification() ignores it if PUN_SOUND is not set. } +{@field Max Sound string length. Specifies the } +{ maximum length of the string that can be copied } +{ into the pwszSound buffer by } +{ CeGetUserNotificationPreferences(). } +{ Should be at least MAX_PATH * sizeof(TCHAR). } +{ Ignored by CeSetUserNotification(). } +{ union } +{@field Reserved. Must be NULL or a pointer to } +{ platform-defined expansion structure. } +{ The first dword of the structure } +{ indicates the size of the structure. } +{ void *pExpansion; } +{ ; } +type + UserNotificationType = record + ActionFlags : DWORD; + pwszDialogTitle : ^TCHAR; + pwszDialogText : ^TCHAR; + pwszSound : ^TCHAR; + nMaxSound : DWORD; + dwReserved : DWORD; + end; + CE_USER_NOTIFICATION = UserNotificationType; + PCE_USER_NOTIFICATION = ^UserNotificationType; + +const + CNT_EVENT = 1; {@flag CNT_EVENT | System event notification } + CNT_TIME = 2; {@flag CNT_TIME | Time-based notification } + CNT_PERIOD = 3; {@flag CNT_PERIOD | Time-based notification is active for } +{ time period between stStart and stEnd } + CNT_CLASSICTIME = 4; {@flag CNT_CLASSICTIME | equivalent to using (obsolete) } +{ CeSetUserNotification function - standard command line is } +{ supplied. lpszArguments must be NULL } +{@field dwType Notification type } +{@field dwEvent - type of event if dwType == CNT_EVENT } +{@field lpszApplication - name of application to execute } +{@field lpszArguments - command line (sans app name) } +{@field stStartTime - begin of notification period } +{@field stEndTime - end of notification period } +type + UserNotificationTrigger = record + dwSize : DWORD; + dwType : DWORD; + dwEvent : DWORD; + lpszApplication : ^TCHAR; + lpszArguments : ^TCHAR; + stStartTime : SYSTEMTIME; + stEndTime : SYSTEMTIME; + end; + CE_NOTIFICATION_TRIGGER = UserNotificationTrigger; + PCE_NOTIFICATION_TRIGGER = ^UserNotificationTrigger; +{ } +{ Application name can be prefixed with the following strings to specify different } +{ named objects rather than an application. The action varies depending on the prefix. } +{ In case of named event, the event gets signaled. } +{ } + +const + NAMED_EVENT_PREFIX_TEXT = '\\.\Notifications\NamedEvents\'; + NAMED_EVENT_PREFIX_LEN = 30; + CNS_SIGNALLED = 1; + +type + UserNotificationInfoHeader = record + hNotification : HANDLE; + dwStatus : DWORD; + pcent : ^CE_NOTIFICATION_TRIGGER; + pceun : ^CE_USER_NOTIFICATION; + end; + CE_NOTIFICATION_INFO_HEADER = UserNotificationInfoHeader; + PCE_NOTIFICATION_INFO_HEADER = ^UserNotificationInfoHeader; +{ Declarations of User Notification APIs. } +{ C++ extern C conditionnal removed } +{__cplusplus } +{ @CESYSGEN IF GWES_NOTIFY } + +function CeGetUserNotificationPreferences(hWndParent:HWND; lpNotification:PCE_USER_NOTIFICATION):BOOL;external KernelDLL name 'CeGetUserNotificationPreferences'; +function CeSetUserNotificationEx(hNotification:HANDLE; pcnt:PCE_NOTIFICATION_TRIGGER; pceun:PCE_USER_NOTIFICATION):HANDLE;external KernelDLL name 'CeSetUserNotificationEx'; +function CeClearUserNotification(hNotification:HANDLE):BOOL;external KernelDLL name 'CeClearUserNotification'; +function CeGetUserNotification(hNotification:HANDLE; cBufferSize:DWORD; pcBytesNeeded:LPDWORD; pBuffer:LPBYTE):BOOL;external KernelDLL name 'CeGetUserNotification'; +function CeGetUserNotificationHandles(rghNotifications:PHANDLE; cHandles:DWORD; pcHandlesNeeded:LPDWORD):BOOL;external KernelDLL name 'CeGetUserNotificationHandles'; +{ Obsolete; provided to maintain compatibility only } +function CeSetUserNotification(hNotification:HANDLE; pwszAppName:pTCHAR; var lpTime:SYSTEMTIME; lpUserNotification:PCE_USER_NOTIFICATION):HANDLE;external KernelDLL name 'CeSetUserNotification'; +function CeRunAppAtTime(pwszAppName:pTCHAR; var lpTime:SYSTEMTIME):BOOL;external KernelDLL name 'CeRunAppAtTime'; +function CeRunAppAtEvent(pwszAppName:pTCHAR; lWhichEvent:LONG):BOOL;external KernelDLL name 'CeRunAppAtEvent'; +function CeHandleAppNotifications(pwszAppName:pTCHAR):BOOL;external KernelDLL name 'CeHandleAppNotifications'; + +{$endif read_interface} diff --git a/rtl/wince/wininc/oleaut32.inc b/packages/winceunits/src/oleaut32.inc similarity index 100% rename from rtl/wince/wininc/oleaut32.inc rename to packages/winceunits/src/oleaut32.inc diff --git a/rtl/wince/wininc/power.inc b/packages/winceunits/src/power.inc similarity index 97% rename from rtl/wince/wininc/power.inc rename to packages/winceunits/src/power.inc index 37cb07d54f..7a6f933c9a 100644 --- a/rtl/wince/wininc/power.inc +++ b/packages/winceunits/src/power.inc @@ -1,151 +1,151 @@ -{ - This file is part of the Free Pascal run time library. - Copyright (c) 2007 Free Pascal development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - 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. - - ********************************************************************** - - Automatically converted by H2Pas 1.0.0 from power.h - The following command line parameters were used: - -d - -c - -w - power.h -} - -{ Power Management APIs } - -{$ifdef read_interface} -const - AC_LINE_OFFLINE = $00; - AC_LINE_ONLINE = $01; - AC_LINE_BACKUP_POWER = $02; - AC_LINE_UNKNOWN = $FF; - BATTERY_FLAG_HIGH = $01; - BATTERY_FLAG_LOW = $02; - BATTERY_FLAG_CRITICAL = $04; - BATTERY_FLAG_CHARGING = $08; - BATTERY_FLAG_NO_BATTERY = $80; - BATTERY_FLAG_UNKNOWN = $FF; - BATTERY_PERCENTAGE_UNKNOWN = $FF; - BATTERY_LIFE_UNKNOWN = $FFFFFFFF; -type - - _SYSTEM_POWER_STATUS_EX = record - ACLineStatus : BYTE; - BatteryFlag : BYTE; - BatteryLifePercent : BYTE; - Reserved1 : BYTE; - BatteryLifeTime : DWORD; - BatteryFullLifeTime : DWORD; - Reserved2 : BYTE; - BackupBatteryFlag : BYTE; - BackupBatteryLifePercent : BYTE; - Reserved3 : BYTE; - BackupBatteryLifeTime : DWORD; - BackupBatteryFullLifeTime : DWORD; - end; - SYSTEM_POWER_STATUS_EX = _SYSTEM_POWER_STATUS_EX; - PSYSTEM_POWER_STATUS_EX = ^_SYSTEM_POWER_STATUS_EX; - LPSYSTEM_POWER_STATUS_EX = ^_SYSTEM_POWER_STATUS_EX; -{ - @struct SYSTEM_POWER_STATUS_EX2 | contains information about the power status - of the system. - - @field BYTE | ACLineStatus | AC power status. Must be one of - AC_LINE_OFFLINE, AC_LINE_ONLINE, AC_LINE_BACKUP_POWER, or AC_LINE_UNKNOWN. - - @field BYTE | BatteryFlag | Battery charge status. Must be one of - BATTERY_FLAG_HIGH, BATTERY_FLAG_LOW, BATTERY_FLAG_CRITICAL, - BATTERY_FLAG_CHARGING, BATTERY_FLAG_NO_BATTERY, or BATTERY_FLAG_UNKNOWN - - @field BYTE | BatteryLifePercent | Percentage of full battery charge - remaining. Must be in the range 0 to 100, or BATTERY_PERCENTAGE_UNKNOWN. - - @field BYTE | Reserved1 | Must be zero. - - @field DWORD | BatteryLifeTime | Number of seconds of battery life - remaining, or BATTERY_LIFE_UNKNOWN if remaining seconds are unknown. - - @field DWORD | BatteryFullLifeTime | Number of seconds of battery life when - at full charge, or BATTERY_LIFE_UNKNOWN if full lifetime is unknown. - - @field BYTE | Reserved2 | Must be zero. - - @field BYTE | BackupBatteryFlag | Backup battery charge status. Must be one - of BATTERY_FLAG_HIGH, BATTERY_FLAG_LOW, BATTERY_FLAG_CRITICAL, - BATTERY_FLAG_CHARGING, BATTERY_FLAG_NO_BATTERY, or BATTERY_FLAG_UNKNOWN. - - @field BYTE | BackupBatteryLifePercent | Percentage of full backup battery - charge remaining. Must be in the range 0 to 100, or - BATTERY_PERCENTAGE_UNKNOWN. - - @field BYTE | Reserved3 | Must be zero. - - @field DWORD | BackupBatteryLifeTime | Number of seconds of backup battery - life remaining, or BATTERY_LIFE_UNKNOWN if remaining seconds are unknown. - - @field DWORD | BackupBatteryFullLifeTime | Number of seconds of backup - battery life when at full charge, or BATTERY_LIFE_UNKNOWN if full lifetime - is unknown. - - } - -const - BATTERY_CHEMISTRY_ALKALINE = $01; - BATTERY_CHEMISTRY_NICD = $02; - BATTERY_CHEMISTRY_NIMH = $03; - BATTERY_CHEMISTRY_LION = $04; - BATTERY_CHEMISTRY_LIPOLY = $05; - BATTERY_CHEMISTRY_ZINCAIR = $06; - BATTERY_CHEMISTRY_UNKNOWN = $FF; -{ Above here is old struct, below are new fields } -{ Reports Reading of battery voltage in millivolts (0..65535 mV) } -{ Reports Instantaneous current drain (mA). 0..32767 for charge, 0 to -32768 for discharge } -{ Reports short term average of device current drain (mA). 0..32767 for charge, 0 to -32768 for discharge } -{ Reports time constant (mS) of integration used in reporting BatteryAverageCurrent } -{ Reports long-term cumulative average DISCHARGE (mAH). Reset by charging or changing the batteries. 0 to 32767 mAH } -{ Reports Battery temp in 0.1 degree C (-3276.8 to 3276.7 degrees C) } -{ Reports Reading of backup battery voltage } -{ See Chemistry defines above } -{ New fields can be added below, but don't change any existing ones } -type - - _SYSTEM_POWER_STATUS_EX2 = record - ACLineStatus : BYTE; - BatteryFlag : BYTE; - BatteryLifePercent : BYTE; - Reserved1 : BYTE; - BatteryLifeTime : DWORD; - BatteryFullLifeTime : DWORD; - Reserved2 : BYTE; - BackupBatteryFlag : BYTE; - BackupBatteryLifePercent : BYTE; - Reserved3 : BYTE; - BackupBatteryLifeTime : DWORD; - BackupBatteryFullLifeTime : DWORD; - BatteryVoltage : DWORD; - BatteryCurrent : DWORD; - BatteryAverageCurrent : DWORD; - BatteryAverageInterval : DWORD; - BatterymAHourConsumed : DWORD; - BatteryTemperature : DWORD; - BackupBatteryVoltage : DWORD; - BatteryChemistry : BYTE; - end; - SYSTEM_POWER_STATUS_EX2 = _SYSTEM_POWER_STATUS_EX2; - PSYSTEM_POWER_STATUS_EX2 = ^_SYSTEM_POWER_STATUS_EX2; - LPSYSTEM_POWER_STATUS_EX2 = ^_SYSTEM_POWER_STATUS_EX2; -{ @CESYSGEN IF COREDLL_BATTERY } - -function GetSystemPowerStatusEx(var SystemPowerStatusEx: SYSTEM_POWER_STATUS_EX; fUpdate:BOOL):BOOL;external KernelDLL name 'GetSystemPowerStatusEx'; -{ Return value : 0 = fail. Non-zero indicates length of returned data. } -function GetSystemPowerStatusEx2(var SystemPowerStatusEx2: SYSTEM_POWER_STATUS_EX2; dwLen:DWORD; fUpdate:BOOL):DWORD;external KernelDLL name 'GetSystemPowerStatusEx2'; - -{$endif read_interface} +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2007 Free Pascal development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + 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. + + ********************************************************************** + + Automatically converted by H2Pas 1.0.0 from power.h + The following command line parameters were used: + -d + -c + -w + power.h +} + +{ Power Management APIs } + +{$ifdef read_interface} +const + AC_LINE_OFFLINE = $00; + AC_LINE_ONLINE = $01; + AC_LINE_BACKUP_POWER = $02; + AC_LINE_UNKNOWN = $FF; + BATTERY_FLAG_HIGH = $01; + BATTERY_FLAG_LOW = $02; + BATTERY_FLAG_CRITICAL = $04; + BATTERY_FLAG_CHARGING = $08; + BATTERY_FLAG_NO_BATTERY = $80; + BATTERY_FLAG_UNKNOWN = $FF; + BATTERY_PERCENTAGE_UNKNOWN = $FF; + BATTERY_LIFE_UNKNOWN = $FFFFFFFF; +type + + _SYSTEM_POWER_STATUS_EX = record + ACLineStatus : BYTE; + BatteryFlag : BYTE; + BatteryLifePercent : BYTE; + Reserved1 : BYTE; + BatteryLifeTime : DWORD; + BatteryFullLifeTime : DWORD; + Reserved2 : BYTE; + BackupBatteryFlag : BYTE; + BackupBatteryLifePercent : BYTE; + Reserved3 : BYTE; + BackupBatteryLifeTime : DWORD; + BackupBatteryFullLifeTime : DWORD; + end; + SYSTEM_POWER_STATUS_EX = _SYSTEM_POWER_STATUS_EX; + PSYSTEM_POWER_STATUS_EX = ^_SYSTEM_POWER_STATUS_EX; + LPSYSTEM_POWER_STATUS_EX = ^_SYSTEM_POWER_STATUS_EX; +{ + @struct SYSTEM_POWER_STATUS_EX2 | contains information about the power status + of the system. + + @field BYTE | ACLineStatus | AC power status. Must be one of + AC_LINE_OFFLINE, AC_LINE_ONLINE, AC_LINE_BACKUP_POWER, or AC_LINE_UNKNOWN. + + @field BYTE | BatteryFlag | Battery charge status. Must be one of + BATTERY_FLAG_HIGH, BATTERY_FLAG_LOW, BATTERY_FLAG_CRITICAL, + BATTERY_FLAG_CHARGING, BATTERY_FLAG_NO_BATTERY, or BATTERY_FLAG_UNKNOWN + + @field BYTE | BatteryLifePercent | Percentage of full battery charge + remaining. Must be in the range 0 to 100, or BATTERY_PERCENTAGE_UNKNOWN. + + @field BYTE | Reserved1 | Must be zero. + + @field DWORD | BatteryLifeTime | Number of seconds of battery life + remaining, or BATTERY_LIFE_UNKNOWN if remaining seconds are unknown. + + @field DWORD | BatteryFullLifeTime | Number of seconds of battery life when + at full charge, or BATTERY_LIFE_UNKNOWN if full lifetime is unknown. + + @field BYTE | Reserved2 | Must be zero. + + @field BYTE | BackupBatteryFlag | Backup battery charge status. Must be one + of BATTERY_FLAG_HIGH, BATTERY_FLAG_LOW, BATTERY_FLAG_CRITICAL, + BATTERY_FLAG_CHARGING, BATTERY_FLAG_NO_BATTERY, or BATTERY_FLAG_UNKNOWN. + + @field BYTE | BackupBatteryLifePercent | Percentage of full backup battery + charge remaining. Must be in the range 0 to 100, or + BATTERY_PERCENTAGE_UNKNOWN. + + @field BYTE | Reserved3 | Must be zero. + + @field DWORD | BackupBatteryLifeTime | Number of seconds of backup battery + life remaining, or BATTERY_LIFE_UNKNOWN if remaining seconds are unknown. + + @field DWORD | BackupBatteryFullLifeTime | Number of seconds of backup + battery life when at full charge, or BATTERY_LIFE_UNKNOWN if full lifetime + is unknown. + + } + +const + BATTERY_CHEMISTRY_ALKALINE = $01; + BATTERY_CHEMISTRY_NICD = $02; + BATTERY_CHEMISTRY_NIMH = $03; + BATTERY_CHEMISTRY_LION = $04; + BATTERY_CHEMISTRY_LIPOLY = $05; + BATTERY_CHEMISTRY_ZINCAIR = $06; + BATTERY_CHEMISTRY_UNKNOWN = $FF; +{ Above here is old struct, below are new fields } +{ Reports Reading of battery voltage in millivolts (0..65535 mV) } +{ Reports Instantaneous current drain (mA). 0..32767 for charge, 0 to -32768 for discharge } +{ Reports short term average of device current drain (mA). 0..32767 for charge, 0 to -32768 for discharge } +{ Reports time constant (mS) of integration used in reporting BatteryAverageCurrent } +{ Reports long-term cumulative average DISCHARGE (mAH). Reset by charging or changing the batteries. 0 to 32767 mAH } +{ Reports Battery temp in 0.1 degree C (-3276.8 to 3276.7 degrees C) } +{ Reports Reading of backup battery voltage } +{ See Chemistry defines above } +{ New fields can be added below, but don't change any existing ones } +type + + _SYSTEM_POWER_STATUS_EX2 = record + ACLineStatus : BYTE; + BatteryFlag : BYTE; + BatteryLifePercent : BYTE; + Reserved1 : BYTE; + BatteryLifeTime : DWORD; + BatteryFullLifeTime : DWORD; + Reserved2 : BYTE; + BackupBatteryFlag : BYTE; + BackupBatteryLifePercent : BYTE; + Reserved3 : BYTE; + BackupBatteryLifeTime : DWORD; + BackupBatteryFullLifeTime : DWORD; + BatteryVoltage : DWORD; + BatteryCurrent : DWORD; + BatteryAverageCurrent : DWORD; + BatteryAverageInterval : DWORD; + BatterymAHourConsumed : DWORD; + BatteryTemperature : DWORD; + BackupBatteryVoltage : DWORD; + BatteryChemistry : BYTE; + end; + SYSTEM_POWER_STATUS_EX2 = _SYSTEM_POWER_STATUS_EX2; + PSYSTEM_POWER_STATUS_EX2 = ^_SYSTEM_POWER_STATUS_EX2; + LPSYSTEM_POWER_STATUS_EX2 = ^_SYSTEM_POWER_STATUS_EX2; +{ @CESYSGEN IF COREDLL_BATTERY } + +function GetSystemPowerStatusEx(var SystemPowerStatusEx: SYSTEM_POWER_STATUS_EX; fUpdate:BOOL):BOOL;external KernelDLL name 'GetSystemPowerStatusEx'; +{ Return value : 0 = fail. Non-zero indicates length of returned data. } +function GetSystemPowerStatusEx2(var SystemPowerStatusEx2: SYSTEM_POWER_STATUS_EX2; dwLen:DWORD; fUpdate:BOOL):DWORD;external KernelDLL name 'GetSystemPowerStatusEx2'; + +{$endif read_interface} diff --git a/rtl/wince/wininc/simmgr.inc b/packages/winceunits/src/simmgr.inc similarity index 100% rename from rtl/wince/wininc/simmgr.inc rename to packages/winceunits/src/simmgr.inc diff --git a/rtl/wince/wininc/tapi.inc b/packages/winceunits/src/tapi.inc similarity index 100% rename from rtl/wince/wininc/tapi.inc rename to packages/winceunits/src/tapi.inc diff --git a/rtl/wince/windows.pp b/rtl/wince/windows.pp index 82b1a66914..541c9885b3 100644 --- a/rtl/wince/windows.pp +++ b/rtl/wince/windows.pp @@ -41,16 +41,6 @@ interface {$i struct.inc} {$i messages.inc} {$i coredll.inc} -{$i aygshell.inc} -{$i commctrl.inc} -{$i commdlg.inc} -{$i ceshell.inc} -{$i oleaut32.inc} -{$i iphlpapi.inc} -{$i simmgr.inc} -{$i tapi.inc} -{$i notify.inc} -{$i power.inc} {$i cemiss.inc} {$i redef.inc} @@ -67,13 +57,6 @@ implementation {$i struct.inc} {$i messages.inc} {$i coredll.inc} -{$i aygshell.inc} -{$i commctrl.inc} -{$i commdlg.inc} -{$i ceshell.inc} -{$i oleaut32.inc} -{$i simmgr.inc} -{$i tapi.inc} {$i cemiss.inc} {$i redef.inc} diff --git a/rtl/wince/wininc/makefile.inc b/rtl/wince/wininc/makefile.inc index 546042eeac..4c83e77d9b 100644 --- a/rtl/wince/wininc/makefile.inc +++ b/rtl/wince/wininc/makefile.inc @@ -1 +1 @@ -WINDOWS_FILES=base errors defines struct redef aygshell cemiss ceshell commctrl coredll iphlpapi oleaut32 +WINDOWS_FILES=base errors defines struct redef cemiss coredll diff --git a/rtl/wince/wininc/messages.inc b/rtl/wince/wininc/messages.inc index eb15f7da90..e3c23e1a9f 100644 --- a/rtl/wince/wininc/messages.inc +++ b/rtl/wince/wininc/messages.inc @@ -247,6 +247,20 @@ EN_SAVECLIPBOARD = 1800; EN_SELCHANGE = 1794; EN_STOPNOUNDO = 1798; + + { Header control } + HDM_DELETEITEM = 4610; + HDM_GETITEMW = 4619; + HDM_INSERTITEMW = 4618; + HDM_SETITEMW = 4620; + + HDM_GETITEM = HDM_GETITEMW; + HDM_INSERTITEM = HDM_INSERTITEMW; + HDM_SETITEM = HDM_SETITEMW; + + HDM_GETITEMCOUNT = 4608; + HDM_HITTEST = 4614; + HDM_LAYOUT = 4613; { Hot key control } const diff --git a/rtl/wince/wininc/redef.inc b/rtl/wince/wininc/redef.inc index c58e0ff6a9..d46fbcf3d3 100644 --- a/rtl/wince/wininc/redef.inc +++ b/rtl/wince/wininc/redef.inc @@ -278,8 +278,6 @@ function SetScrollInfo(hWnd: HWND; BarFlag: Integer; const ScrollInfo: TScrollIn function SetSysColors(cElements: Integer; const lpaElements; const lpaRgbValues): BOOL; external KernelDLL name 'SetSysColors'; function SetSystemTime(var lpSystemTime:SYSTEMTIME):WINBOOL; external KernelDLL name 'SetSystemTime'; function SetThreadContext(hThread: THandle; const lpContext: TContext): BOOL; external KernelDLL name 'SetThreadContext'; -function SHFileOperation(const lpFileOp:SHFILEOPSTRUCTW): longint; external ShellDLL name 'SHFileOperationW'; -function SHFileOperationW(const lpFileOp:SHFILEOPSTRUCTW): longint; external ShellDLL name 'SHFileOperationW'; function StartDoc(DC: HDC; const p2: TDocInfo): Integer;external KernelDLL name 'StartDocW'; function StartDocW(DC: HDC; const p2: TDocInfoW): Integer;external KernelDLL name 'StartDocW'; function SubtractRect(var lprcDst: TRect; const lprcSrc1, lprcSrc2: TRect): BOOL; external KernelDLL name 'SubtractRect';