1 package com.cooliris.media;
3 import javax.microedition.khronos.opengles.GL11;
5 import android.view.MotionEvent;
7 public abstract class Layer {
12 boolean mHidden = false;
14 public final float getX() {
18 public final float getY() {
22 public final void setPosition(float x, float y) {
27 public final float getWidth() {
31 public final float getHeight() {
35 public final void setSize(float width, float height) {
36 if (mWidth != width || mHeight != height) {
43 public boolean isHidden() {
47 public void setHidden(boolean hidden) {
48 if (mHidden != hidden) {
54 public abstract void generate(RenderView view, RenderView.Lists lists);
56 // Returns true if something is animating.
57 public boolean update(RenderView view, float frameInterval) {
61 public void renderOpaque(RenderView view, GL11 gl) {
64 public void renderBlended(RenderView view, GL11 gl) {
67 public boolean onTouchEvent(MotionEvent event) {
71 // Allows subclasses to further constrain the hit test defined by layer bounds.
72 public boolean containsPoint(float x, float y) {
76 protected void onSurfaceCreated(RenderView view, GL11 gl) {
79 protected void onSizeChanged() {
82 protected void onHiddenChanged() {