17ec681f3Smrg/* 27ec681f3Smrg * Copyright (C) 2010 The Android Open Source Project 37ec681f3Smrg * 47ec681f3Smrg * Licensed under the Apache License, Version 2.0 (the "License"); 57ec681f3Smrg * you may not use this file except in compliance with the License. 67ec681f3Smrg * You may obtain a copy of the License at 77ec681f3Smrg * 87ec681f3Smrg * http://www.apache.org/licenses/LICENSE-2.0 97ec681f3Smrg * 107ec681f3Smrg * Unless required by applicable law or agreed to in writing, software 117ec681f3Smrg * distributed under the License is distributed on an "AS IS" BASIS, 127ec681f3Smrg * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 137ec681f3Smrg * See the License for the specific language governing permissions and 147ec681f3Smrg * limitations under the License. 157ec681f3Smrg */ 167ec681f3Smrg 177ec681f3Smrg/** 187ec681f3Smrg * @addtogroup NativeActivity Native Activity 197ec681f3Smrg * @{ 207ec681f3Smrg */ 217ec681f3Smrg 227ec681f3Smrg/** 237ec681f3Smrg * @file rect.h 247ec681f3Smrg */ 257ec681f3Smrg 267ec681f3Smrg#ifndef ANDROID_RECT_H 277ec681f3Smrg#define ANDROID_RECT_H 287ec681f3Smrg 297ec681f3Smrg#include <stdint.h> 307ec681f3Smrg 317ec681f3Smrg#ifdef __cplusplus 327ec681f3Smrgextern "C" { 337ec681f3Smrg#endif 347ec681f3Smrg 357ec681f3Smrg/** 367ec681f3Smrg * Rectangular window area. 377ec681f3Smrg * 387ec681f3Smrg * This is the NDK equivalent of the android.graphics.Rect class in Java. It is 397ec681f3Smrg * used with {@link ANativeActivityCallbacks::onContentRectChanged} event 407ec681f3Smrg * callback and the ANativeWindow_lock() function. 417ec681f3Smrg * 427ec681f3Smrg * In a valid ARect, left <= right and top <= bottom. ARect with left=0, top=10, 437ec681f3Smrg * right=1, bottom=11 contains only one pixel at x=0, y=10. 447ec681f3Smrg */ 457ec681f3Smrgtypedef struct ARect { 467ec681f3Smrg#ifdef __cplusplus 477ec681f3Smrg typedef int32_t value_type; 487ec681f3Smrg#endif 497ec681f3Smrg /// Minimum X coordinate of the rectangle. 507ec681f3Smrg int32_t left; 517ec681f3Smrg /// Minimum Y coordinate of the rectangle. 527ec681f3Smrg int32_t top; 537ec681f3Smrg /// Maximum X coordinate of the rectangle. 547ec681f3Smrg int32_t right; 557ec681f3Smrg /// Maximum Y coordinate of the rectangle. 567ec681f3Smrg int32_t bottom; 577ec681f3Smrg} ARect; 587ec681f3Smrg 597ec681f3Smrg#ifdef __cplusplus 607ec681f3Smrg}; 617ec681f3Smrg#endif 627ec681f3Smrg 637ec681f3Smrg#endif // ANDROID_RECT_H 647ec681f3Smrg 657ec681f3Smrg/** @} */ 66