Skip to content

Commit

Permalink
Merge pull request #241 from blchinezu/dev
Browse files Browse the repository at this point in the history
Up version: 0.0.6-17-62
  • Loading branch information
blchinezu committed Feb 12, 2018
2 parents ec32102 + a4bfbca commit c3e2cc0
Show file tree
Hide file tree
Showing 770 changed files with 20,073 additions and 13,693 deletions.
Binary file modified builds/360/360/latest.zip
Binary file not shown.
Binary file modified builds/515/pro4/latest.zip
Binary file not shown.
Binary file modified builds/515/pro5/latest.zip
Binary file not shown.
Binary file modified builds/602/pro2/latest.zip
Binary file not shown.
Binary file modified builds/626/pro4/latest.zip
Binary file not shown.
Binary file modified builds/626/pro5/latest.zip
Binary file not shown.
1 change: 1 addition & 0 deletions builds/631/pro5/exists
@@ -0,0 +1 @@
yes
Binary file added builds/631/pro5/latest.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion builds/current.version
@@ -1 +1 @@
0.0.6-17-61.3
0.0.6-17-62
2 changes: 1 addition & 1 deletion builds/links/PB631
@@ -1 +1 @@
626
631
Binary file modified cr3gui/data/devices/pb360/skins/pb626fw5/cr3_logo_screen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb626fw5/cr3_wait_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified cr3gui/data/devices/pb360/skins/pb631fw5/arrow_back_623.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/arrow_left_black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/arrow_left_black_sel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/arrow_left_white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/arrow_right_black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/arrow_right_black_sel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/arrow_right_white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_a+.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_a+_select.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_a-.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_a-_select.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_a.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_a_select.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_c+.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_c+_select.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_c-.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_c-_select.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_cancel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_cancel_select.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_save.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cite_save_select.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cr3_dict_tools.png 100755 → 100644
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cr3_logo_screen.png 100755 → 100644
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cr3_logo_screen_landscape.png 100755 → 100644
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/cr3_wait_icon.png 100755 → 100644
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_bookmarks.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_bookmarks_alt.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_bookmarks_tap.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_cite.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_cite_tap.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_dictionary.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_dictionary_tap.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_goto.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_goto_tap.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_home.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_home_tap.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_rotate.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_rotate_tap.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_search.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_search_tap.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_settings.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_settings_tap.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_toc.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/icon_toc_tap.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/links_cancel.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/links_cancel_sel.png
Empty file modified cr3gui/data/devices/pb360/skins/pb631fw5/marker.png 100644 → 100755
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/standby.png 100644 → 100755
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/toolbar_move_down.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/toolbar_move_up.png
Binary file modified cr3gui/data/devices/pb360/skins/pb631fw5/toolbar_move_up_sel.png
170 changes: 130 additions & 40 deletions cr3gui/src/cr3pocketbook.cpp
Expand Up @@ -50,7 +50,7 @@ ifont * pbCrFontAA;
int pbCrFontSize = 10;

#ifdef POCKETBOOK_PRO
iv_mtinfo* (*gti)(void); /* Pointer to GetTouchInfo() function. */
iv_mtinfo* (*inkview_GetTouchInfo)(void); /* Pointer to GetTouchInfo() function. */

