liberipc/include/eripcpagebar.h File Reference

liberipc - specifics to IPC with pagebar More...

#include "eripcclient.h"

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  eCcPb {
  ccPbSetPageCount = 0, ccPbSetCurrentPage, ccPbSetCurrentPageOffset, ccPbSetZoomMode,
  ccPbSetDrawAreaOrientation, ccPbSetDrawAreaHOrigin, ccPbSetDrawAreaVOrigin, ccPbSetDrawAreaHSize,
  ccPbSetDrawAreaVSize, ccPbSetBarFontType, ccPbSetBarFontHeight, ccPbAddBookmark,
  ccPbRemoveBookmark, ccPbSetBookmarkMax, ccPbAddNote, ccPbRemoveNote,
  ccPbSetNotesMax, ccPbReset, ccPbShow, ccPbRedraw,
  ccPbSynchronise, ccPbUndefined
}

Functions

int pbSetPageCount (erClientChannel_t channel, int uaID, int pagecount)
int pbSetCurrentPage (erClientChannel_t channel, int uaID, int page)
int pbSetCurrentPageOffset (erClientChannel_t channel, int uaID, int pageoffset)
int pbSetZoomMode (erClientChannel_t channel, int uaID, int zoomMode)
int pbSetDrawAreaOrientation (erClientChannel_t channel, int uaID, int orientation)
int pbSetDrawAreaHOrigin (erClientChannel_t channel, int uaID, int origin)
int pbSetDrawAreaVOrigin (erClientChannel_t channel, int uaID, int origin)
int pbSetDrawAreaHSize (erClientChannel_t channel, int uaID, int size)
int pbSetDrawAreaVSize (erClientChannel_t channel, int uaID, int size)
int pbSetBarFontType (erClientChannel_t channel, int uaID, int font)
int pbSetBarFontHeight (erClientChannel_t channel, int uaID, int size)
int pbAddBookmark (erClientChannel_t channel, int uaID, int value)
int pbRemoveBookmark (erClientChannel_t channel, int uaID, int value)
int pbSetBookmarkMax (erClientChannel_t channel, int uaID, int max)
int pbAddNote (erClientChannel_t channel, int uaID, int value)
int pbRemoveNote (erClientChannel_t channel, int uaID, int value)
int pbSetNotesMax (erClientChannel_t channel, int uaID, int max)
int pbReset (erClientChannel_t channel, int uaID)
int pbShow (erClientChannel_t channel, int uaID, int show)
int pbRedraw (erClientChannel_t channel, int uaID)
int pbSynchronise (erClientChannel_t channel, int uaID)
int pbReportSynchronise (erClientChannel_t channel, int uaID)
int pbParseCommand (char *szCommand, erIpcCmd_t *pCmd)


Detailed Description

liberipc - specifics to IPC with pagebar

Definition in file eripcpagebar.h.


Enumeration Type Documentation

enum eCcPb

Enumerator:
ccPbSetPageCount 
ccPbSetCurrentPage 
ccPbSetCurrentPageOffset 
ccPbSetZoomMode 
ccPbSetDrawAreaOrientation 
ccPbSetDrawAreaHOrigin 
ccPbSetDrawAreaVOrigin 
ccPbSetDrawAreaHSize 
ccPbSetDrawAreaVSize 
ccPbSetBarFontType 
ccPbSetBarFontHeight 
ccPbAddBookmark 
ccPbRemoveBookmark 
ccPbSetBookmarkMax 
ccPbAddNote 
ccPbRemoveNote 
ccPbSetNotesMax 
ccPbReset 
ccPbShow 
ccPbRedraw 
ccPbSynchronise 
ccPbUndefined 

Definition at line 39 of file eripcpagebar.h.


Function Documentation

int pbAddBookmark ( erClientChannel_t  channel,
int  uaID,
int  value 
)

Adds a bookmark to the pagebar

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
value The bookmark value to add
Returns:
A value of 0 signals success

Definition at line 114 of file eripcpagebar.c.

00114                                                                   {
00115     return pbCallFunction(channel, uaID, ccPbAddBookmark, value);
00116 }

Here is the call graph for this function:

int pbAddNote ( erClientChannel_t  channel,
int  uaID,
int  value 
)

Adds a note to the pagebar

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
value The note value to add
Returns:
A value of 0 signals success

Definition at line 126 of file eripcpagebar.c.

00126                                                               {
00127     return pbCallFunction(channel, uaID, ccPbAddNote, value);
00128 }

Here is the call graph for this function:

int pbParseCommand ( char *  szCommand,
erIpcCmd_t pCmd 
)

Definition at line 181 of file eripcpagebar.c.

00181                                                        {
00182     int     i;
00183     int     paramsOffset;
00184     char    szToken[TB_MAXCHARONLINE];
00185     int     nReqArgs = 0;
00186 
00187     pCmd->cc = (int) ccPbUndefined;
00188     for (i = 0; i < TB_N_ARG; i++)
00189     {
00190         strcpy(pCmd->arg[i], "");
00191     }
00192 
00193     // Parse Command
00194 /* Original: */
00195 /*
00196     pChar = szCommand;
00197     i = 0;
00198     while (*pChar != '\0')
00199     {
00200         szToken[i] = '\0';
00201         if (*pChar == ',')
00202         {
00203             pChar++;
00204             break;
00205         }
00206         szToken[i] = *pChar++;
00207         i++;
00208         szToken[i] = '\0';
00209     }
00210 */
00211     for (paramsOffset=0; szCommand[paramsOffset]!='\0' && szCommand[paramsOffset]!=','; paramsOffset++) 
00212     {
00213         /* ignore */ ;
00214     }
00215     memcpy(szToken, szCommand, paramsOffset);
00216     szToken[paramsOffset]='\0';
00217     if (szCommand[paramsOffset]==',')
00218     {
00219         paramsOffset++;
00220     }
00221 
00222     // We have found the command Token. Figure out what the command is.
00223     for (i=0; i<ccPbUndefined; i++)
00224     {
00225         char s[16];
00226         sprintf(s, "%d", i);
00227         if (!strcmp(szToken, pbFunctionNames[i]) || !strcmp(szToken, s))
00228         {
00229             strcpy(pCmd->name, szToken);
00230             pCmd->cc = (int) i;
00231             nReqArgs = 2;
00232             pCmd->nArg = 2;
00233             break;
00234         }
00235     }
00236 
00237     if (i==ccPbReset || i==ccPbRedraw)
00238     {
00239         nReqArgs = 1;
00240     }
00241     else if (i==ccPbUndefined)
00242     {
00243         strcpy(pCmd->name, "Undefined");
00244         pCmd->cc = (int) ccPbUndefined;
00245         fprintf(stderr, "%s: Command %s \n", __FUNCTION__, szToken);
00246         fprintf(stderr, "Error parsing (%s). Command undefined\n", szCommand);
00247         pCmd->nArg = -1;
00248         return -1;
00249     }
00250 
00251     if (nReqArgs > 0)
00252     {
00253         erIpcGetArgs(szCommand+paramsOffset, pCmd, nReqArgs);
00254     }
00255     return 0;
00256 }

Here is the call graph for this function:

int pbRedraw ( erClientChannel_t  channel,
int  uaID 
)

Redraws the pagebar

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
Returns:
A value of 0 signals success

Definition at line 153 of file eripcpagebar.c.

00153                                                   {
00154     erIpcCmd_t cmd;
00155 
00156     cmd.cc = ccPbRedraw;
00157     strcpy(cmd.name, pbFunctionNames[ccPbRedraw]);
00158     cmd.nArg = 1;
00159     sprintf(cmd.arg[0], "%d", uaID);
00160         
00161     return erIpcSndCommand(channel, &cmd);
00162 }

Here is the call graph for this function:

int pbRemoveBookmark ( erClientChannel_t  channel,
int  uaID,
int  value 
)

Removes a bookmark from the pagebar

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
value The bookmark value to remove
Returns:
A value of 0 signals success

Definition at line 118 of file eripcpagebar.c.

