Page MenuHomePhabricator

efl-mono: Only expose API methods relevant to the user
Closed, ResolvedPublic

Description

I have use DocFX to generate API documentation directly from libefl_mono.dll (T7424).

In the generated docs I find some public properties and methods which do not look like they should be visible to the user, like raw_handle, raw_klass or *_class_get().

Can't they be made private, protected or internal so the user-facing API is much simpler (and easier to learn) ?

segfaultxavi triaged this task as Normal priority.

The *_class_get() methods can be safely made internal. I've integrated this in the new API.

raw_handle and raw_class are part of the C# interface that marks a class as "generated" and are used in the support code. Maybe we could change them to something like GetNativeHandle/GetNativeClass and keep it exposed, with the documentation stating they are not to be freely used.

If the user does not need to touch the native handlers, isn't it better to actually forbid it? People does not read docs, trust me :)