A control interface file is a Python module whose name, by convention, starts with an "I". The module contains a class of the same name without any implementations, deriving from the Interface base class. It only contains comments and declarations of properties.
The neccessary classes Interface and Permission can both be loaded from libdesklets.controls:
from libdesklets.controls import Interface, Permission
A property declaration consist of the property's name along with its access permission. The valid permissions are:
A property is declared by assigning the appropriate permission object to its name, like this:
myproperty = Permission.READWRITE
Interfaces can extend other interfaces by deriving from them. A control implementing the extended interface automatically implements the original interface, too.
Since interfaces are classes, you just have to load the original class and derive from it:
from IOriginal1 import IOriginal1 from IOriginal2 import IOriginal2 class IExtended(IOriginal1, IOriginal2): ...
It is an error if a property is declared more than once in the class hierarchy.
Please include the original interface files with your control as well, since they are required for running the control.