Fix:Core:Renamed src to navit for cleanup of includes
[navit-package] / navit / graphics / null / graphics_null.c
1 #include <glib.h>
2 #include "config.h"
3 #include "point.h"
4 #include "graphics.h"
5 #include "color.h"
6 #include "plugin.h"
7
8 static int dummy;
9 static struct graphics_priv {
10         int dummy;
11 } graphics_priv;
12
13 static struct graphics_font_priv {
14         int dummy;
15 } graphics_font_priv;
16
17 static struct graphics_gc_priv {
18         int dummy;
19 } graphics_gc_priv;
20
21 static struct graphics_image_priv {
22         int dummy;
23 } graphics_image_priv;
24
25 static void
26 graphics_destroy(struct graphics_priv *gr)
27 {
28 }
29
30 static void font_destroy(struct graphics_font_priv *font)
31 {
32
33 }
34
35 static struct graphics_font_methods font_methods = {
36         font_destroy
37 };
38
39 static struct graphics_font_priv *font_new(struct graphics_priv *gr, struct graphics_font_methods *meth, int size)
40 {
41         *meth=font_methods;
42         return &graphics_font_priv;
43 }
44
45 static void
46 gc_destroy(struct graphics_gc_priv *gc)
47 {
48 }
49
50 static void
51 gc_set_linewidth(struct graphics_gc_priv *gc, int w)
52 {
53 }
54
55 static void
56 gc_set_dashes(struct graphics_gc_priv *gc, int w, int offset, unsigned char *dash_list, int n)
57 {
58 }
59
60 static void
61 gc_set_foreground(struct graphics_gc_priv *gc, struct color *c)
62 {
63 }
64
65 static void
66 gc_set_background(struct graphics_gc_priv *gc, struct color *c)
67 {
68 }
69
70 static struct graphics_gc_methods gc_methods = {
71         gc_destroy,
72         gc_set_linewidth,
73         gc_set_dashes,  
74         gc_set_foreground,      
75         gc_set_background       
76 };
77
78 static struct graphics_gc_priv *gc_new(struct graphics_priv *gr, struct graphics_gc_methods *meth)
79 {
80         *meth=gc_methods;
81         return &graphics_gc_priv;
82 }
83
84
85 static struct graphics_image_priv *
86 image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *name, int *w, int *h)
87 {
88         return &graphics_image_priv;
89 }
90
91 static void
92 draw_lines(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count)
93 {
94 }
95
96 static void
97 draw_polygon(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int count)
98 {
99 }
100
101 static void
102 draw_rectangle(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int w, int h)
103 {
104 }
105
106 static void
107 draw_circle(struct graphics_priv *gr, struct graphics_gc_priv *gc, struct point *p, int r)
108 {
109 }
110
111
112 static void
113 draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy)
114 {
115 }
116
117 static void
118 draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img)
119 {
120 }
121
122 static void
123 draw_image_warp(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, int count, char *data)
124 {
125 }
126
127 static void
128 draw_restore(struct graphics_priv *gr, struct point *p, int w, int h)
129 {
130 }
131
132 static void
133 background_gc(struct graphics_priv *gr, struct graphics_gc_priv *gc)
134 {
135 }
136
137 static void
138 draw_mode(struct graphics_priv *gr, enum draw_mode_num mode)
139 {
140 }
141
142 static struct graphics_priv * overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h);
143
144 static void *
145 get_data(struct graphics_priv *this, char *type)
146 {
147         return &dummy;
148 }
149
150
151
152 static void
153 register_resize_callback(struct graphics_priv *this, void (*callback)(void *data, int w, int h), void *data)
154 {
155 }
156
157 static void
158 register_motion_callback(struct graphics_priv *this, void (*callback)(void *data, struct point *p), void *data)
159 {
160 }
161
162 static void
163 register_button_callback(struct graphics_priv *this, void (*callback)(void *data, int press, int button, struct point *p), void *data)
164 {
165 }
166
167 static struct graphics_methods graphics_methods = {
168         graphics_destroy,
169         draw_mode,
170         draw_lines,
171         draw_polygon,
172         draw_rectangle,
173         draw_circle,
174         draw_text,
175         draw_image,
176         draw_image_warp,
177         draw_restore,
178         font_new,
179         gc_new,
180         background_gc,
181         overlay_new,
182         image_new,
183         get_data,
184         register_resize_callback,
185         register_button_callback,
186         register_motion_callback,
187 };
188
189 static struct graphics_priv *
190 overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h)
191 {
192         *meth=graphics_methods;
193         return &graphics_priv;
194 }
195
196
197 static struct graphics_priv *
198 graphics_null_new(struct graphics_methods *meth, struct attr **attrs)
199 {
200         *meth=graphics_methods;
201         return &graphics_priv;
202 }
203
204 void
205 plugin_init(void)
206 {
207         plugin_register_graphics_type("null", graphics_null_new);
208 }