{"id":18776290,"url":"https://github.com/jdolan/objectivelymvc","last_synced_at":"2026-05-10T03:56:13.823Z","repository":{"id":20081870,"uuid":"23350910","full_name":"jdolan/ObjectivelyMVC","owner":"jdolan","description":"Object oriented MVC framework for OpenGL, SDL3 and GNU C. Inspired by Apple's AppKit. Zlib license.","archived":false,"fork":false,"pushed_at":"2026-04-14T19:34:38.000Z","size":65319,"stargazers_count":33,"open_issues_count":1,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-04-14T21:30:44.304Z","etag":null,"topics":["game-development","gamedev","menu","opengl","sdl3","ui"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdolan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-08-26T12:33:14.000Z","updated_at":"2026-04-14T19:32:14.000Z","dependencies_parsed_at":"2024-11-07T19:47:23.610Z","dependency_job_id":"9fb5fd54-2521-4a43-add0-54140a1b5265","html_url":"https://github.com/jdolan/ObjectivelyMVC","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jdolan/ObjectivelyMVC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolan%2FObjectivelyMVC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolan%2FObjectivelyMVC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolan%2FObjectivelyMVC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolan%2FObjectivelyMVC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdolan","download_url":"https://codeload.github.com/jdolan/ObjectivelyMVC/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdolan%2FObjectivelyMVC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32012792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["game-development","gamedev","menu","opengl","sdl3","ui"],"created_at":"2024-11-07T19:45:49.612Z","updated_at":"2026-04-19T16:05:08.662Z","avatar_url":"https://github.com/jdolan.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/jdolan/ObjectivelyMVC/actions/workflows/build.yml/badge.svg)](https://github.com/jdolan/ObjectivelyMVC/actions/workflows/build.yml)\n[![Zlib License](https://img.shields.io/badge/license-Zlib-brightgreen.svg)](https://opensource.org/licenses/Zlib)\n![This software is PRE-ALPHA](https://img.shields.io/badge/development_stage-ALPHA-yellow.svg)\n\nObjectivelyMVC\n===\n\nObject oriented MVC framework for OpenGL, SDL3 and GNU C\n---\n\nObjectivelyMVC is a cross-platform user interface and interaction framework for [SDL3](http://www.libsdl.org) inspired by Apple's [AppKit](https://developer.apple.com/reference/appkit). It is geared towards building high-quality, modern looking user interfaces within [OpenGL](http://www.opengl.org/) video games that are already using SDL3. It is built on [Objectively](https://github.com/jdolan/Objectively), written in [GNU C](http://www.gnu.org/software/gnu-c-manual/), and requires `gcc` or `clang`.\n\n[![Hello, ObjectivelyMVC!](Documentation/hello-thumbnail.jpg)](https://www.youtube.com/watch?v=Rm_mOr3gP5k)\n \nFeatures\n---\n\n### Object oriented Model-View-Controller implementation in C\n\nObjectivelyMVC is built on [Objectively](https://github.com/jdolan/Objectively), an ultra-lightweight object oriented framework for [GNU C](http://www.gnu.org/software/gnu-c-manual/). ObjectivelyMVC delivers the elegance of OO / MVC without imposing C++ on your project. If you *are* using C++ or Objective-C, ObjectivelyMVC is perfectly happy alongside those, too.\n\n```c\nWindowController *windowController = $(alloc(WindowController), initWithWindow, window);\n```\n\n### Easily embeddable in any SDL3 / OpenGL application\n\nObjectivelyMVC is purpose-built for video games. Unlike Gtk+, Qt, wxWidgets, FLTK, ..ObjectivelyMVC **does not hijack the main loop**. ObjectivelyMVC does not create a window, manage an OpenGL context, or originate events. Your game already does that, because it has to. Like your mother, ObjectivelyMVC only asks that you give it a call once in a while. That's it.\n\n```c\n$(windowController, respondToEvent, \u0026event);\n...\n$(windowController, render);\n```\n\n### Beautiful 4K-ready fonts\n\nObjectivelyMVC uses [SDL_ttf](https://www.libsdl.org/projects/SDL_ttf/) to render TrueType fonts. It also automatically detects High-DPI (Retina, 4K) displays, and scales fonts accordingly. The result is crisp, beautiful vector-based fonts that look native, because they are.\n\n```c\nData *data = $$(Data, dataWithContentsOfFile, \"Verdana.ttf\");\n...\n$$(Font, cacheFont, data, \"Verdana\");\n...\nFont *verdana = $$(Font, cachedFont, \"Verdana\", 24, FontStyleRegular); // will render at 48pt on Retina displays\n```\n\n### Full suite of Views and Controls\n\nObjectivelyMVC provides a robust set of containers, views and controls. Stack and arrange components with `Box`, `Panel` and `StackView`. Add `Buttons`, `Checkboxes`, `Selects`, `Sliders`, editable `TextViews` and more by simply instantiating them. Display tabular data or a thumbnail gallery with `TableView` and `CollectionView`. Split complex interfaces into multiple tabs with `TabView` and `TabViewController`. Use the specialized _delegate_ callbacks to respond to events.\n\n```c\nSelect *select = $(alloc(Select), initWithFrame, NULL);\n...\nselect-\u003edelegate.didSelectOption = my_callback;\n```\n\n### Programmatic or JSON-based layout options\n\nObjectivelyMVC allows you to define your View hierarchy programmatically, via JSON, or using any combination of both. Programmatic layout gives you explicit control over the big picture, while JSON layout allows you to reduce boilerplate and avoid common pitfalls like memory leaks.\n\n```json\n{\n\t\"class\": \"Panel\",\n\t\"style\": {\n\t\t\"top\": 50,\n\t\t\"left\": 50\n\t},\n\t\"contentView\": {\n\t\t\"subviews\": [{\n\t\t\t\"class\": \"Input\",\n\t\t\t\"control\": {\n\t\t\t\t\"class\": \"Checkbox\",\n\t\t\t\t\"identifier\": \"checkbox\"\n\t\t\t},\n\t\t\t\"label\": {\n\t\t\t\t\"text\": \"This is a checkbox:\"\n\t\t\t}\n\t\t}]\n\t}\n}\n```\n\n### Fully themable via Cascading Stylesheets\n\nObjectivelyMVC uses a custom CSS3 dialect to manage all aspects of its presentation. Nothing about the look and feel of ObjectivelyMVC is hard-coded, and authoring and attaching new `Stylesheets` is trivial and straightforward.\n\n```css\n/* MyView.css */\n\nBox {\n\tborder-color: #1e4e62;\n}\n\nPanel {\n\tbackground-color: #08151aaa;\n}\n\n.columns {\n\tautoresizing-mask: contain | width;\n\taxis: horizontal;\n\tdistribution: fill;\n}\n\n.columns \u003e .column {\n\tautoresizing-mask: contain | height;\n\tdistribution: fill;\n\twidth: 384;\n}\n```\n\n### Simple, flexible resource loading\n\nObjectivelyMVC makes loading `Fonts`, `Images`, `Stylesheets`, and `Views` painless. For direct filesystem access, add directories to its search path with `$$(Resource, addResourcePath, \"/my/path\")`. To search your game's filesystem abstraction, implement a custom `ResourceProvider` function, and register it:\n\n```c\nstatic Data *resourceProvider(const char *name) {\n\tuint8_t *bytes;\n\n\tconst ssize_t length = read_file_from_gamefs(name, \u0026bytes);\n\n\treturn length != -1 ? $$(Data, dataWithBytes, bytes, length) : NULL;\n}\n\n// ...\n\n$$(Resource, addResourceProvider, resourceProvider);\n```\n\nExamples\n---\n\n### HelloViewController\nAn example application that creates a Window, enters its main loop and draws a scene before rendering a simple menu. This example uses JSON layout.\n\n[![Hello, ObjectivelyMVC!](Documentation/hello-thumbnail.jpg)](https://www.youtube.com/watch?v=Rm_mOr3gP5k)\n\n * [Hello.c](Examples/Hello.c) - The application source code\n * [HelloViewController.h](Examples/HelloViewController.h) - The `HelloViewController` header.\n * [HelloViewController.c](Examples/HelloViewController.c) - The `HelloViewController` source code.\n * [HelloViewController.json](Examples/HelloViewController.json) - The `HelloViewController` JSON layout. \n\n\n### Quetoo\n[Quetoo](https://github.com/jdolan/quetoo) is an open source FPS based on [idTech2](https://en.wikipedia.org/wiki/Quake_II_engine). Quetoo uses ObjectivelyMVC for its in-game user interface:\n\n![Quetoo](Documentation/quetoo1.jpg)\n![Quetoo](Documentation/quetoo2.jpg)\n![Quetoo](Documentation/quetoo3.jpg)\n\nInstallation\n---\n\nSee [INSTALL.md](INSTALL.md) for installation and linking instructions.\n\nAPI documentation\n---\n \nThe API documentation can be [browsed online](http://jaydolan.com/projects/ObjectivelyMVC) or generated with [Doxygen](http://www.doxygen.org) by running `make html`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdolan%2Fobjectivelymvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdolan%2Fobjectivelymvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdolan%2Fobjectivelymvc/lists"}