Int16Rect.h revision 30957f56b33a18c5a4af787f25b9f145f2803634
1/*
2 * Copyright (C) 2008 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#ifndef bts_INT16RECT_EM_H
18#define bts_INT16RECT_EM_H
19
20/* ---- includes ----------------------------------------------------------- */
21
22#include "b_BasicEm/Context.h"
23#include "b_BasicEm/Basic.h"
24
25/* ---- related objects  --------------------------------------------------- */
26
27/* ---- typedefs ----------------------------------------------------------- */
28
29/* ---- constants ---------------------------------------------------------- */
30
31/* ---- object definition -------------------------------------------------- */
32
33/** 2d vector */
34struct bts_Int16Rect
35{
36
37	/* ---- private data --------------------------------------------------- */
38
39	/* ---- public data ---------------------------------------------------- */
40
41	/** upper left component */
42	int16 x1E;
43
44	/** upper left component */
45	int16 y1E;
46
47	/** lower right component */
48	int16 x2E;
49
50	/** lower right component */
51	int16 y2E;
52};
53
54/* ---- associated objects ------------------------------------------------- */
55
56/* ---- external functions ------------------------------------------------- */
57
58/* ---- \ghd{ constructor/destructor } ------------------------------------- */
59
60/** initializes rectangle */
61void bts_Int16Rect_init( struct bbs_Context* cpA, struct bts_Int16Rect* ptrA );
62
63/** destroys rectangle */
64void bts_Int16Rect_exit( struct bbs_Context* cpA, struct bts_Int16Rect* ptrA );
65
66/* ---- \ghd{ operators } -------------------------------------------------- */
67
68/* ---- \ghd{ query functions } -------------------------------------------- */
69
70/* ---- \ghd{ modify functions } ------------------------------------------- */
71
72/** initialize rectangle */
73struct bts_Int16Rect bts_Int16Rect_create( int16 x1A, int16 y1A, int16 x2A, int16 y2A );
74
75/* ---- \ghd{ memory I/O } ------------------------------------------------- */
76
77/** size object needs when written to memory */
78uint32 bts_Int16Rect_memSize( struct bbs_Context* cpA,
79							  const struct bts_Int16Rect* ptrA );
80
81/** writes object to memory; returns number of bytes written */
82uint32 bts_Int16Rect_memWrite( struct bbs_Context* cpA,
83							   const struct bts_Int16Rect* ptrA,
84							   uint16* memPtrA );
85
86/** reads object from memory; returns number of bytes read */
87uint32 bts_Int16Rect_memRead( struct bbs_Context* cpA,
88							  struct bts_Int16Rect* ptrA,
89							  const uint16* memPtrA );
90
91/* ---- \ghd{ exec functions } --------------------------------------------- */
92
93
94#endif /* bts_INT16RECT_EM_H */
95
96