wince interface: added support for OnAsyncSocketMsg event from Ales Katona

git-svn-id: trunk@11219 -
This commit is contained in:
vincents 2007-05-29 19:27:37 +00:00
parent 3fe2db8ef9
commit 4698d08d12
3 changed files with 15 additions and 2 deletions

View File

@ -1874,7 +1874,12 @@ begin
end; end;
end; end;
End; End;
WM_LCL_SOCK_ASYNC:
begin
if (Window = TWinCEWidgetSet(WidgetSet).AppHandle) and
Assigned(TWinCEWidgetSet(WidgetSet).FOnAsyncSocketMsg) then
exit(TWinCEWidgetSet(WidgetSet).FOnAsyncSocketMsg(WParam, LParam))
end;
{$ifdef PassWin32MessagesToLCL} {$ifdef PassWin32MessagesToLCL}
else else

View File

@ -62,6 +62,8 @@ const
IDC_HSPLIT, IDC_NODROP, IDC_DRAG, IDC_WAIT, IDC_UPARROW, IDC_SIZEWE, IDC_HSPLIT, IDC_NODROP, IDC_DRAG, IDC_WAIT, IDC_UPARROW, IDC_SIZEWE,
IDC_SIZENWSE, IDC_SIZENS, IDC_SIZENESW, IDC_SIZE, IDC_IBEAM, IDC_CROSS, IDC_SIZENWSE, IDC_SIZENS, IDC_SIZENESW, IDC_SIZE, IDC_IBEAM, IDC_CROSS,
IDC_ARROW, IDC_ARROW, IDC_ARROW); IDC_ARROW, IDC_ARROW, IDC_ARROW);
WM_LCL_SOCK_ASYNC = WM_USER;
type type
@ -80,6 +82,8 @@ type
UserData: PtrInt; UserData: PtrInt;
OnEvent: TWaitHandleEvent; OnEvent: TWaitHandleEvent;
end; end;
TSocketEvent = function(ASocket: THandle; Flags: dword): Integer of object;
{ WinCE interface-object class } { WinCE interface-object class }
@ -111,6 +115,9 @@ type
FWaitHandles: array of HANDLE; FWaitHandles: array of HANDLE;
FWaitHandlers: array of TWaitHandler; FWaitHandlers: array of TWaitHandler;
FWaitPipeHandlers: PPipeEventInfo; FWaitPipeHandlers: PPipeEventInfo;
FOnAsyncSocketMsg: TSocketEvent;
procedure AllocAndCopy(const BitmapInfo: Windows.TBitmap; const BitmapHandle: HBITMAP; procedure AllocAndCopy(const BitmapInfo: Windows.TBitmap; const BitmapHandle: HBITMAP;
const SrcRect: TRect; var Data: PByte; var Size: Cardinal); const SrcRect: TRect; var Data: PByte; var Size: Cardinal);
procedure FillRawImageDescriptionColors(Desc: PRawImageDescription); procedure FillRawImageDescriptionColors(Desc: PRawImageDescription);
@ -172,6 +179,7 @@ type
property AppHandle: HWND read FAppHandle; property AppHandle: HWND read FAppHandle;
property MessageFont: HFONT read FMessageFont; property MessageFont: HFONT read FMessageFont;
property ThemesActive: boolean read FThemesActive;//just for not removing all those refrences property ThemesActive: boolean read FThemesActive;//just for not removing all those refrences
property OnAsyncSocketMsg: TSocketEvent read FOnAsyncSocketMsg write FOnAsyncSocketMsg;
end; end;
{$I wincelistslh.inc} {$I wincelistslh.inc}

View File

@ -31,7 +31,7 @@ interface
uses uses
Classes, SysUtils, LCLStrConsts, LCLType, LCLProc, LMessages, Graphics, Classes, SysUtils, LCLStrConsts, LCLType, LCLProc, LMessages, Graphics,
GraphType, GraphMath, ExtendedStrings, LCLIntf, ClipBrd, ActnList, Controls, GraphType, ExtendedStrings, LCLIntf, ClipBrd, ActnList, Controls,
Forms; Forms;
type type