Subversion Repositories Kolibri OS

Rev

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