[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ggi-develop
Subject:    dlh / changed()
From:       "Brian S. Julin" <bri () tull ! umassp ! edu>
Date:       2001-09-16 3:01:04
[Download RAW message or body]



In looking into fixing the pixela/pixel stuff (see last list mail) I have 
a question about the dlh structure... basically I am wondering
if the way changed() is now created for extensions is really
a throwback to before we switched to the current dlh mechanism --
would it be better/acceptible to have the extensions (and renderers,
as I need in my case) pass back their changed() hook via that same 
mechanism which the open/close/exit functions use, e.g.:


int GGIdl_linear_16(int func, void **funcptr)
{
        switch (func) {
	case GGIFUNC_changed:
		*funcptr = GGIchanged;
        case GGIFUNC_open:
                *funcptr = GGIopen;
                return 0;
        case GGIFUNC_exit:
        case GGIFUNC_close:
                *funcptr = NULL;
                return 0;
        default:
                *funcptr = NULL;
        }

        return GGI_ENOTFOUND;
}


And then we would have ggiAddDL/ggiAddExtDL manage keeping a consistant list
of changed() hooks to be called (even while dl's are being shuffled during 
an API change).  We'd still need ggiExtensionRegister, but we would NOT need 
to have a similar registration for all renderer DL's, which is the other 
alternative.

Which way should I go?  One way unifies/simplifies things a bit, the other way 
plays it safe by keeping things disentangled, but requires more structures
to be managed.

P.S. This and other changes we have planned for the config file system
IMO will merit a major version bump, making the next release LibGGI 3.
Anyone have any objections to that?

--
Brian

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic