OSDN Git Service

add panels source by automatically generated.
authorornse01 <ornse01@users.sourceforge.jp>
Wed, 2 May 2012 09:23:35 +0000 (09:23 +0000)
committerornse01 <ornse01@users.sourceforge.jp>
Wed, 2 May 2012 09:23:35 +0000 (09:23 +0000)
git-svn-id: http://svn.sourceforge.jp/svnroot/bchan/bchanl/trunk@460 20a0b8eb-f62a-4a12-8fe1-b598822500fb

src/Makefile
src/bchanl_panels.c [new file with mode: 0644]
src/bchanl_panels.h [new file with mode: 0644]
src/bchanl_panels.yaml [new file with mode: 0644]
src/makefile_codegen

index bea610e..98f3fde 100644 (file)
@@ -38,7 +38,7 @@ VPATH = $(S)
 HEADER := $(S) $(HEADER) ../src/bchanf/src
 
 # ¥½¡¼¥¹¥Õ¥¡¥¤¥ë
-SRC =  main.c subjectcache.c subjectparser.c subjectlayout.c cache.c bbsmenucache.c bbsmenuparser.c bbsmenulayout.c bchanl_subject.c retriever.c subjectretriever.c tadlib.c bbsmenuretriever.c bbsmenufilter.c bchanl_hmi.c bchanl_menus.c subjectlist.c extbbslist.c
+SRC =  main.c subjectcache.c subjectparser.c subjectlayout.c cache.c bbsmenucache.c bbsmenuparser.c bbsmenulayout.c bchanl_subject.c retriever.c subjectretriever.c tadlib.c bbsmenuretriever.c bbsmenufilter.c bchanl_hmi.c bchanl_menus.c subjectlist.c extbbslist.c bchanl_panels.c
 
 # ¥Ç¡¼¥¿¥Ü¥Ã¥¯¥¹¥½¡¼¥¹¥Õ¥¡¥¤¥ë
 DBSRC =