typedef struct iv_mtinfo_54_s {
int active;
Expand All @@ -61,6 +61,12 @@ typedef struct iv_mtinfo_54_s {
int rsv_2;
long long timems;
} iv_mtinfo_54;

#ifdef POCKETBOOK_PRO_FW5
bool gotFrontLightColor = false;
int (*inkview_GetFrontlightColor)(void); /* Pointer to GetFrontlightColor() function. */
void (*inkview_SetFrontlightColor)(int value); /* Pointer to SetFrontlightColor() function. */
#endif
#endif

typedef struct finger_s {
Expand Down Expand Up @@ -2239,7 +2245,7 @@ class CRPocketBookDocView : public V3DocViewWin {
iv_mtinfo *mti;
iv_mtinfo_54 *mti54; // iv_mtinfo changed starting with firmware 5.4

if (gti && (mti = (*gti)())) {
if (inkview_GetTouchInfo && (mti = (*inkview_GetTouchInfo)())) {

mti54 = (iv_mtinfo_54*)mti;
bool mtinfo_new = (fw_major > 5) || (fw_major == 5 && fw_minor >= 4);
Expand Down Expand Up @@ -2286,43 +2292,88 @@ class CRPocketBookDocView : public V3DocViewWin {
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 *
// Front light COLOR
if( gotFrontLightColor && finger1.start.x < ScreenWidth()/2 ) {
if( front_light_swipes_mode == 1 ) {
setFrontLightColorValue(
/* bottom to top */
100 -
/* value (%) */
(
/* touch point (PX) */
pt.y -
/* offset (PX) used to center the region */
ScreenHeight() * FRONTLIGHT_SWIPE_USABLE_SCREEN_HEIGHT / 2
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 )
)
/
/* usable screen (PX) */
( ScreenHeight() * FRONTLIGHT_SWIPE_USABLE_SCREEN_HEIGHT )
)
);
ignoreNextTouchRelease = true;
);
ignoreNextTouchRelease = true;
}
else if( front_light_swipes_mode == 2 ) {
setFrontLightColorValue(
getFrontLightColorValue() -
/* 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;
}
}
else if( front_light_swipes_mode == 2 ) {
setFrontLightValue(
getFrontLightValue() -
/* value (%) */
(
100 *

// Front light BRIGHTNESS
else {
if( front_light_swipes_mode == 1 ) {
setFrontLightValue(
/* bottom to top */
100 -
/* value (%) */
(
/* step height (PX) */
pt.y - finger1.start.y
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 )
)
/
/* usable screen (PX) */
( ScreenHeight() * FRONTLIGHT_SWIPE_USABLE_SCREEN_HEIGHT )
)
);
finger1.start.y = pt.y;
ignoreNextTouchRelease = true;
);
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;
}
Expand Down Expand Up @@ -5137,6 +5188,29 @@ void setFrontLightValue(int value) {
}
}

int getFrontLightColorValue() {
return min(max((*inkview_GetFrontlightColor)(), 0), 100);
}
void setFrontLightColorValue(int value) {

// Min
if( value <= 0 ) {
if( (*inkview_GetFrontlightColor)() > 0 )
(*inkview_SetFrontlightColor)(0);
}

// Max
else if( value >= 100 ) {
if( (*inkview_GetFrontlightColor)() < 100 )
(*inkview_SetFrontlightColor)(100);
}

// Adjust brightness
else {
(*inkview_SetFrontlightColor)(value);
}
}

#endif

bool pbNetworkConnected() {
Expand Down Expand Up @@ -5922,16 +5996,32 @@ bool canUseNewTouchToc() {
#endif

#if defined(POCKETBOOK_PRO) && !defined(POCKETBOOK_PRO_PRO2)
void get_gti_pointer() {
/* This gets the pointer to the GetTouchInfo() function if it is available. */
void getInkviewFeatures() {
void *handle;

if ((handle = dlopen("libinkview.so", RTLD_LAZY))) {
*(void **) (&gti) = dlsym(handle, "GetTouchInfo");

// Get pointers
*(void **) (&inkview_GetTouchInfo) = dlsym(handle, "GetTouchInfo");

#ifdef POCKETBOOK_PRO_FW5
*(void **) (&inkview_GetFrontlightColor) = dlsym(handle, "GetFrontlightColor");
*(void **) (&inkview_SetFrontlightColor) = dlsym(handle, "SetFrontlightColor");
gotFrontLightColor = inkview_GetFrontlightColor && inkview_SetFrontlightColor;
#endif

// Close lib
dlclose(handle);
} else
gti = NULL;
} else {
inkview_GetTouchInfo = NULL;

#ifdef POCKETBOOK_PRO_FW5
inkview_GetFrontlightColor = NULL;
inkview_SetFrontlightColor = NULL;
#endif
}
}

#endif

int main(int argc, char **argv)
Expand All @@ -5945,7 +6035,7 @@ int main(int argc, char **argv)
sscanf(GetSoftwareVersion(), "%*[^0-9]%u.%u.%u.%*u", &foo, &fw_major, &fw_minor);

#if defined(POCKETBOOK_PRO) && !defined(POCKETBOOK_PRO_PRO2)
get_gti_pointer();
getInkviewFeatures();
#endif

OpenScreen();
Expand Down
7 changes: 5 additions & 2 deletions cr3gui/src/cr3pocketbook.h
Expand Up @@ -78,8 +78,8 @@ enum CRPbCommands {

#define PB_CR3_CACHE_SIZE (0x100000 * 64)

#define CR_PB_VERSION "0.0.6-17-61.3"
#define CR_PB_BUILD_DATE "2017-10-05"
#define CR_PB_VERSION "0.0.6-17-62"
#define CR_PB_BUILD_DATE "2018-02-12"

#define PB_ROTATE_MODE_360 0
#define PB_ROTATE_MODE_180 1
Expand Down Expand Up @@ -185,6 +185,9 @@ bool canUseNewTouchToc();
void toggleFrontLight();
void setFrontLightValue(int value);
int getFrontLightValue();

void setFrontLightColorValue(int value);
int getFrontLightColorValue();
#endif

#endif
Expand Down
38 changes: 38 additions & 0 deletions data/device-specific/631/system/config/extensions.cfg
@@ -0,0 +1,38 @@
acsm:@ACSM_file:1:eink-reader.app,cr3-pb.app:ICON_ACSM
app:@APP_file:4:start.app:ICON_APP
bmp:@BMP_image:2:picviewer.app:ICON_BMP
cgi:@HTML_file:1:cr3-pb.app:ICON_HTM
chm:@Z_HTML_file:1:eink-reader.app,cr3-pb.app:ICON_CHM
djv:@DJVU_file:1:eink-reader.app,cr3-pb.app:ICON_DJVU
djvu:@DJVU_file:1:eink-reader.app,cr3-pb.app:ICON_DJVU
doc:@DOC_file:1:eink-reader.app,cr3-pb.app:ICON_DOC
docm:@DOC_file:1:eink-reader.app,cr3-pb.app:ICON_DOC
docx:@DOC_file:1:eink-reader.app,cr3-pb.app:ICON_DOCX
epub:@EPUB_file:1:cr3-pb.app,eink-reader.app:ICON_EPUB
fb2:@FB2_file:1:cr3-pb.app,eink-reader.app:ICON_FB2
file:@MENCA_file:1:menca_downloader.app:ICON_MENCA
hrss:@HTML_file:1:browser.app:ICON_HTM
htm:@HTML_file:1:eink-reader.app,browser.app,cr3-pb.app:ICON_HTM
html:@HTML_file:1:eink-reader.app,browser.app:ICON_HTMLasp:@HTML_file:1:eink-reader.app,browser.app:ICON_HTM
jpeg:@JPEG_image:2:picviewer.app:ICON_JPG
jpg:@JPEG_image:2:picviewer.app:ICON_JPG
jsp:@HTML_file:1:cr3-pb.app:ICON_HTM
lndrm:@LNDRM_file:1:libronet_switcher.app:ICON_LNDRM
m3u:@M3U_file:1:audio_player.app:ICON_MP3
mht:@HTML_file:1:cr3-pb.app:ICON_HTM
mobi:@PRC_file:1:eink-reader.app,cr3-pb.app:ICON_PRC
pbi:@APP_file:1:sysinstall.app:ICON_APP
pdb:@PRC_file:1:eink-reader.app,cr3-pb.app:ICON_PRC
pdf:@PDF_file:1:eink-reader_with_rmsdk.app,eink-reader_with_pdfium.app:ICON_PDF
php:@HTML_file:1:cr3-pb.app:ICON_HTM
pl:@HTML_file:1:cr3-pb.app:ICON_HTM
pn:@PN_file:1:pb_file_handler:ICON_PN
png:@PNG_image:2:picviewer.app:ICON_PNG
prc:@PRC_file:1:eink-reader.app,cr3-pb.app:ICON_PRC
rtf:@RTF_file:1:eink-reader.app,cr3-pb.app:ICON_RTF
run:@APP_file:4:start.app:ICON_APP
tcr:@TCR_file:1:eink-reader.app,cr3-pb.app:ICON_TCR
tif:@TIFF_image:2:picviewer.app:ICON_TIFF
tiff:@TIFF_image:2:picviewer.app:ICON_TIFF
txt:@Text_file:1:eink-reader.app,cr3-pb.app:ICON_TXT
wlnk:@weblink:5:eink-reader.app:

0 comments on commit c3e2cc0

Please sign in to comment.