diff options
Diffstat (limited to 'pugl')
-rw-r--r-- | pugl/pugl_internal.h | 28 | ||||
-rw-r--r-- | pugl/pugl_internal_types.h | 59 |
2 files changed, 60 insertions, 27 deletions
diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h index 4a3fc0c..c3a342c 100644 --- a/pugl/pugl_internal.h +++ b/pugl/pugl_internal.h @@ -31,35 +31,9 @@ #include <stdlib.h> #include <string.h> +#include "pugl/pugl_internal_types.h" #include "pugl/pugl.h" -typedef struct PuglInternalsImpl PuglInternals; - -struct PuglViewImpl { - PuglHandle handle; - PuglEventFunc eventFunc; - - PuglInternals* impl; - - char* windowClass; - PuglNativeWindow parent; - PuglContextType ctx_type; - uintptr_t transient_parent; - - int width; - int height; - int min_width; - int min_height; - int min_aspect_x; - int min_aspect_y; - int max_aspect_x; - int max_aspect_y; - bool ignoreKeyRepeat; - bool redisplay; - bool resizable; - bool visible; -}; - PuglInternals* puglInitInternals(void); PuglView* diff --git a/pugl/pugl_internal_types.h b/pugl/pugl_internal_types.h new file mode 100644 index 0000000..a0f5b91 --- /dev/null +++ b/pugl/pugl_internal_types.h @@ -0,0 +1,59 @@ +/* + Copyright 2012-2019 David Robillard <http://drobilla.net> + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, 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. +*/ + +/** + @file pugl_internal_types.h Private platform-independent type definitions. +*/ + +#ifndef PUGL_INTERNAL_TYPES_H +#define PUGL_INTERNAL_TYPES_H + +#include "pugl/pugl.h" + +#include <stdint.h> +#include <stdbool.h> + +/** Platform-specific internals. */ +typedef struct PuglInternalsImpl PuglInternals; + +/** Cross-platform view definition. */ +struct PuglViewImpl { + PuglHandle handle; + PuglEventFunc eventFunc; + + PuglInternals* impl; + + char* windowClass; + PuglNativeWindow parent; + PuglContextType ctx_type; + uintptr_t transient_parent; + + int width; + int height; + int min_width; + int min_height; + int min_aspect_x; + int min_aspect_y; + int max_aspect_x; + int max_aspect_y; + bool ignoreKeyRepeat; + bool redisplay; + bool resizable; + bool visible; +}; + + +#endif // PUGL_INTERNAL_TYPES_H |