contentLister/src/displayUpdate.c File Reference

control - application interface with the display manager More...

#include <config.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <liberdm/erdm.h>
#include "contentListerLog.h"
#include "displayUpdate.h"
#include "erbusy.h"

Go to the source code of this file.

Functions

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

Variables

static int g_currentLevel = LOWEST_LEVEL


Detailed Description

control - application interface with the display manager

<File description>="">

Definition in file displayUpdate.c.


Function Documentation

void display_update_decrease_level ( int  level  ) 

Decrease 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 143 of file displayUpdate.c.

00144 {
00145     CL_SCREENPRINTF("new level %d - currentlevel %d", level, g_currentLevel);
00146 
00147     if (level < g_currentLevel)
00148     {
00149         g_currentLevel = level;
00150     }
00151 }

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 64 of file displayUpdate.c.

00065 {
00066     int     level = (int) data;
00067 
00068     CL_SCREENPRINTF("__CONTENTLISTER - request screen update (%d)__", level);
00069 
00070     CL_TIMEDISPLAY("Before gdk_flush()");
00071 
00072     // full screen update,
00073     gdk_threads_enter();
00074     gdk_flush();
00075     gdk_threads_leave();
00076 
00077     erbusy_off();
00078     
00079     if (level <= LIST_ITEM_FOCUS_LEVEL)
00080     {
00081         CL_TIMEDISPLAY("Before dmDisplay (dmQBW)");
00082         dmDisplay(dmCmdPriorUrgent, dmQBW);
00083     }
00084     else if (level <= TEXTENTRY_CHANGED_LEVEL)
00085     {
00086         CL_TIMEDISPLAY("Before dmDisplay (dmQTyping)");
00087         dmDisplay(dmCmdPriorUrgent, dmQTyping);
00088     }
00089     else if (level <= MAIN_WINDOW_EXPOSE_LEVEL)
00090     {
00091         CL_TIMEDISPLAY("Before dmDisplay (dmQFull)");
00092         dmDisplay(dmCmdPriorHigh, dmQFull);
00093     }
00094     else
00095     {
00096         CL_TIMEDISPLAY("Before dmDisplay (dmQFull, low-priority)");
00097         dmDisplay(dmCmdPriorLow, dmQFull);
00098     }
00099 
00100     //reset the current level
00101     g_currentLevel = LOWEST_LEVEL;
00102 
00103     // return FALSE to remove handler
00104     return FALSE;
00105 }

Here is the call graph for this function:

int display_update_get_level ( void   ) 

Definition at line 124 of file displayUpdate.c.

00125 {
00126     return g_currentLevel;
00127 }

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 131 of file displayUpdate.c.

00132 {
00133     CL_SCREENPRINTF("new level %d - currentlevel %d", level, g_currentLevel);
00134 
00135     if (level > g_currentLevel)
00136     {
00137         g_currentLevel = level;
00138     }
00139 }

gboolean display_update_request_screen_refresh ( int  level  ) 

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

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

Definition at line 108 of file displayUpdate.c.

00109 {
00110     CL_SCREENPRINTF("entry level %d currentlevel %d", level, g_currentLevel);
00111 
00112     if (level >= g_currentLevel)
00113     {
00114         CL_TIMEDISPLAY("Before adding idle callback");
00115 
00116         gtk_idle_add(display_update_during_idle_handling, (gpointer) level);
00117 
00118         g_currentLevel = level + 1;
00119     }
00120     CL_SCREENPRINTF("leave level %d currentlevel %d", level, g_currentLevel);
00121     return TRUE;
00122 }

Here is the call graph for this function:


Variable Documentation

int g_currentLevel = LOWEST_LEVEL [static]

Definition at line 52 of file displayUpdate.c.


Generated on Sun Dec 14 17:13:21 2008 by  doxygen 1.5.6