Skip to content

Instantly share code, notes, and snippets.

@Rushilwiz
Created October 18, 2022 19:01
Show Gist options
  • Save Rushilwiz/f95c7f46a65828dfbd311502286c9f73 to your computer and use it in GitHub Desktop.
Save Rushilwiz/f95c7f46a65828dfbd311502286c9f73 to your computer and use it in GitHub Desktop.
x11 hello world
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw/Label.h>
int main(int argc, char* argv[])
{
XtAppContext app_context;
Widget toplevel, hello;
toplevel = XtVaAppInitialize(
&app_context,
"XHello",
NULL, 0,
&argc, argv,
NULL,
NULL);
hello = XtVaCreateManagedWidget("hello", labelWidgetClass, toplevel, NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(app_context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment