Subversion Repositories Kolibri OS

Rev

Rev 6415 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. format coff
  2. use32                                   ; Tell compiler to use 32 bit instructions
  3.  
  4. section '.init' code                    ; Keep this line before includes or GCC messes up call addresses
  5.  
  6. include '../../../programs/proc32.inc'
  7. include '../../../programs/macros.inc'
  8. purge section,mov,add,sub
  9.        
  10. include '../../../programs/develop/libraries/box_lib/trunk/box_lib.mac'
  11. include '../../../programs/system/run/trunk/txtbut.inc'
  12. include '../../../programs/dll.inc'
  13.        
  14. public init_boxlib as '_init_boxlib_asm'
  15. public editbox_key as '_editbox_key@4'
  16. public press_key as '_press_key'
  17. ;;; Returns 0 on success. -1 on failure.
  18.  
  19. proc init_boxlib
  20.        
  21.         mcall 68,11
  22.        
  23.         stdcall dll.Load, @IMPORT
  24.         test    eax, eax
  25.         jnz     error
  26.        
  27.         mov eax, 0
  28.         ret
  29.        
  30. error: 
  31.         mov eax, -1
  32.         ret
  33. endp   
  34.        
  35. ;; Wrapper to handle edit_box_key function for editboxes.
  36. ;; Call this baby from C (refer kolibri_editbox.h for details)
  37. editbox_key:
  38.         mov [oldebp], ebp       ;Save ebp because GCC is crazy for it otherwise.
  39.         pop ebp                 ;Save return address in ebp. Stack top is param now.
  40.         mov eax, dword [press_key]
  41.         call [edit_box_key]     ; The pointer we passed should be on the stack already.
  42.         push ebp                ;push the return address back to stack
  43.         mov ebp, [oldebp]
  44.         ret
  45.        
  46. oldebp dd ?
  47. press_key dd ?
  48.  
  49. @IMPORT:
  50. library lib_boxlib,     'box_lib.obj'
  51.  
  52. import lib_boxlib, \
  53.         edit_box_draw, 'edit_box' , \
  54.         edit_box_key, 'edit_box_key' , \
  55.         edit_box_mouse, 'edit_box_mouse', \
  56.         edit_box_set_text, 'edit_box_set_text' , \
  57.         init_checkbox2,  'init_checkbox2' , \
  58.         check_box_draw2, 'check_box_draw2' , \
  59.         check_box_mouse2, 'check_box_mouse2' , \
  60.         option_box_draw,  'option_box_draw' , \
  61.         option_box_mouse, 'option_box_mouse' , \
  62.         scroll_bar_vertical_draw, 'scrollbar_ver_draw' , \
  63.         scroll_bar_vertical_mouse, 'scrollbar_ver_mouse' , \
  64.         scroll_bar_horizontal_draw, 'scrollbar_hor_draw' , \
  65.         scroll_bar_horizontal_mouse, 'scrollbar_hor_mouse' , \
  66.         dinamic_button_draw, 'dbutton_draw' , \
  67.         dinamic_button_mouse, 'dbutton_mouse' , \
  68.         menu_bar_draw, 'menu_bar_draw' , \
  69.         menu_bar_mouse, 'menu_bar_mouse' , \
  70.         menu_bar_activate, 'menu_bar_activate' , \
  71.         fb_draw_panel, 'filebrowser_draw' , \
  72.         fb_mouse, 'filebrowser_mouse' , \
  73.         fb_key, 'filebrowser_key' , \
  74.         tl_data_init, 'tl_data_init' , \
  75.         tl_data_clear, 'tl_data_clear' , \
  76.         tl_info_clear, 'tl_info_clear' , \
  77.         tl_key, 'tl_key' , \
  78.         tl_mouse, 'tl_mouse' , \
  79.         tl_draw, 'tl_draw' , \
  80.         tl_info_undo, 'tl_info_undo' , \
  81.         tl_info_redo, 'tl_info_redo' , \
  82.         tl_node_add, 'tl_node_add' , \
  83.         tl_node_set_data, 'tl_node_set_data' , \
  84.         tl_node_get_data, 'tl_node_get_data' , \
  85.         tl_node_delete, 'tl_node_delete' , \
  86.         tl_cur_beg, 'tl_cur_beg' , \
  87.         tl_cur_next, 'tl_cur_next' , \
  88.         tl_cur_perv, 'tl_cur_perv' , \
  89.         tl_node_close_open, 'tl_node_close_open' , \
  90.         tl_node_lev_inc, 'tl_node_lev_inc' , \
  91.         tl_node_lev_dec, 'tl_node_lev_dec' , \
  92.         tl_node_move_up, 'tl_node_move_up' , \
  93.         tl_node_move_down, 'tl_node_move_down' , \
  94.         tl_node_poi_get_info, 'tl_node_poi_get_info' , \
  95.         tl_node_poi_get_next_info, 'tl_node_poi_get_next_info' , \
  96.         tl_node_poi_get_data, 'tl_node_poi_get_data' , \
  97.         tl_save_mem, 'tl_save_mem' , \
  98.         tl_load_mem, 'tl_load_mem' , \
  99.         tl_get_mem_size, 'tl_get_mem_size' , \
  100.         path_show_prepare, 'pathshow_prepare' , \
  101.         path_show_draw, 'pathshow_draw' , \
  102.         ted_but_sumb_upper, 'ted_but_sumb_upper' , \
  103.         ted_but_sumb_lover, 'ted_but_sumb_lover' , \
  104.         ted_but_convert_by_table, 'ted_but_convert_by_table' , \
  105.         ted_can_save, 'ted_can_save' , \
  106.         ted_clear, 'ted_clear' , \
  107.         ted_delete, 'ted_delete' , \
  108.         ted_draw, 'ted_draw' , \
  109.         ted_init, 'ted_init' , \
  110.         ted_init_scroll_bars, 'ted_init_scroll_bars' , \
  111.         ted_init_syntax_file, 'ted_init_syntax_file' , \
  112.         ted_is_select, 'ted_is_select' , \
  113.         ted_key, 'ted_key' , \
  114.         ted_mouse, 'ted_mouse' , \
  115.         ted_open_file, 'ted_open_file' , \
  116.         ted_save_file, 'ted_save_file' , \
  117.         ted_text_add, 'ted_text_add' , \
  118.         ted_but_select_word, 'ted_but_select_word' , \
  119.         ted_but_cut, 'ted_but_cut' , \
  120.         ted_but_copy, 'ted_but_copy' , \
  121.         ted_but_paste, 'ted_but_paste' , \
  122.         ted_but_undo, 'ted_but_undo' , \
  123.         ted_but_redo, 'ted_but_redo' , \
  124.         ted_but_reverse, 'ted_but_reverse' , \
  125.         ted_but_find_next, 'ted_but_find_next' , \
  126.         ted_text_colored, 'ted_text_colored' , \
  127.         frame_draw, 'frame_draw' , \
  128.         progressbar_draw,'progressbar_draw' , \
  129.         progressbar_progress, 'progressbar_progress'
  130.        
  131. public edit_box_draw as '_edit_box_draw'
  132. public edit_box_key as '_edit_box_key'
  133. public edit_box_mouse as '_edit_box_mouse'
  134.  
  135. public check_box_draw2 as '_check_box_draw2'
  136. public check_box_mouse2 as '_check_box_mouse2'
  137.  
  138. public progressbar_draw as '_progressbar_draw'
  139. public progressbar_progress as '_progressbar_progress'
  140.  
  141. public frame_draw as '_frame_draw'
  142.