All pastes #345114 Raw Edit

Unnamed

public c v1 · immutable
·published 2007-02-08 08:15 UTC
rendered paste body
#include <claro/base.h>#include <claro/graphics.h>static const unsigned char cquit_png_bytes[] = {  137, 80, 78, 71, 13, 10, 26, 10,  0,  0,  0, 13, 73, 72, 68, 82,  0,  0,    0, 16,  0,  0,  0, 16,  8,  6,  0,  0,  0, 31,243,255, 97,  0,  0,  0,    6, 98, 75, 71, 68,  0,255,  0,255,  0,255,160,189,167,147,  0,  0,  0,    9,112, 72, 89,115,  0,  0, 13,215,  0,  0, 13,215,  1, 66, 40,155,120,    0,  0,  0,  7,116, 73, 77, 69,  7,213, 12,  6, 20, 59, 43,229,157,136,   53,  0,  0,  2, 23, 73, 68, 65, 84, 56,203,165,147,205,107, 19, 81, 20,  197,127,243,102,198,102,102,162,201,162, 73,104,106,168,139, 80,108,209,  174, 66, 64,169,171,160,187,110,220, 40, 82, 23,254,  9,109,169,244, 79,   24,172,171, 84,186,176, 72, 93, 40,226,110, 44, 21, 74, 77,180,221,  5,  113,225,202,207,130, 16, 19,210, 69,180, 36, 53, 73,231, 35,196, 69,219,   52, 33, 65, 65, 31, 60,120,151,247,238,185,231,220,123,158,  4, 48,145,   72,182,248,199,165, 28, 31,238,220,190, 65, 62,255, 29,215,113, 41, 20,   11, 52,221, 38,191,106, 53,170,213, 42,174,227, 80,175, 55, 40,150, 74,   52,106,181,118,242, 68, 34,121,  2,112, 53,117,141, 77,235,  5,181, 86,  139,211,254, 51,216,182,141,109,219, 84, 42, 21, 92,215,229,224,160,193,  143,189,189, 46,128, 46,  6,239, 47, 92, 36, 12,148, 22, 23,  1, 16, 66,   32, 73, 18,178, 44,227, 56, 14,170, 26, 66,200,185, 30,  9,162, 51, 72,  153, 38, 67,243,243,232,186,142,166,105,232,186,142,207,231, 67,211, 52,   64,234,219,  3,241,  4, 90,119,223,189,237,  2,137,204,205, 97, 24,  6,  129, 64,128,201, 43,151,185, 53,125,147,122,189,142, 44,203,253, 25,164,   76,147,148,105,  2, 80,203,229, 72,153, 38,161,153, 25,132, 16,124,252,  240, 25,219, 57,248,251, 20, 42,235,235, 72,  3,  3,224,121, 84,214,214,   72,153, 38,217,217, 89,162, 91, 25, 30, 61,124, 76, 48, 24,232, 47,225,  184,170, 50, 56,200,126, 54,203,254,246, 54, 74, 56, 76,118, 97,129,159,  233, 52,207,158, 62, 39, 22,139,209,250, 19,131,156,101,  1, 48, 38,203,    4,166,166,200, 89, 22,213,229,101,240, 60, 70,206,141,224,216, 14,180,   14, 33, 70,207,143,226,121,222,  9,131,105,144,238, 37,146,  0,237,228,  198,202, 10, 66,136,158,106,205,102, 19, 36, 80, 84,  5, 69, 85,122,199,  152,179, 44,220,213,213,182, 15,132, 16,168,138, 74, 60, 30,231,148,166,   33,203, 50,134,110,180,119, 87, 19,  1,234, 75, 75,168,128, 97, 24,120,  158, 71, 36, 18,225,211,215, 47,220, 79, 63, 96, 60,184,203,100,180,  4,  148,218,239,119,232,176,242,208,235, 44,197, 66,145, 80, 40,132,174,107,  108,188,202,240,114, 99,147,241,224, 46,151,252,121,240,192, 31,234,150,  180, 83,238, 96,224,243,249, 24, 30,142,146,121,179,117,152,232,255,198,  245,179,229,163, 91,137,128,214,199,137,229, 35,127,254,207,119,254, 13,   42, 88,190,190, 36,197,201,137,  0,  0,  0,  0, 73, 69, 78, 68,174, 66,   96,130,};object_t *w;void window_closed( object_t *btn, event_t *event ){	exit( 0 );}int main( int argc, char *argv[] ){	claro_base_init( );	claro_graphics_init( );		bounds_t * b = new_bounds( 100, 100, 200, 200 );	w = window_widget_create( 0, b, 0 );	image_t * img = image_load_inline_png(w,cquit_png_bytes,sizeof(cquit_png_bytes));		image_widget_create_with_image( w, new_bounds(0,0,200,200), 0, img );		object_addhandler( w, "destroy", window_closed );	window_set_title( w, "Claro test" );		window_show( w );	window_focus( w );		claro_loop( );		return 0;}