Subversion Repositories Kolibri OS

Rev

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

  1. #include <menuet/os.h>
  2.  
  3. void __menuet__define_window(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,
  4.      __u32 body_color,__u32 grab_color,__u32 frame_color)
  5. {
  6.  __u32 a,b;
  7.  a=(x1<<16)|xsize;
  8.  b=(y1<<16)|ysize;
  9.  __asm__ __volatile__("int $0x40"::"a"(0),"b"(a),"c"(b),"d"(body_color),"S"(grab_color),
  10.                       "D"(frame_color));
  11. }
  12.  
  13. void __menuet__window_redraw(int status)
  14. {
  15.  __asm__ __volatile__("int $0x40"::"a"(12),"b"(status));
  16. }
  17.  
  18. void __menuet__putimage(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,char * image)
  19. {
  20.  __u32 a,b;
  21.  a=(xsize<<16)|ysize;
  22.  b=(x1<<16)|y1;
  23.  __asm__ __volatile__("int $0x40"::"a"(7),"b"(image),"c"(a),"d"(b));
  24. }
  25.  
  26. int __menuet__getkey(void)
  27. {
  28.  __u16 __ret;
  29.  __asm__ __volatile__("int $0x40":"=a"(__ret):"0"(2));
  30.  if(!(__ret & 0xFF)) return (__ret>>8)&0xFF; else return 0;
  31. }
  32.  
  33.  
  34. int __menuet__check_for_event(void)
  35. {
  36.  __u32 __ret;
  37.  __asm__ __volatile__("int $0x40":"=a"(__ret):"0"(11));
  38.  return __ret;
  39. }
  40.