| 1 | // Clip Library |
| 2 | // Copyright (c) 2015-2018 David Capello |
| 3 | // |
| 4 | // This file is released under the terms of the MIT license. |
| 5 | // Read LICENSE.txt for more information. |
| 6 | |
| 7 | #ifndef CLIP_LOCK_IMPL_H_INCLUDED |
| 8 | #define CLIP_LOCK_IMPL_H_INCLUDED |
| 9 | |
| 10 | namespace clip { |
| 11 | |
| 12 | class lock::impl { |
| 13 | public: |
| 14 | impl(void* native_window_handle); |
| 15 | ~impl(); |
| 16 | |
| 17 | bool locked() const { return m_locked; } |
| 18 | bool clear(); |
| 19 | bool is_convertible(format f) const; |
| 20 | bool set_data(format f, const char* buf, size_t len); |
| 21 | bool get_data(format f, char* buf, size_t len) const; |
| 22 | size_t get_data_length(format f) const; |
| 23 | bool set_image(const image& image); |
| 24 | bool get_image(image& image) const; |
| 25 | bool get_image_spec(image_spec& spec) const; |
| 26 | |
| 27 | private: |
| 28 | bool m_locked; |
| 29 | }; |
| 30 | |
| 31 | } // namespace clip |
| 32 | |
| 33 | #endif |
| 34 | |