Skip to content

DisplayConfig Imperfect class generation #285

@oliviercailloux

Description

@oliviercailloux

I have used InterfaceCodeGenerator to generate classes for org.gnome.Mutter.DisplayConfig. The resulting classes are helpful but imperfect. For example, this crashes with a ClassCastException.

DisplayConfig displayConfig = connection.getRemoteObject("org.gnome.Mutter.DisplayConfig",
    "/org/gnome/Mutter/DisplayConfig", DisplayConfig.class);
GetCurrentStateTuple state = displayConfig.GetCurrentState();
List<GetCurrentStateMonitorsStruct> monitors = state.getMonitors();
GetCurrentStateMonitorsStruct m0 = monitors.get(0);

I read that “the InterfaceCodeGenerator is far from being perfect. It's just a helper to get started somehow”, but I thought I’d let you know in case you want to investigate. (I can share an example project if this would be helpful.)

Thanks for this project.

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