Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3584 | sourcerer | 1 | /* |
2 | * Copyright 2012 Vincent Sanders |
||
3 | * |
||
4 | * This file is part of libnsfb, http://www.netsurf-browser.org/ |
||
5 | * Licenced under the MIT License, |
||
6 | * http://www.opensource.org/licenses/mit-license.php |
||
7 | */ |
||
8 | |||
9 | #include |
||
10 | #include |
||
11 | #include |
||
12 | #include |
||
13 | #include |
||
14 | #include |
||
15 | #include |
||
16 | #include |
||
17 | #include |
||
18 | #include |
||
19 | #include |
||
20 | |||
21 | //#include |
||
22 | |||
23 | |||
24 | #include "libnsfb.h" |
||
25 | #include "libnsfb_event.h" |
||
26 | #include "libnsfb_plot.h" |
||
27 | #include "libnsfb_plot_util.h" |
||
28 | |||
29 | #include "nsfb.h" |
||
30 | #include "plot.h" |
||
31 | #include "surface.h" |
||
32 | #include "cursor.h" |
||
33 | |||
34 | |||
35 | |||
36 | #define UNUSED(x) ((x) = (x)) |
||
37 | |||
38 | #define FB_NAME "/dev/fb0" |
||
39 | |||
40 | struct lnx_priv { |
||
41 | int fd; |
||
42 | }; |
||
43 | |||
44 | static int linux_set_geometry(nsfb_t *nsfb, int width, int height, enum nsfb_format_e format) |
||
45 | { |
||
46 | |||
47 | return -1; |
||
48 | } |
||
49 | |||
50 | static enum nsfb_format_e |
||
51 | format_from_lstate(void ) |
||
52 | { |
||
53 | |||
54 | |||
55 | return 0; |
||
56 | } |
||
57 | |||
58 | static int linux_initialise(nsfb_t *nsfb) |
||
59 | { |
||
60 | return -1; |
||
61 | } |
||
62 | |||
63 | static int linux_finalise(nsfb_t *nsfb) |
||
64 | { |
||
65 | return 0; |
||
66 | } |
||
67 | |||
68 | static bool linux_input(nsfb_t *nsfb, nsfb_event_t *event, int timeout) |
||
69 | { |
||
70 | UNUSED(nsfb); |
||
71 | UNUSED(event); |
||
72 | UNUSED(timeout); |
||
73 | return false; |
||
74 | } |
||
75 | |||
76 | static int linux_claim(nsfb_t *nsfb, nsfb_bbox_t *box) |
||
77 | { |
||
78 | return 0; |
||
79 | } |
||
80 | |||
81 | static int linux_cursor(nsfb_t *nsfb, struct nsfb_cursor_s *cursor) |
||
82 | { |
||
83 | return true; |
||
84 | } |
||
85 | |||
86 | |||
87 | static int linux_update(nsfb_t *nsfb, nsfb_bbox_t *box) |
||
88 | { |
||
89 | return 0; |
||
90 | } |
||
91 | |||
92 | const nsfb_surface_rtns_t linux_rtns = { |
||
93 | .initialise = linux_initialise, |
||
94 | .finalise = linux_finalise, |
||
95 | .input = linux_input, |
||
96 | .claim = linux_claim, |
||
97 | .update = linux_update, |
||
98 | .cursor = linux_cursor, |
||
99 | .geometry = linux_set_geometry, |
||
100 | }; |
||
101 | |||
102 | NSFB_SURFACE_DEF(linux, NSFB_SURFACE_LINUX, &linux_rtns) |
||
103 | |||
104 | /* |
||
105 | * Local variables: |
||
106 | * c-basic-offset: 4 |
||
107 | * tab-width: 8 |
||
108 | * End: |
||
109 | */ |