From 33652e007609f316c2cb8543b88d4e38738b0957 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 18 Sep 2014 16:19:39 +0000 Subject: callback stub --- Sgraph.c | 6 ++++++ Sgraph.h | 3 +++ SgraphP.h | 2 ++ 3 files changed, 11 insertions(+) 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; -- cgit v1.2.3