GArray *points;
int i;
gboolean move;
+ GdkGC *gc;
+ PangoAttrList *list;
};
#define FILENAME "/home/cascardo/fotos/debconf.jpg"
gdk_pixbuf_unref (screen);
if (point.name)
{
+ PangoLayout *layout;
+ int pw, ph;
+ layout = gtk_widget_create_pango_layout (ctx->draw, point.name);
+ pango_layout_set_attributes (layout, ctx->list);
+ pango_layout_get_pixel_size (layout, &pw, &ph);
+ gdk_draw_layout (widget->window, ctx->gc, (WIDTH - pw) / 2,
+ HEIGHT - ph - 20, layout);
+ g_object_unref (layout);
if (ctx->move)
g_timeout_add (3000, queue, ctx);
}
int width, height;
GtkWidget *window;
struct ctx ctx;
+ GdkColor Yellow;
+ GdkColor Black;
+ PangoAttribute *attr;
gtk_init (&argc, &argv);
if (argc < 2)
filename = FILENAME;
gtk_widget_show_all (window);
g_signal_connect (G_OBJECT (ctx.draw), "expose_event",
G_CALLBACK (expose), &ctx);
+ Yellow.red = 0xFFFF;
+ Yellow.green = 0xFFFF;
+ Yellow.blue = 0;
+ Black.red = 0;
+ Black.green = 0;
+ Black.blue = 0;
+ ctx.gc = gdk_gc_new (ctx.draw->window);
+ gdk_gc_set_rgb_fg_color (ctx.gc, &Yellow);
+ gdk_gc_set_rgb_bg_color (ctx.gc, &Black);
+ ctx.list = pango_attr_list_new ();
+ attr = pango_attr_size_new (32 * PANGO_SCALE);
+ pango_attr_list_insert (ctx.list, attr);
+ attr = pango_attr_weight_new (PANGO_WEIGHT_SEMIBOLD);
+ pango_attr_list_insert (ctx.list, attr);
g_timeout_add (10, queue, &ctx);
gtk_main ();
gdk_pixbuf_unref (ctx.picture);