Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2011, 06:22 AM   #16
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
Code Samples

Quote:
The 2 options are here:

1. Examples inside the docs:

2. Examples outside the docs.

I prefer the first way... What about you?
Most simple and short examples in inkview.h

Longer complex samples outside inkview.h - they would make inkview.h unreadable.

btw.
What about adding "inkinternal.h" ?
MartinZ is offline   Reply With Quote
Old 12-05-2011, 06:39 AM   #17
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Quote:
Originally Posted by MartinZ
Most simple and short examples in inkview.h
Longer complex samples outside inkview.h - they would make inkview.h unreadable.
We can add samples to pbsdk. For now there is inkdemo sample. We can add it to this project and improve.

Quote:
Originally Posted by MartinZ
btw.
What about adding "inkinternal.h" ?
Don't know... I've never used it. Of cause you can add it if you wish.

PocketBook is still silent NetSpider, the former PocketBook developer, sometimes helps me.

I've added a link in the project main page.
sergeyvl12 is offline   Reply With Quote
Old 02-22-2012, 04:07 AM   #18
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Hi

PocketBook at last released it's own documentation!

https://github.com/pocketbook-free/I...K.pdf?raw=true
sergeyvl12 is offline   Reply With Quote
Old 02-22-2012, 01:04 PM   #19
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,977
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Quote:
Originally Posted by sergeyvl12 View Post
Hi

PocketBook at last released it's own documentation!

https://github.com/pocketbook-free/I...K.pdf?raw=true
Thanks! That's very useful for the drawing/canvas related functions. However, there is much, much more in the SDK that isn't covered. I think that your libinkview documentation project is still required by new developers.
rkomar is offline   Reply With Quote
Old 02-22-2012, 11:50 PM   #20
J.C.
Addict
J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.J.C. could sell banana peel slippers to a Deveel.
 
