Rev 9926 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9926 | Rev 9930 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2010-2015. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2010-2015. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 9926 $ |
8 | $Revision: 9930 $ |
Line 9... | Line 9... | ||
9 | 9 | ||
10 | include 'mousepointer.inc' |
10 | include 'mousepointer.inc' |
Line 388... | Line 388... | ||
388 | mov eax, [def_cursor_hresize] |
388 | mov eax, [def_cursor_hresize] |
Line 389... | Line 389... | ||
389 | 389 | ||
390 | .set_resizing_cursor: |
390 | .set_resizing_cursor: |
391 | ; DEBUGF 1, ".set_resizing_cursor eax = %x\n", eax |
391 | ; DEBUGF 1, ".set_resizing_cursor eax = %x\n", eax |
392 | ; change cursor to resizing cursor |
392 | ; change cursor to resizing cursor |
393 | shl esi, BSF sizeof.APPDATA |
393 | shl esi, BSF sizeof.WDATA |
Line 394... | Line 394... | ||
394 | add esi, SLOT_BASE |
394 | add esi, window_data |
395 | 395 | ||
396 | ; if resizing cursor we need (eax) isnt set already, set it |
396 | ; if resizing cursor we need (eax) isnt set already, set it |
Line 397... | Line 397... | ||
397 | cmp eax, [esi + APPDATA.cursor] |
397 | cmp eax, [esi + WDATA.cursor] |
398 | je @f |
398 | je @f |
399 | 399 | ||
400 | ; DEBUGF 1, "changing cursor to resizing\n" |
400 | ; DEBUGF 1, "changing cursor to resizing\n" |
401 | xchg eax, [esi + APPDATA.cursor] ; set resizing cursor, prev cursor goes to eax |
401 | xchg eax, [esi + WDATA.cursor] ; set resizing cursor, prev cursor goes to eax |
402 | ; save previous cursor (will be restored when we'll get out of the resizing area) |
402 | ; save previous cursor (will be restored when we'll get out of the resizing area) |
403 | ; if we change resizing cursor to resizing cursor then dont update previous cursor |
403 | ; if we change resizing cursor to resizing cursor then dont update previous cursor |
Line 408... | Line 408... | ||
408 | cmp eax, [def_cursor_dresize1] |
408 | cmp eax, [def_cursor_dresize1] |
409 | je @f |
409 | je @f |
410 | cmp eax, [def_cursor_dresize2] |
410 | cmp eax, [def_cursor_dresize2] |
411 | je @f |
411 | je @f |
Line 412... | Line 412... | ||
412 | 412 | ||
Line 413... | Line 413... | ||
413 | mov [esi + APPDATA.temp_cursor], eax ; save prev cursor |
413 | mov [esi + WDATA.temp_cursor], eax ; save prev cursor |
414 | 414 | ||
415 | @@: |
415 | @@: |
416 | jmp .end1 |
416 | jmp .end1 |
Line 417... | Line 417... | ||
417 | .not_in_resize_area: |
417 | .not_in_resize_area: |
418 | ; DEBUGF 1, ".not_in_resize_area\n" |
418 | ; DEBUGF 1, ".not_in_resize_area\n" |
419 | 419 | ||
Line 420... | Line 420... | ||
420 | shl esi, BSF sizeof.APPDATA |
420 | shl esi, BSF sizeof.WDATA |
421 | add esi, SLOT_BASE |
421 | add esi, window_data |
Line 422... | Line 422... | ||
422 | mov eax, [esi + APPDATA.temp_cursor] |
422 | mov eax, [esi + WDATA.temp_cursor] |
423 | 423 | ||
424 | test eax, eax |
424 | test eax, eax |
Line 425... | Line 425... | ||
425 | jz .end1 |
425 | jz .end1 |
426 | 426 | ||
Line 427... | Line 427... | ||
427 | ; restore prev cursor |
427 | ; restore prev cursor |
Line 817... | Line 817... | ||
817 | 817 | ||
818 | .mswin: |
818 | .mswin: |
819 | mov eax, [MOUSE_X] |
819 | mov eax, [MOUSE_X] |
820 | shl eax, 16 |
820 | shl eax, 16 |
821 | mov ax, [MOUSE_Y] |
821 | mov ax, [MOUSE_Y] |
822 | mov esi, [current_slot_idx] |
822 | mov esi, [current_slot] |
823 | shl esi, BSF sizeof.WDATA |
823 | mov esi, [esi + APPDATA.window] |
824 | mov bx, word[window_data + esi + WDATA.box.left] |
824 | mov bx, word[esi + WDATA.box.left] |
825 | shl ebx, 16 |
825 | shl ebx, 16 |
826 | mov bx, word[window_data + esi + WDATA.box.top] |
826 | mov bx, word[esi + WDATA.box.top] |
827 | sub eax, ebx |
827 | sub eax, ebx |
828 | sub ax, word[window_data + esi + WDATA.clientbox.top] |
828 | sub ax, word[esi + WDATA.clientbox.top] |
829 | rol eax, 16 |
829 | rol eax, 16 |
830 | sub ax, word[window_data + esi + WDATA.clientbox.left] |
830 | sub ax, word[esi + WDATA.clientbox.left] |
831 | rol eax, 16 |
831 | rol eax, 16 |
832 | mov [esp + SYSCALL_STACK.eax], eax |
832 | mov [esp + SYSCALL_STACK.eax], eax |
Line 833... | Line 833... | ||
833 | ret |
833 | ret |