Subversion Repositories Kolibri OS

Rev

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

Rev 2579 Rev 2712
Line 1457... Line 1457...
1457
;       display the url (full path) text
1457
;       display the url (full path) text
1458
;
1458
;
1459
;****************************************************************************
1459
;****************************************************************************
1460
print_text:
1460
print_text:
1461
; Draw a bar to blank out previous text
1461
; Draw a bar to blank out previous text
1462
	mov	ebx,30*65536+URLMAXLEN*6	; 50 should really be [len] and 103 [xa]
-
 
1463
	mov	ecx,[ya]
-
 
1464
	shl	ecx,16
-
 
1465
	mov	cx,9
-
 
1466
	mcall	13,,,0xFFFFFF
1462
	mcall	13, <30,520>, <[ya], 9>,0xFFFFFF
1467
; write text
1463
; write text
1468
	mov	ebx,30*65536
-
 
1469
	add	ebx,[ya]
-
 
1470
	xor	ecx,ecx
-
 
1471
	mcall	4,,,[addr],URLMAXLEN
1464
	mcall	4, <30,[ya]>, 0,[addr],URLMAXLEN
1472
	ret
1465
	ret
Line 1473... Line 1466...
1473
 
1466
 
1474
;   *********************************************
1467
;   *********************************************
1475
;   *******  WINDOW DEFINITIONS AND DRAW ********
1468
;   *******  WINDOW DEFINITIONS AND DRAW ********
Line 1476... Line 1469...
1476
;   *********************************************
1469
;   *********************************************
-
 
1470
 
1477
 
1471
draw_window:
1478
draw_window:
-
 
1479
; function 12: tell os about windowdraw
-
 
Line 1480... Line 1472...
1480
; 1 start of draw
1472
 
1481
	mcall	12,1
1473
	mcall	12,1 ; start window redraw
Line 1482... Line -...
1482
 
-
 
1483
;	cmp	[params],byte 0
-
 
1484
;	jz	.noret
-
 
1485
 
-
 
1486
; ýòî íåñêîëüêî çàãàäî÷íî, íî åñëè íå ðèñîâàòü îêîøêî ñîâñåì, ïðîãà íå ïàøåò.
-
 
1487
; DRAW	WINDOW
-
 
1488
; eax	function 0 : define and draw window
-
 
1489
;	xor	eax,eax
-
 
1490
; ebx	[x start] *65536 + [x size]
-
 
1491
;	xor	ebx,ebx
-
 
1492
; ecx	[y start] *65536 + [y size]
-
 
1493
;	xor	ecx,ecx
-
 
1494
; edx	color of work area RRGGBB,8->color gl
-
 
1495
; esi	color of bar and flags
-
 
1496
;	xor	esi,esi
-
 
1497
;	mcall	,,,0x14ffffff,,title
-
 
1498
 
-
 
1499
; function 12: tell os about windowdraw
-
 
1500
; 2, end of draw
1474
 
1501
;	mcall	12,2
1475
;	cmp	[params],byte 0
1502
;	ret
-
 
1503
	
-
 
1504
;.noret:
-
 
1505
; DRAW	WINDOW
-
 
1506
; eax	function 0 : define and draw window
-
 
1507
	xor	eax,eax
-
 
1508
; ebx	[x start] *65536 + [x size]
-
 
1509
; ecx	[y start] *65536 + [y size]
-
 
1510
; edx	color of work area RRGGBB,8->color gl
1476
;	jz	.noret
1511
; esi	color of bar and flags
1477
 
1512
	xor	esi,esi
1478
;.noret:
1513
; edi	WINDOW	LABEL
1479
; DRAW	WINDOW
1514
	mcall	,<50,600>,<350,200>,0x14ffffff,,title
1480
	mcall	0,<50,570>,<350,200>,0x14ffffff,0,title
1515
; eax	function 4: write text to window
1481
; eax	function 4: write text to window
Line 1528... Line 1494...
1528
;	add	ecx,[winys]
1494
;	add	ecx,[winys]
1529
;	sub	ecx,26*65536+26
1495
;	sub	ecx,26*65536+26
1530
;	mcall	38,<5,545>
1496
;	mcall	38,<5,545>
Line 1531... Line 1497...
1531
 
1497
 
1532
; RELOAD
-
 
1533
; eax	function 8 : define and draw button
-
 
1534
; ebx	[x start] *65536 + [x size]
-
 
1535
; ecx	[y start] *65536 + [y size]
-
 
1536
; edx	button id
-
 
1537
; esi	button color RRGGBB
1498
; RELOAD
1538
	mcall	8,<388,50>,<34,14>,22,0x5588dd
1499
	mcall	8,<388,50>,<54,14>,22,0x5588dd
1539
; URL
1500
; URL
1540
	mcall	,<10,12>,<34,12>,10
1501
	mcall	,<10,12>,<34,12>,10
1541
; STOP
1502
; STOP
1542
	mcall	,<443,50>,<34,14>,24
1503
	mcall	,<443,50>,<54,14>,24
1543
; SAVE
1504
; SAVE
1544
	mcall	,<498,50>,,26
1505
	mcall	,<498,50>,,26
1545
; BUTTON TEXT
-
 
1546
; eax	function 4 : write text to window
-
 
1547
; ebx	[x start] *65536 + [y start]
-
 
1548
; ecx	color	of	text	RRGGBB
-
 
1549
; edx	pointer	to	text	beginning
-
 
1550
; esi	text	length
1506
; BUTTON TEXT
1551
	mcall	4,<390,38>,0xffffff,button_text,30
1507
	mcall	4,<390,58>,0xffffff,button_text,30
Line 1552... Line 1508...
1552
	call	display_page
1508
	call	display_page
1553
 
-
 
1554
; function 12: tell os about windowdraw
-
 
1555
; 2, end of draw
1509
 
1556
	mcall	12,2
1510
	mcall	12,2 ; end window redraw
1557
	ret
1511
	ret
1558
;-----------------------------------------------------------------------------
1512
;-----------------------------------------------------------------------------
1559
; Data area
1513
; Data area
Line 1608... Line 1562...
1608
 
1562
 
1609
addr		dd 0x0
1563
addr		dd 0x0
1610
ya		dd 0x0
1564
ya		dd 0x0
Line 1611... Line 1565...
1611
len		dd 0x00
1565
len		dd 0x00
Line 1612... Line 1566...
1612
 
1566
 
1613
title		db 'Downloader',0
1567
title		db 'Network Downloader',0
1614
 
1568
 
1615
server_ip:	db 207,44,212,20
1569
server_ip:	db 207,44,212,20
1616
;dns_ip:	db 194,145,128,1
1570
;dns_ip:	db 194,145,128,1
1617
;---------------------------------------------------------------------
1571
;---------------------------------------------------------------------
Line 1618... Line -...
1618
;webAddr:
-
 
1619
;times URLMAXLEN db ' '
-
 
1620
;db	0
-
 
1621
 
1572
;webAddr:
1622
;document_user:	db 'Click on the button to the left to enter a URL',0
1573
;times URLMAXLEN db ' '
1623
;times URLMAXLEN+document_user-$ db 0
1574
;db	0
1624
 
1575
 
1625
;document:	db '/'
1576
;document:	db '/'