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/gtkscale.h>
- #include <gtk/gtkvscale.h>
- #include <gtk/gtkvscale.h>
- #include <gdk/gdkkeysyms.h>
- #include <gdk-pixbuf/gdk-pixbuf.h>
- int width, height;
- GtkWindow *window;
- GtkWidget *scale, *frame;
- 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();
- scale = gtk_vscale_new_with_range(0, 100, 1);
- gtk_widget_set_size_request(scale, 100, 100);
- gtk_scale_set_draw_value (GTK_SCALE(scale), TRUE);
- gtk_scale_set_value_pos (GTK_SCALE(scale), GTK_POS_RIGHT);
- gtk_fixed_put(GTK_FIXED(frame), GTK_WIDGET(scale), 500, 300);
- 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_main();
- return 0x0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement