summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eve/widget/pagew.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-08-05 03:39:22 +0200
committerUros Majstorovic <majstor@majstor.org>2020-08-05 03:39:22 +0200
commitcf7c06297d04bade9cd04c056f9ed510e64dd7bd (patch)
treea3b8cc23574b98e10874b51d33c9fe1bfc012663 /code/fe310/eos/eve/widget/pagew.c
parent5cd610a07468137066ea4daa5176c3e7045113b0 (diff)
code -> fw
Diffstat (limited to 'code/fe310/eos/eve/widget/pagew.c')
-rw-r--r--code/fe310/eos/eve/widget/pagew.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/code/fe310/eos/eve/widget/pagew.c b/code/fe310/eos/eve/widget/pagew.c
deleted file mode 100644
index c64c477..0000000
--- a/code/fe310/eos/eve/widget/pagew.c
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-
-#include "eve.h"
-#include "eve_kbd.h"
-#include "unicode.h"
-
-#include "screen/screen.h"
-#include "screen/window.h"
-#include "screen/page.h"
-#include "screen/font.h"
-
-#include "label.h"
-#include "widget.h"
-#include "pagew.h"
-
-void eve_pagew_init(EVEPageWidget *widget, EVERect *g, char *title, EVEFont *font, EVEPage *page) {
- EVEWidget *_widget = &widget->w;
-
- memset(widget, 0, sizeof(EVEPageWidget));
- eve_widget_init(_widget, EVE_WIDGET_TYPE_PAGE, g, eve_pagew_touch, eve_pagew_draw, NULL);
- widget->title = title;
- widget->font = font;
- widget->page = page;
- if (_widget->g.w == 0) _widget->g.w = eve_font_str_w(font, widget->title);
- if (_widget->g.h == 0) _widget->g.h = eve_font_h(font);
-}
-
-int eve_pagew_touch(EVEWidget *_widget, EVEPage *page, uint8_t tag0, int touch_idx) {
- EVEPageWidget *widget = (EVEPageWidget *)_widget;
- EVETouch *t;
- uint16_t evt;
- int ret = 0;
-
- if (touch_idx > 0) return 0;
-
- t = eve_touch_evt(tag0, touch_idx, widget->tag, 1, &evt);
- if (t && evt) {
- if (evt & EVE_TOUCH_ETYPE_TRACK_MASK) {
- if (page && page->handle_evt) page->handle_evt(page, _widget, t, evt, tag0, touch_idx);
- } else if (evt & EVE_TOUCH_ETYPE_TAG_UP) {
- widget->page->open(widget->page, page);
- }
- ret = 1;
- }
- return ret;
-}
-
-uint8_t eve_pagew_draw(EVEWidget *_widget, EVEPage *page, uint8_t tag0) {
- EVEPageWidget *widget = (EVEPageWidget *)_widget;
-
- widget->tag = tag0;
- if (tag0 != EVE_TAG_NOTAG) {
- eve_cmd_dl(TAG(tag0));
- tag0++;
- }
- eve_cmd(CMD_TEXT, "hhhhs", _widget->g.x, _widget->g.y, widget->font->id, 0, widget->title);
-
- return tag0;
-}