Subversion Repositories Kolibri OS

Rev

Rev 4120 | Rev 4124 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4120 Rev 4121
1
;;; Docky v0.4 by eAndrew
1
;;; Docky v0.4 by eAndrew
2
 
2
 
3
    use32
3
    use32
4
    org     0x0
4
    org     0x0
5
;-------------------------------------------------------------------------------
5
;-------------------------------------------------------------------------------
6
    db	    "MENUET01"
6
    db	    "MENUET01"
7
    dd	    1, main, __dataend, __memend, __stackend, 0, sys_path
7
    dd	    1, main, __dataend, __memend, __stackend, 0, sys_path
8
;-------------------------------------------------------------------------------
8
;-------------------------------------------------------------------------------
9
    include "../../../macros.inc"
9
    include "../../../macros.inc"
10
    include "../../../proc32.inc"
10
    include "../../../proc32.inc"
11
    include "../../../dll.inc"
11
    include "../../../dll.inc"
12
    include "../../../develop/libraries/box_lib/load_lib.mac"
12
    include "../../../develop/libraries/box_lib/load_lib.mac"
13
 
13
 
14
    @use_library_mem	 \
14
    @use_library_mem	 \
15
	    mem.Alloc,	 \
15
	    mem.Alloc,	 \
16
	    mem.Free,	 \
16
	    mem.Free,	 \
17
	    mem.ReAlloc, \
17
	    mem.ReAlloc, \
18
	    dll.Load
18
	    dll.Load
19
;-------------------------------------------------------------------------------
19
;-------------------------------------------------------------------------------
20
ICON_SIZE	 equ  32 * 32 * 3
20
ICON_SIZE	 equ  32 * 32 * 3
21
IMAGE_FILE_SIZE  equ  ICON_SIZE * 29
21
IMAGE_FILE_SIZE  equ  ICON_SIZE * 29
22
IMAGE_DATA_SIZE  equ  32 * 32 * 4 * 29
22
IMAGE_DATA_SIZE  equ  32 * 32 * 4 * 29
23
;================================================================================
23
;================================================================================
24
proc main
24
proc main
25
; ==== Init ====
25
; ==== Init ====
26
    mcall   18, 7
26
    mcall   18, 7
27
    mov     [win.psid], eax
27
    mov     [win.psid], eax
28
 
28
 
29
    mcall   40, 100101b
29
    mcall   40, 100101b
30
 
30
 
31
    mov     dword[file_exec.proc], 7
31
    mov     dword[file_exec.proc], 7
32
 
32
 
33
; ==== Load libs ====
33
; ==== Load libs ====
34
    load_libraries load_lib_start, load_lib_end
34
    load_libraries load_lib_start, load_lib_end
35
 
35
 
36
; ==== Config LibINI ====
36
; ==== Config LibINI ====
37
    invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.location_name, -1
37
    invoke  ini.get_int, ini_data.file_name, ini_data.settings_name, ini_data.location_name, -1
38
    mov     [dock_items.location], eax
38
    mov     [dock_items.location], eax
39
 
-
 
40
    invoke  ini.get_str, ini_data.file_name, ini_data.settings_name, ini_data.skin_name, ini_data.skin_file, 32, 0
-
 
41
 
39
 
42
    invoke  ini.get_color, ini_data.skin_dir, ini_data.skin_name, ini_data.color_bg, 0x0
40
    invoke  ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_bg, 0x0
43
    mov     [color.bg], eax
41
    mov     [color.bg], eax
44
    invoke  ini.get_color, ini_data.skin_dir, ini_data.skin_name, ini_data.color_frame, 0xFFFFFF
42
    invoke  ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_frame, 0xFFFFFF
45
    mov     [color.frame], eax
43
    mov     [color.frame], eax
46
    invoke  ini.get_color, ini_data.skin_dir, ini_data.skin_name, ini_data.color_framein, 0x888888
44
    invoke  ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_framein, 0x888888
47
    mov     [color.framein], eax
45
    mov     [color.framein], eax
48
    invoke  ini.get_color, ini_data.skin_dir, ini_data.skin_name, ini_data.color_text, 0xFFFFFF
46
    invoke  ini.get_color, ini_data.file_name, ini_data.settings_name, ini_data.color_text, 0xFFFFFF
49
    or	    eax, 0x80000000
47
    or	    eax, 0x80000000
50
    mov     [color.text], eax
48
    mov     [color.text], eax
51
 
49
 
52
    invoke  ini.sections, ini_data.file_name, sections_callback
50
    invoke  ini.sections, ini_data.file_name, sections_callback
53
 
51
 
54
; ==== Config LibIMG ====
52
; ==== Config LibIMG ====
55
    stdcall mem.Alloc, dword IMAGE_FILE_SIZE
53
    stdcall mem.Alloc, dword IMAGE_FILE_SIZE
56
    mov     [img_data.rgb_object], eax
54
    mov     [img_data.rgb_object], eax
57
 
55
 
58
    mov     dword[img_data.file.proc], 0
56
    mov     dword[img_data.file.proc], 0
59
    mov     dword[img_data.file.position], 0
57
    mov     dword[img_data.file.position], 0
60
    mov     dword[img_data.file.size], dword IMAGE_FILE_SIZE
58
    mov     dword[img_data.file.size], dword IMAGE_FILE_SIZE
61
    m2m     dword[img_data.file.buffer], dword[img_data.rgb_object]
59
    m2m     dword[img_data.file.buffer], dword[img_data.rgb_object]
62
    mov     byte[img_data.file + 20], 0
60
    mov     byte[img_data.file + 20], 0
63
    mov     dword[img_data.file.name], img_data.file_name
61
    mov     dword[img_data.file.name], img_data.file_name
64
 
62
 
65
    mcall   70, img_data.file
63
    mcall   70, img_data.file
66
 
64
 
67
    cmp     ebx, 0xFFFFFFFF
65
    cmp     ebx, 0xFFFFFFFF
68
    je	    @f
66
    je	    @f
69
 
67
 
70
    stdcall dword[img.decode], dword[img_data.rgb_object], ebx, 0
68
    stdcall dword[img.decode], dword[img_data.rgb_object], ebx, 0
71
    mov     dword[img_data.object], eax
69
    mov     dword[img_data.object], eax
72
 
70
 
73
  ; === ALPHA ===
71
  ; === ALPHA ===
74
    mov     edi, 0
72
    mov     edi, 0
75
    add     eax, 24
73
    add     eax, 24
76
    mov     eax, [eax]
74
    mov     eax, [eax]
77
    mov     ecx, [color.bg]
75
    mov     ecx, [color.bg]
78
 .setalpha:
76
 .setalpha:
79
    mov     ebx, [eax + edi]
77
    mov     ebx, [eax + edi]
80
    shr     ebx, 24
78
    shr     ebx, 24
81
    cmp     ebx, 0
79
    cmp     ebx, 0
82
    jne     .nonalpha
80
    jne     .nonalpha
83
    mov     [eax + edi], ecx
81
    mov     [eax + edi], ecx
84
 .nonalpha:
82
 .nonalpha:
85
    add     edi, 4
83
    add     edi, 4
86
    cmp     edi, IMAGE_DATA_SIZE
84
    cmp     edi, IMAGE_DATA_SIZE
87
    jne     .setalpha
85
    jne     .setalpha
88
 
86
 
89
  ; === CONVERTING TO BGR
87
  ; === CONVERTING TO BGR
90
    stdcall dword[img.toRGB], dword[img_data.object], dword[img_data.rgb_object]
88
    stdcall dword[img.toRGB], dword[img_data.object], dword[img_data.rgb_object]
91
    stdcall dword[img.destroy], dword[img_data.object]
89
    stdcall dword[img.destroy], dword[img_data.object]
92
 
90
 
93
; ==== Config window ====
91
; ==== Config window ====
94
    mov     eax, dword[dock_items.location]
92
    mov     eax, dword[dock_items.location]
95
    and     eax, 1b
93
    and     eax, 1b
96
    cmp     eax, 0
94
    cmp     eax, 0
97
    je	    .vert
95
    je	    .vert
98
    jmp     .setshape
96
    jmp     .setshape
99
 
97
 
100
 .vert:
98
 .vert:
101
    mov     byte[win.isvert], 1
99
    mov     byte[win.isvert], 1
102
 
100
 
103
 .setshape:
101
 .setshape:
104
    cmp     byte[win.isvert], 1
102
    cmp     byte[win.isvert], 1
105
    je	    .vert_sp
103
    je	    .vert_sp
106
 
104
 
107
 .horz_sp:
105
 .horz_sp:
108
    call    .HORZ_WIDTH
106
    call    .HORZ_WIDTH
109
    call    .HORZ_X
107
    call    .HORZ_X
110
    call    .HORZ_HEIGHT
108
    call    .HORZ_HEIGHT
111
    cmp     dword[dock_items.location], 1
109
    cmp     dword[dock_items.location], 1
112
    je	    .settop
110
    je	    .settop
113
 
111
 
114
 .setbottom:
112
 .setbottom:
115
    call    .HORZ_Y_BOTTOM
113
    call    .HORZ_Y_BOTTOM
116
    jmp     .SETDEF
114
    jmp     .SETDEF
117
 
115
 
118
 .settop:
116
 .settop:
119
    call    .HORZ_Y_TOP
117
    call    .HORZ_Y_TOP
120
    jmp     .SETDEF
118
    jmp     .SETDEF
121
 
119
 
122
 
120
 
123
 .vert_sp:
121
 .vert_sp:
124
    call    .VERT_WIDTH
122
    call    .VERT_WIDTH
125
    call    .VERT_HEIGHT
123
    call    .VERT_HEIGHT
126
    call    .VERT_Y
124
    call    .VERT_Y
127
    cmp     dword[dock_items.location], 2
125
    cmp     dword[dock_items.location], 2
128
    je	    .setleft
126
    je	    .setleft
129
 
127
 
130
 .setright:
128
 .setright:
131
    call    .VERT_X_RIGHT
129
    call    .VERT_X_RIGHT
132
    jmp     .SETDEF
130
    jmp     .SETDEF
133
 
131
 
134
 .setleft:
132
 .setleft:
135
    call    .VERT_X_LEFT
133
    call    .VERT_X_LEFT
136
    jmp     .SETDEF
134
    jmp     .SETDEF
137
 
135
 
138
 .HORZ_WIDTH:
136
 .HORZ_WIDTH:
139
    mov     eax, 42
137
    mov     eax, 42
140
    mov     ebx, [dock_items.count]
138
    mov     ebx, [dock_items.count]
141
    imul    eax, ebx
139
    imul    eax, ebx
142
    dec     eax
140
    dec     eax
143
    mov     [win.width_opn], eax
141
    mov     [win.width_opn], eax
144
    mov     [win.width_hdn], eax
142
    mov     [win.width_hdn], eax
145
 
143
 
146
    ret
144
    ret
147
 
145
 
148
 .HORZ_X:
146
 .HORZ_X:
149
    mcall   14
147
    mcall   14
150
    shr     eax, 16
148
    shr     eax, 16
151
    mov     ebx, 2
149
    mov     ebx, 2
152
    mov     edx, 0
150
    mov     edx, 0
153
    div     ebx
151
    div     ebx
154
    mov     edx, 0
152
    mov     edx, 0
155
    mov     ecx, eax
153
    mov     ecx, eax
156
 
154
 
157
    mov     eax, [win.width_opn]
155
    mov     eax, [win.width_opn]
158
    div     ebx
156
    div     ebx
159
    sub     ecx, eax
157
    sub     ecx, eax
160
    mov     [win.x_opn], ecx
158
    mov     [win.x_opn], ecx
161
    mov     [win.x_hdn], ecx
159
    mov     [win.x_hdn], ecx
162
 
160
 
163
    ret
161
    ret
164
 
162
 
165
 .HORZ_HEIGHT:
163
 .HORZ_HEIGHT:
166
    mov     dword[win.height_opn], 42
164
    mov     dword[win.height_opn], 42
167
    mov     dword[win.height_hdn], 0
165
    mov     dword[win.height_hdn], 0
168
 
166
 
169
    ret
167
    ret
170
 
168
 
171
 .HORZ_Y_BOTTOM:
169
 .HORZ_Y_BOTTOM:
172
    mcall   14
170
    mcall   14
173
    and     eax, 0xFFFF
171
    and     eax, 0xFFFF
174
    dec     eax
172
    dec     eax
175
    mov     [win.y_hdn], eax
173
    mov     [win.y_hdn], eax
176
    sub     eax, 42
174
    sub     eax, 42
177
    mov     [win.y_opn], eax
175
    mov     [win.y_opn], eax
178
 
176
 
179
    ret
177
    ret
180
 
178
 
181
 .HORZ_Y_TOP:
179
 .HORZ_Y_TOP:
182
    mov     dword[win.y_opn], 0
180
    mov     dword[win.y_opn], 0
183
    mov     dword[win.y_hdn], 0
181
    mov     dword[win.y_hdn], 0
184
 
182
 
185
    ret
183
    ret
186
 
184
 
187
 .VERT_WIDTH:
185
 .VERT_WIDTH:
188
    mov     dword[win.width_opn], 42
186
    mov     dword[win.width_opn], 42
189
    mov     dword[win.width_hdn], 0
187
    mov     dword[win.width_hdn], 0
190
 
188
 
191
    ret
189
    ret
192
 
190
 
193
 .VERT_X_LEFT:
191
 .VERT_X_LEFT:
194
 
192
 
195
    mov     dword[win.x_opn], 0
193
    mov     dword[win.x_opn], 0
196
    mov     dword[win.x_hdn], 0
194
    mov     dword[win.x_hdn], 0
197
 
195
 
198
    ret
196
    ret
199
 
197
 
200
 .VERT_X_RIGHT:
198
 .VERT_X_RIGHT:
201
    mcall   14
199
    mcall   14
202
    and     eax, 0xFFFF0000
200
    and     eax, 0xFFFF0000
203
    shr     eax, 16
201
    shr     eax, 16
204
    mov     [win.x_hdn], eax
202
    mov     [win.x_hdn], eax
205
    sub     eax, 42
203
    sub     eax, 42
206
    mov     [win.x_opn], eax
204
    mov     [win.x_opn], eax
207
 
205
 
208
    ret
206
    ret
209
 
207
 
210
 .VERT_HEIGHT:
208
 .VERT_HEIGHT:
211
    mov     eax, 42
209
    mov     eax, 42
212
    mov     ebx, [dock_items.count]
210
    mov     ebx, [dock_items.count]
213
    imul    eax, ebx
211
    imul    eax, ebx
214
    dec     eax
212
    dec     eax
215
    mov     [win.height_opn], eax
213
    mov     [win.height_opn], eax
216
    mov     [win.height_hdn], eax
214
    mov     [win.height_hdn], eax
217
 
215
 
218
    ret
216
    ret
219
 
217
 
220
 .VERT_Y:
218
 .VERT_Y:
221
    mcall   14
219
    mcall   14
222
    and     eax, 0xFFFF
220
    and     eax, 0xFFFF
223
    mov     edx, 0
221
    mov     edx, 0
224
    mov     ebx, 2
222
    mov     ebx, 2
225
    div     ebx
223
    div     ebx
226
    mov     esi, eax
224
    mov     esi, eax
227
 
225
 
228
    mov     eax, [win.height_opn]
226
    mov     eax, [win.height_opn]
229
    mov     edx, 0
227
    mov     edx, 0
230
    mov     ebx, 2
228
    mov     ebx, 2
231
    div     ebx
229
    div     ebx
232
    sub     esi, eax
230
    sub     esi, eax
233
 
231
 
234
    mov     [win.y_hdn], esi
232
    mov     [win.y_hdn], esi
235
    mov     [win.y_opn], esi
233
    mov     [win.y_opn], esi
236
 
234
 
237
    ret
235
    ret
238
 
236
 
239
 .SETDEF:
237
 .SETDEF:
240
    mov     eax, [win.width_hdn]
238
    mov     eax, [win.width_hdn]
241
    mov     [win.width], eax
239
    mov     [win.width], eax
242
 
240
 
243
    mov     eax, [win.x_hdn]
241
    mov     eax, [win.x_hdn]
244
    mov     [win.x], eax
242
    mov     [win.x], eax
245
 
243
 
246
    mov     eax, [win.height_hdn]
244
    mov     eax, [win.height_hdn]
247
    mov     [win.height], eax
245
    mov     [win.height], eax
248
 
246
 
249
    mov     eax, [win.y_hdn]
247
    mov     eax, [win.y_hdn]
250
    mov     [win.y], eax
248
    mov     [win.y], eax
251
 
249
 
252
; ==== START ====
250
; ==== START ====
253
    mcall   9, win.procinfo, -1
251
    mcall   9, win.procinfo, -1
254
    mov     ecx, [win.procinfo + 30]
252
    mov     ecx, [win.procinfo + 30]
255
    mcall   18, 21
253
    mcall   18, 21
256
    and     eax, 0xFFFF
254
    and     eax, 0xFFFF
257
    mov     [win.sid], eax
255
    mov     [win.sid], eax
258
 
256
 
259
    call    main_loop
257
    call    main_loop
260
 
258
 
261
exit:
259
exit:
262
    stdcall mem.Free, [img_data.rgb_object]
260
    stdcall mem.Free, [img_data.rgb_object]
263
    mcall   18, 2, [nwin.sid]
261
    mcall   18, 2, [nwin.sid]
264
    mcall   -1
262
    mcall   -1
265
endp
263
endp
266
;-------------------------------------------------------------------------------
264
;-------------------------------------------------------------------------------
267
proc main_loop
265
proc main_loop
268
    mcall   10
266
    mcall   10
269
 
267
 
270
    cmp     eax, EV_REDRAW
268
    cmp     eax, EV_REDRAW
271
    je	    event_redraw
269
    je	    event_redraw
272
 
270
 
273
    cmp     eax, EV_BUTTON
271
    cmp     eax, EV_BUTTON
274
    je	    event_button
272
    je	    event_button
275
 
273
 
276
    cmp     eax, EV_MOUSE
274
    cmp     eax, EV_MOUSE
277
    je	    event_mouse
275
    je	    event_mouse
278
 
276
 
279
    jmp     main_loop
277
    jmp     main_loop
280
 
278
 
281
 .end:
279
 .end:
282
    ret
280
    ret
283
endp
281
endp
284
;-------------------------------------------------------------------------------
282
;-------------------------------------------------------------------------------
285
proc event_redraw
283
proc event_redraw
286
    mcall   12, 1
284
    mcall   12, 1
287
 
285
 
288
    mcall   0, <[win.x], [win.width]>, <[win.y], [win.height]>, [color.frame], [color.frame], [color.frame]
286
    mcall   0, <[win.x], [win.width]>, <[win.y], [win.height]>, [color.frame], [color.frame], [color.frame]
289
 
287
 
290
    and     ebx, 0x0000FFFF
288
    and     ebx, 0x0000FFFF
291
    add     ebx, 0x00010000
289
    add     ebx, 0x00010000
292
    sub     ebx, 0x00000001
290
    sub     ebx, 0x00000001
293
 
291
 
294
    and     ecx, 0x0000FFFF
292
    and     ecx, 0x0000FFFF
295
    add     ecx, 0x00010000
293
    add     ecx, 0x00010000
296
    sub     ecx, 0x00000001
294
    sub     ecx, 0x00000001
297
 
295
 
298
    mcall   13, , , [color.framein]
296
    mcall   13, , , [color.framein]
299
 
297
 
300
 
298
 
301
    add     ebx, 0x00010000
299
    add     ebx, 0x00010000
302
    sub     ebx, 0x00000002
300
    sub     ebx, 0x00000002
303
 
301
 
304
    add     ecx, 0x00010000
302
    add     ecx, 0x00010000
305
    sub     ecx, 0x00000002
303
    sub     ecx, 0x00000002
306
 
304
 
307
    mcall   13, , , [color.bg]
305
    mcall   13, , , [color.bg]
308
 
306
 
309
    mov     edi, 0
307
    mov     edi, 0
310
  @@:
308
  @@:
311
    cmp     edi, [dock_items.count]
309
    cmp     edi, [dock_items.count]
312
    je	    @f
310
    je	    @f
313
 
311
 
314
    push    edi
312
    push    edi
315
    imul    esi, edi, 42
313
    imul    esi, edi, 42
316
    shl     esi, 16
314
    shl     esi, 16
317
    add     esi, 41
315
    add     esi, 41
318
    cmp     byte[win.isvert], 1
316
    cmp     byte[win.isvert], 1
319
    je	    .vert_btn
317
    je	    .vert_btn
320
    mcall   8, esi, <0, 42>, 0x60000002, [color.bg]
318
    mcall   8, esi, <0, 42>, 0x60000002, [color.bg]
321
    jmp     .endbtn
319
    jmp     .endbtn
322
 .vert_btn:
320
 .vert_btn:
323
    mcall   8, <0, 42>, esi, 0x60000002, [color.bg]
321
    mcall   8, <0, 42>, esi, 0x60000002, [color.bg]
324
 .endbtn:
322
 .endbtn:
325
    pop     edi
323
    pop     edi
326
 
324
 
327
    cmp     byte[dock_items.separator + edi], 1
325
    cmp     byte[dock_items.separator + edi], 1
328
    je	    .draw_separator
326
    je	    .draw_separator
329
    jmp     .end_separator
327
    jmp     .end_separator
330
 
328
 
331
 .draw_separator:
329
 .draw_separator:
332
    push    ebx
330
    push    ebx
333
    push    ecx
331
    push    ecx
334
    mov     ebx, edi
332
    mov     ebx, edi
335
    imul    ebx, 42
333
    imul    ebx, 42
336
    add     ebx, 41
334
    add     ebx, 41
337
    shl     ebx, 16
335
    shl     ebx, 16
338
    add     ebx, 1
336
    add     ebx, 1
339
    cmp     byte[win.isvert], 1
337
    cmp     byte[win.isvert], 1
340
    je	    .vert_draw_sep
338
    je	    .vert_draw_sep
341
    mcall   13, , <0, 43>, [color.frame]
339
    mcall   13, , <0, 43>, [color.frame]
342
    sub     ebx, 0x00010000
340
    sub     ebx, 0x00010000
343
    mcall   13, , <1, 41>, [color.framein]
341
    mcall   13, , <1, 41>, [color.framein]
344
    add     ebx, 0x00020000
342
    add     ebx, 0x00020000
345
    mcall   13, , <1, 41>, [color.framein]
343
    mcall   13, , <1, 41>, [color.framein]
346
    jmp     .end_inner_sep
344
    jmp     .end_inner_sep
347
 .vert_draw_sep:
345
 .vert_draw_sep:
348
    mov     ecx, ebx
346
    mov     ecx, ebx
349
    mcall   13, <0, 43>, , [color.frame]
347
    mcall   13, <0, 43>, , [color.frame]
350
    sub     ecx, 0x00010000
348
    sub     ecx, 0x00010000
351
    mcall   13, <1, 41>, , [color.framein]
349
    mcall   13, <1, 41>, , [color.framein]
352
    add     ecx, 0x00020000
350
    add     ecx, 0x00020000
353
    mcall   13, <1, 41>, , [color.framein]
351
    mcall   13, <1, 41>, , [color.framein]
354
 .end_inner_sep:
352
 .end_inner_sep:
355
    pop     ecx
353
    pop     ecx
356
    pop     ebx
354
    pop     ebx
357
 .end_separator:
355
 .end_separator:
358
 
356
 
359
    cmp     byte[win.isvert], 1
357
    cmp     byte[win.isvert], 1
360
    je	    .vert_dig
358
    je	    .vert_dig
361
    mov     edx, ebx
359
    mov     edx, ebx
362
    and     edx, 0xFFFF0000
360
    and     edx, 0xFFFF0000
363
    add     edx, 0x00050005
361
    add     edx, 0x00050005
364
    jmp     .digend
362
    jmp     .digend
365
 .vert_dig:
363
 .vert_dig:
366
    mov     edx, ecx
364
    mov     edx, ecx
367
    and     edx, 0xFFFF0000
365
    and     edx, 0xFFFF0000
368
    shr     edx, 16
366
    shr     edx, 16
369
    add     edx, 0x00050005
367
    add     edx, 0x00050005
370
 .digend:
368
 .digend:
371
 
369
 
372
    imul    ebx, edi, 4
370
    imul    ebx, edi, 4
373
    add     ebx, dock_items.icon
371
    add     ebx, dock_items.icon
374
    mov     ebx, [ebx]
372
    mov     ebx, [ebx]
375
    imul    ebx, ICON_SIZE
373
    imul    ebx, ICON_SIZE
376
    add     ebx, [img_data.rgb_object]
374
    add     ebx, [img_data.rgb_object]
377
 
375
 
378
    mcall   7, , <32, 32>
376
    mcall   7, , <32, 32>
379
 
377
 
380
    inc     edi
378
    inc     edi
381
    jmp     @b
379
    jmp     @b
382
  @@:
380
  @@:
383
 
381
 
384
    mcall   12, 2
382
    mcall   12, 2
385
 
383
 
386
    jmp     main_loop
384
    jmp     main_loop
387
endp
385
endp
388
;-------------------------------------------------------------------------------
386
;-------------------------------------------------------------------------------
389
proc event_button
387
proc event_button
390
    mcall   17
388
    mcall   17
391
 
389
 
392
    cmp     ah, 1
390
    cmp     ah, 1
393
    je	    .button_close
391
    je	    .button_close
394
 
392
 
395
    cmp     ah, 2
393
    cmp     ah, 2
396
    je	    .button_dock
394
    je	    .button_dock
397
 
395
 
398
    jmp     @f
396
    jmp     @f
399
 
397
 
400
 .button_close:
398
 .button_close:
401
    jmp     exit
399
    jmp     exit
402
 
400
 
403
 .button_dock:
401
 .button_dock:
404
    mov     edi, [win.button_index]
402
    mov     edi, [win.button_index]
405
    imul    edi, 256
403
    imul    edi, 256
406
 
404
 
407
    mov     esi, edi
405
    mov     esi, edi
408
    add     esi, dock_items.path
406
    add     esi, dock_items.path
409
    mov     dword[file_exec.file], esi
407
    mov     dword[file_exec.file], esi
410
 
408
 
411
    mov     esi, edi
409
    mov     esi, edi
412
    add     esi, dock_items.param
410
    add     esi, dock_items.param
413
    mov     dword[file_exec.param], esi
411
    mov     dword[file_exec.param], esi
414
 
412
 
415
    mcall   70, file_exec
413
    mcall   70, file_exec
416
 
414
 
417
  @@:
415
  @@:
418
    jmp     main_loop
416
    jmp     main_loop
419
endp
417
endp
420
;-------------------------------------------------------------------------------
418
;-------------------------------------------------------------------------------
421
proc event_mouse
419
proc event_mouse
422
    mcall   37, 1
420
    mcall   37, 1
423
    mov     edi, eax
421
    mov     edi, eax
424
    mov     esi, eax
422
    mov     esi, eax
425
    shr     edi, 16
423
    shr     edi, 16
426
    and     esi, 0xFFFF
424
    and     esi, 0xFFFF
427
 
425
 
428
    cmp     edi, 0
426
    cmp     edi, 0
429
    jl	    @f
427
    jl	    @f
430
    dec     edi
428
    dec     edi
431
    cmp     edi, [win.width]
429
    cmp     edi, [win.width]
432
    jg	    @f
430
    jg	    @f
433
    cmp     esi, 0
431
    cmp     esi, 0
434
    jl	    @f
432
    jl	    @f
435
    dec     esi
433
    dec     esi
436
    cmp     esi, [win.height]
434
    cmp     esi, [win.height]
437
    jg	    @f
435
    jg	    @f
438
 
436
 
439
    mov     eax, [dock_items.location]
437
    mov     eax, [dock_items.location]
440
    and     eax, 1b
438
    and     eax, 1b
441
    cmp     eax, 1
439
    cmp     eax, 1
442
    jne     .vert
440
    jne     .vert
443
    mov     eax, edi
441
    mov     eax, edi
444
    jmp     .nxt
442
    jmp     .nxt
445
 
443
 
446
 .vert:
444
 .vert:
447
    mov     eax, esi
445
    mov     eax, esi
448
 
446
 
449
 .nxt:
447
 .nxt:
450
    mov     edx, 0
448
    mov     edx, 0
451
    mov     ebx, 42
449
    mov     ebx, 42
452
    div     ebx
450
    div     ebx
453
 
451
 
454
    cmp     eax, [dock_items.count]
452
    cmp     eax, [dock_items.count]
455
    jge     .set0
453
    jge     .set0
456
    jmp     .nxtcmp
454
    jmp     .nxtcmp
457
 
455
 
458
 .set0:
456
 .set0:
459
    mov     eax, 100
457
    mov     eax, 100
460
 
458
 
461
 .nxtcmp:
459
 .nxtcmp:
462
    cmp     [win.button_index], eax
460
    cmp     [win.button_index], eax
463
    je	    .nxt2
461
    je	    .nxt2
464
 
462
 
465
    mov     [win.button_index], eax
463
    mov     [win.button_index], eax
466
 
464
 
467
 .nxt2:
465
 .nxt2:
468
    mov     eax, [win.button_index]
466
    mov     eax, [win.button_index]
469
    imul    eax, 42
467
    imul    eax, 42
470
    cmp     byte[win.isvert], 1
468
    cmp     byte[win.isvert], 1
471
    je	    .vert_name
469
    je	    .vert_name
472
    sub     eax, 13
470
    sub     eax, 13
473
    add     eax, [win.x]
471
    add     eax, [win.x]
474
    mov     [nwin.x], eax
472
    mov     [nwin.x], eax
475
    jmp     .vert_end
473
    jmp     .vert_end
476
 .vert_name:
474
 .vert_name:
477
    add     eax, 13
475
    add     eax, 13
478
    add     eax, [win.y]
476
    add     eax, [win.y]
479
    mov     [nwin.y], eax
477
    mov     [nwin.y], eax
480
 .vert_end:
478
 .vert_end:
481
    mov     byte[nwin.change_shape], 1
479
    mov     byte[nwin.change_shape], 1
482
 
480
 
483
    cmp     byte[win.state], 1
481
    cmp     byte[win.state], 1
484
    je	    .end_cmp
482
    je	    .end_cmp
485
 
483
 
486
    mov     edx, esp
484
    mov     edx, esp
487
    add     edx, 512
485
    add     edx, 512
488
    mcall   51, 1, n_main
486
    mcall   51, 1, n_main
489
 
487
 
490
    mcall   18, 7
488
    mcall   18, 7
491
    mov     [win.psid], eax
489
    mov     [win.psid], eax
492
 
490
 
493
    mcall   18, 3, [win.sid]
491
    mcall   18, 3, [win.sid]
494
 
492
 
495
    mov     byte[win.state], 1
493
    mov     byte[win.state], 1
496
 
494
 
497
    mov     eax, [win.width_opn]
495
    mov     eax, [win.width_opn]
498
    mov     [win.width], eax
496
    mov     [win.width], eax
499
 
497
 
500
    mov     eax, [win.x_opn]
498
    mov     eax, [win.x_opn]
501
    mov     [win.x], eax
499
    mov     [win.x], eax
502
 
500
 
503
    mov     eax, [win.height_opn]
501
    mov     eax, [win.height_opn]
504
    mov     [win.height], eax
502
    mov     [win.height], eax
505
 
503
 
506
    mov     eax, [win.y_opn]
504
    mov     eax, [win.y_opn]
507
    mov     [win.y], eax
505
    mov     [win.y], eax
508
 
506
 
509
    mcall   67, [win.x], [win.y], [win.width], [win.height]
507
    mcall   67, [win.x], [win.y], [win.width], [win.height]
510
 
508
 
511
    call     event_redraw
509
    call     event_redraw
512
 
510
 
513
  @@:
511
  @@:
514
    cmp     byte[win.state], 0
512
    cmp     byte[win.state], 0
515
    je	    .end_cmp
513
    je	    .end_cmp
516
 
514
 
517
    mov     byte[nwin.close], 1
515
    mov     byte[nwin.close], 1
518
 
516
 
519
    mcall   18, 3, [win.psid]
517
    mcall   18, 3, [win.psid]
520
 
518
 
521
    mov     byte[win.state], 0
519
    mov     byte[win.state], 0
522
    mov     byte[win.button_index], -1
520
    mov     byte[win.button_index], -1
523
 
521
 
524
    mov     eax, [win.width_hdn]
522
    mov     eax, [win.width_hdn]
525
    mov     [win.width], eax
523
    mov     [win.width], eax
526
 
524
 
527
    mov     eax, [win.x_hdn]
525
    mov     eax, [win.x_hdn]
528
    mov     [win.x], eax
526
    mov     [win.x], eax
529
 
527
 
530
    mov     eax, [win.height_hdn]
528
    mov     eax, [win.height_hdn]
531
    mov     [win.height], eax
529
    mov     [win.height], eax
532
 
530
 
533
    mov     eax, [win.y_hdn]
531
    mov     eax, [win.y_hdn]
534
    mov     [win.y], eax
532
    mov     [win.y], eax
535
 
533
 
536
    mcall   67, [win.x], [win.y], [win.width], [win.height]
534
    mcall   67, [win.x], [win.y], [win.width], [win.height]
537
 
535
 
538
    call     event_redraw
536
    call     event_redraw
539
 
537
 
540
  .end_cmp:
538
  .end_cmp:
541
    jmp     main_loop
539
    jmp     main_loop
542
endp
540
endp
543
;-------------------------------------------------------------------------------
541
;-------------------------------------------------------------------------------
544
proc sections_callback, _file_name, _section_name
542
proc sections_callback, _file_name, _section_name
545
    mov     eax, [_section_name]
543
    mov     eax, [_section_name]
546
    cmp     byte[eax], '@'
544
    cmp     byte[eax], '@'
547
    jne     @f
545
    jne     @f
548
 
546
 
549
    dec     dword[dock_items.count]
547
    dec     dword[dock_items.count]
550
    jmp     .endproc
548
    jmp     .endproc
551
 
549
 
552
  @@:
550
  @@:
553
    ; ==== GET NAME ====
551
    ; ==== GET NAME ====
554
    mov     ebx, [dock_items.count]
552
    mov     ebx, [dock_items.count]
555
    imul    ebx, 16
553
    imul    ebx, 16
556
    add     ebx, dock_items.name
554
    add     ebx, dock_items.name
557
 
555
 
558
    mov     eax, [_section_name]
556
    mov     eax, [_section_name]
559
 
557
 
560
    mov     edi, 0
558
    mov     edi, 0
561
  @@:
559
  @@:
562
    mov     cl, byte[eax]
560
    mov     cl, byte[eax]
563
    mov     byte[ebx + edi], cl
561
    mov     byte[ebx + edi], cl
564
 
562
 
565
    inc     eax
563
    inc     eax
566
    inc     edi
564
    inc     edi
567
    cmp     edi, 10
565
    cmp     edi, 10
568
    jne     @b
566
    jne     @b
569
 
567
 
570
  ; ==== GET PATH ====
568
  ; ==== GET PATH ====
571
    mov     ebx, [dock_items.count]
569
    mov     ebx, [dock_items.count]
572
    imul    ebx, 256
570
    imul    ebx, 256
573
    add     ebx, dock_items.path
571
    add     ebx, dock_items.path
574
 
572
 
575
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.path_name, ebx, 256, 0
573
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.path_name, ebx, 256, 0
576
 
574
 
577
  ; === GET  PARAM ===
575
  ; === GET  PARAM ===
578
    mov     ebx, [dock_items.count]
576
    mov     ebx, [dock_items.count]
579
    imul    ebx, 256
577
    imul    ebx, 256
580
    add     ebx, dock_items.param
578
    add     ebx, dock_items.param
581
 
579
 
582
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.param_name, ebx, 256, 0
580
    invoke  ini.get_str, [_file_name], [_section_name], ini_data.param_name, ebx, 256, 0
583
 
581
 
584
  ; ==== GET ICON ====
582
  ; ==== GET ICON ====
585
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.icon_name, 0
583
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.icon_name, 0
586
 
584
 
587
    mov     ebx, [dock_items.count]
585
    mov     ebx, [dock_items.count]
588
    imul    ebx, 4
586
    imul    ebx, 4
589
    mov     [dock_items.icon + ebx], eax
587
    mov     [dock_items.icon + ebx], eax
590
 
588
 
591
  ; ==== GET SEPARATOR ====
589
  ; ==== GET SEPARATOR ====
592
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.separator_name, 0
590
    invoke  ini.get_int, [_file_name], [_section_name], ini_data.separator_name, 0
593
 
591
 
594
    mov     ebx, [dock_items.count]
592
    mov     ebx, [dock_items.count]
595
    mov     byte[dock_items.separator + ebx], al
593
    mov     byte[dock_items.separator + ebx], al
596
 
594
 
597
  ; ====== END =======
595
  ; ====== END =======
598
 .endproc:
596
 .endproc:
599
    mov     eax, 1
597
    mov     eax, 1
600
    inc     dword[dock_items.count]
598
    inc     dword[dock_items.count]
601
    ret
599
    ret
602
endp
600
endp
603
;-------------------------------------------------------------------------------
601
;-------------------------------------------------------------------------------
604
n_main:
602
n_main:
605
    cmp     dword[dock_items.location], 1
603
    cmp     dword[dock_items.location], 1
606
    je	    .top
604
    je	    .top
607
    cmp     dword[dock_items.location], 4
605
    cmp     dword[dock_items.location], 4
608
    je	    .right
606
    je	    .right
609
    cmp     dword[dock_items.location], 3
607
    cmp     dword[dock_items.location], 3
610
    je	    .bottom
608
    je	    .bottom
611
    jmp     .left
609
    jmp     .left
612
 .top:
610
 .top:
613
    mov     eax, [win.height_opn]
611
    mov     eax, [win.height_opn]
614
    add     eax, 5
612
    add     eax, 5
615
    mov     [nwin.y], eax
613
    mov     [nwin.y], eax
616
    jmp     @f
614
    jmp     @f
617
 .right:
615
 .right:
618
    mov     eax, [win.x_opn]
616
    mov     eax, [win.x_opn]
619
    sub     eax, 73
617
    sub     eax, 73
620
    mov     [nwin.x], eax
618
    mov     [nwin.x], eax
621
    jmp     @f
619
    jmp     @f
622
 .bottom:
620
 .bottom:
623
    mov     eax, [win.y_opn]
621
    mov     eax, [win.y_opn]
624
    sub     eax, 21
622
    sub     eax, 21
625
    mov     [nwin.y], eax
623
    mov     [nwin.y], eax
626
    jmp     @f
624
    jmp     @f
627
 .left:
625
 .left:
628
    mov     eax, [win.width_opn]
626
    mov     eax, [win.width_opn]
629
    add     eax, 5
627
    add     eax, 5
630
    mov     [nwin.x], eax
628
    mov     [nwin.x], eax
631
  @@:
629
  @@:
632
    mov     dword[nwin.width], 68
630
    mov     dword[nwin.width], 68
633
    mov     dword[nwin.height], 16
631
    mov     dword[nwin.height], 16
634
 
632
 
635
    mcall   40, 1b
633
    mcall   40, 1b
636
 
634
 
637
    mcall   9, win.procinfo, -1
635
    mcall   9, win.procinfo, -1
638
    mov     ecx, [win.procinfo + 30]
636
    mov     ecx, [win.procinfo + 30]
639
    mcall   18, 21
637
    mcall   18, 21
640
    and     eax, 0xFFFF
638
    and     eax, 0xFFFF
641
    mov     [nwin.sid], eax
639
    mov     [nwin.sid], eax
642
;-------------------------------------------------------------------------------
640
;-------------------------------------------------------------------------------
643
n_main_loop:
641
n_main_loop:
644
    mcall   23, 1
642
    mcall   23, 1
645
 
643
 
646
    cmp     eax, EV_IDLE
644
    cmp     eax, EV_IDLE
647
    je	    n_event_idle
645
    je	    n_event_idle
648
    cmp     eax, EV_REDRAW
646
    cmp     eax, EV_REDRAW
649
    je	    n_event_redraw
647
    je	    n_event_redraw
650
 
648
 
651
    jmp     n_main_loop
649
    jmp     n_main_loop
652
;-------------------------------------------------------------------------------
650
;-------------------------------------------------------------------------------
653
n_event_idle:
651
n_event_idle:
654
    cmp     byte[nwin.close], 1
652
    cmp     byte[nwin.close], 1
655
    jne     @f
653
    jne     @f
656
 
654
 
657
    mov     byte[nwin.close], 0
655
    mov     byte[nwin.close], 0
658
    mcall   -1
656
    mcall   -1
659
 
657
 
660
  @@:
658
  @@:
661
    cmp     byte[win.button_index], 100
659
    cmp     byte[win.button_index], 100
662
    jne     @f
660
    jne     @f
663
 
661
 
664
    mcall   67, 0, 0, 0, 0
662
    mcall   67, 0, 0, 0, 0
665
    jmp     .end
663
    jmp     .end
666
 
664
 
667
  @@:
665
  @@:
668
    cmp     byte[nwin.change_shape], 1
666
    cmp     byte[nwin.change_shape], 1
669
    jne     .end
667
    jne     .end
670
 
668
 
671
    mov     byte[nwin.change_shape], 0
669
    mov     byte[nwin.change_shape], 0
672
    mcall   67, [nwin.x], [nwin.y], [nwin.width], [nwin.height]
670
    mcall   67, [nwin.x], [nwin.y], [nwin.width], [nwin.height]
673
 
671
 
674
 .end:
672
 .end:
675
    jmp     n_main_loop
673
    jmp     n_main_loop
676
;-------------------------------------------------------------------------------
674
;-------------------------------------------------------------------------------
677
n_event_redraw:
675
n_event_redraw:
678
    mcall   12, 1
676
    mcall   12, 1
679
 
677
 
680
    mcall   0, <[nwin.x], [nwin.width]>, <[nwin.y], [nwin.height]>, [color.frame], [color.frame], [color.frame]
678
    mcall   0, <[nwin.x], [nwin.width]>, <[nwin.y], [nwin.height]>, [color.frame], [color.frame], [color.frame]
681
 
679
 
682
    and     ebx, 0x0000FFFF
680
    and     ebx, 0x0000FFFF
683
    add     ebx, 0x00010000
681
    add     ebx, 0x00010000
684
    sub     ebx, 0x00000001
682
    sub     ebx, 0x00000001
685
 
683
 
686
    and     ecx, 0x0000FFFF
684
    and     ecx, 0x0000FFFF
687
    add     ecx, 0x00010000
685
    add     ecx, 0x00010000
688
    sub     ecx, 0x00000001
686
    sub     ecx, 0x00000001
689
 
687
 
690
    mcall   13, , , [color.framein]
688
    mcall   13, , , [color.framein]
691
 
689
 
692
 
690
 
693
    add     ebx, 0x00010000
691
    add     ebx, 0x00010000
694
    sub     ebx, 0x00000002
692
    sub     ebx, 0x00000002
695
 
693
 
696
    add     ecx, 0x00010000
694
    add     ecx, 0x00010000
697
    sub     ecx, 0x00000002
695
    sub     ecx, 0x00000002
698
 
696
 
699
    mcall   13, , , [color.bg]
697
    mcall   13, , , [color.bg]
700
 
698
 
701
    mov     edx, [win.button_index]
699
    mov     edx, [win.button_index]
702
    imul    edx, 16
700
    imul    edx, 16
703
    add     edx, dock_items.name
701
    add     edx, dock_items.name
704
 
702
 
705
    mov     eax, 0
703
    mov     eax, 0
706
  @@:
704
  @@:
707
    inc     eax
705
    inc     eax
708
    cmp     byte[edx+eax], 0
706
    cmp     byte[edx+eax], 0
709
    jne     @b
707
    jne     @b
710
 
708
 
711
    imul    eax, 3
709
    imul    eax, 3
712
    mov     ebx, 34
710
    mov     ebx, 34
713
    sub     ebx, eax
711
    sub     ebx, eax
714
    inc     ebx
712
    inc     ebx
715
    shl     ebx, 16
713
    shl     ebx, 16
716
    add     ebx, 5
714
    add     ebx, 5
717
 
715
 
718
    mcall   4, , [color.text]
716
    mcall   4, , [color.text]
719
 
717
 
720
    mcall   12, 2
718
    mcall   12, 2
721
 
719
 
722
    jmp     n_main_loop
720
    jmp     n_main_loop
723
;-------------------------------------------------------------------------------
721
;-------------------------------------------------------------------------------
724
img_data:
722
img_data:
725
 .file_name:
723
 .file_name:
726
    db	    "/sys/iconstrp.png", 0
724
    db	    "/sys/iconstrp.png", 0
727
 .cfg_text:
725
 .cfg_text:
728
    db	    "R", 0
726
    db	    "R", 0
729
 .ext_text:
727
 .ext_text:
730
    db	    "X", 0
728
    db	    "X", 0
731
;-------------------------------------------------------------------------------
729
;-------------------------------------------------------------------------------
732
ini_data:
730
ini_data:
733
 .file_name:
731
 .file_name:
734
    db	    "/sys/settings/Docky.ini", 0
732
    db	    "/sys/settings/Docky.ini", 0
735
 .skin_dir:
-
 
736
    db	    "/sys/settings/Docky skins/"
-
 
737
 .skin_file:
-
 
738
    db	    32 dup(0)
-
 
739
 .path_name:
733
 .path_name:
740
    db	    "path", 0
734
    db	    "path", 0
741
 .param_name:
735
 .param_name:
742
    db	    "param", 0
736
    db	    "param", 0
743
 .icon_name:
737
 .icon_name:
744
    db	    "icon", 0
738
    db	    "icon", 0
745
 .separator_name:
739
 .separator_name:
746
    db	    "separator", 0
740
    db	    "separator", 0
747
 
741
 
748
 .settings_name:
742
 .settings_name:
749
    db	    "@SETTINGS", 0
743
    db	    "@SETTINGS", 0
750
 .location_name:
744
 .location_name:
751
    db	    "location", 0
745
    db	    "location", 0
752
 .skin_name:
-
 
753
    db	    "skin", 0
-
 
754
 .color_bg:
746
 .color_bg:
755
    db	    "bg", 0
747
    db	    "bg", 0
756
 .color_frame:
748
 .color_frame:
757
    db	    "frame", 0
749
    db	    "frame", 0
758
 .color_framein:
750
 .color_framein:
759
    db	    "framein", 0
751
    db	    "framein", 0
760
 .color_text:
752
 .color_text:
761
    db	    "text", 0
753
    db	    "text", 0
762
;-------------------------------------------------------------------------------
754
;-------------------------------------------------------------------------------
763
load_lib_start:
755
load_lib_start:
764
    lib1    l_libs img.name,	     \
756
    lib1    l_libs img.name,	     \
765
		   sys_path,	     \
757
		   sys_path,	     \
766
		   file_name,	     \
758
		   file_name,	     \
767
		   img.dir,	     \
759
		   img.dir,	     \
768
		   error,	     \
760
		   error,	     \
769
		   error,	     \
761
		   error,	     \
770
		   img, 	     \
762
		   img, 	     \
771
		   error,	     \
763
		   error,	     \
772
		   error
764
		   error
773
 
765
 
774
    lib2    l_libs ini.name,	     \
766
    lib2    l_libs ini.name,	     \
775
		   sys_path,	     \
767
		   sys_path,	     \
776
		   file_name,	     \
768
		   file_name,	     \
777
		   ini.dir,	     \
769
		   ini.dir,	     \
778
		   error,	     \
770
		   error,	     \
779
		   error,	     \
771
		   error,	     \
780
		   ini, 	     \
772
		   ini, 	     \
781
		   error,	     \
773
		   error,	     \
782
		   error
774
		   error
783
load_lib_end:
775
load_lib_end:
784
;-------------------------------------------------------------------------------
776
;-------------------------------------------------------------------------------
785
img:
777
img:
786
 .init	   \
778
 .init	   \
787
    dd	    .init_T
779
    dd	    .init_T
788
 .toRGB    \
780
 .toRGB    \
789
    dd	    .toRGB_T
781
    dd	    .toRGB_T
790
 .decode   \
782
 .decode   \
791
    dd	    .decode_T
783
    dd	    .decode_T
792
 .destroy  \
784
 .destroy  \
793
    dd	    .destroy_T
785
    dd	    .destroy_T
794
 
786
 
795
    dd	    0, 0
787
    dd	    0, 0
796
 
788
 
797
 .init_T:
789
 .init_T:
798
    db	    "lib_init", 0
790
    db	    "lib_init", 0
799
 .toRGB_T:
791
 .toRGB_T:
800
    db	    "img_to_rgb2", 0
792
    db	    "img_to_rgb2", 0
801
 .decode_T:
793
 .decode_T:
802
    db	    "img_decode", 0
794
    db	    "img_decode", 0
803
 .destroy_T:
795
 .destroy_T:
804
    db	    "img_destroy", 0
796
    db	    "img_destroy", 0
805
 
797
 
806
 .dir:
798
 .dir:
807
    db	    "/sys/lib/"
799
    db	    "/sys/lib/"
808
 .name:
800
 .name:
809
    db	    "libimg.obj", 0
801
    db	    "libimg.obj", 0
810
;-------------------------------------------------------------------------------
802
;-------------------------------------------------------------------------------
811
ini:
803
ini:
812
 .init	   \
804
 .init	   \
813
    dd	    .init_T
805
    dd	    .init_T
814
 .sections \
806
 .sections \
815
    dd	    .sections_T
807
    dd	    .sections_T
816
 .get_int  \
808
 .get_int  \
817
    dd	    .get_int_T
809
    dd	    .get_int_T
818
 .get_str  \
810
 .get_str  \
