Skip to content

Commit c76079f

Browse files
committed
(#17) Changed point and size types to use int64_t
1 parent b273dbb commit c76079f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/types.h

+9-7
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
/* Some generic, cross-platform types. */
1111

1212
struct _MMPoint {
13-
size_t x;
14-
size_t y;
13+
int64_t x;
14+
int64_t y;
1515
};
1616

1717
typedef struct _MMPoint MMPoint;
1818

1919
struct _MMSize {
20-
size_t width;
21-
size_t height;
20+
int64_t width;
21+
int64_t height;
2222
};
2323

2424
typedef struct _MMSize MMSize;
@@ -30,23 +30,23 @@ struct _MMRect {
3030

3131
typedef struct _MMRect MMRect;
3232

33-
H_INLINE MMPoint MMPointMake(size_t x, size_t y)
33+
H_INLINE MMPoint MMPointMake(int64_t x, int64_t y)
3434
{
3535
MMPoint point;
3636
point.x = x;
3737
point.y = y;
3838
return point;
3939
}
4040

41-
H_INLINE MMSize MMSizeMake(size_t width, size_t height)
41+
H_INLINE MMSize MMSizeMake(int64_t width, int64_t height)
4242
{
4343
MMSize size;
4444
size.width = width;
4545
size.height = height;
4646
return size;
4747
}
4848

49-
H_INLINE MMRect MMRectMake(size_t x, size_t y, size_t width, size_t height)
49+
H_INLINE MMRect MMRectMake(int64_t x, int64_t y, int64_t width, int64_t height)
5050
{
5151
MMRect rect;
5252
rect.origin = MMPointMake(x, y);
@@ -68,6 +68,8 @@ typedef int64_t PID;
6868

6969
#define MMPointFromPOINT(p) MMPointMake((size_t)p.x, (size_t)p.y)
7070

71+
typedef int64_t WindowHandle;
72+
7173
#endif
7274

7375
#endif /* TYPES_H */

0 commit comments

Comments
 (0)