dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: 1 standard generic callback system

Re: 1 standard generic callback system

From: Jonathan Gordon <>
Date: Wed, 6 Jun 2007 11:01:28 +1000

On 06/06/07, Michael Sevakis <> wrote:
> I really think it's best to avoid a separate callback function for each
> particular things and instead just go with an interface model that groups of
> related callbacks and functions. If you want audio events, provide a pointer
> to some sort of audio events interface. Any receiver of events can just
> ignore what it doesn't care about and a tendency towards a single call with
> an event id parameter and an intptr_t parameter to pass data or pointers to
> data can keep the number of functions to a minimum. Some more specialized
> functions in the interface can be declared if needed of course.

well a pointer is passed to the callbacks and it could be anything, so
this could be done, but wouldnt it make smaller code if we only ever
pass useful data? (as apposed t a struct which would have absolutly
Received on 2007-06-06

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy