Subversion Repositories Kolibri OS

Rev

Rev 552 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 552 Rev 1493
Line 6... Line 6...
6
; Last changed: July 29, 2005
6
; Last changed: July 29, 2005
7
;
7
;
8
; COMPILE WITH FASM
8
; COMPILE WITH FASM
Line 9... Line 9...
9
 
9
 
10
PLAYLIST_PATH equ '/HD0/1/PLAYLIST.TXT'
10
PLAYLIST_PATH equ '/HD0/1/PLAYLIST.TXT'
Line 11... Line 11...
11
APP_MEM   equ 150*1024
11
;APP_MEM   equ 150*1024
12
 
12
 
13
IPC_PLAY  equ 0xa1
13
IPC_PLAY  equ 0xa1
14
IPC_PAUS  equ 0xa2
14
IPC_PAUS  equ 0xa2
Line 54... Line 54...
54
  org	 0x0
54
  org	 0x0
Line 55... Line 55...
55
 
55
 
56
  db	 'MENUET01'
56
  db	 'MENUET01'
57
  dd	 0x01
57
  dd	 0x01
58
  dd	 START
58
  dd	 START
59
  dd	 I_END
59
  dd	 IM_END
60
  dd	 APP_MEM
60
  dd	 I_END ;APP_MEM
61
  dd	 APP_MEM - 1024
61
  dd	 stacktop ;APP_MEM - 1024
62
  dd	 I_PARAM
62
  dd	 I_PARAM
63
listsel    dd 0
63
listsel    dd 0
64
channel dd 0
64
channel dd 0
65
COLOR_ORDER equ MENUETOS
65
COLOR_ORDER equ MENUETOS
-
 
66
include '..\..\..\macros.inc' ; decrease code size (optional)
-
 
67
include '..\..\..\develop\libraries\box_lib\asm\trunk\opendial.mac'
66
include '..\..\..\macros.inc' ; decrease code size (optional)
68
	use_OpenDialog
67
lang fix en
69
lang fix en
68
;purge mov
70
;purge mov
69
include 'debug.inc'
71
include 'debug.inc'
70
include 'dlg.inc'
72
include 'dlg.inc'
Line 75... Line 77...
75
hdrimg:
77
hdrimg:
76
    file 'hdr.gif'
78
    file 'hdr.gif'
77
btns:
79
btns:
78
    file 'buttons.gif'
80
    file 'buttons.gif'
79
START:
81
START:
-
 
82
        mcall 68, 11
-
 
83
;OpenDialog initialisation
-
 
84
init_OpenDialog	OpenDialog_data
-
 
85
 
80
    or	 [flag],FL_BOTTRED;+FL_MUTE
86
    or	 [flag],FL_BOTTRED;+FL_MUTE
81
    mov  ecx,ipcarea
87
    mov  ecx,ipcarea
82
    call init_ipc
88
    call init_ipc
83
    mcall 40,1000111b
89
    mcall 40,1000111b
84
    mov  esi,btns
90
    mov  esi,btns
Line 118... Line 124...
118
    newline
124
    newline
119
    mov  [fname_len],0
125
    mov  [fname_len],0
120
  noparam:
126
  noparam:
121
    mov  [param],'W'
127
    mov  [param],'W'
122
    or	 [flag],FL_ADD
128
    or	 [flag],FL_ADD
-
 
129
;---------------------------------------------------------------------
-
 
130
;OpenDialog_start:
-
 
131
;	copy_path	open_dialog_name,path,library_path,0
-
 
132
	
-
 
133
	start_OpenDialog	OpenDialog_data
-
 
134
 
-
 
135
	cmp	[OpenDialog_data.status],2 ; OpenDialog does not start
-
 
136
	je	.fopen  ; 	some kind of alternative, instead OpenDialog
-
 
137
	cmp	[OpenDialog_data.status],1
-
 
138
	je	open_file
-
 
139
	jmp	still
-
 
140
;---------------------------------------------------------------------
-
 
141
 
-
 
142
.fopen:
123
    call fopen
143
    call fopen
124
  get_path:
