Skip to content

Instantly share code, notes, and snippets.

View sylveon's full-sized avatar

Charles Milette sylveon

View GitHub Profile
@sylveon
sylveon / main.cpp
Created November 4, 2021 19:46
Win32 Mica
#include <Unknwn.h>
#include <winrt/Windows.System.h>
#include <winrt/Windows.UI.Composition.Desktop.h>
#include <windows.ui.composition.interop.h>
#include <ShellScalingAPI.h>
#include <DispatcherQueue.h>
extern "C" IMAGE_DOS_HEADER __ImageBase;
using namespace winrt;
module;
#include <atomic>
#include <coroutine>
#include <utility>
export module Module;
namespace winrt::impl
{
inline std::pair<int32_t, int32_t> get_apartment_type() noexcept
{
struct FilenameHash
{
using transparent_key_equal = FilenameEqual;
std::size_t operator()(std::wstring_view k) const
{
std::size_t hash = Util::INITIAL_HASH_VALUE;
for (std::size_t i = 0; i < k.length(); ++i)
{
if (Util::IsAscii(k[i]))