Home | History | Annotate | Download | only in widgets
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      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
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     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.
     15  */
     16 
     17 package com.android.videoeditor.widgets;
     18 
     19 import com.android.videoeditor.service.MovieMediaItem;
     20 
     21 /**
     22  * Listener that listens to state changes of {@link MediaLinearLayout}.
     23  */
     24 public interface MediaLinearLayoutListener {
     25     /**
     26      * Request scrolling by an offset amount
     27      *
     28      * @param scrollBy The amount to scroll
     29      * @param smooth true to scroll smoothly
     30      */
     31     void onRequestScrollBy(int scrollBy, boolean smooth);
     32 
     33     /**
     34      * Request scrolling to a specified time position
     35      *
     36      * @param scrollToTime The scroll position
     37      * @param smooth true to scroll smoothly
     38      */
     39     void onRequestMovePlayhead(long scrollToTime, boolean smooth);
     40 
     41     /**
     42      * Add a new media item
     43      *
     44      * @param afterMediaItemId Add media item after this media item id
     45      */
     46     void onAddMediaItem(String afterMediaItemId);
     47 
     48     /**
     49      * A media item enters trimming mode
     50      *
     51      * @param mediaItem The media item
     52      */
     53     void onTrimMediaItemBegin(MovieMediaItem mediaItem);
     54 
     55     /**
     56      * A media item is being trimmed
     57      *
     58      * @param mediaItem The media item
     59      * @param timeMs The time where the trim occurs
     60      */
     61     void onTrimMediaItem(MovieMediaItem mediaItem, long timeMs);
     62 
     63     /**
     64      * A media has been trimmed
     65      *
     66      * @param mediaItem The media item
     67      * @param timeMs The time where the trim occurs
     68      */
     69     void onTrimMediaItemEnd(MovieMediaItem mediaItem, long timeMs);
     70 }
     71