00001
00037 #include <config.h>
00038 #include <gtk/gtk.h>
00039 #include <stdio.h>
00040 #include <math.h>
00041
00042 #include "global.h"
00043 #include "data.h"
00044 #include "hid.h"
00045 #include "misc.h"
00046 #include "create.h"
00047 #include "rtree.h"
00048 #include "undo.h"
00049 #include "set.h"
00050
00054 static void
00055 on_destroy (GtkWidget * widget, gpointer data)
00056 {
00057 gtk_main_quit ();
00058 }
00059
00065 static int
00066 ghellopcb (int argc, char **argv)
00067 {
00068 GtkWidget *window;
00069 GtkWidget *label;
00070 gtk_init (&argc, &argv);
00071
00072 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
00073
00074 gtk_container_set_border_width (GTK_CONTAINER (window), 20);
00075
00076 gtk_window_set_title (GTK_WINDOW (window), PACKAGE " " VERSION);
00077
00078 gtk_window_set_default_size (GTK_WINDOW (window), 200, 50);
00079
00080
00081
00082
00083 g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (on_destroy), NULL);
00084
00085 label = gtk_label_new ("Hello, PCB World");
00086
00087 gtk_container_add (GTK_CONTAINER (window), label);
00088
00089 gtk_widget_show_all (window);
00090
00091 gtk_main ();
00092 return 0;
00093 }
00094
00095
00096 static HID_Action ghellopcb_action_list[] =
00097 {
00098 {"gHelloPCB", NULL, ghellopcb, "show a GTK dialog with a Hello world message on the screen", NULL}
00099 };
00100
00101
00102 REGISTER_ACTIONS (ghellopcb_action_list)
00103
00104
00105 void
00106 pcb_plugin_init()
00107 {
00108 register_ghellopcb_action_list();
00109 }
00110
00111