MGtk Reference Manual | ||||
---|---|---|---|---|
| Description |
Example 1Example 1 — From Gtk to MGtk |
Example 4. Example Gtk 2.20.1
#include <gtk/gtk.h> int main( int argc, char *argv[] ) { GtkWidget *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show (window); gtk_main (); return 0; }
Example 5. Example MGtk 0.0.1
#include <gtk/gtk.h> #include <mgtk.h> int mgtk_main ( argc, argv ) { mgtk_main_init ( argc, argv ); MId window; window = mgtk_window_insert ( GTK_WINDOW_TOPLEVEL, "Hello Buttons!" ); gtk_widget_show ( MGTK_WINDOW_(window) ); gtk_main (); return MCORRECT; }