Subversion Repositories Kolibri OS

Rev

Rev 5676 | Rev 6678 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. //BOX_LIB - Asper
  2. #ifndef INCLUDE_BOX_LIB_H
  3. #define INCLUDE_BOX_LIB_H
  4. #print "[include <obj/box_lib.h>]\n"
  5.  
  6. #ifndef INCLUDE_KOLIBRI_H
  7. #include "../lib/kolibri.h"
  8. #endif
  9.  
  10. #ifndef INCLUDE_DLL_H
  11. #include "../lib/dll.h"
  12. #endif
  13.  
  14. dword boxlib = #aEdit_box_lib;
  15. char aEdit_box_lib[]="/sys/lib/box_lib.obj";
  16.  
  17. dword box_lib_init   = #aboxlib_init;
  18.  
  19. dword edit_box_draw  = #aEdit_box_draw;
  20. dword edit_box_key   = #aEdit_box_key;
  21. dword edit_box_mouse = #aEdit_box_mouse;
  22. dword version_ed     = #aVersion_ed;
  23.  
  24. dword menu_bar_draw             = #aMenu_bar_draw;
  25. dword menu_bar_activate         = #aMenu_bar_activate;
  26. dword menu_bar_mouse            = #aMenu_bar_mouse;
  27. dword version_menu_bar          = #aVersion_menu_bar;
  28.  
  29. dword scrollbar_v_draw  = #aScrollbar_v_draw;
  30. dword scrollbar_v_mouse = #aScrollbar_v_mouse;
  31. dword scrollbar_h_draw  = #aScrollbar_h_draw;
  32. dword scrollbar_h_mouse = #aScrollbar_h_mouse;
  33. dword version_scrollbar = #aVersion_scrollbar;
  34.  
  35. dword PathShow_prepare = #aPathShow_prepare;
  36. dword PathShow_draw    = #aPathShow_draw;
  37.  
  38. dword progressbar_draw = #aProgressbar_draw;
  39. dword progressbar_progress = #aProgressbar_progress;
  40.  
  41. dword check_box_draw = #aCheck_box_draw;
  42. dword check_box_mouse = #aCheck_box_mouse;
  43. dword version_ch = #aVersion_ch;
  44.  
  45. dword frame_draw = #aFrame_draw;
  46.  
  47. $DD 2 dup 0
  48.  
  49. char aEdit_box_draw []    = "edit_box";
  50. char aEdit_box_key  []    = "edit_box_key";
  51. char aEdit_box_mouse[]    = "edit_box_mouse";
  52. char aVersion_ed    []    = "version_ed";
  53.  
  54. char aMenu_bar_draw    []    = "menu_bar_draw";
  55. char aMenu_bar_activate[]    = "menu_bar_activate";
  56. char aMenu_bar_mouse   []    = "menu_bar_mouse";
  57. char aVersion_menu_bar []    = "version_menu_bar";
  58.  
  59. char aboxlib_init[]        = "lib_init";
  60. char aScrollbar_v_draw [] = "scrollbar_v_draw";
  61. char aScrollbar_v_mouse[] = "scrollbar_v_mouse";
  62. char aScrollbar_h_draw [] = "scrollbar_h_draw";
  63. char aScrollbar_h_mouse[] = "scrollbar_h_mouse";
  64. char aVersion_scrollbar[] = "version_scrollbar";
  65.  
  66. char aCheck_box_draw   [] = "check_box_draw2";
  67. char aCheck_box_mouse  [] = "check_box_mouse2";
  68. char aVersion_ch       [] = "version_ch2";
  69.  
  70. char aOption_box_draw  [] = "option_box_draw";
  71. char aOption_box_mouse [] = "option_box_mouse";
  72. char aVersion_op       [] = "version_op" ;
  73.  
  74. char aPathShow_prepare [] = "PathShow_prepare";
  75. char aPathShow_draw    [] = "PathShow_draw";
  76.  
  77. char aProgressbar_draw  [] = "progressbar_draw";
  78. char aProgressbar_progress[] = "progressbar_progress";
  79.  
  80. char aFrame_draw[] = "frame_draw";
  81.  
  82.  
  83. struct PathShow_data
  84. {
  85. dword type;
  86. word start_y,
  87.         start_x,
  88.         font_size_x,    // 6 - for font 0, 8 - for font 1
  89.         area_size_x;
  90. dword font_number,  // 0 - monospace, 1 - variable
  91.         background_flag,
  92.         font_color,
  93.         background_color,
  94.         text_pointer,
  95.         work_area_pointer,
  96.         temp_text_length;
  97. };
  98. /*
  99. char temp[128];
  100. PathShow_data PathShow = {0, 100,20, 6, 200, 0, 1, 0x0, 0xFFFfff, #email_text, #temp, 0};
  101. PathShow_prepare stdcall(#PathShow);
  102. PathShow_draw stdcall(#PathShow);
  103. */
  104.  
  105. struct menu_data
  106. {
  107.         dword type;
  108.        
  109.         word size_x;
  110.         word start_x;
  111.        
  112.         word size_y;
  113.         word start_y;
  114.         dword text_pointer;
  115.         dword pos_pointer;
  116.         dword text_end;
  117.         dword mouse_pos;
  118.         dword mouse_keys;
  119.        
  120.         word size_x1;
  121.         word start_x1;
  122.        
  123.         word size_y1;
  124.         word start_y1;
  125.         dword bckg_col;
  126.         dword frnt_col;
  127.         dword menu_col;
  128.         dword select;
  129.         dword out_select;
  130.         dword buf_adress;
  131.         dword procinfo;
  132.         dword click;
  133.         dword cursor;
  134.         dword cursor_old;
  135.         dword interval;
  136.         dword cursor_max;
  137.         dword extended_key;
  138.         dword menu_sel_col;
  139.         dword bckg_text_col;
  140.         dword frnt_text_col;
  141.         dword mouse_keys_old;
  142.         dword font_height;
  143.         dword cursor_out;
  144.         dword get_mouse_flag;
  145. };
  146.  
  147. struct edit_box{
  148. dword width,
  149.         left,
  150.         top,
  151.         color,
  152.         shift_color,
  153.         focus_border_color,
  154.         blur_border_color,
  155.         text_color,
  156.         max,
  157.         text,
  158.         mouse_variable,
  159.         flags,
  160.         size,
  161.         pos,
  162.         offset,
  163.         cl_curs_x,
  164.         cl_curs_y,
  165.         shift,
  166.         shift_old;
  167. };
  168.  
  169. struct checkbox2
  170. {
  171.   dword
  172.         left_s,
  173.         top_s,
  174.         ch_text_margin,
  175.         color,
  176.         border_color,
  177.         text_color,
  178.         text,
  179.         flags,
  180.         size_of_str;
  181. };
  182.  
  183. //flags for checkbox2
  184. #define CH_FLAG_EN 10b      
  185. #define CH_FLAG_TOP 0x0    
  186. #define CH_FLAG_MIDDLE 100b
  187. #define CH_FLAG_BOTTOM 1000b
  188.  
  189. struct scroll_bar
  190. {
  191.         word size_x,
  192.         start_x,
  193.         size_y,
  194.         start_y;
  195.         dword btn_height,
  196.         type,
  197.         max_area,
  198.         cur_area,
  199.         position,
  200.         bckg_col,
  201.         frnt_col,
  202.         line_col,
  203.         redraw;
  204.         word delta,
  205.         delta2,
  206.         r_size_x,
  207.         r_start_x,
  208.         r_size_y,
  209.         r_start_y;
  210.         dword m_pos,
  211.         m_pos_2,
  212.         m_keys,
  213.         run_size,
  214.         position2,
  215.         work_size,
  216.         all_redraw,
  217.         ar_offset;
  218. };
  219.  
  220. struct progress_bar
  221. {
  222.   dword
  223.         value,
  224.         left,
  225.         top,
  226.         width,
  227.         height,
  228.         style,
  229.         min,
  230.         max,
  231.         back_color,
  232.         progress_color,
  233.         frame_color;
  234. };
  235.  
  236. struct frame
  237. {
  238.         dword type;
  239.         word size_x;                  
  240.         word start_x;                
  241.         word size_y;                  
  242.         word start_y;                
  243.         dword ext_col;            
  244.         dword int_col;            
  245.         dword draw_text_flag;  // 0-not,1-yes
  246.         dword text_pointer;          
  247.         dword text_position;   //  0-up,1-bottom
  248.         dword font_number;     //  0-monospace,1-variable
  249.         dword font_size_y;          
  250.         dword font_color;            
  251.         dword font_backgr_color;
  252. };    
  253.  
  254. #endif