Skip to content

Commit ae23f2f

Browse files
committed
(#3) Added highlight function to screen
1 parent fabd2f7 commit ae23f2f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/screen.c renamed to src/screen.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "screen.h"
22
#include "os.h"
3+
#include "window.h"
34

45
#if defined(IS_MACOSX)
56
#include <ApplicationServices/ApplicationServices.h>
@@ -31,3 +32,8 @@ bool pointVisibleOnMainDisplay(MMPoint point)
3132
MMSize displaySize = getMainDisplaySize();
3233
return point.x < displaySize.width && point.y < displaySize.height;
3334
}
35+
36+
void highlight(int x, int y, int width, int height, int duration, float opacity) {
37+
Window highlightWindow(x, y, width, height);
38+
highlightWindow.show(duration, opacity);
39+
}

src/screen.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ MMSize getMainDisplaySize(void);
2222
* of the main screen. */
2323
bool pointVisibleOnMainDisplay(MMPoint point);
2424

25+
void highlight(int x, int y, int width, int height, int duration, float opacity);
26+
2527
#ifdef __cplusplus
2628
}
2729
#endif

0 commit comments

Comments
 (0)