00118                                                                      {
00119     return pbCallFunction(channel, uaID, ccPbRemoveBookmark, value);
00120 }

Here is the call graph for this function:

int pbRemoveNote ( erClientChannel_t  channel,
int  uaID,
int  value 
)

Removes a note from the pagebar

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
value The note value to remove
Returns:
A value of 0 signals success

int pbReportSynchronise ( erClientChannel_t  channel,
int  uaID 
)

Used to report synchronise event. (From pagebar to application)

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
Returns:
A value of 0 signals success

Definition at line 172 of file eripcpagebar.c.

00173 {
00174     // printf("\nSend synchronise message to application\n");
00175     return pbCallFunction(channel, uaID, ccVwrPagebarSync, 0);
00176 }

Here is the call graph for this function:

int pbReset ( erClientChannel_t  channel,
int  uaID 
)

Resets the pagebar to the default settings This function must be called eached time a new application gets / regains the focus

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
Returns:
A value of 0 signals success

Definition at line 138 of file eripcpagebar.c.

00138                                                  {
00139     erIpcCmd_t cmd;
00140 
00141     cmd.cc = ccPbReset;
00142     strcpy(cmd.name, pbFunctionNames[ccPbReset]);
00143     cmd.nArg = 1;
00144     sprintf(cmd.arg[0], "%d", uaID);
00145             
00146     return erIpcSndCommand(channel, &cmd);
00147 }

Here is the call graph for this function:

int pbSetBarFontHeight ( erClientChannel_t  channel,
int  uaID,
int  size 
)

Sets the fontheight

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
size The height of the font
Returns:
A value of 0 signals success

Definition at line 110 of file eripcpagebar.c.

00110                                                                         {
00111     return pbCallFunction(channel, uaID, ccPbSetBarFontHeight, height);
00112 }

Here is the call graph for this function:

int pbSetBarFontType ( erClientChannel_t  channel,
int  uaID,
int  font 
)

Sets the fonttype used by the pagebar

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
font The type of the font
Returns:
A value of 0 signals success

Definition at line 106 of file eripcpagebar.c.

00106                                                                     {
00107     return pbCallFunction(channel, uaID, ccPbSetBarFontType, font);
00108 }

Here is the call graph for this function:

int pbSetBookmarkMax ( erClientChannel_t  channel,
int  uaID,
int  max 
)

Sets the maximum value of the bookmark

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
max The maximum value
Returns:
A value of 0 signals success

Definition at line 122 of file eripcpagebar.c.

00122                                                                    {
00123     return pbCallFunction(channel, uaID, ccPbSetBookmarkMax, max);
00124 }

Here is the call graph for this function:

int pbSetCurrentPage ( erClientChannel_t  channel,
int  uaID,
int  page 
)

Sets the current page

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
page The new current page
Returns:
A value of 0 signals success

Definition at line 74 of file eripcpagebar.c.

00074                                                                     {
00075     return pbCallFunction(channel, uaID, ccPbSetCurrentPage, page);
00076 }

Here is the call graph for this function:

int pbSetCurrentPageOffset ( erClientChannel_t  channel,
int  uaID,
int  pageoffset 
)

Sets the current pageoffset

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
pageoffset The new current pageoffset expressed in percentage
Returns:
A value of 0 signals success

Definition at line 78 of file eripcpagebar.c.

00078                                                                                 {
00079     return pbCallFunction(channel, uaID, ccPbSetCurrentPageOffset, pageoffset);
00080 }

Here is the call graph for this function:

int pbSetDrawAreaHOrigin ( erClientChannel_t  channel,
int  uaID,
int  origin 
)

Sets the horizontal origin of the bar.

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
origin The horizontal origin expressed in pixels
Returns:
A value of 0 signals success

Definition at line 90 of file eripcpagebar.c.

00090                                                                           {
00091     return pbCallFunction(channel, uaID, ccPbSetDrawAreaHOrigin, origin);
00092 }

Here is the call graph for this function:

int pbSetDrawAreaHSize ( erClientChannel_t  channel,
int  uaID,
int  size 
)

