Note! This is source code for Casio 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:
FILEn=TchWait
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.
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:
© 2005, Evgeny Brednya, http://www.var.ru/bz/pv/.
You can get TchWaitHook package here.