aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-05-06 02:26:32 -0700
committerFuwn <[email protected]>2023-05-06 02:26:32 -0700
commita1a7da24b94ec83ad4e5678e5355fbb6f85a8ee8 (patch)
treeac58b4ce9e433fade9acd456052f485709471605 /include
parentchore: bump to 1.1.4 (diff)
downloadsoyuz-a1a7da24b94ec83ad4e5678e5355fbb6f85a8ee8.tar.xz
soyuz-a1a7da24b94ec83ad4e5678e5355fbb6f85a8ee8.zip
docs: bump copyright headers
Diffstat (limited to 'include')
-rw-r--r--include/soyuz/library.hh28
-rw-r--r--include/soyuz/resource.hh11
-rw-r--r--include/soyuz/soyuz.hh8
-rw-r--r--include/soyuz/tray.hh13
-rw-r--r--include/soyuz/windows.hh53
5 files changed, 36 insertions, 77 deletions
diff --git a/include/soyuz/library.hh b/include/soyuz/library.hh
index 5074d2a..c43fc22 100644
--- a/include/soyuz/library.hh
+++ b/include/soyuz/library.hh
@@ -1,31 +1,22 @@
-// Copyright (C) 2021-2022 Fuwn
+// Copyright (C) 2021-2023 Fuwn
// SPDX-License-Identifier: GPL-3.0-only
-/**
- * @file library.hh
- * @author Fuwn
- * @date 2021. August. 18.
- */
-
#ifndef SOYUZ_LIBRARY_HH
#define SOYUZ_LIBRARY_HH
#pragma once
-#include <string>
#include <Windows.h>
+#include <string>
#include <vector>
+
#define NT_SUCCESS(status) (status >= 0)
#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L)
namespace soyuz {
const std::string numbers_as_string[] = {
- "zero",
- "one",
- "two",
- "three",
- "four",
+ "zero", "one", "two", "three", "four",
};
enum log_level {
@@ -37,14 +28,11 @@ enum log_level {
};
struct log_t {
- log_level level;
+ log_level level;
std::string value;
- log_t(
- log_level level,
- std::string value
- ) : level(level), value(std::move(value))
- {}
+ log_t(log_level level, std::string value)
+ : level(level), value(std::move(value)) {}
[[nodiscard]] auto to_colorref() const -> COLORREF;
};
@@ -59,6 +47,6 @@ auto exit(int) -> void;
// https://stackoverflow.com/a/10467633/14452787
auto current_date_time() -> std::string;
-}
+} // namespace soyuz
#endif // SOYUZ_LIBRARY_HH
diff --git a/include/soyuz/resource.hh b/include/soyuz/resource.hh
index 4caebbf..1efc8a1 100644
--- a/include/soyuz/resource.hh
+++ b/include/soyuz/resource.hh
@@ -1,18 +1,13 @@
-// Copyright (C) 2021-2022 Fuwn
+// Copyright (C) 2021-2023 Fuwn
// SPDX-License-Identifier: GPL-3.0-only
-/**
- * @file resource.hh
- * @author Fuwn
- * @date 2021. August. 18.
- */
-
#ifndef SOYUZ_RESOURCE_HH
#define SOYUZ_RESOURCE_HH
#pragma once
-#include <shellapi.h>
#include <Windows.h>
+#include <shellapi.h>
+
#define ICO1 101
#define ID_TRAY_APP_ICON 1001
diff --git a/include/soyuz/soyuz.hh b/include/soyuz/soyuz.hh
index 42cc2a4..ad4b19f 100644
--- a/include/soyuz/soyuz.hh
+++ b/include/soyuz/soyuz.hh
@@ -1,12 +1,6 @@
-// Copyright (C) 2021-2022 Fuwn
+// Copyright (C) 2021-2023 Fuwn
// SPDX-License-Identifier: GPL-3.0-only
-/**
- * @file soyuz.hh
- * @author Fuwn
- * @date 2021. August. 18.
- */
-
#ifndef SOYUZ_SOYUZ_HH
#define SOYUZ_SOYUZ_HH
#pragma once
diff --git a/include/soyuz/tray.hh b/include/soyuz/tray.hh
index 178600d..09a3d56 100644
--- a/include/soyuz/tray.hh
+++ b/include/soyuz/tray.hh
@@ -1,19 +1,14 @@
-// Copyright (C) 2021-2022 Fuwn
+// Copyright (C) 2021-2023 Fuwn
// SPDX-License-Identifier: GPL-3.0-only
-/**
- * @file tray.hh
- * @author Fuwn
- * @date 2021. August. 18.
- */
-
#ifndef SOYUZ_TRAY_HH
#define SOYUZ_TRAY_HH
#pragma once
+#include <Windows.h>
#include <string>
#include <vector>
-#include <Windows.h>
+
#include <soyuz/library.hh>
@@ -27,6 +22,6 @@ namespace soyuz {
[[maybe_unused]] auto log(const std::string &) -> void;
auto log(log_level, const std::string &) -> void;
-}
+} // namespace soyuz
#endif // SOYUZ_TRAY_HH
diff --git a/include/soyuz/windows.hh b/include/soyuz/windows.hh
index 1acfaac..073e113 100644
--- a/include/soyuz/windows.hh
+++ b/include/soyuz/windows.hh
@@ -1,45 +1,34 @@
-// Copyright (C) 2021-2022 Fuwn
+// Copyright (C) 2021-2023 Fuwn
// SPDX-License-Identifier: GPL-3.0-only
-/**
- * @file windows.hh
- * @author Fuwn
- * @date 2021. August. 18.
- */
-
#ifndef SOYUZ_WINDOWS_HH
#define SOYUZ_WINDOWS_HH
#pragma once
#include <Windows.h>
-enum PROCESSINFOCLASS {
- ProcessHandleInformation = 51
-};
+enum PROCESSINFOCLASS { ProcessHandleInformation = 51 };
typedef struct _PROCESS_HANDLE_TABLE_ENTRY_INFO {
- HANDLE HandleValue;
+ HANDLE HandleValue;
ULONG_PTR HandleCount;
ULONG_PTR PointerCount;
- ULONG GrantedAccess;
- ULONG ObjectTypeIndex;
- ULONG HandleAttributes;
- ULONG Reserved;
-} PROCESS_HANDLE_TABLE_ENTRY_INFO, * PPROCESS_HANDLE_TABLE_ENTRY_INFO;
+ ULONG GrantedAccess;
+ ULONG ObjectTypeIndex;
+ ULONG HandleAttributes;
+ ULONG Reserved;
+} PROCESS_HANDLE_TABLE_ENTRY_INFO, *PPROCESS_HANDLE_TABLE_ENTRY_INFO;
typedef struct _PROCESS_HANDLE_SNAPSHOT_INFORMATION {
- ULONG_PTR NumberOfHandles;
- ULONG_PTR Reserved;
+ ULONG_PTR NumberOfHandles;
+ ULONG_PTR Reserved;
PROCESS_HANDLE_TABLE_ENTRY_INFO Handles[1];
-} PROCESS_HANDLE_SNAPSHOT_INFORMATION, * PPROCESS_HANDLE_SNAPSHOT_INFORMATION;
+} PROCESS_HANDLE_SNAPSHOT_INFORMATION, *PPROCESS_HANDLE_SNAPSHOT_INFORMATION;
extern "C" NTSTATUS NTAPI NtQueryInformationProcess(
- _In_ HANDLE ProcessHandle,
- _In_ PROCESSINFOCLASS ProcessInformationClass,
- _Out_writes_bytes_(ProcessInformationLength) PVOID ProcessInformation,
- _In_ ULONG ProcessInformationLength,
- _Out_opt_ PULONG ReturnLength
-);
+ _In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass,
+ _Out_writes_bytes_(ProcessInformationLength) PVOID ProcessInformation,
+ _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength);
typedef enum _OBJECT_INFORMATION_CLASS {
ObjectNameInformation = 1
@@ -48,19 +37,17 @@ typedef enum _OBJECT_INFORMATION_CLASS {
typedef struct _UNICODE_STRING {
USHORT Length;
USHORT MaximumLength;
- PWSTR Buffer;
+ PWSTR Buffer;
} UNICODE_STRING;
typedef struct _OBJECT_NAME_INFORMATION {
UNICODE_STRING Name;
-} OBJECT_NAME_INFORMATION, * POBJECT_NAME_INFORMATION;
+} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
extern "C" NTSTATUS NTAPI NtQueryObject(
- _In_opt_ HANDLE Handle,
- _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass,
- _Out_writes_bytes_opt_(ObjectInformationLength) PVOID ObjectInformation,
- _In_ ULONG ObjectInformationLength,
- _Out_opt_ PULONG ReturnLength
-);
+ _In_opt_ HANDLE Handle,
+ _In_ OBJECT_INFORMATION_CLASS ObjectInformationClass,
+ _Out_writes_bytes_opt_(ObjectInformationLength) PVOID ObjectInformation,
+ _In_ ULONG ObjectInformationLength, _Out_opt_ PULONG ReturnLength);
#endif // SOYUZ_WINDOWS_HH