00001 /* 00002 * This file is part of liberscribble. 00003 * 00004 * liberscribble 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 * liberscribble 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 00023 #ifndef SCBPAGES_H_ 00024 #define SCBPAGES_H_ 00025 00026 #include "scbpage.h" 00027 #include <glib.h> 00028 00029 #ifdef __cplusplus 00030 extern "C" 00031 { 00032 #endif 00033 00034 typedef struct _ScbPages 00035 { 00036 GList * pages; 00037 }ScbPages; 00038 typedef ScbPages * ScbPagesPtr; 00039 00040 // construct a new page 00041 gboolean scb_pages_new(ScbPagesPtr ptr); 00042 00043 // free 00044 void scb_pages_free(ScbPagesPtr ptr); 00045 00046 // it will check whether or not the page exist 00047 gboolean scb_pages_add_page(ScbPagesPtr pages, ScbPagePtr page); 00048 00049 // detach ScbPage from list without freeing the page 00050 // detach means the page detaches from the list 00051 ScbPagePtr scb_pages_detach_page(ScbPagesPtr pages, ScbPageIdPtr id); 00052 00053 // remove page and remove it from page list 00054 void scb_pages_remove_page(ScbPagesPtr pages, ScbPageIdPtr id); 00055 00056 // get page count 00057 int scb_pages_get_count(ScbPagesPtr ptr); 00058 00059 // get certain page 00060 ScbPagePtr scb_pages_get_page(ScbPagesPtr pages, ScbPageIdPtr id); 00061 00062 // change page id 00063 gboolean scb_pages_change_page_id(ScbPagesPtr pages, ScbPageIdPtr oldId, 00064 ScbPageIdPtr newId); 00065 00066 // save to xml file 00067 gboolean scb_pages_save(ScbPagesPtr pages, ScbXmlPtr xml); 00068 00069 // load from xml file 00070 gboolean scb_pages_load(ScbPagesPtr pages, ScbXmlPtr xml); 00071 00072 // dump 00073 void scb_pages_dump(ScbPagesPtr pages); 00074 00075 #ifdef __cplusplus 00076 } 00077 #endif 00078 00079 #endif
1.5.6