Functions
deferred_call | Invoke a callable on the next cycle of the main event loop thread. |
is_main_thread | Indicates whether the caller is on the main gui thread. |
schedule | Schedule a callable to be executed on the event loop thread. |
timed_call | Invoke a callable on the main event loop thread at a specified time in the future. |
Classes
Application | The application object which manages the top-level communication |
ProxyResolver | An object which resolves requests for proxy objects. |
ScheduledTask | An object representing a task in the scheduler. |
Invoke a callable on the next cycle of the main event loop thread.
This is a convenience function for invoking the same method on the current application instance. If an application instance does not exist, a RuntimeError will be raised.
Parameters : | callback : callable
*args, **kwargs :
|
---|
Indicates whether the caller is on the main gui thread.
This is a convenience function for invoking the same method on the current application instance. If an application instance does not exist, a RuntimeError will be raised.
Returns : | result : bool
|
---|
Schedule a callable to be executed on the event loop thread.
This call is thread-safe.
This is a convenience function for invoking the same method on the current application instance. If an application instance does not exist, a RuntimeError will be raised.
Parameters : | callback : callable
args : tuple, optional
kwargs : dict, optional
priority : int, optional
|
---|---|
Returns : | result : ScheduledTask
|
Invoke a callable on the main event loop thread at a specified time in the future.
This is a convenience function for invoking the same method on the current application instance. If an application instance does not exist, a RuntimeError will be raised.
Parameters : | ms : int
callback : callable
*args, **kwargs :
|
---|
Bases: atom.atom.Atom
The application object which manages the top-level communication protocol for serving Enaml views.
The proxy resolver to use for the application. This will normally be supplied by application subclasses, but can also be supplied by the developer to supply custom proxy resolution behavior.
The style sheet to apply to the entire application.
Get the global Application instance.
Returns : | result : Application or None
|
---|
Create a new Enaml Application.
There may be only one application instance in existence at any point in time. Attempting to create a new Application when one exists will raise an exception.
Invoke a callable on the next cycle of the main event loop thread.
Parameters : | callback : callable
*args, **kwargs :
|
---|
Invoke a callable on the main event loop thread at a specified time in the future.
Parameters : | ms : int
callback : callable
*args, **kwargs :
|
---|
Indicates whether the caller is on the main gui thread.
Returns : | result : bool
|
---|
Resolve the proxy implementation class for a declaration.
This can be reimplemented by Application subclasses if more control is needed.
Parameters : | declaration_class : type
|
---|---|
Returns : | result : type
|
Create the proxy object for the given declaration.
This can be reimplemented by Application subclasses if more control is needed.
Parameters : | declaration : ToolkitObject
|
---|---|
Returns : | result : ProxyToolkitObject or None
|
Schedule a callable to be executed on the event loop thread.
This call is thread-safe.
Parameters : | callback : callable
args : tuple, optional
kwargs : dict, optional
priority : int, optional
|
---|---|
Returns : | result : ScheduledTask
|
Bases: atom.atom.Atom
An object which resolves requests for proxy objects.
A dictionary of factories functions to use when resolving the proxy. The function should take no arguments, and return the proxy class when called.
Resolve the given name to a proxy calls.
For example, ‘Field’ should resolve to a class which implements the ProxyField interface.
Parameters : | name : string
|
---|---|
Returns : | result : type or None
|
Bases: atom.atom.Atom
An object representing a task in the scheduler.
Initialize a ScheduledTask.
Parameters : | callback : callable
args : tuple
kwargs : dict
|
---|
Set a callback to be run when the task is executed.
Parameters : | callback : callable
|
---|