home *** CD-ROM | disk | FTP | other *** search
/ IRIS Development Option 6.2 / IRIS_Development_Option_6.2_814-0478-001.iso / dist / motif_dev.idb / usr / include / Sgm / OscP.h.z / OscP.h
C/C++ Source or Header  |  1996-03-14  |  2KB  |  80 lines

  1. /* 
  2.  * Private header file for Oscilloscope widget
  3.  */
  4. #ifndef OSCP_H
  5. #define OSCP_H
  6.  
  7. #include <Xm/PrimitiveP.h>
  8. #include "Osc.h"
  9.  
  10.  
  11. typedef struct _SgOscClassPart {
  12.   XtPointer         extension;
  13. } SgOscClassPart;
  14.  
  15. typedef struct _SgOscClassRec {
  16.   CoreClassPart        core_class;
  17.   XmPrimitiveClassPart    primitive_class;
  18.   SgOscClassPart    osc_class;
  19. } SgOscClassRec;
  20.  
  21. extern SgOscClassRec sgOscClassRec;
  22.  
  23. typedef struct _SgOscPart {
  24.   int            time_scale;            /* dist between grids        */
  25.   float            real_time_scale;    /* time_scale in sec.          */
  26.   int            grid_type;        /* grid/axis display: 0-8    */
  27.  
  28.   int            sample_rate;        /* samples per second        */
  29.   
  30.   long            minimum;        /* minimum sample value     */
  31.   long            maximum;        /* maximum sample value     */
  32.   
  33.   enum SgOscDisplayMode    display_mode;        /* left, right, or both (stereo)*/
  34.  
  35.   Boolean        live;            /* Live or prerecorded data?     */
  36.   Boolean        repeat;            /* Loop or end playback?     */
  37.   Boolean        done;            /* Reached the end?           */
  38.  
  39.   enum SgOscDataFormat    sample_format;               /* Format of audio data        */
  40.   enum SgOscBufferFormat buffer_format;        /* Mono or Stereo data buffer?    */
  41.   XtPointer         samples;        /* pointer to sample buffer    */
  42.   unsigned int        num_samps;        /* # samps displayed at a time    */
  43.   unsigned int        total_samps;        /* total # samps in data buffer */
  44.   unsigned int        num_samps_drawn;    /* actual # of points to draw    */
  45.   
  46.   XPoint        *l_channel_pts;        /* point array            */
  47.   XPoint        *r_channel_pts;        /* point array            */
  48.  
  49.   int            l_channel_offset;    /* Vert offset            */
  50.   int            r_channel_offset;    /* Vert offset            */
  51.  
  52.   int            place;            /* current position in buffer    */
  53.   int            start;            /* first sample to display    */
  54.   int            end;            /* last sample to display    */
  55.   
  56.   
  57.   Pixel            l_channel_color;    /* left channel color        */
  58.   Pixel            r_channel_color;    /* right channel color        */
  59.   Pixel            grid_color;        /* grid/axis color        */
  60.   Pixel            range_color;        /* range-marker color        */
  61.  
  62.   GC            l_channel_GC;        /* GC for left channel        */
  63.   GC            r_channel_GC;        /* GC for right channel        */
  64.   GC            osc_GC;            /* GC for grid/axis & background*/
  65.   GC            range_GC;        /* GC for range markers        */
  66.   GC            inverse_GC;        /* GC for erasing         */
  67.  
  68.   XtCallbackList    value_changed;        /* callback            */
  69. } SgOscPart;
  70.  
  71. typedef struct _SgOscRec {
  72.   CorePart        core;
  73.   XmPrimitivePart    primitive;
  74.   SgOscPart        osc;
  75. } SgOscRec;
  76.  
  77. #endif /* OSCP_H */
  78.  
  79.  
  80.