20 #ifndef UBUNTU_APPLICATION_LIFECYCLE_DELEGATE_H_
21 #define UBUNTU_APPLICATION_LIFECYCLE_DELEGATE_H_
67 UApplicationLifecycleDelegate *delegate);
76 UApplicationLifecycleDelegate *delegate);
85 UApplicationLifecycleDelegate *delegate);
95 UApplicationLifecycleDelegate *delegate,
106 UApplicationLifecycleDelegate *delegate);
116 UApplicationLifecycleDelegate *delegate,
127 UApplicationLifecycleDelegate *delegate);
137 UApplicationLifecycleDelegate *delegate,
149 UApplicationLifecycleDelegate *delegate,
UBUNTU_DLL_PUBLIC void u_application_lifecycle_delegate_ref(UApplicationLifecycleDelegate *delegate)
Increments the reference count of the supplied lifecycle delegate.
UBUNTU_DLL_PUBLIC void * u_application_lifecycle_delegate_get_context(UApplicationLifecycleDelegate *delegate, void *context)
Queries the cb context from the supplied delegate.
UBUNTU_DLL_PUBLIC void u_application_lifecycle_delegate_set_application_about_to_stop_cb(UApplicationLifecycleDelegate *delegate, u_on_application_about_to_stop cb)
Sets the about-to-stop cb for the supplied delegate.
void(* u_on_application_resumed)(const UApplicationOptions *options, void *context)
Prototype for the callback that is invoked whenever the app has been resumed.
UBUNTU_DLL_PUBLIC u_on_application_about_to_stop u_application_lifecycle_delegate_get_application_about_to_stop_cb(UApplicationLifecycleDelegate *delegate)
Queries the about-to-be-stopped cb from the supplied delegate.
void(* u_on_application_about_to_stop)(UApplicationArchive *archive, void *context)
Prototype for the callback that is invoked whenever the app is about to be stopped. Applications can serialize their state to the supplied archive.
UBUNTU_DLL_PUBLIC void u_application_lifecycle_delegate_unref(UApplicationLifecycleDelegate *delegate)
Decrements the reference count of the supplied lifecycle delegate and destroys it if the count reache...
UBUNTU_DLL_PUBLIC void u_application_lifecycle_delegate_set_context(UApplicationLifecycleDelegate *delegate, void *context)
Sets the cb context for the supplied delegate.
UBUNTU_DLL_PUBLIC UApplicationLifecycleDelegate * u_application_lifecycle_delegate_new()
Creates a new instance of the lifecycle delegate with an initial refernce count of 1...
void UApplicationOptions
Encapsulates options as passed to the application.
void UApplicationLifecycleDelegate
Opaque type encapsulating all app-specific callback functions.
struct UbuntuApplicationArchive_ UApplicationArchive
#define UBUNTU_DLL_PUBLIC
UBUNTU_DLL_PUBLIC u_on_application_resumed u_application_lifecycle_delegate_get_application_resumed_cb(UApplicationLifecycleDelegate *delegate)
Queries the resumed cb from the supplied delegate.
UBUNTU_DLL_PUBLIC void u_application_lifecycle_delegate_destroy(UApplicationLifecycleDelegate *delegate)
Destroys an instance of the lifecycle delegate and releases all of its resources. ...
UBUNTU_DLL_PUBLIC void u_application_lifecycle_delegate_set_application_resumed_cb(UApplicationLifecycleDelegate *delegate, u_on_application_resumed cb)
Sets the resumed cb for the supplied delegate.