home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Pascal / MAXONPASCAL2.DMS / in.adf / INCLUDE / intuition / intuition_Functions.h < prev    next >
Encoding:
Text File  |  1994-07-25  |  1.4 KB  |  71 lines

  1. {$if not def INTUITION_INTUITION_MACROS_H} CONST INTUITION_INTUITION_MARCOS_H=0;
  2.  
  3. { ***********************************************************************
  4.   ** KickPascal-Include-Datei "intuition/intuition.h" zu Kickstart 3.0 **
  5.   ** Ergänzung der MACROs als Pascal FUNCTIONen                  by JS **
  6.   *********************************************************************** }
  7.  
  8. {$if not def INTUITION_INTUITION_H;incl "intuition/intuition.h";endif}
  9.  
  10. function MENUNUM(n:Integer):Integer;
  11. begin
  12.  MENUNUM:=n and $1f;
  13. end;
  14.  
  15. function ITEMNUM(n:Integer):Integer;
  16. begin
  17.  ITEMNUM:=(n shr 5)and $3f;
  18. end;
  19.  
  20. function SUBNUM(n:Integer):Integer;
  21. begin
  22.  SUBNUM:=(n shr 11) and $1f;
  23. end;
  24.  
  25. function SHIFTMENU(n:Integer):Integer;
  26. begin
  27.  SHIFTMENU:=n and $1f;
  28. end;
  29.  
  30. function SHIFTITEM(n:Integer):Integer;
  31. begin
  32.  SHIFTITEM:=(n and $4f) shl 5;
  33. end;
  34.  
  35. function SHIFTSUB(n:Integer):Integer;
  36. begin
  37.  SHIFTSUB:=(n and $1f) shl 11;
  38. end;
  39.  
  40. function FULLMENUNUM(menu,item,sub:Integer):Integer;
  41. begin
  42.  FULLMENUNUM:=SHIFTSUB(sub) or SHIFTITEM(item) or SHIFTMENU(menu);
  43. end;
  44.  
  45. function SRBNUM(n:Integer):Integer;
  46. begin
  47.  SRBNUM:=$08-(n shr 4);
  48. end;
  49.  
  50. function SWBNUM(n:Integer):Integer;
  51. begin
  52.  SWBNUM:=$08-(n and $0f);
  53. end;
  54.  
  55. function SSBNUM(n:Integer):Integer;
  56. begin
  57.  SSBNUM:=$01+(n shr 4);
  58. end;
  59.  
  60. function SPARNUM(n:Integer):Integer;
  61. begin
  62.  SPARNUM:=n shr 4;
  63. end;
  64.  
  65. function SHAKNUM(n:Integer):Integer;
  66. begin
  67.  SHAKNUM:=n and $0f;
  68. end;
  69.  
  70. {$endif}
  71.