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 00023 #ifndef _SCRIBBLECORE_H 00024 #define _SCRIBBLECORE_H 00025 00026 #ifdef __cplusplus 00027 extern "C" 00028 { 00029 #endif 00030 00031 #include <stdlib.h> 00032 00033 #include <sys/ioctl.h> 00034 #include <fcntl.h> 00035 00036 #include "ScribbleDefine.h" 00037 00038 void initScribbleCoreCtx(PScribbleCoreCtx pScribbleCoreCtx); 00039 00040 //destroy core context 00041 void destroyScribbleCoreCtx(PScribbleCoreCtx pScribbleCoreCtx); 00042 00043 //generate a new current stroke 00044 void genNewCurrentStroke(PScribbleCoreCtx pScribbleCoreCtx); 00045 00046 //flush deleted stroke on screen 00047 void core_flush_delstroke_onscreen(PScribbleUICtx pScribbleUICtx); 00048 00049 void core_process_points(PScribbleUICtx pScribbleUICtx); 00050 00051 int core_addpoint2buf(PointsBuf *ppointsBuf,int x,int y, 00052 int iPenSize,unsigned char iHwColor,unsigned char iPenDown); 00053 00054 void core_add_point(PScribbleUICtx pScribbleUICtx,int x, int y); 00055 00056 void core_eraseStrokes(PScribbleUICtx pScribbleUICtx,GdkPoint *pCurPoint); 00057 00058 //redraw current strokes and background pixel to pixmap. 00059 int core_redrawBgAndStrks(PScribbleUICtx pScribbleUICtx); 00060 00061 //load specified page and resultimage 00062 int loadPageAndResultImg(PScribbleUICtx pScribbleUICtx); 00063 00064 //flush current pixmap to screen object. 00065 void flushPixMap(PScribbleUICtx pScribbleUICtx); 00066 00067 //save current ink of page,result image will saved when quitting. 00068 //bAppQuit--if scribble is to quit. 00069 int savePageAndResultImg(PScribbleUICtx pScribbleUICtx,gboolean bAppQuit); 00070 00071 00072 #ifdef __cplusplus 00073 } 00074 #endif 00075 00076 #endif
1.5.6