summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui/ScreenNail.java
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-03-15 16:38:45 +0800
committerChih-Chung Chang <chihchung@google.com>2012-03-21 15:29:29 +0800
commit15b351a22d02e89d882fc9fe32b3f4c512080e0a (patch)
tree07a316c7f973bdb0173fc50b25837c50c65f6714 /src/com/android/gallery3d/ui/ScreenNail.java
parent8cab3e872dd95e55ba34fdb94269a0c5069e72ae (diff)
downloadandroid_packages_apps_Gallery2-15b351a22d02e89d882fc9fe32b3f4c512080e0a.tar.gz
android_packages_apps_Gallery2-15b351a22d02e89d882fc9fe32b3f4c512080e0a.tar.bz2
android_packages_apps_Gallery2-15b351a22d02e89d882fc9fe32b3f4c512080e0a.zip
Create a ScreenNail interface so we can add other types of screenails.
Add a new MediaItem type to contain a ScreenNail. Change-Id: Ia303949f3013dd48ded204eaf9ec69a102b8503e
Diffstat (limited to 'src/com/android/gallery3d/ui/ScreenNail.java')
-rw-r--r--src/com/android/gallery3d/ui/ScreenNail.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/ScreenNail.java b/src/com/android/gallery3d/ui/ScreenNail.java
new file mode 100644
index 000000000..a2377fe2a
--- /dev/null
+++ b/src/com/android/gallery3d/ui/ScreenNail.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.gallery3d.ui;
+
+import android.graphics.RectF;
+
+public interface ScreenNail {
+ public int getWidth();
+ public int getHeight();
+ public int getRotation();
+ public void recycle();
+ public void draw(GLCanvas canvas, int x, int y, int width, int height);
+
+ // We need this method to tell ScreenNail to stop displaying.
+ public void disableDraw();
+
+ // This is only used by TileImageView to back up the tiles not yet loaded.
+ public void draw(GLCanvas canvas, RectF source, RectF dest);
+}