scbcolor.h

Go to the documentation of this file.
00001 #ifndef SCBCOLOR_H_
00002 #define SCBCOLOR_H_
00003 
00004 /*
00005  * File Name  : scbcolor.h
00006  *
00007  * Description: Scribble library color definition
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 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041 
00042     
00043 //----------------------------------------------------------------------------
00044 // Definitions
00045 //---------------------------------------------------------------------------- 
00046 
00047 
00048 //----------------------------------------------------------------------------
00049 // Forward Declarations
00050 //----------------------------------------------------------------------------
00051 
00052 
00053 //----------------------------------------------------------------------------
00054 // Type Declarations
00055 //----------------------------------------------------------------------------
00056 
00057 typedef enum _ScbDevColor
00058 {
00059     ERSCRIBBLE_DEV_COLOR_WHITE         = 0, 
00060     ERSCRIBBLE_DEV_COLOR_LIGHT_GRAY    = 1,
00061     ERSCRIBBLE_DEV_COLOR_DARK_GRAY     = 2,
00062     ERSCRIBBLE_DEV_COLOR_BLACK         = 3,
00063     ERSCRIBBLE_DEV_COLOR_UNKNOWN       = 0xffffffff
00064 } ScbDevColor;
00065 
00066 typedef struct _ScbColor
00067 {
00068     unsigned long   pixel;      /**< for allocated colors, the value is used to draw
00069                                      this color on the screen */
00070     unsigned short  red;        /**< value of red weight */
00071     unsigned short  green;      /**< value of green weight */
00072     unsigned short  blue;       /**< value of blue weight */
00073 } ScbColor;
00074 
00075 typedef ScbColor * ScbColorPtr;
00076 
00077 
00078 //----------------------------------------------------------------------------
00079 // Global Constants
00080 //----------------------------------------------------------------------------
00081 
00082 
00083 //============================================================================
00084 // Public Functions
00085 //============================================================================
00086 
00087 // Convert the scribble color to device color
00088 // @param ptr the scribble color
00089 // @return the converted device color
00090 ScbDevColor erscribble_color_to_dev_color(ScbColorPtr ptr);
00091 
00092 // Convert device color to scribble color
00093 // @param ptr the scribble color result
00094 // @param color the original device color
00095 void erscribble_dev_color_to_color(ScbColorPtr ptr, const ScbDevColor color);
00096 
00097 
00098 #ifdef __cplusplus
00099 }
00100 #endif
00101 
00102 #endif /* SCBCOLOR_H_ */
Generated by  doxygen 1.6.2-20100208