2013年9月3日 星期二

static gtk+-2.17.2 your single file make Part 1

Target is make a dndtest execute file

1.make directory in /gtk+-2.17.2/dndtest

///////////////////////////////////////////////////////////

2.gedit /gtk+-2.17.2/dndtest/dndtest.c

#include
#include
#include
#include
#include "config.h"
#include "gtk/gtk.h"


int main(int argc,char *argv[])
{
GtkWidget *dialog;
GtkColorSelection *colorsel;
gint response;
GtkWidget *main_window;

gtk_init(&argc,&argv);

main_window=gtk_window_new(GTK_WINDOW_TOPLEVEL);

dialog = gtk_color_selection_dialog_new ("Changing color");

gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (main_window));

colorsel = GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (dialog)->colorsel);

gtk_color_selection_set_has_palette (colorsel, TRUE);

response = gtk_dialog_run (GTK_DIALOG (dialog));

gtk_widget_destroy (dialog);
}

沒有留言:

張貼留言