开发者

What is the swallow widget in Edje used for?

开发者 https://www.devze.com 2023-03-20 19:25 出处:网络
I am using EFL (the Enlightenment Foundation Library) for Linux GUI development. I don\'t get the mean开发者_运维知识库ing of the swallow widget that is used in Edje. What is its use?

I am using EFL (the Enlightenment Foundation Library) for Linux GUI development. I don't get the mean开发者_运维知识库ing of the swallow widget that is used in Edje. What is its use?

Thanks.


It's used to replace the edje part by a widget in C (the edje part is swallowed by the C Widget).

For example, you can create a swallow part and replace it with an elementary entry:

edje:

part {
    name: "my_swallow_part";
    type: SWALLOW;
    description {
        //You put desired position here
    } 
}

in C:

Evas_Object* entry = elm_entry_add(parent_win);
elm_object_content_part_set(layout, "my_swallow_part", entry);

And voilà, you have an C widget that you have positioned throught edje.

Note that you could use EXTERNAL in this case (with source: "elm/entry")

0

精彩评论

暂无评论...
验证码 换一张
取 消