forked from KolibriOS/kolibrios
docpak: added; now it uses new 70th function; use new tinypad/tinypad2
tinypad: new version from Kolibri 0.5.8.1 + corrections in IPC algo for new docpak tinypad2: corrections in IPC for new docpak + full english translation bcdclk, crownscr: small fixes to match to Kolibri 0.5.8.1 distro git-svn-id: svn://kolibrios.org@122 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
857f757f85
commit
11c04adbbc
@ -136,7 +136,7 @@ call drawclock
|
||||
mov ebx,8*65536+8
|
||||
mov ecx,0x10ddeeff
|
||||
mov edx,title
|
||||
mov esi,title-titlend
|
||||
mov esi,titlend-title
|
||||
int 0x40
|
||||
|
||||
|
||||
|
@ -132,8 +132,8 @@ draw_window:
|
||||
|
||||
cmp [flscr],0
|
||||
jnz m2
|
||||
mov ebx,1*65536+640 ; [x start] *65536 + [x size]
|
||||
mov ecx,1*65536+480 ; [y start] *65536 + [y size]
|
||||
mov ebx,1*65536+638 ; [x start] *65536 + [x size]
|
||||
mov ecx,1*65536+478 ; [y start] *65536 + [y size]
|
||||
mov edx,0x02000000 ; color of work area RRGGBB,8->color gl
|
||||
mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl
|
||||
mov edi,0x005080d0 ; color of frames RRGGBB
|
||||
|
@ -1,9 +1,15 @@
|
||||
; language for programs
|
||||
lang fix en ; ru en fr ge fi
|
||||
|
||||
@^ fix macro comment {
|
||||
^@ fix }
|
||||
|
||||
|
||||
macro m2m dest,src {
|
||||
push src
|
||||
pop dest
|
||||
}
|
||||
|
||||
; new application structure
|
||||
macro meos_app_start
|
||||
{
|
||||
@ -83,8 +89,7 @@ struc mstr [sstring]
|
||||
macro sz name,[data] { ; from MFAR [mike.dld]
|
||||
common
|
||||
if used name
|
||||
name:
|
||||
db data
|
||||
name db data
|
||||
.size = $-name
|
||||
end if
|
||||
}
|
||||
@ -124,8 +129,9 @@ macro szc name,elsz,[data] { ; from MFAR [mike.dld]
|
||||
|
||||
macro lszc name,elsz,[lng,data] { ; from MFAR [mike.dld]
|
||||
common
|
||||
local s,m
|
||||
local s,m,c
|
||||
m = 0
|
||||
c = 0
|
||||
if used name
|
||||
label name
|
||||
forward
|
||||
@ -139,10 +145,12 @@ macro lszc name,elsz,[lng,data] { ; from MFAR [mike.dld]
|
||||
m = s
|
||||
end if
|
||||
db data
|
||||
c = c+1
|
||||
end if
|
||||
common
|
||||
.size = $-name
|
||||
.maxl = m
|
||||
.size = $-name
|
||||
.maxl = m
|
||||
.count = c
|
||||
end if
|
||||
}
|
||||
|
||||
@ -209,6 +217,7 @@ macro func name {
|
||||
else
|
||||
align 4
|
||||
name:
|
||||
;diff16 `name,0,name
|
||||
;pushad
|
||||
;pushfd
|
||||
;dps `name
|
||||
@ -306,61 +315,53 @@ macro mov arg1,arg2
|
||||
}
|
||||
|
||||
|
||||
macro RGB [a] {
|
||||
common
|
||||
match (r=,g=,b),a \{
|
||||
\dd ((r) shl 16) or ((g) shl 8) or (b)
|
||||
\}
|
||||
}
|
||||
|
||||
|
||||
struc POINT _t,_dx,_dy {
|
||||
.x _t _dx
|
||||
.y _t _dy
|
||||
}
|
||||
|
||||
; structure definition helper
|
||||
;include 'struct.inc'
|
||||
|
||||
macro union [def]
|
||||
{
|
||||
common size@union = 0
|
||||
origin@union = $
|
||||
forward virtual
|
||||
def
|
||||
if $-origin@union > size@union
|
||||
size@union = $-origin@union
|
||||
end if
|
||||
end virtual
|
||||
common rb size@union
|
||||
}
|
||||
include 'struct.inc'
|
||||
|
||||
; structures used in MeOS
|
||||
struc process_information
|
||||
{
|
||||
.cpu_usage dd ? ; +0
|
||||
.window_stack_position dw ? ; +4
|
||||
.window_stack_value dw ? ; +6
|
||||
.not_used1 dw ? ; +8
|
||||
.process_name rb 12 ; +10
|
||||
.memory_start dd ? ; +22
|
||||
.used_memory dd ? ; +26
|
||||
.PID dd ? ; +30
|
||||
.x_start dd ? ; +34
|
||||
.y_start dd ? ; +38
|
||||
.x_size dd ? ; +42
|
||||
.y_size dd ? ; +46
|
||||
.slot_state dw ? ; +50
|
||||
struct process_information
|
||||
cpu_usage dd ? ; +0
|
||||
window_stack_position dw ? ; +4
|
||||
window_stack_value dw ? ; +6
|
||||
not_used1 dw ? ; +8
|
||||
process_name rb 12 ; +10
|
||||
memory_start dd ? ; +22
|
||||
used_memory dd ? ; +26
|
||||
PID dd ? ; +30
|
||||
x_start dd ? ; +34
|
||||
y_start dd ? ; +38
|
||||
x_size dd ? ; +42
|
||||
y_size dd ? ; +46
|
||||
slot_state dw ? ; +50
|
||||
rb (1024-52)
|
||||
}
|
||||
sizeof.process_information=1024
|
||||
ends
|
||||
|
||||
struct system_colors
|
||||
frame dd ?
|
||||
grab dd ?
|
||||
grab_button dd ?
|
||||
grab_button_text dd ?
|
||||
grab_text dd ?
|
||||
work dd ?
|
||||
work_button dd ?
|
||||
work_button_text dd ?
|
||||
work_text dd ?
|
||||
work_graph dd ?
|
||||
ends
|
||||
|
||||
struc system_colors
|
||||
{
|
||||
.frame dd ?
|
||||
.grab dd ?
|
||||
.grab_button dd ?
|
||||
.grab_button_text dd ?
|
||||
.grab_text dd ?
|
||||
.work dd ?
|
||||
.work_button dd ?
|
||||
.work_button_text dd ?
|
||||
.work_text dd ?
|
||||
.work_graph dd ?
|
||||
}
|
||||
sizeof.system_colors=40
|
||||
|
||||
; constants
|
||||
|
||||
|
@ -88,7 +88,6 @@ macro define@struct name,[field,type,def]
|
||||
name#field type def
|
||||
sizeof.#name#field = $ - name#field
|
||||
else
|
||||
label name#.#type
|
||||
rb sizeof.#type
|
||||
end if
|
||||
local value
|
||||
@ -128,24 +127,21 @@ enable@substruct
|
||||
|
||||
macro define@union parent,name,[field,type,def]
|
||||
{ common
|
||||
virtual at parent#.#name
|
||||
virtual at 0
|
||||
forward
|
||||
if ~ field eq .
|
||||
virtual at parent#.#name
|
||||
virtual at 0
|
||||
parent#field type def
|
||||
sizeof.#parent#field = $ - parent#field
|
||||
end virtual
|
||||
if sizeof.#parent#field > $ - parent#.#name
|
||||
rb sizeof.#parent#field - ($ - parent#.#name)
|
||||
end if
|
||||
else
|
||||
label name#.#type at parent#.#name
|
||||
if sizeof.#type > $ - parent#.#name
|
||||
rb sizeof.#type - ($ - parent#.#name)
|
||||
if sizeof.#parent#field > $
|
||||
rb sizeof.#parent#field - $
|
||||
end if
|
||||
else if sizeof.#type > $
|
||||
rb sizeof.#type - $
|
||||
end if
|
||||
common
|
||||
sizeof.#name = $ - parent#.#name
|
||||
sizeof.#name = $
|
||||
end virtual
|
||||
struc name [value] \{ \common
|
||||
label .\#name
|
||||
@ -161,17 +157,17 @@ macro define@union parent,name,[field,type,def]
|
||||
|
||||
macro define@substruct parent,name,[field,type,def]
|
||||
{ common
|
||||
virtual at parent#.#name
|
||||
virtual at 0
|
||||
forward
|
||||
if ~ field eq .
|
||||
parent#field type def
|
||||
sizeof.#parent#field = $ - parent#field
|
||||
else
|
||||
label name#.#type
|
||||
rb sizeof.#type
|
||||
end if
|
||||
local value
|
||||
common
|
||||
sizeof.#name = $ - parent#.#name
|
||||
sizeof.#name = $
|
||||
end virtual
|
||||
struc name value \{
|
||||
label .\#name
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
; SYSTEM HAEDER:
|
||||
; SYSTEM HEADER:
|
||||
use32
|
||||
org 0x0
|
||||
db 'MENUET01' ; identifier
|
||||
@ -9,12 +9,12 @@
|
||||
dd 0xeff0 ;0x4fffff ;0x3ff000;0xeff0 ; esp
|
||||
dd I_PARAM ; parameters
|
||||
dd 0 ; reserved
|
||||
include 'lang.inc'
|
||||
include 'ascl.inc'
|
||||
include 'lang.inc'
|
||||
include 'macros.inc' ; useful stuff
|
||||
include 'dialogs1.inc'
|
||||
include 'scroll.inc'
|
||||
;include 'debug.inc'
|
||||
include 'debug.inc'
|
||||
purge mov ; SPEED
|
||||
;******************************************************************************
|
||||
; INITIALIZING
|
||||
@ -25,6 +25,38 @@ call mask_events
|
||||
cmp [I_PARAM],byte 0
|
||||
jz noparams
|
||||
|
||||
;//Willow
|
||||
cmp byte[I_PARAM],'*'
|
||||
jne .noipc
|
||||
; convert size from decimal representation to dword
|
||||
mov esi, I_PARAM+1
|
||||
xor edx, edx
|
||||
xor eax, eax
|
||||
@@:
|
||||
lodsb
|
||||
test al, al
|
||||
jz @f
|
||||
lea edx, [edx*4+edx]
|
||||
lea edx, [edx*2+eax]
|
||||
jmp @b
|
||||
@@:
|
||||
add edx,20
|
||||
mcall 60,1,0x10000-16
|
||||
mov dword[0x10000+-16+4],8
|
||||
mcall 40,1000000b
|
||||
mcall 23,200
|
||||
; dpd eax
|
||||
cmp eax,7
|
||||
jne exit_now
|
||||
mov esi,0x10000-16
|
||||
mov byte[esi],1
|
||||
call mask_events
|
||||
mov eax,[esi+12]
|
||||
inc eax
|
||||
call file_found
|
||||
jmp do_load_file.restorecursor
|
||||
.noipc:
|
||||
;//Willow
|
||||
; parameters are at I_PARAM
|
||||
mov esi,I_PARAM
|
||||
mov edi,filename
|
||||
@ -413,12 +445,19 @@ mov edx,cl_White
|
||||
int 0x40
|
||||
|
||||
|
||||
|
||||
if lang eq ru
|
||||
putlabel 190,120,'‘®åà ¨âì ¤®ªã¬¥â?',cl_White
|
||||
|
||||
drawlbut 170,140,30,15,'„ ',49,[sc.work_button],cl_White
|
||||
drawlbut 230,140,30,15,'<27>¥â',48,[sc.work_button],cl_White
|
||||
drawlbut 290,140,45,15,'Žâ¬¥ ',47,[sc.work_button],cl_White
|
||||
else
|
||||
putlabel 190,120,'Save the document?',cl_White
|
||||
|
||||
drawlbut 170,140,30,15,'Yes',49,[sc.work_button],cl_White
|
||||
drawlbut 230,140,30,15,'No',48,[sc.work_button],cl_White
|
||||
drawlbut 290,140,45,15,'Cancel',47,[sc.work_button],cl_White
|
||||
end if
|
||||
|
||||
mov [exit_wnd_on],1
|
||||
;----------------
|
||||
@ -2537,7 +2576,11 @@ writepos:
|
||||
|
||||
cmp [modified],1
|
||||
jne no_mod
|
||||
if lang eq ru
|
||||
putlabel 270,386,'ˆ‡Œ…<C592>…<EFBFBD>',[sc.work_button_text]
|
||||
else
|
||||
putlabel 270,386,'MODIFIED',[sc.work_button_text]
|
||||
end if
|
||||
no_mod:
|
||||
popa
|
||||
|
||||
@ -2575,9 +2618,13 @@ mov ecx,160*65536+160
|
||||
mov edx,cl_White
|
||||
int 0x40
|
||||
|
||||
|
||||
if lang eq ru
|
||||
drawlbut 375,110,50,15,'<27>®¨áª',50,[sc.work_button],[sc.work_button_text]
|
||||
drawlbut 375,130,50,15,'Žâ¬¥ ',94,[sc.work_button],[sc.work_button_text]
|
||||
else
|
||||
drawlbut 375,110,50,15,'Search',50,[sc.work_button],[sc.work_button_text]
|
||||
drawlbut 375,130,50,15,'Cancel',94,[sc.work_button],[sc.work_button_text]
|
||||
end if
|
||||
|
||||
call read_string
|
||||
|
||||
@ -2618,8 +2665,11 @@ mov ecx,100*65536+170
|
||||
mov edx,cl_White
|
||||
int 0x40
|
||||
|
||||
|
||||
putlabel 195,120,'‘âப ¥ ©¤¥ !',cl_White
|
||||
if lang eq ru
|
||||
putlabel 195,120,'‘âப ¥ ©¤¥ !',cl_White
|
||||
else
|
||||
putlabel 195,120,'String not found!',cl_White
|
||||
end if
|
||||
|
||||
drawlbut 235,140,30,15,'Žª',94,[sc.work_button],cl_White
|
||||
|
||||
@ -3501,12 +3551,19 @@ mov ecx,100*65536+170
|
||||
mov edx,cl_White
|
||||
int 0x40
|
||||
|
||||
|
||||
if lang eq ru
|
||||
putlabel 190,120,'‘®åà ¨âì ¤®ªã¬¥â?',cl_White
|
||||
|
||||
drawlbut 170,140,30,15,'„ ',46,[sc.work_button],cl_White
|
||||
drawlbut 230,140,30,15,'<27>¥â',45,[sc.work_button],cl_White
|
||||
drawlbut 290,140,45,15,'Žâ¬¥ ',47,[sc.work_button],cl_White
|
||||
else
|
||||
putlabel 190,120,'Save document?',cl_White
|
||||
|
||||
drawlbut 170,140,30,15,'Yes',46,[sc.work_button],cl_White
|
||||
drawlbut 230,140,30,15,'No',45,[sc.work_button],cl_White
|
||||
drawlbut 290,140,45,15,'Cancel',47,[sc.work_button],cl_White
|
||||
end if
|
||||
|
||||
mov [exit_wnd_on],1
|
||||
jmp still
|
||||
@ -3666,10 +3723,17 @@ mov ecx,39*65536+5
|
||||
mov edx,0x00aaaaaa
|
||||
int 0x40
|
||||
|
||||
if lang eq ru
|
||||
drawlbut 5,22,70,15,'” ©«',97,[sc.work_button],[sc.work_button_text]
|
||||
drawlbut 75,22,70,15,'Š®¤',98,[sc.work_button],[sc.work_button_text]
|
||||
drawlbut 145,22,70,15,'’¥ªáâ',96,[sc.work_button],[sc.work_button_text]
|
||||
drawlbut 431,22,70,15,'‘¯à ¢ª ',99,[sc.work_button],[sc.work_button_text]
|
||||
else
|
||||
drawlbut 5,22,70,15,'File',97,[sc.work_button],[sc.work_button_text]
|
||||
drawlbut 75,22,70,15,'Code',98,[sc.work_button],[sc.work_button_text]
|
||||
drawlbut 145,22,70,15,'Text',96,[sc.work_button],[sc.work_button_text]
|
||||
drawlbut 431,22,70,15,'Help',99,[sc.work_button],[sc.work_button_text]
|
||||
end if
|
||||
|
||||
ret
|
||||
|
||||
@ -3688,30 +3752,52 @@ call drawwindow
|
||||
;int 0x40
|
||||
mov [menu_is_on],1
|
||||
|
||||
if lang eq ru
|
||||
drawlbut 5,38,70,15,'<27>®¢®¥ ®ª®',100,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,53,70,15,'<27>®¢ë©',101,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,68,70,15,'‘®åà ¨âì',2,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,83,70,15,'‘®åà. ª ª',102,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,98,70,15,'Žâªàëâì',103,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,113,70,15,'‚ë室',104,[sc.grab_button],[sc.grab_button_text]
|
||||
else
|
||||
drawlbut 5,38,70,15,'New window',100,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,53,70,15,'New',101,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,68,70,15,'Save',2,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,83,70,15,'Save as',102,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,98,70,15,'Open',103,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 5,113,70,15,'Exit',104,[sc.grab_button],[sc.grab_button_text]
|
||||
end if
|
||||
jmp still
|
||||
|
||||
draw_win_menu_code:
|
||||
call clear_screen
|
||||
call drawwindow
|
||||
if lang eq ru
|
||||
drawlbut 75,38,70,15,'Š®¬¯¨«.',10000,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 75,53,70,15,'‡ ¯ãáâ¨âì',10001,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 75,68,70,15,'„®áª ®â«.',10002,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 75,83,70,15,'SysFunc',10003,[sc.grab_button],[sc.grab_button_text]
|
||||
else
|
||||
drawlbut 75,38,70,15,'Compile',10000,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 75,53,70,15,'Run',10001,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 75,68,70,15,'Debug board',10002,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 75,83,70,15,'SysFunc',10003,[sc.grab_button],[sc.grab_button_text]
|
||||
end if
|
||||
mov [menu_is_on],1
|
||||
jmp still
|
||||
|
||||
draw_win_menu_text:
|
||||
call clear_screen
|
||||
call drawwindow
|
||||
if lang eq ru
|
||||
drawlbut 145,38,70,15,'GoTo Line#',95,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 145,53,70,15,'<27> ©â¨',92,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 145,68,70,15,'<27> ©â¨ ¤ «¥¥',50,[sc.grab_button],[sc.grab_button_text]
|
||||
else
|
||||
drawlbut 145,38,70,15,'GoTo Line#',95,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 145,53,70,15,'Find',92,[sc.grab_button],[sc.grab_button_text]
|
||||
drawlbut 145,68,70,15,'Find next',50,[sc.grab_button],[sc.grab_button_text]
|
||||
end if
|
||||
mov [menu_is_on],1
|
||||
jmp still
|
||||
|
||||
@ -3724,9 +3810,15 @@ jmp still
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
if lang eq ru
|
||||
openerrtext db 'Žè¨¡ª ®âªàëâ¨ï ä ©« ¨«¨ ®âªàë⨥ ®â¬¥¥®!',0
|
||||
saveerrtext db 'Žè¨¡ª á®åà ¥¨ï ä ©« ¨«¨ á®åà ¥¨¥ ®â¬¥¥®!',0
|
||||
newfileerror db '<27>¥¢®§¬®¦® á®å¤ âì ®¢ë© ä ©«',0
|
||||
newfileerror db '<27>¥¢®§¬®¦® ᮧ¤ âì ®¢ë© ä ©«',0
|
||||
else
|
||||
openerrtext db 'Error while opening file or opening canceled!',0
|
||||
saveerrtext db 'Error while saving file or saving canceled!',0
|
||||
newfileerror db 'Cannot create new file',0
|
||||
end if
|
||||
; ********************
|
||||
; ****** DATA ******
|
||||
; ********************
|
||||
|
Loading…
Reference in New Issue
Block a user