Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: 1 standard generic callback system

Re: 1 standard generic callback system

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

On 06/06/07, Michael Sevakis <jethead71_at_sbcglobal.net> 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
everything?)
Received on 2007-06-06

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