Subversion Repositories Kolibri OS

Rev

Rev 205 | Blame | Last modification | View Log | Download | RSS feed

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