Efl model: Fix Eolian warnings (and migrate types).

This commit is contained in:
Tom Hacohen 2015-06-10 15:52:33 +01:00
parent 2605eb3c15
commit e8dd532854
2 changed files with 38 additions and 91 deletions

View File

@ -5,60 +5,6 @@
extern "C" { extern "C" {
#endif #endif
/**
* @enum _Efl_Model_Load_Status
* XXX/TODO/FIXME: Remove this enum (and possibly other data) from here
* as soon as eolian translates these data types in .eo's.
*/
enum _Efl_Model_Load_Status
{
EFL_MODEL_LOAD_STATUS_ERROR = 0,
EFL_MODEL_LOAD_STATUS_LOADING_PROPERTIES = (1 << 0),
EFL_MODEL_LOAD_STATUS_LOADING_CHILDREN = (1 << 1),
EFL_MODEL_LOAD_STATUS_LOADING = (1 << 0) | (1 << 1),
EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES = (1 << 2),
EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN = (1 << 3),
EFL_MODEL_LOAD_STATUS_LOADED = (1 << 2) | (1 << 3),
EFL_MODEL_LOAD_STATUS_UNLOADING = (1 << 4),
EFL_MODEL_LOAD_STATUS_UNLOADED = (1 << 5)
};
/**
* @typedef Efl_Model_Load_Status
*/
typedef enum _Efl_Model_Load_Status Efl_Model_Load_Status;
/**
* @struct _Efl_Model_Load
* Structure to hold Efl_Model_Load_Status enum
* (and possible other data) to avoid ABI break.
*/
struct _Efl_Model_Load
{
Efl_Model_Load_Status status;
/* add more data below here if necessary */
};
/**
* @typedef Efl_Model_Load
*/
typedef struct _Efl_Model_Load Efl_Model_Load;
/**
* @struct _Efl_Model_Property_Event
*/
struct _Efl_Model_Property_Event
{
const Eina_Array *changed_properties; /**< array of property name */
const Eina_Array *invalidated_properties; /**< array of property name */
};
/**
* @typedef Efl_Model_Property_Event
*/
typedef struct _Efl_Model_Property_Event Efl_Model_Property_Event;
/** /**
* @struct _Efl_Model_Children_Event * @struct _Efl_Model_Children_Event
* Every time a child id added the event * Every time a child id added the event

View File

@ -1,26 +1,27 @@
/* enum Efl.Model.Load_Status {
* enum Efl_Model_Load_Status error = 0,
* { loading_properties = (1 << 0),
* error = 0, /*@ Error in Load Model * loading_children = (1 << 1),
* properties = (1 << 0), /*@ properties load in progress * loading = (1 << 0) | (1 << 1),
* children = (1 << 1), /*@ children load in progress *
* loading = (1 << 0) | (1 << 1), /*@ children and properties load in progress * loaded_properties = (1 << 2),
* loaded_children = (1 << 3),
* loaded_properties = (1 << 2), /*@ Model as ready to fetch properties * loaded = (1 << 2) | (1 << 3),
* loaded_children = (1 << 3), /*@ Model as ready to fetch children *
* loaded = (1 << 2) | (1 << 3), /*@ Model as ready to fetch properties and children * unloading = (1 << 4),
* unloaded = (1 << 5)
* unloading = (1 << 4), /*@ Model Unload in progress * }
* unloaded = (1 << 5) /*@ Model Unloaded *
* } struct Efl.Model.Property_Event {
* changed_properties: array<const(char) *> *; [[List of changed properties]]
* invalidated_properties: array<const(char) *> *; [[Removed properties identified by name]]
* struct Efl_Model_Property_Event }
* {
* changed_properties: Eina_Array* <const(char)*>; /*@ List of changed properties * struct Efl.Model.Load {
* invalidated_properties: Eina_Array* <const(char)*>; /*@ Removed properties identified by name * [[Structure to hold Efl_Model_Load_Status enum (and possible other data) to avoid ABI break.]]
* }
*/ status: Efl.Model.Load_Status;
}
interface Efl.Model.Base () interface Efl.Model.Base ()
{ {
@ -41,7 +42,7 @@ interface Efl.Model.Base ()
@see efl_model_load @see efl_model_load
@since 1.14 */ @since 1.14 */
return: Efl_Model_Load_Status; return: Efl.Model.Load_Status;
} }
} }
@property properties { @property properties {
@ -59,7 +60,7 @@ interface Efl.Model.Base ()
@see EFL_MODEL_EVENT_PROPERTIES_CHANGE @see EFL_MODEL_EVENT_PROPERTIES_CHANGE
@since 1.14 */ @since 1.14 */
return: Efl_Model_Load_Status; return: Efl.Model.Load_Status;
} }
values { values {
properties: const(array<const(char*)>*); /*@ array of current properties */ properties: const(array<const(char*)>*); /*@ array of current properties */
@ -86,7 +87,7 @@ interface Efl.Model.Base ()
@see EFL_MODEL_EVENT_PROPERTIES_CHANGE @see EFL_MODEL_EVENT_PROPERTIES_CHANGE
@since 1.14 */ @since 1.14 */
return: Efl_Model_Load_Status; return: Efl.Model.Load_Status;
} }
get { get {
/*@ /*@
@ -105,7 +106,7 @@ interface Efl.Model.Base ()
@see EFL_MODEL_EVENT_PROPERTIES_CHANGE @see EFL_MODEL_EVENT_PROPERTIES_CHANGE
@since 1.14 */ @since 1.14 */
return: Efl_Model_Load_Status; return: Efl.Model.Load_Status;
} }
keys { keys {
property: const(char)*; /*@ Property name */ property: const(char)*; /*@ Property name */
@ -168,11 +169,11 @@ interface Efl.Model.Base ()
@see efl_model_load_status_get @see efl_model_load_status_get
@since 1.14 */ @since 1.14 */
return: Efl_Model_Load_Status; return: Efl.Model.Load_Status;
} }
keys { keys {
start: unsigned; /*@ Range begin - start from here. If start and count are 0 slice is ignored.*/ start: uint; /*@ Range begin - start from here. If start and count are 0 slice is ignored.*/
count: unsigned; /*@ Range size. If count and start are 0 slice is ignored.*/ count: uint; /*@ Range size. If count and start are 0 slice is ignored.*/
} }
values { values {
children_accessor: accessor<list<Eo.Base*>*>*; children_accessor: accessor<list<Eo.Base*>*>*;
@ -196,10 +197,10 @@ interface Efl.Model.Base ()
@see efl_model_load_status_get @see efl_model_load_status_get
@since 1.14 */ @since 1.14 */
return: Efl_Model_Load_Status; return: Efl.Model.Load_Status;
} }
values { values {
children_count: unsigned; children_count: uint;
} }
} }
load { load {
@ -286,7 +287,7 @@ interface Efl.Model.Base ()
@since 1.14 */ @since 1.14 */
return: Eo *; return: Eo.Base *;
} }
child_del { child_del {
/*@ /*@
@ -301,17 +302,17 @@ interface Efl.Model.Base ()
@see EFL_MODEL_EVENT_CHILD_REMOVED @see EFL_MODEL_EVENT_CHILD_REMOVED
@since 1.14 */ @since 1.14 */
return: Efl_Model_Load_Status; return: Efl.Model.Load_Status;
params { params {
@in child: Eo*; /*@ Child to be removed */ @in child: Eo.Base*; /*@ Child to be removed */
} }
} }
} }
events { events {
load,status: Efl_Model_Load_Status; /*@ Event dispatch when load status changes */ load,status: Efl.Model.Load_Status; /*@ Event dispatch when load status changes */
properties,changed: Efl_Model_Properties_Evt; /*@ Event dispatched when properties list is available. */ properties,changed: Efl.Model.Property_Event; /*@ Event dispatched when properties list is available. */
child,added; /*@ Event dispatched when new child is added. */ child,added; /*@ Event dispatched when new child is added. */
child,removed; /*@ Event dispatched when child is removed. */ child,removed; /*@ Event dispatched when child is removed. */
children,count,changed; /*@ Event dispatched when children count is finished. */ children,count,changed; /*@ Event dispatched when children count is finished. */