{"id":13730933,"url":"https://github.com/thennequin/EasyWindow","last_synced_at":"2025-05-08T03:32:16.805Z","repository":{"id":45756139,"uuid":"91737698","full_name":"thennequin/EasyWindow","owner":"thennequin","description":"Create window easily","archived":false,"fork":false,"pushed_at":"2024-10-31T17:30:11.000Z","size":101,"stargazers_count":37,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T18:27:51.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thennequin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-18T21:07:22.000Z","updated_at":"2024-10-31T17:30:14.000Z","dependencies_parsed_at":"2024-10-31T18:22:38.711Z","dependency_job_id":"3c1eb51a-5a0e-4f1f-8c71-3f93e8201554","html_url":"https://github.com/thennequin/EasyWindow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thennequin%2FEasyWindow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thennequin%2FEasyWindow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thennequin%2FEasyWindow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thennequin%2FEasyWindow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thennequin","download_url":"https://codeload.github.com/thennequin/EasyWindow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224695799,"owners_count":17354485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:21.614Z","updated_at":"2024-11-14T21:31:51.504Z","avatar_url":"https://github.com/thennequin.png","language":"C++","readme":"# EasyWindow\n\nEasyWindow is a simple library for creating and managing windows.\n\nIt's usefull for create graphics project.\n\n__!!!WARNING!!!__\n\nOnly work on Windows actually (need an Linux and MacOS support) and not stable enough for production.\n\n## How to use\nInclude files in you project:\n * EasyWindow.h\n * EasyWindow.cpp\n * EasyWindowWin32.cpp\n \n \nEasyWindow allow you to create a window in 3 lines\n\n``` c++\n#include \"EasyWindow.h\"\n\nEasyWindow* pMyWindow = EasyWindow::Create(\"My window\", 640, 480);\nwhile (pMyWindow-\u003eUpdate());\n```\n\n## How to get some events\n\nAvailable events:\n * OnSize\n * OnMove\n * OnMaximize\n * OnMinimize\n * OnRestore\n * OnFocus\n * OnClose\n * OnMouseButton\n * OnMouseMove\n * OnMouseWheel\n * OnKey\n * OnChar\n \n ### Example\n \n``` c++\n#include \"EasyWindow.h\"\n\nvoid MyOnSizeFunction(int iWidth, int iHeight)\n{\n\tprintf(\"%d x %d\\n\", iWidth, iHeight);\n}\n\nvoid MyOnKeyFunction(EasyWindow::EKey eKey, bool bIsDown)\n{\n\tprintf(\"Key '%s' is %s\\n\", EasyWindow::KeyToString(eKey), bIsDown ? \"down\" : \"up\");\n}\n\nvoid main()\n{\n\t// Create window\n\tEasyWindow* pMyWindow = EasyWindow::Create(\"My window\", 640, 480);\n\t// Set events callback\n\tpMyWindow-\u003eOnSize.Set(\u0026MyOnSizeFunction);\n\tpMyWindow-\u003eOnKey.Set(\u0026MyOnKeyFunction);\n\t// Update window\n\twhile (pMyWindow-\u003eUpdate());\n}\n```\n\n## Use with BGFX\n\n```c++\nEasyWindow* pMyWindow = EasyWindow::Create(\"My window\", 640, 480);\n\nbgfx::PlatformData pd;\nmemset(\u0026pd, 0, sizeof(pd));\npd.nwh = pMyWindow-\u003eGetHandle();\nbgfx::setPlatformData(pd);\n\nbool bInit = bgfx::init(bgfx::RendererType::OpenGL);\n\nbgfx::createFrameBuffer(pMyWindow-\u003eGetHandle(), pMyWindow-\u003eGetClientWidth(), pMyWindow-\u003eGetClientHeight());\n```\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthennequin%2FEasyWindow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthennequin%2FEasyWindow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthennequin%2FEasyWindow/lists"}