OSDN Git Service

Move AndroidWallpaperListener to Android backend
authorJustin Shapcott <support@mobidevelop.com>
Tue, 21 May 2013 05:32:30 +0000 (22:32 -0700)
committerJustin Shapcott <support@mobidevelop.com>
Tue, 21 May 2013 05:32:30 +0000 (22:32 -0700)
It should never have been in core.

CHANGES
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidLiveWallpaperService.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidWallpaperListener.java [moved from gdx/src/com/badlogic/gdx/android/AndroidWallpaperListener.java with 96% similarity]
tests/gdx-tests-android/src/com/badlogic/gdx/tests/android/LiveWallpaper.java

diff --git a/CHANGES b/CHANGES
index 8c0d956..c5cc8b4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,5 @@
 [0.9.9]
+- moved AndroidWallpaperListener to Android Backend
 - added new VertexAttribute Usage flags, bone weight, tangent, binormal. previously encoded as Usage.Generic. Also
   added field "unit" to VertexAttribute, used by texture coordinates and bone weights to specify index/unit.
 - setup-ui template for iOS disables pngcrush, also updated wiki iOS article
index 4a1fc3d..160240c 100755 (executable)
@@ -21,7 +21,6 @@ import com.badlogic.gdx.Application;
 import com.badlogic.gdx.ApplicationListener;\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Graphics;\r
-import com.badlogic.gdx.android.AndroidWallpaperListener;\r
 import com.badlogic.gdx.backends.android.surfaceview.FillResolutionStrategy;\r
 import com.badlogic.gdx.backends.android.surfaceview.GLBaseSurfaceViewLW;\r
 import com.badlogic.gdx.backends.android.surfaceview.GLSurfaceViewCupcake;\r
@@ -1,58 +1,58 @@
-/*\r
- * Copyright 2013 Jaroslaw Wisniewski <j.wisniewski@appsisle.com>\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the\r
- * License. You may obtain a copy of the License at\r
- * \r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"\r
- * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language\r
- * governing permissions and limitations under the License.\r
- *\r
- */\r
-\r
-package com.badlogic.gdx.android;\r
-\r
-import com.badlogic.gdx.ApplicationListener;\r
-\r
-/**\r
- * Implement this listener in your libGDX application additionally to {@link ApplicationListener} if you want \r
- * receive live wallpaper specific events, ex:\r
- * MyApplication implements ApplicationListener, AndroidWallpaperListener\r
- * \r
- * Notice!\r
- * This callbacks will work only if app is running as android live wallpaper: \r
- * you have to link application with AndroidLiveWallpaperService from\r
- * in gdx-android-backend\r
- * \r
- * Notice libGDX developers!\r
- * If you do not like android specific classes in gdx backend, you can rename this class to for example:\r
- * com.badlogic.gdx.WallpaperListener so it will be 'generic' and not 'android specific', \r
- * but besides of point of view the fact is that live wallpapers are available only on android devices so far.\r
- * \r
- * @author Jaroslaw Wisniewski <j.wisniewski@appsisle.com>\r
- *\r
- */\r
-public interface AndroidWallpaperListener {\r
-\r
-       /**\r
-        * Called on the rendering thread after the live wallpaper's offset had changed.\r
-        * @param xOffset\r
-        * @param yOffset\r
-        * @param xOffsetStep\r
-        * @param yOffsetStep\r
-        * @param xPixelOffset\r
-        * @param yPixelOffset\r
-        */\r
-       abstract void offsetChange (float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset);\r
-\r
-       /**\r
-        * Called after 'isPreview' state had changed. First time called just after application initialization.\r
-        * @param isPreview current status, save this value and update always when this method is called if you want\r
-        * track live wallpaper isPreview status.\r
-        * \r
-        * \r
-        */\r
-       abstract void previewStateChange (boolean isPreview);\r
-}\r
+/*
+ * Copyright 2013 Jaroslaw Wisniewski <j.wisniewski@appsisle.com>
+ * 
+ * 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.badlogic.gdx.backends.android;
+
+import com.badlogic.gdx.ApplicationListener;
+
+/**
+ * Implement this listener in your libGDX application additionally to {@link ApplicationListener} if you want 
+ * receive live wallpaper specific events, ex:
+ * MyApplication implements ApplicationListener, AndroidWallpaperListener
+ * 
+ * Notice!
+ * This callbacks will work only if app is running as android live wallpaper: 
+ * you have to link application with AndroidLiveWallpaperService from
+ * in gdx-android-backend
+ * 
+ * Notice libGDX developers!
+ * If you do not like android specific classes in gdx backend, you can rename this class to for example:
+ * com.badlogic.gdx.WallpaperListener so it will be 'generic' and not 'android specific', 
+ * but besides of point of view the fact is that live wallpapers are available only on android devices so far.
+ * 
+ * @author Jaroslaw Wisniewski <j.wisniewski@appsisle.com>
+ *
+ */
+public interface AndroidWallpaperListener {
+
+       /**
+        * Called on the rendering thread after the live wallpaper's offset had changed.
+        * @param xOffset
+        * @param yOffset
+        * @param xOffsetStep
+        * @param yOffsetStep
+        * @param xPixelOffset
+        * @param yPixelOffset
+        */
+       abstract void offsetChange (float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset);
+
+       /**
+        * Called after 'isPreview' state had changed. First time called just after application initialization.
+        * @param isPreview current status, save this value and update always when this method is called if you want
+        * track live wallpaper isPreview status.
+        * 
+        * 
+        */
+       abstract void previewStateChange (boolean isPreview);
+}
index 4a51bb9..e0c1e1e 100755 (executable)
@@ -20,9 +20,9 @@ import android.util.Log;
 import com.badlogic.gdx.ApplicationAdapter;\r
 import com.badlogic.gdx.ApplicationListener;\r
 import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.android.AndroidWallpaperListener;\r
 import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;\r
 import com.badlogic.gdx.backends.android.AndroidLiveWallpaperService;\r
+import com.badlogic.gdx.backends.android.AndroidWallpaperListener;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.tests.Box2DTest;\r