08-25-2011, 03:47 PM | #1 |
Addict
Posts: 353
Karma: 92
Join Date: Sep 2007
Device: DR1000S, Nook ST (rooted), Kobo Aura one (ksm)
|
Screen Refresh for DR1000
Hi
Does somebody knows how to code a screen refresh in gtk+ for the DR1000? Thanks Gogolo I may have found the answer: https://www.mobileread.com/forums/sho...59&postcount=8 Last edited by Gogolo; 08-25-2011 at 04:19 PM. |
08-28-2011, 03:28 AM | #2 |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Hi Gogolo,
The functions that you mention can indeed be used to force refreshes. An alternative that I used in xournal was to set the text of a GtkLabel, which also triggers a refresh. |
Advert | |
|
08-29-2011, 02:26 AM | #3 |
Addict
Posts: 353
Karma: 92
Join Date: Sep 2007
Device: DR1000S, Nook ST (rooted), Kobo Aura one (ksm)
|
Thank you! If it is not to much work: Could you post the code for that?
Gogolo |
08-29-2011, 03:39 AM | #4 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
Iņigo |
|
08-30-2011, 01:57 AM | #5 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
|
|
Advert | |
|
08-30-2011, 02:02 AM | #6 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
(see also sysd/src/display.c) |
|
08-30-2011, 02:26 AM | #7 |
Addict
Posts: 353
Karma: 92
Join Date: Sep 2007
Device: DR1000S, Nook ST (rooted), Kobo Aura one (ksm)
|
Thank you Mackx!!!
|
08-30-2011, 02:49 AM | #8 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
A simple hook is added to GTK's main loop event handler which triggers a screen update on certain expose events. We only perform an update if the expose event was emitted by a top level window, and if the expose is not the result of some intermediate process (such is the case with X configure events). This results in the minimum number of display updates, but it ignores updates to GtkEntry fields because they are implemented as GdkWindows (which are ignored, if they're not top-level). My guess is that as Gtk.Label widgets do not have their own gdk / X window, the parent container with a proper window gets the refresh, thus this the Gtk.Window often. Iņigo |
|
08-30-2011, 03:41 PM | #9 |
Addict
Posts: 353
Karma: 92
Join Date: Sep 2007
Device: DR1000S, Nook ST (rooted), Kobo Aura one (ksm)
|
When I add this:
extern GtkWidget *g_label; gtk_label_set_text( GTK_LABEL(g_label), _(" Layer: ") ); It gives a error when building, g_label is not defined. Sorry I hope Im not annoying to much with these silly questions... |
08-30-2011, 04:01 PM | #10 | |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
Quote:
And no problem with the questions. This is the reason of the forum. |
|
08-31-2011, 02:39 AM | #11 |
Addict
Posts: 353
Karma: 92
Join Date: Sep 2007
Device: DR1000S, Nook ST (rooted), Kobo Aura one (ksm)
|
Thanks! It compiled good. Now I have to find the right place for it
|
08-31-2011, 03:15 AM | #12 |
Guru
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
|
|
08-31-2011, 11:38 AM | #13 |
Addict
Posts: 353
Karma: 92
Join Date: Sep 2007
Device: DR1000S, Nook ST (rooted), Kobo Aura one (ksm)
|
Thanks for the hint. Will try it tonight.
Gogolo |
08-31-2011, 06:49 PM | #14 |
Addict
Posts: 353
Karma: 92
Join Date: Sep 2007
Device: DR1000S, Nook ST (rooted), Kobo Aura one (ksm)
|
edit: cant get it to update the screen. Im working in vmare and cannot use qemu, so I have to test all the time on DR, which takes a lot of time. Ill stop here. I changed the gui of position editor to fit better for DR. Saving, loading and viewing PGNs runs except of the "only one time" bug. So when somebody is interested I can provide this.
Happy coding! Gogolo Last edited by Gogolo; 08-31-2011 at 08:09 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Screen refresh on KOBO | gandor62 | Kobo Reader | 13 | 08-28-2010 08:55 AM |
Screen Refresh Question | nremondelli | Amazon Kindle | 3 | 12-24-2008 09:55 AM |
Sound on screen refresh? | Savonarola | iRex | 1 | 10-18-2008 01:02 AM |
How to force a screen refresh? | mkaluza | Sony Reader Dev Corner | 0 | 08-24-2008 04:54 PM |
iLiad Screen refresh | tomchek | iRex Developer's Corner | 7 | 07-27-2007 05:36 PM |