2012-08-30 09:46:40 -07:00
|
|
|
#ifndef ELM_WIDGET_PANEL_H
|
|
|
|
#define ELM_WIDGET_PANEL_H
|
|
|
|
|
2014-07-06 23:08:45 -07:00
|
|
|
#include "elm_interface_scrollable.h"
|
2012-08-30 09:46:40 -07:00
|
|
|
#include "elm_widget_layout.h"
|
|
|
|
|
2014-08-07 09:26:47 -07:00
|
|
|
/* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR
|
|
|
|
* CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT
|
|
|
|
* FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK
|
|
|
|
* IT AT RUNTIME.
|
|
|
|
*/
|
|
|
|
|
2012-08-30 09:46:40 -07:00
|
|
|
/**
|
|
|
|
* @addtogroup Widget
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @section elm-panel-class The Elementary Panel Class
|
|
|
|
*
|
|
|
|
* Elementary, besides having the @ref Panel widget, exposes its
|
|
|
|
* foundation -- the Elementary Panel Class -- in order to create other
|
|
|
|
* widgets which are a panel with some more logic on top.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base layout smart data extended with panel instance data.
|
|
|
|
*/
|
2014-03-24 01:38:01 -07:00
|
|
|
typedef struct _Elm_Panel_Data Elm_Panel_Data;
|
|
|
|
struct _Elm_Panel_Data
|
2012-08-30 09:46:40 -07:00
|
|
|
{
|
|
|
|
Evas_Object *bx, *content;
|
2013-09-10 02:48:32 -07:00
|
|
|
Evas_Object *event;
|
2014-07-06 23:08:45 -07:00
|
|
|
Evas_Object *scr_ly;
|
|
|
|
Evas_Object *hit_rect, *panel_edje, *scr_edje;
|
|
|
|
Evas_Object *scr_panel, *scr_event;
|
|
|
|
|
2013-12-15 07:44:55 -08:00
|
|
|
|
2012-08-30 09:46:40 -07:00
|
|
|
Elm_Panel_Orient orient;
|
|
|
|
|
2014-07-06 23:08:45 -07:00
|
|
|
double content_size_ratio;
|
|
|
|
Evas_Coord down_x, down_y;
|
|
|
|
Evas_Coord handler_size;
|
|
|
|
Ecore_Timer *timer;
|
|
|
|
|
2012-08-30 09:46:40 -07:00
|
|
|
Eina_Bool hidden : 1;
|
2012-12-08 10:39:24 -08:00
|
|
|
Eina_Bool delete_me : 1;
|
2014-07-06 23:08:45 -07:00
|
|
|
Eina_Bool scrollable : 1;
|
|
|
|
Eina_Bool freeze: 1;
|
2012-08-30 09:46:40 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define ELM_PANEL_DATA_GET(o, sd) \
|
2014-06-03 03:35:28 -07:00
|
|
|
Elm_Panel_Data * sd = eo_data_scope_get(o, ELM_PANEL_CLASS)
|
2012-08-30 09:46:40 -07:00
|
|
|
|
|
|
|
#define ELM_PANEL_DATA_GET_OR_RETURN(o, ptr) \
|
|
|
|
ELM_PANEL_DATA_GET(o, ptr); \
|
2014-01-15 10:33:40 -08:00
|
|
|
if (EINA_UNLIKELY(!ptr)) \
|
2012-08-30 09:46:40 -07:00
|
|
|
{ \
|
2014-01-15 10:33:40 -08:00
|
|
|
CRI("No widget data for object %p (%s)", \
|
|
|
|
o, evas_object_type_get(o)); \
|
2012-08-30 09:46:40 -07:00
|
|
|
return; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_PANEL_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
|
|
|
ELM_PANEL_DATA_GET(o, ptr); \
|
2014-01-15 10:33:40 -08:00
|
|
|
if (EINA_UNLIKELY(!ptr)) \
|
2012-08-30 09:46:40 -07:00
|
|
|
{ \
|
2014-01-15 10:33:40 -08:00
|
|
|
CRI("No widget data for object %p (%s)", \
|
|
|
|
o, evas_object_type_get(o)); \
|
2012-08-30 09:46:40 -07:00
|
|
|
return val; \
|
|
|
|
}
|
|
|
|
|
2014-01-15 10:33:40 -08:00
|
|
|
#define ELM_PANEL_CHECK(obj) \
|
2014-06-03 03:35:28 -07:00
|
|
|
if (EINA_UNLIKELY(!eo_isa((obj), ELM_PANEL_CLASS))) \
|
2012-08-30 09:46:40 -07:00
|
|
|
return
|
|
|
|
|
|
|
|
#endif
|