If I remember correctly this works only for FW5
inkinternal.h (SDK_481)
PHP Code:
/*
* Returns frontlight state (0-100 - brightness, negative value if off)
* returns INT_MIN if can't read or not supported
*/
int GetFrontlightState(void);
/*
* Sets frontlight state (0-100 - brightness, negative value if off)
*/
void SetFrontlightState(int flstate);
/*
* Sets frontlight state (0-100 - brightness, negative value if off)
* temporary for use when about to keylock and this value should not be stored
*/
void SetFrontlightStateEx(int flstate, int temporary);
/*
* If supported open special application
*/
void OpenFrontLightConfig();
/*
On/off FrontLight
*/
void SwitchFrontlightState();
CR3 implementation
PHP Code:
virtual bool onClientTouch(lvPoint &pt, CRGUITouchEventType evType)
{
// TOUCH DOWN
if( evType == CRTOUCH_DOWN ) {
finger1.start.x = pt.x;
finger1.start.y = pt.y;
touchPointing = 1;
}
// RELEASE / LONG TAP
else if (CRTOUCH_UP == evType || CRTOUCH_DOWN_LONG == evType) {...}
// MULTI
#if defined(POCKETBOOK_PRO) && !defined(POCKETBOOK_PRO_PRO2)
else if (CRTOUCH_MULTI_TOUCH == evType && touchPointing && max(pt.x,pt.y) > 2) {...}
#endif
// DRAG
#ifdef POCKETBOOK_PRO_FW5
else if( evType == CRTOUCH_MOVE && touchPointing == 1 ) {
// VERTICAL
if( abs(finger1.start.x-pt.x) < abs(finger1.start.y-pt.y) ) {
int front_light_swipes_mode = CRPocketBookDocView::instance->getProps()->getIntDef(PROP_CTRL_FRONT_LIGHT_SWIPES, 2);
if( front_light_swipes_mode == 1 ) {
setFrontLightValue(
/* bottom to top */
100 -
/* value (%) */
(
100 *
(
/* touch point (PX) */
pt.y -
/* offset (PX) used to center the region */
ScreenHeight() * FRONTLIGHT_SWIPE_USABLE_SCREEN_HEIGHT / 2
)
/
/* usable screen (PX) */
( ScreenHeight() * FRONTLIGHT_SWIPE_USABLE_SCREEN_HEIGHT )
)
);
ignoreNextTouchRelease = true;
}
else if( front_light_swipes_mode == 2 ) {
setFrontLightValue(
getFrontLightValue() -
/* value (%) */
(
100 *
(
/* step height (PX) */
pt.y - finger1.start.y
)
/
/* usable screen (PX) */
( ScreenHeight() * FRONTLIGHT_SWIPE_USABLE_SCREEN_HEIGHT )
)
);
finger1.start.y = pt.y;
ignoreNextTouchRelease = true;
}
return true;
}
// HORIZONTALY
else {
}
}
#endif
return false;
}