Subversion Repositories Kolibri OS

Rev

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

  1. ;--- ¤à㣨¥ ¬ ªà®áë ---
  2. include '../../../develop/examples/editbox/trunk/editbox.inc'
  3. ;include 'editbox.inc'
  4. include 'txtbut.inc'
  5. ;include 'gp.inc'
  6. ;include 'label.inc'
  7. ;include 'checkbox.inc'
  8. ;include 'file_sys.inc'
  9. ;include 'textwork.inc'
  10. ;include 'ini.inc'
  11.  
  12. ;--- § £®«®¢®ª ---
  13. macro meos_header par_buf,cur_dir_buf
  14. {
  15.         use32
  16.         org     0x0
  17.  
  18.         db      'MENUET01'
  19.         dd      0x01
  20.         dd      __app_start
  21.         dd      __app_end
  22.         dd      __app_end
  23.         dd      __app_end
  24. if <par_buf> eq <>
  25.         dd      0x0
  26. else
  27.         dd      par_buf
  28. end if
  29. if <cur_dir_buf> eq <>
  30.         dd      0x0
  31. else
  32.         dd      cur_dir_buf
  33. end if
  34. }
  35.  
  36. ;--- ®¯à¥¤¥«¨âì â®çªã ¢å®¤  ---
  37. macro app_start
  38. {
  39. __app_start:
  40. }
  41.  
  42. ;--- ®¯à¥¤¥«¨âì ª®­¥æ ¯à¨«®¦¥­¨ï ¨ à §¬¥à á⥪  ---
  43. macro app_end stack_size
  44. {
  45. if <stack_size> eq <>
  46.         rb      1024
  47. else
  48.         rb      stack_size
  49. end if
  50. __app_end:
  51. }
  52.  
  53. ;--- § ¢¥àè¨âì ⥪ã騩 ¯®â®ª ---
  54. macro app_close
  55. {
  56.         xor     eax,eax
  57.         dec     eax
  58.         int     0x40
  59. }
  60.  
  61. ;--- ¯®«ãç¨âì ª®¤ ­ ¦ â®© ª« ¢¨è¨ ---
  62. macro get_key
  63. {
  64.         mov     eax,2
  65.         int     0x40
  66. }
  67.  
  68. ;--- ¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨ ---
  69. macro get_pressed_button
  70. {
  71.         mov     eax,17
  72.         int     0x40
  73. }
  74.  
  75. ;--- á®®¡é¨âì á¨á⥬¥ ® ­ ç «¥ ¯¥à¥à¨á®¢ª¨ ®ª­  ---
  76. macro start_draw_window
  77. {
  78.         mov     eax,12
  79.         xor     ebx,ebx
  80.         inc     ebx
  81.         int     0x40
  82. }
  83.  
  84. ;--- á®®¡é¨âì á¨á⥬¥ ® § ¢¥à襭¨¨ ¯¥à¥à¨á®¢ª¨ ®ª­  ---
  85. macro stop_draw_window
  86. {
  87.         mov     eax,12
  88.         mov     ebx,2
  89.         int     0x40
  90. }
  91.  
  92. ;--- ãáâ ­®¢¨âì ¬ áªã ®¦¨¤ ¥¬ëå ᮡë⨩ ---
  93. macro set_events_mask mask
  94. {
  95.         mov     eax,40
  96.         mov     ebx,mask
  97.         int     0x40
  98. }
  99.  
  100. ;--- ¯®«ãç¨âì ¨­ä®à¬ æ¨î ® ¯à®æ¥áᥠ---
  101. macro get_procinfo proc_inf_buf,slot_num
  102. {
  103.         mov     eax,9
  104.         mov     ebx,proc_inf_buf
  105. if <slot_num> eq <>
  106.         xor     ecx,ecx
  107.         dec     ecx
  108. else
  109.         mov     ecx,slot_num
  110. end if
  111.         int     0x40
  112. }
  113.  
  114. macro get_sys_colors col_buf
  115. {
  116.         mov     eax,48
  117.         mov     ebx,3
  118.         mov     ecx,col_buf
  119.         mov     edx,40
  120.         int     0x40
  121. }
  122.  
  123. macro get_grab_area
  124. {
  125.         mov     eax,48
  126.         mov     ebx,7
  127.         int     0x40
  128. }
  129.  
  130. macro get_skin_height
  131. {
  132.         mov     eax,48
  133.         mov     ebx,4
  134.         int     0x40
  135. }
  136.  
  137. macro min_window
  138. {
  139.         mov     eax,18
  140.         mov     ebx,10
  141.         int     0x40
  142. }
  143.  
  144. macro activ_window slot_n
  145. {
  146.         mov     eax,18
  147.         mov     ebx,3
  148. if <slot_n> eq <>
  149. else
  150.         mov     ecx,slot_n
  151. end if
  152.         int     0x40
  153. }
  154.  
  155. macro get_active_window
  156. {
  157.         mov     eax,18
  158.         mov     ebx,7
  159.         int     0x40
  160. }
  161.  
  162. macro delay time
  163. {
  164.         mov     eax,5
  165. if <time> eq <>
  166. else
  167.         mov     ebx,time
  168. end if
  169.         int     0x40
  170. }
  171.  
  172. ;--- ®¦¨¤ âì ᮡëâ¨ï ---
  173. macro wait_event redraw,key,button,mouse,ipc,other
  174. {
  175.         mov     eax,10
  176.         int     0x40
  177.         dec     ax
  178. if <redraw> eq <>
  179. else
  180.         jz      redraw
  181. end if
  182.         dec     ax
  183. if <key> eq <>
  184. else
  185.         jz      key
  186. end if
  187.         dec     ax
  188. if <button> eq <>
  189. else
  190.         jz      button
  191. end if
  192.         dec     ax
  193.         dec     ax
  194.         dec     ax
  195. if <mouse> eq <>
  196. else
  197.         jz      mouse
  198. end if
  199. if <ipc> eq <>
  200. else
  201.         dec     ax
  202.         jz      ipc
  203. end if
  204. if <other> eq <>
  205.         jmp     still
  206. else
  207.         jmp     other
  208. end if
  209. }
  210.  
  211. ;--- ¯®«ãç¨âì à §¬¥àë íªà ­  ---
  212. macro get_screen_size
  213. {
  214.         mov     eax,14
  215.         int     0x40
  216. }
  217.  
  218. macro get_screen_prop  struc_ptr
  219. {
  220.         mov     eax,61
  221.         push    eax eax
  222.         xor     ebx,ebx
  223.         inc     ebx
  224.         int     0x40
  225.         mov     [struc_ptr],eax
  226.         pop     eax
  227.         inc     ebx
  228.         int     0x40
  229.         mov     [struc_ptr+4],ax
  230.         pop     eax
  231.         inc     ebx
  232.         int     0x40
  233.         mov     [struc_ptr+6],eax
  234. }
  235.  
  236. macro resize_mem mem_size
  237. {
  238.         mov     eax,64
  239.         xor     ebx,ebx
  240.         inc     ebx
  241. if <mem_size> eq <>
  242. else
  243.         mov     ecx,mem_size
  244. end if
  245.         int     0x40
  246. }
  247.  
  248. evm_redraw equ 1
  249. evm_key equ 10b
  250. evm_button equ 100b
  251. evm_mouse equ 100000b
  252. evm_ipc equ 1000000b
  253.  
  254. struc procinfo
  255. {
  256. .takts_per_second: dd ?
  257. .window_stack_pos: dw ?
  258. .slot_number: dw ?
  259. dw ?
  260. .name: rb 11
  261. .align: db ?
  262. .addres: dd ?
  263. .use_mem: dd ?
  264. .pid: dd ?
  265. .left: dd ?
  266. .top: dd ?
  267. .width: dd ?
  268. .height: dd ?
  269. .slot_state: dw ?
  270. rb (1024-56)
  271. }
  272.  
  273. struc sys_color_table
  274. {
  275. .frames: dd ?  ;+0
  276. .grab: dd ?    ;+4
  277. .grab_button: dd ? ;+8
  278. .grab_button_text: dd ?  ;+12
  279. .grab_text: dd ?  ;+16
  280. .work: dd ?       ;+20
  281. .work_button: dd ?;+24
  282. .work_button_text: dd ? ;+28
  283. .work_text: dd ?        ;+32
  284. .work_graph: dd ?       ;+36
  285. }
  286.  
  287. struc screen_size
  288. {
  289. .height: dw ?
  290. .width: dw ?
  291. }
  292.  
  293. struc screen_prop
  294. {
  295. .height: dw ? ;+0
  296. .width: dw ?  ;+2
  297. .bitspp: dw ? ;+4
  298. .bytesps: dd ?;+6
  299. }
  300.  
  301. struc ipc_buffer size
  302. {
  303. .block: dd ?
  304. .in_use: dd ?
  305. .messages: rb size
  306. }
  307.  
  308. ;--- æ¢¥â  ---
  309. cl_white=0xffffff
  310. cl_black=0x000000