00001 /* 00002 * This file is part of contentLister. 00003 * 00004 * contentLister is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * contentLister is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00026 /* contentLister - A GTK based content lister (read only) application on the eReader platform 00027 * Copyright (C) 2005-2008 iRex Technologies B.V. 00028 * All rights reserved. 00029 * 00030 */ 00031 00032 #include <liberipc/eripc.h> 00033 #include <liberipc/eripcpagebar.h> 00034 00035 #include "contentListerLog.h" 00036 00037 00038 static erClientChannel_t erPagebarChannel; 00039 00040 // Init the IPC client 00041 void pagebar_init() 00042 { 00043 CL_IPCPRINTF("entry"); 00044 erIpcStartClient(ER_PAGEBAR_CHANNEL, &erPagebarChannel); 00045 } 00046 00047 // Reset the pageBar for use with contentLister 00048 void pagebar_reset() 00049 { 00050 CL_IPCPRINTF("entry"); 00051 pbReset(erPagebarChannel, ER_CONTENT_LISTER_UA_ID); 00052 } 00053 00054 // Goto new page 00055 void pagebar_goto_page(int page) 00056 { 00057 CL_IPCPRINTF("entry %d", page); 00058 pbSetCurrentPage(erPagebarChannel, ER_CONTENT_LISTER_UA_ID, page); 00059 } 00060 00061 // Set page count 00062 void pagebar_set_pagecount(int count) 00063 { 00064 CL_IPCPRINTF("entry %d", count); 00065 pbSetPageCount(erPagebarChannel, ER_CONTENT_LISTER_UA_ID, count); 00066 00067 } 00068 00069 // Redraw pagebar 00070 void pagebar_redraw() 00071 { 00072 CL_IPCPRINTF("redraw"); 00073 pbRedraw(erPagebarChannel, ER_CONTENT_LISTER_UA_ID); 00074 } 00075 00076 // That's all for now...