summaryrefslogtreecommitdiff
path: root/libs/dgl/src/pugl/pugl_internal.h
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2015-02-17 11:59:35 +1100
committerDamien Zammit <damien@zamaudio.com>2015-02-17 11:59:35 +1100
commit78883fa7f7ea9d85477a27ed3c569a899ee305fb (patch)
treef1add63ce6f3af86340d7e4c93092776b5479b14 /libs/dgl/src/pugl/pugl_internal.h
parentaf7a094a0c0e8b658736d77361a2d8d2f99b0006 (diff)
parent8da011deb152227714196f61eab26e1af37a2890 (diff)
Merge pull request #24 from falkTX/master
Update DPF, inital file-browser for ZamSFZ
Diffstat (limited to 'libs/dgl/src/pugl/pugl_internal.h')
-rw-r--r--libs/dgl/src/pugl/pugl_internal.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/libs/dgl/src/pugl/pugl_internal.h b/libs/dgl/src/pugl/pugl_internal.h
index 1f75830..7301091 100644
--- a/libs/dgl/src/pugl/pugl_internal.h
+++ b/libs/dgl/src/pugl/pugl_internal.h
@@ -51,9 +51,9 @@ struct PuglViewImpl {
PuglReshapeFunc reshapeFunc;
PuglScrollFunc scrollFunc;
PuglSpecialFunc specialFunc;
+ PuglFileSelectedFunc fileSelectedFunc;
PuglInternals* impl;
-
PuglNativeWindow parent;
int width;
@@ -66,12 +66,10 @@ struct PuglViewImpl {
uint32_t event_timestamp_ms;
};
-PuglInternals* puglInitInternals();
-
-void puglDefaultReshape(PuglView* view, int width, int height);
+PuglInternals* puglInitInternals(void);
PuglView*
-puglInit(int* pargc, char** argv)
+puglInit(void)
{
PuglView* view = (PuglView*)calloc(1, sizeof(PuglView));
if (!view) {
@@ -80,6 +78,7 @@ puglInit(int* pargc, char** argv)
PuglInternals* impl = puglInitInternals();
if (!impl) {
+ free(view);
return NULL;
}
@@ -88,9 +87,6 @@ puglInit(int* pargc, char** argv)
view->height = 480;
return view;
-
- // unused
- (void)pargc; (void)argv;
}
void
@@ -136,7 +132,7 @@ puglGetModifiers(PuglView* view)
return view->mods;
}
-void
+static void
puglDefaultReshape(PuglView* view, int width, int height)
{
glMatrixMode(GL_PROJECTION);
@@ -205,3 +201,9 @@ puglSetSpecialFunc(PuglView* view, PuglSpecialFunc specialFunc)
{
view->specialFunc = specialFunc;
}
+
+void
+puglSetFileSelectedFunc(PuglView* view, PuglFileSelectedFunc fileSelectedFunc)
+{
+ view->fileSelectedFunc = fileSelectedFunc;
+}