Receives a IPC-message about creating icons
git-svn-id: svn://kolibrios.org@5017 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3838117207
commit
098f10ccbc
@ -2,7 +2,7 @@ ICON_STRIP equ '/rd/1/iconstrp.png'
|
||||
ICON_INI equ '/rd/1/settings/icon.ini'
|
||||
ICON_SIZE equ 68 ;à §¬¥à ®¡« á⨠¤«ï ¨ª®ª¨ á ¤¯¨áìî
|
||||
IMG_SIZE equ 32 ;à §¬¥à ¨ª®®ª
|
||||
TEXT_BOTTOM_Y equ 15 ;®âáâ㯠¯® Y ⥪á⠮⠨§ ¨ª®ª¨
|
||||
TEXT_BOTTOM_Y equ 14 ;®âáâ㯠¯® Y ⥪á⠮⠨§ ¨ª®ª¨
|
||||
IMAGE_TOP_Y equ 10 ;>=1 Š®®à¤¨ â Y ¨ª®ª¨ ¢ ®¡« á⨠¤«ï ¤ ®© ¨ª®ª¨
|
||||
ALIGN_SIZE equ 68 ;à §¬¥à á¥âª¨ ¢ëà ¢¨¢ ¨ï
|
||||
NAME_LENGTH equ 11 ;¤«¨ ¨¬¥¨ ¨ª®ª¨
|
||||
@ -132,8 +132,13 @@ START: ; start of execution
|
||||
;######################################################################
|
||||
call FillIconsOffs ;§ ¯®«ï¥â MaxNumIcon,IconsOffs
|
||||
|
||||
mcall 40,0100000b ;ã¦ë ⮫쪮 ᮡëâ¨ï ¬ëè¨, ¯¥à¥à¨á®¢ª ¨ª®®ª ¡ã¤¥â ¢ ¤à㣮¬ ¯®â®ª¥
|
||||
;¨¨æ¨ «¨§ æ¨ï IPC ¡ãä¥à
|
||||
mov dword[IPCbuffer],0
|
||||
mov dword[IPCbuffer+4],8
|
||||
mcall 60,1,IPCbuffer,1024
|
||||
|
||||
mcall 40,01100000b ;ã¦ë ⮫쪮 ᮡëâ¨ï ¬ëè¨ ¨ IPC,
|
||||
;¯¥à¥à¨á®¢ª ¨ª®®ª ¡ã¤¥â ¢ ¤à㣮¬ ¯®â®ª¥
|
||||
mov eax,[icon_count]
|
||||
mov bl,ICONS_DRAW_COUNTH
|
||||
div bl
|
||||
@ -153,9 +158,13 @@ messages:
|
||||
mcall 10
|
||||
sub eax,6
|
||||
jz MSGMouse
|
||||
|
||||
dec eax
|
||||
jz MSGIPC
|
||||
jmp messages
|
||||
|
||||
MSGIPC:
|
||||
call IPCCreateIcon
|
||||
jmp messages
|
||||
|
||||
MSGMouse:
|
||||
mcall 37,0 ;GetMousePos
|
||||
@ -896,6 +905,71 @@ proc GenerateID ;ax = ID
|
||||
ret
|
||||
endp
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
;ä®à¬ â IPC-á®®¡é¥¨ï
|
||||
;dd X
|
||||
;dd Y
|
||||
;asciiz Icon
|
||||
;asciiz Name
|
||||
;asciiz Path
|
||||
;asciiz Params
|
||||
;-------------------------------------------------------------------------------
|
||||
proc IPCCreateIcon
|
||||
locals
|
||||
ix rd 1
|
||||
iy rd 1
|
||||
endl
|
||||
|
||||
mov eax,IPCbuffer+8
|
||||
mov dword[IPCbuffer],1
|
||||
;mov edx,dword[IPCbuffer+4]
|
||||
lea edx,[eax+8]
|
||||
|
||||
m2m dword[ix],dword[edx]
|
||||
m2m dword[iy],dword[edx+4]
|
||||
|
||||
lea esi,[edx+8]
|
||||
|
||||
mov ecx,256
|
||||
mov edi,DAreaIcon
|
||||
@@: lodsb
|
||||
stosb
|
||||
test al,al
|
||||
jnz @b
|
||||
|
||||
mov ecx,NAME_LENGTH+1
|
||||
mov edi,DAreaName
|
||||
@@: lodsb
|
||||
stosb
|
||||
test al,al
|
||||
jz @f
|
||||
loop @b
|
||||
@@:
|
||||
|
||||
mov edi,DAreaPath
|
||||
@@: lodsb
|
||||
stosb
|
||||
test al,al
|
||||
jnz @b
|
||||
|
||||
mov edi,DAreaParams
|
||||
@@: lodsb
|
||||
stosb
|
||||
test al,al
|
||||
jnz @b
|
||||
|
||||
mov dword[IPCbuffer+4],8
|
||||
mov dword[IPCbuffer],0
|
||||
|
||||
stdcall AddIcon,[ix],[iy],DAreaIcon,DAreaName,DAreaPath,DAreaParams
|
||||
|
||||
mcall 15,3
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
include 'iconman.inc'
|
||||
include 'bgredraw.inc'
|
||||
include 'RButton.inc'
|
||||
@ -1052,15 +1126,15 @@ else
|
||||
end if
|
||||
|
||||
if lang eq ru
|
||||
ErrRunProg db '"Icon\nŽè¨¡ª § ¯ã᪠¯à®£à ¬¬ë" -tE"',0
|
||||
WarningSave db '"Icon\n<EFBFBD>¥ § ¡ã¤ì⥠á®åà ¨âì ¨§¬¥¥¨ï, § ¯ãáâ¨âì RDSave" -tI',0
|
||||
ErrNotFoundIni db '"Icon\n<EFBFBD>¥ ©¤¥ icon.ini" -tE',0
|
||||
ErrName db '"Icon\nˆ¬ï \"rbmenu\" § १¥à¢¨à®¢ ®" -tE',0
|
||||
ErrRunProg db 'Žè¨¡ª § ¯ã᪠¯à®£à ¬¬ë',0
|
||||
WarningSave db '<EFBFBD>¥ § ¡ã¤ì⥠á®åà ¨âì ¨§¬¥¥¨ï, § ¯ãáâ¨âì RDSave',0
|
||||
ErrNotFoundIni db '<EFBFBD>¥ ©¤¥ icon.ini',0
|
||||
ErrName db 'ˆ¬ï "rbmenu" § १¥à¢¨à®¢ ®',0
|
||||
else
|
||||
ErrRunProg db '"Icon\nError running program" -tE',0
|
||||
WarningSave db '"Icon\nDo not forget to save the changes, run RDSave" -tI',0
|
||||
ErrNotFoundIni db '"Icon\nicon.ini not found" -tE',0
|
||||
ErrName db '"Icon\nThe name \"rbmenu\" is reserved" -tE',0
|
||||
ErrRunProg db 'Error runing program',0
|
||||
WarningSave db 'Do not forget to save the changes, run the RDSave',0
|
||||
ErrNotFoundIni db 'icon.ini not found',0
|
||||
ErrName db 'The name "rbmenu" reserved',0
|
||||
end if
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
@ -1180,6 +1254,10 @@ sc system_colors
|
||||
sc.workL rd 1
|
||||
sc.workH rd 1
|
||||
|
||||
|
||||
align 4
|
||||
IPCbuffer rb 1024
|
||||
|
||||
align 4
|
||||
|
||||
ScreenW rw 1
|
||||
|
@ -24,7 +24,7 @@ DlgProp:
|
||||
cmp bx,[wsY]
|
||||
jae @f
|
||||
mov bx,[wsY]
|
||||
@@: ;eax,ebx - реальная координата. Все координаты в проге относительно левого верхнего угла рабочей области
|
||||
@@: ;eax,ebx - ॠ«ì ï ª®®à¤¨ â . ‚ᥠª®®à¤¨ âë ¢ ¯à®£¥ ®â®á¨â¥«ì® «¥¢®£® ¢¥à奣® 㣫 à ¡®ç¥© ®¡« áâ¨
|
||||
|
||||
xor edx,edx
|
||||
mov dx,[wsXe]
|
||||
@ -41,7 +41,7 @@ DlgProp:
|
||||
mov ebx,edx
|
||||
@@:
|
||||
|
||||
xor edx,edx ;преобразовываем в относительные
|
||||
xor edx,edx ;¯à¥®¡à §®¢ë¢ ¥¬ ¢ ®â®á¨â¥«ìë¥
|
||||
mov dx,[wsW]
|
||||
shr edx,1
|
||||
add dx,[wsX]
|
||||
@ -193,10 +193,8 @@ DReDraw:
|
||||
m2m [sbIcons.frnt_col],[sc.work]
|
||||
m2m [sbIcons.line_col],[sc.work_graph]
|
||||
|
||||
edit_boxes_set_sys_color edtName,edtExePath,sc
|
||||
edit_boxes_set_sys_color edtExePath,edtParams,sc
|
||||
edit_boxes_set_sys_color edtParams,edtIcon,sc
|
||||
;edit_boxes_set_sys_color edtIcon,endEdits,sc
|
||||
edit_boxes_set_sys_color edtName,endEdits,sc
|
||||
|
||||
call DRedrawWin
|
||||
|
||||
@ -408,7 +406,7 @@ DSaveIcon:
|
||||
|
||||
cmp [DlgSelIcon],-1
|
||||
je @f
|
||||
|
||||
|
||||
stdcall EditIcon,[DlgSelIcon],DAreaIcon,DAreaName,DAreaPath,DAreaParams
|
||||
mov ebx,[DlgSelIcon]
|
||||
mov eax,[IconsID+ebx*4]
|
||||
@ -624,7 +622,7 @@ local IcoX:DWORD,\
|
||||
add edi,3
|
||||
loop @b
|
||||
|
||||
;затирание не использованых мест
|
||||
;§ â¨à ¨¥ ¥ ¨á¯®«ì§®¢ ëå ¬¥áâ
|
||||
jmp .Dalee
|
||||
|
||||
.DrawIcons2:
|
||||
@ -667,7 +665,7 @@ proc DrawSelIcon
|
||||
cmp al,'/'
|
||||
jne .GetIconInd
|
||||
.PathToIcon:
|
||||
mov al,30h ;заглушка!!!!!!!!!!!!!
|
||||
mov al,30h ;§ £«ãèª !!!!!!!!!!!!!
|
||||
mov byte[edi+1],0
|
||||
.GetIconInd:
|
||||
;int3
|
||||
|
Loading…
Reference in New Issue
Block a user