@@ -263,49 +263,20 @@ public class PApplet extends Object implements PConstants {
263263 */
264264 public boolean focused = false ;
265265
266- /**
267- * Use in watch faces to check if the device in in ambient mode or interactive mode.
268- */
266+ ///////////////////////////////////////////////////////////////
267+ // Wallpaper and watchface variables: these will go away soon...
269268 public boolean ambientMode = false ;
270-
271- /**
272- * Indicates whether the watch face is round or not.
273- */
274269 public boolean isRound = false ;
275-
276- /**
277- * Watch face insets
278- */
279- public int insetLeft , insetRight = 0 ;
280- public int insetTop , insetBottom = 0 ;
281-
282- /**
283- * Use in watch faces to store information abou the device screen
284- * https://developer.android.com/training/wearables/watch-faces/drawing.html#Screen
285- */
270+ public int insetLeft = 0 ;
271+ public int insetRight = 0 ;
272+ public int insetTop = 0 ;
273+ public int insetBottom = 0 ;
286274 public boolean lowBitAmbient = false ;
287275 public boolean burnInProtection = false ;
288-
289- /**
290- * Offset for wallpapers, when user swipes across home screens.
291- */
276+ public boolean preview = false ;
292277 public float homeScreenOffset = 0 ;
293- // public float offsetY = 0;
294-
295278 public int homeScreenCount = 1 ;
296-
297- /**
298- * Indicates if the wallpaper is in preview mode.
299- */
300- public boolean preview = false ;
301-
302- /**
303- * true if the applet is online.
304- * <P>
305- * This can be used to test how the applet should behave
306- * since online situations are different (no file writing, etc).
307- */
308- // public boolean online = false;
279+ ///////////////////////////////////////////////////////////////
309280
310281 /**
311282 * Time in milliseconds when the applet was started.
@@ -480,6 +451,7 @@ public void initSurface(AppComponent component, SurfaceHolder holder) {
480451 initSurface (null , null , null , component , holder );
481452 }
482453
454+
483455 public void initSurface (LayoutInflater inflater , ViewGroup container ,
484456 Bundle savedInstanceState ,
485457 AppComponent component , SurfaceHolder holder ) {
@@ -554,18 +526,12 @@ public void onGlobalLayout() {
554526
555527 sketchPath = surface .getFilesDir ().getAbsolutePath ();
556528
557- if (DEBUG ) println ("Done with init surface" );
558- }
559-
560-
561- public void startSurface () {
562529 surface .startThread ();
563- }
564530
565- public View getRootView () {
566- return surface .getRootView ();
531+ if (DEBUG ) println ("Done with init surface" );
567532 }
568533
534+
569535 private void setFullScreenVisibility () {
570536 if (fullScreen ) {
571537 int visibility ;
@@ -689,30 +655,6 @@ public void settings() {
689655 }
690656
691657
692- //////////////////////////////////////////////////////////////
693-
694- // ANDROID SURFACE VIEW
695-
696-
697- // TODO this is only used by A2D, when finishing up a draw. but if the
698- // surfaceview has changed, then it might belong to an a3d surfaceview. hrm.
699- public SurfaceHolder getSurfaceHolder () {
700- SurfaceView view = surface .getSurfaceView ();
701- if (view == null ) {
702- // Watch faces don't have a surface view associated to them.
703- return null ;
704- } else {
705- return view .getHolder ();
706- }
707- }
708-
709-
710- /** Not official API, not guaranteed to work in the future. */
711- public SurfaceView getSurfaceView () {
712- return surface .getSurfaceView ();
713- }
714-
715-
716658 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
717659
718660
0 commit comments