I'm submitting this commit because in order to interface with the gui using
an ABC block, I need to call the HostInterface.

ControlTag's only have a MovieClip* and a DisplayList& and as such lacks
direct access to the movie_root that maintains the HostInterface.

DisplayObject provides the stage() function, which returns the movie_root.
That function is protected, however, and cannot be referenced outside of
the class/children.

In order to maintain a principle-of-least-privilage, I am opting to forward
the HostInterface related functions through the DisplayObject.

I have tested this code with a test pop-up upon attempting to execute an
ABC block.

Hopefully this explains my intentions well enough.

On Thu, Sep 29, 2016 at 5:04 AM, Petter Reinholdtsen <p...@hungry.com>
wrote:

>
> Hi.  I suspect you want to send this to the mailing list, where it will
> reach people with commit access to the gnash repo.
>
> [thePalindrome theParanoid]
> > This particular change exposes both callInterface() functions in
> > movie_root, as well as queryInterface() and registerEventCallback() for
> all
> > types that extend DisplayObject (I was mainly going for MovieClip, but I
> > figured the generic case would work better)
> >
> > This change is necessary because DisplayObject::stage(), which is the
> only
> > way to obtain a movie_root from a DisplayObject, is protected.
>
> I still miss a use case for this to understand the motivation.
> "movie_root isn't available" is not really a motivation, it is an
> observation.
>
> --
> Happy hacking
> Petter Reinholdtsen
>
_______________________________________________
Gnash-dev mailing list
Gnash-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to