Hi, dhiraj.magare,
Where's the DirectFB you used?
It just contains GTK. I mean make GTK and DirectFB together.
Thank you.
Best regards,
chiachen
[EMAIL PROTECTED]
2008-06-16
======= 2008-06-17 16:33, your message: Looking for DirectFB and GTK demos
simplest=======
Hello,
Use command for compilation:
$gcc -I /(path of 'gtk.h' file) 'pkg-config --cflags -libs gtk+-2.0' hello.c -o
hello
$./hello
Use following program hello.c :
#include
static void hello(GtkWidget *widget, gpointer data)
{
g_print("Hello World\n");
}
static gboolean delete_event(GtkWidget *widget, GdkEvent *event,
gpointer data)
{
g_print("delete event occurred\n");
return TRUE; /* return FALSE, instead, to destroy the main window */
}
static void destroy(GtkWidget *widget, gpointer data )
{
gtk_main_quit();
}
int main(int argc, char *argv[])
{
GtkWidget *window, *button;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(delete_event), NULL);
g_signal_connect(G_OBJECT(window), "destroy",
G_CALLBACK(destroy), NULL);
gtk_container_set_border_width(GTK_CONTAINER(window), 10);
button = gtk_button_new_with_label("Hello World");
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(hello), NULL);
g_signal_connect_swapped(G_OBJECT(button), "clicked",
G_CALLBACK(gtk_widget_destroy), G_OBJECT(window));
gtk_container_add(GTK_CONTAINER(window), button);
gtk_widget_show(button);
gtk_widget_show(window);
gtk_main();
return 0;
}
------------ Please reply if I am wrong...
--dhriaj
chiachen wrote:
>
> Hi, DOK,
>
> I'm looking for some examples which make DirectFB and GTK together. But I
> just found some complex ones, such as Mozilla over DFB, Unreal Tournament
> 2004。
>
> Is there anyone just show how make DirectFB and GTK together , and not be
> so complex like a big big project.
>
> Thank you for your advise.
>
> Sincerely yours,
> chiachen
> [EMAIL PROTECTED]
> 2008-06-16
> _______________________________________________
> directfb-users mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
>
>
Quoted from:
http://www.nabble.com/Looking-for-DirectFB-and-GTK-demos-simplest-tp17878967p17878967.html
.
= = = = = = = = = = = = = = = = = = = = _______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users