Copyright (c) 2014 Jolla Ltd. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the copyright holders not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The copyright holders make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Create a recorder object for the specified output. Destroy the recorder object, discarding any frame request that may be pending. Ask the compositor to record its next frame, putting the content into the specified buffer data. The frame event will be sent when the frame is recorded. Only one frame will be recorded, the client will have to call this again after the frame event if it wants to record more frames. The buffer must be a shm buffer, trying to use another type of buffer will result in failure to capture the frame and the failed event will be sent. Calling record_frame will not cause the compositor to repaint, but it will wait instead for the first frame the compositor draws due to some other external event or internal change. Calling this request after calling record_frame will ask the compositor to redraw as soon at possible even if it wouldn't otherwise. If no frame was requested this request has no effect. This event will be sent immediately after creation of the lipstick_recorder object. The wl_buffers the client passes to the frame request must be big enough to store an image with the given width, height and format. If they are not the compositor will send the failed event. If this event is sent again later in the lifetime of the object the pending frames will be cancelled. The format will be one of the values as defined in the wl_shm::format enum. The compositor will send this event after a frame was recorded, or in case an error happened. The client can call record_frame again to record the next frame. 'time' is the time the compositor recorded that frame, in milliseconds, with an unspecified base. The value of the 'result' argument will be one of the values of the 'result' enum. The compositor will send this event if the client calls request_frame more than one time for the same compositor frame. The cancel event will be sent carrying the old buffer, and the frame will be recorded using the newest buffer.