EAPI int ecore_shutdown(void);
/**
+ * @brief Inform EFL of the version this application was built for.
+ *
+ * This is transparently called from $EFL_MAIN().
+ */
+EWAPI void efl_build_version_set(int vmaj, int vmin, int vmic, int revision, const char *flavor, const char *build_id);
+
+/**
* @}
*/
return eina_hash_del(pd->providers, &klass, provider);
}
+Efl_Version _app_efl_version = { 0, 0, 0, 0, NULL, NULL };
+
+EWAPI void
+efl_build_version_set(int vmaj, int vmin, int vmic, int revision,
+ const char *flavor, const char *build_id)
+{
+ // note: EFL has not been initialized yet at this point (ie. no eina call)
+ _app_efl_version.major = vmaj;
+ _app_efl_version.minor = vmin;
+ _app_efl_version.micro = vmic;
+ _app_efl_version.revision = revision;
+ free((char *) _app_efl_version.flavor);
+ free((char *) _app_efl_version.build_id);
+ _app_efl_version.flavor = flavor ? strdup(flavor) : NULL;
+ _app_efl_version.build_id = build_id ? strdup(build_id) : NULL;
+}
+
+EOLIAN static const Efl_Version *
+_efl_loop_app_efl_version_get(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
+{
+ return &_app_efl_version;
+}
+
+EOLIAN static const Efl_Version *
+_efl_loop_efl_version_get(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
+{
+ /* vanilla EFL: flavor = NULL */
+ static const Efl_Version version = {
+ .major = VMAJ,
+ .minor = VMIN,
+ .micro = VMIC,
+ .revision = VREV,
+ .build_id = EFL_BUILD_ID,
+ .flavor = NULL
+ };
+
+ return &version;
+}
+
+
#include "efl_loop.eo.c"
extern Eo *_mainloop_singleton;
extern Eo *_ecore_parent;
+extern Efl_Version _app_efl_version;
#define ECORE_PARENT_CLASS ecore_parent_class_get()
EAPI const Eo_Class *ecore_parent_class_get(void) EINA_CONST;
+import efl_types;
+
struct Efl.Loop.Arguments {
argv: const(array<const(stringshare)>);
}
main_loop: Efl.Loop;
}
}
+ @property app_efl_version {
+ [[Indicates the version of EFL with which this application was compiled.
+
+ This might differ from @.efl_version.
+ ]]
+ get {}
+ values {
+ version: const(Efl.Version)*;
+ }
+ }
+ @property efl_version {
+ [[Indicates the currently running version of EFL.
+
+ This might differ from @.app_efl_version.
+ ]]
+ get {}
+ values {
+ version: const(Efl.Version)*;
+ }
+ }
iterate {
[[Runs a single iteration of the main loop to process everything on the
queue.]]
tm_yday: int; [[Days in year.[0-365] ]]
tm_isdst: int; [[DST. [-1/0/1] ]]
}
+
+struct Efl.Version
+{
+ [[This type describes the version of EFL with an optional variant.
+
+ This may be used to query the current running version of EFL. Or it can
+ be passed by applications at startup time to inform EFL of the version
+ a certain application was built for.
+
+ @since 1.18
+ ]]
+
+ major: int; [[Major component of the version (>= 1).]]
+ minor: int; [[Minor component of the version (>= 0).]]
+ micro: int; [[Micro component of the version (>= 0).]]
+ revision: int; [[Revision component of the version (>= 0).]]
+ flavor: string; [[Special version string for this build of EFL, $null for
+ vanilla (upstream) EFL. Contains $EFL_VERSION_FLAVOR.]]
+ build_id: string; [[Contains $EFL_BUILD_ID.]]
+}