When your Minimacy VM is running on a computer with a display, you can use the UI functions to create interactive applications. # bitmap UI The UI is a window with a bitmap buffer. The usual way: { [[uiStart]] create a window, with geometry and style and title [[uiBuffer]] returns the bitmap buffer, then you draw what you want into this buffer [[uiUpdate]] call this function to draw the bitmap buffer into the screen } fun main()= uiStart(100, 10, 600, 400, UI_NORMAL, "simple UI"); bitmapErase(uiBuffer(), 0x400000); uiUpdate();; # Interactivity Add interactivity: change the color on a click. fun main()= uiStart(100, 10, 600, 400, UI_NORMAL, "simple UI"); bitmapErase(uiBuffer(), 0x400000); uiUpdate(); uiOnClick(lambda (x, y, buttons)= bitmapErase(uiBuffer(), 0x008000); uiUpdate() );; See the [documentation](page://ref..UI) about other interactions capabilities (key press, resize, ...) # openGL UI Minimacy VM supports OpenGL, reduced to OpenGL ES 2.0 features in order to be compatible with mobile phones. It is quite difficult to master because you need to program small routines in pseudo-C language, named “shaders”. This is an example without shader, which simply varies the background color: - uiStart is called with UI_GL type - “renderLoop” calls standard openGL functions: glClearColor, glClear and glSwapBuffers - “onTimeout” evaluates a lambda function after a delay expressed in milliseconds fun renderLoop(val)= glClearColor(sqr(cos(val)), 0.7, 0., 1.); glClear(GL_COLOR_BUFFER_BIT); glSwapBuffers(); onTimeout(100, lambda()= renderLoop val+. 0.1 );; fun main()= uiStart(100, 10, 600, 400, UI_GL, "gl UI"); renderLoop(0.);; See the [documentation](page://ref..OpenGL ES) about openGL integration.