Skip to content

Group media data into a struct + add getters/setters for the entire struct - #412

Open
nicoburns wants to merge 1 commit into
servo:mainfrom
nicoburns:better-media-update-api
Open

Group media data into a struct + add getters/setters for the entire struct#412
nicoburns wants to merge 1 commit into
servo:mainfrom
nicoburns:better-media-update-api

Conversation

@nicoburns

Copy link
Copy Markdown
Collaborator

This is aimed at trying to reduce the proliferation of getters/setters for individual media data properties by:

  • Grouping them into a struct
  • Adding getters/setters for the entire struct.

It also (IMO) makes the Device constructor a lot nicer as you get field names rather than having to try to match up function parameter order.

In future we could consider removing the individual getters/setters (or making them private where they are called internally by Stylo), but this PR does not yet do that.

This PR is implemented on top of:

@nicoburns
nicoburns force-pushed the better-media-update-api branch from bbfa9ca to 3fa0f84 Compare August 24, 2026 22:20

@jdm jdm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed; I think the current code is only going to expand over time so this is an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants