Page MenuHomePhabricator

efl/wl: define opaque wl/xkb types to native types when those headers are included

Authored by zmike on Mar 12 2020, 7:22 AM.



simplify a lot of casting when we're in a native wl env
Depends on D11495

Diff Detail

rEFL core/efl
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
zmike created this revision.Mar 12 2020, 7:22 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

zmike requested review of this revision.Mar 12 2020, 7:22 AM

Sorry, I don't see that anything has been simplified.

zmike added a comment.Mar 12 2020, 8:07 AM

This is a canvas API, so we don't want to have a hard dependency on wayland headers in case we aren't directly using them in our app (since this is only used for advanced functionality), but for apps where we do use it then we can just translate the types into the actual native types we're using.

The only reason this is necessary is that we're referencing external library types in eolian.

I see that when WAYLAND_UTIL_H is present the EFL wrapper types are defined to be the native types, that's nice.
But I don't see these types be used anywhere. That's what confuses me.
Also, I can't find where the alternate structs (like Efl_Canvas_Wl_Wl_Surface) are defined. Are they supposed to be opaque?

zmike added a comment.Mar 12 2020, 9:11 AM

They're used in eolian-generated code. Without these headers, the types are opaque and we assume the apps aren't going to be using them.

segfaultxavi accepted this revision.Mar 12 2020, 9:14 AM

Alright, and if the native headers are present then the app can actually do something with those structs. Got it. And approved it.

This revision is now accepted and ready to land.Mar 12 2020, 9:14 AM
This revision was automatically updated to reflect the committed changes.