Add APIs for floating mode (app-in-app)
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 5 Jun 2012 06:20:48 +0000 (15:20 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 5 Jun 2012 06:20:48 +0000 (15:20 +0900)
debian/changelog
src/lib/elm_win.c
src/lib/elm_win.h

index 2303fdf..2ccdf51 100644 (file)
@@ -1,3 +1,11 @@
+elementary (1.0.0+svn.70492slp2+build09) unstable; urgency=low
+
+  * Add APIs for floating mode (app-in-app)
+  * Git: slp/pkgs/e/elementary
+  * Tag: elementary_1.0.0+svn.70492slp2+build09
+
+ -- Doyoun Kang <doyoun.kang@samsung.com>  Tue, 05 Jun 2012 15:20:21 +0900
+
 elementary (1.0.0+svn.70492slp2+build08) unstable; urgency=low
 
   * Add extension profile and change prfile name from slp to mobile
index ca500d9..3379763 100644 (file)
@@ -79,6 +79,7 @@ struct _Elm_Win
    Eina_Bool fullscreen : 1;
    Eina_Bool maximized : 1;
    Eina_Bool skip_focus : 1;
+   Eina_Bool floating : 1;
 };
 
 static const char *widtype = NULL;
@@ -3447,3 +3448,40 @@ elm_win_xwindow_get(const Evas_Object *obj)
 #endif
    return 0;
 }
+
+EAPI void
+elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
+{
+   Elm_Win *win;
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   win = elm_widget_data_get(obj);
+   if (!win) return;
+   if (floating == win->floating) return;
+#ifdef HAVE_ELEMENTARY_X
+   _elm_win_xwindow_get(win);
+#endif
+   win->floating = floating;
+#ifdef HAVE_ELEMENTARY_X
+   if (win->xwin)
+     {
+        if (win->floating)
+          ecore_x_e_illume_window_state_set
+             (win->xwin, ECORE_X_ILLUME_WINDOW_STATE_FLOATING);
+        else
+          ecore_x_e_illume_window_state_set
+             (win->xwin, ECORE_X_ILLUME_WINDOW_STATE_NORMAL);
+     }
+#endif
+}
+
+EAPI Eina_Bool
+elm_win_floating_mode_get(const Evas_Object *obj)
+{
+   Elm_Win *win;
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+   win = elm_widget_data_get(obj);
+   if (!win) return EINA_FALSE;
+
+   return win->floating;
+}
+
index aa9fdbd..efa764e 100644 (file)
@@ -1372,6 +1372,27 @@ EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj);
 EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj);
 
 /**
+ * Set the floating mode of a window.
+ *
+ * @param obj The window object
+ * @param floating If true, the window is floating mode
+ *
+ * @ingroup Win
+ */
+EAPI void                  elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating);
+
+/**
+ * Get the floating mode of a window.
+ *
+ * @param obj The window object
+ * @return If true, the window is floating mode
+ *
+ * @ingroup Win
+ */
+EAPI Eina_Bool             elm_win_floating_mode_get(const Evas_Object *obj);
+
+
+/**
  * @}
  */