summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_check_private.h
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-05-22 11:27:13 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-05-22 12:13:13 +0900
commitbd743d93ac41b929d7d5dc7bb799cb524123761a (patch)
tree7b071ab01ded0b561a9b4cd62392ad2a7f6e060e /src/lib/elementary/efl_ui_check_private.h
parent7f1ef4e2d4efba03e1849741cfab4a66cffbdc6c (diff)
rename elm_check to Efl.Ui.Check
Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
Diffstat (limited to 'src/lib/elementary/efl_ui_check_private.h')
-rw-r--r--src/lib/elementary/efl_ui_check_private.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_check_private.h b/src/lib/elementary/efl_ui_check_private.h
new file mode 100644
index 0000000..e930e0d
--- /dev/null
+++ b/src/lib/elementary/efl_ui_check_private.h
@@ -0,0 +1,61 @@
1#ifndef EFL_UI_CHECK_H
2#define EFL_UI_CHECK_H
3
4#include "Elementary.h"
5
6/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
7 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
8 * FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK
9 * IT AT RUNTIME.
10 */
11
12/**
13 * @addtogroup Widget
14 * @{
15 *
16 * @section elm-check-class The Elementary Check Class
17 *
18 * Elementary, besides having the @ref Check widget, exposes its
19 * foundation -- the Elementary Check Class -- in order to create other
20 * widgets which are a check with some more logic on top.
21 */
22
23/**
24 * Base layout smart data extended with check instance data.
25 */
26typedef struct _Efl_Ui_Check_Data Efl_Ui_Check_Data;
27struct _Efl_Ui_Check_Data
28{
29 Eina_Bool *statep;
30};
31
32/**
33 * @}
34 */
35
36#define ELM_CHECK_DATA_GET(o, sd) \
37 Efl_Ui_Check_Data * sd = efl_data_scope_get(o, EFL_UI_CHECK_CLASS)
38
39#define ELM_CHECK_DATA_GET_OR_RETURN(o, ptr) \
40 ELM_CHECK_DATA_GET(o, ptr); \
41 if (EINA_UNLIKELY(!ptr)) \
42 { \
43 CRI("No widget data for object %p (%s)", \
44 o, evas_object_type_get(o)); \
45 return; \
46 }
47
48#define ELM_CHECK_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
49 ELM_CHECK_DATA_GET(o, ptr); \
50 if (EINA_UNLIKELY(!ptr)) \
51 { \
52 CRI("No widget data for object %p (%s)", \
53 o, evas_object_type_get(o)); \
54 return val; \
55 }
56
57#define ELM_CHECK_CHECK(obj) \
58 if (EINA_UNLIKELY(!efl_isa((obj), ELM_CHECK_CLASS))) \
59 return
60
61#endif