[sldev] Two potential plugin architectures: Inheritance across DLLs and NPAPI

Dale Glass dale at daleglass.net
Sat Feb 24 07:40:06 PST 2007

В сообщении от 24 февраля 2007 11:27 Tim Shephard написал(a):
> The advantage to this is that it would certainly get Dale's plugin up
> and running very quickly.   I haven't seen the code, but I assuming
> he's just extending llFloater or a similar SL UI widget as recommended

For reference, source is here:

Avatar list is initialized on line 232

> by the wiki.   Well placed macros could call his code where he's
> updating his avatar list.    I assume there needs to be a way to
> trigger a refresh of his UI (correct me if I'm wrong here) when new
> information comes in.
Client is patched to call LLFloaterAvatarList::updateAvatarList() every frame, 
which then goes over LLCharacter::sInstances and updates its internal list.

See line 298.

> How does Dale's floater panel get drawn?
> Do you have two UIFactories and loops?
> Would it be like a flash or java plugin?

It gets drawn by the UI code, I don't need to do anything to make that work. 
Simply creating the widget and then never doing anything should result in a 
window that's movable on the screen with clickable buttons, etc.

My code doesn't really draw anything, it just updates what will be drawn.

> Possibly, we could export the widget drawing functions from an SL DLL
> and then call those on an internal window.   Basically duplicate a
> copy of the SL widget loop, but have it changed so that it is only
> working on the internal window as described by the plugin.
> Kind of a mini client inside the client.

IMO, so much complication may not be necessary. Just look at the small amount 
of changes outside of llfloateravatarlist.cpp.

Those are:
registering a callback for the avatar info messages (make it so that I can do 
that from my llfloateravatarlist.cpp, and so that multiple callbacks can be 
registered (and unregistered)

getting notified when a frame is drawn (add a callback system for "internal 
events", like "frame drawn", "logging out", etc). I also need to know when a 
sound is played, when somebody is typing, etc

Access to internal lists of avatars

My understanding is that DLL based plugins should allow the inheritance method 
of doing the UI work, so only those fairly minor changes should be needed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070224/5baa6673/attachment.pgp

More information about the SLDev mailing list