summaryrefslogtreecommitdiff
path: root/src/modules/elementary/web/none/elm_web_none.c
blob: 21ebaa9dccde4c2809a9d42bb4ea25771c5ad11b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif

#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED

#include "Elementary.h"
#include "elm_module_helper.h"
#include "elm_priv.h"
#include "elm_widget_web.h"

#define ELEMENTARY_BUILD
#undef ELM_MODULE_HELPER_H
#include "elm_module_helper.h"
#include "elm_web_none.eo.h"

#define MY_CLASS ELM_WEB_CLASS

#define MY_CLASS_NAME "Elm_Web_None"

typedef struct _Elm_Web_None_Data Elm_Web_None_Data;
struct _Elm_Web_None_Data
{
};

static int _none_log_dom = -1;

#undef CRI
#undef ERR
#undef WRN
#undef INF
#undef DBG
#define CRI(...)      EINA_LOG_DOM_CRIT(_none_log_dom, __VA_ARGS__)
#define ERR(...)      EINA_LOG_DOM_ERR(_none_log_dom, __VA_ARGS__)
#define WRN(...)      EINA_LOG_DOM_WARN(_none_log_dom, __VA_ARGS__)
#define INF(...)      EINA_LOG_DOM_INFO(_none_log_dom, __VA_ARGS__)
#define DBG(...)      EINA_LOG_DOM_DBG(_none_log_dom, __VA_ARGS__)

EOLIAN static Eina_Bool
_elm_web_none_elm_web_tab_propagate_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *sd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static void
_elm_web_none_elm_web_tab_propagate_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *sd EINA_UNUSED, Eina_Bool propagate EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_efl_canvas_group_group_add(Eo *obj, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   Evas_Object *resize_obj;

   resize_obj = elm_label_add(obj);
   elm_object_text_set(resize_obj, "WebKit not supported!");
   elm_widget_resize_object_set(obj, resize_obj);

   efl_canvas_group_add(efl_super(obj, MY_CLASS));
   elm_widget_sub_object_parent_add(obj);
}

EOLIAN static Evas_Object*
_elm_web_none_elm_web_webkit_view_get(Eo *obj, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   (void)obj;
   ERR("Elementary not compiled with EWebKit support.");
   return NULL;
}

EOLIAN static void
_elm_web_none_elm_web_window_create_hook_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *sd EINA_UNUSED, Elm_Web_Window_Open func EINA_UNUSED, void *data EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_dialog_alert_hook_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *sd EINA_UNUSED, Elm_Web_Dialog_Alert func EINA_UNUSED, void *data EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_dialog_confirm_hook_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *sd EINA_UNUSED, Elm_Web_Dialog_Confirm func EINA_UNUSED, void *data EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_dialog_prompt_hook_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *sd EINA_UNUSED, Elm_Web_Dialog_Prompt func EINA_UNUSED, void *data EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_dialog_file_selector_hook_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, Elm_Web_Dialog_File_Selector func EINA_UNUSED, void *data EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_console_message_hook_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, Elm_Web_Console_Message func EINA_UNUSED, void *data EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_useragent_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, const char *user_agent EINA_UNUSED)
{
}

EOLIAN static const char*
_elm_web_none_elm_web_useragent_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return NULL;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_url_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, const char *url EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static const char*
_elm_web_none_elm_web_url_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return NULL;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_html_string_load(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, const char *html EINA_UNUSED, const char *base_url EINA_UNUSED, const char *unreachable_url EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static const char*
_elm_web_none_elm_web_title_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return NULL;
}

EOLIAN static void
_elm_web_none_elm_web_bg_color_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, int r EINA_UNUSED, int g EINA_UNUSED, int b EINA_UNUSED, int a EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_bg_color_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, int *r, int *g, int *b, int *a)
{
   if (r) *r = 0;
   if (g) *g = 0;
   if (b) *b = 0;
   if (a) *a = 0;
}

