home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / boopsi / appiconclass / include / appiconclass.h
C/C++ Source or Header  |  1977-12-31  |  2KB  |  69 lines

  1. /*
  2. **
  3. ** $VER: AppIconClass.lib 1.0 (17.9.95) Doguet Emmanuel
  4. **
  5. **
  6. ** C Header for the AppIcon Class.
  7. **
  8. ** Allow to create/manage many AppIcons/AppMenus
  9. **
  10. ** For use with Intuition, BGUI..
  11. **
  12. **
  13. **
  14. **          (C) Copyright 1995 Doguet Emmanuel
  15. **          All  Rights Reserved.
  16. **
  17. **/
  18.  
  19. #ifndef APPICONCLASS_H
  20. #define APPICONCLASS_H
  21.  
  22. #include <exec/types.h>
  23. #include <exec/memory.h>
  24.  
  25. #ifndef INTUITION_CLASSES_H
  26. #include <intuition/classes.h>
  27. #endif
  28.  
  29. #ifndef INTUITION_GADGETCLASS_H
  30. #include <intuition/gadgetclass.h>
  31. #endif
  32.  
  33. /*
  34. **      Macros
  35. **/
  36. #define APP_CLICKED( AppMsg )       ( AppMsg->am_NumArgs ? FALSE:TRUE )
  37. #define APP_NUMARGS( AppMsg )       ( AppMsg->am_NumArgs )
  38.  
  39. #define APP_IS_FILE( WBArg )        ( WBArg->wa_Lock && WBArg->wa_Name[0] )
  40. #define APP_IS_DIR( WBArg )         ( WBArg->wa_Lock && !WBArg->wa_Name[0] )
  41.  
  42.  
  43. /* Tags */
  44. #define AIC_TB              (TAG_USER+0x30000)
  45.  
  46. #define AIC_AppName         (AIC_TB+1)              /* I---- */
  47. #define AIC_ErrorCode       (AIC_TB+2)              /* I---- */
  48. #define AIC_IconFileName    (AIC_TB+3)              /* I---- */
  49. #define AIC_AppIconMask     (AIC_TB+4)              /* --G-- */
  50. #define AIC_AppMenuItem     (AIC_TB+5)              /* I---- */
  51. #define AIC_AppIconX        (AIC_TB+6)              /* I---- */
  52. #define AIC_AppIconY        (AIC_TB+7)              /* I---- */
  53.  
  54. /*
  55. **      Possible errors
  56. **/
  57. #define AICERR_CANT_CREATE_MSGPORT  (1L)
  58. #define AICERR_CANT_GET_DISKOBJECT  (2L)
  59. #define AICERR_OUT_OF_MEMORY        (3L)
  60.  
  61. /*
  62. **  Class routine protos
  63. **/
  64. extern Class *InitAppIconClass( void );
  65. extern BOOL FreeAppIconClass( Class *cl );
  66.  
  67. #endif
  68.  
  69.