Path: blob/21.2-virgl/include/android_stub/android/rect.h
4547 views
/*1* Copyright (C) 2010 The Android Open Source Project2*3* Licensed under the Apache License, Version 2.0 (the "License");4* you may not use this file except in compliance with the License.5* You may obtain a copy of the License at6*7* http://www.apache.org/licenses/LICENSE-2.08*9* Unless required by applicable law or agreed to in writing, software10* distributed under the License is distributed on an "AS IS" BASIS,11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12* See the License for the specific language governing permissions and13* limitations under the License.14*/1516/**17* @addtogroup NativeActivity Native Activity18* @{19*/2021/**22* @file rect.h23*/2425#ifndef ANDROID_RECT_H26#define ANDROID_RECT_H2728#include <stdint.h>2930#ifdef __cplusplus31extern "C" {32#endif3334/**35* Rectangular window area.36*37* This is the NDK equivalent of the android.graphics.Rect class in Java. It is38* used with {@link ANativeActivityCallbacks::onContentRectChanged} event39* callback and the ANativeWindow_lock() function.40*41* In a valid ARect, left <= right and top <= bottom. ARect with left=0, top=10,42* right=1, bottom=11 contains only one pixel at x=0, y=10.43*/44typedef struct ARect {45#ifdef __cplusplus46typedef int32_t value_type;47#endif48/// Minimum X coordinate of the rectangle.49int32_t left;50/// Minimum Y coordinate of the rectangle.51int32_t top;52/// Maximum X coordinate of the rectangle.53int32_t right;54/// Maximum Y coordinate of the rectangle.55int32_t bottom;56} ARect;5758#ifdef __cplusplus59};60#endif6162#endif // ANDROID_RECT_H6364/** @} */656667