wdxplugin.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #ifndef _WDX_H
  2. #define _WDX_H
  3. #include "common.h"
  4. // Contents of file contplug.h version 2.0
  5. #define ft_nomorefields 0
  6. #define ft_numeric_32 1
  7. #define ft_numeric_64 2
  8. #define ft_numeric_floating 3
  9. #define ft_date 4
  10. #define ft_time 5
  11. #define ft_boolean 6
  12. #define ft_multiplechoice 7
  13. #define ft_string 8
  14. #define ft_fulltext 9
  15. #define ft_datetime 10
  16. #define ft_stringw 11
  17. #define ft_fulltextw 12
  18. // for ContentGetValue
  19. #define ft_nosuchfield -1 // error, invalid field number given
  20. #define ft_fileerror -2 // file i/o error
  21. #define ft_fieldempty -3 // field valid, but empty
  22. #define ft_ondemand -4 // field will be retrieved only when user presses <SPACEBAR>
  23. #define ft_notsupported -5 // function not supported
  24. #define ft_setcancel -6 // user clicked cancel in field editor
  25. #define ft_delayed 0 // field takes a long time to extract -> try again in background
  26. // for ContentSetValue
  27. #define ft_setsuccess 0 // setting of the attribute succeeded
  28. // for ContentGetSupportedFieldFlags
  29. #define contflags_edit 1
  30. #define contflags_substsize 2
  31. #define contflags_substdatetime 4
  32. #define contflags_substdate 6
  33. #define contflags_substtime 8
  34. #define contflags_substattributes 10
  35. #define contflags_substattributestr 12
  36. #define contflags_passthrough_size_float 14
  37. #define contflags_substmask 14
  38. #define contflags_fieldedit 16
  39. #define contst_readnewdir 1
  40. #define contst_refreshpressed 2
  41. #define contst_showhint 4
  42. #define setflags_first_attribute 1 // First attribute of this file
  43. #define setflags_last_attribute 2 // Last attribute of this file
  44. #define setflags_only_date 4 // Only set the date of the datetime value!
  45. #define editflags_initialize 1 // The data passed to the plugin may be used to
  46. // initialize the edit dialog
  47. #define CONTENT_DELAYIFSLOW 1 // ContentGetValue called in foreground
  48. #define CONTENT_PASSTHROUGH 2 // If requested via contflags_passthrough_size_float: The size
  49. // is passed in as floating value, TC expects correct value
  50. // from the given units value, and optionally a text string
  51. typedef struct {
  52. int size;
  53. DWORD PluginInterfaceVersionLow;
  54. DWORD PluginInterfaceVersionHi;
  55. char DefaultIniName[MAX_PATH];
  56. } ContentDefaultParamStruct;
  57. typedef struct {
  58. WORD wYear;
  59. WORD wMonth;
  60. WORD wDay;
  61. } tdateformat,*pdateformat;
  62. typedef struct {
  63. WORD wHour;
  64. WORD wMinute;
  65. WORD wSecond;
  66. } ttimeformat,*ptimeformat;
  67. #ifdef __cplusplus
  68. extern "C" {
  69. #endif
  70. int DCPCALL ContentGetDetectString(char* DetectString,int maxlen);
  71. int DCPCALL ContentGetSupportedField(int FieldIndex,char* FieldName,char* Units,int maxlen);
  72. int DCPCALL ContentGetValue(char* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
  73. int DCPCALL ContentGetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
  74. void DCPCALL ContentSetDefaultParams(ContentDefaultParamStruct* dps);
  75. void DCPCALL ContentPluginUnloading(void);
  76. void DCPCALL ContentStopGetValue(char* FileName);
  77. void DCPCALL ContentStopGetValueW(WCHAR* FileName);
  78. int DCPCALL ContentGetDefaultSortOrder(int FieldIndex);
  79. int DCPCALL ContentGetSupportedFieldFlags(int FieldIndex);
  80. int DCPCALL ContentSetValue(char* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
  81. int DCPCALL ContentSetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,int FieldType,void* FieldValue,int flags);
  82. int DCPCALL ContentEditValue(HWND ParentWin,int FieldIndex,int UnitIndex,int FieldType,
  83. void* FieldValue,int maxlen,int flags,char* langidentifier);
  84. void DCPCALL ContentSendStateInformation(int state,char* path);
  85. void DCPCALL ContentSendStateInformationW(int state,WCHAR* path);
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89. #endif // _WDX_H