Wanna learn native GUI programming in UNIX - Linux ?

Hi ,
wanna learn native GUI programming in Unix-Linux instead of Gtk and Qt.
No problem. You don't need a cross platform Gui toolkit like Gtk and Qt.
And the code and syntax is also not more or less than others.
Check out this code for a simple mainwindow for your application that is openend in the middle of the screen.
Save code as mainwin.c file.
Go in the folder with terminal and compile with the command :

clang -o newone  mainwin.c  -lXm -lXt -lX11

When it is ready then write in the same folder terminal :

chmod 777 newone

Start the executable file from normal file browser with a double klick.
You see a main window GUI in the middle of your screen.
Thats it.
All works propertly. Since 30 Years. Only cross compile applications need a different toolkit.
Change the size of the window simple by other dimension data.
Of course you should have installed 'clang' compiler and 'motif' toolkit with your
synaptic package manager programm that is on your UNIX machine.

 #include <Xm/Form.h>
#include <Xm/Label.h>
#include <Xm/PushB.h>


int main ( int argc, char ** argv )
{
    Widget              shell, form, label, button;
    XtAppContext app;
    int  i;


    shell = XtAppInitialize ( &app, "Formtest", NULL, 0,
                          &argc, argv, NULL, NULL, 0 );

    Screen * s = XtScreen(shell);

    int dw = WidthOfScreen(s);
    int dh = HeightOfScreen( s );

    Dimension px = (dw-500)/2;
    Dimension py = (dh-300)/2;

    XtVaSetValues ( shell,
              XmNwidth, 500,
              XmNheight, 300,
              XmNx, px,
              XmNy, py,
              NULL );


    form = XtCreateManagedWidget ( "form", xmFormWidgetClass,
                                shell, NULL, 0 );

    label = XtVaCreateManagedWidget ( "label", xmLabelWidgetClass,
                                form, NULL, 0 );

    button = XtVaCreateManagedWidget ( "button", xmPushButtonWidgetClass,
                                form,
                                XmNbottomAttachment,       XmATTACH_FORM,
                                 0 );
    XtVaSetValues ( button,
              XmNwidth, 100,
              XmNheight, 50,
              NULL );


    XtRealizeWidget ( shell );
    XtAppMainLoop ( app );

}