00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Alexander 00008 * Side Effects Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: UT_Gimp.h ( UT Library, C++) 00015 * 00016 * COMMENTS: 00017 * 00018 * Gimp Callback interface for the Gimp COP 00019 */ 00020 00021 #ifndef __UT_Gimp__ 00022 #define __UT_Gimp__ 00023 00024 #include "UT_API.h" 00025 #define GIMP_CURSOR_CHANGED 1 00026 #define GIMP_IMAGE_CHANGED 2 00027 #define GIMP_SHUTDOWN 3 00028 00029 struct utGimpInfoStruct 00030 { 00031 // naming conv: variables starting with 'app' are only set by Houdini. 00032 // variables starting with 'gimp' are set by gimp. 00033 00034 // flags 00035 unsigned char gimpReady; 00036 unsigned char appReady; 00037 unsigned char gimpImageBusy; 00038 unsigned char appImageBusy; 00039 unsigned char gimpDone; 00040 unsigned char appDone; 00041 unsigned char gimpImageFullUpdate; 00042 00043 // cursor, image size & serial # 00044 unsigned int appImageSizeX; 00045 unsigned int appImageSizeY; 00046 unsigned int appExportTileSize; 00047 unsigned int appDragUpdate; 00048 int gimpCursorX; 00049 int gimpCursorY; 00050 unsigned int gimpImageSerial; 00051 00052 // tile update data follows (1 byte per tile, tiles are 64x64 blocks) 00053 // image data follows here... 00054 }; 00055 00056 class UT_Gimp; 00057 00058 typedef void (*UT_GimpCallback)(int why, void *data); 00059 typedef UT_Gimp *(*UT_GimpCreator)(UT_GimpCallback func, utGimpInfoStruct *,void *data); 00060 00061 00062 class UT_API UT_Gimp 00063 { 00064 public: 00065 UT_Gimp(UT_GimpCallback, utGimpInfoStruct *info, void *data); 00066 virtual ~UT_Gimp(); 00067 00068 virtual int isValid(); 00069 virtual void startChecks(); 00070 virtual void stopChecks(); 00071 00072 virtual void updateCursor(int is_on); 00073 }; 00074 00075 UT_API extern void UTsetGimpCreator(UT_GimpCreator func); 00076 UT_API extern UT_Gimp * UTgetNewGimp(UT_GimpCallback func, 00077 utGimpInfoStruct *info, 00078 void *data); 00079 00080 #endif
1.5.9