uic support for Python has not always been present. There used to be a
pyside2-uic in the past, but at least on Ubuntu, it disappeared. As
the way how to integrate the uic calls into CMake is also not clear,
it appears to be best to just load the .ui files at run-time.
Most noticable side-effect is that the .ui property is no longer needed
to access the UI elements from the various widget objects.
This essentially displays the same information as the simple
test script does with its "getavr()" function:
* device names (long and short)
* location of definition in config file
* device memories
* device variants
This adds a few .ui files (created with Qt designer), and a
skeleton to create a basic GUI out of them. Only functionality
so far is the selection of a device.
Both these functions deliberately do not initiate progress reporting,
but rather leave it up to their callers to do so. For the Python
wrapper, there is no explicit caller, so abuse the "check" typemap to
inject the respective code.
For optional methods, place checks that prevent dereferencing NULL
pointers, resulting in a SWIG exception instead.
For methods that return values in pointers, provide "argout" typemaps.
This allows for Python code providing a callback function that
is used to indicate progress.
Also fix a few minor things in message callback (reference
counting of Python objects).
Progress reporting needs to be initialized by passing it a "header"
string, in order to re-adjust internal static variables.
avr_{read,write}_mem did not do this, so they only reported progress
upon the very first invocation.
Doing so requires quite a bit of C preprocessing, since a va_list from
C cannot be passed to a Python function directly.
Also, using stdout or stderr is not necessarily going to be the
correct target for a Python program, so instead, convert the FILE*
arguments to names to pass them to Python.
By now, the '\v' feature of the message system (conditional newline)
is ignored here.
Reflect current status: helper to start and stop a programmer in the
correct sequence. Read signature memory space, and compare signature
against config file definition.
All these typecast helpers are supposed to operate on LNODEID elements,
in order to convert them to the desired target type. As such, it makes
sense to include the ldata() LNODEID access itself.
Add docstrings for them as well, also for the entire module.
While these functions are *not* implemented by the library itself,
they are supposed to be provided by whatever application is using the
library. As such, they need to be declared in the public library
header file, including the various constants for msglvl and msgmode.
Some library functions might return AVRMEM* and AVRPART* as
NULL pointers. Prevent them from being dereferenced, and
return a Python None object instead.