scbconfig.h

Go to the documentation of this file.
00001 #ifndef SCBCONFIG_H_
00002 #define SCBCONFIG_H_
00003 
00004 /*
00005  * File Name  : scbconfig.h
00006  *
00007  * Description: Scribble library constant and default configuration
00008  */
00009 
00010 /*
00011  * This file is part of liberscribble.
00012  *
00013  * liberscribble is free software: you can redistribute it and/or modify
00014  * it under the terms of the GNU General Public License as published by
00015  * the Free Software Foundation, either version 2 of the License, or
00016  * (at your option) any later version.
00017  *
00018  * liberscribble is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00025  */
00026 
00027 /**
00028  * Copyright (C) 2008 iRex Technologies B.V.
00029  * All rights reserved.
00030  */
00031 
00032 
00033 //----------------------------------------------------------------------------
00034 // Include Files
00035 //----------------------------------------------------------------------------
00036 
00037 // system include files, between < >
00038 #include <stdio.h>
00039 
00040 #ifdef WIN32
00041 #include <windows.h>
00042 #define snprintf _snprintf
00043 #endif
00044 
00045 // ereader include files, between < >
00046 
00047 // local include files, between " "
00048 
00049 #ifdef __cplusplus
00050 extern "C"
00051 {
00052 #endif
00053 
00054 
00055 //----------------------------------------------------------------------------
00056 // Definitions
00057 //---------------------------------------------------------------------------- 
00058 
00059 #define ERSCRIBBLE_LIB_VERSION_MAJOR       1
00060 #define ERSCRIBBLE_LIB_VERSION_MINOR       1
00061 #define ERSCRIBBLE_LIB_ORG                 "iRex Technologies"
00062 
00063 #define ERSCRIBBLE_DEF_SCREEN_UNITS        "px"
00064 #define ERSCRIBBLE_DEF_SCREEN_DPI          160
00065 
00066 // return values used by scribble functions
00067 #define ERSCRIBBLE_RET_OK                  1
00068 #define ERSCRIBBLE_RET_ERR                 0
00069 #define ERSCRIBBLE_INVALID_COUNT           -1
00070 
00071 // default zoom factor
00072 #define ERSCRIBBLE_DEF_ZOOM_FACTOR         1.0f
00073 
00074 // scribble shape id
00075 #define ERSCRIBBLE_DEF_SHAPE_LINE          0
00076 
00077 // default value for stroke size
00078 #define ERSCRIBBLE_DEF_STROKE_POINTSIZE    40
00079 #define ERSCRIBBLE_DEF_STROKE_LAYER        0
00080 #define ERSCRIBBLE_DEF_STROKE_LINESTYLE    ERSCRIBBLE_LINE_SOLID
00081 #define ERSCRIBBLE_DEF_STROKE_PENSIZE      3
00082 
00083 // default value for configuration
00084 #define ERSCRIBBLE_DEF_DRIVER_DRAW_COUNT     10
00085 #define ERSCRIBBLE_DEF_DRIVER_DRAW_TIME      100 * 100   // micro second
00086 #define ERSCRIBBLE_DEF_DRIVER_DRAW_BUF_LEN   25          // must be 25!
00087 
00088 // default value for page & page id
00089 #define ERSCRIBBLE_MAX_PAGEID_LEN          256
00090 #define ERSCRIBBLE_DEF_PAGE_LEFT           0
00091 #define ERSCRIBBLE_DEF_PAGE_TOP            0
00092 #define ERSCRIBBLE_DEF_PAGE_RIGHT          1024
00093 #define ERSCRIBBLE_DEF_PAGE_BOTTOM         1280
00094 
00095 // default value for path
00096 #define ERSCRIBBLE_MAX_PATH                1024
00097 
00098 // default vlaue for color
00099 #define ERSCRIBBLE_MAX_COLOR_LEN           8
00100 
00101 // default value for erase
00102 #define ERSCRIBBLE_DEF_ERASE_SIZE          5
00103 
00104 #define ERSCRIBBLE_DEF_CMD_ACT_SIZE        10
00105 
00106 // invalid shape id
00107 #define ERSCRIBBLE_INVALID_SHAPE           -1
00108 
00109 // invalid size id
00110 #define ERSCRIBBLE_INVALID_SIZE            -1
00111 
00112 // application data items
00113 #define ERSCRIBBLE_VERSION_MAJOR           "scribble_version_major"
00114 #define ERSCRIBBLE_VERSION_MINOR           "scribble_version_minor"
00115 #define ERSCRIBBLE_VERSION_COMPANY         "scribble_version_company"
00116 #define ERSCRIBBLE_SCREEN_DPI              "scribble_screen_dpi"
00117 #define ERSCRIBBLE_SCREEN_UNITS            "scribble_screen_units"
00118 
00119 #define ERSCRIBBLE_ANNOTATION_TYPE         "scribble"
00120 
00121 
00122 //----------------------------------------------------------------------------
00123 // Forward Declarations
00124 //----------------------------------------------------------------------------
00125 
00126 
00127 //----------------------------------------------------------------------------
00128 // Type Declarations
00129 //----------------------------------------------------------------------------
00130 
00131 typedef struct _ScbDriverDrawParam
00132 {
00133     int     count;    // max points before draw
00134     int     time;     // max time before draw
00135 } ScbDriverDrawParam;
00136 
00137 typedef ScbDriverDrawParam * ScbDriverDrawParamPtr;
00138 
00139 
00140 //----------------------------------------------------------------------------
00141 // Global Constants
00142 //----------------------------------------------------------------------------
00143 
00144 
00145 //============================================================================
00146 // Public Functions
00147 //=========================================================================
00148 
00149 // Initialize the drawing paramters for driver
00150 void erscribble_cfg_init_driver_draw_param();
00151 
00152 // Set drawing parameters for driver
00153 // @param ptr the pointer of updated drawing parameters
00154 void erscribble_cfg_set_driver_draw_param(ScbDriverDrawParamPtr ptr);
00155 
00156 // Get current drawing parameters of driver
00157 // @param ptr the current drawing parameters
00158 void erscribble_cfg_get_driver_draw_param(ScbDriverDrawParamPtr ptr);
00159 
00160 
00161 #ifdef __cplusplus
00162 }
00163 #endif
00164 
00165 #endif
Generated by  doxygen 1.6.2-20100208