Subversion Repositories Kolibri OS

Rev

Rev 6593 | Rev 6817 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6593 Rev 6800
Line 69... Line 69...
69
format binary as "mnt"
69
format binary as "mnt"
Line 70... Line 70...
70
 
70
 
71
include 'macros.inc'
71
include 'macros.inc'
Line 72... Line 72...
72
include 'struct.inc'
72
include 'struct.inc'
Line 73... Line 73...
73
 
73
 
74
$Revision: 6593 $
74
$Revision: 6800 $
Line 1869... Line 1869...
1869
;-----------------------------------------------------------------------------
1869
;-----------------------------------------------------------------------------
1870
get_timer_ticks:
1870
get_timer_ticks:
1871
        mov     eax, [timer_ticks]
1871
        mov     eax, [timer_ticks]
1872
        ret
1872
        ret
1873
;-----------------------------------------------------------------------------
1873
;-----------------------------------------------------------------------------
1874
iglobal
-
 
1875
align 4
-
 
1876
mousefn dd msscreen
-
 
1877
        dd mswin
-
 
1878
        dd msbutton
-
 
1879
        dd msbuttonExt
-
 
1880
        dd app_load_cursor
-
 
1881
        dd app_set_cursor
-
 
1882
        dd app_delete_cursor
-
 
1883
        dd msz
-
 
1884
endg
-
 
1885
;-----------------------------------------------------------------------------
-
 
1886
readmousepos:
1874
readmousepos:
1887
 
-
 
1888
; eax=0 screen relative
1875
; eax=0 screen relative
1889
; eax=1 window relative
1876
; eax=1 window relative
1890
; eax=2 buttons pressed
1877
; eax=2 buttons pressed
1891
; eax=3 buttons pressed ext
1878
; eax=3 buttons pressed ext
1892
; eax=4 load cursor
1879
; eax=4 load cursor
1893
; eax=5 set cursor
1880
; eax=5 set cursor
1894
; eax=6 delete cursor
1881
; eax=6 delete cursor
1895
; eax=7 get mouse_z
1882
; eax=7 get mouse_z
1896
 
-
 
-
 
1883
; eax=8 load cursor unicode
1897
        cmp     ebx, 7
1884
        cmp     ebx, 8
1898
        ja      @f
1885
        ja      @f
1899
        jmp     [mousefn+ebx*4]
1886
        jmp     dword[.mousefn+ebx*4]
-
 
1887
 
-
 
1888
align 4
-
 
1889
.mousefn:
-
 
1890
dd  .msscreen
-
 
1891
dd  .mswin
-
 
1892
dd  .msbutton
-
 
1893
dd  .msbuttonExt
-
 
1894
dd  .app_load_cursor
-
 
1895
dd  .app_set_cursor
-
 
1896
dd  .app_delete_cursor
-
 
1897
dd  .msz
-
 
1898
dd  .loadCursorUni
Line 1900... Line 1899...
1900
 
1899
 
1901
msscreen:
1900
.msscreen:
1902
        mov     eax, [MOUSE_X]
1901
        mov     eax, [MOUSE_X]
1903
        shl     eax, 16
1902
        shl     eax, 16
1904
        mov     ax, [MOUSE_Y]
1903
        mov     ax, [MOUSE_Y]
1905
        mov     [esp+36-4], eax
1904
        mov     [esp+36-4], eax
1906
@@:
1905
@@:
Line 1907... Line 1906...
1907
        ret
1906
        ret
1908
 
1907
 
1909
mswin:
1908
.mswin:
1910
        mov     eax, [MOUSE_X]
1909
        mov     eax, [MOUSE_X]
1911
        shl     eax, 16
1910
        shl     eax, 16
1912
        mov     ax, [MOUSE_Y]
1911
        mov     ax, [MOUSE_Y]
Line 1922... Line 1921...
1922
        sub     ax, word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
1921
        sub     ax, word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
1923
        rol     eax, 16
1922
        rol     eax, 16
1924
        mov     [esp+36-4], eax
1923
        mov     [esp+36-4], eax
