summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_bg_legacy.h
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2017-09-26 11:46:11 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-26 17:58:07 +0900
commitebff5e8639851ab9d80fa6ff36f20f08952c015e (patch)
treef7017fb4742e77fc3faa395000be665ed8627da7 /src/lib/elementary/elm_bg_legacy.h
parent8557fe818f6ac033f582dc4865235aa3176d7447 (diff)
elm_bg: rename elm_bg to Efl.Ui.Bg
Summary: elm_bg was supposed to be used only in legacy, but since we need a common object to be used as a background of widgets, it is now renamed as efl_ui_bg and supports EO APIs. Reviewers: cedric, jpeg, woohyun Differential Revision: https://phab.enlightenment.org/D5147
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/elm_bg_legacy.h72
1 files changed, 71 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_bg_legacy.h b/src/lib/elementary/elm_bg_legacy.h
index a46cc7bcd8..33a1a5211d 100644
--- a/src/lib/elementary/elm_bg_legacy.h
+++ b/src/lib/elementary/elm_bg_legacy.h
@@ -1,4 +1,23 @@
1/** 1/**
2 * @brief Identifiers on how a background widget is to display its image
3 *
4 * -- if it was set to use an image file.
5 *
6 * @ingroup Elm_Bg
7 */
8 typedef enum
9 {
10 ELM_BG_OPTION_CENTER = 0, /**< Center the background image. */
11 ELM_BG_OPTION_SCALE, /**< Scale the background image, retaining aspect ratio
12 * (default). */
13 ELM_BG_OPTION_STRETCH, /**< Stretch the background image to fill the widget's
14 * area. */
15 ELM_BG_OPTION_TILE, /**< Tile background image at its original size. */
16 ELM_BG_OPTION_LAST /**< Sentinel value to indicate last enum field during
17 * iteration. Also used to indicate errors */
18 } Elm_Bg_Option;
19
20/**
2 * Add a new background to the parent 21 * Add a new background to the parent
3 * 22 *
4 * @param parent The parent object 23 * @param parent The parent object
@@ -91,4 +110,55 @@ EAPI Eina_Bool elm_bg_file_set(Eo *obj, const char *file, const char *group);
91 */ 110 */
92EAPI void elm_bg_file_get(const Eo *obj, const char **file, const char **group); 111EAPI void elm_bg_file_get(const Eo *obj, const char **file, const char **group);
93 112
94#include "elm_bg.eo.legacy.h" 113/**
114 * Set the mode of display for a given background widget's image
115 *
116 * This sets how the background widget will display its image. This
117 * will only work if the elm_bg_file_set() was previously called with
118 * an image file on $obj. The image can be display tiled, scaled,
119 * centered or stretched. #ELM_BG_OPTION_SCALE by default.
120 *
121 * @param[in] option The desired background option(See Elm.Bg.Option).
122 *
123 * @see elm_bg_option_get()
124 *
125 * @ingroup Elm_Bg
126 */
127EAPI void elm_bg_option_set(Evas_Object *obj, Elm_Bg_Option option);
128
129/**
130 * Get the mode of display of a given background widget's image
131 *
132 * @return The background option Elm.Bg.Option Default is #Elm_Bg_SCALE.
133 *
134 * @see elm_bg_option_set()
135 *
136 * @ingroup Elm_Bg
137 */
138EAPI Elm_Bg_Option elm_bg_option_get(const Evas_Object *obj);
139
140/**
141 * Set the size of the pixmap representation of the image set on a
142 * given background widget.
143 *
144 * @warning: This function just makes sense if an image file was set on
145 * @p obj, with elm_bg_file_set().
146 *
147 * This function sets a new size for pixmap representation of the
148 * given bg image. It allows for the image to be loaded already in the
149 * specified size, reducing the memory usage and load time (for
150 * example, when loading a big image file with its load size set to a
151 * smaller size)
152 *
153 * @note: This is just a hint for the underlying system. The real size
154 * of the pixmap may differ depending on the type of image being
155 * loaded, being bigger than requested.
156 *
157 * @ingroup Elm_Bg
158 *
159 * @param[in] w The new width of the image pixmap representation
160 * @param[in] h The new height of the image pixmap representation
161 */
162EAPI void elm_bg_load_size_set(Evas_Object *obj, int w, int h);
163
164#include "efl_ui_bg.eo.legacy.h"