| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 Travis Geiselbrecht | 2 * Copyright (c) 2010 Travis Geiselbrecht |
| 3 * | 3 * |
| 4 * Permission is hereby granted, free of charge, to any person obtaining | 4 * Permission is hereby granted, free of charge, to any person obtaining |
| 5 * a copy of this software and associated documentation files | 5 * a copy of this software and associated documentation files |
| 6 * (the "Software"), to deal in the Software without restriction, | 6 * (the "Software"), to deal in the Software without restriction, |
| 7 * including without limitation the rights to use, copy, modify, merge, | 7 * including without limitation the rights to use, copy, modify, merge, |
| 8 * publish, distribute, sublicense, and/or sell copies of the Software, | 8 * publish, distribute, sublicense, and/or sell copies of the Software, |
| 9 * and to permit persons to whom the Software is furnished to do so, | 9 * and to permit persons to whom the Software is furnished to do so, |
| 10 * subject to the following conditions: | 10 * subject to the following conditions: |
| 11 * | 11 * |
| 12 * The above copyright notice and this permission notice shall be | 12 * The above copyright notice and this permission notice shall be |
| 13 * included in all copies or substantial portions of the Software. | 13 * included in all copies or substantial portions of the Software. |
| 14 * | 14 * |
| 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | 16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | 17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | 18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | 19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | 20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 21 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 21 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 */ | 22 */ |
| 23 #ifndef __LIB_GFX_H | 23 #ifndef __LIB_GFX_H |
| 24 #define __LIB_GFX_H | 24 #define __LIB_GFX_H |
| 25 | 25 |
| 26 #include <stdbool.h> | 26 #include <stdbool.h> |
| 27 #include <sys/types.h> | 27 #include <sys/types.h> |
| 28 #include <inttypes.h> | 28 #include <inttypes.h> |
| 29 #include <compiler.h> |
| 29 | 30 |
| 30 // gfx library | 31 // gfx library |
| 31 | 32 |
| 33 __BEGIN_CDECLS |
| 34 |
| 32 // different graphics formats | 35 // different graphics formats |
| 33 typedef enum { | 36 typedef enum { |
| 34 GFX_FORMAT_NONE, | 37 GFX_FORMAT_NONE, |
| 35 GFX_FORMAT_RGB_565, | 38 GFX_FORMAT_RGB_565, |
| 36 GFX_FORMAT_RGB_332, | 39 GFX_FORMAT_RGB_332, |
| 37 GFX_FORMAT_RGB_2220, | 40 GFX_FORMAT_RGB_2220, |
| 38 GFX_FORMAT_ARGB_8888, | 41 GFX_FORMAT_ARGB_8888, |
| 39 GFX_FORMAT_RGB_x888, | 42 GFX_FORMAT_RGB_x888, |
| 40 GFX_FORMAT_MONO, | 43 GFX_FORMAT_MONO, |
| 41 | 44 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 struct display_framebuffer; | 110 struct display_framebuffer; |
| 108 gfx_surface *gfx_create_surface_from_display(struct display_framebuffer *) __NON
NULL((1)); | 111 gfx_surface *gfx_create_surface_from_display(struct display_framebuffer *) __NON
NULL((1)); |
| 109 | 112 |
| 110 // free the surface | 113 // free the surface |
| 111 // optionally frees the buffer if the free bit is set | 114 // optionally frees the buffer if the free bit is set |
| 112 void gfx_surface_destroy(struct gfx_surface *surface); | 115 void gfx_surface_destroy(struct gfx_surface *surface); |
| 113 | 116 |
| 114 // utility routine to fill the display with a little moire pattern | 117 // utility routine to fill the display with a little moire pattern |
| 115 void gfx_draw_pattern(void); | 118 void gfx_draw_pattern(void); |
| 116 | 119 |
| 120 __END_CDECLS |
| 121 |
| 117 #endif | 122 #endif |
| 118 | 123 |
| OLD | NEW |