Skip to content

No way to override virtual methods in derived classes #441

@AshleyYakeley

Description

@AshleyYakeley

I'm creating ReferenceInputStream as a subclass of InputStream and Seekable from gi-gio, so I need to implement virtual methods skip, read_fn and close_fn from InputStream, and can_seek, can_truncate, seek, tell, and truncate from Seekable.

Apparently the correct GObject way to do this is to set the methods of the class during class initialisation (in Haskell, objectClassInit in DerivedGObject). However, I have no way of converting the GObjectClass value into InputStreamClass or SeekableClass, because those types are not exposed in Haskell (or even defined AFAIK).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions