Rev 281 | Rev 346 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 281 | Rev 326 | ||
---|---|---|---|
Line 259... | Line 259... | ||
259 | ret |
259 | ret |
260 | endp |
260 | endp |
261 | 261 | ||
Line 262... | Line 262... | ||
262 | align 4 |
262 | align 4 |
263 | alloc_cursor: |
- | |
264 | - | ||
265 | mov eax, CURSOR_SIZE |
- | |
266 | call malloc |
- | |
267 | test eax, eax |
- | |
268 | jz .fail |
- | |
269 | - | ||
270 | xor ebx, ebx |
- | |
271 | mov [eax+CURSOR.magic], 'CURS' |
- | |
272 | ; mov [eax+CURSOR.destructor], CURSOR_SIZE |
- | |
273 | mov [eax+CURSOR.pid], ebx |
- | |
274 | mov [eax+CURSOR.hot_x], ebx |
- | |
275 | mov [eax+CURSOR.hot_y], ebx |
- | |
276 | .fail: |
- | |
277 | ret |
- | |
278 | - | ||
279 | align 4 |
- | |
280 | proc set_cursor stdcall, hcursor:dword |
263 | proc set_cursor stdcall, hcursor:dword |
281 | mov eax, [hcursor] |
264 | mov eax, [hcursor] |
282 | cmp [eax+CURSOR.magic], 'CURS' |
265 | cmp [eax+CURSOR.magic], 'CURS' |
283 | jne .fail |
266 | jne .fail |
284 | ; cmp [eax+CURSOR.size], CURSOR_SIZE |
267 | ; cmp [eax+CURSOR.size], CURSOR_SIZE |
Line 424... | Line 407... | ||
424 | mov eax, [hcursor] |
407 | mov eax, [hcursor] |
425 | call [eax+APPOBJ.destroy] |
408 | call [eax+APPOBJ.destroy] |
426 | .fail: |
409 | .fail: |
427 | ret |
410 | ret |
428 | 411 | endp |
|
429 | ;@@: |
- | |
430 | ; mov eax, [hw_cursor] |
- | |
431 | ; test eax, eax |
- | |
432 | ; jz @F |
- | |
433 | - | ||
434 | ; xor ebx, ebx |
- | |
435 | ; mov ecx, [esi+CURSOR.base] |
- | |
436 | ; mov [hsrv], eax |
- | |
437 | ; mov [io_code], VIDEO_FREE |
- | |
438 | ; mov [input], ecx |
- | |
439 | ; mov [inp_size], 4 |
- | |
440 | ; mov [output], ebx |
- | |
441 | ; mov [out_size], ebx |
- | |
442 | - | ||
443 | ; lea eax, [hsrv] |
- | |
444 | ; stdcall srv_handler, eax |
- | |
445 | ; jmp .exit |
- | |
446 | ;@@: |
- | |
447 | ; stdcall kernel_free, [esi+CURSOR.base] |
- | |
448 | ;.exit: |
- | |
449 | ; mov eax, [hcursor] |
- | |
450 | ; call destroy_kernel_object |
- | |
451 | ;.fail: |
- | |
452 | ; ret |
- | |
453 | endp |
- | |
454 | 412 | ||
Line 455... | Line 413... | ||
455 | ; param |
413 | ; param |
456 | ; eax= cursor |
414 | ; eax= cursor |
Line 461... | Line 419... | ||
461 | push eax |
419 | push eax |
462 | stdcall kernel_free, [eax+CURSOR.base] |
420 | stdcall kernel_free, [eax+CURSOR.base] |
463 | pop eax |
421 | pop eax |
Line 464... | Line -... | ||
464 | - | ||
465 | 422 | ||
466 | call destroy_kernel_object |
423 | call destroy_kernel_object |
Line 467... | Line 424... | ||
467 | ret |
424 | ret |
468 | 425 |