Skip to content

Commit 366626e

Browse files
authored
Merge pull request #21 from nut-tree/feature/19/os_folders
Feature/19/os_folders
2 parents 88bb9a1 + c0da0fa commit 366626e

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ project(libnut)
66
# Source
77
set(SOURCE_FILES "src/main.cc" "src/deadbeef_rand.c" "src/keycode.c" "src/keypress.c" "src/MMBitmap.c" "src/mouse.c" "src/screen.c" "src/screengrab.c")
88
if (UNIX AND NOT APPLE)
9-
set(SOURCE_FILES "${SOURCE_FILES}" "src/xdisplay.c" "src/highlightwindow_linux.c")
9+
set(SOURCE_FILES "${SOURCE_FILES}" "src/linux/xdisplay.c" "src/linux/highlightwindow.c")
1010
elseif (UNIX AND APPLE)
11-
set(SOURCE_FILES "${SOURCE_FILES}" "src/highlightwindow_macos.m")
11+
set(SOURCE_FILES "${SOURCE_FILES}" "src/macos/highlightwindow.m")
1212
elseif (WIN32)
13-
set(SOURCE_FILES "${SOURCE_FILES}" "src/highlightwindow_win32.c")
13+
set(SOURCE_FILES "${SOURCE_FILES}" "src/win32/highlightwindow.c")
1414
endif()
1515
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC})
1616

src/highlightwindow_linux.c renamed to src/linux/highlightwindow.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <X11/Xlib.h>
22
#include <X11/Xutil.h>
33
#include <unistd.h>
4-
#include "highlightwindow.h"
4+
#include "../highlightwindow.h"
55

66
void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, long duration, float opacity) {
77
Display *d = XOpenDisplay(NULL);
@@ -23,7 +23,7 @@ void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, lo
2323
Window overlay = XCreateWindow(
2424
d, root,
2525
x, y, width, height, 0,
26-
vinfo.depth, InputOutput,
26+
vinfo.depth, InputOutput,
2727
vinfo.visual,
2828
CWOverrideRedirect | CWColormap | CWBackPixel | CWBorderPixel, &attrs
2929
);

src/xdisplay.c renamed to src/linux/xdisplay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "xdisplay.h"
1+
#include "../xdisplay.h"
22
#include <stdio.h> /* For fputs() */
33
#include <stdlib.h> /* For atexit() */
44
#include <string.h> /* For strdup() */

src/highlightwindow_macos.m renamed to src/macos/highlightwindow.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "highlightwindow.h"
1+
#include "../highlightwindow.h"
22
#import <Cocoa/Cocoa.h>
33

44
void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, long duration, float opacity) {
@@ -24,4 +24,4 @@ void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, lo
2424
}];
2525
[NSApp run];
2626
[pool release];
27-
}
27+
}

src/highlightwindow_win32.c renamed to src/win32/highlightwindow.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#ifndef UNICODE
22
#define UNICODE
3-
#endif
3+
#endif
44

55
#include <windows.h>
6-
#include "highlightwindow.h"
6+
#include "../highlightwindow.h"
77

88
#define ID_CLOSE_TIMER 1001
99

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

23-
RegisterClass(&wc);
23+
RegisterClass(&wc);
2424

2525
HWND hwnd = CreateWindowEx(
2626
WS_EX_LAYERED|WS_EX_TOPMOST|WS_EX_TRANSPARENT|WS_EX_TOOLWINDOW,

0 commit comments

Comments
 (0)