Everything.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #ifndef _EVERYTHING_DLL_
  2. #define _EVERYTHING_DLL_
  3. #ifndef _INC_WINDOWS
  4. #include <windows.h>
  5. #endif
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #define EVERYTHING_OK 0
  10. #define EVERYTHING_ERROR_MEMORY 1
  11. #define EVERYTHING_ERROR_IPC 2
  12. #define EVERYTHING_ERROR_REGISTERCLASSEX 3
  13. #define EVERYTHING_ERROR_CREATEWINDOW 4
  14. #define EVERYTHING_ERROR_CREATETHREAD 5
  15. #define EVERYTHING_ERROR_INVALIDINDEX 6
  16. #define EVERYTHING_ERROR_INVALIDCALL 7
  17. #ifndef EVERYTHINGAPI
  18. #define EVERYTHINGAPI __stdcall
  19. #endif
  20. #ifndef EVERYTHINGUSERAPI
  21. #define EVERYTHINGUSERAPI __declspec(dllimport)
  22. #endif
  23. // write search state
  24. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetSearchW(LPCWSTR lpString);
  25. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetSearchA(LPCSTR lpString);
  26. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetMatchPath(BOOL bEnable);
  27. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetMatchCase(BOOL bEnable);
  28. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetMatchWholeWord(BOOL bEnable);
  29. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetRegex(BOOL bEnable);
  30. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetMax(DWORD dwMax);
  31. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetOffset(DWORD dwOffset);
  32. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetReplyWindow(HWND hWnd);
  33. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SetReplyID(DWORD nId);
  34. // read search state
  35. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_GetMatchPath(void);
  36. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_GetMatchCase(void);
  37. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_GetMatchWholeWord(void);
  38. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_GetRegex(void);
  39. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetMax(void);
  40. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetOffset(void);
  41. EVERYTHINGUSERAPI LPCSTR EVERYTHINGAPI Everything_GetSearchA(void);
  42. EVERYTHINGUSERAPI LPCWSTR EVERYTHINGAPI Everything_GetSearchW(void);
  43. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetLastError(void);
  44. EVERYTHINGUSERAPI HWND EVERYTHINGAPI Everything_GetReplyWindow(void);
  45. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetReplyID(void);
  46. // execute query
  47. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_QueryA(BOOL bWait);
  48. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_QueryW(BOOL bWait);
  49. // query reply
  50. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_IsQueryReply(UINT message,WPARAM wParam,LPARAM lParam,DWORD nId);
  51. // write result state
  52. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_SortResultsByPath(void);
  53. // read result state
  54. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetNumFileResults(void);
  55. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetNumFolderResults(void);
  56. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetNumResults(void);
  57. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetTotFileResults(void);
  58. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetTotFolderResults(void);
  59. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetTotResults(void);
  60. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_IsVolumeResult(DWORD nIndex);
  61. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_IsFolderResult(DWORD nIndex);
  62. EVERYTHINGUSERAPI BOOL EVERYTHINGAPI Everything_IsFileResult(DWORD nIndex);
  63. EVERYTHINGUSERAPI LPCWSTR EVERYTHINGAPI Everything_GetResultFileNameW(DWORD nIndex);
  64. EVERYTHINGUSERAPI LPCSTR EVERYTHINGAPI Everything_GetResultFileNameA(DWORD nIndex);
  65. EVERYTHINGUSERAPI LPCWSTR EVERYTHINGAPI Everything_GetResultPathW(DWORD nIndex);
  66. EVERYTHINGUSERAPI LPCSTR EVERYTHINGAPI Everything_GetResultPathA(DWORD nIndex);
  67. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetResultFullPathNameA(DWORD nIndex,LPSTR buf,DWORD bufsize);
  68. EVERYTHINGUSERAPI DWORD EVERYTHINGAPI Everything_GetResultFullPathNameW(DWORD nIndex,LPWSTR wbuf,DWORD wbuf_size_in_wchars);
  69. // reset state and free any allocated memory
  70. EVERYTHINGUSERAPI void EVERYTHINGAPI Everything_Reset(void);
  71. #ifdef UNICODE
  72. #define Everything_SetSearch Everything_SetSearchW
  73. #define Everything_GetSearch Everything_GetSearchW
  74. #define Everything_Query Everything_QueryW
  75. #define Everything_GetResultFileName Everything_GetResultFileNameW
  76. #define Everything_GetResultPath Everything_GetResultPathW
  77. #define Everything_GetResultFullPathName Everything_GetResultFullPathNameW
  78. #else
  79. #define Everything_SetSearch Everything_SetSearchA
  80. #define Everything_GetSearch Everything_GetSearchA
  81. #define Everything_Query Everything_QueryA
  82. #define Everything_GetResultFileName Everything_GetResultFileNameA
  83. #define Everything_GetResultPath Everything_GetResultPathA
  84. #define Everything_GetResultFullPathName Everything_GetResultFullPathNameA
  85. #endif
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89. #endif