Compatibility with Third‐party Applications - ccseer/Seer GitHub Wiki

ACustomApp

process

  1. The Spacebar is triggered
  2. ACustomApp finds the handle of Seer
    HWND seer = FindWindowEx(nullptr, nullptr, SEER_CLASS_NAME, nullptr);
  3. ACustomApp prepares the full path of selected file
  4. Sends path to the handle of Seer
    void sendPath2Seer(HWND seer, LPCWSTR path)
    {
        COPYDATASTRUCT cd;
        cd.cbData = (_tcslen(path) + 1) * sizeof(TCHAR);
        cd.lpData = (LPVOID)path;
        cd.dwData = SEER_INVOKE_W32;
        SendMessage(seer, WM_COPYDATA, 0, (LPARAM)&cd);
    }
  5. Seer displays the preview of the path

ACustomExplorer

process

  1. ACustomExplorer: create a new text file to store your classname
  2. Seer: all json files in this path will be loaded after Seer is started. When the user presses the space, Seer gets the handle to match the classname through GetForegroundWindow. If it matches ACustomExplorer, Seer sends a WM_COPYDATA message to the handle, and the value of dwData is SEER_REQUEST_PATH .
  3. ACustomExplorer: after receives WM_COPYDATA, it matches the SEER_REQUEST_PATH of dwData, and sends a message back as soon as possible with the full path of the selected file.
  4. Seer: when the Seer receives the message, it previews the file and the process ends.
    • The logic code is all Win32, which has nothing to do with the Qt code of the UI, even if there is no Qt framework, it will not affect the reading.

example

⚠️ **GitHub.com Fallback** ⚠️