Sets the horizontal size of the bar.

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
size The horizontal size expressed in pixels
Returns:
A value of 0 signals success

Definition at line 98 of file eripcpagebar.c.

00098                                                                       {
00099     return pbCallFunction(channel, uaID, ccPbSetDrawAreaHSize, size);
00100 }

Here is the call graph for this function:

int pbSetDrawAreaOrientation ( erClientChannel_t  channel,
int  uaID,
int  orientation 
)

Sets the orientation of the pagebar

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
orientation The new orientation of the pagebar
Returns:
A value of 0 signals success

Definition at line 86 of file eripcpagebar.c.

00086                                                                                    {
00087     return pbCallFunction(channel, uaID, ccPbSetDrawAreaOrientation, orientation);
00088 }

Here is the call graph for this function:

int pbSetDrawAreaVOrigin ( erClientChannel_t  channel,
int  uaID,
int  origin 
)

Sets the vertical origin of the bar.

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
origin The vertical origin expressed in pixels
Returns:
A value of 0 signals success

Definition at line 94 of file eripcpagebar.c.

00094                                                                           {
00095     return pbCallFunction(channel, uaID, ccPbSetDrawAreaVOrigin, origin);
00096 }

Here is the call graph for this function:

int pbSetDrawAreaVSize ( erClientChannel_t  channel,
int  uaID,
int  size 
)

Sets the vertical size of the bar.

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
size The vertical size expressed in pixels
Returns:
A value of 0 signals success

Definition at line 102 of file eripcpagebar.c.

00102                                                                       {
00103     return pbCallFunction(channel, uaID, ccPbSetDrawAreaVSize, size);
00104 }

Here is the call graph for this function:

int pbSetNotesMax ( erClientChannel_t  channel,
int  uaID,
int  max 
)

Sets the maximum value of the notes

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
max The maximum value
Returns:
A value of 0 signals success

Definition at line 134 of file eripcpagebar.c.

00134                                                                 {
00135     return pbCallFunction(channel, uaID, ccPbSetNotesMax, max);
00136 }

Here is the call graph for this function:

int pbSetPageCount ( erClientChannel_t  channel,
int  uaID,
int  pagecount 
)

Sets the number of pages in the pagebar

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
pagecount Number of pages
Returns:
A value of 0 signals success

Definition at line 70 of file eripcpagebar.c.

00070                                                                        {
00071     return pbCallFunction(channel, uaID, ccPbSetPageCount, pagecount);
00072 }

Here is the call graph for this function:

int pbSetZoomMode ( erClientChannel_t  channel,
int  uaID,
int  zoomMode 
)

Sets the zoom mode

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
zoomMode The zoom Mode: 0 means overview mode, 1 means zoomed mode
Returns:
A value of 0 signals success

Definition at line 82 of file eripcpagebar.c.

00082                                                                      {
00083     return pbCallFunction(channel, uaID, ccPbSetZoomMode, zoomMode);
00084 }

Here is the call graph for this function:

int pbShow ( erClientChannel_t  channel,
int  uaID,
int  show 
)

Shows the pagebar A call to pbRedraw must be made before the pagebar is shown/hidden on the screen

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
show 0: hide, 1: show
Returns:
A value of 0 signals success

Definition at line 149 of file eripcpagebar.c.

00149                                                           {
00150     return pbCallFunction(channel, uaID, ccPbShow, show);
00151 }

Here is the call graph for this function:

int pbSynchronise ( erClientChannel_t  channel,
int  uaID 
)

Used to synchronise pagebar. (From application to pagebar)

Parameters:
channel Opaque datastructure that contains info on communication channel
uaID application identifier
Returns:
A value of 0 signals success

Definition at line 165 of file eripcpagebar.c.

00166 {
00167     // printf("\nSend synchronise message to pagebar\n");
00168     return pbCallFunction(channel, uaID, ccPbSynchronise, 0);
00169 }

Here is the call graph for this function:


Generated on Sun Dec 14 17:11:37 2008 by  doxygen 1.5.6