Subversion Repositories Kolibri OS

Rev

Rev 7109 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7106 leency 1
NOTIFY_RUN:
2
 
3
 ;; Make param
4
    stdcall string.copy, sz_quote, params
5
	stdcall string.copy, filelist_first, current_filename
6
    call    make_text
7
    stdcall string.concatenate, sz_quote, params
8
    stdcall string.concatenate, sz_flags, params
9
;; RUN NOTIFY
10
    mcall   70, fi_launch
11
 
12
 ;; CONVERT PID TO STR
13
    mov     ebx, 10
14
    mov     ecx, 0
15
  @@:
16
    mov     edx, 0
17
    div     ebx
18
    push    edx
19
    inc     ecx
20
    cmpne   eax, 0, @b
21
 
22
    mov     ebx, ctrl.name
23
  @@:
24
    pop     eax
25
    add     al, "0"
26
    mov     [ebx], al
27
    inc     ebx
28
    loop    @b
29
 
30
 ;; ADD POSTFIX TO STR
31
    mov     dword [ebx + 0], "-NOT"
32
    mov     dword [ebx + 4], "IFY"
33
 
34
 ;; OPEN CONTROLLER (0x08 + 0x01 -- CREATE AND READ/WRITE)
35
    mcall   68, 22, ctrl.name, 2048, 0x09
36
    mov     [ctrl.addr], eax
37
 
38
 ;; WAIT UNTIL CONTROLLER BECOMES READY TO USE
39
    add     eax, NTCTRL_READY
40
  @@:
41
    mcall   5, 1
42
    cmpe    byte [eax], 0, @b
43
 
44
 ;; CONFIG PBAR
45
    mov     eax, [ctrl.addr]
46
    add     eax, NTCTRL_PBAR_MAX
47
    mov     dword [eax], 55
48
 
49
    mov     eax, [ctrl.addr]
50
    add     eax, NTCTRL_PBAR_CUR
51
    mov     dword [eax], 0
52
 
53
    mov     eax, [ctrl.addr]
54
    add     eax, NTCTRL_APPLY_PBAR
55
    mov     byte [eax], 1
56
 
57
	ret
58
 
59
 
60
 
61
 
62
 
63
 
64
 
65
 
66
NOTIFY_CHANGE:
67
 
68
 ;; CHANGE TIMER
69
    inc     dword [timer]
70
	mov     ebx,  dword [timer]
71
 
72
 ;; SEND TIMER TO PBAR
73
    mov     eax, [ctrl.addr]
74
    add     eax, NTCTRL_PBAR_CUR
75
    mov     dword [eax], ebx
76
 
77
 ;; APPLY PBAR
78
    mov     eax, [ctrl.addr]
79
    add     eax, NTCTRL_APPLY_PBAR
80
    mov     byte [eax], 1
81
 
82
  ;; CNANGE TEXT
83
    mov     byte [params], 0
84
    call    make_text
85
 
86
  ;; SEND TEXT TO NOTIFY
87
    mov     eax, [ctrl.addr]
88
    add     eax, NTCTRL_TEXT
89
    stdcall string.copy, params, eax
90
 
91
  ;; APPLY NEW TEXT
92
    mov     eax, [ctrl.addr]
93
    add     eax, NTCTRL_APPLY_TEXT
94
    mov     byte [eax], 1
95
 
96
	ret
97
 
98
 
99
 
100
 
101
 
102
 
103
 
104
EXIT:
105
 ;; CHANGE ICON
106
    mov     eax, [ctrl.addr]
107
    add     eax, NTCTRL_ICON
108
    mov     byte [eax], 4
109
 
110
 ;; APPLY NEW ICON
111
    mov     eax, [ctrl.addr]
112
    add     eax, NTCTRL_APPLY_ICON
113
    mov     byte [eax], 1
114
 
115
  ;; CNANGE TEXT
116
    mov     byte [params], 0
117
    stdcall string.concatenate, sz_final_text, params
118
 
119
	;; SEND TEXT TO NOTIFY
120
    mov     eax, [ctrl.addr]
121
    add     eax, NTCTRL_TEXT
122
	stdcall string.copy, params, eax
123
 
124
  ;; APPLY NEW TEXT
125
    mov     eax, [ctrl.addr]
126
    add     eax, NTCTRL_APPLY_TEXT
127
    mov     byte [eax], 1
128
 
129
	mcall 5, 300
130
 
131
	mcall   70, fileopen
132
 
133
   ;; CLOSE NOTIFY
134
    mov     eax, [ctrl.addr]
135
    add     eax, NTCTRL_CLOSE
136
    mov     byte [eax], 1
137
 
138
    mcall   -1
139
 
140
;-------------------------------------------------------------------------------
141
 make_text:
142
    stdcall string.concatenate, sz_text, params
143
    stdcall string.concatenate, sz_sec_line_start, params
144
    stdcall string.concatenate, current_filename, params
145
 
146
    ret
147
;-------------------------------------------------------------------------------