[anjuta-devel] GDL hello world program.



The following does not produce the `Hello world' message; could someone
correct it please?

Thank you,
Dale

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#include <gdl/gdl.h>
#include <gtk/gtk.h>


 
int main (int argc, char *argv[])
{
  gtk_init (&argc, &argv);
 
  GtkWidget *const window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 
  gtk_window_set_title (GTK_WINDOW (window), "Hello, world!");
 
  g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), 0);
 
  GtkWidget *const box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);

  GtkWidget *const dock = gdl_dock_new ();

  gtk_box_pack_start (GTK_BOX (box), dock, 1, 1, 4);

  GdlDockLayout *const layout = gdl_dock_layout_new (GDL_DOCK (dock));

  GtkWidget *const dock_bar = gdl_dock_bar_new (GDL_DOCK (dock));
    
  gtk_box_pack_end (GTK_BOX (box), dock_bar, 0, 0, 4);

  GtkWidget *const item
            = gdl_dock_item_new ("Layers", "Layers",
GDL_DOCK_ITEM_BEH_NORMAL);

  GtkWidget *const label = gtk_button_new_with_label ("Hello, world!");
 
  gtk_container_add (GTK_CONTAINER (item), label);

  gdl_dock_add_item (GDL_DOCK (dock),
                     GDL_DOCK_ITEM (item),
                     GDL_DOCK_TOP);
    
  gtk_widget_show_all (window);
 
  gtk_main ();
 
  return 0;
}

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]