Subversion Repositories Kolibri OS

Rev

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

  1. #include<menuet/os.h>
  2.  
  3. void __menuet__make_button(__u16 x1,__u16 y1,__u16 xsize,__u16 ysize,
  4.                            int id,__u32 color)
  5. {
  6.  __u32 a,b;
  7.  a=(x1<<16)|xsize;
  8.  b=(y1<<16)|ysize;
  9.  __asm__ __volatile__("int $0x40"::"a"(8),"b"(a),"c"(b),"d"(id),"S"(color));
  10. }
  11.  
  12. int __menuet__get_button_id(void)
  13. {
  14.  __u16 __ret;
  15.  __asm__ __volatile__("int $0x40":"=a"(__ret):"0"(17));
  16.  if((__ret & 0xFF)==0) return (__ret>>8)&0xFF; else return -1;
  17. }
  18.