1925
        ret
1924
        ret
Line 1926... Line 1925...
1926
 
1925
 
1927
msbutton:
1926
.msbutton:
1928
        movzx   eax, byte [BTN_DOWN]
1927
        movzx   eax, byte [BTN_DOWN]
1929
        mov     [esp+36-4], eax
1928
        mov     [esp+36-4], eax
Line 1930... Line 1929...
1930
        ret
1929
        ret
1931
 
1930
 
1932
msbuttonExt:
1931
.msbuttonExt:
1933
        mov     eax, [BTN_DOWN]
1932
        mov     eax, [BTN_DOWN]
Line 1934... Line 1933...
1934
        mov     [esp+36-4], eax
1933
        mov     [esp+36-4], eax
1935
        ret
1934
        ret
1936
 
1935
 
1937
app_load_cursor:
1936
.app_load_cursor:
1938
        cmp     ecx, OS_BASE
1937
        cmp     ecx, OS_BASE
1939
        jae     @f
1938
        jae     @f
1940
        stdcall load_cursor, ecx, edx
1939
        stdcall load_cursor, ecx, edx
Line -... Line 1940...
-
 
1940
        mov     [esp+36-4], eax
-
 
1941
@@:
-
 
1942
        ret
-
 
1943
 
-
 
1944
.loadCursorUni:
-
 
1945
        cmp     ecx, OS_BASE
-
 
1946
        jae     @b
-
 
1947
        push    ecx edx
-
 
1948
        stdcall kernel_alloc, maxPathLength
-
 
1949
        mov     edi, eax
-
 
1950
        pop     eax esi
-
 
1951
        push    edi
-
 
1952
        call    getFullPath
-
 
1953
        pop     ebp
-
 
1954
        test    eax, eax
-
 
1955
        jz      @f
-
 
1956
        stdcall load_cursor, ebp, LOAD_FROM_FILE
-
 
1957
        mov     [esp+32], eax
1941
        mov     [esp+36-4], eax
1958
@@:
1942
@@:
1959
        stdcall kernel_free, ebp
1943
        ret
1960
        ret
1944
 
1961
 
Line 1945... Line 1962...
1945
app_set_cursor:
1962
.app_set_cursor:
1946
        stdcall set_cursor, ecx
1963
        stdcall set_cursor, ecx
1947
        mov     [esp+36-4], eax
1964
        mov     [esp+36-4], eax
1948
        ret
1965
        ret
Line 1949... Line 1966...
1949
 
1966
 
1950
app_delete_cursor:
1967
.app_delete_cursor:
1951
        stdcall delete_cursor, ecx
1968
        stdcall delete_cursor, ecx
1952
        mov     [esp+36-4], eax
1969
        mov     [esp+36-4], eax
1953
        ret
1970
        ret
1954
 
1971
 
Line 2276... Line 2293...
2276
        shl     edi, 5
2293
        shl     edi, 5
2277
        add     edi, window_data
2294
        add     edi, window_data
2278
        movzx   esi, word [WIN_STACK + ecx * 2]
2295
        movzx   esi, word [WIN_STACK + ecx * 2]
2279
        lea     esi, [WIN_POS + esi * 2]
2296
        lea     esi, [WIN_POS + esi * 2]
2280
        call    window._.window_deactivate
2297
        call    window._.window_deactivate
2281
 
-
 
2282
        call    syscall_display_settings._.calculate_whole_screen
2298
        call    syscall_display_settings.calculateScreen
2283
        call    syscall_display_settings._.redraw_whole_screen
2299
        call    syscall_display_settings.redrawScreen
2284
.nowindowdeactivate:
2300
.nowindowdeactivate:
2285
        ret
2301
        ret
2286
;------------------------------------------------------------------------------
2302
;------------------------------------------------------------------------------
2287
sysfn_activate:         ; 18.3 = ACTIVATE WINDOW
2303
sysfn_activate:         ; 18.3 = ACTIVATE WINDOW
2288
        cmp     ecx, 2
2304
        cmp     ecx, 2