819
    dd	    .get_str_T
811
    dd	    .get_str_T
820
 .get_color\
812
 .get_color\
821
    dd	    .get_color_T
813
    dd	    .get_color_T
822
 
814
 
823
    dd	    0, 0
815
    dd	    0, 0
824
 
816
 
825
 .init_T:
817
 .init_T:
826
    db	    "lib_init", 0
818
    db	    "lib_init", 0
827
 .sections_T:
819
 .sections_T:
828
    db	    "ini_enum_sections", 0
820
    db	    "ini_enum_sections", 0
829
 .get_int_T:
821
 .get_int_T:
830
    db	    "ini_get_int", 0
822
    db	    "ini_get_int", 0
831
 .get_str_T:
823
 .get_str_T:
832
    db	    "ini_get_str", 0
824
    db	    "ini_get_str", 0
833
 .get_color_T:
825
 .get_color_T:
834
    db	    "ini_get_color", 0
826
    db	    "ini_get_color", 0
835
 
827
 
836
 .dir:
828
 .dir:
837
    db	    "/sys/lib/"
829
    db	    "/sys/lib/"
838
 .name:
830
 .name:
839
    db	    "libini.obj", 0
831
    db	    "libini.obj", 0
840
;-------------------------------------------------------------------------------
832
;-------------------------------------------------------------------------------
841
error:
833
error:
842
    db	    0
834
    db	    0
843
;-------------------------------------------------------------------------------
835
;-------------------------------------------------------------------------------
844
__dataend:
836
__dataend:
845
;================================================================================
837
;================================================================================
846
    rb	    1024
838
    rb	    1024
847
__stackend:
839
__stackend:
848
;================================================================================
840
;================================================================================
849
color:
841
color:
850
 .bg:
842
 .bg:
851
    rd	    1
843
    rd	    1
852
 .frame:
844
 .frame:
853
    rd	    1
845
    rd	    1
854
 .framein:
846
 .framein:
855
    rd	    1
847
    rd	    1
856
 .text:
848
 .text:
857
    rd	    1
849
    rd	    1
858
;-------------------------------------------------------------------------------
850
;-------------------------------------------------------------------------------
859
win:
851
win:
860
 .x:
852
 .x:
861
    rd	    1
853
    rd	    1
862
 .y:
854
 .y:
863
    rd	    1
855
    rd	    1
864
 .width:
856
 .width:
865
    rd	    1
857
    rd	    1
866
 .height:
858
 .height:
867
    rd	    1
859
    rd	    1
868
 
860
 
869
 .x_hdn:
861
 .x_hdn:
870
    rd	    1
862
    rd	    1
871
 .y_hdn:
863
 .y_hdn:
872
    rd	    1
864
    rd	    1
873
 .width_hdn:
865
 .width_hdn:
874
    rd	    1
866
    rd	    1
875
 .height_hdn:
867
 .height_hdn:
876
    rd	    1
868
    rd	    1
877
 
869
 
878
 .x_opn:
870
 .x_opn:
879
    rd	    1
871
    rd	    1
880
 .y_opn:
872
 .y_opn:
881
    rd	    1
873
    rd	    1
882
 .width_opn:
874
 .width_opn:
883
    rd	    1
875
    rd	    1
884
 .height_opn:
876
 .height_opn:
885
    rd	    1
877
    rd	    1
886
 
878
 
887
 .sid:
879
 .sid:
888
    rd	    1
880
    rd	    1
889
 .psid:
881
 .psid:
890
    rd	    1
882
    rd	    1
891
 .procinfo:
883
 .procinfo:
892
    rb	    1024
884
    rb	    1024
893
 .state:
885
 .state:
894
    rb	    1
886
    rb	    1
895
 .button_index:
887
 .button_index:
896
    rd	    1
888
    rd	    1
897
 
889
 
898
 .isvert:
890
 .isvert:
899
    rb	    1
891
    rb	    1
900
;-------------------------------------------------------------------------------
892
;-------------------------------------------------------------------------------
901
nwin:
893
nwin:
902
 .x:
894
 .x:
903
    rd	    1
895
    rd	    1
904
 .y:
896
 .y:
905
    rd	    1
897
    rd	    1
906
 .width:
898
 .width:
907
    rd	    1
899
    rd	    1
908
 .height:
900
 .height:
909
    rd	    1
901
    rd	    1
910
 
902
 
911
 .visible:
903
 .visible:
912
    rd	    1
904
    rd	    1
913
 .sid:
905
 .sid:
914
    rd	    1
906
    rd	    1
915
 .change_shape:
907
 .change_shape:
916
    rb	    1
908
    rb	    1
917
 .close:
909
 .close:
918
    rb	    1
910
    rb	    1
919
;-------------------------------------------------------------------------------
911
;-------------------------------------------------------------------------------
920
img_data.object:
912
img_data.object:
921
    rd	    1
913
    rd	    1
922
img_data.rgb_object:
914
img_data.rgb_object:
923
    rd	    1
915
    rd	    1
924
img_data.file:
916
img_data.file:
925
 .proc:
917
 .proc:
926
    rd	    1
918
    rd	    1
927
 .position:
919
 .position:
928
    rd	    1
920
    rd	    1
929
    rd	    1
921
    rd	    1
930
 .size:
922
 .size:
931
    rd	    1
923
    rd	    1
932
 .buffer:
924
 .buffer:
933
    rd	    1
925
    rd	    1
934
    rb	    1
926
    rb	    1
935
 .name:
927
 .name:
936
    rd	    1
928
    rd	    1
937
;-------------------------------------------------------------------------------
929
;-------------------------------------------------------------------------------
938
file_exec:
930
file_exec:
939
 .proc:
931
 .proc:
940
    rd	    1
932
    rd	    1
941
    rd	    1
933
    rd	    1
942
 .param:
934
 .param:
943
    rd	    1
935
    rd	    1
944
    rd	    1
936
    rd	    1
945
    rd	    1
937
    rd	    1
946
    rb	    1
938
    rb	    1
947
 .file:
939
 .file:
948
    rd	    1
940
    rd	    1
949
;-------------------------------------------------------------------------------
941
;-------------------------------------------------------------------------------
950
dock_items:
942
dock_items:
951
 .count:
943
 .count:
952
    rd	    1
944
    rd	    1
953
 .name:
945
 .name:
954
    rb	    16	* 20
946
    rb	    16	* 20
955
 .path:
947
 .path:
956
    rb	    256 * 20
948
    rb	    256 * 20
957
 .param:
949
 .param:
958
    rb	    256 * 20
950
    rb	    256 * 20
959
 .icon:
951
 .icon:
960
    rd	    1	* 20
952
    rd	    1	* 20
961
 .separator:
953
 .separator:
962
    rb	    1	* 20
954
    rb	    1	* 20
963
 .location:
955
 .location:
964
    rd	    1
956
    rd	    1
965
;-------------------------------------------------------------------------------
957
;-------------------------------------------------------------------------------
966
sys_path:
958
sys_path:
967
    rb	    4096
959
    rb	    4096
968
file_name:
960
file_name:
969
    rb	    4096
961
    rb	    4096
970
;-------------------------------------------------------------------------------
962
;-------------------------------------------------------------------------------
971
__memend:
963
__memend:
972
;================================================================================
964
;================================================================================