1 //******************************************************************************
2 //  Copyright (c) 2005-2013 by Jan Van hijfte
3 //
4 //  See the included file COPYING.TXT for details about the copyright.
5 //
6 //  This program is distributed in the hope that it will be useful,
7 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
8 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 //******************************************************************************
10 
11 
12 #ifndef QRECT_C_H
13 #define QRECT_C_H
14 
15 #include <QtCore>
16 #include "pascalbind.h"
17 
18 C_EXPORT QRectH QRect_Create();
19 C_EXPORT void QRect_Destroy(QRectH handle);
20 C_EXPORT QRectH QRect_Create2(const QPointH topleft, const QPointH bottomright);
21 C_EXPORT QRectH QRect_Create3(const QPointH topleft, const QSizeH size);
22 C_EXPORT QRectH QRect_Create4(int left, int top, int width, int height);
23 C_EXPORT bool QRect_isNull(QRectH handle);
24 C_EXPORT bool QRect_isEmpty(QRectH handle);
25 C_EXPORT bool QRect_isValid(QRectH handle);
26 C_EXPORT int QRect_left(QRectH handle);
27 C_EXPORT int QRect_top(QRectH handle);
28 C_EXPORT int QRect_right(QRectH handle);
29 C_EXPORT int QRect_bottom(QRectH handle);
30 C_EXPORT void QRect_normalized(QRectH handle, PRect retval);
31 C_EXPORT int QRect_x(QRectH handle);
32 C_EXPORT int QRect_y(QRectH handle);
33 C_EXPORT void QRect_setLeft(QRectH handle, int pos);
34 C_EXPORT void QRect_setTop(QRectH handle, int pos);
35 C_EXPORT void QRect_setRight(QRectH handle, int pos);
36 C_EXPORT void QRect_setBottom(QRectH handle, int pos);
37 C_EXPORT void QRect_setX(QRectH handle, int x);
38 C_EXPORT void QRect_setY(QRectH handle, int y);
39 C_EXPORT void QRect_setTopLeft(QRectH handle, const QPointH p);
40 C_EXPORT void QRect_setBottomRight(QRectH handle, const QPointH p);
41 C_EXPORT void QRect_setTopRight(QRectH handle, const QPointH p);
42 C_EXPORT void QRect_setBottomLeft(QRectH handle, const QPointH p);
43 C_EXPORT void QRect_topLeft(QRectH handle, PQtPoint retval);
44 C_EXPORT void QRect_bottomRight(QRectH handle, PQtPoint retval);
45 C_EXPORT void QRect_topRight(QRectH handle, PQtPoint retval);
46 C_EXPORT void QRect_bottomLeft(QRectH handle, PQtPoint retval);
47 C_EXPORT void QRect_center(QRectH handle, PQtPoint retval);
48 C_EXPORT void QRect_moveLeft(QRectH handle, int pos);
49 C_EXPORT void QRect_moveTop(QRectH handle, int pos);
50 C_EXPORT void QRect_moveRight(QRectH handle, int pos);
51 C_EXPORT void QRect_moveBottom(QRectH handle, int pos);
52 C_EXPORT void QRect_moveTopLeft(QRectH handle, const QPointH p);
53 C_EXPORT void QRect_moveBottomRight(QRectH handle, const QPointH p);
54 C_EXPORT void QRect_moveTopRight(QRectH handle, const QPointH p);
55 C_EXPORT void QRect_moveBottomLeft(QRectH handle, const QPointH p);
56 C_EXPORT void QRect_moveCenter(QRectH handle, const QPointH p);
57 C_EXPORT void QRect_translate(QRectH handle, int dx, int dy);
58 C_EXPORT void QRect_translate2(QRectH handle, const QPointH p);
59 C_EXPORT void QRect_translated(QRectH handle, PRect retval, int dx, int dy);
60 C_EXPORT void QRect_translated2(QRectH handle, PRect retval, const QPointH p);
61 C_EXPORT void QRect_moveTo(QRectH handle, int x, int t);
62 C_EXPORT void QRect_moveTo2(QRectH handle, const QPointH p);
63 C_EXPORT void QRect_setRect(QRectH handle, int x, int y, int w, int h);
64 C_EXPORT void QRect_getRect(QRectH handle, int* x, int* y, int* w, int* h);
65 C_EXPORT void QRect_setCoords(QRectH handle, int x1, int y1, int x2, int y2);
66 C_EXPORT void QRect_getCoords(QRectH handle, int* x1, int* y1, int* x2, int* y2);
67 C_EXPORT void QRect_adjust(QRectH handle, int x1, int y1, int x2, int y2);
68 C_EXPORT void QRect_adjusted(QRectH handle, PRect retval, int x1, int y1, int x2, int y2);
69 C_EXPORT void QRect_size(QRectH handle, PSize retval);
70 C_EXPORT int QRect_width(QRectH handle);
71 C_EXPORT int QRect_height(QRectH handle);
72 C_EXPORT void QRect_setWidth(QRectH handle, int w);
73 C_EXPORT void QRect_setHeight(QRectH handle, int h);
74 C_EXPORT void QRect_setSize(QRectH handle, const QSizeH s);
75 C_EXPORT bool QRect_contains(QRectH handle, PRect r, bool proper);
76 C_EXPORT bool QRect_contains2(QRectH handle, const QPointH p, bool proper);
77 C_EXPORT bool QRect_contains3(QRectH handle, int x, int y);
78 C_EXPORT bool QRect_contains4(QRectH handle, int x, int y, bool proper);
79 C_EXPORT void QRect_united(QRectH handle, PRect retval, PRect other);
80 C_EXPORT void QRect_intersected(QRectH handle, PRect retval, PRect other);
81 C_EXPORT bool QRect_intersects(QRectH handle, PRect r);
82 C_EXPORT void QRect_marginsAdded(QRectH handle, PRect retval, const QMarginsH margins);
83 C_EXPORT void QRect_marginsRemoved(QRectH handle, PRect retval, const QMarginsH margins);
84 C_EXPORT QRectFH QRectF_Create();
85 C_EXPORT void QRectF_Destroy(QRectFH handle);
86 C_EXPORT QRectFH QRectF_Create2(const QPointFH topleft, const QSizeFH size);
87 C_EXPORT QRectFH QRectF_Create3(const QPointFH topleft, const QPointFH bottomRight);
88 C_EXPORT QRectFH QRectF_Create4(qreal left, qreal top, qreal width, qreal height);
89 C_EXPORT QRectFH QRectF_Create5(PRect rect);
90 C_EXPORT bool QRectF_isNull(QRectFH handle);
91 C_EXPORT bool QRectF_isEmpty(QRectFH handle);
92 C_EXPORT bool QRectF_isValid(QRectFH handle);
93 C_EXPORT void QRectF_normalized(QRectFH handle, QRectFH retval);
94 C_EXPORT qreal QRectF_left(QRectFH handle);
95 C_EXPORT qreal QRectF_top(QRectFH handle);
96 C_EXPORT qreal QRectF_right(QRectFH handle);
97 C_EXPORT qreal QRectF_bottom(QRectFH handle);
98 C_EXPORT qreal QRectF_x(QRectFH handle);
99 C_EXPORT qreal QRectF_y(QRectFH handle);
100 C_EXPORT void QRectF_setLeft(QRectFH handle, qreal pos);
101 C_EXPORT void QRectF_setTop(QRectFH handle, qreal pos);
102 C_EXPORT void QRectF_setRight(QRectFH handle, qreal pos);
103 C_EXPORT void QRectF_setBottom(QRectFH handle, qreal pos);
104 C_EXPORT void QRectF_setX(QRectFH handle, qreal pos);
105 C_EXPORT void QRectF_setY(QRectFH handle, qreal pos);
106 C_EXPORT void QRectF_topLeft(QRectFH handle, PQtPointF retval);
107 C_EXPORT void QRectF_bottomRight(QRectFH handle, PQtPointF retval);
108 C_EXPORT void QRectF_topRight(QRectFH handle, PQtPointF retval);
109 C_EXPORT void QRectF_bottomLeft(QRectFH handle, PQtPointF retval);
110 C_EXPORT void QRectF_center(QRectFH handle, PQtPointF retval);
111 C_EXPORT void QRectF_setTopLeft(QRectFH handle, const QPointFH p);
112 C_EXPORT void QRectF_setBottomRight(QRectFH handle, const QPointFH p);
113 C_EXPORT void QRectF_setTopRight(QRectFH handle, const QPointFH p);
114 C_EXPORT void QRectF_setBottomLeft(QRectFH handle, const QPointFH p);
115 C_EXPORT void QRectF_moveLeft(QRectFH handle, qreal pos);
116 C_EXPORT void QRectF_moveTop(QRectFH handle, qreal pos);
117 C_EXPORT void QRectF_moveRight(QRectFH handle, qreal pos);
118 C_EXPORT void QRectF_moveBottom(QRectFH handle, qreal pos);
119 C_EXPORT void QRectF_moveTopLeft(QRectFH handle, const QPointFH p);
120 C_EXPORT void QRectF_moveBottomRight(QRectFH handle, const QPointFH p);
121 C_EXPORT void QRectF_moveTopRight(QRectFH handle, const QPointFH p);
122 C_EXPORT void QRectF_moveBottomLeft(QRectFH handle, const QPointFH p);
123 C_EXPORT void QRectF_moveCenter(QRectFH handle, const QPointFH p);
124 C_EXPORT void QRectF_translate(QRectFH handle, qreal dx, qreal dy);
125 C_EXPORT void QRectF_translate2(QRectFH handle, const QPointFH p);
126 C_EXPORT void QRectF_translated(QRectFH handle, QRectFH retval, qreal dx, qreal dy);
127 C_EXPORT void QRectF_translated2(QRectFH handle, QRectFH retval, const QPointFH p);
128 C_EXPORT void QRectF_moveTo(QRectFH handle, qreal x, qreal t);
129 C_EXPORT void QRectF_moveTo2(QRectFH handle, const QPointFH p);
130 C_EXPORT void QRectF_setRect(QRectFH handle, qreal x, qreal y, qreal w, qreal h);
131 C_EXPORT void QRectF_getRect(QRectFH handle, qreal* x, qreal* y, qreal* w, qreal* h);
132 C_EXPORT void QRectF_setCoords(QRectFH handle, qreal x1, qreal y1, qreal x2, qreal y2);
133 C_EXPORT void QRectF_getCoords(QRectFH handle, qreal* x1, qreal* y1, qreal* x2, qreal* y2);
134 C_EXPORT void QRectF_adjust(QRectFH handle, qreal x1, qreal y1, qreal x2, qreal y2);
135 C_EXPORT void QRectF_adjusted(QRectFH handle, QRectFH retval, qreal x1, qreal y1, qreal x2, qreal y2);
136 C_EXPORT void QRectF_size(QRectFH handle, QSizeFH retval);
137 C_EXPORT qreal QRectF_width(QRectFH handle);
138 C_EXPORT qreal QRectF_height(QRectFH handle);
139 C_EXPORT void QRectF_setWidth(QRectFH handle, qreal w);
140 C_EXPORT void QRectF_setHeight(QRectFH handle, qreal h);
141 C_EXPORT void QRectF_setSize(QRectFH handle, const QSizeFH s);
142 C_EXPORT bool QRectF_contains(QRectFH handle, const QRectFH r);
143 C_EXPORT bool QRectF_contains2(QRectFH handle, const QPointFH p);
144 C_EXPORT bool QRectF_contains3(QRectFH handle, qreal x, qreal y);
145 C_EXPORT void QRectF_united(QRectFH handle, QRectFH retval, const QRectFH other);
146 C_EXPORT void QRectF_intersected(QRectFH handle, QRectFH retval, const QRectFH other);
147 C_EXPORT bool QRectF_intersects(QRectFH handle, const QRectFH r);
148 C_EXPORT void QRectF_toRect(QRectFH handle, PRect retval);
149 C_EXPORT void QRectF_toAlignedRect(QRectFH handle, PRect retval);
150 
151 #endif
152