Go to the source code of this file.
Classes | |
| struct | AEArgument |
| Argument to method call, for use with AEMessageQueuePerformSelectorOnMainThread. More... | |
| class | AEMessageQueue |
| Message Queue. More... | |
Macros | |
| #define | AEArgumentScalar(argument) (AEArgument){ YES, &(typeof(argument)){argument}, sizeof(argument) } |
| Create a scalar argument for use with AEMessageQueuePerformSelectorOnMainThread. | |
| #define | AEArgumentStruct(argument) (AEArgument){ YES, &(argument), sizeof(argument) } |
| Create a structure argument for use with AEMessageQueuePerformSelectorOnMainThread. | |
| #define | AEArgumentData(buffer, size) (AEArgument) { NO, buffer, size } |
| Create a data argument for use with AEMessageQueuePerformSelectorOnMainThread. | |
Typedefs | |
| typedef void(^ | AEMessageQueueBlock )() |
| Block. | |
Variables | |
| AEArgument | AEArgumentNone |
| Empty argument, to terminate list of arguments in AEMessageQueuePerformSelectorOnMainThread. | |
| struct AEArgument |
| #define AEArgumentScalar | ( | argument | ) | (AEArgument){ YES, &(typeof(argument)){argument}, sizeof(argument) } |
Create a scalar argument for use with AEMessageQueuePerformSelectorOnMainThread.
For example, to create a literal int argument:
AEArgumentScalar(1);
To create a pointer argument:
__unsafe_unretained MyClass * myPointer; AEArgumentScalar(myPointer);
To create a literal structure argument, use AEArgumentStruct; to create an argument that points a memory region, use AEArgumentData.
| argument | The argument value |
| #define AEArgumentStruct | ( | argument | ) | (AEArgument){ YES, &(argument), sizeof(argument) } |
Create a structure argument for use with AEMessageQueuePerformSelectorOnMainThread.
For example (note extra parentheses around braced structure initialization):
AEArgumentStruct(((struct MyStruct) { value1, value2 }))
or
struct myStruct value = { value1, value2 };
AEArgumentStruct(value)
| argument | The struct argument |
| #define AEArgumentData | ( | buffer, | |
| size | |||
| ) | (AEArgument) { NO, buffer, size } |
Create a data argument for use with AEMessageQueuePerformSelectorOnMainThread.
The memory region indicated will be copied. For example:
void * myBuffer = ...; AEArgumentData(myBuffer, myBufferLength);
| buffer | Pointer to the buffer to copy |
| size | Number of bytes to copy |
| typedef void(^ AEMessageQueueBlock)() |
Block.
| AEArgument AEArgumentNone |
Empty argument, to terminate list of arguments in AEMessageQueuePerformSelectorOnMainThread.