All pastes #641073 Raw Edit

Someone

public c v1 · immutable
#641073 ·published 2007-07-31 22:19 UTC
rendered paste body
#include "rkg.h"rkg_class_window (win_class)	rkg_class_onInit (win_onInit)	rkg_class_onQuit (win_onQuit)rkg_class_endrkg_result_t win_onInit (rkg_hWindow_t window, void* userData){	rkg_hText_t text;		text = rkg_createText (rkg_defaultTextClass, NULL);	rkg_setText (text, "Hello, World!");	rkg_addControl (window, text);	return RKG_NO_ERROR;}rkg_result_t win_onQuit (rkg_hWindow_t window, void* userData){	/* text is disposed of automagically by RKG */	rkg_hModal_t mb;	mb = rkg_createModal (rkg_modalOkayClass, NULL);	rkg_setTitle (mb, "Thank you!");	rkg_setText (mb, "Thank you for running my Hello World program");	rkg_runModal (mb); 	/* mb is disposed of automagically too */}int main (int argc, char** argv){	rkg_hWindow_t window;	/* Establish connection with a fitting RKG display */	rkg_init(argc, argv);	/* Create new instance of win_class */	/* The second argument is a user-defined arg (void*) */	window = rkg_createWindow (win_class, NULL);	rkg_showWindow (window);	return rkg_run();}