def fl_set_bitmap_data(ptr_flobject, width, height, xbmcontentslist): """fl_set_bitmap_data(ptr_flobject, width, height, xbmcontentslist) Defines the actual bitmap being displayed from specified contents. A number of bitmaps can be found in '/usr/include/X11/bitmaps' or similar places. The X program 'bitmap' can be used to create bitmaps. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT bitmap flobject width : int width of bitmap in cood units height : int height of bitmap in coord units xbmcontentslist : list of ubytes bitmap data used for contents Examples -------- >>> bitmapcontents = [0x01, 0x1a, 0x27, 0x34, 0x41, 0x4e, 0x5b, >>> 0x68, 0x75, 0x82, 0x8f, 0x9c, 0xa9, 0xb6, 0xc3, 0xd0] >>> fl_set_bitmap_data(pxbmobj, 4, 4, bitmapcontents) Notes ----- Status: UnitTest + Doc + Demo = OK """ _fl_set_bitmap_data = library.cfuncproto( library.load_so_libforms(), "fl_set_bitmap_data", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int, cty.c_int, cty.POINTER(cty.c_ubyte)], """void fl_set_bitmap_data(FL_OBJECT * ob, int w, int h, unsigned char * data)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_width = library.convert_to_intc(width) i_height = library.convert_to_intc(height) ptr_xbmcontentslist = library.convert_to_ubytec_array(xbmcontentslist) #pxbmcontents = cty.cast(xbmcontents, cty.POINTER(cty.c_ubyte)) library.keep_elem_refs(ptr_flobject, width, height, xbmcontentslist, \ i_width, i_height, ptr_xbmcontentslist) _fl_set_bitmap_data(ptr_flobject, i_width, i_height, \ ptr_xbmcontentslist)
def fl_set_bitmapbutton_data(ptr_flobject, width, height, xbmdatalist): """fl_set_bitmapbutton_data(ptr_flobject, width, height, xbmdatalist) Defines the bitmap to use for a bitmap button flobject, using some data. Parameters ---------- ptr_flobject : pointer to xfdata.FL_OBJECT button flobject width : int width in coord units height : int height in coord units xbmdatalist : list of ubytes bitmap data Examples -------- >>> *todo* Notes ----- Status: NA-UTest + Doc + NoDemo = Maybe """ _fl_set_bitmapbutton_data = library.cfuncproto( library.load_so_libforms(), "fl_set_bitmapbutton_data", None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int, cty.c_int, cty.POINTER(cty.c_ubyte)], """void fl_set_bitmapbutton_data(FL_OBJECT * ob, int w, int h, unsigned char * bits)""") library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flobject) i_width = library.convert_to_intc(width) i_height = library.convert_to_intc(height) #ptr_bits = cty.cast(bits, cty.POINTER(cty.c_ubyte)) ptr_xbmdatalist = library.convert_to_ubytec_array(xbmdatalist) library.keep_elem_refs(ptr_flobject, width, height, xbmdatalist, \ i_width, i_height, ptr_xbmdatalist) _fl_set_bitmapbutton_data(ptr_flobject, i_width, i_height, \ ptr_xbmdatalist)