summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_widget_panel.h
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-03-23 12:56:14 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-03-23 13:24:41 -0700
commitc2a1c49ab2042f559b28e840e54feb8494888e0e (patch)
treec6eb110b7c479499854eede9d0c3ab0a80c9a11a /src/lib/elementary/elm_widget_panel.h
parent9340855597e7e465435c69b6278650346688da14 (diff)
elementary: move all legacy files to their expected new location.
Diffstat (limited to 'src/lib/elementary/elm_widget_panel.h')
-rw-r--r--src/lib/elementary/elm_widget_panel.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_widget_panel.h b/src/lib/elementary/elm_widget_panel.h
new file mode 100644
index 0000000..1072408
--- /dev/null
+++ b/src/lib/elementary/elm_widget_panel.h
@@ -0,0 +1,79 @@
1#ifndef ELM_WIDGET_PANEL_H
2#define ELM_WIDGET_PANEL_H
3
4#include "elm_interface_scrollable.h"
5#include "elm_widget_layout.h"
6
7/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
8 * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
9 * FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK
10 * IT AT RUNTIME.
11 */
12
13/**
14 * @addtogroup Widget
15 * @{
16 *
17 * @section elm-panel-class The Elementary Panel Class
18 *
19 * Elementary, besides having the @ref Panel widget, exposes its
20 * foundation -- the Elementary Panel Class -- in order to create other
21 * widgets which are a panel with some more logic on top.
22 */
23
24/**
25 * Base layout smart data extended with panel instance data.
26 */
27typedef struct _Elm_Panel_Data Elm_Panel_Data;
28struct _Elm_Panel_Data
29{
30 Evas_Object *bx, *content;
31 Evas_Object *event;
32 Evas_Object *scr_ly;
33 Evas_Object *hit_rect, *panel_edje, *scr_edje;
34 Evas_Object *scr_panel, *scr_event;
35
36
37 Elm_Panel_Orient orient;
38
39 double content_size_ratio;
40 Evas_Coord down_x, down_y;
41 Evas_Coord handler_size;
42 Ecore_Timer *timer;
43
44 Eina_Bool hidden : 1;
45 Eina_Bool delete_me : 1;
46 Eina_Bool scrollable : 1;
47 Eina_Bool freeze: 1;
48};
49
50/**
51 * @}
52 */
53
54#define ELM_PANEL_DATA_GET(o, sd) \
55 Elm_Panel_Data * sd = eo_data_scope_get(o, ELM_PANEL_CLASS)
56
57#define ELM_PANEL_DATA_GET_OR_RETURN(o, ptr) \
58 ELM_PANEL_DATA_GET(o, ptr); \
59 if (EINA_UNLIKELY(!ptr)) \
60 { \
61 CRI("No widget data for object %p (%s)", \
62 o, evas_object_type_get(o)); \
63 return; \
64 }
65
66#define ELM_PANEL_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
67 ELM_PANEL_DATA_GET(o, ptr); \
68 if (EINA_UNLIKELY(!ptr)) \
69 { \
70 CRI("No widget data for object %p (%s)", \
71 o, evas_object_type_get(o)); \
72 return val; \
73 }
74
75#define ELM_PANEL_CHECK(obj) \
76 if (EINA_UNLIKELY(!eo_isa((obj), ELM_PANEL_CLASS))) \
77 return
78
79#endif