EOLIAN static const char*
_elm_web_none_elm_web_selection_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return NULL;
}

EOLIAN static void
_elm_web_none_elm_web_popup_selected_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, int idx EINA_UNUSED)
{
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_popup_destroy(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_text_search(const Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, const char *string EINA_UNUSED, Eina_Bool case_sensitive EINA_UNUSED, Eina_Bool forward EINA_UNUSED, Eina_Bool wrap EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static unsigned int
_elm_web_none_elm_web_text_matches_mark(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, const char *string EINA_UNUSED, Eina_Bool case_sensitive EINA_UNUSED, Eina_Bool highlight EINA_UNUSED, unsigned int limit EINA_UNUSED)
{
   return 0;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_text_matches_unmark_all(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_text_matches_highlight_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, Eina_Bool highlight EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_text_matches_highlight_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static double
_elm_web_none_elm_web_load_progress_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return -1.0;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_stop(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_reload(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_reload_full(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_back(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_forward(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_navigate(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, int steps EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_back_possible_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_forward_possible_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_navigate_possible_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, int steps EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_history_enabled_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return EINA_FALSE;
}

EOLIAN static void
_elm_web_none_elm_web_history_enabled_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, Eina_Bool enable EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_zoom_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, double zoom EINA_UNUSED)
{
}

EOLIAN static double
_elm_web_none_elm_web_zoom_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return -1;
}

EOLIAN static void
_elm_web_none_elm_web_zoom_mode_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, Elm_Web_Zoom_Mode mode EINA_UNUSED)
{
}

EOLIAN static Elm_Web_Zoom_Mode
_elm_web_none_elm_web_zoom_mode_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED)
{
   return ELM_WEB_ZOOM_MODE_LAST;
}

EOLIAN static void
_elm_web_none_elm_web_region_show(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_region_bring_in(Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED)
{
}

EOLIAN static void
_elm_web_none_elm_web_inwin_mode_set(Eo *obj EINA_UNUSED, Elm_Web_None_Data *sd EINA_UNUSED, Eina_Bool value EINA_UNUSED)
{
}

EOLIAN static Eina_Bool
_elm_web_none_elm_web_inwin_mode_get(Eo *obj EINA_UNUSED, Elm_Web_None_Data *sd EINA_UNUSED)
{
   return EINA_FALSE;
}

EAPI void
ewm_window_features_ref(Elm_Web_Window_Features *wf EINA_UNUSED)
{
}

EAPI void
ewm_window_features_unref(Elm_Web_Window_Features *wf EINA_UNUSED)
{
}

EAPI Eina_Bool
ewm_window_features_property_get(const Elm_Web_Window_Features *wf EINA_UNUSED,
                                 Elm_Web_Window_Feature_Flag flag EINA_UNUSED)
{
   return EINA_FALSE;
}

EAPI void
ewm_window_features_region_get(const Elm_Web_Window_Features *wf EINA_UNUSED,
                               Evas_Coord *x,
                               Evas_Coord *y,
                               Evas_Coord *w,
                               Evas_Coord *h)
{
   if (x) *x = 0;
   if (y) *y = 0;
   if (w) *w = 0;
   if (h) *h = 0;
}

EAPI void
ewm_unneed_web(void)
{
}

EAPI Eina_Bool
ewm_need_web(void)
{
   if (_none_log_dom == -1)
     _none_log_dom =  eina_log_domain_register("elm_none", EINA_COLOR_LIGHTBLUE);
   return EINA_TRUE;
}

EAPI const Efl_Class *
ewm_class_get(void)
{
   return elm_web_none_class_get();
}

#undef ELM_WEB_CLASS
#define ELM_WEB_CLASS elm_web_class_get()

/* Internal EO APIs and hidden overrides */

#define ELM_WEB_NONE_EXTRA_OPS \
   EFL_CANVAS_GROUP_ADD_OPS(elm_web_none)

#include "elm_web_none.eo.c"