/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version: 1.3.21
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


Class name: Window extends: UnitGenerator fields: swigCPtrForWindow {

  Method [ pvtSetCPtr: newCPtr memoryOwn: newCMemoryOwn
    super pvtSetCPtr: (CslNI cslNI_SWIGWindowToUnitGenerator: newCPtr) memoryOwn: newCMemoryOwn.
    swigCPtrForWindow := newCPtr.
  ]

  Method [ getCPtrForWindow
    ^swigCPtrForWindow
  ]


  Method[ swigFinalize
    super swigFinalize.
    self delete.
  ]

  Method [ delete 
    (swigCMemoryOwn and:[ swigCPtrForWindow ~~ 0 ]) ifTrue:[
      swigCMemoryOwn := false.
      CslNI cslNI_delete_Window: swigCPtrForWindow.
    ].
    swigCPtrForWindow := 0.
    super delete.
  ]

  Function[ getCPtr: obj
     obj isNil ifTrue:[^0].
     ^obj getCPtrForWindow
  ]

  Function [ new
    ^self fromPointer: (CslNI cslNI_new_Window__SWIG_0) memoryOwn: true
  ]

  Function [ windowSize: windowSize gain: gain
    ^self fromPointer: (CslNI cslNI_new_Window__SWIG_1: windowSize, gain) memoryOwn: true
  ]

  Function [ windowSize: windowSize
    ^self fromPointer: (CslNI cslNI_new_Window__SWIG_2: windowSize) memoryOwn: true
  ]

  Method [ setSize: windowSize 
    CslNI cslNI_Window_setSize: swigCPtrForWindow with: windowSize
  ]

  Method [ setGain: gain 
    CslNI cslNI_Window_setGain: swigCPtrForWindow with: gain
  ]

  Method [ window 
    |cPtr|
    cPtr := CslNI cslNI_Window_window: swigCPtrForWindow .
    ^(cPtr == 0) ifTrue:[ nil ] ifFalse:[ SwigTypePfloat fromPointer: cPtr memoryOwn: false ]
  ]

  Method [ nextBuffer: outputBuffer outBufNum: outBufNum 
    CslNI cslNI_Window_nextBuffer: swigCPtrForWindow with: (Buffer getCPtr: outputBuffer) with: outBufNum
  ]

  Method [ dump 
    CslNI cslNI_Window_dump: swigCPtrForWindow 
  ]

}
