def fl_set_canvas_visual(ptr_flobject, ptr_visual):
    """fl_set_canvas_visual(ptr_flobject, ptr_visual)

    Defines visual property of canvas flobject. Changing visual does not
    generally make sense once the canvas window is created (which happens
    when the parent form is shown). Also, typically if you change the canvas
    visual, you probably should also change the canvas depth to match the
    visual.

    Parameters
    ----------
        ptr_flobject : pointer to xfdata.FL_OBJECT
            canvas flobject
        ptr_visual : pointer to xfdata.Visual
            xfdata.Visual class instance

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

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

    """
    _fl_set_canvas_visual = library.cfuncproto(
            library.load_so_libforms(), "fl_set_canvas_visual",
            None, [cty.POINTER(xfdata.FL_OBJECT), cty.POINTER(xfdata.Visual)],
            """void fl_set_canvas_visual(FL_OBJECT * obj, Visual * vi)""")
    library.check_if_flinitialized()
    library.verify_flobjectptr_type(ptr_flobject)
    library.verify_otherclassptr_type(ptr_visual, cty.POINTER(xfdata.Visual))
    library.keep_elem_refs(ptr_flobject, ptr_visual)
    _fl_set_canvas_visual(ptr_flobject, ptr_visual)
def fl_free_dirlist(ptr_dirlist):
    """fl_free_dirlist(ptr_dirlist)

    Frees the list cache returned by fl_get_dirlist().

    Parameters
    ----------
        ptr_dirlist : pointer to xfdata.FL_DirList
            instance of DirList class

    Examples
    --------
        >>> fl_free_dirlist(pdirlist)

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

    """
    _fl_free_dirlist = library.cfuncproto(
        library.load_so_libforms(), "fl_free_dirlist",
        None, [cty.POINTER(xfdata.FL_Dirlist)],
        """void fl_free_dirlist(FL_Dirlist * dl)""")
    library.check_if_flinitialized()
    library.verify_otherclassptr_type(ptr_dirlist, \
            cty.POINTER(xfdata.FL_Dirlist))
    library.keep_elem_refs(ptr_dirlist)
    _fl_free_dirlist(ptr_dirlist)
def fl_set_input_editkeymap(ptr_fleditkeymap):
    """fl_set_input_editkeymap(ptr_fleditkeymap)

    Changes the default edit keymaps. Edit keymap is global and affects all
    input field within the application. All cursor keys (<Left>, <Home> etc.)
    are reserved and their meanings hard-coded, thus cannot be used in the
    mapping. For example, if you try to set del_prev_char to <Home>, pressing
    the <Home> key will not delete the previous character. In filling the
    keymap structure, ASCII characters (i.e. characters with values below 128,
    including the control characters with values below 32) should be specified
    by their ASCII codes (<Ctrl> C is 3 etc.), while all others bytheir Keysyms
    (XK_F1 etc.). Control and special character combinations can be obtained
    by adding xfdata.FL_CONTROL_MASK to the Keysym. To specify Meta add
    xfdata.FL_ALT_MASK to the key value. Change of edit keymap is global and
    affects all input field within the application.

    Parameters
    ----------
        ptr_fleditkeymap : pointer to xfdata.FL_EditKeymap
            edit keymap class instance (filled or partially filled; the
            unfilled members must be set to 0 so the default mapping is
            retained. If None, it restores the default keymap. You can use
            xfstruct.fls_make_ptr_fleditkeymap() passing a dict whose keys
            corresponding to xfdata.FL_EditKeymap

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

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

    """
    _fl_set_input_editkeymap = library.cfuncproto(
        library.load_so_libforms(),
        "fl_set_input_editkeymap",
        None,
        [cty.POINTER(xfdata.FL_EditKeymap)],
        """void fl_set_input_editkeymap(FL_EditKeymap * keymap)""",
    )
    library.check_if_flinitialized()
    if not ptr_fleditkeymap:  # it is None
        ptr_fleditkeymap = cty.cast(ptr_fleditkeymap, cty.c_void_p)
    else:
        library.verify_otherclassptr_type(ptr_fleditkeymap, cty.POINTER(xfdata.FL_EditKeymap))
    library.keep_elem_refs(ptr_fleditkeymap)
    _fl_set_input_editkeymap(ptr_fleditkeymap)
def fl_glwinopen(glconfig, ptr_glxcontext, width, height):
    """fl_glwinopen(glconfig, ptr_glxcontext, width, height)

    Opens a toplevel OpenGL window.

    Parameters
    ----------
        glconfig : int
            GL configuration settings. See xfdata.py for values
        ptr_glxcontext : pointer to xfdata.GLXContext *todo*
            glxcontext class instance??
        width : int
            width of GL window in coord units
        height : int
            height of GL window in coord units

    Returns
    -------
        win : long_pos
            window id opened

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

    Notes
    -----
        Status: NA-UTest + NoDoc + NoDemo = KO

    """
    _fl_glwinopen = library.cfuncproto(
        library.load_so_libformsgl(), "fl_glwinopen",
        xfdata.Window, [cty.POINTER(cty.c_int),
        cty.POINTER(xfdata.GLXContext), cty.c_int, cty.c_int],
        """Window fl_glwinopen(int * config, GLXContext * context,
           int w, int h""")
    library.check_if_flinitialized()
    ptr_glconfig = cty.cast(glconfig, cty.POINTER(cty.c_int)) # to be verified
    #pGLXContext = cty.cast(glxcontext, cty.POINTER(xfdata.GLXContext))
    library.verify_otherclassptr_type(ptr_glxcontext, \
            cty.POINTER(xfdata.GLXContext))
    i_width = library.convert_to_intc(width)
    i_height = library.convert_to_intc(height)
    library.keep_elem_refs(glconfig, ptr_glxcontext, width, height, \
            i_width, i_height, ptr_glconfig)
    retval = _fl_glwinopen(ptr_glconfig, ptr_glxcontext, i_width, i_height)
    return retval
def fl_set_canvas_attributes(ptr_flobject, mask, ptr_xsetwindowattributes):
    """fl_set_canvas_attributes(ptr_flobject, mask, ptr_xsetwindowattributes)

    Modifies attributes of a canvas flobject (e.g. visual, depth and
    colormap etc.). By default, upon canvas creation, all its window related
    attributes are inherited from its parent (i.e. the window of the form the
    canvas belongs to). You should not use this function to modify events.

    Parameters
    ----------
        ptr_flobject : pointer to xfdata.FL_OBJECT
            canvas flobject
        mask : int_pos
            mask num.
        ptr_xsetwindowattributes : pointer to xfdata.XSetWindowAttributes
            xfdata.XSetWindowAttributes class instance

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

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

    """
    _fl_set_canvas_attributes = library.cfuncproto(
            library.load_so_libforms(), "fl_set_canvas_attributes",
            None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_uint,
            cty.POINTER(xfdata.XSetWindowAttributes)],
            """void fl_set_canvas_attributes(FL_OBJECT * ob,
               unsigned int mask, XSetWindowAttributes * xswa)""")
    library.check_if_flinitialized()
    library.verify_flobjectptr_type(ptr_flobject)
    ui_mask = library.convert_to_uintc(mask)
    library.verify_otherclassptr_type(ptr_xsetwindowattributes, \
            cty.POINTER(xfdata.XSetWindowAttributes))
    library.keep_elem_refs(ptr_flobject, mask, ptr_xsetwindowattributes, \
            ui_mask)
    _fl_set_canvas_attributes(ptr_flobject, ui_mask, \
            ptr_xsetwindowattributes)