diff --git a/src/bchanl_panels.c b/src/bchanl_panels.c
new file mode 100644 (file)
index 0000000..0cb37df
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * bchanl_panels.c
+ *
+ * Copyright (c) 2012 project bchan
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ *    distribution.
+ *
+ */
+
+/* This file is automatically generated. */
+
+#include    "bchanl_panels.h"
+
+#include       <bstdio.h>
+#include       <bstdlib.h>
+#include       <tcode.h>
+#include       <tstring.h>
+#include       <btron/btron.h>
+#include       <btron/hmi.h>
+#include       <btron/vobj.h>
+
+#if PANEL_DEBUG
+# define DP(arg) printf arg
+# define DP_ER(msg, err) printf("%s (%d/%x)\n", msg, err>>16, err)
+#else
+# define DP(arg) /**/
+# define DP_ER(msg, err) /**/
+#endif
+
+EXPORT BCHAN_PANELS_SAVECONFIRM_RESULT bchan_panels_saveconfirm()
+{
+       PNL_ITEM pnl_item[6];
+       PNID pnid0;
+       PNT p0 = {0x8000,0x8000};
+       WEVENT wev0;
+       W stat,itemno;
+       BCHAN_PANELS_SAVECONFIRM_RESULT ret;
+       PANEL pnl = {
+               2,0x48,0,
+               {{0, 0, 360, 120}},
+               0,
+               6,
+               pnl_item
+       };
+
+       pnl_item[0].itype = TEXT_ITEM|ATR_TEXT;
+       pnl_item[0].info = 0;
+       pnl_item[0].ir = (RECT){{24,24,24+304,24+16}};
+       pnl_item[0].desc = 0;
+       pnl_item[0].dnum = 0;
+       pnl_item[0].ptr = (H*)(TC[]){0x383d, 0x3a5f, 0x244e, 0x4662, 0x4d46, 0x244f, 0x3835, 0x244e, 0x4662, 0x4d46, 0x2448, 0x305b, 0x244a, 0x2443, 0x2446, 0x2424, 0x245e, 0x2439, 0x2123, TNULL};
+       pnl_item[1].itype = TEXT_ITEM|ATR_TEXT;
+       pnl_item[1].info = 0;
+       pnl_item[1].ir = (RECT){{24,48,24+224,48+16}};
+       pnl_item[1].desc = 0;
+       pnl_item[1].dnum = 0;
+       pnl_item[1].ptr = (H*)(TC[]){0x4a5d, 0x4238, 0x2437, 0x2446, 0x4a54, 0x3d38, 0x2472, 0x3d2a, 0x4e3b, 0x2437, 0x245e, 0x2439, 0x242b, 0x2129, TNULL};
+       pnl_item[2].itype = NULL_ITEM;
+       pnl_item[2].info = 0;
+       pnl_item[2].ir = (RECT){{256,48,256+16,48+16}};
+       pnl_item[2].desc = 0;
+       pnl_item[2].dnum = 0;
+       pnl_item[2].ptr = NULL;
+       pnl_item[3].itype = PARTS_ITEM;
+       pnl_item[3].info = 0;
+       pnl_item[3].ir = (RECT){{24,72,24+96,72+24}};
+       pnl_item[3].desc = 0;
+       pnl_item[3].dnum = 0;
+       pnl_item[3].ptr = (H*)&(SWSEL){MS_PARTS|P_DISP, (RECT){{0, 0, 96, 24}}, 0, (TC[]){MC_STR, 0x3c68, 0x246a, 0x3e43, 0x2437, TNULL}, {0, 0, -1, 0}};
+       pnl_item[4].itype = PARTS_ITEM;
+       pnl_item[4].info = 0;
+       pnl_item[4].ir = (RECT){{132,72,132+96,72+24}};
+       pnl_item[4].desc = 0;
+       pnl_item[4].dnum = 0;
+       pnl_item[4].ptr = (H*)&(SWSEL){MS_PARTS|P_DISP, (RECT){{0, 0, 96, 24}}, 0, (TC[]){MC_STR, 0x4a5d, 0x4238, 0x2437, 0x244a, 0x2424, TNULL}, {0, 0, -1, 0}};
+       pnl_item[5].itype = PARTS_ITEM;
+       pnl_item[5].info = 0;
+       pnl_item[5].ir = (RECT){{240,72,240+96,72+24}};
+       pnl_item[5].desc = 0;
+       pnl_item[5].dnum = 0;
+       pnl_item[5].ptr = (H*)&(SWSEL){MS_PARTS|P_DISP, (RECT){{0, 0, 96, 24}}, 0, (TC[]){MC_STR, 0x4a5d, 0x4238, TNULL}, {0, 0, -1, 0}};
+
+       pnid0 = pcre_pnl(&pnl, &p0);
+       if (pnid0 < 0) {
+               DP_ER("pcre_pnl error", pnid0);
+               return pnid0;
+       }
+
+       for (;;) {
+               ret = -1;
+               stat = pact_pnl(pnid0, &wev0.e, &itemno);
+               switch (stat) {
+               case    P_EVENT:
+                       if (wev0.s.type == EV_DEVICE) {
+                               oprc_dev(&wev0.e, NULL, 0);
+                       }
+                       continue;
+               default:
+                       if (itemno == (3 + 1)) {
+                               ret = BCHAN_PANELS_SAVECONFIRM_RESULT_CANCEL;
+                               break;
+                       }
+                       if (itemno == (4 + 1)) {
+                               ret = BCHAN_PANELS_SAVECONFIRM_RESULT_OK_NOSAVE;
+                               break;
+                       }
+                       if (itemno == (5 + 1)) {
+                               ret = BCHAN_PANELS_SAVECONFIRM_RESULT_OK_SAVE;
+                               break;
+                       }
+
+                       if (itemno >= 0) {
+                               continue;
+                       }
+               case    0x5001:
+                       if (itemno == (3 + 1)) {
+                               ret = BCHAN_PANELS_SAVECONFIRM_RESULT_CANCEL;
+                               break;
+                       }
+                       if (itemno == (4 + 1)) {
+                               ret = BCHAN_PANELS_SAVECONFIRM_RESULT_OK_NOSAVE;
+                               break;
+                       }
+                       if (itemno == (5 + 1)) {
+                               ret = BCHAN_PANELS_SAVECONFIRM_RESULT_OK_SAVE;
+                               break;
+                       }
+
+                       if (itemno >= 0) {
+                               continue;
+                       }
+                       break;
+               }
+               if (ret != -1) {
+                       break;
+               }
+       }
+
+       pdel_pnl(pnid0);
+
+       return ret;
+}
+
+
diff --git a/src/bchanl_panels.h b/src/bchanl_panels.h
new file mode 100644 (file)
index 0000000..7688475
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * bchanl_panels.h
+ *
+ * Copyright (c) 2012 project bchan
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ *    distribution.
+ *
+ */
+
+/* This file is automatically generated. */
+
+#include    <basic.h>
+#include       <btron/dp.h>
+#include       <btron/hmi.h>
+
+#ifndef __BCHANL_PANELS_H__
+#define __BCHANL_PANELS_H__
+
+enum BCHAN_PANELS_SAVECONFIRM_RESULT_ {
+       BCHAN_PANELS_SAVECONFIRM_RESULT_CANCEL,
+       BCHAN_PANELS_SAVECONFIRM_RESULT_OK_NOSAVE,
+       BCHAN_PANELS_SAVECONFIRM_RESULT_OK_SAVE,
+};
+typedef enum BCHAN_PANELS_SAVECONFIRM_RESULT_ BCHAN_PANELS_SAVECONFIRM_RESULT;
+
+IMPORT BCHAN_PANELS_SAVECONFIRM_RESULT bchan_panels_saveconfirm();
+
+#endif
diff --git a/src/bchanl_panels.yaml b/src/bchanl_panels.yaml
new file mode 100644 (file)
index 0000000..478b59f
--- /dev/null
@@ -0,0 +1,115 @@
+#
+# bchanl_hmi.yaml
+#
+# Copyright (c) 2012 project bchan
+#
+# This software is provided 'as-is', without any express or implied
+# warranty. In no event will the authors be held liable for any damages
+# arising from the use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+#    claim that you wrote the original software. If you use this software
+#    in a product, an acknowledgment in the product documentation would be
+#    appreciated but is not required.
+#
+# 2. Altered source versions must be plainly marked as such, and must not be
+#    misrepresented as being the original software.
+#
+# 3. This notice may not be removed or altered from any source
+#    distribution.
+#
+
+generator:
+  output_source: bchanl_panels.c
+  output_header: bchanl_panels.h
+  lisence_source: |
+    /*
+     * bchanl_panels.c
+     *
+     * Copyright (c) 2012 project bchan
+     *
+     * This software is provided 'as-is', without any express or implied
+     * warranty. In no event will the authors be held liable for any damages
+     * arising from the use of this software.
+     *
+     * Permission is granted to anyone to use this software for any purpose,
+     * including commercial applications, and to alter it and redistribute it
+     * freely, subject to the following restrictions:
+     *
+     * 1. The origin of this software must not be misrepresented; you must not
+     *    claim that you wrote the original software. If you use this software
+     *    in a product, an acknowledgment in the product documentation would be
+     *    appreciated but is not required.
+     *
+     * 2. Altered source versions must be plainly marked as such, and must not be
+     *    misrepresented as being the original software.
+     *
+     * 3. This notice may not be removed or altered from any source
+     *    distribution.
+     *
+     */
+  lisence_header: |
+    /*
+     * bchanl_panels.h
+     *
+     * Copyright (c) 2012 project bchan
+     *
+     * This software is provided 'as-is', without any express or implied
+     * warranty. In no event will the authors be held liable for any damages
+     * arising from the use of this software.
+     *
+     * Permission is granted to anyone to use this software for any purpose,
+     * including commercial applications, and to alter it and redistribute it
+     * freely, subject to the following restrictions:
+     *
+     * 1. The origin of this software must not be misrepresented; you must not
+     *    claim that you wrote the original software. If you use this software
+     *    in a product, an acknowledgment in the product documentation would be
+     *    appreciated but is not required.
+     *
+     * 2. Altered source versions must be plainly marked as such, and must not be
+     *    misrepresented as being the original software.
+     *
+     * 3. This notice may not be removed or altered from any source
+     *    distribution.
+     *
+     */
+
+panels:
+  - panel_name: bchan_panels_saveconfirm
+    lines:
+      - items:
+        - type: fixedtext
+          text: ¸½ºß¤ÎÆâÍƤϸµ¤ÎÆâÍƤȰۤʤäƤ¤¤Þ¤¹¡£
+      - items:
+        - type: fixedtext
+          text: Êݸ¤·¤ÆÊÔ½¸¤ò½ªÎ»¤·¤Þ¤¹¤«¡©
+        - type: null_item
+          text: 
+          size:
+            h: 16
+            v: 16
+      - layout: justification
+        items:
+        - type: button
+          text: ¼è¤ê¾Ã¤·
+          name: cancel
+          size:
+            h: 96
+            v: 24
+        - type: button
+          text: Êݸ¤·¤Ê¤¤
+          name: ok_nosave
+          size:
+            h: 96
+            v: 24
+        - type: button
+          text: Êݸ
+          name: ok_save
+          size:
+            h: 96
+            v: 24
index 17fbf43..ba60060 100644 (file)
@@ -1,4 +1,7 @@
-all: bchanl_hmi.c bchanl_hmi.h
+all: bchanl_hmi.c bchanl_hmi.h bchanl_panels.c bchanl_panels.h
 
 bchanl_hmi.c bchanl_hmi.h: bchanl_hmi.yaml bchanf/src/tools/hmi_generator.rb
-       ruby bchanf/src/tools/hmi_generator.rb bchanl_hmi.yaml
\ No newline at end of file
+       ruby bchanf/src/tools/hmi_generator.rb bchanl_hmi.yaml
+
+bchanl_panels.c bchanl_panels.h: bchanl_panels.yaml bchanf/src/tools/panel_generator.rb
+       ruby bchanf/src/tools/panel_generator.rb bchanl_panels.yaml