Subversion Repositories Kolibri OS

Rev

Rev 903 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. //BOX_LIB
  2. dword edit_box_draw = #aEdit_box_draw;
  3. dword edit_box_key  = #aEdit_box_key;
  4. dword edit_box_mouse = #aEdit_box_mouse;
  5. dword version_ed     = #aVersion_ed;
  6.  
  7. dword  am__ = 0x0;
  8. dword  bm__ = 0x0;
  9.  
  10. char aEdit_box_draw[9]  = "edit_box\0";
  11. char aEdit_box_key[13] = "edit_box_key\0";
  12. char aEdit_box_mouse[15] = "edit_box_mouse\0";
  13. char aVersion_ed[11] = "version_ed\0";
  14.  
  15. char aCheck_box_draw  [15] = "check_box_draw\0";
  16. char aCheck_box_mouse [16] = "check_box_mouse\0";
  17. char aVersion_ch      [11] = "version_ch\0";
  18.  
  19. char aOption_box_draw [16] = "option_box_draw\0";
  20. char aOption_box_mouse[17] = "option_box_mouse\0";
  21. char aVersion_op      [11] = "version_op\0" ;
  22.  
  23.  
  24. struct edit_box{
  25. dword width, left, top, color, shift_color, focus_border_color, blur_border_color,
  26. text_color, max, text, flags, size, pos, offset, cl_curs_x, cl_curs_y, shift, shift_old;
  27. };
  28.  
  29.  
  30.  
  31. int load_editbox_lib(EAX)
  32. {
  33. //set mask
  34.         $mov    eax,40
  35.         $mov    ebx,0x27
  36.         $int    0x40
  37. // load DLL
  38.         $mov     eax, 68
  39.         $mov     ebx, 19
  40.         ECX="/sys/lib/box_lib.obj";
  41.         $int     0x40
  42.         $test    eax, eax
  43.         $jz      exit
  44.  
  45. // initialize import
  46.         $mov     edx,eax
  47.         ESI=#edit_box_draw;
  48. import_loop:
  49.         $lodsd
  50.         $test    eax,eax
  51.         $jz      import_done
  52.         $push    edx
  53. import_find:
  54.         $mov     ebx,DSDWORD[EDX]
  55.         $test    ebx, ebx
  56.         $jz      exit
  57.         $push    eax
  58. nex1:
  59.         $mov     cl,DSBYTE[EAX];
  60.         $cmp     cl,DSBYTE[EBX];
  61.         $jnz     import_find_next
  62.         $test    cl,cl
  63.         $jz      import_found
  64.         $inc     eax
  65.         $inc     ebx
  66.         $jmp     nex1
  67. import_find_next:
  68.         $pop     eax
  69.         $add     edx, 8
  70.         $jmp     import_find
  71. import_found:
  72.         $pop     eax
  73.         $mov     eax,DSDWORD[edx+4]
  74.         $mov     DSDWORD[esi-4],eax
  75.         $pop     edx
  76.         $jmp     import_loop
  77. import_done:
  78.         return 0;
  79. exit:
  80.         return -1;
  81. }
  82.