Subversion Repositories Kolibri OS

Rev

Rev 7109 | Rev 7842 | Go to most recent revision | Details | Compare with Previous | 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
  @@:
7109 leency 41
	push    eax
7106 leency 42
    mcall   5, 1
7109 leency 43
	pop     eax
7106 leency 44
    cmpe    byte [eax], 0, @b
45
 
46
 ;; CONFIG PBAR
47
    mov     eax, [ctrl.addr]
48
    add     eax, NTCTRL_PBAR_MAX
7841 leency 49
    mov     dword [eax], 39
7106 leency 50
 
51
    mov     eax, [ctrl.addr]
52
    add     eax, NTCTRL_PBAR_CUR
53
    mov     dword [eax], 0
54
 
55
    mov     eax, [ctrl.addr]
56
    add     eax, NTCTRL_APPLY_PBAR
57
    mov     byte [eax], 1
58
 
59
	ret
60
 
61
 
62
 
63
 
64
 
65
 
66
 
67
 
68
NOTIFY_CHANGE:
69
 
70
 ;; CHANGE TIMER
71
    inc     dword [timer]
72
	mov     ebx,  dword [timer]
73
 
74
 ;; SEND TIMER TO PBAR
75
    mov     eax, [ctrl.addr]
76
    add     eax, NTCTRL_PBAR_CUR
77
    mov     dword [eax], ebx
78
 
79
 ;; APPLY PBAR
80
    mov     eax, [ctrl.addr]
81
    add     eax, NTCTRL_APPLY_PBAR
82
    mov     byte [eax], 1
83
 
84
  ;; CNANGE TEXT
85
    mov     byte [params], 0
86
    call    make_text
87
 
88
  ;; SEND TEXT TO NOTIFY
89
    mov     eax, [ctrl.addr]
90
    add     eax, NTCTRL_TEXT
91
    stdcall string.copy, params, eax
92
 
93
  ;; APPLY NEW TEXT
94
    mov     eax, [ctrl.addr]
95
    add     eax, NTCTRL_APPLY_TEXT
96
    mov     byte [eax], 1
97
 
98
	ret
99
 
100
 
101
 
102
 
103
 
104
 
105
 
106
EXIT:
107
 ;; CHANGE ICON
108
    mov     eax, [ctrl.addr]
109
    add     eax, NTCTRL_ICON
110
    mov     byte [eax], 4
111
 
112
 ;; APPLY NEW ICON
113
    mov     eax, [ctrl.addr]
114
    add     eax, NTCTRL_APPLY_ICON
115
    mov     byte [eax], 1
116
 
117
  ;; CNANGE TEXT
118
    mov     byte [params], 0
119
    stdcall string.concatenate, sz_final_text, params
120
 
121
	;; SEND TEXT TO NOTIFY
122
    mov     eax, [ctrl.addr]
123
    add     eax, NTCTRL_TEXT
124
	stdcall string.copy, params, eax
125
 
126
  ;; APPLY NEW TEXT
127
    mov     eax, [ctrl.addr]
128
    add     eax, NTCTRL_APPLY_TEXT
129
    mov     byte [eax], 1
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
;-------------------------------------------------------------------------------