Of course its possible. The execution will depend on the architecture of your existing base code , or framework, and the architecture of the gallery you are trying to use. You would certainly want to offset whatever it is the Gallery is doing by default to allow time for your framework , to pass in reference. Another way would be to write a static class , that contains reference to the base , that the gallery can import , and then access. You could cache off a reference to your base , from the static class, in a local var to the gallery. Then the gallery would have access.