{"id":17821306,"url":"https://github.com/numpad/qw","last_synced_at":"2025-10-14T14:32:53.722Z","repository":{"id":79648996,"uuid":"50562809","full_name":"numpad/QW","owner":"numpad","description":null,"archived":false,"fork":false,"pushed_at":"2016-10-26T18:24:47.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T09:46:30.566Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/numpad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-01-28T06:56:41.000Z","updated_at":"2016-01-28T06:57:50.000Z","dependencies_parsed_at":"2023-05-14T08:45:40.994Z","dependency_job_id":null,"html_url":"https://github.com/numpad/QW","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/numpad/QW","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numpad%2FQW","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numpad%2FQW/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numpad%2FQW/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numpad%2FQW/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numpad","download_url":"https://codeload.github.com/numpad/QW/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numpad%2FQW/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019126,"owners_count":26086680,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-27T17:16:35.194Z","updated_at":"2025-10-14T14:32:53.682Z","avatar_url":"https://github.com/numpad.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QuickWindow\n\n## 1. Using QW\n 1. `#include \"qw.h\"` in your project\n 2. Use a C99-compatible compiler\n 3. Link against SDL2, SDL2_image, SDL2_gfx and libm\n\n## 2. Documentation\n\n### Global Variables\n\n Variable | Type | Description\n----------|------|-------------\nqw_width, qw_height | int | Size of the current window\nqw_window | SDL_Window | SDL_Window managed by QW\nqw_renderer | SDL_Renderer | SDL_Renderer managed by QW\nqw_mousex, qw_mousey | int | Mouseposition relative to window\nqw_mousex_last, qw_mousey_last | int | Mouseposition from previous frame\nqw_mousex_next, qw_mousey_next | int | Direction the mouse is moving\nqw_tick_count | unsigned long long | Number of frames since QW started its main loop\n\n### Functions\n\n##### qw_quit()\n\u003e Quits the application\n\n##### qw_screen(int **width**, int **height**, int **fullscreen**, const char \\***title**)\n\u003e Create and open a window\n\n##### qw_resetticks()\n\u003e Reset tick_count to 0\n\n##### qw_onscreen(int **x**, int **y**)\n\u003e Checks if x,y are on screen or not\n\n##### qw_fill(int **r**, int **g**, int **b**)\n\u003e Clears the screen with background color **r**,**g**,**b**\n\n##### qw_redraw()\n\u003e Draws rendered content to screen\n\n##### qw_delay(int **millis**)\n\u003e Pauses execution for **millis** milliseconds\n\n##### qw_clear()\n\u003e Clears the renderer\n\n##### qw_running()\n\u003e Execute main loop, returns true if qw is running\n\n```c\nqw_screen(640, 480, 0, \"Quick Window\");\n\nwhile (qw_running()) {\n\tqw_color(200, 100, 100, 255);\n\tqw_rect(100, 100, 100, 200);\n\n\tqw_redraw();\n}\nqw_quit();\n```\n\n##### qw_keydown(int **key**)\n\u003e Returns if **key** is down\n\n```c\nif (qw_keydown(QW_KEY(LEFT))) {\n\t// Move the player left\n}\n```\n\n##### qw_getmouse(int **\\*x**, int **\\*y**)\n\u003e Writes mouse x and y to *\u0026x*, *\u0026y*\n\u003e __Deprecated! Use *qw_mousex* and *qw_mousey*__\n\n##### qw_mousedown(int **button**)\n\u003e Returns if mouse**button** is down\n\n##### qw_color(Uint8 **r**, Uint8 **g**, Uint8 **b**, Uint8 **a**)\n\u003e Sets color for drawing\n\n##### qw_drawpixel(int **x**, int **y**)\n\u003e Draws pixel at **x**,**y**\n\n##### qw_fillrect(int **x**, int **y**, int **w**, int **h**)\n\u003e Draws a filled rectangle at **x**,**y** with size **w**,**h**\n\n##### qw_drawrect(int **x**, int **y**, int **w**, int **h**)\n\u003e Draws a rectangle at **x**,**y** with size **w**,**h**\n\n##### qw_drawline(int **x1**, int **y1**, int **x2**, int **y2**)\n\u003e Draws a line from **x1**,**y1** to **x2**,**y2**\n\n##### qw_drawcircle(int **x**, int **y**, int **r**)\n\u003e Draws a circle around **x**,**y** with radius **r**\n\n##### qw_fillcircle(int **x**, int **y**, int **r**)\n\u003e Draws a filled circle around **x**,**y** with radius **r**\n\n##### qw_loadimage(const char **\\*fn**)\n\u003e Returns a *qw_image* read from filename **fn**\n\n##### qw_destroyimage(qw_image **img**)\n\u003e Frees all resources taken by **img**\n\n##### qw_drawimage(qw_image **img**)\n\u003e Draws **img**\n\n##### qw_moveimage(qw_image **img**, int **dx**, int **dy**)\n\u003e Moves **img** position **dx**,**dy** pixels\n\n##### qw_placeimage(qw_image **img**, int **x**, int **y**)\n\u003e Sets **img** position to **x**,**y**\n\n##### qw_imagewidth(qw_image **img**)\n\u003e Returns width of **img**\n\n##### qw_imageheight(qw_image **img**)\n\u003e Returns height of **img**\n\n##### qw_imagerotate(qw_image **\\*img**, double **deg**)\n\u003e Rotates **img** **deg** degrees clockwise\n\n##### qw_imagerotation(qw_image **\\*img**, double **deg)\n\u003e Sets **img** rotation to **deg** degrees\n\n##### qw_resetimage(qw_image **\\*img**)\n\u003e Resets **img** rotation and flip\n\n##### qw_flipimage(qw_image **\\*img**, int **x**, int **y**)\n\u003e Flips **img** horizontally if **x**, vertically if **y** is true\n\n##### qw_image_setflip(qw_image **\\*img**, int **x**, int **y**)\n\u003e Set **img** flip, resets all previous flips!\n\n##### qw_write(const char **\\*str**, int **x**, int **y**)\n\u003e Writes **str** at position **x**,**y** to screen\n\n##### qw_distance(int **x0**, int **y0**, int **x1**, int **y1**)\n\u003e Returns distance between **x0**,**y0** and **x1**,**y1**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumpad%2Fqw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumpad%2Fqw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumpad%2Fqw/lists"}