如何在UI上调用更改。例如,更改进度条,如此按钮单击处理程序所示:
renderInnerSpan
答案 0 :(得分:0)
EFL UI基本上只在一个主线上运行。
所以EFL系统无法绘制UI,直到你完成事件功能中的某项工作。
你可以为你的工作创建另一个线程并在事件函数中启动线程。
但使用ecore idle函数来使用eext_circle_object_value_set。
大多数EFL和tizen函数必须在主线程中使用。
所以在另一个线程中运行你的工作,并使用ecore主循环函数向主线程请求进度值设置器。
EFL Ecore提供请求作业到主循环的同步和异步功能。
#include <iostream>
using std::cout;
class Fraction
{
public:
Fraction(int a, int b = 1) {}
bool operator == (const Fraction&) { return true; }
};
template <typename T>
class Bar
{
public:
bool test(const T& f) { return (f==0);} // ERROR
};
int main()
{
Bar<Fraction> f;
f.test(3);
}
和
可以使用ecore_main_loop_thread_safe_call_async
代替ecore_idle函数。
所以这里是Elementary进展的简单例子。 我不在此源代码中使用eext函数,但您可以引用elm_progressbar_value_set而不是eext。
ecore_main_loop_thread_safe_call_sync