<< lib/operating-system/os-creator/SLDesktopLoaderEmitter.sleela SLeeLa Standard Library Definition. Definition: Defines SLDesktopLoaderEmitter — the OS Creator(TM) emitter for the desktop GUI loader piece. Given an SLOSModel with a desktop it produces the C and C++ source for the stage that starts the display server / compositor (Wayland / DWM / WindowServer), the login/greeter, and the session shell (GNOME Shell / Explorer / Aqua). It emits a session.conf recording the display server, greeter, session shell, and widget toolkit. This is piece #7 of the chain (the topmost, optional layer). On a server / headless edition OS Creator(TM) does not request this piece at all; this emitter is only invoked when SLDesktopSpec.hasDesktop() is true. Family: operating-system. OS Creator(TM) piece emitter; consumes SLOSModel, fills SLOSPiece. >> #sleela 2.5 material; class SLDesktopLoaderEmitter { < ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- > << Eleven catalogued attributes with getter/setter pairs, so a GUI, loader, or catalog can read and (where appropriate) override this record. Values are faithful to the subject's real origin where publicly known. >> String metaVersion = "1.0.0"; int metaId = 10885; String metaAuthor = "Kiro Agent"; String metaDate = "2026-10-16"; String metaCopyright = "SLeeLa project"; String metaTrademark = "none"; String metaCorporation = "none"; < metaOrigin: National | | International | Galactic > String metaOrigin = "International"; String metaBirthDate = "2026-10-10"; < metaScienceRating: maturity/robustness on a 1..10 scale > int metaScienceRating = 9; < metaNationalSchedule: a real, citable instrument or "none" > String metaNationalSchedule = "none"; String getMetaVersion() { return metaVersion; } void setMetaVersion(String v) { metaVersion = v; } int getMetaId() { return metaId; } void setMetaId(int v) { metaId = v; } String getAuthor() { return metaAuthor; } void setAuthor(String v) { metaAuthor = v; } String getDate() { return metaDate; } void setDate(String v) { metaDate = v; } String getCopyright() { return metaCopyright; } void setCopyright(String v) { metaCopyright = v; } String getTrademark() { return metaTrademark; } void setTrademark(String v) { metaTrademark = v; } String getCorporation() { return metaCorporation; } void setCorporation(String v) { metaCorporation = v; } String getOrigin() { return metaOrigin; } void setOrigin(String v) { metaOrigin = v; } String getBirthDate() { return metaBirthDate; } void setBirthDate(String v) { metaBirthDate = v; } int getScienceRating() { return metaScienceRating; } void setScienceRating(int v) { metaScienceRating = v; } String getNationalSchedule() { return metaNationalSchedule; } void setNationalSchedule(String v) { metaNationalSchedule = v; } SLOSPiece emit(SLOSModel m) { SLOSPiece p = new SLOSPiece(); p.configure("Desktop GUI Loader", "desktop/gui-loader", "gui_loader"); String server = m.desktopSpec().server(); String shell = m.desktopSpec().shell(); String kit = m.desktopSpec().widgetToolkit(); String greeter = m.desktopSpec().greeter(); String c = "/* gui_loader.c - desktop session bring-up, OS Creator(TM) for " + m.name() + " */\n"; c = c + "#include \n\n"; c = c + "extern int start_display_server(const char *server);\n"; c = c + "extern int start_greeter(const char *greeter);\n"; c = c + "extern int start_session_shell(const char *shell);\n\n"; c = c + "int gui_loader_main(void) {\n"; c = c + " if (start_display_server(\"" + server + "\") != 0) return 1;\n"; c = c + " if (start_greeter(\"" + greeter + "\") != 0) return 2;\n"; c = c + " /* After successful login the greeter launches the session shell. */\n"; c = c + " return start_session_shell(\"" + shell + "\");\n"; c = c + "}\n"; p.setC(c); String cpp = "// gui_loader.cpp - desktop session bring-up (C++ surface) for " + m.name() + "\n"; cpp = cpp + "#include \nnamespace oscreator {\n"; cpp = cpp + "class DesktopGuiLoader {\npublic:\n"; cpp = cpp + " std::string displayServer = \"" + server + "\";\n"; cpp = cpp + " std::string greeter = \"" + greeter + "\";\n"; cpp = cpp + " std::string sessionShell = \"" + shell + "\";\n"; cpp = cpp + " std::string toolkit = \"" + kit + "\";\n"; cpp = cpp + " int start() {\n"; cpp = cpp + " if (!startDisplayServer(displayServer)) return 1;\n"; cpp = cpp + " if (!startGreeter(greeter)) return 2;\n"; cpp = cpp + " return startSessionShell(sessionShell);\n }\n"; cpp = cpp + "private:\n bool startDisplayServer(const std::string&);\n bool startGreeter(const std::string&);\n"; cpp = cpp + " int startSessionShell(const std::string&);\n"; cpp = cpp + "};\n} // namespace oscreator\n"; p.setCpp(cpp); String conf = "# session.conf - generated by OS Creator(TM)\n"; conf = conf + "display_server = " + server + "\n"; conf = conf + "greeter = " + greeter + "\n"; conf = conf + "session_shell = " + shell + "\n"; conf = conf + "toolkit = " + kit + "\n"; p.setConfig("session.conf", conf); p.setReadme("# Desktop GUI Loader piece\n\nStarts the `" + server + "` display server, the `" + greeter + "` greeter, and the `" + shell + "` session shell (`gui_loader.c`/" + "`gui_loader.cpp`). Omitted entirely on a server/headless edition.\n"); return p; } }