def fl_get_pixmap_pixmap(ptr_flobject):
    """fl_get_pixmap_pixmap(ptr_flobject) -> pixmapid1, pixmapid2, pmask

    Finds out the pixmap resource id currently being displayed.

    Parameters
    ----------
        ptr_flobject : pointer to xfdata.FL_OBJECT
            pixmap flobject

    Returns
    -------
        pixmapid1 : long_pos
            pixmap resource id
        pixmapid2 : long_pos
            pixmap resource id
        pmask : long_pos
            pixmap mask

    Examples
    --------
        >>> *todo*

    API_diversion
    ----------
        API changed from XForms, upstream is
        fl_get_pixmap_pixmap(ptr_flobject, p, m)

    Notes
    -----
        Status: NA-UTest + Doc + NoDemo = Maybe

    """
    _fl_get_pixmap_pixmap = library.cfuncproto(
        library.load_so_libforms(), "fl_get_pixmap_pixmap",
        xfdata.Pixmap, [cty.POINTER(xfdata.FL_OBJECT),
        cty.POINTER(xfdata.Pixmap), cty.POINTER(xfdata.Pixmap)],
        """Pixmap fl_get_pixmap_pixmap(FL_OBJECT * ob, Pixmap * p,
           Pixmap * m)""")
    library.check_if_flinitialized()
    library.verify_flobjectptr_type(ptr_flobject)
    ul_pixmapid2, ptr_pixmapid2 = library.make_ulongc_and_pointer()
    ul_pmask, ptr_pmask = library.make_ulongc_and_pointer()
    library.keep_elem_refs(ptr_flobject, ul_pixmapid2, ul_pmask, \
            ptr_pixmapid2, ptr_pmask)
    retval = _fl_get_pixmap_pixmap(ptr_flobject, ptr_pixmapid2, ptr_pmask)
    return retval, ul_pixmapid2.value, ul_pmask.value
def fl_create_from_pixmapdata(win, xpmdata, tran):
    """fl_create_from_pixmapdata(win, xpmdata, tran) -> pixmapid, width,
    height, smask, hotx, hoty

    Makes a pixmap from pixmap contents data.

    Parameters
    ----------
        win : long_pos
            window id
        xpmdata : str of ubytes
            pixmap contents data
        tran : long_pos
            XForms colormap index as color (currently not used)

    Returns
    -------
        pixmapid : long_pos
            created pixmap resource id
        width : int_pos
            width of pixmap in coord units
        height : int_pos
            height of pixmap in coord units
        smask : long_pos
            shape mask (of an existing pixmap) used as a clipping mask
            to achieve transparency, 0 for no transparency.
        hotx : int
            horizontal position of center of the pixmap (useful if the
            pixmap is to be used as a cursor)
        hoty : int
            vertical position of center of the pixmap (useful if the
            pixmap is to be used as a cursor)

    Examples
    --------
        >>> *todo*

     API_diversion
    -------------
        API changed from XForms, upstream is fl_create_from_pixmapdata(win,
        xpmdata, width, height, smask, hotx, hoty, tran)

    Notes
    -----
        Status: NA-UTest + Doc + NoDemo = Maybe

    """
    _fl_create_from_pixmapdata = library.cfuncproto(
        library.load_so_libforms(), "fl_create_from_pixmapdata",
        xfdata.Pixmap, [xfdata.Window, cty.POINTER(xfdata.STRING),
        cty.POINTER(cty.c_uint), cty.POINTER(cty.c_uint),
        cty.POINTER(xfdata.Pixmap), cty.POINTER(cty.c_int),
        cty.POINTER(cty.c_int), xfdata.FL_COLOR],
        """Pixmap fl_create_from_pixmapdata(Window win, char * * data,
        unsigned int * w, unsigned int * h, Pixmap * sm, int * hotx,
        int * hoty, FL_COLOR tran)""")
    library.check_if_flinitialized()
    ul_win = library.convert_to_Window(win)
    ptr_xpmdata = library.convert_to_ptr_stringc(xpmdata)
    ui_width, ptr_width = library.make_uintc_and_pointer()
    ui_height, ptr_height = library.make_uintc_and_pointer()
    ul_smask, ptr_smask = library.make_ulongc_and_pointer()
    i_hotx, ptr_hotx = library.make_intc_and_pointer()
    i_hoty, ptr_hoty = library.make_intc_and_pointer()
    #library.checknonfatal_allowed_value_in_list(tran, xfdata.COLOR_list)
    ul_tran = library.convert_to_FL_COLOR(tran)
    library.keep_elem_refs(win, xpmdata, ui_width, ptr_width, ui_height, \
            ptr_height, ul_smask, i_hotx, i_hoty, tran, ptr_xpmdata, ul_win, \
            ptr_smask, ptr_hotx, ptr_hoty, ul_tran)
    retval = _fl_create_from_pixmapdata(ul_win, ptr_xpmdata, ptr_width, \
            ptr_height, ptr_smask, ptr_hotx, ptr_hoty, ul_tran)
    return retval, ui_width.value, ui_height.value, ul_smask.value, \
            i_hotx.value, i_hoty.value
def fl_read_pixmapfile(win, fname, tran):
    """fl_read_pixmapfile(win, fname, tran) -> pixmapid, width, height,
    smask, hotx, hoty

    Makes a pixmap from a pixmap (.xpm format) file.

    Parameters
    ----------
        win : long_pos
            window id
        fname : str
            name of pixmap (.xpm format) file
        tran : long_pos
            XForms colormap index as color

    Returns
    -------
        pixmap : long_pos
            pixmap resource id
        width : int_pos
            width
        height : int_pos
            height
        smask : long_pos
            shapemask
        hotx : int
            hotspot horizontal position
        hoty : int
            hotspot vertical position

    Examples
    --------
        >>> pmap, w, h, shapmsk, hotx, hoty = fl_read_pixmapfile(win0,
                "xpmfile.xpm", xfdata.FL_WHITE)

    API_diversion
    ----------
        API changed from XForms, upstream is fl_read_pixmapfile(win,
        filename, width, height, shape_mask, hotx, hoty, tran)

    Notes
    -----
        Status: NA-UTest + Doc + Demo = OK

    """
    _fl_read_pixmapfile = library.cfuncproto(
        library.load_so_libforms(), "fl_read_pixmapfile",
        xfdata.Pixmap, [xfdata.Window, xfdata.STRING, cty.POINTER(cty.c_uint),
        cty.POINTER(cty.c_uint), cty.POINTER(xfdata.Pixmap),
        cty.POINTER(cty.c_int), cty.POINTER(cty.c_int), xfdata.FL_COLOR],
        """Pixmap fl_read_pixmapfile(Window win, const char * file,
           unsigned int * w, unsigned int * h, Pixmap * shape_mask,
           int * hotx, int * hoty, FL_COLOR tran)""")
    library.check_if_flinitialized()
    ul_win = library.convert_to_Window(win)
    s_fname = library.convert_to_bytestrc(fname)
    #library.checknonfatal_allowed_value_in_list(tran, xfdata.COLOR_list)
    ul_tran = library.convert_to_FL_COLOR(tran)
    ui_width, ptr_width = library.make_uintc_and_pointer()
    ui_height, ptr_height = library.make_uintc_and_pointer()
    ul_shapemask, ptr_shapemask = library.make_ulongc_and_pointer()
    i_hotx, ptr_hotx = library.make_intc_and_pointer()
    i_hoty, ptr_hoty = library.make_intc_and_pointer()
    library.keep_elem_refs(win, fname, ui_width, ui_height, ul_shapemask, \
            i_hotx, i_hoty, tran, ul_win, s_fname, ul_tran, ptr_width, \
            ptr_height, ptr_shapemask, ptr_hotx, ptr_hoty)
    retval = _fl_read_pixmapfile(ul_win, s_fname, ptr_width, ptr_height, \
            ptr_shapemask, ptr_hotx, ptr_hoty, ul_tran)
    return retval, ui_width.value, ui_height.value, ul_shapemask.value, \
            i_hotx.value, i_hoty.value