lwhost.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /*
  2. * LWSDK Header File
  3. * Copyright 1999, NewTek, Inc.
  4. *
  5. * LWHOST.H -- LightWave Host Services
  6. *
  7. * This header contains the declarations for globals provided by all
  8. * LightWave host applications.
  9. */
  10. #ifndef LWSDK_HOST_H
  11. #define LWSDK_HOST_H
  12. #include <lwdialog.h>
  13. /*
  14. * File Request Function. This function is returned as the "File Request"
  15. * global service. It gets a simple filename from the user.
  16. */
  17. #define LWFILEREQFUNC_GLOBAL "File Request"
  18. typedef int LWFileReqFunc (const char *hail, char *name,
  19. char *path, char *fullName, int buflen);
  20. /*
  21. * File Request Activate Function. This function is returned as the
  22. * "File Request 2" global service. It takes a file request local struct
  23. * and version number and returns the activation code directly.
  24. */
  25. #define LWFILEACTIVATEFUNC_GLOBAL "File Request 2"
  26. typedef int LWFileActivateFunc (int version, LWFileReqLocal *);
  27. /*
  28. * Color Picker Activate Function. This function is returned as the
  29. * "Color Picker" global service. It takes a color picker local struct
  30. * and version number and returns the activation code directly.
  31. */
  32. #define LWCOLORACTIVATEFUNC_GLOBAL "Color Picker"
  33. typedef int LWColorActivateFunc (int version, LWColorPickLocal *);
  34. /*
  35. * File Type Function. This function is returned as the "File Type Pattern"
  36. * global service. It returns filename pattern strings given file type
  37. * code strings.
  38. */
  39. #define LWFILETYPEFUNC_GLOBAL "File Type Pattern"
  40. typedef const char *
  41. LWFileTypeFunc (const char *);
  42. /*
  43. * Directory Function. This function is returned as the "Directory Info"
  44. * global service. It returns filename pattern strings given file type
  45. * code strings.
  46. */
  47. #define LWDIRINFOFUNC_GLOBAL "Directory Info"
  48. typedef const char *
  49. LWDirInfoFunc (const char *);
  50. /*
  51. * These file type code strings are recognized by the File Type and Directory Info
  52. * Functions. They correspond with the current configuration for the system.
  53. */
  54. #define LWFTYPE_ANIMATION "Animations"
  55. #define LWFTYPE_IMAGE "Images"
  56. #define LWFTYPE_ENVELOPE "Envelopes"
  57. #define LWFTYPE_MOTION "Motions"
  58. #define LWFTYPE_OBJECT "Objects"
  59. #define LWFTYPE_PLUGIN "Plug-ins"
  60. #define LWFTYPE_PREVIEW "Previews"
  61. #define LWFTYPE_PSFONT "PSFonts"
  62. #define LWFTYPE_SCENE "Scenes"
  63. #define LWFTYPE_SETTING "Settings"
  64. #define LWFTYPE_SURFACE "Surfaces"
  65. /****
  66. * Message Functions. This block of functions is returned as the
  67. * "Info Messages 2" global service. They display various info
  68. * and other confirmation dialogs to the user.
  69. * The return codes are as follows:
  70. * OKCancel ok(1) cancel(0)
  71. * YesNo yes(1) no(0)
  72. * YesNoCancel yes(2) no(1) cancel(0)
  73. * YesNoAll yesAll(3) yes(2) no(1) cancel(0)
  74. ****
  75. */
  76. #define LWMESSAGEFUNCS_GLOBAL "Info Messages 2"
  77. typedef struct st_LWMessageFuncs {
  78. void (*info) (const char *, const char *);
  79. void (*error) (const char *, const char *);
  80. void (*warning) (const char *, const char *);
  81. int (*okCancel) (const char *ttl, const char *, const char *);
  82. int (*yesNo) (const char *ttl, const char *, const char *);
  83. int (*yesNoCan) (const char *ttl, const char *, const char *);
  84. int (*yesNoAll) (const char *ttl, const char *, const char *);
  85. } LWMessageFuncs;
  86. /*
  87. * System Information. The value returned as the "System ID" global is
  88. * a value that should be parsed into bits. The low bits are the dongle
  89. * serial number and the high bits are the application code.
  90. */
  91. #define LWSYSTEMID_GLOBAL "System ID"
  92. #define LWSYS_TYPEBITS 0xF0000000
  93. #define LWSYS_SERIALBITS 0x0FFFFFFF
  94. #define LWSYS_LAYOUT 0x00000000
  95. #define LWSYS_MODELER 0x10000000
  96. #define LWSYS_SCREAMERNET 0x20000000
  97. /*
  98. * Product Information. The value returned as the "Product Info" global
  99. * is a value that should be parsed into bits. The various groups of
  100. * bits contain codes for the specific product and revision.
  101. */
  102. #define LWPRODUCTINFO_GLOBAL "Product Info"
  103. #define LWINF_PRODUCT 0x0000000F
  104. #define LWINF_BUILD 0x0000FFF0
  105. #define LWINF_MINORREV 0x000F0000
  106. #define LWINF_MAJORREV 0x00F00000
  107. #define LWINF_RESERVED 0xFF000000
  108. #define LWINF_PRODLWAV 0x00000001
  109. #define LWINF_PRODINSP3D 0x00000002
  110. #define LWINF_PRODOTHER 0x00000004
  111. #define LWINF_GETMAJOR(x) (((x) & LWINF_MAJORREV) >> 20)
  112. #define LWINF_GETMINOR(x) (((x) & LWINF_MINORREV) >> 16)
  113. #define LWINF_GETBUILD(x) (((x) & LWINF_BUILD) >> 4)
  114. /*
  115. * Locale Information. The value returned as the "Locale Info" global
  116. * is a value whose low bits contain the locale ID for the host
  117. * application. The possible values are the LANGID codes defined in
  118. * lwserver.
  119. */
  120. #define LWLOCALEINFO_GLOBAL "Locale Info"
  121. #define LWLOC_LANGID 0x0000FFFF
  122. #define LWLOC_RESERVED 0xFFFF0000
  123. #endif