def fl_create_animated_cursor(curseries, timeout): """fl_create_animated_cursor(curseries, timeout) -> cursornum Creates an animated series of cursors, that change after timeout is expired (several cursors are displayed one after another). Internally animated cursor works by utilizing the timeout callback, this means that if the application blocks (thus the main loop has no chance of servicing the timeouts), the animation will stop. Parameters ---------- curseries : list of int sequence of cursor ids, either X standard cursors or cursor numbers returned by fl_create_bitmap_cursor(), terminated by -1. timeout : int time after which the cursor is changed, replacing by the next in sequence. An interval about 150 msec is a good value for typical uses. Returns ------- cursornum : int cursor id Examples -------- >>> *todo* Notes ----- Status: NA-UTest + Doc + Demo = OK """ _fl_create_animated_cursor = library.cfuncproto( library.load_so_libforms(), "fl_create_animated_cursor", cty.c_int, [cty.POINTER(cty.c_int), cty.c_int], """int fl_create_animated_cursor(int * cur_names, int timeout)""") library.check_if_flinitialized() ptr_curseries = library.convert_to_ptr_intc(curseries) #print("pcurnums", pcurnums) i_timeout = library.convert_to_intc(timeout) library.keep_elem_refs(curseries, timeout, ptr_curseries, i_timeout) retval = _fl_create_animated_cursor(ptr_curseries, i_timeout) return retval
def fl_set_glcanvas_attributes(ptr_flobject, glconfig): """fl_set_glcanvas_attributes(ptr_flobject, glconfig) Modifies the default configuration of a particular glcanvas flobject. You can change a glcanvas attribute on the fly even if the canvas is already visible and active. By default they are the following (from xfdata.py): GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER. Pairs is (variable-only) or (variable, value). Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT glcanvas flobject glconfig : list of int configuration settings to be set. Attributes are, as defined in OpenGL glXChooseVisual() function, GLX_USE_GL, GLX_BUFFER_SIZE, GLX_LEVEL, GLX_RGBA, GLX_DOUBLEBUFFER, GLX_STEREO, GLX_AUX_BUFFERS, GLX_RED_SIZE, GLX_GREEN_SIZE, GLX_BLUE_SIZE, GLX_ALPHA_SIZE, GLX_DEPTH_SIZE, GLX_STENCIL_SIZE, GLX_ACCUM_RED_SIZE, GLX_ACCUM_GREEN_SIZE, GLX_ACCUM_BLUE_SIZE, GLX_ACCUM_ALPHA_SIZE. See xfdata.py for values. Examples -------- >>> *todo* Notes ----- Status: NA-UTest + NoDoc + NoDemo = Maybe """ _fl_set_glcanvas_attributes = library.cfuncproto( library.load_so_libformsgl(), "fl_set_glcanvas_attributes", None, [cty.POINTER(xfdata.FL_OBJECT), cty.POINTER(cty.c_int)], """void fl_set_glcanvas_attributes(FL_OBJECT * ob, const int * config)""") library.check_if_flinitialized() # unsure library.verify_flobjectptr_type(ptr_flobject) #ptr_glconfig = cty.cast(glconfig, cty.POINTER(cty.c_int)) ptr_glconfig = library.convert_to_ptr_intc(glconfig) library.keep_elem_refs(ptr_flobject, glconfig, ptr_glconfig) _fl_set_glcanvas_attributes(ptr_flobject, ptr_glconfig)
def fl_set_glcanvas_defaults(glconfig): """fl_set_glcanvas_defaults(glconfig) Modifies the global default attributes for glcanvas, before the creation of glcanvases. By default they are the following (from xfdata.py): GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER. Pairs is (variable-only) or (variable, value). Parameters ---------- glconfig : list of int configuration settings, ending with -1. Attributes are, as defined in OpenGL glXChooseVisual() function, GLX_USE_GL, GLX_BUFFER_SIZE, GLX_LEVEL, GLX_RGBA, GLX_DOUBLEBUFFER, GLX_STEREO, GLX_AUX_BUFFERS, GLX_RED_SIZE, GLX_GREEN_SIZE, GLX_BLUE_SIZE, GLX_ALPHA_SIZE, GLX_DEPTH_SIZE, GLX_STENCIL_SIZE, GLX_ACCUM_RED_SIZE, GLX_ACCUM_GREEN_SIZE, GLX_ACCUM_BLUE_SIZE, GLX_ACCUM_ALPHA_SIZE. See xfdata.py for values. Examples -------- >>> fl_set_glcanvas_defaults([GLX_RGBA, GLX_DEPTH_SIZE, 2, GLX_RED_SIZE, 2, GLX_GREEN_SIZE, 2, GLX_BLUE_SIZE, 2]) Notes ----- Status: NA-UTest + NoDoc + NoDemo = Maybe """ _fl_set_glcanvas_defaults = library.cfuncproto( library.load_so_libformsgl(), "fl_set_glcanvas_defaults", None, [cty.POINTER(cty.c_int)], """void fl_set_glcanvas_defaults(const int * config)""") library.check_if_flinitialized() #ptr_glconfig = cty.cast(config, cty.POINTER(cty.c_int)) # to be verified ptr_glconfig = library.convert_to_ptr_intc(glconfig) library.keep_elem_refs(glconfig, ptr_glconfig) _fl_set_glcanvas_defaults(ptr_glconfig)