Created
December 27, 2015 13:52
-
-
Save jeandudey/02dc5146864cd0abc30f to your computer and use it in GitHub Desktop.
GTK borderless window
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <gtk/gtk.h> | |
void hello(GtkWidget* widget, gpointer data) | |
{ | |
printf("Hello World!\n"); | |
} | |
int main(int argc, char* argv[]) | |
{ | |
GtkWidget* window; | |
GtkWidget* button; | |
gtk_init(&argc, &argv); | |
window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
button = gtk_button_new_with_label("Hello World"); | |
gtk_container_add(GTK_CONTAINER(window), button); | |
gtk_window_set_decorated((GtkWindow*)window, 0); | |
g_signal_connect(G_OBJECT(button), "clicked", | |
G_CALLBACK(hello), NULL); | |
g_signal_connect(G_OBJECT(window), "delete-event", | |
G_CALLBACK(gtk_main_quit), NULL); | |
gtk_widget_show_all(window); | |
gtk_main(); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So I can understand this, is line 19 the key line?