{"id":13424546,"url":"https://github.com/ViNeek/wuhoo","last_synced_at":"2025-03-15T18:35:22.377Z","repository":{"id":150221427,"uuid":"286248597","full_name":"ViNeek/wuhoo","owner":"ViNeek","description":"Windows Using Headers Only...","archived":false,"fork":false,"pushed_at":"2020-12-12T08:13:57.000Z","size":6034,"stargazers_count":60,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-26T23:55:23.751Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ViNeek.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}},"created_at":"2020-08-09T14:03:08.000Z","updated_at":"2024-04-20T21:23:06.000Z","dependencies_parsed_at":"2023-04-11T12:18:10.361Z","dependency_job_id":null,"html_url":"https://github.com/ViNeek/wuhoo","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/ViNeek%2Fwuhoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViNeek%2Fwuhoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViNeek%2Fwuhoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViNeek%2Fwuhoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ViNeek","download_url":"https://codeload.github.com/ViNeek/wuhoo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243775873,"owners_count":20346280,"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-07-31T00:00:56.029Z","updated_at":"2025-03-15T18:35:17.352Z","avatar_url":"https://github.com/ViNeek.png","language":"C","readme":"# WUHOO\n\nWuhoo loosely stands for **W** indows **U** sing **H** eaders **O** nly. It is an attempt to create a single-header library (in the spirit of STB [1]) for graphics related window management, compatible with both C and C++. \n\nWuhoo aims to make it easy to setup a system-backed drawing canvas on the three most popular windowing APIs, namely Win32, X11 and Cocoa. If requested, the API can also handle the creation of a modern OpenGL context for the user.\n\nWuhoo is a single header library. In a single implemetation file, you `#define WUHOO_IMPLEMENTATION` and `#include wuhoo.h`.\n\nDocumentation can be found [here](https://vineek.github.io/wuhoo/index.html)\n\n## Windows (Win32 API)\n\nWindows API functions that manipulate characters generally provide two versions,\n\n- A Windows code page version with the letter \"A\" used to indicate \"ANSI\".\n- A Unicode version with the letter \"W\" used to indicate \"wide\".\n\nIn Wuhoo you `#define WUHOO_UNICODE` or simply `UNICODE` to indicate which version should be used internally. UNICODE might already by defined depending on your compilation settings. In general Wuhoo uses UTF-8 encoding for all string-relevant APIs and handles any required conversion internally.\n\nIf you plan to use the OpenGL backend, it is expected that you include your own OpenGL headers before wuhoo itself.\n\n## Linux (X11 API)\n\nWhen using the X11 backend on Linux, the user has to link with the X11 library (-lX11). If an OpenGL context has been requested, the OpenGL library is also required (-lGL)\n\nDepending on your package manager, you will at least need something like this:\n\n`sudo apt-get install libx11-dev`\n\n## Mac OS X (Cocoa API)\n\nWhen using the Cocoa backend on Mac OS X the user has to link with the following frameworks (-framework Cocoa, Carbon, Quartz). If an OpenGL context has been requested, the OpenGL framework is also required (-framework OpenGL)\n\n## Examples\n\nTo quickly get up and running with Wuhoo, check out the provided examples. Clone this repository with:\n\n`git clone https://github.com/ViNeek/wuhoo.git`\n\nA **cmake** build script is provided. Simply change directory to `wuhoo/examples` and execute\n\n`cmake -D\"CMAKE_BUILD_TYPE=Release\" -H. -Bbuild`\n\nor with newer **cmake** (\u003e3.13)\n\n`cmake -D\"CMAKE_BUILD_TYPE=Release\" -S. -Bbuild`\n\n- **Canvas** is a very basic example that allows the user to free draw with the mouse on a system provided buffer. It showcases window setup along with basic window and mouse event handling.\n\n- **Mandelbrot** and **Mandelbrot GL** draw the famous fractal using a system buffer and an OpenGL context respectively.\n\n\u003cimg style=\"padding: 10px\" src=\"docs/images/x11_mandelbrot.png\" width=\"300\"/\u003e \u003cimg style=\"padding: 10px\" src=\"docs/images/cocoa_mandelbrot.png\" width=\"300\"/\u003e\n\n\u003cimg style=\"padding: 10px\" src=\"docs/images/win32_mandelbrot.png\" width=\"306\"/\u003e \u003cimg style=\"padding: 10px\" src=\"docs/images/x11_pi_mandelbrot.png\" width=\"300\"/\u003e\n \n- **Text** uses another single header library(stb_truetype) to create a very basic text editor. The main focus is on showcasing how character encoding and keyboard events are handled with Wuhoo.\n\n- **Image Viewer** uses stb_image and stb_image_resize to create a basic image previewer. The main focus is on presenting the Drag n Drop event handling. Simply drag an image on the window to present it.\n\n- **RTIOW** is a C++ project that implements a multi-threaded version of the amazing Ray Tracing in One Weekend book. Expect something like this:\n\n\u003cimg style=\"padding: 10px\" src=\"docs/images/rtiow_run.gif\" width=\"300\"/\u003e\n\n\u003cimg style=\"padding: 10px\" src=\"docs/images/x11_rtiow.png\" width=\"300\"/\u003e \u003cimg style=\"padding: 10px\" src=\"docs/images/cocoa_rtiow_crop.png\" width=\"300\"/\u003e\n\n\u003cimg style=\"padding: 10px\" src=\"docs/images/win32_rtiow.png\" width=\"306\"/\u003e \u003cimg style=\"padding: 10px\" src=\"docs/images/x11_pi_rtiow.png\" width=\"300\"/\u003e\n\n[1] https://github.com/nothings/stb\n","funding_links":[],"categories":["Graphics"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FViNeek%2Fwuhoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FViNeek%2Fwuhoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FViNeek%2Fwuhoo/lists"}