forked from enlightenment/efl
parent
f1b6434fc2
commit
ddb13f269b
|
@ -62,7 +62,10 @@ WGT_PREVIEW = \
|
||||||
box:preview-00.png:widget_preview_box:200:160 \
|
box:preview-00.png:widget_preview_box:200:160 \
|
||||||
notify:preview-00.png:widget_preview_notify:60:30 \
|
notify:preview-00.png:widget_preview_notify:60:30 \
|
||||||
slideshow:preview-00.png:widget_preview_slideshow:50:50 \
|
slideshow:preview-00.png:widget_preview_slideshow:50:50 \
|
||||||
photocam:preview-00.png:widget_preview_photocam:243:162
|
photocam:preview-00.png:widget_preview_photocam:243:162 \
|
||||||
|
inwin:preview-00.png:widget_preview_inwin1:200:160 \
|
||||||
|
inwin:preview-01.png:widget_preview_inwin2:200:160 \
|
||||||
|
inwin:preview-02.png:widget_preview_inwin3:200:160
|
||||||
|
|
||||||
widget-build:
|
widget-build:
|
||||||
@$(MAKE) -C widgets
|
@$(MAKE) -C widgets
|
||||||
|
|
|
@ -128,6 +128,9 @@
|
||||||
* @image html img/widget/index/preview-00.png
|
* @image html img/widget/index/preview-00.png
|
||||||
* @image latex img/widget/index/preview-00.eps
|
* @image latex img/widget/index/preview-00.eps
|
||||||
* @li @ref Inwin
|
* @li @ref Inwin
|
||||||
|
*
|
||||||
|
* @image html img/widget/inwin/preview-00.png
|
||||||
|
* @image latex img/widget/inwin/preview-00.eps
|
||||||
* @li @ref Label
|
* @li @ref Label
|
||||||
*
|
*
|
||||||
* @image html img/widget/label/preview-00.png
|
* @image html img/widget/label/preview-00.png
|
||||||
|
|
|
@ -78,7 +78,10 @@ widget_preview_progressbar \
|
||||||
widget_preview_box \
|
widget_preview_box \
|
||||||
widget_preview_notify \
|
widget_preview_notify \
|
||||||
widget_preview_slideshow \
|
widget_preview_slideshow \
|
||||||
widget_preview_photocam
|
widget_preview_photocam \
|
||||||
|
widget_preview_inwin1 \
|
||||||
|
widget_preview_inwin2 \
|
||||||
|
widget_preview_inwin3
|
||||||
|
|
||||||
LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_EMAP_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@
|
LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_EMAP_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@
|
||||||
|
|
||||||
|
@ -138,5 +141,8 @@ EXTRA_DIST = \
|
||||||
widget_preview_notify.c \
|
widget_preview_notify.c \
|
||||||
widget_preview_slideshow.c \
|
widget_preview_slideshow.c \
|
||||||
widget_preview_photocam.c \
|
widget_preview_photocam.c \
|
||||||
|
widget_preview_inwin1.c \
|
||||||
|
widget_preview_inwin2.c \
|
||||||
|
widget_preview_inwin3.c \
|
||||||
widget_preview_tmpl_foot.c \
|
widget_preview_tmpl_foot.c \
|
||||||
widget_preview_tmpl_head.c
|
widget_preview_tmpl_head.c
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#include "widget_preview_tmpl_head.c"
|
||||||
|
|
||||||
|
Evas_Object *inwin, *lbl;
|
||||||
|
|
||||||
|
inwin = elm_win_inwin_add(win);
|
||||||
|
evas_object_show(inwin);
|
||||||
|
|
||||||
|
lbl = elm_label_add(win);
|
||||||
|
elm_object_text_set(lbl, "The content of an inwin<ps>"
|
||||||
|
"can be anything that<ps>"
|
||||||
|
"may be shown in a popup.<ps><ps>"
|
||||||
|
"This one we are in is<ps>"
|
||||||
|
"using the <b>default</b> style.");
|
||||||
|
elm_win_inwin_content_set(inwin, lbl);
|
||||||
|
evas_object_show(lbl);
|
||||||
|
|
||||||
|
#include "widget_preview_tmpl_foot.c"
|
|
@ -0,0 +1,18 @@
|
||||||
|
#include "widget_preview_tmpl_head.c"
|
||||||
|
|
||||||
|
Evas_Object *inwin, *lbl;
|
||||||
|
|
||||||
|
inwin = elm_win_inwin_add(win);
|
||||||
|
elm_object_style_set(inwin, "minimal");
|
||||||
|
evas_object_show(inwin);
|
||||||
|
|
||||||
|
lbl = elm_label_add(win);
|
||||||
|
elm_object_text_set(lbl, "The content of an inwin<ps>"
|
||||||
|
"can be anything that<ps>"
|
||||||
|
"may be shown in a popup.<ps><ps>"
|
||||||
|
"This one we are in is<ps>"
|
||||||
|
"using the <b>minimal</b> style.");
|
||||||
|
elm_win_inwin_content_set(inwin, lbl);
|
||||||
|
evas_object_show(lbl);
|
||||||
|
|
||||||
|
#include "widget_preview_tmpl_foot.c"
|
|
@ -0,0 +1,18 @@
|
||||||
|
#include "widget_preview_tmpl_head.c"
|
||||||
|
|
||||||
|
Evas_Object *inwin, *lbl;
|
||||||
|
|
||||||
|
inwin = elm_win_inwin_add(win);
|
||||||
|
elm_object_style_set(inwin, "minimal_vertical");
|
||||||
|
evas_object_show(inwin);
|
||||||
|
|
||||||
|
lbl = elm_label_add(win);
|
||||||
|
elm_object_text_set(lbl, "The content of an inwin<ps>"
|
||||||
|
"can be anything that<ps>"
|
||||||
|
"may be shown in a popup.<ps><ps>"
|
||||||
|
"This one we are in is<ps>"
|
||||||
|
"using the <b>minimal_vertical</b> style.");
|
||||||
|
elm_win_inwin_content_set(inwin, lbl);
|
||||||
|
evas_object_show(lbl);
|
||||||
|
|
||||||
|
#include "widget_preview_tmpl_foot.c"
|
|
@ -1714,15 +1714,106 @@ extern "C" {
|
||||||
|
|
||||||
EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y) EINA_ARG_NONNULL(1);
|
EAPI void elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y) EINA_ARG_NONNULL(1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup Inwin Inwin
|
||||||
|
*
|
||||||
|
* @image html img/widget/inwin/preview-00.png
|
||||||
|
* @image latex img/widget/inwin/preview-00.eps
|
||||||
|
* @image html img/widget/inwin/preview-01.png
|
||||||
|
* @image latex img/widget/inwin/preview-01.eps
|
||||||
|
* @image html img/widget/inwin/preview-02.png
|
||||||
|
* @image latex img/widget/inwin/preview-02.eps
|
||||||
|
*
|
||||||
|
* An inwin is a window inside a window that is useful for a quick popup.
|
||||||
|
* It does not hover.
|
||||||
|
*
|
||||||
|
* It works by creating an object that will occupy the entire window, so it
|
||||||
|
* must be created using an @ref Win "elm_win" as parent only. The inwin
|
||||||
|
* object can be hidden or restacked below every other object if it's
|
||||||
|
* needed to show what's behind it without destroying it. If this is done,
|
||||||
|
* the elm_win_inwin_activate() function can be used to bring it back to
|
||||||
|
* full visibility again.
|
||||||
|
*
|
||||||
|
* There are three styles available in the default theme. These are:
|
||||||
|
* @li default: The inwin is sized to take over most of the window it's
|
||||||
|
* placed in.
|
||||||
|
* @li minimal: The size of the inwin will be the minimum necessary to show
|
||||||
|
* its contents.
|
||||||
|
* @li minimal_vertical: Horizontally, the inwin takes as much space as
|
||||||
|
* possible, but it's sized vertically the most it needs to fit its\
|
||||||
|
* contents.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Adds an inwin to the current window
|
||||||
|
*
|
||||||
|
* The @p obj used as parent @b MUST be an @ref Win "Elementary Window".
|
||||||
|
* Never call this function with anything other than the top-most window
|
||||||
|
* as its parameter, unless you are fond of undefined behavior.
|
||||||
|
*
|
||||||
|
* After creating the object, the widget will set itself as resize object
|
||||||
|
* for the window with elm_win_resize_object_add(), so when shown it will
|
||||||
|
* appear to cover almost the entire window (how much of it depends on its
|
||||||
|
* content and the style used). It must not be added into other container
|
||||||
|
* objects and it needs not be moved or resized manually.
|
||||||
|
*
|
||||||
|
* @param parent The parent object
|
||||||
|
* @return The new object or NULL if it cannot be created
|
||||||
|
*/
|
||||||
EAPI Evas_Object *elm_win_inwin_add(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
EAPI Evas_Object *elm_win_inwin_add(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
/**
|
||||||
|
* Activates an inwin object, ensuring its visibility
|
||||||
|
*
|
||||||
|
* This function will make sure that the inwin @p obj is completely visible
|
||||||
|
* by calling evas_object_show() and evas_object_raise() on it, to bring it
|
||||||
|
* to the front. It also sets the keyboard focus to it, which will be passed
|
||||||
|
* onto its content.
|
||||||
|
*
|
||||||
|
* The object's theme will also receive the signal "elm,action,show" with
|
||||||
|
* source "elm".
|
||||||
|
*
|
||||||
|
* @param obj The inwin to activate
|
||||||
|
*/
|
||||||
EAPI void elm_win_inwin_activate(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
EAPI void elm_win_inwin_activate(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
/**
|
||||||
|
* Set the content of an inwin object.
|
||||||
|
*
|
||||||
|
* Once the content object is set, a previously set one will be deleted.
|
||||||
|
* If you want to keep that old content object, use the
|
||||||
|
* elm_win_inwin_content_unset() function.
|
||||||
|
*
|
||||||
|
* @param obj The inwin object
|
||||||
|
* @param content The object to set as content
|
||||||
|
*/
|
||||||
EAPI void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
|
EAPI void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) EINA_ARG_NONNULL(1);
|
||||||
|
/**
|
||||||
|
* Get the content of an inwin object.
|
||||||
|
*
|
||||||
|
* Return the content object which is set for this widget.
|
||||||
|
*
|
||||||
|
* The returned object is valid as long as the inwin is still alive and no
|
||||||
|
* other content is set on it. Deleting the object will notify the inwin
|
||||||
|
* about it and this one will be left empty.
|
||||||
|
*
|
||||||
|
* If you need to remove an inwin's content to be reused somewhere else,
|
||||||
|
* see elm_win_inwin_content_unset().
|
||||||
|
*
|
||||||
|
* @param obj The inwin object
|
||||||
|
* @return The content that is being used
|
||||||
|
*/
|
||||||
EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
EAPI Evas_Object *elm_win_inwin_content_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
/**
|
||||||
|
* Unset the content of an inwin object.
|
||||||
|
*
|
||||||
|
* Unparent and return the content object which was set for this widget.
|
||||||
|
*
|
||||||
|
* @param obj The inwin object
|
||||||
|
* @return The content that was being used
|
||||||
|
*/
|
||||||
EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
/* available styles:
|
/**
|
||||||
* default
|
* @}
|
||||||
* minimal
|
|
||||||
* minimal_vertical
|
|
||||||
*/
|
*/
|
||||||
/* X specific calls - won't work on non-x engines (return 0) */
|
/* X specific calls - won't work on non-x engines (return 0) */
|
||||||
EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
|
|
|
@ -3032,11 +3032,6 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @defgroup Inwin Inwin
|
|
||||||
*
|
|
||||||
* An inwin is a window inside a window that is useful for a quick popup. It does not hover.
|
|
||||||
*/
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
elm_win_inwin_add(Evas_Object *obj)
|
elm_win_inwin_add(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -3073,13 +3068,6 @@ elm_win_inwin_add(Evas_Object *obj)
|
||||||
return obj2;
|
return obj2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Activates an inwin object
|
|
||||||
*
|
|
||||||
* @param obj The inwin to activate
|
|
||||||
*
|
|
||||||
* @ingroup Inwin
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_win_inwin_activate(Evas_Object *obj)
|
elm_win_inwin_activate(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -3092,18 +3080,6 @@ elm_win_inwin_activate(Evas_Object *obj)
|
||||||
elm_object_focus(obj);
|
elm_object_focus(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the content of an inwin object.
|
|
||||||
*
|
|
||||||
* Once the content object is set, a previously set one will be deleted.
|
|
||||||
* If you want to keep that old content object, use the
|
|
||||||
* elm_win_inwin_content_unset() function.
|
|
||||||
*
|
|
||||||
* @param obj The inwin object
|
|
||||||
* @param content The object to set as content
|
|
||||||
*
|
|
||||||
* @ingroup Inwin
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
|
elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
|
||||||
{
|
{
|
||||||
|
@ -3123,16 +3099,6 @@ elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the content of an inwin object.
|
|
||||||
*
|
|
||||||
* Return the content object which is set for this widget.
|
|
||||||
*
|
|
||||||
* @param obj The inwin object
|
|
||||||
* @return The content that is being used
|
|
||||||
*
|
|
||||||
* @ingroup Inwin
|
|
||||||
*/
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
elm_win_inwin_content_get(const Evas_Object *obj)
|
elm_win_inwin_content_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -3142,16 +3108,6 @@ elm_win_inwin_content_get(const Evas_Object *obj)
|
||||||
return wd->content;
|
return wd->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Unset the content of an inwin object.
|
|
||||||
*
|
|
||||||
* Unparent and return the content object which was set for this widget.
|
|
||||||
*
|
|
||||||
* @param obj The inwin object
|
|
||||||
* @return The content that was being used
|
|
||||||
*
|
|
||||||
* @ingroup Inwin
|
|
||||||
*/
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
elm_win_inwin_content_unset(Evas_Object *obj)
|
elm_win_inwin_content_unset(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue