00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00032 #include <liberipc/eripc.h>
00033 #include <liberipc/eripcpagebar.h>
00034
00035 #include "ScribbleIPC.h"
00036 #include "ScribbleLog.h"
00037
00038 static erClientChannel_t erPagebarChannel;
00039
00040
00041 void pagebar_init()
00042 {
00043 int iRet=-1;
00044 SB_PAGEBARPRINTF("entry\n");
00045 iRet=erIpcStartClient(ER_PAGEBAR_CHANNEL, &erPagebarChannel);
00046 if (iRet != 0)
00047 {
00048 SB_ERRORPRINTF("erIpcStartClient returned %d\n", iRet);
00049 return;
00050 }
00051 pbReset(erPagebarChannel, ER_SCRIBBLE_UA_ID);
00052 }
00053
00054
00055 void pagebar_goto_page(int page)
00056 {
00057 SB_PAGEBARPRINTF("entry %d\n", page);
00058 pbSetCurrentPage(erPagebarChannel, ER_SCRIBBLE_UA_ID, page);
00059 }
00060
00061
00062 void pagebar_set_pagecount(int count)
00063 {
00064 SB_PAGEBARPRINTF("entry %d\n", count);
00065 pbSetPageCount(erPagebarChannel, ER_SCRIBBLE_UA_ID, count);
00066 }
00067
00068
00069 void pagebar_redraw()
00070 {
00071 SB_PAGEBARPRINTF("redraw\n");
00072 pbRedraw(erPagebarChannel, ER_SCRIBBLE_UA_ID);
00073 }