summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2008-12-10 06:33:24 +0000
committerCarsten Haitzler <raster@rasterman.com>2008-12-10 06:33:24 +0000
commitad4b6557835a911dc1d0e176753971eb6b8b02a8 (patch)
tree175cff482a2f413d896f6e415427608b5b61b9b6
parent93b7e50d0be6128bdbbad99cac24c065f1a5fbc6 (diff)
be able to build without x - so it should work on the fb.. and it does... at
leats my mouse and keyboard do - and windows are fullscreen of course... and really you have a technical limit of 1 window... but hey! that's the fb! SVN revision: 38077
Diffstat (limited to '')
-rw-r--r--configure.in17
-rw-r--r--elementary.pc.in4
-rw-r--r--src/bin/Makefile.am2
-rw-r--r--src/lib/Elementary.h1
-rw-r--r--src/lib/Makefile.am4
-rw-r--r--src/lib/elc_hoversel.c85
-rw-r--r--src/lib/elm_entry.c6
-rw-r--r--src/lib/elm_main.c57
-rw-r--r--src/lib/elm_priv.h6
-rw-r--r--src/lib/elm_win.c39
10 files changed, 196 insertions, 25 deletions
diff --git a/configure.in b/configure.in
index 17ec80cf0..b82117602 100644
--- a/configure.in
+++ b/configure.in
@@ -35,7 +35,6 @@ PKG_CHECK_MODULES([ELEMENTARY], [
35 eet 35 eet
36 evas 36 evas
37 ecore 37 ecore
38 ecore-x
39 ecore-evas 38 ecore-evas
40 ecore-job 39 ecore-job
41 ecore-txt 40 ecore-txt
@@ -44,6 +43,22 @@ PKG_CHECK_MODULES([ELEMENTARY], [
44 edbus 43 edbus
45 ]) 44 ])
46 45
46have_elementary_x="no"
47PKG_CHECK_MODULES([ELEMENTARY_X], [ecore-x], [
48 AC_DEFINE(HAVE_ELEMENTARY_X, 1, [X11 support for Elementary])
49 have_elementary_x="yes"
50 ], [
51 have_elementary_x="no"
52 ])
53
54have_elementary_fb="no"
55PKG_CHECK_MODULES([ELEMENTARY_FB], [ecore-fb], [
56 AC_DEFINE(HAVE_ELEMENTARY_FB, 1, [FB support for Elementary])
57 have_elementary_fb="yes"
58 ], [
59 have_elementary_fb="no"
60 ])
61
47my_libs="-lm" 62my_libs="-lm"
48AC_SUBST(my_libs) 63AC_SUBST(my_libs)
49 64
diff --git a/elementary.pc.in b/elementary.pc.in
index bfd814ee0..6ee3ecce2 100644
--- a/elementary.pc.in
+++ b/elementary.pc.in
@@ -8,5 +8,5 @@ Description: Mobile device touchscreen widget library
8Requires: evas ecore ecore-x ecore-evas ecore-job ecore-txt ecore-file eet edje 8Requires: evas ecore ecore-x ecore-evas ecore-job ecore-txt ecore-file eet edje
9Version: @VERSION@ 9Version: @VERSION@
10Libs: -L${libdir} -lelementary 10Libs: -L${libdir} -lelementary
11Libs.private: @my_libs@ @ELEMENTARY_LIBS@ 11Libs.private: @my_libs@ @ELEMENTARY_LIBS@ @ELEMENTARY_X_LIBS@ @ELEMENTARY_FB_LIBS@
12Cflags: -I${includedir} -I${includedir}/elementary 12Cflags: -I${includedir} -I${includedir}/elementary @ELEMENTARY_CFLAGS@ @ELEMENTARY_X_CFLAGS@ @ELEMENTARY_FB_CFLAGS@
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index db3e761d6..5cd5c395c 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -7,7 +7,7 @@ AM_CPPFLAGS = \
7-I$(top_srcdir)/src/lib \ 7-I$(top_srcdir)/src/lib \
8-I$(top_srcdir)/src/bin \ 8-I$(top_srcdir)/src/bin \
9-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ 9-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
10@ELEMENTARY_CFLAGS@ 10@ELEMENTARY_CFLAGS@ @ELEMENTARY_X_CFLAGS@ @ELEMENTARY_FB_CFLAGS@
11 11
12bin_PROGRAMS = elementary_test 12bin_PROGRAMS = elementary_test
13 13
diff --git a/src/lib/Elementary.h b/src/lib/Elementary.h
index 3d1fc1bba..53b8805c8 100644
--- a/src/lib/Elementary.h
+++ b/src/lib/Elementary.h
@@ -45,7 +45,6 @@
45#include <Eet.h> 45#include <Eet.h>
46#include <Evas.h> 46#include <Evas.h>
47#include <Ecore.h> 47#include <Ecore.h>
48#include <Ecore_X.h>
49#include <Ecore_Evas.h> 48#include <Ecore_Evas.h>
50#include <Ecore_Job.h> 49#include <Ecore_Job.h>
51#include <Ecore_Txt.h> 50#include <Ecore_Txt.h>
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index e3a8e730c..7f50e0896 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -7,7 +7,7 @@ AM_CPPFLAGS = \
7-I$(top_srcdir) \ 7-I$(top_srcdir) \
8-I$(top_srcdir)/src/lib \ 8-I$(top_srcdir)/src/lib \
9-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ 9-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
10@ELEMENTARY_CFLAGS@ 10@ELEMENTARY_CFLAGS@ @ELEMENTARY_X_CFLAGS@ @ELEMENTARY_FB_CFLAGS@
11 11
12lib_LTLIBRARIES = libelementary.la 12lib_LTLIBRARIES = libelementary.la
13 13
@@ -54,7 +54,7 @@ els_icon.h
54 54
55 55
56libelementary_la_CFLAGS = 56libelementary_la_CFLAGS =
57libelementary_la_LIBADD = @my_libs@ @ELEMENTARY_LIBS@ 57libelementary_la_LIBADD = @my_libs@ @ELEMENTARY_LIBS@ @ELEMENTARY_X_LIBS@ @ELEMENTARY_FB_LIBS@
58libelementary_la_LDFLAGS = -version-info @version_info@ 58libelementary_la_LDFLAGS = -version-info @version_info@
59libelementary_la_DEPENDENCIES = $(top_builddir)/elementary_config.h 59libelementary_la_DEPENDENCIES = $(top_builddir)/elementary_config.h
60 60
diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c
index 5cca67f37..60923fef8 100644
--- a/src/lib/elc_hoversel.c
+++ b/src/lib/elc_hoversel.c
@@ -5,7 +5,7 @@ typedef struct _Widget_Data Widget_Data;
5 5
6struct _Widget_Data 6struct _Widget_Data
7{ 7{
8 Evas_Object *pop, *hover; 8 Evas_Object *btn, *hover;
9 Evas_Object *hover_parent; 9 Evas_Object *hover_parent;
10 const char *hover_style; 10 const char *hover_style;
11}; 11};
@@ -37,6 +37,8 @@ _sizing_eval(Evas_Object *obj)
37 Widget_Data *wd = elm_widget_data_get(obj); 37 Widget_Data *wd = elm_widget_data_get(obj);
38 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; 38 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
39 39
40 evas_object_size_hint_min_get(wd->btn, &minw, &minh);
41 evas_object_size_hint_max_get(wd->btn, &maxw, &maxh);
40 evas_object_size_hint_min_set(obj, minw, minh); 42 evas_object_size_hint_min_set(obj, minw, minh);
41 evas_object_size_hint_max_set(obj, maxw, maxh); 43 evas_object_size_hint_max_set(obj, maxw, maxh);
42} 44}
@@ -54,6 +56,39 @@ _hover_clicked(void *data, Evas_Object *obj, void *event_info)
54} 56}
55 57
56static void 58static void
59_button_clicked(void *data, Evas_Object *obj, void *event_info)
60{
61 Widget_Data *wd = elm_widget_data_get(data);
62 Evas_Object *bt, *bx, *ic;
63 wd->hover = elm_hover_add(data);
64 elm_hover_style_set(wd->hover, "hoversel_vertical");
65 evas_object_smart_callback_add(wd->hover, "clicked", _hover_clicked, data);
66 elm_hover_parent_set(wd->hover, wd->hover_parent);
67 elm_hover_target_set(wd->hover, wd->btn);
68
69 bx = elm_box_add(wd->hover);
70 elm_box_homogenous_set(bx, 1);
71
72 bt = elm_button_add(wd->hover);
73 elm_button_style_set(bt, "hoversel_vertical_entry");
74 elm_button_label_set(bt, "Forward");
75 evas_object_size_hint_weight_set(bt, 1.0, 0.0);
76 evas_object_size_hint_align_set(bt, -1.0, -1.0);
77 elm_box_pack_end(bx, bt);
78 evas_object_show(bt);
79
80 // FIXME: fill.
81
82 elm_hover_content_set
83 (wd->hover,
84 elm_hover_best_content_location_get(wd->hover, ELM_HOVER_AXIS_VERTICAL),
85 bx);
86 evas_object_show(bx);
87
88 evas_object_show(wd->hover);
89}
90
91static void
57_parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info) 92_parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
58{ 93{
59 Widget_Data *wd = elm_widget_data_get(data); 94 Widget_Data *wd = elm_widget_data_get(data);
@@ -74,12 +109,12 @@ elm_hoversel_add(Evas_Object *parent)
74 elm_widget_del_pre_hook_set(obj, _del_pre_hook); 109 elm_widget_del_pre_hook_set(obj, _del_pre_hook);
75 elm_widget_del_hook_set(obj, _del_hook); 110 elm_widget_del_hook_set(obj, _del_hook);
76 111
77// wd->scroller = elm_scroller_add(parent); 112 wd->btn = elm_button_add(parent);
78// elm_widget_resize_object_set(obj, wd->scroller); 113 elm_button_style_set(wd->btn, "hoversel_vertical");
79 114 elm_widget_resize_object_set(obj, wd->btn);
80// evas_object_event_callback_add(wd->entry, EVAS_CALLBACK_CHANGED_SIZE_HINTS, 115 evas_object_event_callback_add(wd->btn, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
81// _changed_size_hints, obj); 116 _changed_size_hints, obj);
82 117 evas_object_smart_callback_add(wd->btn, "clicked", _button_clicked, obj);
83 _sizing_eval(obj); 118 _sizing_eval(obj);
84 return obj; 119 return obj;
85} 120}
@@ -96,20 +131,42 @@ elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
96} 131}
97 132
98EAPI void 133EAPI void
99elm_hoversel_hover_style_set(Evas_Object *obj, const char *style) 134elm_hoversel_label_set(Evas_Object *obj, const char *label)
100{ 135{
101 Widget_Data *wd = elm_widget_data_get(obj); 136 Widget_Data *wd = elm_widget_data_get(obj);
102 if (wd->hover_style) eina_stringshare_del(wd->hover_style); 137 elm_button_label_set(wd->btn, label);
103 wd->hover_style = NULL; 138}
104 if (style) wd->hover_style = eina_stringshare_add(style); 139
105} 140EAPI void
141elm_hoversel_icon_set(Evas_Object *obj, Evas_Object *icon)
142{
143 Widget_Data *wd = elm_widget_data_get(obj);
144 elm_button_icon_set(wd->btn, icon);
145}
106 146
107EAPI void 147EAPI void
108elm_hoversel_hover_end(Evas_Object *obj) 148elm_hoversel_hover_end(Evas_Object *obj)
109{ 149{
110 Widget_Data *wd = elm_widget_data_get(obj); 150 Widget_Data *wd = elm_widget_data_get(obj);
111 if (wd->hover) evas_object_del(wd->hover); 151 if (wd->hover) evas_object_del(wd->hover);
112 if (wd->pop) evas_object_del(wd->pop);
113 wd->hover = NULL; 152 wd->hover = NULL;
114 wd->pop = NULL; 153}
154
155EAPI void * // FIXME: return some sort of handle other than void *
156elm_hoversel_item_add(Evas_Object *obj, const char *label, const char *icon_file, int icon_type, void (*func) (void *data, Evas_Object *obj, void *event_into), const void *data)
157{
158 Widget_Data *wd = elm_widget_data_get(obj);
159 // FIXME: implement
160}
161
162EAPI void
163elm_hoversel_item_del(void *item)
164{
165 // FIXME: implement
166}
167
168EAPI void
169elm_hoversel_item_enabled_set(void *item, Evas_Bool enabled)
170{
171 // FIXME: implement
115} 172}
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 174cb1fe1..9f596b90e 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -42,8 +42,10 @@ _del_hook(Evas_Object *obj)
42{ 42{
43 Widget_Data *wd = elm_widget_data_get(obj); 43 Widget_Data *wd = elm_widget_data_get(obj);
44 entries = eina_list_remove(entries, obj); 44 entries = eina_list_remove(entries, obj);
45#ifdef HAVE_ELEMENTARY_X
45 ecore_event_handler_del(wd->sel_notify_handler); 46 ecore_event_handler_del(wd->sel_notify_handler);
46 ecore_event_handler_del(wd->sel_clear_handler); 47 ecore_event_handler_del(wd->sel_clear_handler);
48#endif
47 if (wd->cut_sel) eina_stringshare_del(wd->cut_sel); 49 if (wd->cut_sel) eina_stringshare_del(wd->cut_sel);
48 if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job); 50 if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job);
49 free(wd); 51 free(wd);
@@ -548,6 +550,7 @@ _signal_key_enter(void *data, Evas_Object *obj, const char *emission, const char
548 evas_object_smart_callback_call(data, "activated", NULL); 550 evas_object_smart_callback_call(data, "activated", NULL);
549} 551}
550 552
553#ifdef HAVE_ELEMENTARY_X
551static int 554static int
552_event_selection_notify(void *data, int type, void *event) 555_event_selection_notify(void *data, int type, void *event)
553{ 556{
@@ -590,6 +593,7 @@ _event_selection_clear(void *data, int type, void *event)
590 } 593 }
591 return 1; 594 return 1;
592} 595}
596#endif
593 597
594EAPI Evas_Object * 598EAPI Evas_Object *
595elm_entry_add(Evas_Object *parent) 599elm_entry_add(Evas_Object *parent)
@@ -632,6 +636,7 @@ elm_entry_add(Evas_Object *parent)
632 elm_widget_resize_object_set(obj, wd->ent); 636 elm_widget_resize_object_set(obj, wd->ent);
633 _sizing_eval(obj); 637 _sizing_eval(obj);
634 638
639#ifdef HAVE_ELEMENTARY_X
635 if (elm_win_xwindow_get(elm_widget_top_get(parent)) != 0) 640 if (elm_win_xwindow_get(elm_widget_top_get(parent)) != 0)
636 { 641 {
637 wd->sel_notify_handler = 642 wd->sel_notify_handler =
@@ -641,6 +646,7 @@ elm_entry_add(Evas_Object *parent)
641 ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR, 646 ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR,
642 _event_selection_clear, obj); 647 _event_selection_clear, obj);
643 } 648 }
649#endif
644 650
645 entries = eina_list_prepend(entries, obj); 651 entries = eina_list_prepend(entries, obj);
646 return obj; 652 return obj;
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index 097547124..a90ee0426 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -2,7 +2,9 @@
2#include "elm_priv.h" 2#include "elm_priv.h"
3 3
4static int _elm_signal_exit(void *data, int ev_type, void *ev); 4static int _elm_signal_exit(void *data, int ev_type, void *ev);
5#ifdef HAVE_ELEMENTARY_X
5static int _elm_window_property_change(void *data, int ev_type, void *ev); 6static int _elm_window_property_change(void *data, int ev_type, void *ev);
7#endif
6static void _elm_rescale(void); 8static void _elm_rescale(void);
7 9
8char *_elm_appname = NULL; 10char *_elm_appname = NULL;
@@ -17,6 +19,7 @@ _elm_signal_exit(void *data, int ev_type, void *ev)
17 return 1; 19 return 1;
18} 20}
19 21
22#ifdef HAVE_ELEMENTARY_X
20static int 23static int
21_elm_window_property_change(void *data, int ev_type, void *ev) 24_elm_window_property_change(void *data, int ev_type, void *ev)
22{ 25{
@@ -42,6 +45,7 @@ _elm_window_property_change(void *data, int ev_type, void *ev)
42 } 45 }
43 return 1; 46 return 1;
44} 47}
48#endif
45 49
46static void 50static void
47_elm_rescale(void) 51_elm_rescale(void)
@@ -55,6 +59,7 @@ EAPI void
55elm_init(int argc, char **argv) 59elm_init(int argc, char **argv)
56{ 60{
57 int i; 61 int i;
62 const char *elm_engine, *elm_scale;
58 63
59 eet_init(); 64 eet_init();
60 ecore_init(); 65 ecore_init();
@@ -68,14 +73,46 @@ elm_init(int argc, char **argv)
68 73
69 _elm_appname = strdup(ecore_file_file_get(argv[0])); 74 _elm_appname = strdup(ecore_file_file_get(argv[0]));
70 75
76 elm_engine = getenv("ELM_ENGINE");
77 elm_scale = getenv("ELM_SCALE");
78
71 // FIXME: actually load config 79 // FIXME: actually load config
72 _elm_config = ELM_NEW(Elm_Config); 80 _elm_config = ELM_NEW(Elm_Config);
73 _elm_config->engine = ELM_SOFTWARE_X11; 81 _elm_config->engine = ELM_SOFTWARE_X11;
82 if (elm_engine)
83 {
84 if ((!strcasecmp(elm_engine, "x11")) ||
85 (!strcasecmp(elm_engine, "x")) ||
86 (!strcasecmp(elm_engine, "software-x11")) ||
87 (!strcasecmp(elm_engine, "software_x11")))
88 _elm_config->engine = ELM_SOFTWARE_X11;
89 else if ((!strcasecmp(elm_engine, "x11-16")) ||
90 (!strcasecmp(elm_engine, "x16")) ||
91 (!strcasecmp(elm_engine, "software-16-x11")) ||
92 (!strcasecmp(elm_engine, "software_16_x11")))
93 _elm_config->engine = ELM_SOFTWARE_16_X11;
94 else if ((!strcasecmp(elm_engine, "xrender")) ||
95 (!strcasecmp(elm_engine, "xr")) ||
96 (!strcasecmp(elm_engine, "xrender-x11")) ||
97 (!strcasecmp(elm_engine, "xrender_x11")))
98 _elm_config->engine = ELM_XRENDER_X11;
99 else if ((!strcasecmp(elm_engine, "fb")) ||
100 (!strcasecmp(elm_engine, "software-fb")) ||
101 (!strcasecmp(elm_engine, "software_fb")))
102 _elm_config->engine = ELM_SOFTWARE_FB;
103 else if ((!strcasecmp(elm_engine, "opengl")) ||
104 (!strcasecmp(elm_engine, "gl")) ||
105 (!strcasecmp(elm_engine, "opengl-x11")) ||
106 (!strcasecmp(elm_engine, "opengl_x11")))
107 _elm_config->engine = ELM_OPENGL_X11;
108 }
109
74 _elm_config->thumbscroll_enable = 1; 110 _elm_config->thumbscroll_enable = 1;
75 _elm_config->thumbscroll_threshhold = 24; 111 _elm_config->thumbscroll_threshhold = 24;
76 _elm_config->thumbscroll_momentum_threshhold = 100.0; 112 _elm_config->thumbscroll_momentum_threshhold = 100.0;
77 _elm_config->thumbscroll_friction = 1.0; 113 _elm_config->thumbscroll_friction = 1.0;
78 _elm_config->scale = 1.0; 114 _elm_config->scale = 1.0;
115
79 _elm_config->bgpixmap = 0; 116 _elm_config->bgpixmap = 0;
80 _elm_config->compositing = 1; 117 _elm_config->compositing = 1;
81 118
@@ -84,6 +121,7 @@ elm_init(int argc, char **argv)
84 (_elm_config->engine == ELM_XRENDER_X11) || 121 (_elm_config->engine == ELM_XRENDER_X11) ||
85 (_elm_config->engine == ELM_OPENGL_X11)) 122 (_elm_config->engine == ELM_OPENGL_X11))
86 { 123 {
124#ifdef HAVE_ELEMENTARY_X
87 int val = 1000; 125 int val = 1000;
88 126
89 ecore_x_init(NULL); 127 ecore_x_init(NULL);
@@ -100,14 +138,31 @@ elm_init(int argc, char **argv)
100 } 138 }
101 if (!ecore_x_screen_is_composited(0)) 139 if (!ecore_x_screen_is_composited(0))
102 _elm_config->compositing = 0; 140 _elm_config->compositing = 0;
141#endif
103 } 142 }
104 143
144 if (elm_scale)
145 {
146 _elm_config->scale = atof(elm_scale);
147 }
105} 148}
106 149
107EAPI void 150EAPI void
108elm_shutdown(void) 151elm_shutdown(void)
109{ 152{
110 _elm_win_shutdown(); 153 _elm_win_shutdown();
154
155 if ((_elm_config->engine == ELM_SOFTWARE_X11) ||
156 (_elm_config->engine == ELM_SOFTWARE_16_X11) ||
157 (_elm_config->engine == ELM_XRENDER_X11) ||
158 (_elm_config->engine == ELM_OPENGL_X11))
159 {
160#ifdef HAVE_ELEMENTARY_X
161 ecore_event_handler_del(_elm_event_property_change);
162 _elm_event_property_change = NULL;
163 ecore_x_shutdown();
164#endif
165 }
111 166
112 free(_elm_config); 167 free(_elm_config);
113 free(_elm_appname); 168 free(_elm_appname);
diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h
index 566e89a3e..fe38b76d6 100644
--- a/src/lib/elm_priv.h
+++ b/src/lib/elm_priv.h
@@ -3,6 +3,12 @@
3 3
4#include "elementary_config.h" 4#include "elementary_config.h"
5 5
6#ifdef HAVE_ELEMENTARY_X
7#include <Ecore_X.h>
8#endif
9#ifdef HAVE_ELEMENTARY_FB
10#include <Ecore_Fb.h>
11#endif
6#ifdef HAVE_ALLOCA_H 12#ifdef HAVE_ALLOCA_H
7#include <alloca.h> 13#include <alloca.h>
8#endif 14#endif
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 2d55aa57f..8a3801c38 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -10,7 +10,9 @@ struct _Elm_Win
10 Evas_Object *parent; 10 Evas_Object *parent;
11 Evas_Object *win_obj; 11 Evas_Object *win_obj;
12 Eina_List *subobjs; 12 Eina_List *subobjs;
13#ifdef HAVE_ELEMENTARY_X
13 Ecore_X_Window xwin; 14 Ecore_X_Window xwin;
15#endif
14 Ecore_Job *deferred_resize_job; 16 Ecore_Job *deferred_resize_job;
15 Ecore_Job *deferred_child_eval_job; 17 Ecore_Job *deferred_child_eval_job;
16 18
@@ -34,7 +36,9 @@ static void _elm_win_obj_callback_del(void *data, Evas *e, Evas_Object *obj, voi
34static void _elm_win_obj_callback_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info); 36static void _elm_win_obj_callback_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
35static void _elm_win_delete_request(Ecore_Evas *ee); 37static void _elm_win_delete_request(Ecore_Evas *ee);
36static void _elm_win_resize_job(void *data); 38static void _elm_win_resize_job(void *data);
39#ifdef HAVE_ELEMENTARY_X
37static void _elm_win_xwin_update(Elm_Win *win); 40static void _elm_win_xwin_update(Elm_Win *win);
41#endif
38static void _elm_win_eval_subobjs(Evas_Object *obj); 42static void _elm_win_eval_subobjs(Evas_Object *obj);
39static void _elm_win_subobj_callback_del(void *data, Evas *e, Evas_Object *obj, void *event_info); 43static void _elm_win_subobj_callback_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
40static void _elm_win_subobj_callback_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info); 44static void _elm_win_subobj_callback_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
@@ -78,7 +82,19 @@ static void
78_elm_win_obj_intercept_resize(void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h) 82_elm_win_obj_intercept_resize(void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h)
79{ 83{
80 Elm_Win *win = data; 84 Elm_Win *win = data;
81 ecore_evas_resize(win->ee, w, h); 85 switch (_elm_config->engine)
86 {
87 case ELM_SOFTWARE_FB:
88 break;
89 case ELM_SOFTWARE_X11:
90 case ELM_SOFTWARE_16_X11:
91 case ELM_XRENDER_X11:
92 case ELM_OPENGL_X11:
93 ecore_evas_resize(win->ee, w, h);
94 break;
95 default:
96 break;
97 }
82} 98}
83 99
84static void 100static void
@@ -249,6 +265,7 @@ _elm_win_xwindow_get(Elm_Win *win)
249static void 265static void
250_elm_win_xwin_update(Elm_Win *win) 266_elm_win_xwin_update(Elm_Win *win)
251{ 267{
268#ifdef HAVE_ELEMENTARY_X
252 _elm_win_xwindow_get(win); 269 _elm_win_xwindow_get(win);
253 if (win->parent) 270 if (win->parent)
254 { 271 {
@@ -281,6 +298,7 @@ _elm_win_xwin_update(Elm_Win *win)
281 if (win->xwin) 298 if (win->xwin)
282 ecore_x_e_virtual_keyboard_state_set 299 ecore_x_e_virtual_keyboard_state_set
283 (win->xwin, (Ecore_X_Virtual_Keyboard_State)win->kbdmode); 300 (win->xwin, (Ecore_X_Virtual_Keyboard_State)win->kbdmode);
301#endif
284} 302}
285 303
286static void 304static void
@@ -367,7 +385,6 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
367 break; 385 break;
368 case ELM_SOFTWARE_FB: 386 case ELM_SOFTWARE_FB:
369 win->ee = ecore_evas_fb_new(NULL, 0, 1, 1); 387 win->ee = ecore_evas_fb_new(NULL, 0, 1, 1);
370 ecore_evas_fullscreen_set(win->ee, 1);
371 break; 388 break;
372 case ELM_SOFTWARE_16_X11: 389 case ELM_SOFTWARE_16_X11:
373 win->ee = ecore_evas_software_x11_16_new(NULL, 0, 0, 0, 1, 1); 390 win->ee = ecore_evas_software_x11_16_new(NULL, 0, 0, 0, 1, 1);
@@ -430,13 +447,25 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
430// evas_font_hinting_set(win->evas, EVAS_FONT_HINTING_NONE); 447// evas_font_hinting_set(win->evas, EVAS_FONT_HINTING_NONE);
431// evas_font_hinting_set(win->evas, EVAS_FONT_HINTING_AUTO); 448// evas_font_hinting_set(win->evas, EVAS_FONT_HINTING_AUTO);
432// evas_font_hinting_set(win->evas, EVAS_FONT_HINTING_BYTECODE); 449// evas_font_hinting_set(win->evas, EVAS_FONT_HINTING_BYTECODE);
433 edje_frametime_set(1.0 / 30.0); 450 edje_frametime_set(1.0 / 60.0);
434 edje_scale_set(_elm_config->scale); 451 edje_scale_set(_elm_config->scale);
435 452
436 _elm_win_xwin_update(win); 453 _elm_win_xwin_update(win);
437 454
438 _elm_win_list = eina_list_append(_elm_win_list, win->win_obj); 455 _elm_win_list = eina_list_append(_elm_win_list, win->win_obj);
439 456
457 switch (_elm_config->engine)
458 {
459 case ELM_SOFTWARE_FB:
460 ecore_evas_fullscreen_set(win->ee, 1);
461 break;
462 case ELM_SOFTWARE_X11:
463 case ELM_SOFTWARE_16_X11:
464 case ELM_XRENDER_X11:
465 case ELM_OPENGL_X11:
466 default:
467 break;
468 }
440 return win->win_obj; 469 return win->win_obj;
441} 470}
442 471
@@ -545,9 +574,11 @@ elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode)
545 if (mode == win->kbdmode) return; 574 if (mode == win->kbdmode) return;
546 _elm_win_xwindow_get(win); 575 _elm_win_xwindow_get(win);
547 win->kbdmode = mode; 576 win->kbdmode = mode;
577#ifdef HAVE_ELEMENTARY_X
548 if (win->xwin) 578 if (win->xwin)
549 ecore_x_e_virtual_keyboard_state_set 579 ecore_x_e_virtual_keyboard_state_set
550 (win->xwin, (Ecore_X_Virtual_Keyboard_State)win->kbdmode); 580 (win->xwin, (Ecore_X_Virtual_Keyboard_State)win->kbdmode);
581#endif
551} 582}
552 583
553EAPI void 584EAPI void
@@ -556,9 +587,11 @@ elm_win_keyboard_win_set(Evas_Object *obj, Evas_Bool is_keyboard)
556 Elm_Win *win = evas_object_data_get(obj, "__Elm"); 587 Elm_Win *win = evas_object_data_get(obj, "__Elm");
557 if (!win) return; 588 if (!win) return;
558 _elm_win_xwindow_get(win); 589 _elm_win_xwindow_get(win);
590#ifdef HAVE_ELEMENTARY_X
559 if (win->xwin) 591 if (win->xwin)
560 ecore_x_e_virtual_keyboard_set 592 ecore_x_e_virtual_keyboard_set
561 (win->xwin, is_keyboard); 593 (win->xwin, is_keyboard);
594#endif
562} 595}
563 596
564EAPI Ecore_X_Window 597EAPI Ecore_X_Window