/kernel/trunk/blkdev/disk.inc |
---|
731,7 → 731,7 |
; [ecx+0x40] is shorter than [ebx+0x1fe]: one-byte offset vs 4-bytes offset. |
lea ecx, [ebx+0x1be] ; ecx -> partition table |
cmp word [ecx+0x40], 0xaa55 |
jnz .notmbr |
jnz .mbr_failed |
; 8. The MBR is treated differently from EBRs. For MBR we additionally need to |
; execute step 10 and possibly step 11. |
test ebp, ebp |
/kernel/trunk/const.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2023. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2022. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
789,15 → 789,6 |
check_m_pixel dd ? |
bytes_per_pixel dd ? |
put_pixel dd ? |
put_rect dd ? |
put_image dd ? |
put_line dd ? |
get_pixel dd ? |
get_rect dd ? |
get_image dd ? |
get_line dd ? |
ends |
struct DISPMODE |
/kernel/trunk/core/taskman.inc |
---|
709,16 → 709,16 |
mov [slot], eax |
mov esi, [current_slot] |
mov ebx, esi ;ebx=esi - pointer to information about current thread |
mov ebx, esi ;ebx=esi - pointer to extended information about current thread |
mov edi, eax |
shl edi, BSF sizeof.APPDATA |
add edi, SLOT_BASE |
mov edx, edi ;edx=edi - pointer to infomation about new thread |
mov edx, edi ;edx=edi - pointer to extended infomation about new thread |
mov ecx, sizeof.APPDATA/4 |
xor eax, eax |
cld |
rep stosd ;clean information about new thread |
rep stosd ;clean extended information about new thread |
mov esi, ebx |
mov edi, edx |
mov ecx, 11 |
/kernel/trunk/gui/window.inc |
---|
186,7 → 186,7 |
align 4 |
; system function 48 |
syscall_display_settings: |
cmp ebx, .ftable.size-1 |
cmp ebx, 13 |
ja .ret |
jmp dword[.ftable + ebx*4] |
206,7 → 206,6 |
dd .getFontSize |
dd .setFontSize |
dd .setSkinUnicode |
.ftable.size = ($ - .ftable)/4 |
.redrawWholeScreen: |
xor eax, eax |
224,7 → 223,7 |
mov eax, [_display.height] |
dec eax |
mov [draw_limits.bottom], eax |
mov eax, window_data ; TODO: check pointer |
mov eax, window_data |
jmp redrawscreen |
.setButtonStyle: |
407,18 → 406,18 |
;> ebx = 1 |
;> ecx = scale power (resulting scale is 2^ebx) |
syscall_set_window_shape: |
mov edi, [current_slot] |
mov edi, [edi + APPDATA.window] |
mov edi, [current_slot_idx] |
shl edi, BSF sizeof.WDATA |
test ebx, ebx |
jne .shape_scale |
mov [edi + WDATA.shape], ecx |
mov [window_data + edi + WDATA.shape], ecx |
;-------------------------------------- |
align 4 |
.shape_scale: |
dec ebx |
jnz .exit |
mov [edi + WDATA.shape_scale], ecx |
mov [window_data + edi + WDATA.shape_scale], ecx |
;-------------------------------------- |
align 4 |
.exit: |
428,8 → 427,9 |
align 4 |
; system function 67 |
syscall_move_window: |
mov edi, [current_slot] |
mov edi, [edi + APPDATA.window] |
mov edi, [current_slot_idx] |
shl edi, BSF sizeof.WDATA |
add edi, window_data |
test [edi + WDATA.fl_wdrawn], 1 |
jz .exit |
556,11 → 556,11 |
.next_window: |
movzx edi, word[WIN_POS + esi * 2] |
shl edi, BSF sizeof.WDATA |
add edi, window_data |
test byte [edi + WDATA.fl_wstate], WSTATE_USED |
test byte [window_data + edi + WDATA.fl_wstate], WSTATE_USED |
jz .skip_window |
add edi, window_data |
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED |
jnz .skip_window |
1245,7 → 1245,7 |
dec bl |
jnz @f |
call minimize_window |
ret |
jmp .exit |
;-------------------------------------- |
align 4 |
@@: |
1614,8 → 1614,9 |
align 4 |
;< edx = pointer to WDATA struct |
window._.sys_set_window: |
mov eax, [current_slot] |
mov eax, [eax + APPDATA.window] |
mov eax, [current_slot_idx] |
shl eax, BSF sizeof.WDATA |
add eax, window_data |
; save window colors |
mov [eax + WDATA.cl_workarea], edx |
mov [eax + WDATA.cl_titlebar], esi |
1846,20 → 1847,18 |
mov edi, esi |
shl edi, BSF sizeof.WDATA |
add edi, window_data |
cmp esi, 1 |
jz .check_for_shaped_window |
cmp [edi + WDATA.box.width], 0 |
cmp [window_data + edi + WDATA.box.width], 0 |
jnz .check_for_shaped_window |
cmp [edi + WDATA.box.height], 0 |
cmp [window_data + edi + WDATA.box.height], 0 |
jz .exit |
;-------------------------------------- |
align 4 |
.check_for_shaped_window: |
cmp [edi + WDATA.shape], 0 |
cmp [window_data + edi + WDATA.shape], 0 |
jne .shaped_window |
; get x&y size |
1909,7 → 1908,7 |
inc ecx |
inc edx |
push [edi + WDATA.shape_scale] ; push scale first -> for loop |
push [window_data + edi + WDATA.shape_scale] ; push scale first -> for loop |
; get WinMap start -> ebp |
push eax |
1919,7 → 1918,7 |
add eax, [_display.win_map] |
mov ebp, eax |
mov edi, [edi + WDATA.shape] |
mov edi, [window_data + edi + WDATA.shape] |
pop eax |
; eax = x_start |
2228,8 → 2227,9 |
;-------------------------------------- |
align 4 |
@@: |
mov edx, [current_slot] |
mov edx, [edx + APPDATA.window] |
mov edx, [current_slot_idx] |
shl edx, BSF sizeof.WDATA |
add edx, window_data |
movzx ebx, [edx + WDATA.fl_wstyle] |
and bl, 0x0F |
cmp bl, 3 |
2263,17 → 2263,17 |
;-------------------------------------- |
align 4 |
.2: |
mov edi, [current_slot] |
mov edi, [edi + APPDATA.window] |
test [edi + WDATA.fl_wstyle], WSTYLE_HASCAPTION |
mov edi, [current_slot_idx] |
shl edi, BSF sizeof.WDATA |
test [window_data + edi + WDATA.fl_wstyle], WSTYLE_HASCAPTION |
jz .exit |
mov edx, [edi + WDATA.caption] |
mov edx, [window_data + edi + WDATA.caption] |
or edx, edx |
jz .exit |
mov ebp, [edi + WDATA.box.left - 2] |
mov bp, word[edi + WDATA.box.top] |
movzx eax, [edi + WDATA.fl_wstyle] |
mov ebp, [edi + window_data + WDATA.box.left - 2] |
mov bp, word[edi + window_data + WDATA.box.top] |
movzx eax, [edi + window_data + WDATA.fl_wstyle] |
and al, 0x0F |
cmp al, 3 |
je .skinned |
2284,7 → 2284,7 |
;-------------------------------------- |
align 4 |
.skinned: |
movzx eax, word[edi + WDATA.box.width] |
movzx eax, word[edi + window_data + WDATA.box.width] |
sub ax, [_skinmargins.left] |
sub ax, [_skinmargins.right] |
js .exit |
2301,7 → 2301,7 |
.not_skinned: |
cmp al, 1 |
je .exit |
movzx eax, word[edi + WDATA.box.width] |
movzx eax, word[edi + window_data + WDATA.box.width] |
sub eax, 16 |
js .exit |
mov ebx, 80002h |
2310,7 → 2310,7 |
mov esi, eax |
add ebx, ebp |
mov ecx, [common_colours + 16] |
mov al, [edi + WDATA.captionEncoding] |
mov al, [window_data + edi + WDATA.captionEncoding] |
test al, al |
jnz @f |
mov al, 1 |
2368,19 → 2368,19 |
; void __fastcall get_window_rect(struct RECT* rc); |
; ecx = pointer to RECT |
window._.get_rect: |
mov eax, [current_slot] |
mov eax, [eax + APPDATA.window] |
mov eax, [current_slot_idx] |
shl eax, BSF sizeof.WDATA |
mov edx, [eax + WDATA.box.left] |
mov edx, [eax + window_data + WDATA.box.left] |
mov [ecx+RECT.left], edx |
add edx, [eax + WDATA.box.width] |
add edx, [eax + window_data + WDATA.box.width] |
mov [ecx+RECT.right], edx |
mov edx, [eax + WDATA.box.top] |
mov edx, [eax +window_data + WDATA.box.top] |
mov [ecx+RECT.top], edx |
add edx, [eax + WDATA.box.height] |
add edx, [eax + window_data + WDATA.box.height] |
mov [ecx+RECT.bottom], edx |
ret |
;------------------------------------------------------------------------------ |
/kernel/trunk/gui/mouse.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2010-2023. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2010-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
7,6 → 7,8 |
$Revision$ |
include 'mousepointer.inc' |
;================================ |
;/////// public functions /////// |
;================================ |
/kernel/trunk/gui/button.inc |
---|
95,13 → 95,13 |
; make coordinates clientbox-relative |
push eax |
mov eax, [current_slot] |
mov eax, [eax + APPDATA.window] |
mov eax, [current_slot_idx] |
shl eax, BSF sizeof.WDATA |
rol ebx, 16 |
add bx, word[eax + WDATA.clientbox.left] |
add bx, word[window_data + eax + WDATA.clientbox.left] |
rol ebx, 16 |
rol ecx, 16 |
add cx, word[eax + WDATA.clientbox.top] |
add cx, word[window_data + eax + WDATA.clientbox.top] |
rol ecx, 16 |
pop eax |
173,10 → 173,10 |
dec ebp |
shr ebx, 16 |
shr ecx, 16 |
mov eax, [current_slot] |
mov eax, [eax + APPDATA.window] |
add ebx, [eax + WDATA.box.left] |
add ecx, [eax + WDATA.box.top] |
mov eax, [current_slot_idx] |
shl eax, BSF sizeof.WDATA |
add ebx, [eax + window_data + WDATA.box.left] |
add ecx, [eax + window_data + WDATA.box.top] |
mov eax, ebx |
inc eax |
mov edx, ebx |
/kernel/trunk/gui/mousepointer.inc |
---|
0,0 → 1,250 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision$ |
iglobal |
align 4 |
mousepointer: |
db 0x00,0x00,0x00,0x74,0x74,0x74,0x6e,0x6e,0x6e,0x6f |
db 0x6f,0x6f,0x71,0x71,0x71,0x75,0x75,0x75,0x79,0x79 |
db 0x79,0x7c,0x7c,0x7c,0x7e,0x7e,0x7e,0x80,0x80,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0x00,0x00,0x00,0x63,0x63,0x63,0x63,0x63,0x63 |
db 0x66,0x66,0x66,0x6c,0x6c,0x6c,0x72,0x72,0x72,0x78 |
db 0x78,0x78,0x7c,0x7c,0x7c,0x7e,0x7e,0x7e,0x80,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0 |
db 0xc0,0xc0,0x00,0x00,0x00,0x54,0x54,0x54,0x57,0x57 |
db 0x57,0x5f,0x5f,0x5f,0x68,0x68,0x68,0x71,0x71,0x71 |
db 0x77,0x77,0x77,0x7c,0x7c,0x7c,0x7e,0x7e,0x7e,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xc0,0xc0,0xc0 |
db 0xc0,0xc0,0xc0,0x00,0x00,0x00,0x47,0x47,0x47,0x50 |
db 0x50,0x50,0x5b,0x5b,0x5b,0x67,0x67,0x67,0x70,0x70 |
db 0x70,0x77,0x77,0x77,0x7c,0x7c,0x7c,0x7e,0x7e,0x7e |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0xff,0xff,0xff,0xc0,0xc0 |
db 0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x3f,0x3f,0x3f |
db 0x4b,0x4b,0x4b,0x59,0x59,0x59,0x66,0x66,0x66,0x70 |
db 0x70,0x70,0x77,0x77,0x77,0x7c,0x7c,0x7c,0x7e,0x7e |
db 0x7e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0x80,0x80,0xff,0xff,0xff,0xc0,0xc0,0xc0,0xc0 |
db 0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x3a,0x3a |
db 0x3a,0x49,0x49,0x49,0x59,0x59,0x59,0x66,0x66,0x66 |
db 0x70,0x70,0x70,0x77,0x77,0x77,0x7c,0x7c,0x7c,0x7e |
db 0x7e,0x7e,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xc0,0xc0 |
db 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x39 |
db 0x39,0x39,0x49,0x49,0x49,0x59,0x59,0x59,0x66,0x66 |
db 0x66,0x71,0x71,0x71,0x78,0x78,0x78,0x7c,0x7c,0x7c |
db 0x7e,0x7e,0x7e,0x80,0x80,0x80,0x80,0x80,0x80,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0 |
db 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00 |
db 0x39,0x39,0x39,0x4a,0x4a,0x4a,0x5a,0x5a,0x5a,0x68 |
db 0x68,0x68,0x72,0x72,0x72,0x79,0x79,0x79,0x7d,0x7d |
db 0x7d,0x7f,0x7f,0x7f,0x80,0x80,0x80,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xc0,0xc0,0xc0 |
db 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00 |
db 0x00,0x3c,0x3c,0x3c,0x4e,0x4e,0x4e,0x5e,0x5e,0x5e |
db 0x6b,0x6b,0x6b,0x75,0x75,0x75,0x7a,0x7a,0x7a,0x7e |
db 0x7e,0x7e,0x80,0x80,0x80,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0 |
db 0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00 |
db 0x00,0x00,0x43,0x43,0x43,0x55,0x55,0x55,0x64,0x64 |
db 0x64,0x70,0x70,0x70,0x78,0x78,0x78,0x7d,0x7d,0x7d |
db 0x80,0x80,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xc0 |
db 0xc0,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x4e,0x4e,0x4e,0x5f,0x5f,0x5f,0x6d |
db 0x6d,0x6d,0x76,0x76,0x76,0x7c,0x7c,0x7c,0x80,0x80 |
db 0x80,0xff,0xff,0xff,0xc0,0xc0,0xc0,0x00,0x00,0x00 |
db 0xff,0xff,0xff,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x14 |
db 0x14,0x14,0x1b,0x1b,0x1b,0x29,0x29,0x29,0x3a,0x3a |
db 0x3a,0x4c,0x4c,0x4c,0x5d,0x5d,0x5d,0x6c,0x6c,0x6c |
db 0x75,0x75,0x75,0x7b,0x7b,0x7b,0x80,0x80,0x80,0xc0 |
db 0xc0,0xc0,0x00,0x00,0x00,0x2f,0x2f,0x2f,0x80,0x80 |
db 0x80,0xff,0xff,0xff,0xc0,0xc0,0xc0,0x00,0x00,0x00 |
db 0x21,0x21,0x21,0x2e,0x2e,0x2e,0x40,0x40,0x40,0x52 |
db 0x52,0x52,0x62,0x62,0x62,0x6f,0x6f,0x6f,0x77,0x77 |
db 0x77,0x7c,0x7c,0x7c,0x80,0x80,0x80,0x00,0x00,0x00 |
db 0x47,0x47,0x47,0x3b,0x3b,0x3b,0x80,0x80,0x80,0xff |
db 0xff,0xff,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x25,0x25 |
db 0x25,0x30,0x30,0x30,0x42,0x42,0x42,0x54,0x54,0x54 |
db 0x64,0x64,0x64,0x70,0x70,0x70,0x78,0x78,0x78,0x7d |
db 0x7d,0x7d,0x00,0x00,0x00,0x62,0x62,0x62,0x52,0x52 |
db 0x52,0x4a,0x4a,0x4a,0x43,0x43,0x43,0x80,0x80,0x80 |
db 0xff,0xff,0xff,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x33 |
db 0x33,0x33,0x42,0x42,0x42,0x54,0x54,0x54,0x64,0x64 |
db 0x64,0x71,0x71,0x71,0x79,0x79,0x79,0x7d,0x7d,0x7d |
db 0x72,0x72,0x72,0x6b,0x6b,0x6b,0x5f,0x5f,0x5f,0x5a |
db 0x5a,0x5a,0x54,0x54,0x54,0x80,0x80,0x80,0xff,0xff |
db 0xff,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x35,0x35,0x35 |
db 0x41,0x41,0x41,0x53,0x53,0x53,0x63,0x63,0x63,0x70 |
db 0x70,0x70,0x78,0x78,0x78,0x7d,0x7d,0x7d,0x77,0x77 |
db 0x77,0x73,0x73,0x73,0x6c,0x6c,0x6c,0x68,0x68,0x68 |
db 0x62,0x62,0x62,0x5a,0x5a,0x5a,0x80,0x80,0x80,0xff |
db 0xff,0xff,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x41,0x41 |
db 0x41,0x52,0x52,0x52,0x62,0x62,0x62,0x6f,0x6f,0x6f |
db 0x78,0x78,0x78,0x7d,0x7d,0x7d,0x7b,0x7b,0x7b,0x79 |
db 0x79,0x79,0x74,0x74,0x74,0x72,0x72,0x72,0x6e,0x6e |
db 0x6e,0x66,0x66,0x66,0x80,0x80,0x80,0xc0,0xc0,0xc0 |
db 0xc0,0xc0,0xc0,0x00,0x00,0x00,0x44,0x44,0x44,0x52 |
db 0x52,0x52,0x62,0x62,0x62,0x6e,0x6e,0x6e,0x77,0x77 |
db 0x77,0x7c,0x7c,0x7c,0x7e,0x7e,0x7e,0x7c,0x7c,0x7c |
db 0x7a,0x7a,0x7a,0x79,0x79,0x79,0x75,0x75,0x75,0x6f |
db 0x6f,0x6f,0x65,0x65,0x65,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x48,0x48,0x48,0x4b,0x4b,0x4b,0x56,0x56,0x56 |
db 0x65,0x65,0x65,0x70,0x70,0x70,0x78,0x78,0x78,0x7d |
db 0x7d,0x7d,0x80,0x80,0x80,0x7f,0x7f,0x7f,0x7e,0x7e |
db 0x7e,0x7d,0x7d,0x7d,0x7a,0x7a,0x7a,0x76,0x76,0x76 |
db 0x6f,0x6f,0x6f,0x65,0x65,0x65,0x5c,0x5c,0x5c,0x56 |
db 0x56,0x56,0x58,0x58,0x58,0x60,0x60,0x60,0x6b,0x6b |
db 0x6b,0x73,0x73,0x73,0x7a,0x7a,0x7a,0x7d,0x7d,0x7d |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x7f |
db 0x7f,0x7f,0x7d,0x7d,0x7d,0x7a,0x7a,0x7a,0x76,0x76 |
db 0x76,0x70,0x70,0x70,0x6a,0x6a,0x6a,0x66,0x66,0x66 |
db 0x66,0x66,0x66,0x6c,0x6c,0x6c,0x72,0x72,0x72,0x78 |
db 0x78,0x78,0x7c,0x7c,0x7c,0x7e,0x7e,0x7e,0x80,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x7f,0x7f,0x7f,0x7d,0x7d,0x7d,0x7b,0x7b,0x7b,0x77 |
db 0x77,0x77,0x73,0x73,0x73,0x71,0x71,0x71,0x71,0x71 |
db 0x71,0x74,0x74,0x74,0x78,0x78,0x78,0x7b,0x7b,0x7b |
db 0x7d,0x7d,0x7d,0x7f,0x7f,0x7f,0x80,0x80,0x80,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0x7f,0x7f,0x7f,0x7d,0x7d,0x7d,0x7c,0x7c,0x7c |
db 0x7a,0x7a,0x7a,0x78,0x78,0x78,0x78,0x78,0x78,0x7a |
db 0x7a,0x7a,0x7c,0x7c,0x7c,0x7e,0x7e,0x7e,0x7f,0x7f |
db 0x7f,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80 |
db 0x80,0x80,0x7f,0x7f,0x7f,0x7e,0x7e,0x7e,0x7e,0x7e |
db 0x7e,0x7d,0x7d,0x7d,0x7d,0x7d,0x7d,0x7e,0x7e,0x7e |
db 0x7e,0x7e,0x7e,0x7f,0x7f,0x7f,0x80,0x80,0x80,0x80 |
db 0x80,0x80 |
mousepointer1: |
db 0xff,0xff,0xff,0x06,0x06,0x06,0x0a,0x0a |
db 0x0a,0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0xff,0xff,0xff,0xff,0xff,0xff,0x19,0x19,0x19,0x16 |
db 0x16,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x2e,0x2e,0x2e |
db 0x23,0x23,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0x3f |
db 0x3f,0x29,0x29,0x29,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x47 |
db 0x47,0x47,0x2c,0x2c,0x2c,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0x48,0x48,0x48,0x2c,0x2c,0x2c,0x16,0x16,0x16,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0x48,0x48,0x48,0x2c,0x2c,0x2c,0x16,0x16,0x16 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0x48,0x48,0x48,0x2c,0x2c,0x2c,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0x48,0x48,0x48,0x2c,0x2c,0x2c,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0x47,0x47,0x47,0x29,0x29,0x29 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0x40,0x40,0x40,0x23,0x23 |
db 0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xaa,0xaa,0xaa,0x9f,0x9f,0x9f,0x8c,0x8c,0x8c |
db 0x70,0x70,0x70,0x4f,0x4f,0x4f,0x30,0x30,0x30,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x8f,0x8f,0x8f |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0xff,0x9c,0x9c,0x9c,0x87,0x87,0x87,0x6c,0x6c |
db 0x6c,0x4f,0x4f,0x4f,0x32,0x32,0x32,0x19,0x19,0x19 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff |
db 0xff,0xff,0x69,0x69,0x69,0x84,0x84,0x84,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0x92,0x92,0x92,0x79,0x79,0x79,0x59,0x59,0x59,0x3c |
db 0x3c,0x3c,0x24,0x24,0x24,0x11,0x11,0x11,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x37,0x37,0x37 |
db 0x5d,0x5d,0x5d,0x70,0x70,0x70,0x76,0x76,0x76,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0xff,0x75,0x75,0x75,0x51,0x51,0x51,0x31,0x31,0x31 |
db 0x19,0x19,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x16,0x16,0x16,0x2d,0x2d,0x2d,0x49,0x49 |
db 0x49,0x53,0x53,0x53,0x54,0x54,0x54,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x78 |
db 0x78,0x78,0x54,0x54,0x54,0x30,0x30,0x30,0x16,0x16 |
db 0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x0f,0x0f,0x0f,0x1f,0x1f,0x1f,0x30,0x30,0x30,0x33 |
db 0x33,0x33,0x33,0x33,0x33,0x3b,0x3b,0x3b,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff |
db 0x62,0x62,0x62,0x3b,0x3b,0x3b,0x1c,0x1c,0x1c,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x08 |
db 0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x24,0x24,0x24,0xff,0xff,0xff,0xff |
db 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x6e,0x6e |
db 0x6e,0x48,0x48,0x48,0x25,0x25,0x25,0x0e,0x0e,0x0e |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x00 |
db 0x00,0x00,0x0a,0x0a,0x0a,0x09,0x09,0x09,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x29,0x29,0x29,0xff,0xff,0xff |
db 0xff,0xff,0xff,0x7c,0x7c,0x7c,0x71,0x71,0x71,0x50 |
db 0x50,0x50,0x2b,0x2b,0x2b,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x02,0x02,0x02,0x04,0x04,0x04,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x36,0x36,0x36,0x56,0x56 |
db 0x56,0x69,0x69,0x69,0x64,0x64,0x64,0x4a,0x4a,0x4a |
db 0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x05,0x05,0x05 |
db 0x00,0x00,0x00,0x21,0x21,0x21,0x39,0x39,0x39,0x49 |
db 0x49,0x49,0x48,0x48,0x48,0x35,0x35,0x35,0x1d,0x1d |
db 0x1d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x1d,0x1d,0x1d,0x27,0x27,0x27 |
db 0x27,0x27,0x27,0x1d,0x1d,0x1d,0x0f,0x0f,0x0f,0x06 |
db 0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 |
db 0x00,0x00,0x00,0x00 |
endg |
Property changes: |
Added: svn:eol-style |
+native |
\ No newline at end of property |
Added: svn:keywords |
+Rev |
\ No newline at end of property |
/kernel/trunk/kernel.asm |
---|
1901,6 → 1901,8 |
;----------------------------------------------------------------------------- |
sys_end: |
cmp [_display.select_cursor], 0 |
je @f |
; restore default cursor before killing |
pusha |
mov ecx, [current_slot] |
1907,6 → 1909,7 |
mov ecx, [ecx + APPDATA.window] |
call restore_default_cursor_before_killing |
popa |
@@: |
;-------------------------------------- |
; kill all sockets this process owns |
pusha |
1951,10 → 1954,8 |
cmp esi, [current_cursor] |
je @f |
cmp [_display.select_cursor], 0 |
jz @f |
stdcall [_display.select_cursor], esi |
push esi |
call [_display.select_cursor] |
mov [current_cursor], esi |
@@: |
mov [redrawmouse_unconditional], 1 |
2061,6 → 2062,8 |
call socket_process_end |
popa |
;-------------------------------------- |
cmp [_display.select_cursor], 0 |
je .restore_end |
; restore default cursor before killing |
pusha |
mov ecx, [esp+32] |
2072,6 → 2075,7 |
call restore_default_cursor_before_killing |
@@: |
popa |
.restore_end: |
;-------------------------------------- |
;call MEM_Heap_Lock ;guarantee that process isn't working with heap |
mov [ecx + APPDATA.state], TSTATE_ZOMBIE; clear possible i40's |
2553,7 → 2557,8 |
lea eax, [edx-1] |
stosd |
mov edx, [SLOT_BASE + ecx + APPDATA.window] |
mov edx, ecx |
shr edx, (BSF sizeof.APPDATA - BSF sizeof.WDATA) |
; +30: PID/TID |
mov eax, [SLOT_BASE + ecx + APPDATA.tid] |
2561,7 → 2566,7 |
; window position and size |
push esi |
lea esi, [edx + WDATA.box] |
lea esi, [window_data + edx + WDATA.box] |
movsd |
movsd |
movsd |
2572,7 → 2577,7 |
stosd |
; Window client area box |
lea esi, [edx + WDATA.clientbox] |
lea esi, [window_data + edx + WDATA.clientbox] |
movsd |
movsd |
movsd |
2579,7 → 2584,7 |
movsd |
; Window state |
mov al, [edx + WDATA.fl_wstate] |
mov al, [window_data + edx + WDATA.fl_wstate] |
stosb |
; Event mask (+71) |
2766,8 → 2771,12 |
is_cache_enabled: |
mov eax, cr0 |
mov ebx, eax |
and eax, 01100000_00000000_00000000_00000000b |
mov [esp + SYSCALL_STACK.eax], eax |
jz cache_disabled |
mov [esp + SYSCALL_STACK.eax], ebx |
cache_disabled: |
mov dword [esp + SYSCALL_STACK.eax], eax;0 |
ret |
modify_pce: |
2882,7 → 2891,7 |
; DEBUGF 1, "K : backg y %x\n",[BG_Rect_Y_top_bottom] |
;--------- set event 5 start ---------- |
push ecx edi |
mov edi, window_data |
xor edi, edi |
mov ecx, [thread_count] |
;-------------------------------------- |
align 4 |
2890,38 → 2899,40 |
add edi, sizeof.WDATA |
mov eax, [BG_Rect_X_left_right] |
mov edx, [BG_Rect_Y_top_bottom] |
cmp [edi + WDATA.draw_bgr_x], 0 |
cmp [window_data + edi + WDATA.draw_bgr_x], 0 |
jz .set |
.join: |
cmp word [edi + WDATA.draw_bgr_x], ax |
cmp word [window_data + edi + WDATA.draw_bgr_x], ax |
jae @f |
mov word [edi + WDATA.draw_bgr_x], ax |
mov word [window_data + edi + WDATA.draw_bgr_x], ax |
@@: |
shr eax, 16 |
cmp word [edi + WDATA.draw_bgr_x + 2], ax |
cmp word [window_data + edi + WDATA.draw_bgr_x + 2], ax |
jbe @f |
mov word [edi + WDATA.draw_bgr_x + 2], ax |
mov word [window_data + edi + WDATA.draw_bgr_x + 2], ax |
@@: |
cmp word [edi + WDATA.draw_bgr_y], dx |
cmp word [window_data + edi + WDATA.draw_bgr_y], dx |
jae @f |
mov word [edi + WDATA.draw_bgr_y], dx |
mov word [window_data + edi + WDATA.draw_bgr_y], dx |
@@: |
shr edx, 16 |
cmp word [edi + WDATA.draw_bgr_y+2], dx |
cmp word [window_data + edi + WDATA.draw_bgr_y+2], dx |
jbe @f |
mov word [edi + WDATA.draw_bgr_y+2], dx |
mov word [window_data + edi + WDATA.draw_bgr_y+2], dx |
@@: |
jmp .common |
.set: |
mov [edi + WDATA.draw_bgr_x], eax |
mov [edi + WDATA.draw_bgr_y], edx |
mov [window_data + edi + WDATA.draw_bgr_x], eax |
mov [window_data + edi + WDATA.draw_bgr_y], edx |
.common: |
mov eax, [edi + WDATA.thread] |
mov eax, [window_data + edi + WDATA.thread] |
test eax, eax |
jz @f |
or [eax + APPDATA.occurred_events], EVENT_BACKGROUND |
@@: |
loop set_bgr_event |
sub ecx, 1 |
jnz set_bgr_event |
;loop set_bgr_event |
pop edi ecx |
;--------- set event 5 stop ----------- |
dec [REDRAW_BACKGROUND] ; got new update request? |
2945,7 → 2956,7 |
jne noshutdown |
lea ecx, [edx-1] |
mov edx, SLOT_BASE + sizeof.APPDATA*2 ;OS_BASE+0x3040 |
mov edx, SLOT_BASE + sizeof.APPDATA ;OS_BASE+0x3040 |
jecxz no_mark_system_shutdown |
;-------------------------------------- |
align 4 |
2992,11 → 3003,13 |
jnz .noterminate |
.terminate: |
pushad |
push esi |
mov ecx, dword[ebx - APPDATA.state + APPDATA.window] |
mov ecx, eax |
shl ecx, BSF sizeof.WDATA |
add ecx, window_data |
call restore_default_cursor_before_killing |
popad |
pop esi |
pushad |
call terminate |
popad |
cmp byte [SYS_SHUTDOWN], 0 |
3012,7 → 3025,6 |
ret |
;----------------------------------------------------------------------------- |
align 4 |
; eax - ptr to WDATA |
redrawscreen: |
; eax , if process window_data base is eax, do not set flag/limits |
3053,11 → 3065,13 |
mov eax, [edi + WDATA.box.left] |
mov ebx, [edi + WDATA.box.top] |
cmp ebx, [draw_limits.bottom] ; ecx = area y end ebx = window y start |
jae ricino |
mov ecx, [draw_limits.bottom] ; ecx = area y end ebx = window y start |
cmp ecx, ebx |
jb ricino |
cmp eax, [draw_limits.right] ; ecx = area x end eax = window x start |
jae ricino |
mov ecx, [draw_limits.right] ; ecx = area x end eax = window x start |
cmp ecx, eax |
jb ricino |
mov eax, [edi + WDATA.box.left] |
mov ebx, [edi + WDATA.box.top] |
3076,7 → 3090,7 |
;-------------------------------------- |
align 4 |
bgli: |
cmp dword[esp], 1 ; check index in window_data array, 1 - idle |
cmp dword[esp], 1 |
jnz .az |
cmp [REDRAW_BACKGROUND], 0 |
3125,16 → 3139,18 |
;-------------------------------------- |
align 4 |
.az: |
mov eax, edi |
mov ebx, [draw_limits.left] ; set limits |
mov [edi + WDATA.draw_data.left], ebx |
mov [eax + WDATA.draw_data.left], ebx |
mov ebx, [draw_limits.top] |
mov [edi + WDATA.draw_data.top], ebx |
mov [eax + WDATA.draw_data.top], ebx |
mov ebx, [draw_limits.right] |
mov [edi + WDATA.draw_data.right], ebx |
mov [eax + WDATA.draw_data.right], ebx |
mov ebx, [draw_limits.bottom] |
mov [edi + WDATA.draw_data.bottom], ebx |
mov [eax + WDATA.draw_data.bottom], ebx |
cmp dword [esp], 1 ; check idle thread |
cmp dword [esp], 1 |
jne nobgrd |
inc [REDRAW_BACKGROUND] |
call wakeup_osloop |
3143,8 → 3159,8 |
newdw8: |
nobgrd: |
;-------------------------------------- |
push edi ebp |
mov edi, [esp+8] |
push eax edi ebp |
mov edi, [esp+12] |
cmp edi, 1 |
je .found |
3194,14 → 3210,14 |
;-------------------------------------- |
align 4 |
.not_found: |
pop ebp edi |
pop ebp edi eax |
jmp ricino |
;-------------------------------------- |
align 4 |
.found: |
pop ebp edi |
pop ebp edi eax |
mov [edi + WDATA.fl_redraw], WSTATE_REDRAW ; mark as redraw |
mov [eax + WDATA.fl_redraw], WSTATE_REDRAW ; mark as redraw |
;-------------------------------------- |
align 4 |
ricino: |
/kernel/trunk/data32.inc |
---|
353,6 → 353,7 |
BPSLine_calc_area rd MAX_SCREEN_HEIGHT |
d_width_calc_area rd MAX_SCREEN_HEIGHT |
mouseunder rd 16*24 |
mem_block_list rd 64*2 |
mem_used_list rd 64*2 |
394,6 → 395,8 |
BANK_RW dd ? |
end if |
MOUSE_PICTURE dd ? |
def_cursor dd ? |
def_cursor_clock dd ? |
def_cursor_hresize dd ? |
401,6 → 404,7 |
def_cursor_dresize1 dd ? |
def_cursor_dresize2 dd ? |
current_cursor dd ? |
hw_cursor dd ? |
cur_saved_base dd ? |
cur.lock dd ? ; 1 - lock update, 2- hide |
/kernel/trunk/hid/mousedrv.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2023. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2022. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
54,7 → 54,46 |
movzx ebx, word [Y_UNDER] |
stdcall [_display.restore_cursor], eax, ebx |
popad |
ret |
@@: |
pushad |
xor ecx, ecx |
xor edx, edx |
.mres: |
movzx eax, word [X_UNDER] |
movzx ebx, word [Y_UNDER] |
add eax, ecx |
add ebx, edx |
push ecx |
push edx |
push eax |
push ebx |
mov eax, edx |
shl eax, 6 |
shl ecx, 2 |
add eax, ecx |
add eax, mouseunder |
mov ecx, [eax] |
pop ebx |
pop eax |
mov edi, 1 ; force |
or ecx, 0x04000000 ; don't save to mouseunder area |
; call [putpixel] |
call __sys_putpixel |
pop edx |
pop ecx |
inc ecx |
cmp ecx, 16 |
jnz .mres |
xor ecx, ecx |
inc edx |
cmp edx, 24 |
jnz .mres |
popad |
ret |
;----------------------------------------------------------------------------- |
62,7 → 101,7 |
align 4 |
save_draw_mouse: |
cmp [_display.move_cursor], 0 |
je .exit |
je .no_hw_cursor |
pushad |
mov [X_UNDER], ax |
119,10 → 158,8 |
je .draw |
@@: |
cmp [_display.select_cursor], 0 |
jz .error |
stdcall [_display.select_cursor], esi |
push esi |
call [_display.select_cursor] |
mov [current_cursor], esi |
;-------------------------------------- |
align 4 |
140,14 → 177,281 |
; ret |
;-------------------------------------- |
align 4 |
.error: |
.no_hw_cursor: |
pushad |
; save & draw |
mov [X_UNDER], ax |
mov [Y_UNDER], bx |
push eax |
push ebx |
mov ecx, 0 |
mov edx, 0 |
;-------------------------------------- |
align 4 |
.drm: |
push eax |
push ebx |
push ecx |
push edx |
; helloworld |
push ecx |
add eax, ecx ; save picture under mouse |
add ebx, edx |
push ecx |
or ecx, 0x04000000 ; don't load to mouseunder area |
push eax ebx edx edi |
call [GETPIXEL] |
pop edi edx ebx eax |
mov [COLOR_TEMP], ecx |
pop ecx |
mov eax, edx |
shl eax, 6 |
shl ecx, 2 |
add eax, ecx |
add eax, mouseunder |
mov ebx, [COLOR_TEMP] |
and ebx, 0xffffff |
mov [eax], ebx |
pop ecx |
mov edi, edx ; y cycle |
shl edi, 4 ; *16 bytes per row |
add edi, ecx ; x cycle |
mov esi, edi |
add edi, esi |
add edi, esi ; *3 |
add edi, [MOUSE_PICTURE] ; we have our str address |
mov esi, edi |
add esi, 16*24*3 |
push ecx |
mov ecx, [COLOR_TEMP] |
call combine_colors |
and ecx, 0xffffff |
mov [MOUSE_COLOR_MEM], ecx |
pop ecx |
pop edx |
pop ecx |
pop ebx |
pop eax |
add eax, ecx ; we have x coord+cycle |
add ebx, edx ; and y coord+cycle |
push ecx |
mov ecx, [MOUSE_COLOR_MEM] |
mov edi, 1 ; force |
or ecx, 0x04000000 ; don't save to mouseunder area |
; call [putpixel] |
call __sys_putpixel |
pop ecx |
mov ebx, [esp+0] ; pure y coord again |
mov eax, [esp+4] ; and x |
inc ecx ; +1 cycle |
cmp ecx, 16 ; if more than 16 |
jnz .drm |
xor ecx, ecx |
inc edx |
cmp edx, 24 |
jnz .drm |
add esp, 8 |
popad |
.exit: |
ret |
;----------------------------------------------------------------------------- |
align 4 |
combine_colors: |
; in |
; ecx - color ( 00 RR GG BB ) |
; edi - ref to new color byte |
; esi - ref to alpha byte |
; |
; out |
; ecx - new color ( roughly (ecx*[esi]>>8)+([edi]*[esi]>>8) ) |
push eax |
push ebx |
push edx |
push ecx |
xor ecx, ecx |
; byte 0 |
mov eax, 0xff |
sub al, [esi+0] |
mov ebx, [esp] |
shr ebx, 16 |
and ebx, 0xff |
mul ebx |
shr eax, 8 |
add ecx, eax |
xor eax, eax |
xor ebx, ebx |
mov al, [edi+0] |
mov bl, [esi+0] |
mul ebx |
shr eax, 8 |
add ecx, eax |
shl ecx, 8 |
; byte 1 |
mov eax, 0xff |
sub al, [esi+1] |
mov ebx, [esp] |
shr ebx, 8 |
and ebx, 0xff |
mul ebx |
shr eax, 8 |
add ecx, eax |
xor eax, eax |
xor ebx, ebx |
mov al, [edi+1] |
mov bl, [esi+1] |
mul ebx |
shr eax, 8 |
add ecx, eax |
shl ecx, 8 |
; byte 2 |
mov eax, 0xff |
sub al, [esi+2] |
mov ebx, [esp] |
and ebx, 0xff |
mul ebx |
shr eax, 8 |
add ecx, eax |
xor eax, eax |
xor ebx, ebx |
mov al, [edi+2] |
mov bl, [esi+2] |
mul ebx |
shr eax, 8 |
add ecx, eax |
pop eax |
pop edx |
pop ebx |
pop eax |
ret |
;----------------------------------------------------------------------------- |
align 4 |
check_mouse_area_for_getpixel: |
; in: |
; eax = x |
; ebx = y |
; out: |
; ecx = new color |
push eax ebx |
; check for Y |
xor ecx, ecx |
mov cx, [Y_UNDER] ; [MOUSE_Y] |
cmp ebx, ecx |
jb .no_mouse_area |
add ecx, 23 ; mouse cursor Y size |
cmp ebx, ecx |
ja .no_mouse_area |
; offset Y |
sub bx, [Y_UNDER] ; [MOUSE_Y] |
;-------------------------------------- |
; check for X |
xor ecx, ecx |
mov cx, [X_UNDER] ; [MOUSE_X] |
cmp eax, ecx |
jb .no_mouse_area |
add ecx, 15 ; mouse cursor X size |
cmp eax, ecx |
ja .no_mouse_area |
; offset X |
sub ax, [X_UNDER] ; [MOUSE_X] |
;-------------------------------------- |
; eax = offset x |
; ebx = offset y |
shl ebx, 6 ;y |
shl eax, 2 ;x |
add eax, ebx |
add eax, mouseunder |
mov ecx, [eax] |
and ecx, 0xffffff |
or ecx, 0xff000000 |
pop ebx eax |
ret |
.no_mouse_area: |
xor ecx, ecx |
pop ebx eax |
ret |
;----------------------------------------------------------------------------- |
align 4 |
check_mouse_area_for_putpixel: |
; in: |
; ecx = x shl 16 + y |
; eax = color |
; out: |
; eax = new color |
push eax |
; check for Y |
mov ax, [Y_UNDER] ; [MOUSE_Y] |
cmp cx, ax |
jb .no_mouse_area |
add ax, 23 ; mouse cursor Y size |
cmp cx, ax |
ja .no_mouse_area |
; offset Y |
sub cx, [Y_UNDER] ; [MOUSE_Y] |
mov ax, cx |
shl eax, 16 |
; check for X |
mov ax, [X_UNDER] ; [MOUSE_X] |
shr ecx, 16 |
cmp cx, ax |
jb .no_mouse_area |
add ax, 15 ; mouse cursor X size |
cmp cx, ax |
ja .no_mouse_area |
; offset X |
sub cx, [X_UNDER] ; [MOUSE_X] |
mov ax, cx |
; eax = (offset y) shl 16 + (offset x) |
pop ecx |
push eax ebx |
mov ebx, eax |
shr ebx, 16 ; y |
and eax, 0xffff ; x |
shl ebx, 6 |
shl eax, 2 |
add eax, ebx |
add eax, mouseunder |
and ecx, 0xFFFFFF |
mov [eax], ecx |
pop ebx eax |
push esi edi |
rol eax, 16 |
movzx edi, ax ; y cycle |
shl edi, 4 ; *16 bytes per row |
shr eax, 16 |
add edi, eax ; x cycle |
lea edi, [edi*3] |
add edi, [MOUSE_PICTURE] ; we have our str address |
mov esi, edi |
add esi, 16*24*3 |
call combine_colors |
pop edi esi |
mov eax, ecx |
ret |
.no_mouse_area: |
pop eax |
ret |
;----------------------------------------------------------------------------- |
align 4 |
__sys_draw_pointer: |
pushad |
movzx ecx, word [X_UNDER] |
157,22 → 461,25 |
cmp [redrawmouse_unconditional], 0 |
je @f |
mov [redrawmouse_unconditional], 0 |
jmp .redrawmouse |
jmp redrawmouse |
@@: |
cmp eax, ecx |
jne .redrawmouse |
jne redrawmouse |
cmp ebx, edx |
je .nodmp |
je nodmp |
;-------------------------------------- |
align 4 |
.redrawmouse: |
redrawmouse: |
pushfd |
cli |
call draw_mouse_under |
call save_draw_mouse |
; mov eax, [_display.select_cursor] |
; test eax, eax |
; jz @f |
cmp [_display.select_cursor], select_cursor |
jne @f |
192,7 → 499,7 |
mov [X_UNDER_sub_CUR_hot_x_add_curh], ax |
@@: |
popfd |
.nodmp: |
nodmp: |
popad |
ret |
/kernel/trunk/video/cursors.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2023. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2022. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
617,74 → 617,6 |
endp |
;------------------------------------------------------------------------------ |
align 4 |
proc VGA_restore_32 stdcall, x:dword, y:dword |
push ebx |
mov ebx, [cur_saved_base] |
mov edx, [cur.h] |
test edx, edx |
jz .ret |
push esi |
push edi |
mov esi, cur_saved_data |
mov edi, ebx |
push [cur.w] |
push [cur.top];[y] |
push [cur.left];[x] |
;mov eax, [cur.top] |
;add [esp + 4], eax |
;mov eax, [cur.left] |
;add [esp], eax |
;-------------------------------------- |
align 4 |
@@: |
mov ecx, [esi] |
add esi, 4 |
;mov eax, [esp] |
;sub eax, [x] |
;shl eax, 2 ; *4 |
;mov [edi + eax], ecx |
mov eax, [esp] |
mov ebx, [esp + 4] |
push edx edi |
mov edi, 1 |
or ecx, 0x04000000 |
call __sys_putpixel |
pop edi edx |
add dword[esp], 1 |
dec dword[esp + 8] |
jnz @b |
mov eax, [cur.w] |
mov ecx, [cur.left];[x] |
;add ecx, [cur.left] |
mov [esp + 8], eax |
mov dword[esp], ecx |
inc dword[esp + 4] |
;add edi, [_display.lfb_pitch] |
dec edx |
jnz @b |
add esp, 4*3 |
pop edi |
pop esi |
;-------------------------------------- |
align 4 |
.ret: |
pop ebx |
ret |
endp |
;------------------------------------------------------------------------------ |
align 4 |
proc move_cursor_24 stdcall, hcursor:dword, x:dword, y:dword |
locals |
h dd ? |
1027,163 → 959,8 |
jnz .row |
ret |
endp |
;------------------------------------------------------------------------------ |
align 4 |
proc VGA_move_cursor_32 stdcall, hcursor:dword, x:dword, y:dword |
locals |
h dd ? |
_dx dd ? |
_dy dd ? |
bg_ptr dd ? |
tmp_x dd ? |
tmp_y dd ? |
endl |
mov esi, [hcursor] |
mov ecx, [x] |
mov eax, [y] |
xor edx, edx |
sub ecx, [esi + CURSOR.hot_x] |
lea ebx, [ecx+32-1] |
mov [x], ecx |
sets dl |
dec edx |
and ecx, edx ;clip x to 0<=x |
mov [cur.left], ecx |
mov edi, ecx |
sub edi, [x] |
mov [_dx], edi |
xor edx, edx |
sub eax, [esi + CURSOR.hot_y] |
lea edi, [eax+32-1] |
mov [y], eax |
sets dl |
dec edx |
and eax, edx ;clip y to 0<=y |
mov [cur.top], eax |
mov edx, eax |
sub edx, [y] |
mov [_dy], edx |
mov [tmp_x], ecx |
mov [tmp_y], eax |
mov eax, [BPSLine_calc_area+eax*4] |
lea edx, [LFB_BASE + eax + ecx*4] |
mov [cur_saved_base], edx |
cmp ebx, [_display.width] |
jb @F |
mov ebx, [_display.width] |
;-------------------------------------- |
align 4 |
@@: |
cmp edi, [_display.height] |
jb @F |
mov edi, [_display.height] |
;-------------------------------------- |
align 4 |
@@: |
sub ebx, [x] |
sub edi, [y] |
sub ebx, [_dx] |
sub edi, [_dy] |
mov [cur.w], ebx |
mov [cur.h], edi |
mov [h], edi |
mov eax, edi |
mov edi, cur_saved_data |
xor ecx, ecx |
mov eax, ecx |
;-------------------------------------- |
align 4 |
@@: |
; get and save pixel background |
push eax ecx ebx edx |
add eax, [tmp_x] |
mov ebx, ecx |
add ebx, [tmp_y] |
push edi |
or ecx, 0x04000000 |
call [GETPIXEL] |
pop edi |
;and ecx, 0x00ffffff |
mov [edi], ecx |
add edi, 4 |
pop edx ebx ecx eax |
inc eax |
cmp eax, [cur.w] |
jb @b |
xor eax, eax |
inc ecx |
cmp ecx, [h] |
jb @B |
;draw cursor |
mov ebx, [cur_saved_base] |
mov eax, [_dy] |
shl eax, 5 |
add eax, [_dx] |
mov esi, [hcursor] |
mov esi, [esi + CURSOR.base] |
lea edx, [esi+eax*4] |
mov [bg_ptr], cur_saved_data |
mov [_dy], 0 |
;-------------------------------------- |
align 4 |
.row: |
mov [_dx], 0 |
mov ecx, [cur.w] |
mov esi, edx ; cursor image base |
mov edi, ebx |
add edx, 32*4 |
add ebx, [_display.lfb_pitch] |
;-------------------------------------- |
align 4 |
.pix: |
; get pixel cursor |
lodsd |
test eax, 0xFF000000 |
jz @F |
mov [edi], eax |
pusha |
mov edi, 1 ; force |
mov ecx, eax ; color |
and ecx, 0x00ffffff |
or ecx, 0x04000000 |
mov eax, [x] |
mov ebx, [y] |
add eax, [_dx] |
add ebx, [_dy] |
call __sys_putpixel |
popa |
;-------------------------------------- |
align 4 |
@@: |
inc [_dx] |
add edi, 4 |
dec ecx |
jnz .pix |
inc [_dy] |
dec [h] |
jnz .row |
ret |
endp |
;------------------------------------------------------------------------------ |
align 4 |
check_mouse_area_for_getpixel_new: |
; in: |
; eax = x |
1390,31 → 1167,16 |
mov [edi + display_t.cr_list.prev], ecx |
if ~defined UEFI |
cmp [SCR_MODE], word 0x12 |
jne .not_vga |
; TODO |
mov ebx, VGA_restore_32 |
mov ecx, VGA_move_cursor_32 |
mov edx, VGA_putpixel |
jmp .set |
cmp [SCR_MODE], word 0x13 |
jbe .fail |
.not_vga: |
test word [SCR_MODE], 0x4000 |
jnz .not_ega |
mov ebx, restore_32 |
mov ecx, move_cursor_32 |
mov edx, Vesa20_putpixel32_new |
mov eax, [_display.bits_per_pixel] |
jmp .set |
.not_ega: |
jz .fail |
end if |
mov ebx, restore_32 |
mov ecx, move_cursor_32 |
mov edx, Vesa20_putpixel32_new |
mov eax, [_display.bits_per_pixel] |
cmp al, 32 |
jne .not_32bpp |
1422,11 → 1184,13 |
mov [_display.select_cursor], select_cursor |
mov [_display.move_cursor], ecx |
mov [_display.restore_cursor], ebx |
;mov [_display.check_mouse], check_mouse_area_for_putpixel_new |
;mov [_display.check_m_pixel], check_mouse_area_for_getpixel_new |
mov [_display.check_mouse], check_mouse_area_for_putpixel_new |
mov [_display.check_m_pixel], check_mouse_area_for_getpixel_new |
cmp [PUTPIXEL], dword VGA_putpixel |
je @f |
mov [PUTPIXEL], edx |
@@: |
stdcall load_cursor, def_hresize, dword LOAD_FROM_MEM |
mov [def_cursor_hresize], eax |
stdcall load_cursor, def_vresize, dword LOAD_FROM_MEM |
1466,10 → 1230,11 |
; mov ecx, move_cursor_15 |
; mov edx, Vesa20_putpixel15_new |
; jmp .set |
.fail: |
;xor eax, eax |
;mov [_display.select_cursor], eax |
;mov [_display.move_cursor], eax |
xor eax, eax |
mov [_display.select_cursor], eax |
mov [_display.move_cursor], eax |
ret |
;------------------------------------------------------------------------------ |
align 4 |
/kernel/trunk/video/vesa20.inc |
---|
40,7 → 40,10 |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder |
@@: |
; check mouse area for putpixel |
test ecx, 0x04000000 ; don't load to mouseunder area |
75,7 → 78,10 |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder |
@@: |
; check mouse area for putpixel |
test ecx, 0x04000000 ; don't load to mouseunder area |
104,7 → 110,10 |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder |
@@: |
; check mouse area for putpixel |
test ecx, 0x04000000 ; don't load to mouseunder area |
180,16 → 189,16 |
mov [putimg.image_cx], eax |
mov [putimg.image_cy], edx |
; calculate absolute (i.e. screen) coordinates |
mov eax, [current_slot] |
mov eax, [eax + APPDATA.window] |
mov ebx, [eax + WDATA.box.left] |
mov eax, [current_slot_idx] |
shl eax, BSF sizeof.WDATA |
mov ebx, [eax + window_data + WDATA.box.left] |
add ebx, [putimg.image_cx] |
mov [putimg.abs_cx], ebx |
mov ebx, [eax + WDATA.box.top] |
mov ebx, [eax +window_data + WDATA.box.top] |
add ebx, [putimg.image_cy] |
mov [putimg.abs_cy], ebx |
; real_sx = MIN(wnd_sx-image_cx, image_sx); |
mov ebx, [eax + WDATA.box.width] ; ebx = wnd_sx |
mov ebx, [eax + window_data + WDATA.box.width] ; ebx = wnd_sx |
inc ebx ; WDATA.box.width is one pixel less than real window x-size |
sub ebx, [putimg.image_cx] |
ja @f |
204,7 → 213,7 |
.end_x: |
mov [putimg.real_sx], ebx |
; init real_sy |
mov ebx, [eax + WDATA.box.height] ; ebx = wnd_sy |
mov ebx, [eax + window_data + WDATA.box.height] ; ebx = wnd_sy |
inc ebx |
sub ebx, [putimg.image_cy] |
ja @f |
283,7 → 292,8 |
mov ecx, [_display.select_cursor] |
cmp ecx, select_cursor |
je put_image_end_16_new |
cmp ecx, 0 |
je put_image_end_16_old |
.new_line: |
mov ecx, [putimg.real_sx] |
.new_x: |
330,6 → 340,64 |
;------------------------------------------------------------------------------ |
align 4 |
put_image_end_16_old: |
.new_line: |
mov ecx, [putimg.real_sx] |
.new_x: |
push [putimg.edi] |
mov eax, [putimg.ebp + 4] |
call eax |
cmp [ebp], bl |
jne .skip |
push ecx |
neg ecx |
add ecx, [putimg.real_sx_and_abs_cx + 4] |
shl ecx, 16 |
add ecx, [putimg.real_sy_and_abs_cy + 4] |
sub ecx, edi |
; check mouse area for putpixel |
call check_mouse_area_for_putpixel |
pop ecx |
; convert to 16 bpp and store to LFB |
;; and eax, 00000000111110001111110011111000b |
;; shr ah, 2 |
;; shr ax, 3 |
;; ror eax, 8 |
;; add al, ah |
;; rol eax, 8 |
mov [LFB_BASE + edx], ax |
.skip: |
inc edx |
inc edx |
inc ebp |
dec ecx |
jnz .new_x |
add esi, [putimg.line_increment] |
add edx, [putimg.screen_newline] |
add ebp, [putimg.winmap_newline] |
cmp [putimg.ebp], putimage_get1bpp |
jz .correct |
cmp [putimg.ebp], putimage_get2bpp |
jz .correct |
cmp [putimg.ebp], putimage_get4bpp |
jnz @f |
.correct: |
mov eax, [putimg.edi] |
mov byte [eax], 80h |
@@: |
dec edi |
jnz .new_line |
jmp put_image_end_16.finish |
;------------------------------------------------------------------------------ |
align 4 |
put_image_end_16_new: |
.new_line: |
422,7 → 490,8 |
mov ecx, [_display.select_cursor] |
cmp ecx, select_cursor |
je put_image_end_24_new |
cmp ecx, 0 |
je put_image_end_24_old |
.new_line: |
mov ecx, [putimg.real_sx] |
.new_x: |
467,6 → 536,63 |
;------------------------------------------------------------------------------ |
align 4 |
put_image_end_24_old: |
.new_line: |
mov ecx, [putimg.real_sx] |
;-------------------------------------- |
align 4 |
.new_x: |
push [putimg.edi] |
mov eax, [putimg.ebp + 4] |
call eax |
cmp [ebp], bl |
jne .skip |
push ecx |
neg ecx |
add ecx, [putimg.real_sx_and_abs_cx + 4] |
shl ecx, 16 |
add ecx, [putimg.real_sy_and_abs_cy + 4] |
sub ecx, edi |
; check mouse area for putpixel |
call check_mouse_area_for_putpixel |
pop ecx |
; store to LFB |
mov [LFB_BASE + edx], ax |
shr eax, 16 |
mov [LFB_BASE + edx + 2], al |
.skip: |
add edx, 3 |
inc ebp |
dec ecx |
jnz .new_x |
add esi, [putimg.line_increment] |
add edx, [putimg.screen_newline] |
add ebp, [putimg.winmap_newline] |
cmp [putimg.ebp], putimage_get1bpp |
jz .correct |
cmp [putimg.ebp], putimage_get2bpp |
jz .correct |
cmp [putimg.ebp], putimage_get4bpp |
jnz @f |
.correct: |
mov eax, [putimg.edi] |
mov byte [eax], 80h |
@@: |
dec edi |
jnz .new_line |
jmp put_image_end_24.finish |
;------------------------------------------------------------------------------ |
align 4 |
put_image_end_24_new: |
.new_line: |
556,6 → 682,8 |
mov ecx, [_display.select_cursor] |
cmp ecx, select_cursor |
je put_image_end_32_new |
cmp ecx, 0 |
je put_image_end_32_old |
.new_line: |
mov ecx, [putimg.real_sx] |
608,6 → 736,59 |
;------------------------------------------------------------------------------ |
align 4 |
put_image_end_32_old: |
.new_line: |
mov ecx, [putimg.real_sx] |
.new_x: |
push [putimg.edi] |
mov eax, [putimg.ebp + 4] |
call eax |
cmp [ebp], bl |
jne .skip |
push ecx |
neg ecx |
add ecx, [putimg.real_sx_and_abs_cx + 4] |
shl ecx, 16 |
add ecx, [putimg.real_sy_and_abs_cy + 4] |
sub ecx, edi |
; check mouse area for putpixel |
call check_mouse_area_for_putpixel |
pop ecx |
; store to LFB |
mov [LFB_BASE+edx], eax |
.skip: |
add edx, 4 |
inc ebp |
dec ecx |
jnz .new_x |
add esi, [putimg.line_increment] |
add edx, [putimg.screen_newline] |
add ebp, [putimg.winmap_newline] |
cmp [putimg.ebp], putimage_get1bpp |
jz .correct |
cmp [putimg.ebp], putimage_get2bpp |
jz .correct |
cmp [putimg.ebp], putimage_get4bpp |
jnz @f |
.correct: |
mov eax, [putimg.edi] |
mov byte [eax], 80h |
@@: |
dec edi |
jnz .new_line |
jmp put_image_end_32.finish |
;------------------------------------------------------------------------------ |
align 4 |
put_image_end_32_new: |
.new_line: |
696,9 → 877,9 |
pushad |
cmp eax, [_display.width] |
jae .exit |
jge .exit |
cmp ebx, [_display.height] |
jae .exit |
jge .exit |
test edi, 1 ; force ? |
jnz .forced |
734,6 → 915,41 |
; ebx = y |
align 4 |
Vesa20_putpixel16: |
mov ecx, eax |
shl ecx, 16 |
mov cx, bx |
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
mov ebx, [BPSLine_calc_area + ebx*4] |
lea edi, [eax*2]; edi = x*2 |
mov eax, [esp + 32-8+4] |
; check for hardware cursor |
cmp [_display.select_cursor], 0 |
jne @f |
; check mouse area for putpixel |
test eax, 0x04000000 |
jnz @f |
call check_mouse_area_for_putpixel |
@@: |
; store to LFB |
and eax, 00000000111110001111110011111000b |
shr ah, 2 |
shr ax, 3 |
ror eax, 8 |
add al, ah |
rol eax, 8 |
mov [LFB_BASE + ebx + edi], ax |
ret |
;----------------------------------------------------------------------------- |
; eax = x |
; ebx = y |
align 4 |
Vesa20_putpixel16_new: |
mov ecx, eax |
784,6 → 1000,37 |
; ebx = y |
align 4 |
Vesa20_putpixel24: |
mov ecx, eax |
shl ecx, 16 |
mov cx, bx |
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
mov ebx, [BPSLine_calc_area + ebx*4] |
lea edi, [eax + eax*2]; edi = x*3 |
mov eax, [esp + 32-8+4] |
; check for hardware cursor |
cmp [_display.select_cursor], 0 |
jne @f |
; check mouse area for putpixel |
test eax, 0x04000000 |
jnz @f |
call check_mouse_area_for_putpixel |
@@: |
; store to LFB |
mov [LFB_BASE + ebx + edi], ax |
shr eax, 16 |
mov [LFB_BASE + ebx + edi + 2], al |
ret |
;----------------------------------------------------------------------------- |
; eax = x |
; ebx = y |
align 4 |
Vesa20_putpixel24_new: |
mov ecx, eax |
829,6 → 1076,35 |
; ebx = y |
align 4 |
Vesa20_putpixel32: |
mov ecx, eax |
shl ecx, 16 |
mov cx, bx |
; imul ebx, [BytesPerScanLine] ; ebx = y * y multiplier |
mov ebx, [BPSLine_calc_area+ebx*4] |
lea edi, [ebx + eax*4] ; edi = x*4+(y*y multiplier) |
mov eax, [esp + 32-8+4] ; eax = color |
; check for hardware cursor |
cmp [_display.select_cursor], 0 |
jne @f |
; check mouse area for putpixel |
test eax, 0x04000000 |
jnz @f |
call check_mouse_area_for_putpixel |
@@: |
and eax, 0xffffff |
; store to LFB |
mov [LFB_BASE + edi], eax |
ret |
;----------------------------------------------------------------------------- |
; eax = x |
; ebx = y |
align 4 |
Vesa20_putpixel32_new: |
mov ecx, eax |
1126,14 → 1402,14 |
mov [drbar.bar_sx], ecx |
mov [drbar.bar_cx], eax |
mov [drbar.bar_cy], ebx |
mov edi, [current_slot] |
mov edi, [edi + APPDATA.window] |
add eax, [edi + WDATA.box.left] ; win_cx |
add ebx, [edi + WDATA.box.top] ; win_cy |
mov edi, [current_slot_idx] |
shl edi, BSF sizeof.WDATA |
add eax, [edi + window_data + WDATA.box.left] ; win_cx |
add ebx, [edi + window_data + WDATA.box.top] ; win_cy |
mov [drbar.abs_cx], eax |
mov [drbar.abs_cy], ebx |
; real_sx = MIN(wnd_sx-bar_cx, bar_sx); |
mov ebx, [edi + WDATA.box.width] ; ebx = wnd_sx |
mov ebx, [edi + window_data + WDATA.box.width] ; ebx = wnd_sx |
inc ebx ; WDATA.box.width is one pixel less than real window x-size |
sub ebx, [drbar.bar_cx] |
ja @f |
1150,7 → 1426,7 |
.end_x: |
mov [drbar.real_sx], ebx |
; real_sy = MIN(wnd_sy-bar_cy, bar_sy); |
mov ebx, [edi + WDATA.box.height] ; ebx = wnd_sy |
mov ebx, [edi + window_data + WDATA.box.height] ; ebx = wnd_sy |
inc ebx |
sub ebx, [drbar.bar_cy] |
ja @f |
1232,7 → 1508,8 |
mov ecx, [_display.select_cursor] |
cmp ecx, select_cursor |
je draw_bar_end_24_new |
cmp ecx, 0 |
je draw_bar_end_24_old |
.new_y: |
mov edi, [drbar.real_sx] |
.new_x: |
1270,6 → 1547,49 |
;------------------------------------------------------------------------------ |
align 4 |
draw_bar_end_24_old: |
.new_y: |
mov edi, [drbar.real_sx] |
.new_x: |
cmp byte [ebp], bl |
jne .skip |
mov ecx, [drbar.real_sx_and_abs_cx] |
sub ecx, edi |
shl ecx, 16 |
add ecx, [drbar.real_sy_and_abs_cy] |
sub ecx, esi |
; check mouse area for putpixel |
call check_mouse_area_for_putpixel |
; store to LFB |
mov [edx], ax |
shr eax, 16 |
mov [edx + 2], al |
mov eax, [drbar.color] |
.skip: |
; add pixel |
add edx, 3 |
inc ebp |
dec edi |
jnz .new_x |
; add line |
add edx, [drbar.line_inc_scr] |
add ebp, [drbar.line_inc_map] |
; drawing gradient bars |
test bh, 0x80 |
jz @f |
test al, al |
jz @f |
dec al |
@@: |
dec esi |
jnz .new_y |
jmp draw_bar_end_24.end |
;------------------------------------------------------------------------------ |
align 4 |
draw_bar_end_24_new: |
.new_y: |
1349,6 → 1669,8 |
mov ecx, [_display.select_cursor] |
cmp ecx, select_cursor |
je draw_bar_end_32_new |
cmp ecx, 0 |
je draw_bar_end_32_old |
.new_y: |
mov edi, [drbar.real_sx] |
1391,6 → 1713,45 |
mov [EGA_counter], 1 |
ret |
draw_bar_end_32_old: |
.new_y: |
mov edi, [drbar.real_sx] |
.new_x: |
cmp byte [ebp], bl |
jne .skip |
mov ecx, [drbar.real_sx_and_abs_cx] |
sub ecx, edi |
shl ecx, 16 |
add ecx, [drbar.real_sy_and_abs_cy] |
sub ecx, esi |
; check mouse area for putpixel |
call check_mouse_area_for_putpixel |
; store to LFB |
mov [edx], eax |
mov eax, [drbar.color] |
.skip: |
; add pixel |
add edx, 4 |
inc ebp |
dec edi |
jnz .new_x |
; add line |
add edx, [drbar.line_inc_scr] |
add ebp, [drbar.line_inc_map] |
; drawing gradient bars |
test bh, 0x80 |
jz @f |
test al, al |
jz @f |
dec al |
@@: |
dec esi |
jnz .new_y |
jmp draw_bar_end_32.end |
;------------------------------------------------------------------------------ |
align 4 |
1469,7 → 1830,8 |
mov ecx, [_display.select_cursor] |
cmp ecx, select_cursor |
je draw_bar_end_16_new |
cmp ecx, 0 |
je draw_bar_end_16_old |
.new_y: |
mov edi, [drbar.real_sx] |
.new_x: |
1517,6 → 1879,57 |
;------------------------------------------------------------------------------ |
align 4 |
draw_bar_end_16_old: |
.new_y: |
mov edi, [drbar.real_sx] |
.new_x: |
cmp byte [ebp], bl |
jne .skip |
mov ecx, [drbar.real_sx_and_abs_cx] |
sub ecx, edi |
shl ecx, 16 |
add ecx, [drbar.real_sy_and_abs_cy] |
sub ecx, esi |
; check mouse area for putpixel |
call check_mouse_area_for_putpixel |
; convert to 16 bpp and store to LFB |
and eax, 00000000111110001111110011111000b |
shr ah, 2 |
shr ax, 3 |
ror eax, 8 |
add al, ah |
rol eax, 8 |
mov [edx], ax |
mov eax, [drbar.color] |
.skip: |
; add pixel |
add edx, 2 |
inc ebp |
dec edi |
jnz .new_x |
; add line |
add edx, [drbar.line_inc_scr] |
add ebp, [drbar.line_inc_map] |
; drawing gradient bars |
test bh, 0x80 |
jz @f |
test al, al |
jz @f |
dec al |
@@: |
dec esi |
jnz .new_y |
jmp draw_bar_end_16.end |
;------------------------------------------------------------------------------ |
align 4 |
draw_bar_end_16_new: |
.new_y: |
1664,8 → 2077,10 |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder |
@@: |
and eax, 0xffffff |
; check mouse area for putpixel |
call [_display.check_mouse] |
1856,8 → 2271,10 |
push ecx |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder |
@@: |
mov ecx, [esp+20+4] ;x |
shl ecx, 16 |
add ecx, [esp+24+4] ;y |
/kernel/trunk/video/blitter.inc |
---|
213,10 → 213,10 |
mov [esp + .flags], ebx |
mov eax, [current_slot] |
mov eax, [eax + APPDATA.window] |
mov ebx, [eax + WDATA.box.width] |
mov edx, [eax + WDATA.box.height] |
mov eax, [current_slot_idx] |
shl eax, BSF sizeof.WDATA |
mov ebx, [window_data + eax + WDATA.box.width] |
mov edx, [window_data + eax + WDATA.box.height] |
inc ebx |
inc edx |
260,19 → 260,19 |
call blit_clip |
jc .L57 |
mov eax, [current_slot] |
mov eax, [eax + APPDATA.window] |
mov eax, [current_slot_idx] |
shl eax, BSF sizeof.WDATA |
mov ebx, [esp + BLITTER.dst_x] |
mov ebp, [esp + BLITTER.dst_y] |
add ebx, [eax + WDATA.box.left] |
add ebp, [eax + WDATA.box.top] |
add ebx, [window_data + eax + WDATA.box.left] |
add ebp, [window_data + eax + WDATA.box.top] |
test [esp + .flags], BLIT_CLIENT_RELATIVE |
jz .no_client_relative |
add ebx, [eax + WDATA.clientbox.left] |
add ebp, [eax + WDATA.clientbox.top] |
add ebx, [window_data + eax + WDATA.clientbox.left] |
add ebp, [window_data + eax + WDATA.clientbox.top] |
.no_client_relative: |
mov ecx, ebx |
320,6 → 320,8 |
mov ebx, [current_slot_idx] |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je .core_32.software_cursor |
cmp [_display.select_cursor], 0 |
jne .core_32.hardware_cursor |
;-------------------------------------- |
.core_32.software_cursor: |
428,9 → 430,12 |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder_1 |
;-------------------------------------- |
align 4 |
@@: |
push ecx |
mov ecx, [esp+4] |
486,8 → 491,11 |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder_2 |
;-------------------------------------- |
@@: |
push ecx |
mov ecx, [esp+4] |
/kernel/trunk/video/framebuffer.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2023. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2022. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Synhronization for MenuetOS. ;; |
99,25 → 99,26 |
jmp .finish |
.16bpp: |
mov [PUTPIXEL], Vesa20_putpixel16_new |
mov [PUTPIXEL], Vesa20_putpixel16 |
mov [GETPIXEL], Vesa20_getpixel16 |
mov [_display.bytes_per_pixel], 2 |
jmp .finish |
.24bpp: |
mov [PUTPIXEL], Vesa20_putpixel24_new |
mov [PUTPIXEL], Vesa20_putpixel24 |
mov [GETPIXEL], Vesa20_getpixel24 |
mov [_display.bytes_per_pixel], 3 |
jmp .finish |
.32bpp: |
mov [PUTPIXEL], Vesa20_putpixel32_new |
mov [PUTPIXEL], Vesa20_putpixel32 |
mov [GETPIXEL], Vesa20_getpixel32 |
mov [_display.bytes_per_pixel], 4 |
.finish: |
mov [_display.check_mouse], check_mouse_area_for_putpixel_new |
mov [_display.check_m_pixel], check_mouse_area_for_getpixel_new |
mov [MOUSE_PICTURE], mousepointer |
mov [_display.check_mouse], check_mouse_area_for_putpixel |
mov [_display.check_m_pixel], check_mouse_area_for_getpixel |
mov ax, word [SCR_MODE] |
cmp ax, 0x0012 |
/kernel/trunk/video/vga.inc |
---|
382,9 → 382,12 |
;-------------------------------------- |
; check for hardware cursor |
cmp [_display.select_cursor], select_cursor |
je @f |
cmp [_display.select_cursor], 0 |
jne .no_mouseunder |
;-------------------------------------- |
align 4 |
@@: |
push ecx |
shl ecx, 16 |
mov cx, bx |
391,7 → 394,6 |
; check mouse area for putpixel |
test eax, 0x04000000 |
jnz @f |
call [_display.check_mouse] |
;-------------------------------------- |
align 4 |
493,10 → 495,10 |
align 4 |
VGA_draw_bar_1: |
mov [temp.cx], eax |
mov eax, [current_slot] |
mov eax, [eax + APPDATA.window] |
add ebx, [eax + WDATA.box.top] |
mov eax, [eax + WDATA.box.left] |
mov eax, [current_slot_idx] |
shl eax, BSF sizeof.WDATA |
add ebx, [window_data + eax + WDATA.box.top] |
mov eax, [window_data + eax + WDATA.box.left] |
add eax, [temp.cx] |
and eax, 0xfff8 |
shl ebx, 9 |