lwpreview.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * LWSDK Header File
  3. * Copyright 2001 NewTek, Inc.
  4. *
  5. * LWPREVIEW.H -- LightWave Preview Services
  6. */
  7. #ifndef LWPREVIEW_H
  8. #define LWPREVIEW_H
  9. #include <lwimage.h>
  10. #include <lwtxtr.h>
  11. typedef struct st_PvSample {
  12. int x,y;
  13. float rgbaz[5];
  14. LWMicropol mp;
  15. } PvSample;
  16. typedef int clickFunc(int count,void *userData,PvSample *pixel);
  17. typedef void optionsFunc(int option,void *userData);
  18. typedef void closeFunc(void *userData);
  19. typedef int initFunc(void *renderData,int manual);
  20. typedef void cleanupFunc(void *renderData);
  21. typedef int evaluateFunc(void *renderData,int w,int h,PvSample *pixel);
  22. typedef void presetFunc(void *userData,LWImageID img);
  23. typedef struct st_PvContext *PvContextID;
  24. #define LWPREVIEWFUNCS_GLOBAL "Preview Functions"
  25. typedef struct st_LWPreviewFuncs {
  26. PvContextID (*subscribe)(char *title,void *userData,closeFunc *);
  27. void (*unsubscribe)(PvContextID);
  28. void (*open)(PvContextID);
  29. void (*close)(void);
  30. int (*isOpen)(void);
  31. void (*setContext)(PvContextID);
  32. void (*setClick)(PvContextID,clickFunc *);
  33. void (*setRender)(PvContextID,void *renderData,initFunc *,cleanupFunc *,evaluateFunc *);
  34. void (*setOptions)(PvContextID,char **list,optionsFunc *,int selection);
  35. void (*startRender)(PvContextID);
  36. void (*stopRender)(PvContextID);
  37. void (*getPixel)(PvSample *pixel);
  38. LWImageID (*getBitmap)(int *width,int *height);
  39. LWItemID (*getCamera)(double pos[3],double rot[3],double *zoomFactor);
  40. void (*getView)(int *width,int *height,double *pixelAspect);
  41. void (*setPreset)(PvContextID,presetFunc *);
  42. } LWPreviewFuncs;
  43. #endif