Rev 9831 | Rev 9850 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9831 | Rev 9848 | ||
---|---|---|---|
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: 9831 $ |
8 | $Revision: 9848 $ |
Line 9... | Line 9... | ||
9 | 9 | ||
10 | include 'mousepointer.inc' |
10 | include 'mousepointer.inc' |
Line 336... | Line 336... | ||
336 | ;----------------------------------------------------------------- |
336 | ;----------------------------------------------------------------- |
337 | mouse._.move_handler: |
337 | mouse._.move_handler: |
338 | ; Called when cursor has been moved |
338 | ; Called when cursor has been moved |
339 | ;> eax = old x coord |
339 | ;> eax = old x coord |
340 | ;> ebx = old y coord |
340 | ;> ebx = old y coord |
- | 341 | push eax ebx |
|
- | 342 | ||
- | 343 | call mouse._.find_sys_window_under_cursor |
|
- | 344 | call mouse._.check_sys_window_actions |
|
- | 345 | ||
- | 346 | cmp al, mouse.WINDOW_RESIZE_SW_FLAG |
|
- | 347 | jne .not_sw |
|
- | 348 | ; DEBUGF 1, "RESIZE SOUTH-WEST\n" |
|
- | 349 | ||
- | 350 | mov eax, [def_cursor_dresize2] |
|
- | 351 | ||
- | 352 | jmp .set_resizing_cursor |
|
- | 353 | .not_sw: |
|
- | 354 | cmp al, mouse.WINDOW_RESIZE_SE_FLAG |
|
- | 355 | jne .not_se |
|
- | 356 | ; DEBUGF 1, "RESIZE SOUTH-EAST\n" |
|
- | 357 | ||
- | 358 | mov eax, [def_cursor_dresize1] |
|
- | 359 | ||
- | 360 | jmp .set_resizing_cursor |
|
- | 361 | .not_se: |
|
- | 362 | cmp al, mouse.WINDOW_RESIZE_W_FLAG |
|
- | 363 | jne .not_w |
|
- | 364 | ; DEBUGF 1, "RESIZE WEST\n" |
|
- | 365 | ||
- | 366 | mov eax, [def_cursor_hresize] |
|
- | 367 | ||
- | 368 | jmp .set_resizing_cursor |
|
- | 369 | .not_w: |
|
- | 370 | cmp al, mouse.WINDOW_RESIZE_S_FLAG |
|
- | 371 | jne .not_s |
|
- | 372 | ; DEBUGF 1, "RESIZE SOUTH\n" |
|
- | 373 | ||
- | 374 | mov eax, [def_cursor_vresize] |
|
- | 375 | ||
- | 376 | jmp .set_resizing_cursor |
|
- | 377 | .not_s: |
|
- | 378 | cmp al, mouse.WINDOW_RESIZE_E_FLAG |
|
- | 379 | jne .not_in_resize_area |
|
- | 380 | ; DEBUGF 1, "RESIZE EAST\n" |
|
- | 381 | ||
- | 382 | mov eax, [def_cursor_hresize] |
|
- | 383 | ||
- | 384 | .set_resizing_cursor: |
|
- | 385 | ; change cursor to resizing cursor |
|
- | 386 | shl esi, BSF sizeof.APPDATA |
|
- | 387 | add esi, SLOT_BASE |
|
- | 388 | ||
- | 389 | ; if resizing cursor we need (eax) isnt set already, set it |
|
- | 390 | cmp eax, [esi + APPDATA.cursor] |
|
- | 391 | je @f |
|
- | 392 | ||
- | 393 | xchg eax, [esi + APPDATA.cursor] ; set resizing cursor, prev cursor goes to eax |
|
- | 394 | ; save previous cursor (will be restored when we'll get out of the resizing area) |
|
- | 395 | ; if we change resizing cursor to resizing cursor then dont update previous cursor |
|
- | 396 | cmp eax, [def_cursor_hresize] |
|
- | 397 | je @f |
|
- | 398 | cmp eax, [def_cursor_vresize] |
|
- | 399 | je @f |
|
- | 400 | cmp eax, [def_cursor_dresize1] |
|
- | 401 | je @f |
|
- | 402 | cmp eax, [def_cursor_dresize2] |
|
- | 403 | je @f |
|
- | 404 | ||
- | 405 | mov [esi + APPDATA.temp_cursor], eax ; save prev cursor |
|
- | 406 | ||
- | 407 | @@: |
|
- | 408 | jmp .end1 |
|
- | 409 | .not_in_resize_area: |
|
- | 410 | shl esi, BSF sizeof.APPDATA |
|
- | 411 | add esi, SLOT_BASE |
|
- | 412 | mov eax, [esi + APPDATA.temp_cursor] |
|
- | 413 | ||
- | 414 | test eax, eax |
|
- | 415 | jz .end1 |
|
- | 416 | ||
- | 417 | ; restore prev cursor |
|
- | 418 | mov [esi + APPDATA.temp_cursor], 0 |
|
- | 419 | mov [esi + APPDATA.cursor], eax |
|
- | 420 | ||
- | 421 | .end1: |
|
- | 422 | pop ebx eax |
|
- | 423 | ||
341 | cmp [mouse.active_sys_button.pbid], 0 |
424 | cmp [mouse.active_sys_button.pbid], 0 |
342 | jnz .exit |
425 | jnz .exit |
Line 343... | Line 426... | ||
343 | 426 | ||
344 | mov esi, [mouse.active_sys_window.pslot] |
427 | mov esi, [mouse.active_sys_window.pslot] |