aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-02-15 22:37:50 +0100
committerDavid Robillard <d@drobilla.net>2019-02-16 16:56:50 +0100
commit539c1ddd4029f4ea62368c45955d0c1f6bca4006 (patch)
tree8458cfa1ed8cd8da139919407208c2fd05632065 /pugl
parentf46b5124627e47a197ad41ff5b9e27b82e19d945 (diff)
downloadpugl-539c1ddd4029f4ea62368c45955d0c1f6bca4006.tar.gz
pugl-539c1ddd4029f4ea62368c45955d0c1f6bca4006.tar.bz2
pugl-539c1ddd4029f4ea62368c45955d0c1f6bca4006.zip
Clean up includes
Diffstat (limited to 'pugl')
-rw-r--r--pugl/pugl.h7
-rw-r--r--pugl/pugl_internal.h6
-rw-r--r--pugl/pugl_internal_types.h6
-rw-r--r--pugl/pugl_osx.m8
-rw-r--r--pugl/pugl_win.cpp4
-rw-r--r--pugl/pugl_x11.c19
-rw-r--r--pugl/pugl_x11.h5
-rw-r--r--pugl/pugl_x11_cairo.c13
-rw-r--r--pugl/pugl_x11_gl.c8
9 files changed, 37 insertions, 39 deletions
diff --git a/pugl/pugl.h b/pugl/pugl.h
index 1cfe3c9..05366be 100644
--- a/pugl/pugl.h
+++ b/pugl/pugl.h
@@ -21,6 +21,7 @@
#ifndef PUGL_H_INCLUDED
#define PUGL_H_INCLUDED
+#include <stdbool.h>
#include <stdint.h>
#ifdef PUGL_SHARED
@@ -42,8 +43,6 @@
#ifdef __cplusplus
extern "C" {
-#else
-# include <stdbool.h>
#endif
/**
@@ -82,8 +81,8 @@ typedef enum {
Drawing context type.
*/
typedef enum {
- PUGL_GL = 0x1, /**< OpenGL (3D) */
- PUGL_CAIRO = 0x2 /**< Cairo (2D) */
+ PUGL_GL = 1 << 0, /**< OpenGL (3D) */
+ PUGL_CAIRO = 1 << 1 /**< Cairo (2D) */
} PuglContextType;
/**
diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h
index c3a342c..ce79d2a 100644
--- a/pugl/pugl_internal.h
+++ b/pugl/pugl_internal.h
@@ -28,12 +28,12 @@
PUGL_HAVE_GL: Include OpenGL support code.
*/
+#include "pugl/pugl.h"
+#include "pugl/pugl_internal_types.h"
+
#include <stdlib.h>
#include <string.h>
-#include "pugl/pugl_internal_types.h"
-#include "pugl/pugl.h"
-
PuglInternals* puglInitInternals(void);
PuglView*
diff --git a/pugl/pugl_internal_types.h b/pugl/pugl_internal_types.h
index dce5429..63b81cd 100644
--- a/pugl/pugl_internal_types.h
+++ b/pugl/pugl_internal_types.h
@@ -21,10 +21,10 @@
#ifndef PUGL_INTERNAL_TYPES_H
#define PUGL_INTERNAL_TYPES_H
-#include "pugl/pugl.h"
-
-#include <stdint.h>
#include <stdbool.h>
+#include <stdint.h>
+
+#include "pugl/pugl.h"
/** Platform-specific internals. */
typedef struct PuglInternalsImpl PuglInternals;
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index 71d98a1..712f5fc 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -19,14 +19,14 @@
@file pugl_osx.m OSX/Cocoa Pugl Implementation.
*/
-#include <stdlib.h>
-
-#import <Cocoa/Cocoa.h>
-
#include "pugl/cairo_gl.h"
#include "pugl/gl.h"
#include "pugl/pugl_internal.h"
+#import <Cocoa/Cocoa.h>
+
+#include <stdlib.h>
+
@class PuglOpenGLView;
struct PuglInternalsImpl {
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp
index 83d4474..fd14593 100644
--- a/pugl/pugl_win.cpp
+++ b/pugl/pugl_win.cpp
@@ -18,6 +18,8 @@
@file pugl_win.cpp Windows/WGL Pugl Implementation.
*/
+#include "pugl/pugl_internal.h"
+
#include <windows.h>
#include <windowsx.h>
#include <GL/gl.h>
@@ -27,8 +29,6 @@
#include <string.h>
#include <wctype.h>
-#include "pugl/pugl_internal.h"
-
#ifndef WM_MOUSEWHEEL
# define WM_MOUSEWHEEL 0x020A
#endif
diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c
index 7a334e3..3a8cead 100644
--- a/pugl/pugl_x11.c
+++ b/pugl/pugl_x11.c
@@ -20,26 +20,25 @@
@file pugl_x11.c X11 Pugl Implementation.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <X11/Xatom.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/keysym.h>
#include "pugl/pugl_internal.h"
#include "pugl/pugl_x11.h"
-
#ifdef PUGL_HAVE_GL
#include "pugl/pugl_x11_gl.h"
#endif
-
#ifdef PUGL_HAVE_CAIRO
#include "pugl/pugl_x11_cairo.h"
#endif
+#include <X11/Xatom.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/keysym.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#ifndef MIN
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
diff --git a/pugl/pugl_x11.h b/pugl/pugl_x11.h
index a8c8c02..9c53c49 100644
--- a/pugl/pugl_x11.h
+++ b/pugl/pugl_x11.h
@@ -14,11 +14,12 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <X11/Xlib.h>
-
#include "pugl/pugl.h"
#include "pugl/pugl_internal_types.h"
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
struct PuglInternalsImpl {
Display* display;
int screen;
diff --git a/pugl/pugl_x11_cairo.c b/pugl/pugl_x11_cairo.c
index 3614c4b..db2e262 100644
--- a/pugl/pugl_x11_cairo.c
+++ b/pugl/pugl_x11_cairo.c
@@ -14,17 +14,16 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdio.h>
-#include <stdlib.h>
+#include "pugl/pugl_internal_types.h"
+#include "pugl/pugl_x11.h"
+#include "pugl/pugl_x11_cairo.h"
+#include <X11/Xutil.h>
#include <cairo/cairo-xlib.h>
#include <cairo/cairo.h>
-#include <X11/Xutil.h>
-
-#include "pugl/pugl_internal_types.h"
-#include "pugl/pugl_x11.h"
-#include "pugl/pugl_x11_cairo.h"
+#include <stdio.h>
+#include <stdlib.h>
typedef struct {
cairo_surface_t* surface;
diff --git a/pugl/pugl_x11_gl.c b/pugl/pugl_x11_gl.c
index 809f4a3..d6242f2 100644
--- a/pugl/pugl_x11_gl.c
+++ b/pugl/pugl_x11_gl.c
@@ -14,14 +14,14 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdlib.h>
+#include "pugl/pugl_internal_types.h"
+#include "pugl/pugl_x11.h"
+#include "pugl/pugl_x11_gl.h"
#include <GL/gl.h>
#include <GL/glx.h>
-#include "pugl/pugl_x11.h"
-#include "pugl/pugl_x11_gl.h"
-#include "pugl/pugl_internal_types.h"
+#include <stdlib.h>
typedef struct {
GLXContext ctx;