<commit_before>﻿#include "../wawl/Wawl.hpp"

using namespace wawl;

fs::ProcessInfo procInfo = {};

LongPtr CALLBACK MsgProc(
	wnd::WindowHandle window,
	Uint msg,
	UintPtr wParam,
	LongPtr lParam
) {
	using wnd::Msg;

	switch (static_cast<Msg>(msg)) {
	case Msg::MouseLClick:
		if (!procInfo.hProcess)
			fs::proc::createProcess(procInfo, L"notepad.exe");
		break;
	case Msg::MouseRClick:
		fs::proc::terminateProcess(procInfo);
		procInfo = {};
		break;
	default:
		return wnd::defaultProc(window, static_cast<wnd::Msg>(msg), wParam, lParam);
	}

	return 0;
}

int WawlMain(
	AppHandle appInst,
	AppHandle,
	Tchar* cmdLine,
	int cmdShow
) {
	const Tstring propName = L"WndClass";

	wnd::Property prop(
		propName,
		MsgProc,
		appInst,
		wnd::PropOption::HRedraw | wnd::PropOption::VRedraw,
		wnd::loadIconFromResource(appInst, L"ico"),
		wnd::loadIconFromResource(appInst, L"ico"),
		wnd::loadOEMCursor(
			wnd::OEMCursor::Arrow,
			wnd::ImageLoadOption::DefaultSize
			| wnd::ImageLoadOption::ShareHandle
		),
		wnd::ColorBrush::White
	);
	if (!wnd::registerProperty(prop))
		return 0;

	wnd::WindowHandle window =
		wnd::createWindow(
			propName,
			L"wawl test",
			{ wnd::DefaultWindowPos.x, wnd::DefaultWindowPos.y, 640, 480 },
			wnd::Option::SysMenu | wnd::Option::EnableSizeChange
		);
	if (!window)
		return 0;

	wnd::update(window);
	wnd::setShowMode(window, static_cast<wnd::ShowMode>(cmdShow));

	wnd::Message msg = {};
	while (wnd::getMessage(msg, window)) {
		wnd::translateMessage(msg);
		wnd::dispatchMessage(msg);
	}

	return static_cast<int>(msg.wParam);
}<commit_msg>back Source.cpp to minimum code<commit_after>﻿#include "../wawl/Wawl.hpp"

using namespace wawl;

int WawlMain(
	AppHandle appInst,
	AppHandle,
	Tchar* cmdLine,
	int cmdShow
) {
	return 0;
}
{'fraction_non_alphanumeric': 0.15393258426966291, 'fraction_numerical': 0.0056179775280898875, 'mean_word_length': 5.406474820143885, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1252617', 'n_tokens_mistral': 747, 'n_tokens_neox': 688, 'n_words': 123}