Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <time.h>
- #include <cairo.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <windows.h>
- #include <gtk/gtk.h>
- #include <gdk/gdk.h>
- #include <gtk/gtklabel.h>
- #include <gtk/gtkscale.h>
- #include <gtk/gtkhscale.h>
- #include <gtk/gtkvscale.h>
- #include <gdk/gdkkeysyms.h>
- #include <gdk-pixbuf/gdk-pixbuf.h>
- int width, height;
- GtkWindow *window;
- GtkWidget *scale, *frame, *label;
- GtkButton *button;
- int main(int argc, char *argv[])
- {
- gtk_init(&argc, &argv);
- width = gdk_screen_width();
- height = gdk_screen_height();
- window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, FALSE);
- gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_NONE);
- gtk_widget_set_size_request(GTK_WIDGET(window), width, height);
- gtk_window_set_title(GTK_WINDOW(window), "Nanana");
- frame = gtk_fixed_new();
- label = gtk_label_new("Zoom");
- button = gtk_button_new();
- gtk_widget_set_size_request(GTK_WIDGET(button), 30, 30);
- gtk_button_set_image (GTK_BUTTON(button),gtk_image_new_from_stock(GTK_STOCK_ZOOM_100, GTK_ICON_SIZE_BUTTON));
- gtk_fixed_put(GTK_FIXED(frame), GTK_WIDGET(label), 500, 370);
- gtk_fixed_put(GTK_FIXED(frame), GTK_WIDGET(button), 500, 330);
- gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(frame));
- g_signal_connect(G_OBJECT(window), "delete-event",G_CALLBACK(gtk_main_quit), NULL);
- gtk_widget_show_all(GTK_WIDGET(window));
- gtk_widget_hide(label);
- gtk_main();
- return 0x0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement