Subversion Repositories Kolibri OS

Rev

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

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