Posts: 224
Karma: 3184
Join Date: Feb 2011
Device: ONYX BOOX Note Air3 C
Quote:
Originally Posted by rkomar View Post
Thanks! That's very useful for the drawing/canvas related functions. However, there is much, much more in the SDK that isn't covered. I think that your libinkview documentation project is still required by new developers.
Totally in agreement, good documentation and tools are essential for a reader platform to succeed (that and backwards compatibility, you're hardly likely to attract a good development community if you switch the environment every couple of years).
J.C. is offline   Reply With Quote
Old 05-24-2012, 06:05 PM   #21
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
OpenConfigEditor(...) Font Size?

Hi,

if i open a custom config editor with "OpenConfigEditor" a dialog is shown. But i would like to have bigger fonts, because the dialog is shown with very small fonts for the settings and values. I can hardly read it.

Does anyone know, how to select the font sizes for OpenConfigEditor()?
MartinZ is offline   Reply With Quote
Old 05-24-2012, 08:00 PM   #22
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,977
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Quote:
Originally Posted by MartinZ View Post
Hi,

if i open a custom config editor with "OpenConfigEditor" a dialog is shown. But i would like to have bigger fonts, because the dialog is shown with very small fonts for the settings and values. I can hardly read it.

Does anyone know, how to select the font sizes for OpenConfigEditor()?
Not me. I have exactly the same problem so would like to know, as well. I can't remember if I tried setting the font temporarily to something larger just before the editor was opened, so maybe it's worth trying yourself.
rkomar is offline   Reply With Quote
Old 05-25-2012, 07:40 AM   #23
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
Quote:
I can't remember if I tried setting the font temporarily to something larger just before the editor was opened, so maybe it's worth trying yourself.
I think, exactly that is our problem. What is "the font"??

I already tried SetFont( ... ) with a font opened by "OpenFont(...)" But with no success.


There also is a font called "current_font" as a member of struct "ivstate" in "inkinternal.h".

And I can find
Code:
extern ifont *title_font, *window_font, *header_font, *menu_s_font, *menu_n_font;
extern ifont *butt_n_font, *butt_s_font;
in "inkinternal.h" as well.

I changed any of them - with no success.
MartinZ is offline   Reply With Quote
Old 05-26-2012, 06:12 PM   #24
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,977
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
I've been looking at the source code for fbreader to see how they make their configuration editor look so good. I haven't seen anything that looks obviously different, but I see that they provide an icon for each entry, something that I never tried. Perhaps the size of the icon determines the size of each line, which determines the size of the font used. I'll play with this later to see if it works.

I got the fbreader source code from here: http://sourceforge.net/projects/pocketbook-free/.

Edit: It worked like a charm! I copied over the images.c file from the fbreader source code, referenced one of the icons in each line of my iconfigedit array, and compiled and linked in the icons into the program. The configuration editor screen now looks as good as the one in fbreader. I'll need to use an appropriate icon for each line, but now I know how to make it look good.

Last edited by rkomar; 05-27-2012 at 12:27 AM.
rkomar is offline   Reply With Quote
Old 05-27-2012, 05:03 AM   #25
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Sorry! I had vacation. The font size depends on icon size. It will be very small if you don't have icons in configuration dialog.
sergeyvl12 is offline   Reply With Quote
Old 05-27-2012, 05:14 AM   #26
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
Re: FontSize in OpenConfigEditor

Quote:
I had vacation
You hopefully enjoyed your time.

Quote:
The font size depends on icon size.
Ahh sooo easy !!! And i wanted to use icons anyway but add them later so save time.

But at least that thing was not really too obvious...


Thanks a lot. So i get on with PBChord now.
I'll add that and other to our libinkviewdoc

By the way - could you update the doxy some time?
MartinZ is offline   Reply With Quote
Old 05-31-2012, 03:29 PM   #27
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
Quote:
Originally Posted by MartinZ View Post
By the way - could you update the doxy some time?
Sure, updated
sergeyvl12 is offline   Reply With Quote
Old 06-03-2012, 07:24 AM   #28
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
Quote:
Sure, updated
Thanks for that.

Perhaps you have got a hint for me about the following console message after my PBChord is finished with "CloseApp()".

Code:
** Message: Command 602 selected

** Message: Command 502 selected

hw_close

(pbchord:2967): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(pbchord:2967): Gtk-WARNING **: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().
I use PBTK for PBFileChooser and PBListBox.

It seems to have to to with gtk+ ?
I guess some buffer is closed the wrong way. But i can't find something i did wrong.

-I close fonts with "CloseFont()"
-I remove bitmaps (created with LoadBitmap or BitmapFromScreen) with "free"
etc.

Where could the reason be found?
MartinZ is offline   Reply With Quote
Old 06-03-2012, 09:15 AM   #29
sergeyvl12
ebook fan
sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.sergeyvl12 ought to be getting tired of karma fortunes by now.
 
Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
I don't use PBTK. But the same message appears in emulator for any pocketbook program for me:

serg@HOME:~/workspace/calc/obj_emu$ ./calc
** Message: Command 501 selected

hw_close

(<unknown>:3059): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

(<unknown>:3059): Gtk-WARNING **: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().



Did you mear "run with emulator" or "run with device". If first, this is a "normal" behavior. The problem is somewhere in emulator.

Last edited by sergeyvl12; 06-03-2012 at 09:17 AM.
sergeyvl12 is offline   Reply With Quote
Old 06-03-2012, 09:48 AM   #30
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
Re: Emulator error

Quote:
Did you mear "run with emulator" or "run with device". If first, this is a "normal" behavior. The problem is somewhere in emulator.
I meant the emulator.

For probe i started other apps before to proof, if only my app is affected.
In fact the message does not occure always and even not always with the same app.

Perhaps it really is the emulator itself. Perhaps it has to do with
- bitmaps, that are defined inside the code (and not with "LoadBitmap" or so)
- CloseFont(). It seems, if you do not call "CloseFont()" at all, problem does not come up. But that is not really proofed.

But as long, as my app works, I decide now not to care too much about this message.

Thanks for answer.
MartinZ is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Documentation Shikhin Kindle Developer's Corner 2 08-07-2011 10:04 PM
Database Documentation mfaine Calibre 4 01-07-2011 02:01 PM
Documentation for Sigil Valloric Sigil 15 11-12-2010 06:37 PM
Server Documentation? Joe McPlumber Calibre 4 07-05-2010 11:34 PM
Wiki documentation mrdini OpenInkpot 1 10-14-2008 09:50 AM


All times are GMT -4. The time now is 03:18 AM.


MobileRead.com is a privately owned, operated and funded community.