Skip to content

Commit 2f1cf9b

Browse files
author
Simon Hofmann
committed
(#17) Added plattform specific typedef for window handles
1 parent 72b1609 commit 2f1cf9b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "os.h"
66
#include "inline_keywords.h" /* For H_INLINE */
77
#include <stddef.h>
8+
#include <stdint.h>
89

910
/* Some generic, cross-platform types. */
1011

@@ -60,6 +61,9 @@ H_INLINE MMRect MMRectMake(size_t x, size_t y, size_t width, size_t height)
6061
#define CGPointFromMMPoint(p) CGPointMake((CGFloat)(p).x, (CGFloat)(p).y)
6162
#define MMPointFromCGPoint(p) MMPointMake((size_t)(p).x, (size_t)(p).y)
6263

64+
typedef int64_t WindowHandle;
65+
typedef int64_t PID;
66+
6367
#elif defined(IS_WINDOWS)
6468

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

src/window_manager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
#include <string>
77
#include "types.h"
88

9-
std::vector<int64_t> getWindows();
9+
std::vector<WindowHandle> getWindows();
10+
1011
std::string getWindowTitle(const int64_t windowHandle);
1112
MMRect getWindowRect(const int64_t windowHandle);
1213

0 commit comments

Comments
 (0)