# \details This source file is designed to give high-level access to libcvautomation using Python. It was modeled after the Bash wrapper, but allows for access to all the extra features of Python.
# \author Bradlee Speice
## \package libcvautomation_funcs
# \brief Namespace to contain all of the features needed to use the libcvautomation_funcs wrapper
## \brief Open a display for use in the libcvautomation_funcs
# \details This opens a display that will be used for every other function in libcvautomation_funcs.py. If you need to open a different display, use \ref libcvautomation_funcs::close_display() and then open the new display that you want.
# \param display_name The name of the display to open. The default is to open the first available display, which may not specifically be \c :0.
# \warning You \em must use this function to open a display before any other functions can be used.
# \returns Return \c True if the display was successfully opened, \c False otherwise
## \brief Close a display currently in use by libcvautomation_funcs
# \details This closes the currently open display. All functions used after this will fail unless you open another display. Use \ref libcvautomation_funcs::open_display() to open the new display.
## \brief Click a mouse button on an image inside the root X11 window
# \details For each image in \c image_names, search for it inside the root X11 window. Return once a match has been found, or the timeout value has been exceeded
# \param image_names List of image names to search for
# \param search_method The search method to use when finding each \c image. See \ref libcvautomation_search_methods for more information on how to use the search methods.
# \param tolerance The tolerance to use when finding each \c image. See \ref libcvautomation_search_methods for more information on how to use tolerance.
# \param timeout Wait for \c timeout seconds before giving up the search for \c image_names in the root X11 window.
# \note \c use_wait must be set to \c True for this parameter to have any effect
# \param mouse_button The mouse button to click after finding an image
# \param use_wait Set to \c True to make this function wait \c timeout seconds before giving up finding an image.
# \note If set to \c False, this function will go through the list of \c image_names once before giving up.
# \returns Return \c False if the X11 display was not opened before execution or there were no images found, and \c True otherwise
## \brief Click a mouse button twice on an image inside the root X11 window
# \details For each image in \c image_names, search for it inside the root X11 window. Return once a match has been found, or the timeout value has been exceeded
# \param image_names List of image names to search for
# \param search_method The search method to use when finding each \c image. See \ref libcvautomation_search_methods for more information on how to use the search methods.
# \param tolerance The tolerance to use when finding each \c image. See \ref libcvautomation_search_methods for more information on how to use tolerance.
# \param timeout Wait for \c timeout seconds before giving up the search for \c image_names in the root X11 window.
# \note \c use_wait must be set to \c True for this parameter to have any effect
# \param mouse_button The mouse button to click after finding an image
# \param use_wait Set to \c True to make this function wait \c timeout seconds before giving up finding an image.
# \note If set to \c False, this function will go through the list of \c image_names once before giving up.
# \returns Return \c False if the X11 display was not opened before execution or no images were found, and \c True otherwise
## \brief Move the mouse to an image inside the root X11 window
# \details For each image in \c image_names, search for it inside the root X11 window. Return once a match has been found, or the timeout value has been exceeded
# \param image_names List of image names to search for
# \param search_method The search method to use when finding each \c image. See \ref libcvautomation_search_methods for more information on how to use the search methods.
# \param tolerance The tolerance to use when finding each \c image. See \ref libcvautomation_search_methods for more information on how to use tolerance.
# \param timeout Wait for \c timeout seconds before giving up the search for \c image_names in the root X11 window.
# \note \c use_wait must be set to \c True for this parameter to have any effect
# \param use_wait Set to \c True to make this function wait \c timeout seconds before giving up finding an image.
# \note If set to \c False, this function will go through the list of \c image_names once before giving up.
# \returns Return \c False if the X11 display was not opened before execution or no images were found, and \c True otherwise
# \details This function will simulate pressing the keys exactly as they are entered - unlike libcvautomation_funcs::key_down, libcvautomation_funcs::key_up, and libcvautomation_funcs::key_click, this function will display exactly what you entered: A string of \c '!' will produce a \c ! as a keypress.
# \param string The string of text to enter on the keyboard
# \returns Return \c False if the X11 display was not opened before execution, and \c True otherwise
## \brief Press a key down on the keyboard, and leave it down
# \param key_name The name of the key to press down. Unlike libcvautomation_funcs::key_string, this command will press a single key corresponding to the string you give it - for example, \c 'a', \c 'b', or something fancy like \c 'space'.
# \note See \ref xtest_key_strings for a full list of accepted key strings.
# \returns Return \c False if the X11 display was not opened before execution, and \c True otherwise
# \param key_name The name of the key to release. Unlike libcvautomation_funcs::key_string, this command will press a single key corresponding to the string you give it - for example, \c 'a', \c 'b', or something fancy like \c 'space'.
# \note See \ref xtest_key_strings for a full list of accepted key strings.
# \returns Return \c False if the X11 display was not opened before execution, and \c True otherwise
# \param key_name The name of the key to click. Unlike libcvautomation_funcs::key_string, this command will press a single key corresponding to the string you give it - for example, \c 'a', \c 'b', or something fancy like \c 'space'.
# \note See \ref xtest_key_strings for a full list of accepted key strings.
# \returns Return \c False if the X11 display was not opened before execution, and \c True otherwise
## \brief Get the location of an image on the screen
# \param image_names List of image names to search for in the root X11 window
# \param search_method The search method to use when matching images. See \ref libcvautomation_search_methods for more information on using the \c search_method parameter
# \param tolerance The tolerance to use when matching images. See \ref libcvautomation_search_methods for more informatino on using the \c tolerance parameter
# \param use_center Set to \c True to return the center coordinate of an image. Set to \c False to use the top-left corner of an image
# \warning Unlike libcvautomation_funcs::wait_for(), this method will not wait for an image to show up before looking for it.
# \returns A dictionary pairing each image name with a cvaPoint class indicating the location it was found at (a point of (-1, -1) indicates the image was not found), or an empty dictionary if the X11 display was not opened before execution.
## \brief Get the location of an image on the screen, waiting for it to show up
# \param image_names List of image names to search for in the root X11 window
# \param search_method The search method to use when matching images. See \ref libcvautomation_search_methods for more information on using the \c search_method parameter
# \param tolerance The tolerance to use when matching images. See \ref libcvautomation_search_methods for more informatino on using the \c tolerance parameter
# \param timeout The time (in seconds) to wait when searching for an image on the root X11 window
# \param use_center Set to \c True to return the center coordinate of an image. Set to \c False to use the top-left corner of an image
# \returns A dictionary pairing each image name with a cvaPoint class indicating the location it was found at (a point of (-1, -1) indicates the image was not found), or an empty dictionary if the X11 display was not opened before execution.
## \brief Execute a libcvautomation command based on a string
# \details This is a handler for the xte_commandString() function.
# \note Not all commands need all the parameters specified. See \ref xtest_command_strings for more information on how to use this function.
# \param string The command string to execute
# \param mouse_button The mouse button to click, if applicable
# \param search_method The search method to use, if applicable. See \ref libcvautomation_search_methods for more information on how to use the \c search_method parameter
# \param tolerance The tolerance to use, if applicable. See \ref libcvautomation_search_methods for more information on how to use the \c tolerance parameter
# \param timeout The timeout (in seconds) to use, if applicable
# \returns A cvaPoint class with the following points:<br>(0, 0) or up indicates a success.<br>(-1, -1) indicates either the command was not successful, or that the command was not recognized.<br>(-2, -2) indicates that the command did not need to return anything - For example, commands like \ref mousejiggle don't normally return a value.