ContentSendStateInformation

From TotalcmdWiki
Revision as of 15:33, 15 April 2017 by Lefteous (talk | contribs) (Initial document version, backlink & category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ContentSendStateInformation is called to inform the plugin about a state change.

Declaration:

void __stdcall ContentSendStateInformation(int state,char* path);

Description of parameters:

state The state which has changed. The following states are defined: contst_readnewdir: It is called when TC reads one of the file lists. contst_refreshpressed: The user has pressed F2 or Ctrl+R to force a reload. contst_showhint: A tooltip/hint window is shown for the current file.

path Current path. In case of contst_showhint, this is the path to the file, otherwise to the current directory.

Return value:

This function has no return value.

Remarks:

- This function may be used to clear a directory cache when called with parameter contst_refreshpressed or with contst_readnewdir, depending on the needs of the plugin. - When the user presses F2 or Ctrl+R in custom columns view or thumbnails view, ContentSendStateInformation is called first with parameter contst_refreshpressed, then with contst_readnewdir. - When the user changes to a different directory in custom columns view or thumbnails view, ContentSendStateInformation is called only with parameter contst_readnewdir. - When the user switches from full view to custom columns view or thumbnails view, ContentSendStateInformation is not called at all! - Do not ignore the state parameter, there may be more parameters added in future versions!