[maemo-developers] Optimal battery life considerations in apps
From: Thomas Perl th.perl at gmail.comDate: Thu Jul 9 11:47:01 EEST 2009
- Previous message: Optimal battery life considerations in apps
- Next message: Optimal battery life considerations in apps
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2009/7/8 Andrew Flegg <andrew at bleb.org>: > 2) Stop updating the screen when your app isn't in the > foreground. --------- 8< ----------- > I'm willing to put together this wiki page but have two questions: > > 1) What is the best way of implementing (2) in C/Python/whatever? For GTK+ (all languages), you probably want the window-state-event signal: http://library.gnome.org/devel/gtk/unstable/GtkWidget.html#GtkWidget-window-state-event This signal makes use of the following structure: http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEventWindowState which in turn uses the following enum: http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkWindowState You would probably have to write a sample app and check which window events are received and then document which ones the developer has to consume and process. One thing I noted with the GTK+ flavour on Diablo is that iconify events are not sent/received correctly - at least in a way different than on stock Desktop GTK+. > 2) In Fremantle, there's a compositing window manager. On a > desktop this means you never receive an "expose" event > since your window is always exposed on an off-screen > buffer. What is the best way of implementing (2) in > Maemo 5? The same window-state-event signal should still be relevant on Maemo 5. HTH. thp
- Previous message: Optimal battery life considerations in apps
- Next message: Optimal battery life considerations in apps
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]