notify: optimizations, manual build
git-svn-id: svn://kolibrios.org@2862 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7d7bbe9a8f
commit
5dfb64cfd9
@ -18,7 +18,7 @@
|
||||
dd 0x0 ; зарезервировано
|
||||
|
||||
|
||||
include 'macros.inc' ;
|
||||
include "..\..\..\macros.inc"
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
;--- НАЧАЛО ПРОГРАММЫ ----------------------------------------------
|
||||
@ -59,8 +59,7 @@ red: ; перерисовать окно
|
||||
cmp ah, 1
|
||||
jne still ; return if button id != 1
|
||||
|
||||
or eax, -1 ; exit application
|
||||
mcall
|
||||
call exit
|
||||
|
||||
key: ; key event handler
|
||||
mov al, 2 ; get key code
|
||||
@ -79,9 +78,7 @@ draw_window:
|
||||
|
||||
mcall 12, 1 ; функция 12: сообщить ОС об отрисовке окна
|
||||
|
||||
mov eax,14 ;получим ширину экрана
|
||||
mov ebx, 4
|
||||
mcall
|
||||
mcall 14, 4 ;получим ширину экрана
|
||||
shr eax, 16
|
||||
and eax,0x0000FFFF
|
||||
sub eax,300 ;отнимем от нее 300
|
||||
@ -126,10 +123,10 @@ jmp drawy ;рисуем новую точку
|
||||
fin: ;дорисовали
|
||||
|
||||
mcall 4, <3, 12>, 0x80000000, I_PARAM, 0 ;тень за текстом
|
||||
mcall 4, <5, 12>, 0x80000000, I_PARAM, 0 ;
|
||||
mcall 4, <4, 11>, 0x80000000, I_PARAM, 0 ;
|
||||
mcall 4, <4, 13>, 0x80000000, I_PARAM, 0 ;
|
||||
mcall 4, <4, 12>, 0x80EFEFEF, I_PARAM, 0 ;текст
|
||||
mcall , <5, 12>
|
||||
mcall , <4, 11>
|
||||
mcall , <4, 13>
|
||||
mcall , <4, 12>, 0x80EFEFEF ;текст
|
||||
|
||||
|
||||
mcall 12, 2 ; конец рисования
|
||||
|
@ -1,45 +0,0 @@
|
||||
#include "..\lib\kolibri.h--"
|
||||
#include "..\lib\memory.h--"
|
||||
// Kolibri Notify Daemon. v0.1 by SoUrcerer
|
||||
|
||||
dword id;
|
||||
void main()
|
||||
{
|
||||
|
||||
word key;
|
||||
id=GetScreenWidth();
|
||||
|
||||
loop()
|
||||
{
|
||||
switch(WaitEvent())
|
||||
{
|
||||
case evButton:
|
||||
id=GetButtonID();
|
||||
ExitProcess();
|
||||
break;
|
||||
|
||||
case evKey:
|
||||
key = GetKey();
|
||||
ExitProcess();
|
||||
break;
|
||||
|
||||
case evReDraw:
|
||||
draw_window();
|
||||
break;
|
||||
}
|
||||
Pause (500);
|
||||
ExitProcess();
|
||||
}
|
||||
}
|
||||
|
||||
void draw_window()
|
||||
{
|
||||
WindowRedrawStatus(1);
|
||||
DefineAndDrawWindow(id-300,0,300,44,0x30000000,0x1012141F,0,0,"Kolibri Notify");
|
||||
// DefineButton(0,300,0,96,0x30000001,0x0) ;
|
||||
WriteText(7,7,0x80,0xFFFFFF,"Kolibri Notify",0);
|
||||
WriteText(7,25,0x80,0xEFEFEF,I_Param,0);
|
||||
WindowRedrawStatus(2);
|
||||
}
|
||||
|
||||
stop:
|
3
programs/system/notify/trunk/build.bat
Normal file
3
programs/system/notify/trunk/build.bat
Normal file
@ -0,0 +1,3 @@
|
||||
@fasm @notify.asm @notify
|
||||
@kpack @notify
|
||||
@pause
|
Loading…
Reference in New Issue
Block a user