{"id":20950457,"url":"https://github.com/colleagueriley/rgfw-python","last_synced_at":"2025-06-13T01:33:10.154Z","repository":{"id":239349740,"uuid":"799291821","full_name":"ColleagueRiley/RGFW-Python","owner":"ColleagueRiley","description":"Python bindings for RGFW.h, the lightweight single-header GLFW alternative.","archived":false,"fork":false,"pushed_at":"2024-12-17T02:54:13.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T04:57:20.283Z","etag":null,"topics":["c","glfw","library","opengl","python","rgfw"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ColleagueRiley.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":"2024-05-11T17:31:13.000Z","updated_at":"2024-12-17T02:54:17.000Z","dependencies_parsed_at":"2024-06-28T03:31:51.225Z","dependency_job_id":"145b35fb-1e68-4cf9-9e16-1106529dd8c6","html_url":"https://github.com/ColleagueRiley/RGFW-Python","commit_stats":null,"previous_names":["colleagueriley/rgfw-python"],"tags_count":2,"template":true,"template_full_name":null,"purl":"pkg:github/ColleagueRiley/RGFW-Python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColleagueRiley%2FRGFW-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColleagueRiley%2FRGFW-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColleagueRiley%2FRGFW-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColleagueRiley%2FRGFW-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColleagueRiley","download_url":"https://codeload.github.com/ColleagueRiley/RGFW-Python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColleagueRiley%2FRGFW-Python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259561896,"owners_count":22876905,"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":["c","glfw","library","opengl","python","rgfw"],"created_at":"2024-11-19T00:48:43.691Z","updated_at":"2025-06-13T01:33:10.119Z","avatar_url":"https://github.com/ColleagueRiley.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RGFW-Python\n![THE RGFW Logo](https://github.com/ColleagueRiley/RGFW/blob/main/logo.png?raw=true)\n\n## Build statuses\n![workflow](https://github.com/ColleagueRiley/RGFW-Python/actions/workflows/linux.yml/badge.svg)\n![workflow windows](https://github.com/ColleagueRiley/RGFW-Python/actions/workflows/windows.yml/badge.svg)\n![workflow windows](https://github.com/ColleagueRiley/RGFW-Python/actions/workflows/macos.yml/badge.svg)\n\n# About\nPython bindings for RGFW, \n\nRGFW is a free multi-platform single-header very simple-to-use framework library for creating GUI Libraries or simple GUI programs. it is meant to be used as a very small and flexible alternative library to GLFW. \n\nThe window backend supports XLib (UNIX), Cocoas (MacOS) and WinAPI (Windows)\\\nThe graphics backend supports OpenGL (EGL, software, OSMesa, GLES), Vulkan, DirectX and software rendering buffers.\n\nRGFW was designed as a backend for RSGL, but it can be used standalone or for other libraries, such as Raylib which uses it as an optional alternative backend.\n\nThis library\n\n1) is single header and portable (written in C89 in mind)\n2) is very small compared to other libraries\n3) only depends on system API libraries, Winapi, X11, Cocoa\n4) lets you create a window with a graphics context (OpenGL, Vulkan or DirectX) and manage the window and its events only with a few function calls \n\nThis library does not\n\n1) Handle any rendering for you (other than creating your graphics context)\n2) do anything above the bare minimum in terms of functionality \n\n## building\nTo build the python binding simple run\n`make build`\nyou can also run `make` to build and then run an example program or `make debug` to build from scratch then run an example program.\n\n# examples\n![examples](https://github.com/ColleagueRiley/RGFW/blob/main/screenshot.PNG?raw=true)\n\n## basic \nA basic example can be found in `basic.py`, it includes a basic OpenGL example of just about all of RGFW's functionalities.\n\n## a very simple example\n```c\nimport RGFW\nfrom OpenGL.GL import *\n\nicon = [0xFF, 0x00, 0x00, 0xFF,    0xFF, 0x00, 0x00, 0xFF,     0xFF, 0x00, 0x00, 0xFF,   0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0xFF,     0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF]\n\ndef main():\n    win = RGFW.createWindow(\"name\", RGFW.rect(500, 500, 500, 500), RGFW.CENTER)\n\n    win.setIcon(icon, RGFW.area(3, 3), 4)\n\n    running = 1\n\n    while (running):\n        while (win.checkEvent()):\n            if (win.event.type == RGFW.quit or RGFW.isPressedI(win, RGFW.Escape)):\n                running = 0\n                break\n\n        win.swapBuffers()\n\n        glClearColor(0xFF, 0XFF, 0xFF, 0xFF)\n        glClear(GL_COLOR_BUFFER_BIT)\n\n    win.close()\n\nmain()\n```\n\n# Contacts\n- email : ColleagueRiley@gmail.com \n- discord : ColleagueRiley\n- discord server : https://discord.gg/pXVNgVVbvh\n\n# Documentation\nMore information about RGFW can be found on the [RGFW repo](https://RSGL.github.io/RGFW)\n\nThere is a lot of in-header-documentation, but more documentation can be found [here](https://RSGL.github.io/RGFW)\n\nIf you wish to build the documentation yourself, there is also a Doxygen file attached.\n\n\n# RGFW vs GLFW\nRGFW is more portable, in part because single-header library. It does not use callbacks and focuses on trying to be straightforward. RGFW tries to work with the programmer rather than forcing the programmer to work around it. It also uses far less RAM and storage than GLFW.\n\n| Feature | RGFW | GLFW |\n| --- | --- | --- |\n| .o size  (avg) | 46kb  | 280kb |\n| .so size (avg) | 94kb | 433kb |\n| .h size | 152kb  | 256kb |\n| basic demo lines | ~130  | ~160 |\n| memory ussage (linux) | 47 Mib | 55.9 Mib |\n| --- | --- | --- |\n| fps counter | ✓  | X |\n| multi-threading | ✓  | X |\n| drag and drop (input) | ✓  | ✓ |\n| drag and drop (output) | X | X |\n| joystick input | ~ (no macos support) | ✓ |\n| live window struct | ✓  | X |\n| event pipeline (dynamic) | ✓  | X |\n| multi-buffering | ✓  | ✓ |\n| set icon based on bitmap | ✓  | ✓ |\n| clipboard I/O | ✓  | ✓ |\n| multi-window support | ✓  | ✓ |\n| hide/show mouse | ✓  | ✓ |\n| no resize window | ✓  | ✓ |\n| no border window | ✓  | X |\n| transparent window | ✓  | ✓ |\n| key strings | ✓  | ✓ |\n| custom cursors | ✓  | ✓ |\n| wayland | ~ (backwards comp.)  | ✓ |\n| OpenGL | ✓  | ✓ |\n| Vulkan | ✓  | ✓ |\n| OpenGL ES | ✓  | ✓ |\n| EGL | ✓  | ✓ |\n| OSMesa | ✓  | ✓ |\n| Direct X | ✓  | X |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolleagueriley%2Frgfw-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolleagueriley%2Frgfw-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolleagueriley%2Frgfw-python/lists"}