Skip to content

Most visited

Recently visited

navigation

looper.h File Reference

looper.h File Reference

Typedefs

typedef struct ALooper ALooper
 
typedef int(* ALooper_callbackFunc) (int fd, int events, void *data)
 

Enumerations

enum  { ALOOPER_PREPARE_ALLOW_NON_CALLBACKS = 1<<0 }
 
enum  { ALOOPER_POLL_WAKE = -1, ALOOPER_POLL_CALLBACK = -2, ALOOPER_POLL_TIMEOUT = -3, ALOOPER_POLL_ERROR = -4 }
 
enum  {
  ALOOPER_EVENT_INPUT = 1 << 0, ALOOPER_EVENT_OUTPUT = 1 << 1, ALOOPER_EVENT_ERROR = 1 << 2, ALOOPER_EVENT_HANGUP = 1 << 3,
  ALOOPER_EVENT_INVALID = 1 << 4
}
 

Functions

ALooperALooper_forThread ()
 
ALooperALooper_prepare (int opts)
 
void ALooper_acquire (ALooper *looper)
 
void ALooper_release (ALooper *looper)
 
int ALooper_pollOnce (int timeoutMillis, int *outFd, int *outEvents, void **outData)
 
int ALooper_pollAll (int timeoutMillis, int *outFd, int *outEvents, void **outData)
 
void ALooper_wake (ALooper *looper)
 
int ALooper_addFd (ALooper *looper, int fd, int ident, int events, ALooper_callbackFunc callback, void *data)
 
int ALooper_removeFd (ALooper *looper, int fd)
 
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)