summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_hover_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_hover_eo.h')
-rw-r--r--src/lib/elementary/elm_hover_eo.h112
1 files changed, 112 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_hover_eo.h b/src/lib/elementary/elm_hover_eo.h
new file mode 100644
index 0000000..8030a27
--- /dev/null
+++ b/src/lib/elementary/elm_hover_eo.h
@@ -0,0 +1,112 @@
1#ifndef _ELM_HOVER_EO_H_
2#define _ELM_HOVER_EO_H_
3
4#ifndef _ELM_HOVER_EO_CLASS_TYPE
5#define _ELM_HOVER_EO_CLASS_TYPE
6
7typedef Eo Elm_Hover;
8
9#endif
10
11#ifndef _ELM_HOVER_EO_TYPES
12#define _ELM_HOVER_EO_TYPES
13
14/** The orientation axis for the hover object
15 *
16 * @ingroup Elm_Hover
17 */
18typedef enum
19{
20 ELM_HOVER_AXIS_NONE = 0, /**< ELM_HOVER_AXIS_NONE -- no preferred orientation.
21 */
22 ELM_HOVER_AXIS_HORIZONTAL, /**< ELM_HOVER_AXIS_HORIZONTAL -- horizontal. */
23 ELM_HOVER_AXIS_VERTICAL, /**< ELM_HOVER_AXIS_VERTICAL -- vertical. */
24 ELM_HOVER_AXIS_BOTH /**< ELM_HOVER_AXIS_BOTH -- both. */
25} Elm_Hover_Axis;
26
27
28#endif
29/** Elementary hover class
30 *
31 * @ingroup Elm_Hover
32 */
33#define ELM_HOVER_CLASS elm_hover_class_get()
34
35EWAPI const Efl_Class *elm_hover_class_get(void);
36
37/**
38 * @brief Sets the target object for the hover.
39 *
40 * This function will cause the hover to be centered on the target object.
41 *
42 * @param[in] obj The object.
43 * @param[in] target The target object.
44 *
45 * @ingroup Elm_Hover
46 */
47EOAPI void elm_obj_hover_target_set(Eo *obj, Efl_Canvas_Object *target);
48
49/**
50 * @brief Get the target object for the hover.
51 *
52 * @param[in] obj The object.
53 *
54 * @return The target object.
55 *
56 * @ingroup Elm_Hover
57 */
58EOAPI Efl_Canvas_Object *elm_obj_hover_target_get(const Eo *obj);
59
60/**
61 * @brief Returns the best swallow location for content in the hover.
62 *
63 * Best is defined here as the location at which there is the most available
64 * space.
65 *
66 * @c pref_axis may be either #ELM_HOVER_AXIS_NONE (for no preferred
67 * orientation), #ELM_HOVER_AXIS_HORIZONTAL, #ELM_HOVER_AXIS_VERTICAL or
68 * #ELM_HOVER_AXIS_BOTH.
69 *
70 * If #ELM_HOVER_AXIS_HORIZONTAL is chosen the returned position will
71 * necessarily be along the horizontal axis("left" or "right"). If
72 * #ELM_HOVER_AXIS_VERTICAL is chosen the returned position will necessarily be
73 * along the vertical axis("top" or "bottom"). Choosing #ELM_HOVER_AXIS_BOTH or
74 * #ELM_HOVER_AXIS_NONE has the same effect and the returned position may be in
75 * either axis.
76 *
77 * See also @ref elm_object_part_content_set.
78 *
79 * @param[in] obj The object.
80 * @param[in] pref_axis The preferred orientation axis for the hover object to
81 * use
82 *
83 * @return Swallow location
84 *
85 * @ingroup Elm_Hover
86 */
87EOAPI const char *elm_obj_hover_best_content_location_get(const Eo *obj, Elm_Hover_Axis pref_axis);
88
89/** Dismiss a hover object
90 *
91 * @ingroup Elm_Hover
92 */
93EOAPI void elm_obj_hover_dismiss(Eo *obj);
94
95EWAPI extern const Efl_Event_Description _ELM_HOVER_EVENT_SMART_CHANGED;
96
97/** Called when hover changed
98 * @return const char *
99 *
100 * @ingroup Elm_Hover
101 */
102#define ELM_HOVER_EVENT_SMART_CHANGED (&(_ELM_HOVER_EVENT_SMART_CHANGED))
103
104EWAPI extern const Efl_Event_Description _ELM_HOVER_EVENT_DISMISSED;
105
106/** Called when hover was dismissed
107 *
108 * @ingroup Elm_Hover
109 */
110#define ELM_HOVER_EVENT_DISMISSED (&(_ELM_HOVER_EVENT_DISMISSED))
111
112#endif