wdxplugin.pas 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. unit WdxPlugin; { Content plugins }
  2. interface
  3. uses SysUtils;
  4. const ft_nomorefields=0;
  5. ft_numeric_32=1;
  6. ft_numeric_64=2;
  7. ft_numeric_floating=3;
  8. ft_date=4;
  9. ft_time=5;
  10. ft_boolean=6;
  11. ft_multiplechoice=7;
  12. ft_string=8;
  13. ft_fulltext=9;
  14. ft_datetime=10;
  15. ft_stringw=11;
  16. ft_fulltextw=12;
  17. // for ContentGetValue
  18. ft_nosuchfield=-1;
  19. ft_fileerror=-2;
  20. ft_fieldempty=-3;
  21. ft_ondemand=-4;
  22. ft_notsupported=-5;
  23. ft_setcancel=-6;
  24. ft_delayed=0;
  25. // for ContentSetValue
  26. ft_setsuccess=0; // setting of the attribute succeeded
  27. // for ContentGetSupportedFieldFlags
  28. contflags_edit=1;
  29. contflags_substsize=2;
  30. contflags_substdatetime=4;
  31. contflags_substdate=6;
  32. contflags_substtime=8;
  33. contflags_substattributes=10;
  34. contflags_substattributestr=12;
  35. contflags_passthrough_size_float=14;
  36. contflags_substmask=14;
  37. contflags_fieldedit=16;
  38. // for ContentSendStateInformation
  39. contst_readnewdir=1;
  40. contst_refreshpressed=2;
  41. contst_showhint=4;
  42. setflags_first_attribute=1; // First attribute of this file
  43. setflags_last_attribute=2; // Last attribute of this file
  44. setflags_only_date=4; // Only set the date of the datetime value!
  45. CONTENT_DELAYIFSLOW=1; // ContentGetValue called in foreground
  46. CONTENT_PASSTHROUGH=2; // If requested via contflags_passthrough_size_float: The size
  47. // is passed in as floating value, TC expects correct value
  48. // from the given units value, and optionally a text string
  49. type tContentDefaultParamStruct=record
  50. size,
  51. PluginInterfaceVersionLow,
  52. PluginInterfaceVersionHi:longint;
  53. DefaultIniName:array[0..MAX_PATH-1] of char;
  54. end;
  55. pContentDefaultParamStruct=^tContentDefaultParamStruct;
  56. type tdateformat=record
  57. wYear,wMonth,wDay:word;
  58. end;
  59. pdateformat=^tdateformat;
  60. type ttimeformat=record
  61. wHour,wMinute,wSecond:word;
  62. end;
  63. ptimeformat=^ttimeformat;
  64. { Function prototypes: }
  65. (*
  66. procedure ContentGetDetectString(DetectString:pchar;maxlen:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  67. function ContentGetSupportedField(FieldIndex:integer;FieldName:pchar;
  68. Units:pchar;maxlen:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  69. function ContentGetValue(FileName:pchar;FieldIndex,UnitIndex:integer;
  70. FieldValue:pbyte; maxlen,flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  71. function ContentGetValueW(FileName:pwidechar;FieldIndex,UnitIndex:integer;
  72. FieldValue:pbyte; maxlen,flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  73. procedure ContentSetDefaultParams(dps:pContentDefaultParamStruct); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  74. procedure ContentPluginUnloading; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  75. procedure ContentStopGetValue(FileName:pchar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  76. procedure ContentStopGetValueW(FileName:pwidechar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  77. function ContentGetDefaultSortOrder(FieldIndex:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  78. function ContentGetSupportedFieldFlags(FieldIndex:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  79. function ContentSetValue(FileName:pchar;FieldIndex,UnitIndex,FieldType:integer;
  80. FieldValue:pbyte;flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  81. function ContentSetValueW(FileName:pwidechar;FieldIndex,UnitIndex,FieldType:integer;
  82. FieldValue:pbyte;flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  83. procedure ContentSendStateInformation(state:integer;path:pchar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  84. procedure ContentSendStateInformationW(state:integer;path:pwidechar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  85. function ContentEditValue(handle:thandle;FieldIndex,UnitIndex,FieldType:integer;
  86. FieldValue:pchar;maxlen:integer;flags:integer;langidentifier:pchar):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
  87. *)
  88. implementation
  89. end.