eina_strbuf_append(buf, ", ");
*nidx += _gen_param(buf, pr, ftype, &rpid);
+ /* Keep the logic for when there's a better way to emit NONNULL */
+#if 0
if (!eolian_parameter_is_nonull(pr) || !flagbuf)
continue;
}
else
eina_strbuf_append_printf(*flagbuf, ", %d", *nidx - rpid);
+#else
+ (void)flagbuf;
+#endif
}
eina_iterator_free(itr);
}
const Eolian_Type *eolian_parameter_type_get(const Eolian_Function_Parameter *param);
const Eolian_Expression *eolian_parameter_default_value_get(const Eolian_Function_Parameter *param);
const Eolian_Documentation *eolian_parameter_documentation_get(const Eolian_Function_Parameter *param);
- Eina_Bool eolian_parameter_is_nonull(const Eolian_Function_Parameter *param_desc);
Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter *param_desc);
const Eolian_Type *eolian_function_return_type_get(const Eolian_Function *function_id, Eolian_Function_Type ftype);
const Eolian_Expression *eolian_function_return_default_value_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
return v
end,
- is_nonull = function(self)
- return eolian.eolian_parameter_is_nonull(self) ~= 0
- end,
-
is_optional = function(self)
return eolian.eolian_parameter_is_optional(self) ~= 0
end
dispatched.
]]
params {
- address: string @nonull; [[Remote address]]
+ address: string; [[Remote address]]
}
return: Eina.Error; [[0 on success, error code otherwise]]
}
use @.create. To create from a string use @.parse.
]]
params {
- sockaddr: const(void_ptr) @nonull; [[The pointer to struct sockaddr-compatible handle as per <netinet/in.h>.]]
+ sockaddr: const(void_ptr); [[The pointer to struct sockaddr-compatible handle as per <netinet/in.h>.]]
}
return: Efl.Net.Ip_Address @owned; [[Newly created object or $NULL if parameter was invalid.]]
}
and port.
]]
params {
- address: string @nonull; [[The address, such as enlightenment.org:http or enlightenment.org (port=0)]]
+ address: string; [[The address, such as enlightenment.org:http or enlightenment.org (port=0)]]
family: int @optional; [[Preferred family. AF_UNSPEC or 0 for both, otherwise one of AF_INET or AF_INET6]]
flags: int @optional; [[Flags to use with getaddrinfo(). If 0, default flags are used (AI_V4MAPPED | AI_ADDRCONFIG, if these exist in your system).]]
}
]]
get { }
values {
- str: string @nonull; [[Numeric address as string]]
+ str: string; [[Numeric address as string]]
}
}
May only be set once. Afterwards the object does not change.
]]
values {
- sockaddr: const(void_ptr) @nonull; [[Sockaddr struct. As usual with struct sockaddr, the first field, struct sockaddr::sa_family, defines the rest of the structure and how the whole structure must be interpreted. If AF_INET is struct sockaddr_in, AF_INET6 is struct sockaddr_in6.]]
+ sockaddr: const(void_ptr); [[Sockaddr struct. As usual with struct sockaddr, the first field, struct sockaddr::sa_family, defines the rest of the structure and how the whole structure must be interpreted. If AF_INET is struct sockaddr_in, AF_INET6 is struct sockaddr_in6.]]
}
}
dispatched.
]]
params {
- address: string @nonull; [[Address to run server on]]
+ address: string; [[Address to run server on]]
}
return: Eina.Error; [[$0 on success, error code otherwise]]
}
ff02::1@1 - use loopback interface (idx=1)
]]
params {
- address: string @nonull; [[Multicast group address]]
+ address: string; [[Multicast group address]]
}
return: Eina.Error; [[0 on success, error code otherwise]]
}
This reverses the effect of @.multicast_join.
]]
params {
- address: string @nonull; [[Multicast group address]]
+ address: string; [[Multicast group address]]
}
return: Eina.Error; [[0 on success, error code otherwise]]
}
ff02::1@1 - use loopback interface (idx=1)
]]
params {
- address: string @nonull; [[Multicast address to join]]
+ address: string; [[Multicast address to join]]
}
return: Eina.Error; [[$0 on success, error code otherwise]]
}
This reverses the effect of @.multicast_join.
]]
params {
- address: string @nonull; [[Multicast address to leave]]
+ address: string; [[Multicast address to leave]]
}
return: Eina.Error; [[$0 on success, error code otherwise]]
}
return: Eina.Error; [[$0 on success, error code otherwise]]
}
values {
- address: string @nonull; [[Address to bind to]]
+ address: string; [[Address to bind to]]
}
}
[[Create a new renderer factory for the given type]]
return: Efl.Object; [[Renderer factory object]] /* FIXME: Should be a more restricted type, only here for cyclic. */
params {
- @in type: const(Efl.Class) @nonull; [[Efl class]] /* FIXME: Should probably be a more restricted type */
+ @in type: const(Efl.Class); [[Efl class]] /* FIXME: Should probably be a more restricted type */
}
}
}
]]
get { [[Returns $true if the part exists in the EDC group.]] }
keys {
- part: string @nonull; [[The part name to check.]]
+ part: string; [[The part name to check.]]
}
values {
exists: bool; [[$true if the part exists, $false otherwise.]]
"quality=100 compress=9".
]]
params {
- @in file: string @nonull; [[The filename to be used to save the image (extension
- obligatory).]]
+ @in file: string; [[The filename to be used to save the image (extension
+ obligatory).]]
@in key: string; [[The image key in the file (if an Eet one), or $null,
- otherwise.]]
+ otherwise.]]
@in info: const(ptr(Efl.File_Save_Info)); [[The flags to be used ($null for defaults).]]
}
return: bool; [[$true on success, $false otherwise]]
See also @.layer.get(), @.layer.set() and @.stack_below()]]
params {
- @in below: Efl.Gfx.Stack @nonull; [[The object below which to stack]]
+ @in below: Efl.Gfx.Stack; [[The object below which to stack]]
}
}
raise_to_top {
See also @.layer.get(), @.layer.set() and @.stack_below()]]
params {
- @in above: Efl.Gfx.Stack @nonull; [[The object above which to stack]]
+ @in above: Efl.Gfx.Stack; [[The object above which to stack]]
}
}
lower_to_bottom {
You can understand this method as read(2) libc function.
]]
params {
- @inout rw_slice: Eina.Rw_Slice @nonull; [[Provides a pre-allocated memory to be filled up to rw_slice.len. It will be populated and the length will be set to the actually used amount of bytes, which can be smaller than the request.]]
+ @inout rw_slice: Eina.Rw_Slice; [[Provides a pre-allocated memory to be filled up to rw_slice.len. It will be populated and the length will be set to the actually used amount of bytes, which can be smaller than the request.]]
}
return: Eina.Error; [[0 on succeed, a mapping of errno otherwise]]
}
You can understand this method as write(2) libc function.
]]
params {
- @inout slice: Eina.Slice @nonull; [[Provides a pre-populated memory to be used up to slice.len. The returned slice will be adapted as length will be set to the actually used amount of bytes, which can be smaller than the request.]]
+ @inout slice: Eina.Slice; [[Provides a pre-populated memory to be used up to slice.len. The returned slice will be adapted as length will be set to the actually used amount of bytes, which can be smaller than the request.]]
@out remaining: Eina.Slice @optional; [[Convenience to output the remaining parts of slice that was not written. If the full slice was written, this will be a slice of zero-length.]]
}
return: Eina.Error; [[0 on succeed, a mapping of errno otherwise]]
}
keys {
granularity: Efl.Access.Text_Granularity; [[Text granularity]]
- start_offset: ptr(int) @nonull; [[Offset indicating start of string according to given granularity. -1 in case of error.]]
+ start_offset: ptr(int); [[Offset indicating start of string according to given granularity. -1 in case of error.]]
end_offset: ptr(int); [[Offset indicating end of string according to given granularity. -1 in case of error.]]
}
values {
return: bool; [[$true if attribute name is set, $false otherwise]]
}
keys {
- name: string @nonull; [[Text attribute name]]
- start_offset: ptr(int) @nonull; [[Position in text from which given attribute is set.]]
+ name: string; [[Text attribute name]]
+ start_offset: ptr(int); [[Position in text from which given attribute is set.]]
end_offset: ptr(int); [[Position in text to which given attribute is set.]]
}
values {
[[Gets list of all text attributes.]]
}
keys {
- start_offset: ptr(int) @nonull; [[Start offset]]
+ start_offset: ptr(int); [[Start offset]]
end_offset: ptr(int); [[End offset]]
}
values {
]]
values {
- focus : Efl.Ui.Focus.Object @nonull; [[Currently focused element.]]
+ focus : Efl.Ui.Focus.Object; [[Currently focused element.]]
}
}
@property redirect {
get {}
values {
- root : Efl.Ui.Focus.Object @nonull; [[Will be registered into
+ root : Efl.Ui.Focus.Object; [[Will be registered into
this manager object.]]
}
}
$child gets focused.
]]
params {
- child : Efl.Ui.Focus.Object @nonull; [[The object to register]]
- parent : Efl.Ui.Focus.Object @nonull; [[The parent to use in
- the logical tree]]
+ child : Efl.Ui.Focus.Object; [[The object to register]]
+ parent : Efl.Ui.Focus.Object; [[The parent to use in
+ the logical tree]]
redirect : Efl.Ui.Focus.Manager; [[The redirect manager to set
once this child is focused can be NULL for no redirect]]
}
of the items that are.
]]
params {
- child : Efl.Ui.Focus.Object @nonull; [[The object to register]]
- parent : Efl.Ui.Focus.Object @nonull; [[The parent to use in
- the logical tree]]
+ child : Efl.Ui.Focus.Object; [[The object to register]]
+ parent : Efl.Ui.Focus.Object; [[The parent to use in
+ the logical tree]]
redirect : Efl.Ui.Focus.Manager; [[The redirect manager to set
once this child is focused can be $null for no redirect]]
}
in the redirect property. Set redirect to $null if nothing should happen.
]]
params {
- child : Efl.Ui.Focus.Object @nonull; [[The child to update]]
+ child : Efl.Ui.Focus.Object; [[The child to update]]
redirect : Efl.Ui.Focus.Manager; [[Once $child is focused this
element will be set as redirect]]
}
update_parent {
[[Set a new logical parent for the given child.]]
params {
- child : Efl.Ui.Focus.Object @nonull; [[The child to update]]
- parent : Efl.Ui.Focus.Object @nonull; [[The parent which now
+ child : Efl.Ui.Focus.Object; [[The child to update]]
+ parent : Efl.Ui.Focus.Object; [[The parent which now
will be the logical parent of child]]
}
return : bool; [[$true if successful, $false otherwise]]
update_children {
[[Give the list of children a different order.]]
params {
- parent : Efl.Ui.Focus.Object @nonull; [[the parent to update]]
+ parent : Efl.Ui.Focus.Object; [[the parent to update]]
children : list<Efl.Ui.Focus.Object> @owned; [[the list with the new order]]
}
return : bool; [[$true if successful, $false otherwise]]
Children from the list which are not true children are ignored.
]]
params {
- parent : Efl.Ui.Focus.Object @nonull; [[the parent to update]]
+ parent : Efl.Ui.Focus.Object; [[the parent to update]]
children : list<Efl.Ui.Focus.Object> @owned; [[the order of items]]
}
}
"abstract", "class", "data", "mixin", "import", "interface", "type", "const", "var", \
"own", "free", "struct", "enum", "@extern", "@free", "@auto", "@empty", \
"@private", "@protected", "@beta", "@hot", "@const", "@class", "@pure_virtual", \
- "@property", "@nonull", "@nullable", "@optional", "@in", "@out", "@inout", "@warn_unused", \
+ "@property", "@nullable", "@optional", "@in", "@out", "@inout", "@warn_unused", \
"eo_prefix", "legacy_prefix", "methods", "events", "params", "return", "legacy", \
"implements", "constructors", "get", "set", "keys", "values", "true", "false", "null"}
};
the priority. As a shortcut @Efl.Callback_Priority_Before,
@Efl.Callback_Priority_Default and @Efl.Callback_Priority_After can be used. See
@Efl.Callback_Priority for more details.]]
- @in source: Efl.Object @nonull; [[The object which emits the initial event]]
+ @in source: Efl.Object; [[The object which emits the initial event]]
}
}
event_callback_forwarder_del {
[[Remove an event callback forwarder for a specified event and object.]]
params {
@cref desc: Efl.Event_Description; [[The description of the event to listen to]]
- @in new_obj: Efl.Object @nonull; [[The object to emit events from]]
+ @in new_obj: Efl.Object; [[The object to emit events from]]
}
}
children_iterator_new {
EAPI const Eolian_Documentation *eolian_parameter_documentation_get(const Eolian_Function_Parameter *param);
/*
- * @brief Indicates if a parameter cannot be NULL.
- *
- * @param[in] param_desc parameter handle
- * @return EINA_TRUE if cannot be NULL, EINA_FALSE otherwise
- *
- * @ingroup Eolian
- */
-EAPI Eina_Bool eolian_parameter_is_nonull(const Eolian_Function_Parameter *param_desc);
-
-/*
* @brief Indicates if a parameter is optional.
*
* @param[in] param_desc parameter handle
}
EAPI Eina_Bool
-eolian_parameter_is_nonull(const Eolian_Function_Parameter *param)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(param, EINA_FALSE);
- return param->nonull;
-}
-
-EAPI Eina_Bool
eolian_parameter_is_optional(const Eolian_Function_Parameter *param)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(param, EINA_FALSE);
KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \
\
- KWAT(auto), KWAT(beta), KWAT(class), KWAT(const), KWAT(cref), KWAT(empty), \
- KWAT(extern), KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), KWAT(nonull), \
- KWAT(nullable), KWAT(optional), KWAT(out), KWAT(owned), KWAT(private), \
- KWAT(property), KWAT(protected), KWAT(restart), KWAT(pure_virtual), \
- KWAT(warn_unused), \
+ KWAT(auto), KWAT(beta), KWAT(c_name), KWAT(class), KWAT(const), KWAT(cref), \
+ KWAT(empty), KWAT(extern), KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), \
+ KWAT(nullable), KWAT(optional), KWAT(out), KWAT(owned), \
+ KWAT(private), KWAT(property), KWAT(protected), KWAT(restart), \
+ KWAT(pure_virtual), KWAT(warn_unused), \
\
KW(byte), KW(ubyte), KW(char), KW(short), KW(ushort), KW(int), KW(uint), \
KW(long), KW(ulong), KW(llong), KW(ullong), \
parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
Eina_Bool is_vals)
{
- Eina_Bool has_nonull = EINA_FALSE, has_optional = EINA_FALSE,
+ Eina_Bool has_optional = EINA_FALSE,
has_owned = EINA_FALSE;
Eina_Bool cref = (ls->t.kw == KW_at_cref);
Eolian_Function_Parameter *par = calloc(1, sizeof(Eolian_Function_Parameter));
}
for (;;) switch (ls->t.kw)
{
- case KW_at_nonull:
- CASE_LOCK(ls, nonull, "nonull qualifier")
- par->nonull = EINA_TRUE;
- eo_lexer_get(ls);
- break;
case KW_at_optional:
CASE_LOCK(ls, optional, "optional qualifier");
par->optional = EINA_TRUE;
Eolian_Expression *value;
Eolian_Documentation *doc;
Eolian_Parameter_Dir param_dir;
- Eina_Bool nonull :1; /* True if this argument cannot be NULL - deprecated */
Eina_Bool optional :1; /* True if this argument is optional */
};
See also @.group_member_is.
]]
params {
- @in sub_obj: Efl.Canvas.Object @nonull; [[The member object.]]
+ @in sub_obj: Efl.Canvas.Object; [[The member object.]]
}
}
group_member_remove {
]]
}
values {
- clipper: Efl.Canvas.Object @nonull; [[The object to clip $obj by.]]
+ clipper: Efl.Canvas.Object; [[The object to clip $obj by.]]
}
}
@property repeat_events {
]]
return: bool @warn_unused; [[$true if the call succeeded, $false otherwise.]]
params {
- @in keyname: string @nonull; [[The key to request events for.]]
+ @in keyname: string; [[The key to request events for.]]
@in modifiers: Efl.Input.Modifier; [[A combination of modifier
keys that must be present to trigger the event.]]
@in not_modifiers: Efl.Input.Modifier; [[A combination of modifier
and the legacy API evas_focus_get.
]]
params {
- @in keyname: string @nonull; [[The key the grab is set for.]]
+ @in keyname: string; [[The key the grab is set for.]]
@in modifiers: Efl.Input.Modifier; [[A mask of modifiers that must be
present to trigger the event.]]
@in not_modifiers: Efl.Input.Modifier; [[A mask of modifiers that must
}
get {}
values {
- src: Efl.Canvas.Object @nonull; [[Source object to use for the proxy.]]
+ src: Efl.Canvas.Object; [[Source object to use for the proxy.]]
}
}
@property source_clip {
return Documentation(c_doc) if c_doc else None
@cached_property
- def is_nonull(self):
- return bool(lib.eolian_parameter_is_nonull(self))
-
- @cached_property
def is_optional(self):
return bool(lib.eolian_parameter_is_optional(self))
lib.eolian_parameter_documentation_get.argtypes = (c_void_p,)
lib.eolian_parameter_documentation_get.restype = c_void_p
-# EAPI Eina_Bool eolian_parameter_is_nonull(const Eolian_Function_Parameter *param_desc);
-lib.eolian_parameter_is_nonull.argtypes = (c_void_p,)
-lib.eolian_parameter_is_nonull.restype = c_bool
-
# EAPI Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter *param_desc);
lib.eolian_parameter_is_optional.argtypes = (c_void_p,)
lib.eolian_parameter_is_optional.restype = c_bool
self.assertEqual(p.direction, eolian.Eolian_Parameter_Dir.IN)
self.assertEqual(p.name, 'add')
self.assertIsNone(p.default_value)
- self.assertFalse(p.is_nonull) # TODO is correct ?? 'add' can be null?
self.assertFalse(p.is_optional)
self.assertEqual(p.type.name, 'double')
self.assertIsInstance(p.documentation, eolian.Documentation)
}
}
- set_nonull_cb {
- params {
- cb: VoidFunc @nonull;
- }
- }
-
call_cb {
params {
a: int;
}
-EOLIAN static void
-_function_as_argument_set_nonull_cb(Eo *obj, Function_As_Argument_Data *pd, void *cb_data, VoidFunc cb, Eina_Free_Cb cb_free_cb)
-{
-
-}
-
EOLIAN static char *
_function_as_argument_call_cb(Eo *obj, Function_As_Argument_Data *pd, int a, double b)
{
EOAPI EFL_VOID_FUNC_BODYV(function_as_argument_set_cb, EFL_FUNC_CALL(cb_data, cb, cb_free_cb), void *cb_data, SimpleFunc cb, Eina_Free_Cb cb_free_cb);
-void _function_as_argument_set_nonull_cb(Eo *obj, Function_As_Argument_Data *pd, void *cb_data, VoidFunc cb, Eina_Free_Cb cb_free_cb);
-
-EOAPI EFL_VOID_FUNC_BODYV(function_as_argument_set_nonull_cb, EFL_FUNC_CALL(cb_data, cb, cb_free_cb), void *cb_data, VoidFunc cb, Eina_Free_Cb cb_free_cb);
-
char *_function_as_argument_call_cb(Eo *obj, Function_As_Argument_Data *pd, int a, double b);
EOAPI EFL_FUNC_BODYV(function_as_argument_call_cb, char *, NULL, EFL_FUNC_CALL(a, b), int a, double b);
EFL_OPS_DEFINE(ops,
EFL_OBJECT_OP_FUNC(function_as_argument_set_cb, _function_as_argument_set_cb),
- EFL_OBJECT_OP_FUNC(function_as_argument_set_nonull_cb, _function_as_argument_set_nonull_cb),
EFL_OBJECT_OP_FUNC(function_as_argument_call_cb, _function_as_argument_call_cb),
FUNCTION_AS_ARGUMENT_EXTRA_OPS
);
EOAPI void function_as_argument_set_cb(Eo *obj, void *cb_data, SimpleFunc cb, Eina_Free_Cb cb_free_cb);
-EOAPI void function_as_argument_set_nonull_cb(Eo *obj, void *cb_data, VoidFunc cb, Eina_Free_Cb cb_free_cb) EINA_ARG_NONNULL(3);
-
EOAPI char *function_as_argument_call_cb(Eo *obj, int a, double b);
#endif