Flags for file descriptor events that a looper can monitor.
Option for for
Acquire a reference on the given ALooper object. This prevents the object from being deleted until the reference is removed. This is only needed to safely hand an ALooper from one thread to another.
Adds a new file descriptor to be polled by the looper. If the same file descriptor was previously added, it is replaced.
Returns the looper associated with the calling thread, or NULL if there is not one.
Like ALooper_pollOnce(), but performs all pending callbacks until all data has been consumed or a file descriptor is available with no callback. This function will never return ALOOPER_POLL_CALLBACK.
Waits for events to be available, with optional timeout in milliseconds. Invokes callbacks for all file descriptors on which an event occurred.
Prepares a looper associated with the calling thread, and returns it. If the thread already has a looper, it is returned. Otherwise, a new one is created, associated with the thread, and returned.
Remove a reference that was previously acquired with ALooper_acquire().
Removes a previously added file descriptor from the looper.
Wakes the poll asynchronously.
For callback-based event loops, this is the prototype of the function that is called when a file descriptor event occurs. It is given the file descriptor it is associated with, a bitmask of the poll events that were triggered (typically ALOOPER_EVENT_INPUT), and the data pointer that was originally supplied.