application/browser.c

Fri, 11 Dec 2020 18:32:54 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 11 Dec 2020 18:32:54 +0100
changeset 4
d8e8f34e65ee
parent 3
c04433993fbb
permissions
-rw-r--r--

add sqlite dependency

3
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 /*
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2 * To change this license header, choose License Headers in Project Properties.
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 * To change this template file, choose Tools | Templates
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
4 * and open the template in the editor.
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 */
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7 #include "browser.h"
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9 #include <stdio.h>
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
10 #include <stdlib.h>
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 UIWIDGET document_browser_create(UiObject *obj) {
4
d8e8f34e65ee add sqlite dependency
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 3
diff changeset
13 ui_layout_width(obj, 220);
3
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
14 UIWIDGET browser = ui_drawingarea(obj, browser_draw, NULL);
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 return browser;
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
16 }
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
17
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 void browser_draw(UiEvent *event, UiGraphics *g, void *udata) {
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 ui_graphics_color(g, 100, 100, 100);
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
21 ui_draw_rect(g, 0, 0, g->width, g->height, TRUE);
c04433993fbb add drawingarea and textarea group
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 }

mercurial