00001 /* 00002 * This file is part of scribble. 00003 * 00004 * scribble 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 * scribble 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 00032 #ifndef __SCRIBBLE_IPC_H__ 00033 #define __SCRIBBLE_IPC_H__ 00034 00035 #include <gtk/gtk.h> 00036 00037 #include "ScribbleDefine.h" 00038 #include "ScribbleUtils.h" 00039 00040 #define SCRIB_SERVER_BUFFER_SIZE (1024) 00041 00049 extern gboolean installIpcServer(PScribbleUICtx pScribbleUICtx); 00050 00051 00057 extern void stopIpcServer(void); 00058 00059 00066 extern void pagebar_init(); 00067 00075 extern void pagebar_goto_page(int page); 00076 00084 extern void pagebar_set_pagecount(int count); 00085 00086 00094 extern void pagebar_redraw(); 00095 00096 00097 00099 00100 typedef enum { 00101 MODE_DRAW=0, 00102 MODE_SELSIZE=1,//when selecting the pen size 00103 MODE_SELCOLOR=2,//when selecting the color 00104 MODE_ERASE=3, 00105 MODE_DELPAGE=4,//when wanna deleting pages 00106 MODE_INVALID=5,//initially,invalid 00107 }OPERATION_MODE; 00108 00114 extern void toolbar_init(void); 00115 00124 extern void toolbar_key_selected(int iconID, int iconState, 00125 PScribbleUICtx pScribbleUICtx); 00126 00127 00128 extern OPERATION_MODE getOperationMode(); 00129 00130 void setOperationMode(OPERATION_MODE iOpMode); 00131 00132 extern HW_COLOR getPenColor(); 00133 00134 void setPenColor(HW_COLOR iHwColor); 00135 00136 extern PEN_SIZE getPenSize(); 00137 00138 void setPenSize(PEN_SIZE iPenSize); 00139 00140 //wait confirm deleting? 00141 extern gboolean toolbar_is_waitconfirmdel(); 00142 00143 //set page-delelted confirmed. 00144 extern void toolbar_confirm_delpage(); 00145 00146 //in mode_erase? 00147 extern gboolean toolbar_is_erasing(); 00148 00149 //can draw point 00150 extern gboolean toolbar_is_drawing(); 00151 00152 //clear the toolbar to make, avoid toolbar exists issue when scribble quit. 00153 extern void toolbar_clearall(); 00154 00155 //first init the toolbar,set it to MODE_DRAW 00156 extern void toolbar_firstinit(int iTotalPage); 00157 00158 //reinit the toolbar,reset all the status,include the pages 00159 extern void toolbar_reinit(int iTotalPage); 00160 00161 #endif 00162
1.5.6