2 * Copyright (C) 2013 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com.android.camera;
19 import android.view.SurfaceHolder;
20 import android.view.View;
22 import com.android.camera.ShutterButton.OnShutterButtonListener;
25 public interface PhotoController extends OnShutterButtonListener {
27 public static final int PREVIEW_STOPPED = 0;
28 public static final int IDLE = 1; // preview is active
29 // Focus is in progress. The exact focus state is in Focus.java.
30 public static final int FOCUSING = 2;
31 public static final int SNAPSHOT_IN_PROGRESS = 3;
32 // Switching between cameras.
33 public static final int SWITCHING_CAMERA = 4;
35 // returns the actual set zoom value
36 public int onZoomChanged(int requestedZoom);
38 public boolean isImageCaptureIntent();
40 public boolean isCameraIdle();
42 public void onCaptureDone();
44 public void onCaptureCancelled();
46 public void onCaptureRetake();
48 public void cancelAutoFocus();
50 public void stopPreview();
52 public int getCameraState();
54 public void onSingleTapUp(View view, int x, int y);
56 public void onSurfaceCreated(SurfaceHolder holder);
58 public void onCountDownFinished();
60 public void onScreenSizeChanged(int width, int height, int previewWidth, int previewHeight);