home *** CD-ROM | disk | FTP | other *** search
/ Prima Shareware 3 / DuCom_Prima-Shareware-3_cd1.bin / PROGRAMO / C / APPSR / APPDLL / APPLIB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-10  |  2.9 KB  |  118 lines

  1. /* applib.h */
  2.  
  3. #define INI_SYSTEM    "System"
  4. #define INI_BUTTON    "Buttons"
  5. #define INI_SOUND    "Sounds"
  6. #define INI_SHELL    "Shell"
  7. #define INI_FILE    "appbar.ini"
  8.  
  9. #define LEFT        "Left"
  10. #define TOP        "Top"
  11. #define COLUMNS        "Columns"
  12. #define BUTTONS     "Buttons"
  13. #define CLOSEALL    "CloseAll"
  14. #define STAYINFRONT    "StayInFront"
  15. #define INITIALIZED    "Initialized"
  16. #define BIGBUTTONS    "BigButtons"
  17. #define DOUBLECLICK    "DoubleClick"
  18. #define BORDER        "Border"
  19. #define DEFAULTICONDIR    "DefaultIconDir"
  20. #define SHELLGROUP    "ShellGroup"
  21.  
  22. #define SOUNDENABLE    "SoundEnable"
  23. #define APPSTART    "AppBarStart"
  24. #define APPEXIT     "AppBarExit"
  25. #define WINEXIT     "WindowsExit"
  26. #define PROGSTART    "ProgramStart"
  27. #define PROGCLOSE    "ProgramClose"
  28. #define DROPFILE    "DropFile"
  29. #define ERRORMESSAGE    "ErrorMessage"
  30. #define SOUNDDIR    "SoundDirectory"
  31.  
  32. #define LEFT_DEFAULT        -1
  33. #define TOP_DEFAULT        -1
  34. #define COLUMNS_DEFAULT        1
  35. #define BUTTONS_DEFAULT     8
  36. #define CLOSEALL_DEFAULT    1
  37. #define NOSOUND_DEFAULT     0
  38. #define CLOSEPROG_DEFAULT   1
  39. #define SHOWMODE_DEFAULT    0
  40. #define STAYINFRONT_DEFAULT 0
  41. #define INITIALIZED_DEFAULT 0
  42. #define ICONNUMBER_DEFAULT  0
  43. #define BUTTONLOOK_DEFAULT  0
  44. #define BIGBUTTONS_DEFAULT  0
  45. #define DOUBLECLICK_DEFAULT 0
  46. #define BORDER_DEFAULT        0
  47. #define SHELLGROUP_DEFAULT  "startup.grp"
  48.  
  49. #define SOUNDENABLE_DEFAULT    0
  50. #define APPSTART_DEFAULT    "<none>"
  51. #define APPEXIT_DEFAULT        "<none>"
  52. #define WINEXIT_DEFAULT        "<none>"
  53. #define PROGSTART_DEFAULT    "<none>"
  54. #define PROGCLOSE_DEFAULT    "<none>"
  55. #define DROPFILE_DEFAULT    "<none>"
  56. #define ERRORMESSAGE_DEFAULT    "<none>"
  57. #define SOUNDDIR_DEFAULT    " "
  58.  
  59. #define MAXFILECHARS    81
  60. #define MAXDIGITS    5
  61. #define NUMICONS    4
  62. #define NUMEDITS    3
  63. #define MAXBUTTONS    49
  64. #define MAXAPPS     (MAXBUTTONS-1)
  65. #define MAXRES        1280
  66. #define MAXBORDER    15
  67.  
  68. #define APPBARVERSION    400
  69. #define APPBAR4        400
  70.  
  71. typedef enum {NOTALIVE = FALSE, ALIVE = TRUE} STATUS;
  72.  
  73. typedef struct {
  74.     char    IcoName[MAXFILECHARS];
  75.     char    ProgName[MAXFILECHARS];
  76.     char    StartDir[MAXFILECHARS];
  77.     char    Params[MAXFILECHARS];
  78.     HWND    hWndApp;
  79.     int    IconNumber;
  80.     BOOL    ButtonLook;
  81.     STATUS    ProgStatus;
  82.     BOOL    Close;
  83.     short    ShowMode;
  84.     BOOL    NoSound;
  85.     } APPBARBUTTONS;
  86.  
  87. typedef struct {
  88.     short    Left;
  89.     short    Top;
  90.     int    Columns;
  91.     int    Buttons;
  92.     BOOL    CloseAll;
  93.     BOOL    StayInFront;
  94.     int    Initialized;
  95.     BOOL    BigButtons;
  96.     BOOL    DoubleClick;
  97.     int    Border;
  98.     char    DefaultIconDir[MAXFILECHARS];
  99.     char    ShellGroup[8*MAXFILECHARS];
  100.     } APPSYSTEM;
  101.  
  102. typedef struct {
  103.     BOOL    EnableSound;
  104.     char    AppBarStart[MAXFILECHARS];
  105.     char    AppBarExit[MAXFILECHARS];
  106.     char    WindowsExit[MAXFILECHARS];
  107.     char    ProgramStart[MAXFILECHARS];
  108.     char    ProgramClose[MAXFILECHARS];
  109.     char    DropFile[MAXFILECHARS];
  110.     char    ErrorMessage[MAXFILECHARS];
  111.     char    SoundDirectory[MAXFILECHARS];
  112.     } APPSOUND;
  113.  
  114. int temp;
  115.  
  116. #define WITHIN(val, min, max)      (((temp=val) > max ? max : (temp < min) ? min : temp))
  117. #define ONEORZERO(val)          WITHIN((BOOL)val, 0, 1)
  118.