; _______________________________________________________________________________________
;|                                                                                       |
;| ..::FreshLib::..  Free, open source. Licensed under "BSD 2-clause" license."          |
;|_______________________________________________________________________________________|
;
;  Description: Provides unified access to standard mouse cursors.
;
;  Target OS: Any
;
;  Dependencies:
;
;  Notes: This file contains OS independent part and includes OS dependent files.
;_________________________________________________________________________________________
module "Mouse library"

mcArrow = 0
mcText  = 1
mcCross = 2
mcSizeH = 3
mcSizeV = 4
mcSizeUL_LR = 5
mcSizeLL_UR = 6
mcWait      = 7
mcHand      = 8
mcDragHand  = 9
mcPencil    = 10


mcCount = 11



proc SetMouseCapture, .window
begin
        pushad

        xor     edi, edi

        mov     esi, [.window]
        cmp     [.window], edi
        je      .setit

        get     edi, esi, TWindow:OSWindow
        mov     edi, [edi+TWindow.handle]

.setit:
        mov     [__MouseTarget], esi
        stdcall __MouseCapture, edi

        popad
        return
endp



include '%TargetOS%/mouse.asm'

endmodule
