ECORE_X_ATOM_NET_WM_PID,
ECORE_X_ATOM_CARDINAL, 32, &pid, 1);
elm_win_title_set(window, "wrt-widget");
- elm_win_borderless_set(window, EINA_TRUE);
elm_win_conformant_set(window, EINA_TRUE);
int w, h;
ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
evas_object_resize(window, w, h);
+ evas_object_smart_callback_add(window,
+ "profile,changed",
+ winProfileChangedCallback,
+ this);
return window;
}
showHiddenOption(m_user_layout);
}
+Evas_Object * WindowData::setDesktopIcon()
+{
+ // set window icon
+ Evas_Object *icon = evas_object_image_add(evas_object_evas_get(m_win));
+ evas_object_image_file_set(icon,
+ "/opt/share/icons/default/small/com.samsung.elm-demo-slp.png",
+ NULL);
+ elm_win_icon_object_set(m_win, icon);
+
+ return icon;
+}
+
void WindowData::addNaviBackButtonCallback(
const char* event,
CallbackType callback,
alreadyFullscreen = !alreadyFullscreen;
}
+
+
+
+void WindowData::winProfileChangedCallback(void *data,
+ Evas_Object * obj,
+ void *event_info)
+{
+ LogDebug("winProfileChangedCallback");
+ if (data == NULL) return;
+ WindowData* This = static_cast<WindowData *>(data);
+
+ const char *profile = elm_config_profile_get();
+
+ if (!strcmp(profile, "desktop")) {
+ elm_win_indicator_mode_set(This->m_win, ELM_WIN_INDICATOR_HIDE);
+ if (!This->m_icon)
+ This->m_icon = This->setDesktopIcon();
+ }
+ else
+ elm_win_indicator_mode_set(This->m_win, ELM_WIN_INDICATOR_SHOW);
+}
+
const char *source);
static Eina_Bool hideToolbarCallback(void *data);
void toggleFullscreen(bool fullscreen);
+ static void winProfileChangedCallback(void *data,
+ Evas_Object * obj,
+ void *event_info);
protected:
Evas_Object* m_conformant;
Ecore_Timer *m_toolbarTimer;
bool m_indicator;
bool m_fullscreen;
+ Evas_Object* m_icon; // it will be needed.
Evas_Object* createWindow(unsigned long pid);
Evas_Object* createPlatformLayout(Evas_Object* parent);
void alignProgressPosition();
void toggleIndicator(bool fullscreen);
+ Evas_Object * setDesktopIcon();
};
#endif /* WINDOW_INITIALIZE_H_ */