forked from KolibriOS/kolibrios
update file register filter
git-svn-id: svn://kolibrios.org@9641 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b4a6b076d8
commit
f0b26fcb2b
@ -97,7 +97,7 @@ win:
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
START: ; start of execution
|
START: ; start of execution
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
mcall 68,11
|
mcall SF_SYS_MISC,SSF_HEAP_INIT
|
||||||
|
|
||||||
test eax,eax
|
test eax,eax
|
||||||
jz close
|
jz close
|
||||||
@ -118,14 +118,11 @@ load_libraries l_libs_start,end_l_libs
|
|||||||
stdcall string.length, app_param
|
stdcall string.length, app_param
|
||||||
add eax, app_param
|
add eax, app_param
|
||||||
mov ecx, [eax-4]
|
mov ecx, [eax-4]
|
||||||
|
or ecx, 0x20202000 ;letters to lowercase
|
||||||
cmp ecx, '.skn'
|
cmp ecx, '.skn'
|
||||||
je load_skin_from_param
|
je load_skin_from_param
|
||||||
cmp ecx, '.SKN'
|
|
||||||
je load_skin_from_param
|
|
||||||
cmp ecx, '.dtp'
|
cmp ecx, '.dtp'
|
||||||
je load_dtp_from_param
|
je load_dtp_from_param
|
||||||
cmp ecx, '.DTP'
|
|
||||||
je load_dtp_from_param
|
|
||||||
jmp no_param
|
jmp no_param
|
||||||
|
|
||||||
load_dtp_from_param:
|
load_dtp_from_param:
|
||||||
@ -139,7 +136,7 @@ load_skin_from_param:
|
|||||||
jmp skin_path_ready
|
jmp skin_path_ready
|
||||||
|
|
||||||
no_param:
|
no_param:
|
||||||
mcall 48,3,color_table,4*10 ; get current colors
|
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,color_table,4*10 ; get current colors
|
||||||
call load_skin_file.2
|
call load_skin_file.2
|
||||||
|
|
||||||
skin_path_ready:
|
skin_path_ready:
|
||||||
@ -166,7 +163,7 @@ red:
|
|||||||
call draw_window ; at first, draw the window
|
call draw_window ; at first, draw the window
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
still:
|
still:
|
||||||
mcall 10 ; wait here for event
|
mcall SF_WAIT_EVENT
|
||||||
|
|
||||||
dec eax ; redraw request ?
|
dec eax ; redraw request ?
|
||||||
jz red
|
jz red
|
||||||
@ -180,11 +177,11 @@ still:
|
|||||||
jmp still
|
jmp still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
key: ; key
|
key: ; key
|
||||||
mcall 2 ; just read it and ignore
|
mcall SF_GET_KEY
|
||||||
jmp still
|
jmp still
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
button: ; button
|
button: ; button
|
||||||
mcall 17 ; get id
|
mcall SF_GET_BUTTON
|
||||||
|
|
||||||
cmp ah,12 ; load file
|
cmp ah,12 ; load file
|
||||||
jne no_load
|
jne no_load
|
||||||
@ -204,7 +201,7 @@ no_save:
|
|||||||
cmp ah,14 ; set 3d buttons
|
cmp ah,14 ; set 3d buttons
|
||||||
jne no_3d
|
jne no_3d
|
||||||
|
|
||||||
mcall 48,1,1
|
mcall SF_STYLE_SETTINGS,SSF_SET_BUTTON_STYLE,1
|
||||||
invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 1
|
invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 1
|
||||||
jmp doapply
|
jmp doapply
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -213,10 +210,10 @@ no_3d:
|
|||||||
jne no_flat
|
jne no_flat
|
||||||
|
|
||||||
invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 0
|
invoke ini_set_int, aIni, aSectionSkn, aButtonStyle, 0
|
||||||
mcall 48, 1, 0
|
mcall SF_STYLE_SETTINGS,SSF_SET_BUTTON_STYLE, 0
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
doapply:
|
doapply:
|
||||||
mcall 48, 0, 0
|
mcall SF_STYLE_SETTINGS,SSF_APPLY, 0
|
||||||
jmp still
|
jmp still
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
no_flat:
|
no_flat:
|
||||||
@ -224,7 +221,7 @@ no_flat:
|
|||||||
jne no_apply
|
jne no_apply
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
apply_direct:
|
apply_direct:
|
||||||
mcall 48,2,color_table,10*4
|
mcall SF_STYLE_SETTINGS,SSF_SET_COLORS,color_table,10*4
|
||||||
jmp doapply
|
jmp doapply
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
no_apply:
|
no_apply:
|
||||||
@ -242,7 +239,7 @@ no_load_skin:
|
|||||||
cmp [skin_info],0
|
cmp [skin_info],0
|
||||||
je no_apply_skin
|
je no_apply_skin
|
||||||
|
|
||||||
mcall 48,8,skin_info
|
mcall SF_STYLE_SETTINGS,SSF_SET_SKIN,skin_info
|
||||||
call draw_window
|
call draw_window
|
||||||
jmp still
|
jmp still
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -317,7 +314,7 @@ load_dtp_file:
|
|||||||
mov dword [ebx+8], eax ; offset (high dword)
|
mov dword [ebx+8], eax ; offset (high dword)
|
||||||
mov dword [ebx+12], 40 ; read colors file: 4*10 bytes
|
mov dword [ebx+12], 40 ; read colors file: 4*10 bytes
|
||||||
mov dword [ebx+16], color_table ; address
|
mov dword [ebx+16], color_table ; address
|
||||||
mcall 70
|
mcall SF_FILE
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
load_skin_file:
|
load_skin_file:
|
||||||
@ -343,7 +340,7 @@ load_skin_file:
|
|||||||
mov dword [ebx+8], eax ; offset (high dword)
|
mov dword [ebx+8], eax ; offset (high dword)
|
||||||
mov dword [ebx+12], 32*1024 ; read: max 32 KBytes
|
mov dword [ebx+12], 32*1024 ; read: max 32 KBytes
|
||||||
mov dword [ebx+16], file_load_area ; address
|
mov dword [ebx+16], file_load_area ; address
|
||||||
mcall 70
|
mcall SF_FILE
|
||||||
|
|
||||||
mov esi, file_load_area
|
mov esi, file_load_area
|
||||||
|
|
||||||
@ -400,7 +397,7 @@ save_file:
|
|||||||
and [ebx+8],eax ; (reserved)
|
and [ebx+8],eax ; (reserved)
|
||||||
mov [ebx+12],dword 10*4 ; bytes to write
|
mov [ebx+12],dword 10*4 ; bytes to write
|
||||||
mov [ebx+16],dword color_table ; address
|
mov [ebx+16],dword color_table ; address
|
||||||
mcall 70
|
mcall SF_FILE
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
draw_button_row:
|
draw_button_row:
|
||||||
@ -470,8 +467,8 @@ newcol:
|
|||||||
;----------------------------------------------------------------------
|
;----------------------------------------------------------------------
|
||||||
draw_PathShow:
|
draw_PathShow:
|
||||||
pusha
|
pusha
|
||||||
mcall 13,<frame_1.x+10,frame_1.w-25>,<frame_1.y+16,15>,0xffffff
|
mcall SF_DRAW_RECT,<frame_1.x+10,frame_1.w-25>,<frame_1.y+16,15>,0xffffff
|
||||||
mcall 13,<frame_2.x+10,frame_2.w-25>,<frame_2.y+16,15>,0xffffff
|
mcall SF_DRAW_RECT,<frame_2.x+10,frame_2.w-25>,<frame_2.y+16,15>,0xffffff
|
||||||
; draw for PathShow
|
; draw for PathShow
|
||||||
push dword PathShow_data_1
|
push dword PathShow_data_1
|
||||||
call [PathShow_draw]
|
call [PathShow_draw]
|
||||||
@ -485,10 +482,10 @@ draw_PathShow:
|
|||||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||||
; *********************************************
|
; *********************************************
|
||||||
draw_window:
|
draw_window:
|
||||||
mcall 12,1
|
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
||||||
mcall 48,3,app_colours,10*4
|
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,app_colours,10*4
|
||||||
mcall 14
|
mcall SF_GET_SCREEN_SIZE
|
||||||
mcall 48,4
|
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
|
||||||
mov [current_skin_high],eax
|
mov [current_skin_high],eax
|
||||||
; DRAW WINDOW
|
; DRAW WINDOW
|
||||||
xor eax,eax ; function 0 : define and draw window
|
xor eax,eax ; function 0 : define and draw window
|
||||||
@ -499,7 +496,7 @@ draw_window:
|
|||||||
add ecx,[current_skin_high]
|
add ecx,[current_skin_high]
|
||||||
mcall ,<110, win.w>,,,,title
|
mcall ,<110, win.w>,,,,title
|
||||||
|
|
||||||
mcall 9,procinfo,-1
|
mcall SF_THREAD_INFO,procinfo,-1
|
||||||
|
|
||||||
mov eax,[procinfo+70] ;status of window
|
mov eax,[procinfo+70] ;status of window
|
||||||
test eax,100b
|
test eax,100b
|
||||||
@ -519,20 +516,20 @@ draw_window:
|
|||||||
;-----------------------------------
|
;-----------------------------------
|
||||||
; select color DTP frame
|
; select color DTP frame
|
||||||
; LOAD BUTTON ; button 12
|
; LOAD BUTTON ; button 12
|
||||||
mcall 8,<frame_1.x+10,load_w>,<frame_1.y+38,18>,12,[w_work_button]
|
mcall SF_DEFINE_BUTTON,<frame_1.x+10,load_w>,<frame_1.y+38,18>,12,[w_work_button]
|
||||||
; SAVE BUTTON
|
; SAVE BUTTON
|
||||||
add ebx,(load_w+2)*65536-load_w+save_w
|
add ebx,(load_w+2)*65536-load_w+save_w
|
||||||
inc edx
|
inc edx
|
||||||
mcall ; button 13
|
mcall ; button 13
|
||||||
; APPLY BUTTON
|
; APPLY BUTTON
|
||||||
mov ebx,(frame_1.x + frame_1.w - apply_w - 15)*65536+apply_w
|
mov ebx,(frame_1.x + frame_1.w - apply_w - 15)*65536+apply_w
|
||||||
mcall 8,,,16 ; button 17
|
mcall SF_DEFINE_BUTTON,,,16 ; button 17
|
||||||
; select color DTP button text
|
; select color DTP button text
|
||||||
mcall 4,<frame_1.x+16,frame_1.y+44>,[w_work_button_text],t1,t1.size
|
mcall SF_DRAW_TEXT,<frame_1.x+16,frame_1.y+44>,[w_work_button_text],t1,t1.size
|
||||||
;-----------------------------------
|
;-----------------------------------
|
||||||
; select skin frame
|
; select skin frame
|
||||||
; LOAD SKIN BUTTON ; button 17
|
; LOAD SKIN BUTTON ; button 17
|
||||||
mcall 8,<frame_2.x+10,load_w>,<frame_2.y+38,18>,17,[w_work_button]
|
mcall SF_DEFINE_BUTTON,<frame_2.x+10,load_w>,<frame_2.y+38,18>,17,[w_work_button]
|
||||||
; 3D
|
; 3D
|
||||||
mov ebx,(frame_2.x+155)*65536+34
|
mov ebx,(frame_2.x+155)*65536+34
|
||||||
mcall ,,,14 ; button 14
|
mcall ,,,14 ; button 14
|
||||||
@ -544,7 +541,7 @@ draw_window:
|
|||||||
mov ebx,(frame_2.x + frame_2.w - apply_w -15)*65536+apply_w
|
mov ebx,(frame_2.x + frame_2.w - apply_w -15)*65536+apply_w
|
||||||
mcall ,,,18 ; button 18
|
mcall ,,,18 ; button 18
|
||||||
; select skin button text
|
; select skin button text
|
||||||
mcall 4,<frame_2.x+16,frame_2.y+44>,[w_work_button_text],t2,t2.size
|
mcall SF_DRAW_TEXT,<frame_2.x+16,frame_2.y+44>,[w_work_button_text],t2,t2.size
|
||||||
;-----------------------------------
|
;-----------------------------------
|
||||||
call draw_button_row
|
call draw_button_row
|
||||||
call draw_button_row_of_texts
|
call draw_button_row_of_texts
|
||||||
@ -576,7 +573,7 @@ draw_window:
|
|||||||
call draw_skin
|
call draw_skin
|
||||||
@@:
|
@@:
|
||||||
.end:
|
.end:
|
||||||
mcall 12,2
|
mcall SF_REDRAW,SSF_END_DRAW
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
include 'drawskin.inc'
|
include 'drawskin.inc'
|
||||||
|
Loading…
Reference in New Issue
Block a user