Skip to content

Expose wlr_scene to the config #60

@ghost

Description

Once #50 is merged, the next logical step is letting the config manipulate the scene: if for nothing else, at least for decorations. These are some possibilities how to do it; however, none seems ideal. Which is the least bad? Any better suggestions?

permission-wise:

  • only allow adding and manipulating view decoration
    • pros: simple for both kiwmi and config, one cannot get lost there
    • cons: very limited
  • let the config manipulate some certain nodes in some certain ways
    • pros: lets us make assumptions; fairly powerful
    • cons: would need to create a permission system or something of that kind
  • don’t restrict the config
    • pros: powerful; quite simple luak_*
    • cons: i’m not quite sure how kiwmi and wlroots would cope with it

api-wise:

  • copy the wlroots api: type-specific functions on the specific type; generic functions on specific_type:node()
    • pros: little code duplication
    • cons: unintuitive for a high-level language like lua
  • copy all generic functions for every specific node type
    • pros: feels normal on the lua side; simple to understand
    • cons: code and docs duplication, gets out of hand when making changes
  • smash the type system and have specific types calling generic functions (which then check that they’re called on one of the types) [otoh, isn’t this sort of how OOP works? 😆]
    • pros: feels normal on the lua side; less code duplication
    • cons: seems quite complicated to get it right

Also, should kiwmi_view be treated like a scene node (which could be terrible kiwmi-side with some implementations), or should it have :scene_tree() (which could feel unintuitive)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions