pageBar/src/displayUpdate.c File Reference

#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <liberdm/erdm.h>
#include "displayUpdate.h"
#include "erbusy.h"

Go to the source code of this file.

Functions

int display_update_get_level (void)
int display_update_reset_level (void)
gboolean display_update_during_idle_handling (gpointer data)
gboolean display_update_request_screen_refresh (int level, gpointer data)
void display_update_increase_level (int level)

Variables

static int g_currentLevel = LOWEST_LEVEL


Function Documentation

gboolean display_update_during_idle_handling ( gpointer  data  ) 

callback : called when GTK in idle mode

Parameters:
data - indicates where the update request came from (DEBUG reasons)
Returns:
0 (to remove the "idle mode" handler)

Definition at line 53 of file displayUpdate.c.

00054 {
00055     int        q = (int) data;
00056     eDmQuality quality = dmQFull;
00057         
00058     if (q == DM_QUALITY_TYPING)
00059     {
00060         quality = dmQTyping;
00061     }
00062 
00063     // full screen update,
00064     gdk_threads_enter();
00065     gdk_flush();
00066     gdk_threads_leave();
00067 
00068     //not busy any more
00069     erbusy_off();
00070 
00071     // full screen update,
00072     dmDisplay(dmCmdPriorUrgent, quality);
00073 
00074     // return FALSE to remove handler
00075     return FALSE;
00076 }

Here is the call graph for this function:

int display_update_get_level ( void   ) 

Definition at line 104 of file displayUpdate.c.

00105 {
00106     return g_currentLevel;
00107 }

void display_update_increase_level ( int  level  ) 

Increase the level value of the screen refresh. Meaning that the screen refresh will only be requested to the displayManager for levels equal or larger then this level value.

Parameters:
level screen refresh level
Returns:
TRUE on success

Definition at line 115 of file displayUpdate.c.

00116 {
00117     if (level > g_currentLevel)
00118     {
00119         g_currentLevel = level;
00120     }
00121 }

gboolean display_update_request_screen_refresh ( int  level,
gpointer  data 
)

set address of gtk idle callback, where the e-inkt display update is requested

Parameters:
status indicates whether or not not used
data not used
Returns:
TRUE on success

Definition at line 78 of file displayUpdate.c.

00079 {
00080     int     theCurrentLevel = display_update_get_level();
00081     int     quality;
00082     
00083     if (data == NULL)
00084     {
00085         quality = DM_QUALITY_FULL;
00086     }
00087     else
00088     {
00089         quality = (int) data;
00090     }
00091 
00092     if (level >= theCurrentLevel)
00093     {
00094         
00095         gtk_idle_add(display_update_during_idle_handling, (gpointer) quality);
00096 
00097         //reset the current level
00098         display_update_reset_level();
00099 
00100     }
00101     return TRUE;
00102 }

Here is the call graph for this function:

int display_update_reset_level ( void   ) 

Definition at line 109 of file displayUpdate.c.

00110 {
00111     g_currentLevel = LOWEST_LEVEL;
00112     return g_currentLevel;
00113 }


Variable Documentation

int g_currentLevel = LOWEST_LEVEL [static]

Definition at line 40 of file displayUpdate.c.


Generated on Sun Dec 14 17:15:15 2008 by  doxygen 1.5.6