Tutorial by Examples

Python Windows The easiest way to install GTK3 for Python is by using PyGObject for Windows. It offers an installer that installs most things you need to develop GTK appilcations. The number of options the PyGObject installer offers can be daunting, but for most GTK projects the only option you h...
#include <gtkmm/application.h> #include <gtkmm/applicationwindow.h> #include <gtkmm/button.h> // main window of the application class HelloWorldWindow : public Gtk::ApplicationWindow { // a simple push button Gtk::Button btn; public: HelloWorldWindow() : ...
#include <gtk/gtk.h> // callback function which is called when button is clicked static void on_button_clicked(GtkButton *btn, gpointer data) { // change button label when it's clicked gtk_button_set_label(btn, "Hello World"); } // callback function which is called ...
#include <gtk/gtk.h> static void destroy(GtkWidget *widget, gpointer data) { gtk_main_quit(); } int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "Window"); g_...

Page 1 of 1