Skip to content

Commit

Permalink
(#19) Introduces OS specific source folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Hofmann committed Jul 31, 2020
1 parent 88bb9a1 commit 976beb6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/highlightwindow_linux.c → src/linux/highlightwindow.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <unistd.h>
#include "highlightwindow.h"
#include "../highlightwindow.h"

void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, long duration, float opacity) {
Display *d = XOpenDisplay(NULL);
Expand All @@ -23,7 +23,7 @@ void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, lo
Window overlay = XCreateWindow(
d, root,
x, y, width, height, 0,
vinfo.depth, InputOutput,
vinfo.depth, InputOutput,
vinfo.visual,
CWOverrideRedirect | CWColormap | CWBackPixel | CWBorderPixel, &attrs
);
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/highlightwindow_macos.m → src/macos/highlightwindow.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "highlightwindow.h"
#include "../highlightwindow.h"
#import <Cocoa/Cocoa.h>

void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, long duration, float opacity) {
Expand All @@ -24,4 +24,4 @@ void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, lo
}];
[NSApp run];
[pool release];
}
}
6 changes: 3 additions & 3 deletions src/highlightwindow_win32.c → src/win32/highlightwindow.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef UNICODE
#define UNICODE
#endif
#endif

#include <windows.h>
#include "highlightwindow.h"
#include "../highlightwindow.h"

#define ID_CLOSE_TIMER 1001

Expand All @@ -20,7 +20,7 @@ void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, lo
wc.lpszClassName = CLASS_NAME;
wc.hbrBackground = CreateSolidBrush(RGB(255, 0, 0));

RegisterClass(&wc);
RegisterClass(&wc);

HWND hwnd = CreateWindowEx(
WS_EX_LAYERED|WS_EX_TOPMOST|WS_EX_TRANSPARENT|WS_EX_TOOLWINDOW,
Expand Down

0 comments on commit 976beb6

Please sign in to comment.