OSDN Git Service

Updated the lcdtool to version 0.0.3.
[bluetank/bluetank.git] / soft / utils / lcdtool / lcdprof.h
diff --git a/soft/utils/lcdtool/lcdprof.h b/soft/utils/lcdtool/lcdprof.h
new file mode 100644 (file)
index 0000000..060bc1e
--- /dev/null
@@ -0,0 +1,85 @@
+/**
+ * @file lcdprof.h
+ * @author Copyright(C) 2012 Shinichiro Nakamura
+ * @brief LCD Profile Model.
+ */
+
+/*
+ * ===============================================================
+ *  LCD Image Tool
+ * ===============================================================
+ * Copyright (c) 2012 Shinichiro Nakamura
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ * ===============================================================
+ */
+
+#ifndef LCDPROF_H
+#define LCDPROF_H
+
+typedef struct {
+    int r;  /**< Red */
+    int g;  /**< Green */
+    int b;  /**< Blue */
+} LCDCOL;
+
+typedef struct {
+    int chcnt_x;    /**< Character Count X */
+    int chcnt_y;    /**< Character Count Y */
+    int chofs_x;    /**< Character Offset X */
+    int chofs_y;    /**< Character Offset Y */
+    int chgap_x;    /**< Character Gap X */
+    int chgap_y;    /**< Character Gap Y */
+    int pixsiz_x;   /**< Pixel Size X */
+    int pixsiz_y;   /**< Pixel Size Y */
+    int pixgap_x;   /**< Pixel Gap X */
+    int pixgap_y;   /**< Pixel Gap Y */
+    LCDCOL fgcol;   /**< Foreground Color */
+    LCDCOL bgcol;   /**< Background Color */
+    int contrast;   /**< Contrast */
+} LCDPROF;
+
+#define LCDPROF_INIT(P) \
+    do { \
+        (P)->chcnt_x = 16; \
+        (P)->chcnt_y =  2; \
+        (P)->chofs_x = 16; \
+        (P)->chofs_y = 16; \
+        (P)->chgap_x = 2; \
+        (P)->chgap_y = 2; \
+        (P)->pixsiz_x = 4; \
+        (P)->pixsiz_y = 4; \
+        (P)->pixgap_x = 1; \
+        (P)->pixgap_y = 1; \
+        (P)->fgcol.r = 0; \
+        (P)->fgcol.g = 0; \
+        (P)->fgcol.b = 0; \
+        (P)->bgcol.r = 0; \
+        (P)->bgcol.g = 200; \
+        (P)->bgcol.b = 0; \
+        (P)->contrast = 100; \
+    } while (0)
+
+int lcdprof_read(const char *filename, LCDPROF *prof, int verbose);
+
+#endif
+