TchWait (Hard Icons) Hook

Note! This is source code for Cassio PocketViewer PV-1600.


For Cassio PV-1600 developers.

The main idea was to implement LibTchWait() and LibTchWaitScan() functions with ability to intercept Hard Icons and perform own actions before Hard Icons being processed by the system.

There is the implementation.


TchWaitHook package contains:


1. Insert in sources.def line:


2. Just put in your source file line like

#include "TchWait.h"

3. Now you can use SetBeforeHardIcon() function to place your call back code which will be executed after Hard Icon will be pressed but before this event will be processed by the system.

You can declare your call back like this:

// Hard Icon call back function
word RunBeforeHI( TCHSTS *tsts ) {
	// your code here
	return 1;
// enable call back
SetBeforeHardIcon( RunBeforeHI );
// disable call back
SetBeforeHardIcon( NULL );

4. If you need to disable standard system processing for some Hard Icons then catch this event with tsts and just return 0 in your call back function.

5. See HI_Hook.c sample included in distribution.

Copyright Notice

This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

© 2005, Evgeny Brednya,

Where to get?

You can get TchWaitHook package here.