View Single Post
Old 12-24-2011, 08:40 AM   #10
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 3,018
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
Kindle Keyboard constants

@vdp If it can help, I updated the source, the best I could for my device. I would certainly be interested in your parser supporting the Kindle Keyboard.
Spoiler:

/*
* Copyright 2011 Vassil Panayotov <vd.panayotov@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef DEVICEDEFS_H
#define DEVICEDEFS_H

#include <climits>

namespace lhack {


// Kindle Keyboard parameters
struct KDXDimensions {
// Whole screen dimensions
static const int kScreenWidth = 600;
static const int kScreenHeight = 800;

// ... and bits per pixel
static const int kBPP = 4;

// Number of titles per page when browsing a collection
static const int kEntryPerPgCol = 9;

// Number of titles/page when NOT browsing a collection
static const int kEntryPerPg = 10;

// Vertical offset of the topmost pixel of the 1st title,
// when the contents of a collection are shown
static const int kOffsetYCol = 158;

// Vertical offset of the topmost pixel of the 1st title,
// when NOT browsing a collection
static const int kOffsetY = 100;

// The vertical offset of the collection's name underline
static const int kOffsetUlineCol = 124;

// Offset from the left margin of the first char in a title
static const int kOffsetX = 61;

// The gap between the underline of one title and the topmost pixels
// of the next.
static const int kEntryGap = 32;

// Maximum length of a title in pixels
static const int kEntryLen = 500;

// Maximum height of the title font
static const int kFontHeight = 16;

// Vertical distance in pixels from the bottommost pixel in a title to
// the bottommost pixel of the underlining squares
static const int kUlineBaseOffset = 6;

// The minimum distance from the font's baseline to the topmost pixels of the underline
static const int kUlineMinOffset = 7;

// The side length of the (bigger) underlining squares
//static const int kUlineSquareSz = 5;

// The color of the solid underline selection pointer
static const unsigned kUlineColor = UINT_MAX;

// Maximum gap between words in a title beyond which next words are considered to be metadata
static const int kMaxBBGap = 40;
};

};
#endif // DEVICEDEFS_H


Following are sample screen captures I used if you need to verify:
Attached Thumbnails
Click image for larger version

Name:	screen_shot-59123.gif
Views:	430
Size:	16.7 KB
ID:	80329   Click image for larger version

Name:	screen_shot-59126.gif
Views:	453
Size:	21.9 KB
ID:	80330  
PoP is offline   Reply With Quote