aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-18 16:19:39 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-18 16:19:39 +0000
commit33652e007609f316c2cb8543b88d4e38738b0957 (patch)
treed85bde96e6a5d2bd0e1a26822281df694759027f
parent60c1097c987fb516474cdae9f1f9d2bab6c3c6f1 (diff)
callback stub
-rw-r--r--Sgraph.c6
-rw-r--r--Sgraph.h3
-rw-r--r--SgraphP.h2
3 files changed, 11 insertions, 0 deletions
diff --git a/Sgraph.c b/Sgraph.c
index e18a2de..a8e1e3f 100644
--- a/Sgraph.c
+++ b/Sgraph.c
@@ -71,6 +71,12 @@ static XtResource resources[] = {
{ XtNsamples, XtCsamples, XtRInt,
sizeof(int), XtOffset(SgraphWidget, sgraph.samples),
XtRImmediate, (XtPointer)0 },
+ { XtNdataCallback, XtCCallback, XtRCallback,
+ sizeof(XtCallbackProc), XtOffset(SgraphWidget, sgraph.data),
+ XtRCallback, NULL },
+ { XtNfftCallback, XtCCallback, XtRCallback,
+ sizeof(XtCallbackProc), XtOffset(SgraphWidget, sgraph.fft),
+ XtRCallback, NULL },
};
#undef offset
diff --git a/Sgraph.h b/Sgraph.h
index 13cb2c0..7bd05d5 100644
--- a/Sgraph.h
+++ b/Sgraph.h
@@ -55,6 +55,9 @@
#define XtNsize "size"
#define XtCsize "Size"
+#define XtNdataCallback "dataCallback"
+#define XtNfftCallback "fftCallback"
+
/* declare specific SgraphWidget class and instance datatypes */
typedef struct _SgraphClassRec *SgraphWidgetClass;
typedef struct _SgraphRec *SgraphWidget;
diff --git a/SgraphP.h b/SgraphP.h
index 4f4b6bc..40a7c90 100644
--- a/SgraphP.h
+++ b/SgraphP.h
@@ -45,6 +45,8 @@ typedef struct {
double *rightData;
int size;
int samples;
+ XtCallbackProc data;
+ XtCallbackProc fft;
XdbeBackBuffer backBuf;
GC foreGC;