Artifact 140b4080019f580429108349534a010ea82d6907:
- File
freshlib/gui/Win32/mouse.asm
— part of check-in
[fb9af5561c]
at
2019-04-16 10:40:45
on branch NoCanvasGUI
— Fixed the Linux port WaitForSystemEvents procedure that caused hands sometimes (there is a message in the queue, but the procedure does not return).
The mouse.asm library refactored to use interface/body syntax.
ZeroMouseMove procedure introduced. It generates mouse move events, without moving mouse actually.
Work on the TAsmEdit control. As a result changed a little the Win32 message processing (WM_PAINT processed with higher priority).
Work on the different GUI controls in order to make them work with the new interfaces. (user: johnfound size: 1818) [more...]
; _______________________________________________________________________________________ ;| | ;| ..::FreshLib::.. Free, open source. Licensed under "BSD 2-clause" license." | ;|_______________________________________________________________________________________| ; ; Description: Provides unified access to standard mouse cursors. ; ; Target OS: Win32 ; ; Dependencies: ; ; Notes: ;_________________________________________________________________________________________ ; ToDo: Arbitrary mouse cursors, B&W for the begining. body SetMouseCursor ;, .hWindow, .hCursor begin push ecx edx invoke SetCursor, [.hCursor] pop edx ecx return endp body GetStockCursor ;, .index begin push ecx edx mov eax, [.index] cmp eax, mcCount jb @f xor eax, eax @@: movzx eax, [_cursors+2*eax] invoke LoadCursorW, 0, eax pop edx ecx return endp if used _cursors _cursors dw IDC_ARROW, IDC_IBEAM, IDC_CROSS, IDC_SIZEWE, IDC_SIZENS, IDC_SIZENWSE, IDC_SIZENESW, IDC_WAIT, IDC_HAND, IDC_HAND, IDC_ARROW end if body __MouseCapture ;, .hwnd begin push eax ecx edx cmp [.hwnd], 0 je .release invoke SetCapture, [.hwnd] .finish: pop edx ecx eax return .release: invoke ReleaseCapture jmp .finish endp body ZeroMouseMove .point POINT begin pushad lea eax, [.point] invoke GetCursorPos, eax invoke SetCursorPos, [.point.x], [.point.y] popad return endp