144
  get_path:
125
    cmp  byte[filename],0
145
    cmp  byte[filename],0
126
    jz	 still
146
    jz	 still
127
  open_file:
147
  open_file:
Line 339... Line 359...
339
play_limit dd playlist
359
play_limit dd playlist
340
pl_ptr	   dd playlist
360
pl_ptr	   dd playlist
341
param	   db 'W'
361
param	   db 'W'
342
curnote    db 0x80
362
curnote    db 0x80
343
tick_count dd 0
363
tick_count dd 0
-
 
364
;---------------------------------------------------------------------
-
 
365
OpenDialog_data:
-
 
366
.type			dd 0
-
 
367
.procinfo		dd prcinfo ;+4
-
 
368
.com_area_name		dd communication_area_name ;+8
-
 
369
.com_area		dd 0 ;+12
-
 
370
.opendir_pach		dd temp_dir_pach ;+16
-
 
371
.dir_default_pach	dd communication_area_default_pach ;+20
-
 
372
.start_path		dd open_dialog_path ;+24
-
 
373
.draw_window		dd draw_window ;+28
-
 
374
.status			dd 0 ;+32
-
 
375
.openfile_pach		dd filename ;+36
-
 
376
.filename_area		dd 0	;+40
-
 
377
.filter_area		dd Filter
-
 
378
 
-
 
379
communication_area_name:
-
 
380
	db 'FFFFFFFF_open_dialog',0
-
 
381
open_dialog_path:
-
 
382
	db '/sys/File Managers/opendial',0
-
 
383
communication_area_default_pach:
-
 
384
	db '/rd/1',0
-
 
385
 
-
 
386
Filter:
-
 
387
dd Filter.end - Filter
-
 
388
.1:
-
 
389
db 'MID',0
-
 
390
.end:
-
 
391
db 0
-
 
392
;---------------------------------------------------------------------
344
dir_info:
393
dir_info:
345
        dd      1
394
        dd      1
346
        dd      0
395
        dd      0
347
        dd      0
396
        dd      0
348
        dd      1
397
        dd      1
Line 352... Line 401...
352
play_area  dw ?
401
play_area  dw ?
353
file_info:
402
file_info:
354
	   dd 0
403
	   dd 0
355
	   dd 0
404
	   dd 0
356
	   dd 0
405
	   dd 0
357
fsize	   dd APP_MEM-2048-workarea     ; max size
406
fsize	   dd 120*1024  ;APP_MEM-2048-workarea     ; max size
358
	   dd workarea
407
	   dd workarea
359
I_END:	; ª®­¥æ ¯à®£à ¬¬ë
408
IM_END:	; ª®­¥æ ¯à®£à ¬¬ë
360
filename:
409
filename:
361
	   rb 1024+16
410
	   rb 4096 ;1024+16
362
prcinfo    process_information
411
prcinfo    process_information
363
I_PARAM    rb 256
412
I_PARAM    rb 256
364
childPID   dd ?
413
childPID   dd ?
365
parentPID  dd ?
414
parentPID  dd ?
366
play_num   dd ?
415
play_num   dd ?
Line 386... Line 435...
386
hdr_raw    rb 275*29*3+8
435
hdr_raw    rb 275*29*3+8
387
bottom_raw rb 25*378*3+8
436
bottom_raw rb 25*378*3+8
388
	   rb 4
437
	   rb 4
389
playlist   rb 256*LISTITEMS
438
playlist   rb 256*LISTITEMS
390
IncludeUGlobals
439
IncludeUGlobals
-
 
440
;----------------------------------------------------------------
-
 
441
temp_dir_pach:
-
 
442
        rb 4096
-
 
443
;----------------------------------------------------------------
-
 
444
	rb 4096
-
 
445
thread_stack:
-
 
446
	rb 4096
-
 
447
stacktop:
-
 
448
;----------------------------------------------------------------
391
dir_table  rb 32+304
449
dir_table  rb 32+304
392
workarea:
450
workarea:
-
 
451
	rb 120*1024
-
 
452
I_END:
393
text_end:
453
text_end: