aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-02-15 12:29:19 +0100
committerDavid Robillard <d@drobilla.net>2019-02-15 12:43:29 +0100
commit373b2b784648375064377dfc64a3c83892cf9ade (patch)
tree696862523c46a2020d0ccb6a3e46e0baf75aeb8d
parent222320e6c93f8dd4b8e5fabab6997e868bddd2ba (diff)
downloadpugl-373b2b784648375064377dfc64a3c83892cf9ade.tar.gz
pugl-373b2b784648375064377dfc64a3c83892cf9ade.tar.bz2
pugl-373b2b784648375064377dfc64a3c83892cf9ade.zip
Separate internal types from functions
-rw-r--r--pugl/pugl_internal.h28
-rw-r--r--pugl/pugl_internal_types.h59
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