refactor some methods and add functions

This component is very useful for me,  but some method and coding style is a little bit hard to use, so I add some changes your code.

I add methods that change background layer and scroll layer.
And this code contains some void * pointer and cast, so I removed that from its code.

Could you check my changes?