1/*
2 * Copyright 2018 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
17package android.media.update;
18
19import android.annotation.SystemApi;
20import android.util.AttributeSet;
21import android.view.MotionEvent;
22import android.view.View;
23import android.view.ViewGroup.LayoutParams;
24
25/**
26 * Interface for connecting the public API to an updatable implementation.
27 *
28 * Each instance object is connected to one corresponding updatable object which implements the
29 * runtime behavior of that class. There should a corresponding provider method for all public
30 * methods.
31 *
32 * All methods behave as per their namesake in the public API.
33 *
34 * @see android.view.View
35 *
36 * @hide
37 */
38// TODO @SystemApi
39public interface ViewGroupProvider {
40    // View methods
41    void onAttachedToWindow_impl();
42    void onDetachedFromWindow_impl();
43    CharSequence getAccessibilityClassName_impl();
44    boolean onTouchEvent_impl(MotionEvent ev);
45    boolean onTrackballEvent_impl(MotionEvent ev);
46    void onFinishInflate_impl();
47    void setEnabled_impl(boolean enabled);
48    void onVisibilityAggregated_impl(boolean isVisible);
49    void onLayout_impl(boolean changed, int left, int top, int right, int bottom);
50    void onMeasure_impl(int widthMeasureSpec, int heightMeasureSpec);
51    int getSuggestedMinimumWidth_impl();
52    int getSuggestedMinimumHeight_impl();
53    void setMeasuredDimension_impl(int measuredWidth, int measuredHeight);
54    boolean dispatchTouchEvent_impl(MotionEvent ev);
55
56    // ViewGroup methods
57    boolean checkLayoutParams_impl(LayoutParams p);
58    LayoutParams generateDefaultLayoutParams_impl();
59    LayoutParams generateLayoutParams_impl(AttributeSet attrs);
60    LayoutParams generateLayoutParams_impl(LayoutParams lp);
61    boolean shouldDelayChildPressedState_impl();
62    void measureChildWithMargins_impl(View child, int parentWidthMeasureSpec, int widthUsed,
63        int parentHeightMeasureSpec, int heightUsed);
64
65    // ViewManager methods
66    // ViewParent methods
67}
68