In fact, event transmission is essentially a shared memory communication method. Iclipboard can be used to cut and paste data in the aee layer. It is another important form of shared memory communication. Because the Clipboard data may still exist after the application ends, this function will allocate new memory and copy the content to the new buffer, that is, the system memory exists in the allocated iclipboard_set, so it can be used by other applications. If the pointer is null or the value is 0, the existing Clipboard data will be released.
When the target application wants to obtain the communication content from the clipboard, it needs to use iclipboard_enuminit () to initialize the enumeration context of each format in the clipboard, and then call iclipboard_getdata () to copy the Clipboard data in the specified format to the target buffer zone, if the data in the clipboard is not required by the target application, you need to call iclipboard_enumnext () to return the next available/registered clipboard format for further processing, and so on. After the target application is processed, you can call iclipboard_empty () to delete all data in all formats from the clipboard. If the last application does not call iclipboard_empty to release the clipboard and brew exits after the handheld device is shut down, all data on the clipboard will be lost.
It should be noted that the data on the clipboard will be updated when data is added and may be updated at any time. At this time, you need to call iclipboard_getsequence () to let the caller determine whether the clipboard has been updated, the serial number only increases the count when data is added. data deletion does not affect the serial number. After the handheld device is shut down and then powered on, the serial number will be reset.