2017-05-22 18:24:38 -07:00
|
|
|
#ifndef EFL_UI_CHECK_PRIVATE_H
|
|
|
|
#define EFL_UI_CHECK_PRIVATE_H
|
2012-08-01 14:03:05 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
#include "Elementary.h"
|
2012-08-01 14:03:05 -07:00
|
|
|
|
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-01 14:03:05 -07:00
|
|
|
/**
|
|
|
|
* @addtogroup Widget
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @section elm-check-class The Elementary Check Class
|
|
|
|
*
|
|
|
|
* Elementary, besides having the @ref Check widget, exposes its
|
|
|
|
* foundation -- the Elementary Check Class -- in order to create other
|
|
|
|
* widgets which are a check with some more logic on top.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base layout smart data extended with check instance data.
|
|
|
|
*/
|
2017-05-21 19:27:13 -07:00
|
|
|
typedef struct _Efl_Ui_Check_Data Efl_Ui_Check_Data;
|
|
|
|
struct _Efl_Ui_Check_Data
|
2012-08-01 14:03:05 -07:00
|
|
|
{
|
2015-04-19 22:24:10 -07:00
|
|
|
Eina_Bool *statep;
|
efl_ui_check: make it undependend of nstate
Summary:
check can only display 2 states, and is only designed to do so.
Additionally, nstate inherits from button, which
brings in autorepeat, which is hileriously broken on check and cannot
really work.
Right now there is not even support in the theme for clickable. So its a
good idea to get rid of this for now IMO.
ref T7865
Reviewers: stefan_schmidt, zmike, segfaultxavi, akanad, YOhoho
Reviewed By: zmike
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7865, T7867
Differential Revision: https://phab.enlightenment.org/D9018
2019-06-13 06:21:38 -07:00
|
|
|
Eina_Bool selected;
|
2019-09-18 09:02:35 -07:00
|
|
|
Eina_Bool legacy_changed_emitted_unselect : 1;
|
|
|
|
Eina_Bool legacy_changed_emitted_select : 1;
|
2012-08-01 14:03:05 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2017-06-16 00:11:42 -07:00
|
|
|
#define EFL_UI_CHECK_DATA_GET(o, sd) \
|
2017-05-21 19:27:13 -07:00
|
|
|
Efl_Ui_Check_Data * sd = efl_data_scope_get(o, EFL_UI_CHECK_CLASS)
|
2012-08-01 14:03:05 -07:00
|
|
|
|
2017-06-16 00:11:42 -07:00
|
|
|
#define EFL_UI_CHECK_DATA_GET_OR_RETURN(o, ptr) \
|
|
|
|
EFL_UI_CHECK_DATA_GET(o, ptr); \
|
2014-01-15 10:33:40 -08:00
|
|
|
if (EINA_UNLIKELY(!ptr)) \
|
2012-08-01 14:03:05 -07:00
|
|
|
{ \
|
2018-01-31 19:16:28 -08:00
|
|
|
ERR("No widget data for object %p (%s)", \
|
2014-01-15 10:33:40 -08:00
|
|
|
o, evas_object_type_get(o)); \
|
2012-08-01 14:03:05 -07:00
|
|
|
return; \
|
|
|
|
}
|
|
|
|
|
2017-06-16 00:11:42 -07:00
|
|
|
#define EFL_UI_CHECK_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
|
|
|
|
EFL_UI_CHECK_DATA_GET(o, ptr); \
|
2014-01-15 10:33:40 -08:00
|
|
|
if (EINA_UNLIKELY(!ptr)) \
|
2012-08-01 14:03:05 -07:00
|
|
|
{ \
|
2018-01-31 19:16:28 -08:00
|
|
|
ERR("No widget data for object %p (%s)", \
|
2014-01-15 10:33:40 -08:00
|
|
|
o, evas_object_type_get(o)); \
|
2012-08-01 14:03:05 -07:00
|
|
|
return val; \
|
|
|
|
}
|
|
|
|
|
2017-06-16 00:11:42 -07:00
|
|
|
#define EFL_UI_CHECK_CHECK(obj) \
|
2016-08-15 06:44:41 -07:00
|
|
|
if (EINA_UNLIKELY(!efl_isa((obj), ELM_CHECK_CLASS))) \
|
2012-08-01 14:03:05 -07:00
|
|
|
return
|
|
|
|
|
|
|
|
#endif
|